@microsoft/dragon-copilot-sdk-lexical-react 0.2.6-beta.4636686 → 1.0.1
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/node_modules/@hccm/web-tcl/CHANGELOG.md +161 -0
- package/node_modules/@hccm/web-tcl/README.md +99 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/cleanup-helper.d.ts +23 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/cleanup-helper.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/browser.d.ts +17 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/browser.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/coordinates.d.ts +6 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/coordinates.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/dom.d.ts +44 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/dom.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/element-extensions.d.ts +26 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/element-extensions.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/error.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/error.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/local-store.d.ts +10 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/local-store.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/selection-info.d.ts +4 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/selection-info.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/string.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/string.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/util.d.ts +73 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/common/util.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/logger/logging.d.ts +67 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/logger/logging.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/main.d.ts +8 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/main.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/package-info.d.ts +2 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/package-info.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/shared-data.d.ts +27 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/shared-data.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/speech-document.d.ts +91 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/speech-document.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/base-control.d.ts +100 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/base-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/contenteditable-control.d.ts +18 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/contenteditable-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/custom-control.d.ts +41 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/factory.d.ts +9 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/factory.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/helpers.d.ts +33 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/helpers.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/index.d.ts +6 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/index.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/input-control.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/input-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/processing-status.d.ts +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/processing-status.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/text-control-manager.d.ts +38 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/text-control-manager.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/text-control.d.ts +64 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/text-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/textarea-control.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/textarea-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/tinymce-control.d.ts +11 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/text-control-lib/tinymce-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/channel.d.ts +15 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/channel.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/commands.d.ts +64 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/commands.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/custom-control.d.ts +212 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/index.d.ts +6 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/index.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/input-custom-control.d.ts +2 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/input-custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/textarea-custom-control.d.ts +2 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/custom-controls/textarea-custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/diagnostics.d.ts +37 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/diagnostics.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/dom-observable.d.ts +13 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/dom-observable.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/events.d.ts +39 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/events.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/iframe-support.d.ts +29 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/iframe-support.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/index.d.ts +26 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/index.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/processing-status.d.ts +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/processing-status.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/state.d.ts +165 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/state.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/types.d.ts +21 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/types.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/utility-types.d.ts +3 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/utility-types.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/validation.d.ts +35 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/validation.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/webtcl-attributes.d.ts +104 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/webtcl-attributes.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/webtcl-client.d.ts +16 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/webtcl-client.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/webtcl-controller.d.ts +8 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/webtcl-controller.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/worker.d.ts +18 -0
- package/node_modules/@hccm/web-tcl/dist/cjs/webtcl/worker.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/cleanup-helper.d.ts +23 -0
- package/node_modules/@hccm/web-tcl/dist/esm/cleanup-helper.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/browser.d.ts +17 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/browser.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/coordinates.d.ts +6 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/coordinates.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/dom.d.ts +44 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/dom.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/element-extensions.d.ts +26 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/element-extensions.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/error.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/error.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/local-store.d.ts +10 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/local-store.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/selection-info.d.ts +4 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/selection-info.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/string.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/string.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/util.d.ts +73 -0
- package/node_modules/@hccm/web-tcl/dist/esm/common/util.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/logger/logging.d.ts +67 -0
- package/node_modules/@hccm/web-tcl/dist/esm/logger/logging.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/main.d.ts +8 -0
- package/node_modules/@hccm/web-tcl/dist/esm/main.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/package-info.d.ts +2 -0
- package/node_modules/@hccm/web-tcl/dist/esm/package-info.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/shared-data.d.ts +27 -0
- package/node_modules/@hccm/web-tcl/dist/esm/shared-data.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/speech-document.d.ts +91 -0
- package/node_modules/@hccm/web-tcl/dist/esm/speech-document.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/base-control.d.ts +100 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/base-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/contenteditable-control.d.ts +18 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/contenteditable-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/custom-control.d.ts +41 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/factory.d.ts +9 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/factory.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/helpers.d.ts +33 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/helpers.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/index.d.ts +6 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/index.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/input-control.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/input-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/processing-status.d.ts +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/processing-status.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/text-control-manager.d.ts +38 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/text-control-manager.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/text-control.d.ts +64 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/text-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/textarea-control.d.ts +7 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/textarea-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/tinymce-control.d.ts +11 -0
- package/node_modules/@hccm/web-tcl/dist/esm/text-control-lib/tinymce-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/channel.d.ts +15 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/channel.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/commands.d.ts +64 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/commands.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/custom-control.d.ts +212 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/index.d.ts +6 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/index.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/input-custom-control.d.ts +2 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/input-custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/textarea-custom-control.d.ts +2 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/custom-controls/textarea-custom-control.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/diagnostics.d.ts +37 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/diagnostics.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/dom-observable.d.ts +13 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/dom-observable.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/events.d.ts +39 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/events.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/iframe-support.d.ts +29 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/iframe-support.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/index.d.ts +26 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/index.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/processing-status.d.ts +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/processing-status.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/state.d.ts +165 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/state.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/types.d.ts +21 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/types.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/utility-types.d.ts +3 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/utility-types.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/validation.d.ts +35 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/validation.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/webtcl-attributes.d.ts +104 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/webtcl-attributes.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/webtcl-client.d.ts +16 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/webtcl-client.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/webtcl-controller.d.ts +8 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/webtcl-controller.js +1 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/worker.d.ts +18 -0
- package/node_modules/@hccm/web-tcl/dist/esm/webtcl/worker.js +1 -0
- package/node_modules/@hccm/web-tcl/package.json +72 -0
- package/package.json +5 -3
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [1.20.0]
|
|
4
|
+
|
|
5
|
+
- Renamed NUSAError to IntegrationError
|
|
6
|
+
|
|
7
|
+
## [1.19.4]
|
|
8
|
+
|
|
9
|
+
- IFrame-Support: accept only valid messages
|
|
10
|
+
|
|
11
|
+
## [1.19.3]
|
|
12
|
+
|
|
13
|
+
- LICENSE.txt removed from the package
|
|
14
|
+
|
|
15
|
+
## [1.19.2]
|
|
16
|
+
|
|
17
|
+
- ContentEditable: improvement for newline behavior
|
|
18
|
+
|
|
19
|
+
## [1.19.1]
|
|
20
|
+
|
|
21
|
+
- communication through iframe improved
|
|
22
|
+
|
|
23
|
+
## [1.19.0]
|
|
24
|
+
|
|
25
|
+
- iframe support
|
|
26
|
+
|
|
27
|
+
## [1.18.2]
|
|
28
|
+
|
|
29
|
+
- Terser to minify/uglify
|
|
30
|
+
|
|
31
|
+
## [1.18.1]
|
|
32
|
+
|
|
33
|
+
- LICENSE and CHANGELOG added to the npm package
|
|
34
|
+
- README splitted in a root one and one for Dragon-Web-Tcl
|
|
35
|
+
- Tree shaking enabled and minor changes in package.json
|
|
36
|
+
|
|
37
|
+
## [1.18.0]
|
|
38
|
+
|
|
39
|
+
- Added scrolling support for contenteditable controls
|
|
40
|
+
|
|
41
|
+
## [1.17.0]
|
|
42
|
+
|
|
43
|
+
- Module for custom attributes handling introduced.
|
|
44
|
+
- New 'data-dragon' based attributes added, old 'data-nusa' ones are still supported but will be marked as obsolete in our public documentation.
|
|
45
|
+
- Cleanup helper functions moved from 'speech-anywhere'
|
|
46
|
+
|
|
47
|
+
## [1.16.0]
|
|
48
|
+
|
|
49
|
+
- Added `AdditionalReplaceTextParameters` type with `matchFormattingAtThe` property using `FormattingBoundary` enum
|
|
50
|
+
- Added new `FormattingBoundaries` enum with `Start` and `End` values for passing as text formatting value in replace text event
|
|
51
|
+
- Added/updated tests by QAA since last version
|
|
52
|
+
|
|
53
|
+
## [1.15.0]
|
|
54
|
+
|
|
55
|
+
- Updated file names for nuance-bg image resources.
|
|
56
|
+
|
|
57
|
+
## [1.14.0]
|
|
58
|
+
|
|
59
|
+
- Undo/Redo for custom controls
|
|
60
|
+
|
|
61
|
+
## [1.13.8]
|
|
62
|
+
|
|
63
|
+
- Change log level order to make trace lowest level
|
|
64
|
+
|
|
65
|
+
## [1.13.7]
|
|
66
|
+
|
|
67
|
+
- Improve scrolling behavior of textarea element
|
|
68
|
+
|
|
69
|
+
## [1.13.6]
|
|
70
|
+
|
|
71
|
+
- After set text for plain text controls, change event from "change" to "input"
|
|
72
|
+
|
|
73
|
+
## [1.13.5]
|
|
74
|
+
|
|
75
|
+
- Fixed missing input-event in contenteditable divs when setting empty text via replace-text command
|
|
76
|
+
|
|
77
|
+
## [1.13.4]
|
|
78
|
+
|
|
79
|
+
- Upgrade to the latest npm dependencies
|
|
80
|
+
|
|
81
|
+
## [1.13.3]
|
|
82
|
+
|
|
83
|
+
- Fixed selection issues in contenteditable divs related to navigating trough line breaks
|
|
84
|
+
|
|
85
|
+
## [1.13.2]
|
|
86
|
+
|
|
87
|
+
- Fixed selection issues in contenteditable divs related to leading or ending line breaks
|
|
88
|
+
|
|
89
|
+
## [1.13.1]
|
|
90
|
+
|
|
91
|
+
- Missing type export for Custom Controls API
|
|
92
|
+
|
|
93
|
+
## [1.13.0]
|
|
94
|
+
|
|
95
|
+
- Custom Controls API for web controls
|
|
96
|
+
|
|
97
|
+
## [1.12.4]
|
|
98
|
+
|
|
99
|
+
- Revert: Fix infinity loop of get selection in contenteditable divs
|
|
100
|
+
- Apply workaround condition to send pendingselectionchnaged event only if element is not focused
|
|
101
|
+
|
|
102
|
+
## [1.12.3]
|
|
103
|
+
|
|
104
|
+
- Added check to return selection's anchornode if childnodes index is invalid
|
|
105
|
+
|
|
106
|
+
## [1.12.2]
|
|
107
|
+
|
|
108
|
+
- Only dispatching control-changed events after the user has finished the selection for contenteditable divs
|
|
109
|
+
|
|
110
|
+
## [1.12.1]
|
|
111
|
+
|
|
112
|
+
- Fix infinity loop of get selection in contenteditable divs
|
|
113
|
+
|
|
114
|
+
## [1.12.0]
|
|
115
|
+
|
|
116
|
+
- only dispatching contol-changed events after the user has finished the selection
|
|
117
|
+
|
|
118
|
+
## [1.11.0]
|
|
119
|
+
|
|
120
|
+
- [PR #299167](https://dev.azure.com/msazuredev/Healthcare/_git/Dragon-Web-Tcl/pullrequest/299167)
|
|
121
|
+
- No breaking changes
|
|
122
|
+
|
|
123
|
+
## [1.10.0]
|
|
124
|
+
|
|
125
|
+
- Selection handling refactored
|
|
126
|
+
|
|
127
|
+
## [1.9.4]
|
|
128
|
+
|
|
129
|
+
- Fixed jumping cursor issue when deleting text via the "scratch that" command
|
|
130
|
+
|
|
131
|
+
## [1.9.3]
|
|
132
|
+
|
|
133
|
+
- Fixed selection issue in contenteditable divs
|
|
134
|
+
|
|
135
|
+
## [1.9.2]
|
|
136
|
+
|
|
137
|
+
- Expose isMultiline property for textcontrol
|
|
138
|
+
|
|
139
|
+
## [1.9.1]
|
|
140
|
+
|
|
141
|
+
- selection issues on mobile browser (iOS) fixed
|
|
142
|
+
|
|
143
|
+
## [1.9.0]
|
|
144
|
+
|
|
145
|
+
- TextControlService and related modules were removed
|
|
146
|
+
|
|
147
|
+
## [1.8.2]
|
|
148
|
+
|
|
149
|
+
- altered logging, added logSensitive.
|
|
150
|
+
|
|
151
|
+
## [1.8.1]
|
|
152
|
+
|
|
153
|
+
- Contenteditable divs fire select event also when mouse is released outside the element
|
|
154
|
+
|
|
155
|
+
## [1.1.1]
|
|
156
|
+
|
|
157
|
+
- added build task for dotnet test app
|
|
158
|
+
|
|
159
|
+
## [0.1.0]
|
|
160
|
+
|
|
161
|
+
- Provide logging interface
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Dragon-Web-Tcl
|
|
2
|
+
|
|
3
|
+
Web-TCL (Web-TextControl Library) provides an API for all operations required to speech enable web elements.
|
|
4
|
+
|
|
5
|
+
- Supports input (type=text), textArea and contenteditable div elements.
|
|
6
|
+
- Provides a Custom Control API to speech enable additional elements.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @hccm/web-tcl
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Basic sample
|
|
17
|
+
|
|
18
|
+
```TS
|
|
19
|
+
import {
|
|
20
|
+
createClient,
|
|
21
|
+
} from "@hccm/web-tcl";
|
|
22
|
+
|
|
23
|
+
const client = createClient({ selector: "#some-container" });
|
|
24
|
+
|
|
25
|
+
// subscribe to events
|
|
26
|
+
const eventsSub = client.events.receiveAll().subscribe((event) => {
|
|
27
|
+
switch (event.type) {
|
|
28
|
+
case "controlChanged":
|
|
29
|
+
// text/selection changed for a specific control
|
|
30
|
+
break;
|
|
31
|
+
case "controlsChanged":
|
|
32
|
+
// controls were added/removed
|
|
33
|
+
break;
|
|
34
|
+
case "focusChanged":
|
|
35
|
+
// focus changed for a specific control
|
|
36
|
+
break;
|
|
37
|
+
case "initialized":
|
|
38
|
+
// dragon-web-tcl was initialized
|
|
39
|
+
break;
|
|
40
|
+
case "disposed":
|
|
41
|
+
// dragon-web-tcl was disposed
|
|
42
|
+
break;
|
|
43
|
+
case "statusChanged":
|
|
44
|
+
// the processing-status changed for a specific control
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// subscribe to a specific event; you'll get intellisene for the different event types
|
|
50
|
+
const focusChangedSub = client.events.receive("focusChanged").subscribe((event) => {
|
|
51
|
+
console.log(`Control with id: ${event.id} changed the focus to ${event.isFocused}`);
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// dispatch commands; you'll get intellisene for the different command types
|
|
55
|
+
client.commands.send({ type: "initialize", isDisabled: false, useGuiMarkup: false });
|
|
56
|
+
client.commands.send({ type: "focus", id: "control-id" });
|
|
57
|
+
|
|
58
|
+
// don't forget to unsubscribe! do this in your cleanup logic
|
|
59
|
+
client.dispose();
|
|
60
|
+
eventsSub.unsubscribe();
|
|
61
|
+
focusChangedSub.unsubscribe();
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Custom Control API
|
|
66
|
+
|
|
67
|
+
```TS
|
|
68
|
+
import {
|
|
69
|
+
createClient,
|
|
70
|
+
type { CustomControlInitializer }
|
|
71
|
+
} from "@hccm/web-tcl";
|
|
72
|
+
|
|
73
|
+
const customTextArea: CustomControlInitializer = (element, control) => {
|
|
74
|
+
// for implementation details check the documentation
|
|
75
|
+
|
|
76
|
+
return () => {
|
|
77
|
+
// cleanup
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const client = createClient({ selector: "#some-container", { customTextArea }});
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### IFrame Support
|
|
86
|
+
|
|
87
|
+
```TS
|
|
88
|
+
// react sample
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
const unsubscribeFromIframeMessages = subscribeToIframeMessages({
|
|
91
|
+
contextWindow: window,
|
|
92
|
+
customControls: { /* provide your custom control types*/ },
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return () => {
|
|
96
|
+
unsubscribeFromIframeMessages();
|
|
97
|
+
};
|
|
98
|
+
}, []);
|
|
99
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cleans up the given `Document` by traversing its body children and applying cleanup logic
|
|
3
|
+
* to each child node, except for nodes that should be ignored (such as scripts and certain node types).
|
|
4
|
+
*
|
|
5
|
+
* - Logs a warning and returns the input if the document is null or undefined.
|
|
6
|
+
* - Logs a warning and returns `null` if the document is the global `window.document`.
|
|
7
|
+
* - Ignores nodes of types: TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, and DOCUMENT_TYPE_NODE.
|
|
8
|
+
* - Ignores nodes with the tag name "script".
|
|
9
|
+
*
|
|
10
|
+
* @param document - The `Document` to be cleaned up.
|
|
11
|
+
* @returns The cleaned `Document`, or `null` if the input is the global document.
|
|
12
|
+
*/
|
|
13
|
+
export declare function cleanupDocument(document: Document): Document | null;
|
|
14
|
+
/**
|
|
15
|
+
* Cleans up the specified container element and its children.
|
|
16
|
+
*
|
|
17
|
+
* If the container is still connected to a parent node, a warning is logged and the function returns `null`.
|
|
18
|
+
* Otherwise, it performs cleanup on the container and its children, then returns the container.
|
|
19
|
+
*
|
|
20
|
+
* @param container - The DOM element to be cleaned up.
|
|
21
|
+
* @returns The cleaned-up container element, or `null` if the container is still connected.
|
|
22
|
+
*/
|
|
23
|
+
export declare function cleanupContainer(container: Element): Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.cleanupDocument=t;exports.cleanupContainer=o;const e=require("./logger/logging");const n=require("./webtcl");function t(n){if(n===window.document){e.logger.warning("CleanupHelper.cleanupDocument","the document must not be the SharedData.activeDocument");return null}const t=n.body.children;const o=["script"];const r=[Node.TEXT_NODE,Node.CDATA_SECTION_NODE,Node.COMMENT_NODE,Node.DOCUMENT_TYPE_NODE];for(const e of t){if(r.includes(e.nodeType)||o.includes(e.nodeName.toLowerCase())){continue}l(e)}return n}function o(n){if(n.parentNode!=null){e.logger.warning("CleanupHelper.cleanupContainer","the container must not be connected");return null}l(n);return n}function r(e){return e.nodeName==="BR"&&e.nodeType===Node.ELEMENT_NODE&&n.webTCLAttributes.getValue(e,"internalIgnore")==="true"}function i(e,n){if(!e.classList||e.classList.length===0){return}const t=[...e.classList].filter(e=>e.startsWith(n));for(const n of t){e.classList.remove(n)}}function u(e,n){var t;for(const o of n){(t=e===null||e===void 0?void 0:e.style)===null||t===void 0?void 0:t.removeProperty(o)}}function c(e){if(r(e)){n.webTCLAttributes.remove(e,"internalIgnore")}else{for(const n of["NUSA_","NUSAI_"]){i(e,n)}if(n.webTCLAttributes.has(e,"controlId")){s(e)}}}function s(e){u(e,["background-image","background-repeat","background-position"]);n.webTCLAttributes.remove(e,"controlId");n.webTCLAttributes.remove(e,"documentFieldId")}function l(e){c(e);for(const n of e.children){l(n)}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* check the browser brand and version
|
|
3
|
+
* initialize brandArray
|
|
4
|
+
*/
|
|
5
|
+
export function setBrowser(brandArray: any): void;
|
|
6
|
+
/**
|
|
7
|
+
* All the browser versions we are dealing with
|
|
8
|
+
*/
|
|
9
|
+
export type BrowserBrand = string;
|
|
10
|
+
export namespace BrowserBrand {
|
|
11
|
+
let NotSupported: string;
|
|
12
|
+
let Edge: string;
|
|
13
|
+
let Chrome: string;
|
|
14
|
+
let Mozilla: string;
|
|
15
|
+
let Safari: string;
|
|
16
|
+
let FireFox: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.BrowserBrand=void 0;exports.setBrowser=s;const r=require("../logger/logging");exports.BrowserBrand={NotSupported:"NotSupported",Edge:"Edge",Chrome:"Chrome",Mozilla:"Mozilla",Safari:"Safari",FireFox:"FireFox"};const e={Chrome:41,Firefox:38,Safari:"11.0.2",iPhone:"0",iPad:"0",AudioWorkletChrome:66};function o(r,e){if(r===e)return 0;if(!r)return-1;if(!e)return 1;const o=r.split(".");const n=e.split(".");const t=Math.max(o.length,n.length);for(let r=0;r<t;++r){if(!o[r])o.push(0);if(!n[r])n.push(0);if(o[r]<n[r])return-1;if(o[r]>n[r])return 1}return 0}function n(r){const e=navigator.userAgent.indexOf(r);if(e<0)return null;let o=navigator.userAgent.slice(e+r.length+1);const n=o.indexOf(".");o=o.slice(0,n);return o}function t(){const r=navigator.userAgent.indexOf("OS ");if(r<0)return null;let e=navigator.userAgent.slice(r+3);while(e.includes("_")){e=e.replace("_",".")}return e}function i(){let i=n("Chrome");if(i)return Number(i)>=e.Chrome;i=n("Firefox");if(i)return Number(i)>=e.Firefox;let s=navigator.userAgent.indexOf("Safari");if(s>=0){s=navigator.userAgent.indexOf("Version/");i=navigator.userAgent.slice(s+8);r.logger.info("browser:isCurrentBrowserVersionSupported","Safari - checking version: "+i);return o(i,e.Safari)>=0}s=navigator.userAgent.indexOf("iPhone");if(s>=0){i=t();r.logger.info("browser:isCurrentBrowserVersionSupported","iPhone - checking version: "+i);return o(i,e.iPhone)>=0}s=navigator.userAgent.indexOf("iPad");if(s>=0){i=t();r.logger.info("browser:isCurrentBrowserVersionSupported","iPad - checking version: "+i);return o(i,e.iPad)>=0}return false}function s(r){if(!r)return;r[exports.BrowserBrand.NotSupported]=false;r[exports.BrowserBrand.Mozilla]=navigator.appName.includes("Netscape");if(!r[exports.BrowserBrand.Mozilla]){r[exports.BrowserBrand.Mozilla]=true;r[exports.BrowserBrand.NotSupported]=true;return}const e=navigator.userAgent.toLowerCase();r[exports.BrowserBrand.Edge]=e.includes(" edge")||e.includes(" edg/");if(r[exports.BrowserBrand.Edge])return;r[exports.BrowserBrand.Chrome]=e.includes("chrome");if(!r[exports.BrowserBrand.Chrome]){r[exports.BrowserBrand.Safari]=e.includes("safari");if(r[exports.BrowserBrand.Safari]){r[exports.BrowserBrand.NotSupported]=!i();return}r[exports.BrowserBrand.FireFox]=e.includes("firefox");if(r[exports.BrowserBrand.FireFox])return;r[exports.BrowserBrand.NotSupported]=true}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param element
|
|
4
|
+
* @return {Window}
|
|
5
|
+
*/
|
|
6
|
+
export function getWindow(element: any): Window;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param {Document} document
|
|
10
|
+
* @return {Window}
|
|
11
|
+
*/
|
|
12
|
+
export function getWindowOfDocument(document: Document): Window;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param e
|
|
16
|
+
* @return {HTMLElement}
|
|
17
|
+
*/
|
|
18
|
+
export function getEventTarget(e: any): HTMLElement;
|
|
19
|
+
export const selectionMarker: "\u00A7";
|
|
20
|
+
export function removeEmptyTextNodes(node: HTMLElement | Node): void;
|
|
21
|
+
export function removeHiddenParagraphs(root: HTMLElement): void;
|
|
22
|
+
export function removeCommentNodes(node: HTMLElement | Node): void;
|
|
23
|
+
export function removeSourceBlanks(text: string | undefined): string;
|
|
24
|
+
export function nodeNameEquals(node: Node | undefined, name: string): boolean;
|
|
25
|
+
export function isElementSpeechEnabled(element: any): boolean;
|
|
26
|
+
export function isEmptyTextNode(node: Node | undefined): boolean;
|
|
27
|
+
export function isSpanTagContainingOnlyBreakTag(node: Node): boolean;
|
|
28
|
+
export function isIgnoreNode(node: Node | undefined): boolean;
|
|
29
|
+
export function isTextNode(node: Node | undefined): boolean;
|
|
30
|
+
export function isTextInput(element: HTMLElement | Element): boolean;
|
|
31
|
+
export function isCommentNode(node: Node): boolean;
|
|
32
|
+
export function isTextAllowed(node: Node | undefined): boolean;
|
|
33
|
+
export function getNextValidSibling(node: Node | undefined): Node | undefined;
|
|
34
|
+
export function getVeryLastNodeOf(node: Node | undefined): Node | undefined;
|
|
35
|
+
export function getNextNode(root: Node | undefined, node: Node | undefined): Node | undefined;
|
|
36
|
+
export function findTextNodeContainingText(node: Node, startNode: Node | null, text: string): Node | null;
|
|
37
|
+
export function isDescendant(parent: Node | undefined, node: Node | undefined): boolean;
|
|
38
|
+
export function insertNodeAfter(previousNode: Node | undefined, newNode: Node | undefined): boolean;
|
|
39
|
+
export function appendToNewParent(oldParent: Node | undefined, newParent: Node | undefined, insertAfterNode: Node | undefined): boolean;
|
|
40
|
+
export function moveToNewParent(activeDocument: Document, oldParent: Node | undefined, newParent: Node | undefined): HTMLElement | undefined;
|
|
41
|
+
export function splitTextNode(node: Node, pos: number): Node;
|
|
42
|
+
export function getTrailingBreak(node: Node): Node | undefined;
|
|
43
|
+
export function getInternalScriptLocation(): string;
|
|
44
|
+
export function getTextBoundingRect(input: HTMLInputElement | undefined, selectionStart: number | string, selectionEnd: number | string, debug?: boolean): DOMRect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getTextBoundingRect=exports.getInternalScriptLocation=exports.getTrailingBreak=exports.splitTextNode=exports.moveToNewParent=exports.appendToNewParent=exports.insertNodeAfter=exports.isDescendant=exports.findTextNodeContainingText=exports.getNextNode=exports.getVeryLastNodeOf=exports.getNextValidSibling=exports.isTextAllowed=exports.isCommentNode=exports.isTextInput=exports.isTextNode=exports.isIgnoreNode=exports.isSpanTagContainingOnlyBreakTag=exports.isEmptyTextNode=exports.isElementSpeechEnabled=exports.nodeNameEquals=exports.removeSourceBlanks=exports.removeCommentNodes=exports.removeHiddenParagraphs=exports.removeEmptyTextNodes=exports.selectionMarker=void 0;exports.getWindow=L;exports.getWindowOfDocument=V;exports.getEventTarget=k;const e=require("./string");const t=require("../shared-data");const n=require("../webtcl/webtcl-attributes");exports.selectionMarker="§";const o=function(e){if(!(e===null||e===void 0?void 0:e.hasChildNodes())){return}const t=[];const n=e.childNodes.length;for(let o=0;o<n;++o){if((0,exports.isEmptyTextNode)(e.childNodes[o])){t.push(e.childNodes[o])}else{(0,exports.removeEmptyTextNodes)(e.childNodes[o])}}for(const n of t){e.removeChild(n)}};exports.removeEmptyTextNodes=o;const r=function(e){if(!e)return;const t=e.getElementsByTagName("p");if(!t||t.length===0){return}const n=[];for(const e of t){if(!e.hasChildNodes()){n.push(e)}}for(const e of n){e.parentNode.removeChild(e)}};exports.removeHiddenParagraphs=r;const i=function(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,function(){return NodeFilter.FILTER_ACCEPT},false);let n;const o=[];while(n=t.nextNode()){o.push(n)}for(const e of o){e.parentNode.removeChild(e)}};exports.removeCommentNodes=i;const s=function(t){if(!t){return""}let n="";const o=t.split("\n");for(const t of o){let o=t.replace(/^\x20+/g,"");o=o.replace(/\x20+$/g,"");if(n.length>0&&n.search(/[/,\x20]p>$/g)<0&&n.search(/[/,\x20]div>$/g)<0&&!(0,e.endsWith)(n,exports.selectionMarker)){if(o.search(/^<p[>,\x20]/g)!=0&&o.search(/^<div[>,\x20]/g)!=0&&o.indexOf(exports.selectionMarker)!=0){n+=" "}}n+=o}t=n;t=t.replace(/\x20\x20+/g," ");t=t.replace(/\x20<[^/<>]*>\x20/g,e=>e.trimEnd());t=t.replace(/\x20<\/[^<>]*>\x20/g,e=>e.trimStart());return t};exports.removeSourceBlanks=s;const l=function(e){if(!e)return null;return window.getComputedStyle(e,"")};const d=function(t,n){if(!t){return false}if((0,e.isEmpty)(n)){return false}return t.nodeName.toLowerCase()===n};exports.nodeNameEquals=d;const u=function(e){if(!e.nodeType){return false}if(!(0,n.hasAttribute)(e,"isEnabled")&&!t.SharedData.shouldEnableAllElements){return false}const o=l(e);const r=(0,t.isElementAttributeEnabled)(e);if(!r&&(e.disabled||(o===null||o===void 0?void 0:o.visibility)==="hidden"||(o===null||o===void 0?void 0:o.display)==="none")){return false}return!(0,t.isElementAttributeDisabled)(e)};exports.isElementSpeechEnabled=u;const a=function(e){return(0,exports.isTextNode)(e)&&(!e.nodeValue||e.nodeValue==="")};exports.isEmptyTextNode=a;const c=function(e){if(!(0,exports.nodeNameEquals)(e,"span")){return false}return e.childNodes.length===1&&(0,exports.nodeNameEquals)(e.childNodes[0],"br")};exports.isSpanTagContainingOnlyBreakTag=c;const f=function(e){if(!e){return false}if((0,exports.isSpanTagContainingOnlyBreakTag)(e)){e=e.childNodes[0]}if(!(e===null||e===void 0?void 0:e.attributes)){return false}return(0,n.getAttributeValue)(e,"internalIgnore")==="true"};exports.isIgnoreNode=f;const p=function(e){return e&&e.nodeType===Node.TEXT_NODE};exports.isTextNode=p;const x=function(e){if(!(e===null||e===void 0?void 0:e.type))return false;const t=e.type.toLowerCase();return t=="text"||t=="search"||t=="number"};exports.isTextInput=x;const g=function(e){if(e.nodeType===Node.COMMENT_NODE||e.nodeType===Node.TEXT_NODE&&e.nodeValue&&e.nodeValue.lastIndexOf("\n\n",0)===0){return true}return e.nodeName.toLowerCase()==="style"};exports.isCommentNode=g;const h=function(e){return!(0,exports.nodeNameEquals)(e,"img")};exports.isTextAllowed=h;const N=function(e){if(!e){return null}let t=e.nextSibling;while(t&&(0,exports.isCommentNode)(t)){t=t.nextSibling}return t};exports.getNextValidSibling=N;const m=function(e){while(e===null||e===void 0?void 0:e.lastChild){e=e.lastChild}return e};exports.getVeryLastNodeOf=m;const T=function(e,t){if(!t){return null}if(t.childNodes&&t.childNodes.length>0){return t.childNodes[0]}if(t===e){return null}if(t.nextSibling){return t.nextSibling}t=t.parentNode;if(t===e){return null}while(t&&!t.nextSibling){t=t.parentNode;if(t&&t===e){return null}}return t?t.nextSibling:null};exports.getNextNode=T;const C=function(e,t,n){var o;const r=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(){return NodeFilter.FILTER_ACCEPT},false);let i;let s=!t;while(i=r.nextNode()){if(s===true&&((o=i.nodeValue)===null||o===void 0?void 0:o.includes(n))){return i}if(i===t){s=true}}return null};exports.findTextNodeContainingText=C;const E=function(e,t){if(!e||!t){return false}return e.contains(t)};exports.isDescendant=E;const v=function(e,t){if(!e||!t){return false}e.after(t);return true};exports.insertNodeAfter=v;const y=function(e,t,n){if(!e||!t){return false}let o;if(n){o=n.nextSibling}else if((0,exports.isIgnoreNode)(t.lastChild)){o=t.lastChild}const r=e.childNodes.length;for(let n=0;n<r;++n){if((0,exports.isIgnoreNode)(e.firstChild)){e.removeChild(e.firstChild);continue}if(o){t.insertBefore(e.firstChild,o)}else{t.appendChild(e.firstChild)}}const i=e.parentNode;if(i)i.removeChild(e);return true};exports.appendToNewParent=y;const w=function(e,t,n){if(!t||!n){return null}const o=n.firstChild;let r;const i=t.childNodes.length;for(let e=0;e<i;++e){if((0,exports.isIgnoreNode)(t.childNodes[0])){t.removeChild(t.childNodes[0]);continue}r=t.childNodes[0];if(o)n.insertBefore(r,o);else n.appendChild(r)}if(!r){const t=e.createTextNode("");if(o){n.insertBefore(t,o)}else{n.appendChild(t)}r=t}const s=t.parentNode;s.removeChild(t);return r};exports.moveToNewParent=w;const b=function(e,t){const n=e.nodeValue;if(t>n.length-1){return e.nextSibling}return e.splitText(t)};exports.splitTextNode=b;const S=function(e){if(!e.hasChildNodes()){return null}while(e.lastChild){e=e.lastChild}return(0,exports.nodeNameEquals)(e,"br")?e:null};exports.getTrailingBreak=S;const O=(t,n)=>{const o=document.getElementsByTagName(t);let r="";if(!o)return r;for(const t of o){r=t.src;if((0,e.isEmpty)(r))r=t.href;if((0,e.isEmpty)(r))continue;r=r.toLowerCase();const o=r.indexOf(n);if(o>=0){r=r.slice(0,o);return r}r=""}return r};const B=()=>O("script","speech-anywhere.js");exports.getInternalScriptLocation=B;const I=function(e,t,n,o=false){if(!e||!("value"in e)){return e}if(typeof t==="string"){t=parseFloat(t)}if(typeof t!=="number"||isNaN(t)){t=0}t=t>=0?Math.min(e.value.length,t):0;if(typeof n==="string"){n=parseFloat(n)}if(typeof n!=="number"||isNaN(n)||n<t){n=t}n=n>=0?Math.min(e.value.length,n):0;const r=N();const i=m("width",true);const s=m("height",true);let l=r.top;let d=r.left;let u="padding:0;margin:0;";const a=["direction","font-family","font-size","font-size-adjust","font-variant","font-weight","font-style","letter-spacing","line-height","text-align","text-indent","text-transform","word-wrap","word-spacing","white-space-collapse","text-wrap-mode"];l+=m("padding-top",true);l+=m("border-top-width",true);d+=m("padding-left",true);d+=m("border-left-width",true);d+=1;for(const e of a){u+=`${e}:${m(e)};`}const c=e.value;const f=c.length;const p=document.createElement("div");if(t>0){h(0,t)}const x=h(t,n);if(f>n){h(n,f)}p.style.cssText=u;p.style.position="absolute";p.style.top=l+"px";p.style.left=d+"px";p.style.width=i+"px";p.style.height=s+"px";document.body.appendChild(p);const g=x.getBoundingClientRect();if(!o){p.parentNode.removeChild(p)}return g;function h(e,t){const n=document.createElement("span");n.style.cssText=u;n.textContent=c.substring(e,t);p.appendChild(n);return n}function N(){const t=document.body;const n=document.defaultView;const o=document.documentElement;let r=document.createElement("div");r.style.paddingLeft=r.style.width="1px";t.appendChild(r);const i=r.offsetWidth===2;t.removeChild(r);r=e.getBoundingClientRect();const s=o.clientTop||t.clientTop||0;const l=o.clientLeft||t.clientLeft||0;const d=n.pageYOffset||i&&o.scrollTop||t.scrollTop;const u=n.pageXOffset||i&&o.scrollLeft||t.scrollLeft;return{top:r.top+d-s,left:r.left+u-l}}function m(t,n){const o=document.defaultView.getComputedStyle(e,null).getPropertyValue(t);return n?parseFloat(o):o}};exports.getTextBoundingRect=I;function L(e){if(!e)return window;return V(e.ownerDocument)}function V(e){if(!e)return window;return e.defaultView}function k(e){if(!e)return null;let t;if(e.target)t=e.target;else if(e.srcElement)t=e.srcElement;if(t.nodeType===Node.TEXT_NODE)t=t.parentNode;return t}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { SelectionInfo } from "./selection-info";
|
|
2
|
+
export type ElementProperties = {
|
|
3
|
+
pendingSelection: SelectionInfo;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Extension properties for HTMLElement's.
|
|
7
|
+
* Keeps track of values associated with an HTMLElement.
|
|
8
|
+
*/
|
|
9
|
+
export type ElementExtensions = {
|
|
10
|
+
/**
|
|
11
|
+
* Gets value for an element and key. When element or key does not exist, returns undefined.
|
|
12
|
+
* @param element
|
|
13
|
+
* @param key
|
|
14
|
+
* @returns value or undefined
|
|
15
|
+
*/
|
|
16
|
+
get<K extends keyof ElementProperties>(element: HTMLElement, key: K): ElementProperties[K] | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Sets value for an element and key. When element is not valid, or key does not exist, returns undefined.
|
|
19
|
+
* @param element
|
|
20
|
+
* @param key
|
|
21
|
+
* @param value
|
|
22
|
+
*/
|
|
23
|
+
set<K extends keyof ElementProperties>(element: HTMLElement, key: K, value: ElementProperties[K] | undefined): void;
|
|
24
|
+
};
|
|
25
|
+
export declare const elementProperties: WeakMap<HTMLElement, Partial<ElementProperties>>;
|
|
26
|
+
export declare const elementAccessor: ElementExtensions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.elementAccessor=exports.elementProperties=void 0;exports.elementProperties=new WeakMap;exports.elementAccessor={get(e,t){const r=exports.elementProperties.get(e);return!!r&&t in r?r[t]:undefined},set(e,t,r){if(!e||typeof e!=="object"){return}const s=exports.elementProperties.get(e);if(s){Object.assign(s,{[t]:r})}else{exports.elementProperties.set(e,{[t]:r})}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.IntegrationError=exports.handleNoElement=void 0;const e=require("../logger/logging");const r=(r,o=null)=>{e.logger.error(r,"Element no longer available: "+o,Error(undefined))};exports.handleNoElement=r;class o extends Error{constructor(e){e="WebTcl Integration Error: "+e;super(e)}}exports.IntegrationError=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,s,i,a;Object.defineProperty(exports,"__esModule",{value:true});exports.LocalStore=void 0;const l=require("tslib");class r{constructor(i,a=false){e.add(this);t.set(this,void 0);s.set(this,void 0);l.__classPrivateFieldSet(this,t,i,"f");l.__classPrivateFieldSet(this,s,a,"f")}set(t,s){l.__classPrivateFieldGet(this,e,"a",i).setItem(l.__classPrivateFieldGet(this,e,"m",a).call(this,t),s)}get(t,s=""){var r;return(r=l.__classPrivateFieldGet(this,e,"a",i).getItem(l.__classPrivateFieldGet(this,e,"m",a).call(this,t)))!==null&&r!==void 0?r:s}remove(t){l.__classPrivateFieldGet(this,e,"a",i).removeItem(l.__classPrivateFieldGet(this,e,"m",a).call(this,t))}}exports.LocalStore=r;t=new WeakMap,s=new WeakMap,e=new WeakSet,i=function e(){return l.__classPrivateFieldGet(this,s,"f")?sessionStorage:localStorage},a=function e(s){return`${l.__classPrivateFieldGet(this,t,"f")}.${s}`};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function isEqual(value1: string, value2: string): boolean;
|
|
2
|
+
export function isEmpty(value: string | null | undefined): boolean;
|
|
3
|
+
export function remove(value: string, fromPos: number, toPos: number): string;
|
|
4
|
+
export function insert(value: string, insertPos: number, newValue: string): string;
|
|
5
|
+
export function replaceAll(value: string, searchValue: string, replaceValue: string): string;
|
|
6
|
+
export function endsWith(value: string, searchString: string): boolean;
|
|
7
|
+
export function endsWithLineBreak(text: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.endsWithLineBreak=exports.endsWith=exports.replaceAll=exports.insert=exports.remove=exports.isEmpty=exports.isEqual=void 0;const e=function(e,t){if((e===null||e===void 0?void 0:e.length)!==(t===null||t===void 0?void 0:t.length)){return false}return e.toLowerCase()===t.toLowerCase()};exports.isEqual=e;const t=function(e){return!(e===null||e===void 0?void 0:e.length)};exports.isEmpty=t;const r=function(e,t,r){return e.slice(0,t)+e.slice(r)};exports.remove=r;const s=function(e,t,r){if((0,exports.isEmpty)(e)){return r}return e.slice(0,t)+r+e.slice(t)};exports.insert=s;const n=function(e,t,r){if((0,exports.isEmpty)(e)){return""}return e.replaceAll(t,r)};exports.replaceAll=n;const o=function(e,t){if((0,exports.isEmpty)(e)||(0,exports.isEmpty)(t)){return false}return e.endsWith(t)};exports.endsWith=o;const i=function(e){return(0,exports.endsWith)(e,"\n")};exports.endsWithLineBreak=i;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param value
|
|
4
|
+
* @return {Number}
|
|
5
|
+
*/
|
|
6
|
+
export function forceNumber(value: any): number;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param param
|
|
10
|
+
* @return {boolean}
|
|
11
|
+
*/
|
|
12
|
+
export function isNullOrUndefined(param: any): boolean;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @param {HTMLElement} element
|
|
16
|
+
* @return {{top: (number|*), left: (number|*), height: number, width: number | *}}
|
|
17
|
+
*/
|
|
18
|
+
export function getScrollInfo(element: HTMLElement): {
|
|
19
|
+
top: (number | any);
|
|
20
|
+
left: (number | any);
|
|
21
|
+
height: number;
|
|
22
|
+
width: number | any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param {HTMLElement} element
|
|
27
|
+
* @param {{top: number, left: number, height: number, width: number}} oldScrollInfo
|
|
28
|
+
* @return {boolean}
|
|
29
|
+
*/
|
|
30
|
+
export function adjustScrollPosition(element: HTMLElement, oldScrollInfo: {
|
|
31
|
+
top: number;
|
|
32
|
+
left: number;
|
|
33
|
+
height: number;
|
|
34
|
+
width: number;
|
|
35
|
+
}): boolean;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param value
|
|
39
|
+
* @param minValue
|
|
40
|
+
* @param maxValue
|
|
41
|
+
* @param defaultValue
|
|
42
|
+
* @return {Number}
|
|
43
|
+
*/
|
|
44
|
+
export function verifyNumericValue(value: any, minValue: any, maxValue: any, defaultValue: any): number;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @param {String} text
|
|
48
|
+
* @return {String}
|
|
49
|
+
*/
|
|
50
|
+
export function decodeHtml(text: string): string;
|
|
51
|
+
export const Instance: Util;
|
|
52
|
+
/**
|
|
53
|
+
* @class
|
|
54
|
+
* @property {Boolean} useSimpleGuid
|
|
55
|
+
* @property {Number} generatedSfId
|
|
56
|
+
* @property {Array} browserVersion
|
|
57
|
+
* @property {String} attributeControlId
|
|
58
|
+
* @property {String} attributeIgnore
|
|
59
|
+
* @property {String} class_cke_editable
|
|
60
|
+
*/
|
|
61
|
+
declare class Util {
|
|
62
|
+
useSimpleGuid: boolean;
|
|
63
|
+
generatedSfId: number;
|
|
64
|
+
browserBrand: any[];
|
|
65
|
+
isChromeOrEdge(): any;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @param createRealGuid
|
|
69
|
+
* @return {string}
|
|
70
|
+
*/
|
|
71
|
+
createGuid(createRealGuid?: boolean): string;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Instance=void 0;exports.forceNumber=t;exports.isNullOrUndefined=n;exports.getScrollInfo=o;exports.adjustScrollPosition=i;exports.verifyNumericValue=l;exports.decodeHtml=s;const e=require("./string");const r=require("./browser");function t(e){if(isNaN(e))return null;if(e==="")return null;return Number(e)}function n(e){return e===undefined||e===null}function o(e){var r,t,n,o;return{top:(r=e===null||e===void 0?void 0:e.scrollTop)!==null&&r!==void 0?r:0,left:(t=e===null||e===void 0?void 0:e.scrollLeft)!==null&&t!==void 0?t:0,height:(n=e===null||e===void 0?void 0:e.scrollHeight)!==null&&n!==void 0?n:0,width:(o=e===null||e===void 0?void 0:e.scrollWidth)!==null&&o!==void 0?o:0}}function i(e,r){let t=false;if(e.scrollHeight!==r.height){e.scrollTop=r.top+e.scrollHeight-r.height;t=true}if(e.scrollWidth!==r.width){e.scrollLeft=r.left+e.scrollWidth-r.width;t=true}return t}function l(e,r,o,i){if(n(e))return i;e=t(e);if(e===null)return i;if(e<r||e>o)return i;return e}function s(r){if((0,e.isEmpty)(r))return"";return r.replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")}class u{constructor(){this.useSimpleGuid=false;this.generatedSfId=0;this.browserBrand=[];(0,r.setBrowser)(this.browserBrand)}isChromeOrEdge(){var e;return(e=this.browserBrand[r.BrowserBrand.Chrome])!==null&&e!==void 0?e:this.browserBrand[r.BrowserBrand.Edge]}createGuid(e=false){if(e){try{return crypto.randomUUID()}catch(e){}}if(!e&&exports.Instance.useSimpleGuid){++exports.Instance.generatedSfId;return`B${exports.Instance.generatedSfId}`}let r=Date.now();if(window.performance&&typeof window.performance.now==="function"){r+=window.performance.now()}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=(r+Math.random()*16)%16|0;r=Math.floor(r/16);return(e==="x"?t:t&3|8).toString(16)})}}exports.Instance=new u;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents the log levels for logging messages.
|
|
3
|
+
*/
|
|
4
|
+
export declare const LogLevel: Readonly<{
|
|
5
|
+
Trace: -1;
|
|
6
|
+
Debug: 0;
|
|
7
|
+
Info: 1;
|
|
8
|
+
Warning: 2;
|
|
9
|
+
Error: 3;
|
|
10
|
+
Exclusive: 4;
|
|
11
|
+
Sensitive: 5;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Represents a log entry.
|
|
15
|
+
*/
|
|
16
|
+
export type LogEntry = {
|
|
17
|
+
level: (typeof LogLevel)[keyof typeof LogLevel];
|
|
18
|
+
method: string;
|
|
19
|
+
texts: string[];
|
|
20
|
+
error?: Error | null;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Observable stream for logging events.
|
|
24
|
+
*/
|
|
25
|
+
export declare const logging$: import("rxjs").Observable<LogEntry>;
|
|
26
|
+
/**
|
|
27
|
+
* The logger object provides methods for logging messages at different log levels.
|
|
28
|
+
*/
|
|
29
|
+
export declare const logger: {
|
|
30
|
+
/**
|
|
31
|
+
* Logs a debug message.
|
|
32
|
+
* @param method - The name of the method or function being logged.
|
|
33
|
+
* @param texts - The texts to be logged.
|
|
34
|
+
*/
|
|
35
|
+
debug: (method: string, ...texts: string[]) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Logs a trace message.
|
|
38
|
+
* @param method - The name of the method or function being logged.
|
|
39
|
+
* @param texts - The texts to be logged.
|
|
40
|
+
*/
|
|
41
|
+
trace: (method: string, ...texts: string[]) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Logs an info message.
|
|
44
|
+
* @param method - The name of the method or function being logged.
|
|
45
|
+
* @param texts - The texts to be logged.
|
|
46
|
+
*/
|
|
47
|
+
info: (method: string, ...texts: string[]) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Logs a warning message.
|
|
50
|
+
* @param method - The name of the method or function being logged.
|
|
51
|
+
* @param texts - The texts to be logged.
|
|
52
|
+
*/
|
|
53
|
+
warning: (method: string, ...texts: string[]) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Logs an error message.
|
|
56
|
+
* @param method - The name of the method or function being logged.
|
|
57
|
+
* @param text - The text to be logged.
|
|
58
|
+
* @param error - The error object to be logged.
|
|
59
|
+
*/
|
|
60
|
+
error: (method: string, text: string, error?: Error) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Logs a sensitive message
|
|
63
|
+
* @param method - The name of the method or function being logged.
|
|
64
|
+
* @param texts - The texts to be logged.
|
|
65
|
+
*/
|
|
66
|
+
logSensitive: (method: string, ...texts: string[]) => void;
|
|
67
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.logger=exports.logging$=exports.LogLevel=void 0;const e=require("rxjs/internal/Subject");exports.LogLevel=Object.freeze({Trace:-1,Debug:0,Info:1,Warning:2,Error:3,Exclusive:4,Sensitive:5});const t=new e.Subject;exports.logging$=t.asObservable();exports.logger={debug:(e,...o)=>{t.next({level:exports.LogLevel.Debug,method:e,texts:o})},trace:(e,...o)=>{t.next({level:exports.LogLevel.Trace,method:e,texts:o})},info:(e,...o)=>{t.next({level:exports.LogLevel.Info,method:e,texts:o})},warning:(e,...o)=>{t.next({level:exports.LogLevel.Warning,method:e,texts:o})},error:(e,o,r)=>{t.next({level:exports.LogLevel.Error,method:e,texts:[o],error:r})},logSensitive:(e,...o)=>{t.next({level:exports.LogLevel.Sensitive,method:e,texts:o})}};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createTextControl } from "./text-control-lib";
|
|
2
|
+
export declare const TextControlFactory: Readonly<{
|
|
3
|
+
createTextControl: typeof createTextControl;
|
|
4
|
+
}>;
|
|
5
|
+
export { LogLevel, logging$ } from "./logger/logging";
|
|
6
|
+
export { TextControlManager, textControlManager } from "./text-control-lib";
|
|
7
|
+
export { cleanupContainer, cleanupDocument } from "./cleanup-helper";
|
|
8
|
+
export * from "./webtcl";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.cleanupDocument=exports.cleanupContainer=exports.textControlManager=exports.TextControlManager=exports.logging$=exports.LogLevel=exports.TextControlFactory=void 0;const e=require("tslib");const t=require("./text-control-lib");exports.TextControlFactory=Object.freeze({createTextControl:t.createTextControl});var r=require("./logger/logging");Object.defineProperty(exports,"LogLevel",{enumerable:true,get:function(){return r.LogLevel}});Object.defineProperty(exports,"logging$",{enumerable:true,get:function(){return r.logging$}});var o=require("./text-control-lib");Object.defineProperty(exports,"TextControlManager",{enumerable:true,get:function(){return o.TextControlManager}});Object.defineProperty(exports,"textControlManager",{enumerable:true,get:function(){return o.textControlManager}});var n=require("./cleanup-helper");Object.defineProperty(exports,"cleanupContainer",{enumerable:true,get:function(){return n.cleanupContainer}});Object.defineProperty(exports,"cleanupDocument",{enumerable:true,get:function(){return n.cleanupDocument}});e.__exportStar(require("./webtcl"),exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=exports.name=void 0;exports.name="@hccm/web-tcl";exports.version="1.20.0";
|