@things-factory/modeller-ui 4.1.27 → 5.0.0-alpha.2
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/editors/things-editor-3dish.js +1 -1
- package/client/editors/things-editor-angle-input.js +1 -1
- package/client/editors/things-editor-attachment-selector.js +1 -1
- package/client/editors/things-editor-buttons-radio.js +1 -1
- package/client/editors/things-editor-code.js +7 -5
- package/client/editors/things-editor-color-stops.js +1 -1
- package/client/editors/things-editor-color-style.js +1 -1
- package/client/editors/things-editor-color.js +1 -1
- package/client/editors/things-editor-data.js +1 -1
- package/client/editors/things-editor-font-selector.js +1 -1
- package/client/editors/things-editor-gradient.js +1 -1
- package/client/editors/things-editor-graphql.js +1 -1
- package/client/editors/things-editor-id.js +2 -4
- package/client/editors/things-editor-layout/things-card-layout.js +1 -1
- package/client/editors/things-editor-layout/things-editor-layout.js +9 -19
- package/client/editors/things-editor-layout/things-grid-layout.js +1 -1
- package/client/editors/things-editor-multiple-color.js +1 -1
- package/client/editors/things-editor-options.js +12 -14
- package/client/editors/things-editor-pattern.js +1 -1
- package/client/editors/things-editor-property-styles.js +1 -1
- package/client/editors/things-editor-range-input.js +2 -2
- package/client/editors/things-editor-script.js +3 -5
- package/client/editors/things-editor-stack.js +5 -5
- package/client/editors/things-editor-table.js +1 -1
- package/client/editors/things-editor-value-map.js +1 -1
- package/client/editors/things-editor-value-range.js +1 -1
- package/package.json +13 -13
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { LitElement, html, css, unsafeCSS } from 'lit
|
|
5
|
+
import { LitElement, html, css, unsafeCSS } from 'lit'
|
|
6
6
|
|
|
7
7
|
import CodeMirrorStyle from '!!text-loader!codemirror/lib/codemirror.css'
|
|
8
8
|
import FullScreenStyle from '!!text-loader!codemirror/addon/display/fullscreen.css'
|
|
@@ -95,10 +95,12 @@ export default class ThingsEditorCode extends LitElement {
|
|
|
95
95
|
let lint = this.lint
|
|
96
96
|
let hintOptions = this.hintOptions
|
|
97
97
|
let tabAsSpace = (this.tabAsSpace || 'false').toLowerCase() == 'true'
|
|
98
|
-
let tabCallback = tabAsSpace
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
let tabCallback = tabAsSpace
|
|
99
|
+
? function (cm) {
|
|
100
|
+
var spaces = Array(cm.getOption('indentUnit') + 1).join(' ')
|
|
101
|
+
cm.replaceSelection(spaces, 'end', '+input')
|
|
102
|
+
}
|
|
103
|
+
: null
|
|
102
104
|
if (textarea) {
|
|
103
105
|
this._editor = CodeMirror.fromTextArea(textarea, {
|
|
104
106
|
value: this.value,
|
|
@@ -7,7 +7,7 @@ import './things-editor-color'
|
|
|
7
7
|
import './things-editor-gradient'
|
|
8
8
|
import './things-editor-pattern'
|
|
9
9
|
|
|
10
|
-
import { css, html, LitElement } from 'lit
|
|
10
|
+
import { css, html, LitElement } from 'lit'
|
|
11
11
|
|
|
12
12
|
export default class ThingsEditorColorStyle extends LitElement {
|
|
13
13
|
static get is() {
|
|
@@ -9,7 +9,7 @@ import '@polymer/paper-item/paper-item'
|
|
|
9
9
|
import './things-editor-angle-input'
|
|
10
10
|
import './things-editor-color-stops'
|
|
11
11
|
|
|
12
|
-
import { css, html, LitElement } from 'lit
|
|
12
|
+
import { css, html, LitElement } from 'lit'
|
|
13
13
|
|
|
14
14
|
export default class ThingsEditorGradient extends LitElement {
|
|
15
15
|
constructor() {
|
|
@@ -11,7 +11,7 @@ import 'codemirror-graphql/lint'
|
|
|
11
11
|
import 'codemirror-graphql/mode'
|
|
12
12
|
|
|
13
13
|
import { GRAPHQL_URI, client } from '@things-factory/shell'
|
|
14
|
-
import { LitElement, css, html, unsafeCSS } from 'lit
|
|
14
|
+
import { LitElement, css, html, unsafeCSS } from 'lit'
|
|
15
15
|
import { introspectSchema, wrapSchema } from '@graphql-tools/wrap'
|
|
16
16
|
|
|
17
17
|
import CodeMirror from 'codemirror'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { LitElement, html, css } from 'lit
|
|
5
|
+
import { LitElement, html, css } from 'lit'
|
|
6
6
|
|
|
7
7
|
class ThingsEditorId extends LitElement {
|
|
8
8
|
static get is() {
|
|
@@ -48,9 +48,7 @@ class ThingsEditorId extends LitElement {
|
|
|
48
48
|
.placeholder=${this.getAttribute('placeholder') || ''}
|
|
49
49
|
list="ids"
|
|
50
50
|
/>
|
|
51
|
-
<datalist id="ids">
|
|
52
|
-
${this._ids.map(id => html` <option value=${id}></option> `)}
|
|
53
|
-
</datalist>
|
|
51
|
+
<datalist id="ids">${this._ids.map(id => html` <option value=${id}></option> `)}</datalist>
|
|
54
52
|
`
|
|
55
53
|
}
|
|
56
54
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { LitElement, html } from 'lit
|
|
5
|
+
import { LitElement, html } from 'lit'
|
|
6
6
|
|
|
7
7
|
import './things-grid-layout'
|
|
8
8
|
import './things-card-layout'
|
|
@@ -49,26 +49,16 @@ class ThingsLayout extends LitElement {
|
|
|
49
49
|
<div>
|
|
50
50
|
<select value-key="layout" .value=${this.layout}>
|
|
51
51
|
<option value="" selected></option>
|
|
52
|
-
${
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<option value="${layout}">${layout}</option>
|
|
56
|
-
`
|
|
57
|
-
})
|
|
58
|
-
}
|
|
52
|
+
${layouts.map(layout => {
|
|
53
|
+
return html` <option value="${layout}">${layout}</option> `
|
|
54
|
+
})}
|
|
59
55
|
</select>
|
|
60
56
|
|
|
61
|
-
${
|
|
62
|
-
this.layout
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
: this.layout == 'card'
|
|
67
|
-
? html`
|
|
68
|
-
<things-card-layout value-key="options" .value=${this.option}></things-card-layout>
|
|
69
|
-
`
|
|
70
|
-
: html``
|
|
71
|
-
}
|
|
57
|
+
${this.layout == 'grid'
|
|
58
|
+
? html` <things-grid-layout value-key="options" .value=${this.option}></things-grid-layout> `
|
|
59
|
+
: this.layout == 'card'
|
|
60
|
+
? html` <things-card-layout value-key="options" .value=${this.option}></things-card-layout> `
|
|
61
|
+
: html``}
|
|
72
62
|
</div>
|
|
73
63
|
`
|
|
74
64
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// TODO LitElement 로 변경 후 검증하지 않음.
|
|
6
|
-
import { LitElement, html, css } from 'lit
|
|
6
|
+
import { LitElement, html, css } from 'lit'
|
|
7
7
|
|
|
8
8
|
export default class ThingsEditorOptions extends LitElement {
|
|
9
9
|
static get is() {
|
|
@@ -53,17 +53,15 @@ export default class ThingsEditorOptions extends LitElement {
|
|
|
53
53
|
|
|
54
54
|
render() {
|
|
55
55
|
return html`
|
|
56
|
-
${
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
)
|
|
66
|
-
}
|
|
56
|
+
${(this.options || []).map(
|
|
57
|
+
item => html`
|
|
58
|
+
<div data-record="">
|
|
59
|
+
<input type="text" data-text="" placeholder="text" .value=${item.text} />
|
|
60
|
+
<input type="text" data-value="" placeholder="value" .value=${item.value} />
|
|
61
|
+
<button class="record-action" @click=${e => this._delete(e)} tabindex="-1">-</button>
|
|
62
|
+
</div>
|
|
63
|
+
`
|
|
64
|
+
)}
|
|
67
65
|
|
|
68
66
|
<div data-record-new="">
|
|
69
67
|
<input type="text" data-text="" placeholder="text" value="" />
|
|
@@ -120,13 +118,13 @@ export default class ThingsEditorOptions extends LitElement {
|
|
|
120
118
|
}
|
|
121
119
|
|
|
122
120
|
_sort(e) {
|
|
123
|
-
var sorter = function(a, b) {
|
|
121
|
+
var sorter = function (a, b) {
|
|
124
122
|
return b.text < a.text
|
|
125
123
|
}
|
|
126
124
|
|
|
127
125
|
this.options = this._toArray(this.options)
|
|
128
126
|
.sort(sorter)
|
|
129
|
-
.reduce(function(sum, i) {
|
|
127
|
+
.reduce(function (sum, i) {
|
|
130
128
|
sum[i.text] = i.value
|
|
131
129
|
return sum
|
|
132
130
|
}, {})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { LitElement, html, css } from 'lit
|
|
5
|
+
import { LitElement, html, css } from 'lit'
|
|
6
6
|
|
|
7
7
|
class ThingsEditorRangeInput extends LitElement {
|
|
8
8
|
static get is() {
|
|
@@ -125,7 +125,7 @@ class ThingsEditorRangeInput extends LitElement {
|
|
|
125
125
|
|
|
126
126
|
constructor() {
|
|
127
127
|
super()
|
|
128
|
-
|
|
128
|
+
|
|
129
129
|
this.step = 1
|
|
130
130
|
this.min = -100
|
|
131
131
|
this.max = 100
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// TODO LitElement 로 변경 후 검증하지 않음.
|
|
6
|
-
import { LitElement, html, css } from 'lit
|
|
6
|
+
import { LitElement, html, css } from 'lit'
|
|
7
7
|
|
|
8
8
|
import ace from 'brace'
|
|
9
9
|
import 'brace/mode/javascript'
|
|
@@ -92,7 +92,7 @@ export default class ThingsEditorScript extends LitElement {
|
|
|
92
92
|
this._injectTheme('#ace_editor\\.css')
|
|
93
93
|
this._injectTheme('#ace-tm')
|
|
94
94
|
|
|
95
|
-
this.editor.getSession().on('change', function(event) {
|
|
95
|
+
this.editor.getSession().on('change', function (event) {
|
|
96
96
|
self._changedOnThis = true
|
|
97
97
|
self.set('value', self.editor.getValue())
|
|
98
98
|
self._changedOnThis = false
|
|
@@ -121,9 +121,7 @@ export default class ThingsEditorScript extends LitElement {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
render() {
|
|
124
|
-
return html`
|
|
125
|
-
<div id="container"></div>
|
|
126
|
-
`
|
|
124
|
+
return html` <div id="container"></div> `
|
|
127
125
|
}
|
|
128
126
|
|
|
129
127
|
_configEditor() {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// TODO LitElement 로 변경 후 검증하지 않음.
|
|
6
|
-
import { html, css } from 'lit
|
|
6
|
+
import { html, css } from 'lit'
|
|
7
7
|
|
|
8
8
|
export default class ThingsEditorStack extends LitElement {
|
|
9
9
|
static get is() {
|
|
@@ -69,15 +69,15 @@ export default class ThingsEditorStack extends LitElement {
|
|
|
69
69
|
return html`
|
|
70
70
|
<button id="add-floor" @click=${e => this._onClickAddFloor(e)}>+</button>
|
|
71
71
|
|
|
72
|
-
${
|
|
73
|
-
|
|
72
|
+
${this.stack
|
|
73
|
+
.reverse()
|
|
74
|
+
.map(
|
|
74
75
|
(item, index) => html`
|
|
75
76
|
<div class="${index == this.activeIndex ? 'active' : ''}" @click=${e => this._onClickToActive(e)}>
|
|
76
77
|
${item.name} <button @click=${e => this._onClickRemoveFloor(e)}>-</button>
|
|
77
78
|
</div>
|
|
78
79
|
`
|
|
79
|
-
)
|
|
80
|
-
}
|
|
80
|
+
)}
|
|
81
81
|
`
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -8,7 +8,7 @@ import '@polymer/paper-item/paper-item'
|
|
|
8
8
|
import '@operato/i18n/ox-i18n.js'
|
|
9
9
|
import './things-editor-color'
|
|
10
10
|
|
|
11
|
-
import { css, html, LitElement } from 'lit
|
|
11
|
+
import { css, html, LitElement } from 'lit'
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 테이블 셀의 좌,우,상,하 경계선의 스타일을 편집하는 컴포넌트이다.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/modeller-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.2",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"@graphql-tools/url-loader": "^7.2.0",
|
|
30
30
|
"@graphql-tools/wrap": "^8.1.1",
|
|
31
31
|
"@material/mwc-icon": "^0.25.3",
|
|
32
|
-
"@operato/graphql": "^0.3
|
|
33
|
-
"@operato/help": "^0.3
|
|
34
|
-
"@operato/input": "^0.3
|
|
35
|
-
"@operato/layout": "^0.3
|
|
36
|
-
"@operato/popup": "^0.3
|
|
37
|
-
"@operato/property-editor": "^0.3
|
|
38
|
-
"@operato/shell": "^0.3
|
|
39
|
-
"@operato/utils": "^0.3
|
|
32
|
+
"@operato/graphql": "^0.4.3",
|
|
33
|
+
"@operato/help": "^0.4.3",
|
|
34
|
+
"@operato/input": "^0.4.3",
|
|
35
|
+
"@operato/layout": "^0.4.3",
|
|
36
|
+
"@operato/popup": "^0.4.3",
|
|
37
|
+
"@operato/property-editor": "^0.4.3",
|
|
38
|
+
"@operato/shell": "^0.4.3",
|
|
39
|
+
"@operato/utils": "^0.4.3",
|
|
40
40
|
"@polymer/iron-flex-layout": "^3.0.1",
|
|
41
41
|
"@polymer/iron-form-element-behavior": "^3.0.1",
|
|
42
42
|
"@polymer/iron-resizable-behavior": "^3.0.1",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"@polymer/paper-ripple": "^3.0.2",
|
|
51
51
|
"@polymer/paper-slider": "^3.0.1",
|
|
52
52
|
"@polymer/polymer": "^3.3.1",
|
|
53
|
-
"@things-factory/attachment-ui": "^
|
|
54
|
-
"@things-factory/font-ui": "^
|
|
55
|
-
"@things-factory/i18n-base": "^
|
|
53
|
+
"@things-factory/attachment-ui": "^5.0.0-alpha.2",
|
|
54
|
+
"@things-factory/font-ui": "^5.0.0-alpha.2",
|
|
55
|
+
"@things-factory/i18n-base": "^5.0.0-alpha.2",
|
|
56
56
|
"ace-builds": "^1.4.11",
|
|
57
57
|
"brace": "^0.11.1",
|
|
58
58
|
"codemirror": "^5.59.1",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/codemirror": "^0.0.105"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "055536f981d229d51ae63f46585036b35fa86602"
|
|
68
68
|
}
|