@conecli/cone-render 0.10.1-shop3.1 → 0.10.1-shop3.100

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 (129) hide show
  1. package/README.md +1 -1
  2. package/dist/api/index.ts +1 -1
  3. package/dist/common/accessibility.h5.ts +1 -0
  4. package/dist/common/accessibility.ts +1 -0
  5. package/dist/common/const.ts +1 -1
  6. package/dist/common/index.h5.ts +1 -1
  7. package/dist/common/index.jd.ts +1 -1
  8. package/dist/common/index.ts +1 -1
  9. package/dist/common/index.weapp.ts +1 -1
  10. package/dist/common/jdplayerSdk.weapp.tsx +1 -0
  11. package/dist/common/jssdk.ts +1 -1
  12. package/dist/common/jssdk.weapp.ts +1 -0
  13. package/dist/common/pageType.ts +1 -1
  14. package/dist/common/token/index.h5.ts +1 -1
  15. package/dist/common/token/token.jd.ts +1 -1
  16. package/dist/common/wxappApi.ascf.ts +1 -0
  17. package/dist/common/wxappApi.ts +1 -1
  18. package/dist/components/ErrorBoundary.tsx +1 -1
  19. package/dist/components/base/CommonFloorHead/index.module.scss +126 -111
  20. package/dist/components/base/CommonFloorHead/index.tsx +1 -1
  21. package/dist/components/base/CountDown/index.module.scss +49 -44
  22. package/dist/components/base/CountDown/index.tsx +1 -1
  23. package/dist/components/base/CustomScrollView/index-back.tsx +1 -0
  24. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  25. package/dist/components/base/CustomVideo/index.tsx +1 -1
  26. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  27. package/dist/components/base/Dialog/index.module.scss +11 -0
  28. package/dist/components/base/ExposureSmart/index.h5.module.scss +12 -2
  29. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  30. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  31. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  32. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  33. package/dist/components/base/InViewRender/index.tsx +1 -1
  34. package/dist/components/base/ItemViewExposureSmart/index.module.scss +2 -2
  35. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  36. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  37. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  38. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  39. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  40. package/dist/components/base/NetworkDataError/const.ts +1 -1
  41. package/dist/components/base/NetworkDataError/index.module.scss +118 -72
  42. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  43. package/dist/components/base/Price/Base/index.module.scss +12 -0
  44. package/dist/components/base/Price/Base/index.tsx +1 -1
  45. package/dist/components/base/Price/Double/index.module.scss +33 -1
  46. package/dist/components/base/Price/Double/index.tsx +1 -1
  47. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  48. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  49. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  50. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  51. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  52. package/dist/components/floorItem.tsx +1 -1
  53. package/dist/components/floorItem.weapp.tsx +1 -1
  54. package/dist/components/isv/Floor/index.tsx +1 -1
  55. package/dist/components/remoteFloorItem.tsx +1 -1
  56. package/dist/config/env.ts +1 -1
  57. package/dist/interface/common.ts +1 -1
  58. package/dist/interface/component.ts +1 -1
  59. package/dist/interface/jumpEventReport.ts +1 -1
  60. package/dist/interface/service.ts +1 -1
  61. package/dist/jumpEventReport/base.ts +1 -1
  62. package/dist/jumpEventReport/const.ts +1 -1
  63. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  64. package/dist/jumpEventReport/index.h5.ts +1 -1
  65. package/dist/jumpEventReport/index.jd.ts +1 -1
  66. package/dist/jumpEventReport/index.weapp.ts +1 -1
  67. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  68. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  69. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  70. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  71. package/dist/jumpEventReport/web/report.ts +1 -1
  72. package/dist/jumpEventReport/web.base.ts +1 -1
  73. package/dist/jumpEventReport/web.jd.ts +1 -1
  74. package/dist/jumpEventReport/web.jdb.ts +1 -1
  75. package/dist/jumpEventReport/web.jdjch.ts +1 -1
  76. package/dist/jumpEventReport/web.jxwxapp.ts +1 -1
  77. package/dist/jumpEventReport/web.pc.ts +1 -1
  78. package/dist/jumpEventReport/web.tjapp.ts +1 -1
  79. package/dist/jumpEventReport/web.tjm.ts +1 -1
  80. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  81. package/dist/language/en_US.json +395 -0
  82. package/dist/language/zh_CN.json +395 -0
  83. package/dist/language/zh_HK.json +395 -0
  84. package/dist/libs/openShopBridge.js +161 -0
  85. package/dist/libs/openShopBridge.min.js +1 -0
  86. package/dist/libs/taroAppReport.js +2 -2
  87. package/dist/modules/ContainerFloorList/index.h5.module.scss +80 -53
  88. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  89. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  90. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  91. package/dist/open/api/environment.ts +1 -1
  92. package/dist/open/api/shopMember.ts +1 -1
  93. package/dist/open/api/shopMember.weapp.ts +1 -0
  94. package/dist/open/api/track.ts +1 -1
  95. package/dist/open/api/util.ts +1 -1
  96. package/dist/open/components/index.ts +1 -1
  97. package/dist/open/index.ts +1 -1
  98. package/dist/sass/app.h5.scss +278 -224
  99. package/dist/sass/base.scss +150 -145
  100. package/dist/service/fetchGateway.ts +1 -1
  101. package/dist/service/fetchGateway.weapp.ts +1 -0
  102. package/dist/service/fetchJsonp.weapp.ts +1 -0
  103. package/dist/service/http/colorSign.ts +1 -1
  104. package/dist/service/http/const.ts +1 -1
  105. package/dist/service/http/h5Http.ts +1 -1
  106. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  107. package/dist/service/requestServer.h5.ts +1 -1
  108. package/dist/service/requestServer.ts +1 -1
  109. package/dist/service/requestServer.weapp.ts +1 -0
  110. package/dist/utils/connectNativeJsBridge.ts +1 -1
  111. package/dist/utils/h5Utils.ts +1 -1
  112. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  113. package/dist/utils/harmonyCallRouter.ts +0 -0
  114. package/dist/utils/index.h5.ts +1 -1
  115. package/dist/utils/index.ts +1 -1
  116. package/dist/utils/index.weapp.ts +1 -1
  117. package/dist/utils/jumpExtMapUtil.h5.ts +1 -0
  118. package/dist/utils/jumpExtMapUtil.ts +1 -0
  119. package/dist/utils/jumpExtMapUtil.weapp.ts +1 -0
  120. package/dist/utils/log.ts +1 -0
  121. package/dist/utils/sColor.ts +1 -0
  122. package/dist/utils/sColor.weapp.ts +1 -0
  123. package/dist/utils/utils.ts +1 -1
  124. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  125. package/dist/wxapp/common/user_info.js +1 -1
  126. package/package.json +162 -141
  127. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  128. package/dist/utils/memberFormatUtils.js +0 -1
  129. package/dist/utils/priceUtils.js +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # cone-render
