@splunk/visualization-context 28.2.2 → 28.3.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.
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ export interface DataSourceApi {
3
+ subscribe: (bindingType: string, callback: () => void) => () => void;
4
+ }
5
+ declare const DataSourceContext: React.Context<DataSourceApi>;
6
+ export declare const DataSourceContextProvider: React.Provider<DataSourceApi>;
7
+ export declare const DataSourceContextConsumer: React.Consumer<DataSourceApi>;
8
+ export default DataSourceContext;
@@ -53,7 +53,7 @@ var DataSourceContext = react_exports.createContext({
53
53
  subscribe: () => () => {
54
54
  }
55
55
  });
56
- DataSourceContext.displayName = `data-splunk-visualization-version-DataSourceContext-${"28.2.2 - b595a32f1"}`;
56
+ DataSourceContext.displayName = `data-splunk-visualization-version-DataSourceContext-${"28.3.0 - 843e0f60b"}`;
57
57
  var DataSourceContextProvider = DataSourceContext.Provider;
58
58
  var DataSourceContextConsumer = DataSourceContext.Consumer;
59
59
  var DataSourceContext_default = DataSourceContext;
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ export interface Action {
3
+ label: string;
4
+ eventType: string;
5
+ eventtypeValues?: string[];
6
+ }
7
+ export type FieldAction = Action;
8
+ export type EventAction = Action & {
9
+ fieldFilters?: string[];
10
+ };
11
+ export type FieldActions = Record<string, FieldAction[]>;
12
+ export interface EventsContextInterface {
13
+ eventActions: EventAction[];
14
+ fieldActions: FieldActions;
15
+ isSplunkWebAvailable: boolean;
16
+ }
17
+ declare const EventsContext: React.Context<EventsContextInterface>;
18
+ export declare const EventsContextProvider: React.Provider<EventsContextInterface>;
19
+ export declare const EventsContextConsumer: React.Consumer<EventsContextInterface>;
20
+ export default EventsContext;
package/EventsContext.js CHANGED
@@ -54,7 +54,7 @@ var EventsContext = react_exports.createContext({
54
54
  fieldActions: {},
55
55
  isSplunkWebAvailable: false
56
56
  });
57
- EventsContext.displayName = `data-splunk-visualization-version-EventsContext-${"28.2.2 - b595a32f1"}`;
57
+ EventsContext.displayName = `data-splunk-visualization-version-EventsContext-${"28.3.0 - 843e0f60b"}`;
58
58
  var EventsContextProvider = EventsContext.Provider;
59
59
  var EventsContextConsumer = EventsContext.Consumer;
60
60
  var EventsContext_default = EventsContext;
@@ -50,7 +50,7 @@ var react_default = "default" in defaultImport ? defaultImport.default : default
50
50
 
51
51
  // src/FeatureFlagContext.jsx
52
52
  var FeatureFlagContext = react_default.createContext();
53
- var version = true ? "28.2.2 - b595a32f1" : "unknown";
53
+ var version = true ? "28.3.0 - 843e0f60b" : "unknown";
54
54
  FeatureFlagContext.displayName = `data-splunk-visualization-version-FeatureFlagContext-${version}`;
55
55
  var FeatureFlagContextProvider = FeatureFlagContext.Provider;
56
56
  var FeatureFlagContextConsumer = FeatureFlagContext.Consumer;
@@ -0,0 +1,15 @@
1
+ declare const defaultFeatureFlags: {
2
+ visualizations_useWebWorkersForDSL: boolean;
3
+ visualizations_enableTrellis: boolean;
4
+ visualizations_enableAcceleratedRender: boolean;
5
+ visualizations_enableEventsViewerTags: boolean;
6
+ visualizations_enableDownsampling: boolean;
7
+ visualizations_lazyLoadingDataFrame: boolean;
8
+ visualizations_bypassCloneDeepOptionScope: boolean;
9
+ visualizations_enableBubbleMapIcon: boolean;
10
+ visualizations_enableTooltipIcon: boolean;
11
+ };
12
+ type FeatureFlagKeys = keyof typeof defaultFeatureFlags | string;
13
+ export type FeatureFlags = Record<FeatureFlagKeys, boolean>;
14
+ declare const _default: FeatureFlags;
15
+ export default _default;
package/GeoContext.js CHANGED
@@ -50,7 +50,7 @@ var react_default = "default" in defaultImport ? defaultImport.default : default
50
50
 
