datastake-daf 0.6.418 → 0.6.419
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
CHANGED
|
@@ -13276,15 +13276,9 @@ DAFFooter.propTypes = {
|
|
|
13276
13276
|
};
|
|
13277
13277
|
|
|
13278
13278
|
const PAGE_HEIGHT = 1587;
|
|
13279
|
+
// margin-top: 20, bottom: 20;
|
|
13279
13280
|
const FOOTER_HEIGHT = 70;
|
|
13280
13281
|
const HEADER_HEIGHT = 100;
|
|
13281
|
-
const SECTION_SPACING = 24;
|
|
13282
|
-
const TOP_PADDING = 30;
|
|
13283
|
-
const BOTTOM_PADDING = 30;
|
|
13284
|
-
|
|
13285
|
-
// Calculate usable height per page
|
|
13286
|
-
const USABLE_HEIGHT = PAGE_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT - TOP_PADDING - BOTTOM_PADDING;
|
|
13287
|
-
const SPLIT_THRESHOLD = USABLE_HEIGHT * 0.80;
|
|
13288
13282
|
const Row = _ref => {
|
|
13289
13283
|
let {
|
|
13290
13284
|
widgets,
|
|
@@ -13309,7 +13303,7 @@ const Row = _ref => {
|
|
|
13309
13303
|
ref
|
|
13310
13304
|
});
|
|
13311
13305
|
}
|
|
13312
|
-
}, [height
|
|
13306
|
+
}, [height]);
|
|
13313
13307
|
return /*#__PURE__*/jsxRuntime.jsx("section", {
|
|
13314
13308
|
ref: ref,
|
|
13315
13309
|
style: widgets.style,
|
|
@@ -13331,88 +13325,51 @@ function PdfView(_ref2) {
|
|
|
13331
13325
|
const [pages, setPages] = React.useState([1]);
|
|
13332
13326
|
const doSizing = React.useCallback(() => {
|
|
13333
13327
|
const keys = Object.keys(sectionsConfig);
|
|
13334
|
-
if (keys.length !== config.length) return;
|
|
13335
|
-
|
|
13336
|
-
// Check if all refs are ready
|
|
13337
|
-
const allRefsReady = keys.every(k => {
|
|
13338
|
-
const {
|
|
13339
|
-
ref
|
|
13340
|
-
} = sectionsConfig[k];
|
|
13341
|
-
return ref && ref.current;
|
|
13342
|
-
});
|
|
13343
|
-
if (!allRefsReady) return;
|
|
13344
13328
|
let _pages = [1];
|
|
13345
|
-
let
|
|
13346
|
-
|
|
13347
|
-
|
|
13348
|
-
|
|
13349
|
-
|
|
13350
|
-
|
|
13351
|
-
|
|
13352
|
-
} = sectionsConfig[k];
|
|
13353
|
-
if (ref.current) {
|
|
13354
|
-
ref.current.style.marginTop = '0px';
|
|
13329
|
+
let _page = 1;
|
|
13330
|
+
if (keys.length === config.length) {
|
|
13331
|
+
let incrHeight = 0;
|
|
13332
|
+
keys.forEach(k => {
|
|
13333
|
+
const {
|
|
13334
|
+
ref
|
|
13335
|
+
} = sectionsConfig[k];
|
|
13355
13336
|
ref.current.style.marginBottom = '0px';
|
|
13356
|
-
ref.current.style.
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13364
|
-
|
|
13365
|
-
|
|
13366
|
-
|
|
13367
|
-
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
|
|
13377
|
-
// Check if we need a page break
|
|
13378
|
-
const needsPageBreak = potentialAccumulated > SPLIT_THRESHOLD || accumulatedHeightOnPage + SECTION_SPACING + height > USABLE_HEIGHT;
|
|
13379
|
-
if (needsPageBreak) {
|
|
13380
|
-
// Calculate remaining space and add it as margin to previous section
|
|
13381
|
-
const remainingSpace = USABLE_HEIGHT - accumulatedHeightOnPage;
|
|
13382
|
-
const previousKey = keys[i - 1];
|
|
13383
|
-
if (sectionsConfig[previousKey]) {
|
|
13337
|
+
// ref.current.style.marginTop = '15px';
|
|
13338
|
+
});
|
|
13339
|
+
keys.forEach((k, i) => {
|
|
13340
|
+
const {
|
|
13341
|
+
height,
|
|
13342
|
+
ref
|
|
13343
|
+
} = sectionsConfig[k];
|
|
13344
|
+
if (i === 0) {
|
|
13345
|
+
ref.current.style.marginTop = "".concat(HEADER_HEIGHT, "px");
|
|
13346
|
+
incrHeight += HEADER_HEIGHT;
|
|
13347
|
+
}
|
|
13348
|
+
const newHeight = incrHeight + height;
|
|
13349
|
+
if (i === keys.length - 1) {
|
|
13350
|
+
ref.current.style.paddingBottom = '30px';
|
|
13351
|
+
}
|
|
13352
|
+
if (newHeight > PAGE_HEIGHT - 30 - FOOTER_HEIGHT - HEADER_HEIGHT) {
|
|
13353
|
+
const dif = Math.abs(PAGE_HEIGHT - incrHeight);
|
|
13354
|
+
ref.current.style.marginTop = '30px';
|
|
13355
|
+
_page += 1;
|
|
13356
|
+
_pages.push(_page);
|
|
13357
|
+
if (sectionsConfig[keys[i - 1]]) {
|
|
13384
13358
|
const {
|
|
13385
|
-
ref:
|
|
13386
|
-
} = sectionsConfig[
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
}
|
|
13359
|
+
ref: topRef
|
|
13360
|
+
} = sectionsConfig[keys[i - 1]];
|
|
13361
|
+
topRef.current.style.marginBottom = "".concat(dif + HEADER_HEIGHT - 24, "px");
|
|
13362
|
+
incrHeight = height + 24 + HEADER_HEIGHT;
|
|
13363
|
+
// console.log('margin', dif);
|
|
13391
13364
|
}
|
|
13392
|
-
|
|
13393
|
-
// Start new page
|
|
13394
|
-
currentPage += 1;
|
|
13395
|
-
_pages.push(currentPage);
|
|
13396
|
-
|
|
13397
|
-
// Add top padding for new page (header + top padding)
|
|
13398
|
-
ref.current.style.paddingTop = "".concat(HEADER_HEIGHT + TOP_PADDING, "px");
|
|
13399
|
-
|
|
13400
|
-
// Reset accumulated height for new page
|
|
13401
|
-
accumulatedHeightOnPage = height;
|
|
13402
13365
|
} else {
|
|
13403
|
-
|
|
13404
|
-
ref.current.style.marginTop = "".concat(SECTION_SPACING, "px");
|
|
13405
|
-
accumulatedHeightOnPage = potentialAccumulated;
|
|
13366
|
+
incrHeight = newHeight + 24;
|
|
13406
13367
|
}
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
}
|
|
13413
|
-
});
|
|
13414
|
-
setPages(_pages);
|
|
13415
|
-
}, [sectionsConfig, config.length]);
|
|
13368
|
+
// console.groupEnd();
|
|
13369
|
+
});
|
|
13370
|
+
setPages(_pages);
|
|
13371
|
+
}
|
|
13372
|
+
}, [sectionsConfig]);
|
|
13416
13373
|
React.useEffect(() => {
|
|
13417
13374
|
doSizing();
|
|
13418
13375
|
}, [doSizing]);
|
|
@@ -13433,22 +13390,32 @@ function PdfView(_ref2) {
|
|
|
13433
13390
|
widgets: widgets,
|
|
13434
13391
|
i: i,
|
|
13435
13392
|
onChangeHeight: onChangeHeight
|
|
13436
|
-
}, "dashboard-sections
|
|
13393
|
+
}, "dashboard-sections=".concat(i + 1)))
|
|
13437
13394
|
})
|
|
13438
13395
|
})
|
|
13439
13396
|
});
|
|
13440
13397
|
}, [config, onChangeHeight]);
|
|
13398
|
+
|
|
13399
|
+
// <div className="daf-analysis">
|
|
13400
|
+
// <Header title={t('Dashboard Title')} />
|
|
13401
|
+
|
|
13402
|
+
// <div className="content">
|
|
13403
|
+
// <div className="view-content">
|
|
13404
|
+
// <div className="daf-analysis-layout">
|
|
13405
|
+
// <div className='sections-cont w-pt'>
|
|
13406
|
+
// <section>
|
|
13407
|
+
|
|
13441
13408
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
13442
13409
|
className: contClassName,
|
|
13443
13410
|
style: {
|
|
13444
13411
|
position: 'relative'
|
|
13445
13412
|
},
|
|
13446
|
-
children: [renderDashboard(), pages.map(page => /*#__PURE__*/jsxRuntime.jsxs(
|
|
13413
|
+
children: [renderDashboard(), pages.map(page => /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
13447
13414
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
13448
13415
|
style: {
|
|
13449
13416
|
top: (page - 1) * PAGE_HEIGHT,
|
|
13450
13417
|
width: '100%',
|
|
13451
|
-
height: HEADER_HEIGHT,
|
|
13418
|
+
height: HEADER_HEIGHT - 24,
|
|
13452
13419
|
position: 'absolute',
|
|
13453
13420
|
left: 0,
|
|
13454
13421
|
zIndex: 1000000
|
|
@@ -13466,7 +13433,7 @@ function PdfView(_ref2) {
|
|
|
13466
13433
|
alt: "logo"
|
|
13467
13434
|
})
|
|
13468
13435
|
})]
|
|
13469
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
13436
|
+
}, "headers-".concat(page)), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
13470
13437
|
style: {
|
|
13471
13438
|
top: page * PAGE_HEIGHT - FOOTER_HEIGHT,
|
|
13472
13439
|
width: '100%',
|
|
@@ -13509,8 +13476,8 @@ function PdfView(_ref2) {
|
|
|
13509
13476
|
children: page
|
|
13510
13477
|
})
|
|
13511
13478
|
})]
|
|
13512
|
-
})]
|
|
13513
|
-
}
|
|
13479
|
+
}, "footers-".concat(page))]
|
|
13480
|
+
}))]
|
|
13514
13481
|
});
|
|
13515
13482
|
}
|
|
13516
13483
|
PdfView.propTypes = {
|
|
@@ -13520,8 +13487,7 @@ PdfView.propTypes = {
|
|
|
13520
13487
|
imgSrc: PropTypes__default["default"].string,
|
|
13521
13488
|
userId: PropTypes__default["default"].string,
|
|
13522
13489
|
accountId: PropTypes__default["default"].string,
|
|
13523
|
-
documentId: PropTypes__default["default"].string
|
|
13524
|
-
downloadId: PropTypes__default["default"].string
|
|
13490
|
+
documentId: PropTypes__default["default"].string
|
|
13525
13491
|
};
|
|
13526
13492
|
|
|
13527
13493
|
const ajaxSelectFieldData = async (value, config, getApiBaseUrl = () => {}, getAppHeader = () => {}, app, formValues = {}) => {
|
|
@@ -22157,7 +22123,34 @@ const WidgetCard = _ref => {
|
|
|
22157
22123
|
children: /*#__PURE__*/jsxRuntime.jsx("a", {
|
|
22158
22124
|
className: formatClassname(["widget-card-logo-icon", (buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.disabled) && "disabled-anchor"]),
|
|
22159
22125
|
href: buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.disabled ? undefined : link,
|
|
22160
|
-
onClick:
|
|
22126
|
+
onClick: e => {
|
|
22127
|
+
if (buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.disabled) {
|
|
22128
|
+
e.preventDefault();
|
|
22129
|
+
} else if (buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.onClick) {
|
|
22130
|
+
e.preventDefault();
|
|
22131
|
+
buttonConfig.onClick();
|
|
22132
|
+
} else if (buttonConfig !== null && buttonConfig !== void 0 && buttonConfig.action) {
|
|
22133
|
+
e.preventDefault();
|
|
22134
|
+
// Handle different action types
|
|
22135
|
+
switch (buttonConfig.action.type) {
|
|
22136
|
+
case 'modal':
|
|
22137
|
+
if (buttonConfig.action.onOpen) {
|
|
22138
|
+
buttonConfig.action.onOpen();
|
|
22139
|
+
}
|
|
22140
|
+
break;
|
|
22141
|
+
case 'navigate':
|
|
22142
|
+
if (buttonConfig.action.url) {
|
|
22143
|
+
window.location.href = buttonConfig.action.url;
|
|
22144
|
+
}
|
|
22145
|
+
break;
|
|
22146
|
+
case 'custom':
|
|
22147
|
+
if (buttonConfig.action.handler) {
|
|
22148
|
+
buttonConfig.action.handler();
|
|
22149
|
+
}
|
|
22150
|
+
break;
|
|
22151
|
+
}
|
|
22152
|
+
}
|
|
22153
|
+
},
|
|
22161
22154
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
22162
22155
|
name: buttonIcon,
|
|
22163
22156
|
size: 16,
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/* Isolated Mapbox GL CSS - Scoped to prevent Leaflet conflicts */
|
|
2
|
+
|
|
3
|
+
/* Mapbox GL Core Styles - Scoped with .mapbox-gl-scope */
|
|
4
|
+
.mapbox-gl-scope .mapboxgl-map {
|
|
5
|
+
font: 12px/20px Helvetica Neue, Arial, Helvetica, sans-serif;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
position: relative;
|
|
8
|
+
-webkit-tap-highlight-color: rgb(0 0 0/0);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mapbox-gl-scope .mapboxgl-canvas {
|
|
12
|
+
left: 0;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mapbox-gl-scope .mapboxgl-map:-webkit-full-screen {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mapbox-gl-scope .mapboxgl-canary {
|
|
23
|
+
background-color: salmon;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive,
|
|
27
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button.mapboxgl-ctrl-compass {
|
|
28
|
+
cursor: grab;
|
|
29
|
+
-webkit-user-select: none;
|
|
30
|
+
user-select: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive:active,
|
|
38
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active {
|
|
39
|
+
cursor: grabbing;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,
|
|
43
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas {
|
|
44
|
+
touch-action: pan-x pan-y;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-drag-pan,
|
|
48
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas {
|
|
49
|
+
touch-action: pinch-zoom;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,
|
|
53
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas {
|
|
54
|
+
touch-action: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Control positioning */
|
|
58
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom,
|
|
59
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left,
|
|
60
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right,
|
|
61
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left,
|
|
62
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right,
|
|
63
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top,
|
|
64
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left,
|
|
65
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right {
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
position: absolute;
|
|
68
|
+
z-index: 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left {
|
|
72
|
+
left: 0;
|
|
73
|
+
top: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top {
|
|
77
|
+
left: 50%;
|
|
78
|
+
top: 0;
|
|
79
|
+
transform: translateX(-50%);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right {
|
|
83
|
+
right: 0;
|
|
84
|
+
top: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right {
|
|
88
|
+
right: 0;
|
|
89
|
+
top: 50%;
|
|
90
|
+
transform: translateY(-50%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right {
|
|
94
|
+
bottom: 0;
|
|
95
|
+
right: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom {
|
|
99
|
+
bottom: 0;
|
|
100
|
+
left: 50%;
|
|
101
|
+
transform: translateX(-50%);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left {
|
|
105
|
+
bottom: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left {
|
|
110
|
+
left: 0;
|
|
111
|
+
top: 50%;
|
|
112
|
+
transform: translateY(-50%);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mapbox-gl-scope .mapboxgl-ctrl {
|
|
116
|
+
clear: both;
|
|
117
|
+
pointer-events: auto;
|
|
118
|
+
transform: translate(0);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left .mapboxgl-ctrl {
|
|
122
|
+
float: left;
|
|
123
|
+
margin: 10px 0 0 10px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top .mapboxgl-ctrl {
|
|
127
|
+
float: left;
|
|
128
|
+
margin: 10px 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right .mapboxgl-ctrl {
|
|
132
|
+
float: right;
|
|
133
|
+
margin: 10px 10px 0 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl,
|
|
137
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right .mapboxgl-ctrl {
|
|
138
|
+
float: right;
|
|
139
|
+
margin: 0 10px 10px 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom .mapboxgl-ctrl {
|
|
143
|
+
float: left;
|
|
144
|
+
margin: 10px 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl,
|
|
148
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left .mapboxgl-ctrl {
|
|
149
|
+
float: left;
|
|
150
|
+
margin: 0 0 10px 10px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Control group styling */
|
|
154
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group {
|
|
155
|
+
background: #fff;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group:not(:empty) {
|
|
160
|
+
box-shadow: 0 0 0 2px #0000001a;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button {
|
|
164
|
+
background-color: initial;
|
|
165
|
+
border: 0;
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
display: block;
|
|
169
|
+
height: 29px;
|
|
170
|
+
outline: none;
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
padding: 0;
|
|
173
|
+
width: 29px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button+button {
|
|
177
|
+
border-top: 1px solid #ddd;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.mapbox-gl-scope .mapboxgl-ctrl button .mapboxgl-ctrl-icon {
|
|
181
|
+
background-position: 50%;
|
|
182
|
+
background-repeat: no-repeat;
|
|
183
|
+
display: block;
|
|
184
|
+
height: 100%;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attrib-button:focus,
|
|
189
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:focus {
|
|
190
|
+
box-shadow: 0 0 2px 2px #0096ff;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:disabled {
|
|
194
|
+
cursor: not-allowed;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon {
|
|
198
|
+
opacity: .25;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:first-child {
|
|
202
|
+
border-radius: 4px 4px 0 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:last-child {
|
|
206
|
+
border-radius: 0 0 4px 4px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:only-child {
|
|
210
|
+
border-radius: inherit;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:not(:disabled):hover {
|
|
214
|
+
background-color: #0000000d;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Marker styles */
|
|
218
|
+
.mapbox-gl-scope .mapboxgl-marker {
|
|
219
|
+
position: absolute;
|
|
220
|
+
z-index: 1;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mapbox-gl-scope .mapboxgl-marker svg {
|
|
224
|
+
display: block;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Popup styles */
|
|
228
|
+
.mapbox-gl-scope .mapboxgl-popup {
|
|
229
|
+
position: absolute;
|
|
230
|
+
text-align: center;
|
|
231
|
+
margin-bottom: 20px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mapbox-gl-scope .mapboxgl-popup-content-wrapper {
|
|
235
|
+
padding: 1px;
|
|
236
|
+
text-align: left;
|
|
237
|
+
border-radius: 12px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mapbox-gl-scope .mapboxgl-popup-content {
|
|
241
|
+
margin: 13px 24px 13px 20px;
|
|
242
|
+
line-height: 1.3;
|
|
243
|
+
font-size: 13px;
|
|
244
|
+
min-height: 1px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mapbox-gl-scope .mapboxgl-popup-content p {
|
|
248
|
+
margin: 17px 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.mapbox-gl-scope .mapboxgl-popup-tip-container {
|
|
252
|
+
width: 40px;
|
|
253
|
+
height: 20px;
|
|
254
|
+
position: absolute;
|
|
255
|
+
left: 50%;
|
|
256
|
+
margin-top: -1px;
|
|
257
|
+
margin-left: -20px;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
pointer-events: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mapbox-gl-scope .mapboxgl-popup-tip {
|
|
263
|
+
width: 17px;
|
|
264
|
+
height: 17px;
|
|
265
|
+
padding: 1px;
|
|
266
|
+
margin: -10px auto 0;
|
|
267
|
+
pointer-events: auto;
|
|
268
|
+
-webkit-transform: rotate(45deg);
|
|
269
|
+
-moz-transform: rotate(45deg);
|
|
270
|
+
-ms-transform: rotate(45deg);
|
|
271
|
+
transform: rotate(45deg);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.mapbox-gl-scope .mapboxgl-popup-content-wrapper,
|
|
275
|
+
.mapbox-gl-scope .mapboxgl-popup-tip {
|
|
276
|
+
background: white;
|
|
277
|
+
color: #333;
|
|
278
|
+
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button {
|
|
282
|
+
position: absolute;
|
|
283
|
+
top: 0;
|
|
284
|
+
right: 0;
|
|
285
|
+
border: none;
|
|
286
|
+
text-align: center;
|
|
287
|
+
width: 24px;
|
|
288
|
+
height: 24px;
|
|
289
|
+
font: 16px/24px Tahoma, Verdana, sans-serif;
|
|
290
|
+
color: #757575;
|
|
291
|
+
text-decoration: none;
|
|
292
|
+
background: transparent;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button:hover,
|
|
296
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button:focus {
|
|
297
|
+
color: #585858;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Attribution */
|
|
301
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution {
|
|
302
|
+
background: #fff;
|
|
303
|
+
background: rgba(255, 255, 255, 0.8);
|
|
304
|
+
margin: 0;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution,
|
|
308
|
+
.mapbox-gl-scope .mapboxgl-ctrl-scale-line {
|
|
309
|
+
padding: 0 5px;
|
|
310
|
+
color: #333;
|
|
311
|
+
line-height: 1.4;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a {
|
|
315
|
+
text-decoration: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a:hover,
|
|
319
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a:focus {
|
|
320
|
+
text-decoration: underline;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Hide attribution by default */
|
|
324
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution {
|
|
325
|
+
display: none !important;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.mapbox-gl-scope .mapboxgl-ctrl-logo {
|
|
329
|
+
display: none !important;
|
|
330
|
+
}
|
package/package.json
CHANGED
|
@@ -4,15 +4,9 @@ import { useCallback, useEffect, useRef, useState } from "react";
|
|
|
4
4
|
import { formatClassname } from "../../../../../helpers/ClassesHelper";
|
|
5
5
|
|
|
6
6
|
const PAGE_HEIGHT = 1587;
|
|
7
|
+
// margin-top: 20, bottom: 20;
|
|
7
8
|
const FOOTER_HEIGHT = 70;
|
|
8
9
|
const HEADER_HEIGHT = 100;
|
|
9
|
-
const SECTION_SPACING = 24;
|
|
10
|
-
const TOP_PADDING = 30;
|
|
11
|
-
const BOTTOM_PADDING = 30;
|
|
12
|
-
|
|
13
|
-
// Calculate usable height per page
|
|
14
|
-
const USABLE_HEIGHT = PAGE_HEIGHT - HEADER_HEIGHT - FOOTER_HEIGHT - TOP_PADDING - BOTTOM_PADDING;
|
|
15
|
-
const SPLIT_THRESHOLD = USABLE_HEIGHT * 0.80;
|
|
16
10
|
|
|
17
11
|
const Row = ({ widgets, i, onChangeHeight = () => { } }) => {
|
|
18
12
|
const ref = useRef();
|
|
@@ -34,7 +28,7 @@ const Row = ({ widgets, i, onChangeHeight = () => { } }) => {
|
|
|
34
28
|
if (height) {
|
|
35
29
|
onChangeHeight(i, { height, ref });
|
|
36
30
|
}
|
|
37
|
-
}, [height
|
|
31
|
+
}, [height])
|
|
38
32
|
|
|
39
33
|
return (
|
|
40
34
|
<section ref={ref} style={widgets.style}>
|
|
@@ -58,88 +52,52 @@ export default function PdfView({
|
|
|
58
52
|
|
|
59
53
|
const doSizing = useCallback(() => {
|
|
60
54
|
const keys = Object.keys(sectionsConfig);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
// Check if all refs are ready
|
|
65
|
-
const allRefsReady = keys.every(k => {
|
|
66
|
-
const { ref } = sectionsConfig[k];
|
|
67
|
-
return ref && ref.current;
|
|
68
|
-
});
|
|
55
|
+
let _pages = [1];
|
|
56
|
+
let _page = 1;
|
|
69
57
|
|
|
70
|
-
if (
|
|
58
|
+
if (keys.length === config.length) {
|
|
59
|
+
let incrHeight = 0;
|
|
71
60
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
let accumulatedHeightOnPage = 0;
|
|
75
|
-
|
|
76
|
-
// Reset all styles first
|
|
77
|
-
keys.forEach(k => {
|
|
78
|
-
const { ref } = sectionsConfig[k];
|
|
79
|
-
if (ref.current) {
|
|
80
|
-
ref.current.style.marginTop = '0px';
|
|
61
|
+
keys.forEach(k => {
|
|
62
|
+
const { ref } = sectionsConfig[k];
|
|
81
63
|
ref.current.style.marginBottom = '0px';
|
|
82
|
-
ref.current.style.
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
});
|
|
64
|
+
// ref.current.style.marginTop = '15px';
|
|
65
|
+
})
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (!ref || !ref.current) return;
|
|
90
|
-
|
|
91
|
-
const isFirst = i === 0;
|
|
92
|
-
const isLast = i === keys.length - 1;
|
|
93
|
-
|
|
94
|
-
// For first section on first page
|
|
95
|
-
if (isFirst) {
|
|
96
|
-
ref.current.style.paddingTop = `${HEADER_HEIGHT + TOP_PADDING}px`;
|
|
97
|
-
accumulatedHeightOnPage = height;
|
|
98
|
-
} else {
|
|
99
|
-
// Calculate what the new accumulated height would be with this section
|
|
100
|
-
const potentialAccumulated = accumulatedHeightOnPage + SECTION_SPACING + height;
|
|
101
|
-
|
|
102
|
-
// Check if we need a page break
|
|
103
|
-
const needsPageBreak = potentialAccumulated > SPLIT_THRESHOLD ||
|
|
104
|
-
(accumulatedHeightOnPage + SECTION_SPACING + height) > USABLE_HEIGHT;
|
|
105
|
-
|
|
106
|
-
if (needsPageBreak) {
|
|
107
|
-
// Calculate remaining space and add it as margin to previous section
|
|
108
|
-
const remainingSpace = USABLE_HEIGHT - accumulatedHeightOnPage;
|
|
109
|
-
const previousKey = keys[i - 1];
|
|
110
|
-
|
|
111
|
-
if (sectionsConfig[previousKey]) {
|
|
112
|
-
const { ref: prevRef } = sectionsConfig[previousKey];
|
|
113
|
-
if (prevRef && prevRef.current) {
|
|
114
|
-
// Add margin bottom to fill the rest of the page + space for header
|
|
115
|
-
prevRef.current.style.marginBottom = `${remainingSpace + HEADER_HEIGHT + BOTTOM_PADDING}px`;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
67
|
+
keys.forEach((k, i) => {
|
|
68
|
+
const { height, ref } = sectionsConfig[k];
|
|
118
69
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
// Add top padding for new page (header + top padding)
|
|
124
|
-
ref.current.style.paddingTop = `${HEADER_HEIGHT + TOP_PADDING}px`;
|
|
125
|
-
|
|
126
|
-
// Reset accumulated height for new page
|
|
127
|
-
accumulatedHeightOnPage = height;
|
|
128
|
-
} else {
|
|
129
|
-
// Section fits on current page
|
|
130
|
-
ref.current.style.marginTop = `${SECTION_SPACING}px`;
|
|
131
|
-
accumulatedHeightOnPage = potentialAccumulated;
|
|
70
|
+
if (i === 0) {
|
|
71
|
+
ref.current.style.marginTop = `${HEADER_HEIGHT}px`;
|
|
72
|
+
incrHeight += HEADER_HEIGHT;
|
|
132
73
|
}
|
|
133
|
-
}
|
|
134
74
|
|
|
135
|
-
|
|
136
|
-
if (isLast) {
|
|
137
|
-
ref.current.style.paddingBottom = `${BOTTOM_PADDING}px`;
|
|
138
|
-
}
|
|
139
|
-
});
|
|
75
|
+
const newHeight = incrHeight + height;
|
|
140
76
|
|
|
141
|
-
|
|
142
|
-
|
|
77
|
+
if (i === keys.length - 1) {
|
|
78
|
+
ref.current.style.paddingBottom = '30px';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (newHeight > PAGE_HEIGHT - 30 - FOOTER_HEIGHT - HEADER_HEIGHT) {
|
|
82
|
+
const dif = Math.abs(PAGE_HEIGHT - incrHeight);
|
|
83
|
+
ref.current.style.marginTop = '30px';
|
|
84
|
+
_page += 1;
|
|
85
|
+
_pages.push(_page);
|
|
86
|
+
|
|
87
|
+
if (sectionsConfig[keys[i - 1]]) {
|
|
88
|
+
const { ref: topRef } = sectionsConfig[keys[i - 1]];
|
|
89
|
+
topRef.current.style.marginBottom = `${dif + HEADER_HEIGHT - 24}px`;
|
|
90
|
+
incrHeight = height + 24 + HEADER_HEIGHT;
|
|
91
|
+
// console.log('margin', dif);
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
incrHeight = newHeight + 24;
|
|
95
|
+
}
|
|
96
|
+
// console.groupEnd();
|
|
97
|
+
})
|
|
98
|
+
setPages(_pages);
|
|
99
|
+
}
|
|
100
|
+
}, [sectionsConfig]);
|
|
143
101
|
|
|
144
102
|
useEffect(() => {
|
|
145
103
|
doSizing();
|
|
@@ -159,7 +117,7 @@ export default function PdfView({
|
|
|
159
117
|
{config.map((widgets, i) => (
|
|
160
118
|
<Row
|
|
161
119
|
widgets={widgets}
|
|
162
|
-
key={`dashboard-sections
|
|
120
|
+
key={`dashboard-sections=${i + 1}`}
|
|
163
121
|
i={i}
|
|
164
122
|
onChangeHeight={onChangeHeight}
|
|
165
123
|
/>
|
|
@@ -170,20 +128,23 @@ export default function PdfView({
|
|
|
170
128
|
);
|
|
171
129
|
}, [config, onChangeHeight]);
|
|
172
130
|
|
|
131
|
+
// <div className="daf-analysis">
|
|
132
|
+
// <Header title={t('Dashboard Title')} />
|
|
133
|
+
|
|
134
|
+
// <div className="content">
|
|
135
|
+
// <div className="view-content">
|
|
136
|
+
// <div className="daf-analysis-layout">
|
|
137
|
+
// <div className='sections-cont w-pt'>
|
|
138
|
+
// <section>
|
|
139
|
+
|
|
173
140
|
return (
|
|
174
141
|
<div className={contClassName} style={{ position: 'relative' }}>
|
|
175
142
|
{renderDashboard()}
|
|
176
143
|
{pages.map((page) => (
|
|
177
|
-
|
|
144
|
+
<>
|
|
178
145
|
<div
|
|
179
|
-
style={{
|
|
180
|
-
|
|
181
|
-
width: '100%',
|
|
182
|
-
height: HEADER_HEIGHT,
|
|
183
|
-
position: 'absolute',
|
|
184
|
-
left: 0,
|
|
185
|
-
zIndex: 1000000
|
|
186
|
-
}}
|
|
146
|
+
style={{ top: ((page - 1) * PAGE_HEIGHT), width: '100%', height: HEADER_HEIGHT - 24, position: 'absolute', left: 0, zIndex: 1000000 }}
|
|
147
|
+
key={`headers-${page}`}
|
|
187
148
|
className="flex-row dashboard-header"
|
|
188
149
|
>
|
|
189
150
|
<div className="flex flex-column justify-center flex-1">
|
|
@@ -194,14 +155,8 @@ export default function PdfView({
|
|
|
194
155
|
</div>
|
|
195
156
|
</div>
|
|
196
157
|
<div
|
|
197
|
-
style={{
|
|
198
|
-
|
|
199
|
-
width: '100%',
|
|
200
|
-
height: FOOTER_HEIGHT,
|
|
201
|
-
position: 'absolute',
|
|
202
|
-
left: 0,
|
|
203
|
-
zIndex: 1000000
|
|
204
|
-
}}
|
|
158
|
+
style={{ top: (page * PAGE_HEIGHT) - FOOTER_HEIGHT, width: '100%', height: FOOTER_HEIGHT, position: 'absolute', left: 0, zIndex: 1000000 }}
|
|
159
|
+
key={`footers-${page}`}
|
|
205
160
|
className="dashboard-footer flex-row"
|
|
206
161
|
>
|
|
207
162
|
<div className="flex flex-column justify-center">
|
|
@@ -235,7 +190,7 @@ export default function PdfView({
|
|
|
235
190
|
<h5>{page}</h5>
|
|
236
191
|
</div>
|
|
237
192
|
</div>
|
|
238
|
-
|
|
193
|
+
</>
|
|
239
194
|
))}
|
|
240
195
|
</div>
|
|
241
196
|
);
|
|
@@ -249,5 +204,4 @@ PdfView.propTypes = {
|
|
|
249
204
|
userId: PropTypes.string,
|
|
250
205
|
accountId: PropTypes.string,
|
|
251
206
|
documentId: PropTypes.string,
|
|
252
|
-
|
|
253
|
-
}
|
|
207
|
+
}
|
|
@@ -8,31 +8,31 @@ import { formatClassname } from '../../../../../../helpers/ClassesHelper.js'
|
|
|
8
8
|
const { useToken } = theme;
|
|
9
9
|
|
|
10
10
|
const WidgetCard = ({
|
|
11
|
-
title,
|
|
11
|
+
title,
|
|
12
12
|
backgroundColor,
|
|
13
13
|
backgroundBorderColor,
|
|
14
|
-
data = [],
|
|
15
|
-
link,
|
|
16
|
-
logoIcon,
|
|
17
|
-
description,
|
|
18
|
-
loading=false,
|
|
19
|
-
iconColor,
|
|
14
|
+
data = [],
|
|
15
|
+
link,
|
|
16
|
+
logoIcon,
|
|
17
|
+
description,
|
|
18
|
+
loading = false,
|
|
19
|
+
iconColor,
|
|
20
20
|
buttonIcon,
|
|
21
21
|
imageUrl,
|
|
22
22
|
buttonConfig = {},
|
|
23
23
|
width,
|
|
24
|
-
t = () => {},
|
|
24
|
+
t = () => { },
|
|
25
25
|
}) => {
|
|
26
26
|
const { token } = useToken();
|
|
27
27
|
return (
|
|
28
28
|
<Style backgroundColor={backgroundColor} backgroundBorderColor={backgroundBorderColor} width={width}>
|
|
29
29
|
<Widget
|
|
30
30
|
title={
|
|
31
|
-
<div style={{display: "flex", alignItems: "center"}}>
|
|
32
|
-
{imageUrl ? <img src={imageUrl} className="widget-card-logo-icon mr-2" />
|
|
31
|
+
<div style={{ display: "flex", alignItems: "center" }}>
|
|
32
|
+
{imageUrl ? <img src={imageUrl} className="widget-card-logo-icon mr-2" />
|
|
33
33
|
: <div className="widget-card-logo-icon mr-2">
|
|
34
34
|
<CustomIcon name={logoIcon} width={25} height={25} />
|
|
35
|
-
</div>
|
|
35
|
+
</div>
|
|
36
36
|
}
|
|
37
37
|
<Tooltip title={title}>{title}</Tooltip>
|
|
38
38
|
</div>
|
|
@@ -41,12 +41,41 @@ const WidgetCard = ({
|
|
|
41
41
|
<>
|
|
42
42
|
<div className="flex-1" />
|
|
43
43
|
<Tooltip title={buttonConfig?.disabled ? (buttonConfig?.tooltipText || t("Currently unavailable")) : ""}>
|
|
44
|
-
<a
|
|
45
|
-
className={formatClassname(["widget-card-logo-icon", buttonConfig?.disabled && "disabled-anchor"])}
|
|
44
|
+
<a
|
|
45
|
+
className={formatClassname(["widget-card-logo-icon", buttonConfig?.disabled && "disabled-anchor"])}
|
|
46
46
|
href={buttonConfig?.disabled ? undefined : link}
|
|
47
|
-
onClick={
|
|
47
|
+
onClick={(e) => {
|
|
48
|
+
if (buttonConfig?.disabled) {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
} else if (buttonConfig?.onClick) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
buttonConfig.onClick();
|
|
53
|
+
} else if (buttonConfig?.action) {
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
// Handle different action types
|
|
56
|
+
switch (buttonConfig.action.type) {
|
|
57
|
+
case 'modal':
|
|
58
|
+
if (buttonConfig.action.onOpen) {
|
|
59
|
+
buttonConfig.action.onOpen();
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case 'navigate':
|
|
63
|
+
if (buttonConfig.action.url) {
|
|
64
|
+
window.location.href = buttonConfig.action.url;
|
|
65
|
+
}
|
|
66
|
+
break;
|
|
67
|
+
case 'custom':
|
|
68
|
+
if (buttonConfig.action.handler) {
|
|
69
|
+
buttonConfig.action.handler();
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
default:
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}}
|
|
48
77
|
>
|
|
49
|
-
<CustomIcon
|
|
78
|
+
<CustomIcon name={buttonIcon} size={16} color={buttonConfig?.disabled ? "#6C737F" : (iconColor || theme.colorPrimary)} />
|
|
50
79
|
</a>
|
|
51
80
|
</Tooltip>
|
|
52
81
|
</>
|
|
@@ -54,21 +83,21 @@ const WidgetCard = ({
|
|
|
54
83
|
loading={loading}
|
|
55
84
|
className="with-tabs no-pt-body"
|
|
56
85
|
>
|
|
57
|
-
<div style={{display: "flex", flexDirection: "column", height: "100%", marginTop: "0px"}}>
|
|
86
|
+
<div style={{ display: "flex", flexDirection: "column", height: "100%", marginTop: "0px" }}>
|
|
58
87
|
<div style={{
|
|
59
88
|
display: "flex",
|
|
60
89
|
flexDirection: "column",
|
|
61
90
|
justifyContent: "flex-start",
|
|
62
91
|
marginTop: "10px",
|
|
63
92
|
marginBottom: "24px",
|
|
64
|
-
minHeight: "0"
|
|
93
|
+
minHeight: "0"
|
|
65
94
|
}}>
|
|
66
95
|
{description ? (
|
|
67
96
|
<p style={{
|
|
68
|
-
margin: 0,
|
|
97
|
+
margin: 0,
|
|
69
98
|
height: "45px",
|
|
70
99
|
display: "-webkit-box",
|
|
71
|
-
WebkitLineClamp: 3,
|
|
100
|
+
WebkitLineClamp: 3,
|
|
72
101
|
WebkitBoxOrient: "vertical",
|
|
73
102
|
overflow: "hidden",
|
|
74
103
|
textOverflow: "ellipsis",
|
|
@@ -79,16 +108,16 @@ const WidgetCard = ({
|
|
|
79
108
|
{description.length > 100 ? <Tooltip title={description}>{description.substring(0, 100)}...</Tooltip> : description}
|
|
80
109
|
</p>
|
|
81
110
|
) : (
|
|
82
|
-
<div style={{height: "45px"}} />
|
|
111
|
+
<div style={{ height: "45px" }} />
|
|
83
112
|
)}
|
|
84
113
|
</div>
|
|
85
|
-
|
|
114
|
+
|
|
86
115
|
{data && data.length > 0 && (
|
|
87
|
-
<div style={{display: "flex", flexDirection: "column", gap: "8px"}}>
|
|
116
|
+
<div style={{ display: "flex", flexDirection: "column", gap: "8px" }}>
|
|
88
117
|
{data.map((item) => (
|
|
89
|
-
<div key={item} style={{display: "flex", justifyContent: "space-between"}}>
|
|
90
|
-
{item.isTag ? <Tag style={{width: '90px', textAlign: 'center', borderRadius: '10px'}} color={item.tagColor || 'default'}>{item.label}</Tag> : <span>{item.label}</span>}
|
|
91
|
-
<span style={{fontSize: '12px', color: '#6C737F'}}>{item.value}</span>
|
|
118
|
+
<div key={item} style={{ display: "flex", justifyContent: "space-between" }}>
|
|
119
|
+
{item.isTag ? <Tag style={{ width: '90px', textAlign: 'center', borderRadius: '10px' }} color={item.tagColor || 'default'}>{item.label}</Tag> : <span>{item.label}</span>}
|
|
120
|
+
<span style={{ fontSize: '12px', color: '#6C737F' }}>{item.value}</span>
|
|
92
121
|
</div>
|
|
93
122
|
))}
|
|
94
123
|
</div>
|