@eox/layercontrol 1.9.0 → 1.10.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/dist/eox-layercontrol.js +3778 -47284
- package/dist/eox-layercontrol.umd.cjs +175 -1353
- package/package.json +2 -2
- package/src/components/layer-config.js +181 -14
- package/src/components/layer-tools.js +13 -0
- package/src/helpers/get-start-vals.js +56 -15
- package/src/helpers/index.js +6 -0
- package/src/helpers/update-geozarr-band.js +445 -0
- package/src/methods/layer/first-updated.js +11 -5
- package/src/methods/layer-config/apply-updated-styles.js +61 -24
- package/types/components/layer-config.d.ts +6 -6
- package/types/components/layer-config.d.ts.map +1 -1
- package/types/components/layer-tools.d.ts +1 -0
- package/types/components/layer-tools.d.ts.map +1 -1
- package/types/helpers/get-start-vals.d.ts.map +1 -1
- package/types/helpers/index.d.ts +1 -0
- package/types/helpers/update-geozarr-band.d.ts +49 -0
- package/types/helpers/update-geozarr-band.d.ts.map +1 -0
- package/types/methods/layer/first-updated.d.ts.map +1 -1
- package/types/methods/layer-config/apply-updated-styles.d.ts +1 -1
- package/types/methods/layer-config/apply-updated-styles.d.ts.map +1 -1
- package/dist/blosc-JROzDOnd.js +0 -692
- package/dist/chunk-INHXZS53-CsrPGdTf.js +0 -13
- package/dist/lz4-CUYSbVey.js +0 -626
- package/dist/zstd-YMzMcush.js +0 -583
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes an appropriate step for number/range inputs based on the range difference.
|
|
3
|
+
* @param {number} min
|
|
4
|
+
* @param {number} max
|
|
5
|
+
* @returns {number}
|
|
6
|
+
*/
|
|
7
|
+
export function computeStep(min: number, max: number): number;
|
|
8
|
+
/**
|
|
9
|
+
* Builds schema property definitions for min and max controls based on valid_range.
|
|
10
|
+
* If validRange is available, uses number inputs with native incrementing buttons (format: "number").
|
|
11
|
+
* If no validRange is available, uses range sliders (format: "range").
|
|
12
|
+
*
|
|
13
|
+
* @param {number} [min]
|
|
14
|
+
* @param {number} [max]
|
|
15
|
+
* @param {number[] | null | undefined} [validRange]
|
|
16
|
+
* @returns {{ minProp: Record<string, any>, maxProp: Record<string, any> }}
|
|
17
|
+
*/
|
|
18
|
+
export function buildMinMaxProperties(min?: number, max?: number, validRange?: number[] | null | undefined): {
|
|
19
|
+
minProp: Record<string, any>;
|
|
20
|
+
maxProp: Record<string, any>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Resolves the target min and max range for a given GeoZarr band.
|
|
24
|
+
* Uses 'valid_range' from layer's _geozarrVariables if available,
|
|
25
|
+
* otherwise falls back to defaults 0/1.
|
|
26
|
+
*
|
|
27
|
+
* @param {import("ol/layer/Base").default|any} layer
|
|
28
|
+
* @param {string} band
|
|
29
|
+
* @param {any} [_layerConfig]
|
|
30
|
+
* @returns {{ targetMin: number, targetMax: number }}
|
|
31
|
+
*/
|
|
32
|
+
export function getGeoZarrBandRange(layer: import("ol/layer/Base").default | any, band: string, _layerConfig?: any): {
|
|
33
|
+
targetMin: number;
|
|
34
|
+
targetMax: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Updates the active band on a GeoZarr layer, updating its source,
|
|
38
|
+
* updating bands and min/max style variables and layerConfig from valid_range (or fallback to defaults),
|
|
39
|
+
* and updating layerDatetime / timeControlValues.
|
|
40
|
+
*
|
|
41
|
+
* @param {import("ol/layer/Base").default|any} layer
|
|
42
|
+
* @param {string} newBand
|
|
43
|
+
* @returns {Promise<{ targetMin: number, targetMax: number } | undefined>}
|
|
44
|
+
*/
|
|
45
|
+
export function updateGeoZarrBand(layer: import("ol/layer/Base").default | any, newBand: string): Promise<{
|
|
46
|
+
targetMin: number;
|
|
47
|
+
targetMax: number;
|
|
48
|
+
} | undefined>;
|
|
49
|
+
//# sourceMappingURL=update-geozarr-band.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-geozarr-band.d.ts","sourceRoot":"","sources":["../../src/helpers/update-geozarr-band.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,iCAJW,MAAM,OACN,MAAM,GACJ,MAAM,CAUlB;AAED;;;;;;;;;GASG;AACH,4CALW,MAAM,QACN,MAAM,eACN,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,GACzB;IAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,CAiE1E;AAED;;;;;;;;;GASG;AACH,2CALW,OAAO,eAAe,EAAE,OAAO,GAAC,GAAG,QACnC,MAAM,iBACN,GAAG,GACD;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CA2BpD;AAED;;;;;;;;GAQG;AACH,yCAJW,OAAO,eAAe,EAAE,OAAO,GAAC,GAAG,WACnC,MAAM,GACJ,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC,CAqTzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"first-updated.d.ts","sourceRoot":"","sources":["../../../src/methods/layer/first-updated.js"],"names":[],"mappings":";AAKA;;;;;GAKG;AACH,0DAFW,OAAO,wBAAwB,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"first-updated.d.ts","sourceRoot":"","sources":["../../../src/methods/layer/first-updated.js"],"names":[],"mappings":";AAKA;;;;;GAKG;AACH,0DAFW,OAAO,wBAAwB,EAAE,oBAAoB,QAiE/D"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @param { import("ol/layer/Layer").default} layer
|
|
4
4
|
* @param { import("../../components/layer-config").EOxLayerControlLayerConfig['layerConfig']} layerConfig
|
|
5
5
|
* */
|
|
6
|
-
export default function _default(jsonformOutput: Record<string, number>, layer: import("ol/layer/Layer").default, layerConfig: import("../../components/layer-config").EOxLayerControlLayerConfig["layerConfig"]): void
|
|
6
|
+
export default function _default(jsonformOutput: Record<string, number>, layer: import("ol/layer/Layer").default, layerConfig: import("../../components/layer-config").EOxLayerControlLayerConfig["layerConfig"]): Promise<void>;
|
|
7
7
|
/**
|
|
8
8
|
* updating the variables assigned in the layer style
|
|
9
9
|
* from the `styles.variables` property
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-updated-styles.d.ts","sourceRoot":"","sources":["../../../src/methods/layer-config/apply-updated-styles.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply-updated-styles.d.ts","sourceRoot":"","sources":["../../../src/methods/layer-config/apply-updated-styles.js"],"names":[],"mappings":"AAEA;;;;KAIK;AACL,iDAJW,MAAM,CAAC,MAAM,EAAC,MAAM,CAAC,SACpB,OAAO,gBAAgB,EAAE,OAAO,eAChC,OAAO,+BAA+B,EAAE,0BAA0B,CAAC,aAAa,CAAC,iBA8F5F;AA+BD;;;;;GAKG;AACH,+CAHW,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,uBA+B5B;AA5DM,mCAFI,MAAM,CAAC,MAAM,EAAC,GAAG,CAAC,uBA0B5B"}
|