@nutui/nutui-react-taro 3.1.0-beta.1 → 3.1.0-beta.2

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 (39) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/locales/base.d.ts +6 -0
  3. package/dist/cjs/locales/en-US.js +17 -1
  4. package/dist/cjs/locales/id-ID.js +17 -1
  5. package/dist/cjs/locales/ja-JP.js +16 -2
  6. package/dist/cjs/locales/tr-TR.js +17 -1
  7. package/dist/cjs/locales/vi-VN.js +17 -1
  8. package/dist/cjs/locales/zh-CN.js +15 -1
  9. package/dist/cjs/locales/zh-TW.js +15 -1
  10. package/dist/cjs/locales/zh-UG.js +17 -1
  11. package/dist/cjs/packages/price/price.js +15 -4
  12. package/dist/cjs/utils/scale-f.d.ts +0 -17
  13. package/dist/cjs/utils/scale-f.js +14 -105
  14. package/dist/cjs/utils/taro/get-system-info.d.ts +0 -5
  15. package/dist/cjs/utils/taro/get-system-info.js +2 -7
  16. package/dist/es/hooks/taro/use-custom-event.js +1 -0
  17. package/dist/es/locales/base.d.ts +6 -0
  18. package/dist/es/locales/en-US.js +17 -1
  19. package/dist/es/locales/id-ID.js +17 -1
  20. package/dist/es/locales/ja-JP.js +16 -2
  21. package/dist/es/locales/tr-TR.js +17 -1
  22. package/dist/es/locales/vi-VN.js +17 -1
  23. package/dist/es/locales/zh-CN.js +15 -1
  24. package/dist/es/locales/zh-TW.js +15 -1
  25. package/dist/es/locales/zh-UG.js +17 -1
  26. package/dist/es/packages/price/price.js +16 -5
  27. package/dist/es/utils/scale-f.d.ts +0 -17
  28. package/dist/es/utils/scale-f.js +15 -106
  29. package/dist/es/utils/taro/get-system-info.d.ts +0 -5
  30. package/dist/es/utils/taro/get-system-info.js +8 -7
  31. package/dist/nutui.react.umd.js +59 -104
  32. package/dist/style-jmapp.css +1 -1
  33. package/dist/style-jmapp.scss +38 -38
  34. package/dist/style-jrkf.css +1 -1
  35. package/dist/style-jrkf.scss +41 -41
  36. package/dist/style.css +1 -1
  37. package/dist/style.scss +36 -36
  38. package/dist/styles/variables-daojia.scss +993 -1971
  39. package/package.json +1 -1
@@ -8,6 +8,12 @@ var jaJP = {
8
8
  select: '選択してください',
9
9
  edit: '編集',
10
10
  reset: 'リセット',
11
+ close: '閉じる',
12
+ back: '戻る',
13
+ clear: 'クリア',
14
+ image: {
15
+ errorTip: '画像の読み込みに失敗しました'
16
+ },
11
17
  video: {
12
18
  errorTip: '動画の読み込みに失敗しました',
13
19
  clickRetry: 'クリックして再試行'
@@ -47,7 +53,16 @@ var jaJP = {
47
53
  },
48
54
  today: '今日',
49
55
  loadPreviousMonth: '前の月を読み込む',
50
- noEarlierMonth: 'これより前の月はありません'
56
+ noEarlierMonth: 'これより前の月はありません',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ if (isActive) {
59
+ return today ? "今日".concat(month, "月").concat(day, "日を選択しました") : "".concat(month, "月").concat(day, "日を選択しました");
60
+ }
61
+ if (isDisable) {
62
+ return today ? "今日".concat(month, "月").concat(day, "日は無効です") : "".concat(month, "月").concat(day, "日は無効です");
63
+ }
64
+ return today ? "今日".concat(month, "月").concat(day, "日") : "".concat(month, "月").concat(day, "日");
65
+ }
51
66
  },
