@roku-sdk/components 0.0.0-stage → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BREAKING_CHANGES.md +84 -0
- package/LICENSE +21 -0
- package/README.md +19 -2
- package/core-jsx.d.ts +53 -0
- package/eslint.config.mjs +3 -0
- package/jsx.d.ts +273 -0
- package/package.json +84 -3
- package/src/__tests__/container.test.tsx +150 -0
- package/src/__tests__/glyphs.test.ts +202 -0
- package/src/__tests__/modal-boundary-export.test.ts +12 -0
- package/src/__tests__/native-modal.test.tsx +224 -0
- package/src/__tests__/tween-release.test.tsx +125 -0
- package/src/__tests__/tween-stops-shape.test.tsx +165 -0
- package/src/__tests__/tween-without-compat.test.tsx +64 -0
- package/src/__tests__/tween.test.tsx +195 -0
- package/src/blended-busy-spinner.props.ts +37 -0
- package/src/blended-busy-spinner.tsx +13 -0
- package/src/bounding-tracker.props.ts +18 -0
- package/src/bounding-tracker.tsx +13 -0
- package/src/button-row.tsx +126 -0
- package/src/channel-store.props.ts +425 -0
- package/src/channel-store.tsx +76 -0
- package/src/container.tsx +130 -0
- package/src/core/jsx-runtime.ts +39 -0
- package/src/focusable-group.props.ts +8 -0
- package/src/focusable-group.tsx +17 -0
- package/src/focusable.props.ts +14 -0
- package/src/focusable.tsx +17 -0
- package/src/glyphs.ts +116 -0
- package/src/helpers/index.tsx +4 -0
- package/src/helpers/resolution-context.tsx +68 -0
- package/src/helpers/scale-for-device-resolution.ts +31 -0
- package/src/index.tsx +70 -0
- package/src/jsx-props.ts +87 -0
- package/src/kdfs.d.ts +14 -0
- package/src/kdfs.ts +15 -0
- package/src/key-handler.props.ts +33 -0
- package/src/key-handler.tsx +24 -0
- package/src/modal-dialog.props.ts +38 -0
- package/src/modal-dialog.tsx +41 -0
- package/src/retain-asset.ts +24 -0
- package/src/sg-intrinsics.json +1153 -0
- package/src/sg-nodes/__tests__/__snapshots__/font.test.tsx.snap +13 -0
- package/src/sg-nodes/__tests__/__snapshots__/prop-forwarding.test.tsx.snap +4409 -0
- package/src/sg-nodes/__tests__/core-props.test.ts +301 -0
- package/src/sg-nodes/__tests__/font.test.tsx +141 -0
- package/src/sg-nodes/__tests__/imperative-methods.test.ts +268 -0
- package/src/sg-nodes/__tests__/prop-forwarding.test.tsx +1049 -0
- package/src/sg-nodes/__tests__/solid-integration.test.tsx +719 -0
- package/src/sg-nodes/animated-image.props.ts +64 -0
- package/src/sg-nodes/animated-image.tsx +23 -0
- package/src/sg-nodes/animation.props.ts +292 -0
- package/src/sg-nodes/animation.tsx +190 -0
- package/src/sg-nodes/array-grid.ts +602 -0
- package/src/sg-nodes/audio.props.ts +302 -0
- package/src/sg-nodes/audio.tsx +57 -0
- package/src/sg-nodes/busy-spinner.props.ts +59 -0
- package/src/sg-nodes/busy-spinner.tsx +84 -0
- package/src/sg-nodes/button-group.props.ts +141 -0
- package/src/sg-nodes/button-group.tsx +30 -0
- package/src/sg-nodes/button.props.ts +119 -0
- package/src/sg-nodes/button.tsx +31 -0
- package/src/sg-nodes/check-list.props.ts +71 -0
- package/src/sg-nodes/check-list.tsx +55 -0
- package/src/sg-nodes/content-node.props.ts +1316 -0
- package/src/sg-nodes/content-node.tsx +153 -0
- package/src/sg-nodes/core-props.ts +197 -0
- package/src/sg-nodes/custom-keyboard.props.ts +108 -0
- package/src/sg-nodes/custom-keyboard.tsx +48 -0
- package/src/sg-nodes/dialog.props.ts +159 -0
- package/src/sg-nodes/dialog.tsx +36 -0
- package/src/sg-nodes/dynamic-key-grid.props.ts +22 -0
- package/src/sg-nodes/dynamic-key-grid.tsx +16 -0
- package/src/sg-nodes/dynamic-keyboard.props.ts +30 -0
- package/src/sg-nodes/dynamic-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-mini-keyboard.props.ts +22 -0
- package/src/sg-nodes/dynamic-mini-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-pinpad.props.ts +57 -0
- package/src/sg-nodes/dynamic-pinpad.tsx +18 -0
- package/src/sg-nodes/effect.props.ts +116 -0
- package/src/sg-nodes/effect.tsx +39 -0
- package/src/sg-nodes/font.props.ts +45 -0
- package/src/sg-nodes/font.tsx +80 -0
- package/src/sg-nodes/group.props.ts +105 -0
- package/src/sg-nodes/group.tsx +30 -0
- package/src/sg-nodes/label-list.props.ts +86 -0
- package/src/sg-nodes/label-list.tsx +64 -0
- package/src/sg-nodes/label.props.ts +207 -0
- package/src/sg-nodes/label.tsx +56 -0
- package/src/sg-nodes/layout-group.props.ts +69 -0
- package/src/sg-nodes/layout-group.tsx +75 -0
- package/src/sg-nodes/list-panel.props.ts +104 -0
- package/src/sg-nodes/list-panel.tsx +49 -0
- package/src/sg-nodes/markup-grid.props.ts +78 -0
- package/src/sg-nodes/markup-grid.tsx +38 -0
- package/src/sg-nodes/markup-list.props.ts +68 -0
- package/src/sg-nodes/markup-list.tsx +38 -0
- package/src/sg-nodes/mask-group.props.ts +78 -0
- package/src/sg-nodes/mask-group.tsx +59 -0
- package/src/sg-nodes/media-playback-methods.ts +20 -0
- package/src/sg-nodes/node.ts +77 -0
- package/src/sg-nodes/overhang.props.ts +169 -0
- package/src/sg-nodes/overhang.tsx +29 -0
- package/src/sg-nodes/panel-set.props.ts +71 -0
- package/src/sg-nodes/panel-set.tsx +53 -0
- package/src/sg-nodes/panel.props.ts +176 -0
- package/src/sg-nodes/panel.tsx +56 -0
- package/src/sg-nodes/poster-grid.props.ts +277 -0
- package/src/sg-nodes/poster-grid.tsx +45 -0
- package/src/sg-nodes/poster.props.ts +125 -0
- package/src/sg-nodes/poster.tsx +44 -0
- package/src/sg-nodes/radio-button-list.props.ts +59 -0
- package/src/sg-nodes/radio-button-list.tsx +68 -0
- package/src/sg-nodes/rectangle.props.ts +29 -0
- package/src/sg-nodes/rectangle.tsx +27 -0
- package/src/sg-nodes/row-list.props.ts +288 -0
- package/src/sg-nodes/row-list.tsx +47 -0
- package/src/sg-nodes/scene.props.ts +65 -0
- package/src/sg-nodes/scene.tsx +15 -0
- package/src/sg-nodes/scrollable-text.props.ts +133 -0
- package/src/sg-nodes/scrollable-text.tsx +64 -0
- package/src/sg-nodes/scrolling-label.props.ts +106 -0
- package/src/sg-nodes/scrolling-label.tsx +42 -0
- package/src/sg-nodes/simple-label.props.ts +156 -0
- package/src/sg-nodes/simple-label.tsx +59 -0
- package/src/sg-nodes/sound-effect.props.ts +130 -0
- package/src/sg-nodes/sound-effect.tsx +65 -0
- package/src/sg-nodes/standard-dialog.props.ts +520 -0
- package/src/sg-nodes/standard-dialog.tsx +428 -0
- package/src/sg-nodes/standard-keyboard-dialog.props.ts +84 -0
- package/src/sg-nodes/standard-keyboard-dialog.tsx +59 -0
- package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
- package/src/sg-nodes/standard-message-dialog.tsx +48 -0
- package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
- package/src/sg-nodes/standard-pinpad-dialog.tsx +46 -0
- package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
- package/src/sg-nodes/standard-progress-dialog.tsx +43 -0
- package/src/sg-nodes/target-group.props.ts +278 -0
- package/src/sg-nodes/target-group.tsx +63 -0
- package/src/sg-nodes/target-list.props.ts +128 -0
- package/src/sg-nodes/target-list.tsx +66 -0
- package/src/sg-nodes/target-set.props.ts +63 -0
- package/src/sg-nodes/target-set.tsx +42 -0
- package/src/sg-nodes/time-grid.props.ts +646 -0
- package/src/sg-nodes/time-grid.tsx +87 -0
- package/src/sg-nodes/tween.props.ts +115 -0
- package/src/sg-nodes/types.ts +150 -0
- package/src/sg-nodes/video.props.ts +573 -0
- package/src/sg-nodes/video.tsx +73 -0
- package/src/sg-nodes/voice-text-edit-box.props.ts +91 -0
- package/src/sg-nodes/voice-text-edit-box.tsx +15 -0
- package/src/sg-nodes/zoom-row-list.props.ts +416 -0
- package/src/sg-nodes/zoom-row-list.tsx +42 -0
- package/src/standard-dialog-next/__tests__/standard-dialog-next.test.tsx +186 -0
- package/src/standard-dialog-next/index.ts +5 -0
- package/src/standard-dialog-next/standard-dialog-next.props.ts +80 -0
- package/src/standard-dialog-next/standard-dialog-next.tsx +326 -0
- package/src/test-helpers/tween-test-setup.ts +78 -0
- package/src/tween.tsx +173 -0
- package/src/types.ts +8 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.brs +13 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml +10 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml.d.ts +42 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.brs +26 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml +14 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml.d.ts +42 -0
- package/src/xml-components/channel-store/channelStoreExt.brs +159 -0
- package/src/xml-components/channel-store/channelStoreExt.xml +29 -0
- package/src/xml-components/channel-store/channelStoreExt.xml.d.ts +57 -0
- package/src/xml-components/focus/focusable-group.brs +251 -0
- package/src/xml-components/focus/focusable-group.xml +15 -0
- package/src/xml-components/focus/focusable-group.xml.d.ts +42 -0
- package/src/xml-components/focus/focusable.xml +18 -0
- package/src/xml-components/focus/focusable.xml.d.ts +48 -0
- package/src/xml-components/keyboards/CustomAddressKDF.keyboard.json +547 -0
- package/src/xml-components/keyboards/CustomKeyboard.brs +322 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml +45 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml.d.ts +73 -0
- package/src/xml-components/keyboards/KeyGridExt.xml +4 -0
- package/src/xml-components/keyboards/KeyGridExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/KeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/KeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/MOPPinPadCustomKDF.keyboard.json +151 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/PhonePadCustomKDF.keyboard.json +42 -0
- package/src/xml-components/keyboards/PinPadExt.brs +102 -0
- package/src/xml-components/keyboards/PinPadExt.xml +17 -0
- package/src/xml-components/keyboards/PinPadExt.xml.d.ts +49 -0
- package/src/xml-components/keyboards/WifiCustomKDF.keyboard.json +1242 -0
- package/src/xml-components/keyhandler/KeyHandler.brs +30 -0
- package/src/xml-components/keyhandler/KeyHandler.xml +16 -0
- package/src/xml-components/keyhandler/KeyHandler.xml.d.ts +45 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.brs +137 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml +10 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml.d.ts +37 -0
- package/src/xml-components/modal/Modal.brs +105 -0
- package/src/xml-components/modal/Modal.xml +22 -0
- package/src/xml-components/modal/Modal.xml.d.ts +54 -0
- package/src/xml-components/modal/StandardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/tests/Modal.test.brs +195 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Auto-generated TypeScript declarations for XML component import.
|
|
2
|
+
// DO NOT EDIT — this file is regenerated during build.
|
|
3
|
+
//
|
|
4
|
+
// Source component: StandardProgressDialogExt
|
|
5
|
+
// Extends: StandardProgressDialog
|
|
6
|
+
|
|
7
|
+
import type { IStandardProgressDialogProps } from "@roku-sdk/components";
|
|
8
|
+
import type { TypedXmlComponent } from "@roku-sdk/interfaces";
|
|
9
|
+
|
|
10
|
+
export interface IStandardProgressDialogExtProps extends IStandardProgressDialogProps {}
|
|
11
|
+
|
|
12
|
+
declare const _default: TypedXmlComponent<"StandardProgressDialogExt", Record<string, never>>;
|
|
13
|
+
export default _default;
|
|
14
|
+
|
|
15
|
+
declare module "@roku-sdk/solid" {
|
|
16
|
+
namespace JSX {
|
|
17
|
+
interface IntrinsicElements {
|
|
18
|
+
standardProgressDialogExt: IStandardProgressDialogExtProps;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module "@roku-sdk/solid/jsx-runtime" {
|
|
24
|
+
namespace JSX {
|
|
25
|
+
interface IntrinsicElements {
|
|
26
|
+
standardProgressDialogExt: IStandardProgressDialogExtProps;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare module "solid-js" {
|
|
32
|
+
namespace JSX {
|
|
33
|
+
interface IntrinsicElements {
|
|
34
|
+
standardProgressDialogExt: IStandardProgressDialogExtProps;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
' Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
' SPDX-License-Identifier: MIT
|
|
3
|
+
' Run with Modal.brs in the same interpreter scope. Scene/node effects are controlled.
|
|
4
|
+
sub main()
|
|
5
|
+
m.failures = 0
|
|
6
|
+
m.assertions = 0
|
|
7
|
+
for each id in ["", "shared-id"]
|
|
8
|
+
setupModal()
|
|
9
|
+
first = fakeDialog(1, id)
|
|
10
|
+
second = fakeDialog(2, id)
|
|
11
|
+
m.top.dialog = first
|
|
12
|
+
onDialogChange()
|
|
13
|
+
check(m.scene.dialog = invalid, "no presentation before mount")
|
|
14
|
+
m.top.mounted = true
|
|
15
|
+
updateDialog()
|
|
16
|
+
check(sameDialog(m.scene.dialog, first), "initial presentation")
|
|
17
|
+
check(m.top.opened, "native opening notification")
|
|
18
|
+
check(first.observed, "observe native close")
|
|
19
|
+
|
|
20
|
+
m.scene.dialog = second
|
|
21
|
+
m.top.mounted = false
|
|
22
|
+
updateDialog()
|
|
23
|
+
check(sameDialog(m.scene.dialog, second), "unmount does not close same-id replacement")
|
|
24
|
+
check(not first.close and not second.close, "stale owner does not request native close")
|
|
25
|
+
check(not first.observed, "unmount removes original observer")
|
|
26
|
+
|
|
27
|
+
setupModal()
|
|
28
|
+
m.top.mounted = true
|
|
29
|
+
m.top.dialog = first
|
|
30
|
+
m.scene.dialog = second
|
|
31
|
+
onDialogChange()
|
|
32
|
+
check(sameDialog(m.scene.dialog, first), "default admission replaces distinct same-id node")
|
|
33
|
+
m.top.open = false
|
|
34
|
+
onOpenChange()
|
|
35
|
+
check(first.close, "explicit close requests the native close field")
|
|
36
|
+
check(sameDialog(m.scene.dialog, first), "close request does not clear the scene field")
|
|
37
|
+
check(first.observed and not m.top.wasClosed, "close notification waits for native completion")
|
|
38
|
+
finishNativeClose(first)
|
|
39
|
+
check(m.scene.dialog = invalid and m.top.wasClosed, "native completion releases the session")
|
|
40
|
+
m.top.open = true
|
|
41
|
+
onOpenChange()
|
|
42
|
+
check(sameDialog(m.scene.dialog, first), "same wrapper reopens")
|
|
43
|
+
|
|
44
|
+
onNativeClosed(fakeEvent(second))
|
|
45
|
+
check(sameDialog(m.dialog, first), "foreign close ignored")
|
|
46
|
+
m.scene.dialog = invalid
|
|
47
|
+
onNativeClosed(fakeEvent(first))
|
|
48
|
+
check(m.top.wasClosed, "native close reported without Boolean payload")
|
|
49
|
+
m.top.wasClosed = false
|
|
50
|
+
onNativeClosed(fakeEvent(first))
|
|
51
|
+
updateDialog()
|
|
52
|
+
check(not m.top.wasClosed, "duplicate close is not reported")
|
|
53
|
+
check(m.scene.dialog = invalid, "dismissed dialog does not reopen")
|
|
54
|
+
|
|
55
|
+
setupModal()
|
|
56
|
+
m.top.mounted = true
|
|
57
|
+
m.top.dialog = first
|
|
58
|
+
m.top.replaceExisting = false
|
|
59
|
+
m.scene.dialog = second
|
|
60
|
+
onDialogChange()
|
|
61
|
+
check(m.top.blocked, "occupied scene reports blocked")
|
|
62
|
+
check(sameDialog(m.scene.dialog, second), "non-preempting admission preserves modal")
|
|
63
|
+
m.scene.dialog = invalid
|
|
64
|
+
m.top.blocked = false
|
|
65
|
+
updateDialog()
|
|
66
|
+
check(m.scene.dialog = invalid and not m.top.blocked, "blocked admission does not retry itself")
|
|
67
|
+
m.top.open = false
|
|
68
|
+
onOpenChange()
|
|
69
|
+
m.top.open = true
|
|
70
|
+
onOpenChange()
|
|
71
|
+
check(sameDialog(m.scene.dialog, first), "explicit retry after rejection")
|
|
72
|
+
end for
|
|
73
|
+
setupModal()
|
|
74
|
+
m.top.dialog = fakeDialog(1, "content")
|
|
75
|
+
m.top.fallback = fakeDialog(2, "loading")
|
|
76
|
+
m.top.ready = false
|
|
77
|
+
m.top.mounted = true
|
|
78
|
+
m.top.replaceExisting = false
|
|
79
|
+
updateDialog()
|
|
80
|
+
check(sameDialog(m.scene.dialog, m.top.fallback), "loading is presented by the same owner")
|
|
81
|
+
check(not m.top.opened, "loading is not content presentation")
|
|
82
|
+
m.top.ready = true
|
|
83
|
+
updateDialog()
|
|
84
|
+
check(sameDialog(m.scene.dialog, m.top.dialog), "ready replaces own loading without preemption")
|
|
85
|
+
check(not m.top.wasClosed, "loading handoff is not a terminal close")
|
|
86
|
+
check(not m.top.fallback.observed, "loading observer removed at handoff")
|
|
87
|
+
check(m.top.opened, "content presentation notified")
|
|
88
|
+
content = m.top.dialog
|
|
89
|
+
m.top.dialog = invalid
|
|
90
|
+
onDialogChange()
|
|
91
|
+
check(content.close and not m.top.wasClosed, "clearing content requests native close")
|
|
92
|
+
finishNativeClose(content)
|
|
93
|
+
check(m.scene.dialog = invalid and m.top.wasClosed, "clearing content waits for native close")
|
|
94
|
+
|
|
95
|
+
setupModal()
|
|
96
|
+
m.top.dialog = fakeDialog(1, "content")
|
|
97
|
+
m.top.fallback = fakeDialog(2, "loading")
|
|
98
|
+
m.top.ready = false
|
|
99
|
+
m.top.mounted = true
|
|
100
|
+
updateDialog()
|
|
101
|
+
m.scene.dialog = invalid
|
|
102
|
+
onNativeClosed(fakeEvent(m.top.fallback))
|
|
103
|
+
m.top.ready = true
|
|
104
|
+
updateDialog()
|
|
105
|
+
check(m.scene.dialog = invalid, "late assets cannot reopen cancelled loading")
|
|
106
|
+
setupModal()
|
|
107
|
+
m.top.dialog = fakeDialog(1, "content")
|
|
108
|
+
m.top.fallback = fakeDialog(2, "loading")
|
|
109
|
+
m.top.ready = false
|
|
110
|
+
m.top.mounted = true
|
|
111
|
+
updateDialog()
|
|
112
|
+
m.top.open = false
|
|
113
|
+
onOpenChange()
|
|
114
|
+
check(m.top.fallback.close and not m.top.wasClosed, "controlled close requests fallback dismissal")
|
|
115
|
+
finishNativeClose(m.top.fallback)
|
|
116
|
+
check(m.scene.dialog = invalid and m.top.wasClosed, "native close completes fallback dismissal")
|
|
117
|
+
m.top.ready = true
|
|
118
|
+
updateDialog()
|
|
119
|
+
check(m.scene.dialog = invalid, "close fences subsequent readiness")
|
|
120
|
+
setupModal()
|
|
121
|
+
m.top.dialog = fakeDialog(1, "content")
|
|
122
|
+
m.top.mounted = true
|
|
123
|
+
updateDialog()
|
|
124
|
+
m.top.scene = invalid
|
|
125
|
+
m.top.mounted = false
|
|
126
|
+
updateDialog()
|
|
127
|
+
check(m.top.dialog.close, "unmount closes through the dialog's scene after host detachment")
|
|
128
|
+
check(not m.top.dialog.observed, "unmount retires the native observer without awaiting callbacks")
|
|
129
|
+
GetGlobalAA().Delete("modalTestScene")
|
|
130
|
+
print "Modal bridge assertions="; m.assertions; " failures="; m.failures
|
|
131
|
+
end sub
|
|
132
|
+
|
|
133
|
+
sub finishNativeClose(dialog as Object)
|
|
134
|
+
if dialog.observed then onNativeClosed(fakeEvent(dialog))
|
|
135
|
+
if sameDialog(m.scene.dialog, dialog) then m.scene.dialog = invalid
|
|
136
|
+
end sub
|
|
137
|
+
|
|
138
|
+
sub setupModal()
|
|
139
|
+
m.scene = { dialog: invalid }
|
|
140
|
+
GetGlobalAA().modalTestScene = m.scene
|
|
141
|
+
m.top = {
|
|
142
|
+
scene: m.scene, mounted: false, ready: true, open: true, replaceExisting: true, fallback: invalid
|
|
143
|
+
identity: 0
|
|
144
|
+
initialFocusId: "", dialog: invalid, opened: false, wasClosed: false, blocked: false
|
|
145
|
+
getScene: function() as Object
|
|
146
|
+
return m.scene
|
|
147
|
+
end function
|
|
148
|
+
appendChild: sub(node as Object)
|
|
149
|
+
m.prepared = node
|
|
150
|
+
end sub
|
|
151
|
+
isSameNode: function(other as Object) as Boolean
|
|
152
|
+
return m.identity = other.identity
|
|
153
|
+
end function
|
|
154
|
+
removeChild: sub(node as Object)
|
|
155
|
+
end sub
|
|
156
|
+
}
|
|
157
|
+
init()
|
|
158
|
+
end sub
|
|
159
|
+
|
|
160
|
+
function fakeDialog(identity as Integer, id as String) as Object
|
|
161
|
+
return {
|
|
162
|
+
identity: identity, id: id, observed: false, close: false
|
|
163
|
+
getScene: function() as Object
|
|
164
|
+
return GetGlobalAA().modalTestScene
|
|
165
|
+
end function
|
|
166
|
+
getParent: function() as Dynamic
|
|
167
|
+
return invalid
|
|
168
|
+
end function
|
|
169
|
+
isSameNode: function(other as Object) as Boolean
|
|
170
|
+
return m.identity = other.identity
|
|
171
|
+
end function
|
|
172
|
+
observeFieldScopedEx: sub(field as String, callback as String)
|
|
173
|
+
m.observed = field = "wasClosed" and callback = "onNativeClosed"
|
|
174
|
+
end sub
|
|
175
|
+
unobserveFieldScoped: sub(field as String)
|
|
176
|
+
if field = "wasClosed" then m.observed = false
|
|
177
|
+
end sub
|
|
178
|
+
}
|
|
179
|
+
end function
|
|
180
|
+
|
|
181
|
+
function fakeEvent(node as Object) as Object
|
|
182
|
+
return {
|
|
183
|
+
node: node
|
|
184
|
+
getRoSGNode: function() as Object
|
|
185
|
+
return m.node
|
|
186
|
+
end function
|
|
187
|
+
}
|
|
188
|
+
end function
|
|
189
|
+
|
|
190
|
+
sub check(condition as Boolean, message as String)
|
|
191
|
+
m.assertions++
|
|
192
|
+
if condition then return
|
|
193
|
+
m.failures++
|
|
194
|
+
print "FAIL "; message
|
|
195
|
+
end sub
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@roku-sdk/dev-tools/typescript-config/tsconfig.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./dist",
|
|
5
|
+
"rootDir": "./src"
|
|
6
|
+
},
|
|
7
|
+
"include": ["src/**/*", "jsx.d.ts", "core-jsx.d.ts"],
|
|
8
|
+
"exclude": ["dist", "node_modules"],
|
|
9
|
+
"files": ["xml.d.ts", "src/kdfs.d.ts"]
|
|
10
|
+
}
|