@operato/property-panel 9.0.0-beta.70 → 9.0.0-beta.73

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/property-panel",
3
3
  "description": "Webcomponent property-panel following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "9.0.0-beta.70",
5
+ "version": "9.0.0-beta.73",
6
6
  "type": "module",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
@@ -103,5 +103,5 @@
103
103
  "prettier --write"
104
104
  ]
105
105
  },
106
- "gitHead": "62f53c7de111ff64eb422d7a04bab05d1cc3cb69"
106
+ "gitHead": "e9e8d672bc2782f3514d99fd79e67e9d57f34d3d"
107
107
  }
@@ -26,6 +26,7 @@ export class PropertyShapes extends AbstractProperty {
26
26
  @property({ type: Array }) selected: Component[] = []
27
27
 
28
28
  @state() private _3dExpanded: boolean = false
29
+ @state() private _positionExpanded: boolean = false
29
30
 
30
31
  firstUpdated() {
31
32
  this.renderRoot.addEventListener('change', this.onValueChange.bind(this))
@@ -82,19 +83,15 @@ export class PropertyShapes extends AbstractProperty {
82
83
  ? keyed(
83
84
  this.selected,
84
85
  html`
85
- <fieldset class="icon-label unit ratio">
86
+ <fieldset class="icon-label">
86
87
  <legend>
87
88
  <ox-title-with-help topic="board-modeller/shapes/size" msgid="label.size">size</ox-title-with-help>
88
89
  </legend>
89
90
 
90
91
  <div class="property-grid">
91
- <label class="width">
92
- <md-icon>arrow_range</md-icon><ox-i18n msgid="label.width">width</ox-i18n>
93
- </label>
92
+ <label> <md-icon>arrow_range</md-icon><ox-i18n msgid="label.width">width</ox-i18n> </label>
94
93
  <input type="number" value-key="bounds.width" .value=${String(width)} />
95
- <label class="height">
96
- <md-icon>height</md-icon><ox-i18n msgid="label.height">height</ox-i18n>
97
- </label>
94
+ <label> <md-icon>height</md-icon><ox-i18n msgid="label.height">height</ox-i18n> </label>
98
95
  <input type="number" value-key="bounds.height" .value=${String(height)} />
99
96
 
100
97
  ${this.selected.length && this.selected[0].isRootModel()
@@ -110,9 +107,63 @@ export class PropertyShapes extends AbstractProperty {
110
107
  `
111
108
  )
112
109
  : html``}
110
+ ${!this._isLine(this.selected)
111
+ ? keyed(
112
+ this.selected,
113
+ html`
114
+ <fieldset class="icon-label" collapsable ?collapsed=${!this._positionExpanded}>
115
+ <legend
116
+ @click=${(e: Event) => {
117
+ this._positionExpanded = !this._positionExpanded
118
+ }}
119
+ >
120
+ <ox-title-with-help topic="board-modeller/shapes/position" msgid="label.position"
121
+ >position</ox-title-with-help
122
+ >
123
+ <md-icon>${this._positionExpanded ? 'expand_less' : 'expand_more'}</md-icon>
124
+ </legend>
125
+
126
+ <div class="property-grid">
127
+ <label>Position</label>
128
+ <select value-key="position" .value=${value.position}>
129
+ <option value="">&nbsp;</option>
130
+ <option value="static">static</option>
131
+ <option value="relative">relative</option>
132
+ <option value="absolute">absolute</option>
133
+ <option value="fixed">fixed</option>
134
+ <option value="sticky">sticky</option>
135
+ </select>
136
+
137
+ <label>Align</label>
138
+ <select value-key="align" .value=${value.align}>
139
+ <option value="">&nbsp;</option>
140
+ <option value="left-top">left-top</option>
141
+ <option value="center-top">center-top</option>
142
+ <option value="right-top">right-top</option>
143
+ <option value="left-middle">left-middle</option>
144
+ <option value="center-middle">center-middle</option>
145
+ <option value="right-middle">right-middle</option>
146
+ <option value="left-bottom">left-bottom</option>
147
+ <option value="center-bottom">center-bottom</option>
148
+ <option value="right-bottom">right-bottom</option>
149
+ </select>
150
+
151
+ <label> <ox-i18n msgid="label.left">left</ox-i18n> </label>
152
+ <input type="number" value-key="bounds.left" .value=${String(value.left ?? '')} />
153
+ <label> <ox-i18n msgid="label.top">top</ox-i18n> </label>
154
+ <input type="number" value-key="bounds.top" .value=${String(value.top ?? '')} />
155
+ <label> <ox-i18n msgid="label.right">right</ox-i18n> </label>
156
+ <input type="number" value-key="bounds.right" .value=${String(value.right ?? '')} />
157
+ <label> <ox-i18n msgid="label.bottom">bottom</ox-i18n> </label>
158
+ <input type="number" value-key="bounds.bottom" .value=${String(value.bottom ?? '')} />
159
+ </div>
160
+ </fieldset>
161
+ `
162
+ )
163
+ : html``}
113
164
  ${this._is3dish(this.selected)
114
165
  ? html`
115
- <fieldset class="icon-label unit ratio" collapsable ?collapsed=${!this._3dExpanded}>
166
+ <fieldset class="icon-label" collapsable ?collapsed=${!this._3dExpanded}>
116
167
  <legend
117
168
  @click=${(e: Event) => {
118
169
  this._3dExpanded = !this._3dExpanded
@@ -725,5 +725,9 @@
725
725
  "title.update-preferences": "Update Preferences",
726
726
  "title.update-user": "Update User",
727
727
  "title.update-variable": "Update Variable",
728
- "title.warn": "Warning"
728
+ "title.warn": "Warning",
729
+ "label.top": "top",
730
+ "label.bottom": "bottom",
731
+ "label.left": "left",
732
+ "label.right": "right"
729
733
  }
@@ -729,5 +729,9 @@
729
729
  "title.update-preferences": "設定修正",
730
730
  "title.update-user": "ユーザー修正",
731
731
  "title.update-variable": "変数修正",
732
- "title.warn": "警告"
732
+ "title.warn": "警告",
733
+ "label.top": "上",
734
+ "label.left": "左",
735
+ "label.right": "右",
736
+ "label.bottom": "下"
733
737
  }
@@ -729,5 +729,9 @@
729
729
  "title.update-preferences": "설정 수정",
730
730
  "title.update-user": "사용자 수정",
731
731
  "title.update-variable": "변수 수정",
732
- "title.warn": "경고"
732
+ "title.warn": "경고",
733
+ "label.top": "상단",
734
+ "label.left": "왼쪽",
735
+ "label.right": "오른쪽",
736
+ "label.bottom": "하단"
733
737
  }
@@ -728,5 +728,9 @@
728
728
  "title.update-preferences": "保存配置",
729
729
  "title.update-user": "更新用户",
730
730
  "title.update-variable": "更新变量",
731
- "title.warn": "警告"
731
+ "title.warn": "警告",
732
+ "label.top": "顶部",
733
+ "label.bottom": "底部",
734
+ "label.left": "左侧",
735
+ "label.right": "右侧"
732
736
  }