52
67
  shortpassword: {
53
68
  title: 'パスワードを入力してください',
@@ -155,7 +170,6 @@ var jaJP = {
155
170
  errorCanvasTips: '現在の環境はCanvasをサポートしていません'
156
171
  },
157
172
  mask: 'マスク',
158
- close: '閉じる',
159
173
  quickenter: {
160
174
  title: 'クイックアクセス'
161
175
  }
@@ -9,6 +9,11 @@ var trTR = {
9
9
  edit: 'düzenlemek',
10
10
  reset: 'sıfırlama',
11
11
  close: 'Kapat',
12
+ back: 'Geri',
13
+ clear: 'Temizle',
14
+ image: {
15
+ errorTip: 'Resim yüklenemedi'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Video yüklenemedi',
14
19
  clickRetry: 'Yeniden Tıklayın'
@@ -48,7 +53,18 @@ var trTR = {
48
53
  },
49
54
  today: 'Bugün',
50
55
  loadPreviousMonth: 'Önceki ayı yükle',
51
- noEarlierMonth: 'Önceki ay yok'
56
+ noEarlierMonth: 'Önceki ay yok',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
59
+ var label = today ? "Bug\xfcn, ".concat(dateStr) : dateStr;
60
+ if (isActive) {
61
+ label = "Se\xe7ili ".concat(label);
62
+ }
63
+ if (isDisable) {
64
+ label = "".concat(label, " devre dışı");
65
+ }
66
+ return label;
67
+ }
52
68
  },
53
69
  shortpassword: {
54
70
  title: 'Lütfen şifrenizi girin',
@@ -9,6 +9,11 @@ var viVN = {
9
9
  edit: 'Chỉnh sửa',
10
10
  reset: 'Đặt lại',
11
11
  close: 'Đóng',
12
+ back: 'Quay lại',
13
+ clear: 'Xóa',
14
+ image: {
15
+ errorTip: 'Tải ảnh không thành công'
16
+ },
12
17
  video: {
13
18
  errorTip: 'Tải video không thành công',
14
19
  clickRetry: 'Nhấn để thử lại'
@@ -48,7 +53,18 @@ var viVN = {
48
53
  },
49
54
  today: 'Hôm nay',
50
55
  loadPreviousMonth: 'Tải dữ liệu của tháng trước',
51
- noEarlierMonth: 'Không có tháng nào sớm hơn'
56
+ noEarlierMonth: 'Không có tháng nào sớm hơn',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
59
+ var label = today ? "H\xf4m nay, ".concat(dateStr) : dateStr;
60
+ if (isActive) {
61
+ label = "Đ\xe3 chọn ".concat(label);
62
+ }
63
+ if (isDisable) {
64
+ label = "".concat(label, " bị v\xf4 hiệu");
65
+ }
66
+ return label;
67
+ }
52
68
  },
53
69
  shortpassword: {
54
70
  title: 'Vui lòng nhập mật khẩu',
@@ -9,6 +9,11 @@ var zhCN = {
9
9
  edit: '编辑',
10
10
  reset: '重置',
11
11
  close: '关闭',
12
+ back: '返回',
13
+ clear: '清除',
14
+ image: {
15
+ errorTip: '图片加载失败'
16
+ },
12
17
  video: {
13
18
  errorTip: '视频加载失败',
14
19
  clickRetry: '点击重试'
@@ -48,7 +53,16 @@ var zhCN = {
48
53
  },
49
54
  today: '今天',
50
55
  loadPreviousMonth: '加载上一个月',
51
- noEarlierMonth: '没有更早月份'
56
+ noEarlierMonth: '没有更早月份',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ if (isActive) {
59
+ return today ? "已选定今日".concat(month, "月").concat(day, "号") : "已选定".concat(month, "月").concat(day, "号");
60
+ }
61
+ if (isDisable) {
62
+ return today ? "".concat(month, "月").concat(day, "号今日按钮变暗") : "".concat(month, "月").concat(day, "号按钮变暗");
63
+ }
64
+ return today ? "".concat(month, "月").concat(day, "号今日") : "".concat(month, "月").concat(day, "号");
65
+ }
52
66
  },
53
67
  shortpassword: {
54
68
  title: '请输入密码',
@@ -9,6 +9,11 @@ var zhCN = {
9
9
  edit: '編輯',
10
10
  reset: '重置',
11
11
  close: '關閉',
12
+ back: '返回',
13
+ clear: '清除',
14
+ image: {
15
+ errorTip: '圖片加載失敗'
16
+ },
12
17
  video: {
13
18
  errorTip: '視頻加載失敗',
14
19
  clickRetry: '點擊重試'
@@ -48,7 +53,16 @@ var zhCN = {
48
53
  },
49
54
  today: '今天',
50
55
  loadPreviousMonth: '加載上一個月',
51
- noEarlierMonth: '沒有更早月份'
56
+ noEarlierMonth: '沒有更早月份',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ if (isActive) {
59
+ return today ? "已選定今日".concat(month, "月").concat(day, "號") : "已選定".concat(month, "月").concat(day, "號");
60
+ }
61
+ if (isDisable) {
62
+ return today ? "".concat(month, "月").concat(day, "號今日按鈕變暗") : "".concat(month, "月").concat(day, "號按鈕變暗");
63
+ }
64
+ return today ? "".concat(month, "月").concat(day, "號今日") : "".concat(month, "月").concat(day, "號");
65
+ }
52
66
  },
53
67
  shortpassword: {
54
68
  title: '請輸入密碼',
@@ -9,6 +9,11 @@ var zhUG = {
9
9
  edit: 'يحرر',
10
10
  reset: 'إعادة ضبط',
11
11
  close: 'تاقاش',
12
+ back: 'قايتىش',
13
+ clear: 'تاقاش',
14
+ image: {
15
+ errorTip: 'رەسىم يۈكلەش مەغلۇپ بولدى'
16
+ },
12
17
  video: {
13
18
  errorTip: 'فىلىمنى قويۇش مەغلۇپ بولدى',
14
19
  clickRetry: 'قايتا سىناش'
@@ -48,7 +53,18 @@ var zhUG = {
48
53
  },
49
54
  today: 'بۈگۈن',
50
55
  loadPreviousMonth: 'ئالدىنقى ئاي',
51
- noEarlierMonth: 'تۈگىدى'
56
+ noEarlierMonth: 'تۈگىدى',
57
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
58
+ var dateStr = "".concat(year, "-").concat(month, "-").concat(day);
59
+ var label = today ? "بۈگۈن, ".concat(dateStr) : dateStr;
60
+ if (isActive) {
61
+ label = "تاللانغان ".concat(label);
62
+ }
63
+ if (isDisable) {
64
+ label = "".concat(label, " چەكلەنگەن");
65
+ }
66
+ return label;
67
+ }
52
68
  },
53
69
  shortpassword: {
54
70
  title: 'مەخپى نومۇرنى كىرگۈزۈڭ',
@@ -7,7 +7,8 @@ import classNames from "classnames";
7
7
  import { ComponentDefaults } from "../../utils/typings";
8
8
  import { useRtl } from "../configprovider/index";
9
9
  import { PriceColorEnum } from "../../types";
10
- import { harmony, td } from "../../utils/taro/platform";
10
+ import { harmony } from "../../utils/taro/platform";
11
+ import { shouldRenderPriceAsRaw } from "../../utils/should-render-price-raw";
11
12
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
12
13
  color: 'primary',
13
14
  price: 0,
@@ -22,10 +23,17 @@ export var Price = function(props) {
22
23
  var _$_object_spread = _object_spread({}, defaultProps, props), color = _$_object_spread.color, originalPrice = _$_object_spread.price, symbol = _$_object_spread.symbol, digits = _$_object_spread.digits, thousands = _$_object_spread.thousands, position = _$_object_spread.position, size = _$_object_spread.size, line = _$_object_spread.line, className = _$_object_spread.className, style = _$_object_spread.style;
23
24
  var classPrefix = 'nut-price';
24
25
  var rtl = useRtl();
26
+ var isRenderPriceRaw = useMemo(function() {
27
+ return typeof originalPrice === 'string' && shouldRenderPriceAsRaw(originalPrice);
28
+ }, [
29
+ originalPrice
30
+ ]);
25
31
  var price = useMemo(function() {
32
+ if (isRenderPriceRaw) return '';
26
33
  return originalPrice.toString().replace(/[^\d.]/g, '');
27
34
  }, [
28
- originalPrice
35
+ originalPrice,
36
+ isRenderPriceRaw
29
37
  ]);
30
38
  var isCustomPriceColor = useMemo(function() {
31
39
  var specificPriceColor = Object.values(PriceColorEnum);
@@ -106,12 +114,15 @@ export var Price = function(props) {
106
114
  style: priceColorStyle
107
115
  }, formatDecimal(price))) : null, symbol && position === 'after' ? renderSymbol() : null);
108
116
  };
109
- return /*#__PURE__*/ React.createElement(React.Fragment, null, harmony() || td() ? /*#__PURE__*/ React.createElement(Text, {
117
+ var renderRawContent = function() {
118
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, originalPrice);
119
+ };
120
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, harmony() || process.env.TARO_ENV === 'dynamic' ? /*#__PURE__*/ React.createElement(Text, {
110
121
  className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(color, " ").concat(className),
111
122
  style: style
112
- }, renderInner()) : /*#__PURE__*/ React.createElement(View, {
123
+ }, isRenderPriceRaw ? renderRawContent() : renderInner()) : /*#__PURE__*/ React.createElement(View, {
113
124
  className: "".concat(classPrefix, " ").concat(classPrefix, "-").concat(color, " ").concat(className),
114
125
  style: style
115
- }, renderInner()));
126
+ }, isRenderPriceRaw ? renderRawContent() : renderInner()));
116
127
  };
117
128
  Price.displayName = 'NutPrice';
@@ -1,20 +1,3 @@
1
- /** 原生 DongScreenAdapterPlugin.getScale 的典型返回结构 */
2
- type NativeScaleResponse = {
3
- status?: string;
4
- data?: {
5
- scale?: number | string;
6
- };
7
- };
8
- /** jmfe 通用 callNative 签名 */
9
- type NativeCaller = (plugin: string, method: string, params: string, extra: string) => Promise<NativeScaleResponse>;
10
- /** 站内容器的 jmfe 桥接方法(可选) */
11
- declare global {
12
- interface Window {
13
- jmfe?: {
14
- callNative?: NativeCaller;
15
- };
16
- }
17
- }
18
1
  /** 字体档位:标准、大字、老年 */
19
2
  export type ScaleProfile = 'standard' | 'large' | 'elderly';
20
3
  /** 不同场景可选用不同放大比例(layout 等默认可不额外放大) */
@@ -1,11 +1,9 @@
1
1
  /**
2
- * 响应式缩放系数(--nut-scale-f):结合京东站内原生桥与站外视口规则,
2
+ * 响应式缩放系数(--nut-scale-f):按视口宽度计算,
3
3
  * 写入根节点 CSS 变量(--nut-scale-f / --nut-scale-font / --nut-scale-icon),
4
4
  * 供布局/字号/icon 等按比例换算(见 calcByProfile)。H5 与 Taro WebView 共用此实现。
5
- */ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
6
- import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
7
- import { canUseDom } from "./can-use-dom";
8
- /** 当前基准缩放(来自原生或视口计算) */ var scale = 1;
5
+ */ import { canUseDom } from "./can-use-dom";
6
+ /** 当前基准缩放(来自视口计算) */ var scale = 1;
9
7
  /** 大字模式下仅 font 场景的相对倍率 */ var LARGE_FONT_RATIO = 1.15;
10
8
  /** 老年模式下 font/icon/lego 场景的相对倍率 */ var ELDERLY_RATIO = 1.3;
11
9
  /** 全局当前档位,与 scale 共同参与 calcByProfile */ var profile = 'standard';
@@ -49,7 +47,7 @@ import { canUseDom } from "./can-use-dom";
49
47
  }
50
48
  return Math.round(value);
51
49
  }
