@pisell/utils 3.0.4 → 3.0.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.
Files changed (160) hide show
  1. package/es/_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js +27 -0
  2. package/es/_virtual/_@oxc-project_runtime@0.122.0/helpers/defineProperty.js +12 -0
  3. package/es/_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js +25 -0
  4. package/es/_virtual/_@oxc-project_runtime@0.122.0/helpers/toPrimitive.js +14 -0
  5. package/es/_virtual/_@oxc-project_runtime@0.122.0/helpers/toPropertyKey.js +9 -0
  6. package/es/_virtual/_@oxc-project_runtime@0.122.0/helpers/typeof.js +11 -0
  7. package/es/arrayUtils.d.ts +76 -1
  8. package/es/arrayUtils.js +103 -24
  9. package/es/common/stateHelper.d.ts +22 -0
  10. package/es/common/stateHelper.js +23 -0
  11. package/es/common/types.d.ts +31 -0
  12. package/es/componentStorage.d.ts +38 -0
  13. package/es/componentStorage.js +106 -0
  14. package/es/constants/index.js +7 -9
  15. package/es/date.d.ts +6 -3
  16. package/es/date.js +36 -53
  17. package/es/document.d.ts +6 -3
  18. package/es/document.js +43 -67
  19. package/es/escPosPrinter/EscPosPrinter.js +353 -490
  20. package/es/escPosPrinter/index.d.ts +9 -9
  21. package/es/escPosPrinter/index.js +37 -52
  22. package/es/format.d.ts +29 -0
  23. package/es/format.js +90 -112
  24. package/es/image.d.ts +13 -10
  25. package/es/image.js +48 -60
  26. package/es/index.d.ts +39 -18
  27. package/es/index.js +40 -29
  28. package/es/jsBridge/index.d.ts +14 -106
  29. package/es/jsBridge/index.js +57 -40
  30. package/es/jsBridge/regDeviceApi.js +87 -126
  31. package/es/jsBridge/types.d.ts +129 -0
  32. package/es/locales.d.ts +11 -11
  33. package/es/locales.js +79 -69
  34. package/es/log.d.ts +11 -6
  35. package/es/log.js +37 -59
  36. package/es/miniRedux.d.ts +20 -13
  37. package/es/miniRedux.js +42 -71
  38. package/es/number-input/hooks/useNumberInputState.d.ts +29 -0
  39. package/es/number-input/hooks/useNumberInputState.js +72 -0
  40. package/es/number-input/types.d.ts +96 -0
  41. package/es/number-input/utils/formatter.d.ts +56 -0
  42. package/es/number-input/utils/formatter.js +56 -0
  43. package/es/number-input/utils/validation.d.ts +32 -0
  44. package/es/number-input/utils/validation.js +52 -0
  45. package/es/otherUtils.d.ts +12 -9
  46. package/es/otherUtils.js +71 -120
  47. package/es/platform.d.ts +12 -9
  48. package/es/platform.js +61 -85
  49. package/es/select/hooks/useDebouncedSearch.d.ts +23 -0
  50. package/es/select/hooks/useDebouncedSearch.js +41 -0
  51. package/es/select/hooks/useSelectState.d.ts +19 -0
  52. package/es/select/hooks/useSelectState.js +60 -0
  53. package/es/select/index.d.ts +7 -0
  54. package/es/select/types.d.ts +256 -0
  55. package/es/select/utils/filterOptions.d.ts +23 -0
  56. package/es/select/utils/filterOptions.js +29 -0
  57. package/es/select/utils/helpers.d.ts +43 -0
  58. package/es/select/utils/helpers.js +51 -0
  59. package/es/select/utils/index.d.ts +4 -0
  60. package/es/select/utils/sortOptions.d.ts +13 -0
  61. package/es/select/utils/sortOptions.js +20 -0
  62. package/es/select/utils/tagAggregation.d.ts +25 -0
  63. package/es/select/utils/tagAggregation.js +35 -0
  64. package/es/text-input/hooks/useTextInputState.d.ts +28 -0
  65. package/es/text-input/hooks/useTextInputState.js +70 -0
  66. package/es/text-input/types.d.ts +56 -0
  67. package/es/text-input/utils/validation.d.ts +28 -0
  68. package/es/text-input/utils/validation.js +51 -0
  69. package/es/typeUtils.d.ts +11 -8
  70. package/es/typeUtils.js +61 -84
  71. package/es/walletValidity.d.ts +57 -0
  72. package/es/walletValidity.js +404 -460
  73. package/es/weighing.d.ts +65 -0
  74. package/es/weighing.js +96 -0
  75. package/lib/_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js +27 -0
  76. package/lib/_virtual/_@oxc-project_runtime@0.122.0/helpers/defineProperty.js +12 -0
  77. package/lib/_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js +25 -0
  78. package/lib/_virtual/_@oxc-project_runtime@0.122.0/helpers/toPrimitive.js +14 -0
  79. package/lib/_virtual/_@oxc-project_runtime@0.122.0/helpers/toPropertyKey.js +9 -0
  80. package/lib/_virtual/_@oxc-project_runtime@0.122.0/helpers/typeof.js +16 -0
  81. package/lib/_virtual/_rolldown/runtime.js +23 -0
  82. package/lib/arrayUtils.d.ts +76 -1
  83. package/lib/arrayUtils.js +102 -37
  84. package/lib/common/stateHelper.d.ts +22 -0
  85. package/lib/common/stateHelper.js +23 -0
  86. package/lib/common/types.d.ts +31 -0
  87. package/lib/componentStorage.d.ts +38 -0
  88. package/lib/componentStorage.js +114 -0
  89. package/lib/constants/index.js +7 -36
  90. package/lib/date.d.ts +6 -3
  91. package/lib/date.js +43 -65
  92. package/lib/document.d.ts +6 -3
  93. package/lib/document.js +46 -62
  94. package/lib/escPosPrinter/EscPosPrinter.js +327 -403
  95. package/lib/escPosPrinter/index.d.ts +9 -9
  96. package/lib/escPosPrinter/index.js +38 -84
  97. package/lib/format.d.ts +29 -0
  98. package/lib/format.js +91 -93
  99. package/lib/image.d.ts +13 -10
  100. package/lib/image.js +48 -74
  101. package/lib/index.d.ts +39 -18
  102. package/lib/index.js +137 -68
  103. package/lib/jsBridge/index.d.ts +14 -106
  104. package/lib/jsBridge/index.js +60 -60
  105. package/lib/jsBridge/regDeviceApi.js +86 -133
  106. package/lib/jsBridge/types.d.ts +129 -0
  107. package/lib/locales.d.ts +11 -11
  108. package/lib/locales.js +79 -63
  109. package/lib/log.d.ts +11 -6
  110. package/lib/log.js +37 -61
  111. package/lib/miniRedux.d.ts +20 -13
  112. package/lib/miniRedux.js +43 -91
  113. package/lib/number-input/hooks/useNumberInputState.d.ts +29 -0
  114. package/lib/number-input/hooks/useNumberInputState.js +73 -0
  115. package/lib/number-input/types.d.ts +96 -0
  116. package/lib/number-input/utils/formatter.d.ts +56 -0
  117. package/lib/number-input/utils/formatter.js +58 -0
  118. package/lib/number-input/utils/validation.d.ts +32 -0
  119. package/lib/number-input/utils/validation.js +52 -0
  120. package/lib/otherUtils.d.ts +12 -9
  121. package/lib/otherUtils.js +86 -91
  122. package/lib/platform.d.ts +12 -9
  123. package/lib/platform.js +68 -123
  124. package/lib/select/hooks/useDebouncedSearch.d.ts +23 -0
  125. package/lib/select/hooks/useDebouncedSearch.js +42 -0
  126. package/lib/select/hooks/useSelectState.d.ts +19 -0
  127. package/lib/select/hooks/useSelectState.js +62 -0
  128. package/lib/select/index.d.ts +7 -0
  129. package/lib/select/types.d.ts +256 -0
  130. package/lib/select/utils/filterOptions.d.ts +23 -0
  131. package/lib/select/utils/filterOptions.js +30 -0
  132. package/lib/select/utils/helpers.d.ts +43 -0
  133. package/lib/select/utils/helpers.js +55 -0
  134. package/lib/select/utils/index.d.ts +4 -0
  135. package/lib/select/utils/sortOptions.d.ts +13 -0
  136. package/lib/select/utils/sortOptions.js +20 -0
  137. package/lib/select/utils/tagAggregation.d.ts +25 -0
  138. package/lib/select/utils/tagAggregation.js +35 -0
  139. package/lib/text-input/hooks/useTextInputState.d.ts +28 -0
  140. package/lib/text-input/hooks/useTextInputState.js +71 -0
  141. package/lib/text-input/types.d.ts +56 -0
  142. package/lib/text-input/utils/validation.d.ts +28 -0
  143. package/lib/text-input/utils/validation.js +51 -0
  144. package/lib/typeUtils.d.ts +11 -8
  145. package/lib/typeUtils.js +68 -73
  146. package/lib/walletValidity.d.ts +57 -0
  147. package/lib/walletValidity.js +420 -323
  148. package/lib/weighing.d.ts +65 -0
  149. package/lib/weighing.js +114 -0
  150. package/package.json +1 -1
  151. package/es/constants/index.d.ts +0 -7
  152. package/es/firebase/config/index.d.ts +0 -13
  153. package/es/firebase/config/index.js +0 -54
  154. package/es/firebase/index.d.ts +0 -28
  155. package/es/firebase/index.js +0 -232
  156. package/lib/constants/index.d.ts +0 -7
  157. package/lib/firebase/config/index.d.ts +0 -13
  158. package/lib/firebase/config/index.js +0 -79
  159. package/lib/firebase/index.d.ts +0 -28
  160. package/lib/firebase/index.js +0 -180
