@atscript/vue-form 0.1.176 → 0.1.178
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/{as-array-DnxeuRPB.mjs → as-array-BKC7bBXf.mjs} +13 -18
- package/dist/{as-array-DjJ_GA65.cjs → as-array-C4Vv6k5I.cjs} +12 -17
- package/dist/{as-array-clear-btn-DkmJoCjN.mjs → as-array-clear-btn-ConR3zxV.mjs} +2 -2
- package/dist/{as-array-clear-btn-DSuk9U43.cjs → as-array-clear-btn-DeWeUqoX.cjs} +2 -2
- package/dist/as-array.cjs +1 -1
- package/dist/as-array.mjs +1 -1
- package/dist/{as-checkbox-BivClBCD.mjs → as-checkbox-Dux-KJVN.mjs} +3 -3
- package/dist/{as-checkbox-52v5CL8Z.cjs → as-checkbox-NjLPm4Kk.cjs} +3 -3
- package/dist/as-checkbox.cjs +1 -1
- package/dist/as-checkbox.mjs +1 -1
- package/dist/{as-collapsible-COchVoS0.cjs → as-collapsible-BXQ481-h.cjs} +4 -4
- package/dist/{as-collapsible-B_YnV9V8.mjs → as-collapsible-FoPTu4lF.mjs} +4 -4
- package/dist/as-collapsible.cjs +1 -1
- package/dist/as-collapsible.mjs +1 -1
- package/dist/{as-date-HUhD-kZ4.cjs → as-date-DSvDDvwH.cjs} +1 -1
- package/dist/{as-date-Dsv_nimP.mjs → as-date-DUUpb8ph.mjs} +1 -1
- package/dist/as-date.cjs +1 -1
- package/dist/as-date.mjs +1 -1
- package/dist/{as-datetime-CiL-vlD2.cjs → as-datetime-DZBCBpov.cjs} +1 -1
- package/dist/{as-datetime-BxMIrM_M.mjs → as-datetime-Dy1tGMrO.mjs} +1 -1
- package/dist/as-datetime.cjs +1 -1
- package/dist/as-datetime.mjs +1 -1
- package/dist/{as-decimal-DA24-Wtp.cjs → as-decimal-DYBEUokN.cjs} +2 -2
- package/dist/{as-decimal-DegSeh2G.mjs → as-decimal-HvUQANde.mjs} +2 -2
- package/dist/as-decimal.cjs +1 -1
- package/dist/as-decimal.mjs +1 -1
- package/dist/{as-field-CeJbqaGj.cjs → as-field-C3lIiHCI.cjs} +7 -11
- package/dist/{as-field-D6clFBPR.mjs → as-field-R3KYssad.mjs} +8 -12
- package/dist/{as-field-shell-rghztVd7.cjs → as-field-shell-BOeyo1FP.cjs} +4 -4
- package/dist/{as-field-shell-IaUBze1S.mjs → as-field-shell-BQPySL71.mjs} +4 -4
- package/dist/as-field-shell.cjs +1 -1
- package/dist/as-field-shell.mjs +1 -1
- package/dist/as-field.cjs +1 -1
- package/dist/as-field.mjs +1 -1
- package/dist/{as-form-D-RQUPnK.mjs → as-form-B9hRTvod.mjs} +68 -33
- package/dist/{as-form-Bo-QNGot.cjs → as-form-DroFS2lv.cjs} +67 -32
- 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-Bxq1IR_f.d.mts → as-form.vue-BO3bQmRB.d.mts} +34 -15
- package/dist/{as-form.vue-Bx1yZIBk.d.cts → as-form.vue-DT1D4aMl.d.cts} +34 -15
- package/dist/{as-input-DGvRZOy5.cjs → as-input-BRJYoNF0.cjs} +1 -1
- package/dist/{as-input-CijlzZ8Q.mjs → as-input-C3MkFToh.mjs} +1 -1
- package/dist/as-input.cjs +1 -1
- package/dist/as-input.mjs +1 -1
- package/dist/{as-iterator-D643RugN.cjs → as-iterator-BB7DB04y.cjs} +2 -2
- package/dist/{as-iterator-CgGSiI_d.mjs → as-iterator-Bd1fXGs6.mjs} +2 -2
- package/dist/as-iterator.cjs +1 -1
- package/dist/as-iterator.mjs +1 -1
- package/dist/{as-multi-select-BXnZLgjt.mjs → as-multi-select-4awmF8mN.mjs} +2 -2
- package/dist/{as-multi-select-JUB05J_p.cjs → as-multi-select-DPpAKUzQ.cjs} +2 -2
- package/dist/as-multi-select.cjs +1 -1
- package/dist/as-multi-select.mjs +1 -1
- package/dist/{as-number-TfNY5CgX.cjs → as-number-CAVTkGcp.cjs} +2 -2
- package/dist/{as-number-DkeEBWva.mjs → as-number-WcRwaMOt.mjs} +2 -2
- package/dist/as-number.cjs +1 -1
- package/dist/as-number.mjs +1 -1
- package/dist/{as-object-BAsjdh_N.mjs → as-object-3Tlk8bjl.mjs} +6 -6
- package/dist/{as-object-lKSwKkt7.cjs → as-object-Bnyck833.cjs} +6 -6
- package/dist/as-object.cjs +1 -1
- package/dist/as-object.mjs +1 -1
- package/dist/{as-radio-CHwzhcQE.mjs → as-radio-8udWHC-l.mjs} +1 -1
- package/dist/{as-radio-DEHsBgwQ.cjs → as-radio-P9rzMYNp.cjs} +1 -1
- package/dist/as-radio.cjs +1 -1
- package/dist/as-radio.mjs +1 -1
- package/dist/{as-ref-DgdRW4ST.cjs → as-ref-BvPM3G73.cjs} +34 -12
- package/dist/{as-ref-N0dohgyv.mjs → as-ref-C-U7wotf.mjs} +35 -13
- package/dist/as-ref.cjs +1 -1
- package/dist/as-ref.mjs +1 -1
- package/dist/{as-select-bmYhMEV_.mjs → as-select-3fZCzWku.mjs} +1 -1
- package/dist/{as-select-YPLFDuAQ.cjs → as-select-DVbegHcv.cjs} +1 -1
- package/dist/as-select.cjs +1 -1
- package/dist/as-select.mjs +1 -1
- package/dist/{as-time-D107-bEJ.mjs → as-time-BtTiGWOr.mjs} +1 -1
- package/dist/{as-time-21ZSGDiq.cjs → as-time-W1ExfNxT.cjs} +1 -1
- package/dist/as-time.cjs +1 -1
- package/dist/as-time.mjs +1 -1
- package/dist/{as-tuple-gNyJxwi4.mjs → as-tuple-CBOp5N1c.mjs} +10 -11
- package/dist/{as-tuple-5nsBvO-n.cjs → as-tuple-dfvCxm4R.cjs} +9 -10
- package/dist/as-tuple.cjs +1 -1
- package/dist/as-tuple.mjs +1 -1
- package/dist/{as-union-BuCn5dN6.cjs → as-union-B0h0AlsZ.cjs} +6 -9
- package/dist/{as-union-BLTGJOyB.mjs → as-union-izUcMyQt.mjs} +7 -10
- package/dist/as-union.cjs +1 -1
- package/dist/as-union.mjs +1 -1
- package/dist/{as-variant-picker-DJ_sqKD3.mjs → as-variant-picker-D0I5qR2w.mjs} +2 -2
- package/dist/{as-variant-picker-BxOP4dkG.cjs → as-variant-picker-oELBST6P.cjs} +2 -2
- package/dist/{focus-after-toggle-DRXAm5Xh.cjs → focus-after-toggle-B8DDrJ7d.cjs} +36 -0
- package/dist/{focus-after-toggle-CXzXFIdA.mjs → focus-after-toggle-CWw0i0B6.mjs} +31 -1
- package/dist/index.cjs +27 -27
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +27 -27
- package/dist/locale.cjs +1 -1
- package/dist/locale.mjs +1 -1
- package/dist/{use-as-model-texts-x-ioNOC1.cjs → use-as-model-texts-CLzPZ6Go.cjs} +2 -2
- package/dist/{use-as-model-texts-DJf4hBHf.mjs → use-as-model-texts-D3uf3X8L.mjs} +2 -2
- package/dist/{use-as-optional-add-flow-C7f0blhC.cjs → use-as-optional-add-flow-B7Pp6r-k.cjs} +2 -2
- package/dist/{use-as-optional-add-flow-fOglspPV.mjs → use-as-optional-add-flow-CdnxNOUT.mjs} +2 -2
- package/dist/{use-as-value-help-B2Ds6Iek.cjs → use-as-value-help-BG6aN4yQ.cjs} +4 -7
- package/dist/{use-as-value-help-C3-5RMoO.mjs → use-as-value-help-BWiBDup3.mjs} +4 -7
- package/dist/{use-form-context-ClLGWXWa.cjs → use-form-context-C5Q9Gznl.cjs} +5 -1
- package/dist/{use-form-context-D7fCP5H4.mjs → use-form-context-Cw-ETG8f.mjs} +6 -2
- package/package.json +5 -5
- /package/dist/{use-as-locale-CnNyyqcF.cjs → use-as-locale-BHltz8Wp.cjs} +0 -0
- /package/dist/{use-as-locale-BEzm7jbp.mjs → use-as-locale-WBFjL_OO.mjs} +0 -0
- /package/dist/{use-as-nested-sections-store-u1VgBJAP.cjs → use-as-nested-sections-store-ApstV9NL.cjs} +0 -0
- /package/dist/{use-as-nested-sections-store-Dfo971PK.mjs → use-as-nested-sections-store-CkrMJbnN.mjs} +0 -0
|
@@ -79,7 +79,13 @@ interface UseAsFieldOptions<TValue = any, TFormData = any, TContext = any> {
|
|
|
79
79
|
setValue: (v: TValue) => void;
|
|
80
80
|
rules?: TFormRule<TValue, TFormData, TContext>[];
|
|
81
81
|
path: () => string;
|
|
82
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Value written on form reset, after the form has reset its data to the
|
|
84
|
+
* empty-form values. Left out (the usual case), the field keeps the value
|
|
85
|
+
* that reset gives it; pass it (`undefined` included) for a value the form
|
|
86
|
+
* data does not hold, e.g. when `getValue` / `setValue` reach state outside
|
|
87
|
+
* the form data.
|
|
88
|
+
*/
|
|
83
89
|
resetValue?: TValue;
|
|
84
90
|
}
|
|
85
91
|
interface UseAsFieldReturn<TValue = any> {
|
|
@@ -339,9 +345,17 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
339
345
|
/** Errors discovered by the local validator on the most-recent submit. */
|
|
340
346
|
internalErrors: Ref<Record<string, string>>;
|
|
341
347
|
/**
|
|
342
|
-
*
|
|
343
|
-
* `
|
|
344
|
-
*
|
|
348
|
+
* Return the form's fields to what a newly created form holds
|
|
349
|
+
* (`createFormData` — annotation defaults included, optional fields absent;
|
|
350
|
+
* loaded values are not kept). Properties of the data that are not form
|
|
351
|
+
* fields (an edit form's version column, navigation rows) are left as they
|
|
352
|
+
* are. The field subtree remounts (`remountKey`); touched state, submit and
|
|
353
|
+
* live errors are cleared; a server error (`errors`) is dismissed where the
|
|
354
|
+
* reset changed the value — on other paths, and the external `__form`
|
|
355
|
+
* banner, it stays. When `trackChanges` is enabled, the post-reset state
|
|
356
|
+
* becomes the new clean baseline. Focus is left alone: `<AsForm>` moves it
|
|
357
|
+
* to the first field control when the reset removed or disabled the
|
|
358
|
+
* focused element.
|
|
345
359
|
*/
|
|
346
360
|
reset: () => Promise<void>;
|
|
347
361
|
/**
|
|
@@ -395,9 +409,10 @@ interface UseAsFormReturn<TFormData = unknown, TFormContext = unknown> {
|
|
|
395
409
|
*/
|
|
396
410
|
patch: AsFormPatchHandle | undefined;
|
|
397
411
|
/**
|
|
398
|
-
* Remount key for the field subtree. Bound as `:key` on the root `<AsField
|
|
399
|
-
*
|
|
400
|
-
*
|
|
412
|
+
* Remount key for the field subtree. Bound as `:key` on the root `<AsField>`
|
|
413
|
+
* (and on the pushed-down fields). Bumped by every `reset()`, and — with
|
|
414
|
+
* `trackChanges` — when `patch.rebaseOnto` or a swap of the data's `value`
|
|
415
|
+
* lands a different union variant, forcing the variant picker to re-detect.
|
|
401
416
|
*/
|
|
402
417
|
remountKey: Ref<number>;
|
|
403
418
|
/** Dispatch an action — invoked by `<AsAction>`. */
|
|
@@ -550,7 +565,11 @@ interface UseAsValueHelpReturn {
|
|
|
550
565
|
labelIsFkValue: ComputedRef<boolean>;
|
|
551
566
|
kickoff: () => Promise<void>;
|
|
552
567
|
selectItem: (item: Record<string, unknown>) => void;
|
|
553
|
-
|
|
568
|
+
/**
|
|
569
|
+
* Clear the picker: set the model to `value` (`undefined` — unset — when
|
|
570
|
+
* omitted) and empty the search text.
|
|
571
|
+
*/
|
|
572
|
+
clear: (value?: unknown) => void;
|
|
554
573
|
}
|
|
555
574
|
declare function useAsValueHelp(options: UseAsValueHelpOptions): UseAsValueHelpReturn;
|
|
556
575
|
//#endregion
|
|
@@ -1232,6 +1251,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1232
1251
|
attrs: any;
|
|
1233
1252
|
slots: {
|
|
1234
1253
|
'form.header'?: (props: {
|
|
1254
|
+
reset: () => Promise<void>;
|
|
1235
1255
|
title: string | undefined;
|
|
1236
1256
|
description: string | undefined;
|
|
1237
1257
|
data: TFormData;
|
|
@@ -1241,7 +1261,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1241
1261
|
loading: boolean;
|
|
1242
1262
|
submitText: string;
|
|
1243
1263
|
submit: () => void;
|
|
1244
|
-
reset: () => Promise<void>;
|
|
1245
1264
|
clearErrors: () => void;
|
|
1246
1265
|
setErrors: (errors: Record<string, string>) => void;
|
|
1247
1266
|
dismissError: (path: string) => void;
|
|
@@ -1255,6 +1274,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1255
1274
|
}) => any;
|
|
1256
1275
|
} & {
|
|
1257
1276
|
'form.before'?: (props: {
|
|
1277
|
+
reset: () => Promise<void>;
|
|
1258
1278
|
title: string | undefined;
|
|
1259
1279
|
description: string | undefined;
|
|
1260
1280
|
data: TFormData;
|
|
@@ -1264,7 +1284,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1264
1284
|
loading: boolean;
|
|
1265
1285
|
submitText: string;
|
|
1266
1286
|
submit: () => void;
|
|
1267
|
-
reset: () => Promise<void>;
|
|
1268
1287
|
clearErrors: () => void;
|
|
1269
1288
|
setErrors: (errors: Record<string, string>) => void;
|
|
1270
1289
|
dismissError: (path: string) => void;
|
|
@@ -1278,6 +1297,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1278
1297
|
}) => any;
|
|
1279
1298
|
} & {
|
|
1280
1299
|
'form.after'?: (props: {
|
|
1300
|
+
reset: () => Promise<void>;
|
|
1281
1301
|
title: string | undefined;
|
|
1282
1302
|
description: string | undefined;
|
|
1283
1303
|
data: TFormData;
|
|
@@ -1287,7 +1307,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1287
1307
|
loading: boolean;
|
|
1288
1308
|
submitText: string;
|
|
1289
1309
|
submit: () => void;
|
|
1290
|
-
reset: () => Promise<void>;
|
|
1291
1310
|
clearErrors: () => void;
|
|
1292
1311
|
setErrors: (errors: Record<string, string>) => void;
|
|
1293
1312
|
dismissError: (path: string) => void;
|
|
@@ -1303,6 +1322,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1303
1322
|
'form.error'?: (props: {
|
|
1304
1323
|
message: string;
|
|
1305
1324
|
dismiss: () => void;
|
|
1325
|
+
reset: () => Promise<void>;
|
|
1306
1326
|
title: string | undefined;
|
|
1307
1327
|
description: string | undefined;
|
|
1308
1328
|
data: TFormData;
|
|
@@ -1312,7 +1332,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1312
1332
|
loading: boolean;
|
|
1313
1333
|
submitText: string;
|
|
1314
1334
|
submit: () => void;
|
|
1315
|
-
reset: () => Promise<void>;
|
|
1316
1335
|
clearErrors: () => void;
|
|
1317
1336
|
setErrors: (errors: Record<string, string>) => void;
|
|
1318
1337
|
dismissError: (path: string) => void;
|
|
@@ -1327,6 +1346,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1327
1346
|
} & {
|
|
1328
1347
|
'form.submit'?: (props: {
|
|
1329
1348
|
text: string;
|
|
1349
|
+
reset: () => Promise<void>;
|
|
1330
1350
|
title: string | undefined;
|
|
1331
1351
|
description: string | undefined;
|
|
1332
1352
|
data: TFormData;
|
|
@@ -1336,7 +1356,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1336
1356
|
loading: boolean;
|
|
1337
1357
|
submitText: string;
|
|
1338
1358
|
submit: () => void;
|
|
1339
|
-
reset: () => Promise<void>;
|
|
1340
1359
|
clearErrors: () => void;
|
|
1341
1360
|
setErrors: (errors: Record<string, string>) => void;
|
|
1342
1361
|
dismissError: (path: string) => void;
|
|
@@ -1350,6 +1369,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1350
1369
|
}) => any;
|
|
1351
1370
|
} & {
|
|
1352
1371
|
'form.footer'?: (props: {
|
|
1372
|
+
reset: () => Promise<void>;
|
|
1353
1373
|
title: string | undefined;
|
|
1354
1374
|
description: string | undefined;
|
|
1355
1375
|
data: TFormData;
|
|
@@ -1359,7 +1379,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1359
1379
|
loading: boolean;
|
|
1360
1380
|
submitText: string;
|
|
1361
1381
|
submit: () => void;
|
|
1362
|
-
reset: () => Promise<void>;
|
|
1363
1382
|
clearErrors: () => void;
|
|
1364
1383
|
setErrors: (errors: Record<string, string>) => void;
|
|
1365
1384
|
dismissError: (path: string) => void;
|
|
@@ -1373,6 +1392,7 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1373
1392
|
}) => any;
|
|
1374
1393
|
} & {
|
|
1375
1394
|
'form.loading'?: (props: {
|
|
1395
|
+
reset: () => Promise<void>;
|
|
1376
1396
|
title: string | undefined;
|
|
1377
1397
|
description: string | undefined;
|
|
1378
1398
|
data: TFormData;
|
|
@@ -1382,7 +1402,6 @@ declare const __VLS_export: <TFormData = any, TFormContext = any>(__VLS_props: N
|
|
|
1382
1402
|
loading: boolean;
|
|
1383
1403
|
submitText: string;
|
|
1384
1404
|
submit: () => void;
|
|
1385
|
-
reset: () => Promise<void>;
|
|
1386
1405
|
clearErrors: () => void;
|
|
1387
1406
|
setErrors: (errors: Record<string, string>) => void;
|
|
1388
1407
|
dismissError: (path: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
2
2
|
const require_as_input_control = require("./as-input-control-DAbaW7GG.cjs");
|
|
3
3
|
const require_as_adornment_shell = require("./as-adornment-shell-CmS9BOFm.cjs");
|
|
4
4
|
let vue = require("vue");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
2
2
|
import { t as as_input_control_default } from "./as-input-control-B3h--Qe0.mjs";
|
|
3
3
|
import { t as as_adornment_shell_default } from "./as-adornment-shell-CBaksXGT.mjs";
|
|
4
4
|
import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, withCtx } from "vue";
|
package/dist/as-input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_input = require("./as-input-
|
|
1
|
+
const require_as_input = require("./as-input-BRJYoNF0.cjs");
|
|
2
2
|
module.exports = require_as_input.as_input_default;
|
package/dist/as-input.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_input_default } from "./as-input-
|
|
1
|
+
import { t as as_input_default } from "./as-input-C3MkFToh.mjs";
|
|
2
2
|
export { as_input_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_form_context = require("./use-form-context-
|
|
2
|
-
const require_as_field = require("./as-field-
|
|
1
|
+
const require_use_form_context = require("./use-form-context-C5Q9Gznl.cjs");
|
|
2
|
+
const require_as_field = require("./as-field-C3lIiHCI.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui = require("@atscript/ui");
|
|
5
5
|
//#region src/composables/use-as-level.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as PATH_PREFIX_KEY, h as LEVEL_KEY } from "./use-form-context-
|
|
2
|
-
import { t as as_field_default } from "./as-field-
|
|
1
|
+
import { _ as PATH_PREFIX_KEY, h as LEVEL_KEY } from "./use-form-context-Cw-ETG8f.mjs";
|
|
2
|
+
import { t as as_field_default } from "./as-field-R3KYssad.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createElementBlock, defineComponent, inject, openBlock, provide, renderList } from "vue";
|
|
4
4
|
import { joinPath } from "@atscript/ui";
|
|
5
5
|
//#region src/composables/use-as-level.ts
|
package/dist/as-iterator.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_iterator = require("./as-iterator-
|
|
1
|
+
const require_as_iterator = require("./as-iterator-BB7DB04y.cjs");
|
|
2
2
|
module.exports = require_as_iterator.as_iterator_default;
|
package/dist/as-iterator.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
1
|
+
import { t as as_iterator_default } from "./as-iterator-Bd1fXGs6.mjs";
|
|
2
2
|
export { as_iterator_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as useAsTexts } from "./use-as-locale-
|
|
2
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { o as useAsTexts } from "./use-as-locale-WBFjL_OO.mjs";
|
|
2
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
4
4
|
import { hasFieldMeta, optKey, optLabel, optionValue } from "@atscript/ui";
|
|
5
5
|
import { ComboboxAnchor, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxPortal, ComboboxRoot, ComboboxViewport, TagsInputInput, TagsInputItem, TagsInputItemDelete, TagsInputItemText, TagsInputRoot } from "reka-ui";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_as_locale = require("./use-as-locale-
|
|
2
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
3
3
|
let vue = require("vue");
|
|
4
4
|
let _atscript_ui = require("@atscript/ui");
|
|
5
5
|
let reka_ui = require("reka-ui");
|
package/dist/as-multi-select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_multi_select = require("./as-multi-select-
|
|
1
|
+
const require_as_multi_select = require("./as-multi-select-DPpAKUzQ.cjs");
|
|
2
2
|
module.exports = require_as_multi_select.as_multi_select_default;
|
package/dist/as-multi-select.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_multi_select_default } from "./as-multi-select-
|
|
1
|
+
import { t as as_multi_select_default } from "./as-multi-select-4awmF8mN.mjs";
|
|
2
2
|
export { as_multi_select_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_use_as_locale = require("./use-as-locale-
|
|
2
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
3
3
|
const require__shape = require("./_shape-C-TxQCFa.cjs");
|
|
4
4
|
const require_as_input_control = require("./as-input-control-DAbaW7GG.cjs");
|
|
5
5
|
let vue = require("vue");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as useAsLocale } from "./use-as-locale-
|
|
2
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { a as useAsLocale } from "./use-as-locale-WBFjL_OO.mjs";
|
|
2
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
3
3
|
import { n as committedValue } from "./_shape-bdsPEB8P.mjs";
|
|
4
4
|
import { t as as_input_control_default } from "./as-input-control-B3h--Qe0.mjs";
|
|
5
5
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeClass, normalizeProps, openBlock, ref, toDisplayString, withCtx } from "vue";
|
package/dist/as-number.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_number = require("./as-number-
|
|
1
|
+
const require_as_number = require("./as-number-CAVTkGcp.cjs");
|
|
2
2
|
module.exports = require_as_number.as_number_default;
|
package/dist/as-number.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_number_default } from "./as-number-
|
|
1
|
+
import { t as as_number_default } from "./as-number-WcRwaMOt.mjs";
|
|
2
2
|
export { as_number_default as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as useAsUnionVariant } from "./use-form-context-
|
|
2
|
-
import { o as useAsTexts } from "./use-as-locale-
|
|
3
|
-
import { t as as_iterator_default } from "./as-iterator-
|
|
4
|
-
import { t as as_collapsible_default } from "./as-collapsible-
|
|
5
|
-
import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-
|
|
6
|
-
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-
|
|
1
|
+
import { n as useAsUnionVariant } from "./use-form-context-Cw-ETG8f.mjs";
|
|
2
|
+
import { o as useAsTexts } from "./use-as-locale-WBFjL_OO.mjs";
|
|
3
|
+
import { t as as_iterator_default } from "./as-iterator-Bd1fXGs6.mjs";
|
|
4
|
+
import { t as as_collapsible_default } from "./as-collapsible-FoPTu4lF.mjs";
|
|
5
|
+
import { n as as_optional_clear_default, t as as_variant_picker_default } from "./as-variant-picker-D0I5qR2w.mjs";
|
|
6
|
+
import { t as useAsOptionalAddFlow } from "./use-as-optional-add-flow-CdnxNOUT.mjs";
|
|
7
7
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, useTemplateRef, vShow, withCtx, withDirectives, withModifiers } from "vue";
|
|
8
8
|
import { isObjectField } from "@atscript/ui";
|
|
9
9
|
//#region src/components/defaults/as-object.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_use_form_context = require("./use-form-context-
|
|
2
|
-
const require_use_as_locale = require("./use-as-locale-
|
|
3
|
-
const require_as_iterator = require("./as-iterator-
|
|
4
|
-
const require_as_collapsible = require("./as-collapsible-
|
|
5
|
-
const require_as_variant_picker = require("./as-variant-picker-
|
|
6
|
-
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-
|
|
1
|
+
const require_use_form_context = require("./use-form-context-C5Q9Gznl.cjs");
|
|
2
|
+
const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
|
|
3
|
+
const require_as_iterator = require("./as-iterator-BB7DB04y.cjs");
|
|
4
|
+
const require_as_collapsible = require("./as-collapsible-BXQ481-h.cjs");
|
|
5
|
+
const require_as_variant_picker = require("./as-variant-picker-oELBST6P.cjs");
|
|
6
|
+
const require_use_as_optional_add_flow = require("./use-as-optional-add-flow-B7Pp6r-k.cjs");
|
|
7
7
|
let vue = require("vue");
|
|
8
8
|
let _atscript_ui = require("@atscript/ui");
|
|
9
9
|
//#region src/components/defaults/as-object.vue?vue&type=script&setup=true&lang.ts
|
package/dist/as-object.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_object = require("./as-object-
|
|
1
|
+
const require_as_object = require("./as-object-Bnyck833.cjs");
|
|
2
2
|
module.exports = require_as_object.as_object_default;
|
package/dist/as-object.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_object_default } from "./as-object-
|
|
1
|
+
import { t as as_object_default } from "./as-object-3Tlk8bjl.mjs";
|
|
2
2
|
export { as_object_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
2
2
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeProps, openBlock, renderList, toDisplayString, unref, vModelRadio, withCtx, withDirectives } from "vue";
|
|
3
3
|
import { optKey, optLabel, optionValue } from "@atscript/ui";
|
|
4
4
|
//#region src/components/defaults/as-radio.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
2
2
|
let vue = require("vue");
|
|
3
3
|
let _atscript_ui = require("@atscript/ui");
|
|
4
4
|
//#region src/components/defaults/as-radio.vue?vue&type=script&setup=true&lang.ts
|
package/dist/as-radio.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const require_as_radio = require("./as-radio-
|
|
1
|
+
const require_as_radio = require("./as-radio-P9rzMYNp.cjs");
|
|
2
2
|
module.exports = require_as_radio.as_radio_default;
|
package/dist/as-radio.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as as_radio_default } from "./as-radio-
|
|
1
|
+
import { t as as_radio_default } from "./as-radio-8udWHC-l.mjs";
|
|
2
2
|
export { as_radio_default as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
const require_use_as_locale = require("./use-as-locale-
|
|
2
|
-
const require_use_as_value_help = require("./use-as-value-help-
|
|
3
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_use_as_locale = require("./use-as-locale-BHltz8Wp.cjs");
|
|
2
|
+
const require_use_as_value_help = require("./use-as-value-help-BG6aN4yQ.cjs");
|
|
3
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
4
|
+
const require__shape = require("./_shape-C-TxQCFa.cjs");
|
|
4
5
|
const require_as_input_control = require("./as-input-control-DAbaW7GG.cjs");
|
|
5
6
|
let vue = require("vue");
|
|
6
7
|
let reka_ui = require("reka-ui");
|
|
@@ -229,23 +230,39 @@ var as_ref_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
229
230
|
const status = vh?.status;
|
|
230
231
|
const searching = vh?.searching;
|
|
231
232
|
const open = (0, vue.ref)(false);
|
|
233
|
+
const inputText = (0, vue.ref)("");
|
|
232
234
|
function onSearchInput(e) {
|
|
233
235
|
if (vh) vh.searchText.value = e.target.value;
|
|
234
236
|
}
|
|
237
|
+
(0, vue.watch)(open, (isOpen) => {
|
|
238
|
+
if (!isOpen && vh) vh.searchText.value = "";
|
|
239
|
+
});
|
|
240
|
+
const keyType = props.field?.prop.type;
|
|
241
|
+
const stringKey = keyType?.kind === "" && keyType.designType === "string";
|
|
242
|
+
const emptyValue = () => stringKey ? require__shape.committedText("", props.optional) : require__shape.committedValue(null, props.optional);
|
|
243
|
+
const showClear = (0, vue.computed)(() => {
|
|
244
|
+
if (props.disabled || props.readonly || !vh) return false;
|
|
245
|
+
const v = props.model.value;
|
|
246
|
+
return vh.searchText.value !== "" || v != null && v !== emptyValue();
|
|
247
|
+
});
|
|
248
|
+
function onClear() {
|
|
249
|
+
inputText.value = "";
|
|
250
|
+
vh?.clear(emptyValue());
|
|
251
|
+
}
|
|
235
252
|
const { t } = require_use_as_locale.useAsTexts();
|
|
236
253
|
return (_ctx, _cache) => {
|
|
237
254
|
return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(_ctx.$props)), {
|
|
238
255
|
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, {
|
|
239
256
|
type: "text",
|
|
240
257
|
"input-id": inputId
|
|
241
|
-
}), null, 16, ["input-id"])) : (0, vue.unref)(status) === "loading" || !(0, vue.unref)(resolved) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [..._cache[
|
|
258
|
+
}), null, 16, ["input-id"])) : (0, vue.unref)(status) === "loading" || !(0, vue.unref)(resolved) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [..._cache[4] || (_cache[4] = [(0, vue.createElementVNode)("span", {
|
|
242
259
|
class: "as-ref-spinner",
|
|
243
260
|
"aria-hidden": "true"
|
|
244
261
|
}, 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), {
|
|
245
262
|
modelValue: __props.model.value,
|
|
246
|
-
"onUpdate:modelValue": _cache[
|
|
263
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __props.model.value = $event),
|
|
247
264
|
open: open.value,
|
|
248
|
-
"onUpdate:open": _cache[
|
|
265
|
+
"onUpdate:open": _cache[3] || (_cache[3] = ($event) => open.value = $event),
|
|
249
266
|
disabled: __props.disabled,
|
|
250
267
|
name: __props.name,
|
|
251
268
|
"ignore-filter": "",
|
|
@@ -253,6 +270,8 @@ var as_ref_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
253
270
|
}, {
|
|
254
271
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxAnchor), { class: "as-ref-anchor" }, {
|
|
255
272
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxInput), {
|
|
273
|
+
modelValue: inputText.value,
|
|
274
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputText.value = $event),
|
|
256
275
|
id: inputId,
|
|
257
276
|
placeholder: __props.placeholder,
|
|
258
277
|
disabled: __props.disabled,
|
|
@@ -262,10 +281,11 @@ var as_ref_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
262
281
|
"aria-describedby": __props.ariaDescribedBy,
|
|
263
282
|
"aria-label": !__props.label ? __props.name : void 0,
|
|
264
283
|
class: "as-ref-input",
|
|
265
|
-
onFocus: _cache[
|
|
284
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => open.value = true),
|
|
266
285
|
onInput: onSearchInput,
|
|
267
286
|
onBlur: __props.onBlur
|
|
268
287
|
}, null, 8, [
|
|
288
|
+
"modelValue",
|
|
269
289
|
"id",
|
|
270
290
|
"placeholder",
|
|
271
291
|
"disabled",
|
|
@@ -275,13 +295,15 @@ var as_ref_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
275
295
|
"aria-describedby",
|
|
276
296
|
"aria-label",
|
|
277
297
|
"onBlur"
|
|
278
|
-
]),
|
|
298
|
+
]), showClear.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(reka_ui.ComboboxCancel), {
|
|
279
299
|
key: 0,
|
|
280
|
-
class: "as-ref-clear"
|
|
300
|
+
class: "as-ref-clear",
|
|
301
|
+
"aria-label": __props.label ? (0, vue.unref)(t)("UI_FORM_CLEAR_FIELD", { field: __props.label }) : (0, vue.unref)(t)("UI_CLEAR"),
|
|
302
|
+
onClick: onClear
|
|
281
303
|
}, {
|
|
282
|
-
default: (0, vue.withCtx)(() => [..._cache[
|
|
304
|
+
default: (0, vue.withCtx)(() => [..._cache[5] || (_cache[5] = [(0, vue.createTextVNode)(" × ", -1)])]),
|
|
283
305
|
_: 1
|
|
284
|
-
})) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
306
|
+
}, 8, ["aria-label"])) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
285
307
|
_: 2
|
|
286
308
|
}, 1024), (0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxContent), {
|
|
287
309
|
position: "popper",
|
|
@@ -290,7 +312,7 @@ var as_ref_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
290
312
|
class: "as-ref-content"
|
|
291
313
|
}, {
|
|
292
314
|
default: (0, vue.withCtx)(() => [(0, vue.createVNode)((0, vue.unref)(reka_ui.ComboboxViewport), { class: "as-ref-viewport" }, {
|
|
293
|
-
default: (0, vue.withCtx)(() => [(0, vue.unref)(searching) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2, [..._cache[
|
|
315
|
+
default: (0, vue.withCtx)(() => [(0, vue.unref)(searching) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2, [..._cache[6] || (_cache[6] = [(0, vue.createElementVNode)("span", {
|
|
294
316
|
class: "as-ref-spinner",
|
|
295
317
|
"aria-hidden": "true"
|
|
296
318
|
}, 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) => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { o as useAsTexts } from "./use-as-locale-
|
|
2
|
-
import { n as useAsValueHelp } from "./use-as-value-help-
|
|
3
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { o as useAsTexts } from "./use-as-locale-WBFjL_OO.mjs";
|
|
2
|
+
import { n as useAsValueHelp } from "./use-as-value-help-BWiBDup3.mjs";
|
|
3
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
4
|
+
import { n as committedValue, t as committedText } from "./_shape-bdsPEB8P.mjs";
|
|
4
5
|
import { t as as_input_control_default } from "./as-input-control-B3h--Qe0.mjs";
|
|
5
|
-
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, ref, renderList, toDisplayString, unref, withCtx } from "vue";
|
|
6
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, ref, renderList, toDisplayString, unref, watch, withCtx } from "vue";
|
|
6
7
|
import { ComboboxAnchor, ComboboxCancel, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxRoot, ComboboxViewport } from "reka-ui";
|
|
7
8
|
//#region src/components/defaults/as-ref.vue?vue&type=script&setup=true&lang.ts
|
|
8
9
|
const _hoisted_1 = {
|
|
@@ -229,23 +230,39 @@ var as_ref_default = /* @__PURE__ */ defineComponent({
|
|
|
229
230
|
const status = vh?.status;
|
|
230
231
|
const searching = vh?.searching;
|
|
231
232
|
const open = ref(false);
|
|
233
|
+
const inputText = ref("");
|
|
232
234
|
function onSearchInput(e) {
|
|
233
235
|
if (vh) vh.searchText.value = e.target.value;
|
|
234
236
|
}
|
|
237
|
+
watch(open, (isOpen) => {
|
|
238
|
+
if (!isOpen && vh) vh.searchText.value = "";
|
|
239
|
+
});
|
|
240
|
+
const keyType = props.field?.prop.type;
|
|
241
|
+
const stringKey = keyType?.kind === "" && keyType.designType === "string";
|
|
242
|
+
const emptyValue = () => stringKey ? committedText("", props.optional) : committedValue(null, props.optional);
|
|
243
|
+
const showClear = computed(() => {
|
|
244
|
+
if (props.disabled || props.readonly || !vh) return false;
|
|
245
|
+
const v = props.model.value;
|
|
246
|
+
return vh.searchText.value !== "" || v != null && v !== emptyValue();
|
|
247
|
+
});
|
|
248
|
+
function onClear() {
|
|
249
|
+
inputText.value = "";
|
|
250
|
+
vh?.clear(emptyValue());
|
|
251
|
+
}
|
|
235
252
|
const { t } = useAsTexts();
|
|
236
253
|
return (_ctx, _cache) => {
|
|
237
254
|
return openBlock(), createBlock(as_field_shell_default, normalizeProps(guardReactiveProps(_ctx.$props)), {
|
|
238
255
|
default: withCtx(({ inputId }) => [createCommentVNode(" Fallback: plain text input when no ValueHelpInfo or target meta unreachable "), !unref(info) || !unref(vh) || unref(status) === "error" ? (openBlock(), createBlock(as_input_control_default, mergeProps({ key: 0 }, _ctx.$props, {
|
|
239
256
|
type: "text",
|
|
240
257
|
"input-id": inputId
|
|
241
|
-
}), null, 16, ["input-id"])) : unref(status) === "loading" || !unref(resolved) ? (openBlock(), createElementBlock("div", _hoisted_1, [..._cache[
|
|
258
|
+
}), null, 16, ["input-id"])) : unref(status) === "loading" || !unref(resolved) ? (openBlock(), createElementBlock("div", _hoisted_1, [..._cache[4] || (_cache[4] = [createElementVNode("span", {
|
|
242
259
|
class: "as-ref-spinner",
|
|
243
260
|
"aria-hidden": "true"
|
|
244
261
|
}, null, -1)])])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" reka-ui Combobox for FK ref fields — value is the raw FK id. "), createVNode(unref(ComboboxRoot), {
|
|
245
262
|
modelValue: __props.model.value,
|
|
246
|
-
"onUpdate:modelValue": _cache[
|
|
263
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => __props.model.value = $event),
|
|
247
264
|
open: open.value,
|
|
248
|
-
"onUpdate:open": _cache[
|
|
265
|
+
"onUpdate:open": _cache[3] || (_cache[3] = ($event) => open.value = $event),
|
|
249
266
|
disabled: __props.disabled,
|
|
250
267
|
name: __props.name,
|
|
251
268
|
"ignore-filter": "",
|
|
@@ -253,6 +270,8 @@ var as_ref_default = /* @__PURE__ */ defineComponent({
|
|
|
253
270
|
}, {
|
|
254
271
|
default: withCtx(() => [createVNode(unref(ComboboxAnchor), { class: "as-ref-anchor" }, {
|
|
255
272
|
default: withCtx(() => [createVNode(unref(ComboboxInput), {
|
|
273
|
+
modelValue: inputText.value,
|
|
274
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputText.value = $event),
|
|
256
275
|
id: inputId,
|
|
257
276
|
placeholder: __props.placeholder,
|
|
258
277
|
disabled: __props.disabled,
|
|
@@ -262,10 +281,11 @@ var as_ref_default = /* @__PURE__ */ defineComponent({
|
|
|
262
281
|
"aria-describedby": __props.ariaDescribedBy,
|
|
263
282
|
"aria-label": !__props.label ? __props.name : void 0,
|
|
264
283
|
class: "as-ref-input",
|
|
265
|
-
onFocus: _cache[
|
|
284
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => open.value = true),
|
|
266
285
|
onInput: onSearchInput,
|
|
267
286
|
onBlur: __props.onBlur
|
|
268
287
|
}, null, 8, [
|
|
288
|
+
"modelValue",
|
|
269
289
|
"id",
|
|
270
290
|
"placeholder",
|
|
271
291
|
"disabled",
|
|
@@ -275,13 +295,15 @@ var as_ref_default = /* @__PURE__ */ defineComponent({
|
|
|
275
295
|
"aria-describedby",
|
|
276
296
|
"aria-label",
|
|
277
297
|
"onBlur"
|
|
278
|
-
]),
|
|
298
|
+
]), showClear.value ? (openBlock(), createBlock(unref(ComboboxCancel), {
|
|
279
299
|
key: 0,
|
|
280
|
-
class: "as-ref-clear"
|
|
300
|
+
class: "as-ref-clear",
|
|
301
|
+
"aria-label": __props.label ? unref(t)("UI_FORM_CLEAR_FIELD", { field: __props.label }) : unref(t)("UI_CLEAR"),
|
|
302
|
+
onClick: onClear
|
|
281
303
|
}, {
|
|
282
|
-
default: withCtx(() => [..._cache[
|
|
304
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" × ", -1)])]),
|
|
283
305
|
_: 1
|
|
284
|
-
})) : createCommentVNode("v-if", true)]),
|
|
306
|
+
}, 8, ["aria-label"])) : createCommentVNode("v-if", true)]),
|
|
285
307
|
_: 2
|
|
286
308
|
}, 1024), createVNode(unref(ComboboxContent), {
|
|
287
309
|
position: "popper",
|
|
@@ -290,7 +312,7 @@ var as_ref_default = /* @__PURE__ */ defineComponent({
|
|
|
290
312
|
class: "as-ref-content"
|
|
291
313
|
}, {
|
|
292
314
|
default: withCtx(() => [createVNode(unref(ComboboxViewport), { class: "as-ref-viewport" }, {
|
|
293
|
-
default: withCtx(() => [unref(searching) ? (openBlock(), createElementBlock("div", _hoisted_2, [..._cache[
|
|
315
|
+
default: withCtx(() => [unref(searching) ? (openBlock(), createElementBlock("div", _hoisted_2, [..._cache[6] || (_cache[6] = [createElementVNode("span", {
|
|
294
316
|
class: "as-ref-spinner",
|
|
295
317
|
"aria-hidden": "true"
|
|
296
318
|
}, null, -1)])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(results), (item) => {
|
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-BvPM3G73.cjs");
|
|
2
2
|
module.exports = require_as_ref.as_ref_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-C-U7wotf.mjs";
|
|
2
2
|
export { as_ref_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
2
2
|
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderList, toDisplayString, unref, vModelSelect, withCtx, withDirectives } from "vue";
|
|
3
3
|
import { optKey, optLabel, optionValue } from "@atscript/ui";
|
|
4
4
|
//#region src/components/defaults/as-select.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
2
2
|
let vue = require("vue");
|
|
3
3
|
let _atscript_ui = require("@atscript/ui");
|
|
4
4
|
//#region src/components/defaults/as-select.vue?vue&type=script&setup=true&lang.ts
|
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-DVbegHcv.cjs");
|
|
2
2
|
module.exports = require_as_select.as_select_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-3fZCzWku.mjs";
|
|
2
2
|
export { as_select_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as as_field_shell_default } from "./as-field-shell-
|
|
1
|
+
import { t as as_field_shell_default } from "./as-field-shell-BQPySL71.mjs";
|
|
2
2
|
import { n as committedValue } from "./_shape-bdsPEB8P.mjs";
|
|
3
3
|
import { t as as_adornment_shell_default } from "./as-adornment-shell-CBaksXGT.mjs";
|
|
4
4
|
import { n as as_date_control_default, t as useAsDate } from "./use-as-date-DgPRL0O2.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_as_field_shell = require("./as-field-shell-
|
|
1
|
+
const require_as_field_shell = require("./as-field-shell-BOeyo1FP.cjs");
|
|
2
2
|
const require__shape = require("./_shape-C-TxQCFa.cjs");
|
|
3
3
|
const require_as_adornment_shell = require("./as-adornment-shell-CmS9BOFm.cjs");
|
|
4
4
|
const require_use_as_date = require("./use-as-date-DFcdIfyr.cjs");
|