forked from RocketChat/Rocket.Chat
-
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.
Chore: Add Livechat repo into Monorepo packages (RocketChat#25312)
Co-authored-by: Guilherme Gazzo <[email protected]> Co-authored-by: Martin <[email protected]>
- Loading branch information
Showing
353 changed files
with
25,323 additions
and
710 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"added": { | ||
"ignore": ["packages/accounts-linkedin/**/*", "packages/linkedin-oauth/**/*", "tests/cypress/integration/08-resolutions.spec.js", "**/.eslintrc.js", "packages/eslint-config/**"] | ||
"ignore": ["packages/accounts-linkedin/**/*", "packages/linkedin-oauth/**/*", "tests/cypress/integration/08-resolutions.spec.js", "**/.eslintrc.js", "packages/eslint-config/**", "**/babel.config.js"] | ||
} | ||
} |
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,4 @@ | ||
/build/* | ||
!/.storybook | ||
|
||
src/i18next.js |
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,68 @@ | ||
{ | ||
"extends": [ | ||
"@rocket.chat/eslint-config" | ||
], | ||
"plugins": ["react", "react-hooks"], | ||
"parser": "babel-eslint", | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": { | ||
"import/order": ["error", { | ||
"newlines-between": "always", | ||
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"]], | ||
"alphabetize": { | ||
"order": "asc" | ||
} | ||
}], | ||
"jsx-quotes": ["error", "prefer-single"], | ||
"react/display-name": ["warn", { | ||
"ignoreTranspilerName": false | ||
}], | ||
"react/jsx-fragments": ["error", "syntax"], | ||
"react/jsx-no-bind": ["warn", { | ||
"ignoreRefs": true, | ||
"allowFunctions": true, | ||
"allowArrowFunctions": true | ||
}], | ||
"react/jsx-no-comment-textnodes": "error", | ||
"react/jsx-no-duplicate-props": "error", | ||
"react/jsx-no-target-blank": "error", | ||
"react/jsx-no-undef": "error", | ||
"react/jsx-tag-spacing": ["error", { | ||
"beforeSelfClosing": "always" | ||
}], | ||
"react/jsx-uses-react": "error", | ||
"react/jsx-uses-vars": "error", | ||
"react/no-danger": "warn", | ||
"react/no-deprecated": "error", | ||
"react/no-did-mount-set-state": "error", | ||
"react/no-did-update-set-state": "error", | ||
"react/no-find-dom-node": "error", | ||
"react/no-is-mounted": "error", | ||
"react/no-string-refs": "error", | ||
"react/prefer-es6-class": "error", | ||
"react/prefer-stateless-function": "warn", | ||
"react/require-render-return": "error", | ||
"react/self-closing-comp": "error", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "warn", | ||
"no-sequences": "off" | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"extensions": [ | ||
".js", | ||
".ts", | ||
".tsx" | ||
] | ||
} | ||
}, | ||
"react": { | ||
"pragma": "h", | ||
"pragmaFrag": "Fragment", | ||
"version": "detect" | ||
} | ||
} | ||
} |
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,10 @@ | ||
/node_modules | ||
/build | ||
/storybook-static | ||
/*.log | ||
/.vscode | ||
/size-plugin.json | ||
coverage | ||
package-lock.json | ||
build.tar.gz | ||
.DS_Store |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
module.exports = require('../babel.config'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,17 @@ | ||
module.exports = { | ||
addons: [ | ||
{ | ||
name: '@storybook/addon-essentials', | ||
options: { | ||
backgrounds: false, | ||
} | ||
}, | ||
'@storybook/addon-knobs', | ||
], | ||
stories: [ | ||
'../src/**/stories.js', | ||
'../src/**/story.js', | ||
'../src/**/*.stories.js', | ||
'../src/**/*.story.js', | ||
], | ||
}; |
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,15 @@ | ||
import { addons } from '@storybook/addons'; | ||
import { create } from '@storybook/theming/create'; | ||
import manifest from '../package.json'; | ||
import logo from './logo.svg'; | ||
|
||
addons.setConfig({ | ||
theme: create({ | ||
base: 'light', | ||
brandTitle: manifest.name, | ||
brandImage: logo, | ||
brandUrl: manifest.homepage, | ||
colorPrimary: '#cbced1', | ||
colorSecondary: '#1d74f5', | ||
}), | ||
}); |
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,24 @@ | ||
import { action } from '@storybook/addon-actions'; | ||
|
||
export const UIKitInteractionType = { | ||
MODAL_OPEN: 'modal.open', | ||
MODAL_CLOSE: 'modal.close', | ||
MODAL_UPDATE: 'modal.update', | ||
ERRORS: 'errors', | ||
}; | ||
|
||
export const UIKitIncomingInteractionType = { | ||
BLOCK: 'blockAction', | ||
VIEW_SUBMIT: 'viewSubmit', | ||
VIEW_CLOSED: 'viewClosed', | ||
}; | ||
|
||
export const UIKitIncomingInteractionContainerType = { | ||
MESSAGE: 'message', | ||
VIEW: 'view', | ||
}; | ||
|
||
export const triggerAction = async (payload) => { | ||
await new Promise((resolve) => setTimeout(resolve, 1000)); | ||
action('dispatchAction')(payload); | ||
}; |
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,6 @@ | ||
<style> | ||
body { | ||
margin: 0 !important; | ||
padding: 0 !important; | ||
} | ||
</style> |
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,15 @@ | ||
import { addDecorator, addParameters } from '@storybook/react'; | ||
import 'loki/configure-react'; | ||
import 'emoji-mart/css/emoji-mart.css'; | ||
import '../src/styles/index.scss'; | ||
|
||
addParameters({ | ||
grid: { | ||
cellSize: 4, | ||
}, | ||
options: { | ||
storySort: ([, a], [, b]) => { | ||
return a.kind.localeCompare(b.kind); | ||
}, | ||
}, | ||
}); |
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,45 @@ | ||
module.exports = ({ config }) => { | ||
config.resolve.alias = { | ||
...config.resolve.alias, | ||
react: require.resolve('preact/compat'), | ||
'react-dom': require.resolve('preact/compat'), | ||
[require.resolve('../src/lib/uiKit')]: require.resolve('./mocks/uiKit'), | ||
}; | ||
|
||
config.module.rules = config.module.rules.filter(({ loader }) => !/json-loader/.test(loader)); | ||
|
||
const fileLoader = config.module.rules.find(({ loader }) => /file-loader/.test(loader)); | ||
fileLoader.test = /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf|mp3|mp4)(\?.*)?$/; | ||
|
||
const urlLoader = config.module.rules.find(({ loader }) => /url-loader/.test(loader)); | ||
urlLoader.test = /\.(webm|wav|m4a|aac|oga)(\?.*)?$/; | ||
|
||
config.module.rules.push({ | ||
test: /\.scss$/, | ||
use: [ | ||
'style-loader', | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
sourceMap: true, | ||
modules: true, | ||
importLoaders: 1, | ||
}, | ||
}, | ||
'sass-loader', | ||
], | ||
}); | ||
|
||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
exclude: [ | ||
__dirname, | ||
], | ||
use: [ | ||
'desvg-loader/preact', | ||
'svg-loader', | ||
], | ||
}); | ||
|
||
return config; | ||
}; |
Oops, something went wrong.