@cniot/android-pda-components 1.1.2-beta.5 → 1.1.2-beta.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/es/index.es.js CHANGED
@@ -6,47 +6,57 @@ var __publicField = (obj, key, value) => {
6
6
  };
7
7
  import React, { useState, useEffect, forwardRef, useImperativeHandle, createRef, useRef, Component, cloneElement, useCallback } from "react";
8
8
  import ReactDOM from "react-dom";
9
- var global = /* @__PURE__ */ (() => "*{margin:0;padding:0}div{box-sizing:border-box}body{--pda-image-1: url(https://img.alicdn.com/imgextra/i3/O1CN01PRSptR1YO1wOlBHCr_!!6000000003048-1-tps-240-240.gif);--pda-image-2: url(https://img.alicdn.com/imgextra/i3/O1CN01O46CYm1Gc4yvZtk7A_!!6000000000642-2-tps-36-64.png);--pda-image-3: url(https://img.alicdn.com/imgextra/i3/O1CN017UD9RM1vCKxsjxsrE_!!6000000006136-2-tps-68-68.png);--pda-image-4: url(https://img.alicdn.com/imgextra/i3/O1CN0170QXc91udWriUp19S_!!6000000006060-2-tps-74-72.png);--pda-image-5: url(https://img.alicdn.com/imgextra/i3/O1CN01EMphgH1ylYGXImCZn_!!6000000006619-2-tps-70-70.png);--pda-image-6: url(https://img.alicdn.com/imgextra/i3/O1CN01dTdXds1p9gz4wKAve_!!6000000005318-2-tps-70-26.png);--pda-image-7: url(https://img.alicdn.com/imgextra/i3/O1CN01SKQH1k1p7rQYTBXdn_!!6000000005314-2-tps-56-60.png);--pda-image-8: url(https://img.alicdn.com/imgextra/i3/O1CN01WnYl6Z1qBM3uInOvw_!!6000000005457-2-tps-40-68.png);--pda-image-10: url(https://img.alicdn.com/imgextra/i3/O1CN01FkZisA1tCg1sj3b6U_!!6000000005866-2-tps-40-58.png);--pda-image-11: url(https://img.alicdn.com/imgextra/i3/O1CN01kxYh3U25Xzr9nAcYp_!!6000000007537-2-tps-240-240.png)}\n")();
9
+ var global = "";
10
10
  window.PDA_IMAGE_PATH = window.PDA_IMAGE_PATH ? window.PDA_IMAGE_PATH : "https://img.alicdn.com/imgextra/i3/";
11
11
  const PDA_IMAGE_PATH = window.PDA_IMAGE_PATH;
12
- var _classnames_2_3_1_classnames = { exports: {} };
12
+ var _classnames_2_5_1_classnames = { exports: {} };
13
13
  /*!
14
- Copyright (c) 2018 Jed Watson.
15
- Licensed under the MIT License (MIT), see
16
- http://jedwatson.github.io/classnames
14
+ Copyright (c) 2018 Jed Watson.
15
+ Licensed under the MIT License (MIT), see
16
+ http://jedwatson.github.io/classnames
17
17
  */
18
18
  (function(module) {
19
19
  (function() {
20
20
  var hasOwn = {}.hasOwnProperty;
21
21
  function classNames2() {
22
- var classes = [];
22
+ var classes = "";
23
23
  for (var i = 0; i < arguments.length; i++) {
24
24
  var arg = arguments[i];
25
- if (!arg)
26
- continue;
27
- var argType = typeof arg;
28
- if (argType === "string" || argType === "number") {
29
- classes.push(arg);
30
- } else if (Array.isArray(arg)) {
31
- if (arg.length) {
32
- var inner = classNames2.apply(null, arg);
33
- if (inner) {
34
- classes.push(inner);
35
- }
36
- }
37
- } else if (argType === "object") {
38
- if (arg.toString === Object.prototype.toString) {
39
- for (var key in arg) {
40
- if (hasOwn.call(arg, key) && arg[key]) {
41
- classes.push(key);
42
- }
43
- }
44
- } else {
45
- classes.push(arg.toString());
46
- }
25
+ if (arg) {
26
+ classes = appendClass(classes, parseValue(arg));
47
27
  }
48
28
  }
49
- return classes.join(" ");
29
+ return classes;
30
+ }
31
+ function parseValue(arg) {
32
+ if (typeof arg === "string" || typeof arg === "number") {
33
+ return arg;
34
+ }
35
+ if (typeof arg !== "object") {
36
+ return "";
37
+ }
38
+ if (Array.isArray(arg)) {
39
+ return classNames2.apply(null, arg);
40
+ }
41
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
42
+ return arg.toString();
43
+ }
44
+ var classes = "";
45
+ for (var key in arg) {
46
+ if (hasOwn.call(arg, key) && arg[key]) {
47
+ classes = appendClass(classes, key);
48
+ }
49
+ }
50
+ return classes;
51
+ }
52
+ function appendClass(value, newClass) {
53
+ if (!newClass) {
54
+ return value;
55
+ }
56
+ if (value) {
57
+ return value + " " + newClass;
58
+ }
59
+ return value + newClass;
50
60
  }
51
61
  if (module.exports) {
52
62
  classNames2.default = classNames2;
@@ -55,9 +65,9 @@ var _classnames_2_3_1_classnames = { exports: {} };
55
65
  window.classNames = classNames2;
56
66
  }
57
67
  })();
58
- })(_classnames_2_3_1_classnames);
59
- var classNames = _classnames_2_3_1_classnames.exports;
60
- var index$E = /* @__PURE__ */ (() => '.op-overlay{top:0;left:0;position:fixed;right:0;bottom:0;display:flex;justify-content:center;align-items:center;z-index:100;background-color:none}.op-overlay:before{content:"";position:absolute;z-index:1;background-color:#000;opacity:.6;left:0;top:0;width:100vw;height:100vh}.op-overlay>div{position:relative;z-index:2}.op-overlay.center{align-items:center;justify-content:center}.op-overlay.top{align-items:flex-start;justify-content:center}.op-overlay.bottom{align-items:flex-end;justify-content:center}.op-overlay.bottom .toast-wrap{margin-bottom:10px}\n')();
68
+ })(_classnames_2_5_1_classnames);
69
+ var classNames = _classnames_2_5_1_classnames.exports;
70
+ var index$D = "";
61
71
  function getTypeClass$2(type) {
62
72
  return {
63
73
  center: "op-overlay center",
@@ -89,7 +99,7 @@ function Overlay$1(props) {
89
99
  }
90
100
  }, props.children) : null;
91
101
  }
92
- var index$D = /* @__PURE__ */ (() => ".pda-header{background-color:#000;display:flex;flex-direction:row;align-items:center;color:#fff;height:84px;padding-right:12px}.pda-header .header-click-area{padding-right:16px;height:100%;display:flex;align-items:center;flex-direction:row}.pda-header .pda-header-icon{height:100%;width:65px;background-size:100%;background-repeat:no-repeat;background-position:center}.pda-header .pda-header-icon:active{background-color:#d8d8d8}.pda-header .pda-header-icon-back{background-image:var(--pda-image-2);background-size:17px 32px}.pda-header .pda-header-icon-scan{background-image:var(--pda-image-3);background-size:34px auto}.pda-header .pda-header-icon-select{background-image:var(--pda-image-4);background-size:36px auto}.pda-header .pda-header-icon-read{background-image:var(--pda-image-5);background-size:35px auto}.pda-header .pda-title-text{font-size:40px;flex:1;line-height:1.25em}.pda-header .pda-header-more{background-image:var(--pda-image-6);background-size:36px auto}.pda-header .pda-header-config{background-image:var(--pda-image-7);background-size:36px auto}.pda-header .pda-menus{background-color:#fff;border-radius:8px 8px 0 0;width:100%;padding:24px;display:flex;flex-direction:column}.pda-header .pda-menus>*{margin-bottom:12px}\n")();
102
+ var index$C = "";
93
103
  const blankFunc$6 = () => {
94
104
  };