2
2
 
3
- 智铺模块化装修的核心公共库,包括核心渲染逻辑和一些公共组件和方法
3
+ 智铺模块化装修的核心公共库,包括核心渲染逻辑和一些公共组件和方法。
4
4
 
5
5
  ## 注意
6
6
 
package/dist/api/index.ts CHANGED
@@ -1 +1 @@
1
- import { protocol, isBetaServer, isH5 } from '../config/env'
2
1
  ? redirectDomainList.includes(location?.hostname)
3
2
  ? defaultDomain
4
3
  : location?.hostname
5
4
  : defaultDomain
6
5
  pcCoupon: `${protocol}//conecli.com`,
7
6
  : `${protocol}//api.m.jd.com`,
8
7
  hkApi: isBetaServer
9
8
  ? `${protocol}//beta-color.jd.hk`
10
9
  : `${protocol}//color.jd.hk`,
11
10
  pcSo: `${protocol}//conecli.com`,
12
11
  mobileLogin: `${protocol}//plogin.m.jd.com`,
13
12
  kpl: `${protocol}//conecli.com`,
14
13
  jxDomain: `${protocol}//st.jingxi.com`,
15
14
  apiFunc: `${domain.api}/client.action`,
16
15
  hkApiFunc: `${domain.hkApi}/client.action`,
