@univerjs/engine-formula 1.0.0-beta.0 → 1.0.0-beta.2

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.
Files changed (37) hide show
  1. package/lib/cjs/index.js +267 -151
  2. package/lib/cjs/locale/ca-ES.js +35 -35
  3. package/lib/cjs/locale/fr-FR.js +14 -14
  4. package/lib/cjs/locale/ko-KR.js +17 -17
  5. package/lib/cjs/locale/sk-SK.js +8 -8
  6. package/lib/cjs/locale/vi-VN.js +2 -2
  7. package/lib/es/index.js +270 -153
  8. package/lib/es/locale/ca-ES.js +35 -35
  9. package/lib/es/locale/fr-FR.js +14 -14
  10. package/lib/es/locale/ko-KR.js +17 -17
  11. package/lib/es/locale/sk-SK.js +8 -8
  12. package/lib/es/locale/vi-VN.js +2 -2
  13. package/lib/index.js +270 -153
  14. package/lib/locale/ca-ES.js +35 -35
  15. package/lib/locale/fr-FR.js +14 -14
  16. package/lib/locale/ko-KR.js +17 -17
  17. package/lib/locale/sk-SK.js +8 -8
  18. package/lib/locale/vi-VN.js +2 -2
  19. package/lib/types/basics/common.d.ts +2 -0
  20. package/lib/types/basics/regex.d.ts +4 -4
  21. package/lib/types/controllers/formula-calculation-trigger.controller.d.ts +1 -2
  22. package/lib/types/controllers/formula.controller.d.ts +1 -1
  23. package/lib/types/engine/value-object/array-value-object.d.ts +1 -1
  24. package/lib/types/functions/base-function.d.ts +2 -2
  25. package/lib/types/functions/logical/percentof/index.d.ts +5 -6
  26. package/lib/types/functions/lookup/xlookup/index.d.ts +4 -0
  27. package/lib/types/index.d.ts +0 -1
  28. package/lib/types/models/formula-data.model.d.ts +3 -1
  29. package/lib/types/services/register-other-formula.service.d.ts +3 -3
  30. package/lib/types/services/runtime.service.d.ts +2 -0
  31. package/lib/umd/index.js +4 -4
  32. package/lib/umd/locale/ca-ES.js +1 -1
  33. package/lib/umd/locale/fr-FR.js +2 -2
  34. package/lib/umd/locale/ko-KR.js +3 -3
  35. package/lib/umd/locale/sk-SK.js +1 -1
  36. package/lib/umd/locale/vi-VN.js +1 -1
  37. package/package.json +4 -4
@@ -3145,20 +3145,20 @@ const locale$9 = {
3145
3145
  }
3146
3146
  },
3147
3147
  EFFECT: {
3148
- description: "Returns the effective annual interest rate",
3149
- abstract: "Returns the effective annual interest rate",
3148
+ description: "Devuelve la tasa de interés anual efectiva",
3149
+ abstract: "Devuelve la tasa de interés anual efectiva",
3150
3150
  links: [{
3151
- title: "Instruction",
3151
+ title: "Instrucciones",
3152
3152
  url: "https://support.microsoft.com/ca-es/excel/functions/effect-function"
3153
3153
  }],
3154
3154
  functionParameter: {
3155
3155
  nominalRate: {
3156
- name: "nominal_rate",
3157
- detail: "The nominal interest rate."
3156
+ name: "tasa_nominal",
3157
+ detail: "La tasa de interés nominal."
3158
3158
  },
3159
3159
  npery: {
3160
- name: "npery",
3161
- detail: "The number of compounding periods per year."
3160
+ name: "núm_per_año",
3161
+ detail: "El número de periodos de composición por año."
3162
3162
  }
3163
3163
  }
3164
3164
  },
@@ -3211,66 +3211,66 @@ const locale$9 = {
3211
3211
  }
3212
3212
  },
