@univerjs-pro/bases 1.4.0 → 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 (99) hide show
  1. package/README.md +21 -9
  2. package/lib/cjs/config-CTOS-Fzg.js +1 -0
  3. package/lib/cjs/facade.js +1 -1
  4. package/lib/cjs/index.js +1 -1
  5. package/lib/cjs/locale/ar-SA.js +1 -1
  6. package/lib/cjs/locale/ca-ES.js +1 -1
  7. package/lib/cjs/locale/de-DE.js +1 -1
  8. package/lib/cjs/locale/en-US.js +1 -1
  9. package/lib/cjs/locale/es-ES.js +1 -1
  10. package/lib/cjs/locale/fa-IR.js +1 -1
  11. package/lib/cjs/locale/fr-FR.js +1 -1
  12. package/lib/cjs/locale/id-ID.js +1 -1
  13. package/lib/cjs/locale/it-IT.js +1 -1
  14. package/lib/cjs/locale/ja-JP.js +1 -1
  15. package/lib/cjs/locale/ko-KR.js +1 -1
  16. package/lib/cjs/locale/pl-PL.js +1 -1
  17. package/lib/cjs/locale/pt-BR.js +1 -1
  18. package/lib/cjs/locale/ru-RU.js +1 -1
  19. package/lib/cjs/locale/sk-SK.js +1 -1
  20. package/lib/cjs/locale/vi-VN.js +1 -1
  21. package/lib/cjs/locale/zh-CN.js +1 -1
  22. package/lib/cjs/locale/zh-HK.js +1 -1
  23. package/lib/cjs/locale/zh-TW.js +1 -1
  24. package/lib/cjs/worker.js +1 -1
  25. package/lib/config-DDy_jw9I.js +1 -0
  26. package/lib/es/config-DDy_jw9I.js +1 -0
  27. package/lib/es/facade.js +1 -1
  28. package/lib/es/index.js +1 -1
  29. package/lib/es/locale/ar-SA.js +1 -1
  30. package/lib/es/locale/ca-ES.js +1 -1
  31. package/lib/es/locale/de-DE.js +1 -1
  32. package/lib/es/locale/en-US.js +1 -1
  33. package/lib/es/locale/es-ES.js +1 -1
  34. package/lib/es/locale/fa-IR.js +1 -1
  35. package/lib/es/locale/fr-FR.js +1 -1
  36. package/lib/es/locale/id-ID.js +1 -1
  37. package/lib/es/locale/it-IT.js +1 -1
  38. package/lib/es/locale/ja-JP.js +1 -1
  39. package/lib/es/locale/ko-KR.js +1 -1
  40. package/lib/es/locale/pl-PL.js +1 -1
  41. package/lib/es/locale/pt-BR.js +1 -1
  42. package/lib/es/locale/ru-RU.js +1 -1
  43. package/lib/es/locale/sk-SK.js +1 -1
  44. package/lib/es/locale/vi-VN.js +1 -1
  45. package/lib/es/locale/zh-CN.js +1 -1
  46. package/lib/es/locale/zh-HK.js +1 -1
  47. package/lib/es/locale/zh-TW.js +1 -1
  48. package/lib/es/worker.js +1 -1
  49. package/lib/facade.js +1 -1
  50. package/lib/index.js +1 -1
  51. package/lib/locale/ar-SA.js +1 -1
  52. package/lib/locale/ca-ES.js +1 -1
  53. package/lib/locale/de-DE.js +1 -1
  54. package/lib/locale/en-US.js +1 -1
  55. package/lib/locale/es-ES.js +1 -1
  56. package/lib/locale/fa-IR.js +1 -1
  57. package/lib/locale/fr-FR.js +1 -1
  58. package/lib/locale/id-ID.js +1 -1
  59. package/lib/locale/it-IT.js +1 -1
  60. package/lib/locale/ja-JP.js +1 -1
  61. package/lib/locale/ko-KR.js +1 -1
  62. package/lib/locale/pl-PL.js +1 -1
  63. package/lib/locale/pt-BR.js +1 -1
  64. package/lib/locale/ru-RU.js +1 -1
  65. package/lib/locale/sk-SK.js +1 -1
  66. package/lib/locale/vi-VN.js +1 -1
  67. package/lib/locale/zh-CN.js +1 -1
  68. package/lib/locale/zh-HK.js +1 -1
  69. package/lib/locale/zh-TW.js +1 -1
  70. package/lib/types/facade/f-range.d.ts +16 -2
  71. package/lib/types/facade/f-record.d.ts +14 -0
  72. package/lib/types/facade/f-table.d.ts +3 -0
  73. package/lib/types/index.d.ts +0 -3
  74. package/lib/umd/facade.js +1 -1
  75. package/lib/umd/index.js +1 -1
  76. package/lib/umd/locale/ar-SA.js +1 -1
  77. package/lib/umd/locale/ca-ES.js +1 -1
  78. package/lib/umd/locale/de-DE.js +1 -1
  79. package/lib/umd/locale/en-US.js +1 -1
  80. package/lib/umd/locale/es-ES.js +1 -1
  81. package/lib/umd/locale/fa-IR.js +1 -1
  82. package/lib/umd/locale/fr-FR.js +1 -1
  83. package/lib/umd/locale/id-ID.js +1 -1
  84. package/lib/umd/locale/it-IT.js +1 -1
  85. package/lib/umd/locale/ja-JP.js +1 -1
  86. package/lib/umd/locale/ko-KR.js +1 -1
  87. package/lib/umd/locale/pl-PL.js +1 -1
  88. package/lib/umd/locale/pt-BR.js +1 -1
  89. package/lib/umd/locale/ru-RU.js +1 -1
  90. package/lib/umd/locale/sk-SK.js +1 -1
  91. package/lib/umd/locale/vi-VN.js +1 -1
  92. package/lib/umd/locale/zh-CN.js +1 -1
  93. package/lib/umd/locale/zh-HK.js +1 -1
  94. package/lib/umd/locale/zh-TW.js +1 -1
  95. package/lib/worker.js +1 -1
  96. package/package.json +10 -10
  97. package/lib/cjs/worker-BDigGzY4.js +0 -1
  98. package/lib/es/worker-1CbynS32.js +0 -1
  99. package/lib/worker-1CbynS32.js +0 -1
