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

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 (120) 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/token.jd.ts +1 -1
  13. package/dist/components/ErrorBoundary.tsx +1 -1
  14. package/dist/components/base/CountDown/index.tsx +1 -1
  15. package/dist/components/base/CustomVideo/index.tsx +1 -1
  16. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  17. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  18. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  19. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  20. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  21. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  22. package/dist/components/base/JdLoading/index.module.scss +0 -2
  23. package/dist/components/base/JdLoading/index.tsx +1 -1
  24. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  25. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  26. package/dist/components/base/LazyLoadImage/index.tsx +1 -1
  27. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  28. package/dist/components/base/NetworkDataError/const.ts +1 -1
  29. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  30. package/dist/components/base/Price/Base/index.tsx +1 -1
  31. package/dist/components/base/Price/Double/index.tsx +1 -1
  32. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  33. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  34. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  35. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  36. package/dist/components/floorItem.tsx +1 -1
  37. package/dist/components/isv/Floor/index.tsx +1 -1
  38. package/dist/components/remoteFloorItem.tsx +1 -1
  39. package/dist/config/env.ts +1 -1
  40. package/dist/interface/common.ts +1 -1
  41. package/dist/interface/component.ts +1 -1
  42. package/dist/interface/jumpEventReport.ts +1 -1
  43. package/dist/interface/service.ts +1 -1
  44. package/dist/jumpEventReport/base.ts +1 -1
  45. package/dist/jumpEventReport/const.ts +1 -1
  46. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  47. package/dist/jumpEventReport/index.ts +1 -1
  48. package/dist/jumpEventReport/index.weapp.ts +1 -1
  49. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  50. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  51. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  52. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  53. package/dist/jumpEventReport/web/report.ts +1 -1
  54. package/dist/jumpEventReport/web.base.ts +1 -1
  55. package/dist/jumpEventReport/web.jd.ts +1 -1
  56. package/dist/jumpEventReport/web.pc.ts +1 -1
  57. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  58. package/dist/language/en_US.json +179 -83
  59. package/dist/language/zh_CN.json +178 -82
  60. package/dist/language/zh_HK.json +178 -82
  61. package/dist/libs/openShopBridge.js +161 -0
  62. package/dist/libs/openShopBridge.min.js +1 -0
  63. package/dist/libs/taroAppReport.js +2 -2
  64. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  65. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  66. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  67. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  68. package/dist/open/api/index.ts +1 -1
  69. package/dist/open/api/shopMember.weapp.ts +1 -0
  70. package/dist/open/api/track.ts +1 -1
  71. package/dist/open/api/util.ts +1 -1
  72. package/dist/open/components/index.ts +1 -1
  73. package/dist/open/index.ts +1 -1
  74. package/dist/sass/app.h5.scss +6 -1
  75. package/dist/service/fetchGateway.ts +1 -1
  76. package/dist/service/fetchGateway.weapp.ts +1 -1
  77. package/dist/service/fetchJsonp.ts +1 -1
  78. package/dist/service/fetchJsonp.weapp.ts +1 -0
  79. package/dist/service/http/h5Http.ts +1 -1
  80. package/dist/service/http/http.ts +1 -1
  81. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  82. package/dist/service/requestServer.h5.ts +1 -1
  83. package/dist/service/requestServer.ts +1 -1
  84. package/dist/service/requestServer.weapp.ts +1 -1
  85. package/dist/utils/connectNativeJsBridge.ts +1 -1
  86. package/dist/utils/h5Utils.ts +1 -1
  87. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  88. package/dist/utils/harmonyCallRouter.ts +0 -0
  89. package/dist/utils/index.h5.ts +1 -1
  90. package/dist/utils/index.ts +1 -1
  91. package/dist/utils/index.weapp.ts +1 -1
  92. package/dist/utils/intersectionObserver.ts +1 -1
  93. package/dist/utils/sColor.weapp.ts +1 -0
  94. package/dist/utils/utils.ts +1 -1
  95. package/package.json +36 -38
  96. package/dist/common/index.dynamic.ts +0 -1
  97. package/dist/components/base/Dialog/index.dynamic.module.scss +0 -126
  98. package/dist/components/base/Dialog/index.dynamic.tsx +0 -1
  99. package/dist/components/base/DynamicTest/index.dynamic.module.scss +0 -15
  100. package/dist/components/base/DynamicTest/index.module.scss +0 -16
  101. package/dist/components/base/DynamicTest/index.tsx +0 -1
  102. package/dist/components/base/LazyLoadImage/index.dynamic.module.scss +0 -40
  103. package/dist/components/base/LazyLoadImage/index.dynamic.tsx +0 -1
  104. package/dist/components/base/NetworkDataError/index.dynamic.module.scss +0 -95
  105. package/dist/components/base/NetworkDataError/index.dynamic.tsx +0 -1
  106. package/dist/components/base/Price/Base/index.dynamic.module.scss +0 -63
  107. package/dist/components/base/Price/Base/index.dynamic.tsx +0 -1
  108. package/dist/components/base/Price/Double/index.dynamic.module.scss +0 -172
  109. package/dist/components/base/Price/Double/index.dynamic.tsx +0 -1
  110. package/dist/jumpEventReport/index.dynamic.ts +0 -1
  111. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  112. package/dist/open/api/shopMember.dynamic.ts +0 -1
  113. package/dist/open/components/index.dynamic.ts +0 -1
  114. package/dist/sass/app.dynamic.scss +0 -306
  115. package/dist/service/fetchGateway.h5.ts +0 -1
  116. package/dist/service/fetchJsonp.h5.ts +0 -1
  117. package/dist/service/http/colorSign.dynamic.ts +0 -1
  118. package/dist/utils/connectNativeJsBridge.dynamic.ts +0 -1
  119. package/dist/utils/priceUtils.js +0 -1
  120. /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
  if (window?.shopGlobalSwitch?.openAccessibilityLanguage) {
7
9
  Taro.nextTick(() => {
8
10
  const htmlRoot = document?.documentElement;
9
11
  htmlRoot && htmlRoot.setAttribute('lang', isLanguageForEn ? 'en' : 'zh-CN');
10
12
  });
11
13
  }
