From 4f7aeda74615dd1ece28a090ab4bbf8d7ab1d84e Mon Sep 17 00:00:00 2001 From: yan-shuifeng Date: Mon, 10 Jan 2022 22:59:35 +0800 Subject: [PATCH] Sync Component codes. Change-Id: I1c7efc60f56ac095b1ab734953141b0fd8d0809a Signed-off-by: yan-shuifeng Change-Id: I437b638a81838bb1abe1e738567826232c4ccc90 --- compiler/components/alphabet_indexer.json | 3 ++- compiler/components/checkbox.json | 4 ++++ compiler/components/checkboxgroup.json | 4 ++++ compiler/components/common_attrs.json | 6 +++--- compiler/components/grid.json | 4 +++- compiler/components/navigation.json | 2 +- compiler/components/pattern_lock.json | 16 ++++++++++++++++ compiler/components/plugin_component.json | 6 ++++++ compiler/components/select.json | 6 ++++++ compiler/components/text_clock.json | 7 +++++++ compiler/components/textarea.json | 3 ++- compiler/components/textinput.json | 2 +- compiler/components/texttimer.json | 4 ++++ compiler/src/component_map.ts | 12 +++++++----- 14 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 compiler/components/checkbox.json create mode 100644 compiler/components/checkboxgroup.json create mode 100644 compiler/components/pattern_lock.json create mode 100644 compiler/components/plugin_component.json create mode 100644 compiler/components/select.json create mode 100644 compiler/components/text_clock.json create mode 100644 compiler/components/texttimer.json diff --git a/compiler/components/alphabet_indexer.json b/compiler/components/alphabet_indexer.json index 40be388..1c33581 100644 --- a/compiler/components/alphabet_indexer.json +++ b/compiler/components/alphabet_indexer.json @@ -2,6 +2,7 @@ "name": "AlphabetIndexer", "attrs": [ "onSelected", "selectedColor", "popupColor", "selectedBackgroundColor", "popupBackground", "usingPopup", - "selectedFont", "popupFont", "itemSize", "font", "color", "alignStyle" + "selectedFont", "popupFont", "itemSize", "font", "color", "alignStyle", "onRequestPopupData", "onPopupSelected", + "selectedIndex", "popupPosition" ] } \ No newline at end of file diff --git a/compiler/components/checkbox.json b/compiler/components/checkbox.json new file mode 100644 index 0000000..5335867 --- /dev/null +++ b/compiler/components/checkbox.json @@ -0,0 +1,4 @@ +{ + "name": "Checkbox", + "attrs": ["select","selectedColor","onChange"] +} \ No newline at end of file diff --git a/compiler/components/checkboxgroup.json b/compiler/components/checkboxgroup.json new file mode 100644 index 0000000..66e4385 --- /dev/null +++ b/compiler/components/checkboxgroup.json @@ -0,0 +1,4 @@ +{ + "name": "CheckboxGroup", + "attrs": ["selectAll","selectedColor","onChange"] +} \ No newline at end of file diff --git a/compiler/components/common_attrs.json b/compiler/components/common_attrs.json index c5970d4..e2d3d93 100644 --- a/compiler/components/common_attrs.json +++ b/compiler/components/common_attrs.json @@ -6,7 +6,7 @@ "border", "borderStyle", "borderWidth", "borderColor", "borderRadius", "backgroundColor", "backgroundImage", "backgroundImageSize", "backgroundImagePosition", "opacity", "animation", "transition", "stateStyles", - "onClick", "onTouch", "touchable", "onKeyEvent", "onHover","onAreaChange", + "onClick", "onTouch", "touchable", "onKeyEvent", "onHover", "hoverEffect", "onMouse", "onAreaChange", "blur", "backdropBlur", "windowBlur", "translate", "rotate", "scale", "transform", "onAppear", "onDisAppear", "visibility", "flexBasis", "flexShrink", "flexGrow", "alignSelf", "useAlign", "zIndex", "sharedTransition", "direction", "align", "position", "markAnchor", @@ -14,11 +14,11 @@ "onDrag", "onDragEnter", "onDragMove", "onDragLeave", "onDrop", "overlay", "linearGradient", "sweepGradient", "radialGradient", "gridOffset", "gridSpan", "useSizeType", - "motionPath", "clip", "shadow", "mask", "key", + "motionPath", "clip", "shadow", "mask", "key", "id", "accessibilityGroup", "accessibilityText", "accessibilityDescription", "accessibilityImportance", "onAccessibility", "grayscale", "brightness", "contrast", "saturate", "geometryTransition", - "bindPopup", "colorBlend", "invert", "sepia", "hueRotate", "bindMenu", "hoverEffect", + "bindPopup", "colorBlend", "invert", "sepia", "hueRotate", "bindMenu", "onFocus", "onBlur", "onFocusMove", "focusable", "responseRegion" ] } diff --git a/compiler/components/grid.json b/compiler/components/grid.json index 4d82c84..1a9682a 100644 --- a/compiler/components/grid.json +++ b/compiler/components/grid.json @@ -3,6 +3,8 @@ "children": ["GridItem"], "attrs": [ "columnsTemplate", "rowsTemplate", "columnsGap", "rowsGap", "scrollBar", "scrollBarWidth", - "scrollBarColor" + "scrollBarColor", "editMode", "maxCount", "minCount", "cellLength", "onItemDragStart", + "onItemDragMove", "onItemDragEnter", "onItemDragMove", "onItemDrop", "layoutDirection", "direction", + "supportAnimation", "onItemDragLeave" ] } \ No newline at end of file diff --git a/compiler/components/navigation.json b/compiler/components/navigation.json index 15e9b56..ecd111e 100644 --- a/compiler/components/navigation.json +++ b/compiler/components/navigation.json @@ -1,5 +1,5 @@ { "name": "Navigation", - "attrs": ["title", "subTitle", "hideTitleBar", "hideBackButton", "titleMode", "menus", + "attrs": ["title", "subTitle", "hideTitleBar", "hideBackButton", "titleMode", "menus", "menuCount", "toolBar", "hideToolBar", "onTitleModeChanged"] } \ No newline at end of file diff --git a/compiler/components/pattern_lock.json b/compiler/components/pattern_lock.json new file mode 100644 index 0000000..13ab336 --- /dev/null +++ b/compiler/components/pattern_lock.json @@ -0,0 +1,16 @@ +{ + "name": "PatternLock", + "atomic": true, + "attrs": [ + "sideLength", + "circleRadius", + "backgroundColor", + "regularColor", + "selectedColor", + "activeColor", + "pathColor", + "pathStrokeWidth", + "onPatternComplete", + "autoReset" + ] +} diff --git a/compiler/components/plugin_component.json b/compiler/components/plugin_component.json new file mode 100644 index 0000000..961615d --- /dev/null +++ b/compiler/components/plugin_component.json @@ -0,0 +1,6 @@ +{ + "name": "PluginComponent", + "attrs": [ + "size", "onComplete", "onError" + ] +} \ No newline at end of file diff --git a/compiler/components/select.json b/compiler/components/select.json new file mode 100644 index 0000000..d2f28f7 --- /dev/null +++ b/compiler/components/select.json @@ -0,0 +1,6 @@ +{ + "name":"Select", + "attrs":["selected", "value", "font", "fontColor", "selectedOptionBgColor", "selectedOptionFont", + "selectedOptionFontColor", "optionBgColor", "optionFont", "optionFontColor", "onSelected" + ] +} \ No newline at end of file diff --git a/compiler/components/text_clock.json b/compiler/components/text_clock.json new file mode 100644 index 0000000..3b23350 --- /dev/null +++ b/compiler/components/text_clock.json @@ -0,0 +1,7 @@ +{ + "name": "TextClock", + "attrs": [ + "format", "onDateChange", "status", "fontColor", + "fontSize", "fontStyle", "fontWeight", "fontFamily" + ] +} \ No newline at end of file diff --git a/compiler/components/textarea.json b/compiler/components/textarea.json index 60f93d5..0cdc49e 100644 --- a/compiler/components/textarea.json +++ b/compiler/components/textarea.json @@ -3,6 +3,7 @@ "atomic": true, "attrs": [ "placeholderColor", "placeholderFont", "textAlign", "caretColor", "onChange", - "onCopy", "OnCut", "OnPaste", "fontSize", "fontColor", "fontStyle", "fontWeight", "fontFamily" + "onCopy", "OnCut", "OnPaste", "fontSize", "fontColor", "fontStyle", "fontWeight", "fontFamily", + "inputFilter" ] } \ No newline at end of file diff --git a/compiler/components/textinput.json b/compiler/components/textinput.json index a876382..f5b269a 100644 --- a/compiler/components/textinput.json +++ b/compiler/components/textinput.json @@ -4,6 +4,6 @@ "attrs": [ "type", "placeholderColor", "placeholderFont", "enterKeyType", "caretColor", "maxLength", "onEditChanged", "onSubmit", "onChange", "onCopy", "OnCut", "OnPaste", "fontSize", - "fontColor", "fontStyle", "fontWeight", "fontFamily" + "fontColor", "fontStyle", "fontWeight", "fontFamily", "inputFilter" ] } \ No newline at end of file diff --git a/compiler/components/texttimer.json b/compiler/components/texttimer.json new file mode 100644 index 0000000..c4e7754 --- /dev/null +++ b/compiler/components/texttimer.json @@ -0,0 +1,4 @@ +{ + "name": "TextTimer", + "attrs": ["format", "fontColor", "fontSize", "fontStyle", "fontWeight", "fontFamily", "onTimer"] +} \ No newline at end of file diff --git a/compiler/src/component_map.ts b/compiler/src/component_map.ts index 6bd7a35..5d8bd85 100644 --- a/compiler/src/component_map.ts +++ b/compiler/src/component_map.ts @@ -48,9 +48,10 @@ export const GESTURE_ATTRS: Set = new Set([ ]); export const forbiddenUseStateType: Set = new Set(['Scroller', 'SwiperScroller', - 'VideoController', 'WebController', 'CustomDialogController', 'SwiperController', 'TabsController', - 'CalendarController', 'AbilityController', 'RenderingContext', 'CanvasGradient', 'ImageBitmap', - 'ImageData', 'Path2D', 'RenderingContextSettings', 'OffscreenRenderingContext' + 'VideoController', 'WebController', 'CustomDialogController', 'SwiperController', + 'TabsController', 'CalendarController', 'AbilityController', 'XComponentController', + 'CanvasRenderingContext2D', 'CanvasGradient', 'ImageBitmap', 'ImageData', 'Path2D', + 'RenderingContextSettings', 'OffscreenCanvasRenderingContext2D', 'PatternLockController' ]); export const INNER_COMPONENT_NAMES: Set = new Set(); @@ -81,8 +82,9 @@ export const JS_BIND_COMPONENTS: Set = new Set([ ...GESTURE_TYPE_NAMES, 'Gesture', 'PanGestureOption', 'CustomDialogController', 'Storage', 'Scroller', 'SwiperController', 'TabsController', 'CalendarController', 'AbilityController', 'VideoController', 'WebController', - 'RenderingContext', 'CanvasGradient', 'ImageBitmap', 'ImageData', 'Path2D','RenderingContextSettings', - 'OffscreenRenderingContext', 'AlertDialog', 'ActionSheet' + 'XComponentController', 'CanvasRenderingContext2D', 'CanvasGradient', 'ImageBitmap', 'ImageData', + 'Path2D', 'RenderingContextSettings', 'OffscreenCanvasRenderingContext2D', 'DatePickerDialog', + 'TextPickerDialog', 'AlertDialog', 'ActionSheet', 'PatternLockController' ]); export const NEEDPOP_COMPONENT: Set = new Set(['Blank', 'Search']);