@operato/dataset 1.0.0-beta.0 → 1.0.0-beta.11

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "WebApplication dataset supporting components following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "heartyoh",
6
- "version": "1.0.0-beta.0",
6
+ "version": "1.0.0-beta.11",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
9
9
  "exports": {
@@ -42,15 +42,15 @@
42
42
  "@material/mwc-button": "^0.25.3",
43
43
  "@material/mwc-icon": "^0.25.3",
44
44
  "@material/mwc-icon-button": "^0.25.3",
45
- "@operato/data-grist": "^1.0.0-beta.0",
46
- "@operato/graphql": "^1.0.0-beta.0",
47
- "@operato/i18n": "^1.0.0-beta.0",
48
- "@operato/input": "^1.0.0-beta.0",
49
- "@operato/layout": "^1.0.0-beta.0",
50
- "@operato/property-editor": "^1.0.0-beta.0",
51
- "@operato/shell": "^1.0.0-beta.0",
52
- "@operato/styles": "^1.0.0-beta.0",
53
- "@operato/utils": "^1.0.0-beta.0",
45
+ "@operato/data-grist": "^1.0.0-beta.11",
46
+ "@operato/graphql": "^1.0.0-beta.11",
47
+ "@operato/i18n": "^1.0.0-beta.11",
48
+ "@operato/input": "^1.0.0-beta.11",
49
+ "@operato/layout": "^1.0.0-beta.11",
50
+ "@operato/property-editor": "^1.0.0-beta.11",
51
+ "@operato/shell": "^1.0.0-beta.11",
52
+ "@operato/styles": "^1.0.0-beta.11",
53
+ "@operato/utils": "^1.0.0-beta.11",
54
54
  "lit": "^2.2.1"
55
55
  },
56
56
  "devDependencies": {
@@ -85,5 +85,5 @@
85
85
  "prettier --write"
86
86
  ]
87
87
  },
88
- "gitHead": "06b7a224872643b4dfdd95efc83770ce96057bdf"
88
+ "gitHead": "512dc1061481c13d951862b8e35f3cdc8ad2e574"
89
89
  }
@@ -1,11 +1,12 @@
1
1
  import '../ox-data-item-spec.js'
2
2
 
3
- import { LitElement, css, html } from 'lit'
3
+ import { css, html, LitElement } from 'lit'
4
4
  import { customElement, property } from 'lit/decorators.js'
5
5
 
6
- import { DataItem } from '../types.js'
7
- import { ScrollbarStyles } from '@operato/styles'
8
6
  import { i18next } from '@operato/i18n'
7
+ import { ScrollbarStyles } from '@operato/styles'
8
+
9
+ import { DataItem } from '../types.js'
9
10
 
10
11
  @customElement('ox-popup-data-item-spec')