51
51
  // src/GeoContext.jsx
52
52
  var GeoContext = react_default.createContext();
53
- GeoContext.displayName = `data-splunk-visualization-version-GeoContext-${"28.2.2 - b595a32f1"}`;
53
+ GeoContext.displayName = `data-splunk-visualization-version-GeoContext-${"28.3.0 - 843e0f60b"}`;
54
54
  var GeoContextProvider = GeoContext.Provider;
55
55
  var GeoContextConsumer = GeoContext.Consumer;
56
56
  var GeoContext_default = GeoContext;
package/IconContext.js CHANGED
@@ -50,7 +50,7 @@ var react_default = "default" in defaultImport ? defaultImport.default : default
50
50
 
51
51
  // src/IconContext.jsx
52
52
  var IconContext = react_default.createContext();
53
- IconContext.displayName = `data-splunk-visualization-version-IconContext-${"28.2.2 - b595a32f1"}`;
53
+ IconContext.displayName = `data-splunk-visualization-version-IconContext-${"28.3.0 - 843e0f60b"}`;
54
54
  var IconContextProvider = IconContext.Provider;
55
55
  var IconContextConsumer = IconContext.Consumer;
56
56
  var IconContext_default = IconContext;
package/ImageContext.js CHANGED
@@ -50,7 +50,7 @@ var react_default = "default" in defaultImport ? defaultImport.default : default
50
50
 
51
51
  // src/ImageContext.jsx
52
52
  var ImageContext = react_default.createContext();
53
- ImageContext.displayName = `data-splunk-visualization-version-ImageContext-${"28.2.2 - b595a32f1"}`;
53
+ ImageContext.displayName = `data-splunk-visualization-version-ImageContext-${"28.3.0 - 843e0f60b"}`;
54
54
  var ImageContextProvider = ImageContext.Provider;
55
55
  var ImageContextConsumer = ImageContext.Consumer;
56
56
  var ImageContext_default = ImageContext;
package/LICENSE.md CHANGED
@@ -408,7 +408,6 @@ This Configuration and Implementation Services Exhibit forms a part of the Splun
408
408
  8. **Insurance**
409
409
 
410
410
  Throughout any period of C&I Services we perform for you, we will maintain insurance policies in the types and amounts described below at our own expense:
411
-
412
411
  - Commercial General Liability Insurance with a limit of not less than $1,000,000 per occurrence and a general aggregate limit of not less than $2,000,000.
413
412
 
414
413
  - Business Auto Insurance with a limit of not less than $1,000,000 combined single limit. Such Insurance will cover liability arising out of &quot;hired and non-owned&quot; automobiles.
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import type { StyleSpecification, LayerSpecification } from 'maplibre-gl';
3
+ /**
4
+ * We are omitting the `sources`, `layers`, `verison` properties, and re-adding them with some constraint
5
+ * 1. Changing `sources` and `layers` from optional to required
6
+ * 2. Limiting `sources` type to `VectorSource` and `RasterSource` for MVP
7
+ * 3. `version` property is specific to MapLibre and is always an 8. We will add this internally in the
8
+ * Viz map component and not let the consumers bother
9
+ */
10
+ export interface BaseTileConfig extends Omit<StyleSpecification, 'sources' | 'layers' | 'version'> {
11
+ name: string;
12
+ key?: string;
13
+ theme?: 'light' | 'dark';
14
+ sources?: {
15
+ [sourceName: string]: Record<string, unknown>;
16
+ };
17
+ layers?: LayerSpecification[];
18
+ version?: number;
19
+ }
20
+ export interface MapContextInterface {
21
+ defaultTileConfig?: BaseTileConfig[];
22
+ customTileConfig?: BaseTileConfig[];
23
+ mapboxAccessToken?: string;
24
+ }
25
+ declare const MapContext: React.Context<MapContextInterface>;
26
+ export declare const MapContextProvider: React.Provider<MapContextInterface>;
27
+ export declare const MapContextConsumer: React.Consumer<MapContextInterface>;
28
+ export default MapContext;
29
+ export declare const testTileConfig: BaseTileConfig[];
package/MapContext.js CHANGED
@@ -53,7 +53,7 @@ var react_default = "default" in defaultImport ? defaultImport.default : default
53
53
  var MapContext = react_exports.createContext({
54
54
  defaultTileConfig: []
55
55
  });
