@operato/dataset 1.5.4 → 1.5.5

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 CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [1.5.5](https://github.com/hatiolab/operato/compare/v1.5.4...v1.5.5) (2023-10-08)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * ox-data-ooc-brief-view styling ([89c20bf](https://github.com/hatiolab/operato/commit/89c20bfb13d7e35bdcd8a46b0550a93961ca3876))
12
+
13
+
14
+
6
15
  ### [1.5.4](https://github.com/hatiolab/operato/compare/v1.5.3...v1.5.4) (2023-10-08)
7
16
 
8
17
  **Note:** Version bump only for package @operato/dataset
@@ -2,8 +2,9 @@ import { __decorate } from "tslib";
2
2
  import '@operato/input/ox-input-file.js';
3
3
  import './ox-data-sample-view';
4
4
  import '@material/mwc-icon';
5
- import { css, html, LitElement } from 'lit';
5
+ import { css, html, LitElement, nothing } from 'lit';
6
6
  import { customElement, property } from 'lit/decorators.js';
7
+ import { i18next } from '@operato/i18n';
7
8
  let OxDataOocBriefView = class OxDataOocBriefView extends LitElement {
8
9
  render() {
9
10
  const { correctiveInstruction = '', correctiveAction = '', reviewer, reviewedAt, corrector, correctedAt, state } = this.dataOoc || {};
@@ -16,27 +17,28 @@ let OxDataOocBriefView = class OxDataOocBriefView extends LitElement {
16
17
  <div>DATA OOC <span field-state>${state || ''}</span></div>
17
18
  </h3>
18
19
 
19
- <div instruction>
20
- <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>
21
- <div content>${correctiveInstruction}</div>
22
- ${reviewer
23
- ? html `<div>
24
- <mwc-icon>alarm</mwc-icon> ${formatter.format(new Date(reviewedAt))}
25
- <mwc-icon>account_circle</mwc-icon>${reviewer.name}
26
- </div>`
27
- : html ``}
28
- </div>
29
-
30
- <div action>
31
- <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>
32
- <div content>${correctiveAction}</div>
33
- ${corrector
34
- ? html `<div>
35
- <mwc-icon>alarm</mwc-icon> ${formatter.format(new Date(correctedAt))}
36
- <mwc-icon>account_circle</mwc-icon>${corrector.name}
37
- </div>`
38
- : html ``}
39
- </div>
20
+ ${reviewer
21
+ ? html `
22
+ <h3 corrective>${i18next.t('label.corrective instruction')}</h3>
23
+ <p corrective-content>
24
+ <span field-info
25
+ >${formatter.format(new Date(reviewedAt))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span
26
+ >
27
+ <strong>${correctiveInstruction}</strong>
28
+ </p>
29
+ `
30
+ : nothing}
31
+ ${corrector
32
+ ? html `
33
+ <h3 corrective>${i18next.t('label.corrective action')}</h3>
34
+ <p corrective-content>
35
+ <span field-info
36
+ >${formatter.format(new Date(correctedAt))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span
37
+ >
38
+ <strong>${correctiveAction}</strong>
39
+ </p>
40
+ `
41
+ : nothing}
40
42
  `;
41
43
  }
42
44
  };
@@ -65,6 +67,10 @@ OxDataOocBriefView.styles = css `
65
67
  text-align: center;
66
68
  }
67
69
 
70
+ h3[corrective] {
71
+ font-size: 20px;
72
+ }
73
+
68
74
  mwc-icon {
69
75
  font-size: 16px;
70
76
  }
@@ -98,36 +104,35 @@ OxDataOocBriefView.styles = css `
98
104
  background-color: var(--status-info-color);
99
105
  }
100
106
 
101
- div[instruction] {
102
- display: flex;
103
- flex-direction: column;
104
-
105
- padding: var(--padding-wide);
106
- }
107
-
108
- div[instruction] div {
109
- display: flex;
107
+ [corrective-content] [field-state] {
108
+ border-radius: 2px;
109
+ background-color: var(--primary-color);
110
+ margin-left: var(--margin-default);
111
+ padding: 1px 2px;
112
+ font-size: 0.7rem;
113
+ color: var(--theme-white-color);
110
114
  }
111
-
112
- div[instruction] div[content] {
113
- display: flex;
114
- min-height: 50px;
115
+ [corrective-content] {
116
+ background-color: var(--theme-white-color);
117
+ box-shadow: var(--box-shadow);
118
+ border-radius: var(--border-radius);
119
+ margin: var(--page-description-margin);
120
+ padding: var(--padding-default);
121
+ font: var(--page-description-font);
122
+ color: var(--secondary-color);
115
123
  }
116
-
117
- div[action] {
118
- display: flex;
119
- flex-direction: column;
120
-
121
- padding: var(--padding-wide);
124
+ [corrective-content] mwc-icon {
125
+ position: relative;
126
+ top: 3px;
127
+ margin: 0 2px 0 10px;
122
128
  }
123
-
124
- div[action] div {
125
- display: flex;
129
+ [field-info] {
130
+ opacity: 0.7;
126
131
  }
127
-
128
- div[action] div[content] {
129
- display: flex;
130
- min-height: 50px;
132
+ [corrective-content] strong {
133
+ display: block;
134
+ font-weight: bold;
135
+ font-size: 0.9rem;
131
136
  }
132
137
  `;
133
138
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-data-ooc-brief-view.js","sourceRoot":"","sources":["../../src/ox-data-ooc-brief-view.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,uBAAuB,CAAA;AAC9B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAOpD,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IA+FhD,MAAM;QACJ,MAAM,EACJ,qBAAqB,GAAG,EAAE,EAC1B,gBAAgB,GAAG,EAAE,EACrB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,KAAK,EACN,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAA;QACtB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QAExG,OAAO,IAAI,CAAA;yCAC0B,IAAI,CAAC,OAAO;;0BAE3B,KAAK,IAAI,WAAW,cAAc,KAAK,IAAI,WAAW;;0CAEtC,KAAK,IAAI,EAAE;;;;;uBAK9B,qBAAqB;UAClC,QAAQ;YACR,CAAC,CAAC,IAAI,CAAA;2CAC2B,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAW,CAAC,CAAC;mDAC/B,QAAQ,CAAC,IAAI;mBAC7C;YACT,CAAC,CAAC,IAAI,CAAA,EAAE;;;;;uBAKK,gBAAgB;UAC7B,SAAS;YACT,CAAC,CAAC,IAAI,CAAA;2CAC2B,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,WAAY,CAAC,CAAC;mDAChC,SAAS,CAAC,IAAI;mBAC9C;YACT,CAAC,CAAC,IAAI,CAAA,EAAE;;KAEb,CAAA;IACH,CAAC;;AAxIM,yBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFlB,AAzFY,CAyFZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAkB;AA7FlC,kBAAkB;IAD9B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,kBAAkB,CA0I9B","sourcesContent":["import '@operato/input/ox-input-file.js'\nimport './ox-data-sample-view'\nimport '@material/mwc-icon'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { DataOoc, DataSet } from './types.js'\n\n@customElement('ox-data-ooc-brief-view')\nexport class OxDataOocBriefView extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--main-section-background-color);\n\n position: relative;\n }\n\n h3 {\n margin: var(--title-margin);\n padding-top: 12px;\n font: var(--title-font);\n color: var(--title-text-color);\n }\n\n h3[state] {\n position: absolute;\n margin: 0;\n padding: 0;\n right: 10px;\n width: 90px;\n text-align: center;\n }\n\n mwc-icon {\n font-size: 16px;\n }\n [state] mwc-icon {\n font-size: 80px;\n opacity: 0.4;\n color: var(--primary-background-color);\n }\n\n [state] div {\n position: absolute;\n top: 22px;\n left: 0;\n right: 0;\n font-size: 10px;\n color: var(--theme-white-color);\n }\n [state] [field-state] {\n display: block;\n border-radius: 4px;\n background-color: var(--primary-color);\n box-shadow: var(--box-shadow);\n margin-top: var(--margin-narrow);\n padding: 1px 3px;\n font-size: 0.8rem;\n }\n [danger] [field-state] {\n background-color: var(--status-danger-color);\n }\n [complete] [field-state] {\n background-color: var(--status-info-color);\n }\n\n div[instruction] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n div[instruction] div {\n display: flex;\n }\n\n div[instruction] div[content] {\n display: flex;\n min-height: 50px;\n }\n\n div[action] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n div[action] div {\n display: flex;\n }\n\n div[action] div[content] {\n display: flex;\n min-height: 50px;\n }\n `\n\n @property({ type: Object }) dataSet?: DataSet\n @property({ type: Object }) dataOoc?: DataOoc\n\n render() {\n const {\n correctiveInstruction = '',\n correctiveAction = '',\n reviewer,\n reviewedAt,\n corrector,\n correctedAt,\n state\n } = this.dataOoc || {}\n const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })\n\n return html`\n <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>\n\n <h3 state ?danger=${state != 'CORRECTED'} ?complete=${state == 'CORRECTED'}>\n <mwc-icon>shield</mwc-icon>\n <div>DATA OOC <span field-state>${state || ''}</span></div>\n </h3>\n\n <div instruction>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>\n <div content>${correctiveInstruction}</div>\n ${reviewer\n ? html`<div>\n <mwc-icon>alarm</mwc-icon> ${formatter.format(new Date(reviewedAt!))}\n <mwc-icon>account_circle</mwc-icon>${reviewer.name}\n </div>`\n : html``}\n </div>\n\n <div action>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>\n <div content>${correctiveAction}</div>\n ${corrector\n ? html`<div>\n <mwc-icon>alarm</mwc-icon> ${formatter.format(new Date(correctedAt!))}\n <mwc-icon>account_circle</mwc-icon>${corrector.name}\n </div>`\n : html``}\n </div>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-data-ooc-brief-view.js","sourceRoot":"","sources":["../../src/ox-data-ooc-brief-view.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,uBAAuB,CAAA;AAC9B,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAKhC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,UAAU;IAkGhD,MAAM;QACJ,MAAM,EACJ,qBAAqB,GAAG,EAAE,EAC1B,gBAAgB,GAAG,EAAE,EACrB,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,KAAK,EACN,GAAG,IAAI,CAAC,OAAO,IAAI,EAAE,CAAA;QACtB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QAExG,OAAO,IAAI,CAAA;yCAC0B,IAAI,CAAC,OAAO;;0BAE3B,KAAK,IAAI,WAAW,cAAc,KAAK,IAAI,WAAW;;0CAEtC,KAAK,IAAI,EAAE;;;QAG7C,QAAQ;YACR,CAAC,CAAC,IAAI,CAAA;6BACe,OAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC;;;mBAGnD,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,UAAW,CAAC,CAAC,uCAAuC,QAAQ,CAAC,IAAI;;wBAEtF,qBAAqB;;WAElC;YACH,CAAC,CAAC,OAAO;QACT,SAAS;YACT,CAAC,CAAC,IAAI,CAAA;6BACe,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC;;;mBAG9C,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,WAAY,CAAC,CAAC,uCAAuC,SAAS,CAAC,IAAI;;wBAExF,gBAAgB;;WAE7B;YACH,CAAC,CAAC,OAAO;KACZ,CAAA;IACH,CAAC;;AA5IM,yBAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FlB,AA5FY,CA4FZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAkB;AAhGlC,kBAAkB;IAD9B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,kBAAkB,CA8I9B","sourcesContent":["import '@operato/input/ox-input-file.js'\nimport './ox-data-sample-view'\nimport '@material/mwc-icon'\n\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nimport { DataOoc, DataSet } from './types.js'\n\n@customElement('ox-data-ooc-brief-view')\nexport class OxDataOocBriefView extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n background-color: var(--main-section-background-color);\n\n position: relative;\n }\n\n h3 {\n margin: var(--title-margin);\n padding-top: 12px;\n font: var(--title-font);\n color: var(--title-text-color);\n }\n\n h3[state] {\n position: absolute;\n margin: 0;\n padding: 0;\n right: 10px;\n width: 90px;\n text-align: center;\n }\n\n h3[corrective] {\n font-size: 20px;\n }\n\n mwc-icon {\n font-size: 16px;\n }\n [state] mwc-icon {\n font-size: 80px;\n opacity: 0.4;\n color: var(--primary-background-color);\n }\n\n [state] div {\n position: absolute;\n top: 22px;\n left: 0;\n right: 0;\n font-size: 10px;\n color: var(--theme-white-color);\n }\n [state] [field-state] {\n display: block;\n border-radius: 4px;\n background-color: var(--primary-color);\n box-shadow: var(--box-shadow);\n margin-top: var(--margin-narrow);\n padding: 1px 3px;\n font-size: 0.8rem;\n }\n [danger] [field-state] {\n background-color: var(--status-danger-color);\n }\n [complete] [field-state] {\n background-color: var(--status-info-color);\n }\n\n [corrective-content] [field-state] {\n border-radius: 2px;\n background-color: var(--primary-color);\n margin-left: var(--margin-default);\n padding: 1px 2px;\n font-size: 0.7rem;\n color: var(--theme-white-color);\n }\n [corrective-content] {\n background-color: var(--theme-white-color);\n box-shadow: var(--box-shadow);\n border-radius: var(--border-radius);\n margin: var(--page-description-margin);\n padding: var(--padding-default);\n font: var(--page-description-font);\n color: var(--secondary-color);\n }\n [corrective-content] mwc-icon {\n position: relative;\n top: 3px;\n margin: 0 2px 0 10px;\n }\n [field-info] {\n opacity: 0.7;\n }\n [corrective-content] strong {\n display: block;\n font-weight: bold;\n font-size: 0.9rem;\n }\n `\n\n @property({ type: Object }) dataSet?: DataSet\n @property({ type: Object }) dataOoc?: DataOoc\n\n render() {\n const {\n correctiveInstruction = '',\n correctiveAction = '',\n reviewer,\n reviewedAt,\n corrector,\n correctedAt,\n state\n } = this.dataOoc || {}\n const formatter = new Intl.DateTimeFormat(navigator.language, { dateStyle: 'full', timeStyle: 'short' })\n\n return html`\n <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>\n\n <h3 state ?danger=${state != 'CORRECTED'} ?complete=${state == 'CORRECTED'}>\n <mwc-icon>shield</mwc-icon>\n <div>DATA OOC <span field-state>${state || ''}</span></div>\n </h3>\n\n ${reviewer\n ? html`\n <h3 corrective>${i18next.t('label.corrective instruction')}</h3>\n <p corrective-content>\n <span field-info\n >${formatter.format(new Date(reviewedAt!))} <mwc-icon>account_circle</mwc-icon>${reviewer.name}</span\n >\n <strong>${correctiveInstruction}</strong>\n </p>\n `\n : nothing}\n ${corrector\n ? html`\n <h3 corrective>${i18next.t('label.corrective action')}</h3>\n <p corrective-content>\n <span field-info\n >${formatter.format(new Date(correctedAt!))} <mwc-icon>account_circle</mwc-icon>${corrector.name}</span\n >\n <strong>${correctiveAction}</strong>\n </p>\n `\n : nothing}\n `\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import '@operato/i18n';
2
+ import '../src/ox-data-ooc-brief-view.js';
3
+ import '../src/usecase/ccp/index.js';
4
+ import '@material/mwc-icon';
5
+ import { TemplateResult } from 'lit';
6
+ declare const _default: {
7
+ title: string;
8
+ component: string;
9
+ argTypes: {};
10
+ };
11
+ export default _default;
12
+ interface Story<T> {
13
+ (args: T): TemplateResult;
14
+ args?: Partial<T>;
15
+ argTypes?: Record<string, unknown>;
16
+ }
17
+ interface ArgTypes {
18
+ }
19
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,254 @@
1
+ import '@operato/i18n';
2
+ import '../src/ox-data-ooc-brief-view.js';
3
+ import '../src/usecase/ccp/index.js'; /* register usecase CCP */
4
+ import '@material/mwc-icon';
5
+ import { html } from 'lit';
6
+ export default {
7
+ title: 'ox-data-ooc-brief-view',
8
+ component: 'ox-data-ooc-brief-view',
9
+ argTypes: {}
10
+ };
11
+ const dataSet = {
12
+ name: 'sample',
13
+ description: 'sample description',
14
+ type: 'manual',
15
+ useCase: 'CCP',
16
+ dataItems: [
17
+ {
18
+ name: '창고 온도',
19
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
20
+ sequence: 1,
21
+ tag: 'temp',
22
+ type: 'number',
23
+ quota: 1,
24
+ active: true,
25
+ unit: '℃',
26
+ spec: {
27
+ CCP: {
28
+ criticalLimits: {
29
+ minimum: 100,
30
+ maximum: 200
31
+ },
32
+ targetLimits: {
33
+ minimum: 120,
34
+ maximum: 180
35
+ }
36
+ }
37
+ }
38
+ },
39
+ {
40
+ name: '창고 습도',
41
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
42
+ sequence: 2,
43
+ tag: 'humid',
44
+ type: 'number',
45
+ quota: 5,
46
+ active: true,
47
+ unit: '%',
48
+ spec: {
49
+ CCP: {
50
+ criticalLimits: {
51
+ minimum: 10,
52
+ maximum: 50
53
+ },
54
+ targetLimits: {
55
+ minimum: 20,
56
+ maximum: 40
57
+ }
58
+ }
59
+ }
60
+ },
61
+ {
62
+ name: '육안 검사',
63
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
64
+ sequence: 3,
65
+ tag: 'inspection',
66
+ type: 'boolean',
67
+ quota: 3,
68
+ active: true,
69
+ spec: {
70
+ CCP: {
71
+ criticalLimits: {
72
+ acceptables: true
73
+ },
74
+ targetLimits: {
75
+ acceptables: true
76
+ }
77
+ }
78
+ }
79
+ },
80
+ {
81
+ name: '품평',
82
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
83
+ sequence: 4,
84
+ tag: 'evaluation',
85
+ type: 'select',
86
+ options: {
87
+ options: [
88
+ { text: '최우수', value: '최우수' },
89
+ { text: '우수', value: '우수' },
90
+ { text: '보통', value: '보통' },
91
+ { text: '미달', value: '미달' }
92
+ ]
93
+ },
94
+ quota: 3,
95
+ active: true,
96
+ spec: {
97
+ CCP: {
98
+ criticalLimits: {
99
+ acceptables: ['최우수', '우수', '보통']
100
+ },
101
+ targetLimits: {
102
+ acceptables: ['최우수', '우수']
103
+ }
104
+ }
105
+ }
106
+ },
107
+ {
108
+ name: '코멘트',
109
+ description: '특이사항을 기록함.',
110
+ sequence: 4,
111
+ tag: 'comment',
112
+ type: 'string',
113
+ quota: 1,
114
+ active: true
115
+ },
116
+ {
117
+ name: '첨부파일',
118
+ description: '참조 첨부 파일.',
119
+ sequence: 4,
120
+ tag: 'attachment',
121
+ type: 'file',
122
+ quota: 1,
123
+ active: true
124
+ }
125
+ ]
126
+ };
127
+ var dataOoc = {
128
+ name: 'Data Sample Name',
129
+ description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
130
+ state: 'CORRECTED',
131
+ useCase: 'CCP',
132
+ data: {
133
+ temp: [1000],
134
+ humid: [20, 23, 21, 26, 27],
135
+ inspection: [true, false, true],
136
+ evaluation: ['최우수', '보통', '우수'],
137
+ comment: '이것은 코멘트입니다.'
138
+ },
139
+ spec: {
140
+ temp: {
141
+ name: '창고 온도',
142
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
143
+ spec: {
144
+ CCP: {
145
+ criticalLimits: {
146
+ minimum: 100,
147
+ maximum: 200
148
+ },
149
+ targetLimits: {
150
+ minimum: 120,
151
+ maximum: 180
152
+ }
153
+ }
154
+ }
155
+ },
156
+ humid: {
157
+ name: '창고 습도',
158
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
159
+ spec: {
160
+ CCP: {
161
+ criticalLimits: {
162
+ minimum: 10,
163
+ maximum: 50
164
+ },
165
+ targetLimits: {
166
+ minimum: 20,
167
+ maximum: 40
168
+ }
169
+ }
170
+ }
171
+ },
172
+ inspection: {
173
+ name: '육안 검사',
174
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'
175
+ },
176
+ evaluation: {
177
+ name: '품평',
178
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
179
+ spec: {
180
+ CCP: {
181
+ criticalLimits: {
182
+ acceptables: ['최우수', '우수', '보통']
183
+ },
184
+ targetLimits: {
185
+ acceptables: ['최우수', '우수']
186
+ }
187
+ }
188
+ }
189
+ },
190
+ comment: {
191
+ name: '코멘트',
192
+ description: '특이사항을 기록함.'
193
+ },
194
+ attachment: {
195
+ name: '첨부파일',
196
+ description: '참조 첨부 파일.'
197
+ }
198
+ },
199
+ collectedAt: Date.now(),
200
+ reviewer: {
201
+ name: '남상혁'
202
+ },
203
+ reviewedAt: Date.now(),
204
+ correctiveInstruction: '바지틀고서 만나오리오. 쿠투추파',
205
+ corrector: {
206
+ name: '남상혁'
207
+ },
208
+ correctedAt: Date.now(),
209
+ correctiveAction: '바지틀고서 만나오리오. 쿠투추파',
210
+ history: [
211
+ {
212
+ user: {
213
+ id: 0,
214
+ name: 'shnam'
215
+ },
216
+ state: 'ISSUED',
217
+ timestamp: Date.now()
218
+ },
219
+ {
220
+ user: {
221
+ id: 0,
222
+ name: 'shnam'
223
+ },
224
+ state: 'REVIEWED',
225
+ comment: '금일 생산한 제품은 전량 폐기합니다',
226
+ timestamp: Date.now()
227
+ },
228
+ {
229
+ user: {
230
+ id: 0,
231
+ name: 'shnam'
232
+ },
233
+ state: 'CORRECTED',
234
+ timestamp: Date.now()
235
+ }
236
+ ]
237
+ };
238
+ const Template = ({}) => html `
239
+ <link href="/themes/app-theme.css" rel="stylesheet" />
240
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
241
+ <style>
242
+ body {
243
+ }
244
+ </style>
245
+
246
+ <ox-data-ooc-brief-view
247
+ .dataSet=${dataSet}
248
+ .dataOoc=${dataOoc}
249
+ @change=${(e) => console.log(e.detail)}
250
+ ></ox-data-ooc-brief-view>
251
+ `;
252
+ export const Regular = Template.bind({});
253
+ Regular.args = {};
254
+ //# sourceMappingURL=ox-data-ooc-brief-view.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-data-ooc-brief-view.stories.js","sourceRoot":"","sources":["../../stories/ox-data-ooc-brief-view.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,kCAAkC,CAAA;AACzC,OAAO,6BAA6B,CAAA,CAAC,0BAA0B;AAC/D,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,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AO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/i18n'\nimport '../src/ox-data-ooc-brief-view.js'\nimport '../src/usecase/ccp/index.js' /* register usecase CCP */\nimport '@material/mwc-icon'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-data-ooc-brief-view',\n component: 'ox-data-ooc-brief-view',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst dataSet = {\n name: 'sample',\n description: 'sample description',\n type: 'manual',\n useCase: 'CCP',\n dataItems: [\n {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n sequence: 1,\n tag: 'temp',\n type: 'number',\n quota: 1,\n active: true,\n unit: '℃',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n }\n }\n },\n {\n name: '창고 습도',\n description: '창고 습도는 30% 이하로 유지되어야 합니다.',\n sequence: 2,\n tag: 'humid',\n type: 'number',\n quota: 5,\n active: true,\n unit: '%',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 10,\n maximum: 50\n },\n targetLimits: {\n minimum: 20,\n maximum: 40\n }\n }\n }\n },\n {\n name: '육안 검사',\n description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',\n sequence: 3,\n tag: 'inspection',\n type: 'boolean',\n quota: 3,\n active: true,\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: true\n },\n targetLimits: {\n acceptables: true\n }\n }\n }\n },\n {\n name: '품평',\n description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',\n sequence: 4,\n tag: 'evaluation',\n type: 'select',\n options: {\n options: [\n { text: '최우수', value: '최우수' },\n { text: '우수', value: '우수' },\n { text: '보통', value: '보통' },\n { text: '미달', value: '미달' }\n ]\n },\n quota: 3,\n active: true,\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: ['최우수', '우수', '보통']\n },\n targetLimits: {\n acceptables: ['최우수', '우수']\n }\n }\n }\n },\n {\n name: '코멘트',\n description: '특이사항을 기록함.',\n sequence: 4,\n tag: 'comment',\n type: 'string',\n quota: 1,\n active: true\n },\n {\n name: '첨부파일',\n description: '참조 첨부 파일.',\n sequence: 4,\n tag: 'attachment',\n type: 'file',\n quota: 1,\n active: true\n }\n ]\n}\n\nvar dataOoc = {\n name: 'Data Sample Name',\n description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',\n state: 'CORRECTED',\n useCase: 'CCP',\n data: {\n temp: [1000],\n humid: [20, 23, 21, 26, 27],\n inspection: [true, false, true],\n evaluation: ['최우수', '보통', '우수'],\n comment: '이것은 코멘트입니다.'\n },\n spec: {\n temp: {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n }\n }\n },\n humid: {\n name: '창고 습도',\n description: '창고 습도는 30% 이하로 유지되어야 합니다.',\n spec: {\n CCP: {\n criticalLimits: {\n minimum: 10,\n maximum: 50\n },\n targetLimits: {\n minimum: 20,\n maximum: 40\n }\n }\n }\n },\n inspection: {\n name: '육안 검사',\n description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.'\n },\n evaluation: {\n name: '품평',\n description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',\n spec: {\n CCP: {\n criticalLimits: {\n acceptables: ['최우수', '우수', '보통']\n },\n targetLimits: {\n acceptables: ['최우수', '우수']\n }\n }\n }\n },\n comment: {\n name: '코멘트',\n description: '특이사항을 기록함.'\n },\n attachment: {\n name: '첨부파일',\n description: '참조 첨부 파일.'\n }\n },\n collectedAt: Date.now(),\n reviewer: {\n name: '남상혁'\n },\n reviewedAt: Date.now(),\n correctiveInstruction: '바지틀고서 만나오리오. 쿠투추파',\n corrector: {\n name: '남상혁'\n },\n correctedAt: Date.now(),\n correctiveAction: '바지틀고서 만나오리오. 쿠투추파',\n history: [\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'ISSUED',\n timestamp: Date.now()\n },\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'REVIEWED',\n comment: '금일 생산한 제품은 전량 폐기합니다',\n timestamp: Date.now()\n },\n {\n user: {\n id: 0,\n name: 'shnam'\n },\n state: 'CORRECTED',\n timestamp: Date.now()\n }\n ]\n}\n\nconst Template: Story<ArgTypes> = ({}: ArgTypes) =>\n html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"https://fonts.googleapis.com/css?family=Material+Icons&display=block\" rel=\"stylesheet\" />\n <style>\n body {\n }\n </style>\n\n <ox-data-ooc-brief-view\n .dataSet=${dataSet}\n .dataOoc=${dataOoc}\n @change=${(e: CustomEvent) => console.log(e.detail)}\n ></ox-data-ooc-brief-view>\n `\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
@@ -0,0 +1,19 @@
1
+ import '@operato/i18n';
2
+ import '../src/ox-data-ooc-view.js';
3
+ import '../src/usecase/ccp';
4
+ import '@material/mwc-icon';
5
+ import { TemplateResult } from 'lit';
6
+ declare const _default: {
7
+ title: string;
8
+ component: string;
9
+ argTypes: {};
10
+ };
11
+ export default _default;
12
+ interface Story<T> {
13
+ (args: T): TemplateResult;
14
+ args?: Partial<T>;
15
+ argTypes?: Record<string, unknown>;
16
+ }
17
+ interface ArgTypes {
18
+ }
19
+ export declare const Regular: Story<ArgTypes>;