@sigmacomputing/plugin 1.0.0-rc.2 → 1.0.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.
- package/README.md +7 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/initialize.d.ts +1 -1
- package/dist/client/initialize.d.ts.map +1 -1
- package/dist/client/initialize.js +1 -1
- package/dist/client/react/Context.d.ts +1 -1
- package/dist/client/react/Context.d.ts.map +1 -1
- package/dist/client/react/Context.js +1 -1
- package/dist/client/react/Provider.d.ts +1 -1
- package/dist/client/react/Provider.d.ts.map +1 -1
- package/dist/client/react/Provider.js +1 -1
- package/dist/client/react/hooks.d.ts +1 -1
- package/dist/client/react/hooks.d.ts.map +1 -1
- package/dist/client/react/hooks.js +2 -2
- package/dist/client/react/index.d.ts +4 -4
- package/dist/client/react/index.d.ts.map +1 -1
- package/dist/client/react/index.js +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/.gitignore +0 -30
- package/.lintstagedrc +0 -3
- package/.nvmrc +0 -1
- package/.prettierrc +0 -5
- package/CHANGELOG.md +0 -25
- package/CONTRIBUTING.md +0 -60
- package/assets/sigma-logo-dark.svg +0 -54
- package/assets/sigma-logo-light.svg +0 -50
- package/jest.config.ts +0 -22
- package/src/client/__tests__/initialize.test.ts +0 -30
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -35
- package/yarn.lock +0 -3226
package/README.md
CHANGED
|
@@ -14,6 +14,13 @@ Plugins are built using Sigma’s Plugin API. This API communicates data and
|
|
|
14
14
|
interaction events between a Sigma workbook and the plugin. Plugins are hosted
|
|
15
15
|
by their developer and rendered in an iframe in Sigma.
|
|
16
16
|
|
|
17
|
+
#### Warning: Breaking Changes
|
|
18
|
+
|
|
19
|
+
`@sigmacomputing/plugin` has moved to https://github.com/sigmacomputing/plugin and
|
|
20
|
+
is now open source. Please read our
|
|
21
|
+
[CHANGELOG.md](https://github.com/sigmacomputing/plugin/blob/main/CHANGELOG.md)
|
|
22
|
+
to review any breaking changes that have been made.
|
|
23
|
+
|
|
17
24
|
## Requirements
|
|
18
25
|
|
|
19
26
|
To test your plugin in Sigma Plugin Dev Playground, you must:
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,qBAA0B;AAE/C,eAAO,MAAM,MAAM,iCAAe,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initialize = exports.client = void 0;
|
|
4
|
-
const initialize_1 = require("
|
|
4
|
+
const initialize_1 = require("client/initialize");
|
|
5
5
|
Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return initialize_1.initialize; } });
|
|
6
6
|
exports.client = (0, initialize_1.initialize)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/client/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAKf,
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../src/client/initialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAKf,iBAAc;AAEf,wBAAgB,UAAU,CAAC,CAAC,GAAG,EAAE,KAAK,cAAc,CAAC,CAAC,CAAC,CA6LtD"}
|
|
@@ -21,7 +21,7 @@ function initialize() {
|
|
|
21
21
|
emit('config', (_a = pluginConfig.config) !== null && _a !== void 0 ? _a : {});
|
|
22
22
|
});
|
|
23
23
|
// send initialize event
|
|
24
|
-
void execPromise('wb:plugin:init', require(
|
|
24
|
+
void execPromise('wb:plugin:init', require('../../package.json').version).then(config => {
|
|
25
25
|
Object.assign(pluginConfig, config);
|
|
26
26
|
emit('init', pluginConfig);
|
|
27
27
|
emit('config', pluginConfig.config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/client/react/Context.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/client/react/Context.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,cAAc,EAAE,oBAAc;AAEvC,eAAO,MAAM,aAAa,8CAAwC,CAAC"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PluginContext = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const client_1 = require("
|
|
5
|
+
const client_1 = require("client");
|
|
6
6
|
exports.PluginContext = (0, react_1.createContext)(client_1.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/client/react/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/client/react/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,cAAc,EAAE,oBAAc;AAEvC,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,GAAG;IAC/C,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,GAAG,GAAG,EACzC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,eAOnC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SigmaClientProvider = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const Context_1 = require("
|
|
5
|
+
const Context_1 = require("client/react/Context");
|
|
6
6
|
function SigmaClientProvider(props) {
|
|
7
7
|
return ((0, jsx_runtime_1.jsx)(Context_1.PluginContext.Provider, Object.assign({ value: props.client }, { children: props.children })));
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PluginInstance, CustomPluginConfigOptions, WorkbookElementColumns, WorkbookElementData, WorkbookVariable } from
|
|
1
|
+
import { PluginInstance, CustomPluginConfigOptions, WorkbookElementColumns, WorkbookElementData, WorkbookVariable } from "../../types";
|
|
2
2
|
/**
|
|
3
3
|
* Gets the entire plugin instance
|
|
4
4
|
* @returns {PluginInstance} Context for the current plugin instance
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/client/react/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EAEnB,gBAAgB,EACjB,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/client/react/hooks.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EAEnB,gBAAgB,EACjB,oBAAc;AAGf;;;GAGG;AACH,wBAAgB,SAAS,IAAI,cAAc,CAAC,GAAG,CAAC,CAE/C;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,yBAAyB,EAAE,GACvC,IAAI,CAWN;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,OAAO,GACpB,CAAC,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,CAezC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,CAWpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,CAW9D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAmB3C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CACzB,EAAE,EAAE,MAAM,GACT,CAAC,gBAAgB,GAAG,SAAS,EAAE,QAAQ,CAAC,CAc1C;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAoBrB"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useInteraction = exports.useVariable = exports.useConfig = exports.useElementData = exports.useElementColumns = exports.useLoadingState = exports.useEditorPanelConfig = exports.usePlugin = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const Context_1 = require("
|
|
6
|
-
const deepEqual_1 = require("
|
|
5
|
+
const Context_1 = require("client/react/Context");
|
|
6
|
+
const deepEqual_1 = require("utils/deepEqual");
|
|
7
7
|
/**
|
|
8
8
|
* Gets the entire plugin instance
|
|
9
9
|
* @returns {PluginInstance} Context for the current plugin instance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export { SigmaClientProviderProps, SigmaClientProvider, } from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "..";
|
|
2
|
+
export * from "./hooks";
|
|
3
|
+
export { SigmaClientProviderProps, SigmaClientProvider, } from "./Provider";
|
|
4
|
+
export * from "../../types";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/react/index.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/react/index.tsx"],"names":[],"mappings":"AAAA,mBAAuB;AAEvB,wBAAmC;AACnC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,mBAA8B;AAE/B,4BAAsB"}
|
|
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SigmaClientProvider = void 0;
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
__exportStar(require("
|
|
20
|
-
var Provider_1 = require("
|
|
18
|
+
__exportStar(require("client"), exports);
|
|
19
|
+
__exportStar(require("client/react/hooks"), exports);
|
|
20
|
+
var Provider_1 = require("client/react/Provider");
|
|
21
21
|
Object.defineProperty(exports, "SigmaClientProvider", { enumerable: true, get: function () { return Provider_1.SigmaClientProvider; } });
|
|
22
|
-
__exportStar(require("
|
|
22
|
+
__exportStar(require("types"), exports);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./client";
|
|
2
|
+
export * from "./types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yBAAuB;AACvB,wBAAsB"}
|
package/dist/index.js
CHANGED
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
18
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("client"), exports);
|
|
18
|
+
__exportStar(require("types"), exports);
|
package/package.json
CHANGED
package/.gitignore
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
node_modules/
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
coverage/
|
|
8
|
-
|
|
9
|
-
# production
|
|
10
|
-
dist/
|
|
11
|
-
|
|
12
|
-
# misc
|
|
13
|
-
.DS_Store
|
|
14
|
-
.env.local
|
|
15
|
-
.envrc
|
|
16
|
-
eslint_output.json
|
|
17
|
-
tsc_output
|
|
18
|
-
|
|
19
|
-
npm-debug.log*
|
|
20
|
-
yarn-debug.log*
|
|
21
|
-
yarn-error.log*
|
|
22
|
-
|
|
23
|
-
# vim
|
|
24
|
-
*.swp
|
|
25
|
-
|
|
26
|
-
# IDE files
|
|
27
|
-
.idea
|
|
28
|
-
|
|
29
|
-
# typescript
|
|
30
|
-
tsconfig*.tsbuildinfo
|
package/.lintstagedrc
DELETED
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
v16.13.1
|
package/.prettierrc
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
## v1.0.0 (September 2nd, 2022)
|
|
2
|
-
|
|
3
|
-
`@sigmacomputing/plugin` has moved to https://github.com/sigmacomputing/plugin and
|
|
4
|
-
is now open source. Feel free to create an issue or contribute by opening a pull
|
|
5
|
-
request. Read out `CONTRIBUTING.md` guide to get started.
|
|
6
|
-
|
|
7
|
-
#### Breaking Changes
|
|
8
|
-
|
|
9
|
-
- `@sigmacomputing/plugin-types` has been merged with `@sigmacomputing/plugin`
|
|
10
|
-
and will no longer received updates in the future. Please use only
|
|
11
|
-
`@sigmacomputing/plugin` going forward.
|
|
12
|
-
|
|
13
|
-
- All `react` exports (`SigmaClientProvider` and all hooks) have been moved to
|
|
14
|
-
a separate explicit export. This will allow better bundle splitting by not
|
|
15
|
-
including `react` specific code for plugins that do not use `react`.
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
// before
|
|
19
|
-
import { SigmaClientProvider, usePlugin } from '@sigmacomputing/plugin';
|
|
20
|
-
|
|
21
|
-
// after
|
|
22
|
-
import { SigmaClientProvider, usePlugin } from '@sigmacomputing/plugin/react';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
All types can be imported from either `@sigmacomputing/plugin` or `@sigmacomputing/plugin/react`
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
## Initial setup
|
|
2
|
-
|
|
3
|
-
Start by forking the `@sigmacomputing/plugin` repo and cloning it locally.
|
|
4
|
-
|
|
5
|
-
```shs
|
|
6
|
-
git clone https://github.com/your-username/sigmacomputing-plugin.git
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
Navigate to the `sigmacomputing-plugin` directory and install the required
|
|
10
|
-
dependencies with the following commands:
|
|
11
|
-
|
|
12
|
-
```sh
|
|
13
|
-
# Ensure you have node version 16 installed (suggestion: v16.13.1).
|
|
14
|
-
nvm install
|
|
15
|
-
yarn install
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Start Developing
|
|
19
|
-
|
|
20
|
-
You can run any of the scripts located in the `package.json` using:
|
|
21
|
-
|
|
22
|
-
```sh
|
|
23
|
-
yarn <script-name>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
For example, you can run the build process with
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
yarn build
|
|
30
|
-
# Or in watch mode
|
|
31
|
-
yarn build:watch
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Add tests
|
|
35
|
-
|
|
36
|
-
Unit tests ensure that `@sigmacomputing/plugin` doesn't break accidentally. If
|
|
37
|
-
your code can regress in non-obvious ways, include unit tests with your PR. Use
|
|
38
|
-
the following naming convention:
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
+-- parentFolder
|
|
42
|
-
| +-- __tests__
|
|
43
|
-
| +-- [filename].test.ts
|
|
44
|
-
| +-- [filename].ts
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Our unit test suite uses [jest](https://jestjs.io/)
|
|
48
|
-
|
|
49
|
-
## Submit a pull request
|
|
50
|
-
|
|
51
|
-
Before submitting your contribution, run the test suite one last time with:
|
|
52
|
-
|
|
53
|
-
```sh
|
|
54
|
-
yarn test
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Doing this prevents last-minute bugs and is also a great way to get your
|
|
58
|
-
contribution merged faster once you submit your pull request. Failing to do so
|
|
59
|
-
will lead to one of the maintainers mark the pull request with the Work in
|
|
60
|
-
Progress label until all tests pass.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
4
|
-
y="0px" viewBox="0 0 841.9 595.3" style="enable-background:new 0 0 841.9 595.3;" xml:space="preserve">
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
.st0 {
|
|
7
|
-
fill: #00C3AF;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.st1 {
|
|
11
|
-
fill: #FFFFFF;
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
<g>
|
|
15
|
-
<g>
|
|
16
|
-
<polygon class="st0" points="279.2,379.8 205.4,347.7 253.1,347.7 " />
|
|
17
|
-
<polygon class="st0" points="233.3,315.1 285.6,379.2 264.8,281.4 " />
|
|
18
|
-
<polygon class="st0" points="164.4,246.8 229.5,311.3 261,277.7 " />
|
|
19
|
-
<polygon class="st0" points="289.8,247.5 265.4,273.6 241.8,266.1 " />
|
|
20
|
-
<polygon class="st0" points="295,249.8 281.1,263.8 318.8,264.5 " />
|
|
21
|
-
</g>
|
|
22
|
-
<g>
|
|
23
|
-
<g>
|
|
24
|
-
<path class="st1" d="M372.1,291.1h15v60.2h-15V291.1z" />
|
|
25
|
-
</g>
|
|
26
|
-
<g>
|
|
27
|
-
<path class="st1" d="M459.7,291.1v51.7c0,27.1-12.8,38.8-33,38.8c-12.1,0-22.7-6.7-27.8-17.7l12.1-5.7c2.9,5.9,9.3,9.8,15.7,9.8
|
|
28
|
-
c11.3,0,18.4-6.7,18.4-23.8v-0.9c-4.2,6.2-12.3,9.3-19.5,9.3c-15.5,0-28.9-12.2-28.9-31.5c0-19.3,13.3-31.3,28.8-31.3
|
|
29
|
-
c7.6,0,15.5,3,19.6,9.2v-7.9H459.7z M444.8,321c0-10.6-8.6-17.3-17-17.3c-9.1,0-16.5,7.2-16.5,17.3s7.4,17.5,16.5,17.5
|
|
30
|
-
C436.8,338.5,444.8,331.6,444.8,321z" />
|
|
31
|
-
</g>
|
|
32
|
-
<g>
|
|
33
|
-
<path class="st1" d="M567.5,317.5v33.8h-14.8v-32.6c0-9.7-5-14.4-12-14.4c-8.6,0-14.1,6.4-13.4,17.3l-0.1-0.5v30.3h-15v-32.6
|
|
34
|
-
c0-9.7-5-14.4-11.5-14.4c-7,0-13.9,3.9-13.9,15.3v31.7h-15v-60.2h15v10.3c2.2-7.6,10.4-11.6,17.9-11.6c8.8,0,16,4.1,19.5,11.9
|
|
35
|
-
c4.8-9.5,14.2-11.9,20.2-11.9C559.5,289.8,567.5,300,567.5,317.5z" />
|
|
36
|
-
</g>
|
|
37
|
-
<g>
|
|
38
|
-
<path class="st1"
|
|
39
|
-
d="M312.1,332.6H327c0,4.1,3.8,8,10.5,8c6.3,0,10.4-2.7,10.4-6.6c0-3.4-2.7-4.9-7.5-5.9l-8.5-2.1
|
|
40
|
-
c-14.3-3.6-18-10.8-18-18.4c0-9.4,9.8-17.7,23.7-17.7c11.3,0,24.1,5.3,24,18.8h-15.1c0-4.3-4-6.8-8.5-6.8c-4.9,0-8.3,2.6-8.3,6.3
|
|
41
|
-
c0,3.1,3.1,4.9,6.8,5.7l10.2,2.6c14.3,3.5,16.9,12,16.9,17.5c0,12.2-13,18.7-25.9,18.7C325.1,352.7,312.4,345.5,312.1,332.6z" />
|
|
42
|
-
</g>
|
|
43
|
-
<g>
|
|
44
|
-
<ellipse class="st1" cx="379.6" cy="276.5" rx="9" ry="9.3" />
|
|
45
|
-
</g>
|
|
46
|
-
<g>
|
|
47
|
-
<path class="st1" d="M632.6,315.3v36h-14.7v-8c-4,5.5-12.6,9.3-20.6,9.3c-12.5,0-21.5-7.3-21.5-18.7c0-12.1,10.4-18.8,23.7-18.8
|
|
48
|
-
c6.8,0,13.7,1.7,18.4,4.3v-3.6c0-7.6-5.2-12.9-13.6-12.9c-7.2,0-14,2.7-17.1,6.4l-8.1-8.5c4.9-6.6,15.1-11,26.1-11
|
|
49
|
-
C621.1,289.8,632.6,298.8,632.6,315.3z M617.9,331.8v-2.4c-3.9-2.4-10.1-4-15.8-4c-8.2,0-12.3,3.6-12.3,7.9
|
|
50
|
-
c0,4.3,3.9,7.1,10.3,7.1C606.6,340.4,614.3,337.1,617.9,331.8z" />
|
|
51
|
-
</g>
|
|
52
|
-
</g>
|
|
53
|
-
</g>
|
|
54
|
-
</svg>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
-
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
|
4
|
-
y="0px" viewBox="0 0 841.9 595.3" style="enable-background:new 0 0 841.9 595.3;" xml:space="preserve">
|
|
5
|
-
<style type="text/css">
|
|
6
|
-
.st0 {
|
|
7
|
-
fill: #00C3AF;
|
|
8
|
-
}
|
|
9
|
-
</style>
|
|
10
|
-
<g>
|
|
11
|
-
<g>
|
|
12
|
-
<polygon class="st0" points="255.8,388.4 153.6,344 219.7,344 " />
|
|
13
|
-
<polygon class="st0" points="192.3,298.8 264.6,387.6 235.9,252.2 " />
|
|
14
|
-
<polygon class="st0" points="96.9,204.4 187,293.7 230.6,247.1 " />
|
|
15
|
-
<polygon class="st0" points="270.4,205.3 236.6,241.4 204.1,231 " />
|
|
16
|
-
<polygon class="st0" points="277.6,208.4 258.5,227.8 310.6,228.8 " />
|
|
17
|
-
</g>
|
|
18
|
-
<g>
|
|
19
|
-
<g>
|
|
20
|
-
<path d="M384.4,265.7h20.7V349h-20.7V265.7z" />
|
|
21
|
-
</g>
|
|
22
|
-
<g>
|
|
23
|
-
<path d="M505.6,265.7v71.6c0,37.5-17.8,53.7-45.6,53.7c-16.7,0-31.4-9.3-38.5-24.4l16.7-7.9c4,8.2,12.9,13.6,21.8,13.6
|
|
24
|
-
c15.7,0,25.4-9.3,25.4-33v-1.2c-5.7,8.6-17.1,12.8-27,12.8c-21.4,0-40.1-17-40.1-43.5c0-26.8,18.5-43.4,39.9-43.4
|
|
25
|
-
c10.5,0,21.4,4.1,27.2,12.7v-10.9H505.6z M485,307c0-14.6-11.8-23.9-23.5-23.9c-12.5,0-22.8,10-22.8,23.9s10.3,24.3,22.8,24.3
|
|
26
|
-
C473.9,331.3,485,321.7,485,307z" />
|
|
27
|
-
</g>
|
|
28
|
-
<g>
|
|
29
|
-
<path d="M654.8,302.2V349h-20.5v-45.1c0-13.4-7-20-16.6-20c-12,0-19.4,8.9-18.6,23.9L599,307V349h-20.7v-45.1
|
|
30
|
-
c0-13.4-7-20-15.9-20c-9.6,0-19.3,5.4-19.3,21.2V349h-20.7v-83.3h20.7v14.3c3-10.5,14.5-16.1,24.8-16.1
|
|
31
|
-
c12.1,0,22.1,5.7,26.9,16.4c6.6-13.2,19.6-16.4,28-16.4C643.8,263.9,654.8,278,654.8,302.2z" />
|
|
32
|
-
</g>
|
|
33
|
-
<g>
|
|
34
|
-
<path d="M301.4,323.1h20.6c0,5.7,5.3,11.1,14.5,11.1c8.7,0,14.3-3.7,14.3-9.1c0-4.6-3.8-6.8-10.4-8.2l-11.7-2.9
|
|
35
|
-
c-19.8-5-24.9-15-24.9-25.5c0-13,13.6-24.4,32.8-24.4c15.7,0,33.4,7.3,33.2,26.1h-20.9c0-5.9-5.5-9.5-11.7-9.5
|
|
36
|
-
c-6.8,0-11.5,3.6-11.5,8.7c0,4.3,4.3,6.8,9.4,7.9l14.2,3.6c19.8,4.8,23.4,16.6,23.4,24.3c0,17-17.9,25.9-35.9,25.9
|
|
37
|
-
C319.3,351,301.7,341,301.4,323.1z" />
|
|
38
|
-
</g>
|
|
39
|
-
<g>
|
|
40
|
-
<ellipse cx="394.7" cy="245.4" rx="12.4" ry="12.9" />
|
|
41
|
-
</g>
|
|
42
|
-
<g>
|
|
43
|
-
<path d="M744.9,299.2V349h-20.4v-11.1c-5.6,7.7-17.5,12.8-28.5,12.8c-17.3,0-29.7-10.2-29.7-25.9c0-16.8,14.4-26.1,32.8-26.1
|
|
44
|
-
c9.3,0,19,2.3,25.5,5.9v-5c0-10.5-7.1-17.8-18.9-17.8c-10,0-19.4,3.7-23.6,8.9L670.9,279c6.8-9.1,20.9-15.2,36.2-15.2
|
|
45
|
-
C729,263.9,744.9,276.4,744.9,299.2z M724.6,322v-3.4c-5.4-3.4-13.9-5.5-21.9-5.5c-11.4,0-17,5-17,10.9c0,5.9,5.4,9.8,14.3,9.8
|
|
46
|
-
C708.9,333.8,719.6,329.3,724.6,322z" />
|
|
47
|
-
</g>
|
|
48
|
-
</g>
|
|
49
|
-
</g>
|
|
50
|
-
</svg>
|
package/jest.config.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { Config } from '@jest/types';
|
|
3
|
-
|
|
4
|
-
const config: Config.InitialOptions = {
|
|
5
|
-
globals: {
|
|
6
|
-
'ts-jest': {
|
|
7
|
-
tsconfig: path.resolve(__dirname, 'tsconfig.json'),
|
|
8
|
-
isolatedModules: true,
|
|
9
|
-
},
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
preset: 'ts-jest',
|
|
13
|
-
testEnvironment: 'jsdom',
|
|
14
|
-
testMatch: ['<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}'],
|
|
15
|
-
|
|
16
|
-
watchPlugins: [
|
|
17
|
-
'jest-watch-typeahead/filename',
|
|
18
|
-
'jest-watch-typeahead/testname',
|
|
19
|
-
],
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default config;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { initialize } from '../initialize';
|
|
2
|
-
|
|
3
|
-
describe('initialize', () => {
|
|
4
|
-
let originalAddEventListener: any;
|
|
5
|
-
let originalRemoveEventListener: any;
|
|
6
|
-
|
|
7
|
-
beforeAll(() => {
|
|
8
|
-
originalAddEventListener = window.addEventListener;
|
|
9
|
-
originalRemoveEventListener = window.removeEventListener;
|
|
10
|
-
window.addEventListener = jest.fn();
|
|
11
|
-
window.removeEventListener = jest.fn();
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
jest.resetAllMocks();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should initialize and be destroyable', () => {
|
|
19
|
-
const client = initialize();
|
|
20
|
-
expect(window.addEventListener).toHaveBeenCalled();
|
|
21
|
-
|
|
22
|
-
client.destroy();
|
|
23
|
-
expect(window.removeEventListener).toHaveBeenCalled();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
afterAll(() => {
|
|
27
|
-
window.addEventListener = originalAddEventListener;
|
|
28
|
-
window.removeEventListener = originalRemoveEventListener;
|
|
29
|
-
});
|
|
30
|
-
});
|
package/tsconfig.build.json
DELETED
package/tsconfig.json
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"target": "ES2015",
|
|
7
|
-
|
|
8
|
-
"baseUrl": "./",
|
|
9
|
-
"paths": {
|
|
10
|
-
"*": ["src/*"]
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"declarationMap": true,
|
|
15
|
-
|
|
16
|
-
"jsx": "react-jsx",
|
|
17
|
-
"downlevelIteration": true,
|
|
18
|
-
"noImplicitAny": true,
|
|
19
|
-
"strict": true,
|
|
20
|
-
|
|
21
|
-
"allowSyntheticDefaultImports": true,
|
|
22
|
-
"esModuleInterop": true,
|
|
23
|
-
"forceConsistentCasingInFileNames": true,
|
|
24
|
-
"skipLibCheck": true,
|
|
25
|
-
"resolveJsonModule": true,
|
|
26
|
-
|
|
27
|
-
"plugins": [
|
|
28
|
-
{
|
|
29
|
-
"transform": "typescript-transform-paths",
|
|
30
|
-
"exclude": ["**/node_modules/**"]
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"include": ["src", "jest.config.ts"]
|
|
35
|
-
}
|