@mescius/spread-sheets 17.1.6 → 17.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1871,10 +1871,18 @@ declare module GC{
1871
1871
  }
1872
1872
 
1873
1873
 
1874
+ /**
1875
+ * @typedef {RequestInit} GC.Data.IRemoteFetchOption - The remote request options similar as RequestInit of the Fetch API.
1876
+ */
1877
+ export type IRemoteFetchOption =
1878
+ RequestInit
1879
+
1880
+
1874
1881
  /**
1875
1882
  * @typedef GC.Data.IRemoteReadRequestOption - The remote request options for read operation.
1876
1883
  * @property {string} url - Request url.
1877
1884
  * @property {string} method - Request method, such as 'GET', 'POST', 'PUT', 'DELETE', default value is 'GET'.
1885
+ * @property {GC.Data.IRemoteFetchOption} options - Request options, similar as RequestInit of the Fetch API, optional.
1878
1886
  * @property {string} adapter - Adapt different data protocol, supports "rest", "odata", "odata4", "graphql".
1879
1887
  * @property {Object} body - Request body.
1880
1888
  */
@@ -1888,6 +1896,10 @@ declare module GC{
1888
1896
  * Request method, such as 'GET', 'POST', 'PUT', 'DELETE', default value is 'GET'.
1889
1897
  */
1890
1898
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
1899
+ /**
1900
+ * Request options, similar as RequestInit of the Fetch API, optional.
1901
+ */
1902
+ options?: GC.Data.IRemoteFetchOption;
1891
1903
  /**
1892
1904
  * Adapt different data protocol, supports "rest", "odata", "odata4", "graphql".
1893
1905
  */
@@ -1903,6 +1915,7 @@ declare module GC{
1903
1915
  * @typedef GC.Data.IRemoteRequestOption - The remote request options.
1904
1916
  * @property {string} url - Request url.
1905
1917
  * @property {string} method - Request method, such as 'GET', 'POST', 'PUT', 'DELETE', default value is 'GET'.
1918
+ * @property {GC.Data.IRemoteFetchOption} options - Request options, similar as RequestInit of the Fetch API, optional.
1906
1919
  */
1907
1920
  export type IRemoteRequestOption =
1908
1921
  {
@@ -1914,6 +1927,10 @@ declare module GC{
1914
1927
  * Request method, such as 'GET', 'POST', 'PUT', 'DELETE', default value is 'GET'.
1915
1928
  */
1916
1929
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
1930
+ /**
1931
+ * Request options, similar as RequestInit of the Fetch API, optional.
1932
+ */
1933
+ options?: GC.Data.IRemoteFetchOption;
1917
1934
  }
1918
1935
 
1919
1936
 
@@ -2505,17 +2522,17 @@ declare module GC{
2505
2522
  /**
2506
2523
  * @typedef GC.Data.RemoteChangeHandler
2507
2524
  * @param {Object | Object[]} data - the data changes.
2508
- * @param {RequestInit} options - the options for the handler.
2525
+ * @param {GC.Data.IRemoteFetchOption} options - the options for the handler, similar as RequestInit of the Fetch API.
2509
2526
  * @returns {Promise<Object | Object[]>} Returns of the handler.
2510
2527
  * @description handle data changes.
2511
2528
  */
2512
2529
  export type RemoteChangeHandler =
2513
- (data: Object | Object[], options: RequestInit) => Promise<Object | Object[]>
2530
+ (data: Object | Object[], options: GC.Data.IRemoteFetchOption) => Promise<Object | Object[]>
2514
2531
 
2515
2532
 
2516
2533
  /**
2517
2534
  * @typedef GC.Data.RemoteReadHandler
2518
- * @param {RequestInit} options - the options for the handler.
2535
+ * @param {GC.Data.IRemoteFetchOption} options - the options for the handler, similar as RequestInit of the Fetch API.
2519
2536
  * @returns {Promise<Object>} Returns of the handler.
2520
2537
  * @description handle reading data.
2521
2538
  */
@@ -13201,6 +13218,7 @@ declare module GC{
13201
13218
  dragInfo?: GC.Spread.Sheets.IHitTestDragInfo;
13202
13219
  cellTypeHitInfo?: GC.Spread.Sheets.IHitTestCellTypeHitInfo;
13203
13220
  floatingObjectHitInfo?: GC.Spread.Sheets.IHitTestFloatingObjectHitInfo;
13221
+ shapeHitInfo?: GC.Spread.Sheets.IHitTestShapeHitInfo;
13204
13222
  formulaRangeHitInfo?: GC.Spread.Sheets.IFormulaRangeHitInfo;
13205
13223
  commentHitInfo?: GC.Spread.Sheets.IHitTestCommentHitInfo;
13206
13224
  pivotTableInfo?: any;
@@ -13230,6 +13248,19 @@ declare module GC{
13230
13248
  }
13231
13249
 
13232
13250
 
13251
+ export interface IHitTestShapeHitInfo{
13252
+ x?: number;
13253
+ y?: number;
13254
+ type?: GC.Spread.Sheets.Shapes.HitTestType;
13255
+ shape?: GC.Spread.Sheets.Shapes.ShapeBase;
13256
+ target?: GC.Spread.Sheets.Shapes.ShapeBase;
13257
+ connectionPointIndex?: number;
13258
+ lineEnd?: GC.Spread.Sheets.Shapes.HitTestLineEnd;
13259
+ resizeHandle?: GC.Spread.Sheets.Shapes.IHitTestResizeHandle;
13260
+ adjustmentHandle?: GC.Spread.Sheets.Shapes.IHitTestAdjustmentHandle;
13261
+ }
13262
+
13263
+
13233
13264
  export interface IHyperlink{
13234
13265
  url: string;
13235
13266
  tooltip?: string;
@@ -18716,6 +18747,32 @@ declare module GC{
18716
18747
  * ```
18717
18748
  */
18718
18749
  static CommentRemoving: string;
18750
+ /**
18751
+ * Occurs when all tables from data manager fetched completely through the workbook opening or importing the sjs/json format file.
18752
+ * @name GC.Spread.Sheets.Worksheet#DataFetchCompleted
18753
+ * @event
18754
+ * @param eventParam *{@link GC.Spread.Sheets.Workbook}* `spread` The workbook that triggered the event.
18755
+ * @example
18756
+ * ```
18757
+ * //This example uses the DataFetchCompleted event.
18758
+ * //In general, the DataFetchCompleted event is triggered after the successCallback of the workbook open method invoked.
18759
+ * //If doesn\u2019t use any table of data manager, and the Workbook contains a lot of Worksheet, the DataFetchCompleted event could be triggered before the successCallback of the workbook open method invoked.
18760
+ * let isOpenFinished = false, isDataFetchCompleted = false;
18761
+ * spread.bind(GC.Spread.Sheets.Events.DataFetchCompleted, function () {
18762
+ * isDataFetchCompleted = true;
18763
+ * if (isOpenFinished) {
18764
+ * // do something with data fetched
18765
+ * }
18766
+ * });
18767
+ * spread.open(file, function () {
18768
+ * isOpenFinished = true;
18769
+ * if (isDataFetchCompleted) {
18770
+ * // do something with file opened
18771
+ * }
18772
+ * }, function () { }, {});
18773
+ * ```
18774
+ */
18775
+ static DataFetchCompleted: string;
18719
18776
  /**
18720
18777
  * Occurs when the user is dragging and dropping a range of cells.
18721
18778
  * @name GC.Spread.Sheets.Worksheet#DragDropBlock
@@ -43733,6 +43790,17 @@ declare module GC{
43733
43790
  }
43734
43791
 
43735
43792
 
43793
+ export interface IHitTestAdjustmentHandle{
43794
+ index: number;
43795
+ vertical?: boolean;
43796
+ }
43797
+
43798
+
43799
+ export interface IHitTestResizeHandle{
43800
+ type: GC.Spread.Sheets.Shapes.ResizeHandleType;
43801
+ }
43802
+
43803
+
43736
43804
  export interface IListBoxFormControlOptions{
43737
43805
  inputRange: string;
43738
43806
  cellLink: string;
@@ -45012,6 +45080,56 @@ declare module GC{
45012
45080
  radial= 1
45013
45081
  }
45014
45082
 
45083
+ /**
45084
+ * Specifies shape hit test line end.
45085
+ * @enum {string}
45086
+ */
45087
+ export enum HitTestLineEnd{
45088
+ /**
45089
+ * Head
45090
+ */
45091
+ head= "head",
45092
+ /**
45093
+ * Tail
45094
+ */
45095
+ tail= "tail"
45096
+ }
45097
+
45098
+ /**
45099
+ * Specifies shape hit test type.
45100
+ * @enum {string}
45101
+ */
45102
+ export enum HitTestType{
45103
+ /**
45104
+ * Hit test on shape body.
45105
+ */
45106
+ body= "body",
45107
+ /**
45108
+ * Hit test on shape border.
45109
+ */
45110
+ border= "border",
45111
+ /**
45112
+ * Hit test on shape line end.
45113
+ */
45114
+ lineEnd= "lineEnd",
45115
+ /**
45116
+ * Hit test on shape rotate handle.
45117
+ */
45118
+ rotate= "rotate",
45119
+ /**
45120
+ * Hit test on shape resize handle.
45121
+ */
45122
+ resize= "resize",
45123
+ /**
45124
+ * Hit test on shape connection point.
45125
+ */
45126
+ connectionPoint= "connectionPoint",
45127
+ /**
45128
+ * Hit test on shape adjustment handle.
45129
+ */
45130
+ adjustment= "adjustment"
45131
+ }
45132
+
45015
45133
  /**
45016
45134
  * Specifies shape horizontal alignment.
45017
45135
  * @enum {number}
@@ -45205,6 +45323,45 @@ declare module GC{
45205
45323
  fromBottomRight= 4
45206
45324
  }
45207
45325
 
45326
+ /**
45327
+ * Specifies shape resize handle type.
45328
+ * @enum {string}
45329
+ */
45330
+ export enum ResizeHandleType{
45331
+ /**
45332
+ * Top Left
45333
+ */
45334
+ topLeft= "topLeft",
45335
+ /**
45336
+ * Top Center
45337
+ */
45338
+ topCenter= "topCenter",
45339
+ /**
45340
+ * Top Right
45341
+ */
45342
+ topRight= "topRight",
45343
+ /**
45344
+ * Middle Left
45345
+ */
45346
+ middleLeft= "middleLeft",
45347
+ /**
45348
+ * Middle Center
45349
+ */
45350
+ middleRight= "middleRight",
45351
+ /**
45352
+ * Bottom Left
45353
+ */
45354
+ bottomLeft= "bottomLeft",
45355
+ /**
45356
+ * Bottom Center
45357
+ */
45358
+ bottomCenter= "bottomCenter",
45359
+ /**
45360
+ * Bottom Right
45361
+ */
45362
+ bottomRight= "bottomRight"
45363
+ }
45364
+
45208
45365
  /**
45209
45366
  * Specifies shape resize mode.
45210
45367
  * @enum {number}
@@ -55241,6 +55398,18 @@ declare module GC{
55241
55398
  * the header fit mode, default is normal
55242
55399
  */
55243
55400
  headerFit?: "normal" | "vertical" | "stack";
55401
+ /**
55402
+ * Whether show sort after opening filer dialog.
55403
+ */
55404
+ allowSort?: boolean;
55405
+ /**
55406
+ * Whether show filter by value after opening filer dialog.
55407
+ */
55408
+ allowFilterByValue?: boolean;
55409
+ /**
55410
+ * Whether show filter by list after opening filer dialog. If allowSort, allowFilterByValue and allowFilterByList are all false, not show the filter button in this column.
55411
+ */
55412
+ allowFilterByList?: boolean;
55244
55413
  }
55245
55414
 
55246
55415
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mescius/spread-sheets",
3
- "version": "17.1.6",
3
+ "version": "17.1.7",
4
4
  "main": "index.js",
5
5
  "description":"A Complete Microsoft Excel-like JavaScript Spreadsheet for Enterprise Applications",
6
6
  "scripts": {},
@@ -569,10 +569,6 @@
569
569
  .gc-filter-disable-item i:hover {
570
570
  color: #c4bec2;
571
571
  }
572
- .gc-filter-disable-item.gc-filter-hover {
573
- background-color: transparent;
574
- border: 1px solid #c5c5c5;
575
- }
576
572
 
577
573
  .gc-search-outer-div {
578
574
  border-radius: 3px;
@@ -545,10 +545,6 @@
545
545
  .gc-filter-disable-item i:hover {
546
546
  color: #c4bec2;
547
547
  }
548
- .gc-filter-disable-item.gc-filter-hover {
549
- background-color: transparent;
550
- border: 1px solid #c5c5c5;
551
- }
552
548
 
553
549
  .gc-search-outer-div {
554
550
  border: none;
@@ -546,10 +546,6 @@
546
546
  .gc-filter-disable-item i:hover {
547
547
  color: #c4bec2;
548
548
  }
549
- .gc-filter-disable-item.gc-filter-hover {
550
- background-color: transparent;
551
- border: 1px solid #c5c5c5;
552
- }
553
549
 
554
550
  .gc-search-outer-div {
555
551
  border: none;
@@ -546,10 +546,6 @@
546
546
  .gc-filter-disable-item i:hover {
547
547
  color: #c4bec2;
548
548
  }
549
- .gc-filter-disable-item.gc-filter-hover {
550
- background-color: transparent;
551
- border: 1px solid #c5c5c5;
552
- }
553
549
 
554
550
  .gc-search-outer-div {
555
551
  border: none;
@@ -547,10 +547,6 @@
547
547
  .gc-filter-disable-item i:hover {
548
548
  color: #c4bec2;
549
549
  }
550
- .gc-filter-disable-item.gc-filter-hover {
551
- background-color: transparent;
552
- border: 1px solid #c5c5c5;
553
- }
554
550
 
555
551
  .gc-search-outer-div {
556
552
  background-color: #363636;
@@ -541,10 +541,6 @@
541
541
  .gc-filter-disable-item i:hover {
542
542
  color: #c4bec2;
543
543
  }
544
- .gc-filter-disable-item.gc-filter-hover {
545
- background-color: transparent;
546
- border: 1px solid #c5c5c5;
547
- }
548
544
 
549
545
  .gc-search-outer-div {
550
546
  border: none;
@@ -546,10 +546,6 @@
546
546
  .gc-filter-disable-item i:hover {
547
547
  color: #c4bec2;
548
548
  }
549
- .gc-filter-disable-item.gc-filter-hover {
550
- background-color: transparent;
551
- border: 1px solid #c5c5c5;
552
- }
553
549
 
554
550
  .gc-search-outer-div {
555
551
  border: none;