@asdp/ferryui 0.1.22-dev.8895 → 0.1.22-dev.8918

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/index.js CHANGED
@@ -387,7 +387,7 @@ var useStyles2 = reactComponents.makeStyles({
387
387
  insetInlineEnd: "15% !important"
388
388
  },
389
389
  [`@media (min-width: ${extendedTokens.breakpointMd}) and (max-width: ${extendedTokens.breakpointLg})`]: {
390
- insetInlineEnd: "13% !important"
390
+ insetInlineEnd: "11% !important"
391
391
  }
392
392
  },
393
393
  closeButtonWithoutNav: {
@@ -8208,17 +8208,6 @@ var ModalPassengerForm = ({
8208
8208
  }
8209
8209
  });
8210
8210
  setStream(mediaStream);
8211
- if (videoRef.current) {
8212
- videoRef.current.srcObject = mediaStream;
8213
- const playPromise = videoRef.current.play();
8214
- if (playPromise !== void 0) {
8215
- playPromise.catch((error) => {
8216
- if (error.name !== "AbortError") {
8217
- console.error("Video play error:", error);
8218
- }
8219
- });
8220
- }
8221
- }
8222
8211
  } catch (err) {
8223
8212
  console.error("Failed to start camera:", err);
8224
8213
  alert(mergedLabels.cameraPermissionError);
@@ -8247,6 +8236,21 @@ var ModalPassengerForm = ({
8247
8236
  startCamera();
8248
8237
  }
8249
8238
  }, [isModalScanOpen, scanStatus, startCamera]);
8239
+ React5.useEffect(() => {
8240
+ if (isModalScanOpen && scanStatus === "idle" && stream && videoRef.current) {
8241
+ if (videoRef.current.srcObject !== stream) {
8242
+ videoRef.current.srcObject = stream;
8243
+ const playPromise = videoRef.current.play();
8244
+ if (playPromise !== void 0) {
8245
+ playPromise.catch((error) => {
8246
+ if (error.name !== "AbortError") {
8247
+ console.error("Video play error:", error);
8248
+ }
8249
+ });
8250
+ }
8251
+ }
8252
+ }
8253
+ }, [isModalScanOpen, scanStatus, stream]);
8250
8254
  React5.useEffect(() => {
8251
8255
  if (!isModalScanOpen) {
8252
8256
  stopCamera();
@@ -8279,6 +8283,7 @@ var ModalPassengerForm = ({
8279
8283
  let city = "";
8280
8284
  for (const line of lines) {
8281
8285
  const lower = line.toLowerCase();
8286
+ console.log({ lower });
8282
8287
  if (lower.includes("nama") && !lower.includes("kewarganegaraan")) {
8283
8288
  name = line.replace(/.*nama\s*[:;]?\s*/i, "").trim();
8284
8289
  } else if (lower.includes("nik")) {