12
14
  const mainConfig = {
13
15
  childList: true,
14
16
  subtree: true,
15
17
  attributes: true,
16
18
  attributeFilter: ['auto-accessible'],
17
19
  };
18
20
  const mainObserver = new MutationObserver(function (mutations) {
19
21
  mutations.forEach(function (mutation) {
20
22
  if (mutation.type === 'childList') {
21
23
  mutation.addedNodes.forEach(function (node) {
22
24
  if (node.nodeType === Node.ELEMENT_NODE) {
23
25
  if (node.hasAttribute && node.getAttribute('auto-accessible') === 'true') {
24
26
  updateAccessibilityLabel(node);
25
27
  }
26
28
  const accessibleElements = node.querySelectorAll
27
29
  ? node.querySelectorAll('[auto-accessible="true"]')
28
30
  : [];
29
31
  accessibleElements.forEach(function (el) {
30
32
  updateAccessibilityLabel(el);
31
33
  });
32
34
  }
33
35
  });
34
36
  }
35
37
  if (mutation.type === 'attributes' && mutation.attributeName === 'auto-accessible') {
36
38
  if (mutation.target.getAttribute('auto-accessible') === 'true') {
37
39
  updateAccessibilityLabel(mutation.target);
38
40
  }
39
41
  }
40
42
  });
41
43
  });
42
44
  mainObserver.observe(document.body, mainConfig);
43
45
  setupGlobalContentObserver();
44
46
  const contentConfig = {
45
47
  characterData: true,
46
48
  childList: true,
47
49
  subtree: true,
48
50
  };
49
51
  const lastUpdateTime = new WeakMap();
50
52
  const THROTTLE_DELAY = 2000;
51
53
 
52
54
  function shouldUpdate(element) {
53
55
  const now = Date.now();
54
56
  const lastTime = lastUpdateTime.get(element);
55
57
  if (!lastTime || now - lastTime >= THROTTLE_DELAY) {
56
58
  lastUpdateTime.set(element, now);
57
59
  return true;
58
60
  }
59
61
  return false;
60
62
  }
61
63
  const globalContentObserver = new MutationObserver(function (mutations) {
62
64
  const affectedElements = new Set();
63
65
  mutations.forEach(function (mutation) {
64
66
  let targetElement = null;
65
67
  if (mutation.type === 'characterData') {
66
68
  targetElement = findClosestAccessibleElement(mutation.target);
67
69
  } else if (mutation.type === 'childList') {
68
70
  targetElement = findClosestAccessibleElement(mutation.target);
69
71
  }
70
72
  if (targetElement && targetElement.getAttribute('auto-accessible') === 'true') {
71
73
  affectedElements.add(targetElement);
72
74
  }
73
75
  });
74
76
  affectedElements.forEach(function (element) {
75
77
  if (shouldUpdate(element)) {
76
78
  updateAccessibilityLabel(element);
77
79
  } else {
78
80
  }
79
81
  });
80
82
  });
81
83
  globalContentObserver.observe(document.body, contentConfig);
82
84
  let current = node;
83
85
  if (current.nodeType === Node.TEXT_NODE) {
84
86
  current = current.parentElement;
85
87
  }
86
88
  while (current && current !== document.body) {
87
89
  if (current.getAttribute && current.getAttribute('auto-accessible') === 'true') {
88
90
  return current;
89
91
  }
90
92
  current = current.parentElement;
91
93
  }
92
94
  return null;
93
95
  if (!element) return;
94
96
  if (element.hasAttribute('aria-label')) {
95
97
  completeA11yAttributes(element);
96
98
  if (!element.getAttribute('data-auto-aria-label')) {
97
99
  return;
98
100
  }
99
101
  }
100
102
  const text = element.innerText;
101
103
  if (text) {
102
104
  const processedText = text.replace(/\r|\n/g, ' ').replace(/¥\s(\d+)(\s(\.\d+))?/, '¥$1$3');
103
105
  element.setAttribute('aria-label', processedText);
104
106
  element.setAttribute('data-auto-aria-label', 'true');
105
107
  completeA11yAttributes(element);
106
108
  }
107
109
  if (!element.hasAttribute('role')) {
108
110
  element.setAttribute('role', 'text');
109
111
  }
110
112
  if (!element.hasAttribute('tabindex')) {
111
113
  element.setAttribute('tabindex', 0);
112
114
  }
113
115
  console.log('🚀 ~~ 页面启用无障碍自动支持方案 ~~ buildType:', buildType);
114
116
  setupMainObserver();
115
117
  console.log('🚀 ~~ 页面不启用无障碍自动支持方案 !! buildType:', buildType);
File without changes