Skip to content
Draft
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
4 changes: 1 addition & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"extends": [
"github>doist/renovate-config:frontend-base"
],
"extends": ["github>doist/renovate-config:frontend-base"],
"hostRules": [
{
"hostType": "npm",
Expand Down
1,338 changes: 285 additions & 1,053 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
],
"devDependencies": {
"@doist/eslint-config": "7.1.0",
"@doist/prettier-config": "3.0.5",
"@doist/prettier-config": "4.0.0",
"@doist/tsconfig": "1.0.0",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"@rollup/plugin-typescript": "8.5.0",
"@rollup/plugin-commonjs": "28.0.6",
"@rollup/plugin-node-resolve": "16.0.1",
"@rollup/plugin-typescript": "12.1.4",
"@testing-library/user-event": "7.2.1",
"@types/jest": "27.5.2",
"@types/node": "22.14.1",
Expand All @@ -29,8 +29,8 @@
"nock": "13.5.6",
"node-fetch": "2.7.0",
"npm-run-all2": "5.0.2",
"postcss": "8.4.6",
"prettier": "2.1.2",
"postcss": "8.5.6",
"prettier": "3.6.2",
"react-docgen-typescript-loader": "3.7.2",
"rimraf": "3.0.2",
"rollup": "2.79.2",
Expand All @@ -40,7 +40,7 @@
"ts-jest": "27.1.5",
"ts-loader": "8.4.0",
"tslib": "2.8.1",
"typescript": "4.7.4",
"typescript": "4.9.5",
"yalc": "1.0.0-pre.53"
},
"prettier": "@doist/prettier-config",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-extensions-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@testing-library/react-hooks": "3.7.0",
"@types/react": "18.3.20",
"@types/testing-library__jest-dom": "5.14.9",
"eslint-config-react-app": "^7.0.0",
"eslint-config-react-app": "7.0.0",
"identity-obj-proxy": "3.0.0",
"msw": "0.49.3",
"react": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,16 @@ export function AdaptiveCardRenderer({
}, [result, onError])

const elementParser = useRefCallback(
(adaptiveCard: ExtensionCard) => (
element: CardElement,
source: unknown,
context: SerializationContext,
) => {
if ('autoFocusId' in adaptiveCard) {
if (canSetAutoFocus(element)) {
element.shouldAutoFocus = element.id === adaptiveCard.autoFocusId
(adaptiveCard: ExtensionCard) =>
(element: CardElement, source: unknown, context: SerializationContext) => {
if ('autoFocusId' in adaptiveCard) {
if (canSetAutoFocus(element)) {
element.shouldAutoFocus = element.id === adaptiveCard.autoFocusId
}
}
}

customElementParse?.(element, source, context)
},
customElementParse?.(element, source, context)
},
)

const handleAction = useRefCallback((adaptiveCard: AdaptiveCard) => (action: Action) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ export class CustomTextInput extends TextInputist implements CanHaveAutoFocus {
get value(): string | undefined {
if (this.renderedInputControlElement?.hasChildNodes()) {
if (this.isMultiline) {
const textArea = this.renderedInputControlElement.getElementsByTagName(
'textarea',
)[0]
const textArea =
this.renderedInputControlElement.getElementsByTagName('textarea')[0]
return textArea.value
} else {
const input = this.renderedInputControlElement.getElementsByTagName('input')[0]
Expand Down
9 changes: 3 additions & 6 deletions packages/ui-extensions-react/src/test/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,17 @@ export const DEFAULT_CARD = {
images: [
{
type: 'Image',
url:
'https://media1.giphy.com/media/XYot661SFS62c/giphy.gif?cid=550add23837d0fdf40feddd3a4df0de03a98b54019e5cffc&rid=giphy.gif',
url: 'https://media1.giphy.com/media/XYot661SFS62c/giphy.gif?cid=550add23837d0fdf40feddd3a4df0de03a98b54019e5cffc&rid=giphy.gif',
altText: 'robin williams hello GIF',
},
{
type: 'Image',
url:
'https://media1.giphy.com/media/icUEIrjnUuFCWDxFpU/giphy.gif?cid=550add23837d0fdf40feddd3a4df0de03a98b54019e5cffc&rid=giphy.gif',
url: 'https://media1.giphy.com/media/icUEIrjnUuFCWDxFpU/giphy.gif?cid=550add23837d0fdf40feddd3a4df0de03a98b54019e5cffc&rid=giphy.gif',
altText: 'Napoleon Dynamite Hello GIF by 20th Century Fox Home Entertainment',
},
{
type: 'Image',
url:
'https://media3.giphy.com/media/BVStb13YiR5Qs/giphy.gif?cid=550add23837d0fdf40feddd3a4df0de03a98b54019e5cffc&rid=giphy.gif',
url: 'https://media3.giphy.com/media/BVStb13YiR5Qs/giphy.gif?cid=550add23837d0fdf40feddd3a4df0de03a98b54019e5cffc&rid=giphy.gif',
altText: 'Lionel Richie Hello GIF',
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-extensions-react/src/test/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function polyfillFetch(): void {
return
}

globalThis.fetch = (fetch as unknown) as (
globalThis.fetch = fetch as unknown as (
input: RequestInfo | URL,
init?: RequestInit,
) => Promise<Response>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-extensions-react/src/utils/action-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type CanHaveAutoFocus = {
shouldAutoFocus: boolean
}

export function canSetAutoFocus<T>(
export function canSetAutoFocus<T extends object>(
object: T | (T & CanHaveAutoFocus),
): object is T & CanHaveAutoFocus {
return 'shouldAutoFocus' in object
Expand Down
Loading