Skip to content

Commit

Permalink
docs(table): update docs / major version bump for breaking changes.(#213
Browse files Browse the repository at this point in the history
)
  • Loading branch information
square-li committed Sep 13, 2022
1 parent 82f1e34 commit 86ac4ae
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 44 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 2.0.0 (2022-08-24)

### Features
* (**breaking changes**) add supports of sorting and filtering to iot-table. ([commit hash TBA]())
* iot-table now uses AWS-UI's table components (wrapped as a separated [package](https://github.com/awslabs/iot-app-kit/blob/main/packages/table)) instead of Synchro-chart's table component.
Check this [documentation](https://github.com/awslabs/iot-app-kit/blob/main/docs/Table.md) for more information about new APIs and migration from old API.


# 1.4.0 (2022-06-09)


Expand Down
101 changes: 65 additions & 36 deletions docs/Table.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const { query } = initialize({ iotsitewiseClient });
#### Web component example

```
import { initialize } from '@iot-app-kit/source-iotsitewise';
import { initialize, toId } from '@iot-app-kit/source-iotsitewise';
const { IoTSiteWiseClient } = require('@aws-sdk/client-iotsitewise');
const { defineCustomElements } = require('@iot-app-kit/components/loader');
defineCustomElements();
Expand Down Expand Up @@ -175,8 +175,6 @@ Specifies the data displayed in rows. Each item contains the data for one row. T

Type: Array of [Item](#item) objects

Required: Yes

#### `item`
An item maps its own properties to dataStreams. A special property name [$cellRef](#cellref) can be used to refer to a datastream.
Other properties of an item will remain unchanged.
Expand Down Expand Up @@ -207,15 +205,18 @@ const items: Item[] = [{
```


#### `$cellRef`
#### (optional) `$cellRef`
$cellRef is a special keyword in Item. We use it to find the according dataStream. For the above example,
the item has two properties. Both of them are using `$cellRef` to map properties to data stream.

Type: Object
- `id`
A string representing the id of a time series data stream, which you can get by utilizing the time series data source of choices toId helper, for example, with AWS IoT SiteWise, you can refer to an id with the following code:
- Type: String
- Required: Yes
- `resolution`
The resolution, in milliseconds, at which the data should be aggregated.
- Type: Number

```typescript jsx
import { toId } from '@iot-app-kit/source-sitewise';
const item = [
Expand All @@ -229,12 +230,6 @@ const item = [
}
]
```
- `resolution`
The resolution, in milliseconds, at which the data should be aggregated.
- Type: Number
- Required: Yes

Required: No


### `columnDefinitions`
Expand All @@ -248,9 +243,8 @@ with the following changes:

Type: Array of Object

Required: Yes

### `sorting`
### (optional)`sorting`

Specifies sorting configuration. If you want to use sorting with default settings, provide an empty object. This feature is only applicable for the table component.

Expand All @@ -260,8 +254,8 @@ Specifies sorting configuration. If you want to use sorting with default setting

Type: Object

Required: No
### `propertyFiltering`

### (optional)`propertyFiltering`

Specifies property filtering configuration.

Expand All @@ -278,7 +272,6 @@ Specifies property filtering configuration.

Type: Object

Required: No

### `viewport`

Expand Down Expand Up @@ -306,45 +299,81 @@ A viewport contains the following fields:

Type: String

Required: Yes

### `annotations`
### (optional)`annotations`

Defines thresholds for the table. To view and interact with an annotation example, see [Annotation](https://synchrocharts.com/#/Features/Annotation) in the Synchro Charts documentation. For more information about the `annotations` API, see [Properties](https://synchrocharts.com/#/API/Properties) in the Synchro Charts documentation.

Type: Object

Required: No

### `queries`

Selects what data to visualize. Learn more about queries, see [Core](https://github.com/awslabs/iot-app-kit/tree/main/docs/Core.md).

Type: Array

Required: Yes

### `styleSettings`
### (optional)`widgetId`

A map of `refId` to style settings for the table. Learn more about reference IDs, see [Core](https://github.com/awslabs/iot-app-kit/tree/main/docs/Core.md).
The ID of the widget. A widget is a visualization that you use the table component to create.

The table chart provides the following style settings that you can customize:
Type: String

* `name` string
(Optional) Specify a name to replace the name of the data set given by its source.
* `unit` string
(Optional) The unit given to the data (for example, `"m/s"` and `"count"`).
* `detailedName` string
(Optional) A detailed name that is presented in the tooltip.
### (optional)`messageOverrides`

Required: No
An object overrides messages for localization.

### `widgetId`
- `tableCellMessages`

The ID of the widget. A widget is a visualization that you use the table component to create.
(Optional) override table cell labels.

- Default:
``` typescript
{
loading: "Loading"
}
```

- `propertyFilteringMessages`

(Optional) override property filtering labels.

- Default:
```typescript
{
filteringAriaLabel: 'your choice',
dismissAriaLabel: 'Dismiss',
filteringPlaceholder: 'Search',
groupValuesText: 'Values',
groupPropertiesText: 'Properties',
operatorsText: 'Operators',
operationAndText: 'and',
operationOrText: 'or',
operatorLessText: 'Less than',
operatorLessOrEqualText: 'Less than or equal',
operatorGreaterText: 'Greater than',
operatorGreaterOrEqualText: 'Greater than or equal',
operatorContainsText: 'Contains',
operatorDoesNotContainText: 'Does not contain',
operatorEqualsText: 'Equals',
operatorDoesNotEqualText: 'Does not equal',
editTokenHeader: 'Edit filter',
propertyText: 'Property',
operatorText: 'Operator',
valueText: 'Value',
cancelActionText: 'Cancel',
applyActionText: 'Apply',
allPropertiesLabel: 'All properties',
tokenLimitShowMore: 'Show more',
tokenLimitShowFewer: 'Show fewer',
clearFiltersText: 'Clear filters',
removeTokenButtonAriaLabel: () => 'Remove token',
enteredTextLabel: (text) => `Use: "${text}"`,
};
```

Type: Object

Type: String

Required: No

-----
## Migrate from previous API
Expand Down
7 changes: 7 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 2.0.0 (2022-08-24)

### Features
* (**breaking changes**) add supports of sorting and filtering to iot-table. ([commit hash TBA]())
* iot-table now uses AWS-UI's table components (wrapped as a separated [package](https://github.com/awslabs/iot-app-kit/blob/main/packages/table)) instead of Synchro-chart's table component.
Check this [documentation](https://github.com/awslabs/iot-app-kit/blob/main/docs/Table.md) for more information about new APIs and migration from old API.

# 1.5.0 (2022-07-09)


Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"publishConfig": {
"access": "public"
},
"version": "1.5.0",
"version": "2.0.0",
"description": "IoT Application Kit core",
"main": "./dist/index.cj.js",
"module": "./dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"access": "public"
},
"sideEffects": false,
"version": "1.5.0",
"version": "2.0.0",
"description": "React specific wrapper for IoT Application Kit",
"author": {
"name": "Amazon Web Services",
Expand Down Expand Up @@ -46,7 +46,7 @@
"typescript": "^3.3.4000"
},
"dependencies": {
"@iot-app-kit/components": "^1.5.0"
"@iot-app-kit/components": "^2.0.0"
},
"peerDependencies": {
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/related-table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "1.5.0",
"version": "2.0.0",
"description": "IoT Application Kit - Related Table component",
"license": "Apache-2.0",
"main": "dist/index.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/source-iotsitewise/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "1.5.0",
"version": "2.0.0",
"description": "AWS IoT SiteWise source for IoT Application Kit",
"homepage": "https://github.com/awslabs/iot-app-kit#readme",
"license": "Apache-2.0",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@aws-sdk/client-iotsitewise": "^3.87.0",
"@iot-app-kit/core": "^1.5.0",
"@iot-app-kit/core": "^2.0.0",
"@rollup/plugin-typescript": "^8.3.0",
"@synchro-charts/core": "^6.0.0",
"dataloader": "^2.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "1.5.0",
"version": "2.0.0",
"description": "IoT Application Kit - Table component",
"license": "Apache-2.0",
"main": "./dist/index.cj.js",
Expand Down Expand Up @@ -53,7 +53,7 @@
"dependencies": {
"@awsui/collection-hooks": "^1.0.0",
"@awsui/components-react": "^3.0.0",
"@iot-app-kit/core": "^1.5.0",
"@iot-app-kit/core": "^2.0.0",
"@synchro-charts/core": "^5.0.0",
"d3-array": "^3.1.6",
"react": "^17.0.2",
Expand Down

0 comments on commit 86ac4ae

Please sign in to comment.