@@ -211,37 +211,38 @@ export const insertTable: ActionSpec = {
211211 icon : "o-spreadsheet-Icon.PAINT_TABLE" ,
212212} ;
213213
214- export const insertFunction : ActionSpec = {
215- name : _t ( "Function" ) ,
216- icon : "o-spreadsheet-Icon.FORMULA" ,
217- } ;
218-
219214export const insertFunctionSum : ActionSpec = {
215+ id : "insert_function_sum" ,
220216 name : _t ( "SUM" ) ,
221217 execute : ( env ) => env . startCellEdition ( `=SUM(` ) ,
222218} ;
223219
224220export const insertFunctionAverage : ActionSpec = {
221+ id : "insert_function_average" ,
225222 name : _t ( "AVERAGE" ) ,
226223 execute : ( env ) => env . startCellEdition ( `=AVERAGE(` ) ,
227224} ;
228225
229226export const insertFunctionCount : ActionSpec = {
227+ id : "insert_function_count" ,
230228 name : _t ( "COUNT" ) ,
231229 execute : ( env ) => env . startCellEdition ( `=COUNT(` ) ,
232230} ;
233231
234232export const insertFunctionMax : ActionSpec = {
233+ id : "insert_function_max" ,
235234 name : _t ( "MAX" ) ,
236235 execute : ( env ) => env . startCellEdition ( `=MAX(` ) ,
237236} ;
238237
239238export const insertFunctionMin : ActionSpec = {
239+ id : "insert_function_min" ,
240240 name : _t ( "MIN" ) ,
241241 execute : ( env ) => env . startCellEdition ( `=MIN(` ) ,
242242} ;
243243
244- export const categorieFunctionAll : ActionSpec = {
244+ export const categoryFunctionAll : ActionSpec = {
245+ id : "category_function_all" ,
245246 name : _t ( "All" ) ,
246247 children : [ allFunctionListMenuBuilder ] ,
247248} ;
@@ -273,6 +274,20 @@ export const categoriesFunctionListMenuBuilder: ActionBuilder = () => {
273274 } ) ;
274275} ;
275276
277+ export const insertFunction : ActionSpec = {
278+ name : _t ( "Function" ) ,
279+ icon : "o-spreadsheet-Icon.FORMULA" ,
280+ children : [
281+ insertFunctionSum ,
282+ insertFunctionAverage ,
283+ insertFunctionCount ,
284+ insertFunctionMax ,
285+ { ...insertFunctionMin , separator : true } ,
286+ categoryFunctionAll ,
287+ categoriesFunctionListMenuBuilder ,
288+ ] ,
289+ } ;
290+
276291export const insertLink : ActionSpec = {
277292 name : _t ( "Link" ) ,
278293 execute : ACTIONS . INSERT_LINK ,
0 commit comments