@mpxjs/webpack-plugin 2.10.3 → 2.10.4

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 (103) hide show
  1. package/lib/config.js +2 -1
  2. package/lib/index.js +1 -1
  3. package/lib/platform/json/wx/index.js +6 -3
  4. package/lib/platform/style/wx/index.js +23 -12
  5. package/lib/platform/template/wx/component-config/button.js +19 -2
  6. package/lib/platform/template/wx/component-config/canvas.js +4 -0
  7. package/lib/platform/template/wx/component-config/checkbox-group.js +4 -0
  8. package/lib/platform/template/wx/component-config/checkbox.js +4 -0
  9. package/lib/platform/template/wx/component-config/cover-image.js +7 -1
  10. package/lib/platform/template/wx/component-config/cover-view.js +4 -0
  11. package/lib/platform/template/wx/component-config/fix-component-name.js +3 -2
  12. package/lib/platform/template/wx/component-config/form.js +7 -1
  13. package/lib/platform/template/wx/component-config/icon.js +4 -0
  14. package/lib/platform/template/wx/component-config/image.js +7 -1
  15. package/lib/platform/template/wx/component-config/input.js +18 -3
  16. package/lib/platform/template/wx/component-config/label.js +4 -0
  17. package/lib/platform/template/wx/component-config/movable-area.js +7 -1
  18. package/lib/platform/template/wx/component-config/movable-view.js +12 -3
  19. package/lib/platform/template/wx/component-config/navigator.js +4 -0
  20. package/lib/platform/template/wx/component-config/picker-view-column.js +4 -0
  21. package/lib/platform/template/wx/component-config/picker-view.js +7 -1
  22. package/lib/platform/template/wx/component-config/picker.js +7 -1
  23. package/lib/platform/template/wx/component-config/radio-group.js +4 -0
  24. package/lib/platform/template/wx/component-config/radio.js +4 -0
  25. package/lib/platform/template/wx/component-config/rich-text.js +4 -0
  26. package/lib/platform/template/wx/component-config/root-portal.js +4 -0
  27. package/lib/platform/template/wx/component-config/scroll-view.js +10 -2
  28. package/lib/platform/template/wx/component-config/swiper-item.js +7 -1
  29. package/lib/platform/template/wx/component-config/swiper.js +12 -3
  30. package/lib/platform/template/wx/component-config/switch.js +4 -0
  31. package/lib/platform/template/wx/component-config/text.js +24 -3
  32. package/lib/platform/template/wx/component-config/textarea.js +17 -2
  33. package/lib/platform/template/wx/component-config/unsupported.js +7 -0
  34. package/lib/platform/template/wx/component-config/video.js +10 -2
  35. package/lib/platform/template/wx/component-config/view.js +11 -1
  36. package/lib/platform/template/wx/component-config/web-view.js +4 -0
  37. package/lib/platform/template/wx/index.js +42 -75
  38. package/lib/react/processScript.js +1 -18
  39. package/lib/runtime/components/react/dist/event.config.js +1 -0
  40. package/lib/runtime/components/react/dist/getInnerListeners.js +18 -7
  41. package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +1 -1
  42. package/lib/runtime/components/react/dist/mpx-inline-text.jsx +11 -0
  43. package/lib/runtime/components/react/dist/mpx-input.jsx +3 -6
  44. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +2 -2
  45. package/lib/runtime/components/react/dist/mpx-picker/date.jsx +194 -68
  46. package/lib/runtime/components/react/dist/mpx-picker/dateData.js +17 -0
  47. package/lib/runtime/components/react/dist/mpx-picker/index.jsx +178 -96
  48. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.jsx +79 -139
  49. package/lib/runtime/components/react/dist/mpx-picker/region.jsx +190 -90
  50. package/lib/runtime/components/react/dist/mpx-picker/selector.jsx +60 -75
  51. package/lib/runtime/components/react/dist/mpx-picker/time.jsx +100 -228
  52. package/lib/runtime/components/react/dist/{mpx-picker-view.jsx → mpx-picker-view/index.jsx} +3 -3
  53. package/lib/runtime/components/react/dist/{mpx-picker-view-column.jsx → mpx-picker-view-column/index.jsx} +64 -16
  54. package/lib/runtime/components/react/dist/{mpx-picker-view-column-item.jsx → mpx-picker-view-column/pickerViewColumnItem.jsx} +8 -5
  55. package/lib/runtime/components/react/dist/{pickerFaces.js → mpx-picker-view-column/pickerViewFaces.js} +6 -0
  56. package/lib/runtime/components/react/dist/mpx-popup/index.jsx +61 -0
  57. package/lib/runtime/components/react/dist/mpx-popup/popupBase.jsx +92 -0
  58. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +192 -25
  59. package/lib/runtime/components/react/dist/mpx-simple-text.jsx +8 -7
  60. package/lib/runtime/components/react/dist/mpx-simple-view.jsx +11 -15
  61. package/lib/runtime/components/react/dist/mpx-video.jsx +3 -3
  62. package/lib/runtime/components/react/dist/mpx-web-view.jsx +7 -4
  63. package/lib/runtime/components/react/dist/utils.jsx +2 -1
  64. package/lib/runtime/components/react/event.config.ts +2 -0
  65. package/lib/runtime/components/react/getInnerListeners.ts +28 -25
  66. package/lib/runtime/components/react/mpx-canvas/index.tsx +2 -2
  67. package/lib/runtime/components/react/mpx-inline-text.tsx +18 -0
  68. package/lib/runtime/components/react/mpx-input.tsx +2 -6
  69. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +1 -1
  70. package/lib/runtime/components/react/mpx-picker/date.tsx +226 -69
  71. package/lib/runtime/components/react/mpx-picker/dateData.ts +22 -0
  72. package/lib/runtime/components/react/mpx-picker/index.tsx +239 -118
  73. package/lib/runtime/components/react/mpx-picker/multiSelector.tsx +96 -139
  74. package/lib/runtime/components/react/mpx-picker/region.tsx +217 -89
  75. package/lib/runtime/components/react/mpx-picker/selector.tsx +75 -80
  76. package/lib/runtime/components/react/mpx-picker/time.tsx +119 -236
  77. package/lib/runtime/components/react/mpx-picker/type.ts +85 -71
  78. package/lib/runtime/components/react/{mpx-picker-view.tsx → mpx-picker-view/index.tsx} +7 -7
  79. package/lib/runtime/components/react/{mpx-picker-view-column.tsx → mpx-picker-view-column/index.tsx} +70 -19
  80. package/lib/runtime/components/react/{mpx-picker-view-column-item.tsx → mpx-picker-view-column/pickerViewColumnItem.tsx} +8 -5
  81. package/lib/runtime/components/react/{pickerFaces.ts → mpx-picker-view-column/pickerViewFaces.ts} +7 -0
  82. package/lib/runtime/components/react/mpx-popup/index.tsx +86 -0
  83. package/lib/runtime/components/react/mpx-popup/popupBase.tsx +130 -0
  84. package/lib/runtime/components/react/mpx-scroll-view.tsx +249 -43
  85. package/lib/runtime/components/react/mpx-simple-text.tsx +10 -8
  86. package/lib/runtime/components/react/mpx-simple-view.tsx +11 -16
  87. package/lib/runtime/components/react/mpx-video.tsx +2 -2
  88. package/lib/runtime/components/react/mpx-web-view.tsx +7 -4
  89. package/lib/runtime/components/react/types/getInnerListeners.d.ts +5 -1
  90. package/lib/runtime/components/react/types/global.d.ts +1 -1
  91. package/lib/runtime/components/react/utils.tsx +3 -2
  92. package/lib/runtime/components/web/mini-video-controls.min.js +1 -1
  93. package/lib/runtime/components/web/mpx-input.vue +1 -1
  94. package/lib/runtime/stringify.wxs +2 -2
  95. package/lib/template-compiler/compiler.js +8 -8
  96. package/lib/utils/env.js +1 -1
  97. package/package.json +4 -5
  98. /package/lib/runtime/components/react/dist/{pickerVIewContext.js → mpx-picker-view/pickerVIewContext.js} +0 -0
  99. /package/lib/runtime/components/react/dist/{pickerViewIndicator.jsx → mpx-picker-view-column/pickerViewIndicator.jsx} +0 -0
  100. /package/lib/runtime/components/react/dist/{pickerViewMask.jsx → mpx-picker-view-column/pickerViewMask.jsx} +0 -0
  101. /package/lib/runtime/components/react/{pickerVIewContext.ts → mpx-picker-view/pickerVIewContext.ts} +0 -0
  102. /package/lib/runtime/components/react/{pickerViewIndicator.tsx → mpx-picker-view-column/pickerViewIndicator.tsx} +0 -0
  103. /package/lib/runtime/components/react/{pickerViewMask.tsx → mpx-picker-view-column/pickerViewMask.tsx} +0 -0
