@kepler.gl/utils 3.3.0-alpha.2 → 3.3.0-alpha.21
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/application-config.d.ts +180 -1
- package/dist/arrow-data-container.d.ts +55 -2
- package/dist/camera-tour.d.ts +11 -0
- package/dist/camera-utils.d.ts +7 -0
- package/dist/cjs/aggregation.js +84 -0
- package/dist/cjs/aggregation.js.map +1 -0
- package/dist/cjs/application-config-types.js +6 -0
- package/dist/cjs/application-config-types.js.map +1 -0
- package/dist/cjs/application-config.js +178 -0
- package/dist/cjs/application-config.js.map +1 -0
- package/dist/cjs/arrow-data-container.js +1152 -0
- package/dist/cjs/arrow-data-container.js.map +1 -0
- package/dist/cjs/browser-utils.js +17 -0
- package/dist/cjs/browser-utils.js.map +1 -0
- package/dist/cjs/camera-tour.js +99 -0
- package/dist/cjs/camera-tour.js.map +1 -0
- package/dist/cjs/camera-utils.js +81 -0
- package/dist/cjs/camera-utils.js.map +1 -0
- package/dist/cjs/color-utils.js +462 -0
- package/dist/cjs/color-utils.js.map +1 -0
- package/dist/cjs/column-statistics.js +115 -0
- package/dist/cjs/column-statistics.js.map +1 -0
- package/dist/cjs/data-container-interface.js +6 -0
- package/dist/cjs/data-container-interface.js.map +1 -0
- package/dist/cjs/data-container-utils.js +76 -0
- package/dist/cjs/data-container-utils.js.map +1 -0
- package/dist/cjs/data-row.js +110 -0
- package/dist/cjs/data-row.js.map +1 -0
- package/dist/cjs/data-scale-utils.js +634 -0
- package/dist/cjs/data-scale-utils.js.map +1 -0
- package/dist/cjs/data-utils.js +538 -0
- package/dist/cjs/data-utils.js.map +1 -0
- package/dist/cjs/dataset-utils.js +361 -0
- package/dist/cjs/dataset-utils.js.map +1 -0
- package/dist/cjs/dom-to-image.js +433 -0
- package/dist/cjs/dom-to-image.js.map +1 -0
- package/dist/cjs/dom-utils.js +349 -0
- package/dist/cjs/dom-utils.js.map +1 -0
- package/dist/cjs/editor-feature-utils.js +177 -0
- package/dist/cjs/editor-feature-utils.js.map +1 -0
- package/dist/cjs/effect-utils.js +340 -0
- package/dist/cjs/effect-utils.js.map +1 -0
- package/dist/cjs/export-map-html.js +112 -0
- package/dist/cjs/export-map-html.js.map +1 -0
- package/dist/cjs/export-utils.js +318 -0
- package/dist/cjs/export-utils.js.map +1 -0
- package/dist/cjs/extract-dataset-utils.js +218 -0
- package/dist/cjs/extract-dataset-utils.js.map +1 -0
- package/dist/cjs/filter-utils.js +1762 -0
- package/dist/cjs/filter-utils.js.map +1 -0
- package/dist/cjs/format.js +38 -0
- package/dist/cjs/format.js.map +1 -0
- package/dist/cjs/gl-utils.js +118 -0
- package/dist/cjs/gl-utils.js.map +1 -0
- package/dist/{index.js → cjs/index.js} +391 -10
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/indexed-data-container.js +214 -0
- package/dist/cjs/indexed-data-container.js.map +1 -0
- package/dist/cjs/jenks.js +156 -0
- package/dist/cjs/jenks.js.map +1 -0
- package/dist/cjs/locale-utils.js +39 -0
- package/dist/cjs/locale-utils.js.map +1 -0
- package/dist/cjs/map-info-utils.js +41 -0
- package/dist/cjs/map-info-utils.js.map +1 -0
- package/dist/cjs/map-style-utils/mapbox-gl-style-editor.js +198 -0
- package/dist/cjs/map-style-utils/mapbox-gl-style-editor.js.map +1 -0
- package/dist/cjs/map-style-utils/mapbox-utils.js +155 -0
- package/dist/cjs/map-style-utils/mapbox-utils.js.map +1 -0
- package/dist/cjs/map-utils.js +76 -0
- package/dist/cjs/map-utils.js.map +1 -0
- package/dist/cjs/mapbox-utils.js +19 -0
- package/dist/cjs/mapbox-utils.js.map +1 -0
- package/dist/cjs/notifications-utils.js +69 -0
- package/dist/cjs/notifications-utils.js.map +1 -0
- package/dist/cjs/observe-dimensions.js +136 -0
- package/dist/cjs/observe-dimensions.js.map +1 -0
- package/dist/cjs/plot.js +1502 -0
- package/dist/cjs/plot.js.map +1 -0
- package/dist/cjs/position-utils.js +29 -0
- package/dist/cjs/position-utils.js.map +1 -0
- package/dist/cjs/projection-utils.js +141 -0
- package/dist/cjs/projection-utils.js.map +1 -0
- package/dist/cjs/quick-insertion-sort.js +132 -0
- package/dist/cjs/quick-insertion-sort.js.map +1 -0
- package/dist/cjs/row-data-container.js +291 -0
- package/dist/cjs/row-data-container.js.map +1 -0
- package/dist/cjs/slider-scale-utils.js +138 -0
- package/dist/cjs/slider-scale-utils.js.map +1 -0
- package/dist/cjs/split-map-utils.js +117 -0
- package/dist/cjs/split-map-utils.js.map +1 -0
- package/dist/cjs/strings.js +16 -0
- package/dist/cjs/strings.js.map +1 -0
- package/dist/cjs/theme-utils.js +46 -0
- package/dist/cjs/theme-utils.js.map +1 -0
- package/dist/cjs/time.js +321 -0
- package/dist/cjs/time.js.map +1 -0
- package/dist/cjs/types.js +6 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/cjs/utils.js +224 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/column-statistics.d.ts +54 -0
- package/dist/data-container-interface.d.ts +16 -1
- package/dist/data-container-utils.d.ts +2 -1
- package/dist/data-scale-utils.d.ts +5 -0
- package/dist/data-utils.d.ts +3 -3
- package/dist/dataset-utils.d.ts +11 -28
- package/dist/editor-feature-utils.d.ts +30 -0
- package/dist/esm/aggregation.js +75 -0
- package/dist/esm/aggregation.js.map +1 -0
- package/dist/esm/application-config-types.js +3 -0
- package/dist/esm/application-config-types.js.map +1 -0
- package/dist/esm/application-config.js +167 -0
- package/dist/esm/application-config.js.map +1 -0
- package/dist/esm/arrow-data-container.js +1136 -0
- package/dist/esm/arrow-data-container.js.map +1 -0
- package/dist/esm/browser-utils.js +11 -0
- package/dist/esm/browser-utils.js.map +1 -0
- package/dist/esm/camera-tour.js +92 -0
- package/dist/esm/camera-tour.js.map +1 -0
- package/dist/esm/camera-utils.js +74 -0
- package/dist/esm/camera-utils.js.map +1 -0
- package/dist/esm/color-utils.js +435 -0
- package/dist/esm/color-utils.js.map +1 -0
- package/dist/esm/column-statistics.js +105 -0
- package/dist/esm/column-statistics.js.map +1 -0
- package/dist/esm/data-container-interface.js +3 -0
- package/dist/esm/data-container-interface.js.map +1 -0
- package/dist/esm/data-container-utils.js +68 -0
- package/dist/esm/data-container-utils.js.map +1 -0
- package/dist/esm/data-row.js +106 -0
- package/dist/esm/data-row.js.map +1 -0
- package/dist/esm/data-scale-utils.js +602 -0
- package/dist/esm/data-scale-utils.js.map +1 -0
- package/dist/esm/data-utils.js +504 -0
- package/dist/esm/data-utils.js.map +1 -0
- package/dist/esm/dataset-utils.js +352 -0
- package/dist/esm/dataset-utils.js.map +1 -0
- package/dist/esm/dom-to-image.js +426 -0
- package/dist/esm/dom-to-image.js.map +1 -0
- package/dist/esm/dom-utils.js +323 -0
- package/dist/esm/dom-utils.js.map +1 -0
- package/dist/esm/editor-feature-utils.js +164 -0
- package/dist/esm/editor-feature-utils.js.map +1 -0
- package/dist/esm/effect-utils.js +333 -0
- package/dist/esm/effect-utils.js.map +1 -0
- package/dist/esm/export-map-html.js +107 -0
- package/dist/esm/export-map-html.js.map +1 -0
- package/dist/esm/export-utils.js +297 -0
- package/dist/esm/export-utils.js.map +1 -0
- package/dist/esm/extract-dataset-utils.js +206 -0
- package/dist/esm/extract-dataset-utils.js.map +1 -0
- package/dist/esm/filter-utils.js +1701 -0
- package/dist/esm/filter-utils.js.map +1 -0
- package/dist/esm/format.js +31 -0
- package/dist/esm/format.js.map +1 -0
- package/dist/esm/gl-utils.js +113 -0
- package/dist/esm/gl-utils.js.map +1 -0
- package/dist/esm/index.js +55 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/indexed-data-container.js +210 -0
- package/dist/esm/indexed-data-container.js.map +1 -0
- package/dist/esm/jenks.js +149 -0
- package/dist/esm/jenks.js.map +1 -0
- package/dist/esm/locale-utils.js +36 -0
- package/dist/esm/locale-utils.js.map +1 -0
- package/dist/esm/map-info-utils.js +35 -0
- package/dist/esm/map-info-utils.js.map +1 -0
- package/dist/esm/map-style-utils/mapbox-gl-style-editor.js +188 -0
- package/dist/esm/map-style-utils/mapbox-gl-style-editor.js.map +1 -0
- package/dist/esm/map-style-utils/mapbox-utils.js +144 -0
- package/dist/esm/map-style-utils/mapbox-utils.js.map +1 -0
- package/dist/esm/map-utils.js +72 -0
- package/dist/esm/map-utils.js.map +1 -0
- package/dist/esm/mapbox-utils.js +13 -0
- package/dist/esm/mapbox-utils.js.map +1 -0
- package/dist/esm/notifications-utils.js +63 -0
- package/dist/esm/notifications-utils.js.map +1 -0
- package/dist/esm/observe-dimensions.js +128 -0
- package/dist/esm/observe-dimensions.js.map +1 -0
- package/dist/esm/plot.js +1460 -0
- package/dist/esm/plot.js.map +1 -0
- package/dist/esm/position-utils.js +22 -0
- package/dist/esm/position-utils.js.map +1 -0
- package/dist/esm/projection-utils.js +131 -0
- package/dist/esm/projection-utils.js.map +1 -0
- package/dist/esm/quick-insertion-sort.js +125 -0
- package/dist/esm/quick-insertion-sort.js.map +1 -0
- package/dist/esm/row-data-container.js +286 -0
- package/dist/esm/row-data-container.js.map +1 -0
- package/dist/esm/slider-scale-utils.js +129 -0
- package/dist/esm/slider-scale-utils.js.map +1 -0
- package/dist/esm/split-map-utils.js +109 -0
- package/dist/esm/split-map-utils.js.map +1 -0
- package/dist/esm/strings.js +10 -0
- package/dist/esm/strings.js.map +1 -0
- package/dist/esm/theme-utils.js +38 -0
- package/dist/esm/theme-utils.js.map +1 -0
- package/dist/esm/time.js +308 -0
- package/dist/esm/time.js.map +1 -0
- package/dist/esm/types.js +3 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.js +203 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/export-map-html.d.ts +5 -0
- package/dist/export-utils.d.ts +31 -3
- package/dist/extract-dataset-utils.d.ts +79 -0
- package/dist/filter-utils.d.ts +56 -7
- package/dist/index.d.ts +20 -9
- package/dist/jenks.d.ts +5 -0
- package/dist/map-info-utils.d.ts +11 -1
- package/dist/map-style-utils/mapbox-gl-style-editor.d.ts +11 -10
- package/dist/map-style-utils/mapbox-utils.d.ts +29 -1
- package/dist/plot.d.ts +187 -21
- package/dist/projection-utils.d.ts +6 -4
- package/dist/row-data-container.d.ts +19 -0
- package/dist/split-map-utils.d.ts +7 -0
- package/dist/theme-utils.d.ts +8 -0
- package/dist/time.d.ts +3 -3
- package/dist/types.d.ts +2 -0
- package/package.json +33 -26
- package/dist/aggregation.js +0 -84
- package/dist/application-config-types.js +0 -6
- package/dist/application-config.js +0 -113
- package/dist/arrow-data-container.js +0 -398
- package/dist/browser-utils.js +0 -17
- package/dist/color-utils.js +0 -462
- package/dist/data-container-interface.js +0 -6
- package/dist/data-container-utils.js +0 -75
- package/dist/data-row.js +0 -110
- package/dist/data-scale-utils.js +0 -620
- package/dist/data-utils.js +0 -532
- package/dist/dataset-utils.js +0 -330
- package/dist/dom-to-image.js +0 -433
- package/dist/dom-utils.js +0 -349
- package/dist/effect-utils.js +0 -318
- package/dist/export-map-html.js +0 -38
- package/dist/export-utils.js +0 -203
- package/dist/filter-utils.js +0 -1274
- package/dist/format.js +0 -38
- package/dist/gl-utils.js +0 -118
- package/dist/indexed-data-container.js +0 -214
- package/dist/locale-utils.js +0 -39
- package/dist/map-info-utils.js +0 -14
- package/dist/map-style-utils/mapbox-gl-style-editor.js +0 -194
- package/dist/map-style-utils/mapbox-utils.js +0 -107
- package/dist/map-utils.js +0 -72
- package/dist/mapbox-utils.js +0 -19
- package/dist/noop.d.ts +0 -1
- package/dist/noop.js +0 -13
- package/dist/notifications-utils.js +0 -69
- package/dist/observe-dimensions.js +0 -136
- package/dist/plot.js +0 -637
- package/dist/position-utils.js +0 -26
- package/dist/projection-utils.js +0 -91
- package/dist/quick-insertion-sort.js +0 -132
- package/dist/row-data-container.js +0 -206
- package/dist/searcher-utils.d.ts +0 -1
- package/dist/searcher-utils.js +0 -25
- package/dist/slider-scale-utils.js +0 -138
- package/dist/split-map-utils.js +0 -99
- package/dist/strings.js +0 -16
- package/dist/time.js +0 -325
- package/dist/types.js +0 -6
- package/dist/utils.js +0 -224
|
@@ -32,6 +32,34 @@ export type BaseMapLibraryConfig = {
|
|
|
32
32
|
* A mechanism to override default Kepler values/settings so that we
|
|
33
33
|
* without having to make application-specific changes to the kepler repo.
|
|
34
34
|
*/
|
|
35
|
+
/**
|
|
36
|
+
* Controls which Redux actions are suppressed by the dev-mode Redux logger.
|
|
37
|
+
* Mirrors the `log.level` convention used by luma.gl / deck.gl.
|
|
38
|
+
*
|
|
39
|
+
* - `0` — log every action (no filtering)
|
|
40
|
+
* - `1` — suppress the highest-frequency UI noise:
|
|
41
|
+
* MOUSE_MOVE, LAYER_HOVER, SET_MAP_BOUNDARY, SET_LOADING_INDICATOR,
|
|
42
|
+
* SET_LOADING_PROGRESS
|
|
43
|
+
* - `2` — suppress everything in level 1 plus map/layer update chatter:
|
|
44
|
+
* LOAD_MAP_STYLES, UPDATE_MAP, LAYER_VISUAL_CHANGE,
|
|
45
|
+
* ON_MAP_CLICK, FILTER_CHANGE, MAP_LOAD_STARTED
|
|
46
|
+
*
|
|
47
|
+
* Effects by context:
|
|
48
|
+
* - **redux-logger** (console output): only active when `NODE_ENV === 'local'` (i.e. `yarn start`)
|
|
49
|
+
* - **Redux DevTools** (`actionsBlacklist`): active whenever the browser extension is present,
|
|
50
|
+
* regardless of `NODE_ENV`
|
|
51
|
+
*
|
|
52
|
+
* Default: `1`
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* initApplicationConfig({ reduxLogLevel: 2 }); // quieter dev console
|
|
57
|
+
* initApplicationConfig({ reduxLogLevel: 0 }); // see every action
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export type ReduxLogLevel = 0 | 1 | 2;
|
|
61
|
+
/** Built-in file formats that can be listed in {@link KeplerApplicationConfig.acceptedFileFormats}. */
|
|
62
|
+
export type KeplerAcceptedFileFormat = 'csv' | 'tsv' | 'dsv' | 'json' | 'geojson' | 'ndjson' | 'jsonl' | 'geojsonl' | 'ndgeojson' | 'ldgeojson' | 'kml' | 'gpx' | 'tcx' | 'arrow' | 'feather' | 'parquet' | 'shp' | 'shapefile' | 'zip' | 'dbf' | 'shx' | 'prj' | 'cpg' | 'xlsx' | 'xls' | 'xlsm' | 'xlsb' | 'excel' | 'fgb' | 'flatgeobuf';
|
|
35
63
|
export type KeplerApplicationConfig = {
|
|
36
64
|
/** Default name of export HTML file, can be overridden by user */
|
|
37
65
|
defaultHtmlName?: string;
|
|
@@ -41,12 +69,16 @@ export type KeplerApplicationConfig = {
|
|
|
41
69
|
defaultExportJsonSettings?: {
|
|
42
70
|
hasData?: boolean;
|
|
43
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* Whether to show editable application name and website controls for exported maps.
|
|
74
|
+
* Enabled by default.
|
|
75
|
+
*/
|
|
76
|
+
enableCustomExportBranding?: boolean;
|
|
44
77
|
baseMapLibraryConfig?: Record<BaseMapLibraryType, BaseMapLibraryConfig>;
|
|
45
78
|
plugins?: any[];
|
|
46
79
|
table?: any;
|
|
47
80
|
database?: DatabaseAdapter | null;
|
|
48
81
|
useArrowProgressiveLoading?: boolean;
|
|
49
|
-
showReleaseBanner?: boolean;
|
|
50
82
|
useOnFilteredItemsChange?: boolean;
|
|
51
83
|
cdnUrl?: string;
|
|
52
84
|
enableRasterTileLayer?: boolean;
|
|
@@ -67,8 +99,15 @@ export type KeplerApplicationConfig = {
|
|
|
67
99
|
/** Whether to show the server input field in the raster tile layer setup form */
|
|
68
100
|
rasterServerShowServerInput?: boolean;
|
|
69
101
|
enableWMSLayer?: boolean;
|
|
102
|
+
enableZarrLayer?: boolean;
|
|
70
103
|
enableFlowLayer?: boolean;
|
|
71
104
|
enableBitmapLayer?: boolean;
|
|
105
|
+
enableA5Layer?: boolean;
|
|
106
|
+
enableGeohashLayer?: boolean;
|
|
107
|
+
enableFlowFieldLayer?: boolean;
|
|
108
|
+
enableContourLayer?: boolean;
|
|
109
|
+
enableVoronoiLayer?: boolean;
|
|
110
|
+
enableDonutLayer?: boolean;
|
|
72
111
|
/** Whether to show example URLs in tileset setup forms (vector tile, raster tile, WMS, 3D tile) */
|
|
73
112
|
showInlineTilesetExamples?: boolean;
|
|
74
113
|
/** Whether to apply fix for uglify error in dom-to-image (should be true for webpack builds, false for Vite) */
|
|
@@ -76,14 +115,137 @@ export type KeplerApplicationConfig = {
|
|
|
76
115
|
/** Maximum pitch angle in degrees. deck.gl defaults to 60; set higher (up to 85) for elevated perspectives.
|
|
77
116
|
* Note: values above 60 may cause rendering artifacts with some basemap tile providers. */
|
|
78
117
|
maxPitch?: number;
|
|
118
|
+
/**
|
|
119
|
+
* Draw flat-map layers on every visible world copy. Disabled by default because
|
|
120
|
+
* each copy adds rendering and picking work. With it disabled, layers can be
|
|
121
|
+
* missing on adjacent world copies across the antimeridian. Enable with
|
|
122
|
+
* `initApplicationConfig({enableMapRepeat: true})`.
|
|
123
|
+
*/
|
|
124
|
+
enableMapRepeat?: boolean;
|
|
79
125
|
/** Whether to enable the annotations feature. Enabled by default. */
|
|
80
126
|
enableAnnotations?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Whether to enable extended Draw on Map sketch tools: Point, Line, Copy all,
|
|
129
|
+
* Convert to Layer, and Edit Properties.
|
|
130
|
+
* Polygon and rectangle drawing remain available when this is disabled. Enabled by default.
|
|
131
|
+
*/
|
|
132
|
+
enableDrawOnMapSketches?: boolean;
|
|
81
133
|
/** Whether to show the map navigation control (zoom buttons and compass). Enabled by default. */
|
|
82
134
|
enableMapNavigationControl?: boolean;
|
|
135
|
+
/** Whether to show the map scale bar at the bottom-left of the map. Enabled by default. */
|
|
136
|
+
enableMapScale?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Fit the map to a dataset when the layer type dropdown gives a manually
|
|
139
|
+
* added layer its first type. The layer already has a dataset (chosen from
|
|
140
|
+
* Add Layer). Programmatic `layerTypeChange`, saved configs, and later type
|
|
141
|
+
* changes do not move the map.
|
|
142
|
+
* Enabled by default. Disable with {@link initApplicationConfig}.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```
|
|
146
|
+
* initApplicationConfig({enableFitBoundsOnManualLayer: false});
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
enableFitBoundsOnManualLayer?: boolean;
|
|
83
150
|
/** Whether to enable the swipe compare mode in split map view. Enabled by default. */
|
|
84
151
|
enableSwipeMode?: boolean;
|
|
152
|
+
/** Whether to show the option to switch to the globe view. Enabled by default. */
|
|
153
|
+
enableGlobeView?: boolean;
|
|
85
154
|
/** Whether to enable the layer groups feature. Enabled by default. */
|
|
86
155
|
enableLayerGroups?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Named UI themes to cycle (`dark`, `light`, `space`, `base`).
|
|
158
|
+
* Empty (default): dark theme, no switcher.
|
|
159
|
+
* One theme: that theme is used, no switcher.
|
|
160
|
+
* Two or more: first is the default, a map control cycles the list.
|
|
161
|
+
*/
|
|
162
|
+
themes?: string[];
|
|
163
|
+
/** Whether to show column statistics in the data table modal. Enabled by default. */
|
|
164
|
+
enableColumnStats?: boolean;
|
|
165
|
+
/** Group-by, attribute join, and simple spatial join UI on local datasets. Enabled by default. */
|
|
166
|
+
enableDatasetOps?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Whether to show the charts map-control panel (big number, bar, line,
|
|
169
|
+
* heatmap, pivot table, tooltip charts, and chart cross-filters).
|
|
170
|
+
* Enabled by default. Disable with {@link initApplicationConfig}.
|
|
171
|
+
*/
|
|
172
|
+
enableChartsPanel?: boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Whether to show the Map info section in Interactions and the on-map
|
|
175
|
+
* name and description card. Enabled by default.
|
|
176
|
+
*/
|
|
177
|
+
enableMapInfo?: boolean;
|
|
178
|
+
/** Whether to show the Bookmarks panel in Interactions. Enabled by default. */
|
|
179
|
+
enableCameraBookmarks?: boolean;
|
|
180
|
+
/** Whether to show the Camera animation panel in Interactions. Enabled by default. */
|
|
181
|
+
enableCameraTour?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Master switch for power-user JSON editors. When false, every section editor is hidden.
|
|
184
|
+
* Defaults to true; each section also has its own flag.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```
|
|
188
|
+
* initApplicationConfig({
|
|
189
|
+
* enableViewportJsonEditor: true,
|
|
190
|
+
* enableLayerJsonEditor: false
|
|
191
|
+
* });
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
enableJsonEditors?: boolean;
|
|
195
|
+
/** Layer panel `{ }` JSON editor. Enabled by default. */
|
|
196
|
+
enableLayerJsonEditor?: boolean;
|
|
197
|
+
/** Filter panel `{ }` JSON editor. Enabled by default. */
|
|
198
|
+
enableFilterJsonEditor?: boolean;
|
|
199
|
+
/** Effect panel `{ }` JSON editor. Enabled by default. */
|
|
200
|
+
enableEffectJsonEditor?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Viewport JSON editor map-control button. Disabled by default because it adds an extra
|
|
203
|
+
* map control.
|
|
204
|
+
*/
|
|
205
|
+
enableViewportJsonEditor?: boolean;
|
|
206
|
+
/** Animation / time-filter playback `{ }` JSON editor. Enabled by default. */
|
|
207
|
+
enableAnimationJsonEditor?: boolean;
|
|
208
|
+
/** Charts panel `{ }` JSON editor. Enabled by default. */
|
|
209
|
+
enableChartJsonEditor?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Show a format dropdown next to the remote dataset URL field (Auto / CSV / GeoJSON / JSON / Arrow / Parquet).
|
|
212
|
+
* Useful for extensionless URLs such as Azure SAS blobs. Disabled by default.
|
|
213
|
+
*/
|
|
214
|
+
enableRemoteFileFormatSelector?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Warn in the Add Data list when a dataset has at least this many rows.
|
|
217
|
+
* `false` shows no warning. The warning waits until the row count is known.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```
|
|
221
|
+
* initApplicationConfig({largeDatasetWarningRows: 1_000_000});
|
|
222
|
+
* initApplicationConfig({largeDatasetWarningRows: false});
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
largeDatasetWarningRows?: false | number;
|
|
226
|
+
/**
|
|
227
|
+
* Warn in the Add Data list when a file is at least this many bytes.
|
|
228
|
+
* `false` shows no file-size warning. Either this or {@link largeDatasetWarningRows}
|
|
229
|
+
* can show the same tag.
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```
|
|
233
|
+
* initApplicationConfig({largeDatasetWarningBytes: 50 * 1024 * 1024});
|
|
234
|
+
* initApplicationConfig({largeDatasetWarningBytes: false});
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
largeDatasetWarningBytes?: false | number;
|
|
238
|
+
/**
|
|
239
|
+
* File formats Kepler may load from drag-and-drop, the file picker, and remote URLs.
|
|
240
|
+
* Values are format ids or extensions (`csv`, `geojson`, `kml`, `shp`, `xlsx`, `fgb`, …).
|
|
241
|
+
* When omitted or `null`, every built-in format is accepted.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```
|
|
245
|
+
* initApplicationConfig({acceptedFileFormats: ['csv', 'geojson', 'parquet']});
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
acceptedFileFormats?: KeplerAcceptedFileFormat[] | null;
|
|
87
249
|
/**
|
|
88
250
|
* Custom SVG icons to be made available in the icon layer.
|
|
89
251
|
* These icons will be merged with the default icons fetched from CDN.
|
|
@@ -118,6 +280,23 @@ export type KeplerApplicationConfig = {
|
|
|
118
280
|
* ```
|
|
119
281
|
*/
|
|
120
282
|
customIconUrl?: string;
|
|
283
|
+
/** Controls Redux action logging verbosity in dev mode. See {@link ReduxLogLevel}. */
|
|
284
|
+
reduxLogLevel?: ReduxLogLevel;
|
|
285
|
+
/**
|
|
286
|
+
* If an Arrow/Parquet table has more record batches than this, they are
|
|
287
|
+
* compacted into a single batch. The default is `1`, so any table with more
|
|
288
|
+
* than one record batch is compacted. Deck.gl picking supports at most 255
|
|
289
|
+
* pickable leaf layers, and GeoJSON adds fill/stroke/point sublayers per
|
|
290
|
+
* batch, so a higher cap still overruns picking. Compacting copies the table.
|
|
291
|
+
* Progressive Arrow loading skips compaction on intermediate batches and
|
|
292
|
+
* compacts the completed file once. Set a very large number to never compact.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```
|
|
296
|
+
* initApplicationConfig({maxArrowBatches: 64});
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
maxArrowBatches?: number;
|
|
121
300
|
};
|
|
122
301
|
export declare const getApplicationConfig: () => Required<KeplerApplicationConfig>;
|
|
123
302
|
export declare function initApplicationConfig(appConfig?: KeplerApplicationConfig): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProtoDatasetField } from '@kepler.gl/types';
|
|
1
|
+
import { GeoArrowBinaryData, ProtoDatasetField } from '@kepler.gl/types';
|
|
2
2
|
import * as arrow from 'apache-arrow';
|
|
3
3
|
import { DATA_TYPES as AnalyzerDATA_TYPES } from 'type-analyzer';
|
|
4
4
|
import { DataContainerInterface, RangeOptions } from './data-container-interface';
|
|
@@ -7,6 +7,10 @@ type ArrowDataContainerInput = {
|
|
|
7
7
|
cols: arrow.Vector[];
|
|
8
8
|
fields?: ProtoDatasetField[];
|
|
9
9
|
arrowTable?: arrow.Table;
|
|
10
|
+
geoArrowBinaryData?: GeoArrowBinaryData;
|
|
11
|
+
};
|
|
12
|
+
type ArrowDataContainerUpdateOptions = {
|
|
13
|
+
geoArrowBinaryData?: GeoArrowBinaryData;
|
|
10
14
|
};
|
|
11
15
|
/**
|
|
12
16
|
* Check if table is an ArrowTable object.
|
|
@@ -29,6 +33,13 @@ export declare function isArrowTable(data: any): data is arrow.Table;
|
|
|
29
33
|
* @returns true if data is an ArrowVector object (type guarded)
|
|
30
34
|
*/
|
|
31
35
|
export declare function isArrowVector(data: any): data is arrow.Vector;
|
|
36
|
+
/**
|
|
37
|
+
* Normalize native point coordinates for deck.gl and loaders.gl. Interleaved
|
|
38
|
+
* coordinates are already usable and retain their buffers without copying.
|
|
39
|
+
*/
|
|
40
|
+
export declare function convertStructToFixedSizeList(coords: arrow.Data): arrow.Data<arrow.FixedSizeList>;
|
|
41
|
+
/** Build an Arrow vector while letting Arrow infer the physical type from converted values. */
|
|
42
|
+
export declare function createArrowVector(values: unknown[]): arrow.Vector;
|
|
32
43
|
/**
|
|
33
44
|
* Check if data is an Arrow FixedSizeList DataType.
|
|
34
45
|
* Uses duck-typing instead of `instanceof` to handle DuckDB's bundled Arrow version.
|
|
@@ -45,6 +56,25 @@ export declare function isArrowFixedSizeList(data: any): data is arrow.FixedSize
|
|
|
45
56
|
* @returns true if data is an Arrow Struct DataType (type guarded)
|
|
46
57
|
*/
|
|
47
58
|
export declare function isArrowStruct(data: any): data is arrow.Struct;
|
|
59
|
+
/**
|
|
60
|
+
* Collapse Arrow record batches into as few chunks as possible.
|
|
61
|
+
*
|
|
62
|
+
* Deck.gl picking encodes at most 255 pickable leaf layers. Kepler creates one
|
|
63
|
+
* Deck layer per Arrow record batch (and GeoJsonLayer adds fill/stroke/point
|
|
64
|
+
* sublayers), so parquet/DuckDB tables with hundreds of batches make hover and
|
|
65
|
+
* click miss most of the data. Combining chunks keeps picking under that cap
|
|
66
|
+
* without changing row values.
|
|
67
|
+
*
|
|
68
|
+
* apache-arrow JS does not expose Vector.combineChunks in the version Kepler
|
|
69
|
+
* uses, so we rebuild each column through a Builder (one chunk per column).
|
|
70
|
+
*
|
|
71
|
+
* Compaction only runs when `table.batches.length` is greater than
|
|
72
|
+
* `maxArrowBatches` from {@link getApplicationConfig} (default `1`) or the
|
|
73
|
+
* optional override. Progressive Arrow loading does not compact on each
|
|
74
|
+
* incoming batch; {@link ArrowDataContainer.update} assigns new chunks as-is
|
|
75
|
+
* and the completed file is compacted once.
|
|
76
|
+
*/
|
|
77
|
+
export declare function compactArrowTable(table: arrow.Table, maxArrowBatches?: number): arrow.Table;
|
|
48
78
|
/**
|
|
49
79
|
* A data container where all data is stored in raw Arrow table
|
|
50
80
|
*/
|
|
@@ -54,6 +84,7 @@ export declare class ArrowDataContainer implements DataContainerInterface {
|
|
|
54
84
|
_numRows: number;
|
|
55
85
|
_fields: ProtoDatasetField[];
|
|
56
86
|
_numChunks: number;
|
|
87
|
+
_geoArrowBinaryData: GeoArrowBinaryData;
|
|
57
88
|
/** An arrow table recreated from vectors */
|
|
58
89
|
_arrowTable: arrow.Table;
|
|
59
90
|
constructor(data: ArrowDataContainerInput);
|
|
@@ -63,8 +94,30 @@ export declare class ArrowDataContainer implements DataContainerInterface {
|
|
|
63
94
|
*/
|
|
64
95
|
private _createTable;
|
|
65
96
|
getTable(): arrow.Table<any>;
|
|
66
|
-
|
|
97
|
+
private _assignTable;
|
|
98
|
+
update(updateData: arrow.Vector<any>[] | arrow.Table, options?: ArrowDataContainerUpdateOptions): void;
|
|
99
|
+
/** Append typed rows atomically while retaining the container and prior snapshots. */
|
|
100
|
+
append(rows: any[][]): boolean;
|
|
101
|
+
replace(index: number, row: any[]): boolean;
|
|
102
|
+
/** @internal Match upsert keys in the same representation returned by valueAt. */
|
|
103
|
+
getRowEditKeys(rows: any[][], keyIndex: number): unknown[] | null;
|
|
104
|
+
/** @internal Encode a complete edit batch before replacing any live columns. */
|
|
105
|
+
replaceRows(replacements: Map<number, any[]>, appended: any[][]): boolean;
|
|
106
|
+
/** Delete unique valid indexes without decoding retained values. */
|
|
107
|
+
remove(indexes: number[]): boolean;
|
|
108
|
+
private _commitColumns;
|
|
109
|
+
private _columnsFromRows;
|
|
67
110
|
numChunks(): number;
|
|
111
|
+
getGeoArrowBinaryData(columnIndex: number, chunkIndex?: number): {
|
|
112
|
+
binaryGeometries: any[];
|
|
113
|
+
bounds: [number, number, number, number];
|
|
114
|
+
featureTypes: {
|
|
115
|
+
point: boolean;
|
|
116
|
+
line: boolean;
|
|
117
|
+
polygon: boolean;
|
|
118
|
+
};
|
|
119
|
+
meanCenters?: Array<number[] | null>;
|
|
120
|
+
} | undefined;
|
|
68
121
|
numRows(): number;
|
|
69
122
|
numColumns(): number;
|
|
70
123
|
valueAt(rowIndex: number, columnIndex: number): any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CameraSnapshot, CameraTour } from '@kepler.gl/types';
|
|
2
|
+
/** Validate imported stops and copy authored fields, omitting empty or unsafe tours. */
|
|
3
|
+
export declare function normalizeCameraTour(value: unknown): CameraTour | null;
|
|
4
|
+
export declare function getCameraTourDuration(tour: CameraTour | null | undefined): number;
|
|
5
|
+
/**
|
|
6
|
+
* Evaluate an authored tour at elapsed milliseconds, without clocks or rendering state.
|
|
7
|
+
* Holds precede travel; boundaries belong to the next stop and zero-length travel is a cut.
|
|
8
|
+
* Travel uses smoothstep easing and the shortest longitude/bearing rotation (180° ties go west).
|
|
9
|
+
* Time clamps to the tour; NaN means its start. The final hold contributes to duration.
|
|
10
|
+
*/
|
|
11
|
+
export declare function evaluateCameraTour(tour: CameraTour | null | undefined, elapsedMs: number): CameraSnapshot | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CameraBookmark, CameraSnapshot } from '@kepler.gl/types';
|
|
2
|
+
/** Copy only the saved camera fields; never retain transitions or viewport dimensions. */
|
|
3
|
+
export declare function getCameraSnapshot(value: unknown): CameraSnapshot | null;
|
|
4
|
+
/** Validate imported bookmarks, preserving order and the first occurrence of each ID. */
|
|
5
|
+
export declare function normalizeCameraBookmarks(value: unknown): CameraBookmark[];
|
|
6
|
+
/** Adapt a saved camera to the current projection without changing the saved view. */
|
|
7
|
+
export declare function cameraForMap(camera: CameraSnapshot, globe?: boolean): CameraSnapshot;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AGGREGATION_NAME = void 0;
|
|
8
|
+
exports.aggregate = aggregate;
|
|
9
|
+
exports.percentMean = exports.getMode = exports.getFrequency = exports.countUnique = void 0;
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
var _d3Array = require("d3-array");
|
|
12
|
+
var _constants = require("@kepler.gl/constants");
|
|
13
|
+
// SPDX-License-Identifier: MIT
|
|
14
|
+
// Copyright contributors to the kepler.gl project
|
|
15
|
+
|
|
16
|
+
var identity = function identity(d) {
|
|
17
|
+
return d;
|
|
18
|
+
};
|
|
19
|
+
var getFrequency = exports.getFrequency = function getFrequency(data) {
|
|
20
|
+
var accessor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
|
|
21
|
+
var occur = {};
|
|
22
|
+
for (var i = 0; i < data.length; i++) {
|
|
23
|
+
var val = accessor(data[i]);
|
|
24
|
+
occur[val] = (occur[val] || 0) + 1;
|
|
25
|
+
}
|
|
26
|
+
return occur;
|
|
27
|
+
};
|
|
28
|
+
var getMode = exports.getMode = function getMode(data, accessor) {
|
|
29
|
+
var occur = getFrequency(data, accessor);
|
|
30
|
+
return Object.keys(occur).reduce(function (prev, key) {
|
|
31
|
+
return occur[prev] >= occur[key] ? prev : key;
|
|
32
|
+
}, Object.keys(occur)[0]);
|
|
33
|
+
};
|
|
34
|
+
var countUnique = exports.countUnique = function countUnique(data) {
|
|
35
|
+
var accessor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
|
|
36
|
+
return Object.keys(data.reduce(function (uniques, d) {
|
|
37
|
+
var val = accessor(d);
|
|
38
|
+
uniques[val] = uniques[val] || 0;
|
|
39
|
+
uniques[val] += 1;
|
|
40
|
+
return uniques;
|
|
41
|
+
}, {})).length;
|
|
42
|
+
};
|
|
43
|
+
var percentMean = exports.percentMean = function percentMean(data, accessor) {
|
|
44
|
+
var getNumerator = accessor.getNumerator,
|
|
45
|
+
getDenominator = accessor.getDenominator;
|
|
46
|
+
var denominator = aggregate(data, _constants.AGGREGATION_TYPES.sum, getDenominator);
|
|
47
|
+
if (denominator <= 0) {
|
|
48
|
+
return 0;
|
|
49
|
+
}
|
|
50
|
+
var result = aggregate(data, _constants.AGGREGATION_TYPES.sum, getNumerator) / denominator;
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
function aggregate(data, technique) {
|
|
54
|
+
var accessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : identity;
|
|
55
|
+
switch (technique) {
|
|
56
|
+
case _constants.AGGREGATION_TYPES.average:
|
|
57
|
+
return (0, _d3Array.mean)(data, accessor);
|
|
58
|
+
case 'mean_of_percent':
|
|
59
|
+
return percentMean(data, accessor);
|
|
60
|
+
case _constants.AGGREGATION_TYPES.countUnique:
|
|
61
|
+
return countUnique(data, accessor);
|
|
62
|
+
case _constants.AGGREGATION_TYPES.mode:
|
|
63
|
+
return getMode(data, accessor);
|
|
64
|
+
case _constants.AGGREGATION_TYPES.maximum:
|
|
65
|
+
return (0, _d3Array.max)(data, accessor);
|
|
66
|
+
case _constants.AGGREGATION_TYPES.minimum:
|
|
67
|
+
return (0, _d3Array.min)(data, accessor);
|
|
68
|
+
case _constants.AGGREGATION_TYPES.median:
|
|
69
|
+
return (0, _d3Array.median)(data, accessor);
|
|
70
|
+
case _constants.AGGREGATION_TYPES.stdev:
|
|
71
|
+
return (0, _d3Array.deviation)(data, accessor);
|
|
72
|
+
case _constants.AGGREGATION_TYPES.sum:
|
|
73
|
+
return (0, _d3Array.sum)(data, accessor);
|
|
74
|
+
case _constants.AGGREGATION_TYPES.variance:
|
|
75
|
+
return (0, _d3Array.variance)(data, accessor);
|
|
76
|
+
default:
|
|
77
|
+
return data.length;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
var AGGREGATION_NAME = exports.AGGREGATION_NAME = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constants.AGGREGATION_TYPES.average, 'Average'), _constants.AGGREGATION_TYPES.countUnique, 'Number of Unique'), _constants.AGGREGATION_TYPES.mode, 'Most Often'), _constants.AGGREGATION_TYPES.maximum, 'Max'), _constants.AGGREGATION_TYPES.minimum, 'Min'), _constants.AGGREGATION_TYPES.median, 'Median'), _constants.AGGREGATION_TYPES.stdev, 'Std Deviation'), _constants.AGGREGATION_TYPES.sum, 'Total'), _constants.AGGREGATION_TYPES.variance, 'Variance');
|
|
81
|
+
|
|
82
|
+
// ratio: both denominator & numerator precent
|
|
83
|
+
// average, min, max, median,
|
|
84
|
+
//# sourceMappingURL=aggregation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregation.js","names":["_d3Array","require","_constants","identity","d","getFrequency","exports","data","accessor","arguments","length","undefined","occur","i","val","getMode","Object","keys","reduce","prev","key","countUnique","uniques","percentMean","getNumerator","getDenominator","denominator","aggregate","AGGREGATION_TYPES","sum","result","technique","average","mean","mode","maximum","max","minimum","min","median","stdev","deviation","variance","AGGREGATION_NAME","_defineProperty2"],"sources":["../../src/aggregation.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport {deviation, min, max, mean, median, sum, variance} from 'd3-array';\nimport {ValueOf} from '@kepler.gl/types';\nimport {AGGREGATION_TYPES, AggregationTypes} from '@kepler.gl/constants';\nconst identity = d => d;\n\nexport const getFrequency = (\n data: any[],\n accessor: (any: any) => any = identity\n): {[key: string | number]: number} => {\n const occur = {};\n for (let i = 0; i < data.length; i++) {\n const val = accessor(data[i]);\n occur[val] = (occur[val] || 0) + 1;\n }\n return occur;\n};\n\nexport const getMode = (data, accessor) => {\n const occur = getFrequency(data, accessor);\n return Object.keys(occur).reduce(\n (prev, key) => (occur[prev] >= occur[key] ? prev : key),\n Object.keys(occur)[0]\n );\n};\n\nexport const countUnique = (data, accessor = identity) => {\n return Object.keys(\n data.reduce((uniques, d) => {\n const val = accessor(d);\n uniques[val] = uniques[val] || 0;\n uniques[val] += 1;\n return uniques;\n }, {})\n ).length;\n};\n\nexport const percentMean = (data, accessor) => {\n const {getNumerator, getDenominator} = accessor;\n const denominator = aggregate(data, AGGREGATION_TYPES.sum, getDenominator);\n if (denominator <= 0) {\n return 0;\n }\n const result = aggregate(data, AGGREGATION_TYPES.sum, getNumerator) / denominator;\n return result;\n};\n\nexport function aggregate(\n data: any[],\n technique: ValueOf<AggregationTypes>,\n accessor: (any: any) => any = identity\n): any {\n switch (technique) {\n case AGGREGATION_TYPES.average:\n return mean(data, accessor);\n case 'mean_of_percent':\n return percentMean(data, accessor);\n case AGGREGATION_TYPES.countUnique:\n return countUnique(data, accessor);\n case AGGREGATION_TYPES.mode:\n return getMode(data, accessor);\n case AGGREGATION_TYPES.maximum:\n return max(data, accessor);\n case AGGREGATION_TYPES.minimum:\n return min(data, accessor);\n case AGGREGATION_TYPES.median:\n return median(data, accessor);\n case AGGREGATION_TYPES.stdev:\n return deviation(data, accessor);\n case AGGREGATION_TYPES.sum:\n return sum(data, accessor);\n case AGGREGATION_TYPES.variance:\n return variance(data, accessor);\n default:\n return data.length;\n }\n}\n\nexport const AGGREGATION_NAME: {\n [key: string]: string;\n} = {\n [AGGREGATION_TYPES.average]: 'Average',\n [AGGREGATION_TYPES.countUnique]: 'Number of Unique',\n [AGGREGATION_TYPES.mode]: 'Most Often',\n [AGGREGATION_TYPES.maximum]: 'Max',\n [AGGREGATION_TYPES.minimum]: 'Min',\n [AGGREGATION_TYPES.median]: 'Median',\n [AGGREGATION_TYPES.stdev]: 'Std Deviation',\n [AGGREGATION_TYPES.sum]: 'Total',\n [AGGREGATION_TYPES.variance]: 'Variance'\n};\n\n// ratio: both denominator & numerator precent\n// average, min, max, median,\n"],"mappings":";;;;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAA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AAG,QAAQ,GACnCX,4BAAiB,CAACY,KAAK,EAAG,eAAe,GACzCZ,4BAAiB,CAACC,GAAG,EAAG,OAAO,GAC/BD,4BAAiB,CAACc,QAAQ,EAAG,UAAU,CACzC;;AAED;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-config-types.js","names":[],"sources":["../../src/application-config-types.ts"],"sourcesContent":["// SPDX-License-Identifier: MIT\n// Copyright contributors to the kepler.gl project\n\nimport * as arrow from 'apache-arrow';\n\nexport interface DatabaseConnection {\n query(statement: string): Promise<arrow.Table>;\n insertArrowTable(arrowTable: arrow.Table, {name}: {name: string}): Promise<void>;\n close();\n}\n\nexport interface DatabaseAdapter {\n connect(): Promise<DatabaseConnection>;\n registerFileText(name: string, text: string): Promise<void>;\n registerFileHandle(name: string, handle: any, protocol: number, directIO: boolean): Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getApplicationConfig = void 0;
|
|
8
|
+
exports.initApplicationConfig = initApplicationConfig;
|
|
9
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
+
var _constants = require("@kepler.gl/constants");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != (0, _typeof2["default"])(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } // SPDX-License-Identifier: MIT
|
|
12
|
+
// Copyright contributors to the kepler.gl project
|
|
13
|
+
/**
|
|
14
|
+
* Represents a custom SVG icon that can be used in the icon layer.
|
|
15
|
+
* The mesh describes the icon's geometry as triangulated SVG paths.
|
|
16
|
+
*
|
|
17
|
+
* Important: Triangle cells must use counter-clockwise (CCW) winding order.
|
|
18
|
+
* Positions should be in the range [-1, 1] on both axes.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Detect if running with webpack build tool
|
|
23
|
+
*/
|
|
24
|
+
function isWebpackBuild() {
|
|
25
|
+
// @ts-ignore - __webpack_require__ is injected by webpack at runtime
|
|
26
|
+
return typeof __webpack_require__ !== 'undefined';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A mechanism to override default Kepler values/settings so that we
|
|
31
|
+
* without having to make application-specific changes to the kepler repo.
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Controls which Redux actions are suppressed by the dev-mode Redux logger.
|
|
35
|
+
* Mirrors the `log.level` convention used by luma.gl / deck.gl.
|
|
36
|
+
*
|
|
37
|
+
* - `0` — log every action (no filtering)
|
|
38
|
+
* - `1` — suppress the highest-frequency UI noise:
|
|
39
|
+
* MOUSE_MOVE, LAYER_HOVER, SET_MAP_BOUNDARY, SET_LOADING_INDICATOR,
|
|
40
|
+
* SET_LOADING_PROGRESS
|
|
41
|
+
* - `2` — suppress everything in level 1 plus map/layer update chatter:
|
|
42
|
+
* LOAD_MAP_STYLES, UPDATE_MAP, LAYER_VISUAL_CHANGE,
|
|
43
|
+
* ON_MAP_CLICK, FILTER_CHANGE, MAP_LOAD_STARTED
|
|
44
|
+
*
|
|
45
|
+
* Effects by context:
|
|
46
|
+
* - **redux-logger** (console output): only active when `NODE_ENV === 'local'` (i.e. `yarn start`)
|
|
47
|
+
* - **Redux DevTools** (`actionsBlacklist`): active whenever the browser extension is present,
|
|
48
|
+
* regardless of `NODE_ENV`
|
|
49
|
+
*
|
|
50
|
+
* Default: `1`
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* initApplicationConfig({ reduxLogLevel: 2 }); // quieter dev console
|
|
55
|
+
* initApplicationConfig({ reduxLogLevel: 0 }); // see every action
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/** Built-in file formats that can be listed in {@link KeplerApplicationConfig.acceptedFileFormats}. */
|
|
60
|
+
|
|
61
|
+
var DEFAULT_APPLICATION_CONFIG = {
|
|
62
|
+
defaultHtmlName: 'kepler.gl.html',
|
|
63
|
+
defaultImageName: 'kepler.gl.png',
|
|
64
|
+
defaultJsonName: 'kepler.gl.json',
|
|
65
|
+
defaultDataName: 'kepler.gl',
|
|
66
|
+
defaultExportJsonSettings: {
|
|
67
|
+
hasData: true
|
|
68
|
+
},
|
|
69
|
+
enableCustomExportBranding: true,
|
|
70
|
+
baseMapLibraryConfig: {
|
|
71
|
+
maplibre: {
|
|
72
|
+
getMapLib: function getMapLib() {
|
|
73
|
+
return Promise.resolve().then(function () {
|
|
74
|
+
return _interopRequireWildcard(require('maplibre-gl'));
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
mapLibCssClass: 'maplibregl',
|
|
78
|
+
mapLibAttributionCssClass: 'maplibre-attribution-container',
|
|
79
|
+
mapLibName: 'MapLibre',
|
|
80
|
+
mapLibUrl: 'https://www.maplibre.org/'
|
|
81
|
+
},
|
|
82
|
+
mapbox: {
|
|
83
|
+
getMapLib: function getMapLib() {
|
|
84
|
+
return Promise.resolve().then(function () {
|
|
85
|
+
return _interopRequireWildcard(require('mapbox-gl'));
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
mapLibCssClass: 'mapboxgl',
|
|
89
|
+
mapLibAttributionCssClass: 'mapbox-attribution-container',
|
|
90
|
+
mapLibName: 'Mapbox',
|
|
91
|
+
mapLibUrl: 'https://www.mapbox.com/'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
cdnUrl: _constants.KEPLER_UNFOLDED_BUCKET,
|
|
95
|
+
plugins: [],
|
|
96
|
+
// The default table class is KeplerTable.
|
|
97
|
+
// TODO include KeplerTable here when the circular dependency with @kepler.gl/table and @kepler.gl/utils are resolved.
|
|
98
|
+
table: null,
|
|
99
|
+
database: null,
|
|
100
|
+
useArrowProgressiveLoading: false,
|
|
101
|
+
useOnFilteredItemsChange: false,
|
|
102
|
+
// Raster Tile layer config
|
|
103
|
+
enableRasterTileLayer: true,
|
|
104
|
+
rasterServerUseLatestTitiler: true,
|
|
105
|
+
rasterServerShowServerInput: true,
|
|
106
|
+
rasterServerUrls: [],
|
|
107
|
+
// TODO: provide a default free server or leave blank
|
|
108
|
+
rasterServerSupportsElevation: true,
|
|
109
|
+
rasterServerMaxRetries: 1,
|
|
110
|
+
rasterServerRetryDelay: 10000,
|
|
111
|
+
rasterServerServerErrorsToRetry: [503],
|
|
112
|
+
rasterServerMaxPerServerRequests: 0,
|
|
113
|
+
// WMS layer config
|
|
114
|
+
enableWMSLayer: true,
|
|
115
|
+
// Zarr layer config -- experimental, disable via initApplicationConfig
|
|
116
|
+
enableZarrLayer: true,
|
|
117
|
+
// Flow layer config
|
|
118
|
+
enableFlowLayer: true,
|
|
119
|
+
// Bitmap layer config
|
|
120
|
+
enableBitmapLayer: true,
|
|
121
|
+
// A5 layer config
|
|
122
|
+
enableA5Layer: true,
|
|
123
|
+
// GeoHash layer config
|
|
124
|
+
enableGeohashLayer: true,
|
|
125
|
+
// Flow Field layer config
|
|
126
|
+
enableFlowFieldLayer: true,
|
|
127
|
+
// Contour layer config -- disable via initApplicationConfig
|
|
128
|
+
enableContourLayer: true,
|
|
129
|
+
// Voronoi Mosaic layer config -- disable via initApplicationConfig
|
|
130
|
+
enableVoronoiLayer: true,
|
|
131
|
+
// Donut layer config -- disable via initApplicationConfig
|
|
132
|
+
enableDonutLayer: true,
|
|
133
|
+
showInlineTilesetExamples: true,
|
|
134
|
+
// Image export config
|
|
135
|
+
// Default to true for webpack builds, false for other build tools (e.g., Vite)
|
|
136
|
+
escapeXhtmlForWebpack: isWebpackBuild(),
|
|
137
|
+
maxPitch: 60,
|
|
138
|
+
enableMapRepeat: false,
|
|
139
|
+
enableAnnotations: true,
|
|
140
|
+
enableDrawOnMapSketches: true,
|
|
141
|
+
enableMapNavigationControl: true,
|
|
142
|
+
enableMapScale: true,
|
|
143
|
+
enableFitBoundsOnManualLayer: true,
|
|
144
|
+
enableSwipeMode: true,
|
|
145
|
+
enableGlobeView: true,
|
|
146
|
+
enableLayerGroups: true,
|
|
147
|
+
themes: [],
|
|
148
|
+
enableColumnStats: true,
|
|
149
|
+
enableDatasetOps: true,
|
|
150
|
+
enableChartsPanel: true,
|
|
151
|
+
enableMapInfo: true,
|
|
152
|
+
enableCameraBookmarks: true,
|
|
153
|
+
enableCameraTour: true,
|
|
154
|
+
enableJsonEditors: true,
|
|
155
|
+
enableLayerJsonEditor: true,
|
|
156
|
+
enableFilterJsonEditor: true,
|
|
157
|
+
enableEffectJsonEditor: true,
|
|
158
|
+
enableViewportJsonEditor: false,
|
|
159
|
+
enableAnimationJsonEditor: true,
|
|
160
|
+
enableChartJsonEditor: true,
|
|
161
|
+
enableRemoteFileFormatSelector: false,
|
|
162
|
+
largeDatasetWarningRows: 500000,
|
|
163
|
+
largeDatasetWarningBytes: 1024 * 1024 * 1024,
|
|
164
|
+
acceptedFileFormats: null,
|
|
165
|
+
customIcons: [],
|
|
166
|
+
customIconUrl: '',
|
|
167
|
+
reduxLogLevel: 1,
|
|
168
|
+
maxArrowBatches: 1
|
|
169
|
+
};
|
|
170
|
+
var applicationConfig = DEFAULT_APPLICATION_CONFIG;
|
|
171
|
+
var getApplicationConfig = exports.getApplicationConfig = function getApplicationConfig() {
|
|
172
|
+
return applicationConfig;
|
|
173
|
+
};
|
|
174
|
+
function initApplicationConfig() {
|
|
175
|
+
var appConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
176
|
+
Object.assign(applicationConfig, appConfig);
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=application-config.js.map
|