Skip to content

Commit

Permalink
chore: fix webui build
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Jan 20, 2025
1 parent 4eb4811 commit 8fe25fd
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 22 deletions.
4 changes: 2 additions & 2 deletions packages/webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@sofie-automation/corelib": "1.52.0-in-development",
"@sofie-automation/meteor-lib": "1.52.0-in-development",
"@sofie-automation/shared-lib": "1.52.0-in-development",
"@sofie-automation/sorensen": "^1.4.3",
"@sofie-automation/sorensen": "^1.5.8",
"@testing-library/user-event": "^14.6.0",
"@types/sinon": "^10.0.20",
"classnames": "^2.5.1",
Expand Down Expand Up @@ -106,7 +106,7 @@
"babel-jest": "^29.7.0",
"sass": "^1.83.4",
"sinon": "^14.0.2",
"typescript": "^5.2.2",
"typescript": "~5.5",
"vite": "^6.0.9",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-tsconfig-paths": "^5.1.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/webui/src/client/lib/triggers/codesToKeyLabels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function toTitleCase(input: string): string {
return str.join(' ')
}

export function codesToKeyLabels(keys: string, sorensen: Sorensen): string {
export function codesToKeyLabels(keys: string, sorensen: typeof Sorensen): string {
return keys
.split(/\s+/gi)
.map((note) =>
Expand All @@ -20,7 +20,7 @@ export function codesToKeyLabels(keys: string, sorensen: Sorensen): string {
.join(' ')
}

export function keyLabelsToCodes(labels: string, sorensen: Sorensen): string {
export function keyLabelsToCodes(labels: string, sorensen: typeof Sorensen): string {
return labels
.split(/\s+/gi)
.map((note) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/webui/src/client/lib/ui/containers/modals/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export type SomeEvent = Event | React.SyntheticEvent<object>

export class Modal extends React.Component<React.PropsWithChildren<IModalAttributes>> {
boundKeys: Array<string> = []
sorensen: Sorensen | undefined
sorensen: typeof Sorensen | undefined

constructor(props: IModalAttributes) {
super(props)
}

componentDidMount(): void {
this.sorensen = this.context as Sorensen
this.sorensen = this.context as typeof Sorensen
this.bindKeys()
}

Expand Down
4 changes: 1 addition & 3 deletions packages/webui/src/client/lib/viewPort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ export function lockPointer(): void {
if (pointerLockTurnstile === 0) {
// pointerLockTurnstile === 0 means that no requests for locking the pointer have been made
// since we last unlocked it
document.body.requestPointerLock().catch(() => {
console.warn('Failed to get pointer lock')
})
document.body.requestPointerLock()
// attach the event handlers only once. Once they are attached, we will track the
// locked state and act according to the turnstile
if (!pointerHandlerAttached) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ interface IStateHeader {
width: number
}

export const SegmentTimelineZoomControls = class SegmentTimelineZoomControls extends React.Component<
IPropsHeader,
IStateHeader
> {
export class SegmentTimelineZoomControls extends React.Component<IPropsHeader, IStateHeader> {
parentElement: HTMLDivElement | null = null
selAreaElement: HTMLDivElement | null = null
parentOffsetX = 0
Expand Down
6 changes: 5 additions & 1 deletion packages/webui/src/client/ui/Shelf/HotkeyHelpPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ interface IProps {

const _isMacLike = navigator.platform.match(/(Mac|iPhone|iPod|iPad)/i) ? true : false

function mountedTriggerToHotkeyList(hotkeys: MongoCursor<MountedTrigger>, sorensen: Sorensen | null, t: TFunction) {
function mountedTriggerToHotkeyList(
hotkeys: MongoCursor<MountedTrigger>,
sorensen: typeof Sorensen | null,
t: TFunction
) {
return hotkeys.map((mountedTrigger) => ({
key: (sorensen ? mountedTrigger.keys.map((codes) => codesToKeyLabels(codes, sorensen)) : mountedTrigger.keys).join(
', '
Expand Down
36 changes: 28 additions & 8 deletions packages/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6063,10 +6063,10 @@ __metadata:
languageName: unknown
linkType: soft

"@sofie-automation/sorensen@npm:^1.4.3":
version: 1.4.3
resolution: "@sofie-automation/sorensen@npm:1.4.3"
checksum: 10c0/d9b9d739acd009a3ca1b3025d10cca7e152ae244795faf7019e6616ad6f442aff2d8b58ca48487bd9d9d170703458fc46e370523607cd1ce9d73c0af6e428c36
"@sofie-automation/sorensen@npm:^1.5.8":
version: 1.5.8
resolution: "@sofie-automation/sorensen@npm:1.5.8"
checksum: 10c0/cc0bcf1c82f58e59f8c8325bfc9653f57ecd84327f68994c4449c546160492316725fb4040a2fbb9c6e56bbb6598c4fa2e05b69fc413444bd318699f4f179f85
languageName: node
linkType: hard

Expand All @@ -6087,7 +6087,7 @@ __metadata:
"@sofie-automation/corelib": "npm:1.52.0-in-development"
"@sofie-automation/meteor-lib": "npm:1.52.0-in-development"
"@sofie-automation/shared-lib": "npm:1.52.0-in-development"
"@sofie-automation/sorensen": "npm:^1.4.3"
"@sofie-automation/sorensen": "npm:^1.5.8"
"@testing-library/dom": "npm:^10.4.0"
"@testing-library/jest-dom": "npm:^6.6.3"
"@testing-library/react": "npm:^16.2.0"
Expand Down Expand Up @@ -6140,7 +6140,7 @@ __metadata:
sha.js: "npm:^2.4.11"
sinon: "npm:^14.0.2"
type-fest: "npm:^4.32.0"
typescript: "npm:^5.2.2"
typescript: "npm:~5.5"
underscore: "npm:^1.13.7"
velocity-animate: "npm:^1.5.2"
velocity-react: "npm:^1.4.3"
Expand Down Expand Up @@ -28289,7 +28289,7 @@ asn1@evs-broadcast/node-asn1:
languageName: node
linkType: hard

"typescript@npm:>=3 < 6, typescript@npm:^5.2.2":
"typescript@npm:>=3 < 6":
version: 5.7.3
resolution: "typescript@npm:5.7.3"
bin:
Expand Down Expand Up @@ -28319,7 +28319,17 @@ asn1@evs-broadcast/node-asn1:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.2.2#optional!builtin<compat/typescript>":
"typescript@npm:~5.5":
version: 5.5.4
resolution: "typescript@npm:5.5.4"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A>=3 < 6#optional!builtin<compat/typescript>":
version: 5.7.3
resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin<compat/typescript>::version=5.7.3&hash=5786d5"
bin:
Expand Down Expand Up @@ -28349,6 +28359,16 @@ asn1@evs-broadcast/node-asn1:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A~5.5#optional!builtin<compat/typescript>":
version: 5.5.4
resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>::version=5.5.4&hash=379a07"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/73409d7b9196a5a1217b3aaad929bf76294d3ce7d6e9766dd880ece296ee91cf7d7db6b16c6c6c630ee5096eccde726c0ef17c7dfa52b01a243e57ae1f09ef07
languageName: node
linkType: hard

"uc.micro@npm:^1.0.1, uc.micro@npm:^1.0.5":
version: 1.0.6
resolution: "uc.micro@npm:1.0.6"
Expand Down

0 comments on commit 8fe25fd

Please sign in to comment.