@operato/dataset 2.0.0-alpha.5 → 2.0.0-alpha.52
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 +320 -0
- package/demo/favicon.ico +0 -0
- package/demo/index.html +338 -0
- package/demo/ox-data-ooc-brief-view-test.html +338 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.d.ts +1 -1
- package/dist/src/grist-editor/ox-popup-data-item-spec.d.ts +1 -1
- package/dist/src/ox-data-entry-form.js +48 -36
- package/dist/src/ox-data-entry-form.js.map +1 -1
- package/dist/src/ox-data-entry-subgroup-form.d.ts +1 -1
- package/dist/src/ox-data-entry-subgroup-form.js +2 -0
- package/dist/src/ox-data-entry-subgroup-form.js.map +1 -1
- package/dist/src/ox-data-entry-view.d.ts +3 -3
- package/dist/src/ox-data-entry-view.js +12 -2
- package/dist/src/ox-data-entry-view.js.map +1 -1
- package/dist/src/ox-data-item-spec.d.ts +1 -1
- package/dist/src/ox-data-ooc-badge.d.ts +9 -0
- package/dist/src/ox-data-ooc-badge.js +66 -0
- package/dist/src/ox-data-ooc-badge.js.map +1 -0
- package/dist/src/ox-data-ooc-brief-view.d.ts +3 -1
- package/dist/src/ox-data-ooc-brief-view.js +8 -110
- package/dist/src/ox-data-ooc-brief-view.js.map +1 -1
- package/dist/src/ox-data-ooc-correction-part.d.ts +9 -0
- package/dist/src/ox-data-ooc-correction-part.js +99 -0
- package/dist/src/ox-data-ooc-correction-part.js.map +1 -0
- package/dist/src/ox-data-ooc-history.d.ts +10 -0
- package/dist/src/ox-data-ooc-history.js +72 -0
- package/dist/src/ox-data-ooc-history.js.map +1 -0
- package/dist/src/ox-data-ooc-view.d.ts +2 -1
- package/dist/src/ox-data-ooc-view.js +6 -89
- package/dist/src/ox-data-ooc-view.js.map +1 -1
- package/dist/src/ox-data-sample-subgroup-view.d.ts +1 -1
- package/dist/src/ox-data-sample-subgroup-view.js +1 -1
- package/dist/src/ox-data-sample-subgroup-view.js.map +1 -1
- package/dist/src/ox-data-sample-view.d.ts +1 -1
- package/dist/src/ox-data-sample-view.js +47 -30
- package/dist/src/ox-data-sample-view.js.map +1 -1
- package/dist/src/ox-data-summary-view.d.ts +1 -1
- package/dist/src/ox-data-summary-view.js +7 -1
- package/dist/src/ox-data-summary-view.js.map +1 -1
- package/dist/src/types.d.ts +57 -9
- package/dist/src/types.js.map +1 -1
- package/dist/src/usecase/ccp/ox-input-ccp-limits.d.ts +1 -1
- package/dist/src/usecase/qc/ox-input-qc-limits.d.ts +1 -1
- package/dist/src/usecase/spc/index.d.ts +1 -0
- package/dist/src/usecase/spc/index.js +8 -0
- package/dist/src/usecase/spc/index.js.map +1 -0
- package/dist/src/usecase/spc/ox-data-use-case-spc.d.ts +7 -0
- package/dist/src/usecase/spc/ox-data-use-case-spc.js +102 -0
- package/dist/src/usecase/spc/ox-data-use-case-spc.js.map +1 -0
- package/dist/src/usecase/spc/ox-input-spc-limits.d.ts +44 -0
- package/dist/src/usecase/spc/ox-input-spc-limits.js +193 -0
- package/dist/src/usecase/spc/ox-input-spc-limits.js.map +1 -0
- package/dist/src/usecase/spc/ox-property-editor-spc-limits.d.ts +6 -0
- package/dist/src/usecase/spc/ox-property-editor-spc-limits.js +24 -0
- package/dist/src/usecase/spc/ox-property-editor-spc-limits.js.map +1 -0
- package/dist/stories/ox-data-entry-form.stories.js +60 -16
- package/dist/stories/ox-data-entry-form.stories.js.map +1 -1
- package/dist/stories/ox-data-ooc-view.stories.js +2 -0
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -23
- package/src/ox-data-entry-form.ts +65 -46
- package/src/ox-data-entry-subgroup-form.ts +2 -0
- package/src/ox-data-entry-view.ts +13 -2
- package/src/ox-data-ooc-badge.ts +64 -0
- package/src/ox-data-ooc-brief-view.ts +9 -120
- package/src/ox-data-ooc-correction-part.ts +107 -0
- package/src/ox-data-ooc-history.ts +74 -0
- package/src/ox-data-ooc-view.ts +6 -91
- package/src/ox-data-sample-subgroup-view.ts +1 -1
- package/src/ox-data-sample-view.ts +47 -30
- package/src/ox-data-summary-view.ts +7 -1
- package/src/types.ts +76 -27
- package/src/usecase/spc/index.ts +10 -0
- package/src/usecase/spc/ox-data-use-case-spc.ts +147 -0
- package/src/usecase/spc/ox-input-spc-limits.ts +182 -0
- package/src/usecase/spc/ox-property-editor-spc-limits.ts +23 -0
- package/stories/ox-data-entry-form.stories.ts +65 -21
- package/stories/ox-data-ooc-view.stories.ts +2 -0
- package/themes/grist-theme.css +1 -1
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +142 -70
- package/translations/zh.json +146 -75
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/dataset",
|
|
3
3
|
"description": "WebApplication dataset supporting components following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "2.0.0-alpha.
|
|
5
|
+
"version": "2.0.0-alpha.52",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"module": "dist/src/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"./ox-data-item-spec.js": "./dist/src/ox-data-item-spec.js",
|
|
17
17
|
"./ox-data-ooc-brief-view.js": "./dist/src/ox-data-ooc-brief-view.js",
|
|
18
18
|
"./ox-data-ooc-view.js": "./dist/src/ox-data-ooc-view.js",
|
|
19
|
+
"./ox-data-ooc-correction-part.js": "./dist/src/ox-data-ooc-correction-part.js",
|
|
20
|
+
"./ox-data-ooc-badge.js": "./dist/src/ox-data-ooc-badge.js",
|
|
21
|
+
"./ox-data-ooc-history.js": "./dist/src/ox-data-ooc-history.js",
|
|
19
22
|
"./ox-data-sample-view.js": "./dist/src/ox-data-sample-view.js",
|
|
20
23
|
"./ox-data-summary-view.js": "./dist/src/ox-data-summary-view.js",
|
|
21
24
|
"./ox-input-ccp-limits.js": "./dist/src/usecase/ccp/ox-input-ccp-limits.js",
|
|
@@ -47,6 +50,18 @@
|
|
|
47
50
|
"ox-data-ooc-view.js": [
|
|
48
51
|
"dist/src/ox-data-ooc-view.d.ts"
|
|
49
52
|
],
|
|
53
|
+
"ox-data-ooc-brief-view.js": [
|
|
54
|
+
"dist/src/ox-data-ooc-brief-view.d.ts"
|
|
55
|
+
],
|
|
56
|
+
"ox-data-ooc-correction-part.js": [
|
|
57
|
+
"dist/src/ox-data-ooc-correction-part.d.ts"
|
|
58
|
+
],
|
|
59
|
+
"ox-data-ooc-badge.js": [
|
|
60
|
+
"dist/src/ox-data-ooc-badge.d.ts"
|
|
61
|
+
],
|
|
62
|
+
"ox-data-ooc-history.js": [
|
|
63
|
+
"dist/src/ox-data-ooc-history.d.ts"
|
|
64
|
+
],
|
|
50
65
|
"ox-data-sample-view.js": [
|
|
51
66
|
"dist/src/ox-data-sample-view.d.ts"
|
|
52
67
|
],
|
|
@@ -93,34 +108,34 @@
|
|
|
93
108
|
"@material/mwc-button": "^0.27.0",
|
|
94
109
|
"@material/mwc-icon": "^0.27.0",
|
|
95
110
|
"@material/mwc-icon-button": "^0.27.0",
|
|
96
|
-
"@operato/data-grist": "^2.0.0-alpha.
|
|
97
|
-
"@operato/graphql": "^2.0.0-alpha.
|
|
98
|
-
"@operato/grist-editor": "^2.0.0-alpha.
|
|
99
|
-
"@operato/i18n": "^2.0.0-alpha.
|
|
100
|
-
"@operato/input": "^2.0.0-alpha.
|
|
101
|
-
"@operato/popup": "^2.0.0-alpha.
|
|
102
|
-
"@operato/property-editor": "^2.0.0-alpha.
|
|
103
|
-
"@operato/shell": "^2.0.0-alpha.
|
|
104
|
-
"@operato/styles": "^2.0.0-alpha.
|
|
105
|
-
"@operato/utils": "^2.0.0-alpha.
|
|
106
|
-
"lit": "^
|
|
111
|
+
"@operato/data-grist": "^2.0.0-alpha.52",
|
|
112
|
+
"@operato/graphql": "^2.0.0-alpha.51",
|
|
113
|
+
"@operato/grist-editor": "^2.0.0-alpha.52",
|
|
114
|
+
"@operato/i18n": "^2.0.0-alpha.51",
|
|
115
|
+
"@operato/input": "^2.0.0-alpha.52",
|
|
116
|
+
"@operato/popup": "^2.0.0-alpha.52",
|
|
117
|
+
"@operato/property-editor": "^2.0.0-alpha.52",
|
|
118
|
+
"@operato/shell": "^2.0.0-alpha.52",
|
|
119
|
+
"@operato/styles": "^2.0.0-alpha.51",
|
|
120
|
+
"@operato/utils": "^2.0.0-alpha.35",
|
|
121
|
+
"lit": "^3.1.2"
|
|
107
122
|
},
|
|
108
123
|
"devDependencies": {
|
|
109
|
-
"@custom-elements-manifest/analyzer": "^0.
|
|
124
|
+
"@custom-elements-manifest/analyzer": "^0.9.2",
|
|
110
125
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
111
|
-
"@open-wc/eslint-config": "^
|
|
126
|
+
"@open-wc/eslint-config": "^12.0.3",
|
|
112
127
|
"@open-wc/testing": "^3.1.6",
|
|
113
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
114
|
-
"@typescript-eslint/parser": "^
|
|
128
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
129
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
115
130
|
"@web/dev-server": "^0.3.0",
|
|
116
|
-
"@web/dev-server-storybook": "^0.
|
|
117
|
-
"@web/test-runner": "^0.
|
|
131
|
+
"@web/dev-server-storybook": "^2.0.1",
|
|
132
|
+
"@web/test-runner": "^0.18.0",
|
|
118
133
|
"concurrently": "^8.0.1",
|
|
119
134
|
"eslint": "^8.39.0",
|
|
120
|
-
"eslint-config-prettier": "^
|
|
121
|
-
"husky": "^
|
|
122
|
-
"lint-staged": "^
|
|
123
|
-
"prettier": "^2.
|
|
135
|
+
"eslint-config-prettier": "^9.1.0",
|
|
136
|
+
"husky": "^9.0.11",
|
|
137
|
+
"lint-staged": "^15.2.2",
|
|
138
|
+
"prettier": "^3.2.5",
|
|
124
139
|
"tslib": "^2.3.1",
|
|
125
140
|
"typescript": "^5.0.4"
|
|
126
141
|
},
|
|
@@ -137,5 +152,5 @@
|
|
|
137
152
|
"prettier --write"
|
|
138
153
|
]
|
|
139
154
|
},
|
|
140
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "444fbc70ae236f0d5279554d74f1988a4ece21e9"
|
|
141
156
|
}
|
|
@@ -11,8 +11,6 @@ import { OxDataEntrySubgroupForm } from './ox-data-entry-subgroup-form.js'
|
|
|
11
11
|
export class OxDataEntryForm extends LitElement {
|
|
12
12
|
static styles = css`
|
|
13
13
|
:host {
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: row;
|
|
16
14
|
--item-description-font: normal 0.8rem/1rem var(--theme-font);
|
|
17
15
|
--item-description-color: var(--page-description-color);
|
|
18
16
|
}
|
|
@@ -34,13 +32,12 @@ export class OxDataEntryForm extends LitElement {
|
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
form {
|
|
37
|
-
flex: 1;
|
|
38
|
-
|
|
39
35
|
display: flex;
|
|
40
36
|
flex-direction: column;
|
|
37
|
+
overflow: hidden;
|
|
41
38
|
}
|
|
42
39
|
|
|
43
|
-
label {
|
|
40
|
+
form > div[label] {
|
|
44
41
|
display: grid;
|
|
45
42
|
|
|
46
43
|
grid-template-rows: auto 1fr;
|
|
@@ -50,11 +47,11 @@ export class OxDataEntryForm extends LitElement {
|
|
|
50
47
|
grid-gap: 9px;
|
|
51
48
|
align-items: center;
|
|
52
49
|
margin-bottom: var(--margin-default);
|
|
53
|
-
}
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
&:nth-child(odd) {
|
|
52
|
+
background-color: var(--main-section-background-color);
|
|
53
|
+
padding: var(--padding-default) 0;
|
|
54
|
+
}
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
div[name] {
|
|
@@ -69,15 +66,15 @@ export class OxDataEntryForm extends LitElement {
|
|
|
69
66
|
font: var(--item-description-font);
|
|
70
67
|
color: var(--item-description-color);
|
|
71
68
|
text-align: left;
|
|
72
|
-
}
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
* {
|
|
71
|
+
vertical-align: middle;
|
|
72
|
+
}
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
mwc-icon {
|
|
75
|
+
margin-top: -3px;
|
|
76
|
+
font-size: 0.9rem;
|
|
77
|
+
}
|
|
81
78
|
}
|
|
82
79
|
|
|
83
80
|
div[elements] {
|
|
@@ -87,18 +84,18 @@ export class OxDataEntryForm extends LitElement {
|
|
|
87
84
|
flex-wrap: wrap;
|
|
88
85
|
gap: 10px;
|
|
89
86
|
padding-right: var(--padding-default);
|
|
90
|
-
}
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
* {
|
|
89
|
+
flex: 1;
|
|
90
|
+
}
|
|
95
91
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
input,
|
|
93
|
+
select {
|
|
94
|
+
border: var(--input-field-border);
|
|
95
|
+
border-radius: var(--input-field-border-radius);
|
|
96
|
+
padding: var(--input-field-padding);
|
|
97
|
+
font: var(--input-field-font);
|
|
98
|
+
}
|
|
102
99
|
}
|
|
103
100
|
|
|
104
101
|
div[subgroup] {
|
|
@@ -107,7 +104,7 @@ export class OxDataEntryForm extends LitElement {
|
|
|
107
104
|
}
|
|
108
105
|
|
|
109
106
|
@media only screen and (max-width: 460px) {
|
|
110
|
-
label {
|
|
107
|
+
form > div[label] {
|
|
111
108
|
display: grid;
|
|
112
109
|
|
|
113
110
|
grid-template-rows: auto auto 1fr;
|
|
@@ -168,7 +165,7 @@ export class OxDataEntryForm extends LitElement {
|
|
|
168
165
|
|
|
169
166
|
private buildInputs4Subgroup(subgroup: string, dataItems: DataItem[], value: { [tag: string]: any }): TemplateResult {
|
|
170
167
|
return html`
|
|
171
|
-
<label>
|
|
168
|
+
<div label>
|
|
172
169
|
<div name>${subgroup}</div>
|
|
173
170
|
<div subgroup>
|
|
174
171
|
<ox-data-entry-subgroup-form
|
|
@@ -177,7 +174,7 @@ export class OxDataEntryForm extends LitElement {
|
|
|
177
174
|
.value=${value}
|
|
178
175
|
></ox-data-entry-subgroup-form>
|
|
179
176
|
</div>
|
|
180
|
-
</
|
|
177
|
+
</div>
|
|
181
178
|
`
|
|
182
179
|
}
|
|
183
180
|
|
|
@@ -199,23 +196,42 @@ export class OxDataEntryForm extends LitElement {
|
|
|
199
196
|
option => html`<option value=${option.value} ?selected=${option.value === v}>${option.text}</option>`
|
|
200
197
|
)}
|
|
201
198
|
</select>`
|
|
202
|
-
|
|
199
|
+
|
|
200
|
+
case 'radio':
|
|
201
|
+
return html`<div
|
|
202
|
+
@change=${(e: Event) => {
|
|
203
|
+
const div = e.currentTarget as HTMLElement
|
|
204
|
+
const inputHidden = div.querySelector(`input[name="${tag}"]`) as HTMLInputElement
|
|
205
|
+
inputHidden.value = (e.target as HTMLInputElement).value
|
|
206
|
+
}}
|
|
207
|
+
>
|
|
208
|
+
<input type="hidden" name=${tag} />
|
|
209
|
+
|
|
210
|
+
${(options.options || []).map(
|
|
211
|
+
option =>
|
|
212
|
+
html`<label>
|
|
213
|
+
<input
|
|
214
|
+
type="radio"
|
|
215
|
+
name=${'$' + tag + '-' + idx}
|
|
216
|
+
.value=${option.value}
|
|
217
|
+
?checked=${option.value === v}
|
|
218
|
+
/>
|
|
219
|
+
${option.text}
|
|
220
|
+
</label>`
|
|
221
|
+
)}
|
|
222
|
+
</div>`
|
|
203
223
|
|
|
204
224
|
case 'boolean':
|
|
205
225
|
return html` <input type="checkbox" name=${tag} .checked=${v} />`
|
|
206
|
-
break
|
|
207
226
|
|
|
208
227
|
case 'number':
|
|
209
228
|
return html` <input type="number" name=${tag} value=${v} />`
|
|
210
|
-
break
|
|
211
229
|
|
|
212
230
|
case 'date':
|
|
213
231
|
return html` <input type="date" name=${tag} value=${v} />`
|
|
214
|
-
break
|
|
215
232
|
|
|
216
233
|
case 'datetime':
|
|
217
234
|
return html` <input type="datetime-local" name=${tag} value=${v} />`
|
|
218
|
-
break
|
|
219
235
|
|
|
220
236
|
case 'file':
|
|
221
237
|
return html`<ox-input-file name=${tag} label="Attach Files" accept="*/*" multiple="true"></ox-input-file>`
|
|
@@ -226,11 +242,11 @@ export class OxDataEntryForm extends LitElement {
|
|
|
226
242
|
}
|
|
227
243
|
})
|
|
228
244
|
|
|
229
|
-
return html` <label
|
|
245
|
+
return html` <div label>
|
|
230
246
|
<div name>${name}${unit ? `(${unit})` : ''}</div>
|
|
231
247
|
<div description><mwc-icon>info_outline</mwc-icon> ${description}</div>
|
|
232
248
|
<div elements>${elements}</div>
|
|
233
|
-
</
|
|
249
|
+
</div>`
|
|
234
250
|
})
|
|
235
251
|
}
|
|
236
252
|
|
|
@@ -238,19 +254,22 @@ export class OxDataEntryForm extends LitElement {
|
|
|
238
254
|
const dataItems = this.dataSet!.dataItems
|
|
239
255
|
const nonGroupDataItems = dataItems.filter(dataItem => !dataItem.group)
|
|
240
256
|
|
|
241
|
-
const nonGroupValue = (nonGroupDataItems || []).reduce(
|
|
242
|
-
|
|
257
|
+
const nonGroupValue = (nonGroupDataItems || []).reduce(
|
|
258
|
+
(sum, dataItem) => {
|
|
259
|
+
const { tag, type } = dataItem
|
|
243
260
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
261
|
+
const editors = Array.prototype.slice.call(
|
|
262
|
+
this.renderRoot.querySelectorAll(`[name=${tag}]`) as NodeListOf<HTMLInputElement>
|
|
263
|
+
) as HTMLInputElement[]
|
|
247
264
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
265
|
+
if (editors.length > 0) {
|
|
266
|
+
sum[tag] = editors.map(editor => (type === 'boolean' ? editor.checked : editor.value))
|
|
267
|
+
}
|
|
251
268
|
|
|
252
|
-
|
|
253
|
-
|
|
269
|
+
return sum
|
|
270
|
+
},
|
|
271
|
+
{} as { [tag: string]: any }
|
|
272
|
+
)
|
|
254
273
|
|
|
255
274
|
return Array.from(this.subgroups).reduce((value, subgroup) => {
|
|
256
275
|
return {
|
|
@@ -58,6 +58,8 @@ export class OxDataEntrySubgroupForm extends LitElement {
|
|
|
58
58
|
|
|
59
59
|
switch (type) {
|
|
60
60
|
case 'select':
|
|
61
|
+
case 'radio': // 그리드안에 radio가 들어갈수 없어서 select로 변환
|
|
62
|
+
columnConfig.type = 'select'
|
|
61
63
|
columnConfig.record.options = [
|
|
62
64
|
'',
|
|
63
65
|
...(options.options || []).map((option: any) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@operato/input/ox-input-file.js'
|
|
2
2
|
|
|
3
|
-
import { css, html, LitElement } from 'lit'
|
|
3
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
4
4
|
import { customElement, property } from 'lit/decorators.js'
|
|
5
5
|
|
|
6
6
|
import { i18next } from '@operato/i18n'
|
|
@@ -57,6 +57,7 @@ export class OxDataEntryView extends LitElement {
|
|
|
57
57
|
font: var(--th-font);
|
|
58
58
|
color: var(--th-color);
|
|
59
59
|
text-align: left;
|
|
60
|
+
white-space: nowrap;
|
|
60
61
|
}
|
|
61
62
|
th[item] {
|
|
62
63
|
min-width: 100px;
|
|
@@ -93,6 +94,12 @@ export class OxDataEntryView extends LitElement {
|
|
|
93
94
|
pre {
|
|
94
95
|
tab-size: 2;
|
|
95
96
|
}
|
|
97
|
+
|
|
98
|
+
@media screen and (max-width: 480px) {
|
|
99
|
+
th {
|
|
100
|
+
min-width: 50px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
96
103
|
`
|
|
97
104
|
|
|
98
105
|
@property({ type: Object }) dataSet?: DataSet
|
|
@@ -161,6 +168,10 @@ export class OxDataEntryView extends LitElement {
|
|
|
161
168
|
}
|
|
162
169
|
|
|
163
170
|
render() {
|
|
171
|
+
if (!this.dataSet) {
|
|
172
|
+
return nothing
|
|
173
|
+
}
|
|
174
|
+
|
|
164
175
|
const { name, description, useCase, dataItems = [] } = this.dataSet!
|
|
165
176
|
|
|
166
177
|
const data = this.value || {}
|
|
@@ -174,7 +185,7 @@ export class OxDataEntryView extends LitElement {
|
|
|
174
185
|
<tr>
|
|
175
186
|
<th item>${i18next.t('field.item')}</th>
|
|
176
187
|
<th>${i18next.t('field.description')}</th>
|
|
177
|
-
<th>${i18next.t('field.
|
|
188
|
+
<th>${i18next.t('field.finalizing-function')}</th>
|
|
178
189
|
<th>${i18next.t('field.unit')}</th>
|
|
179
190
|
<th value>${i18next.t('field.value')}</th>
|
|
180
191
|
<th>${i18next.t('field.spec')}</th>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import '@operato/input/ox-input-file.js'
|
|
2
|
+
import './ox-data-sample-view'
|
|
3
|
+
import '@material/mwc-icon'
|
|
4
|
+
|
|
5
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
7
|
+
|
|
8
|
+
@customElement('ox-data-ooc-badge')
|
|
9
|
+
export class OxDataOocBadge extends LitElement {
|
|
10
|
+
static styles = css`
|
|
11
|
+
h3 {
|
|
12
|
+
margin: var(--title-margin);
|
|
13
|
+
font: var(--title-font);
|
|
14
|
+
color: var(--title-text-color);
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
mwc-icon {
|
|
19
|
+
font-size: 80px;
|
|
20
|
+
opacity: 0.4;
|
|
21
|
+
color: var(--primary-background-color);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
div {
|
|
25
|
+
position: absolute;
|
|
26
|
+
top: 22px;
|
|
27
|
+
left: 0;
|
|
28
|
+
right: 0;
|
|
29
|
+
font-size: 10px;
|
|
30
|
+
color: var(--theme-white-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[field-state] {
|
|
34
|
+
display: block;
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
background-color: var(--primary-color);
|
|
37
|
+
box-shadow: var(--box-shadow);
|
|
38
|
+
margin-top: var(--margin-narrow);
|
|
39
|
+
padding: 1px 3px;
|
|
40
|
+
font-size: 0.8rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[danger] [field-state] {
|
|
44
|
+
background-color: var(--status-danger-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[complete] [field-state] {
|
|
48
|
+
background-color: var(--status-info-color);
|
|
49
|
+
}
|
|
50
|
+
`
|
|
51
|
+
|
|
52
|
+
@property({ type: String }) state?: string
|
|
53
|
+
|
|
54
|
+
render() {
|
|
55
|
+
const state = this.state
|
|
56
|
+
|
|
57
|
+
return html`
|
|
58
|
+
<h3 ?danger=${state != 'CORRECTED'} ?complete=${state == 'CORRECTED'}>
|
|
59
|
+
<mwc-icon>shield</mwc-icon>
|
|
60
|
+
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
61
|
+
</h3>
|
|
62
|
+
`
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import '@operato/input/ox-input-file.js'
|
|
2
2
|
import './ox-data-sample-view'
|
|
3
|
+
import './ox-data-ooc-badge'
|
|
4
|
+
import './ox-data-ooc-correction-part'
|
|
3
5
|
import '@material/mwc-icon'
|
|
4
6
|
|
|
5
|
-
import { css, html, LitElement
|
|
7
|
+
import { css, html, LitElement } from 'lit'
|
|
6
8
|
import { customElement, property } from 'lit/decorators.js'
|
|
7
9
|
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
import { DataOoc, DataSet } from './types.js'
|
|
10
|
+
import { DataOoc } from './types.js'
|
|
11
11
|
|
|
12
12
|
@customElement('ox-data-ooc-brief-view')
|
|
13
13
|
export class OxDataOocBriefView extends LitElement {
|
|
@@ -15,140 +15,29 @@ export class OxDataOocBriefView extends LitElement {
|
|
|
15
15
|
:host {
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
|
-
background-color: var(--main-section-background-color);
|
|
19
18
|
|
|
20
19
|
position: relative;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
margin: var(--title-margin);
|
|
25
|
-
padding-top: 12px;
|
|
26
|
-
font: var(--title-font);
|
|
27
|
-
color: var(--title-text-color);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
h3[state] {
|
|
22
|
+
ox-data-ooc-badge {
|
|
31
23
|
position: absolute;
|
|
24
|
+
|
|
32
25
|
margin: 0;
|
|
33
26
|
padding: 0;
|
|
34
27
|
right: 10px;
|
|
35
28
|
width: 90px;
|
|
36
|
-
text-align: center;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
h3[corrective] {
|
|
40
|
-
font-size: 20px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
mwc-icon {
|
|
44
|
-
font-size: 16px;
|
|
45
|
-
}
|
|
46
|
-
[state] mwc-icon {
|
|
47
|
-
font-size: 80px;
|
|
48
|
-
opacity: 0.4;
|
|
49
|
-
color: var(--primary-background-color);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
[state] div {
|
|
53
|
-
position: absolute;
|
|
54
|
-
top: 22px;
|
|
55
|
-
left: 0;
|
|
56
|
-
right: 0;
|
|
57
|
-
font-size: 10px;
|
|
58
|
-
color: var(--theme-white-color);
|
|
59
|
-
}
|
|
60
|
-
[state] [field-state] {
|
|
61
|
-
display: block;
|
|
62
|
-
border-radius: 4px;
|
|
63
|
-
background-color: var(--primary-color);
|
|
64
|
-
box-shadow: var(--box-shadow);
|
|
65
|
-
margin-top: var(--margin-narrow);
|
|
66
|
-
padding: 1px 3px;
|
|
67
|
-
font-size: 0.8rem;
|
|
68
|
-
}
|
|
69
|
-
[danger] [field-state] {
|
|
70
|
-
background-color: var(--status-danger-color);
|
|
71
|
-
}
|
|
72
|
-
[complete] [field-state] {
|
|
73
|
-
background-color: var(--status-info-color);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
[corrective-content] [field-state] {
|
|
77
|
-
border-radius: 2px;
|
|
78
|
-
background-color: var(--primary-color);
|
|
79
|
-
margin-left: var(--margin-default);
|
|
80
|
-
padding: 1px 2px;
|
|
81
|
-
font-size: 0.7rem;
|
|
82
|
-
color: var(--theme-white-color);
|
|
83
|
-
}
|
|
84
|
-
[corrective-content] {
|
|
85
|
-
background-color: var(--theme-white-color);
|
|
86
|
-
box-shadow: var(--box-shadow);
|
|
87
|
-
border-radius: var(--border-radius);
|
|
88
|
-
margin: var(--page-description-margin);
|
|
89
|
-
padding: var(--padding-default);
|
|
90
|
-
font: var(--page-description-font);
|
|
91
|
-
color: var(--secondary-color);
|
|
92
|
-
}
|
|
93
|
-
[corrective-content] mwc-icon {
|
|
94
|
-
position: relative;
|
|
95
|
-
top: 3px;
|
|
96
|
-
margin: 0 2px 0 10px;
|
|
97
|
-
}
|
|
98
|
-
[field-info] {
|
|
99
|
-
opacity: 0.7;
|
|
100
|
-
}
|
|
101
|
-
[corrective-content] strong {
|
|
102
|
-
display: block;
|
|
103
|
-
font-weight: bold;
|
|
104
|
-
font-size: 0.9rem;
|
|
105
29
|
}
|
|
106
30
|
`
|
|
107
31
|
|
|
108
32
|
@property({ type: Object }) dataOoc?: DataOoc
|
|
109
33
|
|
|
110
34
|
render() {
|
|
111
|
-
const {
|
|
112
|
-
correctiveInstruction = '',
|
|
113
|
-
correctiveAction = '',
|
|
114
|
-
reviewer,
|
|
115
|
-
reviewedAt,
|
|
116
|
-
corrector,
|
|
117
|
-
correctedAt,
|
|
118
|
-
state
|
|
119
|
-
} = this.dataOoc || {}
|
|
120
|
-
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
35
|
+
const { state } = this.dataOoc || {}
|
|
121
36
|
|
|
122
37
|
return html`
|
|
123
38
|
<ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
<mwc-icon>shield</mwc-icon>
|
|
127
|
-
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
128
|
-
</h3>
|
|
129
|
-
|
|
130
|
-
${reviewer
|
|
131
|
-
? html`
|
|
132
|
-
<h3 corrective>${i18next.t('label.corrective instruction')}</h3>
|
|
133
|
-
<p corrective-content>
|
|
134
|
-
<span field-info
|
|
135
|
-
>${formatter.format(new Date(reviewedAt!))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span
|
|
136
|
-
>
|
|
137
|
-
<strong>${correctiveInstruction}</strong>
|
|
138
|
-
</p>
|
|
139
|
-
`
|
|
140
|
-
: nothing}
|
|
141
|
-
${corrector
|
|
142
|
-
? html`
|
|
143
|
-
<h3 corrective>${i18next.t('label.corrective action')}</h3>
|
|
144
|
-
<p corrective-content>
|
|
145
|
-
<span field-info
|
|
146
|
-
>${formatter.format(new Date(correctedAt!))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span
|
|
147
|
-
>
|
|
148
|
-
<strong>${correctiveAction}</strong>
|
|
149
|
-
</p>
|
|
150
|
-
`
|
|
151
|
-
: nothing}
|
|
39
|
+
<ox-data-ooc-badge .state=${state}></ox-data-ooc-badge>
|
|
40
|
+
<ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part>
|
|
152
41
|
`
|
|
153
42
|
}
|
|
154
43
|
}
|