@conecli/cone-render 0.10.1-shop-beta.23 → 0.10.1-shop-beta.26

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 (128) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/accessibility.h5.ts +1 -0
  3. package/dist/common/accessibility.ts +0 -0
  4. package/dist/common/const.ts +1 -1
  5. package/dist/common/index.h5.ts +1 -1
  6. package/dist/common/index.jd.ts +1 -1
  7. package/dist/common/index.ts +1 -1
  8. package/dist/common/index.weapp.ts +1 -1
  9. package/dist/common/jdplayerSdk.weapp.tsx +1 -0
  10. package/dist/common/jssdk.weapp.ts +1 -0
  11. package/dist/common/pageType.ts +1 -1
  12. package/dist/common/token/index.h5.ts +1 -1
  13. package/dist/common/token/token.jd.ts +1 -1
  14. package/dist/common/wxappApi.ascf.ts +1 -0
  15. package/dist/components/ErrorBoundary.tsx +1 -1
  16. package/dist/components/base/CountDown/index.tsx +1 -1
  17. package/dist/components/base/CustomVideo/index.tsx +1 -1
  18. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  19. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  20. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  21. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  22. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  23. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  24. package/dist/components/base/JdLoading/index.module.scss +0 -2
  25. package/dist/components/base/JdLoading/index.tsx +1 -1
  26. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  27. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  28. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  29. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  30. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  31. package/dist/components/base/NetworkDataError/const.ts +1 -1
  32. package/dist/components/base/NetworkDataError/index.module.scss +1 -1
  33. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  34. package/dist/components/base/Price/Base/index.tsx +1 -1
  35. package/dist/components/base/Price/Double/index.module.scss +1 -1
  36. package/dist/components/base/Price/Double/index.tsx +1 -1
  37. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  38. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  39. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  40. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  41. package/dist/components/floorItem.tsx +1 -1
  42. package/dist/components/isv/Floor/index.tsx +1 -1
  43. package/dist/components/remoteFloorItem.tsx +1 -1
  44. package/dist/config/env.ts +1 -1
  45. package/dist/interface/common.ts +1 -1
  46. package/dist/interface/component.ts +1 -1
  47. package/dist/interface/jumpEventReport.ts +1 -1
  48. package/dist/interface/service.ts +1 -1
  49. package/dist/jumpEventReport/base.ts +1 -1
  50. package/dist/jumpEventReport/const.ts +1 -1
  51. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  52. package/dist/jumpEventReport/index.h5.ts +1 -1
  53. package/dist/jumpEventReport/index.ts +1 -1
  54. package/dist/jumpEventReport/index.weapp.ts +1 -1
  55. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  56. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  57. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  58. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  59. package/dist/jumpEventReport/web/report.ts +1 -1
  60. package/dist/jumpEventReport/web.base.ts +1 -1
  61. package/dist/jumpEventReport/web.jd.ts +1 -1
  62. package/dist/jumpEventReport/web.pc.ts +1 -1
  63. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  64. package/dist/language/en_US.json +233 -83
  65. package/dist/language/zh_CN.json +232 -82
  66. package/dist/language/zh_HK.json +232 -82
  67. package/dist/libs/openShopBridge.js +161 -0
  68. package/dist/libs/openShopBridge.min.js +1 -0
  69. package/dist/libs/taroAppReport.js +2 -2
  70. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  71. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  72. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  73. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  74. package/dist/open/api/index.ts +1 -1
  75. package/dist/open/api/shopMember.ts +1 -1
  76. package/dist/open/api/shopMember.weapp.ts +1 -0
  77. package/dist/open/api/track.ts +1 -1
  78. package/dist/open/api/util.ts +1 -1
  79. package/dist/open/components/index.ts +1 -1
  80. package/dist/open/index.ts +1 -1
  81. package/dist/sass/app.h5.scss +6 -1
  82. package/dist/sass/base.scss +8 -4
  83. package/dist/service/fetchGateway.ts +1 -1
  84. package/dist/service/fetchGateway.weapp.ts +1 -1
  85. package/dist/service/fetchJsonp.ts +1 -1
  86. package/dist/service/fetchJsonp.weapp.ts +1 -0
  87. package/dist/service/http/h5Http.ts +1 -1
  88. package/dist/service/http/http.ts +1 -1
  89. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  90. package/dist/service/requestServer.h5.ts +1 -1
  91. package/dist/service/requestServer.ts +1 -1
  92. package/dist/service/requestServer.weapp.ts +1 -1
  93. package/dist/utils/connectNativeJsBridge.ts +1 -1
  94. package/dist/utils/h5Utils.ts +1 -1
  95. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  96. package/dist/utils/harmonyCallRouter.ts +0 -0
  97. package/dist/utils/index.h5.ts +1 -1
  98. package/dist/utils/index.ts +1 -1
  99. package/dist/utils/index.weapp.ts +1 -1
  100. package/dist/utils/intersectionObserver.ts +1 -1
  101. package/dist/utils/sColor.weapp.ts +1 -0
  102. package/dist/utils/utils.ts +1 -1
  103. package/package.json +36 -38
  104. package/dist/common/index.dynamic.ts +0 -1
  105. package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
  106. package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
  107. package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
  108. package/dist/components/base/DynamicTest/index.module.scss +0 -16
  109. package/dist/components/base/DynamicTest/index.tsx +0 -1
  110. package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
  111. package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
  112. package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
  113. package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
  114. package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
  115. package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
  116. package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
  117. package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
  118. package/dist/jumpEventReport/index.dynamic.ts +0 -1
  119. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  120. package/dist/open/api/shopMember.dynamic.ts +0 -1
  121. package/dist/open/components/index.dynamic.ts +0 -1
  122. package/dist/sass/app.dynamic.scss +0 -306
  123. package/dist/service/fetchGateway.h5.ts +0 -1
  124. package/dist/service/fetchJsonp.h5.ts +0 -1
  125. package/dist/service/http/colorSign.dynamic.ts +0 -1
  126. package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
  127. package/dist/utils/priceUtils.js +0 -1
  128. /package/dist/utils/{sColor.js → sColor.ts} +0 -0
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
  base: `${protocol}//conecli.com`,
