@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.
- package/README.md +21 -9
- package/lib/cjs/config-CTOS-Fzg.js +1 -0
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/cjs/worker.js +1 -1
- package/lib/config-DDy_jw9I.js +1 -0
- package/lib/es/config-DDy_jw9I.js +1 -0
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/es/worker.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/facade/f-range.d.ts +16 -2
- package/lib/types/facade/f-record.d.ts +14 -0
- package/lib/types/facade/f-table.d.ts +3 -0
- package/lib/types/index.d.ts +0 -3
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/lib/worker.js +1 -1
- package/package.json +10 -10
- package/lib/cjs/worker-BDigGzY4.js +0 -1
- package/lib/es/worker-1CbynS32.js +0 -1
- package/lib/worker-1CbynS32.js +0 -1
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
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
|
-
*
|
|
171
|
-
*
|
|
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
|
package/lib/types/index.d.ts
CHANGED
|
@@ -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';
|