@soomo/react-text-annotator 3.1.0-staging.6 → 3.1.0-staging.7
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/dist/react-text-annotator.es10.js +5 -5
- package/dist/react-text-annotator.es11.js +9 -82
- package/dist/react-text-annotator.es11.js.map +1 -1
- package/dist/react-text-annotator.es12.js +1436 -33
- package/dist/react-text-annotator.es12.js.map +1 -1
- package/dist/react-text-annotator.es14.js +196 -1398
- package/dist/react-text-annotator.es14.js.map +1 -1
- package/dist/react-text-annotator.es15.js +588 -0
- package/dist/react-text-annotator.es15.js.map +1 -0
- package/dist/react-text-annotator.es16.js +74 -238
- package/dist/react-text-annotator.es16.js.map +1 -1
- package/dist/react-text-annotator.es17.js +33 -573
- package/dist/react-text-annotator.es17.js.map +1 -1
- package/dist/react-text-annotator.es19.js +1 -1
- package/dist/react-text-annotator.es20.js +1 -1
- package/dist/react-text-annotator.es21.js +2 -114
- package/dist/react-text-annotator.es21.js.map +1 -1
- package/dist/react-text-annotator.es22.js +2 -309
- package/dist/react-text-annotator.es22.js.map +1 -1
- package/dist/react-text-annotator.es23.js +109 -53
- package/dist/react-text-annotator.es23.js.map +1 -1
- package/dist/react-text-annotator.es24.js +306 -17
- package/dist/react-text-annotator.es24.js.map +1 -1
- package/dist/react-text-annotator.es25.js +58 -2
- package/dist/react-text-annotator.es25.js.map +1 -1
- package/dist/react-text-annotator.es26.js +20 -2
- package/dist/react-text-annotator.es26.js.map +1 -1
- package/dist/react-text-annotator.es4.js +2 -2
- package/dist/react-text-annotator.es6.js +4 -4
- package/package.json +2 -2
- package/dist/react-text-annotator.es13.js +0 -12
- package/dist/react-text-annotator.es13.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import defaultBehaviors from "./react-text-annotator.
|
|
2
|
-
import * as utilities from "./react-text-annotator.
|
|
3
|
-
import { hideContent, defineCustomElement, tagName } from "./react-text-annotator.
|
|
4
|
-
import { addBehaviors, addBehavior, removeBehavior } from "./react-text-annotator.
|
|
5
|
-
import { learnElementNames, learnCustomElementNames } from "./react-text-annotator.
|
|
1
|
+
import defaultBehaviors from "./react-text-annotator.es23.js";
|
|
2
|
+
import * as utilities from "./react-text-annotator.es24.js";
|
|
3
|
+
import { hideContent, defineCustomElement, tagName } from "./react-text-annotator.es24.js";
|
|
4
|
+
import { addBehaviors, addBehavior, removeBehavior } from "./react-text-annotator.es25.js";
|
|
5
|
+
import { learnElementNames, learnCustomElementNames } from "./react-text-annotator.es26.js";
|
|
6
6
|
class CETEI {
|
|
7
7
|
constructor(options) {
|
|
8
8
|
this.options = options ? options : {};
|
|
@@ -1,85 +1,12 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
10
|
-
} else $319e236875307eab$var$liveAnnouncer.announce(message, assertiveness, timeout);
|
|
11
|
-
}
|
|
12
|
-
function $319e236875307eab$export$d8686216b8b81b2f() {
|
|
13
|
-
if ($319e236875307eab$var$liveAnnouncer) {
|
|
14
|
-
$319e236875307eab$var$liveAnnouncer.destroy();
|
|
15
|
-
$319e236875307eab$var$liveAnnouncer = null;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
class $319e236875307eab$var$LiveAnnouncer {
|
|
19
|
-
isAttached() {
|
|
20
|
-
var _this_node;
|
|
21
|
-
return (_this_node = this.node) === null || _this_node === void 0 ? void 0 : _this_node.isConnected;
|
|
22
|
-
}
|
|
23
|
-
createLog(ariaLive) {
|
|
24
|
-
let node = document.createElement("div");
|
|
25
|
-
node.setAttribute("role", "log");
|
|
26
|
-
node.setAttribute("aria-live", ariaLive);
|
|
27
|
-
node.setAttribute("aria-relevant", "additions");
|
|
28
|
-
return node;
|
|
29
|
-
}
|
|
30
|
-
destroy() {
|
|
31
|
-
if (!this.node) return;
|
|
32
|
-
document.body.removeChild(this.node);
|
|
33
|
-
this.node = null;
|
|
34
|
-
}
|
|
35
|
-
announce(message, assertiveness = "assertive", timeout = $319e236875307eab$var$LIVEREGION_TIMEOUT_DELAY) {
|
|
36
|
-
var _this_assertiveLog, _this_politeLog;
|
|
37
|
-
if (!this.node) return;
|
|
38
|
-
let node = document.createElement("div");
|
|
39
|
-
if (typeof message === "object") {
|
|
40
|
-
node.setAttribute("role", "img");
|
|
41
|
-
node.setAttribute("aria-labelledby", message["aria-labelledby"]);
|
|
42
|
-
} else node.textContent = message;
|
|
43
|
-
if (assertiveness === "assertive") (_this_assertiveLog = this.assertiveLog) === null || _this_assertiveLog === void 0 ? void 0 : _this_assertiveLog.appendChild(node);
|
|
44
|
-
else (_this_politeLog = this.politeLog) === null || _this_politeLog === void 0 ? void 0 : _this_politeLog.appendChild(node);
|
|
45
|
-
if (message !== "") setTimeout(() => {
|
|
46
|
-
node.remove();
|
|
47
|
-
}, timeout);
|
|
48
|
-
}
|
|
49
|
-
clear(assertiveness) {
|
|
50
|
-
if (!this.node) return;
|
|
51
|
-
if ((!assertiveness || assertiveness === "assertive") && this.assertiveLog) this.assertiveLog.innerHTML = "";
|
|
52
|
-
if ((!assertiveness || assertiveness === "polite") && this.politeLog) this.politeLog.innerHTML = "";
|
|
53
|
-
}
|
|
54
|
-
constructor() {
|
|
55
|
-
this.node = null;
|
|
56
|
-
this.assertiveLog = null;
|
|
57
|
-
this.politeLog = null;
|
|
58
|
-
if (typeof document !== "undefined") {
|
|
59
|
-
this.node = document.createElement("div");
|
|
60
|
-
this.node.dataset.liveAnnouncer = "true";
|
|
61
|
-
Object.assign(this.node.style, {
|
|
62
|
-
border: 0,
|
|
63
|
-
clip: "rect(0 0 0 0)",
|
|
64
|
-
clipPath: "inset(50%)",
|
|
65
|
-
height: "1px",
|
|
66
|
-
margin: "-1px",
|
|
67
|
-
overflow: "hidden",
|
|
68
|
-
padding: 0,
|
|
69
|
-
position: "absolute",
|
|
70
|
-
width: "1px",
|
|
71
|
-
whiteSpace: "nowrap"
|
|
72
|
-
});
|
|
73
|
-
this.assertiveLog = this.createLog("assertive");
|
|
74
|
-
this.node.appendChild(this.assertiveLog);
|
|
75
|
-
this.politeLog = this.createLog("polite");
|
|
76
|
-
this.node.appendChild(this.politeLog);
|
|
77
|
-
document.body.prepend(this.node);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
const isMobile = () => {
|
|
2
|
+
var userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
3
|
+
if (/android/i.test(userAgent))
|
|
4
|
+
return true;
|
|
5
|
+
if (/iPad|iPhone/.test(userAgent) && !window.MSStream)
|
|
6
|
+
return true;
|
|
7
|
+
return false;
|
|
8
|
+
};
|
|
81
9
|
export {
|
|
82
|
-
|
|
83
|
-
$319e236875307eab$export$d8686216b8b81b2f as destroyAnnouncer
|
|
10
|
+
isMobile
|
|
84
11
|
};
|
|
85
12
|
//# sourceMappingURL=react-text-annotator.es11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-text-annotator.es11.js","sources":["
|
|
1
|
+
{"version":3,"file":"react-text-annotator.es11.js","sources":["../src/TextAnnotatorPopup/isMobile.ts"],"sourcesContent":["// https://stackoverflow.com/questions/21741841/detecting-ios-android-operating-system\nexport const isMobile = () => {\n // @ts-ignore\n var userAgent: string = navigator.userAgent || navigator.vendor || window.opera;\n\n if (/android/i.test(userAgent)) \n return true;\n\n // @ts-ignore\n // Note: as of recently, this NO LONGER DETECTS FIREFOX ON iOS!\n // This means FF/iOS will behave like on the desktop, and loose\n // selection handlebars after the popup opens.\n if (/iPad|iPhone/.test(userAgent) && !window.MSStream)\n return true;\n\n return false;\n}"],"names":[],"mappings":"AACO,MAAM,WAAW,MAAM;AAE5B,MAAI,YAAoB,UAAU,aAAa,UAAU,UAAU,OAAO;AAEtE,MAAA,WAAW,KAAK,SAAS;AACpB,WAAA;AAMT,MAAI,cAAc,KAAK,SAAS,KAAK,CAAC,OAAO;AACpC,WAAA;AAEF,SAAA;AACT;"}
|