7
6
  jshop2013: `${protocol}//conecli.com`,
8
7
  sale: `${protocol}//conecli.com`,
9
8
  mshop: `${protocol}//conecli.com`,
10
9
  pages: `${protocol}//${changeHostName}`,
11
10
  ztJshop: `${protocol}//conecli.com`,
12
11
  club: 'https://conecli.com',
13
12
  pm: `${protocol}//pm.3.cn`,
14
13
  pf: `${protocol}//pf.3.cn`,
15
14
  pcCoupon: `${protocol}//conecli.com`,
16
15
  fmall: `${protocol}//conecli.com`,
17
16
  lbs: `${protocol}//conecli.com`,
18
17
  yushou: `${protocol}//conecli.com`,
19
18
  wq: `${protocol}//wq.jd.com`,
20
19
  wqs: `${protocol}//conecli.com`,
21
20
  wqshop: `${protocol}//conecli.com`,
22
21
  shopMember: `${protocol}//conecli.com`,
23
22
  bean: `${protocol}//conecli.com`,
24
23
  mapi: `${protocol}//conecli.com`,
25
24
  api: isBetaServer ? `${protocol}//beta-api.m.jd.com` : `${protocol}//api.m.jd.com`,
26
25
  hkApi: isBetaServer ? `${protocol}//beta-color.jd.hk` : `${protocol}//color.jd.hk`,
27
26
  actJshop: `${protocol}//conecli.com`,
28
27
  msJshop: isBetaServer ? `${protocol}//conecli.com` : `${protocol}//conecli.com`,
29
28
  quark: 'https://conecli.com',
30
29
  ranking: `${protocol}//conecli.com`,