3213
3213
  INTRATE: {
3214
- description: "Returns the interest rate for a fully invested security",
3215
- abstract: "Returns the interest rate for a fully invested security",
3214
+ description: "Devuelve la tasa de interés para la inversión total en un valor bursátil.",
3215
+ abstract: "Devuelve la tasa de interés para la inversión total en un valor bursátil.",
3216
3216
  links: [{
3217
- title: "Instruction",
3217
+ title: "Instrucciones",
3218
3218
  url: "https://support.microsoft.com/ca-es/excel/functions/intrate-function"
3219
3219
  }],
3220
3220
  functionParameter: {
3221
3221
  settlement: {
3222
- name: "settlement",
3223
- detail: "The security's settlement date."
3222
+ name: "liquidación",
3223
+ detail: "Obligatorio. La fecha de liquidación del valor bursátil. La fecha de liquidación del valor bursátil es la fecha posterior a la fecha de emisión en la que el comprador adquiere el valor bursátil."
3224
3224
  },
3225
3225
  maturity: {
3226
- name: "maturity",
3227
- detail: "The security's maturity date."
3226
+ name: "vencimiento",
3227
+ detail: "Obligatorio. La fecha de vencimiento del valor bursátil. La fecha de vencimiento es aquella en la que expira el valor bursátil."
3228
3228
  },
3229
3229
  investment: {
3230
- name: "investment",
3231
- detail: "The amount invested in the security."
3230
+ name: "inversión",
3231
+ detail: "Obligatorio. Es la cantidad de dinero invertido en el valor bursátil."
3232
3232
  },
3233
3233
  redemption: {
3234
- name: "redemption",
3235
- detail: "The amount to be received at maturity."
3234
+ name: "rescate",
3235
+ detail: "Obligatorio. Es el valor que se recibirá en la fecha de vencimiento."
3236
3236
  },
3237
3237
  basis: {
3238
- name: "basis",
3239
- detail: "The type of day count basis to use."
3238
+ name: "base",
3239
+ detail: "Opcional. Determina en qué tipo de base deben contarse los días."
3240
3240
  }
3241
3241
  }
3242
3242
  },
3243
3243
  IPMT: {
3244
- description: "Returns the interest payment for an investment for a given period",
3245
- abstract: "Returns the interest payment for an investment for a given period",
3244
+ description: "Devuelve el pago de intereses de una inversión durante un periodo determinado",
3245
+ abstract: "Devuelve el pago de intereses de una inversión durante un periodo determinado",
3246
3246
  links: [{
3247
- title: "Instruction",
3247
+ title: "Instrucciones",
3248
3248
  url: "https://support.microsoft.com/ca-es/excel/functions/ipmt-function"
3249
3249
  }],
3250
3250
  functionParameter: {
3251
3251
  rate: {
3252
- name: "rate",
3253
- detail: "The interest rate per period."
3252
+ name: "tasa",
3253
+ detail: "La tasa de interés por periodo."
3254
3254
  },
3255
3255
  per: {
3256
- name: "per",
3257
- detail: "The period for which you want to find the interest and must be in the range 1 to nper."
3256
+ name: "periodo",
3257
+ detail: "El periodo para el cual desea buscar el interés y debe estar en el rango de 1 a núm_pagos."
3258
3258
  },
3259
3259
  nper: {
3260
- name: "nper",
3261
- detail: "The total number of payment periods in an annuity."
3260
+ name: "núm_pagos",
3261
+ detail: "El número total de periodos de pago en una anualidad."
3262
3262
  },
3263
3263
  pv: {
3264
- name: "pv",
3265
- detail: "The present value, or the lump-sum amount that a series of future payments is worth right now."
3264
+ name: "va",
3265
+ detail: "El valor actual, o la cantidad total que vale ahora una serie de pagos futuros."
3266
3266
  },
3267
3267
  fv: {
3268
- name: "fv",
3269
- detail: "The future value, or a cash balance you want to attain after the last payment is made."
3268
+ name: "vf",
3269
+ detail: "El valor futuro, o un saldo en efectivo que desea lograr después de realizar el último pago."
3270
3270
  },
3271
3271
  type: {
3272
- name: "type",
3273
- detail: "The number 0 or 1 and indicates when payments are due."
3272
+ name: "tipo",
3273
+ detail: "El número 0 o 1 e indica cuándo vencen los pagos."
3274
3274
  }
3275
3275
  }
3276
3276
  },