11
12
  export class OxPopupDataItemSpec extends LitElement {
@@ -25,6 +26,7 @@ export class OxPopupDataItemSpec extends LitElement {
25
26
  ox-data-item-spec {
26
27
  flex: 1;
27
28
  overflow-y: auto;
29
+ padding: var(--padding-wide);
28
30
  }
29
31
 
30
32
  span {
@@ -13,6 +13,11 @@ export class OxDataEntryForm extends LitElement {
13
13
  flex-direction: row;
14
14
  }
15
15
 
16
+ h2,
17
+ h3 {
18
+ text-align: center;
19
+ }
20
+
16
21
  form {
17
22
  flex: 1;
18
23
 
@@ -21,24 +26,34 @@ export class OxDataEntryForm extends LitElement {
21
26
  }
22
27
  label {
23
28
  display: grid;
24
- grid-template-columns: repeat(12, 1fr);
25
- gap: 9px;
29
+
30
+ grid-template-rows: auto 1fr;
31
+ grid-template-columns: 1fr 5fr;
32
+ grid-template-areas: 'name description' 'empty inputs';
33
+
34
+ grid-gap: 9px;
26
35
  align-items: center;
27
36
  margin-bottom: var(--margin-default);
28
37
  }
29
- label:nth-child(even) {
38
+ label:nth-child(odd) {
30
39
  background-color: var(--main-section-background-color);
31
40
  padding: var(--padding-default) 0;
32
41
  }
33
42
 
34
43
  div[name] {
35
- grid-column: span 2 / auto;
44
+ grid-area: name;
36
45
  font: var(--label-font);
37
46
  color: var(--label-color);
38
47
  text-align: right;
39
48
  }
49
+ div[description] {
50
+ grid-area: description;
51
+ font: var(--page-description-font);
52
+ color: var(--page-description-color);
53
+ text-align: left;
54
+ }
40
55
  div[elements] {
41
- grid-column: span 10 / auto;
56
+ grid-area: inputs;
42
57
  display: flex;
43
58
  flex-direction: row;
44
59
  flex-wrap: wrap;
@@ -57,11 +72,20 @@ export class OxDataEntryForm extends LitElement {
57
72
  }
58
73
 
59
74
  @media only screen and (max-width: 460px) {
60
- div[name] {
61
- grid-column: span 3 / auto;
75
+ label {
76
+ display: grid;
77
+
78
+ grid-template-rows: auto auto 1fr;
79
+ grid-template-columns: 1fr;
80
+ grid-template-areas: 'name' 'description' 'inputs';
81
+
82
+ grid-gap: 9px;
83
+ align-items: center;
84
+ margin-bottom: var(--margin-default);
62
85
  }
63
- div[elements] {
64
- grid-column: span 9 / auto;
86
+
87
+ div[name] {
88
+ text-align: left;
65
89
  }
66
90
  }
67
91
  `
@@ -70,7 +94,11 @@ export class OxDataEntryForm extends LitElement {
70
94
  @property({ type: Object }) value?: { [tag: string]: any }
71
95
 
72
96
  render() {
73
- return html`<form @change=${(e: Event) => this.onChange(e)}>${this.buildInputs()}</form>`
97
+ return html` <form @change=${(e: Event) => this.onChange(e)}>
98
+ <h2>${this.dataSet?.name || ''}</h2>
99
+ <h3>${this.dataSet?.description || ''}</h3>
100
+ ${this.buildInputs()}
101
+ </form>`
74
102
  }
75
103
 
76
104
  private onChange(e: Event) {
@@ -132,6 +160,7 @@ export class OxDataEntryForm extends LitElement {
132
160
 
133
161
  return html` <label .title=${description}>
134
162
  <div name>${name}${unit ? `(${unit})` : ''}</div>
163
+ <div description>${description}</div>
135
164
  <div elements>${elements}</div>
136
165
  </label>`
137
166
  })
@@ -1,10 +1,14 @@
1
1
  import '@operato/input/ox-input-file.js'
2
2
  import './ox-data-sample-view'
3
+ import '@material/mwc-icon'
3
4
 
4
- import { DataOoc, DataSet } from './types.js'
5
- import { LitElement, css, html } from 'lit'
5
+ import { css, html, LitElement } from 'lit'
6
6
  import { customElement, property } from 'lit/decorators.js'
7
7
 
8
+ import { i18next } from '@operato/i18n'
9
+
10
+ import { DataOoc, DataSet } from './types.js'
11
+
8
12
  @customElement('ox-data-ooc-view')
9
13
  export class OxDataOocView extends LitElement {
10
14
  static styles = css`
@@ -31,6 +35,10 @@ export class OxDataOocView extends LitElement {
31
35
  top: 25px;
32
36
  }
33
37
 
38
+ mwc-icon {
39
+ font-size: 16px;
40
+ }
41
+
34
42
  [page-description] {
35
43
  margin: var(--page-description-margin);
36
44
  font: var(--page-description-font);
@@ -50,13 +58,13 @@ export class OxDataOocView extends LitElement {
50
58
 
51
59
  <h3 state>${this.dataOoc?.state || ''}</h3>
52
60
 
53
- <h3>history</h3>
61
+ <h3>${i18next.t('title.history')}</h3>
54
62
  ${history.map(
55
63
  ({ user, state, comment, timestamp }) => html`
56
64
  <p page-description>
57
65
  ${formatter.format(new Date(timestamp))}
58
66
  <br />
59
- ${state} by ${user.name}
67
+ ${state} <mwc-icon>account_circle</mwc-icon> ${user.name}
60
68
  <br />
61
69
  ${comment}
62
70
  </p>
@@ -3,6 +3,8 @@ import '@operato/input/ox-input-file.js'
3
3
  import { css, html, LitElement } from 'lit'
4
4
  import { customElement, property } from 'lit/decorators.js'
5
5
 
6
+ import { i18next } from '@operato/i18n'
7
+
6
8
  import { OxDataUseCase } from './ox-data-use-case.js'
7
9
  import { DataItem, DataSample, DataSet } from './types.js'
8
10
 
@@ -94,23 +96,23 @@ export class OxDataSampleView extends LitElement {
94
96
 
95
97
  const { name, description, collectedAt, workDate, workShift } = this.dataSample || {}
96
98
 
97
- return html` <h2>${name}</h2>
99
+ return html` <h2>${i18next.t('field.name')}</h2>
98
100
  <p page-description>
99
- ${description}<br /><br />
100
- work date: ${workDate} ${workShift}<br />
101
- collected at: ${formatter.format(new Date(collectedAt!))}
101
+ ${i18next.t('field.description')}<br /><br />
102
+ ${i18next.t('field.work-date')}: ${workDate} ${workShift}<br />
103
+ ${i18next.t('field.collected-at')}: ${formatter.format(new Date(collectedAt!))}
102
104
  </p>
103
105
 
104
106
  <form @change=${(e: Event) => this.onChange(e)}>
105
107
  <table>
106
108
  <tr>
107
- <th item>item</th>
108
- <th>description</th>
109
- <th>unit</th>
110
- <th value>value</th>
111
- <th>specification</th>
112
- <th>OOC</th>
113
- <th>OOS</th>
109
+ <th item>${i18next.t('field.item')}</th>
110
+ <th>${i18next.t('field.description')}</th>
111
+ <th>${i18next.t('field.unit')}</th>
112
+ <th value>${i18next.t('field.value')}</th>
113
+ <th>${i18next.t('field.spec')}</th>
114
+ <th>${i18next.t('field.ooc')}</th>
115
+ <th>${i18next.t('field.oos')}</th>
114
116
  </tr>
115
117
  ${dataItems.map(dataItem => {
116
118
  const { ooc, oos } = this.evaluateOOC(dataItem, data?.[dataItem.tag]) || {}
@@ -1 +1,57 @@
1
- {}
1
+ {
2
+ "button.corrected": "corrected",
3
+ "button.reviewed": "reviewed",
4
+ "field.appliance": "appliance",
5
+ "field.collected_at": "collected at",
6
+ "field.corrective-action": "corrective action",
7
+ "field.corrector": "corrector",
8
+ "field.corrected-at": "corrected at",
9
+ "field.data": "data",
10
+ "field.data-sample": "data sample",
11
+ "field.data-set": "data set",
12
+ "field.device-id": "device id",
13
+ "field.entry-role": "entry role",
14
+ "field.entry-type": "entry type",
15
+ "field.entry-view": "entry view",
16
+ "field.hidden": "hidden",
17
+ "field.latest-collected-at": "latest collected at",
18
+ "field.monitor-type": "monitor type",
19
+ "field.monitor-view": "monitor view",
20
+ "field.netmask": "network mask",
21
+ "field.next-schedule": "next schedule",
22
+ "field.oos": "out of critical limit",
23
+ "field.ooc": "out of control limit",
24
+ "field.options": "options",
25
+ "field.partition-keys": "partition keys",
26
+ "field.prev-schedule": "previous schedule",
27
+ "field.quota": "sampling #",
28
+ "field.raw-data": "raw data",
29
+ "field.ref-by": "ref. by",
30
+ "field.report-type": "report type",
31
+ "field.report-view": "report view",
32
+ "field.serial-no": "serial #",
33
+ "field.spec": "spec",
34
+ "field.state": "state",
35
+ "field.supervisory-role": "supervisory role",
36
+ "field.tag": "tag name",
37
+ "field.unit": "unit",
38
+ "field.use-case": "use case",
39
+ "field.work-date": "work date",
40
+ "field.work-shift": "work shift",
41
+ "text.automatically collected": "automatically collected",
42
+ "text.data sample created successfully": "a data sample created successfully",
43
+ "text.data ooc updated successfully": "a data ooc updated successfully",
44
+ "text.manually collected": "manually collected",
45
+ "title.data-entry-form": "data entry form",
46
+ "title.data-entry list": "data entry list",
47
+ "title.data-item list": "data item list",
48
+ "title.data-monitor-view": "data monitor view",
49
+ "title.data-report-view": "data report view",
50
+ "title.data-ooc list": "data OOC list",
51
+ "title.data-ooc view": "data OOC view",
52
+ "title.data-sample list": "data sample list",
53
+ "title.data-sample view": "data sample view",
54
+ "title.data-sensor list": "data sensor list",
55
+ "title.data-set list": "data set list",
56
+ "title.edit code": "edit code"
57
+ }
@@ -1 +1,56 @@
1
- {}
1
+ {
2
+ "button.corrected": "조치완료",
3
+ "button.reviewed": "검토완료",
4
+ "field.appliance": "어플라이언스",
5
+ "field.collected_at": "수집일시",
6
+ "field.corrective-action": "조치 활동",
7
+ "field.corrector": "조치자",
8
+ "field.corrected-at": "조치 시간",
9
+ "field.data": "데이타",
10
+ "field.data-sample": "데이타 샘플",
11
+ "field.data-set": "데이타셋",
12
+ "field.device-id": "디바이스 아이디",
13
+ "field.entry-role": "입력담당 역할",
14
+ "field.entry-type": "입력용 화면종류",
15
+ "field.entry-view": "입력용 화면",
16
+ "field.hidden": "숨기기",
17
+ "field.latest-collected-at": "최근 수집 시간",
18
+ "field.monitor-type": "모니터용 화면종류",
19
+ "field.monitor-view": "모니터용 화면",
20
+ "field.netmask": "네트워크마스크",
21
+ "field.next-schedule": "다음 수집계획",
22
+ "field.oos": "허용한계 이탈여부",
23
+ "field.ooc": "관리한계 이탈여부",
24
+ "field.options": "선택옵션",
25
+ "field.partition-keys": "파티션 키",
26
+ "field.prev-schedule": "이전 수집계획",
27
+ "field.quota": "샘플수",
28
+ "field.raw-data": "데이타 원본",
29
+ "field.ref-by": "참조아이템",
30
+ "field.report-type": "리포트용 화면종류",
31
+ "field.report-view": "리포트용 화면",
32
+ "field.serial-no": "시리얼번호",
33
+ "field.spec": "명세",
34
+ "field.state": "상태",
35
+ "field.supervisory-role": "관리자 역할",
36
+ "field.tag": "태그이름",
37
+ "field.unit": "단위",
38
+ "field.use-case": "사용 사례",
39
+ "field.work-date": "작업기준일",
40
+ "field.work-shift": "교대근무조",
41
+ "text.automatically collected": "자동 수집",
42
+ "text.data sample created successfully": "데이타 샘플이 성공적으로 생성되었습니다",
43
+ "text.data ooc updated successfully": "이탈데이타 내용이 수정되었습니다",
44
+ "text.manually collected": "수동 수집",
45
+ "title.data-entry-form": "데이타 입력",
46
+ "title.data-item list": "데이타 아이템 조회",
47
+ "title.data-monitor-view": "데이타 모니터",
48
+ "title.data-report-view": "데이타 리포트",
49
+ "title.data-ooc list": "데이타 이탈점 조회",
50
+ "title.data-ooc view": "데이타 이탈점 상세",
51
+ "title.data-sample list": "데이타 샘플 조회",
52
+ "title.data-sample view": "데이타 샘플 상세",
53
+ "title.data-sensor list": "데이타 센서 조회",
54
+ "title.data-set list": "데이타 셋 조회",
55
+ "title.edit code": "코드 편집"
56
+ }
@@ -1 +1,56 @@
1
- {}
1
+ {
2
+ "button.corrected": "corrected",
3
+ "button.reviewed": "reviewed",
4
+ "field.appliance": "appliance",
5
+ "field.collected_at": "collected at",
6
+ "field.corrective-action": "corrective action",
7
+ "field.corrector": "corrector",
8
+ "field.corrected-at": "corrected at",
9
+ "field.data": "data",
10
+ "field.data-sample": "data sample",
11
+ "field.data-set": "data set",
12
+ "field.device-id": "device id",
13
+ "field.entry-role": "entry role",
14
+ "field.entry-type": "entry type",
15
+ "field.entry-view": "entry view",
16
+ "field.latest-collected-at": "latest collected at",
17
+ "field.monitor-type": "monitor type",
18
+ "field.monitor-view": "monitor view",
19
+ "field.netmask": "network mask",
20
+ "field.next-schedule": "next schedule",
21
+ "field.oos": "out of critical limit",
22
+ "field.ooc": "out of control limit",
23
+ "field.options": "options",
24
+ "field.hidden": "hidden",
25
+ "field.partition-keys": "partition keys",
26
+ "field.prev-schedule": "previous schedule",
27
+ "field.quota": "sampling #",
28
+ "field.raw-data": "raw data",
29
+ "field.ref-by": "ref. by",
30
+ "field.report-type": "report type",
31
+ "field.report-view": "report view",
32
+ "field.serial-no": "serial #",
33
+ "field.spec": "spec",
34
+ "field.state": "keadaan",
35
+ "field.supervisory-role": "supervisory role",
36
+ "field.tag": "tag name",
37
+ "field.unit": "unit",
38
+ "field.use-case": "use case",
39
+ "field.work-date": "work date",
40
+ "field.work-shift": "work shift",
41
+ "text.automatically collected": "automatically collected",
42
+ "text.data sample created successfully": "a data sample created successfully",
43
+ "text.data ooc updated successfully": "a data ooc updated successfully",
44
+ "text.manually collected": "manually collected",
45
+ "title.data-entry-form": "data entry form",
46
+ "title.data-item list": "data item list",
47
+ "title.data-monitor-view": "data monitor view",
48
+ "title.data-report-view": "data report view",
49
+ "title.data-ooc list": "data OOC list",
50
+ "title.data-ooc view": "data OOC view",
51
+ "title.data-sample list": "data sample list",
52
+ "title.data-sample view": "data sample view",
53
+ "title.data-sensor list": "data sensor list",
54
+ "title.data-set list": "data set list",
55
+ "title.edit code": "edit code"
56
+ }
@@ -1 +1,56 @@
1
- {}
1
+ {
2
+ "button.corrected": "corrected",
3
+ "button.reviewed": "reviewed",
4
+ "field.appliance": "appliance",
5
+ "field.collected_at": "collected at",
6
+ "field.corrective-action": "corrective action",
7
+ "field.corrector": "corrector",
8
+ "field.corrected-at": "corrected at",
9
+ "field.data": "data",
10
+ "field.data-sample": "data sample",
11
+ "field.data-set": "data set",
12
+ "field.device-id": "device id",
13
+ "field.entry-role": "entry role",
14
+ "field.entry-type": "entry type",
15
+ "field.entry-view": "entry view",
16
+ "field.hidden": "hidden",
17
+ "field.latest-collected-at": "latest collected at",
18
+ "field.monitor-type": "monitor type",
19
+ "field.monitor-view": "monitor view",
20
+ "field.netmask": "network mask",
21
+ "field.next-schedule": "next schedule",
22
+ "field.oos": "out of critical limit",
23
+ "field.ooc": "out of control limit",
24
+ "field.options": "options",
25
+ "field.partition-keys": "partition keys",
26
+ "field.prev-schedule": "previous schedule",
27
+ "field.quota": "sampling #",
28
+ "field.raw-data": "raw data",
29
+ "field.ref-by": "ref. by",
30
+ "field.report-type": "report type",
31
+ "field.report-view": "report view",
32
+ "field.serial-no": "serial #",
33
+ "field.spec": "spec",
34
+ "field.state": "状态",
35
+ "field.supervisory-role": "supervisory role",
36
+ "field.tag": "tag name",
37
+ "field.unit": "unit",
38
+ "field.use-case": "use case",
39
+ "field.work-date": "work date",
40
+ "field.work-shift": "work shift",
41
+ "text.automatically collected": "automatically collected",
42
+ "text.data sample created successfully": "a data sample created successfully",
43
+ "text.data ooc updated successfully": "a data ooc updated successfully",
44
+ "text.manually collected": "manually collected",
45
+ "title.data-entry-form": "data entry form",
46
+ "title.data-item list": "data item list",
47
+ "title.data-monitor-view": "data monitor view",
48
+ "title.data-report-view": "data report view",
49
+ "title.data-ooc list": "data OOC list",
50
+ "title.data-ooc view": "data OOC view",
51
+ "title.data-sample list": "data sample list",
52
+ "title.data-sample view": "data sample view",
53
+ "title.data-sensor list": "data sensor list",
54
+ "title.data-set list": "data set list",
55
+ "title.edit code": "edit code"
56
+ }