@kepler.gl/schemas 3.3.0-alpha.25 → 3.3.0-alpha.27
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.
|
@@ -19,7 +19,7 @@ import pick from 'es-toolkit/compat/pick';
|
|
|
19
19
|
import { VERSIONS } from './versions';
|
|
20
20
|
import { LAYER_VIS_CONFIGS, FILTER_VIEW_TYPES } from '@kepler.gl/constants';
|
|
21
21
|
import { migrateLegacyScenegraphVisConfig } from '@kepler.gl/layers';
|
|
22
|
-
import { colorRangeBackwardCompatibility, normalizeCameraBookmarks, normalizeCameraTour, isFilterValidToSave, findById, isPlainObject } from '@kepler.gl/utils';
|
|
22
|
+
import { colorRangeBackwardCompatibility, normalizeCameraBookmarks, normalizeCameraTour, normalizeLayerPropertyTransitions, isFilterValidToSave, findById, isPlainObject } from '@kepler.gl/utils';
|
|
23
23
|
import { notNullorUndefined } from '@kepler.gl/common-utils';
|
|
24
24
|
import Schema from './schema';
|
|
25
25
|
import cloneDeep from 'es-toolkit/compat/cloneDeep';
|
|
@@ -526,6 +526,27 @@ var VisConfigSchemaV1 = /*#__PURE__*/function (_Schema1) {
|
|
|
526
526
|
}
|
|
527
527
|
}]);
|
|
528
528
|
}(Schema);
|
|
529
|
+
var LayerPropertyTransitionsSchema = /*#__PURE__*/function (_Schema10) {
|
|
530
|
+
function LayerPropertyTransitionsSchema() {
|
|
531
|
+
_classCallCheck(this, LayerPropertyTransitionsSchema);
|
|
532
|
+
return _callSuper(this, LayerPropertyTransitionsSchema, arguments);
|
|
533
|
+
}
|
|
534
|
+
_inherits(LayerPropertyTransitionsSchema, _Schema10);
|
|
535
|
+
return _createClass(LayerPropertyTransitionsSchema, [{
|
|
536
|
+
key: "save",
|
|
537
|
+
value: function save(value) {
|
|
538
|
+
var propertyTransitions = normalizeLayerPropertyTransitions(value);
|
|
539
|
+
return propertyTransitions !== undefined ? {
|
|
540
|
+
propertyTransitions: propertyTransitions
|
|
541
|
+
} : {};
|
|
542
|
+
}
|
|
543
|
+
}, {
|
|
544
|
+
key: "load",
|
|
545
|
+
value: function load(value) {
|
|
546
|
+
return this.save(value);
|
|
547
|
+
}
|
|
548
|
+
}]);
|
|
549
|
+
}(Schema);
|
|
529
550
|
export var layerPropsV1 = {
|
|
530
551
|
id: null,
|
|
531
552
|
type: null,
|
|
@@ -545,6 +566,9 @@ export var layerPropsV1 = {
|
|
|
545
566
|
}),
|
|
546
567
|
isVisible: null,
|
|
547
568
|
isIncludedInLegend: null,
|
|
569
|
+
propertyTransitions: new LayerPropertyTransitionsSchema({
|
|
570
|
+
key: 'propertyTransitions'
|
|
571
|
+
}),
|
|
548
572
|
visConfig: new VisConfigSchemaV1({
|
|
549
573
|
version: VERSIONS.v1
|
|
550
574
|
}),
|
|
@@ -560,7 +584,7 @@ export var layerPropsV1 = {
|
|
|
560
584
|
key: 'visualChannels'
|
|
561
585
|
})
|
|
562
586
|
};
|
|
563
|
-
export var LayerSchemaV0 = /*#__PURE__*/function (
|
|
587
|
+
export var LayerSchemaV0 = /*#__PURE__*/function (_Schema11) {
|
|
564
588
|
function LayerSchemaV0() {
|
|
565
589
|
var _this9;
|
|
566
590
|
_classCallCheck(this, LayerSchemaV0);
|
|
@@ -571,7 +595,7 @@ export var LayerSchemaV0 = /*#__PURE__*/function (_Schema10) {
|
|
|
571
595
|
_defineProperty(_this9, "key", 'layers');
|
|
572
596
|
return _this9;
|
|
573
597
|
}
|
|
574
|
-
_inherits(LayerSchemaV0,
|
|
598
|
+
_inherits(LayerSchemaV0, _Schema11);
|
|
575
599
|
return _createClass(LayerSchemaV0, [{
|
|
576
600
|
key: "save",
|
|
577
601
|
value: function save(layers, parents) {
|
|
@@ -612,7 +636,7 @@ export var LayerSchemaV0 = /*#__PURE__*/function (_Schema10) {
|
|
|
612
636
|
}
|
|
613
637
|
}]);
|
|
614
638
|
}(Schema);
|
|
615
|
-
export var FilterSchemaV0 = /*#__PURE__*/function (
|
|
639
|
+
export var FilterSchemaV0 = /*#__PURE__*/function (_Schema12) {
|
|
616
640
|
function FilterSchemaV0() {
|
|
617
641
|
var _this10;
|
|
618
642
|
_classCallCheck(this, FilterSchemaV0);
|
|
@@ -623,7 +647,7 @@ export var FilterSchemaV0 = /*#__PURE__*/function (_Schema11) {
|
|
|
623
647
|
_defineProperty(_this10, "key", 'filters');
|
|
624
648
|
return _this10;
|
|
625
649
|
}
|
|
626
|
-
_inherits(FilterSchemaV0,
|
|
650
|
+
_inherits(FilterSchemaV0, _Schema12);
|
|
627
651
|
return _createClass(FilterSchemaV0, [{
|
|
628
652
|
key: "save",
|
|
629
653
|
value: function save(filters) {
|
|
@@ -658,7 +682,7 @@ export var FilterSchemaV0 = /*#__PURE__*/function (_Schema11) {
|
|
|
658
682
|
}]);
|
|
659
683
|
}(Schema);
|
|
660
684
|
var interactionPropsV0 = ['tooltip', 'brush'];
|
|
661
|
-
var InteractionSchemaV0 = /*#__PURE__*/function (
|
|
685
|
+
var InteractionSchemaV0 = /*#__PURE__*/function (_Schema13) {
|
|
662
686
|
function InteractionSchemaV0() {
|
|
663
687
|
var _this13;
|
|
664
688
|
_classCallCheck(this, InteractionSchemaV0);
|
|
@@ -669,7 +693,7 @@ var InteractionSchemaV0 = /*#__PURE__*/function (_Schema12) {
|
|
|
669
693
|
_defineProperty(_this13, "key", 'interactionConfig');
|
|
670
694
|
return _this13;
|
|
671
695
|
}
|
|
672
|
-
_inherits(InteractionSchemaV0,
|
|
696
|
+
_inherits(InteractionSchemaV0, _Schema13);
|
|
673
697
|
return _createClass(InteractionSchemaV0, [{
|
|
674
698
|
key: "save",
|
|
675
699
|
value: function save(interactionConfig) {
|
|
@@ -691,7 +715,7 @@ var InteractionSchemaV0 = /*#__PURE__*/function (_Schema12) {
|
|
|
691
715
|
}]);
|
|
692
716
|
}(Schema);
|
|
693
717
|
var interactionPropsV1 = ['tooltip', 'legend', 'brush', 'geocoder', 'coordinate', 'annotation', 'zoomOpacity'];
|
|
694
|
-
export var InteractionSchemaV1 = /*#__PURE__*/function (
|
|
718
|
+
export var InteractionSchemaV1 = /*#__PURE__*/function (_Schema14) {
|
|
695
719
|
function InteractionSchemaV1() {
|
|
696
720
|
var _this14;
|
|
697
721
|
_classCallCheck(this, InteractionSchemaV1);
|
|
@@ -702,7 +726,7 @@ export var InteractionSchemaV1 = /*#__PURE__*/function (_Schema13) {
|
|
|
702
726
|
_defineProperty(_this14, "key", 'interactionConfig');
|
|
703
727
|
return _this14;
|
|
704
728
|
}
|
|
705
|
-
_inherits(InteractionSchemaV1,
|
|
729
|
+
_inherits(InteractionSchemaV1, _Schema14);
|
|
706
730
|
return _createClass(InteractionSchemaV1, [{
|
|
707
731
|
key: "save",
|
|
708
732
|
value: function save(interactionConfig) {
|
|
@@ -758,12 +782,12 @@ export var filterPropsV0 = {
|
|
|
758
782
|
// deprecated
|
|
759
783
|
enlarged: null
|
|
760
784
|
};
|
|
761
|
-
export var DimensionFieldSchema = /*#__PURE__*/function (
|
|
785
|
+
export var DimensionFieldSchema = /*#__PURE__*/function (_Schema15) {
|
|
762
786
|
function DimensionFieldSchema() {
|
|
763
787
|
_classCallCheck(this, DimensionFieldSchema);
|
|
764
788
|
return _callSuper(this, DimensionFieldSchema, arguments);
|
|
765
789
|
}
|
|
766
|
-
_inherits(DimensionFieldSchema,
|
|
790
|
+
_inherits(DimensionFieldSchema, _Schema15);
|
|
767
791
|
return _createClass(DimensionFieldSchema, [{
|
|
768
792
|
key: "save",
|
|
769
793
|
value: function save(field) {
|
|
@@ -776,12 +800,12 @@ export var DimensionFieldSchema = /*#__PURE__*/function (_Schema14) {
|
|
|
776
800
|
}
|
|
777
801
|
}]);
|
|
778
802
|
}(Schema);
|
|
779
|
-
export var SplitMapsSchema = /*#__PURE__*/function (
|
|
803
|
+
export var SplitMapsSchema = /*#__PURE__*/function (_Schema16) {
|
|
780
804
|
function SplitMapsSchema() {
|
|
781
805
|
_classCallCheck(this, SplitMapsSchema);
|
|
782
806
|
return _callSuper(this, SplitMapsSchema, arguments);
|
|
783
807
|
}
|
|
784
|
-
_inherits(SplitMapsSchema,
|
|
808
|
+
_inherits(SplitMapsSchema, _Schema16);
|
|
785
809
|
return _createClass(SplitMapsSchema, [{
|
|
786
810
|
key: "convertLayerSettings",
|
|
787
811
|
value: function convertLayerSettings(accu, _ref17) {
|
|
@@ -816,7 +840,7 @@ export var SplitMapsSchema = /*#__PURE__*/function (_Schema15) {
|
|
|
816
840
|
}
|
|
817
841
|
}]);
|
|
818
842
|
}(Schema);
|
|
819
|
-
export var PlotTypeSchema = /*#__PURE__*/function (
|
|
843
|
+
export var PlotTypeSchema = /*#__PURE__*/function (_Schema17) {
|
|
820
844
|
function PlotTypeSchema() {
|
|
821
845
|
var _this17;
|
|
822
846
|
_classCallCheck(this, PlotTypeSchema);
|
|
@@ -827,7 +851,7 @@ export var PlotTypeSchema = /*#__PURE__*/function (_Schema16) {
|
|
|
827
851
|
_defineProperty(_this17, "key", 'plotType');
|
|
828
852
|
return _this17;
|
|
829
853
|
}
|
|
830
|
-
_inherits(PlotTypeSchema,
|
|
854
|
+
_inherits(PlotTypeSchema, _Schema17);
|
|
831
855
|
return _createClass(PlotTypeSchema, [{
|
|
832
856
|
key: "load",
|
|
833
857
|
value: function load(plotType) {
|
|
@@ -872,7 +896,7 @@ export var chartPropsV1 = {
|
|
|
872
896
|
layerId: null,
|
|
873
897
|
layerChartType: null
|
|
874
898
|
};
|
|
875
|
-
export var ChartsSchema = /*#__PURE__*/function (
|
|
899
|
+
export var ChartsSchema = /*#__PURE__*/function (_Schema18) {
|
|
876
900
|
function ChartsSchema() {
|
|
877
901
|
var _this18;
|
|
878
902
|
_classCallCheck(this, ChartsSchema);
|
|
@@ -883,7 +907,7 @@ export var ChartsSchema = /*#__PURE__*/function (_Schema17) {
|
|
|
883
907
|
_defineProperty(_this18, "key", 'charts');
|
|
884
908
|
return _this18;
|
|
885
909
|
}
|
|
886
|
-
_inherits(ChartsSchema,
|
|
910
|
+
_inherits(ChartsSchema, _Schema18);
|
|
887
911
|
return _createClass(ChartsSchema, [{
|
|
888
912
|
key: "save",
|
|
889
913
|
value: function save(charts) {
|
|
@@ -918,7 +942,7 @@ export var ChartsSchema = /*#__PURE__*/function (_Schema17) {
|
|
|
918
942
|
}
|
|
919
943
|
}]);
|
|
920
944
|
}(Schema);
|
|
921
|
-
export var EffectsSchema = /*#__PURE__*/function (
|
|
945
|
+
export var EffectsSchema = /*#__PURE__*/function (_Schema19) {
|
|
922
946
|
function EffectsSchema() {
|
|
923
947
|
var _this21;
|
|
924
948
|
_classCallCheck(this, EffectsSchema);
|
|
@@ -929,7 +953,7 @@ export var EffectsSchema = /*#__PURE__*/function (_Schema18) {
|
|
|
929
953
|
_defineProperty(_this21, "key", 'effects');
|
|
930
954
|
return _this21;
|
|
931
955
|
}
|
|
932
|
-
_inherits(EffectsSchema,
|
|
956
|
+
_inherits(EffectsSchema, _Schema19);
|
|
933
957
|
return _createClass(EffectsSchema, [{
|
|
934
958
|
key: "save",
|
|
935
959
|
value: function save(effects, parents) {
|
|
@@ -969,6 +993,9 @@ var annotationPropsV1 = {
|
|
|
969
993
|
id: null,
|
|
970
994
|
kind: null,
|
|
971
995
|
isVisible: null,
|
|
996
|
+
propertyTransitions: new LayerPropertyTransitionsSchema({
|
|
997
|
+
key: 'propertyTransitions'
|
|
998
|
+
}),
|
|
972
999
|
autoSize: null,
|
|
973
1000
|
autoSizeY: null,
|
|
974
1001
|
anchorPoint: null,
|
|
@@ -989,7 +1016,7 @@ var annotationPropsV1 = {
|
|
|
989
1016
|
showCustomText: null,
|
|
990
1017
|
showDistance: null
|
|
991
1018
|
};
|
|
992
|
-
export var AnnotationsSchema = /*#__PURE__*/function (
|
|
1019
|
+
export var AnnotationsSchema = /*#__PURE__*/function (_Schema20) {
|
|
993
1020
|
function AnnotationsSchema() {
|
|
994
1021
|
var _this24;
|
|
995
1022
|
_classCallCheck(this, AnnotationsSchema);
|
|
@@ -1000,7 +1027,7 @@ export var AnnotationsSchema = /*#__PURE__*/function (_Schema19) {
|
|
|
1000
1027
|
_defineProperty(_this24, "key", 'annotations');
|
|
1001
1028
|
return _this24;
|
|
1002
1029
|
}
|
|
1003
|
-
_inherits(AnnotationsSchema,
|
|
1030
|
+
_inherits(AnnotationsSchema, _Schema20);
|
|
1004
1031
|
return _createClass(AnnotationsSchema, [{
|
|
1005
1032
|
key: "save",
|
|
1006
1033
|
value: function save(annotations) {
|
|
@@ -1064,7 +1091,7 @@ export var propertiesV0 = {
|
|
|
1064
1091
|
layerBlending: null,
|
|
1065
1092
|
overlayBlending: null
|
|
1066
1093
|
};
|
|
1067
|
-
var CameraBookmarksSchema = /*#__PURE__*/function (
|
|
1094
|
+
var CameraBookmarksSchema = /*#__PURE__*/function (_Schema21) {
|
|
1068
1095
|
function CameraBookmarksSchema() {
|
|
1069
1096
|
var _this27;
|
|
1070
1097
|
_classCallCheck(this, CameraBookmarksSchema);
|
|
@@ -1075,7 +1102,7 @@ var CameraBookmarksSchema = /*#__PURE__*/function (_Schema20) {
|
|
|
1075
1102
|
_defineProperty(_this27, "key", 'cameraBookmarks');
|
|
1076
1103
|
return _this27;
|
|
1077
1104
|
}
|
|
1078
|
-
_inherits(CameraBookmarksSchema,
|
|
1105
|
+
_inherits(CameraBookmarksSchema, _Schema21);
|
|
1079
1106
|
return _createClass(CameraBookmarksSchema, [{
|
|
1080
1107
|
key: "save",
|
|
1081
1108
|
value: function save(value) {
|
|
@@ -1089,7 +1116,7 @@ var CameraBookmarksSchema = /*#__PURE__*/function (_Schema20) {
|
|
|
1089
1116
|
}
|
|
1090
1117
|
}]);
|
|
1091
1118
|
}(Schema);
|
|
1092
|
-
var CameraTourSchema = /*#__PURE__*/function (
|
|
1119
|
+
var CameraTourSchema = /*#__PURE__*/function (_Schema22) {
|
|
1093
1120
|
function CameraTourSchema() {
|
|
1094
1121
|
var _this28;
|
|
1095
1122
|
_classCallCheck(this, CameraTourSchema);
|
|
@@ -1100,7 +1127,7 @@ var CameraTourSchema = /*#__PURE__*/function (_Schema21) {
|
|
|
1100
1127
|
_defineProperty(_this28, "key", 'cameraTour');
|
|
1101
1128
|
return _this28;
|
|
1102
1129
|
}
|
|
1103
|
-
_inherits(CameraTourSchema,
|
|
1130
|
+
_inherits(CameraTourSchema, _Schema22);
|
|
1104
1131
|
return _createClass(CameraTourSchema, [{
|
|
1105
1132
|
key: "save",
|
|
1106
1133
|
value: function save(value) {
|
|
@@ -1171,12 +1198,12 @@ export var propertiesV1 = {
|
|
|
1171
1198
|
// suitabilities is intentionally absent: the op config is ephemeral and only the
|
|
1172
1199
|
// derived dataset is persisted. A `null` entry here would write it to saved maps.
|
|
1173
1200
|
};
|
|
1174
|
-
export var VisStateSchemaV1 = /*#__PURE__*/function (
|
|
1201
|
+
export var VisStateSchemaV1 = /*#__PURE__*/function (_Schema23) {
|
|
1175
1202
|
function VisStateSchemaV1() {
|
|
1176
1203
|
_classCallCheck(this, VisStateSchemaV1);
|
|
1177
1204
|
return _callSuper(this, VisStateSchemaV1, arguments);
|
|
1178
1205
|
}
|
|
1179
|
-
_inherits(VisStateSchemaV1,
|
|
1206
|
+
_inherits(VisStateSchemaV1, _Schema23);
|
|
1180
1207
|
return _createClass(VisStateSchemaV1, [{
|
|
1181
1208
|
key: "save",
|
|
1182
1209
|
value: function save(node) {
|