@@ -3145,20 +3145,20 @@ const locale$9 = {
3145
3145
  }
3146
3146
  },
3147
3147
  EFFECT: {
3148
- description: "Returns the effective annual interest rate",
3149
- abstract: "Returns the effective annual interest rate",
3148
+ description: "Cette fonction renvoie le taux d’intérêt annuel effectif.",
3149
+ abstract: "Taux d’intérêt annuel effectif.",
3150
3150
  links: [{
3151
3151
  title: "Instruction",
3152
3152
  url: "https://support.microsoft.com/fr-fr/excel/functions/effect-function"
3153
3153
  }],
3154
3154
  functionParameter: {
3155
3155
  nominalRate: {
3156
- name: "nominal_rate",
3157
- detail: "The nominal interest rate."
3156
+ name: "taux_nominal",
3157
+ detail: "Représente le taux d’intérêt nominal."
3158
3158
  },
3159
3159
  npery: {
3160
- name: "npery",
3161
- detail: "The number of compounding periods per year."
3160
+ name: "nb_périodes",
3161
+ detail: "Nombre de périodes annuelles pour le calcul des intérêts composés."
3162
3162
  }
3163
3163
  }
3164
3164
  },
@@ -5148,20 +5148,20 @@ const locale$6 = {
5148
5148
  }],
5149
5149
  functionParameter: {
5150
5150
  dataField: {
5151
- name: "dataField",
5152
- detail: ""
5151
+ name: "champ_données",
5152
+ detail: "Nom du champ du tableau croisé dynamique contenant les données à récupérer. Il doit être placé entre guillemets."
5153
5153
  },
5154
5154
  pivotTable: {
5155
- name: "pivotTable",
5156
- detail: ""
5155
+ name: "tableau_croisé_dyn",
5156
+ detail: "Référence à une cellule, une plage ou une plage nommée du tableau croisé dynamique contenant les données."
5157
5157
  },
5158
5158
  field1: {
5159
- name: "field1",
5160
- detail: ""
5159
+ name: "champ1",
5160
+ detail: "Paire facultative de noms de champ et d’élément décrivant les données à récupérer."
5161
5161
  },
5162
5162
  item1: {
5163
- name: "item1",
5164
- detail: ""
5163
+ name: "élément1",
5164
+ detail: "Paire facultative de noms de champ et d’élément décrivant les données à récupérer."
5165
5165
  }
5166
5166
  }
5167
5167
  },
@@ -1862,20 +1862,20 @@ const locale$10 = {
1862
1862
  }
1863
1863
  },
1864
1864
  BITAND: {
1865
- description: "Returns a 'Bitwise And' of two numbers",
1866
- abstract: "Returns a 'Bitwise And' of two numbers",
1865
+ description: " 숫자의 비트 단위 'AND'를 반환합니다.",
1866
+ abstract: " 숫자의 비트 단위 'AND'를 반환합니다.",
1867
1867
  links: [{
1868
1868
  title: "Instruction",
1869
1869
  url: "https://support.microsoft.com/ko-kr/excel/functions/bitand-function"
1870
1870
  }],
1871
1871
  functionParameter: {
1872
1872
  number1: {
1873
- name: "number1",
1874
- detail: "Must be in decimal form and greater than or equal to 0."
1873
+ name: "번호1",
1874
+ detail: "0보다 크거나 같은 10진수 형식이어야 합니다."
1875
1875
  },
1876
1876
  number2: {
1877
- name: "number2",
1878
- detail: "Must be in decimal form and greater than or equal to 0."
1877
+ name: "번호2",
1878
+ detail: "0보다 크거나 같은 10진수 형식이어야 합니다."
1879
1879
  }
1880
1880
  }
1881
1881
  },
@@ -1982,16 +1982,16 @@ const locale$10 = {
1982
1982
  }],
