@operato/dataset 1.0.0-beta.38 → 1.0.0-beta.40

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js +1 -1
  3. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js.map +1 -1
  4. package/dist/src/grist-editor/ox-popup-data-item-spec.js +3 -2
  5. package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -1
  6. package/dist/src/index.d.ts +1 -5
  7. package/dist/src/index.js +1 -5
  8. package/dist/src/index.js.map +1 -1
  9. package/dist/src/ox-data-item-spec.d.ts +2 -2
  10. package/dist/src/ox-data-item-spec.js +1 -1
  11. package/dist/src/ox-data-item-spec.js.map +1 -1
  12. package/dist/src/ox-data-ooc-view.js +1 -1
  13. package/dist/src/ox-data-ooc-view.js.map +1 -1
  14. package/dist/src/ox-data-sample-view.d.ts +1 -2
  15. package/dist/src/ox-data-sample-view.js +25 -31
  16. package/dist/src/ox-data-sample-view.js.map +1 -1
  17. package/dist/src/types.d.ts +18 -6
  18. package/dist/src/types.js.map +1 -1
  19. package/dist/src/usecase/ccp/index.d.ts +1 -0
  20. package/dist/src/usecase/ccp/index.js +8 -0
  21. package/dist/src/usecase/ccp/index.js.map +1 -0
  22. package/dist/src/usecase/ccp/ox-data-use-case-ccp.d.ts +7 -0
  23. package/dist/src/usecase/ccp/ox-data-use-case-ccp.js +102 -0
  24. package/dist/src/usecase/ccp/ox-data-use-case-ccp.js.map +1 -0
  25. package/dist/src/usecase/ccp/ox-input-ccp-limits.d.ts +44 -0
  26. package/dist/src/usecase/ccp/ox-input-ccp-limits.js +171 -0
  27. package/dist/src/usecase/ccp/ox-input-ccp-limits.js.map +1 -0
  28. package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.d.ts +5 -0
  29. package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js +24 -0
  30. package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js.map +1 -0
  31. package/dist/src/{ox-data-use-case.d.ts → usecase/ox-data-use-case.d.ts} +5 -5
  32. package/dist/src/{ox-data-use-case.js → usecase/ox-data-use-case.js} +23 -34
  33. package/dist/src/usecase/ox-data-use-case.js.map +1 -0
  34. package/dist/src/usecase/qc/index.d.ts +1 -0
  35. package/dist/src/usecase/qc/index.js +8 -0
  36. package/dist/src/usecase/qc/index.js.map +1 -0
  37. package/dist/src/usecase/qc/ox-data-use-case-qc.d.ts +7 -0
  38. package/dist/src/usecase/qc/ox-data-use-case-qc.js +55 -0
  39. package/dist/src/usecase/qc/ox-data-use-case-qc.js.map +1 -0
  40. package/dist/src/usecase/qc/ox-input-qc-limits.d.ts +44 -0
  41. package/dist/src/usecase/qc/ox-input-qc-limits.js +171 -0
  42. package/dist/src/usecase/qc/ox-input-qc-limits.js.map +1 -0
  43. package/dist/src/usecase/qc/ox-property-editor-qc-limits.d.ts +5 -0
  44. package/dist/src/usecase/qc/ox-property-editor-qc-limits.js +24 -0
  45. package/dist/src/usecase/qc/ox-property-editor-qc-limits.js.map +1 -0
  46. package/dist/stories/ox-data-entry-form.stories.d.ts +19 -0
  47. package/dist/stories/ox-data-entry-form.stories.js +152 -0
  48. package/dist/stories/ox-data-entry-form.stories.js.map +1 -0
  49. package/dist/stories/ox-data-item-spec.stories.d.ts +26 -0
  50. package/dist/stories/ox-data-item-spec.stories.js +102 -0
  51. package/dist/stories/ox-data-item-spec.stories.js.map +1 -0
  52. package/dist/stories/ox-data-ooc-view.stories.d.ts +19 -0
  53. package/dist/stories/ox-data-ooc-view.stories.js +242 -0
  54. package/dist/stories/ox-data-ooc-view.stories.js.map +1 -0
  55. package/dist/stories/ox-data-sample-view.stories.d.ts +19 -0
  56. package/dist/stories/ox-data-sample-view.stories.js +213 -0
  57. package/dist/stories/ox-data-sample-view.stories.js.map +1 -0
  58. package/dist/stories/ox-grist-editor-data-item-spec.stories.d.ts +27 -0
  59. package/dist/stories/ox-grist-editor-data-item-spec.stories.js +389 -0
  60. package/dist/stories/ox-grist-editor-data-item-spec.stories.js.map +1 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +18 -12
  63. package/src/grist-editor/ox-grist-editor-data-item-spec.ts +1 -1
  64. package/src/grist-editor/ox-popup-data-item-spec.ts +3 -2
  65. package/src/index.ts +1 -5
  66. package/src/ox-data-item-spec.ts +3 -3
  67. package/src/ox-data-ooc-view.ts +1 -1
  68. package/src/ox-data-sample-view.ts +28 -31
  69. package/src/types.ts +23 -6
  70. package/src/usecase/ccp/index.ts +10 -0
  71. package/src/usecase/ccp/ox-data-use-case-ccp.ts +147 -0
  72. package/src/usecase/ccp/ox-input-ccp-limits.ts +161 -0
  73. package/src/usecase/ccp/ox-property-editor-ccp-limits.ts +23 -0
  74. package/src/{ox-data-use-case.ts → usecase/ox-data-use-case.ts} +28 -40
  75. package/src/usecase/qc/index.ts +10 -0
  76. package/src/usecase/qc/ox-data-use-case-qc.ts +72 -0
  77. package/src/usecase/qc/ox-input-qc-limits.ts +161 -0
  78. package/src/usecase/qc/ox-property-editor-qc-limits.ts +23 -0
  79. package/stories/ox-data-entry-form.stories.ts +165 -0
  80. package/stories/ox-data-item-spec.stories.ts +121 -0
  81. package/stories/ox-data-ooc-view.stories.ts +256 -0
  82. package/stories/ox-data-sample-view.stories.ts +227 -0
  83. package/stories/ox-grist-editor-data-item-spec.stories.ts +409 -0
  84. package/translations/en.json +26 -8
  85. package/translations/ko.json +25 -7
  86. package/translations/ms.json +26 -8
  87. package/translations/zh.json +25 -7
  88. package/demo/index.html +0 -28
  89. package/demo/ox-data-entry-form.html +0 -118
  90. package/demo/ox-data-item-spec.html +0 -152
  91. package/demo/ox-data-ooc-view.html +0 -185
  92. package/demo/ox-data-sample-view.html +0 -150
  93. package/demo/ox-grist-editor-data-item-spec.html +0 -476
  94. package/dist/src/ox-data-use-case.js.map +0 -1
