From c0de026e211b5195064ca97abaf757a1ef5fcca2 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Thu, 8 Feb 2024 15:25:19 +0300 Subject: [PATCH 1/8] add menu and menuItem components --- compiler/src/pre_define.ts | 2 ++ compiler/src/process_component_build.ts | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts index 167c0eb1..90a984af 100644 --- a/compiler/src/pre_define.ts +++ b/compiler/src/pre_define.ts @@ -333,7 +333,9 @@ export const SELECT_LOW: string = 'select'; export const CHECKBOX_GROUP: string = 'CheckboxGroup'; export const SELECT_ALL: string = 'selectAll'; export const SELECTED: string = 'selected'; +export const MENU: string = 'Menu'; export const MENU_ITEM: string = 'MenuItem'; +export const MENU_ITEM_GROUP: string = 'MenuItemGroup'; export const PANEL: string = 'Panel'; export const RATING_LOW: string = 'rating'; export const VALUE: string = 'value'; diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index eff18aee..589bc17b 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -22,6 +22,9 @@ import { COMPONENT_POP_FUNCTION, COMPONENT_APPLY_THEME_FUNCTION, COMPONENT_BUTTON, + MENU, + MENU_ITEM, + MENU_ITEM_GROUP, TEXT_PICKER, DATE_PICKER, TIME_PICKER, @@ -207,6 +210,9 @@ const componentsAppliedWithTheme: Set = new Set([ COMPONENT_PROGRESS, DATE_PICKER, RADIO, + MENU, + MENU_ITEM, + MENU_ITEM_GROUP, SLIDER, TEXT_PICKER, TIME_PICKER, -- Gitee From e8987587f374ad04dc0e3a5e6800e82f96f06193 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Mon, 12 Feb 2024 20:57:23 +0300 Subject: [PATCH 2/8] add new interface menuStyleEx in theme --- compiler/src/pre_define.ts | 1 + compiler/src/process_component_build.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts index 90a984af..99f36920 100644 --- a/compiler/src/pre_define.ts +++ b/compiler/src/pre_define.ts @@ -160,6 +160,7 @@ export const ATTRIBUTE_STATESTYLES: string = 'stateStyles'; export const ATTRIBUTE_ID: string = 'id'; export const ATTRIBUTE_ATTRIBUTE_MODIFIER: string = 'attributeModifier'; export const ATTRIBUTE_BUTTON_STYLE: string = 'buttonStyleEx'; +export const ATTRIBUTE_MENU_STYLE: string = 'menuStyleEx'; export const ATTRIBUTE_BUTTON_ROLE: string = 'buttonRole'; export const TRUE: string = 'true'; export const FALSE: string = 'false'; diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index 589bc17b..c95fd819 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -134,6 +134,7 @@ import { ALL_COMPONENTS, ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, + ATTRIBUTE_MENU_STYLE, ATTRIBUTE_BUTTON_ROLE, SLIDER, TITLE, @@ -222,7 +223,8 @@ const componentsAppliedWithTheme: Set = new Set([ const componentsStyles: Set = new Set([ ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, - ATTRIBUTE_BUTTON_ROLE + ATTRIBUTE_BUTTON_ROLE, + ATTRIBUTE_MENU_STYLE ]); export function processComponentBuild(node: ts.MethodDeclaration, -- Gitee From f89e3b1380cfc2cca145eedbc0bde16edf501d7d Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Tue, 20 Feb 2024 20:16:52 +0300 Subject: [PATCH 3/8] fix after review and refactoring --- compiler/src/process_component_build.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index c95fd819..70754bb2 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -24,7 +24,6 @@ import { COMPONENT_BUTTON, MENU, MENU_ITEM, - MENU_ITEM_GROUP, TEXT_PICKER, DATE_PICKER, TIME_PICKER, @@ -213,7 +212,6 @@ const componentsAppliedWithTheme: Set = new Set([ RADIO, MENU, MENU_ITEM, - MENU_ITEM_GROUP, SLIDER, TEXT_PICKER, TIME_PICKER, -- Gitee From f3173f0ff768088d777f78c66c35254f481260b5 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Wed, 21 Feb 2024 12:54:04 +0300 Subject: [PATCH 4/8] align code --- compiler/src/pre_define.ts | 1 + compiler/src/process_component_build.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts index 99f36920..ffd09b9d 100644 --- a/compiler/src/pre_define.ts +++ b/compiler/src/pre_define.ts @@ -161,6 +161,7 @@ export const ATTRIBUTE_ID: string = 'id'; export const ATTRIBUTE_ATTRIBUTE_MODIFIER: string = 'attributeModifier'; export const ATTRIBUTE_BUTTON_STYLE: string = 'buttonStyleEx'; export const ATTRIBUTE_MENU_STYLE: string = 'menuStyleEx'; +export const ATTRIBUTE_MENU_ITEM_STYLE: string = 'menuItemStyleEx'; export const ATTRIBUTE_BUTTON_ROLE: string = 'buttonRole'; export const TRUE: string = 'true'; export const FALSE: string = 'false'; diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index 70754bb2..b07fbd10 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -134,6 +134,7 @@ import { ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, ATTRIBUTE_MENU_STYLE, + ATTRIBUTE_MENU_ITEM_STYLE, ATTRIBUTE_BUTTON_ROLE, SLIDER, TITLE, @@ -222,7 +223,8 @@ const componentsStyles: Set = new Set([ ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, ATTRIBUTE_BUTTON_ROLE, - ATTRIBUTE_MENU_STYLE + ATTRIBUTE_MENU_STYLE, + ATTRIBUTE_MENU_ITEM_STYLE ]); export function processComponentBuild(node: ts.MethodDeclaration, -- Gitee From bc173c705ba722b0c002f371ea3919f978fcad61 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Wed, 21 Feb 2024 13:07:47 +0300 Subject: [PATCH 5/8] self review --- compiler/src/pre_define.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts index ffd09b9d..0b0b9747 100644 --- a/compiler/src/pre_define.ts +++ b/compiler/src/pre_define.ts @@ -337,7 +337,6 @@ export const SELECT_ALL: string = 'selectAll'; export const SELECTED: string = 'selected'; export const MENU: string = 'Menu'; export const MENU_ITEM: string = 'MenuItem'; -export const MENU_ITEM_GROUP: string = 'MenuItemGroup'; export const PANEL: string = 'Panel'; export const RATING_LOW: string = 'rating'; export const VALUE: string = 'value'; -- Gitee From d2725540718347841bec136b029d2d8e6d9353e0 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Wed, 21 Feb 2024 16:10:12 +0300 Subject: [PATCH 6/8] replace rows in the alphabet order --- compiler/src/pre_define.ts | 3 +-- compiler/src/process_component_build.ts | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts index 0b0b9747..28468075 100644 --- a/compiler/src/pre_define.ts +++ b/compiler/src/pre_define.ts @@ -160,9 +160,8 @@ export const ATTRIBUTE_STATESTYLES: string = 'stateStyles'; export const ATTRIBUTE_ID: string = 'id'; export const ATTRIBUTE_ATTRIBUTE_MODIFIER: string = 'attributeModifier'; export const ATTRIBUTE_BUTTON_STYLE: string = 'buttonStyleEx'; -export const ATTRIBUTE_MENU_STYLE: string = 'menuStyleEx'; -export const ATTRIBUTE_MENU_ITEM_STYLE: string = 'menuItemStyleEx'; export const ATTRIBUTE_BUTTON_ROLE: string = 'buttonRole'; +export const ATTRIBUTE_MENU_STYLE: string = 'menuStyleEx'; export const TRUE: string = 'true'; export const FALSE: string = 'false'; export const NULL: string = 'null'; diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index b07fbd10..48df9548 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -133,9 +133,8 @@ import { ALL_COMPONENTS, ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, - ATTRIBUTE_MENU_STYLE, - ATTRIBUTE_MENU_ITEM_STYLE, ATTRIBUTE_BUTTON_ROLE, + ATTRIBUTE_MENU_STYLE, SLIDER, TITLE, COMPONENT_WITH_THEME, @@ -210,9 +209,9 @@ const componentsAppliedWithTheme: Set = new Set([ COMPONENT_BUTTON, COMPONENT_PROGRESS, DATE_PICKER, - RADIO, MENU, MENU_ITEM, + RADIO, SLIDER, TEXT_PICKER, TIME_PICKER, @@ -223,8 +222,7 @@ const componentsStyles: Set = new Set([ ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, ATTRIBUTE_BUTTON_ROLE, - ATTRIBUTE_MENU_STYLE, - ATTRIBUTE_MENU_ITEM_STYLE + ATTRIBUTE_MENU_STYLE ]); export function processComponentBuild(node: ts.MethodDeclaration, -- Gitee From 934aa2a1f5fa961671499aff92603a2e90a13ce6 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Thu, 22 Feb 2024 14:35:53 +0300 Subject: [PATCH 7/8] remove unncessary changes --- compiler/src/pre_define.ts | 1 - compiler/src/process_component_build.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/src/pre_define.ts b/compiler/src/pre_define.ts index 28468075..b0015f61 100644 --- a/compiler/src/pre_define.ts +++ b/compiler/src/pre_define.ts @@ -161,7 +161,6 @@ export const ATTRIBUTE_ID: string = 'id'; export const ATTRIBUTE_ATTRIBUTE_MODIFIER: string = 'attributeModifier'; export const ATTRIBUTE_BUTTON_STYLE: string = 'buttonStyleEx'; export const ATTRIBUTE_BUTTON_ROLE: string = 'buttonRole'; -export const ATTRIBUTE_MENU_STYLE: string = 'menuStyleEx'; export const TRUE: string = 'true'; export const FALSE: string = 'false'; export const NULL: string = 'null'; diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index 48df9548..aac39a8e 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -221,8 +221,7 @@ const componentsAppliedWithTheme: Set = new Set([ const componentsStyles: Set = new Set([ ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, - ATTRIBUTE_BUTTON_ROLE, - ATTRIBUTE_MENU_STYLE + ATTRIBUTE_BUTTON_ROLE ]); export function processComponentBuild(node: ts.MethodDeclaration, -- Gitee From e61dddd7e9d9051a3c2afbf73a4db9cfa70b3ed9 Mon Sep 17 00:00:00 2001 From: evstigneevroman_9cd1 Date: Thu, 22 Feb 2024 14:53:14 +0300 Subject: [PATCH 8/8] clear code --- compiler/src/process_component_build.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index aac39a8e..567bc09e 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -134,7 +134,6 @@ import { ATTRIBUTE_ATTRIBUTE_MODIFIER, ATTRIBUTE_BUTTON_STYLE, ATTRIBUTE_BUTTON_ROLE, - ATTRIBUTE_MENU_STYLE, SLIDER, TITLE, COMPONENT_WITH_THEME, -- Gitee