@operato/dataset 2.0.0-alpha.14 → 2.0.0-alpha.141
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 +763 -0
- package/demo/favicon.ico +0 -0
- package/demo/index.html +349 -0
- package/demo/ox-data-ooc-brief-view-test.html +349 -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 +2 -1
- package/dist/src/grist-editor/ox-popup-data-item-spec.js +7 -8
- package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -1
- package/dist/src/ox-data-entry-form.js +49 -37
- 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 +17 -7
- 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-item-spec.js +7 -7
- package/dist/src/ox-data-item-spec.js.map +1 -1
- package/dist/src/ox-data-ooc-badge.d.ts +2 -2
- package/dist/src/ox-data-ooc-badge.js +8 -4
- package/dist/src/ox-data-ooc-badge.js.map +1 -1
- package/dist/src/ox-data-ooc-brief-view.d.ts +2 -2
- package/dist/src/ox-data-ooc-brief-view.js +1 -2
- package/dist/src/ox-data-ooc-brief-view.js.map +1 -1
- package/dist/src/ox-data-ooc-correction-part.d.ts +2 -2
- package/dist/src/ox-data-ooc-correction-part.js +5 -6
- package/dist/src/ox-data-ooc-correction-part.js.map +1 -1
- package/dist/src/ox-data-ooc-history.d.ts +2 -2
- package/dist/src/ox-data-ooc-history.js +4 -4
- package/dist/src/ox-data-ooc-history.js.map +1 -1
- package/dist/src/ox-data-ooc-view.d.ts +2 -2
- package/dist/src/ox-data-ooc-view.js +1 -2
- 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 +9 -9
- 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 +52 -35
- 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 +10 -4
- package/dist/src/ox-data-summary-view.js.map +1 -1
- package/dist/src/types.d.ts +12 -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.d.ts +1 -1
- package/dist/stories/ox-data-entry-form.stories.js +73 -17
- package/dist/stories/ox-data-entry-form.stories.js.map +1 -1
- package/dist/stories/ox-data-item-spec.stories.d.ts +1 -1
- package/dist/stories/ox-data-item-spec.stories.js +14 -2
- package/dist/stories/ox-data-item-spec.stories.js.map +1 -1
- package/dist/stories/ox-data-ooc-brief-view.stories.d.ts +1 -1
- package/dist/stories/ox-data-ooc-brief-view.stories.js +25 -13
- package/dist/stories/ox-data-ooc-brief-view.stories.js.map +1 -1
- package/dist/stories/ox-data-ooc-view.stories.d.ts +1 -1
- package/dist/stories/ox-data-ooc-view.stories.js +25 -13
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -1
- package/dist/stories/ox-data-sample-view.stories.d.ts +1 -1
- package/dist/stories/ox-data-sample-view.stories.js +21 -9
- package/dist/stories/ox-data-sample-view.stories.js.map +1 -1
- package/dist/stories/ox-grist-editor-data-item-spec.stories.d.ts +1 -1
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js +66 -54
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -26
- package/src/grist-editor/ox-popup-data-item-spec.ts +7 -8
- package/src/ox-data-entry-form.ts +66 -47
- package/src/ox-data-entry-subgroup-form.ts +2 -0
- package/src/ox-data-entry-view.ts +18 -7
- package/src/ox-data-item-spec.ts +9 -8
- package/src/ox-data-ooc-badge.ts +8 -4
- package/src/ox-data-ooc-brief-view.ts +1 -2
- package/src/ox-data-ooc-correction-part.ts +5 -6
- package/src/ox-data-ooc-history.ts +4 -4
- package/src/ox-data-ooc-view.ts +1 -2
- package/src/ox-data-sample-subgroup-view.ts +16 -17
- package/src/ox-data-sample-view.ts +52 -35
- package/src/ox-data-summary-view.ts +10 -4
- package/src/types.ts +31 -29
- 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 +78 -22
- package/stories/ox-data-item-spec.stories.ts +14 -2
- package/stories/ox-data-ooc-brief-view.stories.ts +26 -15
- package/stories/ox-data-ooc-view.stories.ts +26 -15
- package/stories/ox-data-sample-view.stories.ts +22 -11
- package/stories/ox-grist-editor-data-item-spec.stories.ts +67 -56
- package/themes/grist-theme.css +2 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { css, html, LitElement } from 'lit'
|
|
6
|
+
import { customElement, property, query, queryAll } from 'lit/decorators.js'
|
|
7
|
+
|
|
8
|
+
import { i18next } from '@operato/i18n'
|
|
9
|
+
|
|
10
|
+
export enum DataItemType {
|
|
11
|
+
number = 'number',
|
|
12
|
+
text = 'text',
|
|
13
|
+
boolean = 'boolean',
|
|
14
|
+
select = 'select',
|
|
15
|
+
file = 'file'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type SpcLimitValue = {
|
|
19
|
+
minimum?: number
|
|
20
|
+
maximum?: number
|
|
21
|
+
acceptables?: string[] | boolean[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
element for SPC limits
|
|
26
|
+
|
|
27
|
+
Example:
|
|
28
|
+
|
|
29
|
+
<ox-input-spc-limits
|
|
30
|
+
.value=${value}
|
|
31
|
+
.type=${type}>
|
|
32
|
+
</ox-input-spc-limits>
|
|
33
|
+
*/
|
|
34
|
+
@customElement('ox-input-spc-limits')
|
|
35
|
+
export class OxInputSpcLimits extends LitElement {
|
|
36
|
+
static styles = css`
|
|
37
|
+
:host {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-content: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
label {
|
|
44
|
+
margin: 0 var(--margin-default) var(--margin-default) 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
label div > * {
|
|
48
|
+
vertical-align: middle;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
button {
|
|
52
|
+
width: 20px;
|
|
53
|
+
text-align: center;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
div[name],
|
|
57
|
+
input[type='checkbox'] + span {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
font: var(--label-font);
|
|
60
|
+
color: var(--label-color);
|
|
61
|
+
text-align: right;
|
|
62
|
+
}
|
|
63
|
+
input,
|
|
64
|
+
select {
|
|
65
|
+
border: var(--input-field-border);
|
|
66
|
+
border-radius: var(--input-field-border-radius);
|
|
67
|
+
padding: var(--input-field-padding);
|
|
68
|
+
font: var(--input-field-font);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
input[type='checkbox'] {
|
|
72
|
+
width: initial;
|
|
73
|
+
}
|
|
74
|
+
input[checked] + span {
|
|
75
|
+
font-weight: bold;
|
|
76
|
+
}
|
|
77
|
+
[unit],
|
|
78
|
+
[value] {
|
|
79
|
+
display: inline-block;
|
|
80
|
+
opacity: 0.7;
|
|
81
|
+
font: var(--form-sublabel-font);
|
|
82
|
+
}
|
|
83
|
+
[properties] {
|
|
84
|
+
font: var(--input-field-font);
|
|
85
|
+
color: var(--label-color);
|
|
86
|
+
}
|
|
87
|
+
`
|
|
88
|
+
|
|
89
|
+
@property({ type: Object }) value: SpcLimitValue = {}
|
|
90
|
+
@property({ type: String }) type: DataItemType = DataItemType.number
|
|
91
|
+
@property({ type: String }) unit?: string
|
|
92
|
+
@property({ type: Object }) options: { options?: { text: string; value: string }[] } = {}
|
|
93
|
+
|
|
94
|
+
@query('[name=minimum]') minimum!: HTMLInputElement
|
|
95
|
+
@query('[name=maximum]') maximum!: HTMLInputElement
|
|
96
|
+
@queryAll('[type=checkbox]:checked') checkedAll!: NodeListOf<HTMLInputElement>
|
|
97
|
+
|
|
98
|
+
firstUpdated() {
|
|
99
|
+
this.renderRoot.addEventListener('change', this.onChange.bind(this))
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
render() {
|
|
103
|
+
const { minimum, maximum, acceptables = [] } = this.value || {}
|
|
104
|
+
|
|
105
|
+
return html`
|
|
106
|
+
<div>
|
|
107
|
+
${this.type === DataItemType.number
|
|
108
|
+
? html`
|
|
109
|
+
<label>
|
|
110
|
+
<div name>${i18next.t('text.minimum value')}</div>
|
|
111
|
+
<input type="number" name="minimum" .value=${String(minimum)} />
|
|
112
|
+
<div unit>${this.unit}</div>
|
|
113
|
+
</select>
|
|
114
|
+
</label>
|
|
115
|
+
<label>
|
|
116
|
+
<div name>${i18next.t('text.maximum value')}</div>
|
|
117
|
+
<input type="number" name="maximum" .value=${String(maximum)} />
|
|
118
|
+
<div unit>${this.unit}</div>
|
|
119
|
+
</label>
|
|
120
|
+
`
|
|
121
|
+
: this.type === DataItemType.select
|
|
122
|
+
? html`
|
|
123
|
+
<!-- <div>Acceptables</div> -->
|
|
124
|
+
${this.options?.options?.map(
|
|
125
|
+
option => html`
|
|
126
|
+
<div>
|
|
127
|
+
<input
|
|
128
|
+
type="checkbox"
|
|
129
|
+
data-value=${option.value}
|
|
130
|
+
?checked=${(acceptables as string[]).includes(option.value)}
|
|
131
|
+
/>
|
|
132
|
+
<span>${option.text}</span>
|
|
133
|
+
<span value>(${option.value})</span>
|
|
134
|
+
</div>
|
|
135
|
+
`
|
|
136
|
+
)}
|
|
137
|
+
`
|
|
138
|
+
: this.type === DataItemType.boolean
|
|
139
|
+
? html`
|
|
140
|
+
<div>
|
|
141
|
+
<input type="checkbox" data-value=${true} ?checked=${(acceptables as boolean[]).includes(true)} />
|
|
142
|
+
<span value>true</span>
|
|
143
|
+
</div>
|
|
144
|
+
<div>
|
|
145
|
+
<input type="checkbox" data-value=${false} ?checked=${(acceptables as boolean[]).includes(false)} />
|
|
146
|
+
<span value>false</span>
|
|
147
|
+
</div>
|
|
148
|
+
`
|
|
149
|
+
: html` <div properties>${i18next.t('text.no properties to set')}</div> `}
|
|
150
|
+
</div>
|
|
151
|
+
`
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
private onChange(e: Event) {
|
|
155
|
+
if (this.type === DataItemType.number) {
|
|
156
|
+
this.value = {
|
|
157
|
+
minimum: this.minimum.valueAsNumber,
|
|
158
|
+
maximum: this.maximum.valueAsNumber
|
|
159
|
+
}
|
|
160
|
+
} else if (this.type === DataItemType.select) {
|
|
161
|
+
this.value = {
|
|
162
|
+
acceptables: Array.from(this.checkedAll).map(checked => {
|
|
163
|
+
const x = checked.getAttribute('data-value')!
|
|
164
|
+
console.log(x)
|
|
165
|
+
return x
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
} else if (this.type === DataItemType.boolean) {
|
|
169
|
+
this.value = {
|
|
170
|
+
acceptables: Array.from(this.checkedAll).map(checked => {
|
|
171
|
+
const x = checked.getAttribute('data-value')! === 'true'
|
|
172
|
+
console.log(x)
|
|
173
|
+
return x
|
|
174
|
+
})
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
this.value = {}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
|
|
181
|
+
}
|
|
182
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './ox-input-spc-limits.js'
|
|
2
|
+
|
|
3
|
+
import { html, TemplateResult } from 'lit'
|
|
4
|
+
import { customElement } from 'lit/decorators.js'
|
|
5
|
+
|
|
6
|
+
import { OxPropertyEditor, PropertySpec } from '@operato/property-editor'
|
|
7
|
+
|
|
8
|
+
@customElement('ox-property-editor-spc-limits')
|
|
9
|
+
export class OxPropertyEditorSpcLimits extends OxPropertyEditor {
|
|
10
|
+
editorTemplate(value: any, spec: PropertySpec): TemplateResult {
|
|
11
|
+
const { type, options, unit } = spec.property || {}
|
|
12
|
+
|
|
13
|
+
return html`
|
|
14
|
+
<ox-input-spc-limits
|
|
15
|
+
id="editor"
|
|
16
|
+
.value=${value}
|
|
17
|
+
.type=${type}
|
|
18
|
+
.unit=${unit}
|
|
19
|
+
.options=${options}
|
|
20
|
+
></ox-input-spc-limits>
|
|
21
|
+
`
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@operato/i18n'
|
|
2
2
|
import '../src/ox-data-entry-form.js'
|
|
3
3
|
import '../src/usecase/ccp' /* register usecase CCP */
|
|
4
|
-
import '@material/
|
|
4
|
+
import '@material/web/icon/icon.js'
|
|
5
5
|
|
|
6
6
|
import { html, TemplateResult } from 'lit'
|
|
7
7
|
|
|
@@ -102,7 +102,8 @@ const dataSet = {
|
|
|
102
102
|
{ text: '최우수', value: '최우수' },
|
|
103
103
|
{ text: '우수', value: '우수' },
|
|
104
104
|
{ text: '보통', value: '보통' },
|
|
105
|
-
{ text: '미달', value: '미달' }
|
|
105
|
+
{ text: '미달', value: '미달' },
|
|
106
|
+
{ text: '등외', value: '등외' }
|
|
106
107
|
]
|
|
107
108
|
},
|
|
108
109
|
quota: 3,
|
|
@@ -127,6 +128,50 @@ const dataSet = {
|
|
|
127
128
|
quota: 1,
|
|
128
129
|
active: true
|
|
129
130
|
},
|
|
131
|
+
{
|
|
132
|
+
name: '라디오',
|
|
133
|
+
description: '라디오 그룹',
|
|
134
|
+
|
|
135
|
+
group: '측정데이타',
|
|
136
|
+
sequence: 5,
|
|
137
|
+
tag: 'check1',
|
|
138
|
+
type: 'radio',
|
|
139
|
+
options: {
|
|
140
|
+
options: [
|
|
141
|
+
{
|
|
142
|
+
text: '예',
|
|
143
|
+
value: 'Y'
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
text: '아니오',
|
|
147
|
+
value: 'N'
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
quota: 3,
|
|
152
|
+
active: true
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: '라디오2',
|
|
156
|
+
description: '라디오 그룹2',
|
|
157
|
+
sequence: 5,
|
|
158
|
+
tag: 'check2',
|
|
159
|
+
type: 'radio',
|
|
160
|
+
options: {
|
|
161
|
+
options: [
|
|
162
|
+
{
|
|
163
|
+
text: '예',
|
|
164
|
+
value: 'Y'
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
text: '아니오',
|
|
168
|
+
value: 'N'
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
quota: 1,
|
|
173
|
+
active: true
|
|
174
|
+
},
|
|
130
175
|
{
|
|
131
176
|
name: '첨부파일',
|
|
132
177
|
description: '참조 첨부 파일.',
|
|
@@ -146,27 +191,38 @@ var value = {
|
|
|
146
191
|
comment: '이것이 코멘트입니다.'
|
|
147
192
|
}
|
|
148
193
|
|
|
149
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
194
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
195
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
196
|
+
<link
|
|
197
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
198
|
+
rel="stylesheet"
|
|
199
|
+
/>
|
|
200
|
+
<link
|
|
201
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
202
|
+
rel="stylesheet"
|
|
203
|
+
/>
|
|
204
|
+
<link
|
|
205
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
206
|
+
rel="stylesheet"
|
|
207
|
+
/>
|
|
208
|
+
|
|
209
|
+
<style>
|
|
210
|
+
body {
|
|
211
|
+
}
|
|
212
|
+
</style>
|
|
213
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
214
|
+
<link href="/themes/oops-theme.css" rel="stylesheet" />
|
|
215
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
160
216
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
217
|
+
<ox-data-entry-form
|
|
218
|
+
.dataSet=${dataSet}
|
|
219
|
+
.value=${value}
|
|
220
|
+
@change=${(e: CustomEvent) => {
|
|
221
|
+
value = e.detail
|
|
222
|
+
console.log('change', value)
|
|
223
|
+
}}
|
|
224
|
+
></ox-data-entry-form>
|
|
225
|
+
`
|
|
170
226
|
|
|
171
227
|
export const Regular = Template.bind({})
|
|
172
228
|
Regular.args = {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@operato/i18n'
|
|
2
|
-
import '@material/
|
|
2
|
+
import '@material/web/icon/icon.js'
|
|
3
3
|
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
4
4
|
import '@operato/property-editor/ox-property-editor-number.js'
|
|
5
5
|
import '@operato/property-editor/ox-property-editor-string.js'
|
|
@@ -107,7 +107,19 @@ var specB = {
|
|
|
107
107
|
|
|
108
108
|
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
109
109
|
html` <link href="/themes/app-theme.css" rel="stylesheet" />
|
|
110
|
-
<link
|
|
110
|
+
<link
|
|
111
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
112
|
+
rel="stylesheet"
|
|
113
|
+
/>
|
|
114
|
+
<link
|
|
115
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
116
|
+
rel="stylesheet"
|
|
117
|
+
/>
|
|
118
|
+
<link
|
|
119
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
120
|
+
rel="stylesheet"
|
|
121
|
+
/>
|
|
122
|
+
|
|
111
123
|
<style>
|
|
112
124
|
body {
|
|
113
125
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@operato/i18n'
|
|
2
2
|
import '../src/ox-data-ooc-brief-view.js'
|
|
3
3
|
import '../src/usecase/ccp/index.js' /* register usecase CCP */
|
|
4
|
-
import '@material/
|
|
4
|
+
import '@material/web/icon/icon.js'
|
|
5
5
|
|
|
6
6
|
import { html, TemplateResult } from 'lit'
|
|
7
7
|
|
|
@@ -263,21 +263,32 @@ var dataOoc = {
|
|
|
263
263
|
]
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
266
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
267
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
268
|
+
<link
|
|
269
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
270
|
+
rel="stylesheet"
|
|
271
|
+
/>
|
|
272
|
+
<link
|
|
273
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
274
|
+
rel="stylesheet"
|
|
275
|
+
/>
|
|
276
|
+
<link
|
|
277
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
278
|
+
rel="stylesheet"
|
|
279
|
+
/>
|
|
280
|
+
|
|
281
|
+
<style>
|
|
282
|
+
body {
|
|
283
|
+
}
|
|
284
|
+
</style>
|
|
274
285
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
286
|
+
<ox-data-ooc-brief-view
|
|
287
|
+
.dataSet=${dataSet}
|
|
288
|
+
.dataOoc=${dataOoc}
|
|
289
|
+
@change=${(e: CustomEvent) => console.log(e.detail)}
|
|
290
|
+
></ox-data-ooc-brief-view>
|
|
291
|
+
`
|
|
281
292
|
|
|
282
293
|
export const Regular = Template.bind({})
|
|
283
294
|
Regular.args = {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@operato/i18n'
|
|
2
2
|
import '../src/ox-data-ooc-view.js'
|
|
3
3
|
import '../src/usecase/ccp' /* register usecase CCP */
|
|
4
|
-
import '@material/
|
|
4
|
+
import '@material/web/icon/icon.js'
|
|
5
5
|
|
|
6
6
|
import { html, TemplateResult } from 'lit'
|
|
7
7
|
|
|
@@ -254,21 +254,32 @@ var dataOoc = {
|
|
|
254
254
|
]
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
258
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
259
|
+
<link
|
|
260
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
261
|
+
rel="stylesheet"
|
|
262
|
+
/>
|
|
263
|
+
<link
|
|
264
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
265
|
+
rel="stylesheet"
|
|
266
|
+
/>
|
|
267
|
+
<link
|
|
268
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
269
|
+
rel="stylesheet"
|
|
270
|
+
/>
|
|
271
|
+
|
|
272
|
+
<style>
|
|
273
|
+
body {
|
|
274
|
+
}
|
|
275
|
+
</style>
|
|
265
276
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
277
|
+
<ox-data-ooc-view
|
|
278
|
+
.dataSet=${dataSet}
|
|
279
|
+
.dataOoc=${dataOoc}
|
|
280
|
+
@change=${(e: CustomEvent) => console.log(e.detail)}
|
|
281
|
+
></ox-data-ooc-view>
|
|
282
|
+
`
|
|
272
283
|
|
|
273
284
|
export const Regular = Template.bind({})
|
|
274
285
|
Regular.args = {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@operato/i18n'
|
|
2
2
|
import '../src/ox-data-sample-view.js'
|
|
3
3
|
import '../src/usecase/ccp' /* register usecase CCP */
|
|
4
|
-
import '@material/
|
|
4
|
+
import '@material/web/icon/icon.js'
|
|
5
5
|
|
|
6
6
|
import { html, TemplateResult } from 'lit'
|
|
7
7
|
|
|
@@ -227,17 +227,28 @@ var dataSample = {
|
|
|
227
227
|
collectedAt: Date.now()
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
230
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
231
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
232
|
+
<link
|
|
233
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
234
|
+
rel="stylesheet"
|
|
235
|
+
/>
|
|
236
|
+
<link
|
|
237
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
238
|
+
rel="stylesheet"
|
|
239
|
+
/>
|
|
240
|
+
<link
|
|
241
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
242
|
+
rel="stylesheet"
|
|
243
|
+
/>
|
|
244
|
+
|
|
245
|
+
<style>
|
|
246
|
+
body {
|
|
247
|
+
}
|
|
248
|
+
</style>
|
|
238
249
|
|
|
239
|
-
|
|
240
|
-
|
|
250
|
+
<ox-data-sample-view .dataSample=${dataSample}></ox-data-sample-view>
|
|
251
|
+
`
|
|
241
252
|
|
|
242
253
|
export const Regular = Template.bind({})
|
|
243
254
|
Regular.args = {}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
3
3
|
import '@operato/property-editor/ox-property-editor-number.js'
|
|
4
4
|
import '@operato/property-editor/ox-property-editor-string.js'
|
|
@@ -306,9 +306,9 @@ class GristDemo extends LitElement {
|
|
|
306
306
|
|
|
307
307
|
<div slot="headroom" id="headroom">
|
|
308
308
|
<div id="modes">
|
|
309
|
-
<
|
|
310
|
-
<
|
|
311
|
-
<
|
|
309
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
|
|
310
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
|
|
311
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
312
312
|
</div>
|
|
313
313
|
</div>
|
|
314
314
|
</ox-grist>
|
|
@@ -332,67 +332,78 @@ interface Story<T> {
|
|
|
332
332
|
|
|
333
333
|
interface ArgTypes {}
|
|
334
334
|
|
|
335
|
-
const Template: Story<ArgTypes> = ({}: ArgTypes) =>
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
335
|
+
const Template: Story<ArgTypes> = ({}: ArgTypes) => html`
|
|
336
|
+
<link
|
|
337
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
338
|
+
rel="stylesheet"
|
|
339
|
+
/>
|
|
340
|
+
<link
|
|
341
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
342
|
+
rel="stylesheet"
|
|
343
|
+
/>
|
|
344
|
+
<link
|
|
345
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
346
|
+
rel="stylesheet"
|
|
347
|
+
/>
|
|
341
348
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
flex-direction: row;
|
|
346
|
-
align-items: center;
|
|
347
|
-
padding: var(--padding-default) var(--padding-wide);
|
|
348
|
-
background-color: var(--theme-white-color);
|
|
349
|
-
box-shadow: var(--box-shadow);
|
|
349
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
350
|
+
<link href="/themes/oops-theme.css" rel="stylesheet" />
|
|
351
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
350
352
|
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
margin-right: var(--margin-default);
|
|
360
|
-
padding-left: var(--padding-narrow);
|
|
361
|
-
border-bottom: var(--border-dark-color);
|
|
362
|
-
position: relative;
|
|
363
|
-
color: var(--secondary-color);
|
|
364
|
-
font-size: var(--fontsize-default);
|
|
365
|
-
user-select: none;
|
|
366
|
-
}
|
|
353
|
+
<style>
|
|
354
|
+
[slot='headroom'] {
|
|
355
|
+
display: flex;
|
|
356
|
+
flex-direction: row;
|
|
357
|
+
align-items: center;
|
|
358
|
+
padding: var(--padding-default) var(--padding-wide);
|
|
359
|
+
background-color: var(--theme-white-color);
|
|
360
|
+
box-shadow: var(--box-shadow);
|
|
367
361
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
362
|
+
--md-icon-size: 24px;
|
|
363
|
+
}
|
|
364
|
+
#sorters md-icon,
|
|
365
|
+
#modes md-icon {
|
|
366
|
+
--md-icon-size: 18px;
|
|
367
|
+
}
|
|
368
|
+
#sorters {
|
|
369
|
+
margin-left: auto;
|
|
370
|
+
margin-right: var(--margin-default);
|
|
371
|
+
padding-left: var(--padding-narrow);
|
|
372
|
+
border-bottom: var(--border-dark-color);
|
|
373
|
+
position: relative;
|
|
374
|
+
color: var(--secondary-color);
|
|
375
|
+
font-size: var(--fontsize-default);
|
|
376
|
+
user-select: none;
|
|
377
|
+
}
|
|
372
378
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
379
|
+
#sorters > * {
|
|
380
|
+
padding: var(--padding-narrow);
|
|
381
|
+
vertical-align: middle;
|
|
382
|
+
}
|
|
378
383
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
384
|
+
#filters {
|
|
385
|
+
display: flex;
|
|
386
|
+
justify-content: center;
|
|
387
|
+
align-items: center;
|
|
388
|
+
}
|
|
382
389
|
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
}
|
|
390
|
+
#filters * {
|
|
391
|
+
margin-right: var(--margin-default);
|
|
392
|
+
}
|
|
387
393
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
394
|
+
@media only screen and (max-width: 460px) {
|
|
395
|
+
#filters {
|
|
396
|
+
flex-direction: column;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
#modes {
|
|
400
|
+
display: none;
|
|
391
401
|
}
|
|
392
|
-
|
|
402
|
+
}
|
|
403
|
+
</style>
|
|
393
404
|
|
|
394
|
-
|
|
395
|
-
|
|
405
|
+
<ox-data-items mode="LIST"></ox-data-items>
|
|
406
|
+
`
|
|
396
407
|
|
|
397
408
|
export const Regular = Template.bind({})
|
|
398
409
|
Regular.args = {}
|
package/themes/grist-theme.css
CHANGED
|
@@ -35,6 +35,8 @@ body {
|
|
|
35
35
|
--grid-header-filter-title-font: normal 12px var(--theme-font);
|
|
36
36
|
--grid-header-filter-title-icon-color: var(--primary-color);
|
|
37
37
|
|
|
38
|
+
--grid-body-bottom-border: 1px solid rgba(var(--secondary-color-rgb), 0.2);
|
|
39
|
+
|
|
38
40
|
--grid-record-background-color: var(--theme-white-color);
|
|
39
41
|
--grid-record-odd-background-color: #f9f7f5;
|
|
40
42
|
--grid-record-padding: 0 5px 0 5px;
|