@univerjs/sheets-conditional-formatting 1.3.1 → 1.5.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.
Files changed (76) hide show
  1. package/README.md +6 -5
  2. package/lib/cjs/facade.js +13 -21
  3. package/lib/cjs/index.js +284 -137
  4. package/lib/cjs/locale/ar-SA.js +1 -2
  5. package/lib/cjs/locale/ca-ES.js +1 -2
  6. package/lib/cjs/locale/de-DE.js +1 -2
  7. package/lib/cjs/locale/en-US.js +1 -2
  8. package/lib/cjs/locale/es-ES.js +1 -2
  9. package/lib/cjs/locale/fa-IR.js +1 -2
  10. package/lib/cjs/locale/fr-FR.js +1 -2
  11. package/lib/cjs/locale/id-ID.js +1 -2
  12. package/lib/cjs/locale/it-IT.js +1 -2
  13. package/lib/cjs/locale/ja-JP.js +1 -2
  14. package/lib/cjs/locale/ko-KR.js +1 -2
  15. package/lib/cjs/locale/pl-PL.js +1 -2
  16. package/lib/cjs/locale/pt-BR.js +1 -2
  17. package/lib/cjs/locale/ru-RU.js +1 -2
  18. package/lib/cjs/locale/sk-SK.js +1 -2
  19. package/lib/cjs/locale/vi-VN.js +1 -2
  20. package/lib/cjs/locale/zh-CN.js +1 -2
  21. package/lib/cjs/locale/zh-HK.js +1 -2
  22. package/lib/cjs/locale/zh-TW.js +1 -2
  23. package/lib/es/facade.js +13 -21
  24. package/lib/es/index.js +285 -138
  25. package/lib/es/locale/ar-SA.js +1 -2
  26. package/lib/es/locale/ca-ES.js +1 -2
  27. package/lib/es/locale/de-DE.js +1 -2
  28. package/lib/es/locale/en-US.js +1 -2
  29. package/lib/es/locale/es-ES.js +1 -2
  30. package/lib/es/locale/fa-IR.js +1 -2
  31. package/lib/es/locale/fr-FR.js +1 -2
  32. package/lib/es/locale/id-ID.js +1 -2
  33. package/lib/es/locale/it-IT.js +1 -2
  34. package/lib/es/locale/ja-JP.js +1 -2
  35. package/lib/es/locale/ko-KR.js +1 -2
  36. package/lib/es/locale/pl-PL.js +1 -2
  37. package/lib/es/locale/pt-BR.js +1 -2
  38. package/lib/es/locale/ru-RU.js +1 -2
  39. package/lib/es/locale/sk-SK.js +1 -2
  40. package/lib/es/locale/vi-VN.js +1 -2
  41. package/lib/es/locale/zh-CN.js +1 -2
  42. package/lib/es/locale/zh-HK.js +1 -2
  43. package/lib/es/locale/zh-TW.js +1 -2
  44. package/lib/facade.js +13 -21
  45. package/lib/index.js +285 -138
  46. package/lib/locale/ar-SA.js +1 -2
  47. package/lib/locale/ca-ES.js +1 -2
  48. package/lib/locale/de-DE.js +1 -2
  49. package/lib/locale/en-US.js +1 -2
  50. package/lib/locale/es-ES.js +1 -2
  51. package/lib/locale/fa-IR.js +1 -2
  52. package/lib/locale/fr-FR.js +1 -2
  53. package/lib/locale/id-ID.js +1 -2
  54. package/lib/locale/it-IT.js +1 -2
  55. package/lib/locale/ja-JP.js +1 -2
  56. package/lib/locale/ko-KR.js +1 -2
  57. package/lib/locale/pl-PL.js +1 -2
  58. package/lib/locale/pt-BR.js +1 -2
  59. package/lib/locale/ru-RU.js +1 -2
  60. package/lib/locale/sk-SK.js +1 -2
  61. package/lib/locale/vi-VN.js +1 -2
  62. package/lib/locale/zh-CN.js +1 -2
  63. package/lib/locale/zh-HK.js +1 -2
  64. package/lib/locale/zh-TW.js +1 -2
  65. package/lib/types/base/const.d.ts +1 -1
  66. package/lib/types/models/calculate-unit-v2/utils.d.ts +1 -1
  67. package/lib/types/render/conditional-formatting-raster-cache.d.ts +24 -0
  68. package/lib/types/render/data-bar.render.d.ts +4 -1
  69. package/lib/types/render/icon.render.d.ts +5 -1
  70. package/lib/types/render/resolve-render-ranges.d.ts +18 -0
  71. package/lib/types/services/conditional-formatting-formula.service.d.ts +3 -3
  72. package/lib/types/services/conditional-formatting-range-transform.service.d.ts +7 -0
  73. package/lib/types/services/conditional-formatting.service.d.ts +1 -1
  74. package/lib/umd/facade.js +1 -1
  75. package/lib/umd/index.js +1 -1
  76. package/package.json +12 -12
package/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## Package Overview
10
10
 
11
- | Package | UMD global | CSS | Locales | Facade entry |
12
- | --- | --- | :---: | :---: | :---: |
13
- | `@univerjs/sheets-conditional-formatting` | `UniverSheetsConditionalFormatting` | No | Yes | Yes |
11
+ | Package | UMD global | CSS | Locales | Facade entry | Worker entry |
12
+ | --- | --- | :---: | :---: | :---: | :---: |
13
+ | `@univerjs/sheets-conditional-formatting` | `UniverSheetsConditionalFormatting` | No | Yes | Yes | No |
14
14
 
15
15
  ## Installation
16
16
 
