@univerjs/sheets 0.6.2 → 0.6.3
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/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +3 -3
- package/lib/es/facade.js +31 -26
- package/lib/es/index.js +1989 -1860
- package/lib/types/commands/commands/insert-row-col.command.d.ts +10 -0
- package/lib/types/commands/commands/utils/selection-utils.d.ts +2 -2
- package/lib/types/facade/f-worksheet.d.ts +12 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/types/services/ref-range/util.d.ts +11 -2
- package/lib/types/services/selections/selection.service.d.ts +4 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +3 -3
- package/package.json +7 -7
package/lib/es/facade.js
CHANGED
|
@@ -3560,15 +3560,12 @@ let k = class extends le {
|
|
|
3560
3560
|
subUnitId: this._worksheet.getSheetId(),
|
|
3561
3561
|
range: o[0],
|
|
3562
3562
|
value: G.WRAP
|
|
3563
|
-
}), this._commandService.syncExecuteCommand(
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
autoHeightInfo: t
|
|
3570
|
-
}
|
|
3571
|
-
), this;
|
|
3563
|
+
}), this._commandService.syncExecuteCommand(Vt.id, {
|
|
3564
|
+
unitId: n,
|
|
3565
|
+
subUnitId: s,
|
|
3566
|
+
ranges: o,
|
|
3567
|
+
autoHeightInfo: t
|
|
3568
|
+
}), this;
|
|
3572
3569
|
}
|
|
3573
3570
|
/**
|
|
3574
3571
|
* Sets the height of the given rows in pixels.
|
|
@@ -4793,6 +4790,20 @@ let k = class extends le {
|
|
|
4793
4790
|
setCustomMetadata(e) {
|
|
4794
4791
|
return this._worksheet.setCustomMetadata(e), this;
|
|
4795
4792
|
}
|
|
4793
|
+
/**
|
|
4794
|
+
* Get custom metadata of worksheet
|
|
4795
|
+
* @returns {CustomData | undefined} custom metadata
|
|
4796
|
+
* @example
|
|
4797
|
+
* ```ts
|
|
4798
|
+
* const fWorkbook = univerAPI.getActiveWorkbook();
|
|
4799
|
+
* const fWorkSheet = fWorkbook.getActiveSheet();
|
|
4800
|
+
* const custom = fWorkSheet.getCustomMetadata();
|
|
4801
|
+
* console.log(custom);
|
|
4802
|
+
* ```
|
|
4803
|
+
*/
|
|
4804
|
+
getCustomMetadata() {
|
|
4805
|
+
return this._worksheet.getCustomMetadata();
|
|
4806
|
+
}
|
|
4796
4807
|
/**
|
|
4797
4808
|
* Set custom metadata of row
|
|
4798
4809
|
* @param {number} index - row index
|
|
@@ -5702,29 +5713,23 @@ class Rn extends je {
|
|
|
5702
5713
|
this.registerEventHandler(
|
|
5703
5714
|
this.Event.WorkbookDisposed,
|
|
5704
5715
|
() => t.unitDisposed$.subscribe((n) => {
|
|
5705
|
-
n.type === U.UNIVER_SHEET && this.fireEvent(
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
snapshot: n.getSnapshot()
|
|
5711
|
-
}
|
|
5712
|
-
);
|
|
5716
|
+
n.type === U.UNIVER_SHEET && this.fireEvent(this.Event.WorkbookDisposed, {
|
|
5717
|
+
unitId: n.getUnitId(),
|
|
5718
|
+
unitType: n.type,
|
|
5719
|
+
snapshot: n.getSnapshot()
|
|
5720
|
+
});
|
|
5713
5721
|
})
|
|
5714
5722
|
), this.registerEventHandler(
|
|
5715
5723
|
this.Event.WorkbookCreated,
|
|
5716
5724
|
() => t.unitAdded$.subscribe((n) => {
|
|
5717
5725
|
if (n.type === U.UNIVER_SHEET) {
|
|
5718
5726
|
const s = n, o = e.createInstance(S, s);
|
|
5719
|
-
this.fireEvent(
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
unit: o
|
|
5726
|
-
}
|
|
5727
|
-
);
|
|
5727
|
+
this.fireEvent(this.Event.WorkbookCreated, {
|
|
5728
|
+
unitId: n.getUnitId(),
|
|
5729
|
+
type: n.type,
|
|
5730
|
+
workbook: o,
|
|
5731
|
+
unit: o
|
|
5732
|
+
});
|
|
5728
5733
|
}
|
|
5729
5734
|
})
|
|
5730
5735
|
);
|