@operato/dataset 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +162 -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/ox-data-entry-view.js +2 -1
- package/dist/src/ox-data-entry-view.js.map +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 +2 -0
- 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 +1 -0
- 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.js +1 -1
- package/dist/src/ox-data-sample-subgroup-view.js.map +1 -1
- package/dist/src/ox-data-sample-view.js +41 -30
- package/dist/src/ox-data-sample-view.js.map +1 -1
- package/dist/src/ox-data-summary-view.js +1 -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/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-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 +24 -9
- package/src/ox-data-entry-view.ts +2 -1
- 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 +41 -30
- package/src/ox-data-summary-view.ts +1 -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-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.21",
|
|
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,16 +108,16 @@
|
|
|
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.
|
|
111
|
+
"@operato/data-grist": "^2.0.0-alpha.20",
|
|
97
112
|
"@operato/graphql": "^2.0.0-alpha.0",
|
|
98
|
-
"@operato/grist-editor": "^2.0.0-alpha.
|
|
113
|
+
"@operato/grist-editor": "^2.0.0-alpha.21",
|
|
99
114
|
"@operato/i18n": "^2.0.0-alpha.0",
|
|
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.
|
|
115
|
+
"@operato/input": "^2.0.0-alpha.20",
|
|
116
|
+
"@operato/popup": "^2.0.0-alpha.9",
|
|
117
|
+
"@operato/property-editor": "^2.0.0-alpha.21",
|
|
118
|
+
"@operato/shell": "^2.0.0-alpha.21",
|
|
104
119
|
"@operato/styles": "^2.0.0-alpha.0",
|
|
105
|
-
"@operato/utils": "^2.0.0-alpha.
|
|
120
|
+
"@operato/utils": "^2.0.0-alpha.8",
|
|
106
121
|
"lit": "^2.5.0"
|
|
107
122
|
},
|
|
108
123
|
"devDependencies": {
|
|
@@ -137,5 +152,5 @@
|
|
|
137
152
|
"prettier --write"
|
|
138
153
|
]
|
|
139
154
|
},
|
|
140
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "31e7c62043dbe6a234485195c681d75cb44c20e1"
|
|
141
156
|
}
|
|
@@ -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;
|
|
@@ -174,7 +175,7 @@ export class OxDataEntryView extends LitElement {
|
|
|
174
175
|
<tr>
|
|
175
176
|
<th item>${i18next.t('field.item')}</th>
|
|
176
177
|
<th>${i18next.t('field.description')}</th>
|
|
177
|
-
<th>${i18next.t('field.
|
|
178
|
+
<th>${i18next.t('field.finalizing-function')}</th>
|
|
178
179
|
<th>${i18next.t('field.unit')}</th>
|
|
179
180
|
<th value>${i18next.t('field.value')}</th>
|
|
180
181
|
<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
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import '@operato/input/ox-input-file.js'
|
|
2
|
+
import '@material/mwc-icon'
|
|
3
|
+
|
|
4
|
+
import { css, html, LitElement, nothing } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
|
+
|
|
7
|
+
import { i18next } from '@operato/i18n'
|
|
8
|
+
|
|
9
|
+
import { DataOoc } from './types.js'
|
|
10
|
+
|
|
11
|
+
@customElement('ox-data-ooc-correction-part')
|
|
12
|
+
export class OxDataOocCorrectionPart extends LitElement {
|
|
13
|
+
static styles = css`
|
|
14
|
+
:host {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
h3 {
|
|
22
|
+
margin: var(--title-margin);
|
|
23
|
+
padding-top: 12px;
|
|
24
|
+
font: var(--title-font);
|
|
25
|
+
color: var(--title-text-color);
|
|
26
|
+
font-size: 20px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
mwc-icon {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[field-state] {
|
|
34
|
+
border-radius: 2px;
|
|
35
|
+
background-color: var(--primary-color);
|
|
36
|
+
margin-left: var(--margin-default);
|
|
37
|
+
padding: 1px 2px;
|
|
38
|
+
font-size: 0.7rem;
|
|
39
|
+
color: var(--theme-white-color);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
p {
|
|
43
|
+
background-color: var(--theme-white-color);
|
|
44
|
+
box-shadow: var(--box-shadow);
|
|
45
|
+
border-radius: var(--border-radius);
|
|
46
|
+
margin: var(--page-description-margin);
|
|
47
|
+
padding: var(--padding-default);
|
|
48
|
+
font: var(--page-description-font);
|
|
49
|
+
color: var(--secondary-color);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
mwc-icon {
|
|
53
|
+
position: relative;
|
|
54
|
+
top: 3px;
|
|
55
|
+
margin: 0 2px 0 10px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[field-info] {
|
|
59
|
+
opacity: 0.7;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
strong {
|
|
63
|
+
display: block;
|
|
64
|
+
font-weight: bold;
|
|
65
|
+
font-size: 0.9rem;
|
|
66
|
+
}
|
|
67
|
+
`
|
|
68
|
+
|
|
69
|
+
@property({ type: Object }) dataOoc?: DataOoc
|
|
70
|
+
|
|
71
|
+
render() {
|
|
72
|
+
const {
|
|
73
|
+
correctiveInstruction = '',
|
|
74
|
+
correctiveAction = '',
|
|
75
|
+
reviewer,
|
|
76
|
+
reviewedAt,
|
|
77
|
+
corrector,
|
|
78
|
+
correctedAt
|
|
79
|
+
} = this.dataOoc || {}
|
|
80
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
81
|
+
|
|
82
|
+
return html`
|
|
83
|
+
${reviewer
|
|
84
|
+
? html`
|
|
85
|
+
<h3>${i18next.t('label.corrective instruction')}</h3>
|
|
86
|
+
<p>
|
|
87
|
+
<span field-info
|
|
88
|
+
>${formatter.format(new Date(reviewedAt!))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span
|
|
89
|
+
>
|
|
90
|
+
<strong>${correctiveInstruction}</strong>
|
|
91
|
+
</p>
|
|
92
|
+
`
|
|
93
|
+
: nothing}
|
|
94
|
+
${corrector
|
|
95
|
+
? html`
|
|
96
|
+
<h3>${i18next.t('label.corrective action')}</h3>
|
|
97
|
+
<p>
|
|
98
|
+
<span field-info
|
|
99
|
+
>${formatter.format(new Date(correctedAt!))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span
|
|
100
|
+
>
|
|
101
|
+
<strong>${correctiveAction}</strong>
|
|
102
|
+
</p>
|
|
103
|
+
`
|
|
104
|
+
: nothing}
|
|
105
|
+
`
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 } from 'lit'
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
7
|
+
|
|
8
|
+
import { DataOoc } from './types.js'
|
|
9
|
+
|
|
10
|
+
@customElement('ox-data-ooc-history')
|
|
11
|
+
export class OxDataOocHistory extends LitElement {
|
|
12
|
+
static styles = css`
|
|
13
|
+
mwc-icon {
|
|
14
|
+
font-size: 16px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[field-state] {
|
|
18
|
+
border-radius: 2px;
|
|
19
|
+
background-color: var(--primary-color);
|
|
20
|
+
margin-left: var(--margin-default);
|
|
21
|
+
padding: 1px 2px;
|
|
22
|
+
font-size: 0.7rem;
|
|
23
|
+
color: var(--theme-white-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
p {
|
|
27
|
+
background-color: var(--theme-white-color);
|
|
28
|
+
box-shadow: var(--box-shadow);
|
|
29
|
+
border-radius: var(--border-radius);
|
|
30
|
+
margin: var(--page-description-margin);
|
|
31
|
+
padding: var(--padding-default);
|
|
32
|
+
font: var(--page-description-font);
|
|
33
|
+
color: var(--secondary-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
mwc-icon {
|
|
37
|
+
position: relative;
|
|
38
|
+
top: 3px;
|
|
39
|
+
margin: 0 2px 0 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[field-info] {
|
|
43
|
+
opacity: 0.7;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
strong {
|
|
47
|
+
display: block;
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
font-size: 0.9rem;
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
|
|
53
|
+
@property({ type: Object }) dataOoc?: DataOoc
|
|
54
|
+
|
|
55
|
+
render() {
|
|
56
|
+
const { history = [] } = this.dataOoc || {}
|
|
57
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
58
|
+
|
|
59
|
+
return html`
|
|
60
|
+
${history.map(
|
|
61
|
+
({ user, state, comment, timestamp }) => html`
|
|
62
|
+
<p page-history>
|
|
63
|
+
<!--상태에 따라 추가로 danger, complete를 어트리뷰트로 추가시 배경컬러 변경되도록 해두었습니다-->
|
|
64
|
+
<span field-info
|
|
65
|
+
>${formatter.format(new Date(timestamp))} <mwc-icon>account_circle</mwc-icon>${user.name}</span
|
|
66
|
+
>
|
|
67
|
+
<span field-state>${state}</span>
|
|
68
|
+
<strong>${comment}</strong>
|
|
69
|
+
</p>
|
|
70
|
+
`
|
|
71
|
+
)}
|
|
72
|
+
`
|
|
73
|
+
}
|
|
74
|
+
}
|
package/src/ox-data-ooc-view.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@operato/input/ox-input-file.js'
|
|
2
2
|
import './ox-data-sample-view'
|
|
3
|
+
import './ox-data-ooc-history'
|
|
3
4
|
import '@material/mwc-icon'
|
|
4
5
|
|
|
5
6
|
import { css, html, LitElement } from 'lit'
|
|
@@ -18,88 +19,17 @@ export class OxDataOocView extends LitElement {
|
|
|
18
19
|
:host {
|
|
19
20
|
display: flex;
|
|
20
21
|
flex-direction: column;
|
|
21
|
-
background-color: var(--main-section-background-color);
|
|
22
22
|
|
|
23
23
|
position: relative;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
margin: var(--title-margin);
|
|
28
|
-
padding-top: 12px;
|
|
29
|
-
font: var(--title-font);
|
|
30
|
-
color: var(--title-text-color);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
h3[state] {
|
|
26
|
+
ox-data-ooc-badge {
|
|
34
27
|
position: absolute;
|
|
28
|
+
|
|
35
29
|
margin: 0;
|
|
36
30
|
padding: 0;
|
|
37
31
|
right: 10px;
|
|
38
32
|
width: 90px;
|
|
39
|
-
text-align: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
mwc-icon {
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
}
|
|
45
|
-
[state] mwc-icon {
|
|
46
|
-
font-size: 80px;
|
|
47
|
-
opacity: 0.4;
|
|
48
|
-
color: var(--primary-background-color);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[state] div {
|
|
52
|
-
position: absolute;
|
|
53
|
-
top: 22px;
|
|
54
|
-
left: 0;
|
|
55
|
-
right: 0;
|
|
56
|
-
font-size: 10px;
|
|
57
|
-
color: var(--theme-white-color);
|
|
58
|
-
}
|
|
59
|
-
[state] [field-state] {
|
|
60
|
-
display: block;
|
|
61
|
-
border-radius: 4px;
|
|
62
|
-
background-color: var(--primary-color);
|
|
63
|
-
box-shadow: var(--box-shadow);
|
|
64
|
-
margin-top: var(--margin-narrow);
|
|
65
|
-
padding: 1px 3px;
|
|
66
|
-
font-size: 0.8rem;
|
|
67
|
-
}
|
|
68
|
-
[danger] [field-state] {
|
|
69
|
-
background-color: var(--status-danger-color);
|
|
70
|
-
}
|
|
71
|
-
[complete] [field-state] {
|
|
72
|
-
background-color: var(--status-info-color);
|
|
73
|
-
}
|
|
74
|
-
[page-history] [field-state] {
|
|
75
|
-
border-radius: 2px;
|
|
76
|
-
background-color: var(--primary-color);
|
|
77
|
-
margin-left: var(--margin-default);
|
|
78
|
-
padding: 1px 2px;
|
|
79
|
-
font-size: 0.7rem;
|
|
80
|
-
color: var(--theme-white-color);
|
|
81
|
-
}
|
|
82
|
-
[page-history] {
|
|
83
|
-
background-color: var(--theme-white-color);
|
|
84
|
-
box-shadow: var(--box-shadow);
|
|
85
|
-
border-radius: var(--border-radius);
|
|
86
|
-
margin: var(--page-description-margin);
|
|
87
|
-
padding: var(--padding-default);
|
|
88
|
-
font: var(--page-description-font);
|
|
89
|
-
color: var(--secondary-color);
|
|
90
|
-
}
|
|
91
|
-
[page-history] mwc-icon {
|
|
92
|
-
position: relative;
|
|
93
|
-
top: 3px;
|
|
94
|
-
margin: 0 2px 0 10px;
|
|
95
|
-
}
|
|
96
|
-
[field-info] {
|
|
97
|
-
opacity: 0.7;
|
|
98
|
-
}
|
|
99
|
-
[page-history] strong {
|
|
100
|
-
display: block;
|
|
101
|
-
font-weight: bold;
|
|
102
|
-
font-size: 0.9rem;
|
|
103
33
|
}
|
|
104
34
|
`
|
|
105
35
|
|
|
@@ -107,30 +37,15 @@ export class OxDataOocView extends LitElement {
|
|
|
107
37
|
@property({ type: Object }) dataOoc?: DataOoc
|
|
108
38
|
|
|
109
39
|
render() {
|
|
110
|
-
const {
|
|
111
|
-
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
40
|
+
const { state } = this.dataOoc || {}
|
|
112
41
|
|
|
113
42
|
return html`
|
|
114
43
|
<ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
|
|
115
44
|
|
|
116
|
-
<
|
|
117
|
-
<mwc-icon>shield</mwc-icon>
|
|
118
|
-
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
119
|
-
</h3>
|
|
45
|
+
<ox-data-ooc-badge .state=${state}></ox-data-ooc-badge>
|
|
120
46
|
|
|
121
47
|
<h3>${i18next.t('title.history')}</h3>
|
|
122
|
-
|
|
123
|
-
({ user, state, comment, timestamp }) => html`
|
|
124
|
-
<p page-history>
|
|
125
|
-
<!--상태에 따라 추가로 danger, complete를 어트리뷰트로 추가시 배경컬러 변경되도록 해두었습니다-->
|
|
126
|
-
<span field-info
|
|
127
|
-
>${formatter.format(new Date(timestamp))} <mwc-icon>account_circle</mwc-icon>${user.name}</span
|
|
128
|
-
>
|
|
129
|
-
<span field-state>${state}</span>
|
|
130
|
-
<strong>${comment}</strong>
|
|
131
|
-
</p>
|
|
132
|
-
`
|
|
133
|
-
)}
|
|
48
|
+
<ox-data-ooc-history .dataOoc=${this.dataOoc}></ox-data-ooc-history>
|
|
134
49
|
`
|
|
135
50
|
}
|
|
136
51
|
}
|
|
@@ -39,6 +39,7 @@ export class OxDataSampleSubgroupView extends LitElement {
|
|
|
39
39
|
font-weight: bold;
|
|
40
40
|
color: var(--th-color);
|
|
41
41
|
text-align: center;
|
|
42
|
+
white-space: nowrap;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
th.label,
|
|
@@ -75,7 +76,6 @@ export class OxDataSampleSubgroupView extends LitElement {
|
|
|
75
76
|
|
|
76
77
|
pre {
|
|
77
78
|
tab-size: 2;
|
|
78
|
-
text-wrap: wrap;
|
|
79
79
|
text-align: left;
|
|
80
80
|
}
|
|
81
81
|
`
|