Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,23 @@
"./src/**/*.stories.js",
"./src/**/*.stories.ts"
],
"presets": ["@babel/preset-env", "@babel/preset-react"],
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"babel-plugin-transform-scss"
"@babel/plugin-proposal-class-properties"
]
},
"test": {
"presets": ["@babel/preset-env", "@babel/preset-react"],
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"babel-plugin-transform-scss"
"@babel/plugin-proposal-class-properties"
]
}
}
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ typings/
.yarn-integrity

# dotenv environment variables file
.env
.env

# Artifacts
.DS_Store
10 changes: 8 additions & 2 deletions .storybook/.babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"babel-plugin-transform-scss"
["babel-plugin-react-css-modules", {
"generateScopedName": "[name]-[local]-[hash:base64:4]"
}]
]
}
6 changes: 3 additions & 3 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
"stories": [
stories: [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials"
],
"babel": async (options) => ({
babel: async (options) => ({
...options,
}),
}
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 10.18.1
nodejs 12.22.1
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ src/components/
---- index.stories.js
---- styles.scss
```

## 🧪 Testing
### 🚧 Building
To build the lib folders and types run:
`yarn build`
### 🧪 Testing
Run tests:
`yarn test`

Expand Down
12 changes: 12 additions & 0 deletions libs/actions/errors.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export function clearErrors(): {
type: any;
};
export function addError(error: any, message: any, context: any): {
type: any;
payload: {
error: any;
message: any;
context: any;
};
};
export const Constants: any;
37 changes: 0 additions & 37 deletions libs/actions/errors.js

This file was deleted.

6 changes: 6 additions & 0 deletions libs/actions/jwt.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function refreshJwt(userId: any): {
type: any;
method: string;
url: string;
};
export const Constants: any;
28 changes: 0 additions & 28 deletions libs/actions/jwt.js

This file was deleted.

8 changes: 8 additions & 0 deletions libs/actions/modal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const Constants: any;
export function openModal(modalName: any): {
type: any;
modalName: any;
};
export function closeModal(): {
type: any;
};
32 changes: 0 additions & 32 deletions libs/actions/modal.js

This file was deleted.

7 changes: 7 additions & 0 deletions libs/actions/post_message.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const Constants: any;
export function postMessage(message: any, broadcast?: boolean): {
type: any;
postMessage: boolean;
broadcast: boolean;
message: any;
};
26 changes: 0 additions & 26 deletions libs/actions/post_message.js

This file was deleted.

17 changes: 17 additions & 0 deletions libs/api/api.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export default class Api {
static get(url: any, apiUrl: any, jwt: any, csrf: any, params: any, headers: any, timeout?: number): any;
static post(url: any, apiUrl: any, jwt: any, csrf: any, params: any, body: any, headers: any, timeout?: number): any;
static put(url: any, apiUrl: any, jwt: any, csrf: any, params: any, body: any, headers: any, timeout?: number): any;
static del(url: any, apiUrl: any, jwt: any, csrf: any, params: any, headers: any, timeout?: number): any;
static execRequest(method: any, url: any, apiUrl: any, jwt: any, csrf: any, params: any, body: any, headers: any, timeout?: number): any;
/**
* Returns a complete, absolute URL by conditionally appending `path` to
* `apiUrl`. If `path` already contains "http", it is returned as-is.
*/
static makeUrl(part: any, apiUrl: any): any;
static doRequest(url: any, requestMethod: any, requestType: any): any;
static wrapRequest(url: any, requestMethod: any, requestType: any): any;
static disposeRequest(url: any): void;
static promisify(request: any): Promise<any>;
static queryStringFrom(params: any): string;
}
Loading