Skip to content

Commit

Permalink
Fix npm start and samples (#5318)
Browse files Browse the repository at this point in the history
* Fix npm start

* Fix sample
  • Loading branch information
compulim authored Oct 7, 2024
1 parent 21a4ec1 commit 141a09b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions packages/bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@
"precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false",
"preversion": "cat package.json | jq '(.localDependencies // {} | to_entries | map([if .value == \"production\" then \"dependencies\" else \"devDependencies\" end, .key])) as $P | delpaths($P)' > package-temp.json && mv package-temp.json package.json",
"start": "concurrently --kill-others --prefix-colors \"auto\" \"npm:start:*\"",
"start:babel": "npm run build:babel -- --skip-initial-build --watch",
"start:devserver": "node ./scripts/devServer.mjs",
"start:tsup": "npm run build:tsup -- --watch",
"start:typescript": "npm run build:typescript -- --watch"
"start:tsup": "npm run build:tsup -- --watch"
},
"localDependencies": {
"botframework-directlinespeech-sdk": "production",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
"precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false",
"preversion": "cat package.json | jq '(.localDependencies // {} | to_entries | map([if .value == \"production\" then \"dependencies\" else \"devDependencies\" end, .key])) as $P | delpaths($P)' > package-temp.json && mv package-temp.json package.json",
"start": "concurrently --kill-others --prefix-colors \"auto\" \"npm:start:*\"",
"start:babel": "npm run build:babel -- --skip-initial-build --watch",
"start:tsup": "npm run build:tsup -- --watch",
"start:typescript": "npm run build:typescript -- --watch"
"start:tsup": "npm run build:tsup -- --watch"
},
"engines": {
"node": ">=12.0.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
"precommit:typecheck": "tsc --project ./src --emitDeclarationOnly false --esModuleInterop true --noEmit --pretty false",
"preversion": "cat package.json | jq '(.localDependencies // {} | to_entries | map([if .value == \"production\" then \"dependencies\" else \"devDependencies\" end, .key])) as $P | delpaths($P)' > package-temp.json && mv package-temp.json package.json",
"start": "concurrently --kill-others --prefix-colors \"auto\" \"npm:start:*\"",
"start:tsup": "npm run build:tsup -- --watch",
"start:typescript": "npm run build:typescript -- --watch"
"start:tsup": "npm run build:tsup -- --watch"
},
"devDependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15",
Expand Down
7 changes: 4 additions & 3 deletions samples/05.custom-components/f.password-input/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
'use strict';

const {
hooks: { useRenderActivityStatus, useSendPostBack },
hooks: { useCreateActivityStatusRenderer, useSendPostBack },
ReactWebChat
} = window.WebChat;

Expand All @@ -85,7 +85,7 @@
const PasswordInputActivity = ({ activity, nextVisibleActivity }) => {
const [twoFACode, setTwoFACode] = useState('');
const [submitted, setSubmitted] = useState(false);
const renderActivityStatus = useRenderActivityStatus({ activity, nextVisibleActivity });
const renderActivityStatus = useCreateActivityStatusRenderer()({ activity, sendState: 'sent' });
const sendPostBack = useSendPostBack();

const handleCodeChange = useCallback(
Expand All @@ -111,6 +111,7 @@
<label className="passwordInput__box">
<span className="passwordInput__label">Please input your 2FA code</span>
<input
autoComplete="off"
autoFocus={true}
className="passwordInput__input"
disabled={submitted}
Expand All @@ -120,7 +121,7 @@
/>
</label>
</form>
{renderActivityStatus()}
{renderActivityStatus({ hideTimestamp: false })}
</div>
);
};
Expand Down

0 comments on commit 141a09b

Please sign in to comment.