Skip to content

Commit a763e2b

Browse files
[Inbound Calling] Add Stateful Client Calling sample App (#4840)
* Add new component * Add icons and Locale * add CC to notification * add storybook page * lint * Change files * Add style API * add customization updates and snippet * fix lint * Change files * app initial commit * it lives * update to support multiple call notifications * update API * create login component * update stable lock * simplify to 1 array * fix cte * add incoming Call Manager component * fix lint * add cc * fix lock
1 parent 825fe8d commit a763e2b

32 files changed

+2498
-309
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 330 additions & 149 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/config/rush/variants/stable/pnpm-lock.yaml

Lines changed: 169 additions & 160 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-components/src/components/IncomingCallNotification.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ const incomingCallToastStyle = (theme: Theme): IStackStyles => {
191191
root: {
192192
minWidth: '20rem',
193193
maxWidth: '40rem',
194+
background: theme.palette.white,
194195
opacity: 0.95,
195196
borderRadius: '0.5rem',
196197
boxShadow: theme.effects.elevation8,

rush.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
"projectFolder": "samples/CallWithChat",
8181
"reviewCategory": "sample"
8282
},
83+
{
84+
"packageName": "@internal/callingstateful",
85+
"projectFolder": "samples/CallingStateful",
86+
"reviewCategory": "sample"
87+
},
8388
{
8489
"packageName": "@internal/component-examples",
8590
"projectFolder": "samples/ComponentExamples",

samples/CallingStateful/.babelrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const commonConfig = require('../../common/config/babel/.babelrc.js');
2+
3+
module.exports = {
4+
...commonConfig,
5+
/**
6+
* retainLines is needed to maintain the lines of the comments in the output to preprocess. This will cause in the output
7+
* the comments assigned to their original position in the file so any linter options will be maintained on their respective node.
8+
*
9+
* this is caused by the comments being both trailing and leading to the nodes either above or below it, regardless
10+
* of which node it is touching on the next line.
11+
*
12+
* link to babel docs on this: https://babeljs.io/docs/en/options#retainlines
13+
*/
14+
retainLines: true
15+
};

samples/CallingStateful/.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
docs/
2+
public/
3+
dist/
4+
node_modules/
5+
preprocessed/

samples/CallingStateful/.eslintrc.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
module.exports = {
5+
env: {
6+
browser: true,
7+
node: true,
8+
es6: true
9+
},
10+
extends: [
11+
'eslint:recommended',
12+
'plugin:@typescript-eslint/recommended',
13+
'plugin:prettier/recommended',
14+
'plugin:react/recommended',
15+
'plugin:react-hooks/recommended'
16+
],
17+
parser: '@typescript-eslint/parser',
18+
plugins: ['@typescript-eslint', 'header'],
19+
parserOptions: {
20+
ecmaFeatures: {
21+
jsx: true
22+
},
23+
ecmaVersion: 2020,
24+
sourceType: 'module'
25+
},
26+
rules: {
27+
'@typescript-eslint/explicit-function-return-type': [
28+
'warn',
29+
{
30+
allowExpressions: true,
31+
allowTypedFunctionExpressions: true
32+
}
33+
],
34+
eqeqeq: 'warn',
35+
'header/header': ['error', 'line', ' Copyright (c) Microsoft Corporation.\n Licensed under the MIT License.'],
36+
'react/display-name': 'off',
37+
'@typescript-eslint/no-explicit-any': 'error',
38+
'@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_' }],
39+
curly: 'error',
40+
'no-restricted-imports': [
41+
'error',
42+
{
43+
patterns: [
44+
{
45+
group: ['@internal/*'],
46+
message: 'Use @azure/communication-react instead.'
47+
}
48+
]
49+
}
50+
]
51+
},
52+
settings: {
53+
react: {
54+
version: 'detect'
55+
}
56+
},
57+
overrides: [
58+
{
59+
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx', '**/mocks/*'],
60+
env: {
61+
jest: true
62+
}
63+
}
64+
]
65+
};

0 commit comments

Comments
 (0)