datastake-daf 0.6.218 → 0.6.219
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 +134 -66
- package/dist/hooks/index.js +36 -0
- package/package.json +1 -1
- package/public/assets/images/SVG/analysis-background.svg +71 -0
- package/public/assets/images/SVG/chart-background.svg +10 -0
- package/public/assets/images/SVG/field-background.svg +9 -0
- package/public/assets/images/SVG/globe-background.svg +9 -0
- package/public/assets/images/SVG/scout-background.svg +10 -0
- package/public/assets/images/SVG/table-background.svg +37 -0
- package/public/assets/images/SVG/under-development.svg +17 -0
- package/src/@daf/core/components/Dashboard/Map/InExpandableWidgetMap/index.jsx +66 -0
- package/src/@daf/core/components/Screens/InformationUnavailable/InformationUnavailable.stories.js +36 -0
- package/src/@daf/core/components/Screens/InformationUnavailable/index.jsx +8 -11
- package/src/@daf/core/components/Screens/InformationUnavailable/style.js +25 -28
- package/src/@daf/hooks/useMapOnExpandableWidget.js +38 -0
- package/src/hooks.js +1 -0
- package/src/index.js +1 -0
package/dist/components/index.js
CHANGED
|
@@ -3176,7 +3176,7 @@ const config$3 = {
|
|
|
3176
3176
|
Robot: config$4
|
|
3177
3177
|
};
|
|
3178
3178
|
|
|
3179
|
-
const _excluded$
|
|
3179
|
+
const _excluded$w = ["width", "height", "size", "name", "fill"];
|
|
3180
3180
|
const CustomIcon = _ref => {
|
|
3181
3181
|
let {
|
|
3182
3182
|
width = 14,
|
|
@@ -3185,7 +3185,7 @@ const CustomIcon = _ref => {
|
|
|
3185
3185
|
name = "",
|
|
3186
3186
|
fill = "none"
|
|
3187
3187
|
} = _ref,
|
|
3188
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3188
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
3189
3189
|
const conf = config$3[name];
|
|
3190
3190
|
if (conf) {
|
|
3191
3191
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -9387,7 +9387,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
9387
9387
|
!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])+"]"}}}));
|
|
9388
9388
|
});
|
|
9389
9389
|
|
|
9390
|
-
const _excluded$
|
|
9390
|
+
const _excluded$v = ["view", "module", "scope", "form", "meta"];
|
|
9391
9391
|
dayjs__default["default"].extend(customParseFormat);
|
|
9392
9392
|
dayjs__default["default"].extend(utc);
|
|
9393
9393
|
dayjs__default["default"].extend(utc);
|
|
@@ -9761,7 +9761,7 @@ const filterCreateData = data => {
|
|
|
9761
9761
|
form,
|
|
9762
9762
|
meta
|
|
9763
9763
|
} = data,
|
|
9764
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
9764
|
+
rest = _objectWithoutProperties(data, _excluded$v);
|
|
9765
9765
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
9766
9766
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
9767
9767
|
meta: _meta
|
|
@@ -10140,7 +10140,7 @@ SelectFilters.propTypes = {
|
|
|
10140
10140
|
apiUrl: PropTypes__default["default"].string
|
|
10141
10141
|
};
|
|
10142
10142
|
|
|
10143
|
-
const _excluded$
|
|
10143
|
+
const _excluded$u = ["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"];
|
|
10144
10144
|
function DAFTable(_ref) {
|
|
10145
10145
|
let {
|
|
10146
10146
|
columns = [],
|
|
@@ -10171,7 +10171,7 @@ function DAFTable(_ref) {
|
|
|
10171
10171
|
app,
|
|
10172
10172
|
doEmptyRows
|
|
10173
10173
|
} = _ref,
|
|
10174
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10174
|
+
rest = _objectWithoutProperties(_ref, _excluded$u);
|
|
10175
10175
|
const [source, setSource] = React.useState([]);
|
|
10176
10176
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
10177
10177
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -11088,7 +11088,7 @@ function ComponentWithFocus(_ref) {
|
|
|
11088
11088
|
}
|
|
11089
11089
|
|
|
11090
11090
|
var _templateObject$c;
|
|
11091
|
-
const _excluded$
|
|
11091
|
+
const _excluded$t = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
11092
11092
|
function StickyTable(_ref) {
|
|
11093
11093
|
let {
|
|
11094
11094
|
size = "small",
|
|
@@ -11099,7 +11099,7 @@ function StickyTable(_ref) {
|
|
|
11099
11099
|
pagination = false,
|
|
11100
11100
|
doEmptyRows = true
|
|
11101
11101
|
} = _ref,
|
|
11102
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11102
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
11103
11103
|
const data = React__default["default"].useMemo(() => {
|
|
11104
11104
|
if (!doEmptyRows) {
|
|
11105
11105
|
return dataSource;
|
|
@@ -11595,7 +11595,7 @@ const BTN_SIZE = {
|
|
|
11595
11595
|
LG: 'large'
|
|
11596
11596
|
};
|
|
11597
11597
|
|
|
11598
|
-
const _excluded$
|
|
11598
|
+
const _excluded$s = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
11599
11599
|
function DafButton(_ref) {
|
|
11600
11600
|
let {
|
|
11601
11601
|
content = '',
|
|
@@ -11609,7 +11609,7 @@ function DafButton(_ref) {
|
|
|
11609
11609
|
style = {},
|
|
11610
11610
|
className = ''
|
|
11611
11611
|
} = _ref,
|
|
11612
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
11612
|
+
restProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
11613
11613
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
11614
11614
|
icon: icon,
|
|
11615
11615
|
type: type,
|
|
@@ -11728,12 +11728,12 @@ const Style$H = dt.div`
|
|
|
11728
11728
|
}
|
|
11729
11729
|
`;
|
|
11730
11730
|
|
|
11731
|
-
const _excluded$
|
|
11731
|
+
const _excluded$r = ["children"];
|
|
11732
11732
|
const BorderedButton = _ref => {
|
|
11733
11733
|
let {
|
|
11734
11734
|
children
|
|
11735
11735
|
} = _ref,
|
|
11736
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11736
|
+
props = _objectWithoutProperties(_ref, _excluded$r);
|
|
11737
11737
|
return /*#__PURE__*/jsxRuntime.jsx(Style$H, {
|
|
11738
11738
|
className: "d-btn-cont",
|
|
11739
11739
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -11873,12 +11873,12 @@ Badge.propTypes = {
|
|
|
11873
11873
|
props: PropTypes__default["default"].object
|
|
11874
11874
|
};
|
|
11875
11875
|
|
|
11876
|
-
const _excluded$
|
|
11876
|
+
const _excluded$q = ["icon"];
|
|
11877
11877
|
function GetIcon(_ref) {
|
|
11878
11878
|
let {
|
|
11879
11879
|
icon
|
|
11880
11880
|
} = _ref,
|
|
11881
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11881
|
+
props = _objectWithoutProperties(_ref, _excluded$q);
|
|
11882
11882
|
let Icon = Icons__namespace.CloseOutlined;
|
|
11883
11883
|
if (Icons__namespace[icon]) {
|
|
11884
11884
|
Icon = Icons__namespace[icon];
|
|
@@ -12197,7 +12197,7 @@ GoToSelect.propTypes = {
|
|
|
12197
12197
|
t: PropTypes__default["default"].func
|
|
12198
12198
|
};
|
|
12199
12199
|
|
|
12200
|
-
const _excluded$
|
|
12200
|
+
const _excluded$p = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
12201
12201
|
const {
|
|
12202
12202
|
useToken: useToken$k
|
|
12203
12203
|
} = antd.theme;
|
|
@@ -12290,7 +12290,7 @@ function Multiselect(_ref) {
|
|
|
12290
12290
|
isSingle = false,
|
|
12291
12291
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
12292
12292
|
} = _ref,
|
|
12293
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12293
|
+
restProps = _objectWithoutProperties(_ref, _excluded$p);
|
|
12294
12294
|
const {
|
|
12295
12295
|
token
|
|
12296
12296
|
} = useToken$k();
|
|
@@ -12991,7 +12991,7 @@ DAFHeader.propTypes = {
|
|
|
12991
12991
|
filtersConfig: PropTypes__default["default"].any
|
|
12992
12992
|
};
|
|
12993
12993
|
|
|
12994
|
-
const _excluded$
|
|
12994
|
+
const _excluded$o = ["tabs", "onChange", "value", "className"];
|
|
12995
12995
|
function TabsHeader(_ref) {
|
|
12996
12996
|
let {
|
|
12997
12997
|
tabs = [],
|
|
@@ -12999,7 +12999,7 @@ function TabsHeader(_ref) {
|
|
|
12999
12999
|
value = '',
|
|
13000
13000
|
className = 'mt-2'
|
|
13001
13001
|
} = _ref,
|
|
13002
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13002
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
13003
13003
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
13004
13004
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
13005
13005
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -13096,7 +13096,7 @@ DrawerHeader.propTypes = {
|
|
|
13096
13096
|
tabsConfig: PropTypes__default["default"].any
|
|
13097
13097
|
};
|
|
13098
13098
|
|
|
13099
|
-
const _excluded$
|
|
13099
|
+
const _excluded$n = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
13100
13100
|
const useFooter = _ref => {
|
|
13101
13101
|
let {
|
|
13102
13102
|
leftContent,
|
|
@@ -13131,7 +13131,7 @@ const useFooter = _ref => {
|
|
|
13131
13131
|
style = {},
|
|
13132
13132
|
className = ""
|
|
13133
13133
|
} = button,
|
|
13134
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
13134
|
+
restProps = _objectWithoutProperties(button, _excluded$n);
|
|
13135
13135
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
13136
13136
|
content: label,
|
|
13137
13137
|
type: type,
|
|
@@ -15631,7 +15631,7 @@ Widget.propTypes = {
|
|
|
15631
15631
|
description: PropTypes__default["default"].string
|
|
15632
15632
|
};
|
|
15633
15633
|
|
|
15634
|
-
const _excluded$
|
|
15634
|
+
const _excluded$m = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText"];
|
|
15635
15635
|
function ImageWidget(_ref) {
|
|
15636
15636
|
let {
|
|
15637
15637
|
loading = false,
|
|
@@ -15641,7 +15641,7 @@ function ImageWidget(_ref) {
|
|
|
15641
15641
|
imgAlt,
|
|
15642
15642
|
noDescriptionText
|
|
15643
15643
|
} = _ref,
|
|
15644
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
15644
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
15645
15645
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
15646
15646
|
loading: loading,
|
|
15647
15647
|
title: title,
|
|
@@ -15698,7 +15698,7 @@ function ImageWidget(_ref) {
|
|
|
15698
15698
|
}
|
|
15699
15699
|
|
|
15700
15700
|
var _templateObject$9;
|
|
15701
|
-
const _excluded$
|
|
15701
|
+
const _excluded$l = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
15702
15702
|
function FlowWidget(_ref) {
|
|
15703
15703
|
let {
|
|
15704
15704
|
title,
|
|
@@ -15710,7 +15710,7 @@ function FlowWidget(_ref) {
|
|
|
15710
15710
|
className,
|
|
15711
15711
|
direction = "horizontal"
|
|
15712
15712
|
} = _ref,
|
|
15713
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
15713
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
15714
15714
|
const [activeTab, setActiveTab] = React.useState();
|
|
15715
15715
|
React.useEffect(() => {
|
|
15716
15716
|
if (defaultActiveTab) {
|
|
@@ -18771,6 +18771,81 @@ Map$3.propTypes = {
|
|
|
18771
18771
|
nameAsSiderTitle: PropTypes__default["default"].bool
|
|
18772
18772
|
};
|
|
18773
18773
|
|
|
18774
|
+
const _excluded$k = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
18775
|
+
function InExpandableWidgetMap(_ref) {
|
|
18776
|
+
let {
|
|
18777
|
+
isExpanded,
|
|
18778
|
+
shouldRenderMap,
|
|
18779
|
+
renderKey,
|
|
18780
|
+
title,
|
|
18781
|
+
loading,
|
|
18782
|
+
t,
|
|
18783
|
+
user,
|
|
18784
|
+
data,
|
|
18785
|
+
height,
|
|
18786
|
+
widgetConfig
|
|
18787
|
+
} = _ref,
|
|
18788
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
18789
|
+
const [mapKey, setMapKey] = React.useState(0);
|
|
18790
|
+
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
18791
|
+
React.useEffect(() => {
|
|
18792
|
+
if (isExpanded && shouldRenderMap) {
|
|
18793
|
+
setIsMapReady(false);
|
|
18794
|
+
const timer = setTimeout(() => {
|
|
18795
|
+
setMapKey(prev => prev + 1);
|
|
18796
|
+
setIsMapReady(true);
|
|
18797
|
+
}, 350);
|
|
18798
|
+
return () => clearTimeout(timer);
|
|
18799
|
+
} else {
|
|
18800
|
+
setIsMapReady(false);
|
|
18801
|
+
}
|
|
18802
|
+
}, [isExpanded, shouldRenderMap]);
|
|
18803
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
18804
|
+
children: shouldRenderMap && isMapReady ? /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
18805
|
+
title: title,
|
|
18806
|
+
className: "no-px-body no-p-body",
|
|
18807
|
+
loading: loading
|
|
18808
|
+
}, widgetConfig), {}, {
|
|
18809
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
18810
|
+
style: {
|
|
18811
|
+
flex: 1,
|
|
18812
|
+
width: '100%',
|
|
18813
|
+
height: height,
|
|
18814
|
+
minHeight: height
|
|
18815
|
+
},
|
|
18816
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Map$3, _objectSpread2({
|
|
18817
|
+
loading: loading,
|
|
18818
|
+
t: t,
|
|
18819
|
+
user: user,
|
|
18820
|
+
data: data || []
|
|
18821
|
+
}, rest), "".concat(renderKey, "-").concat(mapKey, "-").concat(isExpanded))
|
|
18822
|
+
})
|
|
18823
|
+
})) : /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
18824
|
+
title: title,
|
|
18825
|
+
className: "no-px-body no-p-body",
|
|
18826
|
+
loading: true
|
|
18827
|
+
}, widgetConfig), {}, {
|
|
18828
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
18829
|
+
style: {
|
|
18830
|
+
flex: 1,
|
|
18831
|
+
width: '100%',
|
|
18832
|
+
height: height,
|
|
18833
|
+
minHeight: height
|
|
18834
|
+
},
|
|
18835
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
18836
|
+
style: {
|
|
18837
|
+
display: 'flex',
|
|
18838
|
+
alignItems: 'center',
|
|
18839
|
+
justifyContent: 'center',
|
|
18840
|
+
height: '100%',
|
|
18841
|
+
backgroundColor: '#f5f5f5'
|
|
18842
|
+
}
|
|
18843
|
+
})
|
|
18844
|
+
})
|
|
18845
|
+
}))
|
|
18846
|
+
});
|
|
18847
|
+
}
|
|
18848
|
+
|
|
18774
18849
|
const Style$A = dt.div`
|
|
18775
18850
|
display: flex;
|
|
18776
18851
|
flex-direction: row;
|
|
@@ -55956,13 +56031,17 @@ function AdminView(_ref) {
|
|
|
55956
56031
|
}
|
|
55957
56032
|
var index = withFormsProvider(AdminView);
|
|
55958
56033
|
|
|
56034
|
+
const isUnderDevelopmentType = backgroundType => {
|
|
56035
|
+
const developmentTypes = ['analysis', 'table', 'field', 'globe', 'chart', 'scout'];
|
|
56036
|
+
return developmentTypes.includes(backgroundType);
|
|
56037
|
+
};
|
|
55959
56038
|
const Style$a = dt.div`
|
|
55960
56039
|
width: 100%;
|
|
55961
56040
|
height: 100vh;
|
|
55962
56041
|
position: relative;
|
|
55963
56042
|
overflow: hidden;
|
|
55964
56043
|
|
|
55965
|
-
background-color: ${props => props.backgroundType
|
|
56044
|
+
background-color: ${props => isUnderDevelopmentType(props.backgroundType) ? '#f9fafb' : 'transparent'};
|
|
55966
56045
|
|
|
55967
56046
|
display: flex;
|
|
55968
56047
|
flex-direction: row;
|
|
@@ -55970,34 +56049,26 @@ const Style$a = dt.div`
|
|
|
55970
56049
|
align-items: center;
|
|
55971
56050
|
gap: 51px;
|
|
55972
56051
|
|
|
55973
|
-
${props =>
|
|
55974
|
-
|
|
55975
|
-
|
|
55976
|
-
|
|
55977
|
-
|
|
55978
|
-
|
|
55979
|
-
|
|
55980
|
-
|
|
55981
|
-
|
|
55982
|
-
|
|
55983
|
-
|
|
55984
|
-
|
|
55985
|
-
|
|
55986
|
-
|
|
55987
|
-
|
|
55988
|
-
|
|
55989
|
-
|
|
55990
|
-
|
|
55991
|
-
|
|
55992
|
-
|
|
55993
|
-
|
|
55994
|
-
background-size: 100% auto;
|
|
55995
|
-
}
|
|
55996
|
-
`;
|
|
55997
|
-
default:
|
|
55998
|
-
return '';
|
|
55999
|
-
}
|
|
56000
|
-
}}
|
|
56052
|
+
${props => isUnderDevelopmentType(props.backgroundType) ? `
|
|
56053
|
+
&::before {
|
|
56054
|
+
content: '';
|
|
56055
|
+
position: absolute;
|
|
56056
|
+
z-index: 0;
|
|
56057
|
+
|
|
56058
|
+
top: 24px;
|
|
56059
|
+
left: 24px;
|
|
56060
|
+
right: 24px;
|
|
56061
|
+
bottom: 24px;
|
|
56062
|
+
|
|
56063
|
+
background-image:
|
|
56064
|
+
linear-gradient(rgba(249, 250, 251, 0.2), rgba(249, 250, 251, 0.2)),
|
|
56065
|
+
url(${props.backgroundImage});
|
|
56066
|
+
background-position: top center;
|
|
56067
|
+
background-repeat: no-repeat;
|
|
56068
|
+
|
|
56069
|
+
background-size: 100% auto;
|
|
56070
|
+
}
|
|
56071
|
+
` : ''}
|
|
56001
56072
|
|
|
56002
56073
|
img, .content {
|
|
56003
56074
|
position: relative;
|
|
@@ -56011,7 +56082,7 @@ const Style$a = dt.div`
|
|
|
56011
56082
|
h1 {
|
|
56012
56083
|
font-size: 28px;
|
|
56013
56084
|
font-weight: 600;
|
|
56014
|
-
color: ${props => props.backgroundType
|
|
56085
|
+
color: ${props => isUnderDevelopmentType(props.backgroundType) ? '#003435' : '#384250'};
|
|
56015
56086
|
margin-bottom: 6px;
|
|
56016
56087
|
line-height: 32px;
|
|
56017
56088
|
letter-spacing: 0%;
|
|
@@ -56019,7 +56090,7 @@ const Style$a = dt.div`
|
|
|
56019
56090
|
|
|
56020
56091
|
p {
|
|
56021
56092
|
font-size: 16px;
|
|
56022
|
-
color: ${props => props.backgroundType
|
|
56093
|
+
color: ${props => isUnderDevelopmentType(props.backgroundType) ? '#016C6E' : '#6C737F'};
|
|
56023
56094
|
font-weight: 500;
|
|
56024
56095
|
line-height: 22px;
|
|
56025
56096
|
letter-spacing: 0%;
|
|
@@ -56034,17 +56105,13 @@ const InformationUnavailable = _ref => {
|
|
|
56034
56105
|
backgroundType = 'default',
|
|
56035
56106
|
icon
|
|
56036
56107
|
} = _ref;
|
|
56037
|
-
const
|
|
56038
|
-
const
|
|
56108
|
+
const developmentTypes = ['analysis', 'table', 'field', 'globe', 'chart', 'scout'];
|
|
56109
|
+
const isUnderDevelopment = developmentTypes.includes(backgroundType);
|
|
56110
|
+
const pageTitle = title || (isUnderDevelopment ? t('under-development') : t('information-unavailable'));
|
|
56111
|
+
const pageContent = content || (isUnderDevelopment ? t('under-development-description') : t('information-unavailable-description'));
|
|
56039
56112
|
const backgroundImage = React.useMemo(() => {
|
|
56040
|
-
|
|
56041
|
-
|
|
56042
|
-
case 'table':
|
|
56043
|
-
return "/assets/images/SVG/".concat(backgroundType, "-background.svg");
|
|
56044
|
-
default:
|
|
56045
|
-
return null;
|
|
56046
|
-
}
|
|
56047
|
-
}, [backgroundType]);
|
|
56113
|
+
return isUnderDevelopment ? "/assets/images/SVG/".concat(backgroundType, "-background.svg") : null;
|
|
56114
|
+
}, [backgroundType, isUnderDevelopment]);
|
|
56048
56115
|
return /*#__PURE__*/jsxRuntime.jsxs(Style$a, {
|
|
56049
56116
|
backgroundType: backgroundType,
|
|
56050
56117
|
backgroundImage: backgroundImage,
|
|
@@ -56065,7 +56132,7 @@ InformationUnavailable.propTypes = {
|
|
|
56065
56132
|
t: PropTypes__default["default"].func,
|
|
56066
56133
|
title: PropTypes__default["default"].string.optional,
|
|
56067
56134
|
content: PropTypes__default["default"].string.optional,
|
|
56068
|
-
backgroundType: PropTypes__default["default"].oneOf(['analysis', 'table', 'default']),
|
|
56135
|
+
backgroundType: PropTypes__default["default"].oneOf(['analysis', 'table', 'field', 'globe', 'chart', 'scout', 'default']),
|
|
56069
56136
|
icon: PropTypes__default["default"].string
|
|
56070
56137
|
};
|
|
56071
56138
|
|
|
@@ -60826,6 +60893,7 @@ exports.Globe = Globe;
|
|
|
60826
60893
|
exports.GoToSelect = GoToSelect;
|
|
60827
60894
|
exports.Header = DAFHeader;
|
|
60828
60895
|
exports.ImageCarousel = ImageCarousel;
|
|
60896
|
+
exports.InExpandableWidgetMap = InExpandableWidgetMap;
|
|
60829
60897
|
exports.InformationChannelProvider = InformationChannelProvider;
|
|
60830
60898
|
exports.InformationChannels = DataStoreTable;
|
|
60831
60899
|
exports.InformationChannelsDataPoint = DataPoint;
|
package/dist/hooks/index.js
CHANGED
|
@@ -1237,11 +1237,47 @@ function useSource({
|
|
|
1237
1237
|
};
|
|
1238
1238
|
}
|
|
1239
1239
|
|
|
1240
|
+
const useMapOnExpandableWidget = ({
|
|
1241
|
+
isExpanded,
|
|
1242
|
+
data
|
|
1243
|
+
}) => {
|
|
1244
|
+
const timeoutRef = React.useRef(null);
|
|
1245
|
+
const [shouldRenderMap, setShouldRenderMap] = React.useState(false);
|
|
1246
|
+
const [key, setKey] = React.useState(0);
|
|
1247
|
+
React.useEffect(() => {
|
|
1248
|
+
if (timeoutRef.current) {
|
|
1249
|
+
clearTimeout(timeoutRef.current);
|
|
1250
|
+
}
|
|
1251
|
+
if (isExpanded) {
|
|
1252
|
+
timeoutRef.current = setTimeout(() => {
|
|
1253
|
+
setShouldRenderMap(true);
|
|
1254
|
+
}, 50);
|
|
1255
|
+
} else {
|
|
1256
|
+
setShouldRenderMap(false);
|
|
1257
|
+
}
|
|
1258
|
+
return () => {
|
|
1259
|
+
if (timeoutRef.current) {
|
|
1260
|
+
clearTimeout(timeoutRef.current);
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
}, [isExpanded]);
|
|
1264
|
+
React.useEffect(() => {
|
|
1265
|
+
if (data?.length > 0 && shouldRenderMap) {
|
|
1266
|
+
setKey(prevKey => prevKey + 1);
|
|
1267
|
+
}
|
|
1268
|
+
}, [data, shouldRenderMap]);
|
|
1269
|
+
return {
|
|
1270
|
+
shouldRenderMap,
|
|
1271
|
+
key
|
|
1272
|
+
};
|
|
1273
|
+
};
|
|
1274
|
+
|
|
1240
1275
|
exports.useFilters = useFilters;
|
|
1241
1276
|
exports.useHeight = useHeight;
|
|
1242
1277
|
exports.useIsMobile = useIsMobile;
|
|
1243
1278
|
exports.useLinearGradientAreaChart = useLinearGradientAreaChart;
|
|
1244
1279
|
exports.useMapConfig = useMapConfig;
|
|
1280
|
+
exports.useMapOnExpandableWidget = useMapOnExpandableWidget;
|
|
1245
1281
|
exports.usePagination = usePagination;
|
|
1246
1282
|
exports.useRadialBarChart = useRadialBarChart;
|
|
1247
1283
|
exports.useSource = useSource;
|