@operato/dataset 1.13.13 → 1.13.15
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 +18 -0
- 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 -109
- 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 +100 -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 -88
- package/dist/src/ox-data-ooc-view.js.map +1 -1
- package/dist/src/types.d.ts +45 -0
- package/dist/src/types.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 +21 -6
- package/src/ox-data-ooc-badge.ts +64 -0
- package/src/ox-data-ooc-brief-view.ts +9 -119
- package/src/ox-data-ooc-correction-part.ts +108 -0
- package/src/ox-data-ooc-history.ts +74 -0
- package/src/ox-data-ooc-view.ts +6 -90
- package/src/types.ts +47 -0
- package/stories/ox-data-ooc-view.stories.ts +2 -0
- 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": "1.13.
|
|
5
|
+
"version": "1.13.15",
|
|
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,13 +108,13 @@
|
|
|
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": "^1.13.
|
|
111
|
+
"@operato/data-grist": "^1.13.14",
|
|
97
112
|
"@operato/graphql": "^1.12.9",
|
|
98
|
-
"@operato/grist-editor": "^1.13.
|
|
113
|
+
"@operato/grist-editor": "^1.13.14",
|
|
99
114
|
"@operato/i18n": "^1.5.14",
|
|
100
|
-
"@operato/input": "^1.13.
|
|
115
|
+
"@operato/input": "^1.13.14",
|
|
101
116
|
"@operato/popup": "^1.13.9",
|
|
102
|
-
"@operato/property-editor": "^1.13.
|
|
117
|
+
"@operato/property-editor": "^1.13.14",
|
|
103
118
|
"@operato/shell": "^1.13.9",
|
|
104
119
|
"@operato/styles": "^1.12.3",
|
|
105
120
|
"@operato/utils": "^1.13.9",
|
|
@@ -137,5 +152,5 @@
|
|
|
137
152
|
"prettier --write"
|
|
138
153
|
]
|
|
139
154
|
},
|
|
140
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "a5b975befe5a5788bb40d900bbd8ef6d9cf74980"
|
|
141
156
|
}
|
|
@@ -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 {
|
|
@@ -20,135 +20,25 @@ export class OxDataOocBriefView extends LitElement {
|
|
|
20
20
|
position: relative;
|
|
21
21
|
}
|
|
22
22
|
|
|
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] {
|
|
23
|
+
ox-data-ooc-badge {
|
|
31
24
|
position: absolute;
|
|
25
|
+
|
|
32
26
|
margin: 0;
|
|
33
27
|
padding: 0;
|
|
34
28
|
right: 10px;
|
|
35
29
|
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
30
|
}
|
|
106
31
|
`
|
|
107
32
|
|
|
108
33
|
@property({ type: Object }) dataOoc?: DataOoc
|
|
109
34
|
|
|
110
35
|
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' })
|
|
36
|
+
const { state } = this.dataOoc || {}
|
|
121
37
|
|
|
122
38
|
return html`
|
|
123
39
|
<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}
|
|
40
|
+
<ox-data-ooc-badge .state=${state}></ox-data-ooc-badge>
|
|
41
|
+
<ox-data-ooc-correction-part .dataOoc=${this.dataOoc}></ox-data-ooc-correction-part>
|
|
152
42
|
`
|
|
153
43
|
}
|
|
154
44
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
background-color: var(--main-section-background-color);
|
|
18
|
+
|
|
19
|
+
position: relative;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
h3 {
|
|
23
|
+
margin: var(--title-margin);
|
|
24
|
+
padding-top: 12px;
|
|
25
|
+
font: var(--title-font);
|
|
26
|
+
color: var(--title-text-color);
|
|
27
|
+
font-size: 20px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
mwc-icon {
|
|
31
|
+
font-size: 16px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[field-state] {
|
|
35
|
+
border-radius: 2px;
|
|
36
|
+
background-color: var(--primary-color);
|
|
37
|
+
margin-left: var(--margin-default);
|
|
38
|
+
padding: 1px 2px;
|
|
39
|
+
font-size: 0.7rem;
|
|
40
|
+
color: var(--theme-white-color);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
p {
|
|
44
|
+
background-color: var(--theme-white-color);
|
|
45
|
+
box-shadow: var(--box-shadow);
|
|
46
|
+
border-radius: var(--border-radius);
|
|
47
|
+
margin: var(--page-description-margin);
|
|
48
|
+
padding: var(--padding-default);
|
|
49
|
+
font: var(--page-description-font);
|
|
50
|
+
color: var(--secondary-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
mwc-icon {
|
|
54
|
+
position: relative;
|
|
55
|
+
top: 3px;
|
|
56
|
+
margin: 0 2px 0 10px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[field-info] {
|
|
60
|
+
opacity: 0.7;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
strong {
|
|
64
|
+
display: block;
|
|
65
|
+
font-weight: bold;
|
|
66
|
+
font-size: 0.9rem;
|
|
67
|
+
}
|
|
68
|
+
`
|
|
69
|
+
|
|
70
|
+
@property({ type: Object }) dataOoc?: DataOoc
|
|
71
|
+
|
|
72
|
+
render() {
|
|
73
|
+
const {
|
|
74
|
+
correctiveInstruction = '',
|
|
75
|
+
correctiveAction = '',
|
|
76
|
+
reviewer,
|
|
77
|
+
reviewedAt,
|
|
78
|
+
corrector,
|
|
79
|
+
correctedAt
|
|
80
|
+
} = this.dataOoc || {}
|
|
81
|
+
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
82
|
+
|
|
83
|
+
return html`
|
|
84
|
+
${reviewer
|
|
85
|
+
? html`
|
|
86
|
+
<h3>${i18next.t('label.corrective instruction')}</h3>
|
|
87
|
+
<p>
|
|
88
|
+
<span field-info
|
|
89
|
+
>${formatter.format(new Date(reviewedAt!))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span
|
|
90
|
+
>
|
|
91
|
+
<strong>${correctiveInstruction}</strong>
|
|
92
|
+
</p>
|
|
93
|
+
`
|
|
94
|
+
: nothing}
|
|
95
|
+
${corrector
|
|
96
|
+
? html`
|
|
97
|
+
<h3>${i18next.t('label.corrective action')}</h3>
|
|
98
|
+
<p>
|
|
99
|
+
<span field-info
|
|
100
|
+
>${formatter.format(new Date(correctedAt!))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span
|
|
101
|
+
>
|
|
102
|
+
<strong>${correctiveAction}</strong>
|
|
103
|
+
</p>
|
|
104
|
+
`
|
|
105
|
+
: nothing}
|
|
106
|
+
`
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -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'
|
|
@@ -23,83 +24,13 @@ export class OxDataOocView extends LitElement {
|
|
|
23
24
|
position: relative;
|
|
24
25
|
}
|
|
25
26
|
|
|
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] {
|
|
27
|
+
ox-data-ooc-badge {
|
|
34
28
|
position: absolute;
|
|
29
|
+
|
|
35
30
|
margin: 0;
|
|
36
31
|
padding: 0;
|
|
37
32
|
right: 10px;
|
|
38
33
|
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
34
|
}
|
|
104
35
|
`
|
|
105
36
|
|
|
@@ -107,30 +38,15 @@ export class OxDataOocView extends LitElement {
|
|
|
107
38
|
@property({ type: Object }) dataOoc?: DataOoc
|
|
108
39
|
|
|
109
40
|
render() {
|
|
110
|
-
const {
|
|
111
|
-
const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })
|
|
41
|
+
const { state } = this.dataOoc || {}
|
|
112
42
|
|
|
113
43
|
return html`
|
|
114
44
|
<ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
|
|
115
45
|
|
|
116
|
-
<
|
|
117
|
-
<mwc-icon>shield</mwc-icon>
|
|
118
|
-
<div>DATA OOC <span field-state>${state || ''}</span></div>
|
|
119
|
-
</h3>
|
|
46
|
+
<ox-data-ooc-badge .state=${state}></ox-data-ooc-badge>
|
|
120
47
|
|
|
121
48
|
<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
|
-
)}
|
|
49
|
+
<ox-data-ooc-history .dataOoc=${this.dataOoc}></ox-data-ooc-history>
|
|
134
50
|
`
|
|
135
51
|
}
|
|
136
52
|
}
|