52
- /** 无原生桥时按屏宽推算 scale(含平板与 375 基准窄屏区间) */ function getScaleByViewport() {
50
+ /** 按屏宽推算 scale(含平板与 375 基准窄屏区间) */ function getScaleByViewport() {
53
51
  if (!canUseDom) return 1;
54
52
  var deviceWidth = window.innerWidth;
55
53
  if (!deviceWidth) return 1;
@@ -62,81 +60,8 @@ import { canUseDom } from "./can-use-dom";
62
60
  }
63
61
  return 1;
64
62
  }
65
- /** 通过 jmfe.callNative 拉取 DongScreenAdapterPlugin;失败返回 null */ function getScaleByNative() {
66
- return _async_to_generator(function() {
67
- var _window_jmfe, _res_data, res, parsed, e;
68
- return _ts_generator(this, function(_state) {
69
- switch(_state.label){
70
- case 0:
71
- if (!canUseDom || !((_window_jmfe = window.jmfe) === null || _window_jmfe === void 0 ? void 0 : _window_jmfe.callNative)) return [
72
- 2,
73
- null
74
- ];
75
- _state.label = 1;
76
- case 1:
77
- _state.trys.push([
78
- 1,
79
- 3,
80
- ,
81
- 4
82
- ]);
83
- return [
84
- 4,
85
- window.jmfe.callNative('DongScreenAdapterPlugin', 'getScale', JSON.stringify({}), '')
86
- ];
87
- case 2:
88
- res = _state.sent();
89
- if ((res === null || res === void 0 ? void 0 : res.status) === '0' && ((_res_data = res.data) === null || _res_data === void 0 ? void 0 : _res_data.scale) !== undefined) {
90
- parsed = Number(res.data.scale);
91
- if (Number.isFinite(parsed) && parsed > 0) {
92
- return [
93
- 2,
94
- parsed
95
- ];
96
- }
97
- }
98
- return [
99
- 3,
100
- 4
101
- ];
102
- case 3:
103
- e = _state.sent();
104
- return [
105
- 3,
106
- 4
107
- ];
108
- case 4:
109
- return [
110
- 2,
111
- null
112
- ];
113
- }
114
- });
115
- })();
116
- }
117
- /** 统一获取缩放:站内原生优先,失败则用视口规则 */ function getScaleF() {
118
- return _async_to_generator(function() {
119
- var nativeScale;
120
- return _ts_generator(this, function(_state) {
121
- switch(_state.label){
122
- case 0:
123
- return [
124
- 4,
125
- getScaleByNative()
126
- ];
127
- case 1:
128
- nativeScale = _state.sent();
129
- if (nativeScale) return [
130
- 2,
131
- nativeScale
132
- ];
133
- return [
134
- 2,
135
- getScaleByViewport()
136
- ];
137
- }
138
- });
139
- })();
63
+ /** 统一获取缩放:按视口规则计算 */ function getScaleF() {
64
+ return getScaleByViewport();
140
65
  }
141
66
  /** 校验后更新内存中的 scale,并写入 --nut-scale-f */ function setScaleF(nextScale) {
142
67
  var validScale = Number.isFinite(nextScale) && nextScale > 0 ? nextScale : 1;
@@ -144,31 +69,15 @@ import { canUseDom } from "./can-use-dom";
144
69
  applyScaleCssVars(validScale);
145
70
  return scale;
146
71
  }
147
- /** 重新拉取缩放;可选同时切换 profile,避免与当前值相同时重复写 DOM */ function refreshScaleF(nextProfile) {
148
- return _async_to_generator(function() {
149
- var nextScale;
150
- return _ts_generator(this, function(_state) {
151
- switch(_state.label){
152
- case 0:
153
- if (nextProfile) {
154
- setScaleProfile(nextProfile);
155
- }
156
- return [
157
- 4,
158
- getScaleF()
159
- ];
160
- case 1:
161
- nextScale = _state.sent();
162
- if (!scale || nextScale !== scale) {
163
- setScaleF(nextScale);
164
- }
165
- return [
166
- 2,
167
- scale
168
- ];
169
- }
170
- });
171
- })();
72
+ /** 重新计算缩放;可选同时切换 profile,避免与当前值相同时重复写 DOM */ function refreshScaleF(nextProfile) {
73
+ if (nextProfile) {
74
+ setScaleProfile(nextProfile);
75
+ }
76
+ var nextScale = getScaleF();
77
+ if (!scale || nextScale !== scale) {
78
+ setScaleF(nextScale);
79
+ }
80
+ return scale;
172
81
  }
173
82
  /** 首次计算缩放并订阅 resize;返回卸载函数(SSR 下为空函数) */ export function initScaleF(nextProfile) {
174
83
  if (!canUseDom) return function() {};
@@ -14,9 +14,4 @@ export declare const getDeviceInfo: () => IDeviceInfo;
14
14
  * @returns {Taro.getWindowInfo.Result} 窗口信息
15
15
  */
16
16
  export declare const getWindowInfo: () => Taro.getWindowInfo.Result;
17
- /**
18
- * 获取应用基础信息,兼容新旧 API
19
- * @returns {Taro.getAppBaseInfo.Result} 应用基础信息
20
- */
21
- export declare const getAppBaseInfo: () => Taro.getAppBaseInfo.Result;
22
17
  export {};
@@ -13,10 +13,11 @@ import Taro from "@tarojs/taro";
13
13
  * @returns {Taro.getWindowInfo.Result} 窗口信息
14
14
  */ export var getWindowInfo = function() {
15
15
  return typeof Taro.getWindowInfo === 'function' ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
16
- };
17
- /**
18
- * 获取应用基础信息,兼容新旧 API
19
- * @returns {Taro.getAppBaseInfo.Result} 应用基础信息
20
- */ export var getAppBaseInfo = function() {
21
- return typeof Taro.getAppBaseInfo === 'function' ? Taro.getAppBaseInfo() : Taro.getSystemInfoSync();
22
- };
16
+ } // /**
17
+ // * 获取应用基础信息,兼容新旧 API
18
+ // * @returns {Taro.getAppBaseInfo.Result} 应用基础信息
19
+ // */
20
+ // export const getAppBaseInfo = (): Taro.getAppBaseInfo.Result => {
21
+ // return canIUse('getAppBaseInfo') ? taroGetAppBaseInfo() : getSystemInfoSync()
22
+ // }
23
+ ;
@@ -1930,6 +1930,11 @@
1930
1930
  edit: "编辑",
1931
1931
  reset: "重置",
1932
1932
  close: "关闭",
1933
+ back: "返回",
1934
+ clear: "清除",
1935
+ image: {
1936
+ errorTip: "图片加载失败"
1937
+ },
1933
1938
  video: {
1934
1939
  errorTip: "视频加载失败",
1935
1940
  clickRetry: "点击重试"
@@ -1969,7 +1974,16 @@
1969
1974
  },
1970
1975
  today: "今天",
1971
1976
  loadPreviousMonth: "加载上一个月",
1972
- noEarlierMonth: "没有更早月份"
1977
+ noEarlierMonth: "没有更早月份",
1978
+ dayAriaLabel: function(year, month, day, today, isActive, isDisable) {
1979
+ if (isActive) {
1980
+ return today ? "已选定今日".concat(month, "月").concat(day, "号") : "已选定".concat(month, "月").concat(day, "号");
1981
+ }
1982
+ if (isDisable) {
1983
+ return today ? "".concat(month, "月").concat(day, "号今日按钮变暗") : "".concat(month, "月").concat(day, "号按钮变暗");
1984
+ }
1985
+ return today ? "".concat(month, "月").concat(day, "号今日") : "".concat(month, "月").concat(day, "号");
1986
+ }
1973
1987
  },
1974
1988
  shortpassword: {
1975
1989
  title: "请输入密码",
@@ -3130,9 +3144,6 @@
3130
3144
  var getWindowInfo = function() {
3131
3145
  return typeof Taro.getWindowInfo === "function" ? Taro.getWindowInfo() : Taro.getSystemInfoSync();
3132
3146
  };
3133
- var getAppBaseInfo = function() {
3134
- return typeof Taro.getAppBaseInfo === "function" ? Taro.getAppBaseInfo() : Taro.getSystemInfoSync();
3135
- };
3136
3147
  function useWatch$1(dep, callback) {
3137
3148
  var config2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
3138
3149
  immediate: false
@@ -4254,81 +4265,8 @@
4254
4265
  }
4255
4266
  return 1;
4256
4267
  }
4257
- function getScaleByNative() {
4258
- return _async_to_generator(function() {
4259
- var _window_jmfe, _res_data, res, parsed;
4260
- return __generator(this, function(_state) {
4261
- switch (_state.label) {
4262
- case 0:
4263
- if (!canUseDom || !((_window_jmfe = window.jmfe) === null || _window_jmfe === void 0 ? void 0 : _window_jmfe.callNative)) return [
4264
- 2,
4265
- null
4266
- ];
4267
- _state.label = 1;
4268
- case 1:
4269
- _state.trys.push([
4270
- 1,
4271
- 3,
4272
- ,
4273
- 4
4274
- ]);
4275
- return [
4276
- 4,
4277
- window.jmfe.callNative("DongScreenAdapterPlugin", "getScale", JSON.stringify({}), "")
4278
- ];
4279
- case 2:
4280
- res = _state.sent();
4281
- if ((res === null || res === void 0 ? void 0 : res.status) === "0" && ((_res_data = res.data) === null || _res_data === void 0 ? void 0 : _res_data.scale) !== void 0) {
4282
- parsed = Number(res.data.scale);
4283
- if (Number.isFinite(parsed) && parsed > 0) {
4284
- return [
4285
- 2,
4286
- parsed
4287
- ];
4288
- }
4289
- }
4290
- return [
4291
- 3,
4292
- 4
4293
- ];
4294
- case 3:
4295
- _state.sent();
4296
- return [
4297
- 3,
4298
- 4
4299
- ];
4300
- case 4:
4301
- return [
4302
- 2,
4303
- null
4304
- ];
4305
- }
4306
- });
4307
- })();
4308
- }
4309
4268
  function getScaleF() {
4310
- return _async_to_generator(function() {
4311
- var nativeScale;
4312
- return __generator(this, function(_state) {
4313
- switch (_state.label) {
4314
- case 0:
4315
- return [
4316
- 4,
4317
- getScaleByNative()
4318
- ];
4319
- case 1:
4320
- nativeScale = _state.sent();
4321
- if (nativeScale) return [
4322
- 2,
4323
- nativeScale
4324
- ];
4325
- return [
4326
- 2,
4327
- getScaleByViewport()
4328
- ];
4329
- }
4330
- });
4331
- })();
4269
+ return getScaleByViewport();
4332
4270
  }
4333
4271
  function setScaleF(nextScale) {
4334
4272
  var validScale = Number.isFinite(nextScale) && nextScale > 0 ? nextScale : 1;
@@ -4337,27 +4275,11 @@
4337
4275
  return scale;
4338
4276
  }
4339
4277
  function refreshScaleF(nextProfile) {
4340
- return _async_to_generator(function() {
4341
- var nextScale;
4342
- return __generator(this, function(_state) {
4343
- switch (_state.label) {
4344
- case 0:
4345
- return [
4346
- 4,
4347
- getScaleF()
4348
- ];
4349
- case 1:
4350
- nextScale = _state.sent();
4351
- if (!scale || nextScale !== scale) {
4352
- setScaleF(nextScale);
4353
- }
4354
- return [
4355
- 2,
4356
- scale
4357
- ];
4358
- }
4359
- });
4360
- })();
4278
+ var nextScale = getScaleF();
4279
+ if (!scale || nextScale !== scale) {
4280
+ setScaleF(nextScale);
4281
+ }
4282
+ return scale;
4361
4283
  }
4362
4284
  function initScaleF(nextProfile) {
4363
4285
  if (!canUseDom) return function() {
@@ -41124,6 +41046,30 @@
41124
41046
  return PriceColorEnum2;
41125
41047
  }({});
41126
41048
  var destroyList = [];
41049
+ var CJK = /[\u4E00-\u9FFF]/;
41050
+ var RE_NUM = /\d+(?:\.\d+)?/g;
41051
+ function hasNoExtractablePrice(s) {
41052
+ var t = s.trim();
41053
+ if (!t) return true;
41054
+ if (!/\d/.test(t)) return true;
41055
+ if (t.replace(/[^\d.]/g, "") === "") return true;
41056
+ return false;
41057
+ }
41058
+ function shouldRenderPriceAsRaw(s) {
41059
+ if (hasNoExtractablePrice(s)) {
41060
+ return true;
41061
+ }
41062
+ var t = s.trim();
41063
+ if (!CJK.test(t)) return false;
41064
+ var matches = Array.from(t.matchAll(RE_NUM));
41065
+ if (matches.length < 2) return false;
41066
+ var a = matches[0];
41067
+ var b = matches[1];
41068
+ var i0 = a.index;
41069
+ var i1 = b.index;
41070
+ var between = t.slice(i0 + a[0].length, i1);
41071
+ return CJK.test(between);
41072
+ }
41127
41073
  var defaultProps$g = _object_spread_props(_object_spread({}, ComponentDefaults), {
41128
41074
  color: "primary",
41129
41075
  price: 0,
@@ -41138,10 +41084,17 @@
41138
41084
  var _$_object_spread = _object_spread({}, defaultProps$g, props), color = _$_object_spread.color, originalPrice = _$_object_spread.price, symbol = _$_object_spread.symbol, digits = _$_object_spread.digits, thousands = _$_object_spread.thousands, position2 = _$_object_spread.position, size = _$_object_spread.size, line = _$_object_spread.line, className = _$_object_spread.className, style = _$_object_spread.style;
41139
41085
  var classPrefix2 = "nut-price";
41140
41086
  var rtl = useRtl();
41087
+ var isRenderPriceRaw = React.useMemo(function() {
41088
+ return typeof originalPrice === "string" && shouldRenderPriceAsRaw(originalPrice);
41089
+ }, [
41090
+ originalPrice
41091
+ ]);
41141
41092
  var price = React.useMemo(function() {
41093
+ if (isRenderPriceRaw) return "";
41142
41094
  return originalPrice.toString().replace(/[^\d.]/g, "");
41143
41095
  }, [
41144
- originalPrice
41096
+ originalPrice,
41097
+ isRenderPriceRaw
41145
41098
  ]);
41146
41099
  var isCustomPriceColor = React.useMemo(function() {
41147
41100
  var specificPriceColor = Object.values(PriceColorEnum);
@@ -41222,13 +41175,16 @@
41222
41175
  style: priceColorStyle
41223
41176
  }, formatDecimal(price))) : null, symbol && position2 === "after" ? renderSymbol() : null);
41224
41177
  };
41225
- return /* @__PURE__ */ React.createElement(React.Fragment, null, harmony() || td() ? /* @__PURE__ */ React.createElement(components.Text, {
41178
+ var renderRawContent = function() {
41179
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, originalPrice);
41180
+ };
41181
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, harmony() || process.env.TARO_ENV === "dynamic" ? /* @__PURE__ */ React.createElement(components.Text, {
41226
41182
  className: "".concat(classPrefix2, " ").concat(classPrefix2, "-").concat(color, " ").concat(className),
41227
41183
  style
41228
- }, renderInner()) : /* @__PURE__ */ React.createElement(components.View, {
41184
+ }, isRenderPriceRaw ? renderRawContent() : renderInner()) : /* @__PURE__ */ React.createElement(components.View, {
41229
41185
  className: "".concat(classPrefix2, " ").concat(classPrefix2, "-").concat(color, " ").concat(className),
41230
41186
  style
41231
- }, renderInner()));
41187
+ }, isRenderPriceRaw ? renderRawContent() : renderInner()));
41232
41188
  };
41233
41189
  Price.displayName = "NutPrice";
41234
41190
  var defaultProps$f = {
@@ -43635,7 +43591,6 @@
43635
43591
  exports.destroyList = destroyList;
43636
43592
  exports.funcInterceptor = funcInterceptor;
43637
43593
  exports.getAllScrollableParents = getAllScrollableParents;
43638
- exports.getAppBaseInfo = getAppBaseInfo;
43639
43594
  exports.getCurrMonthData = getCurrMonthData;
43640
43595
  exports.getDaysStatus = getDaysStatus;
43641
43596
  exports.getDefaultConfig = getDefaultConfig;