@things-factory/board-ui 4.0.7 → 4.0.12
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/client/board-modeller/editors/board-editor-property.js +4 -5
- package/client/board-modeller/property-sidebar/specifics/specific-properties-builder.js +4 -2
- package/client/bootstrap.js +7 -12
- package/client/pages/board-modeller-page.js +13 -23
- package/package.json +8 -8
- package/client/modeller-module.js +0 -3
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { html } from 'lit-element'
|
|
6
5
|
import '@things-factory/i18n-base'
|
|
7
|
-
|
|
8
6
|
import './things-editor-board-selector'
|
|
9
7
|
|
|
10
|
-
import {
|
|
8
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
9
|
+
import { html } from 'lit-element'
|
|
11
10
|
|
|
12
|
-
class PropertyEditorBoardSelector extends
|
|
11
|
+
class PropertyEditorBoardSelector extends OxPropertyEditor {
|
|
13
12
|
static get styles() {
|
|
14
|
-
return [
|
|
13
|
+
return [...OxPropertyEditor.styles]
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
editorTemplate(props) {
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { LitElement } from 'lit-element'
|
|
6
5
|
import '@things-factory/modeller-ui/client/editors/things-editor-property'
|
|
7
6
|
|
|
7
|
+
import { LitElement } from 'lit-element'
|
|
8
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.
|
|
10
12
|
|
|
@@ -83,7 +85,7 @@ class SpecificPropertiesBuilder extends LitElement {
|
|
|
83
85
|
_onPropsChanged(props) {
|
|
84
86
|
this.renderRoot.textContent = ''
|
|
85
87
|
;(props || []).forEach(prop => {
|
|
86
|
-
let elementType =
|
|
88
|
+
let elementType = OxPropertyEditor.getEditor(prop.type)
|
|
87
89
|
if (!elementType) {
|
|
88
90
|
console.warn('Property Editor not defined', prop.type)
|
|
89
91
|
return
|
package/client/bootstrap.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './board-modeller/editors/board-editor-property'
|
|
2
2
|
|
|
3
|
-
import { ADD_MODELLER_EDITORS } from '@things-factory/modeller-ui'
|
|
4
3
|
import { registerEditor, registerRenderer } from '@things-factory/grist-ui'
|
|
5
4
|
|
|
6
|
-
import board from './reducers/board'
|
|
7
|
-
|
|
8
|
-
import { BoardRenderer } from './data-grist/board-renderer'
|
|
9
5
|
import { BoardEditor } from './data-grist/board-editor'
|
|
10
|
-
|
|
11
|
-
import '
|
|
6
|
+
import { BoardRenderer } from './data-grist/board-renderer'
|
|
7
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
8
|
+
import board from './reducers/board'
|
|
9
|
+
import { store } from '@things-factory/shell'
|
|
12
10
|
|
|
13
11
|
export default function bootstrap() {
|
|
14
12
|
registerRenderer('board', BoardRenderer)
|
|
@@ -16,10 +14,7 @@ export default function bootstrap() {
|
|
|
16
14
|
|
|
17
15
|
store.addReducers({ board })
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
editors: {
|
|
22
|
-
'board-selector': 'property-editor-board-selector'
|
|
23
|
-
}
|
|
17
|
+
OxPropertyEditor.register({
|
|
18
|
+
'board-selector': 'property-editor-board-selector'
|
|
24
19
|
})
|
|
25
20
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { html, css } from 'lit-element'
|
|
2
|
-
import { gqlContext } from '@things-factory/shell'
|
|
3
|
-
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
4
|
-
import gql from 'graphql-tag'
|
|
5
|
-
|
|
6
|
-
import { saveAs } from 'file-saver'
|
|
7
|
-
|
|
8
|
-
import { store, PageView, client } from '@things-factory/shell'
|
|
9
|
-
import { togglefullscreen, isMacOS } from '@things-factory/utils'
|
|
10
|
-
|
|
11
|
-
import { provider } from '../board-provider'
|
|
12
|
-
|
|
13
|
-
import { ADD_MODELLER_EDITORS } from '@things-factory/modeller-ui'
|
|
14
|
-
import { ADD_BOARD_COMPONENTS } from '../actions/board'
|
|
15
|
-
|
|
16
1
|
import '../board-modeller/board-modeller'
|
|
17
2
|
import '../board-modeller/edit-toolbar'
|
|
18
|
-
|
|
19
3
|
import './things-scene-components.import'
|
|
4
|
+
|
|
5
|
+
import { PageView, client, store } from '@things-factory/shell'
|
|
6
|
+
import { css, html } from 'lit-element'
|
|
7
|
+
import { isMacOS, togglefullscreen } from '@things-factory/utils'
|
|
8
|
+
|
|
9
|
+
import { ADD_BOARD_COMPONENTS } from '../actions/board'
|
|
10
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
20
11
|
import components from './things-scene-components-with-tools.import'
|
|
12
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
13
|
+
import gql from 'graphql-tag'
|
|
14
|
+
import { gqlContext } from '@things-factory/shell'
|
|
15
|
+
import { provider } from '../board-provider'
|
|
16
|
+
import { saveAs } from 'file-saver'
|
|
21
17
|
|
|
22
18
|
const NOOP = () => {}
|
|
23
19
|
|
|
@@ -43,10 +39,7 @@ export class BoardModellerPage extends connect(store)(PageView) {
|
|
|
43
39
|
})
|
|
44
40
|
}
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
type: ADD_MODELLER_EDITORS,
|
|
48
|
-
editors: addedEditors
|
|
49
|
-
})
|
|
42
|
+
OxPropertyEditor.register(addedEditors)
|
|
50
43
|
|
|
51
44
|
this.boardName = ''
|
|
52
45
|
this.model = null
|
|
@@ -59,7 +52,6 @@ export class BoardModellerPage extends connect(store)(PageView) {
|
|
|
59
52
|
this.componentGroupList = []
|
|
60
53
|
this.fonts = []
|
|
61
54
|
this.board = null
|
|
62
|
-
this.propertyEditor = []
|
|
63
55
|
}
|
|
64
56
|
|
|
65
57
|
static get properties() {
|
|
@@ -220,7 +212,6 @@ export class BoardModellerPage extends connect(store)(PageView) {
|
|
|
220
212
|
|
|
221
213
|
stateChanged(state) {
|
|
222
214
|
this.baseUrl = state.route.rootPath
|
|
223
|
-
this.propertyEditor = state.modeller.editors
|
|
224
215
|
|
|
225
216
|
this.componentGroupList = state.board.templates
|
|
226
217
|
this.fonts = state.font
|
|
@@ -274,7 +265,6 @@ export class BoardModellerPage extends connect(store)(PageView) {
|
|
|
274
265
|
@save-model=${e => this.saveBoard()}
|
|
275
266
|
.componentGroupList=${this.componentGroupList}
|
|
276
267
|
.fonts=${this.fonts}
|
|
277
|
-
.propertyEditor=${this.propertyEditor}
|
|
278
268
|
.hideProperty=${this.hideProperty}
|
|
279
269
|
>
|
|
280
270
|
</board-modeller>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/board-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@material/mwc-list": "^0.25.3",
|
|
28
28
|
"@material/mwc-select": "^0.25.3",
|
|
29
|
-
"@operato/board": "^0.2.
|
|
29
|
+
"@operato/board": "^0.2.43",
|
|
30
30
|
"@polymer/iron-icon": "^3.0.1",
|
|
31
31
|
"@polymer/iron-icons": "^3.0.1",
|
|
32
32
|
"@polymer/paper-button": "^3.0.1",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"@polymer/paper-listbox": "^3.0.1",
|
|
39
39
|
"@polymer/paper-menu-button": "^3.0.1",
|
|
40
40
|
"@polymer/paper-slider": "^3.0.1",
|
|
41
|
-
"@things-factory/barcode-base": "^4.0.
|
|
42
|
-
"@things-factory/grist-ui": "^4.0.
|
|
43
|
-
"@things-factory/help": "^4.0.
|
|
44
|
-
"@things-factory/i18n-base": "^4.0.
|
|
45
|
-
"@things-factory/modeller-ui": "^4.0.
|
|
41
|
+
"@things-factory/barcode-base": "^4.0.12",
|
|
42
|
+
"@things-factory/grist-ui": "^4.0.12",
|
|
43
|
+
"@things-factory/help": "^4.0.12",
|
|
44
|
+
"@things-factory/i18n-base": "^4.0.12",
|
|
45
|
+
"@things-factory/modeller-ui": "^4.0.12",
|
|
46
46
|
"file-saver": "^2.0.2",
|
|
47
47
|
"sortablejs": "^1.10.2"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "29d59ff95fcb473cb43c6f798cd04f3ec3a779a0"
|
|
50
50
|
}
|