nuxt-hs-ui 2.12.6 → 4.0.0
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/README.md +202 -14
- package/dist/module.d.mts +3 -4
- package/dist/module.json +9 -6
- package/dist/module.mjs +109 -99
- package/dist/runtime/assets/flatpickr-dark.css +1 -1
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/assets/tabulator-custom.css +1 -1
- package/dist/runtime/components/form/_select/hidden-item-toggle.vue +28 -0
- package/dist/runtime/components/form/_select/hidden-item-toggle.vue.d.ts +10 -0
- package/dist/runtime/components/form/_select/item-container.vue +63 -0
- package/dist/runtime/components/form/_select/item-container.vue.d.ts +19 -0
- package/dist/runtime/components/form/_select/item-label.vue +31 -0
- package/dist/runtime/components/form/_select/item-label.vue.d.ts +13 -0
- package/dist/runtime/components/form/_select/item-row.vue +62 -0
- package/dist/runtime/components/form/_select/item-row.vue.d.ts +34 -0
- package/dist/runtime/components/form/btn-line-loading.vue +62 -81
- package/dist/runtime/components/form/btn-line-loading.vue.d.ts +14 -0
- package/dist/runtime/components/form/btn.vue +411 -494
- package/dist/runtime/components/form/btn.vue.d.ts +0 -0
- package/dist/runtime/components/form/check-box.vue +200 -315
- package/dist/runtime/components/form/check-box.vue.d.ts +71 -0
- package/dist/runtime/components/form/check-list.vue +234 -364
- package/dist/runtime/components/form/check-list.vue.d.ts +99 -0
- package/dist/runtime/components/form/combo-box.vue +340 -0
- package/dist/runtime/components/form/combo-box.vue.d.ts +69 -0
- package/dist/runtime/components/form/datepicker.vue +717 -883
- package/dist/runtime/components/form/datepicker.vue.d.ts +122 -0
- package/dist/runtime/components/form/input-frame.vue +174 -258
- package/dist/runtime/components/form/input-frame.vue.d.ts +88 -0
- package/dist/runtime/components/form/radio.vue +451 -614
- package/dist/runtime/components/form/radio.vue.d.ts +62 -0
- package/dist/runtime/components/form/select-img-icon.vue +38 -53
- package/dist/runtime/components/form/select-img-icon.vue.d.ts +15 -0
- package/dist/runtime/components/form/select.vue +733 -579
- package/dist/runtime/components/form/select.vue.d.ts +63 -0
- package/dist/runtime/components/form/text-box.vue +266 -365
- package/dist/runtime/components/form/text-box.vue.d.ts +105 -0
- package/dist/runtime/components/form/textarea.vue +338 -421
- package/dist/runtime/components/form/textarea.vue.d.ts +98 -0
- package/dist/runtime/components/form/value-box.vue +512 -641
- package/dist/runtime/components/form/value-box.vue.d.ts +128 -0
- package/dist/runtime/components/interactive/alert.vue +49 -113
- package/dist/runtime/components/interactive/alert.vue.d.ts +30 -0
- package/dist/runtime/components/interactive/block-loading.vue +91 -119
- package/dist/runtime/components/interactive/block-loading.vue.d.ts +22 -0
- package/dist/runtime/components/interactive/dialog.vue +252 -407
- package/dist/runtime/components/interactive/dialog.vue.d.ts +3 -0
- package/dist/runtime/components/interactive/modal-bg.vue +72 -82
- package/dist/runtime/components/interactive/modal-bg.vue.d.ts +11 -0
- package/dist/runtime/components/interactive/modal.vue +121 -169
- package/dist/runtime/components/interactive/modal.vue.d.ts +38 -0
- package/dist/runtime/components/interactive/toast.vue +164 -206
- package/dist/runtime/components/interactive/toast.vue.d.ts +3 -0
- package/dist/runtime/components/interactive/window-loader.vue +61 -84
- package/dist/runtime/components/interactive/window-loader.vue.d.ts +3 -0
- package/dist/runtime/components/layout/accordion-down.vue +72 -0
- package/dist/runtime/components/layout/accordion-down.vue.d.ts +26 -0
- package/dist/runtime/components/layout/accordion.vue +47 -78
- package/dist/runtime/components/layout/accordion.vue.d.ts +22 -0
- package/dist/runtime/components/layout/aspect-box.vue +29 -58
- package/dist/runtime/components/layout/aspect-box.vue.d.ts +29 -0
- package/dist/runtime/components/layout/card-item.vue +148 -193
- package/dist/runtime/components/layout/card-item.vue.d.ts +0 -0
- package/dist/runtime/components/layout/card.vue +27 -42
- package/dist/runtime/components/layout/card.vue.d.ts +23 -0
- package/dist/runtime/components/layout/container.vue +25 -40
- package/dist/runtime/components/layout/container.vue.d.ts +35 -0
- package/dist/runtime/components/layout/divider-h.vue +30 -50
- package/dist/runtime/components/layout/divider-h.vue.d.ts +18 -0
- package/dist/runtime/components/misc/breadcrumb.vue +47 -95
- package/dist/runtime/components/misc/breadcrumb.vue.d.ts +22 -0
- package/dist/runtime/components/misc/tabulator.vue +122 -190
- package/dist/runtime/components/misc/tabulator.vue.d.ts +28 -0
- package/dist/runtime/components/misc/view-name-display.vue +53 -68
- package/dist/runtime/components/misc/view-name-display.vue.d.ts +14 -0
- package/dist/runtime/components/test.vue +13 -0
- package/dist/runtime/components/test.vue.d.ts +3 -0
- package/dist/runtime/composables/test.d.ts +8 -0
- package/dist/runtime/composables/test.js +12 -0
- package/dist/runtime/composables/use-hs-dialog.d.ts +3 -20
- package/dist/runtime/composables/use-hs-dialog.js +3 -9
- package/dist/runtime/composables/use-hs-is-mobile.d.ts +8 -2
- package/dist/runtime/composables/use-hs-is-mobile.js +43 -26
- package/dist/runtime/composables/use-hs-misc.d.ts +8 -38
- package/dist/runtime/composables/use-hs-misc.js +9 -61
- package/dist/runtime/composables/use-hs-modal.js +1 -3
- package/dist/runtime/composables/use-hs-multi-lang.d.ts +23 -40
- package/dist/runtime/composables/use-hs-multi-lang.js +30 -74
- package/dist/runtime/composables/use-hs-scroll-lock.d.ts +1 -1
- package/dist/runtime/composables/use-hs-scroll-lock.js +2 -1
- package/dist/runtime/composables/use-hs-toast.d.ts +2 -2
- package/dist/runtime/composables/use-hs-toast.js +12 -4
- package/dist/runtime/composables/use-pinia.d.ts +1 -0
- package/dist/runtime/composables/use-pinia.js +2 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/types/dialog.d.ts +11 -20
- package/dist/runtime/types/dialog.js +2 -1
- package/dist/runtime/types/flatpickr/default.js +2 -23
- package/dist/runtime/types/flatpickr/ja.js +3 -37
- package/dist/runtime/types/toast.d.ts +1 -1
- package/dist/runtime/utils/dayjs.d.ts +8 -6
- package/dist/runtime/utils/dayjs.js +12 -5
- package/dist/runtime/utils/modal.d.ts +9 -28
- package/dist/runtime/utils/modal.js +7 -36
- package/dist/runtime/utils/multi-lang-object.d.ts +2 -2
- package/dist/runtime/utils/multi-lang-object.js +1 -5
- package/dist/runtime/utils/multi-lang.js +12 -22
- package/dist/runtime/utils/object.js +1 -1
- package/dist/runtime/utils/select-item.d.ts +3 -1
- package/dist/runtime/utils/stop-watch.js +6 -4
- package/dist/runtime/utils/string.js +4 -4
- package/dist/runtime/utils/tabulator.d.ts +1 -42
- package/dist/runtime/utils/tabulator.js +2 -99
- package/dist/runtime/utils/theme.d.ts +20 -20
- package/dist/runtime/utils/theme.js +180 -30
- package/dist/runtime/utils/tv.d.ts +1 -101
- package/dist/runtime/utils/tv.js +0 -22
- package/dist/types.d.mts +3 -1
- package/package.json +61 -119
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -16
- package/dist/runtime/assets/vue-select.css +0 -1
- package/dist/runtime/components/misc/view-name-display-target.vue +0 -39
- package/dist/runtime/plugin/v-select.d.ts +0 -2
- package/dist/runtime/plugin/v-select.js +0 -5
- package/dist/runtime/style.css +0 -22
- package/dist/runtime/tailwind.css +0 -78
- package/dist/runtime/types/app.config.d.ts +0 -5
- package/dist/types.d.ts +0 -1
|
@@ -1,616 +1,453 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
type
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
diff
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
()
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
);
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
})
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
</
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
:require="props.require"
|
|
452
|
-
:require-text="tx(props.requireText).value"
|
|
453
|
-
:warn="props.warn"
|
|
454
|
-
:warn-time-out="props.warnTimeOut"
|
|
455
|
-
:size="props.size"
|
|
456
|
-
:headerless="props.headerless"
|
|
457
|
-
>
|
|
458
|
-
<template v-if="slots['left-icons']" #left-icons>
|
|
459
|
-
<slot name="left-icons" :disabled="disabled" />
|
|
460
|
-
</template>
|
|
461
|
-
<template v-if="slots['right-icons']" #right-icons>
|
|
462
|
-
<slot name="right-icons" :disabled="disabled" />
|
|
463
|
-
</template>
|
|
464
|
-
<template v-if="slots.overlay" #overlay>
|
|
465
|
-
<slot name="overlay"></slot>
|
|
466
|
-
</template>
|
|
467
|
-
<div class="nac-input">
|
|
468
|
-
<div
|
|
469
|
-
class="radio-row"
|
|
470
|
-
:class="[`flex flex-wrap`, classRow]"
|
|
471
|
-
@keyup.up="onKeyup"
|
|
472
|
-
@keydown.up="onKeydown"
|
|
473
|
-
@keyup.down="onKeyup"
|
|
474
|
-
@keydown.down="onKeydown"
|
|
475
|
-
@keyup.left="onKeyup"
|
|
476
|
-
@keydown.left="onKeydown"
|
|
477
|
-
@keyup.right="onKeyup"
|
|
478
|
-
@keydown.right="onKeydown"
|
|
479
|
-
>
|
|
480
|
-
<!-- null -->
|
|
481
|
-
<div
|
|
482
|
-
v-if="!props.require && props.nullable"
|
|
483
|
-
class="radio-col"
|
|
484
|
-
:class="colClass"
|
|
485
|
-
>
|
|
486
|
-
<div
|
|
487
|
-
class="nac-radio"
|
|
488
|
-
:class="[{ disabled: props.disabled, readonly: props.readonly }]"
|
|
489
|
-
@mousedown="onMousedownItem"
|
|
490
|
-
@mouseup="onMouseupItem(inputElementNull)"
|
|
491
|
-
@click="setValue(null)"
|
|
492
|
-
>
|
|
493
|
-
<input
|
|
494
|
-
:id="`radio${uid}-null`"
|
|
495
|
-
:ref="(e:any) => (inputElementNull = e)"
|
|
496
|
-
type="radio"
|
|
497
|
-
:name="`radio${uid}`"
|
|
498
|
-
:tabindex="props.tabindex"
|
|
499
|
-
:value="null"
|
|
500
|
-
:disabled="props.disabled"
|
|
501
|
-
:readonly="props.readonly"
|
|
502
|
-
@focus="onFocus(null)"
|
|
503
|
-
@blur="onBlur(null)"
|
|
504
|
-
/>
|
|
505
|
-
<div
|
|
506
|
-
class="radio-mark"
|
|
507
|
-
:class="[{ checked: selectedId === null }]"
|
|
508
|
-
></div>
|
|
509
|
-
<div class="radio-label">
|
|
510
|
-
<SelectImgIcon
|
|
511
|
-
v-if="props.image"
|
|
512
|
-
class="flex-none"
|
|
513
|
-
:img-url="null"
|
|
514
|
-
:class-img="props.classImg"
|
|
515
|
-
:class-img-tag="props.classImgTag"
|
|
516
|
-
/>
|
|
517
|
-
<div class="radio-text truncate">{{ tx(nullText) }}</div>
|
|
518
|
-
</div>
|
|
519
|
-
</div>
|
|
520
|
-
</div>
|
|
521
|
-
<!-- list -->
|
|
522
|
-
<template v-for="(row, index) in displayList" :key="index">
|
|
523
|
-
<div
|
|
524
|
-
v-if="row.id !== null"
|
|
525
|
-
class="radio-col"
|
|
526
|
-
:class="colClass"
|
|
527
|
-
@mousedown="onMousedownItem"
|
|
528
|
-
@mouseup="onMouseupItem(row.elm)"
|
|
529
|
-
@click="setValue(row)"
|
|
530
|
-
>
|
|
531
|
-
<div
|
|
532
|
-
class="nac-radio"
|
|
533
|
-
:class="[{ disabled: props.disabled, readonly: props.readonly }]"
|
|
534
|
-
>
|
|
535
|
-
<input
|
|
536
|
-
:id="`radio${uid}-${row.id}`"
|
|
537
|
-
:ref="(e:any) => (row.elm = e)"
|
|
538
|
-
type="radio"
|
|
539
|
-
class=""
|
|
540
|
-
:name="`radio${uid}`"
|
|
541
|
-
:tabindex="props.tabindex"
|
|
542
|
-
:value="row.id"
|
|
543
|
-
:disabled="props.disabled"
|
|
544
|
-
:readonly="props.readonly"
|
|
545
|
-
@focus="onFocus(index)"
|
|
546
|
-
@blur="onBlur(index)"
|
|
547
|
-
/>
|
|
548
|
-
<div
|
|
549
|
-
class="radio-mark"
|
|
550
|
-
:class="[{ checked: selectedId === row.id }]"
|
|
551
|
-
></div>
|
|
552
|
-
<div
|
|
553
|
-
class="radio-label"
|
|
554
|
-
:class="{
|
|
555
|
-
isDeleted: row.deleted === true,
|
|
556
|
-
isHidden: row.hidden === false,
|
|
557
|
-
}"
|
|
558
|
-
>
|
|
559
|
-
<SelectImgIcon
|
|
560
|
-
v-if="props.image"
|
|
561
|
-
class="flex-none"
|
|
562
|
-
:img-url="row.imgUrl"
|
|
563
|
-
:class-img="props.classImg"
|
|
564
|
-
:class-img-tag="props.classImgTag"
|
|
565
|
-
/>
|
|
566
|
-
<div class="radio-text truncate">
|
|
567
|
-
{{ tx(row.text) }}
|
|
568
|
-
<span
|
|
569
|
-
v-if="row.deleted"
|
|
570
|
-
class="text-error text-[0.7em] leading-[1em]"
|
|
571
|
-
>
|
|
572
|
-
{{ tx({ ja: "削除済", en: "Deleted" }) }}
|
|
573
|
-
</span>
|
|
574
|
-
<span
|
|
575
|
-
v-if="row.hidden"
|
|
576
|
-
class="text-error text-[0.7em] leading-[1em]"
|
|
577
|
-
>
|
|
578
|
-
{{ tx({ ja: "非表示", en: "Hidden" }) }}
|
|
579
|
-
</span>
|
|
580
|
-
</div>
|
|
581
|
-
</div>
|
|
582
|
-
</div>
|
|
583
|
-
</div>
|
|
584
|
-
</template>
|
|
585
|
-
</div>
|
|
586
|
-
<template v-if="includeHidden">
|
|
587
|
-
<Btn
|
|
588
|
-
theme="accent1"
|
|
589
|
-
variant="outlined"
|
|
590
|
-
class="w-full mb-1"
|
|
591
|
-
size="xs"
|
|
592
|
-
@click="isShowHidden = !isShowHidden"
|
|
593
|
-
>
|
|
594
|
-
<span class="me-1">Hidden options</span>
|
|
595
|
-
<i
|
|
596
|
-
class="fas"
|
|
597
|
-
:class="[
|
|
598
|
-
!isShowHidden ? 'fa-eye-slash text-error' : 'fa-eye text-success',
|
|
599
|
-
]"
|
|
600
|
-
></i>
|
|
601
|
-
<i class="fas fa-caret-right mx-1"></i>
|
|
602
|
-
<i
|
|
603
|
-
class="fas"
|
|
604
|
-
:class="[
|
|
605
|
-
isShowHidden ? 'fa-eye-slash text-error' : 'fa-eye text-success',
|
|
606
|
-
]"
|
|
607
|
-
></i>
|
|
608
|
-
</Btn>
|
|
609
|
-
</template>
|
|
610
|
-
</div>
|
|
611
|
-
</InputFrame>
|
|
612
|
-
</template>
|
|
613
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import { reactive, ref, watch, computed, useId, nextTick } from "#imports";
|
|
4
|
+
import { ClassTypeToString } from "../../utils/class-style";
|
|
5
|
+
import { useDisplayList } from "../../utils/select";
|
|
6
|
+
import { ObjectCopy } from "../../utils/object";
|
|
7
|
+
import { useHsFocus } from "../../composables/use-hs-focus";
|
|
8
|
+
import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
|
|
9
|
+
import { useHsPinia } from "../../composables/use-pinia";
|
|
10
|
+
import { useHsMisc } from "../../composables/use-hs-misc";
|
|
11
|
+
import InputFrame from "./input-frame.vue";
|
|
12
|
+
import SelectImgIcon from "./select-img-icon.vue";
|
|
13
|
+
import Btn from "../form/btn.vue";
|
|
14
|
+
const hsFocus = useHsFocus(useHsPinia());
|
|
15
|
+
const multiLang = useHsMultiLang(useHsPinia());
|
|
16
|
+
const hsMisc = useHsMisc(useHsPinia());
|
|
17
|
+
const tx = multiLang.tx;
|
|
18
|
+
const gt = multiLang.gt;
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
list: { type: Array, required: true },
|
|
21
|
+
order: { type: Boolean, required: false, default: false },
|
|
22
|
+
image: { type: Boolean, required: false, default: false },
|
|
23
|
+
loading: { type: Boolean, required: false, default: false },
|
|
24
|
+
nullText: { type: [String, Object], required: false, default: () => ({ ja: "\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044", en: "Select..." }) },
|
|
25
|
+
classCol: { type: [String, Object, Array], required: false, default: "" },
|
|
26
|
+
classRow: { type: [String, Object, Array], required: false, default: "" },
|
|
27
|
+
classImg: { type: [String, Object, Array], required: false, default: "" },
|
|
28
|
+
classImgTag: { type: [String, Object, Array], required: false, default: "" },
|
|
29
|
+
nullable: { type: Boolean, required: false, default: false },
|
|
30
|
+
data: { type: null, required: true },
|
|
31
|
+
diff: { type: null, required: false, default: void 0 },
|
|
32
|
+
tabindex: { type: null, required: false, default: void 0 },
|
|
33
|
+
class: { type: [String, Object, Array], required: false, default: "" },
|
|
34
|
+
classHeader: { type: [String, Object, Array], required: false, default: "" },
|
|
35
|
+
classInput: { type: [String, Object, Array], required: false, default: "" },
|
|
36
|
+
focusColor: { type: String, required: false, default: "shadow-[inset_0px_0px_1px_2px_#0d8ee4]" },
|
|
37
|
+
changeColor: { type: String, required: false, default: "shadow-[inset_0px_0px_1px_2px_#fd9831be]" },
|
|
38
|
+
error: { type: Boolean, required: false, default: false },
|
|
39
|
+
errorColor: { type: String, required: false, default: "shadow-[inset_0px_0px_1px_2px_#d80000dc]" },
|
|
40
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
41
|
+
disabledColor: { type: String, required: false, default: "" },
|
|
42
|
+
readonly: { type: Boolean, required: false, default: false },
|
|
43
|
+
headerless: { type: Boolean, required: false, default: false },
|
|
44
|
+
label: { type: [String, Object], required: false, default: "" },
|
|
45
|
+
require: { type: Boolean, required: false, default: false },
|
|
46
|
+
requireText: { type: [String, Object], required: false, default: () => ({ ja: "\u5FC5\u9808", en: "Required" }) },
|
|
47
|
+
warn: { type: String, required: false, default: "" },
|
|
48
|
+
warnTimeOut: { type: Number, required: false, default: 3e3 },
|
|
49
|
+
size: { type: String, required: false, default: "m" }
|
|
50
|
+
});
|
|
51
|
+
const emit = defineEmits(["ref", "focus", "blur", "update:data", "value-change", "keydown", "keyup"]);
|
|
52
|
+
const slots = defineSlots();
|
|
53
|
+
const uid = useId();
|
|
54
|
+
const isChangeData = computed(() => {
|
|
55
|
+
if (props.diff === void 0) return false;
|
|
56
|
+
if (props.diff !== props.data) return true;
|
|
57
|
+
return false;
|
|
58
|
+
});
|
|
59
|
+
const displayData = ref(null);
|
|
60
|
+
watch(displayData, (v) => {
|
|
61
|
+
const before = props.data;
|
|
62
|
+
if (v === null) {
|
|
63
|
+
emit("update:data", null);
|
|
64
|
+
emit("value-change", null, before);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (v.id === null) {
|
|
68
|
+
displayData.value = null;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
emit("update:data", v.id);
|
|
72
|
+
emit("value-change", v.id, before);
|
|
73
|
+
});
|
|
74
|
+
const selectedId = computed(() => {
|
|
75
|
+
if (displayData.value === null) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
return displayData.value.id;
|
|
79
|
+
});
|
|
80
|
+
const unKnownSelected = ref(false);
|
|
81
|
+
const unKnownData = computed(() => {
|
|
82
|
+
if (props.data === null) return null;
|
|
83
|
+
return {
|
|
84
|
+
id: props.data,
|
|
85
|
+
text: {
|
|
86
|
+
ja: `\u7121\u52B9\u306A\u5024\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u3059 (ID=${props.data})`,
|
|
87
|
+
en: `Invalid value selected (ID=${props.data})`
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const isShowHidden = ref(false);
|
|
92
|
+
const includeHidden = computed(() => {
|
|
93
|
+
return props.list.filter((row) => row.hidden).length > 0;
|
|
94
|
+
});
|
|
95
|
+
const displayList = ref([]);
|
|
96
|
+
const baseList = computed(() => {
|
|
97
|
+
return ObjectCopy(props.list).map((row) => {
|
|
98
|
+
return { ...row, text: gt(row.text) };
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
const diffDisplayText = computed(() => {
|
|
102
|
+
if (!props.diff) return "";
|
|
103
|
+
const data = baseList.value.find((row) => row.id === props.diff) || null;
|
|
104
|
+
if (!data) return props.nullText;
|
|
105
|
+
return tx(data.text).value;
|
|
106
|
+
});
|
|
107
|
+
const setDisplayList = () => {
|
|
108
|
+
displayList.value = useDisplayList({
|
|
109
|
+
list: baseList.value,
|
|
110
|
+
id: props.data,
|
|
111
|
+
order: props.order,
|
|
112
|
+
unKnownData: unKnownData.value,
|
|
113
|
+
unKnownSelected: unKnownSelected.value,
|
|
114
|
+
isShowHidden: isShowHidden.value,
|
|
115
|
+
require: props.require || !props.nullable,
|
|
116
|
+
nullText: tx(props.nullText).value
|
|
117
|
+
}).map((row, index) => {
|
|
118
|
+
return {
|
|
119
|
+
...row,
|
|
120
|
+
elm: null,
|
|
121
|
+
activate: false,
|
|
122
|
+
i: index
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
watch(
|
|
127
|
+
() => props.list,
|
|
128
|
+
() => {
|
|
129
|
+
nextTick(() => {
|
|
130
|
+
setDisplayList();
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
{ deep: true }
|
|
134
|
+
);
|
|
135
|
+
watch(
|
|
136
|
+
() => [
|
|
137
|
+
props.data,
|
|
138
|
+
isShowHidden.value,
|
|
139
|
+
props.require,
|
|
140
|
+
props.nullable,
|
|
141
|
+
props.nullText,
|
|
142
|
+
unKnownSelected.value,
|
|
143
|
+
displayData.value,
|
|
144
|
+
multiLang.lang
|
|
145
|
+
],
|
|
146
|
+
() => {
|
|
147
|
+
nextTick(() => {
|
|
148
|
+
setDisplayList();
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
{ immediate: true }
|
|
152
|
+
);
|
|
153
|
+
const checkData = (id) => {
|
|
154
|
+
const ret = baseList.value.find((row) => row.id === id);
|
|
155
|
+
if (ret === void 0) {
|
|
156
|
+
unKnownSelected.value = true;
|
|
157
|
+
displayData.value = unKnownData.value;
|
|
158
|
+
} else {
|
|
159
|
+
unKnownSelected.value = false;
|
|
160
|
+
displayData.value = ret;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
checkData(props.data);
|
|
164
|
+
watch(
|
|
165
|
+
() => props.data,
|
|
166
|
+
(id) => {
|
|
167
|
+
checkData(id);
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
watch(baseList, () => {
|
|
171
|
+
nextTick(() => {
|
|
172
|
+
checkData(props.data);
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
const focusState = reactive({
|
|
176
|
+
isActivate: false,
|
|
177
|
+
isMmousedownItem: false,
|
|
178
|
+
isNullActivate: false,
|
|
179
|
+
isKeyDown: false
|
|
180
|
+
});
|
|
181
|
+
const computedActivate = computed(() => {
|
|
182
|
+
if (props.disabled === true) return false;
|
|
183
|
+
if (hsFocus.state.id !== uid) return false;
|
|
184
|
+
if (focusState.isActivate) return true;
|
|
185
|
+
if (focusState.isMmousedownItem) return true;
|
|
186
|
+
if (focusState.isNullActivate) return true;
|
|
187
|
+
if (focusState.isKeyDown) return true;
|
|
188
|
+
if (displayList.value.filter((row) => row.activate === true).length === 1) return true;
|
|
189
|
+
return false;
|
|
190
|
+
});
|
|
191
|
+
const onFocus = (index) => {
|
|
192
|
+
if (props.disabled) return;
|
|
193
|
+
if (props.readonly) return;
|
|
194
|
+
focusState.isActivate = true;
|
|
195
|
+
if (index === null) {
|
|
196
|
+
focusState.isNullActivate = true;
|
|
197
|
+
} else if (index in displayList.value && displayList.value[index]) {
|
|
198
|
+
displayList.value[index].activate = true;
|
|
199
|
+
}
|
|
200
|
+
hsFocus.state.id = uid;
|
|
201
|
+
};
|
|
202
|
+
const onBlur = (index) => {
|
|
203
|
+
if (props.disabled) return;
|
|
204
|
+
if (props.readonly) return;
|
|
205
|
+
if (index === null) {
|
|
206
|
+
focusState.isNullActivate = false;
|
|
207
|
+
} else if (index in displayList.value && displayList.value[index]) {
|
|
208
|
+
displayList.value[index].activate = false;
|
|
209
|
+
}
|
|
210
|
+
setTimeout(() => {
|
|
211
|
+
focusState.isActivate = false;
|
|
212
|
+
}, 5);
|
|
213
|
+
};
|
|
214
|
+
const colClass = computed(() => {
|
|
215
|
+
return twMerge(
|
|
216
|
+
//
|
|
217
|
+
"col-auto",
|
|
218
|
+
ClassTypeToString(props.classCol)
|
|
219
|
+
);
|
|
220
|
+
});
|
|
221
|
+
const inputElementNull = ref(null);
|
|
222
|
+
const onMousedownItem = () => {
|
|
223
|
+
if (props.disabled) return;
|
|
224
|
+
if (props.readonly) return;
|
|
225
|
+
focusState.isMmousedownItem = true;
|
|
226
|
+
};
|
|
227
|
+
const onMouseupItem = (elm) => {
|
|
228
|
+
if (props.disabled) return;
|
|
229
|
+
if (props.readonly) return;
|
|
230
|
+
focusState.isMmousedownItem = false;
|
|
231
|
+
if (elm !== null) {
|
|
232
|
+
elm.focus();
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
const onKeydown = (event) => {
|
|
236
|
+
if (props.disabled || props.readonly) {
|
|
237
|
+
event.preventDefault();
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
focusState.isKeyDown = true;
|
|
241
|
+
};
|
|
242
|
+
const onKeyup = (event) => {
|
|
243
|
+
if (props.disabled || props.readonly) {
|
|
244
|
+
event.preventDefault();
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
focusState.isKeyDown = false;
|
|
248
|
+
};
|
|
249
|
+
const setValue = async (row) => {
|
|
250
|
+
if (props.disabled) return;
|
|
251
|
+
if (props.readonly) return;
|
|
252
|
+
displayData.value = row;
|
|
253
|
+
};
|
|
254
|
+
const baseClass = computed(() => {
|
|
255
|
+
return [
|
|
256
|
+
twMerge(
|
|
257
|
+
//
|
|
258
|
+
"h-auto",
|
|
259
|
+
props.size === "s" ? "min-h-[44px] " : "",
|
|
260
|
+
props.size === "m" ? "min-h-[48px]" : "",
|
|
261
|
+
props.size === "l" ? "min-h-[60px]" : "",
|
|
262
|
+
ClassTypeToString(props.class)
|
|
263
|
+
)
|
|
264
|
+
];
|
|
265
|
+
});
|
|
266
|
+
const inputClass = computed(() => {
|
|
267
|
+
return [
|
|
268
|
+
twMerge(
|
|
269
|
+
//
|
|
270
|
+
"px-2",
|
|
271
|
+
ClassTypeToString(props.classInput)
|
|
272
|
+
)
|
|
273
|
+
];
|
|
274
|
+
});
|
|
275
|
+
</script>
|
|
276
|
+
|
|
277
|
+
<template>
|
|
278
|
+
<InputFrame
|
|
279
|
+
:class="baseClass"
|
|
280
|
+
:class-header="props.classHeader"
|
|
281
|
+
:class-input="inputClass"
|
|
282
|
+
:focus="computedActivate"
|
|
283
|
+
:focus-color="props.focusColor"
|
|
284
|
+
:change="isChangeData"
|
|
285
|
+
:change-color="props.changeColor"
|
|
286
|
+
:error="props.error"
|
|
287
|
+
:error-color="props.errorColor"
|
|
288
|
+
:disabled="props.disabled"
|
|
289
|
+
:disabled-color="props.disabledColor"
|
|
290
|
+
:readonly="props.readonly"
|
|
291
|
+
:label="props.label"
|
|
292
|
+
:require="props.require"
|
|
293
|
+
:require-text="tx(props.requireText).value"
|
|
294
|
+
:warn="props.warn"
|
|
295
|
+
:warn-time-out="props.warnTimeOut"
|
|
296
|
+
:size="props.size"
|
|
297
|
+
:headerless="props.headerless"
|
|
298
|
+
>
|
|
299
|
+
<template #overlay="{ focus, change }">
|
|
300
|
+
<div
|
|
301
|
+
v-if="props.diff !== void 0 && change"
|
|
302
|
+
class="absolute inset-0 bg-red/30 transition-opacity flex items-center p-1 bg-dark/20"
|
|
303
|
+
:class="!focus && hsMisc.capsLockState ? 'opacity-100' : 'opacity-0 pointer-events-none select-none'"
|
|
304
|
+
>
|
|
305
|
+
<div class="flex">
|
|
306
|
+
<Btn
|
|
307
|
+
variant="outlined"
|
|
308
|
+
theme="error"
|
|
309
|
+
tabindex="-1"
|
|
310
|
+
size="xs"
|
|
311
|
+
class="bg-white flex-none"
|
|
312
|
+
@click="checkData(props.diff)"
|
|
313
|
+
>
|
|
314
|
+
<i class="fa-solid fa-rotate-right"></i>
|
|
315
|
+
</Btn>
|
|
316
|
+
<div v-if="props.diff" class="px-1 truncate bg-white mx-1 flex items-center">{{ diffDisplayText }}</div>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
<template v-if="slots.overlay">
|
|
320
|
+
<slot name="overlay" :focus="focus" :change="change"></slot>
|
|
321
|
+
</template>
|
|
322
|
+
</template>
|
|
323
|
+
<template v-if="slots['left-icons']" #left-icons>
|
|
324
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
325
|
+
</template>
|
|
326
|
+
<template v-if="slots['right-icons']" #right-icons>
|
|
327
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
328
|
+
</template>
|
|
329
|
+
<template v-if="slots['label-prepend']" #label-prepend>
|
|
330
|
+
<slot name="label-prepend" />
|
|
331
|
+
</template>
|
|
332
|
+
<template v-if="slots['label-append']" #label-append>
|
|
333
|
+
<slot name="label-append" />
|
|
334
|
+
</template>
|
|
335
|
+
<template v-if="slots['header-right']" #header-right>
|
|
336
|
+
<slot name="header-right" />
|
|
337
|
+
</template>
|
|
338
|
+
|
|
339
|
+
<div class="nac-input">
|
|
340
|
+
<div
|
|
341
|
+
class="radio-row"
|
|
342
|
+
:class="[`flex flex-wrap`, classRow]"
|
|
343
|
+
@keyup.up="onKeyup"
|
|
344
|
+
@keydown.up="onKeydown"
|
|
345
|
+
@keyup.down="onKeyup"
|
|
346
|
+
@keydown.down="onKeydown"
|
|
347
|
+
@keyup.left="onKeyup"
|
|
348
|
+
@keydown.left="onKeydown"
|
|
349
|
+
@keyup.right="onKeyup"
|
|
350
|
+
@keydown.right="onKeydown"
|
|
351
|
+
>
|
|
352
|
+
<!-- null -->
|
|
353
|
+
<div v-if="!props.require && props.nullable" class="radio-col" :class="colClass">
|
|
354
|
+
<div
|
|
355
|
+
class="nac-radio"
|
|
356
|
+
:class="[{ disabled: props.disabled, readonly: props.readonly }]"
|
|
357
|
+
@mousedown="onMousedownItem"
|
|
358
|
+
@mouseup="onMouseupItem(inputElementNull)"
|
|
359
|
+
@click="setValue(null)"
|
|
360
|
+
>
|
|
361
|
+
<input
|
|
362
|
+
:id="`radio${uid}-null`"
|
|
363
|
+
:ref="(e) => inputElementNull = e"
|
|
364
|
+
type="radio"
|
|
365
|
+
:name="`radio${uid}`"
|
|
366
|
+
:tabindex="props.tabindex"
|
|
367
|
+
:value="null"
|
|
368
|
+
:disabled="props.disabled"
|
|
369
|
+
:readonly="props.readonly"
|
|
370
|
+
@focus="onFocus(null)"
|
|
371
|
+
@blur="onBlur(null)"
|
|
372
|
+
/>
|
|
373
|
+
<div class="radio-mark" :class="[{ checked: selectedId === null }]"></div>
|
|
374
|
+
<div class="radio-label">
|
|
375
|
+
<SelectImgIcon
|
|
376
|
+
v-if="props.image"
|
|
377
|
+
class="flex-none"
|
|
378
|
+
:img-url="null"
|
|
379
|
+
:class-img="props.classImg"
|
|
380
|
+
:class-img-tag="props.classImgTag"
|
|
381
|
+
/>
|
|
382
|
+
<div class="radio-text truncate">{{ tx(nullText) }}</div>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
<!-- list -->
|
|
387
|
+
<template v-for="(row, index) in displayList" :key="index">
|
|
388
|
+
<div
|
|
389
|
+
v-if="row.id !== null"
|
|
390
|
+
class="radio-col"
|
|
391
|
+
:class="colClass"
|
|
392
|
+
@mousedown="onMousedownItem"
|
|
393
|
+
@mouseup="onMouseupItem(row.elm)"
|
|
394
|
+
@click="setValue(row)"
|
|
395
|
+
>
|
|
396
|
+
<div class="nac-radio" :class="[{ disabled: props.disabled, readonly: props.readonly }]">
|
|
397
|
+
<input
|
|
398
|
+
:id="`radio${uid}-${row.id}`"
|
|
399
|
+
:ref="(e) => row.elm = e"
|
|
400
|
+
type="radio"
|
|
401
|
+
class=""
|
|
402
|
+
:name="`radio${uid}`"
|
|
403
|
+
:tabindex="props.tabindex"
|
|
404
|
+
:value="row.id"
|
|
405
|
+
:disabled="props.disabled"
|
|
406
|
+
:readonly="props.readonly"
|
|
407
|
+
@focus="onFocus(index)"
|
|
408
|
+
@blur="onBlur(index)"
|
|
409
|
+
/>
|
|
410
|
+
<div class="radio-mark" :class="[{ checked: selectedId === row.id }]"></div>
|
|
411
|
+
<div
|
|
412
|
+
class="radio-label"
|
|
413
|
+
:class="{
|
|
414
|
+
isDeleted: row.deleted === true,
|
|
415
|
+
isHidden: row.hidden === false
|
|
416
|
+
}"
|
|
417
|
+
>
|
|
418
|
+
<SelectImgIcon
|
|
419
|
+
v-if="props.image"
|
|
420
|
+
class="flex-none"
|
|
421
|
+
:img-url="row.imgUrl"
|
|
422
|
+
:class-img="props.classImg"
|
|
423
|
+
:class-img-tag="props.classImgTag"
|
|
424
|
+
/>
|
|
425
|
+
<div class="radio-text truncate">
|
|
426
|
+
{{ tx(row.text) }}
|
|
427
|
+
<span v-if="row.deleted" class="text-error text-[0.7em] leading-[1em]">
|
|
428
|
+
{{ tx({ ja: "\u524A\u9664\u6E08", en: "Deleted" }) }}
|
|
429
|
+
</span>
|
|
430
|
+
<span v-if="row.hidden" class="text-error text-[0.7em] leading-[1em]">
|
|
431
|
+
{{ tx({ ja: "\u975E\u8868\u793A", en: "Hidden" }) }}
|
|
432
|
+
</span>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
</template>
|
|
438
|
+
</div>
|
|
439
|
+
<template v-if="includeHidden">
|
|
440
|
+
<Btn theme="accent1" variant="outlined" class="w-full mb-1" size="xs" @click="isShowHidden = !isShowHidden">
|
|
441
|
+
<span class="me-1">Hidden options</span>
|
|
442
|
+
<i class="fas" :class="[!isShowHidden ? 'fa-eye-slash text-error' : 'fa-eye text-success']"></i>
|
|
443
|
+
<i class="fas fa-caret-right mx-1"></i>
|
|
444
|
+
<i class="fas" :class="[isShowHidden ? 'fa-eye-slash text-error' : 'fa-eye text-success']"></i>
|
|
445
|
+
</Btn>
|
|
446
|
+
</template>
|
|
447
|
+
</div>
|
|
448
|
+
</InputFrame>
|
|
449
|
+
</template>
|
|
450
|
+
|
|
614
451
|
<style>
|
|
615
452
|
.nac-input {
|
|
616
453
|
width: 100%;
|
|
@@ -774,4 +611,4 @@ const inputClass = computed(() => {
|
|
|
774
611
|
.nac-input.disabled .item-hidden-control i {
|
|
775
612
|
color: rgb(92, 92, 92) !important;
|
|
776
613
|
}
|
|
777
|
-
</style>
|
|
614
|
+
</style>
|