@@ -1,9 +1,9 @@
1
- export declare const EscPosPrinter = any;
2
- export declare const ALIGN_LEFT = number;
3
- export declare const ALIGN_CENTER = number;
4
- export declare const ALIGN_RIGHT = number;
5
- export declare const columnWidthWithAlignment = (
6
- width: number,
7
- alignment: number
8
- ) => any;
9
- export declare const preparing = any;
1
+ //#region src/escPosPrinter/index.d.ts
2
+ declare const EscPosPrinter = any;
3
+ declare const ALIGN_LEFT = number;
4
+ declare const ALIGN_CENTER = number;
5
+ declare const ALIGN_RIGHT = number;
6
+ declare const columnWidthWithAlignment = (width: number, alignment: number) => any;
7
+ declare const preparing = any;
8
+ //#endregion
9
+ export { ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, EscPosPrinter, columnWidthWithAlignment, preparing };
@@ -1,54 +1,39 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- import EscPosPrinter, { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, columnWidthWithAlignment } from "./EscPosPrinter";
6
- var dividing = function dividing(printer) {
7
- printer.setAlignment(ALIGN_LEFT);
8
- printer.appendText("------------------------------------------------\n");
1
+ import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
2
+ import EscPosPrinter, { columnWidthWithAlignment } from "./EscPosPrinter.js";
3
+ //#region src/escPosPrinter/index.js
4
+ const dividing = (printer) => {
5
+ printer.setAlignment(0);
6
+ printer.appendText("------------------------------------------------\n");
9
7
  };
10
- var preparing = /*#__PURE__*/function () {
11
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ip, sn, params) {
12
- var printer, title, result;
13
- return _regeneratorRuntime().wrap(function _callee$(_context) {
14
- while (1) switch (_context.prev = _context.next) {
15
- case 0:
16
- printer = new EscPosPrinter(576);
17
- title = params.title;
18
- printer.clear();
19
- printer.lineFeed(1);
20
- printer.setPrintModes(false, false, false);
21
- printer.setAlignment(ALIGN_CENTER);
22
- printer.appendText("打印测试\n");
23
- dividing(printer);
24
- printer.setAlignment(ALIGN_LEFT);
25
- printer.appendText("Order time: 2023-10-19 14:15:50\n");
26
- printer.appendText("Order number\n");
27
- printer.appendText("D3012");
28
- dividing(printer);
29
- printer.setColumnWidths(columnWidthWithAlignment(150, ALIGN_LEFT), columnWidthWithAlignment(426, ALIGN_LEFT));
30
- printer.printInColumns("Number", "Name");
31
- printer.setPrintModes(true, true, true);
32
- printer.printInColumns("1 x", "我是很长的商品名称我是很长的商品名称我是很长的商品名称我是很长的商品名称");
33
- printer.setPrintModes(false, false, false);
34
- dividing(printer);
35
- printer.lineFeed(4);
36
- printer.cutPaper(false);
37
- // Print and exit page mode
38
- printer.printAndExitPageMode();
39
- _context.next = 24;
40
- return printer.print(ip, sn, 1);
41
- case 24:
42
- result = _context.sent;
43
- return _context.abrupt("return", result);
44
- case 26:
45
- case "end":
46
- return _context.stop();
47
- }
48
- }, _callee);
49
- }));
50
- return function preparing(_x, _x2, _x3) {
51
- return _ref.apply(this, arguments);
52
- };
8
+ const preparing = function() {
9
+ var _ref = _asyncToGenerator(function* (ip, sn, params) {
10
+ const printer = new EscPosPrinter(576);
11
+ const { title } = params;
12
+ printer.clear();
13
+ printer.lineFeed(1);
14
+ printer.setPrintModes(false, false, false);
15
+ printer.setAlignment(1);
16
+ printer.appendText("打印测试\n");
17
+ dividing(printer);
18
+ printer.setAlignment(0);
19
+ printer.appendText("Order time: 2023-10-19 14:15:50\n");
20
+ printer.appendText("Order number\n");
21
+ printer.appendText("D3012");
22
+ dividing(printer);
23
+ printer.setColumnWidths(columnWidthWithAlignment(150, 0), columnWidthWithAlignment(426, 0));
24
+ printer.printInColumns("Number", "Name");
25
+ printer.setPrintModes(true, true, true);
26
+ printer.printInColumns("1 x", "我是很长的商品名称我是很长的商品名称我是很长的商品名称我是很长的商品名称");
27
+ printer.setPrintModes(false, false, false);
28
+ dividing(printer);
29
+ printer.lineFeed(4);
30
+ printer.cutPaper(false);
31
+ printer.printAndExitPageMode();
32
+ return yield printer.print(ip, sn, 1);
33
+ });
34
+ return function preparing(_x, _x2, _x3) {
35
+ return _ref.apply(this, arguments);
36
+ };
53
37
  }();