17
16
  isLogin: `${domain.mobileLogin}/cgi-bin/ml/islogin`,
17
+ import { protocol, isBetaServer, isH5 } from '../config/env';
18
18
  ? redirectDomainList.includes(location?.hostname)
19
19
  ? defaultDomain
20
20
  : location?.hostname
21
21
  : defaultDomain;
22
22
  base: `${protocol}//conecli.com`,
23
23
  jshop2013: `${protocol}//conecli.com`,
24
24
  sale: `${protocol}//conecli.com`,
25
25
  mshop: `${protocol}//conecli.com`,
26
26
  pages: `${protocol}//${changeHostName}`,
27
27
  ztJshop: `${protocol}//conecli.com`,
28
28
  club: 'https://conecli.com',
29
29
  pm: `${protocol}//pm.3.cn`,
30
30
  pf: `${protocol}//pf.3.cn`,
31
31
  pcCoupon: `${protocol}//conecli.com`,
32
32
  fmall: `${protocol}//conecli.com`,
33
33
  lbs: `${protocol}//conecli.com`,
34
34
  yushou: `${protocol}//conecli.com`,
35
35
  wq: `${protocol}//wq.jd.com`,
36
36
  wqs: `${protocol}//conecli.com`,
37
37
  wqshop: `${protocol}//conecli.com`,
38
38
  shopMember: `${protocol}//conecli.com`,
39
39
  bean: `${protocol}//conecli.com`,
40
40
  mapi: `${protocol}//conecli.com`,
41
41
  api: isBetaServer ? `${protocol}//beta-api.m.jd.com` : `${protocol}//api.m.jd.com`,
42
42
  hkApi: isBetaServer ? `${protocol}//beta-color.jd.hk` : `${protocol}//color.jd.hk`,
43
43
  actJshop: `${protocol}//conecli.com`,
44
44
  msJshop: isBetaServer ? `${protocol}//conecli.com` : `${protocol}//conecli.com`,
45
45
  quark: 'https://conecli.com',
46
46
  ranking: `${protocol}//conecli.com`,
47
47
  iJshop: `${protocol}//conecli.com`,
48
48
  mobileSo: `${protocol}//conecli.com`,
49
49
  pcSo: `${protocol}//conecli.com`,
50
50
  capturehomeshare: `${protocol}//conecli.com`,
51
51
  jdcs: `${protocol}//conecli.com`,
52
52
  lives: `${protocol}//conecli.com`,
53
53
  mobileDetail: `${protocol}//conecli.com`,
54
54
  mobileHome: `${protocol}//conecli.com`,
55
55
  mobileLogin: `${protocol}//plogin.m.jd.com`,
56
56
  pcView: `${protocol}//mall.jd.com`,
57
57
  pcLogin: `${protocol}//passport.jd.com`,
58
58
  kpl: `${protocol}//conecli.com`,
59
59
  jxDomain: `${protocol}//st.jingxi.com`,
60
60
  ecoDomain: `${protocol}//conecli.com`,
61
61
  p: `${protocol}//conecli.com`,
62
62
  trade: `${protocol}//conecli.com`,
63
63
  decorate: {
64
64
  preview: `${domain.iJshop}/mshop/edit/preview.json`,
65
65
  },
66
66
  userAddress: `${domain.fmall}/address/getDefaultAddress.html`,
67
67
  lbsLocation: `${domain.lbs}/o`,
68
68
  couponStatus: `${domain.base}/m/couponStatus.json`,
69
69
  addCart: `${domain.mapi}/cart/add.json`,
70
70
  receiveCoupon: `${domain.base}/m/couponGet.json`,
