datastake-daf 0.6.308 → 0.6.310
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 +312 -139
- package/package.json +1 -1
- package/src/@daf/core/components/Charts/AreaChart/index.jsx +13 -1
- package/src/@daf/core/components/Charts/BarChart/index.jsx +15 -2
- package/src/@daf/core/components/Charts/ColumnChart/ColumnChart.stories.jsx +168 -8
- package/src/@daf/core/components/Charts/ColumnChart/index.jsx +14 -1
- package/src/@daf/core/components/Charts/DonutPie/index.js +14 -2
- package/src/@daf/core/components/Charts/LineChart/index.jsx +18 -2
- package/src/@daf/core/components/Charts/PieChart/PieChart.stories.js +7 -0
- package/src/@daf/core/components/Charts/PieChart/chart.jsx +142 -31
- package/src/@daf/core/components/Charts/PieChart/style.js +25 -0
- package/src/@daf/core/components/Dashboard/Widget/WidgetImage/index.jsx +2 -1
- package/src/@daf/core/components/Dashboard/Widget/WidgetImage/index.stories.jsx +1 -0
package/dist/components/index.js
CHANGED
|
@@ -3226,7 +3226,7 @@ const config$3 = {
|
|
|
3226
3226
|
MagicWand: config$4
|
|
3227
3227
|
};
|
|
3228
3228
|
|
|
3229
|
-
const _excluded$
|
|
3229
|
+
const _excluded$z = ["width", "height", "size", "name", "fill"];
|
|
3230
3230
|
const CustomIcon = _ref => {
|
|
3231
3231
|
let {
|
|
3232
3232
|
width = 14,
|
|
@@ -3235,7 +3235,7 @@ const CustomIcon = _ref => {
|
|
|
3235
3235
|
name = "",
|
|
3236
3236
|
fill = "none"
|
|
3237
3237
|
} = _ref,
|
|
3238
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
3238
|
+
props = _objectWithoutProperties(_ref, _excluded$z);
|
|
3239
3239
|
const conf = config$3[name];
|
|
3240
3240
|
if (conf) {
|
|
3241
3241
|
return /*#__PURE__*/jsxRuntime.jsx("svg", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -9437,7 +9437,7 @@ createCommonjsModule(function (module, exports) {
|
|
|
9437
9437
|
!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])+"]"}}}));
|
|
9438
9438
|
});
|
|
9439
9439
|
|
|
9440
|
-
const _excluded$
|
|
9440
|
+
const _excluded$y = ["view", "module", "scope", "form", "meta"];
|
|
9441
9441
|
dayjs__default["default"].extend(customParseFormat);
|
|
9442
9442
|
dayjs__default["default"].extend(utc);
|
|
9443
9443
|
dayjs__default["default"].extend(utc);
|
|
@@ -9811,7 +9811,7 @@ const filterCreateData = data => {
|
|
|
9811
9811
|
form,
|
|
9812
9812
|
meta
|
|
9813
9813
|
} = data,
|
|
9814
|
-
rest = _objectWithoutProperties(data, _excluded$
|
|
9814
|
+
rest = _objectWithoutProperties(data, _excluded$y);
|
|
9815
9815
|
const _meta = isObjectEmpty(meta) ? undefined : meta;
|
|
9816
9816
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
9817
9817
|
meta: _meta
|
|
@@ -10191,7 +10191,7 @@ SelectFilters.propTypes = {
|
|
|
10191
10191
|
apiUrl: PropTypes__default["default"].string
|
|
10192
10192
|
};
|
|
10193
10193
|
|
|
10194
|
-
const _excluded$
|
|
10194
|
+
const _excluded$x = ["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"];
|
|
10195
10195
|
function DAFTable(_ref) {
|
|
10196
10196
|
let {
|
|
10197
10197
|
columns = [],
|
|
@@ -10222,7 +10222,7 @@ function DAFTable(_ref) {
|
|
|
10222
10222
|
app,
|
|
10223
10223
|
doEmptyRows
|
|
10224
10224
|
} = _ref,
|
|
10225
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
10225
|
+
rest = _objectWithoutProperties(_ref, _excluded$x);
|
|
10226
10226
|
const [source, setSource] = React.useState([]);
|
|
10227
10227
|
const projectData = (projects || []).find(p => p.id === selectedProject);
|
|
10228
10228
|
const [filtersInit, setFiltersInit] = React.useState(!loading);
|
|
@@ -11139,7 +11139,7 @@ function ComponentWithFocus(_ref) {
|
|
|
11139
11139
|
}
|
|
11140
11140
|
|
|
11141
11141
|
var _templateObject$c;
|
|
11142
|
-
const _excluded$
|
|
11142
|
+
const _excluded$w = ["size", "maxHeight", "containerHeight", "dataSource", "columns", "pagination", "doEmptyRows"];
|
|
11143
11143
|
function StickyTable(_ref) {
|
|
11144
11144
|
let {
|
|
11145
11145
|
size = "small",
|
|
@@ -11150,7 +11150,7 @@ function StickyTable(_ref) {
|
|
|
11150
11150
|
pagination = false,
|
|
11151
11151
|
doEmptyRows = true
|
|
11152
11152
|
} = _ref,
|
|
11153
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11153
|
+
props = _objectWithoutProperties(_ref, _excluded$w);
|
|
11154
11154
|
const data = React__default["default"].useMemo(() => {
|
|
11155
11155
|
if (!doEmptyRows) {
|
|
11156
11156
|
return dataSource;
|
|
@@ -11646,7 +11646,7 @@ const BTN_SIZE = {
|
|
|
11646
11646
|
LG: 'large'
|
|
11647
11647
|
};
|
|
11648
11648
|
|
|
11649
|
-
const _excluded$
|
|
11649
|
+
const _excluded$v = ["content", "size", "type", "icon", "onClick", "disabled", "loading", "title", "style", "className"];
|
|
11650
11650
|
function DafButton(_ref) {
|
|
11651
11651
|
let {
|
|
11652
11652
|
content = '',
|
|
@@ -11660,7 +11660,7 @@ function DafButton(_ref) {
|
|
|
11660
11660
|
style = {},
|
|
11661
11661
|
className = ''
|
|
11662
11662
|
} = _ref,
|
|
11663
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
11663
|
+
restProps = _objectWithoutProperties(_ref, _excluded$v);
|
|
11664
11664
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({
|
|
11665
11665
|
icon: icon,
|
|
11666
11666
|
type: type,
|
|
@@ -11779,12 +11779,12 @@ const Style$I = dt.div`
|
|
|
11779
11779
|
}
|
|
11780
11780
|
`;
|
|
11781
11781
|
|
|
11782
|
-
const _excluded$
|
|
11782
|
+
const _excluded$u = ["children"];
|
|
11783
11783
|
const BorderedButton = _ref => {
|
|
11784
11784
|
let {
|
|
11785
11785
|
children
|
|
11786
11786
|
} = _ref,
|
|
11787
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11787
|
+
props = _objectWithoutProperties(_ref, _excluded$u);
|
|
11788
11788
|
return /*#__PURE__*/jsxRuntime.jsx(Style$I, {
|
|
11789
11789
|
className: "d-btn-cont",
|
|
11790
11790
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
@@ -11924,12 +11924,12 @@ Badge.propTypes = {
|
|
|
11924
11924
|
props: PropTypes__default["default"].object
|
|
11925
11925
|
};
|
|
11926
11926
|
|
|
11927
|
-
const _excluded$
|
|
11927
|
+
const _excluded$t = ["icon"];
|
|
11928
11928
|
function GetIcon(_ref) {
|
|
11929
11929
|
let {
|
|
11930
11930
|
icon
|
|
11931
11931
|
} = _ref,
|
|
11932
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
11932
|
+
props = _objectWithoutProperties(_ref, _excluded$t);
|
|
11933
11933
|
let Icon = Icons__namespace.CloseOutlined;
|
|
11934
11934
|
if (Icons__namespace[icon]) {
|
|
11935
11935
|
Icon = Icons__namespace[icon];
|
|
@@ -12248,7 +12248,7 @@ GoToSelect.propTypes = {
|
|
|
12248
12248
|
t: PropTypes__default["default"].func
|
|
12249
12249
|
};
|
|
12250
12250
|
|
|
12251
|
-
const _excluded$
|
|
12251
|
+
const _excluded$s = ["options", "defaultSelected", "onChange", "textWhenMultiple", "withCount", "oneAlwaysSelected", "canUnselectLast", "isAvatarGroup", "maxAvatarCount", "dropDownWidth", "topAvatarValue", "isSingle", "selectionType"];
|
|
12252
12252
|
const {
|
|
12253
12253
|
useToken: useToken$l
|
|
12254
12254
|
} = antd.theme;
|
|
@@ -12341,7 +12341,7 @@ function Multiselect(_ref) {
|
|
|
12341
12341
|
isSingle = false,
|
|
12342
12342
|
selectionType = SELECTION_TYPES.DEFAULT
|
|
12343
12343
|
} = _ref,
|
|
12344
|
-
restProps = _objectWithoutProperties(_ref, _excluded$
|
|
12344
|
+
restProps = _objectWithoutProperties(_ref, _excluded$s);
|
|
12345
12345
|
const {
|
|
12346
12346
|
token
|
|
12347
12347
|
} = useToken$l();
|
|
@@ -13057,7 +13057,7 @@ DAFHeader.propTypes = {
|
|
|
13057
13057
|
filtersConfig: PropTypes__default["default"].any
|
|
13058
13058
|
};
|
|
13059
13059
|
|
|
13060
|
-
const _excluded$
|
|
13060
|
+
const _excluded$r = ["tabs", "onChange", "value", "className"];
|
|
13061
13061
|
function TabsHeader(_ref) {
|
|
13062
13062
|
let {
|
|
13063
13063
|
tabs = [],
|
|
@@ -13065,7 +13065,7 @@ function TabsHeader(_ref) {
|
|
|
13065
13065
|
value = '',
|
|
13066
13066
|
className = 'mt-2'
|
|
13067
13067
|
} = _ref,
|
|
13068
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
13068
|
+
rest = _objectWithoutProperties(_ref, _excluded$r);
|
|
13069
13069
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
13070
13070
|
className: formatClassname(['daf-tabs-header pl-6 pr-6', className]),
|
|
13071
13071
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, _objectSpread2({
|
|
@@ -13162,7 +13162,7 @@ DrawerHeader.propTypes = {
|
|
|
13162
13162
|
tabsConfig: PropTypes__default["default"].any
|
|
13163
13163
|
};
|
|
13164
13164
|
|
|
13165
|
-
const _excluded$
|
|
13165
|
+
const _excluded$q = ["label", "onClick", "icon", "type", "tooltip", "disabled", "loading", "style", "className"];
|
|
13166
13166
|
const useFooter = _ref => {
|
|
13167
13167
|
let {
|
|
13168
13168
|
leftContent,
|
|
@@ -13197,7 +13197,7 @@ const useFooter = _ref => {
|
|
|
13197
13197
|
style = {},
|
|
13198
13198
|
className = ""
|
|
13199
13199
|
} = button,
|
|
13200
|
-
restProps = _objectWithoutProperties(button, _excluded$
|
|
13200
|
+
restProps = _objectWithoutProperties(button, _excluded$q);
|
|
13201
13201
|
return /*#__PURE__*/jsxRuntime.jsx(DafButton, _objectSpread2({
|
|
13202
13202
|
content: label,
|
|
13203
13203
|
type: type,
|
|
@@ -16102,7 +16102,7 @@ Widget.propTypes = {
|
|
|
16102
16102
|
description: PropTypes__default["default"].string
|
|
16103
16103
|
};
|
|
16104
16104
|
|
|
16105
|
-
const _excluded$
|
|
16105
|
+
const _excluded$p = ["loading", "title", "image", "description", "imgAlt", "noDescriptionText", "isPdf"];
|
|
16106
16106
|
function ImageWidget(_ref) {
|
|
16107
16107
|
let {
|
|
16108
16108
|
loading = false,
|
|
@@ -16110,9 +16110,10 @@ function ImageWidget(_ref) {
|
|
|
16110
16110
|
image,
|
|
16111
16111
|
description,
|
|
16112
16112
|
imgAlt,
|
|
16113
|
-
noDescriptionText
|
|
16113
|
+
noDescriptionText,
|
|
16114
|
+
isPdf = false
|
|
16114
16115
|
} = _ref,
|
|
16115
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
16116
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
16116
16117
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
16117
16118
|
loading: loading,
|
|
16118
16119
|
title: title,
|
|
@@ -16144,7 +16145,7 @@ function ImageWidget(_ref) {
|
|
|
16144
16145
|
})
|
|
16145
16146
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
16146
16147
|
style: {
|
|
16147
|
-
maxHeight: "195px",
|
|
16148
|
+
maxHeight: isPdf ? "100%" : "195px",
|
|
16148
16149
|
paddingRight: "20px",
|
|
16149
16150
|
overflowY: "auto",
|
|
16150
16151
|
scrollbarWidth: "thin",
|
|
@@ -16169,7 +16170,7 @@ function ImageWidget(_ref) {
|
|
|
16169
16170
|
}
|
|
16170
16171
|
|
|
16171
16172
|
var _templateObject$9;
|
|
16172
|
-
const _excluded$
|
|
16173
|
+
const _excluded$o = ["title", "loading", "data", "current", "defaultActiveTab", "widgetClassname", "className", "direction"];
|
|
16173
16174
|
function FlowWidget(_ref) {
|
|
16174
16175
|
let {
|
|
16175
16176
|
title,
|
|
@@ -16181,7 +16182,7 @@ function FlowWidget(_ref) {
|
|
|
16181
16182
|
className,
|
|
16182
16183
|
direction = "horizontal"
|
|
16183
16184
|
} = _ref,
|
|
16184
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
16185
|
+
rest = _objectWithoutProperties(_ref, _excluded$o);
|
|
16185
16186
|
const [activeTab, setActiveTab] = React.useState();
|
|
16186
16187
|
React.useEffect(() => {
|
|
16187
16188
|
if (defaultActiveTab) {
|
|
@@ -19240,7 +19241,7 @@ Map$3.propTypes = {
|
|
|
19240
19241
|
nameAsSiderTitle: PropTypes__default["default"].bool
|
|
19241
19242
|
};
|
|
19242
19243
|
|
|
19243
|
-
const _excluded$
|
|
19244
|
+
const _excluded$n = ["isExpanded", "shouldRenderMap", "renderKey", "title", "loading", "t", "user", "data", "height", "widgetConfig"];
|
|
19244
19245
|
function InExpandableWidgetMap(_ref) {
|
|
19245
19246
|
let {
|
|
19246
19247
|
isExpanded,
|
|
@@ -19254,7 +19255,7 @@ function InExpandableWidgetMap(_ref) {
|
|
|
19254
19255
|
height,
|
|
19255
19256
|
widgetConfig
|
|
19256
19257
|
} = _ref,
|
|
19257
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
19258
|
+
rest = _objectWithoutProperties(_ref, _excluded$n);
|
|
19258
19259
|
const [mapKey, setMapKey] = React.useState(0);
|
|
19259
19260
|
const [isMapReady, setIsMapReady] = React.useState(false);
|
|
19260
19261
|
React.useEffect(() => {
|
|
@@ -21454,14 +21455,14 @@ const MapConfig = ({
|
|
|
21454
21455
|
});
|
|
21455
21456
|
};
|
|
21456
21457
|
|
|
21457
|
-
const _excluded$
|
|
21458
|
+
const _excluded$m = ["config", "title", "loading"];
|
|
21458
21459
|
const Details = _ref => {
|
|
21459
21460
|
let {
|
|
21460
21461
|
config = [],
|
|
21461
21462
|
title,
|
|
21462
21463
|
loading = false
|
|
21463
21464
|
} = _ref,
|
|
21464
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
21465
|
+
rest = _objectWithoutProperties(_ref, _excluded$m);
|
|
21465
21466
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
21466
21467
|
className: "with-border-header h-w-btn-header card",
|
|
21467
21468
|
loading: loading,
|
|
@@ -21477,14 +21478,14 @@ const Details = _ref => {
|
|
|
21477
21478
|
}));
|
|
21478
21479
|
};
|
|
21479
21480
|
|
|
21480
|
-
const _excluded$
|
|
21481
|
+
const _excluded$l = ["config", "title", "loading"];
|
|
21481
21482
|
const KeyIndicatorsDetails = _ref => {
|
|
21482
21483
|
let {
|
|
21483
21484
|
config,
|
|
21484
21485
|
title,
|
|
21485
21486
|
loading = false
|
|
21486
21487
|
} = _ref,
|
|
21487
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
21488
|
+
rest = _objectWithoutProperties(_ref, _excluded$l);
|
|
21488
21489
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
21489
21490
|
className: "with-border-header h-w-btn-header",
|
|
21490
21491
|
title: title,
|
|
@@ -21514,7 +21515,7 @@ const Style$y = dt.div`
|
|
|
21514
21515
|
}
|
|
21515
21516
|
`;
|
|
21516
21517
|
|
|
21517
|
-
const _excluded$
|
|
21518
|
+
const _excluded$k = ["children", "config", "detailsTitle", "firstColumnWidth"];
|
|
21518
21519
|
const DetailsSection = _ref => {
|
|
21519
21520
|
let {
|
|
21520
21521
|
children,
|
|
@@ -21522,7 +21523,7 @@ const DetailsSection = _ref => {
|
|
|
21522
21523
|
detailsTitle,
|
|
21523
21524
|
firstColumnWidth = "250px"
|
|
21524
21525
|
} = _ref,
|
|
21525
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
21526
|
+
rest = _objectWithoutProperties(_ref, _excluded$k);
|
|
21526
21527
|
return /*#__PURE__*/jsxRuntime.jsx(Style$y, {
|
|
21527
21528
|
firstColumnWidth: firstColumnWidth,
|
|
21528
21529
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -21698,14 +21699,14 @@ const getGoalConfig = () => {
|
|
|
21698
21699
|
};
|
|
21699
21700
|
|
|
21700
21701
|
var _templateObject$8;
|
|
21701
|
-
const _excluded$
|
|
21702
|
+
const _excluded$j = ["title", "activeSdgGoals", "t"];
|
|
21702
21703
|
function SDGWidget(_ref) {
|
|
21703
21704
|
let {
|
|
21704
21705
|
title = "Sustainable Development Goals",
|
|
21705
21706
|
activeSdgGoals = [],
|
|
21706
21707
|
t = key => key
|
|
21707
21708
|
} = _ref,
|
|
21708
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
21709
|
+
props = _objectWithoutProperties(_ref, _excluded$j);
|
|
21709
21710
|
const sdgConfig = getGoalConfig();
|
|
21710
21711
|
return /*#__PURE__*/jsxRuntime.jsx(Widget, _objectSpread2(_objectSpread2({
|
|
21711
21712
|
title: title,
|
|
@@ -21923,7 +21924,7 @@ function SdgList({
|
|
|
21923
21924
|
});
|
|
21924
21925
|
}
|
|
21925
21926
|
|
|
21926
|
-
const _excluded$
|
|
21927
|
+
const _excluded$i = ["title", "description", "onLinkClick", "image", "linkIcon", "sdgList", "items", "onCardClick", "hideSDGList", "t"];
|
|
21927
21928
|
const {
|
|
21928
21929
|
Meta
|
|
21929
21930
|
} = antd.Card;
|
|
@@ -21943,7 +21944,7 @@ function ProjectWidget(_ref) {
|
|
|
21943
21944
|
hideSDGList = false,
|
|
21944
21945
|
t = x => x
|
|
21945
21946
|
} = _ref,
|
|
21946
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
21947
|
+
props = _objectWithoutProperties(_ref, _excluded$i);
|
|
21947
21948
|
const [isHovered, setIsHovered] = React__default["default"].useState(false);
|
|
21948
21949
|
const {
|
|
21949
21950
|
token
|
|
@@ -22188,13 +22189,13 @@ const WidgetCard = _ref => {
|
|
|
22188
22189
|
});
|
|
22189
22190
|
};
|
|
22190
22191
|
|
|
22191
|
-
const _excluded$
|
|
22192
|
+
const _excluded$h = ["title", "children"];
|
|
22192
22193
|
const CarouselWidget = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
22193
22194
|
let {
|
|
22194
22195
|
title,
|
|
22195
22196
|
children
|
|
22196
22197
|
} = _ref,
|
|
22197
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
22198
|
+
rest = _objectWithoutProperties(_ref, _excluded$h);
|
|
22198
22199
|
/**
|
|
22199
22200
|
* Handles carousel slide change events
|
|
22200
22201
|
* @param {number} currentSlide - The index of the current slide after change
|
|
@@ -22315,7 +22316,7 @@ const StyledCarouselWrapper = dt.div`
|
|
|
22315
22316
|
|
|
22316
22317
|
`;
|
|
22317
22318
|
|
|
22318
|
-
const _excluded$
|
|
22319
|
+
const _excluded$g = ["title", "images", "height", "fallback", "activeDotColor", "inactiveDotColor", "arrowIconColor", "arrowHoverIconColor", "customArrows"];
|
|
22319
22320
|
function ImageCarousel(_ref) {
|
|
22320
22321
|
let {
|
|
22321
22322
|
title,
|
|
@@ -22328,7 +22329,7 @@ function ImageCarousel(_ref) {
|
|
|
22328
22329
|
arrowHoverIconColor = "#1890ff",
|
|
22329
22330
|
customArrows = false
|
|
22330
22331
|
} = _ref,
|
|
22331
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
22332
|
+
rest = _objectWithoutProperties(_ref, _excluded$g);
|
|
22332
22333
|
const [previewVisible, setPreviewVisible] = React.useState(false);
|
|
22333
22334
|
const [current, setCurrent] = React.useState(0);
|
|
22334
22335
|
const carouselRef = React.useRef(null);
|
|
@@ -27676,7 +27677,7 @@ const RepeatableModals = ({
|
|
|
27676
27677
|
}) : null;
|
|
27677
27678
|
};
|
|
27678
27679
|
|
|
27679
|
-
const _excluded$
|
|
27680
|
+
const _excluded$f = ["viewGroup"],
|
|
27680
27681
|
_excluded2 = ["label", "icon", "position"];
|
|
27681
27682
|
const Content = _ref => {
|
|
27682
27683
|
let {
|
|
@@ -27745,7 +27746,7 @@ const Content = _ref => {
|
|
|
27745
27746
|
if (groups[gKey].viewGroup === key) {
|
|
27746
27747
|
// eslint-disable-next-line no-unused-vars
|
|
27747
27748
|
const _groups$gKey = groups[gKey],
|
|
27748
|
-
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$
|
|
27749
|
+
gCfg = _objectWithoutProperties(_groups$gKey, _excluded$f);
|
|
27749
27750
|
items[gKey] = gCfg;
|
|
27750
27751
|
}
|
|
27751
27752
|
return items;
|
|
@@ -43924,7 +43925,7 @@ const getGrouContent = (form, values, i, formId, excludedKeys, getData, setValue
|
|
|
43924
43925
|
});
|
|
43925
43926
|
};
|
|
43926
43927
|
|
|
43927
|
-
const _excluded$
|
|
43928
|
+
const _excluded$e = ["icon"];
|
|
43928
43929
|
function DynamicForm(_ref) {
|
|
43929
43930
|
var _data$meta;
|
|
43930
43931
|
let {
|
|
@@ -44479,7 +44480,7 @@ function DynamicForm(_ref) {
|
|
|
44479
44480
|
let {
|
|
44480
44481
|
icon: Icon
|
|
44481
44482
|
} = _ref3,
|
|
44482
|
-
form = _objectWithoutProperties(_ref3, _excluded$
|
|
44483
|
+
form = _objectWithoutProperties(_ref3, _excluded$e);
|
|
44483
44484
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Button, {
|
|
44484
44485
|
type: "link",
|
|
44485
44486
|
size: "large",
|
|
@@ -44755,7 +44756,7 @@ function MultiBarProgress(_ref) {
|
|
|
44755
44756
|
}
|
|
44756
44757
|
const Style$r = dt.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n\theight: 6px;\n\twidth: 100%;\n\tbackground: var(--base-gray-40);\n\tborder-radius: 8px;\n\tdisplay: flex;\n\toverflow: hidden;\n\tdiv {\n\t\theight: 100%;\n\t}\n"])));
|
|
44757
44758
|
|
|
44758
|
-
const _excluded$
|
|
44759
|
+
const _excluded$d = ["tooltipTitle", "percentage", "strokeColor", "showInfo"];
|
|
44759
44760
|
function MultiColorProgressBar(_ref) {
|
|
44760
44761
|
let {
|
|
44761
44762
|
tooltipTitle,
|
|
@@ -44767,7 +44768,7 @@ function MultiColorProgressBar(_ref) {
|
|
|
44767
44768
|
},
|
|
44768
44769
|
showInfo = false
|
|
44769
44770
|
} = _ref,
|
|
44770
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
44771
|
+
rest = _objectWithoutProperties(_ref, _excluded$d);
|
|
44771
44772
|
return /*#__PURE__*/jsxRuntime.jsx(antd.Tooltip, {
|
|
44772
44773
|
title: tooltipTitle,
|
|
44773
44774
|
children: /*#__PURE__*/jsxRuntime.jsx(antd.Progress, _objectSpread2({
|
|
@@ -44814,7 +44815,7 @@ const SideIcon = _ref3 => {
|
|
|
44814
44815
|
});
|
|
44815
44816
|
};
|
|
44816
44817
|
|
|
44817
|
-
const _excluded$
|
|
44818
|
+
const _excluded$c = ["value", "options", "onChange", "className", "width"];
|
|
44818
44819
|
const ProgressTabs = _ref => {
|
|
44819
44820
|
let {
|
|
44820
44821
|
value = 'setup',
|
|
@@ -44835,7 +44836,7 @@ const ProgressTabs = _ref => {
|
|
|
44835
44836
|
className = '',
|
|
44836
44837
|
width = '100%'
|
|
44837
44838
|
} = _ref,
|
|
44838
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
44839
|
+
rest = _objectWithoutProperties(_ref, _excluded$c);
|
|
44839
44840
|
// Transform options to include icons and handle disabled state
|
|
44840
44841
|
const transformedOptions = options.map(option => _objectSpread2(_objectSpread2({}, option), {}, {
|
|
44841
44842
|
label: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -45742,6 +45743,30 @@ dt.div`
|
|
|
45742
45743
|
}
|
|
45743
45744
|
|
|
45744
45745
|
`;
|
|
45746
|
+
const LegendStyle = dt.ul`
|
|
45747
|
+
list-style: none;
|
|
45748
|
+
margin: var(--size-lg) 0 0;
|
|
45749
|
+
padding: 0;
|
|
45750
|
+
display: flex;
|
|
45751
|
+
flex-wrap: wrap;
|
|
45752
|
+
gap: 12px;
|
|
45753
|
+
justify-content: center;
|
|
45754
|
+
|
|
45755
|
+
li {
|
|
45756
|
+
display: flex;
|
|
45757
|
+
align-items: center;
|
|
45758
|
+
gap: 8px;
|
|
45759
|
+
font-size: 14px;
|
|
45760
|
+
color: #344054;
|
|
45761
|
+
white-space: nowrap;
|
|
45762
|
+
|
|
45763
|
+
.legend-marker {
|
|
45764
|
+
width: 12px;
|
|
45765
|
+
height: 12px;
|
|
45766
|
+
border-radius: 50%;
|
|
45767
|
+
}
|
|
45768
|
+
}
|
|
45769
|
+
`;
|
|
45745
45770
|
|
|
45746
45771
|
const Chart = _ref => {
|
|
45747
45772
|
let {
|
|
@@ -45756,7 +45781,10 @@ const Chart = _ref => {
|
|
|
45756
45781
|
xOffset = 230,
|
|
45757
45782
|
mouseXOffset = 30,
|
|
45758
45783
|
mouseYOffset = 50,
|
|
45759
|
-
children = null
|
|
45784
|
+
children = null,
|
|
45785
|
+
legend,
|
|
45786
|
+
isPdf = false,
|
|
45787
|
+
isPercentage = false
|
|
45760
45788
|
} = _ref;
|
|
45761
45789
|
const [hoveredGroup, setHoveredGroup] = React.useState(null);
|
|
45762
45790
|
const svgRef = React.useRef();
|
|
@@ -45782,52 +45810,93 @@ const Chart = _ref => {
|
|
|
45782
45810
|
setMouseX(x);
|
|
45783
45811
|
if (hoveredGroup === null) {
|
|
45784
45812
|
setHoveredGroup(_objectSpread2(_objectSpread2({}, hG), {}, {
|
|
45785
|
-
id
|
|
45813
|
+
id,
|
|
45814
|
+
fromLegend: false
|
|
45786
45815
|
}));
|
|
45787
45816
|
}
|
|
45788
45817
|
}, [svgRef, containerRef, hoveredGroup, mouseLocked]);
|
|
45818
|
+
const legendConfig = React.useMemo(() => {
|
|
45819
|
+
if (legend === false || legend === null) {
|
|
45820
|
+
return isPdf ? {} : null;
|
|
45821
|
+
}
|
|
45822
|
+
if (typeof legend === 'object') {
|
|
45823
|
+
return legend;
|
|
45824
|
+
}
|
|
45825
|
+
if (legend === true || legend === undefined || isPdf) {
|
|
45826
|
+
return {};
|
|
45827
|
+
}
|
|
45828
|
+
return null;
|
|
45829
|
+
}, [legend, isPdf]);
|
|
45830
|
+
const legendItems = React.useMemo(() => {
|
|
45831
|
+
const items = Array.isArray(data) ? data : [];
|
|
45832
|
+
if (!legendConfig) {
|
|
45833
|
+
return [];
|
|
45834
|
+
}
|
|
45835
|
+
const {
|
|
45836
|
+
itemName
|
|
45837
|
+
} = legendConfig;
|
|
45838
|
+
const getName = typeof (itemName === null || itemName === void 0 ? void 0 : itemName.formatter) === 'function' ? (item, index) => itemName.formatter(item.name || item.label || "Item ".concat(index + 1), item, index) : (item, index) => item.name || item.label || "Item ".concat(index + 1);
|
|
45839
|
+
return items.map((item, index) => _objectSpread2(_objectSpread2({}, item), {}, {
|
|
45840
|
+
label: getName(item, index)
|
|
45841
|
+
}));
|
|
45842
|
+
}, [data, legendConfig]);
|
|
45789
45843
|
const dataToShow = React.useMemo(() => {
|
|
45790
45844
|
let cumulativePercent = 0;
|
|
45845
|
+
function getRotationAngle(percent) {
|
|
45846
|
+
let angle = percent * 360 - 90;
|
|
45847
|
+
if (angle > 90 && angle < 270) {
|
|
45848
|
+
angle += 180;
|
|
45849
|
+
}
|
|
45850
|
+
const tilt = 30;
|
|
45851
|
+
return angle + tilt;
|
|
45852
|
+
}
|
|
45791
45853
|
return data.map((d, i) => {
|
|
45792
45854
|
const [startX, startY] = getCoordinatesForPercent(cumulativePercent);
|
|
45793
|
-
|
|
45855
|
+
const startPercent = cumulativePercent;
|
|
45856
|
+
cumulativePercent += d.percent;
|
|
45794
45857
|
const [endX, endY] = getCoordinatesForPercent(cumulativePercent);
|
|
45795
|
-
|
|
45796
|
-
|
|
45797
|
-
const
|
|
45798
|
-
const
|
|
45858
|
+
|
|
45859
|
+
// Midpoint of this slice
|
|
45860
|
+
const midPercent = startPercent + d.percent / 2;
|
|
45861
|
+
const [labelX, labelY] = getCoordinatesForPercent(midPercent);
|
|
45862
|
+
const largeArcFlag = d.percent > 0.5 ? 1 : 0;
|
|
45799
45863
|
const pathData = ["M ".concat(startX, " ").concat(startY), "A 1 1 0 ".concat(largeArcFlag, " 1 ").concat(endX, " ").concat(endY), "L 0 0"].join(' ');
|
|
45800
|
-
const borderPathData = ["M ".concat(borderStartX, " ").concat(borderStartY), "A 1 1 0 0 1 ".concat(borderEndX, " ").concat(borderEndY), "L 0 0"].join(' ');
|
|
45801
45864
|
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
45802
45865
|
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
45803
45866
|
d: pathData,
|
|
45804
|
-
"data-bs-toggle": "tooltip",
|
|
45805
|
-
"data-bs-placement": "top",
|
|
45806
|
-
title: "Tooltip on top",
|
|
45807
45867
|
fill: d.color,
|
|
45808
45868
|
style: {
|
|
45809
45869
|
opacity: changeOpacityOnHover ? hoveredGroup === null ? 1 : hoveredGroup.id === i ? 1 : 0.4 : 1
|
|
45810
45870
|
},
|
|
45811
45871
|
onMouseEnter: () => {
|
|
45812
|
-
if (mouseLocked) {
|
|
45813
|
-
|
|
45872
|
+
if (!mouseLocked) {
|
|
45873
|
+
setHoveredGroup(_objectSpread2(_objectSpread2({}, d), {}, {
|
|
45874
|
+
id: i
|
|
45875
|
+
}));
|
|
45814
45876
|
}
|
|
45815
|
-
setHoveredGroup(_objectSpread2(_objectSpread2({}, d), {}, {
|
|
45816
|
-
id: i
|
|
45817
|
-
}));
|
|
45818
45877
|
},
|
|
45819
45878
|
onMouseLeave: () => {
|
|
45820
|
-
if (mouseLocked) {
|
|
45821
|
-
|
|
45879
|
+
if (!mouseLocked) {
|
|
45880
|
+
setHoveredGroup(null);
|
|
45822
45881
|
}
|
|
45823
|
-
setHoveredGroup(null);
|
|
45824
45882
|
},
|
|
45825
45883
|
onMouseMove: e => onMouseLeaveHandler(e, d, i),
|
|
45826
45884
|
onClick: () => setMouseLocked(prev => !prev)
|
|
45827
45885
|
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
45828
|
-
d:
|
|
45829
|
-
fill: "
|
|
45830
|
-
|
|
45886
|
+
d: pathData,
|
|
45887
|
+
fill: "none",
|
|
45888
|
+
stroke: "white",
|
|
45889
|
+
strokeWidth: "0.001"
|
|
45890
|
+
}), isPdf ? /*#__PURE__*/jsxRuntime.jsx("text", {
|
|
45891
|
+
x: labelX * 0.6,
|
|
45892
|
+
y: labelY * 0.6,
|
|
45893
|
+
textAnchor: "middle",
|
|
45894
|
+
dominantBaseline: "middle",
|
|
45895
|
+
fontSize: "0.1",
|
|
45896
|
+
fill: "#000",
|
|
45897
|
+
transform: "rotate(".concat(getRotationAngle(midPercent), ", ").concat(labelX * 0.6, ", ").concat(labelY * 0.6, ")"),
|
|
45898
|
+
children: d.percent ? isPercentage ? "".concat(Math.round(d.percent * 100), "%") : d.percent : d.label
|
|
45899
|
+
}) : null]
|
|
45831
45900
|
}, i.toString());
|
|
45832
45901
|
});
|
|
45833
45902
|
}, [data, hoveredGroup, getCoordinatesForPercent, mouseLocked]);
|
|
@@ -45870,7 +45939,60 @@ const Chart = _ref => {
|
|
|
45870
45939
|
onMouseMove: e => onMouseLeaveHandler(e, {}, 0)
|
|
45871
45940
|
} : {}), {}, {
|
|
45872
45941
|
children: dataToShow
|
|
45873
|
-
})), tooltip,
|
|
45942
|
+
})), tooltip, !!legendConfig && legendItems.length > 0 && /*#__PURE__*/jsxRuntime.jsx(LegendStyle, {
|
|
45943
|
+
className: legendConfig === null || legendConfig === void 0 ? void 0 : legendConfig.className,
|
|
45944
|
+
"data-position": (legendConfig === null || legendConfig === void 0 ? void 0 : legendConfig.position) || 'bottom',
|
|
45945
|
+
children: legendItems.map((item, index) => {
|
|
45946
|
+
var _item$id;
|
|
45947
|
+
const markerStyle = (legendConfig === null || legendConfig === void 0 ? void 0 : legendConfig.marker) || {};
|
|
45948
|
+
return /*#__PURE__*/jsxRuntime.jsxs("li", {
|
|
45949
|
+
className: item.className,
|
|
45950
|
+
onMouseEnter: () => {
|
|
45951
|
+
if (mouseLocked) {
|
|
45952
|
+
return;
|
|
45953
|
+
}
|
|
45954
|
+
setHoveredGroup(_objectSpread2(_objectSpread2({}, item), {}, {
|
|
45955
|
+
id: index,
|
|
45956
|
+
fromLegend: true
|
|
45957
|
+
}));
|
|
45958
|
+
},
|
|
45959
|
+
onMouseLeave: () => {
|
|
45960
|
+
if (mouseLocked) {
|
|
45961
|
+
return;
|
|
45962
|
+
}
|
|
45963
|
+
setHoveredGroup(null);
|
|
45964
|
+
},
|
|
45965
|
+
onClick: () => {
|
|
45966
|
+
if (!changeOpacityOnHover) {
|
|
45967
|
+
return;
|
|
45968
|
+
}
|
|
45969
|
+
if ((hoveredGroup === null || hoveredGroup === void 0 ? void 0 : hoveredGroup.id) === index && hoveredGroup !== null && hoveredGroup !== void 0 && hoveredGroup.fromLegend) {
|
|
45970
|
+
setHoveredGroup(null);
|
|
45971
|
+
setMouseLocked(false);
|
|
45972
|
+
return;
|
|
45973
|
+
}
|
|
45974
|
+
setHoveredGroup(_objectSpread2(_objectSpread2({}, item), {}, {
|
|
45975
|
+
id: index,
|
|
45976
|
+
fromLegend: true
|
|
45977
|
+
}));
|
|
45978
|
+
setMouseLocked(prev => !prev);
|
|
45979
|
+
},
|
|
45980
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
45981
|
+
className: "legend-marker",
|
|
45982
|
+
style: {
|
|
45983
|
+
backgroundColor: item.color,
|
|
45984
|
+
width: (markerStyle === null || markerStyle === void 0 ? void 0 : markerStyle.size) || 12,
|
|
45985
|
+
height: (markerStyle === null || markerStyle === void 0 ? void 0 : markerStyle.size) || 12,
|
|
45986
|
+
borderRadius: (markerStyle === null || markerStyle === void 0 ? void 0 : markerStyle.shape) === 'square' ? 2 : '50%',
|
|
45987
|
+
border: (markerStyle === null || markerStyle === void 0 ? void 0 : markerStyle.style) === 'line' ? "2px solid ".concat(item.color) : undefined,
|
|
45988
|
+
background: (markerStyle === null || markerStyle === void 0 ? void 0 : markerStyle.style) === 'line' ? 'transparent' : item.color
|
|
45989
|
+
}
|
|
45990
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
45991
|
+
children: item.label
|
|
45992
|
+
})]
|
|
45993
|
+
}, (_item$id = item.id) !== null && _item$id !== void 0 ? _item$id : index);
|
|
45994
|
+
})
|
|
45995
|
+
}), children]
|
|
45874
45996
|
});
|
|
45875
45997
|
};
|
|
45876
45998
|
Chart.propTypes = {
|
|
@@ -47148,7 +47270,7 @@ const renderRows = ({
|
|
|
47148
47270
|
});
|
|
47149
47271
|
};
|
|
47150
47272
|
|
|
47151
|
-
const _excluded$
|
|
47273
|
+
const _excluded$b = ["page", "pageSize"];
|
|
47152
47274
|
function DataStoreTable$1(_ref) {
|
|
47153
47275
|
let {
|
|
47154
47276
|
mod,
|
|
@@ -47246,7 +47368,7 @@ function DataStoreTable$1(_ref) {
|
|
|
47246
47368
|
page,
|
|
47247
47369
|
pageSize
|
|
47248
47370
|
} = activeFilters,
|
|
47249
|
-
rest = _objectWithoutProperties(activeFilters, _excluded$
|
|
47371
|
+
rest = _objectWithoutProperties(activeFilters, _excluded$b);
|
|
47250
47372
|
const params = _objectSpread2({
|
|
47251
47373
|
pagination: {
|
|
47252
47374
|
page,
|
|
@@ -47566,7 +47688,7 @@ const getLinkedColumns = ({
|
|
|
47566
47688
|
ellipsis: true
|
|
47567
47689
|
}];
|
|
47568
47690
|
|
|
47569
|
-
const _excluded$
|
|
47691
|
+
const _excluded$a = ["administrativeLevel1", "administrativeLevel2"];
|
|
47570
47692
|
function DataStoreView(_ref) {
|
|
47571
47693
|
let {
|
|
47572
47694
|
mod,
|
|
@@ -47629,7 +47751,7 @@ function DataStoreView(_ref) {
|
|
|
47629
47751
|
administrativeLevel1,
|
|
47630
47752
|
administrativeLevel2
|
|
47631
47753
|
} = _ref2,
|
|
47632
|
-
rest = _objectWithoutProperties(_ref2, _excluded$
|
|
47754
|
+
rest = _objectWithoutProperties(_ref2, _excluded$a);
|
|
47633
47755
|
const levels = [administrativeLevel1, administrativeLevel2].filter(p => !!p);
|
|
47634
47756
|
let levelsRes = {
|
|
47635
47757
|
data: []
|
|
@@ -49107,14 +49229,14 @@ const TabsStyled = dt(antd.Tabs)`
|
|
|
49107
49229
|
|
|
49108
49230
|
`;
|
|
49109
49231
|
|
|
49110
|
-
const _excluded$
|
|
49232
|
+
const _excluded$9 = ["defaultActiveKey", "items", "onChange"];
|
|
49111
49233
|
const StyledTabs = _ref => {
|
|
49112
49234
|
let {
|
|
49113
49235
|
defaultActiveKey,
|
|
49114
49236
|
items,
|
|
49115
49237
|
onChange
|
|
49116
49238
|
} = _ref,
|
|
49117
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
49239
|
+
rest = _objectWithoutProperties(_ref, _excluded$9);
|
|
49118
49240
|
return /*#__PURE__*/jsxRuntime.jsx(TabsStyled, _objectSpread2({
|
|
49119
49241
|
defaultActiveKey: defaultActiveKey,
|
|
49120
49242
|
items: items,
|
|
@@ -49180,7 +49302,7 @@ function AvatarGroup(_ref) {
|
|
|
49180
49302
|
});
|
|
49181
49303
|
}
|
|
49182
49304
|
|
|
49183
|
-
const _excluded$
|
|
49305
|
+
const _excluded$8 = ["t", "open", "title", "children", "onClose", "onSuccess", "cancelBtnText", "saveBtnText", "className", "loading", "disabled", "withModalFormWrapper"];
|
|
49184
49306
|
function Modal(_ref) {
|
|
49185
49307
|
let {
|
|
49186
49308
|
t = text => text,
|
|
@@ -49196,7 +49318,7 @@ function Modal(_ref) {
|
|
|
49196
49318
|
disabled = false,
|
|
49197
49319
|
withModalFormWrapper = true
|
|
49198
49320
|
} = _ref,
|
|
49199
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
49321
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
49200
49322
|
return /*#__PURE__*/jsxRuntime.jsxs(antd.Modal, _objectSpread2(_objectSpread2({
|
|
49201
49323
|
width: 650,
|
|
49202
49324
|
footer: null,
|
|
@@ -49239,6 +49361,7 @@ const Container$1 = dt.div`
|
|
|
49239
49361
|
width: calc(100% - 48px);
|
|
49240
49362
|
`;
|
|
49241
49363
|
|
|
49364
|
+
const _excluded$7 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "isPercentage", "seriesField", "formattedYAxis", "formattedXAxis", "color", "height", "t", "isPdf", "extraLegendConfig"];
|
|
49242
49365
|
const {
|
|
49243
49366
|
useToken: useToken$e
|
|
49244
49367
|
} = antd.theme;
|
|
@@ -49308,26 +49431,31 @@ const {
|
|
|
49308
49431
|
|
|
49309
49432
|
function BarChart(_ref) {
|
|
49310
49433
|
let {
|
|
49311
|
-
|
|
49312
|
-
|
|
49313
|
-
|
|
49314
|
-
|
|
49315
|
-
|
|
49316
|
-
|
|
49317
|
-
|
|
49318
|
-
|
|
49319
|
-
|
|
49320
|
-
|
|
49321
|
-
|
|
49322
|
-
|
|
49323
|
-
|
|
49324
|
-
|
|
49325
|
-
|
|
49434
|
+
data = [],
|
|
49435
|
+
xFieldKey = "value",
|
|
49436
|
+
yFieldKey = "label",
|
|
49437
|
+
renderTooltipContent,
|
|
49438
|
+
tooltipConfig = {},
|
|
49439
|
+
animated = false,
|
|
49440
|
+
isStack = false,
|
|
49441
|
+
isGroup = false,
|
|
49442
|
+
isPercentage = false,
|
|
49443
|
+
seriesField,
|
|
49444
|
+
formattedYAxis = s => s,
|
|
49445
|
+
formattedXAxis = s => s,
|
|
49446
|
+
color,
|
|
49447
|
+
height,
|
|
49448
|
+
t = s => s,
|
|
49449
|
+
isPdf = false,
|
|
49450
|
+
extraLegendConfig = {}
|
|
49451
|
+
} = _ref;
|
|
49452
|
+
_objectWithoutProperties(_ref, _excluded$7);
|
|
49326
49453
|
const containerRef = React__default["default"].useRef(null);
|
|
49327
49454
|
const chartRef = React__default["default"].useRef(null);
|
|
49328
49455
|
const {
|
|
49329
49456
|
token
|
|
49330
49457
|
} = useToken$e();
|
|
49458
|
+
const hasLegendConfig = Object.keys(extraLegendConfig).length > 0;
|
|
49331
49459
|
React__default["default"].useEffect(() => {
|
|
49332
49460
|
if (!containerRef.current) {
|
|
49333
49461
|
return;
|
|
@@ -49358,7 +49486,12 @@ function BarChart(_ref) {
|
|
|
49358
49486
|
isStack,
|
|
49359
49487
|
color: color || token.colorPrimary7,
|
|
49360
49488
|
seriesField,
|
|
49361
|
-
legend:
|
|
49489
|
+
legend: isPdf ? _objectSpread2({
|
|
49490
|
+
itemName: {
|
|
49491
|
+
formatter: text => t(text)
|
|
49492
|
+
},
|
|
49493
|
+
position: 'bottom'
|
|
49494
|
+
}, extraLegendConfig) : hasLegendConfig || false,
|
|
49362
49495
|
animation: animated
|
|
49363
49496
|
};
|
|
49364
49497
|
if (!chartRef.current) {
|
|
@@ -49388,6 +49521,7 @@ function BarChart(_ref) {
|
|
|
49388
49521
|
});
|
|
49389
49522
|
}
|
|
49390
49523
|
|
|
49524
|
+
const _excluded$6 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isSmooth", "seriesField", "isArea", "formattedYAxis", "formattedXAxis", "color", "isPercentage", "height", "autoHideXLabel", "t", "isPdf", "extraLegendConfig"];
|
|
49391
49525
|
const {
|
|
49392
49526
|
useToken: useToken$d
|
|
49393
49527
|
} = antd.theme;
|
|
@@ -49454,27 +49588,32 @@ const {
|
|
|
49454
49588
|
|
|
49455
49589
|
function LineChart(_ref) {
|
|
49456
49590
|
let {
|
|
49457
|
-
|
|
49458
|
-
|
|
49459
|
-
|
|
49460
|
-
|
|
49461
|
-
|
|
49462
|
-
|
|
49463
|
-
|
|
49464
|
-
|
|
49465
|
-
|
|
49466
|
-
|
|
49467
|
-
|
|
49468
|
-
|
|
49469
|
-
|
|
49470
|
-
|
|
49471
|
-
|
|
49472
|
-
|
|
49591
|
+
data = [],
|
|
49592
|
+
xFieldKey = "label",
|
|
49593
|
+
yFieldKey = "value",
|
|
49594
|
+
renderTooltipContent,
|
|
49595
|
+
tooltipConfig = {},
|
|
49596
|
+
animated = false,
|
|
49597
|
+
isSmooth = false,
|
|
49598
|
+
seriesField,
|
|
49599
|
+
isArea = false,
|
|
49600
|
+
formattedYAxis = s => s,
|
|
49601
|
+
formattedXAxis = s => s,
|
|
49602
|
+
color,
|
|
49603
|
+
isPercentage = false,
|
|
49604
|
+
height,
|
|
49605
|
+
autoHideXLabel = true,
|
|
49606
|
+
t = s => s,
|
|
49607
|
+
isPdf = false,
|
|
49608
|
+
extraLegendConfig = {}
|
|
49609
|
+
} = _ref;
|
|
49610
|
+
_objectWithoutProperties(_ref, _excluded$6);
|
|
49473
49611
|
const containerRef = React__default["default"].useRef(null);
|
|
49474
49612
|
const chartRef = React__default["default"].useRef(null);
|
|
49475
49613
|
const {
|
|
49476
49614
|
token
|
|
49477
49615
|
} = useToken$d();
|
|
49616
|
+
const hasLegendConfig = Object.keys(extraLegendConfig).length > 0;
|
|
49478
49617
|
React__default["default"].useEffect(() => {
|
|
49479
49618
|
if (!containerRef.current) {
|
|
49480
49619
|
return;
|
|
@@ -49518,7 +49657,12 @@ function LineChart(_ref) {
|
|
|
49518
49657
|
fillOpacity: isArea ? 0.15 : 0
|
|
49519
49658
|
}
|
|
49520
49659
|
},
|
|
49521
|
-
legend:
|
|
49660
|
+
legend: isPdf ? _objectSpread2({
|
|
49661
|
+
itemName: {
|
|
49662
|
+
formatter: text => t(text)
|
|
49663
|
+
},
|
|
49664
|
+
position: 'bottom'
|
|
49665
|
+
}, extraLegendConfig) : hasLegendConfig || false
|
|
49522
49666
|
};
|
|
49523
49667
|
if (!chartRef.current) {
|
|
49524
49668
|
chartRef.current = new g2plot.Line(containerRef.current, config);
|
|
@@ -49526,7 +49670,7 @@ function LineChart(_ref) {
|
|
|
49526
49670
|
} else {
|
|
49527
49671
|
chartRef.current.update(config);
|
|
49528
49672
|
}
|
|
49529
|
-
}, [data, containerRef.current, isSmooth, animated, xFieldKey, yFieldKey, seriesField, isArea, color, token.colorPrimary7, formattedXAxis, formattedYAxis, isPercentage, renderTooltipContent, tooltipConfig]);
|
|
49673
|
+
}, [data, containerRef.current, isSmooth, animated, xFieldKey, yFieldKey, seriesField, isArea, color, token.colorPrimary7, formattedXAxis, formattedYAxis, isPercentage, renderTooltipContent, tooltipConfig, isPdf, extraLegendConfig, t]);
|
|
49530
49674
|
React__default["default"].useEffect(() => {
|
|
49531
49675
|
return () => {
|
|
49532
49676
|
if (chartRef.current) {
|
|
@@ -49547,6 +49691,7 @@ function LineChart(_ref) {
|
|
|
49547
49691
|
});
|
|
49548
49692
|
}
|
|
49549
49693
|
|
|
49694
|
+
const _excluded$5 = ["data", "xFieldKey", "yFieldKey", "renderTooltipContent", "tooltipConfig", "animated", "isStack", "isGroup", "seriesField", "isPercentage", "showBackground", "formattedYAxis", "formattedXAxis", "color", "height", "groupField", "t", "isPdf", "extraLegendConfig"];
|
|
49550
49695
|
const {
|
|
49551
49696
|
useToken: useToken$c
|
|
49552
49697
|
} = antd.theme;
|
|
@@ -49615,28 +49760,33 @@ const {
|
|
|
49615
49760
|
|
|
49616
49761
|
function ColumnChart(_ref) {
|
|
49617
49762
|
let {
|
|
49618
|
-
|
|
49619
|
-
|
|
49620
|
-
|
|
49621
|
-
|
|
49622
|
-
|
|
49623
|
-
|
|
49624
|
-
|
|
49625
|
-
|
|
49626
|
-
|
|
49627
|
-
|
|
49628
|
-
|
|
49629
|
-
|
|
49630
|
-
|
|
49631
|
-
|
|
49632
|
-
|
|
49633
|
-
|
|
49634
|
-
|
|
49763
|
+
data = [],
|
|
49764
|
+
xFieldKey = "label",
|
|
49765
|
+
yFieldKey = "value",
|
|
49766
|
+
renderTooltipContent,
|
|
49767
|
+
tooltipConfig = {},
|
|
49768
|
+
animated = false,
|
|
49769
|
+
isStack = false,
|
|
49770
|
+
isGroup = false,
|
|
49771
|
+
seriesField,
|
|
49772
|
+
isPercentage = false,
|
|
49773
|
+
showBackground = false,
|
|
49774
|
+
formattedYAxis = s => s,
|
|
49775
|
+
formattedXAxis = s => s,
|
|
49776
|
+
color,
|
|
49777
|
+
height,
|
|
49778
|
+
groupField,
|
|
49779
|
+
t = s => s,
|
|
49780
|
+
isPdf = false,
|
|
49781
|
+
extraLegendConfig = {}
|
|
49782
|
+
} = _ref;
|
|
49783
|
+
_objectWithoutProperties(_ref, _excluded$5);
|
|
49635
49784
|
const containerRef = React__default["default"].useRef(null);
|
|
49636
49785
|
const chartRef = React__default["default"].useRef(null);
|
|
49637
49786
|
const {
|
|
49638
49787
|
token
|
|
49639
49788
|
} = useToken$c();
|
|
49789
|
+
const hasLegendConfig = Object.keys(extraLegendConfig).length > 0;
|
|
49640
49790
|
React__default["default"].useEffect(() => {
|
|
49641
49791
|
if (!containerRef.current) {
|
|
49642
49792
|
return;
|
|
@@ -49671,7 +49821,12 @@ function ColumnChart(_ref) {
|
|
|
49671
49821
|
formatter: isPercentage ? v => "".concat(v).replace(/\d{1,3}(?=(\d{3})+$)/g, s => "".concat(s, ",")) + " %" : formattedYAxis
|
|
49672
49822
|
}
|
|
49673
49823
|
}),
|
|
49674
|
-
legend:
|
|
49824
|
+
legend: isPdf ? _objectSpread2({
|
|
49825
|
+
itemName: {
|
|
49826
|
+
formatter: text => t(text)
|
|
49827
|
+
},
|
|
49828
|
+
position: 'bottom'
|
|
49829
|
+
}, extraLegendConfig) : hasLegendConfig || false
|
|
49675
49830
|
}, showBackground && isPercentage && {
|
|
49676
49831
|
columnBackground: {
|
|
49677
49832
|
style: {}
|
|
@@ -49859,7 +50014,7 @@ function RadialBarChart(_ref) {
|
|
|
49859
50014
|
});
|
|
49860
50015
|
}
|
|
49861
50016
|
|
|
49862
|
-
const _excluded$4 = ["data", "angleField", "colorField", "color", "height", "innerRadius", "radius", "legend", "label", "statistic", "tooltip", "renderTooltipContent", "tooltipConfig", "meta", "animation"];
|
|
50017
|
+
const _excluded$4 = ["data", "angleField", "colorField", "color", "height", "innerRadius", "radius", "legend", "label", "statistic", "tooltip", "renderTooltipContent", "tooltipConfig", "meta", "animation", "t", "isPdf", "extraLegendConfig"];
|
|
49863
50018
|
const {
|
|
49864
50019
|
useToken: useToken$a
|
|
49865
50020
|
} = antd.theme;
|
|
@@ -49929,7 +50084,10 @@ function DonutPie(_ref) {
|
|
|
49929
50084
|
renderTooltipContent,
|
|
49930
50085
|
tooltipConfig = {},
|
|
49931
50086
|
meta,
|
|
49932
|
-
animation = false
|
|
50087
|
+
animation = false,
|
|
50088
|
+
t = s => s,
|
|
50089
|
+
isPdf = false,
|
|
50090
|
+
extraLegendConfig = {}
|
|
49933
50091
|
} = _ref,
|
|
49934
50092
|
rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
49935
50093
|
const containerRef = React.useRef(null);
|
|
@@ -49937,6 +50095,7 @@ function DonutPie(_ref) {
|
|
|
49937
50095
|
const {
|
|
49938
50096
|
token
|
|
49939
50097
|
} = useToken$a();
|
|
50098
|
+
const hasLegendConfig = Object.keys(extraLegendConfig).length > 0;
|
|
49940
50099
|
|
|
49941
50100
|
// Memoize processed data for progress mode
|
|
49942
50101
|
const processedData = React.useMemo(() => {
|
|
@@ -49962,7 +50121,12 @@ function DonutPie(_ref) {
|
|
|
49962
50121
|
color: color || [token.colorPrimary7, "#E8EDF3"],
|
|
49963
50122
|
radius,
|
|
49964
50123
|
innerRadius,
|
|
49965
|
-
legend
|
|
50124
|
+
legend: isPdf ? _objectSpread2({
|
|
50125
|
+
itemName: {
|
|
50126
|
+
formatter: text => t(text)
|
|
50127
|
+
},
|
|
50128
|
+
position: 'bottom'
|
|
50129
|
+
}, extraLegendConfig) : hasLegendConfig || false,
|
|
49966
50130
|
label,
|
|
49967
50131
|
statistic,
|
|
49968
50132
|
tooltip: tooltipOption,
|
|
@@ -50391,7 +50555,7 @@ function StackChart(_ref) {
|
|
|
50391
50555
|
}));
|
|
50392
50556
|
}
|
|
50393
50557
|
|
|
50394
|
-
const _excluded$3 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "fillOpacity", "height"];
|
|
50558
|
+
const _excluded$3 = ["data", "xFieldKey", "yFieldKey", "seriesField", "renderTooltipContent", "tooltipConfig", "animated", "color", "formattedYAxis", "formattedXAxis", "fillOpacity", "height", "t", "isPdf", "extraLegendConfig"];
|
|
50395
50559
|
const {
|
|
50396
50560
|
useToken: useToken$8
|
|
50397
50561
|
} = antd.theme;
|
|
@@ -50462,7 +50626,10 @@ const AreaChart = _ref => {
|
|
|
50462
50626
|
formattedYAxis = s => s,
|
|
50463
50627
|
formattedXAxis = s => s,
|
|
50464
50628
|
fillOpacity = 0.7,
|
|
50465
|
-
height
|
|
50629
|
+
height,
|
|
50630
|
+
t = s => s,
|
|
50631
|
+
isPdf = false,
|
|
50632
|
+
extraLegendConfig = {}
|
|
50466
50633
|
} = _ref,
|
|
50467
50634
|
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
50468
50635
|
const containerRef = React.useRef(null);
|
|
@@ -50470,6 +50637,7 @@ const AreaChart = _ref => {
|
|
|
50470
50637
|
const {
|
|
50471
50638
|
token
|
|
50472
50639
|
} = useToken$8();
|
|
50640
|
+
const hasLegendConfig = Object.keys(extraLegendConfig).length > 0;
|
|
50473
50641
|
React.useEffect(() => {
|
|
50474
50642
|
if (!containerRef.current) {
|
|
50475
50643
|
return;
|
|
@@ -50504,7 +50672,12 @@ const AreaChart = _ref => {
|
|
|
50504
50672
|
areaStyle: {
|
|
50505
50673
|
fillOpacity
|
|
50506
50674
|
},
|
|
50507
|
-
legend:
|
|
50675
|
+
legend: isPdf ? _objectSpread2({
|
|
50676
|
+
itemName: {
|
|
50677
|
+
formatter: text => t(text)
|
|
50678
|
+
},
|
|
50679
|
+
position: 'bottom'
|
|
50680
|
+
}, extraLegendConfig) : hasLegendConfig || false,
|
|
50508
50681
|
line: false
|
|
50509
50682
|
}, rest);
|
|
50510
50683
|
if (!chartRef.current) {
|