Skip to content

Commit e4e4494

Browse files
r0b1nIllia Obukhau
authored andcommitted
feat(html-element-web): changes to UI according to internal feedback
1 parent a16318e commit e4e4494

File tree

2 files changed

+50
-53
lines changed

2 files changed

+50
-53
lines changed

packages/pluggableWidgets/html-element-web/src/HTMLElement.xml

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<icon />
66
<properties>
77
<propertyGroup caption="General">
8-
<propertyGroup caption="Tag">
8+
<propertyGroup caption="HTML Element">
99
<property key="tagName" type="enumeration" defaultValue="div" required="true">
1010
<caption>Tag name</caption>
1111
<description />
@@ -27,67 +27,23 @@
2727
<enumerationValue key="__customTag__">Use custom name</enumerationValue>
2828
</enumerationValues>
2929
</property>
30-
3130
<property key="tagNameCustom" type="string" defaultValue="div" required="false">
3231
<caption>Custom tag</caption>
3332
<description />
3433
</property>
35-
<!-- **************************** TAG ATTRIBUTES ****************************** -->
36-
<property key="attributes" type="object" isList="true" required="false">
37-
<caption>Attributes</caption>
38-
<description />
39-
<properties>
40-
<propertyGroup caption="Attributes">
41-
<property key="attributeName" type="string" required="true">
42-
<caption>Name</caption>
43-
<description />
44-
</property>
45-
46-
<property key="attributeValueType" type="enumeration" defaultValue="expression">
47-
<caption>Value based on</caption>
48-
<description />
49-
<enumerationValues>
50-
<enumerationValue key="expression">Expression</enumerationValue>
51-
<enumerationValue key="template">Text template</enumerationValue>
52-
</enumerationValues>
53-
</property>
5434

55-
<property key="attributeValueTemplate" type="textTemplate" required="false">
56-
<caption>Value</caption>
57-
<description />
58-
</property>
59-
<property key="attributeValueExpression" type="expression" required="false">
60-
<caption>Value</caption>
61-
<description />
62-
<returnType type="String" />
63-
</property>
64-
<property key="attributeValueTemplateRepeat" type="textTemplate" dataSource="../tagContentRepeatDataSource" required="false">
65-
<caption>Value</caption>
66-
<description />
67-
</property>
68-
<property key="attributeValueExpressionRepeat" type="expression" dataSource="../tagContentRepeatDataSource" required="false">
69-
<caption>Value</caption>
70-
<description />
71-
<returnType type="String" />
72-
</property>
73-
</propertyGroup>
74-
</properties>
75-
</property>
76-
<!-- **************************** END TAG ATTRIBUTES ****************************** -->
77-
</propertyGroup>
78-
<propertyGroup caption="Repeat">
7935
<property key="tagUseRepeat" type="boolean" defaultValue="false">
8036
<caption>Repeat element</caption>
8137
<description>Repeat element for each item in data source.</description>
8238
</property>
8339

84-
<!-- Data source for repeating content -->
8540
<property key="tagContentRepeatDataSource" type="datasource" required="true" isList="true">
8641
<caption>Data source</caption>
8742
<description />
8843
</property>
89-
</propertyGroup>
90-
<propertyGroup caption="Content">
44+
45+
<!-- **************************** TAG CONTENT ****************************** -->
46+
<!-- Content mode -->
9147
<property key="tagContentMode" type="enumeration" defaultValue="container">
9248
<caption>Content</caption>
9349
<description />
@@ -97,7 +53,6 @@
9753
</enumerationValues>
9854
</property>
9955

