bruce-models 3.0.2 → 3.0.4

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.
@@ -2635,16 +2635,35 @@
2635
2635
  let value;
2636
2636
  switch (field.type) {
2637
2637
  case EValueType.Gradient:
2638
- value = String(GetGradientValue(field.value, entity));
2638
+ {
2639
+ const tmp = GetGradientValue(field.value, entity);
2640
+ // This avoids null turning into "null".
2641
+ if (tmp) {
2642
+ value = String(tmp);
2643
+ }
2644
+ }
2639
2645
  break;
2640
2646
  case EValueType.Color:
2641
2647
  case EValueType.Input:
2642
- value = String(GetInputValue(field.value, entity));
2648
+ {
2649
+ const tmp = GetInputValue(field.value, entity);
2650
+ // This avoids null turning into "null".
2651
+ if (tmp) {
2652
+ value = String(tmp);
2653
+ }
2654
+ }
2643
2655
  break;
2644
2656
  case EValueType.Mapping:
2645
- value = String(GetMappingValue(field.value, entity));
2657
+ {
2658
+ const tmp = GetMappingValue(field.value, entity);
2659
+ // This avoids null turning into "null".
2660
+ if (tmp) {
2661
+ value = String(tmp);
2662
+ }
2663
+ }
2646
2664
  break;
2647
2665
  case EValueType.RandomColor:
2666
+ // Would be nice to randomize based on an attribute or entity ID instead of pure random.
2648
2667
  var color = exports.Color.RandomColor();
2649
2668
  value = `rgba(${color.red},${color.green},${color.blue},${color.alpha})`;
2650
2669
  break;
@@ -8874,7 +8893,7 @@
8874
8893
  DataSource.GetList = GetList;
8875
8894
  })(exports.DataSource || (exports.DataSource = {}));
8876
8895
 
8877
- const VERSION = "3.0.2";
8896
+ const VERSION = "3.0.4";
8878
8897
 
8879
8898
  exports.VERSION = VERSION;
8880
8899
  exports.AbstractApi = AbstractApi;