@shwfed/config 2.12.11 → 2.12.13
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/module.json +1 -1
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +68 -68
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +34 -34
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/runtime.vue +22 -15
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/runtime.vue +34 -13
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +22 -18
- package/dist/runtime/components/form/utils/derived.js +2 -2
- package/dist/runtime/components/form/utils/state.d.ts +18 -0
- package/dist/runtime/components/form/utils/state.js +15 -2
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/runtime.vue +22 -14
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +2 -2
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +2 -2
- package/dist/runtime/components/table/config.vue +1 -4
- package/dist/runtime/components/table/index.vue +2 -2
- package/dist/runtime/components/table/schema.d.ts +68 -68
- package/dist/runtime/share/number-format.d.ts +1 -0
- package/dist/runtime/share/number-format.js +12 -13
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
44
44
|
readonly data: string;
|
|
45
45
|
readonly request?: string | undefined;
|
|
46
46
|
};
|
|
47
|
+
readonly enableSorting?: boolean | undefined;
|
|
47
48
|
readonly nodeKey: string;
|
|
48
49
|
readonly nodeChildren: string;
|
|
49
50
|
readonly nodeLabel: readonly [{
|
|
@@ -53,7 +54,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
53
54
|
readonly locale: "en" | "ja" | "ko";
|
|
54
55
|
readonly message: string;
|
|
55
56
|
}[]];
|
|
56
|
-
readonly enableSorting?: boolean | undefined;
|
|
57
57
|
readonly nodeTooltip?: readonly [{
|
|
58
58
|
readonly locale: "zh";
|
|
59
59
|
readonly message: string;
|
|
@@ -107,6 +107,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
107
107
|
readonly data: string;
|
|
108
108
|
readonly request?: string | undefined;
|
|
109
109
|
};
|
|
110
|
+
readonly enableSorting?: boolean | undefined;
|
|
110
111
|
readonly nodeKey: string;
|
|
111
112
|
readonly nodeChildren: string;
|
|
112
113
|
readonly nodeLabel: readonly [{
|
|
@@ -116,7 +117,6 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
116
117
|
readonly locale: "en" | "ja" | "ko";
|
|
117
118
|
readonly message: string;
|
|
118
119
|
}[]];
|
|
119
|
-
readonly enableSorting?: boolean | undefined;
|
|
120
120
|
readonly nodeTooltip?: readonly [{
|
|
121
121
|
readonly locale: "zh";
|
|
122
122
|
readonly message: string;
|
|
@@ -45,10 +45,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
45
45
|
readonly data: string;
|
|
46
46
|
readonly request?: string | undefined;
|
|
47
47
|
};
|
|
48
|
+
readonly enableSorting?: boolean | undefined;
|
|
48
49
|
readonly nodeKey: string;
|
|
49
50
|
readonly nodeChildren: string;
|
|
50
51
|
readonly nodeLabel: string;
|
|
51
|
-
readonly enableSorting?: boolean | undefined;
|
|
52
52
|
readonly cascade: "independent" | "cascade-down" | "cascade-both";
|
|
53
53
|
readonly nodeTooltip?: readonly [{
|
|
54
54
|
readonly locale: "zh";
|
|
@@ -104,10 +104,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
104
104
|
readonly data: string;
|
|
105
105
|
readonly request?: string | undefined;
|
|
106
106
|
};
|
|
107
|
+
readonly enableSorting?: boolean | undefined;
|
|
107
108
|
readonly nodeKey: string;
|
|
108
109
|
readonly nodeChildren: string;
|
|
109
110
|
readonly nodeLabel: string;
|
|
110
|
-
readonly enableSorting?: boolean | undefined;
|
|
111
111
|
readonly cascade: "independent" | "cascade-down" | "cascade-both";
|
|
112
112
|
readonly nodeTooltip?: readonly [{
|
|
113
113
|
readonly locale: "zh";
|
|
@@ -45,10 +45,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
45
45
|
readonly data: string;
|
|
46
46
|
readonly request?: string | undefined;
|
|
47
47
|
};
|
|
48
|
+
readonly enableSorting?: boolean | undefined;
|
|
48
49
|
readonly nodeKey: string;
|
|
49
50
|
readonly nodeChildren: string;
|
|
50
51
|
readonly nodeLabel: string;
|
|
51
|
-
readonly enableSorting?: boolean | undefined;
|
|
52
52
|
readonly cascade: "independent" | "cascade-down" | "cascade-both";
|
|
53
53
|
readonly nodeTooltip?: readonly [{
|
|
54
54
|
readonly locale: "zh";
|
|
@@ -104,10 +104,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
104
104
|
readonly data: string;
|
|
105
105
|
readonly request?: string | undefined;
|
|
106
106
|
};
|
|
107
|
+
readonly enableSorting?: boolean | undefined;
|
|
107
108
|
readonly nodeKey: string;
|
|
108
109
|
readonly nodeChildren: string;
|
|
109
110
|
readonly nodeLabel: string;
|
|
110
|
-
readonly enableSorting?: boolean | undefined;
|
|
111
111
|
readonly cascade: "independent" | "cascade-down" | "cascade-both";
|
|
112
112
|
readonly nodeTooltip?: readonly [{
|
|
113
113
|
readonly locale: "zh";
|
|
@@ -45,10 +45,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
45
45
|
readonly data: string;
|
|
46
46
|
readonly request?: string | undefined;
|
|
47
47
|
};
|
|
48
|
+
readonly enableSorting?: boolean | undefined;
|
|
48
49
|
readonly nodeKey: string;
|
|
49
50
|
readonly nodeChildren: string;
|
|
50
51
|
readonly nodeLabel: string;
|
|
51
|
-
readonly enableSorting?: boolean | undefined;
|
|
52
52
|
readonly nodeTooltip?: readonly [{
|
|
53
53
|
readonly locale: "zh";
|
|
54
54
|
readonly message: string;
|
|
@@ -103,10 +103,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
103
103
|
readonly data: string;
|
|
104
104
|
readonly request?: string | undefined;
|
|
105
105
|
};
|
|
106
|
+
readonly enableSorting?: boolean | undefined;
|
|
106
107
|
readonly nodeKey: string;
|
|
107
108
|
readonly nodeChildren: string;
|
|
108
109
|
readonly nodeLabel: string;
|
|
109
|
-
readonly enableSorting?: boolean | undefined;
|
|
110
110
|
readonly nodeTooltip?: readonly [{
|
|
111
111
|
readonly locale: "zh";
|
|
112
112
|
readonly message: string;
|
|
@@ -45,10 +45,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
45
45
|
readonly data: string;
|
|
46
46
|
readonly request?: string | undefined;
|
|
47
47
|
};
|
|
48
|
+
readonly enableSorting?: boolean | undefined;
|
|
48
49
|
readonly nodeKey: string;
|
|
49
50
|
readonly nodeChildren: string;
|
|
50
51
|
readonly nodeLabel: string;
|
|
51
|
-
readonly enableSorting?: boolean | undefined;
|
|
52
52
|
readonly nodeTooltip?: readonly [{
|
|
53
53
|
readonly locale: "zh";
|
|
54
54
|
readonly message: string;
|
|
@@ -103,10 +103,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
103
103
|
readonly data: string;
|
|
104
104
|
readonly request?: string | undefined;
|
|
105
105
|
};
|
|
106
|
+
readonly enableSorting?: boolean | undefined;
|
|
106
107
|
readonly nodeKey: string;
|
|
107
108
|
readonly nodeChildren: string;
|
|
108
109
|
readonly nodeLabel: string;
|
|
109
|
-
readonly enableSorting?: boolean | undefined;
|
|
110
110
|
readonly nodeTooltip?: readonly [{
|
|
111
111
|
readonly locale: "zh";
|
|
112
112
|
readonly message: string;
|
|
@@ -612,10 +612,7 @@ async function pasteColumns() {
|
|
|
612
612
|
const clip = await readClip();
|
|
613
613
|
if (!clip || clip.surface !== "table") return;
|
|
614
614
|
const { items } = reidFragment(clip.items);
|
|
615
|
-
const pasted = items.map(({ groupId: _g, ...rest }) =>
|
|
616
|
-
...rest,
|
|
617
|
-
id: crypto.randomUUID()
|
|
618
|
-
}));
|
|
615
|
+
const pasted = items.map(({ groupId: _g, ...rest }) => rest);
|
|
619
616
|
if (pasted.length === 0) return;
|
|
620
617
|
editingColumns.value = [...editingColumns.value, ...pasted];
|
|
621
618
|
const ids = pasted.map((c) => c.id);
|
|
@@ -810,7 +810,7 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
|
|
|
810
810
|
/>
|
|
811
811
|
</div>
|
|
812
812
|
<nav
|
|
813
|
-
v-if="tableActionsConfig"
|
|
813
|
+
v-if="tableActionsConfig && !formReadonly"
|
|
814
814
|
class="flex items-center justify-between"
|
|
815
815
|
>
|
|
816
816
|
<ShwfedActions
|
|
@@ -1246,7 +1246,7 @@ export { TableConfig, createTableConfig, getColumnTechnicalKey } from "./schema"
|
|
|
1246
1246
|
</ClientOnly>
|
|
1247
1247
|
</div>
|
|
1248
1248
|
<nav
|
|
1249
|
-
v-if="tableBottomActionsConfig"
|
|
1249
|
+
v-if="tableBottomActionsConfig && !formReadonly"
|
|
1250
1250
|
class="flex items-center justify-between"
|
|
1251
1251
|
>
|
|
1252
1252
|
<ShwfedActions
|
|
@@ -158,40 +158,6 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
|
|
|
158
158
|
readonly message: string;
|
|
159
159
|
}[]] | undefined;
|
|
160
160
|
}[];
|
|
161
|
-
readonly query?: {
|
|
162
|
-
readonly style?: string | undefined;
|
|
163
|
-
readonly id?: string | undefined;
|
|
164
|
-
readonly initial?: {
|
|
165
|
-
readonly data: string;
|
|
166
|
-
readonly request?: string | undefined;
|
|
167
|
-
} | undefined;
|
|
168
|
-
readonly displayName?: string | undefined;
|
|
169
|
-
readonly kind: "shwfed.component.form";
|
|
170
|
-
readonly fields: readonly any[];
|
|
171
|
-
readonly layouts: readonly {
|
|
172
|
-
readonly name: string;
|
|
173
|
-
readonly layout: {
|
|
174
|
-
readonly style?: string | undefined;
|
|
175
|
-
readonly columns: number;
|
|
176
|
-
readonly gap?: number | undefined;
|
|
177
|
-
readonly rows?: number | undefined;
|
|
178
|
-
readonly placements: {
|
|
179
|
-
readonly [x: string]: {
|
|
180
|
-
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
181
|
-
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
182
|
-
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
readonly media?: string | undefined;
|
|
187
|
-
}[];
|
|
188
|
-
readonly readonly?: string | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
readonly dataSource?: {
|
|
191
|
-
readonly data: string;
|
|
192
|
-
readonly total?: string | undefined;
|
|
193
|
-
readonly request?: string | undefined;
|
|
194
|
-
} | undefined;
|
|
195
161
|
readonly actions?: {
|
|
196
162
|
readonly size: "default" | "sm" | "xs";
|
|
197
163
|
readonly style?: string | undefined;
|
|
@@ -259,6 +225,40 @@ export declare function TableConfig(configure: (env: Environment) => void): Sche
|
|
|
259
225
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
260
226
|
}[];
|
|
261
227
|
} | undefined;
|
|
228
|
+
readonly query?: {
|
|
229
|
+
readonly style?: string | undefined;
|
|
230
|
+
readonly id?: string | undefined;
|
|
231
|
+
readonly initial?: {
|
|
232
|
+
readonly data: string;
|
|
233
|
+
readonly request?: string | undefined;
|
|
234
|
+
} | undefined;
|
|
235
|
+
readonly displayName?: string | undefined;
|
|
236
|
+
readonly kind: "shwfed.component.form";
|
|
237
|
+
readonly fields: readonly any[];
|
|
238
|
+
readonly layouts: readonly {
|
|
239
|
+
readonly name: string;
|
|
240
|
+
readonly layout: {
|
|
241
|
+
readonly style?: string | undefined;
|
|
242
|
+
readonly columns: number;
|
|
243
|
+
readonly gap?: number | undefined;
|
|
244
|
+
readonly rows?: number | undefined;
|
|
245
|
+
readonly placements: {
|
|
246
|
+
readonly [x: string]: {
|
|
247
|
+
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
248
|
+
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
249
|
+
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
readonly media?: string | undefined;
|
|
254
|
+
}[];
|
|
255
|
+
readonly readonly?: string | undefined;
|
|
256
|
+
} | undefined;
|
|
257
|
+
readonly dataSource?: {
|
|
258
|
+
readonly data: string;
|
|
259
|
+
readonly total?: string | undefined;
|
|
260
|
+
readonly request?: string | undefined;
|
|
261
|
+
} | undefined;
|
|
262
262
|
readonly bottomActions?: {
|
|
263
263
|
readonly size: "default" | "sm" | "xs";
|
|
264
264
|
readonly style?: string | undefined;
|
|
@@ -827,40 +827,6 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
|
|
|
827
827
|
readonly message: string;
|
|
828
828
|
}[]] | undefined;
|
|
829
829
|
}[];
|
|
830
|
-
query?: {
|
|
831
|
-
readonly style?: string | undefined;
|
|
832
|
-
readonly id?: string | undefined;
|
|
833
|
-
readonly initial?: {
|
|
834
|
-
readonly data: string;
|
|
835
|
-
readonly request?: string | undefined;
|
|
836
|
-
} | undefined;
|
|
837
|
-
readonly displayName?: string | undefined;
|
|
838
|
-
readonly kind: "shwfed.component.form";
|
|
839
|
-
readonly fields: readonly any[];
|
|
840
|
-
readonly layouts: readonly {
|
|
841
|
-
readonly name: string;
|
|
842
|
-
readonly layout: {
|
|
843
|
-
readonly style?: string | undefined;
|
|
844
|
-
readonly columns: number;
|
|
845
|
-
readonly gap?: number | undefined;
|
|
846
|
-
readonly rows?: number | undefined;
|
|
847
|
-
readonly placements: {
|
|
848
|
-
readonly [x: string]: {
|
|
849
|
-
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
850
|
-
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
851
|
-
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
852
|
-
};
|
|
853
|
-
};
|
|
854
|
-
};
|
|
855
|
-
readonly media?: string | undefined;
|
|
856
|
-
}[];
|
|
857
|
-
readonly readonly?: string | undefined;
|
|
858
|
-
} | undefined;
|
|
859
|
-
dataSource?: {
|
|
860
|
-
readonly data: string;
|
|
861
|
-
readonly total?: string | undefined;
|
|
862
|
-
readonly request?: string | undefined;
|
|
863
|
-
} | undefined;
|
|
864
830
|
actions?: {
|
|
865
831
|
readonly size: "default" | "sm" | "xs";
|
|
866
832
|
readonly style?: string | undefined;
|
|
@@ -928,6 +894,40 @@ export declare function createTableConfig(body: Omit<Schema.Schema.Type<ReturnTy
|
|
|
928
894
|
readonly variant?: "default" | "link" | "destructive" | "primary" | "ghost" | undefined;
|
|
929
895
|
}[];
|
|
930
896
|
} | undefined;
|
|
897
|
+
query?: {
|
|
898
|
+
readonly style?: string | undefined;
|
|
899
|
+
readonly id?: string | undefined;
|
|
900
|
+
readonly initial?: {
|
|
901
|
+
readonly data: string;
|
|
902
|
+
readonly request?: string | undefined;
|
|
903
|
+
} | undefined;
|
|
904
|
+
readonly displayName?: string | undefined;
|
|
905
|
+
readonly kind: "shwfed.component.form";
|
|
906
|
+
readonly fields: readonly any[];
|
|
907
|
+
readonly layouts: readonly {
|
|
908
|
+
readonly name: string;
|
|
909
|
+
readonly layout: {
|
|
910
|
+
readonly style?: string | undefined;
|
|
911
|
+
readonly columns: number;
|
|
912
|
+
readonly gap?: number | undefined;
|
|
913
|
+
readonly rows?: number | undefined;
|
|
914
|
+
readonly placements: {
|
|
915
|
+
readonly [x: string]: {
|
|
916
|
+
readonly area: readonly [readonly [number, number], readonly [number, number]];
|
|
917
|
+
readonly v?: "stretch" | "center" | "end" | "start" | undefined;
|
|
918
|
+
readonly h?: "stretch" | "center" | "end" | "start" | undefined;
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
readonly media?: string | undefined;
|
|
923
|
+
}[];
|
|
924
|
+
readonly readonly?: string | undefined;
|
|
925
|
+
} | undefined;
|
|
926
|
+
dataSource?: {
|
|
927
|
+
readonly data: string;
|
|
928
|
+
readonly total?: string | undefined;
|
|
929
|
+
readonly request?: string | undefined;
|
|
930
|
+
} | undefined;
|
|
931
931
|
bottomActions?: {
|
|
932
932
|
readonly size: "default" | "sm" | "xs";
|
|
933
933
|
readonly style?: string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type NumberDisplayMode = 'plain' | 'uppercaseChinese' | 'monoThousand';
|
|
2
2
|
export declare function toChineseUppercase(n: number): string;
|
|
3
|
+
export declare function roundToPrecision(n: number, precision: number, mode?: 'round' | 'floor' | 'ceil'): number;
|
|
3
4
|
export declare function formatNumberDisplay(value: unknown, opts: {
|
|
4
5
|
displayMode?: NumberDisplayMode;
|
|
5
6
|
precision?: number;
|
|
@@ -35,6 +35,17 @@ export function toChineseUppercase(n) {
|
|
|
35
35
|
}
|
|
36
36
|
return isNegative ? `\u8D1F${result}` : result;
|
|
37
37
|
}
|
|
38
|
+
export function roundToPrecision(n, precision, mode = "round") {
|
|
39
|
+
const factor = 10 ** precision;
|
|
40
|
+
switch (mode) {
|
|
41
|
+
case "floor":
|
|
42
|
+
return Math.floor(n * factor) / factor;
|
|
43
|
+
case "ceil":
|
|
44
|
+
return Math.ceil(n * factor) / factor;
|
|
45
|
+
default:
|
|
46
|
+
return Math.round(n * factor) / factor;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
38
49
|
export function formatNumberDisplay(value, opts) {
|
|
39
50
|
if (value === void 0 || value === null) return "-";
|
|
40
51
|
const n = Number(value);
|
|
@@ -45,20 +56,8 @@ export function formatNumberDisplay(value, opts) {
|
|
|
45
56
|
}
|
|
46
57
|
let result;
|
|
47
58
|
if (opts.precision !== void 0) {
|
|
48
|
-
const mode = opts.roundingMode ?? "round";
|
|
49
59
|
const digits = opts.precision;
|
|
50
|
-
const
|
|
51
|
-
let processed;
|
|
52
|
-
switch (mode) {
|
|
53
|
-
case "floor":
|
|
54
|
-
processed = Math.floor(n * factor) / factor;
|
|
55
|
-
break;
|
|
56
|
-
case "ceil":
|
|
57
|
-
processed = Math.ceil(n * factor) / factor;
|
|
58
|
-
break;
|
|
59
|
-
default:
|
|
60
|
-
processed = Math.round(n * factor) / factor;
|
|
61
|
-
}
|
|
60
|
+
const processed = roundToPrecision(n, digits, opts.roundingMode ?? "round");
|
|
62
61
|
result = processed.toFixed(digits);
|
|
63
62
|
} else {
|
|
64
63
|
result = String(n);
|