@fibery/views 10.7.1 → 11.0.0
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/lib/views.js +43 -38
- package/package.json +5 -5
package/lib/views.js
CHANGED
|
@@ -494,45 +494,50 @@ const visitView$5 = (view, visitor) => immutableUpdate__default["default"](view,
|
|
|
494
494
|
$apply: y => visitAxis$1(y, visitor)
|
|
495
495
|
},
|
|
496
496
|
items: {
|
|
497
|
-
$apply: items =>
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
497
|
+
$apply: items => {
|
|
498
|
+
if (!items) {
|
|
499
|
+
return [];
|
|
500
|
+
}
|
|
501
|
+
return items.map(item => {
|
|
502
|
+
const fromType = ___default["default"].get(item, ["query", "q/from"]);
|
|
503
|
+
return fromType ? immutableUpdate__default["default"](item, {
|
|
504
|
+
coverExpression: {
|
|
505
|
+
$apply: coverExpression => coverExpression ? visitor.visitExpression(fromType, coverExpression) : coverExpression
|
|
506
|
+
},
|
|
507
|
+
xExpression: {
|
|
508
|
+
$apply: xExpression => xExpression ? visitor.visitExpression(fromType, xExpression) : xExpression
|
|
509
|
+
},
|
|
510
|
+
yExpression: {
|
|
511
|
+
$apply: yExpression => yExpression ? visitor.visitExpression(fromType, yExpression) : yExpression
|
|
512
|
+
},
|
|
513
|
+
contextExpression: {
|
|
514
|
+
$apply: contextExpression => visitContextExpression(fromType, contextExpression, visitor)
|
|
515
|
+
},
|
|
516
|
+
query: {
|
|
517
|
+
$apply: query => query ? visitor.visitQueryExpression(query) : null
|
|
518
|
+
},
|
|
519
|
+
filter: {
|
|
520
|
+
$apply: filter => filter ? visitor.visitFilter(fromType, filter) : null
|
|
521
|
+
},
|
|
522
|
+
units: {
|
|
523
|
+
$apply: units => units ? units.filter(unit => Boolean(unit)).map(unit => visitViewUnit(fromType, unit, visitor)).filter(unit => isUnitExpressionValid(unit)).map((unit, idx, units) => visitor.visitViewUnit ? visitor.visitViewUnit(fromType, unit, units) : unit).filter(unit => unit !== REMOVE) : undefined
|
|
524
|
+
},
|
|
525
|
+
colorCoding: {
|
|
526
|
+
$apply: colorCodings => {
|
|
527
|
+
return colorCodings ? colorCodings.map(colorCoding => ({
|
|
528
|
+
...colorCoding,
|
|
529
|
+
expression: visitor.visitExpression(fromType, colorCoding.expression)
|
|
530
|
+
})).filter(colorCoding => colorCoding.expression !== null) : undefined;
|
|
531
|
+
}
|
|
527
532
|
}
|
|
528
|
-
}
|
|
529
|
-
})
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
533
|
+
}) : item;
|
|
534
|
+
}).filter(item => {
|
|
535
|
+
const {
|
|
536
|
+
query
|
|
537
|
+
} = item;
|
|
538
|
+
return query ? item : null;
|
|
539
|
+
});
|
|
540
|
+
}
|
|
536
541
|
}
|
|
537
542
|
}
|
|
538
543
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fibery/views",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Operations on view objects",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Fibery",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"microbundle": "0.15.1",
|
|
21
21
|
"@fibery/babel-preset": "7.4.0",
|
|
22
22
|
"@fibery/eslint-config": "8.6.0",
|
|
23
|
-
"@fibery/expression-utils": "9.0
|
|
24
|
-
"@fibery/schema": "10.2.
|
|
23
|
+
"@fibery/expression-utils": "9.1.0",
|
|
24
|
+
"@fibery/schema": "10.2.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@fibery/expression-utils": "^9.0
|
|
28
|
-
"@fibery/schema": "^10.2.
|
|
27
|
+
"@fibery/expression-utils": "^9.1.0",
|
|
28
|
+
"@fibery/schema": "^10.2.2",
|
|
29
29
|
"immutability-helper": "^2.4.0",
|
|
30
30
|
"lodash": "^4.17.21"
|
|
31
31
|
},
|