@mpxjs/webpack-plugin 2.10.3 → 2.10.4-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.
Files changed (155) 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 -4
  4. package/lib/platform/style/wx/index.js +42 -30
  5. package/lib/platform/template/wx/component-config/button.js +20 -3
  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/index.js +5 -1
  16. package/lib/platform/template/wx/component-config/input.js +19 -4
  17. package/lib/platform/template/wx/component-config/label.js +4 -0
  18. package/lib/platform/template/wx/component-config/movable-area.js +7 -1
  19. package/lib/platform/template/wx/component-config/movable-view.js +12 -3
  20. package/lib/platform/template/wx/component-config/navigator.js +4 -0
  21. package/lib/platform/template/wx/component-config/picker-view-column.js +4 -0
  22. package/lib/platform/template/wx/component-config/picker-view.js +7 -1
  23. package/lib/platform/template/wx/component-config/picker.js +7 -1
  24. package/lib/platform/template/wx/component-config/radio-group.js +4 -0
  25. package/lib/platform/template/wx/component-config/radio.js +4 -0
  26. package/lib/platform/template/wx/component-config/rich-text.js +4 -0
  27. package/lib/platform/template/wx/component-config/root-portal.js +4 -0
  28. package/lib/platform/template/wx/component-config/scroll-view.js +10 -2
  29. package/lib/platform/template/wx/component-config/sticky-header.js +23 -0
  30. package/lib/platform/template/wx/component-config/sticky-section.js +23 -0
  31. package/lib/platform/template/wx/component-config/swiper-item.js +7 -1
  32. package/lib/platform/template/wx/component-config/swiper.js +12 -3
  33. package/lib/platform/template/wx/component-config/switch.js +4 -0
  34. package/lib/platform/template/wx/component-config/text.js +24 -3
  35. package/lib/platform/template/wx/component-config/textarea.js +17 -2
  36. package/lib/platform/template/wx/component-config/unsupported.js +7 -0
  37. package/lib/platform/template/wx/component-config/video.js +10 -2
  38. package/lib/platform/template/wx/component-config/view.js +11 -1
  39. package/lib/platform/template/wx/component-config/web-view.js +4 -0
  40. package/lib/platform/template/wx/index.js +42 -75
  41. package/lib/react/processJSON.js +7 -6
  42. package/lib/react/processScript.js +1 -18
  43. package/lib/runtime/components/react/context.ts +12 -3
  44. package/lib/runtime/components/react/dist/context.js +4 -1
  45. package/lib/runtime/components/react/dist/event.config.js +0 -1
  46. package/lib/runtime/components/react/dist/getInnerListeners.js +127 -142
  47. package/lib/runtime/components/react/dist/mpx-button.jsx +4 -5
  48. package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +4 -5
  49. package/lib/runtime/components/react/dist/mpx-checkbox-group.jsx +2 -2
  50. package/lib/runtime/components/react/dist/mpx-checkbox.jsx +2 -3
  51. package/lib/runtime/components/react/dist/mpx-form.jsx +2 -2
  52. package/lib/runtime/components/react/dist/mpx-icon/index.jsx +2 -2
  53. package/lib/runtime/components/react/dist/mpx-image.jsx +2 -2
  54. package/lib/runtime/components/react/dist/mpx-inline-text.jsx +11 -0
  55. package/lib/runtime/components/react/dist/mpx-input.jsx +20 -17
  56. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +24 -31
  57. package/lib/runtime/components/react/dist/mpx-label.jsx +2 -3
  58. package/lib/runtime/components/react/dist/mpx-movable-area.jsx +2 -2
  59. package/lib/runtime/components/react/dist/mpx-movable-view.jsx +1 -1
  60. package/lib/runtime/components/react/dist/mpx-navigator.jsx +11 -3
  61. package/lib/runtime/components/react/dist/mpx-picker/date.jsx +194 -68
  62. package/lib/runtime/components/react/dist/mpx-picker/dateData.js +17 -0
  63. package/lib/runtime/components/react/dist/mpx-picker/index.jsx +180 -98
  64. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.jsx +79 -139
  65. package/lib/runtime/components/react/dist/mpx-picker/region.jsx +190 -90
  66. package/lib/runtime/components/react/dist/mpx-picker/selector.jsx +60 -75
  67. package/lib/runtime/components/react/dist/mpx-picker/time.jsx +100 -228
  68. package/lib/runtime/components/react/dist/{mpx-picker-view.jsx → mpx-picker-view/index.jsx} +5 -6
  69. package/lib/runtime/components/react/dist/{mpx-picker-view-column.jsx → mpx-picker-view-column/index.jsx} +64 -16
  70. package/lib/runtime/components/react/dist/{mpx-picker-view-column-item.jsx → mpx-picker-view-column/pickerViewColumnItem.jsx} +8 -5
  71. package/lib/runtime/components/react/dist/{pickerFaces.js → mpx-picker-view-column/pickerViewFaces.js} +6 -0
  72. package/lib/runtime/components/react/dist/mpx-popup/index.jsx +61 -0
  73. package/lib/runtime/components/react/dist/mpx-popup/popupBase.jsx +92 -0
  74. package/lib/runtime/components/react/dist/mpx-radio-group.jsx +2 -2
  75. package/lib/runtime/components/react/dist/mpx-radio.jsx +2 -3
  76. package/lib/runtime/components/react/dist/mpx-rich-text/index.jsx +2 -2
  77. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +207 -29
  78. package/lib/runtime/components/react/dist/mpx-simple-text.jsx +7 -5
  79. package/lib/runtime/components/react/dist/mpx-simple-view.jsx +11 -15
  80. package/lib/runtime/components/react/dist/mpx-sticky-header.jsx +115 -0
  81. package/lib/runtime/components/react/dist/mpx-sticky-section.jsx +45 -0
  82. package/lib/runtime/components/react/dist/mpx-swiper-item.jsx +4 -5
  83. package/lib/runtime/components/react/dist/mpx-swiper.jsx +9 -9
  84. package/lib/runtime/components/react/dist/mpx-switch.jsx +3 -5
  85. package/lib/runtime/components/react/dist/mpx-text.jsx +4 -7
  86. package/lib/runtime/components/react/dist/mpx-video.jsx +5 -5
  87. package/lib/runtime/components/react/dist/mpx-view.jsx +23 -9
  88. package/lib/runtime/components/react/dist/mpx-web-view.jsx +16 -13
  89. package/lib/runtime/components/react/dist/useAnimationHooks.js +26 -4
  90. package/lib/runtime/components/react/dist/utils.jsx +14 -2
  91. package/lib/runtime/components/react/event.config.ts +1 -6
  92. package/lib/runtime/components/react/getInnerListeners.ts +148 -191
  93. package/lib/runtime/components/react/mpx-button.tsx +7 -7
  94. package/lib/runtime/components/react/mpx-canvas/index.tsx +25 -17
  95. package/lib/runtime/components/react/mpx-checkbox-group.tsx +4 -3
  96. package/lib/runtime/components/react/mpx-checkbox.tsx +8 -9
  97. package/lib/runtime/components/react/mpx-form.tsx +25 -19
  98. package/lib/runtime/components/react/mpx-icon/index.tsx +4 -3
  99. package/lib/runtime/components/react/mpx-image.tsx +4 -3
  100. package/lib/runtime/components/react/mpx-inline-text.tsx +18 -0
  101. package/lib/runtime/components/react/mpx-input.tsx +24 -21
  102. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +31 -42
  103. package/lib/runtime/components/react/mpx-label.tsx +4 -5
  104. package/lib/runtime/components/react/mpx-movable-area.tsx +22 -13
  105. package/lib/runtime/components/react/mpx-movable-view.tsx +47 -40
  106. package/lib/runtime/components/react/mpx-navigator.tsx +4 -6
  107. package/lib/runtime/components/react/mpx-picker/date.tsx +226 -69
  108. package/lib/runtime/components/react/mpx-picker/dateData.ts +22 -0
  109. package/lib/runtime/components/react/mpx-picker/index.tsx +242 -118
  110. package/lib/runtime/components/react/mpx-picker/multiSelector.tsx +96 -139
  111. package/lib/runtime/components/react/mpx-picker/region.tsx +217 -89
  112. package/lib/runtime/components/react/mpx-picker/selector.tsx +75 -80
  113. package/lib/runtime/components/react/mpx-picker/time.tsx +119 -236
  114. package/lib/runtime/components/react/mpx-picker/type.ts +85 -71
  115. package/lib/runtime/components/react/{mpx-picker-view.tsx → mpx-picker-view/index.tsx} +24 -21
  116. package/lib/runtime/components/react/{mpx-picker-view-column.tsx → mpx-picker-view-column/index.tsx} +70 -19
  117. package/lib/runtime/components/react/{mpx-picker-view-column-item.tsx → mpx-picker-view-column/pickerViewColumnItem.tsx} +8 -5
  118. package/lib/runtime/components/react/{pickerFaces.ts → mpx-picker-view-column/pickerViewFaces.ts} +7 -0
  119. package/lib/runtime/components/react/mpx-popup/index.tsx +86 -0
  120. package/lib/runtime/components/react/mpx-popup/popupBase.tsx +130 -0
  121. package/lib/runtime/components/react/mpx-radio-group.tsx +4 -3
  122. package/lib/runtime/components/react/mpx-radio.tsx +8 -9
  123. package/lib/runtime/components/react/mpx-rich-text/index.tsx +15 -6
  124. package/lib/runtime/components/react/mpx-scroll-view.tsx +326 -96
  125. package/lib/runtime/components/react/mpx-simple-text.tsx +17 -8
  126. package/lib/runtime/components/react/mpx-simple-view.tsx +17 -16
  127. package/lib/runtime/components/react/mpx-sticky-header.tsx +179 -0
  128. package/lib/runtime/components/react/mpx-sticky-section.tsx +96 -0
  129. package/lib/runtime/components/react/mpx-swiper-item.tsx +31 -24
  130. package/lib/runtime/components/react/mpx-swiper.tsx +67 -61
  131. package/lib/runtime/components/react/mpx-switch.tsx +19 -14
  132. package/lib/runtime/components/react/mpx-text.tsx +16 -13
  133. package/lib/runtime/components/react/mpx-video.tsx +36 -35
  134. package/lib/runtime/components/react/mpx-view.tsx +41 -17
  135. package/lib/runtime/components/react/mpx-web-view.tsx +15 -12
  136. package/lib/runtime/components/react/types/getInnerListeners.d.ts +69 -35
  137. package/lib/runtime/components/react/types/global.d.ts +1 -1
  138. package/lib/runtime/components/react/useAnimationHooks.ts +29 -9
  139. package/lib/runtime/components/react/utils.tsx +15 -3
  140. package/lib/runtime/components/web/mini-video-controls.min.js +1 -1
  141. package/lib/runtime/components/web/mpx-input.vue +1 -1
  142. package/lib/runtime/components/web/mpx-scroll-view.vue +21 -4
  143. package/lib/runtime/components/web/mpx-sticky-header.vue +91 -0
  144. package/lib/runtime/components/web/mpx-sticky-section.vue +15 -0
  145. package/lib/runtime/stringify.wxs +2 -2
  146. package/lib/template-compiler/compiler.js +8 -8
  147. package/lib/utils/env.js +1 -1
  148. package/package.json +4 -5
  149. package/LICENSE +0 -433
  150. /package/lib/runtime/components/react/dist/{pickerVIewContext.js → mpx-picker-view/pickerVIewContext.js} +0 -0
  151. /package/lib/runtime/components/react/dist/{pickerViewIndicator.jsx → mpx-picker-view-column/pickerViewIndicator.jsx} +0 -0
  152. /package/lib/runtime/components/react/dist/{pickerViewMask.jsx → mpx-picker-view-column/pickerViewMask.jsx} +0 -0
  153. /package/lib/runtime/components/react/{pickerVIewContext.ts → mpx-picker-view/pickerVIewContext.ts} +0 -0
  154. /package/lib/runtime/components/react/{pickerViewIndicator.tsx → mpx-picker-view-column/pickerViewIndicator.tsx} +0 -0
  155. /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,
