@ammarkhalidfarooq/dashboard-package 0.6.126 → 0.6.128
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/README.md +305 -305
- package/dist/ActiveCampaignsCard.cjs.js +419 -243
- package/dist/ActiveCampaignsCard.cjs.js.map +1 -1
- package/dist/ActiveCampaignsCard.es.js +421 -245
- package/dist/ActiveCampaignsCard.es.js.map +1 -1
- package/dist/MetricCard.cjs.js.map +1 -1
- package/dist/MetricCard.es.js.map +1 -1
- package/dist/RenderChartCard.cjs.js.map +1 -1
- package/dist/RenderChartCard.es.js.map +1 -1
- package/dist/index.cjs.js +749 -808
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +750 -809
- package/dist/index.es.js.map +1 -1
- package/package.json +80 -80
|
@@ -3,311 +3,487 @@
|
|
|
3
3
|
var material = require('@mui/material');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
|
|
6
|
-
function _defineProperty(e, r, t) {
|
|
7
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
8
|
-
value: t,
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true
|
|
12
|
-
}) : e[r] = t, e;
|
|
13
|
-
}
|
|
14
|
-
function ownKeys(e, r) {
|
|
15
|
-
var t = Object.keys(e);
|
|
16
|
-
if (Object.getOwnPropertySymbols) {
|
|
17
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
18
|
-
r && (o = o.filter(function (r) {
|
|
19
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
20
|
-
})), t.push.apply(t, o);
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
}
|
|
24
|
-
function _objectSpread2(e) {
|
|
25
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
26
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
27
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
28
|
-
_defineProperty(e, r, t[r]);
|
|
29
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
30
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return e;
|
|
34
|
-
}
|
|
35
|
-
function _toPrimitive(t, r) {
|
|
36
|
-
if ("object" != typeof t || !t) return t;
|
|
37
|
-
var e = t[Symbol.toPrimitive];
|
|
38
|
-
if (void 0 !== e) {
|
|
39
|
-
var i = e.call(t, r);
|
|
40
|
-
if ("object" != typeof i) return i;
|
|
41
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
42
|
-
}
|
|
43
|
-
return ("string" === r ? String : Number)(t);
|
|
44
|
-
}
|
|
45
|
-
function _toPropertyKey(t) {
|
|
46
|
-
var i = _toPrimitive(t, "string");
|
|
47
|
-
return "symbol" == typeof i ? i : i + "";
|
|
48
|
-
}
|
|
49
|
-
|
|
50
6
|
var ActiveCampaignsCard = function ActiveCampaignsCard(_ref) {
|
|
51
7
|
var _ref$title = _ref.title,
|
|
52
8
|
title = _ref$title === void 0 ? "Active campaigns" : _ref$title,
|
|
53
9
|
_ref$subtitle = _ref.subtitle,
|
|
54
10
|
subtitle = _ref$subtitle === void 0 ? "Live fundraisers ranked by velocity" : _ref$subtitle,
|
|
55
|
-
actionLabel = _ref.actionLabel,
|
|
56
11
|
_ref$columns = _ref.columns,
|
|
57
|
-
columns = _ref$columns === void 0 ? ["Campaign", "Raised", "Progress", "Donors", "Avg
|
|
12
|
+
columns = _ref$columns === void 0 ? ["Campaign", "Raised", "Progress", "Donors", "Avg gift"] : _ref$columns,
|
|
58
13
|
_ref$rows = _ref.rows,
|
|
59
14
|
rows = _ref$rows === void 0 ? [] : _ref$rows,
|
|
60
15
|
_ref$gridTemplateColu = _ref.gridTemplateColumns,
|
|
61
|
-
gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
boxShadow: compact ? "0 2px 12px rgba(0,0,0,0.05)" : "0 4px 24px rgba(0,0,0,0.06)",
|
|
77
|
-
p: compact ? 1.5 : 3,
|
|
78
|
-
height: height
|
|
79
|
-
}, sx),
|
|
80
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
81
|
-
sx: _objectSpread2({
|
|
82
|
-
display: "flex",
|
|
83
|
-
justifyContent: "space-between",
|
|
84
|
-
alignItems: "flex-start",
|
|
85
|
-
mb: compact ? 1.25 : 3
|
|
86
|
-
}, headerSx),
|
|
16
|
+
gridTemplateColumns = _ref$gridTemplateColu === void 0 ? "3fr 1fr 1.5fr 0.8fr 1fr" : _ref$gridTemplateColu;
|
|
17
|
+
var theme = material.useTheme();
|
|
18
|
+
var isMobile = material.useMediaQuery(theme.breakpoints.down("sm"));
|
|
19
|
+
var isTablet = material.useMediaQuery(theme.breakpoints.between("sm", "md"));
|
|
20
|
+
|
|
21
|
+
/* ─── Desktop / Tablet: Grid Table ─── */
|
|
22
|
+
if (!isMobile) {
|
|
23
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
24
|
+
sx: {
|
|
25
|
+
bgcolor: "#fff",
|
|
26
|
+
borderRadius: 4,
|
|
27
|
+
border: "1px solid #f0f0f0",
|
|
28
|
+
boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
29
|
+
p: 3
|
|
30
|
+
},
|
|
87
31
|
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
32
|
+
sx: {
|
|
33
|
+
mb: 3
|
|
34
|
+
},
|
|
88
35
|
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
89
36
|
sx: {
|
|
90
37
|
fontWeight: 700,
|
|
91
|
-
fontSize:
|
|
92
|
-
color: "#000"
|
|
93
|
-
textAlign: "left",
|
|
94
|
-
lineHeight: 1.15
|
|
38
|
+
fontSize: "18px",
|
|
39
|
+
color: "#000"
|
|
95
40
|
},
|
|
96
41
|
children: title
|
|
97
42
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
98
43
|
sx: {
|
|
99
|
-
fontSize:
|
|
100
|
-
color: "rgba(0,
|
|
101
|
-
|
|
102
|
-
lineHeight: 1.15
|
|
44
|
+
fontSize: "13px",
|
|
45
|
+
color: "rgba(0,0,0,0.4)",
|
|
46
|
+
mt: 0.2
|
|
103
47
|
},
|
|
104
48
|
children: subtitle
|
|
105
49
|
})]
|
|
106
|
-
}),
|
|
50
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
107
51
|
sx: {
|
|
108
|
-
|
|
109
|
-
fontWeight: 600,
|
|
110
|
-
color: "rgb(99, 99, 230)",
|
|
111
|
-
cursor: "pointer"
|
|
52
|
+
overflowX: "auto"
|
|
112
53
|
},
|
|
113
|
-
children:
|
|
54
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
55
|
+
sx: {
|
|
56
|
+
minWidth: "600px"
|
|
57
|
+
},
|
|
58
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
59
|
+
sx: {
|
|
60
|
+
display: "grid",
|
|
61
|
+
gridTemplateColumns: gridTemplateColumns,
|
|
62
|
+
gap: 2,
|
|
63
|
+
pb: 2.5,
|
|
64
|
+
borderBottom: "1px solid #f0f0f0"
|
|
65
|
+
},
|
|
66
|
+
children: columns.map(function (header, colIdx) {
|
|
67
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
68
|
+
sx: {
|
|
69
|
+
fontSize: "12px",
|
|
70
|
+
color: "rgba(0,0,0,0.4)",
|
|
71
|
+
fontWeight: 500,
|
|
72
|
+
whiteSpace: "nowrap",
|
|
73
|
+
textAlign: colIdx === 0 ? "left" : "center"
|
|
74
|
+
},
|
|
75
|
+
children: header
|
|
76
|
+
}, header);
|
|
77
|
+
})
|
|
78
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
79
|
+
sx: {
|
|
80
|
+
mt: 1
|
|
81
|
+
},
|
|
82
|
+
children: rows.map(function (row, idx) {
|
|
83
|
+
var isDisabled = row.comingSoon;
|
|
84
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
85
|
+
sx: {
|
|
86
|
+
display: "grid",
|
|
87
|
+
gridTemplateColumns: gridTemplateColumns,
|
|
88
|
+
gap: 2,
|
|
89
|
+
py: 1.2,
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
borderBottom: idx === rows.length - 1 ? "none" : "1px solid #f5f5f5",
|
|
92
|
+
opacity: isDisabled ? 0.55 : 1,
|
|
93
|
+
transition: "opacity 0.2s ease"
|
|
94
|
+
},
|
|
95
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
96
|
+
sx: {
|
|
97
|
+
display: "flex",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
gap: 1.5,
|
|
100
|
+
minWidth: 0
|
|
101
|
+
},
|
|
102
|
+
children: [row.id && /*#__PURE__*/jsxRuntime.jsx(material.Avatar, {
|
|
103
|
+
sx: {
|
|
104
|
+
width: 28,
|
|
105
|
+
height: 28,
|
|
106
|
+
fontSize: "10px",
|
|
107
|
+
fontWeight: 700,
|
|
108
|
+
bgcolor: row.avatarBg || "#F3F4F6",
|
|
109
|
+
color: row.avatarColor || "#fff",
|
|
110
|
+
flexShrink: 0
|
|
111
|
+
},
|
|
112
|
+
children: row.id
|
|
113
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
114
|
+
sx: {
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
gap: 0.8,
|
|
118
|
+
flexWrap: "nowrap",
|
|
119
|
+
minWidth: 0
|
|
120
|
+
},
|
|
121
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
122
|
+
sx: {
|
|
123
|
+
fontSize: "12px",
|
|
124
|
+
fontWeight: 700,
|
|
125
|
+
color: "#000",
|
|
126
|
+
whiteSpace: "nowrap"
|
|
127
|
+
},
|
|
128
|
+
children: row.name
|
|
129
|
+
}), isDisabled && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
130
|
+
sx: {
|
|
131
|
+
display: "inline-flex",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
px: 0.8,
|
|
134
|
+
py: 0.2,
|
|
135
|
+
borderRadius: "100px",
|
|
136
|
+
bgcolor: "#F3F4F6",
|
|
137
|
+
border: "1px solid #E5E7EB",
|
|
138
|
+
flexShrink: 0,
|
|
139
|
+
whiteSpace: "nowrap"
|
|
140
|
+
},
|
|
141
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
142
|
+
sx: {
|
|
143
|
+
fontSize: "8px",
|
|
144
|
+
fontWeight: 700,
|
|
145
|
+
color: "#6B7280",
|
|
146
|
+
letterSpacing: "0.3px",
|
|
147
|
+
textTransform: "uppercase",
|
|
148
|
+
whiteSpace: "nowrap"
|
|
149
|
+
},
|
|
150
|
+
children: "Coming Soon"
|
|
151
|
+
})
|
|
152
|
+
})]
|
|
153
|
+
})]
|
|
154
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
155
|
+
sx: {
|
|
156
|
+
fontSize: "13px",
|
|
157
|
+
fontWeight: 600,
|
|
158
|
+
color: isDisabled ? "#9CA3AF" : "#000",
|
|
159
|
+
whiteSpace: "nowrap",
|
|
160
|
+
textAlign: "center"
|
|
161
|
+
},
|
|
162
|
+
children: row.val1
|
|
163
|
+
}), row.type === "progress" ? /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
164
|
+
sx: {
|
|
165
|
+
display: "flex",
|
|
166
|
+
alignItems: "center",
|
|
167
|
+
gap: 1.5,
|
|
168
|
+
justifyContent: "center"
|
|
169
|
+
},
|
|
170
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
171
|
+
sx: {
|
|
172
|
+
flexGrow: 1,
|
|
173
|
+
maxWidth: "80px"
|
|
174
|
+
},
|
|
175
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.LinearProgress, {
|
|
176
|
+
variant: "determinate",
|
|
177
|
+
value: row.progress,
|
|
178
|
+
sx: {
|
|
179
|
+
height: 8,
|
|
180
|
+
borderRadius: 4,
|
|
181
|
+
bgcolor: "#F3F4F6",
|
|
182
|
+
"& .MuiLinearProgress-bar": {
|
|
183
|
+
borderRadius: 4,
|
|
184
|
+
bgcolor: row.progressColor || "rgb(99,99,230)"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
|
|
189
|
+
sx: {
|
|
190
|
+
fontSize: "11px",
|
|
191
|
+
color: "rgba(0,0,0,0.4)",
|
|
192
|
+
minWidth: "30px",
|
|
193
|
+
textAlign: "center"
|
|
194
|
+
},
|
|
195
|
+
children: [row.progress, "%"]
|
|
196
|
+
})]
|
|
197
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
198
|
+
sx: {
|
|
199
|
+
fontSize: "13px",
|
|
200
|
+
fontWeight: 600,
|
|
201
|
+
color: isDisabled ? "#9CA3AF" : "#000",
|
|
202
|
+
whiteSpace: "nowrap",
|
|
203
|
+
textAlign: "center"
|
|
204
|
+
},
|
|
205
|
+
children: row.val2
|
|
206
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
207
|
+
sx: {
|
|
208
|
+
fontSize: "13px",
|
|
209
|
+
fontWeight: row.highlightVal3 ? 700 : 500,
|
|
210
|
+
color: isDisabled ? "#9CA3AF" : row.highlightVal3 ? row.val3Color || "#22C55E" : "#000",
|
|
211
|
+
whiteSpace: "nowrap",
|
|
212
|
+
textAlign: "center"
|
|
213
|
+
},
|
|
214
|
+
children: row.val3
|
|
215
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
216
|
+
sx: {
|
|
217
|
+
fontSize: "13px",
|
|
218
|
+
fontWeight: 500,
|
|
219
|
+
color: isDisabled ? "#9CA3AF" : "#000",
|
|
220
|
+
whiteSpace: "nowrap",
|
|
221
|
+
textAlign: "center"
|
|
222
|
+
},
|
|
223
|
+
children: row.val4
|
|
224
|
+
}), columns.length > 5 && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
225
|
+
sx: {
|
|
226
|
+
display: "flex",
|
|
227
|
+
justifyContent: "center"
|
|
228
|
+
},
|
|
229
|
+
children: row.type === "trend" ? /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
230
|
+
sx: {
|
|
231
|
+
display: "flex",
|
|
232
|
+
alignItems: "center",
|
|
233
|
+
gap: 0.5
|
|
234
|
+
},
|
|
235
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
236
|
+
sx: {
|
|
237
|
+
fontSize: "14px",
|
|
238
|
+
color: row.trendType === "up" ? "#22C55E" : "#EF4444"
|
|
239
|
+
},
|
|
240
|
+
children: row.trendType === "up" ? "▲" : "▼"
|
|
241
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
242
|
+
sx: {
|
|
243
|
+
fontSize: "12px",
|
|
244
|
+
color: row.trendType === "up" ? "#22C55E" : "#EF4444",
|
|
245
|
+
fontWeight: 700,
|
|
246
|
+
whiteSpace: "nowrap"
|
|
247
|
+
},
|
|
248
|
+
children: isTablet ? row.trendType === "up" ? "Up" : "Down" : row.trendLabel
|
|
249
|
+
})]
|
|
250
|
+
}) : row.type === "comingSoon" ? /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
251
|
+
sx: {
|
|
252
|
+
fontSize: "12px",
|
|
253
|
+
color: "#9CA3AF",
|
|
254
|
+
fontWeight: 500,
|
|
255
|
+
textAlign: "center"
|
|
256
|
+
},
|
|
257
|
+
children: "\u2014"
|
|
258
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
259
|
+
sx: {
|
|
260
|
+
display: "inline-block",
|
|
261
|
+
px: 1.5,
|
|
262
|
+
py: 0.5,
|
|
263
|
+
borderRadius: "100px",
|
|
264
|
+
bgcolor: row.statusBg,
|
|
265
|
+
color: row.statusColor,
|
|
266
|
+
fontSize: "11px",
|
|
267
|
+
fontWeight: 700
|
|
268
|
+
},
|
|
269
|
+
children: row.status
|
|
270
|
+
})
|
|
271
|
+
})]
|
|
272
|
+
}, idx);
|
|
273
|
+
})
|
|
274
|
+
})]
|
|
275
|
+
})
|
|
114
276
|
})]
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* ─── Mobile: Stacked Card Layout ─── */
|
|
281
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
282
|
+
sx: {
|
|
283
|
+
bgcolor: "#fff",
|
|
284
|
+
borderRadius: 4,
|
|
285
|
+
border: "1px solid #f0f0f0",
|
|
286
|
+
boxShadow: "0 4px 24px rgba(0,0,0,0.06)",
|
|
287
|
+
p: 2
|
|
288
|
+
},
|
|
289
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
290
|
+
sx: {
|
|
291
|
+
mb: 2
|
|
292
|
+
},
|
|
293
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
294
|
+
sx: {
|
|
295
|
+
fontWeight: 700,
|
|
296
|
+
fontSize: "16px",
|
|
297
|
+
color: "#000"
|
|
298
|
+
},
|
|
299
|
+
children: title
|
|
300
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
120
301
|
sx: {
|
|
121
|
-
|
|
302
|
+
fontSize: "11px",
|
|
303
|
+
color: "rgba(0,0,0,0.4)",
|
|
304
|
+
mt: 0.2
|
|
122
305
|
},
|
|
123
|
-
children:
|
|
306
|
+
children: subtitle
|
|
307
|
+
})]
|
|
308
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
309
|
+
sx: {
|
|
310
|
+
display: "flex",
|
|
311
|
+
flexDirection: "column",
|
|
312
|
+
gap: 1.5
|
|
313
|
+
},
|
|
314
|
+
children: rows.map(function (row, idx) {
|
|
315
|
+
var isDisabled = row.comingSoon;
|
|
316
|
+
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
124
317
|
sx: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
318
|
+
p: 2,
|
|
319
|
+
borderRadius: 3,
|
|
320
|
+
border: isDisabled ? "1px dashed #E5E7EB" : "1px solid #F3F4F6",
|
|
321
|
+
bgcolor: isDisabled ? "#FAFAFA" : "#fff",
|
|
322
|
+
opacity: isDisabled ? 0.7 : 1,
|
|
323
|
+
transition: "opacity 0.2s ease"
|
|
130
324
|
},
|
|
131
|
-
children:
|
|
132
|
-
|
|
325
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
326
|
+
sx: {
|
|
327
|
+
display: "flex",
|
|
328
|
+
alignItems: "center",
|
|
329
|
+
gap: 1.5,
|
|
330
|
+
mb: isDisabled ? 0 : 1.5
|
|
331
|
+
},
|
|
332
|
+
children: [row.id && /*#__PURE__*/jsxRuntime.jsx(material.Avatar, {
|
|
133
333
|
sx: {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
334
|
+
width: 32,
|
|
335
|
+
height: 32,
|
|
336
|
+
fontSize: "11px",
|
|
337
|
+
fontWeight: 700,
|
|
338
|
+
bgcolor: row.avatarBg || "#F3F4F6",
|
|
339
|
+
color: row.avatarColor || "#fff",
|
|
340
|
+
flexShrink: 0
|
|
138
341
|
},
|
|
139
|
-
children:
|
|
140
|
-
},
|
|
141
|
-
})
|
|
142
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
143
|
-
sx: {
|
|
144
|
-
mt: 1
|
|
145
|
-
},
|
|
146
|
-
children: rows.map(function (row, idx) {
|
|
147
|
-
var _row$progress;
|
|
148
|
-
return /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
342
|
+
children: row.id
|
|
343
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
149
344
|
sx: {
|
|
150
|
-
display: "
|
|
151
|
-
gridTemplateColumns: gridTemplateColumns,
|
|
152
|
-
gap: compact ? 1 : 2,
|
|
153
|
-
py: compact ? 0.5 : 1.2,
|
|
345
|
+
display: "flex",
|
|
154
346
|
alignItems: "center",
|
|
155
|
-
|
|
347
|
+
gap: 1,
|
|
348
|
+
flex: 1,
|
|
349
|
+
flexWrap: "nowrap"
|
|
156
350
|
},
|
|
157
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
351
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
158
352
|
sx: {
|
|
159
|
-
|
|
353
|
+
fontSize: "14px",
|
|
354
|
+
fontWeight: 700,
|
|
355
|
+
color: "#000"
|
|
356
|
+
},
|
|
357
|
+
children: row.name
|
|
358
|
+
}), isDisabled && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
359
|
+
sx: {
|
|
360
|
+
display: "inline-flex",
|
|
160
361
|
alignItems: "center",
|
|
161
|
-
|
|
362
|
+
px: 1,
|
|
363
|
+
py: 0.3,
|
|
364
|
+
borderRadius: "100px",
|
|
365
|
+
bgcolor: "#F3F4F6",
|
|
366
|
+
border: "1px solid #E5E7EB",
|
|
367
|
+
flexShrink: 0
|
|
162
368
|
},
|
|
163
|
-
children:
|
|
369
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
164
370
|
sx: {
|
|
165
|
-
|
|
166
|
-
height: compact ? 22 : 28,
|
|
167
|
-
fontSize: compact ? "8px" : "10px",
|
|
371
|
+
fontSize: "8px",
|
|
168
372
|
fontWeight: 700,
|
|
169
|
-
|
|
170
|
-
|
|
373
|
+
color: "#6B7280",
|
|
374
|
+
letterSpacing: "0.3px",
|
|
375
|
+
textTransform: "uppercase"
|
|
171
376
|
},
|
|
172
|
-
children:
|
|
173
|
-
})
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
color: "#000"
|
|
189
|
-
},
|
|
190
|
-
children: row.name
|
|
191
|
-
})]
|
|
377
|
+
children: "Coming Soon"
|
|
378
|
+
})
|
|
379
|
+
})]
|
|
380
|
+
}), row.type === "trend" && /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
381
|
+
sx: {
|
|
382
|
+
display: "flex",
|
|
383
|
+
alignItems: "center",
|
|
384
|
+
gap: 0.3,
|
|
385
|
+
flexShrink: 0
|
|
386
|
+
},
|
|
387
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
388
|
+
sx: {
|
|
389
|
+
fontSize: "12px",
|
|
390
|
+
color: row.trendType === "up" ? "#22C55E" : "#EF4444"
|
|
391
|
+
},
|
|
392
|
+
children: row.trendType === "up" ? "▲" : "▼"
|
|
192
393
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
193
394
|
sx: {
|
|
194
|
-
fontSize:
|
|
395
|
+
fontSize: "11px",
|
|
396
|
+
color: row.trendType === "up" ? "#22C55E" : "#EF4444",
|
|
397
|
+
fontWeight: 700
|
|
398
|
+
},
|
|
399
|
+
children: row.trendType === "up" ? "Up" : "Down"
|
|
400
|
+
})]
|
|
401
|
+
})]
|
|
402
|
+
}), !isDisabled && /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
403
|
+
sx: {
|
|
404
|
+
display: "grid",
|
|
405
|
+
gridTemplateColumns: "1fr 1fr 1fr 1fr",
|
|
406
|
+
gap: 1
|
|
407
|
+
},
|
|
408
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
409
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
410
|
+
sx: {
|
|
411
|
+
fontSize: "9px",
|
|
412
|
+
color: "#9CA3AF",
|
|
195
413
|
fontWeight: 600,
|
|
414
|
+
textTransform: "uppercase",
|
|
415
|
+
letterSpacing: "0.3px"
|
|
416
|
+
},
|
|
417
|
+
children: "Spend"
|
|
418
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
419
|
+
sx: {
|
|
420
|
+
fontSize: "13px",
|
|
421
|
+
fontWeight: 700,
|
|
196
422
|
color: "#000",
|
|
197
|
-
|
|
423
|
+
mt: 0.3
|
|
198
424
|
},
|
|
199
425
|
children: row.val1
|
|
200
|
-
})
|
|
426
|
+
})]
|
|
427
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
428
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
201
429
|
sx: {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
430
|
+
fontSize: "9px",
|
|
431
|
+
color: "#9CA3AF",
|
|
432
|
+
fontWeight: 600,
|
|
433
|
+
textTransform: "uppercase",
|
|
434
|
+
letterSpacing: "0.3px"
|
|
205
435
|
},
|
|
206
|
-
children:
|
|
207
|
-
|
|
208
|
-
flexGrow: 1
|
|
209
|
-
},
|
|
210
|
-
children: /*#__PURE__*/jsxRuntime.jsx(material.LinearProgress, {
|
|
211
|
-
variant: "determinate",
|
|
212
|
-
value: Math.min(100, Math.max(0, (_row$progress = row.progress) !== null && _row$progress !== void 0 ? _row$progress : 0)),
|
|
213
|
-
sx: {
|
|
214
|
-
height: compact ? 6 : 8,
|
|
215
|
-
borderRadius: 4,
|
|
216
|
-
bgcolor: "#F3F4F6",
|
|
217
|
-
"& .MuiLinearProgress-bar": {
|
|
218
|
-
borderRadius: 4,
|
|
219
|
-
bgcolor: row.progressColor || "rgb(99, 99, 230)"
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
})
|
|
223
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(material.Typography, {
|
|
224
|
-
sx: {
|
|
225
|
-
fontSize: compact ? "9px" : "11px",
|
|
226
|
-
color: "rgba(0, 0, 0, 0.4)",
|
|
227
|
-
minWidth: "30px"
|
|
228
|
-
},
|
|
229
|
-
children: [row.progress, "%"]
|
|
230
|
-
})]
|
|
231
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
436
|
+
children: "Revenue"
|
|
437
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
232
438
|
sx: {
|
|
233
439
|
fontSize: "13px",
|
|
234
|
-
fontWeight:
|
|
440
|
+
fontWeight: 700,
|
|
235
441
|
color: "#000",
|
|
236
|
-
|
|
442
|
+
mt: 0.3
|
|
237
443
|
},
|
|
238
444
|
children: row.val2
|
|
445
|
+
})]
|
|
446
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
447
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
448
|
+
sx: {
|
|
449
|
+
fontSize: "9px",
|
|
450
|
+
color: "#9CA3AF",
|
|
451
|
+
fontWeight: 600,
|
|
452
|
+
textTransform: "uppercase",
|
|
453
|
+
letterSpacing: "0.3px"
|
|
454
|
+
},
|
|
455
|
+
children: "ROAS"
|
|
239
456
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
240
457
|
sx: {
|
|
241
|
-
fontSize:
|
|
242
|
-
fontWeight:
|
|
243
|
-
color: row.
|
|
244
|
-
|
|
458
|
+
fontSize: "13px",
|
|
459
|
+
fontWeight: 700,
|
|
460
|
+
color: row.val3Color || "#22C55E",
|
|
461
|
+
mt: 0.3
|
|
245
462
|
},
|
|
246
463
|
children: row.val3
|
|
464
|
+
})]
|
|
465
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
466
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
467
|
+
sx: {
|
|
468
|
+
fontSize: "9px",
|
|
469
|
+
color: "#9CA3AF",
|
|
470
|
+
fontWeight: 600,
|
|
471
|
+
textTransform: "uppercase",
|
|
472
|
+
letterSpacing: "0.3px"
|
|
473
|
+
},
|
|
474
|
+
children: "CPA"
|
|
247
475
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
248
476
|
sx: {
|
|
249
477
|
fontSize: "13px",
|
|
250
|
-
fontWeight:
|
|
478
|
+
fontWeight: 700,
|
|
251
479
|
color: "#000",
|
|
252
|
-
|
|
480
|
+
mt: 0.3
|
|
253
481
|
},
|
|
254
482
|
children: row.val4
|
|
255
|
-
}), columns.length > 5 && /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
256
|
-
children: row.type === "trend" ? /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
257
|
-
sx: {
|
|
258
|
-
display: "flex",
|
|
259
|
-
alignItems: "center",
|
|
260
|
-
gap: 0.5
|
|
261
|
-
},
|
|
262
|
-
children: row.trendType === "up" ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
263
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
264
|
-
sx: {
|
|
265
|
-
fontSize: "14px",
|
|
266
|
-
color: "#22C55E"
|
|
267
|
-
},
|
|
268
|
-
children: "\u25B2"
|
|
269
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
270
|
-
sx: {
|
|
271
|
-
fontSize: "12px",
|
|
272
|
-
color: "#22C55E",
|
|
273
|
-
fontWeight: 700
|
|
274
|
-
},
|
|
275
|
-
children: row.trendLabel
|
|
276
|
-
})]
|
|
277
|
-
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
278
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
279
|
-
sx: {
|
|
280
|
-
fontSize: "14px",
|
|
281
|
-
color: "#EF4444"
|
|
282
|
-
},
|
|
283
|
-
children: "\u25BC"
|
|
284
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
285
|
-
sx: {
|
|
286
|
-
fontSize: "12px",
|
|
287
|
-
color: "#EF4444",
|
|
288
|
-
fontWeight: 700
|
|
289
|
-
},
|
|
290
|
-
children: row.trendLabel
|
|
291
|
-
})]
|
|
292
|
-
})
|
|
293
|
-
}) : /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
294
|
-
sx: {
|
|
295
|
-
display: "inline-block",
|
|
296
|
-
px: compact ? 1 : 1.5,
|
|
297
|
-
py: compact ? 0.25 : 0.5,
|
|
298
|
-
borderRadius: "100px",
|
|
299
|
-
bgcolor: row.statusBg,
|
|
300
|
-
color: row.statusColor,
|
|
301
|
-
fontSize: compact ? "9px" : "11px",
|
|
302
|
-
fontWeight: 700,
|
|
303
|
-
textAlign: "center"
|
|
304
|
-
},
|
|
305
|
-
children: row.status
|
|
306
|
-
})
|
|
307
483
|
})]
|
|
308
|
-
}
|
|
309
|
-
})
|
|
310
|
-
})
|
|
484
|
+
})]
|
|
485
|
+
})]
|
|
486
|
+
}, idx);
|
|
311
487
|
})
|
|
312
488
|
})]
|
|
313
489
|
});
|