@operato/scene-sted 7.0.1 → 7.3.19

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.
@@ -1,89 +0,0 @@
1
- /*
2
- * Copyright © HatioLab Inc. All rights reserved.
3
- */
4
-
5
- const NATURE: ComponentNature = {
6
- mutable: false,
7
- resizable: true,
8
- rotatable: true,
9
- properties: [
10
- {
11
- type: 'mass-fraction',
12
- label: 'default-value',
13
- name: 'defaultValue'
14
- }
15
- ],
16
- 'value-property': 'value',
17
- help: 'scene/component/graphql'
18
- }
19
-
20
- import '@operato/input/ox-input-mass-fraction.js'
21
- import '@operato/property-editor/ox-property-editor-mass-fraction.js'
22
-
23
- import { Component, ComponentNature, HTMLOverlayElement, Properties, error } from '@hatiolab/things-scene'
24
- import { OxPropertyEditor } from '@operato/property-editor'
25
-
26
- OxPropertyEditor.register({
27
- 'mass-fraction': 'ox-property-editor-mass-fraction'
28
- })
29
-
30
- export default class MassFraction extends HTMLOverlayElement {
31
- static get nature() {
32
- return NATURE
33
- }
34
-
35
- oncreate_element(fraction: HTMLElement) {
36
- fraction.onchange = e => {
37
- this.value = (e.target as any).value
38
- }
39
-
40
- var { defaultValue } = this.state
41
-
42
- // fraction.style.setProperty('--button-background-color', '#fafbfc')
43
- fraction.style.setProperty('--input-padding', '2px')
44
- ;(fraction as any).defaultValue = defaultValue
45
-
46
- this.reposition()
47
- }
48
-
49
- dispose() {
50
- super.dispose()
51
- }
52
-
53
- /*
54
- * 컴포넌트의 생성 또는 속성 변화 시에 호출되며,
55
- * 그에 따른 html element의 반영이 필요한 부분을 구현한다.
56
- *
57
- * ThingsComponent state => HTML element properties
58
- */
59
- setElementProperties(input: HTMLElement) {
60
- var { defaultValue, value } = this.state
61
-
62
- ;(input as any).defaultValue = defaultValue
63
- ;(input as any).value = value
64
- }
65
-
66
- /*
67
- * 컴포넌트가 ready 상태가 되거나, 컴포넌트의 속성이 변화될 시 setElementProperties 뒤에 호출된다.
68
- * 변화에 따른 기본적인 html 속성이 super.reposition()에서 진행되고, 그 밖의 작업이 필요할 때, 오버라이드 한다.
69
- */
70
- reposition() {
71
- super.reposition()
72
-
73
- // TODO how to resize..
74
- }
75
-
76
- onchange(after: Properties, before: Properties) {
77
- super.onchange(after, before)
78
-
79
- if ('value' in after) {
80
- this.data = after.value
81
- }
82
- }
83
-
84
- get tagName() {
85
- return 'ox-input-mass-fraction'
86
- }
87
- }
88
-
89
- Component.register('mass-fraction', MassFraction)
@@ -1,4 +0,0 @@
1
- import massFraction from './mass-fraction'
2
- import inputUnitNumber from './input-unit-number'
3
-
4
- export default [massFraction, inputUnitNumber]
@@ -1,16 +0,0 @@
1
- const icon = new URL('../../icons/input-unit-number-template.png', import.meta.url).href
2
-
3
- export default {
4
- type: 'input-unit-number',
5
- description: 'input-unit-number',
6
- group: 'sted',
7
- /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
- icon,
9
- model: {
10
- type: 'input-unit-number',
11
- left: 10,
12
- top: 10,
13
- width: 100,
14
- height: 20
15
- }
16
- }
@@ -1,16 +0,0 @@
1
- const icon = new URL('../../icons/mass-fraction-template.png', import.meta.url).href
2
-
3
- export default {
4
- type: 'mass-fraction',
5
- description: 'mass-fraction',
6
- group: 'sted',
7
- /* line|shape|textAndMedia|chartAndGauge|table|container|dataSource|IoT|3D|warehouse|form|etc */
8
- icon,
9
- model: {
10
- type: 'mass-fraction',
11
- left: 10,
12
- top: 10,
13
- width: 500,
14
- height: 100
15
- }
16
- }
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "esnext",
5
- "moduleResolution": "node",
6
- "noEmitOnError": true,
7
- "lib": ["es2019", "dom"],
8
- "strict": true,
9
- "esModuleInterop": false,
10
- "allowJs": true,
11
- "allowSyntheticDefaultImports": true,
12
- "experimentalDecorators": true,
13
- "importHelpers": true,
14
- "outDir": "dist",
15
- "sourceMap": true,
16
- "inlineSources": true,
17
- "rootDir": "src",
18
- "declaration": true,
19
- "incremental": true,
20
- "skipLibCheck": true
21
- },
22
- "include": ["**/*.ts", "*.d.ts"]
23
- }