31
30
  iJshop: `${protocol}//conecli.com`,
32
31
  mobileSo: `${protocol}//conecli.com`,
33
32
  pcSo: `${protocol}//conecli.com`,
34
33
  capturehomeshare: `${protocol}//conecli.com`,
35
34
  jdcs: `${protocol}//conecli.com`,
36
35
  lives: `${protocol}//conecli.com`,
37
36
  mobileDetail: `${protocol}//conecli.com`,
38
37
  mobileHome: `${protocol}//conecli.com`,
39
38
  mobileLogin: `${protocol}//plogin.m.jd.com`,
40
39
  pcView: `${protocol}//mall.jd.com`,
41
40
  pcLogin: `${protocol}//passport.jd.com`,
42
41
  kpl: `${protocol}//conecli.com`,
43
42
  jxDomain: `${protocol}//st.jingxi.com`,
44
43
  ecoDomain: `${protocol}//conecli.com`,
45
44
  decorate: {
46
45
  preview: `${domain.iJshop}/mshop/edit/preview.json`,
47
46
  },
48
47
  userAddress: `${domain.fmall}/address/getDefaultAddress.html`,
49
48
  lbsLocation: `${domain.lbs}/o`,
50
49
  couponStatus: `${domain.base}/m/couponStatus.json`,
51
50
  addCart: `${domain.mapi}/cart/add.json`,
52
51
  receiveCoupon: `${domain.base}/m/couponGet.json`,
53
52
  areaStockState: `${domain.fmall}/ss/areaStockState/mget`,
54
53
  apiFunc: `${domain.api}/client.action`,
55
54
  hkApiFunc: `${domain.hkApi}/client.action`,
56
55
  follow: `${domain.wq}/fav/shop/AddShopFav`,
57
56
  unfollow: `${domain.wq}/fav/shop/DelShopFav`,
58
57
  isFollow: domain.fmall + '/rpc/vender/batchIsFollow',
59
58
  flowers: domain.fmall + '/rpc/vender/queryFollowedUserCount',
60
59
  serverTime: domain.actJshop + '/serverTime.html',
61
60
  followShop: 'followShop',
62
61
  getDefaultAddress: 'getDefaultAddress',
63
62
  userInfo: `${domain.msJshop}/user/info`,
64
63
  font: `${domain.quark}/font/ttf`,
65
64
  isLogin: `${domain.mobileLogin}/cgi-bin/ml/islogin`,
65
+ import { protocol, isBetaServer, isH5 } from '../config/env';
66
66
  ? redirectDomainList.includes(location?.hostname)
67
67
  ? defaultDomain
68
68
  : location?.hostname
69
69
  : defaultDomain;
70
70
  base: `${protocol}//conecli.com`,
71
71
  jshop2013: `${protocol}//conecli.com`,
72
72
  sale: `${protocol}//conecli.com`,
73
73
  mshop: `${protocol}//conecli.com`,
74
74
  pages: `${protocol}//${changeHostName}`,
75
75
  ztJshop: `${protocol}//conecli.com`,
76
76
  club: 'https://conecli.com',
77
77
  pm: `${protocol}//pm.3.cn`,
78
78
  pf: `${protocol}//pf.3.cn`,
79
79
  pcCoupon: `${protocol}//conecli.com`,
80
80
  fmall: `${protocol}//conecli.com`,
81
81
  lbs: `${protocol}//conecli.com`,
82
82
  yushou: `${protocol}//conecli.com`,
83
83
  wq: `${protocol}//wq.jd.com`,
84
84
  wqs: `${protocol}//conecli.com`,
85
85
  wqshop: `${protocol}//conecli.com`,
86
86
  shopMember: `${protocol}//conecli.com`,
87
87
  bean: `${protocol}//conecli.com`,
88
88
  mapi: `${protocol}//conecli.com`,
89
89
  api: isBetaServer ? `${protocol}//beta-api.m.jd.com` : `${protocol}//api.m.jd.com`,