@@ -1 +1 @@
1
- function _0xf176(){const _0x2d4db6=['記錄\x20ID','建立時間','86CsGVNG','5541207CNClrg','3jGFFQA','輸入內容','更新時間','建立欄位','更新儲存格','1161AkiSCR','刪除欄位','行事曆需要日期欄位','6hPDSRZ','看板需要可分組欄位','131500OCaPPb','22924MChsMd','甘特圖','欄位標題不能為空','更新人','7483724sHlBBx','9475040XCgwiK','電子郵件','欄位類型無效','核取方塊','1592987yDKlGa','儲存格值無效','關聯記錄','241805CmojyO','甘特圖檢視需要開始和結束日期欄位'];_0xf176=function(){return _0x2d4db6;};return _0xf176();}const _0x54f276=_0x3431;function _0x3431(_0x46b35e,_0x10e59c){_0x46b35e=_0x46b35e-0x156;const _0xf17691=_0xf176();let _0x3431e8=_0xf17691[_0x46b35e];return _0x3431e8;}(function(_0x320591,_0x333121){const _0x32b1ee=_0x3431,_0x3f6478=_0x320591();while(!![]){try{const _0x1a2376=parseInt(_0x32b1ee(0x16e))/0x1*(-parseInt(_0x32b1ee(0x161))/0x2)+-parseInt(_0x32b1ee(0x163))/0x3*(-parseInt(_0x32b1ee(0x172))/0x4)+-parseInt(_0x32b1ee(0x15d))/0x5+-parseInt(_0x32b1ee(0x16b))/0x6*(-parseInt(_0x32b1ee(0x162))/0x7)+parseInt(_0x32b1ee(0x156))/0x8+parseInt(_0x32b1ee(0x168))/0x9*(-parseInt(_0x32b1ee(0x16d))/0xa)+-parseInt(_0x32b1ee(0x15a))/0xb;if(_0x1a2376===_0x333121)break;else _0x3f6478['push'](_0x3f6478['shift']());}catch(_0x1ebddd){_0x3f6478['push'](_0x3f6478['shift']());}}}(_0xf176,0xed384));const e={'bases':{'fieldType':{'text':'文字','singleSelect':'單選','multiSelect':'多選','person':'人員','group':'分組','date':'日期','attachment':'附件','number':'數字','checkbox':_0x54f276(0x159),'link':'連結','formula':'公式','lookup':'查詢','flow':'流程','button':'按鈕','numbering':'編號','phone':'電話號碼','email':_0x54f276(0x157),'location':'位置','barcode':'條碼','progress':'進度','currency':'貨幣','rating':'評分','recordLink':_0x54f276(0x15c),'recordId':_0x54f276(0x15f),'createdBy':'建立人','updatedBy':_0x54f276(0x171),'createdAt':_0x54f276(0x160),'updatedAt':_0x54f276(0x165),'summary':'彙總'},'fieldConfig':{'textPlaceholder':_0x54f276(0x164),'linkPlaceholder':'輸入\x20URL(例如\x20univer.ai\x20或\x20https://univer.ai/skills)。'},'viewType':{'grid':'表格','kanban':'看板','calendar':'行事曆','gantt':_0x54f276(0x16f),'gallery':'圖庫'},'error':{'fieldNameRequired':_0x54f276(0x170),'invalidFieldType':_0x54f276(0x158),'invalidCellValue':_0x54f276(0x15b),'invalidKanbanGroupField':_0x54f276(0x16c),'invalidCalendarDateField':_0x54f276(0x16a),'invalidGanttDateField':_0x54f276(0x15e)},'command':{'updateCell':_0x54f276(0x167),'createField':_0x54f276(0x166),'deleteField':_0x54f276(0x169),'createRecord':'建立記錄','deleteRecord':'刪除記錄','updateViewConfig':'更新檢視設定'}}};export{e as default};
1
+ function _0x54f3(){const _0x3bd06e=['15144066naxvYt','看板需要可分組欄位','電子郵件','關聯記錄','建立欄位','更新時間','更新人','583595mNGPBH','刪除記錄','21KhPcoN','109MHNqsz','4834076pFFMYu','行事曆需要日期欄位','甘特圖檢視需要開始和結束日期欄位','5657268KLkuiI','甘特圖','核取方塊','輸入\x20URL(例如\x20univer.ai\x20或\x20https://univer.ai/skills)。','儲存格值無效','欄位類型無效','刪除欄位','更新檢視設定','輸入內容','17804OyUnQW','行事曆','2610712vFFFwJ','1868931ptuezk'];_0x54f3=function(){return _0x3bd06e;};return _0x54f3();}const _0x8a23d7=_0x1b1d;(function(_0x56e470,_0x382a14){const _0x5bb36d=_0x1b1d,_0x49fb09=_0x56e470();while(!![]){try{const _0x3a9b9f=parseInt(_0x5bb36d(0x168))/0x1*(-parseInt(_0x5bb36d(0x175))/0x2)+parseInt(_0x5bb36d(0x178))/0x3+parseInt(_0x5bb36d(0x169))/0x4+-parseInt(_0x5bb36d(0x180))/0x5+parseInt(_0x5bb36d(0x16c))/0x6+parseInt(_0x5bb36d(0x167))/0x7*(parseInt(_0x5bb36d(0x177))/0x8)+-parseInt(_0x5bb36d(0x179))/0x9;if(_0x3a9b9f===_0x382a14)break;else _0x49fb09['push'](_0x49fb09['shift']());}catch(_0x382dcd){_0x49fb09['push'](_0x49fb09['shift']());}}}(_0x54f3,0xf0280));function _0x1b1d(_0x37f2b7,_0x59d599){_0x37f2b7=_0x37f2b7-0x167;const _0x54f3dc=_0x54f3();let _0x1b1de5=_0x54f3dc[_0x37f2b7];return _0x1b1de5;}const e={'bases':{'fieldType':{'text':'文字','singleSelect':'單選','multiSelect':'多選','person':'人員','group':'分組','date':'日期','attachment':'附件','number':'數字','checkbox':_0x8a23d7(0x16e),'link':'連結','formula':'公式','lookup':'查詢','flow':'流程','button':'按鈕','numbering':'編號','phone':'電話號碼','email':_0x8a23d7(0x17b),'location':'位置','barcode':'條碼','progress':'進度','currency':'貨幣','rating':'評分','recordLink':_0x8a23d7(0x17c),'recordId':'記錄\x20ID','createdBy':'建立人','updatedBy':_0x8a23d7(0x17f),'createdAt':'建立時間','updatedAt':_0x8a23d7(0x17e),'summary':'彙總'},'fieldConfig':{'textPlaceholder':_0x8a23d7(0x174),'linkPlaceholder':_0x8a23d7(0x16f)},'viewType':{'grid':'表格','kanban':'看板','calendar':_0x8a23d7(0x176),'gantt':_0x8a23d7(0x16d),'gallery':'圖庫'},'error':{'fieldNameRequired':'欄位標題不能為空','invalidFieldType':_0x8a23d7(0x171),'invalidCellValue':_0x8a23d7(0x170),'invalidKanbanGroupField':_0x8a23d7(0x17a),'invalidCalendarDateField':_0x8a23d7(0x16a),'invalidGanttDateField':_0x8a23d7(0x16b)},'command':{'updateCell':'更新儲存格','createField':_0x8a23d7(0x17d),'deleteField':_0x8a23d7(0x172),'createRecord':'建立記錄','deleteRecord':_0x8a23d7(0x181),'updateViewConfig':_0x8a23d7(0x173)}}};export{e as default};
@@ -139,6 +139,10 @@ export declare class FBaseTableRange {
139
139
  getValues(): BaseCellValue[][];
140
140
  /**
141
141
  * Get the first value in this range.
142
+ *
143
+ * For multiple cells, create the target range with {@link FBaseTable.getRange} and call
144
+ * {@link FBaseTableRange.getValues} once instead of reading each cell separately.
145
+ *
142
146
  * @returns {BaseCellValue} The top-left value.
143
147
  * @example
144
148
  * ```ts
@@ -151,6 +155,10 @@ export declare class FBaseTableRange {
151
155
  getValue(): BaseCellValue;
152
156
  /**
153
157
  * Set the top-left value in this range.
158
+ *
159
+ * For multiple cells, create the target range with {@link FBaseTable.getRange} and call
160
+ * {@link FBaseTableRange.setValues} with a two-dimensional array instead of writing each cell separately.
161
+ *
154
162
  * @param {BaseCellValue | IBaseCellData} value The value to write. It may be a raw Base cell value, a full
155
163
  * `IBaseCellData` object, or `null` to clear the cell.
156
164
  * @returns {boolean} `true` if set value successfully, `false` if failed.
@@ -167,8 +175,11 @@ export declare class FBaseTableRange {
167
175
  /**
168
176
  * Set all values in this range.
169
177
  *
170
- * The provided matrix must match `getNumRows()` by `getNumColumns()`.
171
- * Passing the wrong shape throws before any command is executed.
178
+ * For multiple cells, pass the complete value matrix in one call instead of calling this method on
179
+ * individual cell ranges. Values are addressed relative to this range's top-left cell.
180
+ *
181
+ * The provided matrix must fit within `getNumRows()` by `getNumColumns()`; omitted cells are unchanged.
182
+ * A matrix extending beyond the range throws before any command is executed.
172
183
  *
173
184
  * @param {Array<Array<BaseCellValue | IBaseCellData>>} values A two-dimensional array matching the range size. Each cell
174
185
  * may be a raw Base cell value, an `IBaseCellData` object, or `null`.
@@ -188,6 +199,9 @@ export declare class FBaseTableRange {
188
199
  setValues(values: Array<Array<BaseCellValue | IBaseCellData>>): boolean;
189
200
  /**
190
201
  * Clear all values in this range.
202
+ *
203
+ * To clear multiple cells, call this method once on the target range instead of clearing each cell separately.
204
+ *
191
205
  * @returns {boolean} `true` if cleared successfully, `false` if failed.
192
206
  * @example
193
207
  * ```ts
@@ -81,6 +81,9 @@ export declare class FBaseTableRecord extends FBaseInitialable {
81
81
  /**
82
82
  * Get a field value from this record.
83
83
  *
84
+ * For multiple fields in this record, prefer {@link FBaseTableRecord.getValues} once and read the returned
85
+ * field-id keyed map instead of calling this method for each field.
86
+ *
84
87
  * For a RecordLink field, this returns its canonical storage string. Prefer
85
88
  * `getLinkedRecordIds()` when consuming RecordLink values.
86
89
  * @param {FieldId} fieldId The field id.
@@ -109,6 +112,10 @@ export declare class FBaseTableRecord extends FBaseInitialable {
109
112
  /**
110
113
  * Set one field value in this record.
111
114
  *
115
+ * For multiple fields in this record, prefer {@link FBaseTableRecord.setValues} with a field-value map
116
+ * instead of calling this method for each field. For a rectangular block across records, use
117
+ * {@link FBaseTable.getRange} and {@link FBaseTableRange.setValues}.
118
+ *
112
119
  * For a RecordLink field, prefer `setLinkedRecordIds()`, `addLinkedRecord()`,
113
120
  * or `removeLinkedRecord()`. Those methods accept Record IDs directly and
114
121
  * document the single-link and multi-link behavior.
@@ -229,6 +236,9 @@ export declare class FBaseTableRecord extends FBaseInitialable {
229
236
  deleteAttachments(fieldId: FieldId, attachments: readonly IBaseAttachment[]): boolean;
230
237
  /**
231
238
  * Set multiple field values in this record.
239
+ *
240
+ * For multiple fields, pass all field-value pairs in one call instead of calling this method once per field.
241
+ *
232
242
  * @param {Record<string, BaseCellValue>} values Field-id keyed values to write. Only the provided fields are
233
243
  * patched; omitted fields keep their existing values.
234
244
  * @param {BaseFieldKeyEnum} fieldKey How to interpret the keys in `values`. Defaults to `BaseFieldKeyEnum.Id`.
@@ -266,6 +276,10 @@ export declare class FBaseTableRecord extends FBaseInitialable {
266
276
  setValues(values: Record<string, BaseCellValue>, fieldKey?: BaseFieldKeyEnum): boolean;
267
277
  /**
268
278
  * Delete this record.
279
+ *
280
+ * For multiple records in the same table, prefer {@link FBaseTable.deleteRecords} with their record IDs
281
+ * instead of calling this method on each record.
282
+ *
269
283
  * @returns {boolean} `true` if the command succeeded, `false` otherwise.
270
284
  * @example
271
285
  * ```ts
@@ -674,6 +674,9 @@ export declare class FBaseTable {
674
674
  /**
675
675
  * Add a record to this table synchronously.
676
676
  *
677
+ * For multiple records in this table, prefer {@link FBaseTable.addRecords} with all record inputs
678
+ * instead of calling this method in a loop.
679
+ *
677
680
  * This method is also the low-level, data-oriented way to create a child record:
678
681
  * use the id returned by `getHierarchyFieldId()` as a value key and use the
679
682
  * parent's record id as its value. The call does not require `await`. If the
@@ -122,6 +122,3 @@ export type { IBaseFieldPermission, IBasePermissionSnapshot, IBaseRecordPermissi
122
122
  export { IBaseProjectionService } from './services/base-projection.service';
123
123
  export { IBaseViewRegistryService } from './services/base-view-registry.service';
124
124
  export type { IViewCorePlugin } from './views/view-core-plugin';
125
- export {
126
- /** @deprecated Import from '@univerjs-pro/bases/worker' instead. This root export will be removed in the next release. */
127
- UniverRemoteBasesPlugin, } from './worker';