@mpxjs/webpack-plugin 2.10.2 → 2.10.3-beta.10
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/lib/config.js +2 -1
- package/lib/dependencies/RecordPageConfigsMapDependency.js +45 -0
- package/lib/index.js +84 -52
- package/lib/platform/json/wx/index.js +6 -3
- package/lib/platform/style/wx/index.js +29 -16
- package/lib/platform/template/wx/component-config/button.js +19 -2
- package/lib/platform/template/wx/component-config/canvas.js +4 -0
- package/lib/platform/template/wx/component-config/checkbox-group.js +4 -0
- package/lib/platform/template/wx/component-config/checkbox.js +4 -0
- package/lib/platform/template/wx/component-config/cover-image.js +7 -1
- package/lib/platform/template/wx/component-config/cover-view.js +4 -0
- package/lib/platform/template/wx/component-config/fix-component-name.js +3 -2
- package/lib/platform/template/wx/component-config/form.js +7 -1
- package/lib/platform/template/wx/component-config/icon.js +4 -0
- package/lib/platform/template/wx/component-config/image.js +7 -1
- package/lib/platform/template/wx/component-config/input.js +17 -2
- package/lib/platform/template/wx/component-config/label.js +4 -0
- package/lib/platform/template/wx/component-config/movable-area.js +7 -1
- package/lib/platform/template/wx/component-config/movable-view.js +12 -3
- package/lib/platform/template/wx/component-config/navigator.js +4 -0
- package/lib/platform/template/wx/component-config/picker-view-column.js +4 -0
- package/lib/platform/template/wx/component-config/picker-view.js +7 -1
- package/lib/platform/template/wx/component-config/picker.js +7 -1
- package/lib/platform/template/wx/component-config/radio-group.js +4 -0
- package/lib/platform/template/wx/component-config/radio.js +4 -0
- package/lib/platform/template/wx/component-config/rich-text.js +4 -0
- package/lib/platform/template/wx/component-config/root-portal.js +4 -0
- package/lib/platform/template/wx/component-config/scroll-view.js +10 -2
- package/lib/platform/template/wx/component-config/swiper-item.js +7 -1
- package/lib/platform/template/wx/component-config/swiper.js +12 -3
- package/lib/platform/template/wx/component-config/switch.js +4 -0
- package/lib/platform/template/wx/component-config/text.js +7 -1
- package/lib/platform/template/wx/component-config/textarea.js +17 -2
- package/lib/platform/template/wx/component-config/unsupported.js +7 -0
- package/lib/platform/template/wx/component-config/video.js +10 -2
- package/lib/platform/template/wx/component-config/view.js +24 -2
- package/lib/platform/template/wx/component-config/web-view.js +4 -0
- package/lib/platform/template/wx/index.js +32 -13
- package/lib/react/index.js +0 -1
- package/lib/react/processJSON.js +13 -2
- package/lib/react/processScript.js +5 -3
- package/lib/react/processTemplate.js +18 -3
- package/lib/react/script-helper.js +18 -4
- package/lib/runtime/components/react/dist/mpx-input.jsx +15 -18
- package/lib/runtime/components/react/dist/{KeyboardAvoidingView.jsx → mpx-keyboard-avoiding-view.jsx} +25 -31
- package/lib/runtime/components/react/dist/mpx-picker-view-column.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.jsx +1 -2
- package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +10 -5
- package/lib/runtime/components/react/dist/mpx-simple-view.jsx +22 -0
- package/lib/runtime/components/react/dist/mpx-swiper-item.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-swiper.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-view.jsx +10 -5
- package/lib/runtime/components/react/dist/mpx-web-view.jsx +10 -7
- package/lib/runtime/components/react/dist/useAnimationHooks.js +46 -48
- package/lib/runtime/components/react/dist/utils.jsx +18 -7
- package/lib/runtime/components/react/mpx-input.tsx +17 -26
- package/lib/runtime/components/react/{KeyboardAvoidingView.tsx → mpx-keyboard-avoiding-view.tsx} +32 -41
- package/lib/runtime/components/react/mpx-picker-view-column.tsx +2 -2
- package/lib/runtime/components/react/mpx-portal/portal-manager.tsx +1 -2
- package/lib/runtime/components/react/mpx-scroll-view.tsx +13 -4
- package/lib/runtime/components/react/mpx-simple-view.tsx +32 -0
- package/lib/runtime/components/react/mpx-swiper-item.tsx +2 -2
- package/lib/runtime/components/react/mpx-swiper.tsx +4 -2
- package/lib/runtime/components/react/mpx-view.tsx +17 -10
- package/lib/runtime/components/react/mpx-web-view.tsx +15 -12
- package/lib/runtime/components/react/types/getInnerListeners.d.ts +1 -1
- package/lib/runtime/components/react/types/global.d.ts +1 -1
- package/lib/runtime/components/react/useAnimationHooks.ts +46 -48
- package/lib/runtime/components/react/utils.tsx +23 -11
- package/lib/runtime/components/web/mini-video-controls.min.js +1 -1
- package/lib/runtime/components/web/mpx-titlebar.vue +243 -0
- package/lib/runtime/optionProcessor.js +3 -2
- package/lib/style-compiler/index.js +8 -6
- package/lib/template-compiler/compiler.js +29 -14
- package/lib/utils/env.js +1 -1
- package/lib/utils/match-condition.js +14 -8
- package/lib/web/processJSON.js +1 -3
- package/lib/web/processMainScript.js +3 -1
- package/package.json +3 -3
- package/LICENSE +0 -433
- package/lib/runtime/components/react/dist/mpx-icon/icons/cancel.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/clear.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/download.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/info.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/search.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/success.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/success_no_circle.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/waiting.png +0 -0
- package/lib/runtime/components/react/dist/mpx-icon/icons/warn.png +0 -0
|
@@ -19,6 +19,9 @@ module.exports = function ({ print }) {
|
|
|
19
19
|
const androidValueLogError = print({ platform: 'android', tag: TAG_NAME, isError: true, type: 'value' })
|
|
20
20
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
21
21
|
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
22
|
+
const harmonyValueLogError = print({ platform: 'harmony', tag: TAG_NAME, isError: true, type: 'value' })
|
|
23
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
24
|
+
const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
22
25
|
|
|
23
26
|
return {
|
|
24
27
|
test: TAG_NAME,
|
|
@@ -34,6 +37,10 @@ module.exports = function ({ print }) {
|
|
|
34
37
|
el.isBuiltIn = true
|
|
35
38
|
return 'mpx-input'
|
|
36
39
|
},
|
|
40
|
+
harmony (tag, { el }) {
|
|
41
|
+
el.isBuiltIn = true
|
|
42
|
+
return 'mpx-input'
|
|
43
|
+
},
|
|
37
44
|
props: [
|
|
38
45
|
{
|
|
39
46
|
test: /^(cursor-spacing|auto-focus|adjust-position|hold-keyboard)$/,
|
|
@@ -75,6 +82,12 @@ module.exports = function ({ print }) {
|
|
|
75
82
|
if (notSupported.includes(value)) {
|
|
76
83
|
androidValueLogError({ name, value })
|
|
77
84
|
}
|
|
85
|
+
},
|
|
86
|
+
harmony ({ name, value }) {
|
|
87
|
+
const notSupported = ['safe-password', 'nickname']
|
|
88
|
+
if (notSupported.includes(value)) {
|
|
89
|
+
harmonyValueLogError({ name, value })
|
|
90
|
+
}
|
|
78
91
|
}
|
|
79
92
|
},
|
|
80
93
|
{
|
|
@@ -94,7 +107,8 @@ module.exports = function ({ print }) {
|
|
|
94
107
|
{
|
|
95
108
|
test: /^(always-embed|hold-keyboard|safe-password-.+)$/,
|
|
96
109
|
ios: iosPropLog,
|
|
97
|
-
android: androidPropLog
|
|
110
|
+
android: androidPropLog,
|
|
111
|
+
harmony: harmonyPropLog
|
|
98
112
|
}
|
|
99
113
|
],
|
|
100
114
|
event: [
|
|
@@ -113,7 +127,8 @@ module.exports = function ({ print }) {
|
|
|
113
127
|
{
|
|
114
128
|
test: /^(nicknamereview|onkeyboardheightchange|keyboard.+)$/,
|
|
115
129
|
ios: iosEventLog,
|
|
116
|
-
android: androidEventLog
|
|
130
|
+
android: androidEventLog,
|
|
131
|
+
harmony: harmonyEventLog
|
|
117
132
|
}
|
|
118
133
|
]
|
|
119
134
|
}
|
|
@@ -2,6 +2,7 @@ const TAG_NAME = 'movable-area'
|
|
|
2
2
|
|
|
3
3
|
module.exports = function ({ print }) {
|
|
4
4
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
5
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
5
6
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
6
7
|
return {
|
|
7
8
|
test: TAG_NAME,
|
|
@@ -13,6 +14,10 @@ module.exports = function ({ print }) {
|
|
|
13
14
|
el.isBuiltIn = true
|
|
14
15
|
return 'mpx-movable-area'
|
|
15
16
|
},
|
|
17
|
+
harmony (tag, { el }) {
|
|
18
|
+
el.isBuiltIn = true
|
|
19
|
+
return 'mpx-movable-area'
|
|
20
|
+
},
|
|
16
21
|
ios (tag, { el }) {
|
|
17
22
|
el.isBuiltIn = true
|
|
18
23
|
return 'mpx-movable-area'
|
|
@@ -21,7 +26,8 @@ module.exports = function ({ print }) {
|
|
|
21
26
|
{
|
|
22
27
|
test: /^(scale-area)$/,
|
|
23
28
|
ios: iosPropLog,
|
|
24
|
-
android: androidPropLog
|
|
29
|
+
android: androidPropLog,
|
|
30
|
+
harmony: harmonyPropLog
|
|
25
31
|
}
|
|
26
32
|
]
|
|
27
33
|
}
|
|
@@ -3,9 +3,11 @@ const TAG_NAME = 'movable-view'
|
|
|
3
3
|
module.exports = function ({ print }) {
|
|
4
4
|
const aliEventLog = print({ platform: 'ali', tag: TAG_NAME, isError: false, type: 'event' })
|
|
5
5
|
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
6
|
+
const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
6
7
|
const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
|
|
7
8
|
const qaPropLog = print({ platform: 'qa', tag: TAG_NAME, isError: false })
|
|
8
9
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
10
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
9
11
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
10
12
|
return {
|
|
11
13
|
test: TAG_NAME,
|
|
@@ -17,6 +19,10 @@ module.exports = function ({ print }) {
|
|
|
17
19
|
el.isBuiltIn = true
|
|
18
20
|
return 'mpx-movable-view'
|
|
19
21
|
},
|
|
22
|
+
harmony (tag, { el }) {
|
|
23
|
+
el.isBuiltIn = true
|
|
24
|
+
return 'mpx-movable-view'
|
|
25
|
+
},
|
|
20
26
|
ios (tag, { el }) {
|
|
21
27
|
el.isBuiltIn = true
|
|
22
28
|
return 'mpx-movable-view'
|
|
@@ -26,12 +32,14 @@ module.exports = function ({ print }) {
|
|
|
26
32
|
test: /^(out-of-bounds)$/,
|
|
27
33
|
ali: qaPropLog,
|
|
28
34
|
ios: iosPropLog,
|
|
29
|
-
android: androidPropLog
|
|
35
|
+
android: androidPropLog,
|
|
36
|
+
harmony: harmonyPropLog
|
|
30
37
|
},
|
|
31
38
|
{
|
|
32
39
|
test: /^(damping|friction|scale|scale-min|scale-max|scale-value)$/,
|
|
33
40
|
ios: iosPropLog,
|
|
34
|
-
android: androidPropLog
|
|
41
|
+
android: androidPropLog,
|
|
42
|
+
harmony: harmonyPropLog
|
|
35
43
|
}
|
|
36
44
|
],
|
|
37
45
|
event: [
|
|
@@ -42,7 +50,8 @@ module.exports = function ({ print }) {
|
|
|
42
50
|
{
|
|
43
51
|
test: /^(bindscale)$/,
|
|
44
52
|
ios: iosEventLog,
|
|
45
|
-
android: androidEventLog
|
|
53
|
+
android: androidEventLog,
|
|
54
|
+
harmony: harmonyEventLog
|
|
46
55
|
}
|
|
47
56
|
]
|
|
48
57
|
}
|
|
@@ -36,6 +36,10 @@ module.exports = function ({ print }) {
|
|
|
36
36
|
el.isBuiltIn = true
|
|
37
37
|
return 'mpx-navigator'
|
|
38
38
|
},
|
|
39
|
+
harmony (tag, { el }) {
|
|
40
|
+
el.isBuiltIn = true
|
|
41
|
+
return 'mpx-navigator'
|
|
42
|
+
},
|
|
39
43
|
props: [
|
|
40
44
|
{
|
|
41
45
|
test: /^(target|delta|app-id|path|extra-data|version|hover-stop-propagation)$/,
|
|
@@ -8,6 +8,7 @@ module.exports = function ({ print }) {
|
|
|
8
8
|
const jdEventLog = print({ platform: 'jd', tag: TAG_NAME, isError: false, type: 'event' })
|
|
9
9
|
const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
|
|
10
10
|
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
11
|
+
const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
11
12
|
|
|
12
13
|
return {
|
|
13
14
|
test: TAG_NAME,
|
|
@@ -23,6 +24,10 @@ module.exports = function ({ print }) {
|
|
|
23
24
|
el.isBuiltIn = true
|
|
24
25
|
return 'mpx-picker-view'
|
|
25
26
|
},
|
|
27
|
+
harmony (tag, { el }) {
|
|
28
|
+
el.isBuiltIn = true
|
|
29
|
+
return 'mpx-picker-view'
|
|
30
|
+
},
|
|
26
31
|
props: [
|
|
27
32
|
{
|
|
28
33
|
test: /^(indicator-class|mask-class)$/,
|
|
@@ -37,7 +42,8 @@ module.exports = function ({ print }) {
|
|
|
37
42
|
tt: ttEventLog,
|
|
38
43
|
jd: jdEventLog,
|
|
39
44
|
ios: iosEventLog,
|
|
40
|
-
android: androidEventLog
|
|
45
|
+
android: androidEventLog,
|
|
46
|
+
harmony: harmonyEventLog
|
|
41
47
|
}
|
|
42
48
|
]
|
|
43
49
|
}
|
|
@@ -10,6 +10,7 @@ module.exports = function ({ print }) {
|
|
|
10
10
|
const qaPropLog = print({ platform: 'qa', tag: TAG_NAME, isError: false })
|
|
11
11
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
12
12
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
13
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
13
14
|
|
|
14
15
|
return {
|
|
15
16
|
test: TAG_NAME,
|
|
@@ -25,6 +26,10 @@ module.exports = function ({ print }) {
|
|
|
25
26
|
el.isBuiltIn = true
|
|
26
27
|
return 'mpx-picker'
|
|
27
28
|
},
|
|
29
|
+
harmony (tag, { el }) {
|
|
30
|
+
el.isBuiltIn = true
|
|
31
|
+
return 'mpx-picker'
|
|
32
|
+
},
|
|
28
33
|
props: [
|
|
29
34
|
{
|
|
30
35
|
test: 'mode',
|
|
@@ -43,7 +48,8 @@ module.exports = function ({ print }) {
|
|
|
43
48
|
jd: jdPropLog,
|
|
44
49
|
qa: qaPropLog,
|
|
45
50
|
ios: iosPropLog,
|
|
46
|
-
android: androidPropLog
|
|
51
|
+
android: androidPropLog,
|
|
52
|
+
harmony: harmonyPropLog
|
|
47
53
|
}
|
|
48
54
|
],
|
|
49
55
|
event: [
|
|
@@ -14,6 +14,8 @@ module.exports = function ({ print }) {
|
|
|
14
14
|
const qqPropLog = print({ platform: 'qq', tag: TAG_NAME, isError: false })
|
|
15
15
|
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
16
16
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
17
|
+
const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
18
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
17
19
|
const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
|
|
18
20
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
19
21
|
|
|
@@ -27,6 +29,10 @@ module.exports = function ({ print }) {
|
|
|
27
29
|
el.isBuiltIn = true
|
|
28
30
|
return 'mpx-scroll-view'
|
|
29
31
|
},
|
|
32
|
+
harmony (tag, { el }) {
|
|
33
|
+
el.isBuiltIn = true
|
|
34
|
+
return 'mpx-scroll-view'
|
|
35
|
+
},
|
|
30
36
|
ios (tag, { el }) {
|
|
31
37
|
el.isBuiltIn = true
|
|
32
38
|
return 'mpx-scroll-view'
|
|
@@ -55,7 +61,8 @@ module.exports = function ({ print }) {
|
|
|
55
61
|
{
|
|
56
62
|
test: /^(refresher-threshold|enable-passive|scroll-anchoring|using-sticky|fast-deceleration|enable-flex)$/,
|
|
57
63
|
android: androidPropLog,
|
|
58
|
-
ios: iosPropLog
|
|
64
|
+
ios: iosPropLog,
|
|
65
|
+
harmony: harmonyPropLog
|
|
59
66
|
},
|
|
60
67
|
{
|
|
61
68
|
test: /^(refresher-default-style|refresher-background)$/,
|
|
@@ -88,7 +95,8 @@ module.exports = function ({ print }) {
|
|
|
88
95
|
{
|
|
89
96
|
test: /^(refresherpulling|refresherrestore|refresherabort)$/,
|
|
90
97
|
android: androidEventLog,
|
|
91
|
-
ios: iosEventLog
|
|
98
|
+
ios: iosEventLog,
|
|
99
|
+
harmony: harmonyEventLog
|
|
92
100
|
}
|
|
93
101
|
]
|
|
94
102
|
}
|
|
@@ -8,6 +8,7 @@ module.exports = function ({ print }) {
|
|
|
8
8
|
const qqPropLog = print({ platform: 'qq', tag: TAG_NAME, isError: false })
|
|
9
9
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
10
10
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
11
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
11
12
|
|
|
12
13
|
return {
|
|
13
14
|
test: TAG_NAME,
|
|
@@ -23,12 +24,17 @@ module.exports = function ({ print }) {
|
|
|
23
24
|
el.isBuiltIn = true
|
|
24
25
|
return 'mpx-swiper-item'
|
|
25
26
|
},
|
|
27
|
+
harmony (tag, { el }) {
|
|
28
|
+
el.isBuiltIn = true
|
|
29
|
+
return 'mpx-swiper-item'
|
|
30
|
+
},
|
|
26
31
|
props: [
|
|
27
32
|
{
|
|
28
33
|
test: /^(item-id)$/,
|
|
29
34
|
ali: aliPropLog,
|
|
30
35
|
ios: iosPropLog,
|
|
31
|
-
android: androidPropLog
|
|
36
|
+
android: androidPropLog,
|
|
37
|
+
harmony: harmonyPropLog
|
|
32
38
|
},
|
|
33
39
|
{
|
|
34
40
|
test: /^(skip-hidden-item-layout)$/,
|
|
@@ -14,6 +14,8 @@ module.exports = function ({ print }) {
|
|
|
14
14
|
const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
|
|
15
15
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
16
16
|
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
17
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
18
|
+
const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
17
19
|
|
|
18
20
|
return {
|
|
19
21
|
test: TAG_NAME,
|
|
@@ -29,6 +31,10 @@ module.exports = function ({ print }) {
|
|
|
29
31
|
el.isBuiltIn = true
|
|
30
32
|
return 'mpx-swiper'
|
|
31
33
|
},
|
|
34
|
+
harmony (tag, { el }) {
|
|
35
|
+
el.isBuiltIn = true
|
|
36
|
+
return 'mpx-swiper'
|
|
37
|
+
},
|
|
32
38
|
props: [
|
|
33
39
|
{
|
|
34
40
|
test: /^(display-multiple-items|skip-hidden-item-layout)$/,
|
|
@@ -61,7 +67,8 @@ module.exports = function ({ print }) {
|
|
|
61
67
|
{
|
|
62
68
|
test: /^(display-multiple-items|snap-to-edge|easing-function)$/,
|
|
63
69
|
ios: iosPropLog,
|
|
64
|
-
android: androidPropLog
|
|
70
|
+
android: androidPropLog,
|
|
71
|
+
harmony: harmonyPropLog
|
|
65
72
|
}
|
|
66
73
|
],
|
|
67
74
|
event: [
|
|
@@ -80,12 +87,14 @@ module.exports = function ({ print }) {
|
|
|
80
87
|
swan: baiduEventLog,
|
|
81
88
|
jd: jdEventLog,
|
|
82
89
|
ios: iosEventLog,
|
|
83
|
-
android: androidEventLog
|
|
90
|
+
android: androidEventLog,
|
|
91
|
+
harmony: harmonyEventLog
|
|
84
92
|
},
|
|
85
93
|
{
|
|
86
94
|
test: /^(animationfinish)$/,
|
|
87
95
|
ios: iosEventLog,
|
|
88
|
-
android: androidEventLog
|
|
96
|
+
android: androidEventLog,
|
|
97
|
+
harmony: harmonyEventLog
|
|
89
98
|
}
|
|
90
99
|
]
|
|
91
100
|
}
|
|
@@ -8,6 +8,7 @@ module.exports = function ({ print }) {
|
|
|
8
8
|
const qqPropLog = print({ platform: 'qq', tag: TAG_NAME, isError: false })
|
|
9
9
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
10
10
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
11
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
11
12
|
|
|
12
13
|
return {
|
|
13
14
|
test: TAG_NAME,
|
|
@@ -30,6 +31,10 @@ module.exports = function ({ print }) {
|
|
|
30
31
|
el.isBuiltIn = true
|
|
31
32
|
return 'mpx-text'
|
|
32
33
|
},
|
|
34
|
+
harmony (tag, { el }) {
|
|
35
|
+
el.isBuiltIn = true
|
|
36
|
+
return 'mpx-text'
|
|
37
|
+
},
|
|
33
38
|
props: [
|
|
34
39
|
{
|
|
35
40
|
test: /^(decode|user-select)$/,
|
|
@@ -45,7 +50,8 @@ module.exports = function ({ print }) {
|
|
|
45
50
|
{
|
|
46
51
|
test: /^(space|decode)$/,
|
|
47
52
|
ios: iosPropLog,
|
|
48
|
-
android: androidPropLog
|
|
53
|
+
android: androidPropLog,
|
|
54
|
+
harmony: harmonyPropLog
|
|
49
55
|
},
|
|
50
56
|
{
|
|
51
57
|
test: /^(selectable|space|decode|use-built-in)$/,
|
|
@@ -20,6 +20,9 @@ module.exports = function ({ print }) {
|
|
|
20
20
|
const androidValueLogError = print({ platform: 'android', tag: TAG_NAME, isError: true, type: 'value' })
|
|
21
21
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
22
22
|
const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
23
|
+
const harmonyValueLogError = print({ platform: 'harmony', tag: TAG_NAME, isError: true, type: 'value' })
|
|
24
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
25
|
+
const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
23
26
|
|
|
24
27
|
return {
|
|
25
28
|
test: TAG_NAME,
|
|
@@ -36,6 +39,10 @@ module.exports = function ({ print }) {
|
|
|
36
39
|
el.isBuiltIn = true
|
|
37
40
|
return 'mpx-textarea'
|
|
38
41
|
},
|
|
42
|
+
harmony (tag, { el }) {
|
|
43
|
+
el.isBuiltIn = true
|
|
44
|
+
return 'mpx-textarea'
|
|
45
|
+
},
|
|
39
46
|
props: [
|
|
40
47
|
{
|
|
41
48
|
test: /^(auto-focus|fixed|cursor-spacing|cursor|show-confirm-bar|selection-start|selection-end|adjust-position|hold-keyboard|disable-default-padding|confirm-type)$/,
|
|
@@ -75,12 +82,19 @@ module.exports = function ({ print }) {
|
|
|
75
82
|
if (notSupported.includes(value)) {
|
|
76
83
|
androidValueLogError({ name, value })
|
|
77
84
|
}
|
|
85
|
+
},
|
|
86
|
+
harmony ({ name, value }) {
|
|
87
|
+
const notSupported = ['return']
|
|
88
|
+
if (notSupported.includes(value)) {
|
|
89
|
+
harmonyValueLogError({ name, value })
|
|
90
|
+
}
|
|
78
91
|
}
|
|
79
92
|
},
|
|
80
93
|
{
|
|
81
94
|
test: /^(always-embed|hold-keyboard|disable-default-padding|adjust-keyboard-to|fixed|show-confirm-bar)$/,
|
|
82
95
|
ios: iosPropLog,
|
|
83
|
-
android: androidPropLog
|
|
96
|
+
android: androidPropLog,
|
|
97
|
+
harmony: harmonyPropLog
|
|
84
98
|
}
|
|
85
99
|
],
|
|
86
100
|
event: [
|
|
@@ -109,7 +123,8 @@ module.exports = function ({ print }) {
|
|
|
109
123
|
{
|
|
110
124
|
test: /^keyboard.+$/,
|
|
111
125
|
ios: iosEventLog,
|
|
112
|
-
android: androidEventLog
|
|
126
|
+
android: androidEventLog,
|
|
127
|
+
harmony: harmonyEventLog
|
|
113
128
|
}
|
|
114
129
|
]
|
|
115
130
|
}
|
|
@@ -26,6 +26,7 @@ module.exports = function ({ print }) {
|
|
|
26
26
|
const qaUnsupportedTagError = print({ platform: 'qa', isError: true, type: 'tag' })
|
|
27
27
|
const iosUnsupportedTagError = print({ platform: 'ios', isError: true, type: 'tag' })
|
|
28
28
|
const androidUnsupportedTagError = print({ platform: 'android', isError: true, type: 'tag' })
|
|
29
|
+
const harmonyUnsupportedTagError = print({ platform: 'harmony', isError: true, type: 'tag' })
|
|
29
30
|
|
|
30
31
|
const aliUnsupportedExp = new RegExp('^(' + ALI_UNSUPPORTED_TAG_NAME_ARR.join('|') + ')$')
|
|
31
32
|
const baiduUnsupportedExp = new RegExp('^(' + BAIDU_UNSUPPORTED_TAG_NAME_ARR.join('|') + ')$')
|
|
@@ -35,6 +36,7 @@ module.exports = function ({ print }) {
|
|
|
35
36
|
const qaUnsupportedExp = new RegExp('^(' + QA_UNSUPPORTED_TAG_NAME_ARR.join('|') + ')$')
|
|
36
37
|
const iosUnsupportedExp = new RegExp('^(' + RN_UNSUPPORTED_TAG_NAME_ARR.join('|') + ')$')
|
|
37
38
|
const androidUnsupportedExp = new RegExp('^(' + RN_UNSUPPORTED_TAG_NAME_ARR.join('|') + ')$')
|
|
39
|
+
const harmonyUnsupportedExp = new RegExp('^(' + RN_UNSUPPORTED_TAG_NAME_ARR.join('|') + ')$')
|
|
38
40
|
|
|
39
41
|
return [
|
|
40
42
|
{
|
|
@@ -76,6 +78,11 @@ module.exports = function ({ print }) {
|
|
|
76
78
|
supportedModes: ['android'],
|
|
77
79
|
test: androidUnsupportedExp,
|
|
78
80
|
android: androidUnsupportedTagError
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
supportedModes: ['harmony'],
|
|
84
|
+
test: harmonyUnsupportedExp,
|
|
85
|
+
harmony: harmonyUnsupportedTagError
|
|
79
86
|
}
|
|
80
87
|
]
|
|
81
88
|
}
|
|
@@ -15,6 +15,8 @@ module.exports = function ({ print }) {
|
|
|
15
15
|
const iosEventLogError = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
|
|
16
16
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
17
17
|
const androidEventLogError = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
|
|
18
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
19
|
+
const harmonyEventLogError = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
|
|
18
20
|
return {
|
|
19
21
|
test: TAG_NAME,
|
|
20
22
|
web (tag, { el }) {
|
|
@@ -25,6 +27,10 @@ module.exports = function ({ print }) {
|
|
|
25
27
|
el.isBuiltIn = true
|
|
26
28
|
return 'mpx-video'
|
|
27
29
|
},
|
|
30
|
+
harmony (tag, { el }) {
|
|
31
|
+
el.isBuiltIn = true
|
|
32
|
+
return 'mpx-video'
|
|
33
|
+
},
|
|
28
34
|
ios (tag, { el }) {
|
|
29
35
|
el.isBuiltIn = true
|
|
30
36
|
return 'mpx-video'
|
|
@@ -66,7 +72,8 @@ module.exports = function ({ print }) {
|
|
|
66
72
|
},
|
|
67
73
|
{
|
|
68
74
|
test: /^(duration|enable-danmu|danmu-btn|page-gesture|direction|show-progress|show-fullscreen-btn|show-center-play-btn|enable-progress-gesture|show-mute-btn|title|play-btn-position|enable-play-gesture|auto-pause-if-navigate|auto-pause-if-open-native|vslide-gesture|vslide-gesture-in-fullscreen|show-bottom-progress|ad-unit-id|poster-for-crawler|show-casting-button|picture-in-picture-mode|picture-in-picture-show-progress| picture-in-picture-init-position|enable-auto-rotation|show-snapshot-button|show-screen-lock-button|show-background-playback-button|background-poster|referrer-policy|is-live)$/,
|
|
69
|
-
android: androidPropLog
|
|
75
|
+
android: androidPropLog,
|
|
76
|
+
harmony: harmonyPropLog
|
|
70
77
|
}
|
|
71
78
|
],
|
|
72
79
|
event: [
|
|
@@ -108,7 +115,8 @@ module.exports = function ({ print }) {
|
|
|
108
115
|
},
|
|
109
116
|
{
|
|
110
117
|
test: /^(progress|enterpictureinpicture|leavepictureinpicture|castinguserselect|castingstatechange|castinginterrupt)$/,
|
|
111
|
-
android: androidEventLogError
|
|
118
|
+
android: androidEventLogError,
|
|
119
|
+
harmony: harmonyEventLogError
|
|
112
120
|
}
|
|
113
121
|
]
|
|
114
122
|
}
|
|
@@ -5,6 +5,7 @@ module.exports = function ({ print }) {
|
|
|
5
5
|
const qaEventLogError = print({ platform: 'qa', tag: TAG_NAME, isError: false, type: 'event' })
|
|
6
6
|
const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
|
|
7
7
|
const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
|
|
8
|
+
const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
|
|
8
9
|
|
|
9
10
|
return {
|
|
10
11
|
// 匹配标签名,可传递正则
|
|
@@ -25,10 +26,16 @@ module.exports = function ({ print }) {
|
|
|
25
26
|
},
|
|
26
27
|
ios (tag, { el }) {
|
|
27
28
|
el.isBuiltIn = true
|
|
28
|
-
return 'mpx-view'
|
|
29
|
+
return el.isSimple ? 'mpx-simple-view' : 'mpx-view'
|
|
29
30
|
},
|
|
30
31
|
android (tag, { el }) {
|
|
31
32
|
el.isBuiltIn = true
|
|
33
|
+
return el.isSimple ? 'mpx-simple-view' : 'mpx-view'
|
|
34
|
+
return 'mpx-view'
|
|
35
|
+
},
|
|
36
|
+
harmony (tag, { el }) {
|
|
37
|
+
el.isBuiltIn = true
|
|
38
|
+
return el.isSimple ? 'mpx-simple-view' : 'mpx-view'
|
|
32
39
|
return 'mpx-view'
|
|
33
40
|
},
|
|
34
41
|
qa (tag) {
|
|
@@ -46,7 +53,22 @@ module.exports = function ({ print }) {
|
|
|
46
53
|
}, {
|
|
47
54
|
test: /^(hover-stop-propagation)$/,
|
|
48
55
|
android: androidPropLog,
|
|
49
|
-
ios: iosPropLog
|
|
56
|
+
ios: iosPropLog,
|
|
57
|
+
harmony: harmonyPropLog
|
|
58
|
+
}, {
|
|
59
|
+
test: /^(is-simple)$/,
|
|
60
|
+
android (prop, { el }) {
|
|
61
|
+
el.isSimple = true
|
|
62
|
+
return false
|
|
63
|
+
},
|
|
64
|
+
harmony (prop, { el }) {
|
|
65
|
+
el.isSimple = true
|
|
66
|
+
return false
|
|
67
|
+
},
|
|
68
|
+
ios (prop, { el }) {
|
|
69
|
+
el.isSimple = true
|
|
70
|
+
return false
|
|
71
|
+
}
|
|
50
72
|
}
|
|
51
73
|
],
|
|
52
74
|
// 组件事件中的差异部分
|