datastake-daf 0.6.769 → 0.6.770
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 +25 -29
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -9600,27 +9600,25 @@ const renderFieldData = (type, value, user, config, getApiBaseUrl = () => {}, ge
|
|
|
9600
9600
|
}
|
|
9601
9601
|
};
|
|
9602
9602
|
|
|
9603
|
-
const renderValue =
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
if (!(config !== null && config !== void 0 && config.inputs)) return null;
|
|
9603
|
+
const renderValue = ({
|
|
9604
|
+
value,
|
|
9605
|
+
hasChildren,
|
|
9606
|
+
config,
|
|
9607
|
+
user,
|
|
9608
|
+
getApiBaseUrl = () => {},
|
|
9609
|
+
getAppHeader = () => {},
|
|
9610
|
+
app,
|
|
9611
|
+
allData = {}
|
|
9612
|
+
}) => {
|
|
9613
|
+
if (config?.type === 'groupInputs') {
|
|
9614
|
+
if (!config?.inputs) return null;
|
|
9616
9615
|
const inputKeys = Object.keys(config.inputs).sort((a, b) => {
|
|
9617
|
-
|
|
9618
|
-
const
|
|
9619
|
-
const positionB = ((_config$inputs$b = config.inputs[b]) === null || _config$inputs$b === void 0 ? void 0 : _config$inputs$b.position) || 0;
|
|
9616
|
+
const positionA = config.inputs[a]?.position || 0;
|
|
9617
|
+
const positionB = config.inputs[b]?.position || 0;
|
|
9620
9618
|
return positionA - positionB;
|
|
9621
9619
|
});
|
|
9622
9620
|
const values = inputKeys.map(inputKey => {
|
|
9623
|
-
let inputValue = value
|
|
9621
|
+
let inputValue = value?.[inputKey];
|
|
9624
9622
|
if (inputValue === null || inputValue === undefined || inputValue === '') {
|
|
9625
9623
|
return '';
|
|
9626
9624
|
} else if (typeof inputValue === 'object' && inputValue !== null) {
|
|
@@ -9661,8 +9659,8 @@ const renderValue = _ref => {
|
|
|
9661
9659
|
} else {
|
|
9662
9660
|
displayValue = String(value);
|
|
9663
9661
|
}
|
|
9664
|
-
const fieldType =
|
|
9665
|
-
let cssClass =
|
|
9662
|
+
const fieldType = config?.type || 'text';
|
|
9663
|
+
let cssClass = `tree-value ${fieldType}-type`;
|
|
9666
9664
|
if (displayValue === '-') {
|
|
9667
9665
|
cssClass += ' empty';
|
|
9668
9666
|
}
|
|
@@ -9672,21 +9670,19 @@ const renderValue = _ref => {
|
|
|
9672
9670
|
children: displayValue
|
|
9673
9671
|
});
|
|
9674
9672
|
};
|
|
9675
|
-
const determineHasChildren =
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
} = _ref2;
|
|
9681
|
-
if ((config === null || config === void 0 ? void 0 : config.type) === 'groupInputs') {
|
|
9673
|
+
const determineHasChildren = ({
|
|
9674
|
+
config,
|
|
9675
|
+
level
|
|
9676
|
+
}) => {
|
|
9677
|
+
if (config?.type === 'groupInputs') {
|
|
9682
9678
|
return false;
|
|
9683
9679
|
}
|
|
9684
|
-
if (
|
|
9680
|
+
if (config?.type === 'header' && config?.inputs && Object.keys(config.inputs).length > 0) {
|
|
9685
9681
|
return true;
|
|
9686
9682
|
}
|
|
9687
|
-
return
|
|
9683
|
+
return config?.inputs || config?.type === 'group' || config?.type === 'dataLinkGroup' || config?.type === 'section' || config?.type === 'ajaxSubGroup' ||
|
|
9688
9684
|
// Add this line
|
|
9689
|
-
|
|
9685
|
+
config?.type === 'dataLink' && config?.meta?.tableKeys || level === 0 && config && typeof config === 'object' && Object.keys(config).some(key => key !== 'id' && key !== 'label' && key !== 'position' && key !== 'subTitle' && typeof config[key] === 'object' && config[key] !== null);
|
|
9690
9686
|
};
|
|
9691
9687
|
|
|
9692
9688
|
const sortByPosition = (items, getConfig) => {
|