90
90
  hkApi: isBetaServer ? `${protocol}//beta-color.jd.hk` : `${protocol}//color.jd.hk`,
91
91
  actJshop: `${protocol}//conecli.com`,
92
92
  msJshop: isBetaServer ? `${protocol}//conecli.com` : `${protocol}//conecli.com`,
93
93
  quark: 'https://conecli.com',
94
94
  ranking: `${protocol}//conecli.com`,
95
95
  iJshop: `${protocol}//conecli.com`,
96
96
  mobileSo: `${protocol}//conecli.com`,
97
97
  pcSo: `${protocol}//conecli.com`,
98
98
  capturehomeshare: `${protocol}//conecli.com`,
99
99
  jdcs: `${protocol}//conecli.com`,
100
100
  lives: `${protocol}//conecli.com`,
101
101
  mobileDetail: `${protocol}//conecli.com`,
102
102
  mobileHome: `${protocol}//conecli.com`,
103
103
  mobileLogin: `${protocol}//plogin.m.jd.com`,
104
104
  pcView: `${protocol}//mall.jd.com`,
105
105
  pcLogin: `${protocol}//passport.jd.com`,
106
106
  kpl: `${protocol}//conecli.com`,
107
107
  jxDomain: `${protocol}//st.jingxi.com`,
108
108
  ecoDomain: `${protocol}//conecli.com`,
109
109
  p: `${protocol}//conecli.com`,
110
110
  decorate: {
111
111
  preview: `${domain.iJshop}/mshop/edit/preview.json`,
112
112
  },
113
113
  userAddress: `${domain.fmall}/address/getDefaultAddress.html`,
114
114
  lbsLocation: `${domain.lbs}/o`,
115
115
  couponStatus: `${domain.base}/m/couponStatus.json`,
116
116
  addCart: `${domain.mapi}/cart/add.json`,
117
117
  receiveCoupon: `${domain.base}/m/couponGet.json`,
118
118
  areaStockState: `${domain.fmall}/ss/areaStockState/mget`,
119
119
  apiFunc: `${domain.api}/client.action`,
120
120
  hkApiFunc: `${domain.hkApi}/client.action`,
121
121
  follow: `${domain.wq}/fav/shop/AddShopFav`,
122
122
  unfollow: `${domain.wq}/fav/shop/DelShopFav`,
123
123
  isFollow: domain.fmall + '/rpc/vender/batchIsFollow',
124
124
  flowers: domain.fmall + '/rpc/vender/queryFollowedUserCount',
125
125
  serverTime: domain.actJshop + '/serverTime.html',
126
126
  followShop: 'followShop',
127
127
  getDefaultAddress: 'getDefaultAddress',
128
128
  userInfo: `${domain.msJshop}/user/info`,
129
129
  font: `${domain.quark}/font/ttf`,
130
130
  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
  if (window?.shopGlobalSwitch?.openAccessibilityLanguage) {
11
13
  Taro.nextTick(() => {
12
14
  const htmlRoot = document?.documentElement;
13
15
  htmlRoot && htmlRoot.setAttribute('lang', isLanguageForEn ? 'en' : 'zh-CN');
14
16
  });
15
17
  }
16
18
  const mainConfig = {
17
19
  childList: true,
18
20
  subtree: true,
19
21
  attributes: true,
20
22
  attributeFilter: ['auto-accessible'],
21
23
  };