1983
1983
  functionParameter: {
1984
1984
  number: {
1985
- name: "number",
1986
- detail: "is the value in from_units to convert."
1985
+ name: "숫자",
1986
+ detail: "변환할 from_unit 단위의 값입니다."
1987
1987
  },
1988
1988
  fromUnit: {
1989
1989
  name: "from_unit",
1990
- detail: "is the units for number."
1990
+ detail: "숫자의 단위입니다."
1991
1991
  },
1992
1992
  toUnit: {
1993
1993
  name: "to_unit",
1994
- detail: "is the units for the result."
1994
+ detail: "결과의 단위입니다."
1995
1995
  }
1996
1996
  }
1997
1997
  },
@@ -2308,8 +2308,8 @@ const locale$10 = {
2308
2308
  } }
2309
2309
  },
2310
2310
  IMDIV: {
2311
- description: "Returns the quotient of two complex numbers",
2312
- abstract: "Returns the quotient of two complex numbers",
2311
+ description: "x + yi 또는 x + yj 텍스트 형식인 두 복소수의 나눗셈 몫을 반환합니다.",
2312
+ abstract: " 복소수의 나눗셈 몫을 반환합니다.",
2313
2313
  links: [{
2314
2314
  title: "Instruction",
2315
2315
  url: "https://support.microsoft.com/ko-kr/excel/functions/imdiv-function"
@@ -2317,11 +2317,11 @@ const locale$10 = {
2317
2317
  functionParameter: {
2318
2318
  inumber1: {
2319
2319
  name: "inumber1",
2320
- detail: "The complex numerator or dividend."
2320
+ detail: "분자 또는 피제수인 복소수입니다."
2321
2321
  },
2322
2322
  inumber2: {
2323
2323
  name: "inumber2",
2324
- detail: "The complex denominator or divisor."
2324
+ detail: "분모 또는 제수인 복소수입니다."
2325
2325
  }
2326
2326
  }
2327
2327
  },
@@ -4763,7 +4763,7 @@ const locale$7 = {
4763
4763
  },
4764
4764
  value3: {
4765
4765
  name: "lambda",
4766
- detail: " A LAMBDA that is called to create the array. The LAMBDA takes two parameters: row (The row index of the array), col (The column index of the array)."
4766
+ detail: "배열을 만들기 위해 호출되는 LAMBDA입니다. LAMBDA 인덱스와 인덱스 매개 변수를 사용합니다."
4767
4767
  }
4768
4768
  }
4769
4769
  },
@@ -8314,8 +8314,8 @@ const locale$4 = {
8314
8314
  detail: "MARGINOFERROR(A1:C3, 0.99)"
8315
8315
  },
8316
8316
  confidence: {
8317
- name: "confidence",
8318
- detail: "The desired confidence level between (0, 1)."
8317
+ name: "신뢰도",
8318
+ detail: "(0, 1) 범위에서 원하는 신뢰 수준입니다."
8319
8319
  }
8320
8320
  }
8321
8321
  },
@@ -5148,20 +5148,20 @@ const locale$6 = {
5148
5148
  }],
5149
5149
  functionParameter: {
5150
5150
  dataField: {
5151
- name: "dataField",
5152
- detail: ""
5151
+ name: "údajové_pole",
5152
+ detail: "Názov poľa kontingenčnej tabuľky obsahujúce údaje, ktoré chcete načítať. Musí byť v úvodzovkách."
5153
5153
  },
5154
5154
  pivotTable: {
5155
- name: "pivotTable",
5156
- detail: ""
5155
+ name: "kontingenčná_tabuľka",
5156
+ detail: "Odkaz na bunku, rozsah buniek alebo pomenovaný rozsah v kontingenčnej tabuľke obsahujúcej požadované údaje."
5157
5157
  },
5158
5158
  field1: {
5159
- name: "field1",
5160
- detail: ""
5159
+ name: "pole1",
5160
+ detail: "Voliteľná dvojica názvu poľa a položky opisujúca údaje, ktoré chcete načítať."
5161
5161
  },
5162
5162
  item1: {
5163
- name: "item1",
5164
- detail: ""
5163
+ name: "položka1",
5164
+ detail: "Voliteľná dvojica názvu poľa a položky opisujúca údaje, ktoré chcete načítať."
5165
5165
  }
5166
5166
  }