95
105
  class PdaTitle extends React.Component {
@@ -142,12 +152,12 @@ class PdaTitle extends React.Component {
142
152
  var _keycode_2_2_1_keycode = { exports: {} };
143
153
  (function(module, exports) {
144
154
  function keyCode(searchInput) {
145
- if (searchInput && typeof searchInput === "object") {
155
+ if (searchInput && "object" === typeof searchInput) {
146
156
  var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode;
147
157
  if (hasKeyCode)
148
158
  searchInput = hasKeyCode;
149
159
  }
150
- if (typeof searchInput === "number")
160
+ if ("number" === typeof searchInput)
151
161
  return names[searchInput];
152
162
  var search = String(searchInput);
153
163
  var foundNamedKey = codes[search.toLowerCase()];
@@ -161,7 +171,7 @@ var _keycode_2_2_1_keycode = { exports: {} };
161
171
  return void 0;
162
172
  }
163
173
  keyCode.isEventKey = function isEventKey(event, nameOrCode) {
164
- if (event && typeof event === "object") {
174
+ if (event && "object" === typeof event) {
165
175
  var keyCode2 = event.which || event.keyCode || event.charCode;
166
176
  if (keyCode2 === null || keyCode2 === void 0) {
167
177
  return false;
@@ -268,7 +278,7 @@ var _keycode_2_2_1_keycode = { exports: {} };
268
278
  }
269
279
  })(_keycode_2_2_1_keycode, _keycode_2_2_1_keycode.exports);
270
280
  var keycode = _keycode_2_2_1_keycode.exports;
271
- var index$C = /* @__PURE__ */ (() => ".pda-button{display:block;box-sizing:border-box;padding-right:0;text-align:center;font-size:40px;height:90px;line-height:40px;color:#fff;background-color:#f3f4f8;border-radius:10px;width:100%;border-width:0;word-break:keep-all}.pda-button.pda-button-default{color:#000}.pda-button:active{background-color:#979797}.pda-button.pda-button-primary{background-color:#0091ea}.pda-button.pda-button-primary:active{background-color:#0074bb}.pda-button.pda-button-dark{background-color:#282828}.pda-button.pda-button-dark:active{background-color:#979797}.pda-button.pda-button-cutout{color:#0091ea;border-width:4px;border-color:#0091ea}.button-group{display:flex;flex-direction:row;padding:20px 24px;width:100%}.button-group .pda-button:not(:last-child){margin-right:16px}\n")();
281
+ var index$B = "";
272
282
  function Button(props) {
273
283
  const { type = "default", onClick, className = "", tabIndex = 1, dataClick = "" } = props;
274
284
  let opt = {};
@@ -291,7 +301,7 @@ Button.Group = ButtonGroup;
291
301
  const SPECIAL_KEY_MAP = ["fn"];
292
302
  const empty$3 = () => {
293
303
  };
294
- function index$B(props) {
304
+ function index$A(props) {
295
305
  const {
296
306
  onBack,
297
307
  icon,
@@ -306,20 +316,32 @@ function index$B(props) {
306
316
  backShortcutKey
307
317
  } = props;
308
318
  const [showMenus, setShowMenus] = React.useState(false);
309
- React.useEffect(function() {
310
- if (menuShortcutKey) {
311
- return bindShortcutKey(getShortcutKeyCodes(menuShortcutKey), function() {
312
- setShowMenus(true);
313
- });
314
- }
315
- }, [menuShortcutKey]);
316
- React.useEffect(function() {
317
- if (backShortcutKey && onBack) {
318
- return bindShortcutKey(getShortcutKeyCodes(backShortcutKey), function() {
319
- onBack("back");
320
- });
321
- }
322
- }, [backShortcutKey, onBack]);
319
+ React.useEffect(
320
+ function() {
321
+ if (menuShortcutKey) {
322
+ return bindShortcutKey(
323
+ getShortcutKeyCodes(menuShortcutKey),
324
+ function() {
325
+ setShowMenus(true);
326
+ }
327
+ );
328
+ }
329
+ },
330
+ [menuShortcutKey]
331
+ );
332
+ React.useEffect(
333
+ function() {
334
+ if (backShortcutKey && onBack) {
335
+ return bindShortcutKey(
336
+ getShortcutKeyCodes(backShortcutKey),
337
+ function() {
338
+ onBack("back");
339
+ }
340
+ );
341
+ }
342
+ },
343
+ [backShortcutKey, onBack]
344
+ );
323
345
  React.useEffect(() => {
324
346
  return onKeyBoradBack(function() {
325
347
  onBack && onBack("back");
@@ -399,7 +421,7 @@ function bindShortcutKey(keys, callback) {
399
421
  }
400
422
  function onKeyBoradBack(fn) {
401
423
  function keyPressed(data) {
402
- if (data.param.originValue == "back") {
424
+ if ("back" == data.param.originValue) {
403
425
  fn && fn();
404
426
  }
405
427
  }
@@ -414,7 +436,7 @@ function addEventListener(node, eventName, fn) {
414
436
  node.removeEventListener(eventName, fn);
415
437
  };
416
438
  }
417
- var index$A = /* @__PURE__ */ (() => ".pda-info-card{border-radius:16px;padding:16px;background-color:#fff;word-break:break-word}.pda-info-card .divda-info-card-title{font-size:32px;line-height:32px}.pda-info-card .pda-info-card-title-section{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.pda-info-card .pda-info-card-title-section .pda-info-card-title{font-size:32px;color:#666}.pda-info-card .pda-info-card-title-section .pda-info-card-tag{display:flex;align-items:center;justify-content:center;height:36px;padding:0 8px;background-color:#fc0;border-radius:8px}.pda-info-card .pda-info-card-highlight-section{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.pda-info-card .pda-info-card-highlight-section .pda-info-card-title{font-size:32px;color:#666;margin-top:20px}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight{font-size:80px;line-height:64px;color:#0091ea;font-weight:700;padding-top:12px;display:flex;flex-direction:row;align-items:flex-end;flex-wrap:wrap}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight .pda-info-card-highlight1CN{font-size:64px}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight .pda-info-card-highlight2{font-size:50px;line-height:40px}.pda-info-card .pda-info-card-highlight-section .pda-info-card-highlight .pda-info-card-highlight2CN{font-size:40px;line-height:40px}.pda-info-card .pda-info-card-bold{font-weight:700;font-size:40px;line-height:48px;color:#000;margin-top:16px}.pda-info-card .pda-info-card-list{margin-top:12px;color:#4a4a4a;font-size:32px;line-height:32px;word-break:break-all}.pda-info-card-progress{background-color:#f3f4f8;height:12px;border-radius:6px;margin-top:16px}.pda-info-card-progress .pda-info-card-progress-inside{background-color:#0091ea;height:12px;border-radius:6px}.pda-info-card.pda-info-card-dark{background-color:#000}.pda-info-card.pda-info-card-dark .pda-info-card-title{color:#999}.pda-info-card.pda-info-card-dark .pda-info-card-highlight,.pda-info-card.pda-info-card-dark .pda-info-card-bold{color:#fff}.pda-info-card.pda-info-card-dark .pda-info-card-list{color:#999}\n")();
439
+ var index$z = "";
418
440
  class PdaInfoCard$2 extends React.Component {
419
441
  constructor(props) {
420
442
  super(props);
@@ -493,7 +515,7 @@ class PdaInfoCard$2 extends React.Component {
493
515
  }
494
516
  }
495
517
  PdaInfoCard$2.IMAGE_1 = `${window.PDA_IMAGE_PATH}O1CN01qYuxip1ME9zhdL9XG_!!6000000001402-2-tps-150-150.png`;
496
- var index$z = /* @__PURE__ */ (() => ".pda-list-item{padding:24px 16px;border-radius:16px;position:relative}.pda-list-item div{margin:0}.pda-list-item>div{margin-bottom:12px}.pda-list-item>div:last-child{margin-bottom:0}.pda-list-item .pda-listitem-highlight{width:100%;font-size:40px;line-height:40px;font-weight:700;color:#fff;display:flex;flex-direction:row;justify-content:space-between}.pda-list-item .pda-listitem-highlight div:first-child{flex:1;word-break:normal;white-space:normal;word-break:break-word}.pda-list-item .pda-listitem-header,.pda-list-item .pda-listitem-state-text,.pda-list-item .pda-listitem-subinfo{font-size:32px;line-height:32px;color:#999;word-break:break-all}.pda-list-item .pda-listitem-state-block{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0}.pda-list-item .pda-listitem-state-block>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px}.pda-list-item .pda-listitem-state-block>div.success{background-color:#0f0}.pda-list-item .pda-listitem-state-block>div.warning{background-color:#fc0}.pda-list-item .pda-listitem-state-block>div.error{background-color:red}.pda-list-item .pda-listitem-icon{position:absolute;top:0;right:0;width:60px;height:60px;background-color:#0091ea;border-radius:0 16px;display:flex;justify-content:center;align-items:center;opacity:.85}.pda-list-item .listitem-icon-container{background-size:100%;background-repeat:no-repeat;width:16px;height:24px}.pda-list-item .listitem-icon-next{background-image:var(--pda-image-10)}\n")();
518
+ var index$y = "";
497
519
  class PdaListItem extends React.Component {
498
520
  constructor(props) {
499
521
  super(props);
@@ -539,7 +561,7 @@ class PdaListItem extends React.Component {
539
561
  }));
540
562
  }
541
563
  }
542
- var index$y = /* @__PURE__ */ (() => ".confirm-wrap{background:#ffffff;border-radius:6px 6px 0 0;padding-top:24px;width:100%}.confirm-wrap .confirm-content{padding:0 24px}.confirm-wrap .confirm-title{font-size:28.8px;font-weight:700}.confirm-wrap .confirm-message,.confirm-wrap .confirm-sub-message{font-size:26.4px;margin-bottom:12px}.confirm-wrap .confirm-sub-block{display:flex;flex-direction:row}.confirm-wrap .confirm-sub-block .confirm-sub-label{white-space:nowrap}.confirm-wrap .confirm-sub-block .confirm-sub-content{margin-left:12px;word-wrap:break-word;word-break:break-all}.confirm-wrap .confirm-btns>*:not(:first-child){padding-top:0}.confirm-wrap.confirm-warning{background-color:red}.confirm-wrap.confirm-warning .pda-button{background-color:transparent;color:#000;border:2px solid black;border-radius:40px}\n")();
564
+ var index$x = "";
543
565
  function empty$2() {
544
566
  }
545
567
  function Confirm(props) {
@@ -584,16 +606,22 @@ function Confirm(props) {
584
606
  dataClick: item.dataClick
585
607
  }, item.label))) : null));
586
608
  }
587
- var index$x = /* @__PURE__ */ (() => ".toast-wrap{background:#00ff00;border-radius:6px;padding:10px 15px;width:100%;box-sizing:border-box}.toast-wrap.warning{background-color:#ffcb00}.toast-wrap.error{background-color:red}.toast-wrap .toast-title{font-size:50px;font-weight:700;word-wrap:break-word}.toast-wrap .toast-message{font-size:32px;word-wrap:break-word}.loading-box{background-color:#fff;border-radius:5%;display:flex;flex-direction:column;align-items:center;padding:10px 20px;margin-top:-10%}.loading-box svg{width:50px;height:50px;animation:rotate 1.5s linear infinite;margin:10px}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n")();
609
+ var index$w = "";
588
610
  function WindVaneLog(param) {
589
611
  const params = {
590
612
  domain: "logger",
591
613
  method: "deviceLog",
592
614
  params: param
593
615
  };
594
- WindVane.call("WindvanePlugin", "invoke", JSON.stringify(params), function(e) {
595
- }, function(e) {
596
- });
616
+ WindVane.call(
617
+ "WindvanePlugin",
618
+ "invoke",
619
+ JSON.stringify(params),
620
+ function(e) {
621
+ },
622
+ function(e) {
623
+ }
624
+ );
597
625
  }
598
626
  function resolveContainer(getContainer) {
599
627
  const container = typeof getContainer === "function" ? getContainer() : getContainer;
@@ -619,7 +647,11 @@ function playSound(sound) {
619
647
  method: "playSound",
620
648
  params: { sound }
621
649
  };
622
- WindVane.call("WindvanePlugin", "invoke", JSON.stringify(params));
650
+ WindVane.call(
651
+ "WindvanePlugin",
652
+ "invoke",
653
+ JSON.stringify(params)
654
+ );
623
655
  }
624
656
  }
625
657
  function getTypeClass$1(type) {
@@ -708,7 +740,10 @@ const defaultProps = {
708
740
  duration: 2e3
709
741
  };
710
742
  function show(p) {
711
- const props = mergeProps(defaultProps, p);
743
+ const props = mergeProps(
744
+ defaultProps,
745
+ p
746
+ );
712
747
  let timer = 0;
713
748
  const { getContainer = () => document.body } = props;
714
749
  const container = document.createElement("div");
@@ -840,7 +875,7 @@ function confirm(props) {
840
875
  onClick: onNext
841
876
  }));
842
877
  }
843
- var index$w = /* @__PURE__ */ (() => '.op-overlay{top:0;left:0;position:fixed;right:0;bottom:0;display:flex;justify-content:center;align-items:center;z-index:100;background-color:none}.op-overlay:before{content:"";position:absolute;z-index:1;background-color:#000;opacity:.6;left:0;top:0;width:100vw;height:100vh}.op-overlay>div{position:relative;z-index:2}.op-overlay.center{align-items:center;justify-content:center}.op-overlay.top{align-items:flex-start;justify-content:center}.op-overlay.bottom{align-items:flex-end;justify-content:center}.op-overlay.bottom .toast-wrap{margin-bottom:10px}\n')();
878
+ var index$v = "";
844
879
  function getTypeClass(type) {
845
880
  return {
846
881
  center: "op-overlay center",
@@ -872,7 +907,7 @@ function Overlay(props) {
872
907
  }
873
908
  }, props.children) : null;
874
909
  }
875
- var index$v = /* @__PURE__ */ (() => ".prompt-dialog{background:#ffffff;border-radius:6px 6px 0 0;padding:10px;width:80%}.prompt-dialog .prompt-title{font-size:30px;margin:10px 0}.prompt-dialog .prompt-input{transition:all .1s linear;border:1px solid #dcdfe6;background-color:#fff;outline:0;margin:0;font-weight:400;vertical-align:middle;background-color:#0000;color:#1f2633;font-size:24px;box-sizing:border-box;width:100%;padding:.5em;border-radius:4px}.prompt-dialog .prompt-input:hover,.prompt-dialog .prompt-input:active,.prompt-dialog .prompt-input:focus{border-color:#03c1fd}.prompt-dialog .prompt-btns{display:flex;margin-top:10px}.prompt-dialog .prompt-btns .pda-button{margin-left:10px}.prompt-dialog .prompt-btns .pda-button:first-child{margin-left:0}\n")();
910
+ var index$u = "";
876
911
  function Prompt(props) {
877
912
  const inputRef = React.useRef();
878
913
  const { data = {}, onNext } = props;
@@ -933,8 +968,7 @@ function toast(props) {
933
968
  setHidden(false);
934
969
  }, [action.sequence]);
935
970
  return !hidden ? /* @__PURE__ */ React.createElement(Overlay$1, {
936
- verticalPosition: "bottom",
937
- closable: true
971
+ verticalPosition: "bottom"
938
972
  }, /* @__PURE__ */ React.createElement("div", {
939
973
  style: { width: "90%" }
940
974
  }, /* @__PURE__ */ React.createElement(Toast, {
@@ -950,7 +984,7 @@ function splitMessage(message) {
950
984
  var msg = String(message).split("by Error:");
951
985
  return msg[1] || msg[0];
952
986
  }
953
- var index$u = /* @__PURE__ */ (() => ".mini-app-start-page{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100vw;height:100vh}.mini-app-start-page button{padding:.3em 3em;border-radius:6px;border:none;font-size:36px;background-color:#00bdff;color:#fff;margin-top:20px}.mini-app-start-page button:active{transform:scale(.95)}.mini-app-start-page .desc{opacity:.3}\n")();
987
+ var index$t = "";
954
988
  function NotFound(props) {
955
989
  return /* @__PURE__ */ React.createElement("div", {
956
990
  style: { padding: "20%" }
@@ -958,36 +992,39 @@ function NotFound(props) {
958
992
  style: { fontSize: "60%" }
959
993
  }, "Not found")), /* @__PURE__ */ React.createElement("div", null, props.action.getPage()));
960
994
  }
961
- var index$t = /* @__PURE__ */ (() => ".loading-wrap{position:fixed;z-index:1000;left:0;top:0;background-color:#00000080;height:100vh;width:100vw;display:flex;align-items:center;justify-content:center}.loading-wrap .loading-box{background-color:#fff;border-radius:5%;display:flex;flex-direction:column;align-items:center;padding:10px 20px;margin-top:-10%}.loading-wrap .loading-box svg{width:50px;height:50px;animation:rotate 1.5s linear infinite;margin:10px}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n")();
995
+ var index$s = "";
962
996
  function Loading$1(props) {
963
997
  const [showLoading, setShowLoading] = React.useState(props.visible);
964
998
  const edgeService = props.edgeService;
965
- React.useEffect(function() {
966
- let currentLoading = false;
967
- const throttleSetShowLoading = function(loading2) {
968
- currentLoading = loading2;
969
- if (loading2) {
970
- setTimeout(function() {
971
- if (currentLoading === loading2) {
972
- setShowLoading(true);
973
- }
974
- }, 350);
975
- } else {
976
- setTimeout(function() {
977
- if (currentLoading === loading2) {
978
- setShowLoading(false);
979
- }
980
- }, 100);
981
- }
982
- };
983
- if (!edgeService)
984
- return () => {
999
+ React.useEffect(
1000
+ function() {
1001
+ let currentLoading = false;
1002
+ const throttleSetShowLoading = function(loading2) {
1003
+ currentLoading = loading2;
1004
+ if (loading2) {
1005
+ setTimeout(function() {
1006
+ if (currentLoading === loading2) {
1007
+ setShowLoading(true);
1008
+ }
1009
+ }, 350);
1010
+ } else {
1011
+ setTimeout(function() {
1012
+ if (currentLoading === loading2) {
1013
+ setShowLoading(false);
1014
+ }
1015
+ }, 100);
1016
+ }
985
1017
  };
986
- edgeService.on("IO_STATUS", throttleSetShowLoading);
987
- return function() {
988
- edgeService.off("IO_STATUS", throttleSetShowLoading);
989
- };
990
- }, [edgeService]);
1018
+ if (!edgeService)
1019
+ return () => {
1020
+ };
1021
+ edgeService.on("IO_STATUS", throttleSetShowLoading);
1022
+ return function() {
1023
+ edgeService.off("IO_STATUS", throttleSetShowLoading);
1024
+ };
1025
+ },
1026
+ [edgeService]
1027
+ );
991
1028
  return showLoading ? /* @__PURE__ */ React.createElement("div", {
992
1029
  className: "loading-wrap"
993
1030
  }, /* @__PURE__ */ React.createElement("div", {
@@ -1011,7 +1048,11 @@ function PlaySound({ data, service, action }) {
1011
1048
  method: "playSound",
1012
1049
  params: { sound }
1013
1050
  };
1014
- WindVane.call("WindvanePlugin", "invoke", JSON.stringify(params));
1051
+ WindVane.call(
1052
+ "WindvanePlugin",
1053
+ "invoke",
1054
+ JSON.stringify(params)
1055
+ );
1015
1056
  }
1016
1057
  service.onNext({});
1017
1058
  return null;
@@ -1020,7 +1061,7 @@ function Debug() {
1020
1061
  console.warn('Please stop using "Debug" Components');
1021
1062
  return null;
1022
1063
  }
1023
- var index$s = {
1064
+ var index$r = {
1024
1065
  Alert,
1025
1066
  Start,
1026
1067
  Toast: toast,
@@ -1031,7 +1072,7 @@ var index$s = {
1031
1072
  Loading: Loading$1,
1032
1073
  PlaySound
1033
1074
  };
1034
- var index$r = /* @__PURE__ */ (() => ".presentation-card{margin:12px;background-color:#fff;border-radius:6px;text-align:center;padding:20px 6px}.presentation-card img{width:70%;height:auto}.presentation-card.transparent{background-color:transparent;color:#fff;margin-top:80px}.presentation-card .text{margin-top:12px;font-weight:700;font-size:32px}.presentation-card .sub-text{margin-top:6px;font-weight:700;font-size:24px;line-height:24px;color:#999;word-wrap:break-word}\n")();
1075
+ var index$q = "";
1035
1076
  function Presentation(props) {
1036
1077
  const {
1037
1078
  image = Presentation.IMAGE_1,
@@ -1053,7 +1094,7 @@ Presentation.IMAGE_1 = `${window.PDA_IMAGE_PATH}O1CN019Ivkor1ksy3pMGDsz_!!600000
1053
1094
  Presentation.IMAGE_2 = `${window.PDA_IMAGE_PATH}O1CN01lhSunu1X4VPw1Mlas_!!6000000002870-2-tps-352-158.png`;
1054
1095
  Presentation.IMAGE_3 = `${window.PDA_IMAGE_PATH}O1CN01mreYXo1XfbUsQ7hip_!!6000000002951-2-tps-322-144.png`;
1055
1096
  Presentation.IMAGE_4 = `${window.PDA_IMAGE_PATH}O1CN017gNM8F1Fmmcfti7Dg_!!6000000000530-1-tps-414-286.gif`;
1056
- var index$q = /* @__PURE__ */ (() => ".android-pda-list{--base-font-size: 36px}.android-pda-list .android-pda-list-title{font-size:calc(var(--base-font-size) * .6);color:#fff;line-height:2em}.android-pda-list .default-item{background-color:#282828;font-size:var(--base-font-size);padding:10px;border-radius:6px;color:#fff;display:flex;justify-content:space-between;align-items:center;cursor:pointer;margin-bottom:10px;word-break:break-word}.android-pda-list .default-item:hover,.android-pda-list .default-item:active,.android-pda-list .default-item:focus{background-color:#0061a1}.android-pda-list .default-item .text{flex:1}.android-pda-list .default-item .sub-text{font-size:80%;opacity:.7;line-height:1em;word-wrap:break-word}.android-pda-list .default-item .sub-tags{display:flex;margin-top:10px}.android-pda-list .default-item .sub-tags .sub-tag-item{background-color:#008fed;padding:.3em;font-size:40%;margin-right:5px;border-radius:6px;color:#fff;line-height:1em}.android-pda-list .default-item .sub-tags .sub-tag-item:first-child{margin-left:0}.android-pda-list .default-item .extra{font-size:80%;opacity:.7}\n")();
1097
+ var index$p = "";
1057
1098
  function empty$1() {
1058
1099
  }
1059
1100
  function List$1(props) {
@@ -1108,7 +1149,7 @@ function DefaultItem(props) {
1108
1149
  }, extra));
1109
1150
  }
1110
1151
  List$1.Item = DefaultItem;
1111
- var index$p = /* @__PURE__ */ (() => ".baselayout-wrapper{display:flex;flex-direction:column;background-color:#000;padding:85px 0}.baselayout-wrapper .baselayout-header{position:fixed;width:100%;top:0;z-index:2}.baselayout-wrapper .baselayout-footer{position:fixed;bottom:0;width:100%;background-color:#000;z-index:1}.baselayout-wrapper .baselayout-container{padding:0 24px 16px;overflow-x:auto;flex:1}.baselayout-wrapper .baselayout-container>*{margin-bottom:16px}.baselayout-wrapper .loading{position:absolute;top:0;left:0;right:0;bottom:0;color:#fff;background-color:#0006;background-image:var(--pda-image-1);background-repeat:no-repeat;background-position:center;background-size:120px 120px}\n")();
1152
+ var index$o = "";
1112
1153
  const blankFunc$5 = () => {
1113
1154
  };
1114
1155
  class BaseLayoutContainer extends React.Component {
@@ -1418,9 +1459,15 @@ class BarcodeScan extends React.Component {
1418
1459
  document.addEventListener("keyup", this._handleKeyUp);
1419
1460
  }
1420
1461
  document.addEventListener("BarcodeScan", this.onScanBarcode);
1421
- WindVane.call("WindvanePlugin", "invoke", "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'barcode'}}", function(e) {
1422
- }, function(e) {
1423
- });
1462
+ WindVane.call(
1463
+ "WindvanePlugin",
1464
+ "invoke",
1465
+ "{'domain': 'keyboard', 'method': 'changeScanMode', 'params': {'scanMode': 'barcode'}}",
1466
+ function(e) {
1467
+ },
1468
+ function(e) {
1469
+ }
1470
+ );
1424
1471
  }
1425
1472
  componentWillUnmount() {
1426
1473
  const { onBarcodeScan } = this.props;
@@ -1474,7 +1521,7 @@ class BaseLayout extends React.Component {
1474
1521
  });
1475
1522
  }
1476
1523
  }
1477
- var index$o = /* @__PURE__ */ (() => ".wakekeyborard .wakekeyborard-icon{width:80px;height:80px;background-image:var(--pda-image-11);background-size:100%;position:fixed;right:24px;bottom:24px}.wakekeyborard-overlay{position:fixed;top:0;right:0;left:0;bottom:0;background-color:#dedede33;z-index:10}.wakekeyborard-inputbox{width:100%;display:flex;flex-direction:row;height:85px;position:absolute;bottom:0;left:0;right:0}.wakekeyborard-inputbox input{width:100%;border-radius:16px 0 0;border:0;font-size:42px;background-color:#fff;padding-left:20px}.wakekeyborard-inputbox input:focus{outline:none}.wakekeyborard-inputbox input::-webkit-input-placeholder{color:#d1d1d6;font-size:32px}.wakekeyborard-inputbox button{width:150px;border:0;border-radius:0 16px 0 0;background-color:#fff}\n")();
1524
+ var index$n = "";
1478
1525
  const blankFunc$1 = () => {
1479
1526
  };
1480
1527
  function Keyborard(props) {
@@ -1622,7 +1669,7 @@ class UploadeButton extends Component {
1622
1669
  }))));
1623
1670
  }
1624
1671
  }
1625
- var index$n = /* @__PURE__ */ (() => ".v-mask{position:fixed;top:0;left:0;z-index:1000;display:block;width:100%;height:100%;background:rgba(0,0,0,.75);opacity:1;display:unset}.v-mask .image-viewer-content{width:100vw;height:100vh;max-height:-webkit-fill-available;touch-action:none}.v-mask .image-viewer-slides{height:100%;position:relative;z-index:1;cursor:grab;touch-action:none}.v-mask .image-viewer-indicator{position:absolute;z-index:2;left:50%;top:12px;transform:translate(-50%);color:#e6e6e6;font-size:14px}.v-mask .viewer-image-close{position:absolute;right:6px}.v-mask .viewer-image-close svg{fill:#fff;background:rgba(0,0,0,.3);box-sizing:content-box;height:24px;padding:12px;width:24px}.v-mask .image-viewer-slides-inner{height:100%;white-space:nowrap}.v-mask .image-viewer-image-wrapper{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.v-mask .image-viewer-image-wrapper img{display:block;max-width:100%;max-height:100%}.v-mask .viewer-image-arrow{position:absolute;top:calc(50% - 10px);z-index:999}.v-mask .viewer-image-arrow svg{fill:#fff;background:rgba(0,0,0,.3);box-sizing:content-box;height:24px;padding:18px;width:24px}.v-mask .viewer-prev{left:0}.v-mask .viewer-next{right:0}.v-mask .image-viewer-loading{display:flex;justify-content:center;align-items:center;position:fixed;left:0;top:0;width:100%;height:100%;background-color:#0000009d;z-index:998}.v-mask .image-viewer-loading .image-viewer-loading-reactor{animation:PhotoView__delayShow .4s linear both}.v-mask .image-viewer-loading .image-viewer-loading-reactor svg{animation:PhotoView__rotate .6s linear infinite}@keyframes PhotoView__rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes PhotoView__delayShow{0%,50%{opacity:0}to{opacity:1}}\n")();
1672
+ var index$m = "";
1626
1673
  const classPrefix$1 = "image-viewer";
1627
1674
  class ImageViewer extends Component {
1628
1675
  constructor(props) {
@@ -1819,24 +1866,56 @@ class ImageUploader extends Component {
1819
1866
  };
1820
1867
  });
1821
1868
  __publicField(this, "handlerUpload", (params) => {
1822
- const { beforeUpload, onBeforeUpload } = this.props;
1823
- window.WindVane.call("WVCamera", "takePhoto", params, function(e) {
1824
- const plugin = {
1869
+ const { beforeUpload, onBeforeUpload, compressSize = 200 } = this.props;
1870
+ window.WindVane.call("WindvanePlugin", "invoke", JSON.stringify({ domain: "camera", method: "getVersion" }), function(res) {
1871
+ var _a;
1872
+ if (((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.version) === "1.1.2-beta.7") {
1873
+ newFn();
1874
+ } else {
1875
+ old();
1876
+ }
1877
+ }, function(err) {
1878
+ oldFn();
1879
+ });
1880
+ function newFn() {
1881
+ var params2 = {
1825
1882
  domain: "camera",
1826
- method: "getBase64",
1827
- params: {
1828
- filePath: e.localPath
1829
- }
1883
+ method: "takePhoto",
1884
+ params: { compressSize }
1830
1885
  };
1831
- window.WindVane.call("WindvanePlugin", "invoke", JSON.stringify(plugin), function(res) {
1832
- beforeUpload && beforeUpload(res.data);
1833
- onBeforeUpload && onBeforeUpload(res.data);
1886
+ window.WindVane.call(
1887
+ "WindvanePlugin",
1888
+ "invoke",
1889
+ JSON.stringify(params2),
1890
+ function(e) {
1891
+ const base64 = e.data.imageBase64;
1892
+ beforeUpload && beforeUpload({ base64 });
1893
+ onBeforeUpload && onBeforeUpload({ base64 });
1894
+ },
1895
+ (err) => {
1896
+ console.log("takePhoto failure: " + JSON.stringify(err));
1897
+ }
1898
+ );
1899
+ }
1900
+ function oldFn() {
1901
+ window.WindVane.call("WVCamera", "takePhoto", params, function(e) {
1902
+ const plugin = {
1903
+ domain: "camera",
1904
+ method: "getBase64",
1905
+ params: {
1906
+ filePath: e.localPath
1907
+ }
1908
+ };
1909
+ window.WindVane.call("WindvanePlugin", "invoke", JSON.stringify(plugin), function(res) {
1910
+ beforeUpload && beforeUpload(res.data);
1911
+ onBeforeUpload && onBeforeUpload(res.data);
1912
+ }, function(err) {
1913
+ console.log("failure " + JSON.stringify(err));
1914
+ });
1834
1915
  }, function(err) {
1835
- console.log("failure " + JSON.stringify(err));
1916
+ console.log("takePhoto failure: " + JSON.stringify(err));
1836
1917
  });
1837
- }, function(err) {
1838
- console.log("takePhoto failure: " + JSON.stringify(err));
1839
- });
1918
+ }
1840
1919
  });
1841
1920
  __publicField(this, "onDelete", (item, index2) => {
1842
1921
  const { onDelete } = this.props;
@@ -1918,9 +1997,9 @@ class ImageUploader extends Component {
1918
1997
  }));
1919
1998
  }
1920
1999
  }
1921
- var index$m = /* @__PURE__ */ (() => ".image-uploader-wrap{display:inline-flex;flex-wrap:wrap;margin-bottom:8px}.image-space-item{margin-right:8px;padding-bottom:8px}.image-space-item .image-uploader-cell{position:relative;width:80px;height:80px;border-radius:4px;overflow:hidden}.image-space-item .image-uploader-cell-image{width:80px;height:80px}.image-space-item .image-uploader-cell-delete{position:absolute;top:0;right:0;width:14px;height:14px;background-color:#000000b3;border-radius:0 0 0 12px;font-size:8px;color:#fff;cursor:pointer}.image-space-item .image-uploader-cell-delete .uploader-delete-icon{position:absolute;right:2px;top:2px;display:inline-block;object-fit:cover;width:8px;height:8px}.image-space-item .image-uploader-img{object-fit:cover;display:block;width:100%;height:100%}.image-space-item .image-uploader-upload-button-wrap{position:relative}.image-space-item .image-uploader-upload-button-wrap .image-uploader-upload-button{display:flex;justify-content:center;align-items:center;background-color:#a2a2a2;cursor:pointer}.image-space-item .image-uploader-upload-button-wrap .uploader-add-icon{display:inline-block;object-fit:cover;width:32px;height:32px}.image-uploader-loading{display:flex;justify-content:center;align-items:center;position:fixed;left:0;top:0;width:100%;height:100%;background-color:#0000009d}.image-uploader-loading .image-uploader-loading-reactor{animation:PhotoView__delayShow .4s linear both}.image-uploader-loading .image-uploader-loading-reactor svg{animation:PhotoView__rotate .6s linear infinite}@keyframes PhotoView__rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes PhotoView__delayShow{0%,50%{opacity:0}to{opacity:1}}\n")();
1922
- var index$l = /* @__PURE__ */ (() => "")();
1923
- var index$k = /* @__PURE__ */ (() => ".pda-step-card{display:flex;flex-direction:row}.pda-step-card .pda-step-indictor{display:flex;flex-direction:column;align-items:center;margin-right:16px}.pda-step-card .pda-step-indictor .pda-step-indictor-top{width:1px;background-color:#bec0c6;flex:1}.pda-step-card .pda-step-indictor .pda-step-indictor-top-hidden{background-color:#fff0}.pda-step-card .pda-step-indictor .pda-step-indictor-center{height:24px;width:24px;border-radius:12px;background-color:#bec0c6}.pda-step-card .pda-step-indictor .pda-step-indictor-center-active{background-color:#0091ea}.pda-step-card .pda-step-indictor .pda-step-indictor-bottom{flex:1;width:1px;background-color:#bec0c6}.pda-step-card .pda-step-indictor .pda-step-indictor-bottom-hidden{background-color:#fff0}.pda-step{border-radius:16px;padding:24px 16px;background-color:#fff;margin-bottom:16px}.pda-step p{margin:0}.pda-step .pda-step-title{font-size:60px;color:#0091ea}.pda-step .pda-step-list{margin-top:8px;color:#4a4a4a;font-size:32px;line-height:32px}.pda-step.pda-step-dark{background-color:#000}.pda-step.pda-step-dark .pda-step-title{color:#fff}.pda-step.pda-step-dark .pda-step-list{color:#bec0c6}\n")();
2000
+ var index$l = "";
2001
+ var index$k = "";
2002
+ var index$j = "";
1924
2003
  class PdaInfoCard$1 extends React.Component {
1925
2004
  constructor(props) {
1926
2005
  super(props);
@@ -1975,7 +2054,7 @@ class PdaInfoCard extends React.Component {
1975
2054
  }
1976
2055
  }
1977
2056
  __publicField(PdaInfoCard, "Step", PdaInfoCard$1);
1978
- var index$j = /* @__PURE__ */ (() => ".pda-finish-card-top{display:flex;flex-direction:column;align-items:center;color:#fff}.pda-finish-card-top .pda-finish-card-img{width:100%;margin:50px auto 0}.pda-finish-card-top .pda-finish-card-title{font-size:50px;line-height:50px;color:#fff;font-weight:500;margin-bottom:16px;text-align:center}.pda-finish-card-top .pda-finish-card-list{margin-top:12px;color:#999;font-size:32px;line-height:30px;text-align:center}\n")();
2057
+ var index$i = "";
1979
2058
  class PdaFinishCard extends React.Component {
1980
2059
  constructor(props) {
1981
2060
  super(props);
@@ -2029,7 +2108,7 @@ class PdaFinishCard extends React.Component {
2029
2108
  }
2030
2109
  PdaFinishCard.SUCCESS = `${window.PDA_IMAGE_PATH}O1CN01OL2UYg24792knbTtC_!!6000000007343-1-tps-506-415.gif`;
2031
2110
  PdaFinishCard.ERROR_SUCCESS = `${window.PDA_IMAGE_PATH}O1CN01p5Oc5t1VMFWtBomQc_!!6000000002638-1-tps-600-456.gif`;
2032
- var index$i = /* @__PURE__ */ (() => ".pda-distance-card{border-radius:16px;padding:36px 16px;background-color:#fff}.pda-distance-card p{margin:0;font-size:28px;color:#738399}.pda-distance-card .pda-distance-card-highlight{font-size:60px;line-height:64px;color:#0091ea}.pda-distance-card .pda-distance-indictor{margin-top:36px;display:flex}.pda-distance-card .pda-distance-card-progress{background-color:#ebecf2;height:34px;border-radius:6px;border:4px solid #D9D9D9;margin-top:8px;position:relative}.pda-distance-card .pda-distance-card-progress .pda-distance-card-progress-indictor{position:absolute;bottom:0;left:5px}.pda-distance-card .pda-distance-card-progress .pda-distance-card-progress-inside{background-color:#0091ea;height:26px;border-radius:6px 0 0 6px}.pda-distance-card .pda-distance-label{display:flex;justify-content:space-between}\n")();
2111
+ var index$h = "";
2033
2112
  class PdaDistanceCard extends React.Component {
2034
2113
  constructor(props) {
2035
2114
  super(props);
@@ -2070,7 +2149,7 @@ class PdaDistanceCard extends React.Component {
2070
2149
  }, /* @__PURE__ */ React.createElement("p", null, "\u8FDC"), /* @__PURE__ */ React.createElement("p", null, "\u8FD1")));
2071
2150
  }
2072
2151
  }
2073
- var index$h = /* @__PURE__ */ (() => ".android-sub-card{background:#282828;border-radius:16px;padding:10px;color:#fff}.android-sub-card .android-sub-card-title-section{display:flex;justify-content:space-between}.android-sub-card .android-sub-card-title-section .android-sub-card-title{opacity:.6;font-size:21.312px}.android-sub-card .android-sub-card-title-section .android-sub-card-tag{margin-bottom:0}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div{padding:6px 10px;border-radius:4px;background-color:#0091ea;color:#fff;font-size:15.984px;line-height:15.984px}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div.success{background-color:#0f0}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div.warning{background-color:#fc0;color:#000}.android-sub-card .android-sub-card-title-section .android-sub-card-tag>div.error{background-color:red}.android-sub-card .android-sub-card-context{font-size:60px;line-height:60px;font-weight:700;word-break:break-all;word-wrap:break-word;margin-top:16px}.android-sub-card .android-sub-card-name{font-size:40px;line-height:40px;font-weight:700;margin-top:16px;margin-bottom:12px}.android-sub-card .android-sub-card-attrs{font-size:32px;line-height:32px;color:#999}.android-sub-card .android-sub-card-attrs>div{margin-top:12px}\n")();
2152
+ var index$g = "";
2074
2153
  function SubCard(props) {
2075
2154
  const { title, context, name, tag, attrs = [], style } = props;
2076
2155
  return /* @__PURE__ */ React.createElement("div", {
@@ -2096,7 +2175,7 @@ function SubCard(props) {
2096
2175
  }, text);
2097
2176
  })));
2098
2177
  }
2099
- var index$g = /* @__PURE__ */ (() => ".select-card{padding-top:12px}.select-card p{color:#999;font-size:32px;line-height:40px;margin-bottom:12px;padding-left:16px}.select-card .select-card-content{background-color:#282828;padding:24px 24px 24px 16px;border-radius:16px;display:flex;flex-direction:row;justify-content:space-between;color:#fff;font-size:40px;line-height:40px}.select-card .select-icon{background-image:var(--pda-image-8);background-size:100%;background-repeat:no-repeat;background-position:center;width:20px}\n")();
2178
+ var index$f = "";
2100
2179
  function SelectCard(props) {
2101
2180
  const { title, label, select = true, onClick = (e) => {
2102
2181
  } } = props;
@@ -2109,10 +2188,10 @@ function SelectCard(props) {
2109
2188
  className: "select-icon"
2110
2189
  }) : null, " "));
2111
2190
  }
2112
- var index$f = /* @__PURE__ */ (() => ".pda-app-list .pda-app-group{margin:25px}.pda-app-list .pda-app-group .group-name{line-height:1em;margin:0;font-size:32px;color:#fff;font-weight:400;opacity:.6}.pda-app-list .pda-app-group .group-apps{display:flex;flex-wrap:wrap;justify-content:space-between;margin-top:25px}.pda-app-list .pda-app-group .group-apps .app-item{display:flex;flex-direction:column;justify-content:center;align-items:center;background-image:linear-gradient(138deg,#0091EA 0%,#095FFF 100%);border-radius:12px;font-size:32px;color:#fff;min-height:126px;flex:1;min-width:48%;max-width:48%;margin-bottom:25px;cursor:pointer}.pda-app-list .pda-app-group .group-apps .app-item:hover,.pda-app-list .pda-app-group .group-apps .app-item:active,.pda-app-list .pda-app-group .group-apps .app-item:focus{background-image:linear-gradient(45deg,#0091EA 0%,#095FFF 100%);box-shadow:0 0 1px 2px #fff}.pda-app-list .pda-app-group .group-apps .app-item .app-name{text-align:center}.pda-app-list .pda-app-group .group-apps .app-item .app-subname{font-size:50%}\n")();
2191
+ var index$e = "";
2113
2192
  function empty() {
2114
2193
  }
2115
- function index$e(props) {
2194
+ function index$d(props) {
2116
2195
  const { dataSource = [], onClickItem = empty } = props;
2117
2196
  let tabIndex = 1;
2118
2197
  return /* @__PURE__ */ React.createElement("div", {
@@ -2140,7 +2219,7 @@ function index$e(props) {
2140
2219
  })));
2141
2220
  }));
2142
2221
  }
2143
- var index$d = /* @__PURE__ */ (() => ".pda-infinite-scroll{margin-top:10px}.pda-infinite-scroll span{color:#999}.pda-infinite-scroll .pda-infinite-scroll-view{display:flex;align-items:center;justify-content:center}\n")();
2222
+ var index$c = "";
2144
2223
  function usePersistFn(fn) {
2145
2224
  var fnRef = useRef(fn);
2146
2225
  fnRef.current = fn;
@@ -2458,7 +2537,7 @@ function InfiniteScroll(props) {
2458
2537
  className: "pda-infinite-scroll-view"
2459
2538
  }, /* @__PURE__ */ React.createElement("span", null, "\u6CA1\u6709\u66F4\u591A\u4E86~")));
2460
2539
  }
2461
- var index$c = /* @__PURE__ */ (() => ".action-sheet{position:fixed;z-index:1000;width:100%;height:100%;background-color:#00000059;top:0;left:0;display:none}.action-sheet .action-sheet-container{position:absolute;background-color:#fff;z-index:1010;width:100%;bottom:0;left:0;max-height:80%;border-radius:9.9px 9.9px 0 0;padding-bottom:10.56px;display:flex;flex-direction:column}.action-sheet .action-sheet-container .action-sheet-body{flex:1;overflow-y:auto}.action-sheet .action-sheet-container .action-sheet-sticky-bottom{border-top:2px solid #F2F2F2}.action-sheet .action-sheet-container .action-sheet-item{margin:10.56px 15.84px 0;background-color:#f3f4f8;height:54px;display:flex;align-items:center;justify-content:center;font-size:24px;border-radius:9.9px}.action-sheet .action-sheet-container .action-sheet-sticky-bottom-row{display:flex}.action-sheet.show{display:block}.action-sheet.show .action-sheet-container{animation:slide-in .3s ease-out}@keyframes slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}\n")();
2540
+ var index$b = "";
2462
2541
  function ActionSheet(props) {
2463
2542
  const {
2464
2543
  className = "",
@@ -2506,14 +2585,14 @@ function ActionSheet(props) {
2506
2585
  }, item.title);
2507
2586
  })) : null));
2508
2587
  }
2509
- var index$b = /* @__PURE__ */ (() => ".pda-tag{display:inline-block;padding:6px 10px;border-radius:4px;background-color:#0091ea;margin-bottom:12px;margin-right:12px;font-size:24px;line-height:24px;word-break:keep-all}.pda-tag.pda-tag-success{background-color:#0f0}.pda-tag.pda-tag-warning{background-color:#fc0}.pda-tag.pda-tag-error{background-color:red}\n")();
2588
+ var index$a = "";
2510
2589
  function Tag(props) {
2511
2590
  const { className = void 0, label = "label", type = "success" } = props;
2512
2591
  return /* @__PURE__ */ React.createElement("div", {
2513
2592
  className: classNames({ [className]: true, "pda-tag": true, ["pda-tag-" + type]: true })
2514
2593
  }, label);
2515
2594
  }
2516
- var index$a = /* @__PURE__ */ (() => ".simple-card{display:inline-block;padding:12px 0 12px 18px;border-radius:12px}.simple-card .simple-card-title{font-weight:700;font-size:56px;line-height:40px;margin-top:12px}.simple-card .simple-card-content{font-size:28px;line-height:40px;margin-top:12px}.simple-card.simple-card-default{background-color:#f3f4f9}.simple-card.simple-card-default .simple-card-title{color:#0091ea}.simple-card.simple-card-default .simple-card-content{color:#000}.simple-card.simple-card-error{background-color:red}.simple-card.simple-card-error .simple-card-title{color:#fff}.simple-card.simple-card-error .simple-card-content{color:#ffafb1}.simple-card.simple-card-dark{background-color:#282828}.simple-card.simple-card-dark .simple-card-title{color:#fff}.simple-card.simple-card-dark .simple-card-content{color:#999}\n")();
2595
+ var index$9 = "";
2517
2596
  function SimpleCard(props) {
2518
2597
  const { className = "", title = "", content = "", type = "default", onClick = () => {
2519
2598
  } } = props;
@@ -2526,7 +2605,7 @@ function SimpleCard(props) {
2526
2605
  className: "simple-card-content"
2527
2606
  }, content)) : null;
2528
2607
  }
2529
- var index$9 = /* @__PURE__ */ (() => ".simple-card-block{background-color:#fff;padding:24px 12px;border-radius:12px}.simple-card-block .simple-card-block-header{display:flex;justify-content:space-between}.simple-card-block .simple-card-block-title{color:#666;font-size:32px;line-height:32px}.simple-card-block .simple-card-block-content{display:flex;flex-wrap:wrap}.simple-card-block .simple-card-block-content>div{min-width:190px;margin-right:12px;margin-top:12px}\n")();
2608
+ var index$8 = "";
2530
2609
  function SimpleCardBlock(props) {
2531
2610
  const { className = void 0, dataSource = [], title = "", tag } = props;
2532
2611
  return /* @__PURE__ */ React.createElement("div", {
@@ -2548,8 +2627,8 @@ function SimpleCardBlock(props) {
2548
2627
  });
2549
2628
  })) : null);
2550
2629
  }
2551
- var index$8 = /* @__PURE__ */ (() => ".lattice-mouth .lattice-mouth-row{display:flex}.lattice-mouth .lattice-mouth-row .lattice-mouth-item{--font-size: 14px;--color: #ffffff;--background-color: #BFBFBF;color:var(--color);background-color:var(--background-color);font-size:var(--font-size);flex:1;flex-direction:column;display:flex;margin:1%;border-radius:4px;overflow:hidden}.lattice-mouth .lattice-mouth-row .lattice-mouth-item.highlight{--color: #ffffff;--background-color: #008FED}.lattice-mouth .lattice-mouth-row .lattice-mouth-item.active{--color: #ffffff;--background-color: #282828}.lattice-mouth .lattice-mouth-row .lattice-mouth-item.default{--color: #ffffff;--background-color: #BFBFBF}.lattice-mouth .lattice-mouth-row .lattice-mouth-item.complete{--color: #000000;--background-color: #00FF00}.lattice-mouth .lattice-mouth-row .lattice-mouth-item.error{--color: #ffffff;--background-color: #f30f30}.lattice-mouth .lattice-mouth-row .lattice-mouth-item .lattice-mouth-value{text-align:center;flex:1;font-size:150%;min-height:2em;display:flex;justify-content:center;align-items:center}.lattice-mouth .lattice-mouth-row .lattice-mouth-item .lattice-mouth-label{background-color:#0000004d;text-align:center;min-height:1em}\n")();
2552
- function index$7(props) {
2630
+ var index$7 = "";
2631
+ function index$6(props) {
2553
2632
  const { row = 3, col = 3, dataSource = [] } = props;
2554
2633
  return /* @__PURE__ */ React.createElement("div", {
2555
2634
  className: "lattice-mouth"
@@ -2557,7 +2636,9 @@ function index$7(props) {
2557
2636
  return /* @__PURE__ */ React.createElement("div", {
2558
2637
  className: "lattice-mouth-row",
2559
2638
  key: rowIndex
2560
- }, Array.from(Array(col)).map((_2, colIndex) => renderItem(dataSource, rowIndex, colIndex, col)));
2639
+ }, Array.from(Array(col)).map(
2640
+ (_2, colIndex) => renderItem(dataSource, rowIndex, colIndex, col)
2641
+ ));
2561
2642
  }));
2562
2643
  }
2563
2644
  function renderItem(dataSource, rowIndex, colIndex, col) {
@@ -2566,7 +2647,7 @@ function renderItem(dataSource, rowIndex, colIndex, col) {
2566
2647
  value,
2567
2648
  label,
2568
2649
  style = {}
2569
- } = getDataSourceItem$1(dataSource, rowIndex, colIndex, col) || {};
2650
+ } = getDataSourceItem(dataSource, rowIndex, colIndex, col) || {};
2570
2651
  return /* @__PURE__ */ React.createElement("div", {
2571
2652
  className: `lattice-mouth-item ${color}`,
2572
2653
  style,
@@ -2577,10 +2658,10 @@ function renderItem(dataSource, rowIndex, colIndex, col) {
2577
2658
  className: "lattice-mouth-label"
2578
2659
  }, label));
2579
2660
  }
2580
- function getDataSourceItem$1(dataSource, rowIndex, colIndex, col) {
2661
+ function getDataSourceItem(dataSource, rowIndex, colIndex, col) {
2581
2662
  return dataSource[rowIndex * col + colIndex];
2582
2663
  }
2583
- var index$6 = /* @__PURE__ */ (() => ".android-op-card{--base-font-size: 20px;--background-color: #ffffff;--color: #282828;--main-color: #008fed;--border-radius: 6px;--progress-background-color: rgba(160, 160, 160, .5);--progress-foreground-color: #008fed;--tag-background-color: #008fed;--tag-color: #ffffff;background-color:var(--background-color);font-size:var(--base-font-size);color:var(--color);border-radius:var(--border-radius);padding:2%;position:relative}.android-op-card .card-h1{color:var(--color);opacity:.7;font-weight:700}.android-op-card .card-content{font-size:calc(var(--base-font-size) * 2.5);color:var(--main-color);font-weight:700;display:flex;align-items:baseline;line-height:1.1em;word-break:break-word}.android-op-card .card-content small{font-size:50%}.android-op-card .card-progress{background-color:var(--progress-background-color);border-radius:1em;overflow:hidden;height:1em;font-size:calc(var(--base-font-size) * .6);margin-bottom:1em}.android-op-card .card-progress .card-progress-bar{background-color:var(--progress-foreground-color);height:1em;opacity:1.5}.android-op-card .card-main-title{font-size:calc(var(--base-font-size) * 1.6);line-height:1.5em;margin-bottom:.2em}.android-op-card .card-info-list{color:var(--color);opacity:.6}.android-op-card .card-tags{display:flex;margin-top:.5em}.android-op-card .card-tags.top{position:absolute;top:4%;right:1%}.android-op-card .card-tags .card-tags-item{font-size:calc(var(--base-font-size) * .8);color:var(--tag-color);border-radius:.3em;background-color:var(--tag-background-color);padding:.2em .3em;margin-right:.5em}.android-op-card .actions{margin:10px -2% -2%;display:flex}.android-op-card .actions .btn{border-top:1px solid var(--color);opacity:.5;flex:1;display:flex;cursor:pointer;justify-content:center;align-items:center;line-height:2.5em;border-left:1px solid var(--color);color:var(--main-color)}.android-op-card .actions .btn:first-child{border-left:none}.android-op-card .actions .btn.warning{color:red}.android-op-card .actions .btn:hover,.android-op-card .actions .btn:active{opacity:1}\n")();
2664
+ var index$5 = "";
2584
2665
  const DARK_STYLE = {
2585
2666
  "--base-font-size": "20px",
2586
2667
  "--background-color": "#282828",
@@ -2659,32 +2740,37 @@ function SplitContent(props) {
2659
2740
  className: "card-content"
2660
2741
  }, content[0]);
2661
2742
  }
2662
- var index$5 = /* @__PURE__ */ (() => ".android-pda-picker{--base-font-size: 24px;--border-radius: 6px;position:relative;background-color:#282828;display:flex;align-items:center;padding:.5em;border-radius:var(--border-radius);font-size:var(--base-font-size)}.android-pda-picker .label{color:#fff}.android-pda-picker .text{color:#999;min-height:1em;display:flex;flex:1;justify-content:flex-end;margin-right:10px}.android-pda-picker .icon{display:block;background-image:var(--pda-image-8);background-size:100%;background-repeat:no-repeat;background-position:center;width:20px;height:20px}.android-pda-picker-overlay{--base-font-size: 24px;display:block;width:100%;background-color:#000}.android-pda-picker-overlay .title{display:flex;align-items:center;color:#000;border-top:1px solid #727272;border-bottom:1px solid #353535;font-size:var(--base-font-size);position:relative;z-index:1;padding:1em}.android-pda-picker-overlay .title .filter-input{font-size:var(--base-font-size);box-sizing:border-box;padding:.5em .5em .5em 2em;background-color:#282828;border:none;color:#fff;border-radius:6px;flex:1}.android-pda-picker-overlay .title .filter-input:focus{background-color:#7e7e7e;outline:1px solid #00ccff}.android-pda-picker-overlay .title .filter-input:focus~.search-icon{color:#fff}.android-pda-picker-overlay .title .filter-input:focus~.cancel{display:block}.android-pda-picker-overlay .title .cancel{display:none;padding:0 1em;color:#fff}.android-pda-picker-overlay .title .search-icon{position:absolute;color:#ababab;top:1.5em;left:1.5em}.android-pda-picker-overlay .android-pda-picker-list{font-size:var(--base-font-size);height:70vh;overflow-y:auto;padding:1em}\n")();
2663
- function index$4(props) {
2743
+ var index$4 = "";
2744
+ function index$3(props) {
2664
2745
  const {
2665
- label = "\u8BF7\u9009\u62E9",
2666
- dataSource = [],
2746
+ dataSource,
2667
2747
  value,
2668
2748
  defaultValue,
2669
2749
  placeholder = "\u8BF7\u9009\u62E9",
2670
- useDetail = true,
2671
2750
  onChange,
2672
2751
  localSearch = true
2673
2752
  } = props;
2674
2753
  const [display, setDisplay] = React.useState(false);
2675
- const [currentValue, setCurrentValue] = React.useState();
2676
2754
  const [filter, setFilter] = React.useState("");
2755
+ const isControlled = value !== void 0;
2756
+ const [selected, setSelected] = React.useState(() => {
2757
+ const currentValue = isControlled ? value : defaultValue;
2758
+ return dataSource.find((item) => item.value === currentValue) || {};
2759
+ });
2677
2760
  React.useEffect(() => {
2678
- setCurrentValue(getDataSourceItem(dataSource, value !== void 0 ? value : defaultValue));
2679
- }, [dataSource, value]);
2761
+ if (isControlled) {
2762
+ setSelected(dataSource.find((item) => item.value === value) || {});
2763
+ }
2764
+ }, [value]);
2765
+ const currentDataSource = dataSource.filter((item) => {
2766
+ return new RegExp(filter).test(item.label);
2767
+ });
2680
2768
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", {
2681
2769
  className: "android-pda-picker",
2682
2770
  onClick: () => setDisplay(true)
2683
2771
  }, /* @__PURE__ */ React.createElement("span", {
2684
- className: "label"
2685
- }, label), /* @__PURE__ */ React.createElement("span", {
2686
2772
  className: "text"
2687
- }, currentValue ? currentValue.label : placeholder), /* @__PURE__ */ React.createElement("span", {
2773
+ }, selected.label ? selected.label : placeholder), /* @__PURE__ */ React.createElement("span", {
2688
2774
  className: "icon"
2689
2775
  })), display ? /* @__PURE__ */ React.createElement(Overlay$1, {
2690
2776
  verticalPosition: "bottom",
@@ -2718,30 +2804,21 @@ function index$4(props) {
2718
2804
  className: "android-pda-picker-list"
2719
2805
  }, /* @__PURE__ */ React.createElement(List$1, {
2720
2806
  onClickItem: (item) => {
2721
- const newItem = getDataSourceItem(dataSource, item.value);
2722
- setFilter("");
2723
- setCurrentValue(newItem);
2724
- if (useDetail) {
2725
- onChange(newItem);
2726
- } else {
2727
- onChange(newItem.value);
2807
+ if (!isControlled) {
2808
+ setSelected(currentDataSource[item.index]);
2728
2809
  }
2810
+ setFilter("");
2811
+ onChange(currentDataSource[item.index]);
2729
2812
  setDisplay(false);
2730
2813
  },
2731
- dataSource: filterLabel(dataSource, filter).map((item) => {
2814
+ dataSource: currentDataSource.map((item, index2) => {
2732
2815
  return {
2733
- title: item.label,
2734
- value: item.value
2816
+ index: index2,
2817
+ title: item.label
2735
2818
  };
2736
2819
  })
2737
2820
  })))) : null);
2738
2821
  }
2739
- function filterLabel(dataSource, filter) {
2740
- return dataSource.filter((item) => new RegExp(filter).test(item.label));
2741
- }
2742
- function getDataSourceItem(dataSource, item) {
2743
- return dataSource.find((it) => it.value === item || it.value == (item == null ? void 0 : item.value));
2744
- }
2745
2822
  function SearchIcon() {
2746
2823
  return /* @__PURE__ */ React.createElement("svg", {
2747
2824
  className: "search-icon",
@@ -2770,7 +2847,7 @@ function SearchIcon() {
2770
2847
  fillRule: "nonzero"
2771
2848
  }))));
2772
2849
  }
2773
- function index$3(props) {
2850
+ function index$2(props) {
2774
2851
  const { visible, text = "LOADING..." } = props;
2775
2852
  if (!visible) {
2776
2853
  return null;
@@ -2790,7 +2867,7 @@ function index$3(props) {
2790
2867
  "p-id": "2179"
2791
2868
  })), /* @__PURE__ */ React.createElement("div", null, text)));
2792
2869
  }
2793
- var index$2 = /* @__PURE__ */ (() => ".android-op-input-item{--base-font-size: 25px;--color: #ffffff;--background-color: #545454;position:relative;background-color:var(--background-color);border-radius:6px}.android-op-input-item label{display:flex;align-items:center}.android-op-input-item .label-text{font-size:var(--base-font-size);color:var(--color);position:absolute;left:.5em}.android-op-input-item input{background-color:transparent;border:none;flex:1;font-size:calc(var(--base-font-size) * 1.2);padding:.5em;text-align:right;color:var(--color)}.android-op-input-item input:focus{outline:#ffffff}\n")();
2870
+ var index$1 = "";
2794
2871
  function getRightValue(value, max, min) {
2795
2872
  if (value !== "") {
2796
2873
  if (typeof min === "number") {
@@ -2804,7 +2881,7 @@ function getRightValue(value, max, min) {
2804
2881
  return value;
2805
2882
  }
2806
2883
  }
2807
- function index$1(props) {
2884
+ function index(props) {
2808
2885
  const {
2809
2886
  label = "",
2810
2887
  autoFocus = true,
@@ -2873,235 +2950,5 @@ function index$1(props) {
2873
2950
  }
2874
2951
  })));
2875
2952
  }
2876
- const Apply = Function.prototype.apply;
2877
- const privateMap = /* @__PURE__ */ new WeakMap();
2878
- function internal(obj) {
2879
- if (!privateMap.has(obj)) {
2880
- privateMap.set(obj, {});
2881
- }
2882
- return privateMap.get(obj);
2883
- }
2884
- class EventEmitter {
2885
- constructor(maxListeners = null, localConsole = console) {
2886
- const self = internal(this);
2887
- self._events = /* @__PURE__ */ new Set();
2888
- self._callbacks = {};
2889
- self._console = localConsole;
2890
- self._maxListeners = maxListeners === null ? null : parseInt(maxListeners, 10);
2891
- return this;
2892
- }
2893
- _addCallback(eventName, callback, context, weight) {
2894
- this._getCallbacks(eventName).push({
2895
- callback,
2896
- context,
2897
- weight
2898
- });
2899
- this._getCallbacks(eventName).sort((a, b) => a.weight > b.weight);
2900
- return this;
2901
- }
2902
- _getCallbacks(eventName) {
2903
- return internal(this)._callbacks[eventName];
2904
- }
2905
- _getCallbackIndex(eventName, callback) {
2906
- return this._has(eventName) ? this._getCallbacks(eventName).findIndex((element) => element.callback === callback) : null;
2907
- }
2908
- _achieveMaxListener(eventName) {
2909
- return internal(this)._maxListeners !== null && internal(this)._maxListeners <= this.listenersNumber(eventName);
2910
- }
2911
- _callbackIsExists(eventName, callback, context) {
2912
- const callbackInd = this._getCallbackIndex(eventName, callback);
2913
- const activeCallback = callbackInd !== -1 ? this._getCallbacks(eventName)[callbackInd] : void 0;
2914
- return callbackInd !== -1 && activeCallback && activeCallback.context === context;
2915
- }
2916
- _has(eventName) {
2917
- return internal(this)._events.has(eventName);
2918
- }
2919
- on(eventName, callback, context = null, weight = 1) {
2920
- const self = internal(this);
2921
- if (typeof callback !== "function") {
2922
- throw new TypeError(`${callback} is not a function`);
2923
- }
2924
- if (!this._has(eventName)) {
2925
- self._events.add(eventName);
2926
- self._callbacks[eventName] = [];
2927
- } else {
2928
- if (this._achieveMaxListener(eventName)) {
2929
- self._console.warn(`Max listeners (${self._maxListeners}) for event "${eventName}" is reached!`);
2930
- }
2931
- if (this._callbackIsExists(...arguments)) {
2932
- self._console.warn(`Event "${eventName}" already has the callback ${callback}.`);
2933
- }
2934
- }
2935
- this._addCallback(...arguments);
2936
- return this;
2937
- }
2938
- once(eventName, callback, context = null, weight = 1) {
2939
- const onceCallback = (...args) => {
2940
- this.off(eventName, onceCallback);
2941
- return Apply.call(callback, context, args);
2942
- };
2943
- return this.on(eventName, onceCallback, context, weight);
2944
- }
2945
- off(eventName, callback = null) {
2946
- const self = internal(this);
2947
- let callbackInd;
2948
- if (this._has(eventName)) {
2949
- if (callback === null) {
2950
- self._events.delete(eventName);
2951
- self._callbacks[eventName] = null;
2952
- } else {
2953
- callbackInd = this._getCallbackIndex(eventName, callback);
2954
- if (callbackInd !== -1) {
2955
- self._callbacks[eventName].splice(callbackInd, 1);
2956
- this.off(...arguments);
2957
- }
2958
- }
2959
- }
2960
- return this;
2961
- }
2962
- emit(eventName, ...args) {
2963
- if (this._has(eventName)) {
2964
- this._getCallbacks(eventName).forEach((element) => Apply.call(element.callback, element.context, args));
2965
- }
2966
- return this;
2967
- }
2968
- clear() {
2969
- const self = internal(this);
2970
- self._events.clear();
2971
- self._callbacks = {};
2972
- return this;
2973
- }
2974
- listenersNumber(eventName) {
2975
- return this._has(eventName) ? this._getCallbacks(eventName).length : null;
2976
- }
2977
- }
2978
- class JSONWatch extends EventEmitter {
2979
- constructor(data) {
2980
- super();
2981
- this.data = data || {};
2982
- }
2983
- on(a, b) {
2984
- if (a.indexOf(",") > -1) {
2985
- a.split(",").forEach((i) => {
2986
- super.on(i, b);
2987
- });
2988
- } else {
2989
- super.on(a, b);
2990
- }
2991
- }
2992
- off(a, b) {
2993
- if (a.indexOf(",") > -1) {
2994
- a.split(",").forEach((i) => {
2995
- super.off(i, b);
2996
- });
2997
- } else {
2998
- super.off(a, b);
2999
- }
3000
- }
3001
- get(path) {
3002
- return this.getVariable(path);
3003
- }
3004
- getVariable(path) {
3005
- if (typeof path !== "string") {
3006
- console.warn("Not string:", path);
3007
- return "";
3008
- }
3009
- if (path === "$ALL") {
3010
- return this.data;
3011
- }
3012
- if (path.indexOf(".") > -1) {
3013
- path = path.split(".");
3014
- let ret = this.data;
3015
- for (let i = 0; i < path.length; i++) {
3016
- ret = ret[path[i]];
3017
- if (ret === void 0 || ret === null) {
3018
- return;
3019
- }
3020
- }
3021
- return ret;
3022
- }
3023
- return this.data[path];
3024
- }
3025
- set(path, value) {
3026
- if (path.indexOf(".") > -1) {
3027
- const paths = path.split(".");
3028
- let ret = this.data;
3029
- for (let i = 0; i < paths.length - 1; i++) {
3030
- if (ret[paths[i]] === void 0) {
3031
- ret = ret[paths[i]] = {};
3032
- } else {
3033
- ret = ret[paths[i]];
3034
- }
3035
- }
3036
- ret[paths[paths.length - 1]] = value;
3037
- } else {
3038
- this.data[path] = value;
3039
- }
3040
- this.emit(path, value);
3041
- if (value && Object.keys(value).length) {
3042
- Object.keys(value).forEach((key) => {
3043
- this.emit(`${path}.${key}`, value[key]);
3044
- });
3045
- }
3046
- this.emit("$updated", [path, value]);
3047
- }
3048
- }
3049
- __publicField(JSONWatch, "getVariableByJSON", getVariableByJSON);
3050
- function getVariableByJSON(params, engine) {
3051
- if (typeof params === "string") {
3052
- if (/^\$.+/.test(params)) {
3053
- return engine.getVariable(params);
3054
- }
3055
- return params;
3056
- }
3057
- if (Array.isArray(params)) {
3058
- return params.map((i) => getVariableByJSON(i, engine));
3059
- }
3060
- if (Object.prototype.toString.call(params) === "[object Object]") {
3061
- const newParams = {};
3062
- for (const key in params) {
3063
- if (Object.prototype.hasOwnProperty.call(params, key)) {
3064
- newParams[key] = getVariableByJSON(params[key], engine);
3065
- }
3066
- }
3067
- return newParams;
3068
- }
3069
- return params;
3070
- }
3071
- class Filed extends JSONWatch {
3072
- constructor(defaultData, validate = {}) {
3073
- super(defaultData);
3074
- }
3075
- getProps(key) {
3076
- return {
3077
- value: this.get(key),
3078
- onChange: (value) => {
3079
- if (value && value.target && value.preventDefault) {
3080
- value = value.target.value;
3081
- }
3082
- this.set(key, value);
3083
- }
3084
- };
3085
- }
3086
- getValue(key) {
3087
- return this.get(key);
3088
- }
3089
- getValues() {
3090
- return this.data;
3091
- }
3092
- setValue(key, value) {
3093
- this.set(key, value);
3094
- }
3095
- }
3096
- function index(defaultData, validate) {
3097
- const [, forceUpdate] = React.useState({});
3098
- const [filed] = React.useState(() => {
3099
- return new Filed(defaultData, validate);
3100
- });
3101
- React.useEffect(() => {
3102
- filed.on("$updated", () => forceUpdate({}));
3103
- });
3104
- return filed;
3105
- }
3106
2953
  const ListItem = PdaListItem;
3107
- export { ActionSheet, index$e as AppList, BaseLayout, Button, List as Card, Confirm, PdaDistanceCard as DistanceCard, PdaFinishCard as FinishCard, index$B as Header, ImageUploader, ImageViewer, InfiniteScroll, PdaInfoCard$2 as InfoCard, index$1 as InputItem, Keyborard, index$7 as LatticeMouth, List$1 as List, ListItem, index$3 as Loading, Overlay$1 as Overlay, PDA_IMAGE_PATH, index$s as PageFlowSystemPages, index$4 as Picker, Presentation, SelectCard, SimpleCard, SimpleCardBlock, PdaInfoCard as Steps, SubCard, Tag, PdaListItem as TaskCard, PdaTitle as Title, Toast, WakeKeyborard, index as useFiled };
2954
+ export { ActionSheet, index$d as AppList, BaseLayout, Button, List as Card, Confirm, PdaDistanceCard as DistanceCard, PdaFinishCard as FinishCard, index$A as Header, ImageUploader, ImageViewer, InfiniteScroll, PdaInfoCard$2 as InfoCard, index as InputItem, Keyborard, index$6 as LatticeMouth, List$1 as List, ListItem, index$2 as Loading, Overlay$1 as Overlay, PDA_IMAGE_PATH, index$r as PageFlowSystemPages, index$3 as Picker, Presentation, SelectCard, SimpleCard, SimpleCardBlock, PdaInfoCard as Steps, SubCard, Tag, PdaListItem as TaskCard, PdaTitle as Title, Toast, WakeKeyborard };