datastake-daf 0.6.159 → 0.6.161
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 +8 -4
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Widget/WidgetCard/WidgetCard.stories.js +1 -0
- package/src/@daf/core/components/Dashboard/Widget/WidgetCard/index.js +7 -4
- package/src/@daf/core/components/PdfForm/components/dataLinkGroupHandler.js +1 -1
- package/src/@daf/core/components/PdfForm/index.js +1 -1
package/dist/components/index.js
CHANGED
|
@@ -14044,7 +14044,7 @@ function useAjaxModal$2({
|
|
|
14044
14044
|
}
|
|
14045
14045
|
|
|
14046
14046
|
const mergeObject = obj => {
|
|
14047
|
-
return Object.entries(obj).reduce((acc, [key, value]) => {
|
|
14047
|
+
return Object.entries(obj || {}).reduce((acc, [key, value]) => {
|
|
14048
14048
|
if (typeof value === "object" && !Array.isArray(value) && value !== null) {
|
|
14049
14049
|
return {
|
|
14050
14050
|
...acc,
|
|
@@ -14706,7 +14706,7 @@ const TreeNode = _ref => {
|
|
|
14706
14706
|
}
|
|
14707
14707
|
} else if (config !== null && config !== void 0 && config.inputs) {
|
|
14708
14708
|
if (config.type === 'dataLinkGroup' || config.type === 'dataLink') {
|
|
14709
|
-
const inputKeys = Object.keys(config.inputs).filter(inputKey => {
|
|
14709
|
+
const inputKeys = Object.keys(config === null || config === void 0 ? void 0 : config.inputs).filter(inputKey => {
|
|
14710
14710
|
const inputConfig = config.inputs[inputKey];
|
|
14711
14711
|
// Check showIf condition for input
|
|
14712
14712
|
if (inputConfig !== null && inputConfig !== void 0 && inputConfig.showIf && !evaluateShowIfCondition(inputConfig.showIf, allData)) {
|
|
@@ -20624,7 +20624,8 @@ const WidgetCard = _ref => {
|
|
|
20624
20624
|
description,
|
|
20625
20625
|
loading = false,
|
|
20626
20626
|
iconColor,
|
|
20627
|
-
buttonIcon
|
|
20627
|
+
buttonIcon,
|
|
20628
|
+
imageUrl
|
|
20628
20629
|
} = _ref;
|
|
20629
20630
|
useToken$h();
|
|
20630
20631
|
return /*#__PURE__*/jsxRuntime.jsx(Style$x, {
|
|
@@ -20636,7 +20637,10 @@ const WidgetCard = _ref => {
|
|
|
20636
20637
|
display: "flex",
|
|
20637
20638
|
alignItems: "center"
|
|
20638
20639
|
},
|
|
20639
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("
|
|
20640
|
+
children: [imageUrl ? /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
20641
|
+
src: imageUrl,
|
|
20642
|
+
className: "widget-card-logo-icon mr-2"
|
|
20643
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
20640
20644
|
className: "widget-card-logo-icon mr-2",
|
|
20641
20645
|
children: /*#__PURE__*/jsxRuntime.jsx(CustomIcon, {
|
|
20642
20646
|
name: logoIcon,
|
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@ export const Primary = {
|
|
|
24
24
|
"description": "This is a description of the widget card. It can be long and scrollable.",
|
|
25
25
|
"buttonIcon": 'ArrowUpRight',
|
|
26
26
|
"iconColor": "#ff0000",
|
|
27
|
+
"imageUrl": "https://picsum.photos/200/300",
|
|
27
28
|
"data": [
|
|
28
29
|
{
|
|
29
30
|
"label": "Type",
|
|
@@ -16,7 +16,8 @@ const WidgetCard = ({
|
|
|
16
16
|
description,
|
|
17
17
|
loading=false,
|
|
18
18
|
iconColor,
|
|
19
|
-
buttonIcon
|
|
19
|
+
buttonIcon,
|
|
20
|
+
imageUrl,
|
|
20
21
|
}) => {
|
|
21
22
|
const { token } = useToken();
|
|
22
23
|
return (
|
|
@@ -24,9 +25,11 @@ const WidgetCard = ({
|
|
|
24
25
|
<Widget
|
|
25
26
|
title={
|
|
26
27
|
<div style={{display: "flex", alignItems: "center"}}>
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
28
|
+
{imageUrl ? <img src={imageUrl} className="widget-card-logo-icon mr-2" />
|
|
29
|
+
: <div className="widget-card-logo-icon mr-2">
|
|
30
|
+
<CustomIcon name={logoIcon} width={25} height={25} />
|
|
31
|
+
</div>
|
|
32
|
+
}
|
|
30
33
|
<Tooltip title={title}>{title}</Tooltip>
|
|
31
34
|
</div>
|
|
32
35
|
}
|
|
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import useAjaxModal from '../utils/useAjaxModal';
|
|
3
3
|
|
|
4
4
|
const mergeObject = (obj) => {
|
|
5
|
-
return Object.entries(obj).reduce((acc, [key, value]) => {
|
|
5
|
+
return Object.entries(obj || {}).reduce((acc, [key, value]) => {
|
|
6
6
|
if (typeof value === "object" && !Array.isArray(value) && value !== null) {
|
|
7
7
|
return { ...acc, ...value };
|
|
8
8
|
}
|
|
@@ -89,7 +89,7 @@ const TreeNode = ({ nodeKey, config, value, level = 0, isLast = false, t, rootFo
|
|
|
89
89
|
}
|
|
90
90
|
} else if (config?.inputs) {
|
|
91
91
|
if (config.type === 'dataLinkGroup' || config.type === 'dataLink') {
|
|
92
|
-
const inputKeys = Object.keys(config
|
|
92
|
+
const inputKeys = Object.keys(config?.inputs)
|
|
93
93
|
.filter(inputKey => {
|
|
94
94
|
const inputConfig = config.inputs[inputKey];
|
|
95
95
|
// Check showIf condition for input
|