@operato/dataset 1.0.0-beta.38 → 1.0.0-beta.40

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.
Files changed (94) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js +1 -1
  3. package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js.map +1 -1
  4. package/dist/src/grist-editor/ox-popup-data-item-spec.js +3 -2
  5. package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -1
  6. package/dist/src/index.d.ts +1 -5
  7. package/dist/src/index.js +1 -5
  8. package/dist/src/index.js.map +1 -1
  9. package/dist/src/ox-data-item-spec.d.ts +2 -2
  10. package/dist/src/ox-data-item-spec.js +1 -1
  11. package/dist/src/ox-data-item-spec.js.map +1 -1
  12. package/dist/src/ox-data-ooc-view.js +1 -1
  13. package/dist/src/ox-data-ooc-view.js.map +1 -1
  14. package/dist/src/ox-data-sample-view.d.ts +1 -2
  15. package/dist/src/ox-data-sample-view.js +25 -31
  16. package/dist/src/ox-data-sample-view.js.map +1 -1
  17. package/dist/src/types.d.ts +18 -6
  18. package/dist/src/types.js.map +1 -1
  19. package/dist/src/usecase/ccp/index.d.ts +1 -0
  20. package/dist/src/usecase/ccp/index.js +8 -0
  21. package/dist/src/usecase/ccp/index.js.map +1 -0
  22. package/dist/src/usecase/ccp/ox-data-use-case-ccp.d.ts +7 -0
  23. package/dist/src/usecase/ccp/ox-data-use-case-ccp.js +102 -0
  24. package/dist/src/usecase/ccp/ox-data-use-case-ccp.js.map +1 -0
  25. package/dist/src/usecase/ccp/ox-input-ccp-limits.d.ts +44 -0
  26. package/dist/src/usecase/ccp/ox-input-ccp-limits.js +171 -0
  27. package/dist/src/usecase/ccp/ox-input-ccp-limits.js.map +1 -0
  28. package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.d.ts +5 -0
  29. package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js +24 -0
  30. package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js.map +1 -0
  31. package/dist/src/{ox-data-use-case.d.ts → usecase/ox-data-use-case.d.ts} +5 -5
  32. package/dist/src/{ox-data-use-case.js → usecase/ox-data-use-case.js} +23 -34
  33. package/dist/src/usecase/ox-data-use-case.js.map +1 -0
  34. package/dist/src/usecase/qc/index.d.ts +1 -0
  35. package/dist/src/usecase/qc/index.js +8 -0
  36. package/dist/src/usecase/qc/index.js.map +1 -0
  37. package/dist/src/usecase/qc/ox-data-use-case-qc.d.ts +7 -0
  38. package/dist/src/usecase/qc/ox-data-use-case-qc.js +55 -0
  39. package/dist/src/usecase/qc/ox-data-use-case-qc.js.map +1 -0
  40. package/dist/src/usecase/qc/ox-input-qc-limits.d.ts +44 -0
  41. package/dist/src/usecase/qc/ox-input-qc-limits.js +171 -0
  42. package/dist/src/usecase/qc/ox-input-qc-limits.js.map +1 -0
  43. package/dist/src/usecase/qc/ox-property-editor-qc-limits.d.ts +5 -0
  44. package/dist/src/usecase/qc/ox-property-editor-qc-limits.js +24 -0
  45. package/dist/src/usecase/qc/ox-property-editor-qc-limits.js.map +1 -0
  46. package/dist/stories/ox-data-entry-form.stories.d.ts +19 -0
  47. package/dist/stories/ox-data-entry-form.stories.js +152 -0
  48. package/dist/stories/ox-data-entry-form.stories.js.map +1 -0
  49. package/dist/stories/ox-data-item-spec.stories.d.ts +26 -0
  50. package/dist/stories/ox-data-item-spec.stories.js +102 -0
  51. package/dist/stories/ox-data-item-spec.stories.js.map +1 -0
  52. package/dist/stories/ox-data-ooc-view.stories.d.ts +19 -0
  53. package/dist/stories/ox-data-ooc-view.stories.js +242 -0
  54. package/dist/stories/ox-data-ooc-view.stories.js.map +1 -0
  55. package/dist/stories/ox-data-sample-view.stories.d.ts +19 -0
  56. package/dist/stories/ox-data-sample-view.stories.js +213 -0
  57. package/dist/stories/ox-data-sample-view.stories.js.map +1 -0
  58. package/dist/stories/ox-grist-editor-data-item-spec.stories.d.ts +27 -0
  59. package/dist/stories/ox-grist-editor-data-item-spec.stories.js +389 -0
  60. package/dist/stories/ox-grist-editor-data-item-spec.stories.js.map +1 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +18 -12
  63. package/src/grist-editor/ox-grist-editor-data-item-spec.ts +1 -1
  64. package/src/grist-editor/ox-popup-data-item-spec.ts +3 -2
  65. package/src/index.ts +1 -5
  66. package/src/ox-data-item-spec.ts +3 -3
  67. package/src/ox-data-ooc-view.ts +1 -1
  68. package/src/ox-data-sample-view.ts +28 -31
  69. package/src/types.ts +23 -6
  70. package/src/usecase/ccp/index.ts +10 -0
  71. package/src/usecase/ccp/ox-data-use-case-ccp.ts +147 -0
  72. package/src/usecase/ccp/ox-input-ccp-limits.ts +161 -0
  73. package/src/usecase/ccp/ox-property-editor-ccp-limits.ts +23 -0
  74. package/src/{ox-data-use-case.ts → usecase/ox-data-use-case.ts} +28 -40
  75. package/src/usecase/qc/index.ts +10 -0
  76. package/src/usecase/qc/ox-data-use-case-qc.ts +72 -0
  77. package/src/usecase/qc/ox-input-qc-limits.ts +161 -0
  78. package/src/usecase/qc/ox-property-editor-qc-limits.ts +23 -0
  79. package/stories/ox-data-entry-form.stories.ts +165 -0
  80. package/stories/ox-data-item-spec.stories.ts +121 -0
  81. package/stories/ox-data-ooc-view.stories.ts +256 -0
  82. package/stories/ox-data-sample-view.stories.ts +227 -0
  83. package/stories/ox-grist-editor-data-item-spec.stories.ts +409 -0
  84. package/translations/en.json +26 -8
  85. package/translations/ko.json +25 -7
  86. package/translations/ms.json +26 -8
  87. package/translations/zh.json +25 -7
  88. package/demo/index.html +0 -28
  89. package/demo/ox-data-entry-form.html +0 -118
  90. package/demo/ox-data-item-spec.html +0 -152
  91. package/demo/ox-data-ooc-view.html +0 -185
  92. package/demo/ox-data-sample-view.html +0 -150
  93. package/demo/ox-grist-editor-data-item-spec.html +0 -476
  94. package/dist/src/ox-data-use-case.js.map +0 -1