71
71
  areaStockState: `${domain.fmall}/ss/areaStockState/mget`,
72
72
  apiFunc: `${domain.api}/client.action`,
73
73
  hkApiFunc: `${domain.hkApi}/client.action`,
74
74
  follow: `${domain.wq}/fav/shop/AddShopFav`,
75
75
  unfollow: `${domain.wq}/fav/shop/DelShopFav`,
76
76
  isFollow: domain.fmall + '/rpc/vender/batchIsFollow',
77
77
  flowers: domain.fmall + '/rpc/vender/queryFollowedUserCount',
78
78
  serverTime: domain.actJshop + '/serverTime.html',
79
79
  followShop: 'followShop',
80
80
  getDefaultAddress: 'getDefaultAddress',
81
81
  userInfo: `${domain.msJshop}/user/info`,
82
82
  font: `${domain.quark}/font/ttf`,
83
83
  isLogin: `${domain.mobileLogin}/cgi-bin/ml/islogin`,
@@ -0,0 +1 @@
1
+ import Taro from '@tarojs/taro';
2
  'app-activity',
1
3
  'app-rank',
2
4
  'app-seckill',
3
5
  'm-coupon',
4
6
  'scene-buy',
5
7
  'light-details',
6
8
  'member-paid-center',
7
9
  'member-paid-card',
8
10
  'member-paid-bind',
9
11
  'app-introduce',
10
12
  'app-search-result',
11
13
  if (window?.shopGlobalSwitch?.openAccessibilityLanguage) {
12
14
  Taro.nextTick(() => {
13
15
  const htmlRoot = document?.documentElement;
14
16
  htmlRoot && htmlRoot.setAttribute('lang', isLanguageForEn ? 'en' : 'zh-CN');
15
17
  });
16
18
  }
17
19
  const mainConfig = {
18
20
  childList: true,
19
21
  subtree: true,
20
22
  attributes: true,
21
23
  attributeFilter: ['auto-accessible'],
22
24
  };
23
25
  const mainObserver = new MutationObserver(function (mutations) {
24
26
  mutations.forEach(function (mutation) {
25
27
  if (mutation.type === 'childList') {
26
28
  mutation.addedNodes.forEach(function (node) {
27
29
  if (node.nodeType === Node.ELEMENT_NODE) {
28
30
  if (node.hasAttribute && node.getAttribute('auto-accessible') === 'true') {
29
31
  updateAccessibilityLabel(node);
30
32
  }
31
33
  const accessibleElements = node.querySelectorAll
32
34
  ? node.querySelectorAll('[auto-accessible="true"]')
33
35
  : [];
34
36
  accessibleElements.forEach(function (el) {
35
37
  updateAccessibilityLabel(el);
36
38
  });
37
39
  }
38
40
  });
39
41
  }
40
42
  if (mutation.type === 'attributes' && mutation.attributeName === 'auto-accessible') {
41
43
  if (mutation.target.getAttribute('auto-accessible') === 'true') {
42
44
  updateAccessibilityLabel(mutation.target);
43
45
  }
44
46
  }
45
47
  });
46
48
  });
47
49
  mainObserver.observe(document.body, mainConfig);
48
50
  setupGlobalContentObserver();
49
51
  const contentConfig = {
50
52
  characterData: true,
51
53
  childList: true,
52
54
  subtree: true,
53
55
  };
54
56
  const lastUpdateTime = new WeakMap();
55
57
  const THROTTLE_DELAY = 2000;
56
58
 
57
59
  function shouldUpdate(element) {
58
60
  const now = Date.now();
59
61
  const lastTime = lastUpdateTime.get(element);
60
62
  if (!lastTime || now - lastTime >= THROTTLE_DELAY) {
61
63
  lastUpdateTime.set(element, now);
62
64
  return true;
63
65
  }
64
66
  return false;
65
67
  }