54
- export { EscPosPrinter, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT, columnWidthWithAlignment, preparing };
38
+ //#endregion
39
+ export { preparing };
package/es/format.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ //#region src/format.d.ts
2
+ /**
3
+ * @title: 格式化金额
4
+ * @description:
5
+ * @param {number} amount 原金额
6
+ * @param {number} precision 小数位数
7
+ * @param {string} symbol 货币符号
8
+ * @return {*}
9
+ * @Author: zhiwei.Wang
10
+ * @Date: 2023-11-06 16:51
11
+ */
12
+ declare const formatAmount: (amount?: number | string, precision?: number, symbol?: string) => string | number;
13
+ type FormatOptions = {
14
+ /** 小数点后位数 默认是小数点后2位 */precision?: number; /** 显示货币符号 指的是 ¥$ 等货币符号等显隐,默认是展示 */
15
+ showCurrencySymbol?: boolean; /** 千分位 指的是长金额的千分位逗号隔开,比如“123, 245, 315” 这种展现形式,默认是关闭 */
16
+ useThousandsSeparator?: boolean; /** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
17
+ hideDecimalForWholeNumbers?: boolean; /** 货币代码或虚拟币单位后缀 */
18
+ currencyCode?: string; /** 货币展示格式,支持预置值和金额模板 */
19
+ currencyFormat?: string;
20
+ };
21
+ /**
22
+ * 根据配置格式化金额
23
+ * @param amount
24
+ * @param symbol
25
+ * @param options
26
+ */
27
+ declare const formatAmountWithOptions: (amount?: number | string, symbol?: string, options?: FormatOptions) => string | number;
28
+ //#endregion
29
+ export { FormatOptions, formatAmount, formatAmountWithOptions };
package/es/format.js CHANGED
@@ -1,115 +1,93 @@
1
- import { isString, isNumber } from "./typeUtils";
2
-
1
+ import { isNumber, isString } from "./typeUtils.js";
2
+ //#region src/format.ts
3
3
  /**
4
- * @title: 格式化金额
5
- * @description:
6
- * @param {number} amount 原金额
7
- * @param {number} precision 小数位数
8
- * @param {string} symbol 货币符号
9
- * @return {*}
10
- * @Author: zhiwei.Wang
11
- * @Date: 2023-11-06 16:51
12
- */
13
- export var formatAmount = function formatAmount() {
14
- var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
15
- var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
16
- var symbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
17
- // 校验格式
18
- if (!isString(amount) && !isNumber(amount)) {
19
- console.error('amount is not a number');
20
- return amount;
21
- }
22
- try {
23
- // 四舍五入
24
- var roundedAmount = Math.round(amount * Math.pow(10, precision)) / Math.pow(10, precision);
25
- // 处理负数情况
26
- var absoluteAmount = Math.abs(roundedAmount);
27
- // 截取整数
28
- var integerPart = Math.floor(absoluteAmount);
29
- // 截取小数部分并补零
30
- var decimalPart = (absoluteAmount - integerPart).toFixed(precision).substring(2);
31
-
32
- // 拼接货币符号
33
- var formattedAmount = symbol + integerPart.toString();
34
-
35
- // 添加小数点
36
- if (precision > 0) {
37
- formattedAmount += '.' + decimalPart;
38
-
39
- // 如果小数位是 .00的话 抹去
40
- if (formattedAmount.indexOf('.00') !== -1) {
41
- formattedAmount = formattedAmount.substring(0, formattedAmount.length - 3);
42
- }
43
- }
44
-
45
- // 添加负号
46
- if (roundedAmount < 0) {
47
- formattedAmount = '-' + formattedAmount;
48
- }
49
- return formattedAmount;
50
- } catch (err) {
51
- // 计算错误则返回原金额
52
- console.error(err);
53
- return amount;
54
- }
4
+ * @title: 格式化金额
5
+ * @description:
6
+ * @param {number} amount 原金额
7
+ * @param {number} precision 小数位数
8
+ * @param {string} symbol 货币符号
9
+ * @return {*}
10
+ * @Author: zhiwei.Wang
11
+ * @Date: 2023-11-06 16:51
12
+ */
13
+ const formatAmount = (amount = 0, precision = 2, symbol = "") => {
14
+ if (!isString(amount) && !isNumber(amount)) {
15
+ console.error("amount is not a number");
16
+ return amount;
17
+ }
18
+ try {
19
+ const roundedAmount = Math.round(amount * Math.pow(10, precision)) / Math.pow(10, precision);
20
+ const absoluteAmount = Math.abs(roundedAmount);
21
+ const integerPart = Math.floor(absoluteAmount);
22
+ const decimalPart = (absoluteAmount - integerPart).toFixed(precision).substring(2);
23
+ let formattedAmount = symbol + integerPart.toString();
24
+ if (precision > 0) {
25
+ formattedAmount += "." + decimalPart;
26
+ if (formattedAmount.indexOf(".00") !== -1) formattedAmount = formattedAmount.substring(0, formattedAmount.length - 3);
27
+ }
28
+ if (roundedAmount < 0) formattedAmount = "-" + formattedAmount;
29
+ return formattedAmount;
30
+ } catch (err) {
31
+ console.error(err);
32
+ return amount;
33
+ }
34
+ };
35
+ const applyCurrencyFormat = (params) => {
36
+ const { amount, symbol, currencyCode, currencyFormat } = params;
37
+ const format = currencyFormat.trim();
38
+ if (format.includes("{{amount}}") || format.includes("{amount}")) return format.split("{{amount}}").join(amount).split("{{sym}}").join(symbol).split("{{unit}}").join(currencyCode).split("{{symbol}}").join(symbol).split("{{unit_label}}").join(currencyCode).split("{{currency_code}}").join(currencyCode).split("{amount}").join(amount).split("{sym}").join(symbol).split("{unit}").join(currencyCode).split("{symbol}").join(symbol).split("{unit_label}").join(currencyCode).split("{currency_code}").join(currencyCode).trim();
39
+ if (format === "symbol_last") {
40
+ if (symbol) return `${amount}${symbol}`;
41
+ if (currencyCode) return `${amount} ${currencyCode}`;
42
+ return amount;
43
+ }
44
+ if (symbol) return `${symbol}${amount}`;
45
+ return currencyCode ? `${amount} ${currencyCode}` : amount;
55
46
  };
56
47
  /**
57
- * 根据配置格式化金额
58
- * @param amount
59
- * @param symbol
60
- * @param options
61
- */
62
- export var formatAmountWithOptions = function formatAmountWithOptions() {
63
- var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
64
- var symbol = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
65
- var options = arguments.length > 2 ? arguments[2] : undefined;
66
- var _options$precision = options.precision,
67
- precision = _options$precision === void 0 ? 2 : _options$precision,
68
- _options$useThousands = options.useThousandsSeparator,
69
- useThousandsSeparator = _options$useThousands === void 0 ? false : _options$useThousands,
70
- _options$showCurrency = options.showCurrencySymbol,
71
- showCurrencySymbol = _options$showCurrency === void 0 ? true : _options$showCurrency,
72
- _options$hideDecimalF = options.hideDecimalForWholeNumbers,
73
- hideDecimalForWholeNumbers = _options$hideDecimalF === void 0 ? true : _options$hideDecimalF;
74
- // 校验格式
75
- if (!isString(amount) && !isNumber(amount)) {
76
- console.error('amount is not a number');
77
- return amount;
78
- }
79
- try {
80
- // 四舍五入
81
- var roundedAmount = Math.round(amount * Math.pow(10, precision)) / Math.pow(10, precision);
82
- // 处理负数情况
83
- var absoluteAmount = Math.abs(roundedAmount);
84
- // 截取整数
85
- var integerPart = Math.floor(absoluteAmount);
86
- // 截取小数部分并补零
87
- var decimalPart = (absoluteAmount - integerPart).toFixed(precision).substring(2);
88
-
89
- // 增加千分位分隔符
90
- var formattedAmount = useThousandsSeparator ? integerPart.toLocaleString() : integerPart.toString();
91
-
92
- // 拼接货币符号
93
- formattedAmount = showCurrencySymbol ? symbol + formattedAmount : formattedAmount;
94
-
95
- // 添加小数点
96
- if (precision > 0) {
97
- formattedAmount += '.' + decimalPart;
98
-
99
- // 如果小数位是 .00的话 抹去
100
- if (hideDecimalForWholeNumbers && formattedAmount.indexOf('.00') !== -1) {
101
- formattedAmount = formattedAmount.substring(0, formattedAmount.length - 3);
102
- }
103
- }
104
-
105
- // 添加负号
106
- if (roundedAmount < 0) {
107
- formattedAmount = '-' + formattedAmount;
108
- }
109
- return formattedAmount;
110
- } catch (err) {
111
- // 计算错误则返回原金额
112
- console.error(err);
113
- return amount;
114
- }
115
- };
48
+ * 根据配置格式化金额
49
+ * @param amount
50
+ * @param symbol
51
+ * @param options
52
+ */
53
+ const formatAmountWithOptions = (amount = 0, symbol = "", options = {}) => {
54
+ const { precision = 2, useThousandsSeparator = false, showCurrencySymbol = true, hideDecimalForWholeNumbers = true, currencyCode = "", currencyFormat = "" } = options;
55
+ if (!isString(amount) && !isNumber(amount)) {
56
+ console.error("amount is not a number");
57
+ return amount;
58
+ }
59
+ try {
60
+ const roundedAmount = Math.round(amount * Math.pow(10, precision)) / Math.pow(10, precision);
61
+ const absoluteAmount = Math.abs(roundedAmount);
62
+ const integerPart = Math.floor(absoluteAmount);
63
+ const decimalPart = (absoluteAmount - integerPart).toFixed(precision).substring(2);
64
+ if (!currencyCode && !currencyFormat) {
65
+ let legacyFormattedAmount = useThousandsSeparator ? integerPart.toLocaleString() : integerPart.toString();
66
+ legacyFormattedAmount = showCurrencySymbol ? symbol + legacyFormattedAmount : legacyFormattedAmount;
67
+ if (precision > 0) {
68
+ legacyFormattedAmount += "." + decimalPart;
69
+ if (hideDecimalForWholeNumbers && legacyFormattedAmount.indexOf(".00") !== -1) legacyFormattedAmount = legacyFormattedAmount.substring(0, legacyFormattedAmount.length - 3);
70
+ }
71
+ if (roundedAmount < 0) legacyFormattedAmount = "-" + legacyFormattedAmount;
72
+ return legacyFormattedAmount;
73
+ }
74
+ let formattedAmount = useThousandsSeparator ? integerPart.toLocaleString() : integerPart.toString();
75
+ if (precision > 0) {
76
+ formattedAmount += "." + decimalPart;
77
+ if (hideDecimalForWholeNumbers && Number(decimalPart) === 0) formattedAmount = formattedAmount.substring(0, formattedAmount.length - precision - 1);
78
+ }
79
+ if (showCurrencySymbol) formattedAmount = applyCurrencyFormat({
80
+ amount: formattedAmount,
81
+ symbol,
82
+ currencyCode,
83
+ currencyFormat
84
+ });
85
+ if (roundedAmount < 0) formattedAmount = "-" + formattedAmount;
86
+ return formattedAmount;
87
+ } catch (err) {
88
+ console.error(err);
89
+ return amount;
90
+ }
91
+ };
92
+ //#endregion
93
+ export { formatAmount, formatAmountWithOptions };
package/es/image.d.ts CHANGED
@@ -1,11 +1,14 @@
1
- export declare const image: {
2
- ali: (url: string, w: number) => string;
3
- getImageSize: (url: string) => {
4
- width: number;
5
- height: number;
6
- ratio: number;
7
- success: boolean;
8
- widthRatio: number;
9
- originRatio: number;
10
- };
1
+ //#region src/image.d.ts
2
+ declare const image: {
3
+ ali: (url: string, w: number) => string;
4
+ getImageSize: (url: string) => {
5
+ width: number;
6
+ height: number;
7
+ ratio: number;
8
+ success: boolean;
9
+ widthRatio: number;
10
+ originRatio: number;
11
+ };
11
12
  };
13
+ //#endregion
14
+ export { image };
package/es/image.js CHANGED
@@ -1,63 +1,51 @@
1
- var ali = function ali(url, w) {
2
- if (!url || /^\s+$/.test(url)) {
3
- return '';
4
- }
5
- // 如果图片链接中已经包含了过滤参数,则直接跳过
6
- if (/x-oss-process=/.test(url)) {
7
- return url;
8
- }
9
- var dpr = 2;
10
- w = w || 750;
11
- if (url.indexOf('?') > -1) {
12
- url += '&';
13
- } else {
14
- url += '?';
15
- }
16
- url += 'x-oss-process=image/resize,w_' + parseInt(w * dpr + '') + ',image/format,webp/interlace,1,image/quality,Q_60/sharpen,90';
17
- return url;
1
+ //#region src/image.ts
2
+ const ali = (url, w) => {
3
+ if (!url || /^\s+$/.test(url)) return "";
4
+ if (/x-oss-process=/.test(url)) return url;
5
+ let dpr = 2;
6
+ w = w || 750;
7
+ if (url.indexOf("?") > -1) url += "&";
8
+ else url += "?";
9
+ url += "x-oss-process=image/resize,w_" + parseInt(w * dpr + "") + ",image/format,webp/interlace,1,image/quality,Q_60/sharpen,90";
10
+ return url;
18
11
  };
19
-
20
12
  /**
21
- * @Title: 获取图片尺寸
22
- * @Describe: 通过 __ 进行分割
23
- * @Author: Wzw
24
- * @param {string} url
25
- */
26
-
27
- var getImageSize = function getImageSize(url) {
28
- var size = {
29
- width: 375,
30
- height: 375,
31
- ratio: 1,
32
- widthRatio: 1,
33
- success: false,
34
- originRatio: 1
35
- };
36
- if (typeof url !== 'string') return size;
37
- // https://file.mypisel.dev/boxlocal/image/9c4e5a0afdbefadc78e3eab27c9ca3202021_07_23_16_05_00_916_02868331878656287__2160_976__.jpeg
38
- // 根据 __ 分割url
39
- try {
40
- var arr = url.split('__');
41
- // 根据规则, 第二个下标为图片的宽高
42
- if (arr[1]) {
43
- // 分割宽高, 第一个值是宽 第二个值是高
44
- var sizeArr = arr[1].split('_');
45
- // 如果没取到则默认为375
46
- var _width = Number(sizeArr[0]) || 375;
47
- var _height = Number(sizeArr[1]) || 375;
48
- size.width = _width;
49
- size.height = _height;
50
- size.success = true;
51
- size.ratio = Number(_height / _width);
52
- size.widthRatio = Number((_width / _height).toFixed(2));
53
- size.originRatio = Number(_height / _width);
54
- }
55
- return size;
56
- } catch (err) {
57
- return size;
58
- }
13
+ * @Title: 获取图片尺寸
14
+ * @Describe: 通过 __ 进行分割
15
+ * @Author: Wzw
16
+ * @param {string} url
17
+ */
18
+ const getImageSize = (url) => {
19
+ let size = {
20
+ width: 375,
21
+ height: 375,
22
+ ratio: 1,
23
+ widthRatio: 1,
24
+ success: false,
25
+ originRatio: 1
26
+ };
27
+ if (typeof url !== "string") return size;
28
+ try {
29
+ let arr = url.split("__");
30
+ if (arr[1]) {
31
+ let sizeArr = arr[1].split("_");
32
+ let _width = Number(sizeArr[0]) || 375;
33
+ let _height = Number(sizeArr[1]) || 375;
34
+ size.width = _width;
35
+ size.height = _height;
36
+ size.success = true;
37
+ size.ratio = Number(_height / _width);
38
+ size.widthRatio = Number((_width / _height).toFixed(2));
39
+ size.originRatio = Number(_height / _width);
40
+ }
41
+ return size;
42
+ } catch (err) {
43
+ return size;
44
+ }
59
45
  };
60
- export var image = {
61
- ali: ali,
62
- getImageSize: getImageSize
63
- };
46
+ const image = {
47
+ ali,
48
+ getImageSize
49
+ };
50
+ //#endregion
51
+ export { image };
package/es/index.d.ts CHANGED
@@ -1,20 +1,41 @@
1
- export * from './otherUtils';
2
- export * from './typeUtils';
3
- export * from './document';
4
- export * from './date';
5
- export * from './platform';
6
- export * from './log';
7
- export * from './format';
8
- export * from './escPosPrinter';
9
- export * from './miniRedux';
10
- export * from './jsBridge';
11
- export * from './image';
12
- export * from './locales';
13
- export * from './arrayUtils';
14
- export * from './walletValidity';
15
- export declare const setPisellUtilsConfig: (config: {
16
- [key: string]: any;
1
+ import { changeArray, createArray, detectIncognito, generateUniqueIdByObj, getItemByArray, getUniqueId } from "./otherUtils.js";
2
+ import { isArr, isBoolean, isFunction, isJson, isNumber, isPlainObject, isString, isUndefined } from "./typeUtils.js";
3
+ import { ColumnSettingStorageItem, clearColumnSettingFromLocal, clearColumnVisibilityFromLocal, getColumnSettingFromLocal, getColumnVisibilityFromLocal, getComponentStorageKey, getRecordBoardColumnSettingFromLocal, getStorageKeySuffix, saveColumnSettingToLocal, saveColumnVisibilityToLocal } from "./componentStorage.js";
4
+ import { copyToClipboard, setTheme } from "./document.js";
5
+ import { excelDateToJSDate, formatDate, jsDateToExcelDate } from "./date.js";
6
+ import { checkEnv, isAndroid, isIOS, isIos, isIpad, isMobile, isSafari, isWx, isWxApp } from "./platform.js";
7
+ import { sendWarningLog } from "./log.js";
8
+ import { FormatOptions, formatAmount, formatAmountWithOptions } from "./format.js";
9
+ import { ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, EscPosPrinter, columnWidthWithAlignment, preparing } from "./escPosPrinter/index.js";
10
+ import { miniRedux } from "./miniRedux.js";
11
+ import { dataManager, webPayment, webPrint } from "./jsBridge/index.js";
12
+ import { image } from "./image.js";
13
+ import { locales } from "./locales.js";
14
+ import { GroupByOptions, GroupBySpec, GroupKey, GroupResult, getByPath, groupBy, uniqueByKey } from "./arrayUtils.js";
15
+ import { Locale, WalletPassValidity, getScheduleSummary, getWalletValidityRange } from "./walletValidity.js";
16
+ import { INVALID_SCALE_READING_STATUSES, MAX_RETAIL_SCALE_WEIGHT_KG, STANDARD_WEIGHT_UNIT, STANDARD_WEIGHT_UNIT_SYMBOL, ScaleReadingStatus, UNIT_PRICE_PRECISION, WEIGHT_PRECISION, WEIGHT_UNIT_GRAMS, WEIGHT_UNIT_NAMES, WEIGHT_UNIT_SYMBOLS, WeighingSnapshot, WeightUnit, WeightUnitName, WeightUnitSymbol, formatUnitPriceValue, formatWeightValue, getUsableScaleWeight, getWeightUnitGrams, getWeightUnitPriceConversionFactor, getWeightUnitSymbol, isInvalidScaleReadingStatus, isSupportedWeightUnit, normalizeWeightUnit, resolveWeighingSnapshot } from "./weighing.js";
17
+ import { DisplayState, ValidationResult } from "./common/types.js";
18
+ import { getDisplayState } from "./common/stateHelper.js";
19
+ import { BaseTextInputProps, TextInputState } from "./text-input/types.js";
20
+ import { useTextInputState } from "./text-input/hooks/useTextInputState.js";
21
+ import { validateValue as validateValue$1 } from "./text-input/utils/validation.js";
22
+ import { BaseNumberInputProps, NumberInputState } from "./number-input/types.js";
23
+ import { useNumberInputState } from "./number-input/hooks/useNumberInputState.js";
24
+ import { validateValue } from "./number-input/utils/validation.js";
25
+ import { NumberFormatOptions, addThousandsSeparator, formatNumber, formatPrecision } from "./number-input/utils/formatter.js";
26
+ import { BaseSelectProps, FilterOptionFunc, MultipleSelectState, SelectOption, SelectState, SortDirection, TagDisplayInfo, UseMultipleSelectStateOptions, UseSelectStateOptions } from "./select/types.js";
27
+ import { useMultipleSelectState, useSelectState } from "./select/hooks/useSelectState.js";
28
+ import { useDebouncedSearch } from "./select/hooks/useDebouncedSearch.js";
29
+ import { calculateTagDisplay } from "./select/utils/tagAggregation.js";
30
+ import { defaultFilterOption, filterOptions } from "./select/utils/filterOptions.js";
31
+ import { sortOptions } from "./select/utils/sortOptions.js";
32
+ import { findOptionByValue, findOptionsByValues, generateId, isOptionSelected, isOptionSelectedInMultiple } from "./select/utils/helpers.js";
33
+ //#region src/index.d.ts
34
+ declare const setPisellUtilsConfig: (config: {
35
+ [key: string]: any;
17
36
  }) => void;
18
- export declare const getPisellUtilsConfig: () => {
19
- [key: string]: any;
37
+ declare const getPisellUtilsConfig: () => {
38
+ [key: string]: any;
20
39
  };
40
+ //#endregion
41
+ export { ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, BaseNumberInputProps, BaseSelectProps, BaseTextInputProps, ColumnSettingStorageItem, DisplayState, EscPosPrinter, FilterOptionFunc, FormatOptions, GroupByOptions, GroupBySpec, GroupKey, GroupResult, INVALID_SCALE_READING_STATUSES, Locale, MAX_RETAIL_SCALE_WEIGHT_KG, MultipleSelectState, NumberFormatOptions, NumberInputState, STANDARD_WEIGHT_UNIT, STANDARD_WEIGHT_UNIT_SYMBOL, ScaleReadingStatus, SelectOption, SelectState, SortDirection, TagDisplayInfo, TextInputState, UNIT_PRICE_PRECISION, UseMultipleSelectStateOptions, UseSelectStateOptions, ValidationResult, WEIGHT_PRECISION, WEIGHT_UNIT_GRAMS, WEIGHT_UNIT_NAMES, WEIGHT_UNIT_SYMBOLS, WalletPassValidity, WeighingSnapshot, WeightUnit, WeightUnitName, WeightUnitSymbol, addThousandsSeparator, calculateTagDisplay, changeArray, checkEnv, clearColumnSettingFromLocal, clearColumnVisibilityFromLocal, columnWidthWithAlignment, copyToClipboard, createArray, dataManager, defaultFilterOption, detectIncognito, excelDateToJSDate, filterOptions, findOptionByValue, findOptionsByValues, formatAmount, formatAmountWithOptions, formatDate, formatNumber, formatPrecision, formatUnitPriceValue, formatWeightValue, generateId, generateUniqueIdByObj, getByPath, getColumnSettingFromLocal, getColumnVisibilityFromLocal, getComponentStorageKey, getDisplayState, getItemByArray, getPisellUtilsConfig, getRecordBoardColumnSettingFromLocal, getScheduleSummary, getStorageKeySuffix, getUniqueId, getUsableScaleWeight, getWalletValidityRange, getWeightUnitGrams, getWeightUnitPriceConversionFactor, getWeightUnitSymbol, groupBy, image, isAndroid, isArr, isBoolean, isFunction, isIOS, isInvalidScaleReadingStatus, isIos, isIpad, isJson, isMobile, isNumber, isOptionSelected, isOptionSelectedInMultiple, isPlainObject, isSafari, isString, isSupportedWeightUnit, isUndefined, isWx, isWxApp, jsDateToExcelDate, locales, miniRedux, normalizeWeightUnit, preparing, resolveWeighingSnapshot, saveColumnSettingToLocal, saveColumnVisibilityToLocal, sendWarningLog, setPisellUtilsConfig, setTheme, sortOptions, uniqueByKey, useDebouncedSearch, useMultipleSelectState, useNumberInputState, useSelectState, useTextInputState, validateValue as validateNumberValue, validateValue$1 as validateTextValue, webPayment, webPrint };