@@ -352,7 +354,6 @@ module.exports = function getSpec ({ warn, error }) {
352
354
  },
353
355
  {
354
356
  test: 'preloadRule',
355
- tt: deletePath(),
356
357
  jd: deletePath()
357
358
  },
358
359
  {
@@ -374,7 +375,8 @@ module.exports = function getSpec ({ warn, error }) {
374
375
  test: 'usingComponents',
375
376
  web: fixComponentName('usingComponents'),
376
377
  ios: fixComponentName('usingComponents'),
377
- android: fixComponentName('usingComponents')
378
+ android: fixComponentName('usingComponents'),
379
+ harmony: fixComponentName('usingComponents')
378
380
  },
379
381
  {
380
382
  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\(/
@@ -182,8 +184,9 @@ module.exports = function getSpec ({ warn, error }) {
182
184
  'border-top': ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],
183
185
  // 仅支持 width | style | color 这种排序
184
186
  'border-bottom': ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],
187
+ // 0.76 及以上版本RN支持 box-shadow,实测0.77版本drn红米note12pro Android12 不支持内阴影,其他表现和web一致
185
188
  // 仅支持 offset-x | offset-y | blur-radius | color 排序
186
- 'box-shadow': ['shadowOffset.width', 'shadowOffset.height', 'shadowRadius', 'shadowColor'],
189
+ // 'box-shadow': ['shadowOffset.width', 'shadowOffset.height', 'shadowRadius', 'shadowColor'],
187
190
  // 仅支持 text-decoration-line text-decoration-style text-decoration-color 这种格式
188
191
  'text-decoration': ['textDecorationLine', 'textDecorationStyle', 'textDecorationColor'],
189
192
  // flex-grow | flex-shrink | flex-basis
@@ -523,70 +526,79 @@ module.exports = function getSpec ({ warn, error }) {
523
526
  return { prop, value: values[0].trim() }
524
527
  }
525
528
 
526
- const formatBoxShadow = ({ prop, value, selector }, { mode }) => {
527
- value = value.trim()
528
- if (value === 'none') {
529
- return false
530
- }
531
- const cssMap = formatAbbreviation({ prop, value, selector }, { mode })
532
- if (mode === 'android') return cssMap
533
- // ios 阴影需要额外设置 shadowOpacity=1
534
- cssMap.push({
535
- prop: 'shadowOpacity',
536
- value: 1
537
- })
538
- return cssMap
539
- }
529
+ // const formatBoxShadow = ({ prop, value, selector }, { mode }) => {
530
+ // value = value.trim()
531
+ // if (value === 'none') {
532
+ // return false
533
+ // }
534
+ // const cssMap = formatAbbreviation({ prop, value, selector }, { mode })
535
+ // if (mode === 'android' || mode === 'harmony') return cssMap
536
+ // // ios 阴影需要额外设置 shadowOpacity=1
537
+ // cssMap.push({
538
+ // prop: 'shadowOpacity',
539
+ // value: 1
540
+ // })
541
+ // return cssMap
542
+ // }
540
543
 
541
544
  return {
542
- supportedModes: ['ios', 'android'],
545
+ supportedModes: ['ios', 'android', 'harmony'],
543
546
  rules: [
544
547
  { // 背景相关属性的处理
545
548
  test: /^(background|background-image|background-size|background-position)$/,
546
549
  ios: checkBackgroundImage,
547
- android: checkBackgroundImage
550
+ android: checkBackgroundImage,
551
+ harmony: checkBackgroundImage
548
552
  },
549
553
  { // margin padding 内外边距的处理
550
554
  test: /^(margin|padding|border-radius|border-width|border-color)$/,
551
555
  ios: formatCompositeVal,
552
- android: formatCompositeVal
556
+ android: formatCompositeVal,
557
+ harmony: formatCompositeVal
553
558
  },
554
559
  { // line-height 换算
555
560
  test: 'line-height',
556
561
  ios: formatLineHeight,
557
- android: formatLineHeight
562
+ android: formatLineHeight,
563
+ harmony: formatLineHeight
558
564
  },
559
565
  {
560
566
  test: 'transform',
561
567
  ios: formatTransform,
562
- android: formatTransform
568
+ android: formatTransform,
569
+ harmony: formatTransform
563
570
  },
564
571
  {
565
572
  test: 'flex',
566
573
  ios: formatFlex,
567
- android: formatFlex
574
+ android: formatFlex,
575
+ harmony: formatFlex
568
576
  },
569
577
  {
570
578
  test: 'font-family',
571
579
  ios: formatFontFamily,
572
- android: formatFontFamily
573
- },
574
- {
575
- test: 'box-shadow',
576
- ios: formatBoxShadow,
577
- android: formatBoxShadow
580
+ android: formatFontFamily,
581
+ harmony: formatFontFamily
578
582
  },
583
+ // {
584
+ // test: 'box-shadow',
585
+ // ios: formatBoxShadow,
586
+ // android: formatBoxShadow,
587
+ // harmony: formatBoxShadow
588
+ // },
579
589
  // 通用的简写格式匹配
580
590
  {
581
591
  test: new RegExp('^(' + Object.keys(AbbreviationMap).join('|') + ')$'),
582
592
  ios: formatAbbreviation,
583
- android: formatAbbreviation
593
+ android: formatAbbreviation,
594
+ harmony: formatAbbreviation
584
595
  },
585
596
  // 属性&属性值校验
586
597
  {
587
598
  test: () => true,
588
599
  ios: verification,
589
- android: verification
600
+ android: verification,
601
+ harmony: verification
590
602
  }
591
603
  ]
592
604
  }
@@ -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',
@@ -116,13 +124,14 @@ module.exports = function ({ print }) {
116
124
  if (isMustache(value)) {
117
125
  ttValueLog({ name, value })
118
126
  } else {
119
- const supportList = ['share', 'getPhoneNumber', 'contact', 'im', 'openSetting']
127
+ const supportList = ['share', 'getPhoneNumber', 'contact', 'im', 'openSetting', 'addShortcut']
120
128
  if (value && supportList.indexOf(value) === -1) {
121
129
  ttValueLogError({ name, value })
122
130
  }
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
  }
@@ -42,6 +42,8 @@ const wxs = require('./wxs')
42
42
  const component = require('./component')
43
43
  const fixComponentName = require('./fix-component-name')
44
44
  const rootPortal = require('./root-portal')
45
+ const stickyHeader = require('./sticky-header')
46
+ const stickySection = require('./sticky-section')
45
47
 
46
48
  module.exports = function getComponentConfigs ({ warn, error }) {
47
49
  /**
@@ -125,6 +127,8 @@ module.exports = function getComponentConfigs ({ warn, error }) {
125
127
  hyphenTagName({ print }),
126
128
  label({ print }),
127
129
  component(),
128
- rootPortal({ print })
130
+ rootPortal({ print }),
131
+ stickyHeader({ print }),
132
+ stickySection({ print })
129
133
  ]
130
134
  }
@@ -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)$/,
@@ -44,7 +51,7 @@ module.exports = function ({ print }) {
44
51
  swan: baiduPropLog
45
52
  },
46
53
  {
47
- test: /^(placeholder-class|auto-focus|confirm-type|confirm-hold|adjust-position|hold-keyboard)$/,
54
+ test: /^(auto-focus|confirm-type|confirm-hold|adjust-position|hold-keyboard)$/,
48
55
  tt: ttPropLog
49
56
  },
50
57
  {
@@ -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
  }