frame.identify 0.4.3 → 0.4.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnterValues.d.ts","sourceRoot":"","sources":["../src/EnterValues.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAK3C,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+
|
|
1
|
+
{"version":3,"file":"EnterValues.d.ts","sourceRoot":"","sources":["../src/EnterValues.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAK3C,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BA8HA"}
|
|
@@ -8,6 +8,7 @@ export declare function ModalImageLoaded(props: {
|
|
|
8
8
|
actor: ActorRefFrom<typeof identifyMachine>;
|
|
9
9
|
modalIsOpen: boolean;
|
|
10
10
|
closeModal: (sl: number, sh: number, dbl: number, points?: Point[], reset?: boolean) => () => void;
|
|
11
|
+
onAfterCropImage?: (x0: number, y0: number, width: number, height: number, sl: number, sh: number, dbl: number, base64: string) => void;
|
|
11
12
|
testMode?: boolean;
|
|
12
13
|
}): import("react").JSX.Element;
|
|
13
14
|
//# sourceMappingURL=ModalImageLoaded.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalImageLoaded.d.ts","sourceRoot":"","sources":["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O,KACZ,MAAM,IAAI,CAAC;IAChB,gBAAgB,CAAC,EAAE,CACjB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,KACX,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BAgUA"}
|
package/dist/frame.identify.js
CHANGED
|
@@ -4441,52 +4441,62 @@ function es(e) {
|
|
|
4441
4441
|
})] });
|
|
4442
4442
|
}
|
|
4443
4443
|
//#endregion
|
|
4444
|
-
//#region
|
|
4444
|
+
//#region node_modules/frame.theme/dist/frame.theme.js
|
|
4445
4445
|
function ts(e) {
|
|
4446
|
-
let t = C(), [n, o] = a(""), c = i(null)
|
|
4446
|
+
let t = C(), [n, o] = a(""), c = i(null), { t: l } = m(), u = (e, t, n) => {
|
|
4447
|
+
let r = parseFloat(e);
|
|
4448
|
+
o(isNaN(r) ? l("main.identify.error.validNumber", { field: t }) : r < 0 ? l("main.identify.error.positive", { field: t }) : r === 0 ? l("main.identify.error.notNull", { field: t }) : n !== void 0 && r > n ? l("main.identify.error.notGreaterThan", {
|
|
4449
|
+
field: t,
|
|
4450
|
+
max: n,
|
|
4451
|
+
defaultValue: l("main.identify.error.notGreaterThan", {
|
|
4452
|
+
field: t,
|
|
4453
|
+
max: n
|
|
4454
|
+
})
|
|
4455
|
+
}) : "");
|
|
4456
|
+
};
|
|
4447
4457
|
return r(() => {
|
|
4448
4458
|
let t = c.current;
|
|
4449
4459
|
if (!t) return;
|
|
4450
|
-
t
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
e.checkValue(t, o), e.onChange(t);
|
|
4460
|
+
let n = (t, n = 40) => (r) => {
|
|
4461
|
+
let i = r.target;
|
|
4462
|
+
if (i && i.value !== e.value) {
|
|
4463
|
+
let r = i.value;
|
|
4464
|
+
u(r, t, n), e.checkValue?.(r, o), e.onChange(r);
|
|
4456
4465
|
}
|
|
4457
4466
|
};
|
|
4458
|
-
return t.addEventListener("input", n), t.addEventListener("change", n), () => {
|
|
4459
|
-
t.removeEventListener("input", n), t.removeEventListener("change", n);
|
|
4467
|
+
return t.addEventListener("input", n(e.label)), t.addEventListener("change", n(e.label)), () => {
|
|
4468
|
+
t.removeEventListener("input", n(e.label)), t.removeEventListener("change", n(e.label));
|
|
4460
4469
|
};
|
|
4461
4470
|
}, [
|
|
4462
4471
|
e.value,
|
|
4463
4472
|
e.onChange,
|
|
4464
|
-
e
|
|
4465
|
-
|
|
4466
|
-
|
|
4473
|
+
e,
|
|
4474
|
+
l,
|
|
4475
|
+
u
|
|
4467
4476
|
]), /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(b, {
|
|
4468
4477
|
"data-testid": `NumberInput.Textfield.${e.dataTestid}`,
|
|
4469
4478
|
autoFocus: e.autofocus ?? !1,
|
|
4470
|
-
color: "
|
|
4479
|
+
color: e.color ?? "warning",
|
|
4471
4480
|
label: e.label,
|
|
4472
4481
|
variant: "filled",
|
|
4473
4482
|
value: e.value,
|
|
4474
|
-
sx: {
|
|
4483
|
+
sx: {
|
|
4484
|
+
width: "150px",
|
|
4485
|
+
"& .MuiInputLabel-root": { color: !n && e.value ? "lightgreen" : "white" }
|
|
4486
|
+
},
|
|
4487
|
+
type: "text",
|
|
4475
4488
|
slotProps: {
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
ref: c
|
|
4482
|
-
},
|
|
4489
|
+
htmlInput: { inputMode: "decimal" },
|
|
4490
|
+
input: { style: {
|
|
4491
|
+
color: "white",
|
|
4492
|
+
backgroundColor: t.palette.primary.main
|
|
4493
|
+
} },
|
|
4483
4494
|
formHelperText: { sx: { whiteSpace: "pre-line" } }
|
|
4484
4495
|
},
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
},
|
|
4496
|
+
onChange: ((t, n) => (r) => {
|
|
4497
|
+
let i = r.target.value;
|
|
4498
|
+
u(i, t, n), e.checkValue?.(i, o), e.onChange(i);
|
|
4499
|
+
})(e.label, e.maxValue),
|
|
4490
4500
|
error: !!n,
|
|
4491
4501
|
helperText: n
|
|
4492
4502
|
}) });
|
|
@@ -4496,7 +4506,7 @@ function ts(e) {
|
|
|
4496
4506
|
function ns(e) {
|
|
4497
4507
|
let [t, n] = a(e.testMode ? "50" : ""), [r, i] = a(e.testMode ? "44" : ""), [l, u] = a(e.testMode ? "15" : ""), d = E(e.actor, (e) => e), f = (e, t, n, r) => {
|
|
4498
4508
|
let i = parseFloat(t);
|
|
4499
|
-
n(i <= 0 ? v("main.identify.error.positive", { field: e }) : i > r ? v("main.identify.error.notGreaterThan", {
|
|
4509
|
+
n(isNaN(i) ? v("main.identify.error.validNumber", { field: e }) : i <= 0 ? v("main.identify.error.positive", { field: e }) : i > r ? v("main.identify.error.notGreaterThan", {
|
|
4500
4510
|
field: e,
|
|
4501
4511
|
max: r,
|
|
4502
4512
|
defaultValue: v("main.identify.error.notGreaterThan", {
|
|
@@ -4538,8 +4548,8 @@ function ns(e) {
|
|
|
4538
4548
|
children: [
|
|
4539
4549
|
/* @__PURE__ */ s(ts, {
|
|
4540
4550
|
value: t,
|
|
4541
|
-
checkValue: (e, t) => f("SL", e, t, 80),
|
|
4542
4551
|
onChange: n,
|
|
4552
|
+
checkValue: (e, t) => f("SL", e, t, 80),
|
|
4543
4553
|
label: v("main.identify.label.scheibenlaenge", { defaultValue: "box length" }),
|
|
4544
4554
|
dataTestid: "scheibenlaenge-input",
|
|
4545
4555
|
autofocus: !0
|
|
@@ -4638,7 +4648,9 @@ function rs(e) {
|
|
|
4638
4648
|
}
|
|
4639
4649
|
function ee(t, r, i, a, o) {
|
|
4640
4650
|
let s = document.createElement("canvas");
|
|
4641
|
-
s.width = t * 2, s.height = r * 2, s.getContext("2d")?.drawImage(n.current, i, a, t, r, 0, 0, t * 2, r * 2)
|
|
4651
|
+
s.width = t * 2, s.height = r * 2, s.getContext("2d")?.drawImage(n.current, i, a, t, r, 0, 0, t * 2, r * 2);
|
|
4652
|
+
let c = n.current.src;
|
|
4653
|
+
p(s.toDataURL()), y((e) => e + 1), u(!0), e.onAfterCropImage?.(i, a, t, r, w.context.SL ?? 0, w.context.SH ?? 0, w.context.AZG ?? 0, c), e.actor.send({ type: o });
|
|
4642
4654
|
}
|
|
4643
4655
|
return /* @__PURE__ */ s(jo, {
|
|
4644
4656
|
keepMounted: !0,
|