@@ -20,10 +20,10 @@ pnpm add @univerjs/sheets-conditional-formatting
20
20
  npm install @univerjs/sheets-conditional-formatting
21
21
  ```
22
22
 
23
- Keep all `@univerjs/*` packages on the same version.
24
-
25
23
  ## Usage
26
24
 
25
+ Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
26
+
27
27
  ```ts
28
28
  import { LocaleType, mergeLocales, Univer } from '@univerjs/core';
29
29
  import { UniverSheetsConditionalFormattingPlugin } from '@univerjs/sheets-conditional-formatting';
@@ -42,6 +42,7 @@ univer.registerPlugin(UniverSheetsConditionalFormattingPlugin);
42
42
  ## Integration Notes
43
43
 
44
44
  Use this package with `@univerjs/sheets-conditional-formatting-ui` when users need menus and rule-management panels.
45
+ - Import `@univerjs/sheets-conditional-formatting/facade` when using this package through Univer Facade APIs.
45
46
 
46
47
  ## Resources
47
48
 
package/lib/cjs/facade.js CHANGED
@@ -4,7 +4,7 @@ let _univerjs_sheets_conditional_formatting = require("@univerjs/sheets-conditio
4
4
  let _univerjs_sheets_facade = require("@univerjs/sheets/facade");
5
5
  let _univerjs_core_facade = require("@univerjs/core/facade");
6
6
 
7
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/typeof.js
7
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/typeof.js
8
8
  function _typeof(o) {
9
9
  "@babel/helpers - typeof";
10
10
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -14,28 +14,25 @@ function _typeof(o) {
14
14
  }, _typeof(o);
15
15
  }
16
16
 
17
- //#endregion
18
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPrimitive.js
19
- function toPrimitive(t, r) {
17
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPrimitive.js
18
+ function toPrimitive(t, e) {
20
19
  if ("object" != _typeof(t) || !t) return t;
21
- var e = t[Symbol.toPrimitive];
22
- if (void 0 !== e) {
23
- var i = e.call(t, r || "default");
20
+ var r;
21
+ if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) {
22
+ var i = r.call(t, e || "default");
24
23
  if ("object" != _typeof(i)) return i;
25
24
  throw new TypeError("@@toPrimitive must return a primitive value.");
26
25
  }
27
- return ("string" === r ? String : Number)(t);
26
+ return ("string" === e ? String : Number)(t);
28
27
  }
29
28
 
30
- //#endregion
31
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/toPropertyKey.js
29
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/toPropertyKey.js
32
30
  function toPropertyKey(t) {
33
31
  var i = toPrimitive(t, "string");
34
32
  return "symbol" == _typeof(i) ? i : i + "";
35
33
  }
36
34
 
37
- //#endregion
38
- //#region \0@oxc-project+runtime@0.153.0/helpers/esm/defineProperty.js
35
+ // \0@oxc-project+runtime@0.157.0/helpers/esm/defineProperty.js
39
36
  function _defineProperty(e, r, t) {
40
37
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
41
38
  value: t,
@@ -45,8 +42,7 @@ function _defineProperty(e, r, t) {
45
42
  }) : e[r] = t, e;
46
43
  }
47
44
 
48
- //#endregion
49
- //#region src/facade/f-conditional-formatting-builder.ts
45
+ // src/facade/f-conditional-formatting-builder.ts
50
46
  /**
51
47
  * @ignore
52
48
  * @hideconstructor
@@ -2109,8 +2105,7 @@ var FConditionalFormattingBuilder = class {
2109
2105
  }
2110
2106
  };
2111
2107
 
2112
- //#endregion
2113
- //#region src/facade/f-range.ts
2108
+ // src/facade/f-range.ts
2114
2109
  var FRangeSheetsConditionalFormattingMixin = class extends _univerjs_sheets_facade.FRange {
2115
2110
  _getConditionalFormattingRuleModel() {
2116
2111
  return this._injector.get(_univerjs_sheets_conditional_formatting.ConditionalFormattingRuleModel);
@@ -2133,8 +2128,7 @@ var FRangeSheetsConditionalFormattingMixin = class extends _univerjs_sheets_faca
2133
2128
  };
2134
2129
  _univerjs_sheets_facade.FRange.extend(FRangeSheetsConditionalFormattingMixin);
2135
2130
 
2136
- //#endregion
2137
- //#region src/facade/f-worksheet.ts
2131
+ // src/facade/f-worksheet.ts
2138
2132
  var FWorksheetConditionalFormattingMixin = class extends _univerjs_sheets_facade.FWorksheet {
2139
2133
  _getConditionalFormattingRuleModel() {
2140
2134
  return this._injector.get(_univerjs_sheets_conditional_formatting.ConditionalFormattingRuleModel);
@@ -2200,8 +2194,7 @@ var FWorksheetConditionalFormattingMixin = class extends _univerjs_sheets_facade
2200
2194
  };
2201
2195
  _univerjs_sheets_facade.FWorksheet.extend(FWorksheetConditionalFormattingMixin);
2202
2196
 
2203
- //#endregion
2204
- //#region src/facade/f-enum.ts
2197
+ // src/facade/f-enum.ts
2205
2198
  /**
2206
2199
  * Copyright 2023-present DreamNum Co., Ltd.
2207
2200
  *
@@ -2233,5 +2226,4 @@ var FSheetsConditionalFormattingEnumMixin = class extends _univerjs_core_facade.
2233
2226
  };
2234
2227
  _univerjs_core_facade.FEnum.extend(FSheetsConditionalFormattingEnumMixin);
2235
2228
 
2236
- //#endregion
2237
2229
  exports.FConditionalFormattingBuilder = FConditionalFormattingBuilder;