forked from opensearch-project/opensearch-dashboards-sdk-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defining and exporting types `application` and `mount` to be utilized and implemented. Published with ``` npm publish --access public ``` Example publish: https://www.npmjs.com/package/@avillk/opensearch-dashboards-sdk Example of working solution of consuming the SDK: https://github.com/kavilla/OpenSearch-Dashboards-1/tree/avillk/consume-sdk-2 Generate docs with the following: ``` yarn gen:doc ``` Issue Resolved: opensearch-project#42 Signed-off-by: Kawika Avilla <[email protected]>
- Loading branch information
Showing
32 changed files
with
3,677 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
npm-debug.log | ||
test/benchmarks | ||
opensearch | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"prettier" | ||
], | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"prettier" | ||
], | ||
"rules": { | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"endOfLine": "auto" | ||
} | ||
], | ||
/*temporarily turn off no-unused-vars, open an issue to track https://github.com/opensearch-project/opensearch-js/issues/241*/ | ||
"no-unused-vars": "off", | ||
/*temporarily turn off no-dupe-else-if, open an issue to track https://github.com/opensearch-project/opensearch-js/issues/240*/ | ||
"no-dupe-else-if": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# https://docs.codecov.com/docs/codecov-yaml | ||
codecov: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
status: | ||
project: | ||
default: | ||
# https://docs.codecov.com/docs/commit-status#target | ||
target: auto # coverage must be equal or above the previous commit | ||
target: auto | ||
threshold: 2% # the leniency in hitting the target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
node_modules/ | ||
docs/ | ||
reports/ | ||
tmp/ | ||
wiki/ | ||
generator-oui/ | ||
test/ | ||
src-docs/ | ||
packages/react-datepicker | ||
packages/eslint-plugin | ||
.nvmrc | ||
|
||
# typescript output | ||
types/ | ||
|
||
# ignore everything in `scripts` except postinstall.js | ||
scripts/!(postinstall.js) | ||
|
||
src/**/*.!(scss) | ||
|
||
.DS_Store | ||
.eslintcache | ||
.idea | ||
.vscode | ||
.yo-rc.json | ||
package-lock.json | ||
npm-debug.log | ||
.cache-loader | ||
*.md | ||
yarn-error.log | ||
tsconfig.json | ||
tsconfig-builttypes.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://typedoc.org/schema.json", | ||
"entryPoints": [ | ||
"./lib/application/index.d.ts", | ||
"./lib/mount/index.d.ts", | ||
], | ||
"tsconfig": "./tsconfig.json", | ||
"out": "./docs", | ||
"gitRemote": "upstream", | ||
"exclude": ["**/node_modules/**"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@opensearch-project/opensearch-dashboards-sdk / [Modules](modules.md) | ||
|
||
# OpenSearch Dashboards SDK for JS | ||
|
||
- [Introduction](#introduction) | ||
- [Contributing](#contributing) | ||
- [Developer Guide](#developer-guide) | ||
- [Design](#design) | ||
- [Maintainers](#maintainers) | ||
- [Code of Conduct](#code-of-conduct) | ||
- [License](#license) | ||
- [Copyright](#copyright) | ||
|
||
## Introduction | ||
OpenSearch Dashboards plugins have allowed the extension and enhancements of various core features however, current plugin architecture carries the risk of fatally impacting clusters should they fail. In order to ensure that plugins may run safely without impacting the system, our goal is to effectively isolate plugin interactions with OpenSearch Dashboards by modularizing the extension points to which they hook onto. | ||
|
||
## Contributing | ||
See [CONTRIBUTING](CONTRIBUTING.md) | ||
|
||
## Developer Guide | ||
* Clone this project | ||
* Run `yarn` | ||
* Within OpenSearch Dashboards, run `yarn add link:${path to this repo}/opensearch-dashboards-sdk-js --dev` | ||
|
||
## Design | ||
TODO | ||
|
||
## Maintainers | ||
See [MAINTAINERS](MAINTAINERS.md) | ||
|
||
## Code of Conduct | ||
|
||
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
## License | ||
|
||
This project is licensed under the [Apache v2.0 License](LICENSE). | ||
|
||
## Copyright | ||
|
||
Copyright OpenSearch Contributors. See [NOTICE](NOTICE) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[@opensearch-project/opensearch-dashboards-sdk](../README.md) / [Modules](../modules.md) / [application](../modules/application.md) / AppLeaveActionFactory | ||
|
||
# Interface: AppLeaveActionFactory | ||
|
||
[application](../modules/application.md).AppLeaveActionFactory | ||
|
||
Factory provided when invoking a [AppLeaveHandler](../modules/application.md#appleavehandler) to retrieve the [AppLeaveAction](../modules/application.md#appleaveaction) to execute. | ||
|
||
## Table of contents | ||
|
||
### Methods | ||
|
||
- [confirm](application.AppLeaveActionFactory.md#confirm) | ||
- [default](application.AppLeaveActionFactory.md#default) | ||
|
||
## Methods | ||
|
||
### confirm | ||
|
||
▸ **confirm**(`text`, `title?`): [`AppLeaveConfirmAction`](application.AppLeaveConfirmAction.md) | ||
|
||
Returns a confirm action, resulting on prompting a message to the user before leaving the | ||
application, allowing him to choose if he wants to stay on the app or confirm that he | ||
wants to leave. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `text` | `string` | The text to display in the confirmation message | | ||
| `title?` | `string` | (optional) title to display in the confirmation message | | ||
|
||
#### Returns | ||
|
||
[`AppLeaveConfirmAction`](application.AppLeaveConfirmAction.md) | ||
|
||
#### Defined in | ||
|
||
[application/app_leave.ts:77](https://github.com/opensearch-project/opensearch-dashboards-sdk-js/blob/8190d60/lib/application/app_leave.ts#L77) | ||
|
||
___ | ||
|
||
### default | ||
|
||
▸ **default**(): [`AppLeaveDefaultAction`](application.AppLeaveDefaultAction.md) | ||
|
||
Returns a default action, resulting on executing the default behavior when | ||
the user tries to leave an application | ||
|
||
#### Returns | ||
|
||
[`AppLeaveDefaultAction`](application.AppLeaveDefaultAction.md) | ||
|
||
#### Defined in | ||
|
||
[application/app_leave.ts:82](https://github.com/opensearch-project/opensearch-dashboards-sdk-js/blob/8190d60/lib/application/app_leave.ts#L82) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
[@opensearch-project/opensearch-dashboards-sdk](../README.md) / [Modules](../modules.md) / [application](../modules/application.md) / AppLeaveConfirmAction | ||
|
||
# Interface: AppLeaveConfirmAction | ||
|
||
[application](../modules/application.md).AppLeaveConfirmAction | ||
|
||
Action to return from a [AppLeaveHandler](../modules/application.md#appleavehandler) to show a confirmation | ||
message when trying to leave an application. | ||
|
||
See [AppLeaveActionFactory](application.AppLeaveActionFactory.md) | ||
|
||
## Table of contents | ||
|
||
### Properties | ||
|
||
- [text](application.AppLeaveConfirmAction.md#text) | ||
- [title](application.AppLeaveConfirmAction.md#title) | ||
- [type](application.AppLeaveConfirmAction.md#type) | ||
|
||
## Properties | ||
|
||
### text | ||
|
||
• **text**: `string` | ||
|
||
#### Defined in | ||
|
||
[application/app_leave.ts:52](https://github.com/opensearch-project/opensearch-dashboards-sdk-js/blob/8190d60/lib/application/app_leave.ts#L52) | ||
|
||
___ | ||
|
||
### title | ||
|
||
• `Optional` **title**: `string` | ||
|
||
#### Defined in | ||
|
||
[application/app_leave.ts:53](https://github.com/opensearch-project/opensearch-dashboards-sdk-js/blob/8190d60/lib/application/app_leave.ts#L53) | ||
|
||
___ | ||
|
||
### type | ||
|
||
• **type**: `confirm` | ||
|
||
#### Defined in | ||
|
||
[application/app_leave.ts:51](https://github.com/opensearch-project/opensearch-dashboards-sdk-js/blob/8190d60/lib/application/app_leave.ts#L51) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[@opensearch-project/opensearch-dashboards-sdk](../README.md) / [Modules](../modules.md) / [application](../modules/application.md) / AppLeaveDefaultAction | ||
|
||
# Interface: AppLeaveDefaultAction | ||
|
||
[application](../modules/application.md).AppLeaveDefaultAction | ||
|
||
Action to return from a [AppLeaveHandler](../modules/application.md#appleavehandler) to execute the default | ||
behaviour when leaving the application. | ||
|
||
See [AppLeaveActionFactory](application.AppLeaveActionFactory.md) | ||
|
||
## Table of contents | ||
|
||
### Properties | ||
|
||
- [type](application.AppLeaveDefaultAction.md#type) | ||
|
||
## Properties | ||
|
||
### type | ||
|
||
• **type**: `default` | ||
|
||
#### Defined in | ||
|
||
[application/app_leave.ts:39](https://github.com/opensearch-project/opensearch-dashboards-sdk-js/blob/8190d60/lib/application/app_leave.ts#L39) |
Oops, something went wrong.