56
- MapContext.displayName = `data-splunk-visualization-version-MapContext-${"28.2.2 - b595a32f1"}`;
56
+ MapContext.displayName = `data-splunk-visualization-version-MapContext-${"28.3.0 - 843e0f60b"}`;
57
57
  var MapContextProvider = MapContext.Provider;
58
58
  var MapContextConsumer = MapContext.Consumer;
59
59
  var MapContext_default = MapContext;
package/MapContext.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/MapContext.tsx", "esm-externals:react"],
4
- "sourcesContent": ["import * as React from 'react';\nimport type { StyleSpecification, LayerSpecification } from 'maplibre-gl';\n\n// Global provided via webpack\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __VISION_VERSION__: string;\n\n/**\n * We are omitting the `sources`, `layers`, `verison` properties, and re-adding them with some constraint\n * 1. Changing `sources` and `layers` from optional to required\n * 2. Limiting `sources` type to `VectorSource` and `RasterSource` for MVP\n * 3. `version` property is specific to MapLibre and is always an 8. We will add this internally in the\n * Viz map component and not let the consumers bother\n */\nexport interface BaseTileConfig extends Omit<StyleSpecification, 'sources' | 'layers' | 'version'> {\n name: string; // used to populate the tile server dropdown in editor, eg: 'Mapbox Streets V8 tileset'\n key: string; // sets the Viz map option - 'baseLayerTileServer'\n theme?: 'light' | 'dark'; // if no theme is specified, the tileserver is available for all themes\n sources: {\n [sourceName: string]: Record<string, unknown>;\n };\n layers: LayerSpecification[];\n version?: number;\n}\n\nexport interface MapContextInterface {\n defaultTileConfig: BaseTileConfig[];\n customTileConfig?: BaseTileConfig[];\n mapboxAccessToken?: string;\n}\n\nconst MapContext = React.createContext<MapContextInterface>({\n defaultTileConfig: [],\n});\nMapContext.displayName = `data-splunk-visualization-version-MapContext-${__VISION_VERSION__}`;\n\nexport const MapContextProvider = MapContext.Provider;\nexport const MapContextConsumer = MapContext.Consumer;\nexport default MapContext;\n\nexport const testTileConfig: BaseTileConfig[] = [\n {\n name: 'Carto Base Map - Light',\n key: 'carto.base.map.light',\n theme: 'light',\n sources: {\n 'base-tiles': {\n type: 'raster',\n tiles: ['https://a.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png'],\n tileSize: 256,\n },\n },\n layers: [\n {\n id: 'base-layer',\n type: 'raster',\n source: 'base-tiles',\n minzoom: 0,\n maxzoom: 12,\n paint: {\n 'raster-fade-duration': 0,\n },\n },\n ],\n },\n {\n name: 'Cart Base Map - dark',\n key: 'carto.base.map.dark',\n theme: 'dark',\n sources: {\n 'base-tiles': {\n type: 'raster',\n tiles: ['https://a.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png'],\n tileSize: 256,\n },\n },\n layers: [\n {\n id: 'base-layer',\n type: 'raster',\n source: 'base-tiles',\n minzoom: 0,\n maxzoom: 12,\n paint: {\n 'raster-fade-duration': 0,\n },\n },\n ],\n },\n];\n", "\nimport * as defaultImport from \"react\";\nexport * from \"react\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport type { StyleSpecification, LayerSpecification } from 'maplibre-gl';\n\n// Global provided via webpack\n// eslint-disable-next-line no-underscore-dangle\ndeclare const __VISION_VERSION__: string;\n\n/**\n * We are omitting the `sources`, `layers`, `verison` properties, and re-adding them with some constraint\n * 1. Changing `sources` and `layers` from optional to required\n * 2. Limiting `sources` type to `VectorSource` and `RasterSource` for MVP\n * 3. `version` property is specific to MapLibre and is always an 8. We will add this internally in the\n * Viz map component and not let the consumers bother\n */\nexport interface BaseTileConfig extends Omit<StyleSpecification, 'sources' | 'layers' | 'version'> {\n name: string; // used to populate the tile server dropdown in editor, eg: 'Mapbox Streets V8 tileset'\n key?: string; // sets the Viz map option - 'baseLayerTileServer'\n theme?: 'light' | 'dark'; // if no theme is specified, the tileserver is available for all themes\n sources?: {\n [sourceName: string]: Record<string, unknown>;\n };\n layers?: LayerSpecification[];\n version?: number;\n}\n\nexport interface MapContextInterface {\n defaultTileConfig?: BaseTileConfig[];\n customTileConfig?: BaseTileConfig[];\n mapboxAccessToken?: string;\n}\n\nconst MapContext = React.createContext<MapContextInterface>({\n defaultTileConfig: [],\n});\nMapContext.displayName = `data-splunk-visualization-version-MapContext-${__VISION_VERSION__}`;\n\nexport const MapContextProvider = MapContext.Provider;\nexport const MapContextConsumer = MapContext.Consumer;\nexport default MapContext;\n\nexport const testTileConfig: BaseTileConfig[] = [\n {\n name: 'Carto Base Map - Light',\n key: 'carto.base.map.light',\n theme: 'light',\n sources: {\n 'base-tiles': {\n type: 'raster',\n tiles: ['https://a.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}.png'],\n tileSize: 256,\n },\n },\n layers: [\n {\n id: 'base-layer',\n type: 'raster',\n source: 'base-tiles',\n minzoom: 0,\n maxzoom: 12,\n paint: {\n 'raster-fade-duration': 0,\n },\n },\n ],\n },\n {\n name: 'Cart Base Map - dark',\n key: 'carto.base.map.dark',\n theme: 'dark',\n sources: {\n 'base-tiles': {\n type: 'raster',\n tiles: ['https://a.basemaps.cartocdn.com/rastertiles/dark_all/{z}/{x}/{y}.png'],\n tileSize: 256,\n },\n },\n layers: [\n {\n id: 'base-layer',\n type: 'raster',\n source: 'base-tiles',\n minzoom: 0,\n maxzoom: 12,\n paint: {\n 'raster-fade-duration': 0,\n },\n },\n ],\n },\n];\n", "\nimport * as defaultImport from \"react\";\nexport * from \"react\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,0BAAc;AACd,IAAO,gBAAS,aAAa,gBAA8B,wBAAU;;;AD4BrE,IAAM,aAAmB,4BAAmC;AAAA,EACxD,mBAAmB,CAAC;AACxB,CAAC;AACD,WAAW,cAAc,gDAAgD,oBAAkB;AAEpF,IAAM,qBAAqB,WAAW;AACtC,IAAM,qBAAqB,WAAW;AAC7C,IAAO,qBAAQ;AAER,IAAM,iBAAmC;AAAA,EAC5C;AAAA,IACI,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,MACL,cAAc;AAAA,QACV,MAAM;AAAA,QACN,OAAO,CAAC,kFAAkF;AAAA,QAC1F,UAAU;AAAA,MACd;AAAA,IACJ;AAAA,IACA,QAAQ;AAAA,MACJ;AAAA,QACI,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,UACH,wBAAwB;AAAA,QAC5B;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AAAA,EACA;AAAA,IACI,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,MACL,cAAc;AAAA,QACV,MAAM;AAAA,QACN,OAAO,CAAC,sEAAsE;AAAA,QAC9E,UAAU;AAAA,MACd;AAAA,IACJ;AAAA,IACA,QAAQ;AAAA,MACJ;AAAA,QACI,IAAI;AAAA,QACJ,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,UACH,wBAAwB;AAAA,QAC5B;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ interface MessageContextInterface {
3
+ cspMessageLink?: string;
4
+ }
5
+ declare const MessageContext: React.Context<MessageContextInterface>;
6
+ export declare const MessageContextProvider: React.Provider<MessageContextInterface>;
7
+ export declare const MessageContextConsumer: React.Consumer<MessageContextInterface>;
8
+ export default MessageContext;
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * ianaTimezone can be used to specify a timezone corresponding to one of the entries in the IANA time zone database (e.g. America/Los_Angeles)
4
+ *
5
+ * serializedTimezone is Splunk's serialized timezone format and is usually present in enterprise via window.$C.SERVER_ZONEINFO
6
+ * serialized time format examples can be found here https://git.splunk.com/projects/UI/repos/splunk-ui/browse/packages/moment/src/test/timezones
7
+ *
8
+ * utcOffset can be used to specify the desired display timezone via its offset from UTC time in minutes
9
+ * Positive values are west, negative values are east of UTC, as in the ECMAScript getTimezoneOffset method
10
+ */
11
+ export interface TimezoneContextInterface {
12
+ ianaTimezone?: string;
13
+ serializedTimezone?: string;
14
+ utcOffset?: number;
15
+ }
16
+ declare const TimezoneContext: React.Context<TimezoneContextInterface>;
17
+ export declare const TimezoneContextProvider: React.Provider<TimezoneContextInterface>;
18
+ export declare const TimezoneContextConsumer: React.Consumer<TimezoneContextInterface>;
19
+ export default TimezoneContext;
@@ -50,7 +50,7 @@ var react_default = "default" in defaultImport ? defaultImport.default : default
50
50
 
