@atscript/vue-form 0.1.189 → 0.1.190
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/{_shape-C-TxQCFa.cjs → _shape-BDO-1MzF.cjs} +34 -0
- package/dist/{_shape-bdsPEB8P.mjs → _shape-DhwW2SvD.mjs} +23 -1
- package/dist/{as-action-B_vPR2YE.cjs → as-action-B3NIgGTV.cjs} +4 -0
- package/dist/{as-action-BzdLJvyy.mjs → as-action-B69WsGIB.mjs} +4 -0
- package/dist/as-action.cjs +1 -1
- package/dist/as-action.d.cts +1 -1
- package/dist/as-action.d.mts +1 -1
- package/dist/as-action.mjs +1 -1
- package/dist/{as-action.vue-BmHLq5PU.d.cts → as-action.vue-DW10afXf.d.cts} +1 -1
- package/dist/{as-action.vue-BskkSynK.d.mts → as-action.vue-FAmO9MMw.d.mts} +1 -1
- package/dist/{as-array-BKC7bBXf.mjs → as-array-B0wekrwk.mjs} +12 -8
- package/dist/{as-array-C4Vv6k5I.cjs → as-array-BJYlPXad.cjs} +12 -8
- package/dist/{as-array-clear-btn-ConR3zxV.mjs → as-array-clear-btn-Bi4wDHOv.mjs} +2 -2
- package/dist/{as-array-clear-btn-DeWeUqoX.cjs → as-array-clear-btn-CzojQsEk.cjs} +2 -2
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.d.cts +1 -1
- package/dist/as-array.d.mts +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-array.vue-BWUhWKKn.d.cts → as-array.vue-DetU1gZz.d.cts} +1 -1
- package/dist/{as-array.vue-C4mSQIUB.d.mts → as-array.vue-Q8eE5Ut1.d.mts} +1 -1
- package/dist/{as-checkbox-Dux-KJVN.mjs → as-checkbox-BKQPJbiW.mjs} +7 -3
- package/dist/{as-checkbox-NjLPm4Kk.cjs → as-checkbox-Dg4CqOYy.cjs} +7 -3
- package/dist/as-checkbox.cjs +1 -1
- package/dist/as-checkbox.d.cts +1 -1
- package/dist/as-checkbox.d.mts +1 -1
- package/dist/as-checkbox.mjs +1 -1
- package/dist/{as-checkbox.vue-B_LntkDl.d.cts → as-checkbox.vue-BCZqbPZs.d.cts} +1 -1
- package/dist/{as-checkbox.vue-CPLwFPve.d.mts → as-checkbox.vue-D3PPVWiS.d.mts} +1 -1
- package/dist/{as-collapsible-FoPTu4lF.mjs → as-collapsible-DJqAZXR7.mjs} +2 -2
- package/dist/{as-collapsible-BXQ481-h.cjs → as-collapsible-Dtt4QN7s.cjs} +2 -2
- package/dist/as-collapsible.cjs +1 -1
- package/dist/as-collapsible.d.cts +1 -1
- package/dist/as-collapsible.d.mts +1 -1
- package/dist/as-collapsible.mjs +1 -1
- package/dist/{as-collapsible.vue-9XMYb39s.d.cts → as-collapsible.vue-Bxenwlh8.d.cts} +1 -1
- package/dist/{as-collapsible.vue-BtUZuqGF.d.mts → as-collapsible.vue-lYcXVC_E.d.mts} +1 -1
- package/dist/{as-date-DSvDDvwH.cjs → as-date-BKR1O5BR.cjs} +7 -3
- package/dist/{as-date-DUUpb8ph.mjs → as-date-BoBkff96.mjs} +7 -3
- package/dist/as-date.cjs +1 -1
- package/dist/as-date.d.cts +1 -1
- package/dist/as-date.d.mts +1 -1
- package/dist/as-date.mjs +1 -1
- package/dist/{as-date.vue-CQZp-yqF.d.mts → as-date.vue-ByntHQIq.d.mts} +1 -1
- package/dist/{as-date.vue-DQVHGLMc.d.cts → as-date.vue-CS14s3fE.d.cts} +1 -1
- package/dist/{as-datetime-Dy1tGMrO.mjs → as-datetime-Ci3H4Fjy.mjs} +7 -3
- package/dist/{as-datetime-DZBCBpov.cjs → as-datetime-DH5tE6dB.cjs} +7 -3
- package/dist/as-datetime.cjs +1 -1
- package/dist/as-datetime.d.cts +1 -1
- package/dist/as-datetime.d.mts +1 -1
- package/dist/as-datetime.mjs +1 -1
- package/dist/{as-datetime.vue-DrWth1Pe.d.mts → as-datetime.vue-B-O9jSjL.d.mts} +1 -1
- package/dist/{as-datetime.vue-TMgV54Z5.d.cts → as-datetime.vue-BJAZj8Pi.d.cts} +1 -1
- package/dist/{as-decimal-DYBEUokN.cjs → as-decimal-BuvchyCs.cjs} +7 -3
- package/dist/{as-decimal-HvUQANde.mjs → as-decimal-CseZXB7F.mjs} +7 -3
- package/dist/as-decimal.cjs +1 -1
- package/dist/as-decimal.d.cts +1 -1
- package/dist/as-decimal.d.mts +1 -1
- package/dist/as-decimal.mjs +1 -1
- package/dist/{as-decimal.vue-Bw9vY0br.d.mts → as-decimal.vue-CQXnsDs9.d.mts} +1 -1
- package/dist/{as-decimal.vue-D-C_ywhy.d.cts → as-decimal.vue-F9YMotuz.d.cts} +1 -1
- package/dist/{as-field-C3lIiHCI.cjs → as-field-BHUA1YpM.cjs} +93 -57
- package/dist/{as-field-R3KYssad.mjs → as-field-CvjOHQ9H.mjs} +94 -52
- package/dist/{as-field-shell-BQPySL71.mjs → as-field-shell-CSxqm12l.mjs} +8 -4
- package/dist/{as-field-shell-BOeyo1FP.cjs → as-field-shell-P7p47Pbr.cjs} +8 -4
- package/dist/as-field-shell.cjs +1 -1
- package/dist/as-field-shell.d.cts +1 -1
- package/dist/as-field-shell.d.mts +1 -1
- package/dist/as-field-shell.mjs +1 -1
- package/dist/{as-field-shell.vue-CouocQ2f.d.cts → as-field-shell.vue-CQSSK4hh.d.mts} +1 -1
- package/dist/{as-field-shell.vue-DIYpxzud.d.mts → as-field-shell.vue-DsYdUv7b.d.cts} +1 -1
- package/dist/as-field.cjs +1 -1
- package/dist/as-field.mjs +1 -1
- package/dist/{as-form-CRDqdXnl.mjs → as-form-BYi1rubO.mjs} +5 -5
- package/dist/{as-form-BTNctHb9.cjs → as-form-rI4daFP2.cjs} +5 -5
- package/dist/as-form.cjs +1 -1
- package/dist/as-form.d.cts +1 -1
- package/dist/as-form.d.mts +1 -1
- package/dist/as-form.mjs +1 -1
- package/dist/{as-form.vue-BI5mC0o7.d.cts → as-form.vue-C7yj7eRt.d.cts} +34 -3
- package/dist/{as-form.vue-BJ79OYA6.d.mts → as-form.vue-xvFFkRdo.d.mts} +34 -3
- package/dist/{as-input-BRJYoNF0.cjs → as-input-DNIY5kGw.cjs} +6 -2
- package/dist/{as-input-C3MkFToh.mjs → as-input-DVeDzKkd.mjs} +6 -2
- package/dist/{as-input-control-DAbaW7GG.cjs → as-input-control-D8xoJfr7.cjs} +7 -3
- package/dist/{as-input-control-B3h--Qe0.mjs → as-input-control-Wygcey6h.mjs} +7 -3
- package/dist/as-input.cjs +1 -1
- package/dist/as-input.d.cts +1 -1
- package/dist/as-input.d.mts +1 -1
- package/dist/as-input.mjs +1 -1
- package/dist/{as-input.vue-D4UQSSmo.d.cts → as-input.vue-BE5H25Xa.d.mts} +1 -1
- package/dist/{as-input.vue-Q5EXxW3x.d.mts → as-input.vue-DsSCA6KN.d.cts} +1 -1
- package/dist/{as-iterator-Bd1fXGs6.mjs → as-iterator-BTJ37tre.mjs} +2 -2
- package/dist/{as-iterator-BB7DB04y.cjs → as-iterator-rF5FyWGS.cjs} +2 -2
- package/dist/as-iterator.cjs +1 -1
- package/dist/as-iterator.mjs +1 -1
- package/dist/{as-multi-select-DPpAKUzQ.cjs → as-multi-select-CXFofdQ1.cjs} +6 -2
- package/dist/{as-multi-select-4awmF8mN.mjs → as-multi-select-CkMSlX1e.mjs} +6 -2
- package/dist/as-multi-select.cjs +1 -1
- package/dist/as-multi-select.d.cts +1 -1
- package/dist/as-multi-select.d.mts +1 -1
- package/dist/as-multi-select.mjs +1 -1
- package/dist/{as-multi-select.vue-Ce-V2A81.d.mts → as-multi-select.vue-BDt4AtNm.d.mts} +1 -1
- package/dist/{as-multi-select.vue-Iy3G3eu8.d.cts → as-multi-select.vue-CpuSkukC.d.cts} +1 -1
- package/dist/{as-number-CAVTkGcp.cjs → as-number-BwzyMxl4.cjs} +8 -4
- package/dist/{as-number-WcRwaMOt.mjs → as-number-mQHbJDoh.mjs} +8 -4
- package/dist/as-number.cjs +1 -1
- package/dist/as-number.d.cts +1 -1
- package/dist/as-number.d.mts +1 -1
- package/dist/as-number.mjs +1 -1
- package/dist/{as-number.vue-FKc6UVot.d.mts → as-number.vue-89e-jfVe.d.cts} +1 -1
- package/dist/{as-number.vue-PH0wnd3B.d.cts → as-number.vue-CCTMDQYH.d.mts} +1 -1
- package/dist/{as-object-Bnyck833.cjs → as-object-DIj1yGSZ.cjs} +9 -5
- package/dist/{as-object-3Tlk8bjl.mjs → as-object-JuruOEiL.mjs} +9 -5
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.d.cts +1 -1
- package/dist/as-object.d.mts +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/{as-object.vue-B0qKMWPB.d.cts → as-object.vue-CVpEmBqS.d.mts} +1 -1
- package/dist/{as-object.vue-DLCEWLe4.d.mts → as-object.vue-tIaVshqY.d.cts} +1 -1
- package/dist/{as-paragraph-CQCdz9FR.mjs → as-paragraph-B49pXlhP.mjs} +4 -0
- package/dist/{as-paragraph-0opsr433.cjs → as-paragraph-wAHRsd_e.cjs} +4 -0
- package/dist/as-paragraph.cjs +1 -1
- package/dist/as-paragraph.d.cts +1 -1
- package/dist/as-paragraph.d.mts +1 -1
- package/dist/as-paragraph.mjs +1 -1
- package/dist/{as-paragraph.vue-BIrekTzU.d.mts → as-paragraph.vue-BUdQBjDf.d.cts} +1 -1
- package/dist/{as-paragraph.vue-C8JeTZ1s.d.cts → as-paragraph.vue-CS_GUIlF.d.mts} +1 -1
- package/dist/{as-radio-8udWHC-l.mjs → as-radio-C5mVvsVH.mjs} +7 -3
- package/dist/{as-radio-P9rzMYNp.cjs → as-radio-DQO5uQL3.cjs} +7 -3
- package/dist/as-radio.cjs +1 -1
- package/dist/as-radio.d.cts +1 -1
- package/dist/as-radio.d.mts +1 -1
- package/dist/as-radio.mjs +1 -1
- package/dist/{as-radio.vue-Rwknlgr7.d.mts → as-radio.vue-BcTgNQsc.d.mts} +1 -1
- package/dist/{as-radio.vue-jeHiMfc7.d.cts → as-radio.vue-BmmP8H-m.d.cts} +1 -1
- package/dist/as-ref-DHGlYdUh.mjs +422 -0
- package/dist/as-ref-fha5dEeo.cjs +427 -0
- package/dist/as-ref.cjs +1 -1
- package/dist/as-ref.d.cts +1 -1
- package/dist/as-ref.d.mts +1 -1
- package/dist/as-ref.mjs +1 -1
- package/dist/as-ref.vue-DZeTp8EO.d.cts +19 -0
- package/dist/as-ref.vue-Gwv8EEKY.d.mts +19 -0
- package/dist/{as-select-DVbegHcv.cjs → as-select-B_ZB1_a5.cjs} +20 -7
- package/dist/{as-select-3fZCzWku.mjs → as-select-C1lqeKqt.mjs} +21 -8
- package/dist/as-select.cjs +1 -1
- package/dist/as-select.d.cts +1 -1
- package/dist/as-select.d.mts +1 -1
- package/dist/as-select.mjs +1 -1
- package/dist/{as-select.vue-BIpvu4ba.d.mts → as-select.vue-BMNGb5eH.d.mts} +1 -1
- package/dist/{as-select.vue-eMp1zUQE.d.cts → as-select.vue-C3NvSQ2N.d.cts} +1 -1
- package/dist/{as-time-W1ExfNxT.cjs → as-time-D7oluFpZ.cjs} +7 -3
- package/dist/{as-time-BtTiGWOr.mjs → as-time-D9VTZzsD.mjs} +7 -3
- package/dist/as-time.cjs +1 -1
- package/dist/as-time.d.cts +1 -1
- package/dist/as-time.d.mts +1 -1
- package/dist/as-time.mjs +1 -1
- package/dist/{as-time.vue-DAeXJ0Zv.d.cts → as-time.vue-CcEfdWI8.d.cts} +1 -1
- package/dist/{as-time.vue-DudhL8yx.d.mts → as-time.vue-Dc5ruv4m.d.mts} +1 -1
- package/dist/{as-tuple-dfvCxm4R.cjs → as-tuple--4iQOc9p.cjs} +10 -6
- package/dist/{as-tuple-CBOp5N1c.mjs → as-tuple-DwP6bvW7.mjs} +10 -6
- package/dist/as-tuple.cjs +1 -1
- package/dist/as-tuple.d.cts +1 -1
- package/dist/as-tuple.d.mts +1 -1
- package/dist/as-tuple.mjs +1 -1
- package/dist/{as-tuple.vue-C2KTK2RH.d.cts → as-tuple.vue-Cyzfh6Z0.d.mts} +1 -1
- package/dist/{as-tuple.vue-CLIDqVFv.d.mts → as-tuple.vue-DzC4tINc.d.cts} +1 -1
- package/dist/{as-union-B0h0AlsZ.cjs → as-union-CvSnU1YB.cjs} +9 -5
- package/dist/{as-union-izUcMyQt.mjs → as-union-Cy7zefJl.mjs} +9 -5
- package/dist/as-union.cjs +1 -1
- package/dist/as-union.d.cts +1 -1
- package/dist/as-union.d.mts +1 -1
- package/dist/as-union.mjs +1 -1
- package/dist/{as-union.vue-43Gq2Lh0.d.cts → as-union.vue-CvN-SR9q.d.cts} +1 -1
- package/dist/{as-union.vue-CllUYjuh.d.mts → as-union.vue-CwNJYhKj.d.mts} +1 -1
- package/dist/{as-variant-picker-D0I5qR2w.mjs → as-variant-picker-3P9wXCUf.mjs} +3 -3
- package/dist/{as-variant-picker-oELBST6P.cjs → as-variant-picker-BYrf1YUe.cjs} +3 -3
- package/dist/index.cjs +29 -29
- package/dist/index.d.cts +22 -22
- package/dist/index.d.mts +22 -22
- package/dist/index.mjs +28 -28
- package/dist/locale.cjs +1 -1
- package/dist/locale.mjs +1 -1
- package/dist/{types-BbGuPzZk.d.cts → types-COv2t_de.d.cts} +32 -2
- package/dist/{types-DxmDaJXr.d.mts → types-DSXbJndw.d.mts} +32 -2
- package/dist/{use-as-date-DFcdIfyr.cjs → use-as-date-CAmqx1O7.cjs} +4 -0
- package/dist/{use-as-date-DgPRL0O2.mjs → use-as-date-CpXG9klN.mjs} +4 -0
- package/dist/{use-as-model-texts-CLzPZ6Go.cjs → use-as-model-texts-DtqNcugR.cjs} +2 -2
- package/dist/{use-as-model-texts-D3uf3X8L.mjs → use-as-model-texts-Duq04LpS.mjs} +2 -2
- package/dist/{use-as-value-help-BWiBDup3.mjs → use-as-value-help-D16evDGm.mjs} +93 -10
- package/dist/{use-as-value-help-BG6aN4yQ.cjs → use-as-value-help-XPeNhfJY.cjs} +97 -8
- package/dist/{use-form-context-C5Q9Gznl.cjs → use-form-context-7CK50mTi.cjs} +1 -1
- package/dist/{use-form-context-Cw-ETG8f.mjs → use-form-context-ba0N--m6.mjs} +1 -1
- package/package.json +9 -9
- package/dist/as-ref-BvPM3G73.cjs +0 -353
- package/dist/as-ref-C-U7wotf.mjs +0 -348
- package/dist/as-ref.vue-D0A4vPXL.d.mts +0 -9
- package/dist/as-ref.vue-WufE6ltR.d.cts +0 -9
- /package/dist/{_editing-hold-ChPIf1ZC.cjs → _editing-hold-Bj0kZjCr.cjs} +0 -0
- /package/dist/{_editing-hold-DVfB2wc_.mjs → _editing-hold-C6emgUTM.mjs} +0 -0
- /package/dist/{use-as-locale-WBFjL_OO.mjs → use-as-locale-CznDr-7i.mjs} +0 -0
- /package/dist/{use-as-locale-BHltz8Wp.cjs → use-as-locale-eo7FyfaZ.cjs} +0 -0
- /package/dist/{variant-label-zYWRiOjJ.mjs → variant-label-CmzTQC2B.mjs} +0 -0
- /package/dist/{variant-label-CYIvHn4B.cjs → variant-label-_GLezszT.cjs} +0 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
const require_use_as_value_help = require("./use-as-value-help-XPeNhfJY.cjs");
|
|
2
|
+
const require_use_as_locale = require("./use-as-locale-eo7FyfaZ.cjs");
|
|
3
|
+
const require__shape = require("./_shape-BDO-1MzF.cjs");
|
|
4
|
+
const require_as_field_shell = require("./as-field-shell-P7p47Pbr.cjs");
|
|
5
|
+
const require_as_input_control = require("./as-input-control-D8xoJfr7.cjs");
|
|
6
|
+
let vue = require("vue");
|
|
7
|
+
let reka_ui = require("reka-ui");
|
|
8
|
+
//#region src/components/defaults/as-ref.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
const _hoisted_1 = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "as-ref-loading"
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_2 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "as-ref-status"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_3 = { class: "as-ref-item-id" };
|
|
18
|
+
const _hoisted_4 = { class: "as-ref-item-label" };
|
|
19
|
+
const _hoisted_5 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "as-ref-item-description"
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/defaults/as-ref.vue
|
|
25
|
+
var as_ref_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
26
|
+
__name: "as-ref",
|
|
27
|
+
props: {
|
|
28
|
+
onBlur: {
|
|
29
|
+
type: Function,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
error: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
model: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
value: {
|
|
41
|
+
type: null,
|
|
42
|
+
required: false
|
|
43
|
+
},
|
|
44
|
+
label: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: false
|
|
47
|
+
},
|
|
48
|
+
description: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
hint: {
|
|
53
|
+
type: String,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
placeholder: {
|
|
57
|
+
type: String,
|
|
58
|
+
required: false
|
|
59
|
+
},
|
|
60
|
+
prefixIcon: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false
|
|
63
|
+
},
|
|
64
|
+
suffixIcon: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false
|
|
67
|
+
},
|
|
68
|
+
class: {
|
|
69
|
+
type: [Object, String],
|
|
70
|
+
required: false
|
|
71
|
+
},
|
|
72
|
+
style: {
|
|
73
|
+
type: [Object, String],
|
|
74
|
+
required: false
|
|
75
|
+
},
|
|
76
|
+
optional: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
required: false,
|
|
79
|
+
skipCheck: true
|
|
80
|
+
},
|
|
81
|
+
onToggleOptional: {
|
|
82
|
+
type: Function,
|
|
83
|
+
required: false
|
|
84
|
+
},
|
|
85
|
+
required: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
required: false,
|
|
88
|
+
skipCheck: true
|
|
89
|
+
},
|
|
90
|
+
readonly: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
required: false,
|
|
93
|
+
skipCheck: true
|
|
94
|
+
},
|
|
95
|
+
type: {
|
|
96
|
+
type: String,
|
|
97
|
+
required: true
|
|
98
|
+
},
|
|
99
|
+
formAction: {
|
|
100
|
+
type: Object,
|
|
101
|
+
required: false
|
|
102
|
+
},
|
|
103
|
+
name: {
|
|
104
|
+
type: String,
|
|
105
|
+
required: false
|
|
106
|
+
},
|
|
107
|
+
field: {
|
|
108
|
+
type: Object,
|
|
109
|
+
required: false
|
|
110
|
+
},
|
|
111
|
+
options: {
|
|
112
|
+
type: Array,
|
|
113
|
+
required: false
|
|
114
|
+
},
|
|
115
|
+
maxLength: {
|
|
116
|
+
type: Number,
|
|
117
|
+
required: false
|
|
118
|
+
},
|
|
119
|
+
autocomplete: {
|
|
120
|
+
type: String,
|
|
121
|
+
required: false
|
|
122
|
+
},
|
|
123
|
+
title: {
|
|
124
|
+
type: String,
|
|
125
|
+
required: false
|
|
126
|
+
},
|
|
127
|
+
level: {
|
|
128
|
+
type: Number,
|
|
129
|
+
required: false
|
|
130
|
+
},
|
|
131
|
+
onRemove: {
|
|
132
|
+
type: Function,
|
|
133
|
+
required: false
|
|
134
|
+
},
|
|
135
|
+
canRemove: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: false
|
|
138
|
+
},
|
|
139
|
+
removeLabel: {
|
|
140
|
+
type: String,
|
|
141
|
+
required: false
|
|
142
|
+
},
|
|
143
|
+
arrayIndex: {
|
|
144
|
+
type: Number,
|
|
145
|
+
required: false
|
|
146
|
+
},
|
|
147
|
+
path: {
|
|
148
|
+
type: String,
|
|
149
|
+
required: true
|
|
150
|
+
},
|
|
151
|
+
valueHelp: {
|
|
152
|
+
type: Object,
|
|
153
|
+
required: false
|
|
154
|
+
},
|
|
155
|
+
valueLabel: {
|
|
156
|
+
type: String,
|
|
157
|
+
required: false
|
|
158
|
+
},
|
|
159
|
+
singularLabel: {
|
|
160
|
+
type: String,
|
|
161
|
+
required: false
|
|
162
|
+
},
|
|
163
|
+
inputId: {
|
|
164
|
+
type: String,
|
|
165
|
+
required: true
|
|
166
|
+
},
|
|
167
|
+
errorId: {
|
|
168
|
+
type: String,
|
|
169
|
+
required: true
|
|
170
|
+
},
|
|
171
|
+
descId: {
|
|
172
|
+
type: String,
|
|
173
|
+
required: true
|
|
174
|
+
},
|
|
175
|
+
statusId: {
|
|
176
|
+
type: String,
|
|
177
|
+
required: false
|
|
178
|
+
},
|
|
179
|
+
ariaDescribedBy: {
|
|
180
|
+
type: String,
|
|
181
|
+
required: false
|
|
182
|
+
},
|
|
183
|
+
currencyCode: {
|
|
184
|
+
type: String,
|
|
185
|
+
required: false
|
|
186
|
+
},
|
|
187
|
+
unitCode: {
|
|
188
|
+
type: String,
|
|
189
|
+
required: false
|
|
190
|
+
},
|
|
191
|
+
precisionScale: {
|
|
192
|
+
type: Number,
|
|
193
|
+
required: false
|
|
194
|
+
},
|
|
195
|
+
prefix: {
|
|
196
|
+
type: String,
|
|
197
|
+
required: false
|
|
198
|
+
},
|
|
199
|
+
suffix: {
|
|
200
|
+
type: String,
|
|
201
|
+
required: false
|
|
202
|
+
},
|
|
203
|
+
scale: {
|
|
204
|
+
type: Number,
|
|
205
|
+
required: false
|
|
206
|
+
},
|
|
207
|
+
hasAdornment: {
|
|
208
|
+
type: Boolean,
|
|
209
|
+
required: false
|
|
210
|
+
},
|
|
211
|
+
isDirty: {
|
|
212
|
+
type: Boolean,
|
|
213
|
+
required: false
|
|
214
|
+
},
|
|
215
|
+
disabled: {
|
|
216
|
+
type: Boolean,
|
|
217
|
+
required: false
|
|
218
|
+
},
|
|
219
|
+
hidden: {
|
|
220
|
+
type: Boolean,
|
|
221
|
+
required: false
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
setup(__props) {
|
|
225
|
+
const props = __props;
|
|
226
|
+
const info = props.valueHelp;
|
|
227
|
+
const open = (0, vue.ref)(false);
|
|
228
|
+
const listOpen = (0, vue.computed)({
|
|
229
|
+
get: () => open.value,
|
|
230
|
+
set: (v) => {
|
|
231
|
+
open.value = v && !props.readonly;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
const vh = info ? require_use_as_value_help.useAsValueHelp({
|
|
235
|
+
info,
|
|
236
|
+
model: props.model,
|
|
237
|
+
onBlur: props.onBlur,
|
|
238
|
+
open,
|
|
239
|
+
readonly: () => !!props.readonly
|
|
240
|
+
}) : void 0;
|
|
241
|
+
const resolved = vh?.resolved;
|
|
242
|
+
const results = vh?.results;
|
|
243
|
+
const status = vh?.status;
|
|
244
|
+
const searching = vh?.searching;
|
|
245
|
+
let pickedRow;
|
|
246
|
+
function onItemSelect(item) {
|
|
247
|
+
pickedRow = item;
|
|
248
|
+
}
|
|
249
|
+
function onPick(value) {
|
|
250
|
+
const picked = pickedRow;
|
|
251
|
+
pickedRow = void 0;
|
|
252
|
+
const row = info && (picked?.[info.targetField] === value ? picked : require__shape.soleRow(results?.value ?? [], info.targetField, value));
|
|
253
|
+
if (row) vh?.selectItem(row);
|
|
254
|
+
else props.model.value = value;
|
|
255
|
+
}
|
|
256
|
+
function rowKey(item) {
|
|
257
|
+
const keys = resolved?.value?.primaryKeys ?? [];
|
|
258
|
+
return keys.length > 0 ? keys.map((k) => String(item[k])).join("\0") : String(item[info.targetField]);
|
|
259
|
+
}
|
|
260
|
+
const inputText = (0, vue.ref)("");
|
|
261
|
+
const focused = (0, vue.ref)(false);
|
|
262
|
+
const showsLabel = () => props.valueLabel !== void 0 && (props.readonly || !focused.value);
|
|
263
|
+
function displayValue(v) {
|
|
264
|
+
if (showsLabel()) return props.valueLabel;
|
|
265
|
+
return v && typeof v !== "object" ? String(v) : "";
|
|
266
|
+
}
|
|
267
|
+
(0, vue.watch)(() => props.valueLabel, () => {
|
|
268
|
+
if (!focused.value && !open.value) inputText.value = displayValue(props.model.value);
|
|
269
|
+
});
|
|
270
|
+
const inputRef = (0, vue.ref)(null);
|
|
271
|
+
let quietFocus = false;
|
|
272
|
+
function onInputFocus() {
|
|
273
|
+
focused.value = true;
|
|
274
|
+
if (props.valueLabel !== void 0 && !props.readonly) inputText.value = displayValue(props.model.value);
|
|
275
|
+
if (!quietFocus) listOpen.value = true;
|
|
276
|
+
}
|
|
277
|
+
function onInputBlur() {
|
|
278
|
+
focused.value = false;
|
|
279
|
+
if (!open.value) inputText.value = displayValue(props.model.value);
|
|
280
|
+
props.onBlur();
|
|
281
|
+
}
|
|
282
|
+
(0, vue.watch)(() => props.model.value, (v) => {
|
|
283
|
+
if (!open.value) inputText.value = displayValue(v);
|
|
284
|
+
});
|
|
285
|
+
const clientFactory = (0, vue.inject)(require_use_as_value_help.CLIENT_FACTORY_KEY, null) ?? void 0;
|
|
286
|
+
function slotProps() {
|
|
287
|
+
return {
|
|
288
|
+
searchText: vh?.searchText.value ?? "",
|
|
289
|
+
selectItem: (row) => vh?.selectItem(row),
|
|
290
|
+
scope: vh.scope.value,
|
|
291
|
+
clientFactory,
|
|
292
|
+
close: () => {
|
|
293
|
+
listOpen.value = false;
|
|
294
|
+
inputText.value = displayValue(props.model.value);
|
|
295
|
+
},
|
|
296
|
+
focus: () => {
|
|
297
|
+
quietFocus = true;
|
|
298
|
+
inputRef.value?.$el.focus();
|
|
299
|
+
quietFocus = false;
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
function onSearchInput(e) {
|
|
304
|
+
if (vh) vh.searchText.value = e.target.value;
|
|
305
|
+
}
|
|
306
|
+
(0, vue.watch)(open, (isOpen) => {
|
|
307
|
+
if (!isOpen && vh) vh.searchText.value = "";
|
|
308
|
+
});
|
|
309
|
+
const emptyValue = () => require__shape.emptiedKey(props.field?.prop.type, props.optional);
|
|
310
|
+
const showClear = (0, vue.computed)(() => {
|
|
311
|
+
if (props.disabled || props.readonly || !vh) return false;
|
|
312
|
+
const v = props.model.value;
|
|
313
|
+
return vh.searchText.value !== "" || v != null && v !== emptyValue();
|
|
314
|
+
});
|
|
315
|
+
function onClear() {
|
|
316
|
+
inputText.value = "";
|
|
317
|
+
vh?.clear(emptyValue());
|
|
318
|
+
}
|
|
319
|
+
const { t } = require_use_as_locale.useAsTexts();
|
|
320
|
+
return (_ctx, _cache) => {
|
|
321
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(_ctx.$props)), {
|
|
322
|
+
default: (0, vue.withCtx)(({ inputId }) => [(0, vue.createCommentVNode)(" Fallback: plain text input when no ValueHelpInfo or target meta unreachable "), !(0, vue.unref)(info) || !(0, vue.unref)(vh) || (0, vue.unref)(status) === "error" ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_as_input_control.as_input_control_default, (0, vue.mergeProps)({ key: 0 }, _ctx.$props, {
|
|
323
|
+
type: "text",
|
|
324
|
+
"input-id": inputId
|
|
325
|
+
}), null, 16, ["input-id"])) : (0, vue.unref)(status) === "loading" || !(0, vue.unref)(resolved) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [..._cache[2] || (_cache[2] = [(0, vue.createElementVNode)("span", {
|
|
326
|
+
class: "as-ref-spinner",
|
|
327
|
+
"aria-hidden": "true"
|
|
328
|
+
}, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createCommentVNode)(" reka-ui Combobox for FK ref fields — value is the raw FK id. "), (0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxRoot), {
|
|
329
|
+
"model-value": __props.model.value,
|
|
330
|
+
open: listOpen.value,
|
|
331
|
+
"onUpdate:open": _cache[1] || (_cache[1] = ($event) => listOpen.value = $event),
|
|
332
|
+
"onUpdate:modelValue": onPick,
|
|
333
|
+
disabled: __props.disabled,
|
|
334
|
+
name: __props.name,
|
|
335
|
+
"ignore-filter": "",
|
|
336
|
+
class: "as-ref-root"
|
|
337
|
+
}, {
|
|
338
|
+
default: (0, vue.withCtx)(() => [
|
|
339
|
+
(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxAnchor), { class: "as-ref-anchor" }, {
|
|
340
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxInput), {
|
|
341
|
+
ref_key: "inputRef",
|
|
342
|
+
ref: inputRef,
|
|
343
|
+
modelValue: inputText.value,
|
|
344
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputText.value = $event),
|
|
345
|
+
"display-value": displayValue,
|
|
346
|
+
id: inputId,
|
|
347
|
+
placeholder: __props.placeholder,
|
|
348
|
+
disabled: __props.disabled,
|
|
349
|
+
readonly: __props.readonly,
|
|
350
|
+
"aria-required": __props.required || void 0,
|
|
351
|
+
"aria-invalid": !!__props.error || void 0,
|
|
352
|
+
"aria-describedby": __props.ariaDescribedBy,
|
|
353
|
+
"aria-label": !__props.label ? __props.name : void 0,
|
|
354
|
+
class: "as-ref-input",
|
|
355
|
+
onFocus: onInputFocus,
|
|
356
|
+
onInput: onSearchInput,
|
|
357
|
+
onBlur: onInputBlur
|
|
358
|
+
}, null, 8, [
|
|
359
|
+
"modelValue",
|
|
360
|
+
"id",
|
|
361
|
+
"placeholder",
|
|
362
|
+
"disabled",
|
|
363
|
+
"readonly",
|
|
364
|
+
"aria-required",
|
|
365
|
+
"aria-invalid",
|
|
366
|
+
"aria-describedby",
|
|
367
|
+
"aria-label"
|
|
368
|
+
]), showClear.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.ComboboxCancel), {
|
|
369
|
+
key: 0,
|
|
370
|
+
class: "as-ref-clear",
|
|
371
|
+
"aria-label": __props.label ? (0, vue.unref)(t)("UI_FORM_CLEAR_FIELD", { field: __props.label }) : (0, vue.unref)(t)("UI_CLEAR"),
|
|
372
|
+
onClick: onClear
|
|
373
|
+
}, {
|
|
374
|
+
default: (0, vue.withCtx)(() => [..._cache[3] || (_cache[3] = [(0, vue.createTextVNode)(" × ", -1)])]),
|
|
375
|
+
_: 1
|
|
376
|
+
}, 8, ["aria-label"])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
377
|
+
_: 2
|
|
378
|
+
}, 1024),
|
|
379
|
+
(0, vue.renderSlot)(_ctx.$slots, "trailing", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(slotProps()))),
|
|
380
|
+
(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxContent), {
|
|
381
|
+
position: "popper",
|
|
382
|
+
side: "bottom",
|
|
383
|
+
"side-offset": 4,
|
|
384
|
+
class: "as-ref-content"
|
|
385
|
+
}, {
|
|
386
|
+
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxViewport), { class: "as-ref-viewport" }, {
|
|
387
|
+
default: (0, vue.withCtx)(() => [(0, vue.unref)(searching) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2, [..._cache[4] || (_cache[4] = [(0, vue.createElementVNode)("span", {
|
|
388
|
+
class: "as-ref-spinner",
|
|
389
|
+
"aria-hidden": "true"
|
|
390
|
+
}, null, -1)])])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)((0, vue.unref)(results), (item) => {
|
|
391
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.ComboboxItem), {
|
|
392
|
+
key: rowKey(item),
|
|
393
|
+
value: item[(0, vue.unref)(info).targetField],
|
|
394
|
+
class: "as-ref-item",
|
|
395
|
+
onSelect: ($event) => onItemSelect(item)
|
|
396
|
+
}, {
|
|
397
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("span", _hoisted_3, (0, vue.toDisplayString)(item[(0, vue.unref)(info).targetField]), 1), (0, vue.createElementVNode)("span", _hoisted_4, [(0, vue.createTextVNode)((0, vue.toDisplayString)(item[(0, vue.unref)(resolved).labelField]) + " ", 1), (0, vue.unref)(resolved).descrField && item[(0, vue.unref)(resolved).descrField] ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5, " — " + (0, vue.toDisplayString)(item[(0, vue.unref)(resolved).descrField]), 1)) : (0, vue.createCommentVNode)("v-if", true)])]),
|
|
398
|
+
_: 2
|
|
399
|
+
}, 1032, ["value", "onSelect"]);
|
|
400
|
+
}), 128)), (0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxEmpty), { class: "as-ref-status" }, {
|
|
401
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("UI_FORM_NO_RESULTS")), 1)]),
|
|
402
|
+
_: 1
|
|
403
|
+
})], 64))]),
|
|
404
|
+
_: 1
|
|
405
|
+
}), (0, vue.renderSlot)(_ctx.$slots, "list-end", (0, vue.normalizeProps)((0, vue.guardReactiveProps)(slotProps())))]),
|
|
406
|
+
_: 3
|
|
407
|
+
})
|
|
408
|
+
]),
|
|
409
|
+
_: 2
|
|
410
|
+
}, 1032, [
|
|
411
|
+
"model-value",
|
|
412
|
+
"open",
|
|
413
|
+
"disabled",
|
|
414
|
+
"name"
|
|
415
|
+
])], 2112))]),
|
|
416
|
+
_: 3
|
|
417
|
+
}, 16);
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
//#endregion
|
|
422
|
+
Object.defineProperty(exports, "as_ref_default", {
|
|
423
|
+
enumerable: true,
|
|
424
|
+
get: function() {
|
|
425
|
+
return as_ref_default;
|
|
426
|
+
}
|
|
427
|
+
});
|
package/dist/as-ref.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_ref = require("./as-ref-
|
|
1
|
+
const require_as_ref = require("./as-ref-fha5dEeo.cjs");
|
|
2
2
|
module.exports = require_as_ref.as_ref_default;
|
package/dist/as-ref.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-ref.vue-
|
|
1
|
+
import { t as _default } from "./as-ref.vue-DZeTp8EO.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-ref.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-ref.vue-
|
|
1
|
+
import { t as _default } from "./as-ref.vue-Gwv8EEKY.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-ref.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_ref_default } from "./as-ref-
|
|
1
|
+
import { t as as_ref_default } from "./as-ref-DHGlYdUh.mjs";
|
|
2
2
|
export { as_ref_default as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c as TAsRefSlotProps, s as TAsComponentProps } from "./types-COv2t_de.cjs";
|
|
2
|
+
import * as vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/defaults/as-ref.vue.d.ts
|
|
5
|
+
type __VLS_Props = TAsComponentProps;
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
/** After the input — a button opening another picker (since 0.1.190). */trailing?: (props: TAsRefSlotProps) => unknown; /** After the list — an entry such as "See all" (since 0.1.190). */
|
|
8
|
+
"list-end"?: (props: TAsRefSlotProps) => unknown;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { _default as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { c as TAsRefSlotProps, s as TAsComponentProps } from "./types-DSXbJndw.mjs";
|
|
2
|
+
import * as vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/defaults/as-ref.vue.d.ts
|
|
5
|
+
type __VLS_Props = TAsComponentProps;
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
/** After the input — a button opening another picker (since 0.1.190). */trailing?: (props: TAsRefSlotProps) => unknown; /** After the list — an entry such as "See all" (since 0.1.190). */
|
|
8
|
+
"list-end"?: (props: TAsRefSlotProps) => unknown;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { _default as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require__shape = require("./_shape-BDO-1MzF.cjs");
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-P7p47Pbr.cjs");
|
|
2
3
|
let vue = require("vue");
|
|
3
4
|
let _atscript_ui = require("@atscript/ui");
|
|
4
5
|
//#region src/components/defaults/as-select.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -13,12 +14,13 @@ const _hoisted_2 = [
|
|
|
13
14
|
"aria-describedby",
|
|
14
15
|
"aria-label"
|
|
15
16
|
];
|
|
16
|
-
const _hoisted_3 =
|
|
17
|
-
|
|
17
|
+
const _hoisted_3 = ["value"];
|
|
18
|
+
const _hoisted_4 = {
|
|
19
|
+
key: 1,
|
|
18
20
|
value: "",
|
|
19
21
|
disabled: ""
|
|
20
22
|
};
|
|
21
|
-
const
|
|
23
|
+
const _hoisted_5 = ["value"];
|
|
22
24
|
//#endregion
|
|
23
25
|
//#region src/components/defaults/as-select.vue
|
|
24
26
|
var as_select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -151,6 +153,10 @@ var as_select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
151
153
|
type: Object,
|
|
152
154
|
required: false
|
|
153
155
|
},
|
|
156
|
+
valueLabel: {
|
|
157
|
+
type: String,
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
154
160
|
singularLabel: {
|
|
155
161
|
type: String,
|
|
156
162
|
required: false
|
|
@@ -217,6 +223,10 @@ var as_select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
217
223
|
}
|
|
218
224
|
},
|
|
219
225
|
setup(__props) {
|
|
226
|
+
const props = __props;
|
|
227
|
+
const prop = props.field?.prop;
|
|
228
|
+
const listsDictionary = !!props.valueHelp && !!prop && !(0, _atscript_ui.hasFieldMeta)(prop, _atscript_ui.UI_FORM_OPTIONS) && !(0, _atscript_ui.hasFieldMeta)(prop, _atscript_ui.UI_FORM_FN_OPTIONS) && (0, _atscript_ui.extractFieldLiteralOptions)(prop) === void 0;
|
|
229
|
+
const emptyValue = () => require__shape.emptiedKey(props.field?.prop.type, props.optional);
|
|
220
230
|
return (_ctx, _cache) => {
|
|
221
231
|
return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(_ctx.$props)), {
|
|
222
232
|
default: (0, vue.withCtx)(({ inputId }) => [(0, vue.createElementVNode)("span", _hoisted_1, [(0, vue.withDirectives)((0, vue.createElementVNode)("select", {
|
|
@@ -231,11 +241,14 @@ var as_select_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
231
241
|
"aria-invalid": !!__props.error || void 0,
|
|
232
242
|
"aria-describedby": __props.ariaDescribedBy,
|
|
233
243
|
"aria-label": !__props.label ? __props.name : void 0
|
|
234
|
-
}, [
|
|
244
|
+
}, [(0, vue.unref)(listsDictionary) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
245
|
+
key: 0,
|
|
246
|
+
value: emptyValue()
|
|
247
|
+
}, (0, vue.toDisplayString)(__props.placeholder), 9, _hoisted_3)) : __props.placeholder ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("option", _hoisted_4, (0, vue.toDisplayString)(__props.placeholder), 1)) : (0, vue.createCommentVNode)("v-if", true), ((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.options, (opt, i) => {
|
|
235
248
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("option", {
|
|
236
|
-
key: (0, vue.unref)(_atscript_ui.optKey)(opt)
|
|
249
|
+
key: `${i}:${(0, vue.unref)(_atscript_ui.optKey)(opt)}`,
|
|
237
250
|
value: (0, vue.unref)(_atscript_ui.optionValue)(opt)
|
|
238
|
-
}, (0, vue.toDisplayString)((0, vue.unref)(_atscript_ui.optLabel)(opt)), 9,
|
|
251
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(_atscript_ui.optLabel)(opt)), 9, _hoisted_5);
|
|
239
252
|
}), 128))], 40, _hoisted_2), [[vue.vModelSelect, __props.model.value]]), _cache[3] || (_cache[3] = (0, vue.createElementVNode)("span", {
|
|
240
253
|
class: "as-select-caret i-as-chevron-down",
|
|
241
254
|
"aria-hidden": "true"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as emptiedKey } from "./_shape-DhwW2SvD.mjs";
|
|
2
|
+
import { t as as_field_shell_default } from "./as-field-shell-CSxqm12l.mjs";
|
|
2
3
|
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderList, toDisplayString, unref, vModelSelect, withCtx, withDirectives } from "vue";
|
|
3
|
-
import { optKey, optLabel, optionValue } from "@atscript/ui";
|
|
4
|
+
import { UI_FORM_FN_OPTIONS, UI_FORM_OPTIONS, extractFieldLiteralOptions, hasFieldMeta, optKey, optLabel, optionValue } from "@atscript/ui";
|
|
4
5
|
//#region src/components/defaults/as-select.vue?vue&type=script&setup=true&lang.ts
|
|
5
6
|
const _hoisted_1 = { class: "as-select-wrap" };
|
|
6
7
|
const _hoisted_2 = [
|
|
@@ -13,12 +14,13 @@ const _hoisted_2 = [
|
|
|
13
14
|
"aria-describedby",
|
|
14
15
|
"aria-label"
|
|
15
16
|
];
|
|
16
|
-
const _hoisted_3 =
|
|
17
|
-
|
|
17
|
+
const _hoisted_3 = ["value"];
|
|
18
|
+
const _hoisted_4 = {
|
|
19
|
+
key: 1,
|
|
18
20
|
value: "",
|
|
19
21
|
disabled: ""
|
|
20
22
|
};
|
|
21
|
-
const
|
|
23
|
+
const _hoisted_5 = ["value"];
|
|
22
24
|
//#endregion
|
|
23
25
|
//#region src/components/defaults/as-select.vue
|
|
24
26
|
var as_select_default = /* @__PURE__ */ defineComponent({
|
|
@@ -151,6 +153,10 @@ var as_select_default = /* @__PURE__ */ defineComponent({
|
|
|
151
153
|
type: Object,
|
|
152
154
|
required: false
|
|
153
155
|
},
|
|
156
|
+
valueLabel: {
|
|
157
|
+
type: String,
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
154
160
|
singularLabel: {
|
|
155
161
|
type: String,
|
|
156
162
|
required: false
|
|
@@ -217,6 +223,10 @@ var as_select_default = /* @__PURE__ */ defineComponent({
|
|
|
217
223
|
}
|
|
218
224
|
},
|
|
219
225
|
setup(__props) {
|
|
226
|
+
const props = __props;
|
|
227
|
+
const prop = props.field?.prop;
|
|
228
|
+
const listsDictionary = !!props.valueHelp && !!prop && !hasFieldMeta(prop, UI_FORM_OPTIONS) && !hasFieldMeta(prop, UI_FORM_FN_OPTIONS) && extractFieldLiteralOptions(prop) === void 0;
|
|
229
|
+
const emptyValue = () => emptiedKey(props.field?.prop.type, props.optional);
|
|
220
230
|
return (_ctx, _cache) => {
|
|
221
231
|
return openBlock(), createBlock(as_field_shell_default, normalizeProps(guardReactiveProps(_ctx.$props)), {
|
|
222
232
|
default: withCtx(({ inputId }) => [createElementVNode("span", _hoisted_1, [withDirectives(createElementVNode("select", {
|
|
@@ -231,11 +241,14 @@ var as_select_default = /* @__PURE__ */ defineComponent({
|
|
|
231
241
|
"aria-invalid": !!__props.error || void 0,
|
|
232
242
|
"aria-describedby": __props.ariaDescribedBy,
|
|
233
243
|
"aria-label": !__props.label ? __props.name : void 0
|
|
234
|
-
}, [
|
|
244
|
+
}, [unref(listsDictionary) ? (openBlock(), createElementBlock("option", {
|
|
245
|
+
key: 0,
|
|
246
|
+
value: emptyValue()
|
|
247
|
+
}, toDisplayString(__props.placeholder), 9, _hoisted_3)) : __props.placeholder ? (openBlock(), createElementBlock("option", _hoisted_4, toDisplayString(__props.placeholder), 1)) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (opt, i) => {
|
|
235
248
|
return openBlock(), createElementBlock("option", {
|
|
236
|
-
key: unref(optKey)(opt)
|
|
249
|
+
key: `${i}:${unref(optKey)(opt)}`,
|
|
237
250
|
value: unref(optionValue)(opt)
|
|
238
|
-
}, toDisplayString(unref(optLabel)(opt)), 9,
|
|
251
|
+
}, toDisplayString(unref(optLabel)(opt)), 9, _hoisted_5);
|
|
239
252
|
}), 128))], 40, _hoisted_2), [[vModelSelect, __props.model.value]]), _cache[3] || (_cache[3] = createElementVNode("span", {
|
|
240
253
|
class: "as-select-caret i-as-chevron-down",
|
|
241
254
|
"aria-hidden": "true"
|
package/dist/as-select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_select = require("./as-select-
|
|
1
|
+
const require_as_select = require("./as-select-B_ZB1_a5.cjs");
|
|
2
2
|
module.exports = require_as_select.as_select_default;
|
package/dist/as-select.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-select.vue-
|
|
1
|
+
import { t as _default } from "./as-select.vue-C3NvSQ2N.cjs";
|
|
2
2
|
export = _default;
|
package/dist/as-select.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _default } from "./as-select.vue-
|
|
1
|
+
import { t as _default } from "./as-select.vue-BMNGb5eH.mjs";
|
|
2
2
|
export { _default as default };
|
package/dist/as-select.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_select_default } from "./as-select-
|
|
1
|
+
import { t as as_select_default } from "./as-select-C1lqeKqt.mjs";
|
|
2
2
|
export { as_select_default as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const require__shape = require("./_shape-BDO-1MzF.cjs");
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-P7p47Pbr.cjs");
|
|
3
3
|
const require_as_adornment_shell = require("./as-adornment-shell-CmS9BOFm.cjs");
|
|
4
|
-
const require_use_as_date = require("./use-as-date-
|
|
4
|
+
const require_use_as_date = require("./use-as-date-CAmqx1O7.cjs");
|
|
5
5
|
let vue = require("vue");
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/components/defaults/as-time.vue
|
|
@@ -135,6 +135,10 @@ var as_time_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
135
135
|
type: Object,
|
|
136
136
|
required: false
|
|
137
137
|
},
|
|
138
|
+
valueLabel: {
|
|
139
|
+
type: String,
|
|
140
|
+
required: false
|
|
141
|
+
},
|
|
138
142
|
singularLabel: {
|
|
139
143
|
type: String,
|
|
140
144
|
required: false
|