@roku-sdk/components 0.0.0-stage → 2.19.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 +85 -3
- package/src/__tests__/container.test.tsx +150 -0
- package/src/__tests__/effect-gradient-validation.test.tsx +133 -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 +276 -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 +119 -0
- package/src/sg-nodes/effect.tsx +167 -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 +103 -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 +66 -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 +58 -0
- package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
- package/src/sg-nodes/standard-message-dialog.tsx +47 -0
- package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
- package/src/sg-nodes/standard-pinpad-dialog.tsx +44 -0
- package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
- package/src/sg-nodes/standard-progress-dialog.tsx +40 -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 +642 -0
- package/src/sg-nodes/video.tsx +75 -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,322 @@
|
|
|
1
|
+
Sub Init()
|
|
2
|
+
this = m.top
|
|
3
|
+
textEditBox = this.textEditBox
|
|
4
|
+
|
|
5
|
+
textEditBox.disableVoiceUnderscoreControl = true
|
|
6
|
+
textEditBox.active = true
|
|
7
|
+
textEditBox.observeFieldScoped("text", "textChanged")
|
|
8
|
+
textEditBox.observeFieldScoped("isDictating", "isDictatingChanged")
|
|
9
|
+
textEditBox.observeField("renderTracking", "KeyChanged")
|
|
10
|
+
End Sub
|
|
11
|
+
|
|
12
|
+
' Re-apply Ext underscore props when dictation ends (OS may not restore them
|
|
13
|
+
' while disableVoiceUnderscoreControl is true).
|
|
14
|
+
Sub isDictatingChanged(event as Object)
|
|
15
|
+
m.top.isDictating = event.getData()
|
|
16
|
+
if event.getData() = false
|
|
17
|
+
showUnderscoresChanged()
|
|
18
|
+
centerUnderscoresChanged()
|
|
19
|
+
end if
|
|
20
|
+
End Sub
|
|
21
|
+
|
|
22
|
+
Sub KeyChanged()
|
|
23
|
+
disableKeyChanged()
|
|
24
|
+
enableKeyChanged()
|
|
25
|
+
End Sub
|
|
26
|
+
|
|
27
|
+
Sub modeChanged()
|
|
28
|
+
this = m.top
|
|
29
|
+
m.currMode = this.mode
|
|
30
|
+
if m.currMode <> this.keyGrid.mode
|
|
31
|
+
this.keyGrid.mode = m.currMode
|
|
32
|
+
end if
|
|
33
|
+
End Sub
|
|
34
|
+
|
|
35
|
+
Sub initTextChanged()
|
|
36
|
+
applyInitText()
|
|
37
|
+
End Sub
|
|
38
|
+
|
|
39
|
+
Sub keyDefinitionUriChanged()
|
|
40
|
+
this = m.top
|
|
41
|
+
if this.keyDefinitionUri <> invalid and this.keyDefinitionUri <> ""
|
|
42
|
+
this.keyGrid.keyDefinitionUri = this.keyDefinitionUri
|
|
43
|
+
end if
|
|
44
|
+
End Sub
|
|
45
|
+
|
|
46
|
+
Sub jumpToKeyChanged()
|
|
47
|
+
this = m.top
|
|
48
|
+
if this.jumpToKey <> invalid
|
|
49
|
+
this.keyGrid.jumpToKey = this.jumpToKey
|
|
50
|
+
this.keyGrid.visible = false
|
|
51
|
+
this.keyGrid.visible = true
|
|
52
|
+
end if
|
|
53
|
+
End Sub
|
|
54
|
+
|
|
55
|
+
Sub disableKeyChanged()
|
|
56
|
+
this = m.top
|
|
57
|
+
if this.disableKey <> invalid
|
|
58
|
+
this.keyGrid.disableKey = this.disableKey
|
|
59
|
+
this.keyGrid.visible = false
|
|
60
|
+
this.keyGrid.visible = true
|
|
61
|
+
end if
|
|
62
|
+
End Sub
|
|
63
|
+
|
|
64
|
+
Sub enableKeyChanged()
|
|
65
|
+
this = m.top
|
|
66
|
+
if this.enableKey <> invalid
|
|
67
|
+
this.keyGrid.enableKey = this.enableKey
|
|
68
|
+
this.keyGrid.visible = false
|
|
69
|
+
this.keyGrid.visible = true
|
|
70
|
+
end if
|
|
71
|
+
End Sub
|
|
72
|
+
|
|
73
|
+
Sub focusVisibleChanged()
|
|
74
|
+
this = m.top
|
|
75
|
+
if this.focusVisible <> invalid
|
|
76
|
+
this.keyGrid.focusVisible = this.focusVisible
|
|
77
|
+
end if
|
|
78
|
+
End Sub
|
|
79
|
+
|
|
80
|
+
Sub horizWrapChanged()
|
|
81
|
+
this = m.top
|
|
82
|
+
if this.horizWrap <> invalid
|
|
83
|
+
this.keyGrid.horizWrap = this.horizWrap
|
|
84
|
+
end if
|
|
85
|
+
End Sub
|
|
86
|
+
|
|
87
|
+
Sub vertWrapChanged()
|
|
88
|
+
this = m.top
|
|
89
|
+
if this.vertWrap <> invalid
|
|
90
|
+
this.keyGrid.vertWrap = this.vertWrap
|
|
91
|
+
end if
|
|
92
|
+
End Sub
|
|
93
|
+
|
|
94
|
+
Sub paletteChanged()
|
|
95
|
+
this = m.top
|
|
96
|
+
if this.palette <> invalid
|
|
97
|
+
this.keyGrid.palette = this.palette
|
|
98
|
+
end if
|
|
99
|
+
End Sub
|
|
100
|
+
|
|
101
|
+
function getCurrentDateTime(utc = false as Boolean) as Object
|
|
102
|
+
localDateTime = CreateObject("roDateTime")
|
|
103
|
+
if utc = false then
|
|
104
|
+
localDateTime.ToLocalTime()
|
|
105
|
+
end if
|
|
106
|
+
strLocalDate = localDateTime.ToISOString()
|
|
107
|
+
|
|
108
|
+
return [Left(strLocalDate, 10), Left(Right(strLocalDate, 9), 8)]
|
|
109
|
+
end function
|
|
110
|
+
|
|
111
|
+
Sub applyInitText()
|
|
112
|
+
this = m.top
|
|
113
|
+
textEditBox = this.textEditBox
|
|
114
|
+
if this.initText <> invalid
|
|
115
|
+
this.text = this.initText
|
|
116
|
+
textEditBox.text = this.text
|
|
117
|
+
textEditBox.cursorPosition = this.text.len()
|
|
118
|
+
end if
|
|
119
|
+
End Sub
|
|
120
|
+
|
|
121
|
+
Sub textChanged(event as Object)
|
|
122
|
+
this = m.top
|
|
123
|
+
textEditBox = this.textEditBox
|
|
124
|
+
currentText = this.text
|
|
125
|
+
|
|
126
|
+
textLengthChange = currentText.len()
|
|
127
|
+
|
|
128
|
+
' Address-form KDF logic (e.g. CustomAddressKDF): month/year modes auto-format
|
|
129
|
+
' date segments. Not a general CustomKeyboard feature — other KDFs with
|
|
130
|
+
' month/year mode names may need different behavior.
|
|
131
|
+
if this.mode = "month" and textLengthChange = 1 then
|
|
132
|
+
this.text = "0" + currentText
|
|
133
|
+
end if
|
|
134
|
+
|
|
135
|
+
if this.mode = "year" then
|
|
136
|
+
yearFirstTwoChars = Left(getCurrentDateTime()[0], 2)
|
|
137
|
+
if textLengthChange = 2 and Val(this.text) <> Val(yearFirstTwoChars) then
|
|
138
|
+
this.text = yearFirstTwoChars + this.text
|
|
139
|
+
end if
|
|
140
|
+
end if
|
|
141
|
+
|
|
142
|
+
this.textEditBox.text = this.text
|
|
143
|
+
this.textEditBox.cursorPosition = this.text.len()
|
|
144
|
+
End Sub
|
|
145
|
+
|
|
146
|
+
Sub disableVoiceUnderscoreControlChanged()
|
|
147
|
+
this = m.top
|
|
148
|
+
textEditBox = this.textEditBox
|
|
149
|
+
if this.disableVoiceUnderscoreControl <> invalid
|
|
150
|
+
textEditBox.disableVoiceUnderscoreControl = this.disableVoiceUnderscoreControl
|
|
151
|
+
end if
|
|
152
|
+
End Sub
|
|
153
|
+
|
|
154
|
+
Sub showUnderscoresChanged()
|
|
155
|
+
this = m.top
|
|
156
|
+
textEditBox = this.textEditBox
|
|
157
|
+
if this.showUnderscores <> invalid
|
|
158
|
+
textEditBox.showUnderscores = this.showUnderscores
|
|
159
|
+
end if
|
|
160
|
+
End Sub
|
|
161
|
+
|
|
162
|
+
Sub centerUnderscoresChanged()
|
|
163
|
+
this = m.top
|
|
164
|
+
textEditBox = this.textEditBox
|
|
165
|
+
if this.centerUnderscores <> invalid
|
|
166
|
+
textEditBox.centerUnderscores = this.centerUnderscores
|
|
167
|
+
end if
|
|
168
|
+
End Sub
|
|
169
|
+
|
|
170
|
+
Sub maxTextLengthChanged()
|
|
171
|
+
this = m.top
|
|
172
|
+
textEditBox = this.textEditBox
|
|
173
|
+
if this.maxTextLength <> invalid
|
|
174
|
+
textEditBox.maxTextLength = this.maxTextLength
|
|
175
|
+
end if
|
|
176
|
+
End Sub
|
|
177
|
+
|
|
178
|
+
Sub voiceEnabledChanged()
|
|
179
|
+
this = m.top
|
|
180
|
+
textEditBox = this.textEditBox
|
|
181
|
+
if this.voiceEnabled <> invalid
|
|
182
|
+
textEditBox.voiceEnabled = this.voiceEnabled
|
|
183
|
+
end if
|
|
184
|
+
End Sub
|
|
185
|
+
|
|
186
|
+
Sub voiceEntryTypeChanged()
|
|
187
|
+
this = m.top
|
|
188
|
+
textEditBox = this.textEditBox
|
|
189
|
+
if this.voiceEntryType <> invalid
|
|
190
|
+
textEditBox.voiceEntryType = this.voiceEntryType
|
|
191
|
+
end if
|
|
192
|
+
End Sub
|
|
193
|
+
|
|
194
|
+
Sub voiceToolTipWidthChanged()
|
|
195
|
+
this = m.top
|
|
196
|
+
textEditBox = this.textEditBox
|
|
197
|
+
if this.voiceToolTipWidth <> invalid
|
|
198
|
+
textEditBox.voiceToolTipWidth = this.voiceToolTipWidth
|
|
199
|
+
end if
|
|
200
|
+
End Sub
|
|
201
|
+
|
|
202
|
+
Sub voiceInputRegexFilterChanged()
|
|
203
|
+
this = m.top
|
|
204
|
+
textEditBox = this.textEditBox
|
|
205
|
+
if this.voiceInputRegexFilter <> invalid
|
|
206
|
+
textEditBox.voiceInputRegexFilter = this.voiceInputRegexFilter
|
|
207
|
+
end if
|
|
208
|
+
End Sub
|
|
209
|
+
|
|
210
|
+
Sub hintTextChanged()
|
|
211
|
+
this = m.top
|
|
212
|
+
textEditBox = this.textEditBox
|
|
213
|
+
if this.hintText <> invalid
|
|
214
|
+
textEditBox.hintText = this.hintText
|
|
215
|
+
end if
|
|
216
|
+
End Sub
|
|
217
|
+
|
|
218
|
+
Sub cursorPositionChanged()
|
|
219
|
+
this = m.top
|
|
220
|
+
textEditBox = this.textEditBox
|
|
221
|
+
if this.cursorPosition <> invalid
|
|
222
|
+
textEditBox.cursorPosition = this.cursorPosition
|
|
223
|
+
end if
|
|
224
|
+
End Sub
|
|
225
|
+
|
|
226
|
+
Sub clearOnDownKeyChanged()
|
|
227
|
+
this = m.top
|
|
228
|
+
textEditBox = this.textEditBox
|
|
229
|
+
if this.clearOnDownKey <> invalid
|
|
230
|
+
textEditBox.clearOnDownKey = this.clearOnDownKey
|
|
231
|
+
end if
|
|
232
|
+
End Sub
|
|
233
|
+
|
|
234
|
+
Sub activeChanged()
|
|
235
|
+
this = m.top
|
|
236
|
+
textEditBox = this.textEditBox
|
|
237
|
+
if this.active <> invalid
|
|
238
|
+
textEditBox.active = this.active
|
|
239
|
+
end if
|
|
240
|
+
End Sub
|
|
241
|
+
|
|
242
|
+
Sub secureModeChanged()
|
|
243
|
+
this = m.top
|
|
244
|
+
textEditBox = this.textEditBox
|
|
245
|
+
if this.secureMode <> invalid
|
|
246
|
+
textEditBox.secureMode = this.secureMode
|
|
247
|
+
end if
|
|
248
|
+
End Sub
|
|
249
|
+
|
|
250
|
+
Sub textColorChanged()
|
|
251
|
+
this = m.top
|
|
252
|
+
textEditBox = this.textEditBox
|
|
253
|
+
if this.textColor <> invalid and this.textColor <> ""
|
|
254
|
+
textEditBox.textColor = this.textColor
|
|
255
|
+
end if
|
|
256
|
+
End Sub
|
|
257
|
+
|
|
258
|
+
Sub hintTextColorChanged()
|
|
259
|
+
this = m.top
|
|
260
|
+
textEditBox = this.textEditBox
|
|
261
|
+
if this.hintTextColor <> invalid and this.hintTextColor <> ""
|
|
262
|
+
textEditBox.hintTextColor = this.hintTextColor
|
|
263
|
+
end if
|
|
264
|
+
End Sub
|
|
265
|
+
|
|
266
|
+
Sub voiceTextBoxWidthChanged()
|
|
267
|
+
this = m.top
|
|
268
|
+
textEditBox = this.textEditBox
|
|
269
|
+
if this.voiceTextBoxWidth <> invalid
|
|
270
|
+
textEditBox.width = this.voiceTextBoxWidth
|
|
271
|
+
end if
|
|
272
|
+
End Sub
|
|
273
|
+
|
|
274
|
+
Sub backgroundUriChanged()
|
|
275
|
+
this = m.top
|
|
276
|
+
textEditBox = this.textEditBox
|
|
277
|
+
if this.backgroundUri <> invalid
|
|
278
|
+
textEditBox.backgroundUri = this.backgroundUri
|
|
279
|
+
end if
|
|
280
|
+
End Sub
|
|
281
|
+
|
|
282
|
+
Sub leadingEllipsisChanged()
|
|
283
|
+
this = m.top
|
|
284
|
+
textEditBox = this.textEditBox
|
|
285
|
+
if this.leadingEllipsis <> invalid
|
|
286
|
+
textEditBox.leadingEllipsis = this.leadingEllipsis
|
|
287
|
+
end if
|
|
288
|
+
End Sub
|
|
289
|
+
|
|
290
|
+
function isCapsModifierKey(key as string) as boolean
|
|
291
|
+
return LCase(key).StartsWith("caps")
|
|
292
|
+
end function
|
|
293
|
+
|
|
294
|
+
' Register mod keys (abc123 / symbols / accents) in KDFs such as WifiCustomKDF only
|
|
295
|
+
' swap the visible key grid, so suppress strOut and let the app choose the mode.
|
|
296
|
+
function isRegisterModifierKey(key as string) as boolean
|
|
297
|
+
lk = LCase(key)
|
|
298
|
+
return lk = "abc123" or lk = "symbols" or lk = "accents"
|
|
299
|
+
end function
|
|
300
|
+
|
|
301
|
+
Function keySelected(key as string) as boolean
|
|
302
|
+
this = m.top
|
|
303
|
+
if isCapsModifierKey(key) or isRegisterModifierKey(key)
|
|
304
|
+
m.top.SetField("keySelectedValue", {"key": key})
|
|
305
|
+
return true
|
|
306
|
+
end if
|
|
307
|
+
|
|
308
|
+
if key = "ChangeCase" or key = "Next" or key = "Prev" or key = "ToggleLang"
|
|
309
|
+
m.top.SetField("keySelectedValue", {"key": key})
|
|
310
|
+
return true
|
|
311
|
+
end if
|
|
312
|
+
|
|
313
|
+
' Address-form KDF: month/year modes replace text on each key press.
|
|
314
|
+
if m.top.keyGrid.mode = "year" or m.top.keyGrid.mode = "month" then
|
|
315
|
+
m.top.textEditBox.text = key
|
|
316
|
+
m.top.SetField("keySelectedValue", {"key": key})
|
|
317
|
+
return true
|
|
318
|
+
end if
|
|
319
|
+
|
|
320
|
+
m.top.SetField("keySelectedValue", {"key": key})
|
|
321
|
+
return false
|
|
322
|
+
End Function
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
|
|
3
|
+
<component name="CustomKeyboard" extends="DynamicCustomKeyboard">
|
|
4
|
+
<script type="text/brightscript" uri="CustomKeyboard.brs" />
|
|
5
|
+
<interface>
|
|
6
|
+
<field id="voiceEnabled" type="boolean" value="false" onChange="voiceEnabledChanged" />
|
|
7
|
+
<field id="voiceToolTipWidth" type="float" onChange="voiceToolTipWidthChanged" />
|
|
8
|
+
<field id="voiceEntryType" type="string" onChange="voiceEntryTypeChanged" />
|
|
9
|
+
<field id="voiceInputRegexFilter" type="string" onChange="voiceInputRegexFilterChanged" />
|
|
10
|
+
<field id="isDictating" type="boolean" alwaysNotify="true" />
|
|
11
|
+
<field id="hintText" type="string" onChange="hintTextChanged" />
|
|
12
|
+
<field id="maxTextLength" type="float" onChange="maxTextLengthChanged" />
|
|
13
|
+
<field id="cursorPosition" type="float" onChange="cursorPositionChanged" />
|
|
14
|
+
<field id="clearOnDownKey" type="boolean" onChange="clearOnDownKeyChanged" />
|
|
15
|
+
<field id="active" type="boolean" onChange="activeChanged" />
|
|
16
|
+
<field id="secureMode" type="boolean" onChange="secureModeChanged" />
|
|
17
|
+
<field id="textColor" type="string" onChange="textColorChanged" />
|
|
18
|
+
<field id="hintTextColor" type="string" onChange="hintTextColorChanged" />
|
|
19
|
+
<field id="voiceTextBoxWidth" type="float" onChange="voiceTextBoxWidthChanged" />
|
|
20
|
+
<field id="backgroundUri" type="string" onChange="backgroundUriChanged" />
|
|
21
|
+
<field id="leadingEllipsis" type="boolean" onChange="leadingEllipsisChanged" />
|
|
22
|
+
|
|
23
|
+
<field id="disableVoiceUnderscoreControl" type="boolean"
|
|
24
|
+
onChange="disableVoiceUnderscoreControlChanged" />
|
|
25
|
+
<field id="showUnderscores" type="boolean" onChange="showUnderscoresChanged" />
|
|
26
|
+
<field id="centerUnderscores" type="boolean" onChange="centerUnderscoresChanged" />
|
|
27
|
+
|
|
28
|
+
<field id="keyDefinitionUri" type="string" onChange="keyDefinitionUriChanged" />
|
|
29
|
+
<field id="mode" type="string" onChange="modeChanged" />
|
|
30
|
+
<field id="jumpToKey" type="floatarray" onChange="jumpToKeyChanged" />
|
|
31
|
+
<field id="disableKey" type="string" onChange="disableKeyChanged" />
|
|
32
|
+
<field id="enableKey" type="string" onChange="enableKeyChanged" />
|
|
33
|
+
<field id="focusVisible" type="boolean" onChange="focusVisibleChanged" />
|
|
34
|
+
<field id="horizWrap" type="boolean" onChange="horizWrapChanged" />
|
|
35
|
+
<field id="vertWrap" type="boolean" onChange="vertWrapChanged" />
|
|
36
|
+
<field id="palette" type="node" onChange="paletteChanged" />
|
|
37
|
+
<field id="keySelectedValue" type="assocarray" />
|
|
38
|
+
<field id="initText" type="string" onChange="initTextChanged" />
|
|
39
|
+
|
|
40
|
+
<function name="keySelected" />
|
|
41
|
+
<field id="next" type="bool" alwaysNotify="true" />
|
|
42
|
+
<field id="prev" type="bool" alwaysNotify="true" />
|
|
43
|
+
</interface>
|
|
44
|
+
|
|
45
|
+
</component>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// Auto-generated TypeScript declarations for XML component import.
|
|
2
|
+
// DO NOT EDIT — this file is regenerated during build.
|
|
3
|
+
//
|
|
4
|
+
// Source component: CustomKeyboard
|
|
5
|
+
// Extends: DynamicCustomKeyboard
|
|
6
|
+
|
|
7
|
+
import type { IKeyboardPropsWithVoice } from "@roku-sdk/components";
|
|
8
|
+
import type { TypedXmlComponent } from "@roku-sdk/interfaces";
|
|
9
|
+
|
|
10
|
+
interface CustomKeyboardFields {
|
|
11
|
+
/** @default "false" */
|
|
12
|
+
voiceEnabled: boolean;
|
|
13
|
+
voiceToolTipWidth: number;
|
|
14
|
+
voiceEntryType: string;
|
|
15
|
+
voiceInputRegexFilter: string;
|
|
16
|
+
isDictating: boolean;
|
|
17
|
+
hintText: string;
|
|
18
|
+
maxTextLength: number;
|
|
19
|
+
cursorPosition: number;
|
|
20
|
+
clearOnDownKey: boolean;
|
|
21
|
+
active: boolean;
|
|
22
|
+
secureMode: boolean;
|
|
23
|
+
textColor: string;
|
|
24
|
+
hintTextColor: string;
|
|
25
|
+
voiceTextBoxWidth: number;
|
|
26
|
+
backgroundUri: string;
|
|
27
|
+
leadingEllipsis: boolean;
|
|
28
|
+
disableVoiceUnderscoreControl: boolean;
|
|
29
|
+
showUnderscores: boolean;
|
|
30
|
+
centerUnderscores: boolean;
|
|
31
|
+
keyDefinitionUri: string;
|
|
32
|
+
mode: string;
|
|
33
|
+
jumpToKey: number[];
|
|
34
|
+
disableKey: string;
|
|
35
|
+
enableKey: string;
|
|
36
|
+
focusVisible: boolean;
|
|
37
|
+
horizWrap: boolean;
|
|
38
|
+
vertWrap: boolean;
|
|
39
|
+
palette: import("@roku-sdk/interfaces").DomNode;
|
|
40
|
+
keySelectedValue: Record<string, unknown>;
|
|
41
|
+
initText: string;
|
|
42
|
+
next: boolean;
|
|
43
|
+
prev: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface ICustomKeyboardProps extends IKeyboardPropsWithVoice, Partial<CustomKeyboardFields> {}
|
|
47
|
+
|
|
48
|
+
declare const _default: TypedXmlComponent<"CustomKeyboard", CustomKeyboardFields>;
|
|
49
|
+
export default _default;
|
|
50
|
+
|
|
51
|
+
declare module "@roku-sdk/solid" {
|
|
52
|
+
namespace JSX {
|
|
53
|
+
interface IntrinsicElements {
|
|
54
|
+
customKeyboard: ICustomKeyboardProps;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare module "@roku-sdk/solid/jsx-runtime" {
|
|
60
|
+
namespace JSX {
|
|
61
|
+
interface IntrinsicElements {
|
|
62
|
+
customKeyboard: ICustomKeyboardProps;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare module "solid-js" {
|
|
68
|
+
namespace JSX {
|
|
69
|
+
interface IntrinsicElements {
|
|
70
|
+
customKeyboard: ICustomKeyboardProps;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -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: KeyGridExt
|
|
5
|
+
// Extends: DynamicKeyGrid
|
|
6
|
+
|
|
7
|
+
import type { IDynamicKeyGridProps } from "@roku-sdk/components";
|
|
8
|
+
import type { TypedXmlComponent } from "@roku-sdk/interfaces";
|
|
9
|
+
|
|
10
|
+
export interface IKeyGridExtProps extends IDynamicKeyGridProps {}
|
|
11
|
+
|
|
12
|
+
declare const _default: TypedXmlComponent<"KeyGridExt", Record<string, never>>;
|
|
13
|
+
export default _default;
|
|
14
|
+
|
|
15
|
+
declare module "@roku-sdk/solid" {
|
|
16
|
+
namespace JSX {
|
|
17
|
+
interface IntrinsicElements {
|
|
18
|
+
keyGridExt: IKeyGridExtProps;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module "@roku-sdk/solid/jsx-runtime" {
|
|
24
|
+
namespace JSX {
|
|
25
|
+
interface IntrinsicElements {
|
|
26
|
+
keyGridExt: IKeyGridExtProps;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare module "solid-js" {
|
|
32
|
+
namespace JSX {
|
|
33
|
+
interface IntrinsicElements {
|
|
34
|
+
keyGridExt: IKeyGridExtProps;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -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: KeyboardExt
|
|
5
|
+
// Extends: DynamicKeyboard
|
|
6
|
+
|
|
7
|
+
import type { IDynamicKeyboardProps } from "@roku-sdk/components";
|
|
8
|
+
import type { TypedXmlComponent } from "@roku-sdk/interfaces";
|
|
9
|
+
|
|
10
|
+
export interface IKeyboardExtProps extends IDynamicKeyboardProps {}
|
|
11
|
+
|
|
12
|
+
declare const _default: TypedXmlComponent<"KeyboardExt", Record<string, never>>;
|
|
13
|
+
export default _default;
|
|
14
|
+
|
|
15
|
+
declare module "@roku-sdk/solid" {
|
|
16
|
+
namespace JSX {
|
|
17
|
+
interface IntrinsicElements {
|
|
18
|
+
keyboardExt: IKeyboardExtProps;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module "@roku-sdk/solid/jsx-runtime" {
|
|
24
|
+
namespace JSX {
|
|
25
|
+
interface IntrinsicElements {
|
|
26
|
+
keyboardExt: IKeyboardExtProps;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
declare module "solid-js" {
|
|
32
|
+
namespace JSX {
|
|
33
|
+
interface IntrinsicElements {
|
|
34
|
+
keyboardExt: IKeyboardExtProps;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"keyboardWidthFHD": 495,
|
|
3
|
+
"keyboardHeightFHD": 350,
|
|
4
|
+
"keyboardWidthHD": 324,
|
|
5
|
+
"keyboardHeightHD": 240,
|
|
6
|
+
"sections": [
|
|
7
|
+
{
|
|
8
|
+
"grids": [
|
|
9
|
+
{
|
|
10
|
+
"modes": "card",
|
|
11
|
+
"rows": [
|
|
12
|
+
{
|
|
13
|
+
"keys": [{ "label": "1" }, { "label": "2" }, { "label": "3" }]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"keys": [{ "label": "4" }, { "label": "5" }, { "label": "6" }]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"keys": [{ "label": "7" }, { "label": "8" }, { "label": "9" }]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"keys": [
|
|
23
|
+
{
|
|
24
|
+
"icon": "theme:DKB_ClearKeyBitmap",
|
|
25
|
+
"focusIcon": "theme:DKB_ClearKeyFocusBitmap",
|
|
26
|
+
"strOut": "clear"
|
|
27
|
+
},
|
|
28
|
+
{ "label": "0" },
|
|
29
|
+
{
|
|
30
|
+
"icon": "theme:DKB_DeleteKeyBitmap",
|
|
31
|
+
"focusIcon": "theme:DKB_DeleteKeyFocusBitmap",
|
|
32
|
+
"autoRepeat": 1,
|
|
33
|
+
"strOut": "backspace"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"keys": [{ "label": "Prev", "disabled": 1 }, { "label": "Next" }]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"modes": "month",
|
|
44
|
+
"rows": [
|
|
45
|
+
{
|
|
46
|
+
"keys": [{ "label": "01" }, { "label": "02" }, { "label": "03" }]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"keys": [{ "label": "04" }, { "label": "05" }, { "label": "06" }]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"keys": [{ "label": "07" }, { "label": "08" }, { "label": "09" }]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"keys": [{ "label": "10" }, { "label": "11" }, { "label": "12" }]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"keys": [{ "label": "Prev" }, { "label": "Next" }]
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"modes": "year",
|
|
64
|
+
"rows": [
|
|
65
|
+
{
|
|
66
|
+
"keys": [{ "label": "2022" }, { "label": "2023" }, { "label": "2024" }]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"keys": [{ "label": "2025" }, { "label": "2026" }, { "label": "2027" }]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"keys": [{ "label": "2028" }, { "label": "2029" }, { "label": "2030" }]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"keys": [{ "label": "2031" }, { "label": "2032" }, { "label": "2033" }]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"keys": [{ "label": "Prev" }, { "label": "Next" }]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"modes": "cvv",
|
|
84
|
+
"rows": [
|
|
85
|
+
{
|
|
86
|
+
"keys": [{ "label": "1" }, { "label": "2" }, { "label": "3" }]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"keys": [{ "label": "4" }, { "label": "5" }, { "label": "6" }]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"keys": [{ "label": "7" }, { "label": "8" }, { "label": "9" }]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"keys": [
|
|
96
|
+
{
|
|
97
|
+
"icon": "theme:DKB_ClearKeyBitmap",
|
|
98
|
+
"focusIcon": "theme:DKB_ClearKeyFocusBitmap",
|
|
99
|
+
"strOut": "clear"
|
|
100
|
+
},
|
|
101
|
+
{ "label": "0" },
|
|
102
|
+
{
|
|
103
|
+
"icon": "theme:DKB_DeleteKeyBitmap",
|
|
104
|
+
"focusIcon": "theme:DKB_DeleteKeyFocusBitmap",
|
|
105
|
+
"autoRepeat": 1,
|
|
106
|
+
"strOut": "backspace"
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"keys": [{ "label": "Prev" }, { "label": "Next" }]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"modes": "zip",
|
|
117
|
+
"rows": [
|
|
118
|
+
{
|
|
119
|
+
"keys": [{ "label": "1" }, { "label": "2" }, { "label": "3" }]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"keys": [{ "label": "4" }, { "label": "5" }, { "label": "6" }]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"keys": [{ "label": "7" }, { "label": "8" }, { "label": "9" }]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"keys": [
|
|
129
|
+
{
|
|
130
|
+
"icon": "theme:DKB_ClearKeyBitmap",
|
|
131
|
+
"focusIcon": "theme:DKB_ClearKeyFocusBitmap",
|
|
132
|
+
"strOut": "clear"
|
|
133
|
+
},
|
|
134
|
+
{ "label": "0" },
|
|
135
|
+
{
|
|
136
|
+
"icon": "theme:DKB_DeleteKeyBitmap",
|
|
137
|
+
"focusIcon": "theme:DKB_DeleteKeyFocusBitmap",
|
|
138
|
+
"autoRepeat": 1,
|
|
139
|
+
"strOut": "backspace"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"keys": [{ "label": "Prev" }, { "label": "Next" }]
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|