@atscript/vue-form 0.1.58
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/LICENSE +21 -0
- package/README.md +35 -0
- package/dist/as-action-71f9E_bL.cjs +208 -0
- package/dist/as-action-DU17rykn.mjs +203 -0
- package/dist/as-action.cjs +2 -0
- package/dist/as-action.d.cts +2 -0
- package/dist/as-action.d.mts +2 -0
- package/dist/as-action.mjs +2 -0
- package/dist/as-action.vue-BdbAOZCL.d.cts +13 -0
- package/dist/as-action.vue-CmY3eil1.d.mts +13 -0
- package/dist/as-adornment-shell-9UmdNIPR.cjs +97 -0
- package/dist/as-adornment-shell-knFiB7Ct.mjs +92 -0
- package/dist/as-array-Bn27x9cq.cjs +466 -0
- package/dist/as-array-DwarTaKP.mjs +455 -0
- package/dist/as-array-clear-btn-DAGervXL.cjs +48 -0
- package/dist/as-array-clear-btn-DIhzCKC9.mjs +43 -0
- package/dist/as-array.cjs +11 -0
- package/dist/as-array.d.cts +2 -0
- package/dist/as-array.d.mts +2 -0
- package/dist/as-array.mjs +11 -0
- package/dist/as-array.vue-C5r_ycIa.d.mts +9 -0
- package/dist/as-array.vue-CeBZRVm7.d.cts +9 -0
- package/dist/as-checkbox-B_9mwla6.mjs +285 -0
- package/dist/as-checkbox-DXGTVHPE.cjs +296 -0
- package/dist/as-checkbox.cjs +6 -0
- package/dist/as-checkbox.d.cts +2 -0
- package/dist/as-checkbox.d.mts +2 -0
- package/dist/as-checkbox.mjs +6 -0
- package/dist/as-checkbox.vue-BL53Xjmi.d.mts +9 -0
- package/dist/as-checkbox.vue-Da1KVG5J.d.cts +9 -0
- package/dist/as-collapsible-CqxeJut7.cjs +148 -0
- package/dist/as-collapsible-DtNCofNT.mjs +143 -0
- package/dist/as-date-C7tFQDkh.mjs +253 -0
- package/dist/as-date-k3MW3dmA.cjs +258 -0
- package/dist/as-date.cjs +8 -0
- package/dist/as-date.d.cts +2 -0
- package/dist/as-date.d.mts +2 -0
- package/dist/as-date.mjs +8 -0
- package/dist/as-date.vue-C5JaS3Sd.d.mts +9 -0
- package/dist/as-date.vue-e2ewS_V4.d.cts +9 -0
- package/dist/as-datetime-C030mzI5.cjs +258 -0
- package/dist/as-datetime-elcOoDT5.mjs +253 -0
- package/dist/as-datetime.cjs +8 -0
- package/dist/as-datetime.d.cts +2 -0
- package/dist/as-datetime.d.mts +2 -0
- package/dist/as-datetime.mjs +8 -0
- package/dist/as-datetime.vue-ClsSnJSV.d.mts +9 -0
- package/dist/as-datetime.vue-vfHFsby6.d.cts +9 -0
- package/dist/as-decimal-BJIGgPXU.cjs +711 -0
- package/dist/as-decimal-DtXjFPhe.mjs +694 -0
- package/dist/as-decimal.cjs +7 -0
- package/dist/as-decimal.d.cts +2 -0
- package/dist/as-decimal.d.mts +2 -0
- package/dist/as-decimal.mjs +7 -0
- package/dist/as-decimal.vue-B1pEKdjM.d.cts +25 -0
- package/dist/as-decimal.vue-CSCtYRRa.d.mts +25 -0
- package/dist/as-field-CXVjrEPQ.mjs +481 -0
- package/dist/as-field-shell-B2iTn-iM.cjs +346 -0
- package/dist/as-field-shell-Pdy3sAvr.mjs +341 -0
- package/dist/as-field-shell.cjs +5 -0
- package/dist/as-field-shell.d.cts +2 -0
- package/dist/as-field-shell.d.mts +2 -0
- package/dist/as-field-shell.mjs +5 -0
- package/dist/as-field-shell.vue-Ddnp8KxY.d.mts +37 -0
- package/dist/as-field-shell.vue-Dmt05vGD.d.cts +37 -0
- package/dist/as-field-wLYoaZnT.cjs +498 -0
- package/dist/as-field.cjs +4 -0
- package/dist/as-field.d.cts +25 -0
- package/dist/as-field.d.mts +26 -0
- package/dist/as-field.mjs +4 -0
- package/dist/as-form-CWwgyvfw.mjs +425 -0
- package/dist/as-form-DAIkyt7H.cjs +448 -0
- package/dist/as-form.cjs +7 -0
- package/dist/as-form.d.cts +2 -0
- package/dist/as-form.d.mts +2 -0
- package/dist/as-form.mjs +7 -0
- package/dist/as-form.vue-B4Bn0pbC.d.cts +158 -0
- package/dist/as-form.vue-DRrb_yoj.d.mts +158 -0
- package/dist/as-input-CpbV2k3s.cjs +231 -0
- package/dist/as-input-DIa8BzLv.mjs +226 -0
- package/dist/as-input-control-BzELjheN.mjs +266 -0
- package/dist/as-input-control-C5-DelZT.cjs +271 -0
- package/dist/as-input.cjs +8 -0
- package/dist/as-input.d.cts +2 -0
- package/dist/as-input.d.mts +2 -0
- package/dist/as-input.mjs +8 -0
- package/dist/as-input.vue-11ldp9uT.d.cts +17 -0
- package/dist/as-input.vue-fUhcvfv2.d.mts +17 -0
- package/dist/as-iterator-BYMNe6UJ.cjs +61 -0
- package/dist/as-iterator-CT5y1jyn.mjs +56 -0
- package/dist/as-iterator.cjs +5 -0
- package/dist/as-iterator.d.cts +14 -0
- package/dist/as-iterator.d.mts +15 -0
- package/dist/as-iterator.mjs +5 -0
- package/dist/as-number-BA55JIq1.cjs +387 -0
- package/dist/as-number-JPEwPK8Q.mjs +376 -0
- package/dist/as-number.cjs +8 -0
- package/dist/as-number.d.cts +2 -0
- package/dist/as-number.d.mts +2 -0
- package/dist/as-number.mjs +8 -0
- package/dist/as-number.vue-Bk-W7Vwv.d.mts +26 -0
- package/dist/as-number.vue-C2Aih98s.d.cts +26 -0
- package/dist/as-object-CT6lNEqt.mjs +300 -0
- package/dist/as-object-qUL7l8V1.cjs +305 -0
- package/dist/as-object.cjs +11 -0
- package/dist/as-object.d.cts +2 -0
- package/dist/as-object.d.mts +2 -0
- package/dist/as-object.mjs +11 -0
- package/dist/as-object.vue-CKwMyM_F.d.cts +13 -0
- package/dist/as-object.vue-Cg52b61-.d.mts +13 -0
- package/dist/as-paragraph-BGO-j4US.cjs +203 -0
- package/dist/as-paragraph-jIG_dg7_.mjs +198 -0
- package/dist/as-paragraph.cjs +2 -0
- package/dist/as-paragraph.d.cts +2 -0
- package/dist/as-paragraph.d.mts +2 -0
- package/dist/as-paragraph.mjs +2 -0
- package/dist/as-paragraph.vue-BDt0pBG-.d.cts +9 -0
- package/dist/as-paragraph.vue-C3FgTEt5.d.mts +9 -0
- package/dist/as-radio-B1N-gmoI.mjs +242 -0
- package/dist/as-radio-U3OK7bTg.cjs +247 -0
- package/dist/as-radio.cjs +6 -0
- package/dist/as-radio.d.cts +2 -0
- package/dist/as-radio.d.mts +2 -0
- package/dist/as-radio.mjs +6 -0
- package/dist/as-radio.vue-D_fweoN1.d.mts +9 -0
- package/dist/as-radio.vue-ZC4kLBnT.d.cts +9 -0
- package/dist/as-ref-CIifSSCQ.mjs +337 -0
- package/dist/as-ref-SImaIrwK.cjs +342 -0
- package/dist/as-ref.cjs +7 -0
- package/dist/as-ref.d.cts +2 -0
- package/dist/as-ref.d.mts +2 -0
- package/dist/as-ref.mjs +7 -0
- package/dist/as-ref.vue-BNeQeQpO.d.cts +9 -0
- package/dist/as-ref.vue-Cr5jeNDn.d.mts +9 -0
- package/dist/as-select-BB3uxACS.cjs +246 -0
- package/dist/as-select-UBGCVhku.mjs +241 -0
- package/dist/as-select.cjs +6 -0
- package/dist/as-select.d.cts +2 -0
- package/dist/as-select.d.mts +2 -0
- package/dist/as-select.mjs +6 -0
- package/dist/as-select.vue-Dd7huPq2.d.cts +9 -0
- package/dist/as-select.vue-RYpbZbKt.d.mts +9 -0
- package/dist/as-time-C24rvslH.cjs +258 -0
- package/dist/as-time-CQsxUs8P.mjs +253 -0
- package/dist/as-time.cjs +8 -0
- package/dist/as-time.d.cts +2 -0
- package/dist/as-time.d.mts +2 -0
- package/dist/as-time.mjs +8 -0
- package/dist/as-time.vue-huLx2B4l.d.mts +9 -0
- package/dist/as-time.vue-nMEHLXke.d.cts +9 -0
- package/dist/as-tuple-BU--cuuI.cjs +351 -0
- package/dist/as-tuple-DkI9swlW.mjs +340 -0
- package/dist/as-tuple.cjs +11 -0
- package/dist/as-tuple.d.cts +2 -0
- package/dist/as-tuple.d.mts +2 -0
- package/dist/as-tuple.mjs +11 -0
- package/dist/as-tuple.vue-CQhzOJsn.d.mts +9 -0
- package/dist/as-tuple.vue-DyskCkf-.d.cts +9 -0
- package/dist/as-union-BGvdxr3G.mjs +351 -0
- package/dist/as-union-C0btoJn3.cjs +368 -0
- package/dist/as-union.cjs +6 -0
- package/dist/as-union.d.cts +2 -0
- package/dist/as-union.d.mts +2 -0
- package/dist/as-union.mjs +6 -0
- package/dist/as-union.vue-BjlDPZn0.d.mts +9 -0
- package/dist/as-union.vue-CqjU3O10.d.cts +9 -0
- package/dist/as-variant-picker-BVs0AvjK.mjs +96 -0
- package/dist/as-variant-picker-DObQZHmm.cjs +107 -0
- package/dist/index.cjs +173 -0
- package/dist/index.d.cts +966 -0
- package/dist/index.d.mts +966 -0
- package/dist/index.mjs +105 -0
- package/dist/types-C4HRSxgV.d.cts +233 -0
- package/dist/types-Czm-Gtud.d.mts +233 -0
- package/dist/use-as-date-B7CtcRQd.cjs +329 -0
- package/dist/use-as-date-C39i9mzE.mjs +318 -0
- package/dist/use-as-dropdown-BMnEm6jF.mjs +82 -0
- package/dist/use-as-dropdown-C-Qy7Vt0.cjs +105 -0
- package/dist/use-as-locale-BrFdAgnU.mjs +23 -0
- package/dist/use-as-locale-C4z5stwD.cjs +34 -0
- package/dist/use-as-nested-sections-store-jdMRxjBE.cjs +80 -0
- package/dist/use-as-nested-sections-store-lhi0z5z1.mjs +63 -0
- package/dist/use-as-optional-add-flow-CuXEir_i.mjs +43 -0
- package/dist/use-as-optional-add-flow-STOaQWo9.cjs +48 -0
- package/dist/use-as-value-help-CBykDEjZ.mjs +89 -0
- package/dist/use-as-value-help-uANI3zWa.cjs +100 -0
- package/dist/use-form-context-Dwr8Ai1v.cjs +207 -0
- package/dist/use-form-context-bAj7UoSe.mjs +106 -0
- package/package.json +180 -0
- package/styles.d.ts +2 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
const require_use_as_locale = require("./use-as-locale-C4z5stwD.cjs");
|
|
2
|
+
const require_as_field_shell = require("./as-field-shell-B2iTn-iM.cjs");
|
|
3
|
+
let vue = require("vue");
|
|
4
|
+
let _atscript_ui = require("@atscript/ui");
|
|
5
|
+
//#region src/composables/_shape.ts
|
|
6
|
+
/**
|
|
7
|
+
* Match the input shape on commit: `null`/`undefined` model → write the
|
|
8
|
+
* canonical string (first-ever commit); pre-existing string → string;
|
|
9
|
+
* pre-existing number → number (caller opted into float; the precision
|
|
10
|
+
* loss is on them).
|
|
11
|
+
*
|
|
12
|
+
* Shared by `useAsDecimal` and `useAsNumber`. Not exported from the
|
|
13
|
+
* package barrel — internal helper, no public surface.
|
|
14
|
+
*/
|
|
15
|
+
function preserveShape(original, normalized) {
|
|
16
|
+
if (original === null || original === void 0) return normalized;
|
|
17
|
+
if (typeof original === "string") return normalized;
|
|
18
|
+
return Number(normalized);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/composables/use-as-decimal.ts
|
|
22
|
+
/**
|
|
23
|
+
* Reactive composable for decimal-typed inputs (the `AsDecimal` SFC and
|
|
24
|
+
* customer swaps built against `TAsComponentProps`).
|
|
25
|
+
*
|
|
26
|
+
* Currency-agnostic: the SFC owns prefix/suffix render concerns and
|
|
27
|
+
* resolves the effective scale via the `scale` prop set by AsField. This
|
|
28
|
+
* composable just operates on the model with the scale given to it.
|
|
29
|
+
*
|
|
30
|
+
* Storage shape is preserved on commit — string `modelValue` commits a
|
|
31
|
+
* string padded to `storageScale`; number `modelValue` commits a number.
|
|
32
|
+
* A change to the effective `scale` getter that shrinks it below the
|
|
33
|
+
* model's actual precision triggers a re-round + re-commit (the same
|
|
34
|
+
* "currency-change" behaviour as before).
|
|
35
|
+
*/
|
|
36
|
+
function useAsDecimal(opts) {
|
|
37
|
+
const localeCtx = require_use_as_locale.useAsLocale();
|
|
38
|
+
const locale = (0, vue.computed)(() => {
|
|
39
|
+
const explicit = opts.locale?.();
|
|
40
|
+
if (explicit) return explicit;
|
|
41
|
+
return localeCtx.locale.value;
|
|
42
|
+
});
|
|
43
|
+
const scale = (0, vue.computed)(() => {
|
|
44
|
+
const s = opts.scale?.();
|
|
45
|
+
if (s !== void 0) return s;
|
|
46
|
+
const storage = opts.storageScale?.();
|
|
47
|
+
if (storage !== void 0) return storage;
|
|
48
|
+
return 2;
|
|
49
|
+
});
|
|
50
|
+
const storageScale = (0, vue.computed)(() => {
|
|
51
|
+
const storage = opts.storageScale?.();
|
|
52
|
+
if (storage !== void 0) return storage;
|
|
53
|
+
const s = opts.scale?.();
|
|
54
|
+
if (s !== void 0) return s;
|
|
55
|
+
return 2;
|
|
56
|
+
});
|
|
57
|
+
const decimalSeparator = (0, vue.computed)(() => (0, _atscript_ui.getDecimalSeparator)(locale.value));
|
|
58
|
+
const thousandsSeparator = (0, vue.computed)(() => (0, _atscript_ui.getThousandsSeparator)(locale.value));
|
|
59
|
+
const rawValue = (0, vue.computed)(() => {
|
|
60
|
+
const v = opts.modelValue();
|
|
61
|
+
if (v === null || v === void 0) return "";
|
|
62
|
+
const s = typeof v === "number" ? Number.isFinite(v) ? String(v) : "" : v;
|
|
63
|
+
if (s === "") return "";
|
|
64
|
+
return (0, _atscript_ui.enforceScale)(s, scale.value);
|
|
65
|
+
});
|
|
66
|
+
const displayValue = (0, vue.computed)(() => {
|
|
67
|
+
if (rawValue.value === "") return "";
|
|
68
|
+
return (0, _atscript_ui.formatDecimalForDisplay)({
|
|
69
|
+
value: rawValue.value,
|
|
70
|
+
scale: scale.value,
|
|
71
|
+
locale: locale.value
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
const parts = (0, vue.computed)(() => {
|
|
75
|
+
const raw = rawValue.value;
|
|
76
|
+
if (raw === "") return {
|
|
77
|
+
sign: "",
|
|
78
|
+
integer: "",
|
|
79
|
+
decimal: ""
|
|
80
|
+
};
|
|
81
|
+
const split = (0, _atscript_ui.splitDecimalString)(raw);
|
|
82
|
+
return {
|
|
83
|
+
sign: split.sign,
|
|
84
|
+
integer: (0, _atscript_ui.groupInteger)(split.integer, locale.value),
|
|
85
|
+
decimal: split.decimal
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
function commit(canonical) {
|
|
89
|
+
const padded = (0, _atscript_ui.enforceScale)(canonical, storageScale.value);
|
|
90
|
+
const shaped = preserveShape(opts.modelValue(), padded);
|
|
91
|
+
opts.onCommit(shaped);
|
|
92
|
+
}
|
|
93
|
+
function setFromInput(raw) {
|
|
94
|
+
if (raw.trim() === "") {
|
|
95
|
+
opts.onCommit(null);
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
const parsed = (0, _atscript_ui.parseDecimalInput)(raw, locale.value);
|
|
99
|
+
if (parsed === null) return;
|
|
100
|
+
commit((0, _atscript_ui.enforceScale)(parsed, scale.value));
|
|
101
|
+
}
|
|
102
|
+
function setFromParts(sign, integer, decimal) {
|
|
103
|
+
if (integer === "" && decimal === "") {
|
|
104
|
+
opts.onCommit(null);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const intDigits = integer.replace(/\D/g, "");
|
|
108
|
+
const decDigits = decimal.replace(/\D/g, "");
|
|
109
|
+
commit((0, _atscript_ui.enforceScale)((0, _atscript_ui.joinDecimalString)({
|
|
110
|
+
sign,
|
|
111
|
+
integer: intDigits === "" ? "0" : intDigits,
|
|
112
|
+
decimal: decDigits
|
|
113
|
+
}), scale.value));
|
|
114
|
+
}
|
|
115
|
+
(0, vue.watch)(scale, (newScale, oldScale) => {
|
|
116
|
+
if (oldScale === void 0) return;
|
|
117
|
+
if (newScale >= oldScale) return;
|
|
118
|
+
const v = opts.modelValue();
|
|
119
|
+
if (v === null || v === void 0) return;
|
|
120
|
+
const s = typeof v === "number" ? Number.isFinite(v) ? String(v) : "" : v;
|
|
121
|
+
if (s === "") return;
|
|
122
|
+
if ((0, _atscript_ui.splitDecimalString)(s).decimal.length <= newScale) return;
|
|
123
|
+
const shaped = preserveShape(v, (0, _atscript_ui.enforceScale)((0, _atscript_ui.enforceScale)(s, newScale), storageScale.value));
|
|
124
|
+
opts.onCommit(shaped);
|
|
125
|
+
}, { flush: "sync" });
|
|
126
|
+
return {
|
|
127
|
+
scale,
|
|
128
|
+
storageScale,
|
|
129
|
+
decimalSeparator,
|
|
130
|
+
thousandsSeparator,
|
|
131
|
+
displayValue,
|
|
132
|
+
rawValue,
|
|
133
|
+
parts,
|
|
134
|
+
setFromInput,
|
|
135
|
+
setFromParts
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/composables/use-as-dual-input.ts
|
|
140
|
+
function digitsOnly(s) {
|
|
141
|
+
return s.replace(/\D/g, "");
|
|
142
|
+
}
|
|
143
|
+
function useAsDualInput(opts) {
|
|
144
|
+
const integerInput = (0, vue.ref)(null);
|
|
145
|
+
const decimalInput = (0, vue.ref)(null);
|
|
146
|
+
const focusActive = (0, vue.ref)(false);
|
|
147
|
+
const decimalDirty = (0, vue.ref)(false);
|
|
148
|
+
const decimalEdit = (0, vue.ref)(null);
|
|
149
|
+
const integerDisplay = (0, vue.computed)(() => {
|
|
150
|
+
const parts = opts.parts();
|
|
151
|
+
if (focusActive.value) {
|
|
152
|
+
const raw = opts.rawValue();
|
|
153
|
+
if (raw === "") return "";
|
|
154
|
+
const p = (0, _atscript_ui.splitDecimalString)(raw);
|
|
155
|
+
return `${p.sign}${p.integer}`;
|
|
156
|
+
}
|
|
157
|
+
return parts.sign + parts.integer;
|
|
158
|
+
});
|
|
159
|
+
const decimalDisplay = (0, vue.computed)(() => {
|
|
160
|
+
if (decimalEdit.value !== null) return decimalEdit.value;
|
|
161
|
+
if (opts.rawValue() === "") return "";
|
|
162
|
+
const parts = opts.parts();
|
|
163
|
+
const d = parts.decimal;
|
|
164
|
+
if (!/^0*$/.test(d)) return d;
|
|
165
|
+
const isZeroShaped = /^-?0*$/.test(parts.integer);
|
|
166
|
+
if (focusActive.value && !decimalDirty.value) return "";
|
|
167
|
+
if (isZeroShaped && !decimalDirty.value) return "";
|
|
168
|
+
return d;
|
|
169
|
+
});
|
|
170
|
+
function onIntegerFocus(e) {
|
|
171
|
+
focusActive.value = true;
|
|
172
|
+
decimalEdit.value = null;
|
|
173
|
+
if (e?.relatedTarget !== decimalInput.value) selectAllOnFocus(e?.target);
|
|
174
|
+
}
|
|
175
|
+
function onDecimalFocus(e) {
|
|
176
|
+
focusActive.value = true;
|
|
177
|
+
const parts = opts.parts();
|
|
178
|
+
const d = parts.decimal;
|
|
179
|
+
const i = parts.integer;
|
|
180
|
+
const isZeroShaped = i === "" || /^-?0*$/.test(i);
|
|
181
|
+
if (/^0*$/.test(d) && (isZeroShaped || !decimalDirty.value)) decimalEdit.value = "";
|
|
182
|
+
else decimalEdit.value = d;
|
|
183
|
+
if (e?.relatedTarget !== integerInput.value) selectAllOnFocus(e?.target);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* UX polish: numeric inputs always select-all on focus so the next
|
|
187
|
+
* keystroke replaces the existing value. Without this, typing `5` into
|
|
188
|
+
* "1" produces "15" / "51" depending on where the caret lands —
|
|
189
|
+
* confusing for a numeric field where most edits replace rather than
|
|
190
|
+
* append. Synchronous: selecting the pre-render value is fine because
|
|
191
|
+
* (a) Vue's :value re-binding preserves the selection range, and
|
|
192
|
+
* (b) the user only sees one frame either way.
|
|
193
|
+
*/
|
|
194
|
+
function selectAllOnFocus(target) {
|
|
195
|
+
const el = target;
|
|
196
|
+
if (!el || typeof el.select !== "function") return;
|
|
197
|
+
el.select();
|
|
198
|
+
}
|
|
199
|
+
function onBlurAll(e) {
|
|
200
|
+
const next = e.relatedTarget;
|
|
201
|
+
if (next === integerInput.value || next === decimalInput.value) return;
|
|
202
|
+
focusActive.value = false;
|
|
203
|
+
decimalDirty.value = false;
|
|
204
|
+
decimalEdit.value = null;
|
|
205
|
+
opts.onBlur?.();
|
|
206
|
+
}
|
|
207
|
+
function commitIntegerHalf(rawInteger) {
|
|
208
|
+
let sign = "";
|
|
209
|
+
let body = rawInteger;
|
|
210
|
+
if (body.startsWith("-")) {
|
|
211
|
+
sign = "-";
|
|
212
|
+
body = body.slice(1);
|
|
213
|
+
}
|
|
214
|
+
const intDigits = digitsOnly(body);
|
|
215
|
+
const curDec = opts.parts().decimal;
|
|
216
|
+
opts.setFromParts(sign, intDigits, curDec);
|
|
217
|
+
}
|
|
218
|
+
function commitDecimalHalf(rawDecimal) {
|
|
219
|
+
const decDigits = digitsOnly(rawDecimal).slice(0, opts.scale());
|
|
220
|
+
const p = (0, _atscript_ui.splitDecimalString)(opts.rawValue());
|
|
221
|
+
opts.setFromParts(p.sign, p.integer, decDigits);
|
|
222
|
+
}
|
|
223
|
+
async function focusDecimal(at) {
|
|
224
|
+
await (0, vue.nextTick)();
|
|
225
|
+
const el = decimalInput.value;
|
|
226
|
+
if (!el) return;
|
|
227
|
+
el.focus();
|
|
228
|
+
if (typeof at === "number") {
|
|
229
|
+
const pos = Math.max(0, Math.min(at, el.value.length));
|
|
230
|
+
try {
|
|
231
|
+
el.setSelectionRange(pos, pos);
|
|
232
|
+
} catch {}
|
|
233
|
+
} else try {
|
|
234
|
+
el.select();
|
|
235
|
+
} catch {}
|
|
236
|
+
}
|
|
237
|
+
async function focusInteger(atEnd) {
|
|
238
|
+
await (0, vue.nextTick)();
|
|
239
|
+
const el = integerInput.value;
|
|
240
|
+
if (!el) return;
|
|
241
|
+
el.focus();
|
|
242
|
+
if (atEnd) {
|
|
243
|
+
const pos = el.value.length;
|
|
244
|
+
try {
|
|
245
|
+
el.setSelectionRange(pos, pos);
|
|
246
|
+
} catch {}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function onIntegerKeydown(e) {
|
|
250
|
+
const el = e.target;
|
|
251
|
+
const sc = opts.scale();
|
|
252
|
+
if (e.key === "ArrowRight" && el.selectionStart === el.value.length && sc > 0) {
|
|
253
|
+
e.preventDefault();
|
|
254
|
+
focusDecimal(0);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if ((e.key === "." || e.key === ",") && sc > 0) {
|
|
258
|
+
e.preventDefault();
|
|
259
|
+
focusDecimal();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
if (e.key === "-") {
|
|
263
|
+
e.preventDefault();
|
|
264
|
+
const p = (0, _atscript_ui.splitDecimalString)(opts.rawValue());
|
|
265
|
+
const newSign = p.sign === "-" ? "" : "-";
|
|
266
|
+
opts.setFromParts(newSign, p.integer, p.decimal);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function onDecimalKeydown(e) {
|
|
271
|
+
const el = e.target;
|
|
272
|
+
if (e.key === "ArrowLeft" && el.selectionStart === 0) {
|
|
273
|
+
e.preventDefault();
|
|
274
|
+
focusInteger(true);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (e.key === "Backspace" && el.selectionStart === 0 && el.selectionEnd === 0) {
|
|
278
|
+
e.preventDefault();
|
|
279
|
+
focusInteger(true);
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
if (/^[0-9]$/.test(e.key) && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
283
|
+
e.preventDefault();
|
|
284
|
+
const start = el.selectionStart ?? 0;
|
|
285
|
+
const end = el.selectionEnd ?? 0;
|
|
286
|
+
const current = el.value;
|
|
287
|
+
const cap = opts.scale();
|
|
288
|
+
if (start === end && start >= cap) return;
|
|
289
|
+
let next;
|
|
290
|
+
let newCursor;
|
|
291
|
+
if (start !== end) {
|
|
292
|
+
next = current.slice(0, start) + e.key + current.slice(end);
|
|
293
|
+
newCursor = start + 1;
|
|
294
|
+
} else if (start < current.length) {
|
|
295
|
+
next = current.slice(0, start) + e.key + current.slice(start + 1);
|
|
296
|
+
newCursor = start + 1;
|
|
297
|
+
} else {
|
|
298
|
+
next = current + e.key;
|
|
299
|
+
newCursor = next.length;
|
|
300
|
+
}
|
|
301
|
+
if (next.length > cap) next = next.slice(0, cap);
|
|
302
|
+
decimalDirty.value = true;
|
|
303
|
+
decimalEdit.value = next;
|
|
304
|
+
commitDecimalHalf(next);
|
|
305
|
+
(0, vue.nextTick)().then(() => {
|
|
306
|
+
try {
|
|
307
|
+
el.setSelectionRange(newCursor, newCursor);
|
|
308
|
+
} catch {}
|
|
309
|
+
});
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
313
|
+
e.preventDefault();
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function onIntegerInput(e) {
|
|
318
|
+
const el = e.target;
|
|
319
|
+
let raw = el.value;
|
|
320
|
+
let sign = "";
|
|
321
|
+
if (raw.startsWith("-")) {
|
|
322
|
+
sign = "-";
|
|
323
|
+
raw = raw.slice(1);
|
|
324
|
+
}
|
|
325
|
+
const cleaned = `${sign}${digitsOnly(raw)}`;
|
|
326
|
+
if (cleaned !== el.value) el.value = cleaned;
|
|
327
|
+
commitIntegerHalf(cleaned);
|
|
328
|
+
}
|
|
329
|
+
function onDecimalInput(e) {
|
|
330
|
+
const el = e.target;
|
|
331
|
+
decimalDirty.value = true;
|
|
332
|
+
const cleaned = digitsOnly(el.value).slice(0, opts.scale());
|
|
333
|
+
if (cleaned !== el.value) el.value = cleaned;
|
|
334
|
+
decimalEdit.value = cleaned;
|
|
335
|
+
commitDecimalHalf(cleaned);
|
|
336
|
+
}
|
|
337
|
+
function onIntegerPaste(e) {
|
|
338
|
+
const text = e.clipboardData?.getData("text") ?? "";
|
|
339
|
+
if (!text) return;
|
|
340
|
+
const sep = opts.decimalSeparator();
|
|
341
|
+
if (text.includes(sep) || sep !== "." && text.includes(".") || sep !== "," && text.includes(",")) {
|
|
342
|
+
e.preventDefault();
|
|
343
|
+
opts.setFromInput(text);
|
|
344
|
+
focusDecimal(opts.scale());
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
function onDecimalPaste(e) {
|
|
349
|
+
const text = e.clipboardData?.getData("text") ?? "";
|
|
350
|
+
if (!text) return;
|
|
351
|
+
e.preventDefault();
|
|
352
|
+
decimalDirty.value = true;
|
|
353
|
+
const cleaned = digitsOnly(text).slice(0, opts.scale());
|
|
354
|
+
const el = e.target;
|
|
355
|
+
el.value = cleaned;
|
|
356
|
+
decimalEdit.value = cleaned;
|
|
357
|
+
commitDecimalHalf(cleaned);
|
|
358
|
+
}
|
|
359
|
+
return {
|
|
360
|
+
integerInput,
|
|
361
|
+
decimalInput,
|
|
362
|
+
integerDisplay,
|
|
363
|
+
decimalDisplay,
|
|
364
|
+
focusActive,
|
|
365
|
+
onIntegerFocus,
|
|
366
|
+
onDecimalFocus,
|
|
367
|
+
onBlurAll,
|
|
368
|
+
onIntegerInput,
|
|
369
|
+
onIntegerKeydown,
|
|
370
|
+
onIntegerPaste,
|
|
371
|
+
onDecimalInput,
|
|
372
|
+
onDecimalKeydown,
|
|
373
|
+
onDecimalPaste
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/components/defaults/as-decimal.vue?vue&type=script&setup=true&lang.ts
|
|
378
|
+
const _hoisted_1 = ["title"];
|
|
379
|
+
const _hoisted_2 = {
|
|
380
|
+
key: 1,
|
|
381
|
+
class: "as-prefix",
|
|
382
|
+
"aria-hidden": "true"
|
|
383
|
+
};
|
|
384
|
+
const _hoisted_3 = [
|
|
385
|
+
"id",
|
|
386
|
+
"value",
|
|
387
|
+
"placeholder",
|
|
388
|
+
"name",
|
|
389
|
+
"disabled",
|
|
390
|
+
"readonly",
|
|
391
|
+
"aria-required",
|
|
392
|
+
"aria-invalid",
|
|
393
|
+
"aria-describedby",
|
|
394
|
+
"aria-label"
|
|
395
|
+
];
|
|
396
|
+
const _hoisted_4 = {
|
|
397
|
+
class: "as-decimal-sep",
|
|
398
|
+
"aria-hidden": "true"
|
|
399
|
+
};
|
|
400
|
+
const _hoisted_5 = [
|
|
401
|
+
"value",
|
|
402
|
+
"maxlength",
|
|
403
|
+
"size",
|
|
404
|
+
"disabled",
|
|
405
|
+
"readonly",
|
|
406
|
+
"aria-label"
|
|
407
|
+
];
|
|
408
|
+
const _hoisted_6 = {
|
|
409
|
+
key: 3,
|
|
410
|
+
class: "as-suffix",
|
|
411
|
+
"aria-hidden": "true"
|
|
412
|
+
};
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region src/components/defaults/as-decimal.vue
|
|
415
|
+
var as_decimal_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
416
|
+
__name: "as-decimal",
|
|
417
|
+
props: {
|
|
418
|
+
onBlur: {
|
|
419
|
+
type: Function,
|
|
420
|
+
required: true
|
|
421
|
+
},
|
|
422
|
+
error: {
|
|
423
|
+
type: String,
|
|
424
|
+
required: false
|
|
425
|
+
},
|
|
426
|
+
model: {
|
|
427
|
+
type: Object,
|
|
428
|
+
required: true
|
|
429
|
+
},
|
|
430
|
+
value: {
|
|
431
|
+
type: null,
|
|
432
|
+
required: false
|
|
433
|
+
},
|
|
434
|
+
label: {
|
|
435
|
+
type: String,
|
|
436
|
+
required: false
|
|
437
|
+
},
|
|
438
|
+
description: {
|
|
439
|
+
type: String,
|
|
440
|
+
required: false
|
|
441
|
+
},
|
|
442
|
+
hint: {
|
|
443
|
+
type: String,
|
|
444
|
+
required: false
|
|
445
|
+
},
|
|
446
|
+
placeholder: {
|
|
447
|
+
type: String,
|
|
448
|
+
required: false
|
|
449
|
+
},
|
|
450
|
+
prefixIcon: {
|
|
451
|
+
type: String,
|
|
452
|
+
required: false
|
|
453
|
+
},
|
|
454
|
+
suffixIcon: {
|
|
455
|
+
type: String,
|
|
456
|
+
required: false
|
|
457
|
+
},
|
|
458
|
+
class: {
|
|
459
|
+
type: [Object, String],
|
|
460
|
+
required: false
|
|
461
|
+
},
|
|
462
|
+
style: {
|
|
463
|
+
type: [Object, String],
|
|
464
|
+
required: false
|
|
465
|
+
},
|
|
466
|
+
optional: {
|
|
467
|
+
type: Boolean,
|
|
468
|
+
required: false,
|
|
469
|
+
skipCheck: true
|
|
470
|
+
},
|
|
471
|
+
onToggleOptional: {
|
|
472
|
+
type: Function,
|
|
473
|
+
required: false
|
|
474
|
+
},
|
|
475
|
+
required: {
|
|
476
|
+
type: Boolean,
|
|
477
|
+
required: false,
|
|
478
|
+
skipCheck: true
|
|
479
|
+
},
|
|
480
|
+
readonly: {
|
|
481
|
+
type: Boolean,
|
|
482
|
+
required: false,
|
|
483
|
+
skipCheck: true
|
|
484
|
+
},
|
|
485
|
+
type: {
|
|
486
|
+
type: String,
|
|
487
|
+
required: true
|
|
488
|
+
},
|
|
489
|
+
formAction: {
|
|
490
|
+
type: Object,
|
|
491
|
+
required: false
|
|
492
|
+
},
|
|
493
|
+
name: {
|
|
494
|
+
type: String,
|
|
495
|
+
required: false
|
|
496
|
+
},
|
|
497
|
+
field: {
|
|
498
|
+
type: Object,
|
|
499
|
+
required: false
|
|
500
|
+
},
|
|
501
|
+
options: {
|
|
502
|
+
type: Array,
|
|
503
|
+
required: false
|
|
504
|
+
},
|
|
505
|
+
maxLength: {
|
|
506
|
+
type: Number,
|
|
507
|
+
required: false
|
|
508
|
+
},
|
|
509
|
+
autocomplete: {
|
|
510
|
+
type: String,
|
|
511
|
+
required: false
|
|
512
|
+
},
|
|
513
|
+
title: {
|
|
514
|
+
type: String,
|
|
515
|
+
required: false
|
|
516
|
+
},
|
|
517
|
+
level: {
|
|
518
|
+
type: Number,
|
|
519
|
+
required: false
|
|
520
|
+
},
|
|
521
|
+
onRemove: {
|
|
522
|
+
type: Function,
|
|
523
|
+
required: false
|
|
524
|
+
},
|
|
525
|
+
canRemove: {
|
|
526
|
+
type: Boolean,
|
|
527
|
+
required: false
|
|
528
|
+
},
|
|
529
|
+
removeLabel: {
|
|
530
|
+
type: String,
|
|
531
|
+
required: false
|
|
532
|
+
},
|
|
533
|
+
arrayIndex: {
|
|
534
|
+
type: Number,
|
|
535
|
+
required: false
|
|
536
|
+
},
|
|
537
|
+
path: {
|
|
538
|
+
type: String,
|
|
539
|
+
required: true
|
|
540
|
+
},
|
|
541
|
+
valueHelp: {
|
|
542
|
+
type: Object,
|
|
543
|
+
required: false
|
|
544
|
+
},
|
|
545
|
+
singularLabel: {
|
|
546
|
+
type: String,
|
|
547
|
+
required: false
|
|
548
|
+
},
|
|
549
|
+
inputId: {
|
|
550
|
+
type: String,
|
|
551
|
+
required: true
|
|
552
|
+
},
|
|
553
|
+
errorId: {
|
|
554
|
+
type: String,
|
|
555
|
+
required: true
|
|
556
|
+
},
|
|
557
|
+
descId: {
|
|
558
|
+
type: String,
|
|
559
|
+
required: true
|
|
560
|
+
},
|
|
561
|
+
ariaDescribedBy: {
|
|
562
|
+
type: String,
|
|
563
|
+
required: false
|
|
564
|
+
},
|
|
565
|
+
currencyCode: {
|
|
566
|
+
type: String,
|
|
567
|
+
required: false
|
|
568
|
+
},
|
|
569
|
+
unitCode: {
|
|
570
|
+
type: String,
|
|
571
|
+
required: false
|
|
572
|
+
},
|
|
573
|
+
precisionScale: {
|
|
574
|
+
type: Number,
|
|
575
|
+
required: false
|
|
576
|
+
},
|
|
577
|
+
prefix: {
|
|
578
|
+
type: String,
|
|
579
|
+
required: false
|
|
580
|
+
},
|
|
581
|
+
suffix: {
|
|
582
|
+
type: String,
|
|
583
|
+
required: false
|
|
584
|
+
},
|
|
585
|
+
scale: {
|
|
586
|
+
type: Number,
|
|
587
|
+
required: false
|
|
588
|
+
},
|
|
589
|
+
hasAdornment: {
|
|
590
|
+
type: Boolean,
|
|
591
|
+
required: false
|
|
592
|
+
},
|
|
593
|
+
disabled: {
|
|
594
|
+
type: Boolean,
|
|
595
|
+
required: false
|
|
596
|
+
},
|
|
597
|
+
hidden: {
|
|
598
|
+
type: Boolean,
|
|
599
|
+
required: false
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
setup(__props) {
|
|
603
|
+
const props = __props;
|
|
604
|
+
const { scale, decimalSeparator, rawValue, parts, setFromInput, setFromParts } = useAsDecimal({
|
|
605
|
+
modelValue: () => props.model.value,
|
|
606
|
+
scale: () => props.scale,
|
|
607
|
+
storageScale: () => props.precisionScale,
|
|
608
|
+
onCommit: (v) => {
|
|
609
|
+
props.model.value = v;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
const { integerInput, decimalInput, integerDisplay, decimalDisplay, onIntegerFocus, onDecimalFocus, onBlurAll, onIntegerInput, onIntegerKeydown, onIntegerPaste, onDecimalInput, onDecimalKeydown, onDecimalPaste } = useAsDualInput({
|
|
613
|
+
scale: () => scale.value,
|
|
614
|
+
decimalSeparator: () => decimalSeparator.value,
|
|
615
|
+
parts: () => parts.value,
|
|
616
|
+
rawValue: () => rawValue.value,
|
|
617
|
+
setFromParts,
|
|
618
|
+
setFromInput,
|
|
619
|
+
onBlur: () => props.onBlur()
|
|
620
|
+
});
|
|
621
|
+
const isNegative = (0, vue.computed)(() => parts.value.sign === "-");
|
|
622
|
+
const shellTitle = (0, vue.computed)(() => props.currencyCode ?? props.unitCode ?? void 0);
|
|
623
|
+
return (_ctx, _cache) => {
|
|
624
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(require_as_field_shell.as_field_shell_default, (0, vue.normalizeProps)((0, vue.guardReactiveProps)(_ctx.$props)), {
|
|
625
|
+
default: (0, vue.withCtx)(({ inputId }) => [(0, vue.createElementVNode)("div", {
|
|
626
|
+
class: (0, vue.normalizeClass)(["as-decimal", {
|
|
627
|
+
"as-decimal-negative": isNegative.value,
|
|
628
|
+
error: !!__props.error,
|
|
629
|
+
required: __props.required
|
|
630
|
+
}]),
|
|
631
|
+
title: shellTitle.value
|
|
632
|
+
}, [
|
|
633
|
+
__props.prefixIcon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
634
|
+
key: 0,
|
|
635
|
+
class: (0, vue.normalizeClass)(["as-prefix-icon", __props.prefixIcon]),
|
|
636
|
+
"aria-hidden": "true"
|
|
637
|
+
}, null, 2)) : (0, vue.createCommentVNode)("v-if", true),
|
|
638
|
+
__props.prefix ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2, (0, vue.toDisplayString)(__props.prefix), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
639
|
+
(0, vue.createElementVNode)("input", {
|
|
640
|
+
id: inputId,
|
|
641
|
+
ref_key: "integerInput",
|
|
642
|
+
ref: integerInput,
|
|
643
|
+
class: "as-decimal-integer",
|
|
644
|
+
type: "text",
|
|
645
|
+
inputmode: "decimal",
|
|
646
|
+
autocomplete: "off",
|
|
647
|
+
value: (0, vue.unref)(integerDisplay),
|
|
648
|
+
onInput: _cache[0] || (_cache[0] = (...args) => (0, vue.unref)(onIntegerInput) && (0, vue.unref)(onIntegerInput)(...args)),
|
|
649
|
+
onKeydown: _cache[1] || (_cache[1] = (...args) => (0, vue.unref)(onIntegerKeydown) && (0, vue.unref)(onIntegerKeydown)(...args)),
|
|
650
|
+
onPaste: _cache[2] || (_cache[2] = (...args) => (0, vue.unref)(onIntegerPaste) && (0, vue.unref)(onIntegerPaste)(...args)),
|
|
651
|
+
onFocus: _cache[3] || (_cache[3] = (...args) => (0, vue.unref)(onIntegerFocus) && (0, vue.unref)(onIntegerFocus)(...args)),
|
|
652
|
+
onBlur: _cache[4] || (_cache[4] = (...args) => (0, vue.unref)(onBlurAll) && (0, vue.unref)(onBlurAll)(...args)),
|
|
653
|
+
placeholder: __props.placeholder,
|
|
654
|
+
name: __props.name,
|
|
655
|
+
disabled: __props.disabled,
|
|
656
|
+
readonly: __props.readonly,
|
|
657
|
+
"aria-required": __props.required || void 0,
|
|
658
|
+
"aria-invalid": !!__props.error || void 0,
|
|
659
|
+
"aria-describedby": __props.ariaDescribedBy,
|
|
660
|
+
"aria-label": !__props.label ? __props.name : void 0
|
|
661
|
+
}, null, 40, _hoisted_3),
|
|
662
|
+
(0, vue.unref)(scale) > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 2 }, [(0, vue.createElementVNode)("span", _hoisted_4, (0, vue.toDisplayString)((0, vue.unref)(decimalSeparator)), 1), (0, vue.createElementVNode)("input", {
|
|
663
|
+
ref_key: "decimalInput",
|
|
664
|
+
ref: decimalInput,
|
|
665
|
+
class: "as-decimal-decimal",
|
|
666
|
+
type: "text",
|
|
667
|
+
inputmode: "numeric",
|
|
668
|
+
autocomplete: "off",
|
|
669
|
+
value: (0, vue.unref)(decimalDisplay),
|
|
670
|
+
maxlength: (0, vue.unref)(scale),
|
|
671
|
+
size: (0, vue.unref)(scale),
|
|
672
|
+
onInput: _cache[5] || (_cache[5] = (...args) => (0, vue.unref)(onDecimalInput) && (0, vue.unref)(onDecimalInput)(...args)),
|
|
673
|
+
onKeydown: _cache[6] || (_cache[6] = (...args) => (0, vue.unref)(onDecimalKeydown) && (0, vue.unref)(onDecimalKeydown)(...args)),
|
|
674
|
+
onPaste: _cache[7] || (_cache[7] = (...args) => (0, vue.unref)(onDecimalPaste) && (0, vue.unref)(onDecimalPaste)(...args)),
|
|
675
|
+
onFocus: _cache[8] || (_cache[8] = (...args) => (0, vue.unref)(onDecimalFocus) && (0, vue.unref)(onDecimalFocus)(...args)),
|
|
676
|
+
onBlur: _cache[9] || (_cache[9] = (...args) => (0, vue.unref)(onBlurAll) && (0, vue.unref)(onBlurAll)(...args)),
|
|
677
|
+
disabled: __props.disabled,
|
|
678
|
+
readonly: __props.readonly,
|
|
679
|
+
"aria-label": `decimals of ${__props.label ?? __props.name ?? ""}`
|
|
680
|
+
}, null, 40, _hoisted_5)], 64)) : (0, vue.createCommentVNode)("v-if", true),
|
|
681
|
+
__props.suffix ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6, (0, vue.toDisplayString)(__props.suffix), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
682
|
+
__props.suffixIcon ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
|
683
|
+
key: 4,
|
|
684
|
+
class: (0, vue.normalizeClass)(["as-suffix-icon", __props.suffixIcon]),
|
|
685
|
+
"aria-hidden": "true"
|
|
686
|
+
}, null, 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
687
|
+
], 10, _hoisted_1)]),
|
|
688
|
+
_: 1
|
|
689
|
+
}, 16);
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
//#endregion
|
|
694
|
+
Object.defineProperty(exports, "as_decimal_default", {
|
|
695
|
+
enumerable: true,
|
|
696
|
+
get: function() {
|
|
697
|
+
return as_decimal_default;
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
Object.defineProperty(exports, "useAsDecimal", {
|
|
701
|
+
enumerable: true,
|
|
702
|
+
get: function() {
|
|
703
|
+
return useAsDecimal;
|
|
704
|
+
}
|
|
705
|
+
});
|
|
706
|
+
Object.defineProperty(exports, "useAsDualInput", {
|
|
707
|
+
enumerable: true,
|
|
708
|
+
get: function() {
|
|
709
|
+
return useAsDualInput;
|
|
710
|
+
}
|
|
711
|
+
});
|