@things-factory/meta-ui 7.0.42 → 7.0.44
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.
|
@@ -371,9 +371,12 @@ export class MetaUiUtil {
|
|
|
371
371
|
let settings = pageView.gridEmphasized.row
|
|
372
372
|
|
|
373
373
|
for (let idx = 0; idx < settings.length; idx++) {
|
|
374
|
-
const logic = settings[idx].logic
|
|
375
|
-
const c = new Compartment()
|
|
376
|
-
|
|
374
|
+
const logic = settings[idx].logic
|
|
375
|
+
const c = new Compartment({ record: recordData, rowIdx })
|
|
376
|
+
const evalFunc = c.evaluate(`(record, rowIdx) => {
|
|
377
|
+
return ${logic}
|
|
378
|
+
}`)
|
|
379
|
+
if (evalFunc(recordData, rowIdx)) {
|
|
377
380
|
return {
|
|
378
381
|
emphasized: [settings[idx].backgroundColor, settings[idx].fontColor]
|
|
379
382
|
}
|
|
@@ -394,10 +397,11 @@ export class MetaUiUtil {
|
|
|
394
397
|
gridColumns[colIdx].record.classifier = function (recordData, rowIdx) {
|
|
395
398
|
for (let idx = 0; idx < settings.length; idx++) {
|
|
396
399
|
const logic = settings[idx].logic
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
const c = new Compartment({ record: recordData, rowIdx })
|
|
401
|
+
const evalFunc = c.evaluate(`(record, rowIdx) => {
|
|
402
|
+
return ${logic}
|
|
403
|
+
}`)
|
|
404
|
+
if (evalFunc(recordData, rowIdx)) {
|
|
401
405
|
return {
|
|
402
406
|
emphasized: [settings[idx].backgroundColor, settings[idx].fontColor]
|
|
403
407
|
}
|