5167
5167
  },
@@ -5821,8 +5821,8 @@ const locale$5 = {
5821
5821
  }
5822
5822
  },
5823
5823
  ARABIC: {
5824
- description: "Converts a Roman number to Arabic, as a number",
5825
- abstract: "Converts a Roman number to Arabic, as a number",
5824
+ description: "Chuyển đổi một chữ số La sang một chữ số Ả-rập.",
5825
+ abstract: "Chuyển đổi một chữ số La sang một chữ số Ả-rập.",
5826
5826
  links: [{
5827
5827
  title: "Hướng dẫn",
5828
5828
  url: "https://support.microsoft.com/vi-vn/excel/functions/arabic-function"
@@ -220,6 +220,8 @@ export interface ISuperTable {
220
220
  * Sheet tables default to true; Base virtual tables store records from row 0.
221
221
  */
222
222
  showHeader?: boolean;
223
+ /** Whether the projected range contains a physical totals row. */
224
+ showFooter?: boolean;
223
225
  }
224
226
  export declare enum TableOptionType {
225
227
  ALL = "#All",
@@ -32,10 +32,10 @@ export declare const REFERENCE_REGEX_SINGLE_ROW = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\
32
32
  export declare const REFERENCE_REGEX_SINGLE_ROW_PRECOMPILING: RegExp;
33
33
  export declare const REFERENCE_REGEX_SINGLE_COLUMN = "^'?(\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?(((?![\\[\\]\\/?*\\\\]).)*!)?'?\\s*?\\$?[A-Za-z]+$";
34
34
  export declare const REFERENCE_REGEX_SINGLE_COLUMN_PRECOMPILING: RegExp;
35
- export declare const REFERENCE_TABLE_ALL_COLUMN_REGEX = "^(?:(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+$";
36
- export declare const REFERENCE_TABLE_SINGLE_COLUMN_REGEX = "^(?:(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[[^#]*#?\\]|\\[\\[#.+\\]\\s*?,\\s*?\\[[^#]*#?\\]\\])+$";
37
- export declare const REFERENCE_TABLE_MULTIPLE_COLUMN_REGEX = "^(?:(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[\\[[^#]*#?\\]\\s*?:\\s*?\\[[^#]*#?\\]\\])?$|^(?:(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[\\[#.+\\]\\s*?,\\s*?\\[[^#]*#?\\]\\s*?:\\s*?\\[[^#]*#?\\]\\])?$";
38
- export declare const REFERENCE_TABLE_TITLE_ONLY_ANY_HASH_REGEX = "^(?:(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[([^\\[\\]\\/?:\"<>|*\\\\]+)\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+\\[\\s*#([^\\]]+)\\s*\\]$";
35
+ export declare const REFERENCE_TABLE_ALL_COLUMN_REGEX = "^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+$";
36
+ export declare const REFERENCE_TABLE_SINGLE_COLUMN_REGEX = "^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[[^#]*#?\\]|\\[\\[#.+\\]\\s*?,\\s*?\\[[^#]*#?\\]\\])+$";
37
+ export declare const REFERENCE_TABLE_MULTIPLE_COLUMN_REGEX = "^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[\\[[^#]*#?\\]\\s*?:\\s*?\\[[^#]*#?\\]\\])?$|^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+(\\[\\[#.+\\]\\s*?,\\s*?\\[[^#]*#?\\]\\s*?:\\s*?\\[[^#]*#?\\]\\])?$";
38
+ export declare const REFERENCE_TABLE_TITLE_ONLY_ANY_HASH_REGEX = "^(?:(?:\\[(?:[^\\]]|\\]\\])+\\]|'(?:[^']|'')+'|[^\\s!\\[\\]]+)!)?(?:\\[(?:[^\\]]|\\]\\])+\\])?((?![~!@#$%^&*()+<>?:,./;\u2019\uFF0C\u3002\u3001\u2018\uFF1A\u201C\u300A\u300B\uFF1F~\uFF01@#\uFFE5%\u2026\u2026\uFF08\uFF09\u3010\u3011\\[\\]\\/\\\\]).)+\\[\\s*#([^\\]]+)\\s*\\]$";
39
39
  export declare const REFERENCE_TABLE_ALL_COLUMN_REGEX_PRECOMPILING: RegExp;
40
40
  export declare const REFERENCE_TABLE_SINGLE_COLUMN_REGEX_PRECOMPILING: RegExp;
41
41
  export declare const REFERENCE_TABLE_MULTIPLE_COLUMN_REGEX_PRECOMPILING: RegExp;
@@ -15,7 +15,6 @@
15
15
  */
16
16
  import { Disposable, LifecycleService } from '@univerjs/core';
17
17
  import { FormulaCalculationTriggerService } from '../services/formula-calculation-trigger.service';
18
- import { RegisterOtherFormulaService } from '../services/register-other-formula.service';
19
18
  export declare class FormulaCalculationTriggerController extends Disposable {
20
- constructor(formulaCalculationTriggerService: FormulaCalculationTriggerService, registerOtherFormulaService: RegisterOtherFormulaService, lifecycleService: LifecycleService);
19
+ constructor(formulaCalculationTriggerService: FormulaCalculationTriggerService, lifecycleService: LifecycleService);
21
20
  }
@@ -17,7 +17,7 @@ import { Disposable, ICommandService, IConfigService } from '@univerjs/core';
17
17
  import { DataSyncPrimaryController } from '@univerjs/rpc';
18
18
  import { IFunctionService } from '../services/function.service';
19
19
  import { RegisterOtherFormulaService } from '../services/register-other-formula.service';
20
- type FormulaDataSyncController = Pick<DataSyncPrimaryController, 'registerSyncingMutations' | 'syncUnitMutations'>;
20
+ type FormulaDataSyncController = Pick<DataSyncPrimaryController, 'registerSyncingMutations' | 'syncUnitMutations' | 'waitForPendingMutations'>;
21
21
  export declare class FormulaController extends Disposable {
22
22
  private readonly _commandService;
23
23
  private readonly _functionService;
@@ -132,7 +132,7 @@ export declare class ArrayValueObject extends BaseValueObject {
132
132
  * the sequential matching approach is only used for special matches in XLOOKUP and XMATCH.
133
133
  * For example, when match_mode is set to 1 and -1 for an exact match. If not found, it returns the next smaller item.
134
134
  */
135
- orderSearch(valueObject: BaseValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, isFuzzyMatching?: boolean): void | {
135
+ orderSearch(valueObject: BaseValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, isFuzzyMatching?: boolean, keepFirstNearest?: boolean): void | {
136
136
  row: number;
137
137
  column: number;
138
138
  } | null;
@@ -167,11 +167,11 @@ export declare class BaseFunction {
167
167
  private _getOneLastByRaw;
168
168
  equalSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean): BaseValueObject;
169
169
  fuzzySearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean): BaseValueObject;
170
- orderSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean): BaseValueObject;
170
+ orderSearch(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, keepFirstNearest?: boolean): BaseValueObject;
171
171
  binarySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, axis?: number, searchType?: ArrayBinarySearchType, matchType?: ArrayOrderSearchType): ErrorValueObject | ArrayValueObject | undefined;
172
172
  equalSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
173
173
  fuzzySearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, isFirst?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
174
- orderSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, axis?: number): ErrorValueObject | ArrayValueObject | undefined;
174
+ orderSearchExpand(value: BaseValueObject, searchArray: ArrayValueObject, resultArray: ArrayValueObject, searchType?: ArrayOrderSearchType, isDesc?: boolean, axis?: number, keepFirstNearest?: boolean): ErrorValueObject | ArrayValueObject | undefined;
175
175
  flattenArray(variants: BaseValueObject[], ignoreLogicalValuesAndText?: boolean): ArrayValueObject | BaseValueObject;
176
176
  private _includingLogicalValuesAndText;
177
177
  createReferenceObject(reference: BaseReferenceObject, range: IRange): ErrorValueObject | BaseReferenceObject;
@@ -14,14 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { BaseValueObject } from '../../../engine/value-object/base-value-object';
17
- import { ErrorValueObject } from '../../../engine/value-object/base-value-object';
18
- import { BaseFunction } from '../../base-function';
17
+ import { Sum } from '../../math/sum';
19
18
  /**
20
- * PERCENTOF is an Excel GROUPBY aggregator token. It is evaluated by GROUPBY's
21
- * AST path, not as a standalone scalar function.
19
+ * PERCENTOF is logically equivalent to SUM(dataSubset) / SUM(dataAll).
20
+ * GROUPBY also consumes the function name as an aggregator token through its AST path.
22
21
  */
23
- export declare class Percentof extends BaseFunction {
22
+ export declare class Percentof extends Sum {
24
23
  minParams: number;
25
24
  maxParams: number;
26
- calculate(..._variants: BaseValueObject[]): ErrorValueObject;
25
+ calculate(dataSubset: BaseValueObject, dataAll: BaseValueObject): BaseValueObject;
27
26
  }
@@ -23,6 +23,10 @@ export declare class Xlookup extends BaseFunction {
23
23
  private _legacyImplicitLookupValue;
24
24
  private _handleExpandObject;
25
25
  private _handleSingleObject;
26
+ private _exactSearch;
27
+ private _exactSearchExpand;
28
+ private _findExactPosition;
29
+ private _isExactMatch;
26
30
  private _blankResultAsZero;
27
31
  /**
28
32
  * Wildcard matching and binary search cannot appear at the same time
@@ -137,7 +137,6 @@ export { getObjectValue } from './functions/util';
137
137
  export { functionWeb } from './functions/web/function-map';
138
138
  export { FUNCTION_NAMES_WEB } from './functions/web/function-names';
139
139
  export { FormulaDataModel } from './models/formula-data.model';
140
- export { initSheetFormulaData } from './models/formula-data.model';
141
140
  export type { IRangeChange } from './models/formula-data.model';
142
141
  export { UniverFormulaEnginePlugin } from './plugin';
143
142
  export { ActiveDirtyManagerService, IActiveDirtyManagerService } from './services/active-dirty-manager.service';
@@ -24,6 +24,7 @@ export interface IRangeChange {
24
24
  export declare class FormulaDataModel extends Disposable {
25
25
  private readonly _univerInstanceService;
26
26
  private readonly _lexerTreeBuilder;
27
+ private _formulaIdMapData;
27
28
  private _arrayFormulaRange;
28
29
  private _arrayFormulaCellData;
29
30
  private _unitImageFormulaData;
@@ -32,6 +33,8 @@ export declare class FormulaDataModel extends Disposable {
32
33
  clearPreviousArrayFormulaCellData(clearArrayFormulaCellData: IRuntimeUnitDataType): void;
33
34
  mergeArrayFormulaCellData(unitData: IRuntimeUnitDataType): void;
34
35
  getFormulaData(): IFormulaData;
36
+ initSheetFormulaData(formulaData: IFormulaData, unitId: string, sheetId: string, cellMatrix: ObjectMatrix<Nullable<ICellData>>): IFormulaData;
37
+ clearFormulaIdMap(unitId: string, sheetId?: string): void;
35
38
  getSheetFormulaData(unitId: string, sheetId: string): Nullable<IObjectMatrixPrimitiveType<Nullable<IFormulaDataItem>>>;
36
39
  getArrayFormulaRange(): IArrayFormulaRangeType;
37
40
  setArrayFormulaRange(value: IArrayFormulaRangeType): void;
@@ -67,4 +70,3 @@ export declare class FormulaDataModel extends Disposable {
67
70
  getFormulaDirtyRanges(): IUnitRange[];
68
71
  private _initSheetArrayFormulaData;
69
72
  }
70
- export declare function initSheetFormulaData(formulaData: IFormulaData, unitId: string, sheetId: string, cellMatrix: ObjectMatrix<Nullable<ICellData>>): IFormulaData;
@@ -13,11 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IRange, Nullable } from '@univerjs/core';
16
+ import type { IDisposable, IRange, Nullable } from '@univerjs/core';
17
17
  import type { ISetFormulaCalculationResultMutation } from '../commands/mutations/set-formula-calculation.mutation';
18
18
  import type { IOtherFormulaResult } from './formula-common';
19
19
  import { Disposable, ICommandService, LifecycleService } from '@univerjs/core';
20
- import { BehaviorSubject } from 'rxjs';
21
20
  import { IActiveDirtyManagerService } from './active-dirty-manager.service';
22
21
  export declare enum OtherFormulaBizType {
23
22
  DEFAULT = "default",
@@ -33,6 +32,7 @@ export declare class RegisterOtherFormulaService extends Disposable {
33
32
  private _activeDirtyManagerService;
34
33
  private readonly _lifecycleService;
35
34
  private _formulaCacheMap;
35
+ private _mutationSyncHandler?;
36
36
  private _formulaChangeWithRange$;
37
37
  formulaChangeWithRange$: import("rxjs").Observable<{
38
38
  unitId: string;
@@ -45,12 +45,12 @@ export declare class RegisterOtherFormulaService extends Disposable {
45
45
  formulaResult$: import("rxjs").Observable<Record<string, Record<string, IOtherFormulaResult[]>>>;
46
46
  private _otherFormulaResultApplied$;
47
47
  otherFormulaResultApplied$: import("rxjs").Observable<ISetFormulaCalculationResultMutation>;
48
- calculateStarted$: BehaviorSubject<boolean>;
49
48
  constructor(_commandService: ICommandService, _activeDirtyManagerService: IActiveDirtyManagerService, _lifecycleService: LifecycleService);
50
49
  dispose(): void;
51
50
  private _ensureCacheMap;
52
51
  private _createFormulaId;
53
52
  private _initFormulaRegister;
53
+ setMutationSyncHandler(handler: (unitId: string) => () => Promise<void>): IDisposable;
54
54
  private _initFormulaCalculationResultChange;
55
55
  registerFormulaWithRange(unitId: string, subUnitId: string, formulaText: string, ranges?: IRange[], extra?: Record<string, any>, bizType?: OtherFormulaBizType, bizId?: string): string;
56
56
  getFormulaDirtyMap(unitId: string): Record<string, Record<string, boolean>>;
@@ -78,6 +78,7 @@ export interface IFormulaRuntimeService {
78
78
  reset(): void;
79
79
  setCurrent(row: number, column: number, rowCount: number, columnCount: number, sheetId: string, unitId: string): void;
80
80
  setFunctionRefInfoOverride(rowCount: number, columnCount: number): () => void;
81
+ hasFunctionRefInfoOverride(): boolean;
81
82
  registerFunctionDefinitionPrivacyVar(lambdaId: string, lambdaVar: Map<string, Nullable<BaseAstNode>>): void;
82
83
  getFunctionDefinitionPrivacyVar(lambdaId: string): Nullable<Map<string, Nullable<BaseAstNode>>>;
83
84
  setRuntimeData(functionVariant: FunctionVariantType): void;
@@ -187,6 +188,7 @@ export declare class FormulaRuntimeService extends Disposable implements IFormul
187
188
  clearReferenceAndNumberformatCache(): void;
188
189
  setCurrent(row: number, column: number, rowCount: number, columnCount: number, sheetId: string, unitId: string): void;
189
190
  setFunctionRefInfoOverride(rowCount: number, columnCount: number): () => void;
191
+ hasFunctionRefInfoOverride(): boolean;
190
192
  clearFunctionDefinitionPrivacyVar(): void;
191
193
  registerFunctionDefinitionPrivacyVar(lambdaId: string, lambdaVar: Map<string, Nullable<BaseAstNode>>): void;
192
194
  getFunctionDefinitionPrivacyVar(lambdaId: string): Nullable<Map<string, Nullable<BaseAstNode>>>;