Skip to content

Commit

Permalink
refactor(ReactComponents)!: remove web-component iot app kit visualiz…
Browse files Browse the repository at this point in the history
…ations

* deprecated StatusGrid, replaced with Status which supports only one status display
* deprecate old KPI which had a grid build in, replaced with Kpi that supports only one KPI widget
* API breaking change towards using thresholds property
  directly instead of holding thresholds in a annotations object
  • Loading branch information
diehbria committed Mar 20, 2023
1 parent 843c54d commit e0cb301
Show file tree
Hide file tree
Showing 39 changed files with 107 additions and 21,146 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
"description": "IoT App Kit Components",
"main": "dist/index.cjs.js",
"module": "dist/custom-elements/index.js",
"es2015": "dist/esm/index.mjs",
"es2017": "dist/esm/index.mjs",
"types": "dist/custom-elements/index.d.ts",
"collection": "dist/collection/collection-manifest.json",
"collection:main": "dist/collection/index.js",
"unpkg": "dist/iot-app-kit-components/iot-app-kit-components.esm.js",
"files": [
"dist/",
"loader/",
Expand Down Expand Up @@ -48,7 +45,7 @@
"pack": "npm pack",
"start": "stencil build --dev --watch --serve",
"test": "stencil test --spec",
"lint": "eslint . --max-warnings=7",
"lint": "eslint . --max-warnings=5",
"fix": "eslint --fix .",
"test.watch": "stencil test --spec --watchAll"
},
Expand Down
159 changes: 1 addition & 158 deletions packages/components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,13 @@
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { Annotations, DataType, Provider, StyleSettingsMap, TimeQuery, TimeSeriesData, TimeSeriesDataRequest, TimeSeriesDataRequestSettings, TreeQuery, Viewport } from "@iot-app-kit/core";
import { AlarmsConfig, Axis, LabelsConfig, LayoutConfig, MessageOverrides, MinimalSizeConfig, MovementConfig, ScaleConfig } from "@synchro-charts/core";
import { TreeQuery } from "@iot-app-kit/core";
import { BranchReference, SiteWiseAssetTreeNode } from "@iot-app-kit/source-iotsitewise";
import { ColumnDefinition, FilterTexts } from "./components/iot-resource-explorer/types";
import { TableProps } from "@awsui/components-react/table";
import { EmptyStateProps, ITreeNode, UseTreeCollection } from "@iot-app-kit/related-table";
import { NonCancelableCustomEvent } from "@awsui/components-react";
export namespace Components {
interface IotKpi {
"annotations": Annotations;
"isEditing": boolean | undefined;
"messageOverrides"?: MessageOverrides;
"queries": TimeQuery<TimeSeriesData[], TimeSeriesDataRequest>[];
"settings": TimeSeriesDataRequestSettings;
"styleSettings": StyleSettingsMap | undefined;
"viewport": Viewport;
"widgetId": string;
}
interface IotResourceExplorer {
"columnDefinitions": ColumnDefinition<any>[];
"empty"?: EmptyStateProps;
Expand All @@ -40,44 +29,8 @@ export namespace Components {
}
interface IotResourceExplorerDemo {
}
interface IotStatusGrid {
"annotations": Annotations;
"isEditing": boolean | undefined;
"labelsConfig": LabelsConfig;
"queries": TimeQuery<TimeSeriesData[], TimeSeriesDataRequest>[];
"settings": TimeSeriesDataRequestSettings;
"styleSettings": StyleSettingsMap | undefined;
"viewport": Viewport;
"widgetId": string;
}
interface IotStatusTimeline {
"alarms"?: AlarmsConfig;
"annotations"?: Annotations;
"axis"?: Axis.Options;
"gestures"?: boolean;
"isEditing": boolean | undefined;
"layout"?: LayoutConfig;
"messageOverrides"?: MessageOverrides;
"movement"?: MovementConfig;
"queries": TimeQuery<TimeSeriesData[], TimeSeriesDataRequest>[];
"scale"?: ScaleConfig;
"settings": TimeSeriesDataRequestSettings;
"size"?: MinimalSizeConfig;
"styleSettings": StyleSettingsMap | undefined;
"viewport": Viewport;
"widgetId": string;
}
interface IotTestRoutes {
}
interface IotTimeSeriesConnector {
"annotations": Annotations;
"assignDefaultColors": boolean | undefined;
"initialViewport": Viewport;
"provider": Provider<TimeSeriesData[]>;
"renderFunc": (data: TimeSeriesData) => void;
"styleSettings": StyleSettingsMap | undefined;
"supportedDataTypes": DataType[];
}
interface IotTreeTable {
"ariaLabels": TableProps.AriaLabels<unknown>;
"collectionOptions": UseTreeCollection<unknown>;
Expand All @@ -99,19 +52,8 @@ export namespace Components {
}
interface IotTreeTableDemo {
}
interface IotWebglContext {
"viewFrame": HTMLElement | Window | undefined;
}
interface TestingGroundAppKit {
}
}
declare global {
interface HTMLIotKpiElement extends Components.IotKpi, HTMLStencilElement {
}
var HTMLIotKpiElement: {
prototype: HTMLIotKpiElement;
new (): HTMLIotKpiElement;
};
interface HTMLIotResourceExplorerElement extends Components.IotResourceExplorer, HTMLStencilElement {
}
var HTMLIotResourceExplorerElement: {
Expand All @@ -124,30 +66,12 @@ declare global {
prototype: HTMLIotResourceExplorerDemoElement;
new (): HTMLIotResourceExplorerDemoElement;
};
interface HTMLIotStatusGridElement extends Components.IotStatusGrid, HTMLStencilElement {
}
var HTMLIotStatusGridElement: {
prototype: HTMLIotStatusGridElement;
new (): HTMLIotStatusGridElement;
};
interface HTMLIotStatusTimelineElement extends Components.IotStatusTimeline, HTMLStencilElement {
}
var HTMLIotStatusTimelineElement: {
prototype: HTMLIotStatusTimelineElement;
new (): HTMLIotStatusTimelineElement;
};
interface HTMLIotTestRoutesElement extends Components.IotTestRoutes, HTMLStencilElement {
}
var HTMLIotTestRoutesElement: {
prototype: HTMLIotTestRoutesElement;
new (): HTMLIotTestRoutesElement;
};
interface HTMLIotTimeSeriesConnectorElement extends Components.IotTimeSeriesConnector, HTMLStencilElement {
}
var HTMLIotTimeSeriesConnectorElement: {
prototype: HTMLIotTimeSeriesConnectorElement;
new (): HTMLIotTimeSeriesConnectorElement;
};
interface HTMLIotTreeTableElement extends Components.IotTreeTable, HTMLStencilElement {
}
var HTMLIotTreeTableElement: {
Expand All @@ -160,43 +84,15 @@ declare global {
prototype: HTMLIotTreeTableDemoElement;
new (): HTMLIotTreeTableDemoElement;
};
interface HTMLIotWebglContextElement extends Components.IotWebglContext, HTMLStencilElement {
}
var HTMLIotWebglContextElement: {
prototype: HTMLIotWebglContextElement;
new (): HTMLIotWebglContextElement;
};
interface HTMLTestingGroundAppKitElement extends Components.TestingGroundAppKit, HTMLStencilElement {
}
var HTMLTestingGroundAppKitElement: {
prototype: HTMLTestingGroundAppKitElement;
new (): HTMLTestingGroundAppKitElement;
};
interface HTMLElementTagNameMap {
"iot-kpi": HTMLIotKpiElement;
"iot-resource-explorer": HTMLIotResourceExplorerElement;
"iot-resource-explorer-demo": HTMLIotResourceExplorerDemoElement;
"iot-status-grid": HTMLIotStatusGridElement;
"iot-status-timeline": HTMLIotStatusTimelineElement;
"iot-test-routes": HTMLIotTestRoutesElement;
"iot-time-series-connector": HTMLIotTimeSeriesConnectorElement;
"iot-tree-table": HTMLIotTreeTableElement;
"iot-tree-table-demo": HTMLIotTreeTableDemoElement;
"iot-webgl-context": HTMLIotWebglContextElement;
"testing-ground-app-kit": HTMLTestingGroundAppKitElement;
}
}
declare namespace LocalJSX {
interface IotKpi {
"annotations"?: Annotations;
"isEditing"?: boolean | undefined;
"messageOverrides"?: MessageOverrides;
"queries": TimeQuery<TimeSeriesData[], TimeSeriesDataRequest>[];
"settings"?: TimeSeriesDataRequestSettings;
"styleSettings"?: StyleSettingsMap | undefined;
"viewport": Viewport;
"widgetId"?: string;
}
interface IotResourceExplorer {
"columnDefinitions"?: ColumnDefinition<any>[];
"empty"?: EmptyStateProps;
Expand All @@ -214,44 +110,8 @@ declare namespace LocalJSX {
}
interface IotResourceExplorerDemo {
}
interface IotStatusGrid {
"annotations"?: Annotations;
"isEditing"?: boolean | undefined;
"labelsConfig"?: LabelsConfig;
"queries": TimeQuery<TimeSeriesData[], TimeSeriesDataRequest>[];
"settings"?: TimeSeriesDataRequestSettings;
"styleSettings"?: StyleSettingsMap | undefined;
"viewport": Viewport;
"widgetId"?: string;
}
interface IotStatusTimeline {
"alarms"?: AlarmsConfig;
"annotations"?: Annotations;
"axis"?: Axis.Options;
"gestures"?: boolean;
"isEditing"?: boolean | undefined;
"layout"?: LayoutConfig;
"messageOverrides"?: MessageOverrides;
"movement"?: MovementConfig;
"queries": TimeQuery<TimeSeriesData[], TimeSeriesDataRequest>[];
"scale"?: ScaleConfig;
"settings"?: TimeSeriesDataRequestSettings;
"size"?: MinimalSizeConfig;
"styleSettings"?: StyleSettingsMap | undefined;
"viewport": Viewport;
"widgetId"?: string;
}
interface IotTestRoutes {
}
interface IotTimeSeriesConnector {
"annotations"?: Annotations;
"assignDefaultColors"?: boolean | undefined;
"initialViewport"?: Viewport;
"provider"?: Provider<TimeSeriesData[]>;
"renderFunc"?: (data: TimeSeriesData) => void;
"styleSettings"?: StyleSettingsMap | undefined;
"supportedDataTypes"?: DataType[];
}
interface IotTreeTable {
"ariaLabels"?: TableProps.AriaLabels<unknown>;
"collectionOptions": UseTreeCollection<unknown>;
Expand All @@ -273,40 +133,23 @@ declare namespace LocalJSX {
}
interface IotTreeTableDemo {
}
interface IotWebglContext {
"viewFrame"?: HTMLElement | Window | undefined;
}
interface TestingGroundAppKit {
}
interface IntrinsicElements {
"iot-kpi": IotKpi;
"iot-resource-explorer": IotResourceExplorer;
"iot-resource-explorer-demo": IotResourceExplorerDemo;
"iot-status-grid": IotStatusGrid;
"iot-status-timeline": IotStatusTimeline;
"iot-test-routes": IotTestRoutes;
"iot-time-series-connector": IotTimeSeriesConnector;
"iot-tree-table": IotTreeTable;
"iot-tree-table-demo": IotTreeTableDemo;
"iot-webgl-context": IotWebglContext;
"testing-ground-app-kit": TestingGroundAppKit;
}
}
export { LocalJSX as JSX };
declare module "@stencil/core" {
export namespace JSX {
interface IntrinsicElements {
"iot-kpi": LocalJSX.IotKpi & JSXBase.HTMLAttributes<HTMLIotKpiElement>;
"iot-resource-explorer": LocalJSX.IotResourceExplorer & JSXBase.HTMLAttributes<HTMLIotResourceExplorerElement>;
"iot-resource-explorer-demo": LocalJSX.IotResourceExplorerDemo & JSXBase.HTMLAttributes<HTMLIotResourceExplorerDemoElement>;
"iot-status-grid": LocalJSX.IotStatusGrid & JSXBase.HTMLAttributes<HTMLIotStatusGridElement>;
"iot-status-timeline": LocalJSX.IotStatusTimeline & JSXBase.HTMLAttributes<HTMLIotStatusTimelineElement>;
"iot-test-routes": LocalJSX.IotTestRoutes & JSXBase.HTMLAttributes<HTMLIotTestRoutesElement>;
"iot-time-series-connector": LocalJSX.IotTimeSeriesConnector & JSXBase.HTMLAttributes<HTMLIotTimeSeriesConnectorElement>;
"iot-tree-table": LocalJSX.IotTreeTable & JSXBase.HTMLAttributes<HTMLIotTreeTableElement>;
"iot-tree-table-demo": LocalJSX.IotTreeTableDemo & JSXBase.HTMLAttributes<HTMLIotTreeTableDemoElement>;
"iot-webgl-context": LocalJSX.IotWebglContext & JSXBase.HTMLAttributes<HTMLIotWebglContextElement>;
"testing-ground-app-kit": LocalJSX.TestingGroundAppKit & JSXBase.HTMLAttributes<HTMLTestingGroundAppKitElement>;
}
}
}

This file was deleted.

Loading

0 comments on commit e0cb301

Please sign in to comment.