66
68
  const globalContentObserver = new MutationObserver(function (mutations) {
67
69
  const affectedElements = new Set();
68
70
  mutations.forEach(function (mutation) {
69
71
  let targetElement = null;
70
72
  if (mutation.type === 'characterData') {
71
73
  targetElement = findClosestAccessibleElement(mutation.target);
72
74
  } else if (mutation.type === 'childList') {
73
75
  targetElement = findClosestAccessibleElement(mutation.target);
74
76
  }
75
77
  if (targetElement && targetElement.getAttribute('auto-accessible') === 'true') {
76
78
  affectedElements.add(targetElement);
77
79
  }
78
80
  });
79
81
  affectedElements.forEach(function (element) {
80
82
  if (shouldUpdate(element)) {
81
83
  updateAccessibilityLabel(element);
82
84
  } else {
83
85
  }
84
86
  });
85
87
  });
86
88
  globalContentObserver.observe(document.body, contentConfig);
87
89
  let current = node;
88
90
  if (current.nodeType === Node.TEXT_NODE) {
89
91
  current = current.parentElement;
90
92
  }
91
93
  while (current && current !== document.body) {
92
94
  if (current.getAttribute && current.getAttribute('auto-accessible') === 'true') {
93
95
  return current;
94
96
  }
95
97
  current = current.parentElement;
96
98
  }
97
99
  return null;
98
100
  if (!element) return;
99
101
  if (element.hasAttribute('aria-label')) {
100
102
  completeA11yAttributes(element);
101
103
  if (!element.getAttribute('data-auto-aria-label')) {
102
104
  return;
103
105
  }
104
106
  }
105
107
  const text = element.innerText;
106
108
  if (text) {
107
109
  const processedText = text.replace(/\r|\n/g, ' ').replace(/¥\s(\d+)(\s(\.\d+))?/, '¥$1$3');
108
110
  element.setAttribute('aria-label', processedText);
109
111
  element.setAttribute('data-auto-aria-label', 'true');
110
112
  completeA11yAttributes(element);
111
113
  }
112
114
  if (!element.hasAttribute('role')) {
113
115
  element.setAttribute('role', 'text');
114
116
  }
115
117
  if (!element.hasAttribute('tabindex')) {
116
118
  element.setAttribute('tabindex', 0);
117
119
  }
118
120
  const routerURL = 'router://JDShopModule/isAccessibilityIsRunning';
119
121
  const callBackName = `nativeGetAccessibilityIsRunning${Date.now()}`;
120
122
  let params: any = {
121
123
  routerURL,
122
124
  routerParam: null,
123
125
  callBackName,
124
126
  };
125
127
  return new Promise((resolve) => {
126
128
  window[callBackName] = (res) => {
127
129
  let data;
128
130
  try {
129
131
  data = typeof res === 'string' ? JSON.parse(res) : res;
130
132
  } catch (e) {
131
133
  console.error('JSON parse error:', e);
132
134
  data = {};
133
135
  }
134
136
  console.log('无障碍router回调成功:', res);
135
137
  const isRunning = data?.data?.isAccessibilityIsRunning || false;
136
138
  resolve(isRunning);
137
139
  };
138
140
  if (isJdAndIosDevice) {
139
141
  callRouterIOS(params);
140
142
  } else if (isJdAndAndroidDevice) {
141
143
  callRouterAndroid(params);
142
144
  }
143
145
  });
144
146
  setPageLanguage();
145
147
  let isRunning;
146
148
  try {
147
149
  isRunning = await getAccessibilityIsRunning();
148
150
  } catch (e) {
149
151
  console.error('getAccessibilityIsRunning() ~~ error:', e);
150
152
  }
151
153
  if (isRunning || autoAccessiblePagesWhitelist.includes(buildType)) {
152
154
  console.log('🚀 ~~ 页面启用无障碍自动支持方案 ~~ buildType:', buildType);
153
155
  setupMainObserver();
154
156
  } else {
155
157
  console.log('🚀 ~~ 页面不启用无障碍自动支持方案 !! buildType:', buildType);
156
158
  }
@@ -0,0 +1 @@
1
+ export default () => {};