51
51
  // src/TimezoneContext.ts
52
52
  var TimezoneContext = react_exports.createContext({});
53
- TimezoneContext.displayName = `data-splunk-visualization-version-TimezoneContext-${"28.2.2 - b595a32f1"}`;
53
+ TimezoneContext.displayName = `data-splunk-visualization-version-TimezoneContext-${"28.3.0 - 843e0f60b"}`;
54
54
  var TimezoneContextProvider = TimezoneContext.Provider;
55
55
  var TimezoneContextConsumer = TimezoneContext.Consumer;
56
56
  var TimezoneContext_default = TimezoneContext;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ export declare const ZoomContextProvider: React.Provider<number>;
3
+ export declare const useZoomContext: () => number;
package/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "name": "@splunk/visualization-context",
3
3
  "license": "SEE LICENSE IN LICENSE.md",
4
4
  "author": "Splunk",
5
- "version": "28.2.2",
5
+ "version": "28.3.0",
6
6
  "scripts": {
7
- "build": "viz-build --no-types",
7
+ "build": "viz-build",
8
8
  "build:ci": "yarn build && yarn docs",
9
9
  "clean": "yarn clean:esbuild && yarn clean:test-reports",
10
10
  "clean:esbuild": "git ls-files --others -i --exclude-standard *.js *.map | xargs rm",
11
11
  "clean:test-reports": "rm -rf ./test-reports",
12
- "dev": "viz-build --no-types --watch",
12
+ "dev": "viz-build --watch",
13
13
  "lint": "eslint src --ext \".js,.jsx,.ts,.tsx\"",
14
14
  "lint:ci": "eslint src --ext \".js,.jsx,.ts,.tsx\" -f junit -o test-reports/lint-results.xml",
15
15
  "lint:fix": "eslint src --ext \".js,.jsx,.ts,.tsx\" --fix",
@@ -19,7 +19,7 @@
19
19
  "version": "yarn build"
20
20
  },
