@things-factory/integration-ui 6.1.119 → 6.1.123
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/client/editors/property-editor.ts +3 -3
- package/client/editors/{things-editor-procedure-parameters.ts → things-editor-oracle-procedure.ts} +98 -19
- package/dist-client/editors/property-editor.d.ts +1 -1
- package/dist-client/editors/property-editor.js +3 -3
- package/dist-client/editors/property-editor.js.map +1 -1
- package/dist-client/editors/things-editor-oracle-procedure.d.ts +49 -0
- package/dist-client/editors/things-editor-oracle-procedure.js +380 -0
- package/dist-client/editors/things-editor-oracle-procedure.js.map +1 -0
- package/dist-client/editors/things-editor-procedure-parameters.d.ts +12 -2
- package/dist-client/editors/things-editor-procedure-parameters.js +92 -16
- package/dist-client/editors/things-editor-procedure-parameters.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/translations/en.json +3 -0
- package/translations/ja.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import './things-editor-http-headers'
|
|
5
5
|
import './things-editor-http-parameters'
|
|
6
6
|
import './things-editor-http-body'
|
|
7
|
-
import './things-editor-procedure
|
|
7
|
+
import './things-editor-oracle-procedure'
|
|
8
8
|
|
|
9
9
|
import { html } from 'lit'
|
|
10
10
|
|
|
@@ -86,13 +86,13 @@ export class PropertyEditorProcedureParameters extends OxPropertyEditor {
|
|
|
86
86
|
const steps = grid?.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name) || []
|
|
87
87
|
|
|
88
88
|
return html`
|
|
89
|
-
<things-editor-procedure
|
|
89
|
+
<things-editor-oracle-procedure
|
|
90
90
|
id="editor"
|
|
91
91
|
.value=${value}
|
|
92
92
|
.properties=${spec.property}
|
|
93
93
|
.steps=${steps}
|
|
94
94
|
fullwidth
|
|
95
|
-
></things-editor-procedure
|
|
95
|
+
></things-editor-oracle-procedure>
|
|
96
96
|
`
|
|
97
97
|
}
|
|
98
98
|
}
|
package/client/editors/{things-editor-procedure-parameters.ts → things-editor-oracle-procedure.ts}
RENAMED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import '@material/mwc-icon'
|
|
6
6
|
|
|
7
|
+
import '@operato/i18n/ox-i18n.js'
|
|
7
8
|
import { css, html } from 'lit'
|
|
8
|
-
import { customElement, property, queryAll } from 'lit/decorators.js'
|
|
9
|
+
import { customElement, property, queryAll, state } from 'lit/decorators.js'
|
|
9
10
|
|
|
10
11
|
import { OxFormField } from '@operato/input'
|
|
11
12
|
|
|
@@ -18,16 +19,22 @@ type ProcedureParameterType = {
|
|
|
18
19
|
maxSize?: number
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
type ValueType = {
|
|
23
|
+
code?: string
|
|
24
|
+
procedure?: string
|
|
25
|
+
parameters?: ProcedureParameterType[]
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
/**
|
|
22
29
|
input component for procedure-parameters
|
|
23
30
|
|
|
24
31
|
Example:
|
|
25
32
|
|
|
26
|
-
<things-editor-procedure
|
|
33
|
+
<things-editor-oracle-procedure
|
|
27
34
|
value=${map}
|
|
28
|
-
</things-editor-procedure
|
|
35
|
+
</things-editor-oracle-procedure>
|
|
29
36
|
*/
|
|
30
|
-
@customElement('things-editor-procedure
|
|
37
|
+
@customElement('things-editor-oracle-procedure')
|
|
31
38
|
export class ThingsEditorProcedureParameters extends OxFormField {
|
|
32
39
|
static styles = [
|
|
33
40
|
css`
|
|
@@ -45,6 +52,21 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
45
52
|
margin-bottom: var(--margin-narrow);
|
|
46
53
|
}
|
|
47
54
|
|
|
55
|
+
pre {
|
|
56
|
+
flex: 1;
|
|
57
|
+
background-color: #333;
|
|
58
|
+
color: white;
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 4px 6px;
|
|
61
|
+
font-size: 1.5em;
|
|
62
|
+
display: flex;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
code {
|
|
66
|
+
flex: 1;
|
|
67
|
+
text-wrap: wrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
48
70
|
button {
|
|
49
71
|
border: var(--button-border);
|
|
50
72
|
border-radius: var(--border-radius);
|
|
@@ -100,21 +122,51 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
100
122
|
`
|
|
101
123
|
]
|
|
102
124
|
|
|
103
|
-
@property({ type:
|
|
125
|
+
@property({ type: Object }) value: ValueType = {}
|
|
104
126
|
@property({ type: Array }) steps: string[] = []
|
|
105
127
|
|
|
128
|
+
@state() private procedure?: string = ''
|
|
129
|
+
@state() private parameters?: ProcedureParameterType[] = []
|
|
106
130
|
private _changingNow: boolean = false
|
|
107
131
|
|
|
132
|
+
@queryAll('[data-record]') records!: NodeListOf<HTMLElement>
|
|
133
|
+
|
|
108
134
|
firstUpdated() {
|
|
109
135
|
this.renderRoot.addEventListener('change', this._onChange.bind(this))
|
|
110
136
|
}
|
|
111
137
|
|
|
112
138
|
render() {
|
|
113
|
-
const
|
|
139
|
+
const code = this.value?.code || ''
|
|
140
|
+
const parameters = this.parameters || []
|
|
141
|
+
const procedure = this.procedure || ''
|
|
142
|
+
|
|
114
143
|
const steps = this.steps || []
|
|
115
144
|
|
|
116
145
|
return html`
|
|
117
|
-
|
|
146
|
+
<div>
|
|
147
|
+
<label><ox-i18n msgid="label.procedure-code"></ox-i18n></label>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div>
|
|
151
|
+
<pre>
|
|
152
|
+
<code>${code}</code>
|
|
153
|
+
</pre
|
|
154
|
+
>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div>
|
|
158
|
+
<label><ox-i18n msgid="label.procedure-name"></ox-i18n></label>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<div>
|
|
162
|
+
<input type="text" data-procedure .value=${procedure} />
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div>
|
|
166
|
+
<label><ox-i18n msgid="label.parameters"></ox-i18n></label>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
${parameters.map(
|
|
118
170
|
item => html`
|
|
119
171
|
<div data-record>
|
|
120
172
|
<input type="text" data-name placeholder="name" .value=${item.name} />
|
|
@@ -188,6 +240,18 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
188
240
|
`
|
|
189
241
|
}
|
|
190
242
|
|
|
243
|
+
updated(changes: any) {
|
|
244
|
+
if (changes.has('value')) {
|
|
245
|
+
/* 하위 호환성때문에, Array타입 값을 처리하도록 함. 다음 마이너 업그레이드시에 제거할 것. */
|
|
246
|
+
const value = (Array.isArray(this.value) ? { parameters: this.value } : this.value) as ValueType
|
|
247
|
+
|
|
248
|
+
const { procedure, parameters } = value
|
|
249
|
+
|
|
250
|
+
this.procedure = procedure
|
|
251
|
+
this.parameters = parameters
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
191
255
|
_onChange(e: Event) {
|
|
192
256
|
if (this._changingNow) {
|
|
193
257
|
return
|
|
@@ -197,12 +261,17 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
197
261
|
|
|
198
262
|
const input = e.target as HTMLInputElement
|
|
199
263
|
|
|
200
|
-
|
|
264
|
+
if (input.hasAttribute('data-procedure')) {
|
|
265
|
+
this.procedure = input.value
|
|
266
|
+
this._updateValue()
|
|
267
|
+
} else {
|
|
268
|
+
const record = (e.target as Element).closest('[data-record],[data-record-new]') as HTMLElement
|
|
201
269
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
270
|
+
if (record.hasAttribute('data-record')) {
|
|
271
|
+
this._build()
|
|
272
|
+
} else if (record.hasAttribute('data-record-new') && input.hasAttribute('data-type')) {
|
|
273
|
+
this._add()
|
|
274
|
+
}
|
|
206
275
|
}
|
|
207
276
|
|
|
208
277
|
this._changingNow = false
|
|
@@ -265,7 +334,19 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
265
334
|
}
|
|
266
335
|
}
|
|
267
336
|
|
|
268
|
-
this.
|
|
337
|
+
this.parameters = newmap
|
|
338
|
+
this._updateValue()
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
_updateValue() {
|
|
342
|
+
const args = (this.parameters || []).map(p => ':' + p.name).join(', ')
|
|
343
|
+
|
|
344
|
+
this.value = {
|
|
345
|
+
code: `${this.procedure}(${args});`,
|
|
346
|
+
procedure: this.procedure,
|
|
347
|
+
parameters: this.parameters
|
|
348
|
+
}
|
|
349
|
+
|
|
269
350
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
|
|
270
351
|
}
|
|
271
352
|
|
|
@@ -293,8 +374,6 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
293
374
|
this._build()
|
|
294
375
|
}
|
|
295
376
|
|
|
296
|
-
@queryAll('[data-record]') records!: NodeListOf<HTMLElement>
|
|
297
|
-
|
|
298
377
|
_up(e: MouseEvent) {
|
|
299
378
|
const record = (e.target as Element).closest('[data-record]') as HTMLElement
|
|
300
379
|
const array = Array.from(this.records)
|
|
@@ -307,7 +386,7 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
307
386
|
const deleted = array.splice(index, 1)
|
|
308
387
|
array.splice(index + 1, 0, ...deleted)
|
|
309
388
|
|
|
310
|
-
this.
|
|
389
|
+
this.parameters = array.map(record => {
|
|
311
390
|
const name = (record.querySelector('[data-name]') as HTMLInputElement).value
|
|
312
391
|
const dir = (record.querySelector('[data-dir]') as HTMLInputElement).value
|
|
313
392
|
const type = (record.querySelector('[data-type]') as HTMLInputElement).value
|
|
@@ -318,7 +397,7 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
318
397
|
return this._adjust({ name, dir, type, val, accessor, maxSize })
|
|
319
398
|
})
|
|
320
399
|
|
|
321
|
-
this.
|
|
400
|
+
this._updateValue()
|
|
322
401
|
}
|
|
323
402
|
|
|
324
403
|
_down(e: MouseEvent) {
|
|
@@ -333,7 +412,7 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
333
412
|
array.splice(index, 1)
|
|
334
413
|
array.splice(index + 1, 0, record)
|
|
335
414
|
|
|
336
|
-
this.
|
|
415
|
+
this.parameters = array.map(record => {
|
|
337
416
|
const name = (record.querySelector('[data-name]') as HTMLInputElement).value
|
|
338
417
|
const dir = (record.querySelector('[data-dir]') as HTMLInputElement).value
|
|
339
418
|
const type = (record.querySelector('[data-type]') as HTMLInputElement).value
|
|
@@ -343,6 +422,6 @@ export class ThingsEditorProcedureParameters extends OxFormField {
|
|
|
343
422
|
return this._adjust({ name, dir, type, val, maxSize })
|
|
344
423
|
})
|
|
345
424
|
|
|
346
|
-
this.
|
|
425
|
+
this._updateValue()
|
|
347
426
|
}
|
|
348
427
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './things-editor-http-headers';
|
|
2
2
|
import './things-editor-http-parameters';
|
|
3
3
|
import './things-editor-http-body';
|
|
4
|
-
import './things-editor-procedure
|
|
4
|
+
import './things-editor-oracle-procedure';
|
|
5
5
|
import { OxPropertyEditor } from '@operato/property-editor';
|
|
6
6
|
export declare class PropertyEditorScenarioStepInput extends OxPropertyEditor {
|
|
7
7
|
static get styles(): import("lit").CSSResult[];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import './things-editor-http-headers';
|
|
5
5
|
import './things-editor-http-parameters';
|
|
6
6
|
import './things-editor-http-body';
|
|
7
|
-
import './things-editor-procedure
|
|
7
|
+
import './things-editor-oracle-procedure';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { OxPropertyEditor } from '@operato/property-editor';
|
|
10
10
|
export class PropertyEditorScenarioStepInput extends OxPropertyEditor {
|
|
@@ -68,13 +68,13 @@ export class PropertyEditorProcedureParameters extends OxPropertyEditor {
|
|
|
68
68
|
const { context: grid, host: record } = spec;
|
|
69
69
|
const steps = (grid === null || grid === void 0 ? void 0 : grid.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name)) || [];
|
|
70
70
|
return html `
|
|
71
|
-
<things-editor-procedure
|
|
71
|
+
<things-editor-oracle-procedure
|
|
72
72
|
id="editor"
|
|
73
73
|
.value=${value}
|
|
74
74
|
.properties=${spec.property}
|
|
75
75
|
.steps=${steps}
|
|
76
76
|
fullwidth
|
|
77
|
-
></things-editor-procedure
|
|
77
|
+
></things-editor-oracle-procedure>
|
|
78
78
|
`;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-editor.js","sourceRoot":"","sources":["../../client/editors/property-editor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,8BAA8B,CAAA;AACrC,OAAO,iCAAiC,CAAA;AACxC,OAAO,2BAA2B,CAAA;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"property-editor.js","sourceRoot":"","sources":["../../client/editors/property-editor.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\nimport './things-editor-http-headers'\nimport './things-editor-http-parameters'\nimport './things-editor-http-body'\nimport './things-editor-oracle-procedure'\n\nimport { html } from 'lit'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nexport class PropertyEditorScenarioStepInput extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n /* context must be a datagrid(grist) instance, and host must be a record */\n const { context: grid, host: record } = spec\n const steps = grid?.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name) || []\n\n return html`\n <input id=\"editor\" .value=${value || ''} list=\"step-list\" />\n <datalist id=\"step-list\">${steps.map(id => html` <option value=${id}></option> `)}</datalist>\n `\n }\n}\n\ncustomElements.define('property-editor-scenario-step-input', PropertyEditorScenarioStepInput)\n\nexport class PropertyEditorHttpHeaders extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-http-headers id=\"editor\" .value=${value} .properties=${spec.property}></things-editor-http-headers>\n `\n }\n}\n\ncustomElements.define('property-editor-http-headers', PropertyEditorHttpHeaders)\n\nexport class PropertyEditorHttpParameters extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-http-parameters\n id=\"editor\"\n .value=${value}\n .properties=${spec.property}\n ></things-editor-http-parameters>\n `\n }\n}\n\ncustomElements.define('property-editor-http-parameters', PropertyEditorHttpParameters)\n\nexport class PropertyEditorHttpBody extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n return html`\n <things-editor-http-body id=\"editor\" .value=${value} .properties=${spec.property}></things-editor-http-body>\n `\n }\n}\n\ncustomElements.define('property-editor-http-body', PropertyEditorHttpBody)\n\nexport class PropertyEditorProcedureParameters extends OxPropertyEditor {\n static get styles() {\n return [...OxPropertyEditor.styles]\n }\n\n editorTemplate(value, spec) {\n /* context must be a datagrid(grist) instance, and host must be a record */\n const { context: grid, host: record } = spec\n const steps = grid?.dirtyData.records.filter(rec => rec.name !== record.name).map(rec => rec.name) || []\n\n return html`\n <things-editor-oracle-procedure\n id=\"editor\"\n .value=${value}\n .properties=${spec.property}\n .steps=${steps}\n fullwidth\n ></things-editor-oracle-procedure>\n `\n }\n}\n\ncustomElements.define('property-editor-procedure-parameters', PropertyEditorProcedureParameters)\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import '@material/mwc-icon';
|
|
5
|
+
import '@operato/i18n/ox-i18n.js';
|
|
6
|
+
import { OxFormField } from '@operato/input';
|
|
7
|
+
type ProcedureParameterType = {
|
|
8
|
+
name: string;
|
|
9
|
+
dir: string;
|
|
10
|
+
type: string;
|
|
11
|
+
val?: any;
|
|
12
|
+
accessor?: string;
|
|
13
|
+
maxSize?: number;
|
|
14
|
+
};
|
|
15
|
+
type ValueType = {
|
|
16
|
+
code?: string;
|
|
17
|
+
procedure?: string;
|
|
18
|
+
parameters?: ProcedureParameterType[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
input component for procedure-parameters
|
|
22
|
+
|
|
23
|
+
Example:
|
|
24
|
+
|
|
25
|
+
<things-editor-oracle-procedure
|
|
26
|
+
value=${map}
|
|
27
|
+
</things-editor-oracle-procedure>
|
|
28
|
+
*/
|
|
29
|
+
export declare class ThingsEditorProcedureParameters extends OxFormField {
|
|
30
|
+
static styles: import("lit").CSSResult[];
|
|
31
|
+
value: ValueType;
|
|
32
|
+
steps: string[];
|
|
33
|
+
private procedure?;
|
|
34
|
+
private parameters?;
|
|
35
|
+
private _changingNow;
|
|
36
|
+
records: NodeListOf<HTMLElement>;
|
|
37
|
+
firstUpdated(): void;
|
|
38
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
39
|
+
updated(changes: any): void;
|
|
40
|
+
_onChange(e: Event): void;
|
|
41
|
+
_adjust({ name, type, dir, maxSize, val, accessor }: ProcedureParameterType): ProcedureParameterType;
|
|
42
|
+
_build(includeNewRecord?: boolean): void;
|
|
43
|
+
_updateValue(): void;
|
|
44
|
+
_add(): void;
|
|
45
|
+
_delete(e: MouseEvent): void;
|
|
46
|
+
_up(e: MouseEvent): void;
|
|
47
|
+
_down(e: MouseEvent): void;
|
|
48
|
+
}
|
|
49
|
+
export {};
|