package/lib/config.js CHANGED
@@ -554,5 +554,6 @@ module.exports = {
554
554
  }
555
555
  },
556
556
  ios: reactConfig,
557
- android: reactConfig
557
+ android: reactConfig,
558
+ harmony: reactConfig
558
559
  }
package/lib/index.js CHANGED
@@ -131,7 +131,7 @@ class MpxWebpackPlugin {
131
131
  errors.push('MpxWebpackPlugin supports mode to be "web" only when srcMode is set to "wx"!')
132
132
  }
133
133
  if (isReact(options.mode) && options.srcMode !== 'wx') {
134
- errors.push('MpxWebpackPlugin supports mode to be "ios" or "android" only when srcMode is set to "wx"!')
134
+ errors.push('MpxWebpackPlugin supports mode to be "ios" | "android" | "harmony" only when srcMode is set to "wx"!')
135
135
  }
136
136
  if (options.dynamicComponentRules && !options.dynamicRuntime) {
137
137
  errors.push('Please make sure you have set dynamicRuntime true in mpx webpack plugin config because you have use the dynamic runtime feature.')
@@ -158,7 +158,8 @@ module.exports = function getSpec ({ warn, error }) {
158
158
  test: 'usingComponents',
159
159
  web: fixComponentName('usingComponents'),
160
160
  ios: fixComponentName('usingComponents'),
161
- android: fixComponentName('usingComponents')
161
+ android: fixComponentName('usingComponents'),
162
+ harmony: fixComponentName('usingComponents')
162
163
  },
163
164
  {
164
165
  test: 'usingComponents',
@@ -268,7 +269,8 @@ module.exports = function getSpec ({ warn, error }) {
268
269
  'dd',
269
270
  'web',
270
271
  'ios',
271
- 'android'
272
+ 'android',
273
+ 'harmony'
272
274
  ],
273
275
 
274
276
  normalizeTest,
@@ -374,7 +376,8 @@ module.exports = function getSpec ({ warn, error }) {
374
376
  test: 'usingComponents',
375
377
  web: fixComponentName('usingComponents'),
376
378
  ios: fixComponentName('usingComponents'),
377
- android: fixComponentName('usingComponents')
379
+ android: fixComponentName('usingComponents'),
380
+ harmony: fixComponentName('usingComponents')
378
381
  },
379
382
  {
380
383
  test: 'usingComponents',
@@ -7,7 +7,9 @@ module.exports = function getSpec ({ warn, error }) {
7
7
  // React Native ios 不支持的 CSS property
8
8
  ios: /^(vertical-align)$/,
9
9
  // React Native android 不支持的 CSS property
10
- android: /^(text-decoration-style|text-decoration-color|shadow-offset|shadow-opacity|shadow-radius)$/
10
+ android: /^(text-decoration-style|text-decoration-color|shadow-offset|shadow-opacity|shadow-radius)$/,
11
+ // TODO: rnoh 文档暂未找到 css 属性支持说明,暂时同步 android,同时需要注意此处校验是否有缺失,类似 will-change 之类属性
12
+ harmony: /^(text-decoration-style|text-decoration-color|shadow-offset|shadow-opacity|shadow-radius)$/
11
13
  }
12
14
  // var(xx)
13
15
  const cssVariableExp = /var\(/
@@ -529,7 +531,7 @@ module.exports = function getSpec ({ warn, error }) {
529
531
  return false
530
532
  }
531
533
  const cssMap = formatAbbreviation({ prop, value, selector }, { mode })
532
- if (mode === 'android') return cssMap
534
+ if (mode === 'android' || mode === 'harmony') return cssMap
533
535
  // ios 阴影需要额外设置 shadowOpacity=1
534
536
  cssMap.push({
535
537
  prop: 'shadowOpacity',
@@ -539,54 +541,63 @@ module.exports = function getSpec ({ warn, error }) {
539
541
  }
540
542
 
541
543
  return {
542
- supportedModes: ['ios', 'android'],
544
+ supportedModes: ['ios', 'android', 'harmony'],
543
545
  rules: [
544
546
  { // 背景相关属性的处理
545
547
  test: /^(background|background-image|background-size|background-position)$/,
546
548
  ios: checkBackgroundImage,
547
- android: checkBackgroundImage
549
+ android: checkBackgroundImage,
550
+ harmony: checkBackgroundImage
548
551
  },
549
552
  { // margin padding 内外边距的处理
550
553
  test: /^(margin|padding|border-radius|border-width|border-color)$/,
551
554
  ios: formatCompositeVal,
552
- android: formatCompositeVal
555
+ android: formatCompositeVal,
556
+ harmony: formatCompositeVal
553
557
  },
554
558
  { // line-height 换算
555
559
  test: 'line-height',
556
560
  ios: formatLineHeight,
557
- android: formatLineHeight
561
+ android: formatLineHeight,
562
+ harmony: formatLineHeight
558
563
  },
559
564
  {
560
565
  test: 'transform',
561
566
  ios: formatTransform,
562
- android: formatTransform
567
+ android: formatTransform,
568
+ harmony: formatTransform
563
569
  },
564
570
  {
565
571
  test: 'flex',
566
572
  ios: formatFlex,
567
- android: formatFlex
573
+ android: formatFlex,
574
+ harmony: formatFlex
568
575
  },
569
576
  {
570
577
  test: 'font-family',
571
578
  ios: formatFontFamily,
572
- android: formatFontFamily
579
+ android: formatFontFamily,
580
+ harmony: formatFontFamily
573
581
  },
574
582
  {
575
583
  test: 'box-shadow',
576
584
  ios: formatBoxShadow,
577
- android: formatBoxShadow
585
+ android: formatBoxShadow,
586
+ harmony: formatBoxShadow
578
587
  },
579
588
  // 通用的简写格式匹配
580
589
  {
581
590
  test: new RegExp('^(' + Object.keys(AbbreviationMap).join('|') + ')$'),
582
591
  ios: formatAbbreviation,
583
- android: formatAbbreviation
592
+ android: formatAbbreviation,
593
+ harmony: formatAbbreviation
584
594
  },
585
595
  // 属性&属性值校验
586
596
  {
587
597
  test: () => true,
588
598
  ios: verification,
589
- android: verification
599
+ android: verification,
600
+ harmony: verification
590
601
  }
591
602
  ]
592
603
  }
@@ -37,6 +37,10 @@ module.exports = function ({ print }) {
37
37
  const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
38
38
  const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
39
39
 
40
+ const harmonyValueLogError = print({ platform: 'harmony', tag: TAG_NAME, isError: true, type: 'value' })
41
+ const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
42
+ const harmonyEventLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false, type: 'event' })
43
+
40
44
  return {
41
45
  test: TAG_NAME,
42
46
  web (tag, { el }) {
@@ -51,6 +55,10 @@ module.exports = function ({ print }) {
51
55
  el.isBuiltIn = true
52
56
  return 'mpx-button'
53
57
  },
58
+ harmony (tag, { el }) {
59
+ el.isBuiltIn = true
60
+ return 'mpx-button'
61
+ },
54
62
  props: [
55
63
  {
56
64
  test: 'open-type',
@@ -123,6 +131,7 @@ module.exports = function ({ print }) {
123
131
  }
124
132
  },
125
133
  ios ({ name, value }) {
134
+ // TODO 此处open-type无其他属性支持了?
126
135
  const supported = ['share']
127
136
  if (!supported.includes(value)) {
128
137
  iosValueLogError({ name, value })
@@ -133,6 +142,12 @@ module.exports = function ({ print }) {
133
142
  if (!supported.includes(value)) {
134
143
  androidValueLogError({ name, value })
135
144
  }
145
+ },
146
+ harmony ({ name, value }) {
147
+ const supported = ['share']
148
+ if (!supported.includes(value)) {
149
+ harmonyValueLogError({ name, value })
150
+ }
136
151
  }
137
152
  },
138
153
  {
@@ -173,7 +188,8 @@ module.exports = function ({ print }) {
173
188
  {
174
189
  test: /^(lang|from-type|hover-class|send-message-title|send-message-path|send-message-img|app-parameter|show-message-card|phone-number-no-quota-toast|bindgetuserinfo|bindcontact|createliveactivity|bindgetphonenumber|bindgetrealtimephonenumber|binderror|bindopensetting|bindlaunchapp|bindchooseavatar|bindagreeprivacyauthorization)$/,
175
190
  ios: iosPropLog,
176
- android: androidPropLog
191
+ android: androidPropLog,
192
+ harmony: harmonyPropLog
177
193
  }
178
194
  ],
179
195
  event: [
@@ -210,7 +226,8 @@ module.exports = function ({ print }) {
210
226
  {
211
227
  test: /^(getuserinfo|contact|getphonenumber|bindgetrealtimephonenumber|error|opensetting|launchapp|chooseavatar|agreeprivacyauthorization)$/,
212
228
  ios: iosEventLog,
213
- android: androidEventLog
229
+ android: androidEventLog,
230
+ harmony: harmonyEventLog
214
231
  }
215
232
  ]
216
233
  }
@@ -12,6 +12,10 @@ module.exports = function ({ print }) {
12
12
  el.isBuiltIn = true
13
13
  return 'mpx-canvas'
14
14
  },
15
+ harmony (tag, { el }) {
16
+ el.isBuiltIn = true
17
+ return 'mpx-canvas'
18
+ },
15
19
  ios (tag, { el }) {
16
20
  el.isBuiltIn = true
17
21
  return 'mpx-canvas'
@@ -14,6 +14,10 @@ module.exports = function () {
14
14
  android (tag, { el }) {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-checkbox-group'
17
+ },
18
+ harmony (tag, { el }) {
19
+ el.isBuiltIn = true
20
+ return 'mpx-checkbox-group'
17
21
  }
18
22
  }
19
23
  }
@@ -15,6 +15,10 @@ module.exports = function () {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-checkbox'
17
17
  },
18
+ harmony (tag, { el }) {
19
+ el.isBuiltIn = true
20
+ return 'mpx-checkbox'
21
+ },
18
22
  event: [
19
23
  {
20
24
  test: 'tap',
@@ -4,6 +4,7 @@ module.exports = function ({ print }) {
4
4
  const aliEventLog = print({ platform: 'ali', tag: TAG_NAME, isError: false, type: 'event' })
5
5
  const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
6
6
  const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
7
+ const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
7
8
  return {
8
9
  test: TAG_NAME,
9
10
  web (tag, { el }) {
@@ -21,6 +22,10 @@ module.exports = function ({ print }) {
21
22
  el.isBuiltIn = true
22
23
  return 'mpx-image'
23
24
  },
25
+ harmony (tag, { el }) {
26
+ el.isBuiltIn = true
27
+ return 'mpx-image'
28
+ },
24
29
  props: [
25
30
  {
26
31
  test: 'use-built-in',
@@ -31,7 +36,8 @@ module.exports = function ({ print }) {
31
36
  {
32
37
  test: /^(referrer-policy)$/,
33
38
  ios: iosPropLog,
34
- android: androidPropLog
39
+ android: androidPropLog,
40
+ harmony: harmonyPropLog
35
41
  }
36
42
  ],
37
43
  event: [
@@ -28,6 +28,10 @@ module.exports = function ({ print }) {
28
28
  el.isBuiltIn = true
29
29
  return 'mpx-view'
30
30
  },
31
+ harmony (tag, { el }) {
32
+ el.isBuiltIn = true
33
+ return 'mpx-view'
34
+ },
31
35
  props: [
32
36
  {
33
37
  test: 'scroll-top',
@@ -15,10 +15,11 @@ module.exports = function () {
15
15
  return {
16
16
  waterfall: true,
17
17
  skipNormalize: true,
18
- supportedModes: ['web', 'ios', 'android'],
18
+ supportedModes: ['web', 'ios', 'android', 'harmony'],
19
19
  test: (input) => isOriginTag(input) || isBuildInTag(input),
20
20
  web: handleComponentTag,
21
21
  ios: handleComponentTag,
22
- android: handleComponentTag
22
+ android: handleComponentTag,
23
+ harmony: handleComponentTag
23
24
  }
24
25
  }
@@ -9,6 +9,7 @@ module.exports = function ({ print }) {
9
9
  const qaPropLog = print({ platform: 'qa', tag: TAG_NAME, isError: false })
10
10
  const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
11
11
  const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
12
+ const harmonyPropLog = print({ platform: 'harmony', tag: TAG_NAME, isError: false })
12
13
 
13
14
  return {
14
15
  test: TAG_NAME,
@@ -25,6 +26,10 @@ module.exports = function ({ print }) {
25
26
  el.isBuiltIn = true
26
27
  return 'mpx-form'
27
28
  },
29
+ harmony (tag, { el }) {
30
+ el.isBuiltIn = true
31
+ return 'mpx-form'
32
+ },
28
33
  props: [
29
34
  {
30
35
  test: /^(report-submit-timeout)$/,
@@ -38,7 +43,8 @@ module.exports = function ({ print }) {
38
43
  web: webPropLog,
39
44
  qa: qaPropLog,
40
45
  ios: iosPropLog,
41
- android: androidPropLog
46
+ android: androidPropLog,
47
+ harmony: harmonyPropLog
42
48
  }
43
49
  ]
44
50
  }
@@ -14,6 +14,10 @@ module.exports = function () {
14
14
  android (tag, { el }) {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-icon'
17
+ },
18
+ harmony (tag, { el }) {
19
+ el.isBuiltIn = true
20
+ return 'mpx-icon'
17
21
  }
18
22
  }
19
23
  }
@@ -8,6 +8,7 @@ module.exports = function ({ print }) {
8
8
  const qaPropLog = print({ platform: 'qa', 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,6 +24,10 @@ module.exports = function ({ print }) {
23
24
  el.isBuiltIn = true
24
25
  return 'mpx-image'
25
26
  },
27
+ harmony (tag, { el }) {
28
+ el.isBuiltIn = true
29
+ return 'mpx-image'
30
+ },
26
31
  props: [
27
32
  {
28
33
  test: /^show-menu-by-longpress$/,
@@ -48,7 +53,8 @@ module.exports = function ({ print }) {
48
53
  {
49
54
  test: /^(show-menu-by-longpress|fade-in)$/,
50
55
  ios: iosPropLog,
51
- android: androidPropLog
56
+ android: androidPropLog,
57
+ harmony: harmonyPropLog
52
58
  }
53
59
  ]
54
60
  }
@@ -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)$/,
@@ -55,7 +62,7 @@ module.exports = function ({ print }) {
55
62
  test: 'type',
56
63
  web (prop) {
57
64
  let { name, value } = prop
58
- if (value === 'idcard' || value === 'digit') {
65
+ if (value === 'idcard') {
59
66
  webValueLog(prop)
60
67
  value = 'text'
61
68
  }
@@ -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
  }
@@ -10,6 +10,10 @@ module.exports = function () {
10
10
  android (tag, { el }) {
11
11
  el.isBuiltIn = true
12
12
  return 'mpx-label'
13
+ },
14
+ harmony (tag, { el }) {
15
+ el.isBuiltIn = true
16
+ return 'mpx-label'
13
17
  }
14
18
  }
15
19
  }
@@ -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)$/,
@@ -14,6 +14,10 @@ module.exports = function () {
14
14
  android (tag, { el }) {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-picker-view-column'
17
+ },
18
+ harmony (tag, { el }) {
19
+ el.isBuiltIn = true
20
+ return 'mpx-picker-view-column'
17
21
  }
18
22
  }
19
23
  }
@@ -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,10 @@ module.exports = function () {
14
14
  android (tag, { el }) {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-radio-group'
17
+ },
18
+ harmony (tag, { el }) {
19
+ el.isBuiltIn = true
20
+ return 'mpx-radio-group'
17
21
  }
18
22
  }
19
23
  }
@@ -15,6 +15,10 @@ module.exports = function () {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-radio'
17
17
  },
18
+ harmony (tag, { el }) {
19
+ el.isBuiltIn = true
20
+ return 'mpx-radio'
21
+ },
18
22
  event: [
19
23
  {
20
24
  test: 'tap',
@@ -20,6 +20,10 @@ module.exports = function ({ print }) {
20
20
  el.isBuiltIn = true
21
21
  return 'mpx-rich-text'
22
22
  },
23
+ harmony (tag, { el }) {
24
+ el.isBuiltIn = true
25
+ return 'mpx-rich-text'
26
+ },
23
27
  props: [
24
28
  {
25
29
  test: /^(space)$/,
@@ -10,6 +10,10 @@ module.exports = function ({ print }) {
10
10
  android (tag, { el }) {
11
11
  el.isBuiltIn = true
12
12
  return 'mpx-root-portal'
13
+ },
14
+ harmony (tag, { el }) {
15
+ el.isBuiltIn = true
16
+ return 'mpx-root-portal'
13
17
  }
14
18
  }
15
19
  }