@@ -0,0 +1,171 @@
1
+ /**
2
+ * @license Copyright © HatioLab Inc. All rights reserved.
3
+ */
4
+ import { __decorate } from "tslib";
5
+ import { css, html, LitElement } from 'lit';
6
+ import { customElement, property, query, queryAll } from 'lit/decorators.js';
7
+ import { i18next } from '@operato/i18n';
8
+ export var DataItemType;
9
+ (function (DataItemType) {
10
+ DataItemType["number"] = "number";
11
+ DataItemType["text"] = "text";
12
+ DataItemType["boolean"] = "boolean";
13
+ DataItemType["select"] = "select";
14
+ DataItemType["file"] = "file";
15
+ })(DataItemType || (DataItemType = {}));
16
+ /**
17
+ element for QC limits
18
+
19
+ Example:
20
+
21
+ <ox-input-qc-limits
22
+ .value=${value}
23
+ .type=${type}>
24
+ </ox-input-qc-limits>
25
+ */
26
+ let OxInputQcLimits = class OxInputQcLimits extends LitElement {
27
+ constructor() {
28
+ super(...arguments);
29
+ this.value = {};
30
+ this.type = DataItemType.number;
31
+ this.options = {};
32
+ }
33
+ firstUpdated() {
34
+ this.renderRoot.addEventListener('change', this.onChange.bind(this));
35
+ }
36
+ render() {
37
+ var _a, _b;
38
+ const { minimum, maximum, acceptables = [] } = this.value || {};
39
+ return html `
40
+ <div>
41
+ ${this.type === DataItemType.number
42
+ ? html `
43
+ <label>
44
+ <div name>${i18next.t('text.minimum value')}</div>
45
+ <input type="number" name="minimum" .value=${minimum} />
46
+ <div unit>${this.unit}</div>
47
+ </select>
48
+ </label>
49
+ <label>
50
+ <div name>${i18next.t('text.maximum value')}</div>
51
+ <input type="number" name="maximum" .value=${maximum} />
52
+ <div unit>${this.unit}</div>
53
+ </label>
54
+ </div>
55
+ `
56
+ : this.type === DataItemType.select
57
+ ? html `
58
+ <!-- <div>Acceptables</div> -->
59
+ ${(_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.map(option => html `
60
+ <div>
61
+ <input type="checkbox" data-value=${option.value} ?checked=${acceptables.includes(option.value)} />
62
+ <span>${option.text}</span>
63
+ <span value>(${option.value})</span>
64
+ </div>
65
+ `)}
66
+ </div>
67
+ `
68
+ : html ` <div properties>${i18next.t('text.no properties to set')}</div> `}
69
+ </div>
70
+ `;
71
+ }
72
+ onChange(e) {
73
+ if (this.type === DataItemType.number) {
74
+ this.value = {
75
+ minimum: this.minimum.valueAsNumber,
76
+ maximum: this.maximum.valueAsNumber
77
+ };
78
+ }
79
+ else if (this.type === DataItemType.select) {
80
+ this.value = {
81
+ acceptables: Array.from(this.checkedAll).map(checked => {
82
+ const x = checked.getAttribute('data-value');
83
+ console.log(x);
84
+ return x;
85
+ })
86
+ };
87
+ }
88
+ else {
89
+ this.value = {};
90
+ }
91
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }));
92
+ }
93
+ };
94
+ OxInputQcLimits.styles = css `
95
+ :host {
96
+ display: flex;
97
+ flex-direction: column;
98
+ align-content: center;
99
+ }
100
+
101
+ label {
102
+ margin: 0 var(--margin-default) var(--margin-default) 0;
103
+ }
104
+
105
+ label div > * {
106
+ vertical-align: middle;
107
+ }
108
+
109
+ button {
110
+ width: 20px;
111
+ text-align: center;
112
+ }
113
+
114
+ div[name],
115
+ input[type='checkbox'] + span {
116
+ display: inline-block;
117
+ font: var(--label-font);
118
+ color: var(--label-color);
119
+ text-align: right;
120
+ }
121
+ input,
122
+ select {
123
+ border: var(--input-field-border);
124
+ border-radius: var(--input-field-border-radius);
125
+ padding: var(--input-field-padding);
126
+ font: var(--input-field-font);
127
+ }
128
+
129
+ input[type='checkbox'] {
130
+ width: initial;
131
+ }
132
+ input[checked] + span {
133
+ font-weight: bold;
134
+ }
135
+ [unit],
136
+ [value] {
137
+ display: inline-block;
138
+ opacity: 0.7;
139
+ font: var(--form-sublabel-font);
140
+ }
141
+ [properties] {
142
+ font: var(--input-field-font);
143
+ color: var(--label-color);
144
+ }
145
+ `;
146
+ __decorate([
147
+ property({ type: Object })
148
+ ], OxInputQcLimits.prototype, "value", void 0);
149
+ __decorate([
150
+ property({ type: String })
151
+ ], OxInputQcLimits.prototype, "type", void 0);
152
+ __decorate([
153
+ property({ type: String })
154
+ ], OxInputQcLimits.prototype, "unit", void 0);
155
+ __decorate([
156
+ property({ type: Array })
157
+ ], OxInputQcLimits.prototype, "options", void 0);
158
+ __decorate([
159
+ query('[name=minimum]')
160
+ ], OxInputQcLimits.prototype, "minimum", void 0);
161
+ __decorate([
162
+ query('[name=maximum]')
163
+ ], OxInputQcLimits.prototype, "maximum", void 0);
164
+ __decorate([
165
+ queryAll('[type=checkbox]:checked')
166
+ ], OxInputQcLimits.prototype, "checkedAll", void 0);
167
+ OxInputQcLimits = __decorate([
168
+ customElement('ox-input-qc-limits')
169
+ ], OxInputQcLimits);
170
+ export { OxInputQcLimits };
171
+ //# sourceMappingURL=ox-input-qc-limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-input-qc-limits.js","sourceRoot":"","sources":["../../../../src/usecase/qc/ox-input-qc-limits.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,6BAAa,CAAA;IACb,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACf,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB;AAQD;;;;;;;;;GASG;AAEH,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,UAAU;IAA/C;;QAsD8B,UAAK,GAAiB,EAAE,CAAA;QACxB,SAAI,GAAiB,YAAY,CAAC,MAAM,CAAA;QAEzC,YAAO,GAAoD,EAAE,CAAA;IAqE1F,CAAC;IA/DC,YAAY;QACV,IAAI,CAAC,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Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, queryAll } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\n\nexport enum DataItemType {\n number = 'number',\n text = 'text',\n boolean = 'boolean',\n select = 'select',\n file = 'file'\n}\n\nexport type QcLimitValue = {\n minimum?: number\n maximum?: number\n acceptables?: string[]\n}\n\n/**\n element for QC limits\n \n Example:\n \n <ox-input-qc-limits\n .value=${value}\n .type=${type}>\n </ox-input-qc-limits>\n */\n@customElement('ox-input-qc-limits')\nexport class OxInputQcLimits extends LitElement {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n align-content: center;\n }\n\n label {\n margin: 0 var(--margin-default) var(--margin-default) 0;\n }\n\n label div > * {\n vertical-align: middle;\n }\n\n button {\n width: 20px;\n text-align: center;\n }\n\n div[name],\n input[type='checkbox'] + span {\n display: inline-block;\n font: var(--label-font);\n color: var(--label-color);\n text-align: right;\n }\n input,\n select {\n border: var(--input-field-border);\n border-radius: var(--input-field-border-radius);\n padding: var(--input-field-padding);\n font: var(--input-field-font);\n }\n\n input[type='checkbox'] {\n width: initial;\n }\n input[checked] + span {\n font-weight: bold;\n }\n [unit],\n [value] {\n display: inline-block;\n opacity: 0.7;\n font: var(--form-sublabel-font);\n }\n [properties] {\n font: var(--input-field-font);\n color: var(--label-color);\n }\n `\n\n @property({ type: Object }) value: QcLimitValue = {}\n @property({ type: String }) type: DataItemType = DataItemType.number\n @property({ type: String }) unit?: string\n @property({ type: Array }) options: { options?: { text: string; value: string }[] } = {}\n\n @query('[name=minimum]') minimum!: HTMLInputElement\n @query('[name=maximum]') maximum!: HTMLInputElement\n @queryAll('[type=checkbox]:checked') checkedAll!: NodeListOf<HTMLInputElement>\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this.onChange.bind(this))\n }\n\n render() {\n const { minimum, maximum, acceptables = [] } = this.value || {}\n\n return html`\n <div>\n ${this.type === DataItemType.number\n ? html`\n <label>\n <div name>${i18next.t('text.minimum value')}</div>\n <input type=\"number\" name=\"minimum\" .value=${minimum} />\n <div unit>${this.unit}</div>\n </select>\n </label>\n <label>\n <div name>${i18next.t('text.maximum value')}</div>\n <input type=\"number\" name=\"maximum\" .value=${maximum} />\n <div unit>${this.unit}</div>\n </label>\n </div>\n `\n : this.type === DataItemType.select\n ? html`\n <!-- <div>Acceptables</div> -->\n ${this.options?.options?.map(\n option => html`\n <div>\n <input type=\"checkbox\" data-value=${option.value} ?checked=${acceptables.includes(option.value)} />\n <span>${option.text}</span>\n <span value>(${option.value})</span>\n </div>\n `\n )}\n </div>\n `\n : html` <div properties>${i18next.t('text.no properties to set')}</div> `}\n </div>\n `\n }\n\n private onChange(e: Event) {\n if (this.type === DataItemType.number) {\n this.value = {\n minimum: this.minimum.valueAsNumber,\n maximum: this.maximum.valueAsNumber\n }\n } else if (this.type === DataItemType.select) {\n this.value = {\n acceptables: Array.from(this.checkedAll).map(checked => {\n const x = checked.getAttribute('data-value')!\n console.log(x)\n return x\n })\n }\n } else {\n this.value = {}\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import './ox-input-qc-limits.js';
2
+ import { OxPropertyEditor } from '@operato/property-editor';
3
+ export declare class OxPropertyEditorQcLimits extends OxPropertyEditor {
4
+ editorTemplate(): import("lit-html").TemplateResult<1>;
5
+ }
@@ -0,0 +1,24 @@
1
+ import { __decorate } from "tslib";
2
+ import './ox-input-qc-limits.js';
3
+ import { html } from 'lit';
4
+ import { customElement } from 'lit/decorators.js';
5
+ import { OxPropertyEditor } from '@operato/property-editor';
6
+ let OxPropertyEditorQcLimits = class OxPropertyEditorQcLimits extends OxPropertyEditor {
7
+ editorTemplate() {
8
+ const { type, options, unit } = this.property || {};
9
+ return html `
10
+ <ox-input-qc-limits
11
+ id="editor"
12
+ .value=${this.value}
13
+ .type=${type}
14
+ .unit=${unit}
15
+ .options=${options}
16
+ ></ox-input-qc-limits>
17
+ `;
18
+ }
19
+ };
20
+ OxPropertyEditorQcLimits = __decorate([
21
+ customElement('ox-property-editor-qc-limits')
22
+ ], OxPropertyEditorQcLimits);
23
+ export { OxPropertyEditorQcLimits };
24
+ //# sourceMappingURL=ox-property-editor-qc-limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-property-editor-qc-limits.js","sourceRoot":"","sources":["../../../../src/usecase/qc/ox-property-editor-qc-limits.ts"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAG3D,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc;QACZ,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAEnD,OAAO,IAAI,CAAA;;;iBAGE,IAAI,CAAC,KAAK;gBACX,IAAI;gBACJ,IAAI;mBACD,OAAO;;KAErB,CAAA;IACH,CAAC;CACF,CAAA;AAdY,wBAAwB;IADpC,aAAa,CAAC,8BAA8B,CAAC;GACjC,wBAAwB,CAcpC;SAdY,wBAAwB","sourcesContent":["import './ox-input-qc-limits.js'\n\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\n@customElement('ox-property-editor-qc-limits')\nexport class OxPropertyEditorQcLimits extends OxPropertyEditor {\n editorTemplate() {\n const { type, options, unit } = this.property || {}\n\n return html`\n <ox-input-qc-limits\n id=\"editor\"\n .value=${this.value}\n .type=${type}\n .unit=${unit}\n .options=${options}\n ></ox-input-qc-limits>\n `\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import '@operato/i18n';
2
+ import '../src/ox-data-entry-form.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>;
@@ -0,0 +1,152 @@
1
+ import '@operato/i18n';
2
+ import '../src/ox-data-entry-form.js';
3
+ import '../src/usecase/ccp'; /* register usecase CCP */
4
+ import '@material/mwc-icon';
5
+ import { html } from 'lit';
6
+ export default {
7
+ title: 'ox-data-entry-form',
8
+ component: 'ox-data-entry-form',
9
+ argTypes: {}
10
+ };
11
+ const dataSet = {
12
+ name: 'sample',
13
+ description: 'sample description',
14
+ useCase: 'CCP',
15
+ dataItems: [
16
+ {
17
+ name: '창고 온도',
18
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
19
+ sequence: 1,
20
+ tag: 'temp',
21
+ type: 'number',
22
+ quota: 1,
23
+ active: true,
24
+ unit: '℃',
25
+ spec: {
26
+ CCP: {
27
+ criticalLimits: {
28
+ minimum: 100,
29
+ maximum: 200
30
+ },
31
+ targetLimits: {
32
+ minimum: 120,
33
+ maximum: 180
34
+ }
35
+ }
36
+ }
37
+ },
38
+ {
39
+ name: '창고 습도',
40
+ description: '창고 습도는 30% 이하로 유지되어야 합니다.',
41
+ sequence: 2,
42
+ tag: 'humid',
43
+ type: 'number',
44
+ quota: 5,
45
+ active: true,
46
+ unit: '%',
47
+ spec: {
48
+ CCP: {
49
+ criticalLimits: {
50
+ minimum: 10,
51
+ maximum: 50
52
+ },
53
+ targetLimits: {
54
+ minimum: 20,
55
+ maximum: 40
56
+ }
57
+ }
58
+ }
59
+ },
60
+ {
61
+ name: '육안 검사',
62
+ description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
63
+ sequence: 3,
64
+ tag: 'inspection',
65
+ type: 'boolean',
66
+ quota: 3,
67
+ active: true,
68
+ spec: {
69
+ CCP: {
70
+ criticalLimits: {
71
+ acceptables: true
72
+ },
73
+ targetLimits: {
74
+ acceptables: true
75
+ }
76
+ }
77
+ }
78
+ },
79
+ {
80
+ name: '품평',
81
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
82
+ sequence: 4,
83
+ tag: 'evaluation',
84
+ type: 'select',
85
+ options: {
86
+ options: [
87
+ { text: '최우수', value: '최우수' },
88
+ { text: '우수', value: '우수' },
89
+ { text: '보통', value: '보통' },
90
+ { text: '미달', value: '미달' }
91
+ ]
92
+ },
93
+ quota: 3,
94
+ active: true,
95
+ spec: {
96
+ CCP: {
97
+ criticalLimits: {
98
+ acceptables: ['최우수', '우수', '보통']
99
+ },
100
+ targetLimits: {
101
+ acceptables: ['최우수', '우수']
102
+ }
103
+ }
104
+ }
105
+ },
106
+ {
107
+ name: '코멘트',
108
+ description: '특이사항을 기록함.',
109
+ sequence: 4,
110
+ tag: 'comment',
111
+ type: 'string',
112
+ quota: 1,
113
+ active: true
114
+ },
115
+ {
116
+ name: '첨부파일',
117
+ description: '참조 첨부 파일.',
118
+ sequence: 4,
119
+ tag: 'attachment',
120
+ type: 'file',
121
+ quota: 1,
122
+ active: true
123
+ }
124
+ ]
125
+ };
126
+ var value = {
127
+ temp: 1000,
128
+ humid: [20, 23, 21, 26, 27],
129
+ inspection: [true, false, true],
130
+ evaluation: ['최우수', '보통', '우수'],
131
+ comment: '이것이 코멘트입니다.'
132
+ };
133
+ const Template = ({}) => html `
134
+ <link href="/themes/app-theme.css" rel="stylesheet" />
135
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
136
+ <style>
137
+ body {
138
+ }
139
+ </style>
140
+
141
+ <ox-data-entry-form
142
+ .dataSet=${dataSet}
143
+ .value=${value}
144
+ @change=${(e) => {
145
+ value = e.detail;
146
+ console.log('change', value);
147
+ }}
148
+ ></ox-data-entry-form>
149
+ `;
150
+ export const Regular = Template.bind({});
151
+ Regular.args = {};
152
+ //# sourceMappingURL=ox-data-entry-form.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-data-entry-form.stories.js","sourceRoot":"","sources":["../../stories/ox-data-entry-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,8BAA8B,CAAA;AACrC,OAAO,oBAAoB,CAAA,CAAC,0BAA0B;AACtD,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,KAAK;IACd,SAAS,EAAE;QACT;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,CAAC;YACX,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,GAAG;YACT,IAAI,EAAE;gBACJ,GAAG,EAAE;oBACH,cAAc,EAAE;wBACd,OAAO,EAAE,GAAG;wBACZ,OAAO,EAAE,GAAG;qBACb;oBACD,YAAY,EAAE;wBACZ,OAAO,EAAE,GAAG;wBACZ,OAAO,EAAE,GAAG;qBACb;iBACF;aACF;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE,CAAC;YACX,GAAG,EAAE,OAAO;YACZ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,GAAG;YACT,IAAI,EAAE;gB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,YAAY;YACzB,QAAQ,EAAE,CAAC;YACX,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAAI;SACb;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,CAAC;YACX,GAAG,EAAE,YAAY;YACjB,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,IAAI;SACb;KACF;CACF,CAAA;AACD,IAAI,KAAK,GAAG;IACV,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IAC3B,UAAU,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;IAC/B,UAAU,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC;IAC/B,OAAO,EAAE,aAAa;CACvB,CAAA;AAED,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CACjD,IAAI,CAAA;;;;;;;;;iBASW,OAAO;eACT,KAAK;gBACJ,CAAC,CAAc,EAAE,EAAE;IAC3B,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;IAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;AAC9B,CAAC;;GAEJ,CAAA;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/i18n'\nimport '../src/ox-data-entry-form.js'\nimport '../src/usecase/ccp' /* register usecase CCP */\nimport '@material/mwc-icon'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-data-entry-form',\n component: 'ox-data-entry-form',\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 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}\nvar value = {\n temp: 1000,\n humid: [20, 23, 21, 26, 27],\n inspection: [true, false, true],\n evaluation: ['최우수', '보통', '우수'],\n comment: '이것이 코멘트입니다.'\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-entry-form\n .dataSet=${dataSet}\n .value=${value}\n @change=${(e: CustomEvent) => {\n value = e.detail\n console.log('change', value)\n }}\n ></ox-data-entry-form>\n `\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
@@ -0,0 +1,26 @@
1
+ import '@operato/i18n';
2
+ import '@material/mwc-icon';
3
+ import '@operato/property-editor/ox-property-editor-checkbox.js';
4
+ import '@operato/property-editor/ox-property-editor-number.js';
5
+ import '@operato/property-editor/ox-property-editor-string.js';
6
+ import '@operato/property-editor/ox-properties-dynamic-view.js';
7
+ import '../src/ox-data-item-spec.js';
8
+ import '../src/usecase/ccp';
9
+ import '../src/usecase/qc';
10
+ import '../src/usecase/ccp/ox-property-editor-ccp-limits.js';
11
+ import '../src/usecase/qc/ox-property-editor-qc-limits.js';
12
+ import { TemplateResult } from 'lit';
13
+ declare const _default: {
14
+ title: string;
15
+ component: string;
16
+ argTypes: {};
17
+ };
18
+ export default _default;
19
+ interface Story<T> {
20
+ (args: T): TemplateResult;
21
+ args?: Partial<T>;
22
+ argTypes?: Record<string, unknown>;
23
+ }
24
+ interface ArgTypes {
25
+ }
26
+ export declare const Regular: Story<ArgTypes>;
@@ -0,0 +1,102 @@
1
+ import '@operato/i18n';
2
+ import '@material/mwc-icon';
3
+ import '@operato/property-editor/ox-property-editor-checkbox.js';
4
+ import '@operato/property-editor/ox-property-editor-number.js';
5
+ import '@operato/property-editor/ox-property-editor-string.js';
6
+ import '@operato/property-editor/ox-properties-dynamic-view.js';
7
+ import '../src/ox-data-item-spec.js';
8
+ import '../src/usecase/ccp'; /* register usecase CCP */
9
+ import '../src/usecase/qc'; /* register usecase QC */
10
+ import '../src/usecase/ccp/ox-property-editor-ccp-limits.js';
11
+ import '../src/usecase/qc/ox-property-editor-qc-limits.js';
12
+ import { html } from 'lit';
13
+ import { OxPropertyEditor } from '@operato/property-editor';
14
+ OxPropertyEditor.register({
15
+ number: 'ox-property-editor-number',
16
+ string: 'ox-property-editor-string',
17
+ boolean: 'ox-property-editor-checkbox',
18
+ 'ccp-limits': 'ox-property-editor-ccp-limits',
19
+ 'qc-limits': 'ox-property-editor-qc-limits'
20
+ });
21
+ export default {
22
+ title: 'ox-data-item-spec',
23
+ component: 'ox-data-item-spec',
24
+ argTypes: {}
25
+ };
26
+ const dataItemA = {
27
+ name: '창고 온도',
28
+ description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
29
+ sequence: 1,
30
+ tag: 'temp',
31
+ unit: '℃',
32
+ type: 'number',
33
+ quota: 1
34
+ };
35
+ const dataItemB = {
36
+ name: '품평',
37
+ description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
38
+ sequence: 4,
39
+ tag: 'evaluation',
40
+ type: 'select',
41
+ options: {
42
+ options: [
43
+ { text: '최우수', value: '최우수' },
44
+ { text: '우수', value: '우수' },
45
+ { text: '보통', value: '보통' },
46
+ { text: '미달', value: '미달' }
47
+ ]
48
+ },
49
+ quota: 3
50
+ };
51
+ const dataItemC = {
52
+ name: '코멘트',
53
+ description: '특이사항을 기록함.',
54
+ sequence: 4,
55
+ tag: 'comment',
56
+ type: 'string',
57
+ quota: 1
58
+ };
59
+ var specA = {
60
+ CCP: {
61
+ criticalLimits: {
62
+ minimum: 100,
63
+ maximum: 200
64
+ },
65
+ targetLimits: {
66
+ minimum: 120,
67
+ maximum: 180
68
+ }
69
+ },
70
+ QC: {
71
+ passLimits: {
72
+ minimum: 320,
73
+ maximum: 440
74
+ }
75
+ }
76
+ };
77
+ var specB = {
78
+ CCP: { accpetables: ['최우수', '우수'] },
79
+ QC: { accpetables: ['최우수', '우수'] }
80
+ };
81
+ const Template = ({}) => html `
82
+ <link href="/themes/app-theme.css" rel="stylesheet" />
83
+ <link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
84
+ <style>
85
+ body {
86
+ }
87
+ </style>
88
+
89
+ <script type="module"></script>
90
+
91
+ <ox-data-item-spec
92
+ .dataItem=${dataItemA}
93
+ .value=${specA}
94
+ @change=${(e) => {
95
+ specA = e.detail;
96
+ console.log('change', specA);
97
+ }}
98
+ ></ox-data-item-spec>
99
+ `;
100
+ export const Regular = Template.bind({});
101
+ Regular.args = {};
102
+ //# sourceMappingURL=ox-data-item-spec.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ox-data-item-spec.stories.js","sourceRoot":"","sources":["../../stories/ox-data-item-spec.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,oBAAoB,CAAA;AAC3B,OAAO,yDAAyD,CAAA;AAChE,OAAO,uDAAuD,CAAA;AAC9D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,6BAA6B,CAAA;AACpC,OAAO,oBAAoB,CAAA,CAAC,0BAA0B;AACtD,OAAO,mBAAmB,CAAA,CAAC,yBAAyB;AACpD,OAAO,qDAAqD,CAAA;AAC5D,OAAO,mDAAmD,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAE3D,gBAAgB,CAAC,QAAQ,CAAC;IACxB,MAAM,EAAE,2BAA2B;IACnC,MAAM,EAAE,2BAA2B;IACnC,OAAO,EAAE,6BAA6B;IACtC,YAAY,EAAE,+BAA+B;IAC7C,WAAW,EAAE,8BAA8B;CAC5C,CAAC,CAAA;AAEF,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE,EAAE;CAC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E;IACnC,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;CACnC,CAAA;AAED,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CACjD,IAAI,CAAA;;;;;;;;;;;kBAWY,SAAS;eACZ,KAAK;gBACJ,CAAC,CAAc,EAAE,EAAE;IAC3B,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;IAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;AAC9B,CAAC;;GAEJ,CAAA;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/i18n'\nimport '@material/mwc-icon'\nimport '@operato/property-editor/ox-property-editor-checkbox.js'\nimport '@operato/property-editor/ox-property-editor-number.js'\nimport '@operato/property-editor/ox-property-editor-string.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '../src/ox-data-item-spec.js'\nimport '../src/usecase/ccp' /* register usecase CCP */\nimport '../src/usecase/qc' /* register usecase QC */\nimport '../src/usecase/ccp/ox-property-editor-ccp-limits.js'\nimport '../src/usecase/qc/ox-property-editor-qc-limits.js'\n\nimport { html, TemplateResult } from 'lit'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nOxPropertyEditor.register({\n number: 'ox-property-editor-number',\n string: 'ox-property-editor-string',\n boolean: 'ox-property-editor-checkbox',\n 'ccp-limits': 'ox-property-editor-ccp-limits',\n 'qc-limits': 'ox-property-editor-qc-limits'\n})\n\nexport default {\n title: 'ox-data-item-spec',\n component: 'ox-data-item-spec',\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 dataItemA = {\n name: '창고 온도',\n description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',\n sequence: 1,\n tag: 'temp',\n unit: '℃',\n type: 'number',\n quota: 1\n}\n\nconst dataItemB = {\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}\n\nconst dataItemC = {\n name: '코멘트',\n description: '특이사항을 기록함.',\n sequence: 4,\n tag: 'comment',\n type: 'string',\n quota: 1\n}\n\nvar specA = {\n CCP: {\n criticalLimits: {\n minimum: 100,\n maximum: 200\n },\n targetLimits: {\n minimum: 120,\n maximum: 180\n }\n },\n QC: {\n passLimits: {\n minimum: 320,\n maximum: 440\n }\n }\n}\n\nvar specB = {\n CCP: { accpetables: ['최우수', '우수'] },\n QC: { accpetables: ['최우수', '우수'] }\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 <script type=\"module\"></script>\n\n <ox-data-item-spec\n .dataItem=${dataItemA}\n .value=${specA}\n @change=${(e: CustomEvent) => {\n specA = e.detail\n console.log('change', specA)\n }}\n ></ox-data-item-spec>\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>;