@stonecrop/aform 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aform.js +168 -60
- package/dist/aform.js.map +1 -1
- package/dist/assets/index.css +46 -34
- package/dist/src/components/form/ACurrencyInput.vue.d.ts.map +1 -1
- package/dist/src/components/form/ANumericInput.vue.d.ts +4 -2
- package/dist/src/components/form/ANumericInput.vue.d.ts.map +1 -1
- package/dist/src/components/form/AQuantityInput.vue.d.ts.map +1 -1
- package/dist/src/components/table/ATupleCellEditor.vue.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +16 -2
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/currencyValue.d.ts +5 -0
- package/dist/src/utils/currencyValue.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/assets/index.css
CHANGED
|
@@ -159,16 +159,16 @@
|
|
|
159
159
|
border-top: 0.3em solid currentColor;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
.acurrency__row[data-v-
|
|
162
|
+
.acurrency__row[data-v-c18d0c0d] {
|
|
163
163
|
display: flex;
|
|
164
164
|
gap: 1ch;
|
|
165
165
|
}
|
|
166
|
-
.acurrency__field[data-v-
|
|
166
|
+
.acurrency__field[data-v-c18d0c0d] {
|
|
167
167
|
position: relative;
|
|
168
168
|
flex: 1;
|
|
169
169
|
min-width: 0;
|
|
170
170
|
}
|
|
171
|
-
.acurrency__field--base-currency[data-v-
|
|
171
|
+
.acurrency__field--base-currency[data-v-c18d0c0d] {
|
|
172
172
|
position: absolute;
|
|
173
173
|
width: 1px;
|
|
174
174
|
height: 1px;
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
white-space: nowrap;
|
|
180
180
|
border: 0;
|
|
181
181
|
}
|
|
182
|
-
.acurrency__group[data-v-
|
|
182
|
+
.acurrency__group[data-v-c18d0c0d] {
|
|
183
183
|
position: relative;
|
|
184
184
|
display: flex;
|
|
185
185
|
align-items: stretch;
|
|
@@ -189,20 +189,20 @@
|
|
|
189
189
|
border: 1px solid var(--sc-input-border-color);
|
|
190
190
|
border-radius: var(--sc-border-radius);
|
|
191
191
|
}
|
|
192
|
-
.acurrency__group[data-v-
|
|
192
|
+
.acurrency__group[data-v-c18d0c0d]:focus-within {
|
|
193
193
|
border-color: var(--sc-input-active-border-color);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
/* Solid form surface behind long labels; the shared gradient only masks the top half and reads
|
|
197
197
|
poorly over the merged prefix + amount backgrounds. Matches the field's page/form parent. */
|
|
198
|
-
.acurrency__group > .aform_field-label[data-v-
|
|
198
|
+
.acurrency__group > .aform_field-label[data-v-c18d0c0d] {
|
|
199
199
|
background: var(--sc-form-background);
|
|
200
200
|
}
|
|
201
|
-
.acurrency__amount-wrap[data-v-
|
|
201
|
+
.acurrency__amount-wrap[data-v-c18d0c0d] {
|
|
202
202
|
flex: 1;
|
|
203
203
|
min-width: 0;
|
|
204
204
|
}
|
|
205
|
-
.acurrency__amount[data-v-
|
|
205
|
+
.acurrency__amount[data-v-c18d0c0d] {
|
|
206
206
|
width: 100%;
|
|
207
207
|
box-sizing: border-box;
|
|
208
208
|
border: none;
|
|
@@ -217,8 +217,8 @@
|
|
|
217
217
|
appearance: textfield;
|
|
218
218
|
-moz-appearance: textfield;
|
|
219
219
|
}
|
|
220
|
-
.acurrency__amount[data-v-
|
|
221
|
-
.acurrency__amount[data-v-
|
|
220
|
+
.acurrency__amount[data-v-c18d0c0d]::-webkit-outer-spin-button,
|
|
221
|
+
.acurrency__amount[data-v-c18d0c0d]::-webkit-inner-spin-button {
|
|
222
222
|
appearance: none;
|
|
223
223
|
-webkit-appearance: none;
|
|
224
224
|
margin: 0;
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
tinted background, left-rounded to match the group's own
|
|
230
230
|
corner so the tint doesn't overhang the border. The dropdown itself isn't bound by this
|
|
231
231
|
width — ADropdown list spans the group — so search results still show full names. */
|
|
232
|
-
.acurrency__currency[data-v-
|
|
232
|
+
.acurrency__currency[data-v-c18d0c0d] {
|
|
233
233
|
/* Fixed minimum prefix: 3rem content band + 1ch inset each side (fits NZD without shifting). */
|
|
234
234
|
flex: 0 0 calc(3rem + 2ch);
|
|
235
235
|
width: calc(3rem + 2ch);
|
|
@@ -241,16 +241,16 @@
|
|
|
241
241
|
border-right: 1px solid var(--sc-input-border-color);
|
|
242
242
|
border-radius: var(--sc-border-radius) 0 0 var(--sc-border-radius);
|
|
243
243
|
}
|
|
244
|
-
.acurrency__currency[data-v-
|
|
244
|
+
.acurrency__currency[data-v-c18d0c0d] .aform_input-field--embedded {
|
|
245
245
|
padding-left: 1ch;
|
|
246
246
|
padding-right: 1ch;
|
|
247
247
|
text-align: right;
|
|
248
248
|
}
|
|
249
|
-
.acurrency__currency[data-v-
|
|
250
|
-
.acurrency__currency[data-v-
|
|
249
|
+
.acurrency__currency[data-v-c18d0c0d] .aform_form-element--embedded,
|
|
250
|
+
.acurrency__currency[data-v-c18d0c0d] .autocomplete {
|
|
251
251
|
position: static;
|
|
252
252
|
}
|
|
253
|
-
.acurrency__group[data-v-
|
|
253
|
+
.acurrency__group[data-v-c18d0c0d] .autocomplete-results--anchor-group {
|
|
254
254
|
left: -1px;
|
|
255
255
|
right: -1px;
|
|
256
256
|
box-sizing: border-box;
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
min-width: unset;
|
|
259
259
|
max-width: none;
|
|
260
260
|
}
|
|
261
|
-
.acurrency__helper[data-v-
|
|
261
|
+
.acurrency__helper[data-v-c18d0c0d] {
|
|
262
262
|
margin: 0.5rem 0 0;
|
|
263
263
|
font-size: 0.85rem;
|
|
264
264
|
color: var(--sc-cell-text-color);
|
|
@@ -1057,16 +1057,28 @@ legend[data-v-8215ff87] {
|
|
|
1057
1057
|
outline-color: var(--sc-input-active-border-color);
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
1060
|
-
.
|
|
1060
|
+
/* A number is typed, not stepped: the spinner offers nothing here. */
|
|
1061
|
+
.anumeric__input[data-v-d13e377b] {
|
|
1062
|
+
appearance: textfield;
|
|
1063
|
+
-moz-appearance: textfield;
|
|
1064
|
+
}
|
|
1065
|
+
.anumeric__input[data-v-d13e377b]::-webkit-outer-spin-button,
|
|
1066
|
+
.anumeric__input[data-v-d13e377b]::-webkit-inner-spin-button {
|
|
1067
|
+
appearance: none;
|
|
1068
|
+
-webkit-appearance: none;
|
|
1069
|
+
margin: 0;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.aquantity__row[data-v-72062eb6] {
|
|
1061
1073
|
display: flex;
|
|
1062
1074
|
gap: 1ch;
|
|
1063
1075
|
}
|
|
1064
|
-
.aquantity__field[data-v-
|
|
1076
|
+
.aquantity__field[data-v-72062eb6] {
|
|
1065
1077
|
position: relative;
|
|
1066
1078
|
flex: 1;
|
|
1067
1079
|
min-width: 0;
|
|
1068
1080
|
}
|
|
1069
|
-
.aquantity__group[data-v-
|
|
1081
|
+
.aquantity__group[data-v-72062eb6] {
|
|
1070
1082
|
position: relative;
|
|
1071
1083
|
display: flex;
|
|
1072
1084
|
align-items: stretch;
|
|
@@ -1076,20 +1088,20 @@ legend[data-v-8215ff87] {
|
|
|
1076
1088
|
border: 1px solid var(--sc-input-border-color);
|
|
1077
1089
|
border-radius: var(--sc-border-radius);
|
|
1078
1090
|
}
|
|
1079
|
-
.aquantity__group[data-v-
|
|
1091
|
+
.aquantity__group[data-v-72062eb6]:focus-within {
|
|
1080
1092
|
border-color: var(--sc-input-active-border-color);
|
|
1081
1093
|
}
|
|
1082
|
-
.aquantity__group > .aform_field-label[data-v-
|
|
1094
|
+
.aquantity__group > .aform_field-label[data-v-72062eb6] {
|
|
1083
1095
|
background: var(--sc-form-background);
|
|
1084
1096
|
}
|
|
1085
1097
|
|
|
1086
1098
|
/* Focus ring lives on the merged group only (see AForm :focus-within label + group border). */
|
|
1087
|
-
.aquantity__group[data-v-
|
|
1088
|
-
.aquantity__group[data-v-
|
|
1099
|
+
.aquantity__group[data-v-72062eb6] .aform_dropdown-button:focus,
|
|
1100
|
+
.aquantity__group[data-v-72062eb6] .aform_dropdown-button:focus-visible {
|
|
1089
1101
|
outline: none;
|
|
1090
1102
|
box-shadow: none;
|
|
1091
1103
|
}
|
|
1092
|
-
.aquantity__qty[data-v-
|
|
1104
|
+
.aquantity__qty[data-v-72062eb6] {
|
|
1093
1105
|
flex: 1 1 50%;
|
|
1094
1106
|
min-width: 0;
|
|
1095
1107
|
border: none;
|
|
@@ -1104,13 +1116,13 @@ legend[data-v-8215ff87] {
|
|
|
1104
1116
|
appearance: textfield;
|
|
1105
1117
|
-moz-appearance: textfield;
|
|
1106
1118
|
}
|
|
1107
|
-
.aquantity__qty[data-v-
|
|
1108
|
-
.aquantity__qty[data-v-
|
|
1119
|
+
.aquantity__qty[data-v-72062eb6]::-webkit-outer-spin-button,
|
|
1120
|
+
.aquantity__qty[data-v-72062eb6]::-webkit-inner-spin-button {
|
|
1109
1121
|
appearance: none;
|
|
1110
1122
|
-webkit-appearance: none;
|
|
1111
1123
|
margin: 0;
|
|
1112
1124
|
}
|
|
1113
|
-
.aquantity__uom[data-v-
|
|
1125
|
+
.aquantity__uom[data-v-72062eb6] {
|
|
1114
1126
|
position: static;
|
|
1115
1127
|
flex: 1 1 50%;
|
|
1116
1128
|
min-width: 0;
|
|
@@ -1120,12 +1132,12 @@ legend[data-v-8215ff87] {
|
|
|
1120
1132
|
}
|
|
1121
1133
|
|
|
1122
1134
|
/* ADropdown list: anchor to merged group, not the UOM trigger column (see dropdowns.browser.spec). */
|
|
1123
|
-
.aquantity__group[data-v-
|
|
1124
|
-
.aquantity__group[data-v-
|
|
1135
|
+
.aquantity__group[data-v-72062eb6] .aform_form-element--embedded,
|
|
1136
|
+
.aquantity__group[data-v-72062eb6] .autocomplete {
|
|
1125
1137
|
position: static;
|
|
1126
1138
|
align-self: stretch;
|
|
1127
1139
|
}
|
|
1128
|
-
.aquantity__group[data-v-
|
|
1140
|
+
.aquantity__group[data-v-72062eb6] .autocomplete-results--anchor-group {
|
|
1129
1141
|
left: -1px;
|
|
1130
1142
|
right: -1px;
|
|
1131
1143
|
box-sizing: border-box;
|
|
@@ -1133,7 +1145,7 @@ legend[data-v-8215ff87] {
|
|
|
1133
1145
|
min-width: unset;
|
|
1134
1146
|
max-width: none;
|
|
1135
1147
|
}
|
|
1136
|
-
.aquantity__helper[data-v-
|
|
1148
|
+
.aquantity__helper[data-v-72062eb6] {
|
|
1137
1149
|
margin: 0.5rem 0 0;
|
|
1138
1150
|
font-size: 0.85rem;
|
|
1139
1151
|
color: var(--sc-cell-text-color);
|
|
@@ -1384,7 +1396,7 @@ to {
|
|
|
1384
1396
|
white-space: nowrap;
|
|
1385
1397
|
}
|
|
1386
1398
|
|
|
1387
|
-
.atable-tuple-shell__input[data-v-
|
|
1399
|
+
.atable-tuple-shell__input[data-v-9630226d] {
|
|
1388
1400
|
display: block;
|
|
1389
1401
|
width: 100%;
|
|
1390
1402
|
min-width: 0;
|
|
@@ -1402,7 +1414,7 @@ to {
|
|
|
1402
1414
|
text-overflow: ellipsis;
|
|
1403
1415
|
white-space: nowrap;
|
|
1404
1416
|
}
|
|
1405
|
-
.atable-tuple-shell__input[data-v-
|
|
1406
|
-
.atable-tuple-shell__input[data-v-
|
|
1417
|
+
.atable-tuple-shell__input[data-v-9630226d]::-webkit-outer-spin-button,
|
|
1418
|
+
.atable-tuple-shell__input[data-v-9630226d]::-webkit-inner-spin-button {
|
|
1407
1419
|
appearance: none;
|
|
1408
1420
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ACurrencyInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/ACurrencyInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ACurrencyInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/ACurrencyInput.vue"],"names":[],"mappings":"AAogBA,OAAO,KAAK,EAAkB,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAcjG,KAAK,WAAW,GAAG,cAAc,GAAG;IAClC,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;CACtB,CAAC;AAgRH,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA6OxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { ComponentProps } from '../../types';
|
|
2
|
-
type __VLS_Props = ComponentProps
|
|
1
|
+
import type { ComponentProps, NumericOptions } from '../../types';
|
|
2
|
+
type __VLS_Props = ComponentProps & {
|
|
3
|
+
options?: NumericOptions;
|
|
4
|
+
};
|
|
3
5
|
type __VLS_ModelProps = {
|
|
4
6
|
modelValue?: number | null;
|
|
5
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANumericInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/ANumericInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ANumericInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/ANumericInput.vue"],"names":[],"mappings":"AA4FA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAGjE,KAAK,WAAW,GAAG,cAAc,GAAG;IAAE,OAAO,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAiCjE,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AA2FxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AQuantityInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/AQuantityInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AQuantityInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/AQuantityInput.vue"],"names":[],"mappings":"AA4QA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAWjF,KAAK,WAAW,GAAG,cAAc,GAAG;IAClC,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC;AAkGH,KAAK,gBAAgB,GAAG;IACxB,UAAU,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC,CAAC;AAKF,KAAK,iBAAiB,GAAG,WAAW,GAAG,gBAAgB,CAAC;AAsKxD,QAAA,MAAM,YAAY;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ATupleCellEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/ATupleCellEditor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ATupleCellEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/table/ATupleCellEditor.vue"],"names":[],"mappings":"AA0XA,OAAO,EAA2B,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAS5E,KAAK,WAAW,GAAG;IAClB,QAAQ,EAAE,UAAU,GAAG,UAAU,CAAA;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,UAAU,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CACf,CAAC;AAwXF,QAAA,MAAM,YAAY;;;;;;;;kFAIhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -205,6 +205,16 @@ export interface AFormLinkNavigator {
|
|
|
205
205
|
/** Navigate to the linked document. Implementation is app-defined. */
|
|
206
206
|
navigate(doctype: string, id: string | number): void;
|
|
207
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Type-specific configuration for ANumericInput, passed via the field's `options` property.
|
|
210
|
+
* @public
|
|
211
|
+
*/
|
|
212
|
+
export interface NumericOptions {
|
|
213
|
+
/** Whether the box takes arithmetic (default `true`): `12*3+4` is read as `40` once the box is left or Enter is pressed. Digits, `.`, `+ - * / %` and parentheses only; exponents and letters are refused. Set `false` for a plain `type="number"` box. */
|
|
214
|
+
arithmetic?: boolean;
|
|
215
|
+
/** Decimal places to round the number to, as a column with a fixed scale holds it: at `2`, `10/3` is `3.33`. Omit to keep every digit the box works out. A non-integer or out-of-range value is ignored. */
|
|
216
|
+
precision?: number;
|
|
217
|
+
}
|
|
208
218
|
/**
|
|
209
219
|
* The value shape for AQuantityInput — a quantity paired with its unit of measure, plus the
|
|
210
220
|
* derived stock-equivalent quantity/UOM. `conversionFactor` is carried on the value so it
|
|
@@ -234,6 +244,8 @@ export interface QuantityOptions {
|
|
|
234
244
|
stockUom?: string;
|
|
235
245
|
/** Conversion factor lookup for each non-stock UOM, relative to `stockUom` (which is implicitly `1`) */
|
|
236
246
|
conversionFactors?: Record<string, number>;
|
|
247
|
+
/** Whether the box takes arithmetic (default `true`): `12*3+4` is read as `40` once the box is left or Enter is pressed. Digits, `.`, `+ - * / %` and parentheses only; exponents and letters are refused. Set `false` for a plain `type="number"` box. */
|
|
248
|
+
arithmetic?: boolean;
|
|
237
249
|
}
|
|
238
250
|
/**
|
|
239
251
|
* The value shape for ACurrencyInput — an amount paired with its currency (an
|
|
@@ -273,9 +285,11 @@ export interface CurrencyOptions {
|
|
|
273
285
|
isAsync?: boolean;
|
|
274
286
|
/**
|
|
275
287
|
* When true (default), the amount field uses a locale- and currency-aware display mask
|
|
276
|
-
* (grouping and decimal separators follow the selected currency). Set false for
|
|
277
|
-
* `type="number"` input.
|
|
288
|
+
* (grouping and decimal separators follow the selected currency). Set false for unformatted
|
|
289
|
+
* amounts; with `arithmetic` also false, the field is a plain `type="number"` input.
|
|
278
290
|
*/
|
|
279
291
|
amountMask?: boolean;
|
|
292
|
+
/** Whether the box takes arithmetic (default `true`): `12*3+4` is read as `40` once the box is left or Enter is pressed. Digits, `.`, `+ - * / %` and parentheses only; exponents and letters are refused. Set `false` for a plain `type="number"` box. */
|
|
293
|
+
arithmetic?: boolean;
|
|
280
294
|
}
|
|
281
295
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,MAAM,mBAAmB,CAAA;AAM1B;;;;;GAKG;AACH,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAkBxD;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG;IAC9D,mGAAmG;IACnG,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAA;IACjB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,IAAI,CAAC,EAAE,OAAO,mBAAmB,EAAE,eAAe,CAAA;IAClD,4BAA4B;IAC5B,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,6CAA6C;IAC7C,QAAQ,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F;IAC7F,YAAY,EAAE,MAAM,CAAA;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,gJAAgJ;IAChJ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wHAAwH;IACxH,YAAY,CAAC,EAAE,cAAc,GAAG,MAAM,CAAA;IACtC,+GAA+G;IAC/G,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACtC,yXAAyX;IACzX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sGAAsG;IACtG,cAAc,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,cAAc,EAAE,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;IAC5F,+FAA+F;IAC/F,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,2PAA2P;IAC3P,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { AFormLinkValue, CurrencyOptions, CurrencyValue } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* An amount worked out in a currency box, rounded to the currency's decimals as the box shows it: `10/3` in USD is
|
|
4
|
+
* `3.33`, not `3.3333333333333`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function roundToCurrency(amount: number, currencyId: string | undefined): number;
|
|
2
7
|
export declare function normalizeBaseCurrency(options: CurrencyOptions, current: CurrencyValue | null | undefined): AFormLinkValue;
|
|
3
8
|
export declare function baseAmountDecimals(options: CurrencyOptions): number;
|
|
4
9
|
export declare function resolveCurrencyExchangeRate(currencyId: string | number | undefined, options: CurrencyOptions, baseCurrency: AFormLinkValue, current: CurrencyValue | null | undefined): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"currencyValue.d.ts","sourceRoot":"","sources":["../../../src/utils/currencyValue.ts"],"names":[],"mappings":"
|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Ae,EACxB,OAAO,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GACvC,cAAc,EAAE,CAoBlB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/aform",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "Schema-driven form components for Stonecrop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"@vueuse/components": "^14.2.1",
|
|
48
48
|
"@vueuse/core": "^14.2.1",
|
|
49
49
|
"temporal-polyfill": "^1.0.5",
|
|
50
|
-
"@stonecrop/atable": "0.
|
|
51
|
-
"@stonecrop/
|
|
52
|
-
"@stonecrop/utilities": "0.
|
|
53
|
-
"@stonecrop/
|
|
50
|
+
"@stonecrop/atable": "0.54.0",
|
|
51
|
+
"@stonecrop/schema": "0.54.0",
|
|
52
|
+
"@stonecrop/utilities": "0.54.0",
|
|
53
|
+
"@stonecrop/themes": "0.54.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@microsoft/api-extractor": "^7.58.7",
|