21
21
  "dependencies": {
22
- "@splunk/ui-utils": "^1.10.0",
22
+ "@splunk/ui-utils": "^1.11.0",
23
23
  "uuid-v4": "^0.1.0"
24
24
  },
25
25
  "peerDependencies": {
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "devDependencies": {
30
30
  "@splunk/eslint-config": "^5.0.0",
31
- "@splunk/visualization-build-tools": "^28.2.2",
31
+ "@splunk/visualization-build-tools": "^28.3.0",
32
32
  "@testing-library/react": "^16.3.0",
33
33
  "@testing-library/user-event": "^14.6.1",
34
34
  "jest-localstorage-mock": "^2.4.26"
package/tsconfig.json CHANGED
@@ -3,14 +3,16 @@
3
3
  "sourceMap": true,
4
4
  "module": "commonjs",
5
5
  "target": "es6",
6
- "jsx": "react"
6
+ "jsx": "react",
7
+ "declaration": true,
8
+ "declarationDir": ".",
7
9
  },
8
10
  "include": [
9
- "**/*.ts",
10
- "**/*.tsx"
11
+ "src/**/*.ts",
12
+ "src/**/*.tsx"
11
13
  ],
12
14
  "exclude": [
13
- "node_modules/**/*",
14
- "./src/**/*.test.ts"
15
+ "src/**/*.test.ts",
16
+ "src/**/*.test.tsx",
15
17
  ]
16
18
  }