@pie-element/extended-text-entry 15.1.2-next.4 → 15.1.2-next.6
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/author/index.d.ts +1 -0
- package/dist/author/index.js +5 -2
- package/dist/author/main.js +38 -38
- package/dist/browser/author/index.js +2208 -90
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/browser-kkT1XVKw.js.map +1 -1
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +3 -3
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-Cv1iX7rJ.js → dist-BbUdUT_D.js} +25276 -30611
- package/dist/browser/dist-BbUdUT_D.js.map +1 -0
- package/dist/browser/{main-DIChM596.js → main-CXlds066.js} +61 -60
- package/dist/browser/main-CXlds066.js.map +1 -0
- package/dist/browser/print/index.js +8 -8
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/index.js +1 -1
- package/dist/delivery/annotation/annotation-menu.js +30 -29
- package/dist/delivery/annotation/freeform-editor.js +36 -35
- package/dist/delivery/index.js +2 -2
- package/dist/delivery/main.js +3 -2
- package/dist/index.iife.js +107 -111
- package/dist/print/index.js +1 -1
- package/package.json +12 -6
- package/dist/browser/dist-Cv1iX7rJ.js.map +0 -1
- package/dist/browser/main-DIChM596.js.map +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import t from "prop-types";
|
|
3
3
|
import { styled as n } from "@mui/material/styles";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { color as r } from "@pie-lib/render-ui";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { Popover as o, TextField as s } from "@mui/material";
|
|
6
7
|
//#region src/delivery/annotation/freeform-editor.tsx
|
|
7
|
-
var
|
|
8
|
+
var c = n(o)(({ annotationType: e }) => ({ "& .MuiPaper-root": {
|
|
8
9
|
overflowX: "unset",
|
|
9
10
|
overflowY: "unset",
|
|
10
11
|
marginLeft: "16px",
|
|
@@ -18,41 +19,41 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
|
|
|
18
19
|
width: 0,
|
|
19
20
|
pointerEvents: "none",
|
|
20
21
|
borderWidth: "7px",
|
|
21
|
-
borderRightColor:
|
|
22
|
+
borderRightColor: r.border()
|
|
22
23
|
},
|
|
23
|
-
...
|
|
24
|
-
...
|
|
25
|
-
} })),
|
|
24
|
+
...e === "negative" && { "&::before": { borderRightColor: "rgb(255, 204, 238) !important" } },
|
|
25
|
+
...e === "positive" && { "&::before": { borderRightColor: "rgb(153, 255, 153) !important" } }
|
|
26
|
+
} })), l = n("div")(({ annotationType: e }) => ({
|
|
26
27
|
width: "200px",
|
|
27
28
|
overflow: "hidden",
|
|
28
29
|
borderRadius: "4px",
|
|
29
|
-
backgroundColor:
|
|
30
|
-
border: `4px solid ${
|
|
31
|
-
...
|
|
32
|
-
...
|
|
33
|
-
})),
|
|
30
|
+
backgroundColor: r.white(),
|
|
31
|
+
border: `4px solid ${r.border()}`,
|
|
32
|
+
...e === "negative" && { borderColor: "rgb(255, 204, 238) !important" },
|
|
33
|
+
...e === "positive" && { borderColor: "rgb(153, 255, 153) !important" }
|
|
34
|
+
})), u = n("div")(() => ({
|
|
34
35
|
display: "flex",
|
|
35
36
|
flexWrap: "wrap",
|
|
36
|
-
borderTop: `2px solid ${
|
|
37
|
-
})),
|
|
37
|
+
borderTop: `2px solid ${r.border()}`
|
|
38
|
+
})), d = n("div")(({ variant: e, annotationType: t }) => ({
|
|
38
39
|
flexGrow: 1,
|
|
39
40
|
width: "28%",
|
|
40
41
|
textAlign: "center",
|
|
41
42
|
padding: "4px",
|
|
42
43
|
cursor: "pointer",
|
|
43
|
-
"&:not(:nth-child(3n))": { borderRight: `1px solid ${
|
|
44
|
-
"&:hover": { backgroundColor:
|
|
45
|
-
...
|
|
44
|
+
"&:not(:nth-child(3n))": { borderRight: `1px solid ${r.border()}` },
|
|
45
|
+
"&:hover": { backgroundColor: r.backgroundDark() },
|
|
46
|
+
...e === "positive" && {
|
|
46
47
|
backgroundColor: "rgb(153, 255, 153) !important",
|
|
47
48
|
"&:hover": { filter: "brightness(85%)" }
|
|
48
49
|
},
|
|
49
|
-
...
|
|
50
|
+
...e === "negative" && {
|
|
50
51
|
backgroundColor: "rgb(255, 204, 238) !important",
|
|
51
52
|
"&:hover": { filter: "brightness(85%)" }
|
|
52
53
|
},
|
|
53
|
-
...
|
|
54
|
-
...
|
|
55
|
-
})),
|
|
54
|
+
...e === "typeChange" && t === "negative" && { "&:hover": { backgroundColor: "rgb(153, 255, 153) !important" } },
|
|
55
|
+
...e === "typeChange" && t === "positive" && { "&:hover": { backgroundColor: "rgb(255, 204, 238) !important" } }
|
|
56
|
+
})), f = class extends e.Component {
|
|
56
57
|
static propTypes = {
|
|
57
58
|
anchorEl: t.object,
|
|
58
59
|
open: t.bool,
|
|
@@ -81,13 +82,13 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
|
|
|
81
82
|
n === "" ? t() : e(n), this.setState({ value: "" });
|
|
82
83
|
};
|
|
83
84
|
render() {
|
|
84
|
-
let { anchorEl: e, offset: t, onDelete: n, open:
|
|
85
|
-
return /* @__PURE__ */
|
|
85
|
+
let { anchorEl: e, offset: t, onDelete: n, open: r, type: o } = this.props, { value: f } = this.state;
|
|
86
|
+
return /* @__PURE__ */ i(c, {
|
|
86
87
|
anchorEl: e,
|
|
87
88
|
elevation: 2,
|
|
88
|
-
open:
|
|
89
|
+
open: r,
|
|
89
90
|
onClose: this.handleSave,
|
|
90
|
-
annotationType:
|
|
91
|
+
annotationType: o,
|
|
91
92
|
style: {
|
|
92
93
|
marginTop: `${t}px`,
|
|
93
94
|
transition: "margin-top 2s ease-out"
|
|
@@ -104,9 +105,9 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
|
|
|
104
105
|
vertical: "top",
|
|
105
106
|
horizontal: "left"
|
|
106
107
|
},
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
annotationType:
|
|
109
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ a(l, {
|
|
109
|
+
annotationType: o,
|
|
110
|
+
children: [/* @__PURE__ */ i(s, {
|
|
110
111
|
id: "annotation-editor",
|
|
111
112
|
style: {
|
|
112
113
|
padding: "2px 5px",
|
|
@@ -119,18 +120,18 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
|
|
|
119
120
|
value: f,
|
|
120
121
|
onChange: this.onValueChange,
|
|
121
122
|
InputProps: { disableUnderline: !0 }
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ a(u, { children: [
|
|
124
|
+
/* @__PURE__ */ i(d, {
|
|
124
125
|
onClick: n,
|
|
125
126
|
children: "Delete"
|
|
126
127
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ i(d, {
|
|
128
129
|
variant: "typeChange",
|
|
129
|
-
annotationType:
|
|
130
|
+
annotationType: o,
|
|
130
131
|
onClick: this.handleTypeChange,
|
|
131
|
-
children:
|
|
132
|
+
children: o === "negative" ? "Green" : "Pink"
|
|
132
133
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ i(d, {
|
|
134
135
|
onClick: this.handleSave,
|
|
135
136
|
children: "Save"
|
|
136
137
|
})
|
|
@@ -140,4 +141,4 @@ var s = n(a)(({ theme: e, annotationType: t }) => ({ "& .MuiPaper-root": {
|
|
|
140
141
|
}
|
|
141
142
|
};
|
|
142
143
|
//#endregion
|
|
143
|
-
export {
|
|
144
|
+
export { f as default };
|
package/dist/delivery/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./main.js";
|
|
1
|
+
import { Main as e } from "./main.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "debug";
|
|
4
4
|
import { createRoot as r } from "react-dom/client";
|
|
@@ -61,7 +61,7 @@ var d = class extends HTMLElement {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
disconnectedCallback() {
|
|
64
|
-
this._root
|
|
64
|
+
this._root &&= (this._root.unmount(), null);
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
package/dist/delivery/main.js
CHANGED
|
@@ -23,7 +23,8 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
|
|
|
23
23
|
width: "100%",
|
|
24
24
|
color: p.text(),
|
|
25
25
|
marginBottom: e.spacing(2),
|
|
26
|
-
fontSize: "inherit"
|
|
26
|
+
fontSize: "inherit",
|
|
27
|
+
display: "block"
|
|
27
28
|
})), O = o("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), k = o(s)(({ theme: e }) => ({
|
|
28
29
|
marginBottom: e.spacing(2),
|
|
29
30
|
borderRadius: "4px"
|
|
@@ -131,4 +132,4 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
|
|
|
131
132
|
}
|
|
132
133
|
};
|
|
133
134
|
//#endregion
|
|
134
|
-
export { j as default };
|
|
135
|
+
export { j as Main, j as default };
|