@operato/property-editor 10.29.80 → 10.29.83
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/dist/src/ox-property-editor-number-map.d.ts +13 -1
- package/dist/src/ox-property-editor-number-map.js +48 -11
- package/dist/stories/ox-properties-dynamic-view.stories.d.ts +60 -0
- package/dist/stories/ox-properties-dynamic-view.stories.js +535 -0
- package/dist/stories/ox-properties-editor-textarea.stories.d.ts +31 -0
- package/dist/stories/ox-properties-editor-textarea.stories.js +76 -0
- package/package.json +21 -6
- package/translations/en.json +2 -1
- package/translations/es.json +2 -1
- package/translations/ko.json +2 -1
- package/translations/ms.json +2 -1
- package/translations/zh.json +2 -1
- package/CHANGELOG.md +0 -6812
- package/dist/src/index.js.map +0 -1
- package/dist/src/ox-properties-dynamic-view.js.map +0 -1
- package/dist/src/ox-property-editor-3axis.js.map +0 -1
- package/dist/src/ox-property-editor-3dish.js.map +0 -1
- package/dist/src/ox-property-editor-action.js.map +0 -1
- package/dist/src/ox-property-editor-angle.js.map +0 -1
- package/dist/src/ox-property-editor-backdrop-faces.js.map +0 -1
- package/dist/src/ox-property-editor-checkbox.js.map +0 -1
- package/dist/src/ox-property-editor-color.js.map +0 -1
- package/dist/src/ox-property-editor-crontab.js.map +0 -1
- package/dist/src/ox-property-editor-data.js.map +0 -1
- package/dist/src/ox-property-editor-date.js.map +0 -1
- package/dist/src/ox-property-editor-datetime.js.map +0 -1
- package/dist/src/ox-property-editor-description.js.map +0 -1
- package/dist/src/ox-property-editor-duration.js.map +0 -1
- package/dist/src/ox-property-editor-file.js.map +0 -1
- package/dist/src/ox-property-editor-fill-style.js.map +0 -1
- package/dist/src/ox-property-editor-gradient-colorstops.js.map +0 -1
- package/dist/src/ox-property-editor-hashtags.js.map +0 -1
- package/dist/src/ox-property-editor-image.js.map +0 -1
- package/dist/src/ox-property-editor-key-values.js.map +0 -1
- package/dist/src/ox-property-editor-legend.js.map +0 -1
- package/dist/src/ox-property-editor-mass-fraction.js.map +0 -1
- package/dist/src/ox-property-editor-month.js.map +0 -1
- package/dist/src/ox-property-editor-multiple-colors.js.map +0 -1
- package/dist/src/ox-property-editor-number-map.js.map +0 -1
- package/dist/src/ox-property-editor-number.js.map +0 -1
- package/dist/src/ox-property-editor-options.js.map +0 -1
- package/dist/src/ox-property-editor-partition-keys.js.map +0 -1
- package/dist/src/ox-property-editor-password.js.map +0 -1
- package/dist/src/ox-property-editor-range.js.map +0 -1
- package/dist/src/ox-property-editor-scene-component-id.js.map +0 -1
- package/dist/src/ox-property-editor-secret.js.map +0 -1
- package/dist/src/ox-property-editor-select.js.map +0 -1
- package/dist/src/ox-property-editor-signature.js.map +0 -1
- package/dist/src/ox-property-editor-solid-colorstops.js.map +0 -1
- package/dist/src/ox-property-editor-string.js.map +0 -1
- package/dist/src/ox-property-editor-table-column-config.js.map +0 -1
- package/dist/src/ox-property-editor-table.js.map +0 -1
- package/dist/src/ox-property-editor-textarea.js.map +0 -1
- package/dist/src/ox-property-editor-time.js.map +0 -1
- package/dist/src/ox-property-editor-unit-number.js.map +0 -1
- package/dist/src/ox-property-editor-value-map.js.map +0 -1
- package/dist/src/ox-property-editor-value-ranges.js.map +0 -1
- package/dist/src/ox-property-editor-work-shift.js.map +0 -1
- package/dist/src/ox-property-editor.js.map +0 -1
- package/dist/src/types.js.map +0 -1
- package/dist/test/date-editors.test.d.ts +0 -2
- package/dist/test/date-editors.test.js +0 -45
- package/dist/test/date-editors.test.js.map +0 -1
- package/dist/test/dynamic-view-copy.test.d.ts +0 -2
- package/dist/test/dynamic-view-copy.test.js +0 -22
- package/dist/test/dynamic-view-copy.test.js.map +0 -1
- package/dist/test/number-map.test.d.ts +0 -1
- package/dist/test/number-map.test.js +0 -117
- package/dist/test/number-map.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/test/date-editors.test.ts +0 -50
- package/test/dynamic-view-copy.test.ts +0 -27
- package/test/number-map.test.ts +0 -133
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { styles as MDTypeScaleStyles } from '@material/web/typography/md-typescale-styles.js';
|
|
3
|
+
import '../src/ox-property-editor-3axis.js';
|
|
4
|
+
import '../src/ox-property-editor-3dish.js';
|
|
5
|
+
import '../src/ox-property-editor-angle.js';
|
|
6
|
+
import '../src/ox-property-editor-checkbox.js';
|
|
7
|
+
import '../src/ox-property-editor-color.js';
|
|
8
|
+
import '../src/ox-property-editor-date.js';
|
|
9
|
+
import '../src/ox-property-editor-datetime.js';
|
|
10
|
+
import '../src/ox-property-editor-legend.js';
|
|
11
|
+
import '../src/ox-property-editor-description.js';
|
|
12
|
+
import '../src/ox-property-editor-number.js';
|
|
13
|
+
import '../src/ox-property-editor-unit-number.js';
|
|
14
|
+
import '../src/ox-property-editor-password.js';
|
|
15
|
+
import '../src/ox-property-editor-range.js';
|
|
16
|
+
import '../src/ox-property-editor-select.js';
|
|
17
|
+
import '../src/ox-property-editor-string.js';
|
|
18
|
+
import '../src/ox-property-editor-image.js';
|
|
19
|
+
import '../src/ox-property-editor-file.js';
|
|
20
|
+
import '../src/ox-property-editor-multiple-colors.js';
|
|
21
|
+
import '../src/ox-property-editor-crontab.js';
|
|
22
|
+
import '../src/ox-property-editor-work-shift.js';
|
|
23
|
+
import '../src/ox-property-editor-partition-keys.js';
|
|
24
|
+
import '../src/ox-property-editor-key-values.js';
|
|
25
|
+
import '../src/ox-property-editor-textarea.js';
|
|
26
|
+
import '../src/ox-property-editor-options.js';
|
|
27
|
+
import '../src/ox-property-editor-hashtags.js';
|
|
28
|
+
import '../src/ox-property-editor-signature.js';
|
|
29
|
+
import '../src/ox-property-editor-secret.js';
|
|
30
|
+
import '../src/ox-properties-dynamic-view.js';
|
|
31
|
+
import { OxPropertyEditor } from '../src/ox-property-editor.js';
|
|
32
|
+
// 클립보드 복사 유틸리티 함수
|
|
33
|
+
async function copyToClipboard(text) {
|
|
34
|
+
try {
|
|
35
|
+
await navigator.clipboard.writeText(text);
|
|
36
|
+
console.log('복사됨:', text);
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
console.error('복사 실패:', err);
|
|
40
|
+
// 폴백: 구식 방법
|
|
41
|
+
const textArea = document.createElement('textarea');
|
|
42
|
+
textArea.value = text;
|
|
43
|
+
document.body.appendChild(textArea);
|
|
44
|
+
textArea.select();
|
|
45
|
+
document.execCommand('copy');
|
|
46
|
+
document.body.removeChild(textArea);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// slot 주입기 함수 - 각 파라미터에 복사 버튼을 추가
|
|
50
|
+
function createActionInjector(value) {
|
|
51
|
+
return (propName, propSpec) => {
|
|
52
|
+
// 특정 타입의 파라미터에만 복사 버튼 추가 (예: string, number, password 등)
|
|
53
|
+
const copyableTypes = ['string', 'number', 'password', 'textarea', 'select', 'date', 'datetime'];
|
|
54
|
+
if (!copyableTypes.includes(propSpec.type)) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const copyIcon = document.createElement('md-icon');
|
|
58
|
+
copyIcon.textContent = 'content_copy';
|
|
59
|
+
copyIcon.style.cssText =
|
|
60
|
+
'cursor: pointer; color: var(--md-sys-color-primary); font-size: 16px; --md-icon-size: 16px;';
|
|
61
|
+
copyIcon.title = `${propName} 값 복사`;
|
|
62
|
+
copyIcon.addEventListener('click', () => {
|
|
63
|
+
const propValue = value[propName];
|
|
64
|
+
let textToCopy = '';
|
|
65
|
+
if (propValue !== undefined && propValue !== null) {
|
|
66
|
+
if (typeof propValue === 'object') {
|
|
67
|
+
textToCopy = JSON.stringify(propValue);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
textToCopy = String(propValue);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
copyToClipboard(textToCopy);
|
|
74
|
+
// 복사 성공 피드백
|
|
75
|
+
const originalText = copyIcon.textContent;
|
|
76
|
+
copyIcon.textContent = 'check';
|
|
77
|
+
copyIcon.style.color = 'var(--md-sys-color-tertiary)';
|
|
78
|
+
setTimeout(() => {
|
|
79
|
+
copyIcon.textContent = originalText;
|
|
80
|
+
copyIcon.style.color = 'var(--md-sys-color-primary)';
|
|
81
|
+
}, 1000);
|
|
82
|
+
});
|
|
83
|
+
return copyIcon;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export default {
|
|
87
|
+
title: 'Properties Dynamic View',
|
|
88
|
+
component: 'ox-properties-dynamic-view',
|
|
89
|
+
argTypes: {
|
|
90
|
+
title: { control: 'text' },
|
|
91
|
+
counter: { control: 'number' },
|
|
92
|
+
textColor: { control: 'color' }
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
OxPropertyEditor.register({
|
|
96
|
+
legend: 'ox-property-editor-legend',
|
|
97
|
+
number: 'ox-property-editor-number',
|
|
98
|
+
'unit-number': 'ox-property-editor-unit-number',
|
|
99
|
+
slider: 'ox-property-editor-range',
|
|
100
|
+
password: 'ox-property-editor-password',
|
|
101
|
+
secret: 'ox-property-editor-secret',
|
|
102
|
+
angle: 'ox-property-editor-angle',
|
|
103
|
+
string: 'ox-property-editor-string',
|
|
104
|
+
textarea: 'ox-property-editor-textarea',
|
|
105
|
+
javascript: 'ox-property-editor-textarea',
|
|
106
|
+
checkbox: 'ox-property-editor-checkbox',
|
|
107
|
+
boolean: 'ox-property-editor-checkbox',
|
|
108
|
+
select: 'ox-property-editor-select',
|
|
109
|
+
date: 'ox-property-editor-date',
|
|
110
|
+
datetime: 'ox-property-editor-datetime',
|
|
111
|
+
options: 'ox-property-editor-options',
|
|
112
|
+
data: 'ox-property-editor-data',
|
|
113
|
+
file: 'ox-property-editor-file',
|
|
114
|
+
image: 'ox-property-editor-image',
|
|
115
|
+
signature: 'ox-property-editor-signature',
|
|
116
|
+
'range-input': 'ox-property-editor-range',
|
|
117
|
+
'attachment-selector': 'ox-property-editor-attachment-selector',
|
|
118
|
+
'gltf-selector': 'ox-property-editor-attachment-selector',
|
|
119
|
+
'image-selector': 'ox-property-editor-image-selector',
|
|
120
|
+
color: 'ox-property-editor-color',
|
|
121
|
+
'solid-color-stops': 'ox-property-editor-solid-colorstops',
|
|
122
|
+
'gradient-color-stops': 'ox-property-editor-gradient-colorstops',
|
|
123
|
+
'multiple-color': 'ox-property-editor-multiple-colors',
|
|
124
|
+
map: 'ox-property-editor-value-map',
|
|
125
|
+
range: 'ox-property-editor-value-ranges',
|
|
126
|
+
graphql: 'ox-property-editor-graphql',
|
|
127
|
+
'editor-table': 'ox-property-editor-table',
|
|
128
|
+
'id-input': 'ox-property-editor-scene-component-id',
|
|
129
|
+
'font-selector': 'ox-property-editor-font-selector',
|
|
130
|
+
crontab: 'ox-property-editor-crontab',
|
|
131
|
+
shift: 'ox-property-editor-work-shift',
|
|
132
|
+
'partition-keys': 'ox-property-editor-partition-keys',
|
|
133
|
+
'key-values': 'ox-property-editor-key-values',
|
|
134
|
+
hashtags: 'ox-property-editor-hashtags',
|
|
135
|
+
'3axis': 'ox-property-editor-3axis',
|
|
136
|
+
'3dish': 'ox-property-editor-3dish',
|
|
137
|
+
description: 'ox-property-editor-description'
|
|
138
|
+
});
|
|
139
|
+
const properties = [
|
|
140
|
+
{
|
|
141
|
+
type: 'string',
|
|
142
|
+
label: 'ABC',
|
|
143
|
+
name: 'ABC',
|
|
144
|
+
quantifier: [1, 20]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: 'password',
|
|
148
|
+
label: 'PWD',
|
|
149
|
+
name: 'PWD'
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'select',
|
|
153
|
+
label: 'SLT',
|
|
154
|
+
name: 'SLT',
|
|
155
|
+
property: {
|
|
156
|
+
options: [
|
|
157
|
+
{ display: '', value: '' },
|
|
158
|
+
{ display: 'AAA', value: 'aaa' },
|
|
159
|
+
{ display: 'BBB', value: 'bbb' }
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'number',
|
|
165
|
+
label: 'N#',
|
|
166
|
+
name: 'N#'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: 'unit-number',
|
|
170
|
+
label: 'NU',
|
|
171
|
+
name: 'NU',
|
|
172
|
+
property: {
|
|
173
|
+
unit: 'K'
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: 'checkbox',
|
|
178
|
+
label: 'XV',
|
|
179
|
+
name: 'XV'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
type: 'secret',
|
|
183
|
+
label: 'Secret',
|
|
184
|
+
name: 'Secret'
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
type: 'angle',
|
|
188
|
+
label: 'Degree',
|
|
189
|
+
name: 'Degree'
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
type: 'date',
|
|
193
|
+
label: 'DD',
|
|
194
|
+
name: 'DD'
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
type: 'datetime',
|
|
198
|
+
label: 'DT',
|
|
199
|
+
name: 'DT'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
type: 'legend',
|
|
203
|
+
label: '',
|
|
204
|
+
name: 'NEW-GROUP',
|
|
205
|
+
property: {
|
|
206
|
+
label: 'NEW-GROUP'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: 'description',
|
|
211
|
+
label: '',
|
|
212
|
+
name: '',
|
|
213
|
+
property: {
|
|
214
|
+
label: `
|
|
215
|
+
This is a description of the property editor. It can be used to provide additional information about the properties being edited.
|
|
216
|
+
You can use HTML tags to format the text, such as <strong>bold</strong>, <em>italic</em>, or <a href="https://www.hatiolab.com">links</a>.
|
|
217
|
+
You can also use line breaks to separate paragraphs.
|
|
218
|
+
`
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
type: 'description',
|
|
223
|
+
label: '',
|
|
224
|
+
name: '',
|
|
225
|
+
property: {
|
|
226
|
+
label: `공정 입·출구가 ‘입출구온도차’만큼 냉각 또는 가열됨`
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
type: 'slider',
|
|
231
|
+
label: 'S',
|
|
232
|
+
name: 'S',
|
|
233
|
+
property: {
|
|
234
|
+
min: 30,
|
|
235
|
+
max: 300,
|
|
236
|
+
step: 10
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
type: 'textarea',
|
|
241
|
+
label: 'TA',
|
|
242
|
+
name: 'TA',
|
|
243
|
+
styles: {
|
|
244
|
+
flex: '1'
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
type: 'options',
|
|
249
|
+
label: 'OT',
|
|
250
|
+
name: 'OT',
|
|
251
|
+
editor: {
|
|
252
|
+
fullwidth: true
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: 'data',
|
|
257
|
+
label: 'DT',
|
|
258
|
+
name: 'DT'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
type: 'color',
|
|
262
|
+
label: 'CL',
|
|
263
|
+
name: 'CL'
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
type: 'multiple-color',
|
|
267
|
+
label: 'CLS',
|
|
268
|
+
name: 'CLS'
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
type: 'image',
|
|
272
|
+
label: 'IM',
|
|
273
|
+
name: 'IM'
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
type: 'signature',
|
|
277
|
+
label: 'ST',
|
|
278
|
+
name: 'ST'
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
type: 'file',
|
|
282
|
+
label: 'FL',
|
|
283
|
+
name: 'FL',
|
|
284
|
+
property: {
|
|
285
|
+
multiple: true
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
type: 'crontab',
|
|
290
|
+
label: 'schedule',
|
|
291
|
+
name: 'schedule'
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
type: 'shift',
|
|
295
|
+
label: 'shift',
|
|
296
|
+
name: 'shift'
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: 'key-values',
|
|
300
|
+
label: 'key-values',
|
|
301
|
+
name: 'key-values'
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
type: 'hashtags',
|
|
305
|
+
label: 'hashtags',
|
|
306
|
+
name: 'hashtags'
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
type: '3dish',
|
|
310
|
+
label: '3dish',
|
|
311
|
+
name: '3dish'
|
|
312
|
+
}
|
|
313
|
+
];
|
|
314
|
+
const value = {
|
|
315
|
+
ABC: [4, 3, 2, 1],
|
|
316
|
+
PWD: 'password123',
|
|
317
|
+
SLT: 'bbb',
|
|
318
|
+
'N#': 42,
|
|
319
|
+
NU: 1000,
|
|
320
|
+
XV: true,
|
|
321
|
+
Degree: 45,
|
|
322
|
+
DD: '2024-01-01',
|
|
323
|
+
DT: '2024-01-01T10:00:00',
|
|
324
|
+
S: 290,
|
|
325
|
+
TA: 'This is a textarea content',
|
|
326
|
+
OT: ['option1', 'option2'],
|
|
327
|
+
CL: '#FF0000',
|
|
328
|
+
IM: 'https://www.hatiolab.com/assets/img/arch-thingsboard.png',
|
|
329
|
+
ST: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAADICAYAAADGFbfiAAAAAXNSR0IArs4c6QAAE0lJREFUeF7tnUuuNjcRhp0bQSAlSMkERlxmCJgxZMAS2AlLYQnsgCXAnAnKgFkETGCSSCQSiIQEkEN35NPpi10uV5ernyNFOf//+1J+3rLftru//l5J/EAAAhCAAAQEBF4R1KEKBCAAAQhAIGEgJAEEIAABCIgIYCAibFSCAAQgAAEMhByAAAQgAAERAQwEBE2KkEAAhCAAAZCDkAAQhAAAIiAhiICBuVIAABCEAAAyEHIAABCEBARAADEWGjE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8EbmGIgDbAo2k3gs83uI//5je5WaQAC/QS2N8xzi6yPF1wB1J94tNBG4L2U0o+XKn9JKX23rTqlIaBKYO/VLJhHJWIMpBIUxSAAgVAE9nYceYA86NEgMwbSAIuiEIDA9AT2jAPTEMqKgQjBUQ0CEJiGwNFug6OqTgkxkE6AVIcABG4lkO+p/ai44b2uaWemwY5DSTIMRAkkzUAAArcQ2D7ZdxQEpjFAHgxkAFSahAAEzAhsdyDbjjGOgVJgIAPh0jQEIGBK4NPl+0nyO9d475oBegzEADJdQAACEIhIAAOJqCpjggAEIGBAAAMxgEwXEIAABCISwEAiqsqYIAABCBgQwEAMINMFBCAAgYgEMJCIqjImCEAAAgYEMBADyHQBAQhAICIBDCSiqowJAhCAgAEBDMQAMl1AAAIQiEgAA4moKmOCAAQgYEAAAzGATBcQgAAEIhLAQCKqypggAAEIGBDAQAwg0wUEIACBiAQwkIiqMiYIQAACBgQwEAPIdAEBCEAgIgEMJKKqjAkCEICAAQEMxAAyXUAAAhCISAADiagqY4IABCBgQAADMYBMFxCAAAQiEsBAIqrKmCAAAQgYEMBADCDTBQQgAIGIBDCQiKoyJghAAAIGBDAQA8h0AQEIQCAiAQwkoqqMCQIQgIABAQzEADJdQAACEIhIAAOJqCpjggAEIGBAAAMxgEwXEIAABCISwEAiqsqYIAABCBgQwEAMINMFBCAAgYgEMJCIqjImCEAAAgYEMBADyHQBAQhAICIBDCSiqowJAhCAgAEBDMQAMl1AAAIQiEjgf2ZBwOdRqQYvAAAAAElFTkSuQmCC',
|
|
330
|
+
CLS: ['yello', 'green'],
|
|
331
|
+
Secret: 'secret123',
|
|
332
|
+
schedule: '* * * * * *',
|
|
333
|
+
shift: [
|
|
334
|
+
{
|
|
335
|
+
name: 'DAY',
|
|
336
|
+
fromDate: -1,
|
|
337
|
+
fromTime: '22:00',
|
|
338
|
+
toDate: 0,
|
|
339
|
+
toTime: '06:00'
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: 'SWING',
|
|
343
|
+
fromDate: 0,
|
|
344
|
+
fromTime: '06:00',
|
|
345
|
+
toDate: 0,
|
|
346
|
+
toTime: '14:00'
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: 'NIGHT',
|
|
350
|
+
fromDate: 0,
|
|
351
|
+
fromTime: '14:00',
|
|
352
|
+
toDate: 0,
|
|
353
|
+
toTime: '22:00'
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
hashtags: ['abc', 'def'],
|
|
357
|
+
'3dish': {
|
|
358
|
+
dimension: { x: 1, y: 1, z: 1 },
|
|
359
|
+
position: { x: 1, y: 1, z: 1 },
|
|
360
|
+
rotate: { x: 1, y: 1, z: 1 },
|
|
361
|
+
scale: { x: 1, y: 1, z: 1 }
|
|
362
|
+
},
|
|
363
|
+
'key-values': { key1: 'value1', key2: 'value2' },
|
|
364
|
+
FL: ['file1.txt', 'file2.pdf']
|
|
365
|
+
};
|
|
366
|
+
const Template = () => html `
|
|
367
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
368
|
+
|
|
369
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
370
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
371
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
372
|
+
<link href="/themes/help-theme.css" rel="stylesheet" />
|
|
373
|
+
|
|
374
|
+
<link
|
|
375
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
376
|
+
rel="stylesheet"
|
|
377
|
+
/>
|
|
378
|
+
<link
|
|
379
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
380
|
+
rel="stylesheet"
|
|
381
|
+
/>
|
|
382
|
+
<link
|
|
383
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
384
|
+
rel="stylesheet"
|
|
385
|
+
/>
|
|
386
|
+
|
|
387
|
+
<style>
|
|
388
|
+
${MDTypeScaleStyles.cssText}
|
|
389
|
+
</style>
|
|
390
|
+
|
|
391
|
+
<link
|
|
392
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
393
|
+
rel="stylesheet"
|
|
394
|
+
/>
|
|
395
|
+
<link
|
|
396
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
397
|
+
rel="stylesheet"
|
|
398
|
+
/>
|
|
399
|
+
<link
|
|
400
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
401
|
+
rel="stylesheet"
|
|
402
|
+
/>
|
|
403
|
+
|
|
404
|
+
<ox-properties-dynamic-view
|
|
405
|
+
.props=${properties}
|
|
406
|
+
.value=${value}
|
|
407
|
+
.actionInjector=${createActionInjector(value)}
|
|
408
|
+
></ox-properties-dynamic-view>
|
|
409
|
+
`;
|
|
410
|
+
export const Regular = Template.bind({});
|
|
411
|
+
// 추가 스토리들
|
|
412
|
+
export const WithoutActionInjector = () => html `
|
|
413
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
414
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
415
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
416
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
417
|
+
<link href="/themes/help-theme.css" rel="stylesheet" />
|
|
418
|
+
<link
|
|
419
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
420
|
+
rel="stylesheet"
|
|
421
|
+
/>
|
|
422
|
+
|
|
423
|
+
<style>
|
|
424
|
+
${MDTypeScaleStyles.cssText}
|
|
425
|
+
</style>
|
|
426
|
+
|
|
427
|
+
<ox-properties-dynamic-view .props=${properties} .value=${value}></ox-properties-dynamic-view>
|
|
428
|
+
`;
|
|
429
|
+
// 커스텀 slot 주입기 예시
|
|
430
|
+
function createInfoActionInjector() {
|
|
431
|
+
return (propName, propSpec) => {
|
|
432
|
+
// 특정 파라미터에만 정보 아이콘 추가
|
|
433
|
+
if (propSpec.type === 'password' || propSpec.type === 'string') {
|
|
434
|
+
const infoIcon = document.createElement('md-icon');
|
|
435
|
+
infoIcon.textContent = 'info';
|
|
436
|
+
infoIcon.style.cssText =
|
|
437
|
+
'cursor: help; color: var(--md-sys-color-secondary); font-size: 16px; --md-icon-size: 16px;';
|
|
438
|
+
infoIcon.title = `${propName} 정보`;
|
|
439
|
+
infoIcon.addEventListener('click', () => {
|
|
440
|
+
alert(`${propName} 파라미터에 대한 도움말입니다.`);
|
|
441
|
+
});
|
|
442
|
+
return infoIcon;
|
|
443
|
+
}
|
|
444
|
+
return null;
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
export const WithInfoIcons = () => html `
|
|
448
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
449
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
450
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
451
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
452
|
+
<link href="/themes/help-theme.css" rel="stylesheet" />
|
|
453
|
+
<link
|
|
454
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
455
|
+
rel="stylesheet"
|
|
456
|
+
/>
|
|
457
|
+
|
|
458
|
+
<style>
|
|
459
|
+
${MDTypeScaleStyles.cssText}
|
|
460
|
+
</style>
|
|
461
|
+
|
|
462
|
+
<ox-properties-dynamic-view
|
|
463
|
+
.props=${properties}
|
|
464
|
+
.value=${value}
|
|
465
|
+
.actionInjector=${createInfoActionInjector()}
|
|
466
|
+
></ox-properties-dynamic-view>
|
|
467
|
+
`;
|
|
468
|
+
// 복합 slot 주입기 예시
|
|
469
|
+
function createComplexActionInjector(value) {
|
|
470
|
+
return (propName, propSpec) => {
|
|
471
|
+
const container = document.createElement('div');
|
|
472
|
+
container.style.cssText = 'display: flex; gap: 4px; align-items: center;';
|
|
473
|
+
// 복사 버튼
|
|
474
|
+
const copyIcon = document.createElement('md-icon');
|
|
475
|
+
copyIcon.textContent = 'content_copy';
|
|
476
|
+
copyIcon.style.cssText =
|
|
477
|
+
'cursor: pointer; color: var(--md-sys-color-primary); font-size: 16px; --md-icon-size: 16px;';
|
|
478
|
+
copyIcon.title = `${propName} 값 복사`;
|
|
479
|
+
copyIcon.addEventListener('click', () => {
|
|
480
|
+
const propValue = value[propName];
|
|
481
|
+
let textToCopy = '';
|
|
482
|
+
if (propValue !== undefined && propValue !== null) {
|
|
483
|
+
if (typeof propValue === 'object') {
|
|
484
|
+
textToCopy = JSON.stringify(propValue);
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
textToCopy = String(propValue);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
copyToClipboard(textToCopy);
|
|
491
|
+
// 복사 성공 피드백
|
|
492
|
+
const originalText = copyIcon.textContent;
|
|
493
|
+
copyIcon.textContent = 'check';
|
|
494
|
+
copyIcon.style.color = 'var(--md-sys-color-tertiary)';
|
|
495
|
+
setTimeout(() => {
|
|
496
|
+
copyIcon.textContent = originalText;
|
|
497
|
+
copyIcon.style.color = 'var(--md-sys-color-primary)';
|
|
498
|
+
}, 1000);
|
|
499
|
+
});
|
|
500
|
+
// 정보 버튼
|
|
501
|
+
const infoIcon = document.createElement('md-icon');
|
|
502
|
+
infoIcon.textContent = 'info';
|
|
503
|
+
infoIcon.style.cssText =
|
|
504
|
+
'cursor: help; color: var(--md-sys-color-secondary); font-size: 16px; --md-icon-size: 16px;';
|
|
505
|
+
infoIcon.title = `${propName} 정보`;
|
|
506
|
+
infoIcon.addEventListener('click', () => {
|
|
507
|
+
alert(`${propName} 파라미터 정보:\n타입: ${propSpec.type}\n값: ${JSON.stringify(value[propName])}`);
|
|
508
|
+
});
|
|
509
|
+
container.appendChild(copyIcon);
|
|
510
|
+
container.appendChild(infoIcon);
|
|
511
|
+
return container;
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
export const WithMultipleIcons = () => html `
|
|
515
|
+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet" />
|
|
516
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
517
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
518
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
519
|
+
<link href="/themes/help-theme.css" rel="stylesheet" />
|
|
520
|
+
<link
|
|
521
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
522
|
+
rel="stylesheet"
|
|
523
|
+
/>
|
|
524
|
+
|
|
525
|
+
<style>
|
|
526
|
+
${MDTypeScaleStyles.cssText}
|
|
527
|
+
</style>
|
|
528
|
+
|
|
529
|
+
<ox-properties-dynamic-view
|
|
530
|
+
.props=${properties}
|
|
531
|
+
.value=${value}
|
|
532
|
+
.actionInjector=${createComplexActionInjector(value)}
|
|
533
|
+
></ox-properties-dynamic-view>
|
|
534
|
+
`;
|
|
535
|
+
//# sourceMappingURL=ox-properties-dynamic-view.stories.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TemplateResult } from 'lit';
|
|
2
|
+
import '../src/ox-property-editor-textarea.js';
|
|
3
|
+
import '../src/ox-properties-dynamic-view.js';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: string;
|
|
7
|
+
argTypes: {
|
|
8
|
+
title: {
|
|
9
|
+
control: string;
|
|
10
|
+
};
|
|
11
|
+
counter: {
|
|
12
|
+
control: string;
|
|
13
|
+
};
|
|
14
|
+
textColor: {
|
|
15
|
+
control: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
20
|
+
interface Story<T> {
|
|
21
|
+
(args: T): TemplateResult;
|
|
22
|
+
args?: Partial<T>;
|
|
23
|
+
argTypes?: Record<string, unknown>;
|
|
24
|
+
}
|
|
25
|
+
interface ArgTypes {
|
|
26
|
+
title?: string;
|
|
27
|
+
counter?: number;
|
|
28
|
+
textColor?: string;
|
|
29
|
+
slot?: TemplateResult;
|
|
30
|
+
}
|
|
31
|
+
export declare const Regular: Story<ArgTypes>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../src/ox-property-editor-textarea.js';
|
|
3
|
+
import '../src/ox-properties-dynamic-view.js';
|
|
4
|
+
import { OxPropertyEditor } from '../src/ox-property-editor.js';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'TextArea',
|
|
7
|
+
component: 'ox-property-editor-textarea',
|
|
8
|
+
argTypes: {
|
|
9
|
+
title: { control: 'text' },
|
|
10
|
+
counter: { control: 'number' },
|
|
11
|
+
textColor: { control: 'color' }
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
OxPropertyEditor.register({
|
|
15
|
+
string: 'ox-property-editor-string',
|
|
16
|
+
textarea: 'ox-property-editor-textarea',
|
|
17
|
+
javascript: 'ox-property-editor-textarea'
|
|
18
|
+
});
|
|
19
|
+
const properties = [
|
|
20
|
+
{
|
|
21
|
+
type: 'string',
|
|
22
|
+
label: 'ABC',
|
|
23
|
+
name: 'ABC'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'textarea',
|
|
27
|
+
label: 'TA',
|
|
28
|
+
name: 'TA',
|
|
29
|
+
styles: {
|
|
30
|
+
flex: '1'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
];
|
|
34
|
+
const value = {
|
|
35
|
+
ABC: [4, 3, 2, 1],
|
|
36
|
+
TA: 'QWERTYUIOASDFGHJKZXCVBNM'
|
|
37
|
+
};
|
|
38
|
+
const Template = () => html `
|
|
39
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
40
|
+
|
|
41
|
+
<link
|
|
42
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
43
|
+
rel="stylesheet"
|
|
44
|
+
/>
|
|
45
|
+
<link
|
|
46
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
47
|
+
rel="stylesheet"
|
|
48
|
+
/>
|
|
49
|
+
<link
|
|
50
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
51
|
+
rel="stylesheet"
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
#container {
|
|
56
|
+
height: 600px;
|
|
57
|
+
background-color: cyan;
|
|
58
|
+
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
ox-properties-dynamic-view {
|
|
64
|
+
flex: 1;
|
|
65
|
+
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
70
|
+
|
|
71
|
+
<div id="container">
|
|
72
|
+
<ox-properties-dynamic-view .props=${properties} .value=${value}></ox-properties-dynamic-view>
|
|
73
|
+
</div>
|
|
74
|
+
`;
|
|
75
|
+
export const Regular = Template.bind({});
|
|
76
|
+
//# sourceMappingURL=ox-properties-editor-textarea.stories.js.map
|