datastake-daf 0.6.803 → 0.6.805
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 +1716 -1364
- package/dist/layouts/index.js +2 -2
- package/dist/pages/index.js +564 -133
- package/dist/utils/index.js +6 -0
- package/package.json +1 -1
- package/public/Biodiversity/others-default.svg +38 -0
- package/public/Biodiversity/others.svg +38 -0
- package/public/Biodiversity/unidentified-pests-default.svg +33 -0
- package/public/Biodiversity/unidentified-pests.svg +33 -0
- package/src/@daf/core/components/Dashboard/Widget/FaunaWidget/config.js +15 -0
- package/src/@daf/core/components/Dashboard/Widget/FaunaWidget/index.jsx +83 -0
- package/src/@daf/core/components/Dashboard/Widget/InvasiveSpeciesWidget/config.js +11 -0
- package/src/@daf/core/components/Dashboard/Widget/InvasiveSpeciesWidget/index.jsx +87 -0
- package/src/@daf/core/components/EditForm/RenderForm.js +13 -1
- package/src/@daf/core/components/EditForm/_index.scss +4 -3
- package/src/@daf/core/components/EditForm/components/DataLink/flat.js +9 -2
- package/src/@daf/core/components/EditForm/components/DataLink/index.js +8 -1
- package/src/@daf/core/components/EditForm/components/DataLinkGroup/index.js +8 -1
- package/src/@daf/core/components/EditForm/components/Repeatable/index.js +11 -1
- package/src/@daf/core/components/EditForm/context/index.js +9 -0
- package/src/@daf/core/components/EditForm/form.jsx +5 -1
- package/src/@daf/core/components/EditForm/helper.js +25 -3
- package/src/@daf/core/components/Header/hook.js +4 -4
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/columns.js +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/helper.js +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineLocation/index.jsx +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/columns.js +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminModals/CombineSubjects/index.jsx +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/column.js +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminTables/LocationTable/helper.js +1 -8
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/columns.js +3 -3
- package/src/@daf/core/components/Screens/Admin/AdminTables/SubjectsTable/helper.js +1 -8
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/helpers.js +3 -6
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewLocation/index.jsx +2 -2
- package/src/@daf/core/components/Screens/Admin/AdminViews/ViewStakeholder/index.jsx +2 -1
- package/src/@daf/core/components/ViewForm/components/DataLink/flat.js +11 -1
- package/src/@daf/core/components/ViewForm/components/DataLink/index.js +11 -1
- package/src/@daf/core/components/ViewForm/components/DataLinkGroup/index.js +11 -1
- package/src/@daf/core/components/ViewForm/content.jsx +51 -28
- package/src/@daf/core/components/ViewForm/context/index.js +80 -0
- package/src/@daf/pages/Dashboards/SelfAssesment/components/AssociatedInformation/columns.js +9 -5
- package/src/@daf/pages/Dashboards/SelfAssesment/components/AssociatedInformation/index.jsx +15 -3
- package/src/@daf/pages/Dashboards/SelfAssesment/components/OrganisationInformation/columns.js +2 -2
- package/src/@daf/pages/Dashboards/SelfAssesment/components/OrganisationInformation/index.jsx +9 -5
- package/src/@daf/pages/Dashboards/SelfAssesment/index.jsx +1 -1
- package/src/@daf/pages/Edit/index.jsx +1 -0
- package/src/@daf/pages/Locations/MineSite/columns.js +5 -5
- package/src/@daf/pages/Stakeholders/Operators/columns.js +6 -8
- package/src/@daf/pages/Summary/Activities/Monitoring/components/BiodiversityAndHabitat/index.jsx +34 -31
- package/src/@daf/pages/View/index.jsx +1 -0
- package/src/helpers/adminLevels.js +4 -0
- package/src/index.js +2 -0
- package/src/utils.js +3 -1
package/dist/pages/index.js
CHANGED
|
@@ -6152,8 +6152,8 @@ const useHeader = ({
|
|
|
6152
6152
|
setShowFilters(p => !p);
|
|
6153
6153
|
}
|
|
6154
6154
|
}];
|
|
6155
|
-
const actionButtons = onDownload && _actionButtons
|
|
6156
|
-
const extraButtons = onDownload && _actionButtons
|
|
6155
|
+
const actionButtons = onDownload && _actionButtons?.length < 3 ? [...(_actionButtons?.length ? _actionButtons : []), ...(hasFilters ? filterButton : []), downloadButton] : [...(_actionButtons?.length ? _actionButtons : []), ...(hasFilters ? filterButton : [])];
|
|
6156
|
+
const extraButtons = onDownload && _actionButtons?.length >= 3 ? [..._extraButtons, downloadButtonAction] : [..._extraButtons];
|
|
6157
6157
|
const mainCont = React.useRef();
|
|
6158
6158
|
const buttonCont = React.useRef();
|
|
6159
6159
|
const [mainContWidth, setMainContWidth] = React.useState(600);
|
|
@@ -12579,7 +12579,7 @@ const mapDataForChainOfCustody = (data = {}, options = {}, goTo = () => {}) => {
|
|
|
12579
12579
|
hardcodedData: PropTypes__default["default"].array
|
|
12580
12580
|
});
|
|
12581
12581
|
|
|
12582
|
-
const Container$
|
|
12582
|
+
const Container$1 = styled__default["default"].div`
|
|
12583
12583
|
height: ${props => props.height || '300px'};
|
|
12584
12584
|
width: ${props => props.isPdf ? props.width ? props.width : '1000px' : 'calc(100% - 48px)'};
|
|
12585
12585
|
`;
|
|
@@ -12853,7 +12853,7 @@ function LineChart({
|
|
|
12853
12853
|
className: "flex flex-1 flex-column justify-content-center",
|
|
12854
12854
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
12855
12855
|
className: "flex justify-content-center",
|
|
12856
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
12856
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container$1, {
|
|
12857
12857
|
ref: containerRef,
|
|
12858
12858
|
height: height,
|
|
12859
12859
|
isPdf: isPdf,
|
|
@@ -14767,7 +14767,7 @@ function BarChart({
|
|
|
14767
14767
|
className: "flex flex-1 flex-column justify-content-center",
|
|
14768
14768
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
14769
14769
|
className: "flex justify-content-center",
|
|
14770
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
14770
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container$1, {
|
|
14771
14771
|
ref: containerRef,
|
|
14772
14772
|
height: height,
|
|
14773
14773
|
isPdf: isPdf,
|
|
@@ -15913,10 +15913,10 @@ const getColumns$f = ({
|
|
|
15913
15913
|
className: "daf-default-cell"
|
|
15914
15914
|
});
|
|
15915
15915
|
}
|
|
15916
|
-
const published = false;
|
|
15916
|
+
const published = all?.published || false;
|
|
15917
15917
|
return /*#__PURE__*/jsxRuntime.jsx(ProgressBarWithIcon, {
|
|
15918
15918
|
published: published,
|
|
15919
|
-
data:
|
|
15919
|
+
data: all,
|
|
15920
15920
|
t: t
|
|
15921
15921
|
});
|
|
15922
15922
|
}
|
|
@@ -15982,9 +15982,11 @@ function OrganisationInformation({
|
|
|
15982
15982
|
user = {},
|
|
15983
15983
|
goTo = () => {},
|
|
15984
15984
|
getRedirectLink = () => {},
|
|
15985
|
-
theme = {}
|
|
15985
|
+
theme = {},
|
|
15986
|
+
data,
|
|
15987
|
+
loading
|
|
15986
15988
|
}) {
|
|
15987
|
-
const
|
|
15989
|
+
const organisationInfo = [{
|
|
15988
15990
|
key: 'kyc',
|
|
15989
15991
|
label: t("My KYC")
|
|
15990
15992
|
}, {
|
|
@@ -15992,15 +15994,16 @@ function OrganisationInformation({
|
|
|
15992
15994
|
label: t("Management Systems")
|
|
15993
15995
|
}];
|
|
15994
15996
|
const tableData = React.useMemo(() => {
|
|
15995
|
-
return
|
|
15997
|
+
return organisationInfo.map(item => {
|
|
15996
15998
|
return {
|
|
15997
15999
|
key: item.key,
|
|
15998
16000
|
name: item.label,
|
|
15999
|
-
completion: 0,
|
|
16000
|
-
lastUpdate: ""
|
|
16001
|
+
completion: data?.data?.[`${item.key}Data`]?.meta?.completion?.percentage || 0,
|
|
16002
|
+
lastUpdate: data?.data?.[`${item.key}Data`]?.updatedAt || "",
|
|
16003
|
+
...data?.data?.[`${item.key}Data`]
|
|
16001
16004
|
};
|
|
16002
16005
|
});
|
|
16003
|
-
}, [
|
|
16006
|
+
}, [organisationInfo, data]);
|
|
16004
16007
|
const columns = React.useMemo(() => {
|
|
16005
16008
|
return getColumns$f({
|
|
16006
16009
|
t,
|
|
@@ -16014,6 +16017,7 @@ function OrganisationInformation({
|
|
|
16014
16017
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
16015
16018
|
title: t("Organisation Information"),
|
|
16016
16019
|
className: "with-border-header daf-table-wrapper no-pagination no-px-body",
|
|
16020
|
+
loading: loading,
|
|
16017
16021
|
children: /*#__PURE__*/jsxRuntime.jsx(DAFTable, {
|
|
16018
16022
|
columns: columns,
|
|
16019
16023
|
data: tableData
|
|
@@ -16518,6 +16522,11 @@ SearchFilters.propTypes = {
|
|
|
16518
16522
|
t: PropTypes__default["default"].func
|
|
16519
16523
|
};
|
|
16520
16524
|
|
|
16525
|
+
const getAdminLevelName = (data, level) => {
|
|
16526
|
+
const entry = Object.values(data || {}).find(item => item.level === level);
|
|
16527
|
+
return entry?.name || "-";
|
|
16528
|
+
};
|
|
16529
|
+
|
|
16521
16530
|
const getColumns$d = ({
|
|
16522
16531
|
t,
|
|
16523
16532
|
activeTab,
|
|
@@ -16585,7 +16594,8 @@ const getColumns$d = ({
|
|
|
16585
16594
|
className: "daf-default-cell"
|
|
16586
16595
|
});
|
|
16587
16596
|
}
|
|
16588
|
-
const
|
|
16597
|
+
const categoriesOptions = [...(options?.categoriesOptions || []), ...(options?.locationCategories || [])];
|
|
16598
|
+
const label = findOptions(v, categoriesOptions) || "-";
|
|
16589
16599
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
16590
16600
|
title: label,
|
|
16591
16601
|
children: label || "-"
|
|
@@ -16602,7 +16612,7 @@ const getColumns$d = ({
|
|
|
16602
16612
|
className: "daf-default-cell"
|
|
16603
16613
|
});
|
|
16604
16614
|
}
|
|
16605
|
-
const label = findOptions(v, options?.
|
|
16615
|
+
const label = findOptions(v, options?.subCategoriesOptions) || "-";
|
|
16606
16616
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
16607
16617
|
title: label,
|
|
16608
16618
|
children: label || "-"
|
|
@@ -16636,7 +16646,7 @@ const getColumns$d = ({
|
|
|
16636
16646
|
className: "daf-default-cell"
|
|
16637
16647
|
});
|
|
16638
16648
|
}
|
|
16639
|
-
const region =
|
|
16649
|
+
const region = getAdminLevelName(all?.linking?.SCL, "level_1");
|
|
16640
16650
|
return region ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
16641
16651
|
title: region,
|
|
16642
16652
|
children: region
|
|
@@ -16653,7 +16663,7 @@ const getColumns$d = ({
|
|
|
16653
16663
|
className: "daf-default-cell"
|
|
16654
16664
|
});
|
|
16655
16665
|
}
|
|
16656
|
-
const district =
|
|
16666
|
+
const district = getAdminLevelName(all?.linking?.SCL, "level_2");
|
|
16657
16667
|
return district ? /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
16658
16668
|
title: district,
|
|
16659
16669
|
children: district
|
|
@@ -16695,7 +16705,7 @@ const getColumns$d = ({
|
|
|
16695
16705
|
});
|
|
16696
16706
|
}
|
|
16697
16707
|
}, {
|
|
16698
|
-
dataIndex: "
|
|
16708
|
+
dataIndex: "lastUpdate",
|
|
16699
16709
|
title: t("Last Update"),
|
|
16700
16710
|
ellipsis: true,
|
|
16701
16711
|
show: true,
|
|
@@ -16781,7 +16791,8 @@ function AssociatedInformation$1({
|
|
|
16781
16791
|
user = {},
|
|
16782
16792
|
goTo = () => {},
|
|
16783
16793
|
getRedirectLink = () => {},
|
|
16784
|
-
options = {}
|
|
16794
|
+
options = {},
|
|
16795
|
+
theme = {}
|
|
16785
16796
|
}) {
|
|
16786
16797
|
const tabs = [{
|
|
16787
16798
|
value: "stakeholders",
|
|
@@ -16797,19 +16808,34 @@ function AssociatedInformation$1({
|
|
|
16797
16808
|
label: t("Events")
|
|
16798
16809
|
}];
|
|
16799
16810
|
const [activeTab, setActiveTab] = React.useState("stakeholders");
|
|
16800
|
-
const
|
|
16811
|
+
const defaultConfig = React.useMemo(() => ({
|
|
16812
|
+
basepath: "stakeholder",
|
|
16813
|
+
url: "/kyc/associatedInformation"
|
|
16814
|
+
}), []);
|
|
16815
|
+
const {
|
|
16816
|
+
data,
|
|
16817
|
+
loading
|
|
16818
|
+
} = useWidgetFetch({
|
|
16819
|
+
config: defaultConfig
|
|
16820
|
+
});
|
|
16821
|
+
console.log({
|
|
16822
|
+
data
|
|
16823
|
+
});
|
|
16801
16824
|
const columns = React.useMemo(() => getColumns$d({
|
|
16802
16825
|
t,
|
|
16803
16826
|
isMonitoring: false,
|
|
16804
16827
|
activeTab,
|
|
16805
16828
|
options,
|
|
16806
16829
|
getRedirectLink,
|
|
16807
|
-
user
|
|
16808
|
-
|
|
16830
|
+
user,
|
|
16831
|
+
theme,
|
|
16832
|
+
goTo
|
|
16833
|
+
}), [t, activeTab, options, getRedirectLink, user, theme, goTo]);
|
|
16809
16834
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
16810
16835
|
title: t("Associated Information"),
|
|
16811
16836
|
expandable: true,
|
|
16812
16837
|
className: "with-border-header no-px-body overflow-hidden",
|
|
16838
|
+
loading: loading,
|
|
16813
16839
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
16814
16840
|
style: {
|
|
16815
16841
|
display: "flex",
|
|
@@ -16892,7 +16918,9 @@ function SelfAssesment({
|
|
|
16892
16918
|
goTo: goTo,
|
|
16893
16919
|
getRedirectLink: getRedirectLink,
|
|
16894
16920
|
data: data,
|
|
16895
|
-
loading: loading
|
|
16921
|
+
loading: loading,
|
|
16922
|
+
theme: theme,
|
|
16923
|
+
options: options
|
|
16896
16924
|
})
|
|
16897
16925
|
})]
|
|
16898
16926
|
});
|
|
@@ -18519,7 +18547,10 @@ const EditContext = /*#__PURE__*/React.createContext({
|
|
|
18519
18547
|
app: null,
|
|
18520
18548
|
ajaxForms: {},
|
|
18521
18549
|
query: null,
|
|
18522
|
-
goTo: () => {}
|
|
18550
|
+
goTo: () => {},
|
|
18551
|
+
maxWidth: "75%",
|
|
18552
|
+
staticWidth: "614px",
|
|
18553
|
+
fullWidth: false
|
|
18523
18554
|
});
|
|
18524
18555
|
const EditProvider = ({
|
|
18525
18556
|
t,
|
|
@@ -18539,7 +18570,10 @@ const EditProvider = ({
|
|
|
18539
18570
|
errors,
|
|
18540
18571
|
changeErrors,
|
|
18541
18572
|
changeAjaxForms,
|
|
18542
|
-
evaluationConfig
|
|
18573
|
+
evaluationConfig,
|
|
18574
|
+
maxWidth,
|
|
18575
|
+
staticWidth,
|
|
18576
|
+
fullWidth
|
|
18543
18577
|
}) => {
|
|
18544
18578
|
const values = {
|
|
18545
18579
|
t,
|
|
@@ -18558,7 +18592,10 @@ const EditProvider = ({
|
|
|
18558
18592
|
getApiBaseUrl,
|
|
18559
18593
|
query,
|
|
18560
18594
|
evaluationConfig,
|
|
18561
|
-
goTo
|
|
18595
|
+
goTo,
|
|
18596
|
+
maxWidth,
|
|
18597
|
+
staticWidth,
|
|
18598
|
+
fullWidth
|
|
18562
18599
|
};
|
|
18563
18600
|
return /*#__PURE__*/jsxRuntime.jsx(EditContext.Provider, {
|
|
18564
18601
|
value: values,
|
|
@@ -22690,6 +22727,81 @@ function useAjaxModal$1({
|
|
|
22690
22727
|
};
|
|
22691
22728
|
}
|
|
22692
22729
|
|
|
22730
|
+
const ViewContext = /*#__PURE__*/React.createContext({
|
|
22731
|
+
user: null,
|
|
22732
|
+
isReview: false,
|
|
22733
|
+
t: s => s,
|
|
22734
|
+
errors: {},
|
|
22735
|
+
changeErrors: () => {},
|
|
22736
|
+
ajaxOptions: {},
|
|
22737
|
+
getAppHeader: () => {},
|
|
22738
|
+
getApiBaseUrl: () => {},
|
|
22739
|
+
changeAjaxOptions: () => {},
|
|
22740
|
+
changeAjaxForms: () => {},
|
|
22741
|
+
getMainApiUrl: () => {},
|
|
22742
|
+
app: null,
|
|
22743
|
+
ajaxForms: {},
|
|
22744
|
+
query: null,
|
|
22745
|
+
goTo: () => {},
|
|
22746
|
+
maxWidth: "75%",
|
|
22747
|
+
staticWidth: "614px",
|
|
22748
|
+
fullWidth: false
|
|
22749
|
+
});
|
|
22750
|
+
const ViewProvider = ({
|
|
22751
|
+
t,
|
|
22752
|
+
user,
|
|
22753
|
+
ajaxForms,
|
|
22754
|
+
isReview,
|
|
22755
|
+
children,
|
|
22756
|
+
ajaxOptions,
|
|
22757
|
+
highlightMandatory,
|
|
22758
|
+
getAppHeader,
|
|
22759
|
+
getApiBaseUrl,
|
|
22760
|
+
changeAjaxOptions,
|
|
22761
|
+
getMainApiUrl,
|
|
22762
|
+
app,
|
|
22763
|
+
query,
|
|
22764
|
+
goTo,
|
|
22765
|
+
errors,
|
|
22766
|
+
changeErrors,
|
|
22767
|
+
changeAjaxForms,
|
|
22768
|
+
evaluationConfig,
|
|
22769
|
+
maxWidth,
|
|
22770
|
+
staticWidth,
|
|
22771
|
+
fullWidth
|
|
22772
|
+
}) => {
|
|
22773
|
+
const values = {
|
|
22774
|
+
t,
|
|
22775
|
+
errors,
|
|
22776
|
+
changeErrors,
|
|
22777
|
+
user,
|
|
22778
|
+
ajaxForms,
|
|
22779
|
+
isReview,
|
|
22780
|
+
changeAjaxOptions,
|
|
22781
|
+
getMainApiUrl,
|
|
22782
|
+
ajaxOptions,
|
|
22783
|
+
highlightMandatory,
|
|
22784
|
+
app,
|
|
22785
|
+
changeAjaxForms,
|
|
22786
|
+
getAppHeader,
|
|
22787
|
+
getApiBaseUrl,
|
|
22788
|
+
query,
|
|
22789
|
+
evaluationConfig,
|
|
22790
|
+
goTo,
|
|
22791
|
+
maxWidth,
|
|
22792
|
+
staticWidth,
|
|
22793
|
+
fullWidth
|
|
22794
|
+
};
|
|
22795
|
+
return /*#__PURE__*/jsxRuntime.jsx(ViewContext.Provider, {
|
|
22796
|
+
value: values,
|
|
22797
|
+
children: children
|
|
22798
|
+
});
|
|
22799
|
+
};
|
|
22800
|
+
const useViewContext = () => {
|
|
22801
|
+
const values = React.useContext(ViewContext);
|
|
22802
|
+
return values;
|
|
22803
|
+
};
|
|
22804
|
+
|
|
22693
22805
|
function DataLink$1({
|
|
22694
22806
|
form = {},
|
|
22695
22807
|
values,
|
|
@@ -22705,6 +22817,11 @@ function DataLink$1({
|
|
|
22705
22817
|
getToken,
|
|
22706
22818
|
app
|
|
22707
22819
|
}) {
|
|
22820
|
+
const {
|
|
22821
|
+
maxWidth,
|
|
22822
|
+
staticWidth,
|
|
22823
|
+
fullWidth
|
|
22824
|
+
} = useViewContext();
|
|
22708
22825
|
const isSingle = React.useMemo(() => form?.meta?.maxRepeat === 1, [form]);
|
|
22709
22826
|
const [modalRow, setModalRow] = React.useState(null);
|
|
22710
22827
|
const [linkingData, setLinkingData] = React.useState({});
|
|
@@ -23025,7 +23142,11 @@ function DataLink$1({
|
|
|
23025
23142
|
}], [mapKey, inputs, tableKeys, ajaxModalValues]);
|
|
23026
23143
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
23027
23144
|
className: formatClassname(['data-link-cont mt-2', noBody && 'no-body']),
|
|
23028
|
-
style:
|
|
23145
|
+
style: {
|
|
23146
|
+
...form?.meta?.style,
|
|
23147
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
23148
|
+
width: fullWidth ? "100%" : maxWidth
|
|
23149
|
+
},
|
|
23029
23150
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
23030
23151
|
className: "daf-table-wrapper no-padding repeatable-form-table no-pagination",
|
|
23031
23152
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.ConfigProvider, {
|
|
@@ -24630,6 +24751,11 @@ function DataLinkGroup$1({
|
|
|
24630
24751
|
getToken,
|
|
24631
24752
|
app
|
|
24632
24753
|
}) {
|
|
24754
|
+
const {
|
|
24755
|
+
maxWidth,
|
|
24756
|
+
staticWidth,
|
|
24757
|
+
fullWidth
|
|
24758
|
+
} = useViewContext();
|
|
24633
24759
|
const dataLinkKey = React.useMemo(() => Object.keys(form?.inputs || {}).find(k => form?.inputs[k]?.type === "dataLink"), [form]);
|
|
24634
24760
|
const dataLinkInput = React.useMemo(() => (form?.inputs || {})[dataLinkKey], [form, dataLinkKey]);
|
|
24635
24761
|
const otherInputs = React.useMemo(() => Object.keys(form?.inputs || {}).filter(k => k !== dataLinkKey).reduce((all, key) => {
|
|
@@ -24946,7 +25072,11 @@ function DataLinkGroup$1({
|
|
|
24946
25072
|
}], [mapKey, inputs, tableKeys, ajaxModalValues]);
|
|
24947
25073
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
24948
25074
|
className: formatClassname(['data-link-cont mt-2', noBody && 'no-body']),
|
|
24949
|
-
style:
|
|
25075
|
+
style: {
|
|
25076
|
+
...dataLinkInput?.meta?.style,
|
|
25077
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
25078
|
+
width: fullWidth ? "100%" : maxWidth
|
|
25079
|
+
},
|
|
24950
25080
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
24951
25081
|
className: "daf-table-wrapper no-padding repeatable-form-table no-pagination",
|
|
24952
25082
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.ConfigProvider, {
|
|
@@ -25037,6 +25167,11 @@ function DataLinkFlat$1({
|
|
|
25037
25167
|
getToken,
|
|
25038
25168
|
app
|
|
25039
25169
|
}) {
|
|
25170
|
+
const {
|
|
25171
|
+
maxWidth,
|
|
25172
|
+
staticWidth,
|
|
25173
|
+
fullWidth
|
|
25174
|
+
} = useViewContext();
|
|
25040
25175
|
const isSingle = React.useMemo(() => form?.meta?.maxRepeat === 1, [form]);
|
|
25041
25176
|
const [modalRow, setModalRow] = React.useState(null);
|
|
25042
25177
|
const [linkingData, setLinkingData] = React.useState({});
|
|
@@ -25390,7 +25525,11 @@ function DataLinkFlat$1({
|
|
|
25390
25525
|
}], [mapKey, inputs, tableKeys, ajaxModalValues]);
|
|
25391
25526
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
25392
25527
|
className: formatClassname(['data-link-cont mt-2', noBody && 'no-body']),
|
|
25393
|
-
style:
|
|
25528
|
+
style: {
|
|
25529
|
+
...form?.meta?.style,
|
|
25530
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
25531
|
+
width: fullWidth ? "100%" : maxWidth
|
|
25532
|
+
},
|
|
25394
25533
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
25395
25534
|
className: "daf-table-wrapper no-padding repeatable-form-table no-pagination",
|
|
25396
25535
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.ConfigProvider, {
|
|
@@ -27281,6 +27420,9 @@ function Repeatable({
|
|
|
27281
27420
|
getAppHeader,
|
|
27282
27421
|
app,
|
|
27283
27422
|
highlightMandatory,
|
|
27423
|
+
maxWidth,
|
|
27424
|
+
staticWidth,
|
|
27425
|
+
fullWidth,
|
|
27284
27426
|
...rest
|
|
27285
27427
|
} = useEditContext();
|
|
27286
27428
|
const inputId = form?.dataId;
|
|
@@ -27546,7 +27688,11 @@ function Repeatable({
|
|
|
27546
27688
|
};
|
|
27547
27689
|
const preSelected = data.map(d => d.id).filter(d => !!d);
|
|
27548
27690
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
27549
|
-
style:
|
|
27691
|
+
style: {
|
|
27692
|
+
...form?.meta?.style,
|
|
27693
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
27694
|
+
width: fullWidth ? "100%" : staticWidth
|
|
27695
|
+
},
|
|
27550
27696
|
className: formatClassname([form.repeatable ? "repeatable-section data-link-cont mb-6 pb-3" : '', noBody && 'no-body', isHighlighted && !noBody && 'highlighted']),
|
|
27551
27697
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
27552
27698
|
className: "mb-4",
|
|
@@ -27747,6 +27893,9 @@ function Repeatable({
|
|
|
27747
27893
|
// form: MainForm,
|
|
27748
27894
|
// forms: options,
|
|
27749
27895
|
// setFormValues: setValues,
|
|
27896
|
+
maxWidth,
|
|
27897
|
+
staticWidth,
|
|
27898
|
+
fullWidth,
|
|
27750
27899
|
value: inputMeta.comment || '',
|
|
27751
27900
|
onChange: val => {
|
|
27752
27901
|
changeInputMeta({
|
|
@@ -28287,7 +28436,10 @@ const GroupContentFormItem = ({
|
|
|
28287
28436
|
app,
|
|
28288
28437
|
getApiBaseUrl,
|
|
28289
28438
|
getAppHeader,
|
|
28290
|
-
isReview
|
|
28439
|
+
isReview,
|
|
28440
|
+
maxWidth,
|
|
28441
|
+
staticWidth,
|
|
28442
|
+
fullWidth
|
|
28291
28443
|
} = useEditContext();
|
|
28292
28444
|
const [isShown, setIsShown] = React.useState(!!inputMeta?.comment);
|
|
28293
28445
|
let maxRule = rules.find(rule => rule.max)?.max;
|
|
@@ -28797,7 +28949,10 @@ const GroupContentFormItem = ({
|
|
|
28797
28949
|
valueOnlyString: true
|
|
28798
28950
|
}) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type]({
|
|
28799
28951
|
...inputData,
|
|
28800
|
-
name: inputId
|
|
28952
|
+
name: inputId,
|
|
28953
|
+
maxWidth,
|
|
28954
|
+
staticWidth,
|
|
28955
|
+
fullWidth
|
|
28801
28956
|
}, {
|
|
28802
28957
|
form: MainForm,
|
|
28803
28958
|
forms: options,
|
|
@@ -28811,7 +28966,10 @@ const GroupContentFormItem = ({
|
|
|
28811
28966
|
t,
|
|
28812
28967
|
getApiBaseUrl,
|
|
28813
28968
|
getAppHeader,
|
|
28814
|
-
isHighlighted
|
|
28969
|
+
isHighlighted,
|
|
28970
|
+
maxWidth,
|
|
28971
|
+
staticWidth,
|
|
28972
|
+
fullWidth
|
|
28815
28973
|
}) : console.log(input)
|
|
28816
28974
|
}), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
28817
28975
|
className: "code",
|
|
@@ -28921,6 +29079,9 @@ const GroupContentFormItem = ({
|
|
|
28921
29079
|
form: MainForm,
|
|
28922
29080
|
forms: options,
|
|
28923
29081
|
value: inputMeta?.comment || '',
|
|
29082
|
+
maxWidth,
|
|
29083
|
+
staticWidth,
|
|
29084
|
+
fullWidth,
|
|
28924
29085
|
onChange: val => {
|
|
28925
29086
|
if (notPartOfTheForm) {
|
|
28926
29087
|
const _defaultMeta = (values?.meta?.inputs || {})[formId] || {};
|
|
@@ -28996,6 +29157,9 @@ const GroupContentFormItem = ({
|
|
|
28996
29157
|
form: MainForm,
|
|
28997
29158
|
forms: options,
|
|
28998
29159
|
value: lastReview?.comment || '',
|
|
29160
|
+
maxWidth,
|
|
29161
|
+
staticWidth,
|
|
29162
|
+
fullWidth,
|
|
28999
29163
|
onChange: val => {
|
|
29000
29164
|
if (notPartOfTheForm) {
|
|
29001
29165
|
const _defaultMeta = (values?.meta?.inputs || {})[formId] || {};
|
|
@@ -29375,7 +29539,8 @@ const EditForm = ({
|
|
|
29375
29539
|
evaluationConfig = [],
|
|
29376
29540
|
staticWidth = "614px",
|
|
29377
29541
|
fullWidth = false,
|
|
29378
|
-
noConvert = false
|
|
29542
|
+
noConvert = false,
|
|
29543
|
+
maxWidth = "75%"
|
|
29379
29544
|
}) => {
|
|
29380
29545
|
const [isSubmitting] = React.useState(false);
|
|
29381
29546
|
const formData = JSON.parse(JSON.stringify(convertUndefinedToNull(data) || {}));
|
|
@@ -29594,7 +29759,7 @@ const EditForm = ({
|
|
|
29594
29759
|
name: id,
|
|
29595
29760
|
layout: "vertical",
|
|
29596
29761
|
style: {
|
|
29597
|
-
maxWidth: fullWidth ? "unset" : 700
|
|
29762
|
+
maxWidth: maxWidth || (fullWidth ? "unset" : 700) || 700
|
|
29598
29763
|
},
|
|
29599
29764
|
className: `main-form${formClass ? ` ${formClass}` : ""} `,
|
|
29600
29765
|
onValuesChange: (_changedValue, _allValues) => {
|
|
@@ -29735,6 +29900,9 @@ const EditForm = ({
|
|
|
29735
29900
|
}
|
|
29736
29901
|
};
|
|
29737
29902
|
return /*#__PURE__*/jsxRuntime.jsxs(EditProvider, {
|
|
29903
|
+
maxWidth: maxWidth,
|
|
29904
|
+
staticWidth: staticWidth,
|
|
29905
|
+
fullWidth: fullWidth,
|
|
29738
29906
|
t: t,
|
|
29739
29907
|
isReview: isReview,
|
|
29740
29908
|
user: user,
|
|
@@ -30245,6 +30413,9 @@ function DataLink({
|
|
|
30245
30413
|
getApiBaseUrl,
|
|
30246
30414
|
getAppHeader,
|
|
30247
30415
|
app,
|
|
30416
|
+
maxWidth,
|
|
30417
|
+
staticWidth,
|
|
30418
|
+
fullWidth,
|
|
30248
30419
|
...rest
|
|
30249
30420
|
} = useEditContext();
|
|
30250
30421
|
const [rowToEdit, setRowToEdit] = React.useState();
|
|
@@ -30687,7 +30858,11 @@ function DataLink({
|
|
|
30687
30858
|
}, {});
|
|
30688
30859
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
30689
30860
|
className: formatClassname(['data-link-cont mt-2', noBody && 'no-body', isHighlighted && 'highlighted']),
|
|
30690
|
-
style:
|
|
30861
|
+
style: {
|
|
30862
|
+
...form?.meta?.style,
|
|
30863
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
30864
|
+
width: fullWidth ? "100%" : maxWidth
|
|
30865
|
+
},
|
|
30691
30866
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
30692
30867
|
className: "daf-table-wrapper no-padding repeatable-form-table no-pagination",
|
|
30693
30868
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.ConfigProvider, {
|
|
@@ -31291,6 +31466,9 @@ function DataLinkGroup({
|
|
|
31291
31466
|
getApiBaseUrl,
|
|
31292
31467
|
getAppHeader,
|
|
31293
31468
|
app,
|
|
31469
|
+
maxWidth,
|
|
31470
|
+
staticWidth,
|
|
31471
|
+
fullWidth,
|
|
31294
31472
|
...rest
|
|
31295
31473
|
} = useEditContext();
|
|
31296
31474
|
const [rowToEdit, setRowToEdit] = React.useState();
|
|
@@ -31731,7 +31909,11 @@ function DataLinkGroup({
|
|
|
31731
31909
|
}, {});
|
|
31732
31910
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
31733
31911
|
className: formatClassname(['data-link-cont mt-2', noBody && 'no-body', isHighlighted && 'highlighted']),
|
|
31734
|
-
style:
|
|
31912
|
+
style: {
|
|
31913
|
+
...form?.meta?.style,
|
|
31914
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
31915
|
+
width: fullWidth ? "100%" : staticWidth
|
|
31916
|
+
},
|
|
31735
31917
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
31736
31918
|
className: "daf-table-wrapper no-padding repeatable-form-table no-pagination",
|
|
31737
31919
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.ConfigProvider, {
|
|
@@ -31838,6 +32020,9 @@ function DataLinkFlat({
|
|
|
31838
32020
|
getApiBaseUrl,
|
|
31839
32021
|
getAppHeader,
|
|
31840
32022
|
app,
|
|
32023
|
+
maxWidth,
|
|
32024
|
+
staticWidth,
|
|
32025
|
+
fullWidth,
|
|
31841
32026
|
...rest
|
|
31842
32027
|
} = useEditContext();
|
|
31843
32028
|
const [rowToEdit, setRowToEdit] = React.useState();
|
|
@@ -32283,7 +32468,11 @@ function DataLinkFlat({
|
|
|
32283
32468
|
const disabledInputs = rowToEdit ? [...(form?.meta?.disabledKeysEdit || []), ...(form?.meta?.disabledKeys || [])] : [...(form?.meta?.disabledKeysCreate || []), ...(form?.meta?.disabledKeys || [])];
|
|
32284
32469
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
32285
32470
|
className: formatClassname(['data-link-cont mt-2', noBody && 'no-body', isHighlighted && 'highlighted']),
|
|
32286
|
-
style:
|
|
32471
|
+
style: {
|
|
32472
|
+
...form?.meta?.style,
|
|
32473
|
+
maxWidth: fullWidth ? "unset" : maxWidth,
|
|
32474
|
+
width: fullWidth ? "100%" : staticWidth
|
|
32475
|
+
},
|
|
32287
32476
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
32288
32477
|
className: "daf-table-wrapper no-padding repeatable-form-table no-pagination",
|
|
32289
32478
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.ConfigProvider, {
|
|
@@ -32295,9 +32484,7 @@ function DataLinkFlat({
|
|
|
32295
32484
|
columns: columns,
|
|
32296
32485
|
dataSource: dataSource,
|
|
32297
32486
|
rowKey: "key",
|
|
32298
|
-
scroll: noBody
|
|
32299
|
-
y: 170
|
|
32300
|
-
}
|
|
32487
|
+
scroll: noBody
|
|
32301
32488
|
})
|
|
32302
32489
|
})
|
|
32303
32490
|
}), /*#__PURE__*/jsxRuntime.jsx(antd.Modal, {
|
|
@@ -33774,7 +33961,10 @@ const inputTypeComponent$1 = {
|
|
|
33774
33961
|
repeatIndex,
|
|
33775
33962
|
inputName,
|
|
33776
33963
|
name,
|
|
33777
|
-
tags
|
|
33964
|
+
tags,
|
|
33965
|
+
maxWidth,
|
|
33966
|
+
staticWidth,
|
|
33967
|
+
fullWidth
|
|
33778
33968
|
}, {
|
|
33779
33969
|
forms,
|
|
33780
33970
|
form,
|
|
@@ -33838,6 +34028,11 @@ const inputTypeComponent$1 = {
|
|
|
33838
34028
|
}
|
|
33839
34029
|
opts = groupOptions;
|
|
33840
34030
|
}
|
|
34031
|
+
console.log({
|
|
34032
|
+
maxWidth,
|
|
34033
|
+
staticWidth,
|
|
34034
|
+
fullWidth
|
|
34035
|
+
});
|
|
33841
34036
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Select, {
|
|
33842
34037
|
size: "medium",
|
|
33843
34038
|
allowClear: true,
|
|
@@ -33852,6 +34047,11 @@ const inputTypeComponent$1 = {
|
|
|
33852
34047
|
className: formatClassname([isHighlighted && "highlighted-select"]),
|
|
33853
34048
|
disabled: props.disabled || inputMeta.notApplicable || inputMeta.notAvailable,
|
|
33854
34049
|
placeholder: getMetaPlaceholer(inputMeta, t) || getInputProp(props.placeholder, formsValue) || t("Select all relevant options"),
|
|
34050
|
+
styles: {
|
|
34051
|
+
selector: {
|
|
34052
|
+
width: "100%"
|
|
34053
|
+
}
|
|
34054
|
+
},
|
|
33855
34055
|
children: (opts || []).map((option, i) => {
|
|
33856
34056
|
const otherProps = {};
|
|
33857
34057
|
|
|
@@ -35565,7 +35765,10 @@ const GetFormItem$1 = ({
|
|
|
35565
35765
|
ajaxOptions,
|
|
35566
35766
|
changeAjaxForms,
|
|
35567
35767
|
app,
|
|
35568
|
-
isReview
|
|
35768
|
+
isReview,
|
|
35769
|
+
maxWidth,
|
|
35770
|
+
staticWidth,
|
|
35771
|
+
fullWidth
|
|
35569
35772
|
} = useEditContext();
|
|
35570
35773
|
const lastReview = (inputMeta?.reviews || [])[(inputMeta?.reviews?.length || 0) - 1];
|
|
35571
35774
|
const [isShown, setIsShown] = React.useState(!!inputData.commentValue);
|
|
@@ -35930,7 +36133,12 @@ const GetFormItem$1 = ({
|
|
|
35930
36133
|
getToken: getToken,
|
|
35931
36134
|
app: app,
|
|
35932
36135
|
valueOnlyString: true
|
|
35933
|
-
}) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type](
|
|
36136
|
+
}) : inputTypeComponent$1[input.type] ? inputTypeComponent$1[input.type]({
|
|
36137
|
+
...inputData,
|
|
36138
|
+
maxWidth,
|
|
36139
|
+
staticWidth,
|
|
36140
|
+
fullWidth
|
|
36141
|
+
}, {
|
|
35934
36142
|
form: MainForm,
|
|
35935
36143
|
forms: options,
|
|
35936
36144
|
allForms: plainForms,
|
|
@@ -35946,7 +36154,10 @@ const GetFormItem$1 = ({
|
|
|
35946
36154
|
t,
|
|
35947
36155
|
getApiBaseUrl,
|
|
35948
36156
|
getAppHeader,
|
|
35949
|
-
isHighlighted
|
|
36157
|
+
isHighlighted,
|
|
36158
|
+
maxWidth,
|
|
36159
|
+
staticWidth,
|
|
36160
|
+
fullWidth
|
|
35950
36161
|
}) : console.log(input)
|
|
35951
36162
|
}), input.meta?.code ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
35952
36163
|
className: "code",
|
|
@@ -36009,7 +36220,12 @@ const GetFormItem$1 = ({
|
|
|
36009
36220
|
})
|
|
36010
36221
|
})]
|
|
36011
36222
|
}),
|
|
36012
|
-
children: inputTypeComponent$1.comment(
|
|
36223
|
+
children: inputTypeComponent$1.comment({
|
|
36224
|
+
...inputData,
|
|
36225
|
+
maxWidth,
|
|
36226
|
+
staticWidth,
|
|
36227
|
+
fullWidth
|
|
36228
|
+
}, {
|
|
36013
36229
|
form: MainForm,
|
|
36014
36230
|
forms: options,
|
|
36015
36231
|
setFormValues: setValues,
|
|
@@ -36025,7 +36241,10 @@ const GetFormItem$1 = ({
|
|
|
36025
36241
|
},
|
|
36026
36242
|
t,
|
|
36027
36243
|
getApiBaseUrl,
|
|
36028
|
-
getAppHeader
|
|
36244
|
+
getAppHeader,
|
|
36245
|
+
maxWidth,
|
|
36246
|
+
staticWidth,
|
|
36247
|
+
fullWidth
|
|
36029
36248
|
})
|
|
36030
36249
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36031
36250
|
className: "max-char-span",
|
|
@@ -36048,7 +36267,12 @@ const GetFormItem$1 = ({
|
|
|
36048
36267
|
children: t("Review note")
|
|
36049
36268
|
})
|
|
36050
36269
|
}),
|
|
36051
|
-
children: inputTypeComponent$1.comment(
|
|
36270
|
+
children: inputTypeComponent$1.comment({
|
|
36271
|
+
...inputData,
|
|
36272
|
+
maxWidth,
|
|
36273
|
+
staticWidth,
|
|
36274
|
+
fullWidth
|
|
36275
|
+
}, {
|
|
36052
36276
|
form: MainForm,
|
|
36053
36277
|
forms: options,
|
|
36054
36278
|
value: lastReview?.comment || "",
|
|
@@ -36072,7 +36296,10 @@ const GetFormItem$1 = ({
|
|
|
36072
36296
|
},
|
|
36073
36297
|
t,
|
|
36074
36298
|
getApiBaseUrl,
|
|
36075
|
-
getAppHeader
|
|
36299
|
+
getAppHeader,
|
|
36300
|
+
maxWidth,
|
|
36301
|
+
staticWidth,
|
|
36302
|
+
fullWidth
|
|
36076
36303
|
})
|
|
36077
36304
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
36078
36305
|
className: "max-char-span",
|
|
@@ -41230,10 +41457,6 @@ const getColumns$a = ({
|
|
|
41230
41457
|
goTo(getRedirectLink(link));
|
|
41231
41458
|
};
|
|
41232
41459
|
const moreMenuItems = [{
|
|
41233
|
-
label: t("Details"),
|
|
41234
|
-
value: "details",
|
|
41235
|
-
onClick: onClick
|
|
41236
|
-
}, {
|
|
41237
41460
|
label: t("Summary"),
|
|
41238
41461
|
value: "Summary",
|
|
41239
41462
|
onClick: () => {
|
|
@@ -41244,11 +41467,13 @@ const getColumns$a = ({
|
|
|
41244
41467
|
goTo(getRedirectLink(link));
|
|
41245
41468
|
}
|
|
41246
41469
|
// disabled: true,
|
|
41470
|
+
}, {
|
|
41471
|
+
label: t("Details"),
|
|
41472
|
+
value: "details",
|
|
41473
|
+
onClick: onClick
|
|
41247
41474
|
}];
|
|
41248
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
41249
|
-
|
|
41250
|
-
items: moreMenuItems
|
|
41251
|
-
})
|
|
41475
|
+
return /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
|
|
41476
|
+
items: moreMenuItems
|
|
41252
41477
|
});
|
|
41253
41478
|
}
|
|
41254
41479
|
}].filter(column => column.show !== false);
|
|
@@ -43664,10 +43889,6 @@ const getColumns$4 = ({
|
|
|
43664
43889
|
goTo(getRedirectLink(link));
|
|
43665
43890
|
};
|
|
43666
43891
|
const moreMenuItems = [{
|
|
43667
|
-
label: t("Details"),
|
|
43668
|
-
value: "details",
|
|
43669
|
-
onClick: onClick
|
|
43670
|
-
}, {
|
|
43671
43892
|
label: t("Summary"),
|
|
43672
43893
|
value: "Summary",
|
|
43673
43894
|
onClick: () => {
|
|
@@ -43678,6 +43899,10 @@ const getColumns$4 = ({
|
|
|
43678
43899
|
goTo(getRedirectLink(link));
|
|
43679
43900
|
}
|
|
43680
43901
|
// disabled: true,
|
|
43902
|
+
}, {
|
|
43903
|
+
label: t("Details"),
|
|
43904
|
+
value: "details",
|
|
43905
|
+
onClick: onClick
|
|
43681
43906
|
}];
|
|
43682
43907
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
43683
43908
|
children: /*#__PURE__*/jsxRuntime.jsx(MoreMenu, {
|
|
@@ -44748,7 +44973,7 @@ function RadialBarChart({
|
|
|
44748
44973
|
className: "flex flex-1 flex-column justify-content-center",
|
|
44749
44974
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
44750
44975
|
className: "flex justify-content-center",
|
|
44751
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
44976
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container$1, {
|
|
44752
44977
|
ref: containerRef,
|
|
44753
44978
|
isPdf: isPdf
|
|
44754
44979
|
})
|
|
@@ -48526,6 +48751,218 @@ const VegetationContainer = styled__default["default"].div`
|
|
|
48526
48751
|
}
|
|
48527
48752
|
`;
|
|
48528
48753
|
|
|
48754
|
+
const getFaunaConfig = () => {
|
|
48755
|
+
return [{
|
|
48756
|
+
img: "/Biodiversity/birds.svg",
|
|
48757
|
+
key: "birds",
|
|
48758
|
+
disabled: "/Biodiversity/birds-default.svg"
|
|
48759
|
+
}, {
|
|
48760
|
+
img: "/Biodiversity/crabs.svg",
|
|
48761
|
+
key: "crabs",
|
|
48762
|
+
disabled: "/Biodiversity/crabs-default.svg"
|
|
48763
|
+
}, {
|
|
48764
|
+
img: "/Biodiversity/cymbium.svg",
|
|
48765
|
+
key: "cymbium",
|
|
48766
|
+
disabled: "/Biodiversity/cymbium-default.svg"
|
|
48767
|
+
}, {
|
|
48768
|
+
img: "/Biodiversity/fish.svg",
|
|
48769
|
+
key: "fish",
|
|
48770
|
+
disabled: "/Biodiversity/fish-default.svg"
|
|
48771
|
+
}, {
|
|
48772
|
+
img: "/Biodiversity/juveniles.svg",
|
|
48773
|
+
key: "juveniles",
|
|
48774
|
+
disabled: "/Biodiversity/juveniles-default.svg"
|
|
48775
|
+
}, {
|
|
48776
|
+
img: "/Biodiversity/mollusks.svg",
|
|
48777
|
+
key: "mollusks",
|
|
48778
|
+
disabled: "/Biodiversity/mollusks-default.svg"
|
|
48779
|
+
}, {
|
|
48780
|
+
img: "/Biodiversity/mongooses.svg",
|
|
48781
|
+
key: "mongooses",
|
|
48782
|
+
disabled: "/Biodiversity/mongooses-default.svg"
|
|
48783
|
+
}, {
|
|
48784
|
+
img: "/Biodiversity/monkeys.svg",
|
|
48785
|
+
key: "monkeys",
|
|
48786
|
+
disabled: "/Biodiversity/monkeys-default.svg"
|
|
48787
|
+
}, {
|
|
48788
|
+
img: "/Biodiversity/oysters.svg",
|
|
48789
|
+
key: "oysters",
|
|
48790
|
+
disabled: "/Biodiversity/oysters-default.svg"
|
|
48791
|
+
}, {
|
|
48792
|
+
img: "/Biodiversity/snails.svg",
|
|
48793
|
+
key: "snails",
|
|
48794
|
+
disabled: "/Biodiversity/snails-default.svg"
|
|
48795
|
+
}];
|
|
48796
|
+
};
|
|
48797
|
+
|
|
48798
|
+
function FaunaWidget({
|
|
48799
|
+
title = "Observed Fauna",
|
|
48800
|
+
faunaPresent = [],
|
|
48801
|
+
filterKeys = null,
|
|
48802
|
+
columnsPerRow = 5,
|
|
48803
|
+
itemWidth = 100,
|
|
48804
|
+
itemHeight = 100,
|
|
48805
|
+
t = key => key,
|
|
48806
|
+
...props
|
|
48807
|
+
}) {
|
|
48808
|
+
let faunaConfig = getFaunaConfig();
|
|
48809
|
+
|
|
48810
|
+
// Filter to show only specific keys if filterKeys is provided
|
|
48811
|
+
if (filterKeys && Array.isArray(filterKeys)) {
|
|
48812
|
+
faunaConfig = faunaConfig.filter(item => filterKeys.includes(item.key));
|
|
48813
|
+
}
|
|
48814
|
+
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
48815
|
+
title: title,
|
|
48816
|
+
className: `with-border-header no-p-body`,
|
|
48817
|
+
...props,
|
|
48818
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FaunaWrapper, {
|
|
48819
|
+
$columnsPerRow: columnsPerRow,
|
|
48820
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FaunaContainer, {
|
|
48821
|
+
$columnsPerRow: columnsPerRow,
|
|
48822
|
+
$itemWidth: itemWidth,
|
|
48823
|
+
$itemHeight: itemHeight,
|
|
48824
|
+
children: faunaConfig.map(item => {
|
|
48825
|
+
// Use colored SVG if the item's key exists in faunaPresent array
|
|
48826
|
+
// Otherwise use default SVG
|
|
48827
|
+
const isPresent = Array.isArray(faunaPresent) && faunaPresent.includes(item.key);
|
|
48828
|
+
const shouldUseColored = isPresent;
|
|
48829
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
48830
|
+
title: t(`straatos::${item.key}`),
|
|
48831
|
+
children: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
48832
|
+
src: shouldUseColored ? item.img : item.disabled,
|
|
48833
|
+
className: `fauna-item`,
|
|
48834
|
+
alt: item.key
|
|
48835
|
+
}, item.key)
|
|
48836
|
+
}, item.key);
|
|
48837
|
+
})
|
|
48838
|
+
})
|
|
48839
|
+
})
|
|
48840
|
+
});
|
|
48841
|
+
}
|
|
48842
|
+
const FaunaWrapper = styled__default["default"].div`
|
|
48843
|
+
padding: 24px;
|
|
48844
|
+
width: 100%;
|
|
48845
|
+
${props => props.$columnsPerRow ? `
|
|
48846
|
+
overflow-x: auto;
|
|
48847
|
+
` : ''}
|
|
48848
|
+
`;
|
|
48849
|
+
const FaunaContainer = styled__default["default"].div`
|
|
48850
|
+
display: grid;
|
|
48851
|
+
grid-template-columns: ${props => props.$columnsPerRow ? `repeat(${props.$columnsPerRow}, 1fr)` : `repeat(auto-fit, minmax(${props.$itemWidth}px, 1fr))`};
|
|
48852
|
+
gap: 24px;
|
|
48853
|
+
width: 100%;
|
|
48854
|
+
|
|
48855
|
+
.fauna-item {
|
|
48856
|
+
width: 100%;
|
|
48857
|
+
aspect-ratio: ${props => props.$itemWidth / props.$itemHeight};
|
|
48858
|
+
border-radius: 7px;
|
|
48859
|
+
flex-shrink: 0;
|
|
48860
|
+
display: block;
|
|
48861
|
+
margin: 0;
|
|
48862
|
+
padding: 0;
|
|
48863
|
+
object-fit: contain;
|
|
48864
|
+
}
|
|
48865
|
+
`;
|
|
48866
|
+
|
|
48867
|
+
const getInvasiveSpeciesConfig = () => {
|
|
48868
|
+
return [{
|
|
48869
|
+
img: "/Biodiversity/spiders.svg",
|
|
48870
|
+
key: "spiders",
|
|
48871
|
+
disabled: "/Biodiversity/spiders-default.svg"
|
|
48872
|
+
}, {
|
|
48873
|
+
img: "/Biodiversity/scale-insects.svg",
|
|
48874
|
+
key: "scaleInsects",
|
|
48875
|
+
disabled: "/Biodiversity/scale-insects-default.svg"
|
|
48876
|
+
}, {
|
|
48877
|
+
img: "/Biodiversity/caterpillars.svg",
|
|
48878
|
+
key: "caterpillars",
|
|
48879
|
+
disabled: "/Biodiversity/caterpillars-default.svg"
|
|
48880
|
+
}, {
|
|
48881
|
+
img: "/Biodiversity/ants.svg",
|
|
48882
|
+
key: "ants",
|
|
48883
|
+
disabled: "/Biodiversity/ants-default.svg"
|
|
48884
|
+
}, {
|
|
48885
|
+
img: "/Biodiversity/unidentified-pests.svg",
|
|
48886
|
+
key: "unidentifiedPests",
|
|
48887
|
+
disabled: "/Biodiversity/unidentified-pests-default.svg"
|
|
48888
|
+
}, {
|
|
48889
|
+
img: "/Biodiversity/others.svg",
|
|
48890
|
+
key: "other",
|
|
48891
|
+
disabled: "/Biodiversity/others-default.svg"
|
|
48892
|
+
}];
|
|
48893
|
+
};
|
|
48894
|
+
|
|
48895
|
+
function InvasiveSpeciesWidget({
|
|
48896
|
+
title = "Invasive Species",
|
|
48897
|
+
invasiveSpecies = [],
|
|
48898
|
+
hasInvasiveSpecies,
|
|
48899
|
+
filterKeys = null,
|
|
48900
|
+
columnsPerRow = 3,
|
|
48901
|
+
itemWidth = 100,
|
|
48902
|
+
itemHeight = 100,
|
|
48903
|
+
t = key => key,
|
|
48904
|
+
...props
|
|
48905
|
+
}) {
|
|
48906
|
+
let invasiveSpeciesConfig = getInvasiveSpeciesConfig();
|
|
48907
|
+
|
|
48908
|
+
// Filter to show only specific keys if filterKeys is provided
|
|
48909
|
+
if (filterKeys && Array.isArray(filterKeys)) {
|
|
48910
|
+
invasiveSpeciesConfig = invasiveSpeciesConfig.filter(item => filterKeys.includes(item.key));
|
|
48911
|
+
}
|
|
48912
|
+
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
48913
|
+
title: title,
|
|
48914
|
+
className: `with-border-header no-p-body`,
|
|
48915
|
+
...props,
|
|
48916
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InvasiveSpeciesWrapper, {
|
|
48917
|
+
$columnsPerRow: columnsPerRow,
|
|
48918
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InvasiveSpeciesContainer, {
|
|
48919
|
+
$columnsPerRow: columnsPerRow,
|
|
48920
|
+
$itemWidth: itemWidth,
|
|
48921
|
+
$itemHeight: itemHeight,
|
|
48922
|
+
children: invasiveSpeciesConfig.map(item => {
|
|
48923
|
+
// If hasInvasiveSpecies is 'no', show all as inactive
|
|
48924
|
+
// If hasInvasiveSpecies is 'yes', show present ones as active
|
|
48925
|
+
const shouldShowAllAsNotPresent = hasInvasiveSpecies === 'no';
|
|
48926
|
+
const isPresent = !shouldShowAllAsNotPresent && Array.isArray(invasiveSpecies) && invasiveSpecies.includes(item.key);
|
|
48927
|
+
const shouldUseColored = isPresent;
|
|
48928
|
+
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
48929
|
+
title: t(`straatos::${item.key}`),
|
|
48930
|
+
children: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
48931
|
+
src: shouldUseColored ? item.img : item.disabled,
|
|
48932
|
+
className: `invasive-species-item`,
|
|
48933
|
+
alt: item.key
|
|
48934
|
+
}, item.key)
|
|
48935
|
+
}, item.key);
|
|
48936
|
+
})
|
|
48937
|
+
})
|
|
48938
|
+
})
|
|
48939
|
+
});
|
|
48940
|
+
}
|
|
48941
|
+
const InvasiveSpeciesWrapper = styled__default["default"].div`
|
|
48942
|
+
padding: 24px;
|
|
48943
|
+
width: 100%;
|
|
48944
|
+
${props => props.$columnsPerRow ? `
|
|
48945
|
+
overflow-x: auto;
|
|
48946
|
+
` : ''}
|
|
48947
|
+
`;
|
|
48948
|
+
const InvasiveSpeciesContainer = styled__default["default"].div`
|
|
48949
|
+
display: grid;
|
|
48950
|
+
grid-template-columns: ${props => props.$columnsPerRow ? `repeat(${props.$columnsPerRow}, 1fr)` : `repeat(auto-fit, minmax(${props.$itemWidth}px, 1fr))`};
|
|
48951
|
+
gap: 24px;
|
|
48952
|
+
width: 100%;
|
|
48953
|
+
|
|
48954
|
+
.invasive-species-item {
|
|
48955
|
+
width: 100%;
|
|
48956
|
+
aspect-ratio: ${props => props.$itemWidth / props.$itemHeight};
|
|
48957
|
+
border-radius: 7px;
|
|
48958
|
+
flex-shrink: 0;
|
|
48959
|
+
display: block;
|
|
48960
|
+
margin: 0;
|
|
48961
|
+
padding: 0;
|
|
48962
|
+
object-fit: contain;
|
|
48963
|
+
}
|
|
48964
|
+
`;
|
|
48965
|
+
|
|
48529
48966
|
const RepeatableGroup = ({
|
|
48530
48967
|
name = null,
|
|
48531
48968
|
config = {},
|
|
@@ -48871,7 +49308,9 @@ const Content = ({
|
|
|
48871
49308
|
getAppHeader,
|
|
48872
49309
|
user,
|
|
48873
49310
|
evaluationConfig = [],
|
|
48874
|
-
fullWidth = false
|
|
49311
|
+
fullWidth = false,
|
|
49312
|
+
maxWidth = "75%",
|
|
49313
|
+
staticWidth = "614px"
|
|
48875
49314
|
}) => {
|
|
48876
49315
|
const groupSingle = grps => {
|
|
48877
49316
|
const form = Object.keys(grps).reduce((f, gKey) => {
|
|
@@ -49042,6 +49481,9 @@ const Content = ({
|
|
|
49042
49481
|
data: data,
|
|
49043
49482
|
allData: data,
|
|
49044
49483
|
linkingData: linkingData,
|
|
49484
|
+
maxWidth: maxWidth,
|
|
49485
|
+
staticWidth: staticWidth,
|
|
49486
|
+
fullWidth: fullWidth,
|
|
49045
49487
|
className: isEven ? ind === _length - 1 || ind === _length - 2 ? "last" : undefined : ind === _length - 1 ? "last" : undefined,
|
|
49046
49488
|
linkingForms: linkingForms,
|
|
49047
49489
|
ajaxOptions: ajaxOptions,
|
|
@@ -49089,7 +49531,10 @@ const Content = ({
|
|
|
49089
49531
|
linkingForms: linkingForms,
|
|
49090
49532
|
ajaxOptions: ajaxOptions,
|
|
49091
49533
|
evaluationConfig: evaluationConfig,
|
|
49092
|
-
cols: 2
|
|
49534
|
+
cols: 2,
|
|
49535
|
+
maxWidth: maxWidth,
|
|
49536
|
+
staticWidth: staticWidth,
|
|
49537
|
+
fullWidth: fullWidth
|
|
49093
49538
|
}, key)]
|
|
49094
49539
|
}, key) : null;
|
|
49095
49540
|
})
|
|
@@ -49156,7 +49601,9 @@ const Content = ({
|
|
|
49156
49601
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
49157
49602
|
className: "wrapper",
|
|
49158
49603
|
style: {
|
|
49159
|
-
width:
|
|
49604
|
+
width: "75%",
|
|
49605
|
+
display: "flex",
|
|
49606
|
+
justifyContent: "center"
|
|
49160
49607
|
},
|
|
49161
49608
|
children: [f.alertConf ? /*#__PURE__*/jsxRuntime.jsx(antd.Alert, {
|
|
49162
49609
|
className: "w-100",
|
|
@@ -49171,10 +49618,23 @@ const Content = ({
|
|
|
49171
49618
|
});
|
|
49172
49619
|
}
|
|
49173
49620
|
};
|
|
49174
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
49175
|
-
|
|
49176
|
-
|
|
49177
|
-
|
|
49621
|
+
return /*#__PURE__*/jsxRuntime.jsx(ViewProvider, {
|
|
49622
|
+
t: t,
|
|
49623
|
+
app: app,
|
|
49624
|
+
ajaxForms: ajaxForms,
|
|
49625
|
+
changeAjaxForms: changeAjaxForms,
|
|
49626
|
+
getApiBaseUrl: getApiBaseUrl,
|
|
49627
|
+
getAppHeader: getAppHeader,
|
|
49628
|
+
user: user,
|
|
49629
|
+
evaluationConfig: evaluationConfig,
|
|
49630
|
+
fullWidth: fullWidth,
|
|
49631
|
+
maxWidth: maxWidth,
|
|
49632
|
+
staticWidth: staticWidth,
|
|
49633
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
49634
|
+
className: "content",
|
|
49635
|
+
style: style,
|
|
49636
|
+
children: renderContent(form)
|
|
49637
|
+
})
|
|
49178
49638
|
});
|
|
49179
49639
|
};
|
|
49180
49640
|
|
|
@@ -50283,7 +50743,7 @@ function ColumnChart({
|
|
|
50283
50743
|
className: "flex flex-1 flex-column justify-content-center",
|
|
50284
50744
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
50285
50745
|
className: "flex justify-content-center",
|
|
50286
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
50746
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container$1, {
|
|
50287
50747
|
ref: containerRef,
|
|
50288
50748
|
height: height,
|
|
50289
50749
|
isPdf: isPdf,
|
|
@@ -50441,7 +50901,7 @@ function DonutPie({
|
|
|
50441
50901
|
className: "flex flex-1 flex-column justify-content-center",
|
|
50442
50902
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
50443
50903
|
className: "flex justify-content-center",
|
|
50444
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Container$
|
|
50904
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Container$1, {
|
|
50445
50905
|
ref: containerRef,
|
|
50446
50906
|
style: {
|
|
50447
50907
|
height
|
|
@@ -57349,7 +57809,7 @@ const SeedlingsHeight = ({
|
|
|
57349
57809
|
});
|
|
57350
57810
|
};
|
|
57351
57811
|
|
|
57352
|
-
const Container
|
|
57812
|
+
const Container = styled__default["default"].div`
|
|
57353
57813
|
display: grid;
|
|
57354
57814
|
grid-template-columns: repeat(3, 1fr);
|
|
57355
57815
|
gap: 24px;
|
|
@@ -57386,7 +57846,7 @@ const MangroveGrowthAndSurvival = ({
|
|
|
57386
57846
|
title: t("Mangrove Growth and Survival"),
|
|
57387
57847
|
className: "with-border-header h-w-btn-header",
|
|
57388
57848
|
children: /*#__PURE__*/jsxRuntime.jsxs("section", {
|
|
57389
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(Container
|
|
57849
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
57390
57850
|
children: [/*#__PURE__*/jsxRuntime.jsx(PlantedSpecies, {
|
|
57391
57851
|
plantedSpecies: activityData?.plantedSpecies,
|
|
57392
57852
|
mangroveSpecies: options?.mangroveSpecies,
|
|
@@ -57432,57 +57892,22 @@ const MangroveGrowthAndSurvival = ({
|
|
|
57432
57892
|
});
|
|
57433
57893
|
};
|
|
57434
57894
|
|
|
57435
|
-
const
|
|
57436
|
-
|
|
57437
|
-
const formatFaunaLabel = key => {
|
|
57438
|
-
return key.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
|
|
57439
|
-
};
|
|
57440
|
-
const formatInvasiveSpeciesLabel = key => {
|
|
57441
|
-
return key.replace(/([A-Z])/g, ' $1').split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(' ');
|
|
57442
|
-
};
|
|
57443
|
-
const createFaunaIndicatorConfig = (key, faunaPresent, t) => {
|
|
57444
|
-
const isPresent = Array.isArray(faunaPresent) && faunaPresent.includes(key);
|
|
57445
|
-
const label = formatFaunaLabel(key);
|
|
57446
|
-
return {
|
|
57447
|
-
label: t(label),
|
|
57448
|
-
type: isPresent ? 'compliant' : 'notCompliant',
|
|
57449
|
-
statusIcon: isPresent ? 'Check' : 'Close',
|
|
57450
|
-
statusIconColor: isPresent ? '#12B76A' : '#6C737F',
|
|
57451
|
-
statusBadgeBackgroundColor: isPresent ? undefined : '#F9FAFB',
|
|
57452
|
-
statusBadgeBorderColor: isPresent ? undefined : '#E5E7EB'
|
|
57453
|
-
};
|
|
57454
|
-
};
|
|
57455
|
-
const createInvasiveSpeciesIndicatorConfig = (key, invasiveSpecies, hasInvasiveSpecies, t) => {
|
|
57456
|
-
const shouldShowAllAsNotPresent = hasInvasiveSpecies === 'no';
|
|
57457
|
-
const shouldShowRedForPresent = hasInvasiveSpecies === 'yes';
|
|
57458
|
-
const isPresent = !shouldShowAllAsNotPresent && Array.isArray(invasiveSpecies) && invasiveSpecies.includes(key);
|
|
57459
|
-
const isRedBadge = isPresent && shouldShowRedForPresent;
|
|
57460
|
-
const label = formatInvasiveSpeciesLabel(key);
|
|
57461
|
-
return {
|
|
57462
|
-
label: t(label),
|
|
57463
|
-
type: isPresent ? 'compliant' : 'notCompliant',
|
|
57464
|
-
statusIcon: isPresent ? 'Check' : 'Close',
|
|
57465
|
-
statusIconColor: isRedBadge ? '#D92D20' : isPresent ? '#12B76A' : '#6C737F',
|
|
57466
|
-
statusBadgeBackgroundColor: isRedBadge ? '#FEE4E2' : isPresent ? undefined : '#F9FAFB',
|
|
57467
|
-
statusBadgeBorderColor: isRedBadge ? '#FDA29B' : isPresent ? undefined : '#E5E7EB'
|
|
57468
|
-
};
|
|
57469
|
-
};
|
|
57470
|
-
const generateFaunaConfig = (faunaPresent, t) => {
|
|
57471
|
-
return FAUNA_KEYS.map(key => createFaunaIndicatorConfig(key, faunaPresent, t));
|
|
57472
|
-
};
|
|
57473
|
-
const generateInvasiveSpeciesConfig = (invasiveSpecies, hasInvasiveSpecies, t) => {
|
|
57474
|
-
return INVASIVE_SPECIES_KEYS.map(key => createInvasiveSpeciesIndicatorConfig(key, invasiveSpecies, hasInvasiveSpecies, t));
|
|
57475
|
-
};
|
|
57476
|
-
|
|
57477
|
-
const Container = styled__default["default"].div`
|
|
57478
|
-
display: grid;
|
|
57479
|
-
grid-template-columns: 70% 28.5%;
|
|
57895
|
+
const BiodiversityContainer = styled__default["default"].div`
|
|
57896
|
+
display: flex;
|
|
57480
57897
|
gap: 24px;
|
|
57481
57898
|
width: 100%;
|
|
57899
|
+
|
|
57482
57900
|
@media (max-width: 768px) {
|
|
57483
|
-
|
|
57901
|
+
flex-direction: column;
|
|
57484
57902
|
}
|
|
57485
57903
|
`;
|
|
57904
|
+
const FaunaSection = styled__default["default"].section`
|
|
57905
|
+
width: 60%;
|
|
57906
|
+
min-width: 0;
|
|
57907
|
+
`;
|
|
57908
|
+
const InvasiveSpeciesSection = styled__default["default"].section`
|
|
57909
|
+
width: 38.5%;
|
|
57910
|
+
`;
|
|
57486
57911
|
const BiodiversityAndHabitat = ({
|
|
57487
57912
|
faunaPresent = [],
|
|
57488
57913
|
invasiveSpecies = [],
|
|
@@ -57490,28 +57915,32 @@ const BiodiversityAndHabitat = ({
|
|
|
57490
57915
|
loading = false,
|
|
57491
57916
|
t = s => s
|
|
57492
57917
|
}) => {
|
|
57493
|
-
const observedFaunaConfig = React.useMemo(() => generateFaunaConfig(faunaPresent, t), [faunaPresent, t]);
|
|
57494
|
-
const invasiveSpeciesConfig = React.useMemo(() => generateInvasiveSpeciesConfig(invasiveSpecies, hasInvasiveSpecies, t), [invasiveSpecies, hasInvasiveSpecies, t]);
|
|
57495
57918
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, {
|
|
57496
57919
|
title: t("Biodiversity & Habitat"),
|
|
57497
57920
|
className: "with-border-header h-w-btn-header",
|
|
57498
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
57499
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
57500
|
-
children:
|
|
57921
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(BiodiversityContainer, {
|
|
57922
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(FaunaSection, {
|
|
57923
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FaunaWidget, {
|
|
57501
57924
|
title: t("Observed Fauna"),
|
|
57502
|
-
|
|
57925
|
+
faunaPresent: faunaPresent,
|
|
57926
|
+
columnsPerRow: 5,
|
|
57927
|
+
itemWidth: 120,
|
|
57928
|
+
itemHeight: 120,
|
|
57503
57929
|
loading: loading,
|
|
57504
|
-
widgetClassName: "h-w-btn-header",
|
|
57505
57930
|
t: t
|
|
57506
|
-
})
|
|
57931
|
+
})
|
|
57932
|
+
}), /*#__PURE__*/jsxRuntime.jsx(InvasiveSpeciesSection, {
|
|
57933
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InvasiveSpeciesWidget, {
|
|
57507
57934
|
title: t("Invasive Species"),
|
|
57508
|
-
|
|
57935
|
+
invasiveSpecies: invasiveSpecies,
|
|
57936
|
+
hasInvasiveSpecies: hasInvasiveSpecies,
|
|
57937
|
+
columnsPerRow: 3,
|
|
57938
|
+
itemWidth: 100,
|
|
57939
|
+
itemHeight: 100,
|
|
57509
57940
|
loading: loading,
|
|
57510
|
-
className: "single-column",
|
|
57511
|
-
widgetClassName: "h-w-btn-header",
|
|
57512
57941
|
t: t
|
|
57513
|
-
})
|
|
57514
|
-
})
|
|
57942
|
+
})
|
|
57943
|
+
})]
|
|
57515
57944
|
})
|
|
57516
57945
|
});
|
|
57517
57946
|
};
|
|
@@ -58681,7 +59110,8 @@ const View = ({
|
|
|
58681
59110
|
changeAjaxForms: changeAjaxForms,
|
|
58682
59111
|
getApiBaseUrl: getApiBaseUrl,
|
|
58683
59112
|
getAppHeader: getAppHeader,
|
|
58684
|
-
user: user
|
|
59113
|
+
user: user,
|
|
59114
|
+
fullWidth: true
|
|
58685
59115
|
})]
|
|
58686
59116
|
})]
|
|
58687
59117
|
}), openRecordsModal && /*#__PURE__*/jsxRuntime.jsx(Records, {
|
|
@@ -59194,6 +59624,7 @@ const Edit = ({
|
|
|
59194
59624
|
linkingForms: linkingForms,
|
|
59195
59625
|
form: selectedForm,
|
|
59196
59626
|
data: data,
|
|
59627
|
+
fullWidth: true,
|
|
59197
59628
|
t,
|
|
59198
59629
|
user,
|
|
59199
59630
|
ajaxForms,
|