@operato/dataset 1.0.0-alpha.3 → 1.0.0-alpha.30
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/CHANGELOG.md +241 -0
- package/demo/index.html +9 -95
- package/demo/ox-data-entry-form.html +110 -0
- package/demo/ox-data-item-spec.html +148 -0
- package/demo/ox-grist-editor-data-item-spec.html +469 -0
- package/dist/src/grist-editor/index.d.ts +1 -0
- package/dist/src/grist-editor/index.js +7 -0
- package/dist/src/grist-editor/index.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.d.ts +11 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js +77 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-data-item-spec.d.ts +13 -0
- package/dist/src/grist-editor/ox-popup-data-item-spec.js +90 -0
- package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-data-entry-form.d.ts +1 -24
- package/dist/src/ox-data-entry-form.js +58 -8
- package/dist/src/ox-data-entry-form.js.map +1 -1
- package/dist/src/ox-data-item-spec.d.ts +22 -0
- package/dist/src/ox-data-item-spec.js +81 -0
- package/dist/src/ox-data-item-spec.js.map +1 -0
- package/dist/src/types.d.ts +38 -0
- package/dist/src/types.js +2 -0
- package/dist/src/types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +16 -11
- package/src/grist-editor/index.ts +10 -0
- package/src/grist-editor/ox-grist-editor-data-item-spec.ts +92 -0
- package/src/grist-editor/ox-popup-data-item-spec.ts +90 -0
- package/src/index.ts +3 -1
- package/src/ox-data-entry-form.ts +59 -29
- package/src/ox-data-item-spec.ts +79 -0
- package/src/types.ts +38 -0
- package/themes/app-theme.css +142 -0
- package/themes/form-theme.css +75 -0
- package/themes/grist-theme.css +194 -0
- package/themes/oops-theme.css +26 -0
- package/themes/report-theme.css +47 -0
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,247 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-03-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @operato/dataset
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-03-17)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @operato/dataset
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [1.0.0-alpha.28](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.28) (2022-03-17)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### :rocket: New Features
|
|
26
|
+
|
|
27
|
+
* add ox-grist-editor for partition-keys ([7672a27](https://github.com/hatiolab/operato/commit/7672a2729f78475602733a83779f6a7a96e128fd))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [1.0.0-alpha.27](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.26...v1.0.0-alpha.27) (2022-03-17)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### :rocket: New Features
|
|
35
|
+
|
|
36
|
+
* add ox-grist-editor for partition-keys ([7672a27](https://github.com/hatiolab/operato/commit/7672a2729f78475602733a83779f6a7a96e128fd))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [1.0.0-alpha.26](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.25...v1.0.0-alpha.26) (2022-03-17)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @operato/dataset
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## [1.0.0-alpha.25](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.24...v1.0.0-alpha.25) (2022-03-17)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @operato/dataset
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## [1.0.0-alpha.24](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.23...v1.0.0-alpha.24) (2022-03-17)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### :bug: Bug Fix
|
|
60
|
+
|
|
61
|
+
* ccp, dataset, property-editor style ([92b2448](https://github.com/hatiolab/operato/commit/92b2448756604ee0b885949dd193241f319cf147))
|
|
62
|
+
* ox-data-item-spec style ([f963757](https://github.com/hatiolab/operato/commit/f963757ccef0144687ce49493281c25a82a259d3))
|
|
63
|
+
* refactoring grist-editor, property-editor and input ([bdc3197](https://github.com/hatiolab/operato/commit/bdc31977d148c80a3ac0bea4b33160bac277df1e))
|
|
64
|
+
* refactoring grist-editor, property-editor and input ([ea7431a](https://github.com/hatiolab/operato/commit/ea7431a5e2dfd96ef392c1905e9622df7c2ef88c))
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## [1.0.0-alpha.23](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.22...v1.0.0-alpha.23) (2022-03-17)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### :rocket: New Features
|
|
72
|
+
|
|
73
|
+
* added qc module ([263b679](https://github.com/hatiolab/operato/commit/263b6794b97a635df1a50d013adaef2e83635908))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## [1.0.0-alpha.22](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.21...v1.0.0-alpha.22) (2022-03-17)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### :bug: Bug Fix
|
|
81
|
+
|
|
82
|
+
* ccp demo ([67b7d65](https://github.com/hatiolab/operato/commit/67b7d65b48d0ca7b3350684a45a396c0538c4902))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### :rocket: New Features
|
|
86
|
+
|
|
87
|
+
* added data-item-spec-editor for grist ([8376e14](https://github.com/hatiolab/operato/commit/8376e142d894a709e60ed676e917d5a26e01e374))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## [1.0.0-alpha.21](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.20...v1.0.0-alpha.21) (2022-03-16)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### :rocket: New Features
|
|
95
|
+
|
|
96
|
+
* @operato/ccp module added ([f08ba5a](https://github.com/hatiolab/operato/commit/f08ba5a464c04b7fb132c6f18de975997087846a))
|
|
97
|
+
* ccp spec provider ([d72fe7c](https://github.com/hatiolab/operato/commit/d72fe7c497685e7f033ef04e6a866bd86613f397))
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### :bug: Bug Fix
|
|
101
|
+
|
|
102
|
+
* demo ([6fa3eac](https://github.com/hatiolab/operato/commit/6fa3eac612bd98ce25e3ef6d8ce89527d7152fb4))
|
|
103
|
+
* description on ox-data-item-spec view ([47da306](https://github.com/hatiolab/operato/commit/47da306a253a96e0c24c986e4608bfe0713a111a))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## [1.0.0-alpha.20](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.19...v1.0.0-alpha.20) (2022-03-15)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### :bug: Bug Fix
|
|
111
|
+
|
|
112
|
+
* ox-data-entry-form in dataset module ([736fe96](https://github.com/hatiolab/operato/commit/736fe968e292059055d18a4c18a5da979bbb4722))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## [1.0.0-alpha.19](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-03-14)
|
|
117
|
+
|
|
118
|
+
**Note:** Version bump only for package @operato/dataset
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## [1.0.0-alpha.18](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-03-14)
|
|
125
|
+
|
|
126
|
+
**Note:** Version bump only for package @operato/dataset
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## [1.0.0-alpha.17](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.16...v1.0.0-alpha.17) (2022-03-13)
|
|
133
|
+
|
|
134
|
+
**Note:** Version bump only for package @operato/dataset
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
## [1.0.0-alpha.16](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.15...v1.0.0-alpha.16) (2022-03-13)
|
|
141
|
+
|
|
142
|
+
**Note:** Version bump only for package @operato/dataset
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## [1.0.0-alpha.15](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.14...v1.0.0-alpha.15) (2022-03-13)
|
|
149
|
+
|
|
150
|
+
**Note:** Version bump only for package @operato/dataset
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## [1.0.0-alpha.14](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.13...v1.0.0-alpha.14) (2022-03-13)
|
|
157
|
+
|
|
158
|
+
**Note:** Version bump only for package @operato/dataset
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## [1.0.0-alpha.13](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.12...v1.0.0-alpha.13) (2022-03-13)
|
|
165
|
+
|
|
166
|
+
**Note:** Version bump only for package @operato/dataset
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## [1.0.0-alpha.12](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.11...v1.0.0-alpha.12) (2022-03-13)
|
|
173
|
+
|
|
174
|
+
**Note:** Version bump only for package @operato/dataset
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## [1.0.0-alpha.11](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.10...v1.0.0-alpha.11) (2022-03-12)
|
|
181
|
+
|
|
182
|
+
**Note:** Version bump only for package @operato/dataset
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## [1.0.0-alpha.10](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.9...v1.0.0-alpha.10) (2022-03-12)
|
|
189
|
+
|
|
190
|
+
**Note:** Version bump only for package @operato/dataset
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## [1.0.0-alpha.9](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2022-03-12)
|
|
197
|
+
|
|
198
|
+
**Note:** Version bump only for package @operato/dataset
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
## [1.0.0-alpha.8](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2022-03-11)
|
|
205
|
+
|
|
206
|
+
**Note:** Version bump only for package @operato/dataset
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## [1.0.0-alpha.7](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2022-03-11)
|
|
213
|
+
|
|
214
|
+
**Note:** Version bump only for package @operato/dataset
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## [1.0.0-alpha.6](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.5...v1.0.0-alpha.6) (2022-03-11)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### :bug: Bug Fix
|
|
224
|
+
|
|
225
|
+
* ox-data-entry-form style ([c94c833](https://github.com/hatiolab/operato/commit/c94c8338aee8cf3e69c286e6af7cb2b5f081bbc7))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
## [1.0.0-alpha.5](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2022-03-11)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
### :bug: Bug Fix
|
|
233
|
+
|
|
234
|
+
* data entry style ([d3dc3a6](https://github.com/hatiolab/operato/commit/d3dc3a6612c75597162621bd22421fa8d808cb13))
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## [1.0.0-alpha.4](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2022-03-11)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### :bug: Bug Fix
|
|
242
|
+
|
|
243
|
+
* ox-data-entry-form options and inputs layout ([56987c6](https://github.com/hatiolab/operato/commit/56987c664000d558427ba8dbf77730130061cb1a))
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
6
247
|
## [1.0.0-alpha.3](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2022-03-10)
|
|
7
248
|
|
|
8
249
|
|
package/demo/index.html
CHANGED
|
@@ -2,111 +2,25 @@
|
|
|
2
2
|
<html lang="en-GB">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
5
6
|
<style>
|
|
6
7
|
body {
|
|
7
|
-
background: #fafafa;
|
|
8
8
|
--ox-checkbox-size: 12px;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
height: 300px;
|
|
14
|
-
background-color: lightgray;
|
|
15
|
-
vertical-align: middle;
|
|
11
|
+
a {
|
|
12
|
+
display: block;
|
|
16
13
|
}
|
|
17
14
|
</style>
|
|
15
|
+
|
|
18
16
|
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
19
17
|
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
18
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
19
|
+
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
import { html, render } from 'lit'
|
|
26
|
-
import '../dist/src/ox-data-entry-form.js'
|
|
27
|
-
|
|
28
|
-
const parent = document.querySelector('#demo')
|
|
29
|
-
const dataSet = {
|
|
30
|
-
name: 'sample',
|
|
31
|
-
description: 'sample description',
|
|
32
|
-
dataItems: [
|
|
33
|
-
{
|
|
34
|
-
name: '창고 온도',
|
|
35
|
-
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
36
|
-
sequence: 1,
|
|
37
|
-
tag: 'temp',
|
|
38
|
-
type: 'number',
|
|
39
|
-
quota: 1
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: '창고 습도',
|
|
43
|
-
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
44
|
-
sequence: 2,
|
|
45
|
-
tag: 'humid',
|
|
46
|
-
type: 'number',
|
|
47
|
-
quota: 5
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: '육안 검사',
|
|
51
|
-
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
52
|
-
sequence: 3,
|
|
53
|
-
tag: 'inspection',
|
|
54
|
-
type: 'boolean',
|
|
55
|
-
quota: 3
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: '품평',
|
|
59
|
-
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
60
|
-
sequence: 4,
|
|
61
|
-
tag: 'evaluation',
|
|
62
|
-
type: 'select',
|
|
63
|
-
options: {
|
|
64
|
-
options: [
|
|
65
|
-
{ text: '최우수', value: '최우수' },
|
|
66
|
-
{ text: '우수', value: '우수' },
|
|
67
|
-
{ text: '보통', value: '보통' },
|
|
68
|
-
{ text: '미달', value: '미달' }
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
quota: 3
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
name: '코멘트',
|
|
75
|
-
description: '특이사항을 기록함.',
|
|
76
|
-
sequence: 4,
|
|
77
|
-
tag: 'comment',
|
|
78
|
-
type: 'string',
|
|
79
|
-
quota: 1
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
name: '첨부파일',
|
|
83
|
-
description: '참조 첨부 파일.',
|
|
84
|
-
sequence: 4,
|
|
85
|
-
tag: 'attachment',
|
|
86
|
-
type: 'file',
|
|
87
|
-
quota: 1
|
|
88
|
-
}
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
var value = {
|
|
93
|
-
temp: 1000,
|
|
94
|
-
humid: [20, 23, 21, 26, 27],
|
|
95
|
-
inspection: [true, false, true],
|
|
96
|
-
evaluation: ['최우수', '보통', '우수']
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
render(
|
|
100
|
-
html`<ox-data-entry-form
|
|
101
|
-
.dataSet=${dataSet}
|
|
102
|
-
.value=${value}
|
|
103
|
-
@change=${e => {
|
|
104
|
-
value = e.detail
|
|
105
|
-
console.log('change', value)
|
|
106
|
-
}}
|
|
107
|
-
></ox-data-entry-form>`,
|
|
108
|
-
parent
|
|
109
|
-
)
|
|
110
|
-
</script>
|
|
22
|
+
<a href="./ox-data-entry-form.html">ox-data-entry-form</a>
|
|
23
|
+
<a href="./ox-data-item-spec.html">ox-data-item-spec</a>
|
|
24
|
+
<a href="./ox-grist-editor-data-item-spec.html">ox-grist-editor-data-item-spec</a>
|
|
111
25
|
</body>
|
|
112
26
|
</html>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en-GB">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
6
|
+
<style>
|
|
7
|
+
body {
|
|
8
|
+
--ox-checkbox-size: 12px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
#demo {
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
15
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
16
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
17
|
+
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="demo"></div>
|
|
21
|
+
|
|
22
|
+
<script type="module">
|
|
23
|
+
import { html, render } from 'lit'
|
|
24
|
+
import '../dist/src/ox-data-entry-form.js'
|
|
25
|
+
|
|
26
|
+
const parent = document.querySelector('#demo')
|
|
27
|
+
const dataSet = {
|
|
28
|
+
name: 'sample',
|
|
29
|
+
description: 'sample description',
|
|
30
|
+
dataItems: [
|
|
31
|
+
{
|
|
32
|
+
name: '창고 온도',
|
|
33
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
34
|
+
sequence: 1,
|
|
35
|
+
tag: 'temp',
|
|
36
|
+
type: 'number',
|
|
37
|
+
quota: 1
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: '창고 습도',
|
|
41
|
+
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
42
|
+
sequence: 2,
|
|
43
|
+
tag: 'humid',
|
|
44
|
+
type: 'number',
|
|
45
|
+
quota: 5
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: '육안 검사',
|
|
49
|
+
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
50
|
+
sequence: 3,
|
|
51
|
+
tag: 'inspection',
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
quota: 3
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: '품평',
|
|
57
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
58
|
+
sequence: 4,
|
|
59
|
+
tag: 'evaluation',
|
|
60
|
+
type: 'select',
|
|
61
|
+
options: {
|
|
62
|
+
options: [
|
|
63
|
+
{ text: '최우수', value: '최우수' },
|
|
64
|
+
{ text: '우수', value: '우수' },
|
|
65
|
+
{ text: '보통', value: '보통' },
|
|
66
|
+
{ text: '미달', value: '미달' }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
quota: 3
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: '코멘트',
|
|
73
|
+
description: '특이사항을 기록함.',
|
|
74
|
+
sequence: 4,
|
|
75
|
+
tag: 'comment',
|
|
76
|
+
type: 'string',
|
|
77
|
+
quota: 1
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: '첨부파일',
|
|
81
|
+
description: '참조 첨부 파일.',
|
|
82
|
+
sequence: 4,
|
|
83
|
+
tag: 'attachment',
|
|
84
|
+
type: 'file',
|
|
85
|
+
quota: 1
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
var value = {
|
|
91
|
+
temp: 1000,
|
|
92
|
+
humid: [20, 23, 21, 26, 27],
|
|
93
|
+
inspection: [true, false, true],
|
|
94
|
+
evaluation: ['최우수', '보통', '우수']
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
render(
|
|
98
|
+
html`<ox-data-entry-form
|
|
99
|
+
.dataSet=${dataSet}
|
|
100
|
+
.value=${value}
|
|
101
|
+
@change=${e => {
|
|
102
|
+
value = e.detail
|
|
103
|
+
console.log('change', value)
|
|
104
|
+
}}
|
|
105
|
+
></ox-data-entry-form>`,
|
|
106
|
+
parent
|
|
107
|
+
)
|
|
108
|
+
</script>
|
|
109
|
+
</body>
|
|
110
|
+
</html>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en-GB">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
6
|
+
<style>
|
|
7
|
+
body {
|
|
8
|
+
--ox-checkbox-size: 12px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
#demo {
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
15
|
+
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
16
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
17
|
+
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
18
|
+
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<div id="demo"></div>
|
|
21
|
+
|
|
22
|
+
<script type="module">
|
|
23
|
+
import { html, render } from 'lit'
|
|
24
|
+
|
|
25
|
+
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
26
|
+
import '@operato/property-editor/ox-property-editor-number.js'
|
|
27
|
+
import '@operato/property-editor/ox-property-editor-string.js'
|
|
28
|
+
|
|
29
|
+
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
30
|
+
|
|
31
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
32
|
+
|
|
33
|
+
OxPropertyEditor.register({
|
|
34
|
+
number: 'ox-property-editor-number',
|
|
35
|
+
string: 'ox-property-editor-string',
|
|
36
|
+
boolean: 'ox-property-editor-checkbox'
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
import { OxDataItemSpec } from '../dist/src/ox-data-item-spec.js'
|
|
40
|
+
import '../dist/src/ox-data-item-spec.js'
|
|
41
|
+
|
|
42
|
+
const parent = document.querySelector('#demo')
|
|
43
|
+
|
|
44
|
+
const ccpProvider = dataItem => {
|
|
45
|
+
return {
|
|
46
|
+
name: 'ccp',
|
|
47
|
+
description: 'ccp specs',
|
|
48
|
+
specs: [
|
|
49
|
+
{
|
|
50
|
+
type: 'number',
|
|
51
|
+
label: 'critical limits',
|
|
52
|
+
name: 'criticalLimits',
|
|
53
|
+
property: dataItem
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: 'string',
|
|
57
|
+
label: 'target limits',
|
|
58
|
+
name: 'targetLimits',
|
|
59
|
+
property: dataItem
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const qcProvider = dataItem => {
|
|
66
|
+
return {
|
|
67
|
+
name: 'qc',
|
|
68
|
+
description: 'qc specs',
|
|
69
|
+
specs: [
|
|
70
|
+
{
|
|
71
|
+
type: 'number',
|
|
72
|
+
label: 'critical limits',
|
|
73
|
+
name: 'criticalLimits',
|
|
74
|
+
property: dataItem
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'boolean',
|
|
78
|
+
label: 'target limits',
|
|
79
|
+
name: 'targetLimits',
|
|
80
|
+
property: dataItem
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
OxDataItemSpec.registerProvider('ccp', ccpProvider)
|
|
87
|
+
OxDataItemSpec.registerProvider('qc', qcProvider)
|
|
88
|
+
|
|
89
|
+
const dataItemA = {
|
|
90
|
+
name: '창고 온도',
|
|
91
|
+
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
92
|
+
sequence: 1,
|
|
93
|
+
tag: 'temp',
|
|
94
|
+
unit: '℃',
|
|
95
|
+
type: 'number',
|
|
96
|
+
quota: 1
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const dataItemB = {
|
|
100
|
+
name: '품평',
|
|
101
|
+
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
102
|
+
sequence: 4,
|
|
103
|
+
tag: 'evaluation',
|
|
104
|
+
type: 'select',
|
|
105
|
+
options: {
|
|
106
|
+
options: [
|
|
107
|
+
{ text: '최우수', value: '최우수' },
|
|
108
|
+
{ text: '우수', value: '우수' },
|
|
109
|
+
{ text: '보통', value: '보통' },
|
|
110
|
+
{ text: '미달', value: '미달' }
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
quota: 3
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const dataItemC = {
|
|
117
|
+
name: '코멘트',
|
|
118
|
+
description: '특이사항을 기록함.',
|
|
119
|
+
sequence: 4,
|
|
120
|
+
tag: 'comment',
|
|
121
|
+
type: 'string',
|
|
122
|
+
quota: 1
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
var specA = {
|
|
126
|
+
ccp: { criticalLimits: 1000, targetLimits: true },
|
|
127
|
+
qc: { criticalLimits: 400, targetLimits: false }
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
var specB = {
|
|
131
|
+
ccp: { accpetables: ['최우수', '우수'] },
|
|
132
|
+
qc: { accpetables: ['최우수', '우수'] }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
render(
|
|
136
|
+
html`<ox-data-item-spec
|
|
137
|
+
.dataItem=${dataItemA}
|
|
138
|
+
.value=${specA}
|
|
139
|
+
@change=${e => {
|
|
140
|
+
specA = e.detail
|
|
141
|
+
console.log('change', specA)
|
|
142
|
+
}}
|
|
143
|
+
></ox-data-item-spec>`,
|
|
144
|
+
parent
|
|
145
|
+
)
|
|
146
|
+
</script>
|
|
147
|
+
</body>
|
|
148
|
+
</html>
|