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