@univerjs-pro/bases 1.4.0 → 1.5.1
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-BHbUCCo4.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-C9tN8Oda.js +1 -0
- package/lib/es/config-C9tN8Oda.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
|
-
|
|
1
|
+
const _0x3d6013=_0x23f9;(function(_0x162dcb,_0x5df95c){const _0xb1e4a7=_0x23f9,_0x4d04c4=_0x162dcb();while(!![]){try{const _0x3f155a=-parseInt(_0xb1e4a7(0x109))/0x1+parseInt(_0xb1e4a7(0xfa))/0x2*(parseInt(_0xb1e4a7(0xf4))/0x3)+parseInt(_0xb1e4a7(0x107))/0x4*(-parseInt(_0xb1e4a7(0xfb))/0x5)+-parseInt(_0xb1e4a7(0x10e))/0x6*(parseInt(_0xb1e4a7(0x10c))/0x7)+parseInt(_0xb1e4a7(0x111))/0x8*(-parseInt(_0xb1e4a7(0x108))/0x9)+parseInt(_0xb1e4a7(0xf8))/0xa+-parseInt(_0xb1e4a7(0xfd))/0xb*(-parseInt(_0xb1e4a7(0xfe))/0xc);if(_0x3f155a===_0x5df95c)break;else _0x4d04c4['push'](_0x4d04c4['shift']());}catch(_0x1e8bcd){_0x4d04c4['push'](_0x4d04c4['shift']());}}}(_0x26c6,0xc1a74));function _0x23f9(_0x121612,_0x3b7d36){_0x121612=_0x121612-0xf4;const _0x26c64f=_0x26c6();let _0x23f969=_0x26c64f[_0x121612];return _0x23f969;}const e={'bases':{'fieldType':{'text':'文字','singleSelect':'單選','multiSelect':'多選','person':'人員','group':'分組','date':'日期','attachment':'附件','number':'數字','checkbox':_0x3d6013(0x10b),'link':'連結','formula':'公式','lookup':'查詢','flow':'流程','button':'按鈕','numbering':'編號','phone':'電話號碼','email':_0x3d6013(0x101),'location':'位置','barcode':'條碼','progress':'進度','currency':'貨幣','rating':'評分','recordLink':'關聯記錄','recordId':_0x3d6013(0xf5),'createdBy':_0x3d6013(0x100),'updatedBy':'更新人','createdAt':_0x3d6013(0x10d),'updatedAt':_0x3d6013(0xf6),'summary':'彙總'},'fieldConfig':{'textPlaceholder':_0x3d6013(0xf9),'linkPlaceholder':_0x3d6013(0x103)},'viewType':{'grid':'表格','kanban':'看板','calendar':_0x3d6013(0xf7),'gantt':_0x3d6013(0x105),'gallery':'圖庫'},'error':{'fieldNameRequired':_0x3d6013(0x102),'invalidFieldType':'欄位類型無效','invalidCellValue':'儲存格值無效','invalidKanbanGroupField':_0x3d6013(0x10a),'invalidCalendarDateField':'行事曆需要日期欄位','invalidGanttDateField':_0x3d6013(0x10f)},'command':{'updateCell':_0x3d6013(0x110),'createField':_0x3d6013(0xfc),'deleteField':_0x3d6013(0xff),'createRecord':_0x3d6013(0x104),'deleteRecord':'刪除記錄','updateViewConfig':_0x3d6013(0x106)}}};export{e as default};function _0x26c6(){const _0x30a028=['輸入內容','273632OvQuiA','5dPZBGW','建立欄位','6373389WukGvS','84KHHlvA','刪除欄位','建立人','電子郵件','欄位標題不能為空','輸入\x20URL(例如\x20univer.ai\x20或\x20https://univer.ai/skills)。','建立記錄','甘特圖','更新檢視設定','4633892OTCkAA','9Oaprop','521993YRXJMH','看板需要可分組欄位','核取方塊','56zGnpIf','建立時間','779598IekyMN','甘特圖檢視需要開始和結束日期欄位','更新儲存格','11257496okFQOR','18cBXBBE','記錄\x20ID','更新時間','行事曆','436320NPujbs'];_0x26c6=function(){return _0x30a028;};return _0x26c6();}
|
|
@@ -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';
|