@conecli/cone-render 0.10.1-shop3.9 → 0.10.1-shop3.90

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 (114) 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 +0 -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.tsx +1 -1
  20. package/dist/components/base/CountDown/index.tsx +1 -1
  21. package/dist/components/base/CustomScrollView/index.tsx +1 -1
  22. package/dist/components/base/CustomVideo/index.tsx +1 -1
  23. package/dist/components/base/CustomVideo/index.weapp.tsx +1 -0
  24. package/dist/components/base/ExposureSmart/index.h5.tsx +1 -1
  25. package/dist/components/base/ExposureSmart/index.tsx +1 -1
  26. package/dist/components/base/ExposureSmart/reporter.tsx +1 -1
  27. package/dist/components/base/InOrOutViewObserver/index.weapp.tsx +1 -0
  28. package/dist/components/base/ItemViewExposureSmart/index.tsx +1 -1
  29. package/dist/components/base/LazyLayoutLoad/index.tsx +1 -1
  30. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  31. package/dist/components/base/MobileCommonHeader/index.tsx +1 -1
  32. package/dist/components/base/MobileCommonHeader/index.weapp.tsx +1 -0
  33. package/dist/components/base/NetworkDataError/const.ts +1 -1
  34. package/dist/components/base/NetworkDataError/index.module.scss +118 -72
  35. package/dist/components/base/NetworkDataError/index.tsx +1 -1
  36. package/dist/components/base/Price/Base/index.module.scss +12 -0
  37. package/dist/components/base/Price/Base/index.tsx +1 -1
  38. package/dist/components/base/Price/Double/index.module.scss +25 -1
  39. package/dist/components/base/Price/Double/index.tsx +1 -1
  40. package/dist/components/base/ShopLeGaoTag/index.h5.module.scss +35 -0
  41. package/dist/components/base/ShopLeGaoTag/index.h5.tsx +1 -0
  42. package/dist/components/base/ShopLeGaoTag/index.module.scss +33 -0
  43. package/dist/components/base/ShopLeGaoTag/index.tsx +1 -0
  44. package/dist/components/debug/DebugLayout/index.module.scss +2 -2
  45. package/dist/components/floorItem.tsx +1 -1
  46. package/dist/components/isv/Floor/index.tsx +1 -1
  47. package/dist/components/remoteFloorItem.tsx +1 -1
  48. package/dist/config/env.ts +1 -1
  49. package/dist/interface/common.ts +1 -1
  50. package/dist/interface/component.ts +1 -1
  51. package/dist/interface/jumpEventReport.ts +1 -1
  52. package/dist/interface/service.ts +1 -1
  53. package/dist/jumpEventReport/base.ts +1 -1
  54. package/dist/jumpEventReport/const.ts +1 -1
  55. package/dist/jumpEventReport/createReportFloorData.ts +1 -1
  56. package/dist/jumpEventReport/index.h5.ts +1 -1
  57. package/dist/jumpEventReport/index.jd.ts +1 -1
  58. package/dist/jumpEventReport/index.weapp.ts +1 -1
  59. package/dist/jumpEventReport/jdJumpJdApp.ts +1 -1
  60. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  61. package/dist/jumpEventReport/logEventConfig.h5.ts +1 -0
  62. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  63. package/dist/jumpEventReport/web/report.ts +1 -1
  64. package/dist/jumpEventReport/web.base.ts +1 -1
  65. package/dist/jumpEventReport/web.jd.ts +1 -1
  66. package/dist/jumpEventReport/web.pc.ts +1 -1
  67. package/dist/jumpEventReport/web.tjm.ts +1 -1
  68. package/dist/jumpEventReport/web.wxapp.ts +1 -1
  69. package/dist/language/en_US.json +309 -0
  70. package/dist/language/zh_CN.json +309 -0
  71. package/dist/language/zh_HK.json +309 -0
  72. package/dist/libs/openShopBridge.js +161 -0
  73. package/dist/libs/openShopBridge.min.js +1 -0
  74. package/dist/libs/taroAppReport.js +2 -2
  75. package/dist/modules/ContainerFloorList/index.h5.module.scss +16 -2
  76. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  77. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  78. package/dist/modules/DecorateContainerFloorList/index.weapp.tsx +1 -0
  79. package/dist/open/api/environment.ts +1 -1
  80. package/dist/open/api/shopMember.ts +1 -1
  81. package/dist/open/api/shopMember.weapp.ts +1 -0
  82. package/dist/open/api/track.ts +1 -1
  83. package/dist/open/api/util.ts +1 -1
  84. package/dist/open/components/index.ts +1 -1
  85. package/dist/open/index.ts +1 -1
  86. package/dist/sass/app.h5.scss +27 -1
  87. package/dist/sass/base.scss +8 -4
  88. package/dist/service/fetchGateway.ts +1 -1
  89. package/dist/service/fetchGateway.weapp.ts +1 -1
  90. package/dist/service/fetchJsonp.weapp.ts +1 -0
  91. package/dist/service/http/const.ts +1 -1
  92. package/dist/service/http/h5Http.ts +1 -1
  93. package/dist/service/http/httpInterceptors.weapp.ts +1 -0
  94. package/dist/service/requestServer.h5.ts +1 -1
  95. package/dist/service/requestServer.ts +1 -1
  96. package/dist/service/requestServer.weapp.ts +1 -1
  97. package/dist/utils/connectNativeJsBridge.ts +1 -1
  98. package/dist/utils/h5Utils.ts +1 -1
  99. package/dist/utils/harmonyCallRouter.h5.ts +1 -0
  100. package/dist/utils/harmonyCallRouter.ts +0 -0
  101. package/dist/utils/index.h5.ts +1 -1
  102. package/dist/utils/index.ts +1 -1
  103. package/dist/utils/index.weapp.ts +1 -1
  104. package/dist/utils/jumpExtMapUtil.ts +1 -0
  105. package/dist/utils/log.ts +1 -0
  106. package/dist/utils/{sColor.js → sColor.ts} +1 -1
  107. package/dist/utils/sColor.weapp.ts +1 -0
  108. package/dist/utils/utils.ts +1 -1
  109. package/dist/wxapp/common/address_api/address_api_v2.js +1 -0
  110. package/dist/wxapp/common/user_info.js +1 -1
  111. package/package.json +162 -141
  112. package/dist/jumpEventReport/web/wqshop.report.ts +0 -1
  113. package/dist/utils/priceUtils.js +0 -1
  114. /package/dist/utils/{jumpExtMapUtil.js → jumpExtMapUtil.h5.ts} +0 -0
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
  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