22
24
  const mainObserver = new MutationObserver(function (mutations) {
23
25
  mutations.forEach(function (mutation) {
24
26
  if (mutation.type === 'childList') {
25
27
  mutation.addedNodes.forEach(function (node) {
26
28
  if (node.nodeType === Node.ELEMENT_NODE) {
27
29
  if (node.hasAttribute && node.getAttribute('auto-accessible') === 'true') {
28
30
  updateAccessibilityLabel(node);
29
31
  }
30
32
  const accessibleElements = node.querySelectorAll
31
33
  ? node.querySelectorAll('[auto-accessible="true"]')
32
34
  : [];
33
35
  accessibleElements.forEach(function (el) {
34
36
  updateAccessibilityLabel(el);
35
37
  });
36
38
  }
37
39
  });
38
40
  }
39
41
  if (mutation.type === 'attributes' && mutation.attributeName === 'auto-accessible') {
40
42
  if (mutation.target.getAttribute('auto-accessible') === 'true') {
41
43
  updateAccessibilityLabel(mutation.target);
42
44
  }
43
45
  }
44
46
  });
45
47
  });
46
48
  mainObserver.observe(document.body, mainConfig);
47
49
  setupGlobalContentObserver();
48
50
  const contentConfig = {
49
51
  characterData: true,
50
52
  childList: true,
51
53
  subtree: true,
52
54
  };
53
55
  const lastUpdateTime = new WeakMap();
54
56
  const THROTTLE_DELAY = 2000;
55
57
 
56
58
  function shouldUpdate(element) {
57
59
  const now = Date.now();
58
60
  const lastTime = lastUpdateTime.get(element);
59
61
  if (!lastTime || now - lastTime >= THROTTLE_DELAY) {
60
62
  lastUpdateTime.set(element, now);
61
63
  return true;
62
64
  }
63
65
  return false;
64
66
  }
65
67
  const globalContentObserver = new MutationObserver(function (mutations) {
66
68
  const affectedElements = new Set();
67
69
  mutations.forEach(function (mutation) {
68
70
  let targetElement = null;
69
71
  if (mutation.type === 'characterData') {
70
72
  targetElement = findClosestAccessibleElement(mutation.target);
71
73
  } else if (mutation.type === 'childList') {
72
74
  targetElement = findClosestAccessibleElement(mutation.target);
73
75
  }
74
76
  if (targetElement && targetElement.getAttribute('auto-accessible') === 'true') {
75
77
  affectedElements.add(targetElement);
76
78
  }
77
79
  });
78
80
  affectedElements.forEach(function (element) {
79
81
  if (shouldUpdate(element)) {
80
82
  updateAccessibilityLabel(element);
81
83
  } else {
82
84
  }
83
85
  });
84
86
  });
85
87
  globalContentObserver.observe(document.body, contentConfig);
86
88
  let current = node;
87
89
  if (current.nodeType === Node.TEXT_NODE) {
88
90
  current = current.parentElement;
89
91
  }
90
92
  while (current && current !== document.body) {
91
93
  if (current.getAttribute && current.getAttribute('auto-accessible') === 'true') {
92
94
  return current;
93
95
  }
94
96
  current = current.parentElement;
95
97
  }
96
98
  return null;
97
99
  if (!element) return;
98
100
  if (element.hasAttribute('aria-label')) {
99
101
  completeA11yAttributes(element);
100
102
  if (!element.getAttribute('data-auto-aria-label')) {
101
103
  return;
102
104
  }
103
105
  }
104
106
  const text = element.innerText;
105
107
  if (text) {
106
108
  const processedText = text.replace(/\r|\n/g, ' ').replace(/¥\s(\d+)(\s(\.\d+))?/, '¥$1$3');
107
109
  element.setAttribute('aria-label', processedText);
108
110
  element.setAttribute('data-auto-aria-label', 'true');
109
111
  completeA11yAttributes(element);
110
112
  }
111
113
  if (!element.hasAttribute('role')) {
112
114
  element.setAttribute('role', 'text');
113
115
  }
114
116
  if (!element.hasAttribute('tabindex')) {
115
117
  element.setAttribute('tabindex', 0);
116
118
  }
117
119
  console.log('🚀 ~~ 页面启用无障碍自动支持方案 ~~ buildType:', buildType);
118
120
  setupMainObserver();
119
121
  console.log('🚀 ~~ 页面不启用无障碍自动支持方案 !! buildType:', buildType);
File without changes