openlayers-style-editor 0.1.8 → 0.2.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.
@@ -1,6 +1,7 @@
1
1
  import { Color } from 'ol/color';
2
2
  import { FlatStyle } from 'ol/style/flat';
3
3
  import { Stop } from './components/rampColors.ts';
4
+ import { FilterRule } from './components/basedOnRules.tsx';
4
5
  export declare enum AttributeTypeEnum {
5
6
  'STRING' = 0,
6
7
  'INTEGER' = 1,
@@ -20,6 +21,7 @@ export interface Render {
20
21
  field?: string | null;
21
22
  graduatedType?: GraduatedModes;
22
23
  rendererOL: FlatStyle;
24
+ filters?: FilterRule[];
23
25
  }
24
26
  export declare enum RenderType {
25
27
  Unique = "Unique",
@@ -64,3 +66,7 @@ export declare function getRendererColorAndSizeStroke(renderer: Render): {
64
66
  size: number;
65
67
  };
66
68
  export declare function generateRandomColor(): Color;
69
+ export declare function getByRulesStyle(filters: {
70
+ filter: FilterRule;
71
+ ids: (string | number)[];
72
+ }[], idFieldName: string, elseFilter?: FilterRule): FlatStyle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openlayers-style-editor",
3
- "version": "0.1.8",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "description": "A style editor extension for OpenLayers currently working with WebGL Vector Layers",
6
6
  "homepage": "https://land-it.github.io/openlayers-style-editor/",
@@ -35,28 +35,30 @@
35
35
  "react-dom": ">= 17.0.0"
36
36
  },
37
37
  "dependencies": {
38
+ "@types/json-logic-js": "^2.0.8",
38
39
  "chart.js": "4.5.1",
39
40
  "geobuckets": "0.0.3",
40
- "i18next": "25.6.0",
41
+ "i18next": "25.8.18",
42
+ "json-logic-js": "2.0.5",
41
43
  "primeicons": "7.0.0",
42
44
  "primereact": "10.9.7",
43
45
  "react-best-gradient-color-picker": "3.0.14",
44
- "react-i18next": "16.2.0"
46
+ "react-i18next": "16.5.8"
45
47
  },
46
48
  "devDependencies": {
47
- "@eslint/js": "9.38.0",
48
- "@types/node": "24.9.1",
49
- "@types/react": "18.3.18",
50
- "@types/react-dom": "18.3.5",
51
- "@vitejs/plugin-react": "5.1.0",
52
- "eslint": "8.57.0",
53
- "eslint-plugin-react-hooks": "7.0.0",
54
- "eslint-plugin-react-refresh": "0.4.24",
55
- "globals": "16.4.0",
49
+ "@eslint/js": "10.0.1",
50
+ "@types/node": "25.5.0",
51
+ "@types/react": "19.2.14",
52
+ "@types/react-dom": "19.2.3",
53
+ "@vitejs/plugin-react": "6.0.1",
54
+ "eslint": "10.0.3",
55
+ "eslint-plugin-react-hooks": "7.0.1",
56
+ "eslint-plugin-react-refresh": "0.5.2",
57
+ "globals": "17.4.0",
56
58
  "typescript": "5.9.3",
57
- "typescript-eslint": "8.46.2",
58
- "vite": "6.4.1",
59
- "vite-plugin-css-injected-by-js": "3.5.2",
59
+ "typescript-eslint": "8.57.0",
60
+ "vite": "8.0.0",
61
+ "vite-plugin-css-injected-by-js": "4.0.1",
60
62
  "vite-plugin-dts": "4.5.4"
61
63
  },
62
64
  "publishConfig": {