@@ -0,0 +1,256 @@
1
+ import '@operato/i18n'
2
+ import '../src/ox-data-ooc-view.js'
3
+ import '../src/usecase/ccp' /* register usecase CCP */
4
+ import '@material/mwc-icon'
5
+
6
+ import { html, TemplateResult } from 'lit'
7
+
8
+ export default {
9
+ title: 'ox-data-ooc-view',
10
+ component: 'ox-data-ooc-view',
11
+ argTypes: {}
12
+ }
13
+
14
+ interface Story<T> {
15
+ (args: T): TemplateResult
16
+ args?: Partial<T>
17
+ argTypes?: Record<string, unknown>
18
+ }
19
+
20
+ interface ArgTypes {}
21
+
22
+ const dataSet = {
23
+ name: 'sample',
24
+ description: 'sample description',
25
+ useCase: 'CCP',
26
+ dataItems: [
27
+ {
28
+ name: '창고 온도',
29
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
30
+ sequence: 1,
31
+ tag: 'temp',
32
+ type: 'number',
33
+ quota: 1,
34
+ active: true,
35
+ unit: '℃',
36
+ spec: {
37
+ CCP: {
38
+ criticalLimits: {
39
+ minimum: 100,
40
+ maximum: 200
41
+ },
42
+ targetLimits: {
43
+ minimum: 120,
44
+ maximum: 180
45
+ }
46
+ }
47
+ }
48
+ },
49
+ {
50
+ name: '창고 습도',
51
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
52
+ sequence: 2,
53
+ tag: 'humid',
54
+ type: 'number',
55
+ quota: 5,
56
+ active: true,
57
+ unit: '%',
58
+ spec: {
59
+ CCP: {
60
+ criticalLimits: {
61
+ minimum: 10,
62
+ maximum: 50
63
+ },
64
+ targetLimits: {
65
+ minimum: 20,
66
+ maximum: 40
67
+ }
68
+ }
69
+ }
70
+ },
71
+ {
72
+ name: '육안 검사',
73
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
74
+ sequence: 3,
75
+ tag: 'inspection',
76
+ type: 'boolean',
77
+ quota: 3,
78
+ active: true,
79
+ spec: {
80
+ CCP: {
81
+ criticalLimits: {
82
+ acceptables: true
83
+ },
84
+ targetLimits: {
85
+ acceptables: true
86
+ }
87
+ }
88
+ }
89
+ },
90
+ {
91
+ name: '품평',
92
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
93
+ sequence: 4,
94
+ tag: 'evaluation',
95
+ type: 'select',
96
+ options: {
97
+ options: [
98
+ { text: '최우수', value: '최우수' },
99
+ { text: '우수', value: '우수' },
100
+ { text: '보통', value: '보통' },
101
+ { text: '미달', value: '미달' }
102
+ ]
103
+ },
104
+ quota: 3,
105
+ active: true,
106
+ spec: {
107
+ CCP: {
108
+ criticalLimits: {
109
+ acceptables: ['최우수', '우수', '보통']
110
+ },
111
+ targetLimits: {
112
+ acceptables: ['최우수', '우수']
113
+ }
114
+ }
115
+ }
116
+ },
117
+ {
118
+ name: '코멘트',
119
+ description: '특이사항을 기록함.',
120
+ sequence: 4,
121
+ tag: 'comment',
122
+ type: 'string',
123
+ quota: 1,
124
+ active: true
125
+ },
126
+ {
127
+ name: '첨부파일',
128
+ description: '참조 첨부 파일.',
129
+ sequence: 4,
130
+ tag: 'attachment',
131
+ type: 'file',
132
+ quota: 1,
133
+ active: true
134
+ }
135
+ ]
136
+ }
137
+
138
+ var dataOoc = {
139
+ name: 'Data Sample Name',
140
+ description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
141
+ useCase: 'CCP',
142
+ data: {
143
+ temp: [1000],
144
+ humid: [20, 23, 21, 26, 27],
145
+ inspection: [true, false, true],
146
+ evaluation: ['최우수', '보통', '우수'],
147
+ comment: '이것은 코멘트입니다.'
148
+ },
149
+ spec: {
150
+ temp: {
151
+ name: '창고 온도',
152
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
153
+ spec: {
154
+ CCP: {
155
+ criticalLimits: {
156
+ minimum: 100,
157
+ maximum: 200
158
+ },
159
+ targetLimits: {
160
+ minimum: 120,
161
+ maximum: 180
162
+ }
163
+ }
164
+ }
165
+ },
166
+ humid: {
167
+ name: '창고 습도',
168
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
169
+ spec: {
170
+ CCP: {
171
+ criticalLimits: {
172
+ minimum: 10,
173
+ maximum: 50
174
+ },
175
+ targetLimits: {
176
+ minimum: 20,
177
+ maximum: 40
178
+ }
179
+ }
180
+ }
181
+ },
182
+ inspection: {
183
+ name: '육안 검사',
184
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'
185
+ },
186
+ evaluation: {
187
+ name: '품평',
188
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
189
+ spec: {
190
+ CCP: {
191
+ criticalLimits: {
192
+ acceptables: ['최우수', '우수', '보통']
193
+ },
194
+ targetLimits: {
195
+ acceptables: ['최우수', '우수']
196
+ }
197
+ }
198
+ }
199
+ },
200
+ comment: {
201
+ name: '코멘트',
202
+ description: '특이사항을 기록함.'
203
+ },
204
+ attachment: {
205
+ name: '첨부파일',
206
+ description: '참조 첨부 파일.'
207
+ }
208
+ },
209
+ collectedAt: Date.now(),
210
+ history: [
211
+ {
212
+ user: {
213
+ id: 0,
214
+ name: 'shnam'
215
+ },
216
+ state: 'CREATED',
217
+ timestamp: Date.now()
218
+ },
219
+ {
220
+ user: {
221
+ id: 0,
222
+ name: 'shnam'
223
+ },
224
+ state: 'REVIEWED',
225
+ comment: '금일 생산한 제품은 전량 폐기합니다',
226
+ timestamp: Date.now()
227
+ },
228
+ {
229
+ user: {
230
+ id: 0,
231
+ name: 'shnam'
232
+ },
233
+ state: 'CORRECTED',
234
+ timestamp: Date.now()
235
+ }
236
+ ]
237
+ }
238
+
239
+ const Template: Story<ArgTypes> = ({}: ArgTypes) =>
240
+ html`
241
+ <link href="/themes/app-theme.css" rel="stylesheet" />
242
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
243
+ <style>
244
+ body {
245
+ }
246
+ </style>
247
+
248
+ <ox-data-ooc-view
249
+ .dataSet=${dataSet}
250
+ .dataOoc=${dataOoc}
251
+ @change=${(e: CustomEvent) => console.log(e.detail)}
252
+ ></ox-data-ooc-view>
253
+ `
254
+
255
+ export const Regular = Template.bind({})
256
+ Regular.args = {}
@@ -0,0 +1,227 @@
1
+ import '@operato/i18n'
2
+ import '../src/ox-data-sample-view.js'
3
+ import '../src/usecase/ccp' /* register usecase CCP */
4
+ import '@material/mwc-icon'
5
+
6
+ import { html, TemplateResult } from 'lit'
7
+
8
+ export default {
9
+ title: 'ox-data-sample-view',
10
+ component: 'ox-data-sample-view',
11
+ argTypes: {}
12
+ }
13
+
14
+ interface Story<T> {
15
+ (args: T): TemplateResult
16
+ args?: Partial<T>
17
+ argTypes?: Record<string, unknown>
18
+ }
19
+
20
+ interface ArgTypes {}
21
+
22
+ const dataSet = {
23
+ name: 'sample',
24
+ description: 'sample description',
25
+ useCase: 'CCP',
26
+ dataItems: [
27
+ {
28
+ name: '창고 온도',
29
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
30
+ sequence: 1,
31
+ tag: 'temp',
32
+ type: 'number',
33
+ quota: 1,
34
+ active: true,
35
+ unit: '℃',
36
+ spec: {
37
+ CCP: {
38
+ criticalLimits: {
39
+ minimum: 100,
40
+ maximum: 200
41
+ },
42
+ targetLimits: {
43
+ minimum: 120,
44
+ maximum: 180
45
+ }
46
+ }
47
+ }
48
+ },
49
+ {
50
+ name: '창고 습도',
51
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
52
+ sequence: 2,
53
+ tag: 'humid',
54
+ type: 'number',
55
+ quota: 5,
56
+ active: true,
57
+ unit: '%',
58
+ spec: {
59
+ CCP: {
60
+ criticalLimits: {
61
+ minimum: 10,
62
+ maximum: 50
63
+ },
64
+ targetLimits: {
65
+ minimum: 20,
66
+ maximum: 40
67
+ }
68
+ }
69
+ }
70
+ },
71
+ {
72
+ name: '육안 검사',
73
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
74
+ sequence: 3,
75
+ tag: 'inspection',
76
+ type: 'boolean',
77
+ quota: 3,
78
+ active: true,
79
+ spec: {
80
+ CCP: {
81
+ criticalLimits: {
82
+ acceptables: true
83
+ },
84
+ targetLimits: {
85
+ acceptables: true
86
+ }
87
+ }
88
+ }
89
+ },
90
+ {
91
+ name: '품평',
92
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
93
+ sequence: 4,
94
+ tag: 'evaluation',
95
+ type: 'select',
96
+ options: {
97
+ options: [
98
+ { text: '최우수', value: '최우수' },
99
+ { text: '우수', value: '우수' },
100
+ { text: '보통', value: '보통' },
101
+ { text: '미달', value: '미달' }
102
+ ]
103
+ },
104
+ quota: 3,
105
+ active: true,
106
+ spec: {
107
+ CCP: {
108
+ criticalLimits: {
109
+ acceptables: ['최우수', '우수', '보통']
110
+ },
111
+ targetLimits: {
112
+ acceptables: ['최우수', '우수']
113
+ }
114
+ }
115
+ }
116
+ },
117
+ {
118
+ name: '코멘트',
119
+ description: '특이사항을 기록함.',
120
+ sequence: 4,
121
+ tag: 'comment',
122
+ type: 'string',
123
+ quota: 1,
124
+ active: true
125
+ },
126
+ {
127
+ name: '첨부파일',
128
+ description: '참조 첨부 파일.',
129
+ sequence: 4,
130
+ tag: 'attachment',
131
+ type: 'file',
132
+ quota: 1,
133
+ active: true
134
+ }
135
+ ]
136
+ }
137
+
138
+ var dataSample = {
139
+ name: 'Data Sample Name',
140
+ description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
141
+ useCase: 'CCP',
142
+ data: {
143
+ temp: [1000],
144
+ humid: [20, 23, 21, 26, 27],
145
+ inspection: [true, false, true],
146
+ evaluation: ['최우수', '보통', '우수'],
147
+ comment: '이것은 코멘트입니다.'
148
+ },
149
+ spec: {
150
+ temp: {
151
+ name: '창고 온도',
152
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
153
+ unit: '℃',
154
+ spec: {
155
+ CCP: {
156
+ criticalLimits: {
157
+ minimum: 100,
158
+ maximum: 200
159
+ },
160
+ targetLimits: {
161
+ minimum: 120,
162
+ maximum: 180
163
+ }
164
+ }
165
+ }
166
+ },
167
+ humid: {
168
+ name: '창고 습도',
169
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
170
+ unit: '%',
171
+ spec: {
172
+ CCP: {
173
+ criticalLimits: {
174
+ minimum: 10,
175
+ maximum: 50
176
+ },
177
+ targetLimits: {
178
+ minimum: 20,
179
+ maximum: 40
180
+ }
181
+ }
182
+ }
183
+ },
184
+ inspection: {
185
+ name: '육안 검사',
186
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'
187
+ },
188
+ evaluation: {
189
+ name: '품평',
190
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
191
+ spec: {
192
+ CCP: {
193
+ criticalLimits: {
194
+ acceptables: ['최우수', '우수', '보통']
195
+ },
196
+ targetLimits: {
197
+ acceptables: ['최우수', '우수']
198
+ }
199
+ }
200
+ }
201
+ },
202
+ comment: {
203
+ name: '코멘트',
204
+ description: '특이사항을 기록함.'
205
+ },
206
+ attachment: {
207
+ name: '첨부파일',
208
+ description: '참조 첨부 파일.'
209
+ }
210
+ },
211
+ collectedAt: Date.now()
212
+ }
213
+
214
+ const Template: Story<ArgTypes> = ({}: ArgTypes) =>
215
+ html`
216
+ <link href="/themes/app-theme.css" rel="stylesheet" />
217
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
218
+ <style>
219
+ body {
220
+ }
221
+ </style>
222
+
223
+ <ox-data-sample-view .dataSample=${dataSample}></ox-data-sample-view>
224
+ `
225
+
226
+ export const Regular = Template.bind({})
227
+ Regular.args = {}