100-
<!-- **************************** TAG CONTENT ****************************** -->
10156
<!-- HTML content, non-repeating -->
10257
<property key="tagContentHTML" type="textTemplate" multiline="true" required="false">
10358
<caption>HTML</caption>
@@ -123,6 +78,48 @@
12378
</property>
12479
<!-- **************************** END TAG CONTENT ****************************** -->
12580
</propertyGroup>
81+
<propertyGroup caption="HTML Attributes">
82+
<property key="attributes" type="object" isList="true" required="false">
83+
<caption>Attributes</caption>
84+
<description>The HTML attributes that are added to the HTML element. For example: ‘title‘, ‘href‘. If ‘class’ or ‘style’ is added as attribute this is merged with the widget class/style property. For events (e.g. onClick) use the Events section.</description>
85+
<properties>
86+
<propertyGroup caption="Attributes">
87+
<property key="attributeName" type="string" required="true">
88+
<caption>Name</caption>
89+
<description />
90+
</property>
91+
92+
<property key="attributeValueType" type="enumeration" defaultValue="expression">
93+
<caption>Value based on</caption>
94+
<description />
95+
<enumerationValues>
96+
<enumerationValue key="expression">Expression</enumerationValue>
97+
<enumerationValue key="template">Text template</enumerationValue>
98+
</enumerationValues>
99+
</property>
100+
101+
<property key="attributeValueTemplate" type="textTemplate" required="false">
102+
<caption>Value</caption>
103+
<description />
104+
</property>
105+
<property key="attributeValueExpression" type="expression" required="false">
106+
<caption>Value</caption>
107+
<description />
108+
<returnType type="String" />
109+
</property>
110+
<property key="attributeValueTemplateRepeat" type="textTemplate" dataSource="../tagContentRepeatDataSource" required="false">
111+
<caption>Value</caption>
112+
<description />
113+
</property>
114+
<property key="attributeValueExpressionRepeat" type="expression" dataSource="../tagContentRepeatDataSource" required="false">
115+
<caption>Value</caption>
116+
<description />
117+
<returnType type="String" />
118+
</property>
119+
</propertyGroup>
120+
</properties>
121+
</property>
122+
</propertyGroup>
126123
</propertyGroup>
127124
<propertyGroup caption="Events">
128125
<property key="events" type="object" isList="true" required="false">

packages/pluggableWidgets/html-element-web/typings/HTMLElementProps.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { ActionValue, DynamicValue, ListValue, ListActionValue, ListExpressionVa
88

99
export type TagNameEnum = "div" | "span" | "p" | "ul" | "ol" | "li" | "a" | "img" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "__customTag__";
1010

11+
export type TagContentModeEnum = "container" | "innerHTML";
12+
1113
export type AttributeValueTypeEnum = "expression" | "template";
1214

1315
export interface AttributesType {
@@ -19,8 +21,6 @@ export interface AttributesType {
1921
attributeValueExpressionRepeat?: ListExpressionValue<string>;
2022
}
2123

22-
export type TagContentModeEnum = "container" | "innerHTML";
23-
2424
export type EventNameEnum = "onClick" | "onChange" | "onFocus" | "onLeave" | "onSubmit" | "onKeyDown" | "onKeyUp" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture";
2525

2626
export interface EventsType {
@@ -55,14 +55,14 @@ export interface HTMLElementContainerProps {
5555
tabIndex?: number;
5656
tagName: TagNameEnum;
5757
tagNameCustom: string;
58-
attributes: AttributesType[];
5958
tagUseRepeat: boolean;
6059
tagContentRepeatDataSource: ListValue;
6160
tagContentMode: TagContentModeEnum;
6261
tagContentHTML?: DynamicValue<string>;
6362
tagContentContainer?: ReactNode;
6463
tagContentRepeatHTML?: ListExpressionValue<string>;
6564
tagContentRepeatContainer?: ListWidgetValue;
65+
attributes: AttributesType[];
6666
events: EventsType[];
6767
}
6868

@@ -73,13 +73,13 @@ export interface HTMLElementPreviewProps {
7373
readOnly: boolean;
7474
tagName: TagNameEnum;
7575
tagNameCustom: string;
76-
attributes: AttributesPreviewType[];
7776
tagUseRepeat: boolean;
7877
tagContentRepeatDataSource: {} | { type: string } | null;
7978
tagContentMode: TagContentModeEnum;
8079
tagContentHTML: string;
8180
tagContentContainer: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
8281
tagContentRepeatHTML: string;
8382
tagContentRepeatContainer: { widgetCount: number; renderer: ComponentType<{ caption?: string }> };
83+
attributes: AttributesPreviewType[];
8484
events: EventsPreviewType[];
8585
}

0 commit comments

Comments
 (0)