@adobe/helix-onedrive-support 11.2.0 → 11.3.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/CHANGELOG.md +14 -0
- package/package.json +6 -6
- package/src/OneDriveMock.js +2 -0
- package/src/excel/Application.d.ts +22 -0
- package/src/excel/Application.js +36 -0
- package/src/excel/Workbook.d.ts +6 -0
- package/src/excel/Workbook.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [11.3.1](https://github.com/adobe/helix-onedrive-support/compare/v11.3.0...v11.3.1) (2023-12-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency @adobe/helix-shared-tokencache to v1.3.17 ([6cab719](https://github.com/adobe/helix-onedrive-support/commit/6cab719888b970756d549ed143e7b6367cb63182))
|
|
7
|
+
|
|
8
|
+
# [11.3.0](https://github.com/adobe/helix-onedrive-support/compare/v11.2.0...v11.3.0) (2023-12-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* add workbook.application ([#475](https://github.com/adobe/helix-onedrive-support/issues/475)) ([782aa5f](https://github.com/adobe/helix-onedrive-support/commit/782aa5ffae19bfe08a02d7e7fb0218c1ccf09878))
|
|
14
|
+
|
|
1
15
|
# [11.2.0](https://github.com/adobe/helix-onedrive-support/compare/v11.1.3...v11.2.0) (2023-12-15)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-onedrive-support",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "Helix OneDrive Support",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"homepage": "https://github.com/adobe/helix-onedrive-support#readme",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@adobe/fetch": "4.1.1",
|
|
31
|
-
"@adobe/helix-shared-tokencache": "1.3.
|
|
31
|
+
"@adobe/helix-shared-tokencache": "1.3.17",
|
|
32
32
|
"@azure/msal-node": "2.2.0",
|
|
33
33
|
"jose": "5.1.3"
|
|
34
34
|
},
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"@adobe/eslint-config-helix": "2.0.5",
|
|
37
37
|
"@semantic-release/changelog": "6.0.3",
|
|
38
38
|
"@semantic-release/git": "10.0.1",
|
|
39
|
-
"@aws-sdk/client-s3": "3.
|
|
39
|
+
"@aws-sdk/client-s3": "3.474.0",
|
|
40
40
|
"ajv": "8.12.0",
|
|
41
41
|
"c8": "8.0.1",
|
|
42
42
|
"codecov": "3.8.3",
|
|
43
43
|
"dotenv": "16.3.1",
|
|
44
|
-
"eslint": "8.
|
|
44
|
+
"eslint": "8.56.0",
|
|
45
45
|
"eslint-plugin-header": "3.1.1",
|
|
46
|
-
"eslint-plugin-import": "2.29.
|
|
46
|
+
"eslint-plugin-import": "2.29.1",
|
|
47
47
|
"husky": "8.0.3",
|
|
48
48
|
"install": "0.13.0",
|
|
49
49
|
"jsdoc-to-markdown": "8.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"mocha-multi-reporters": "1.5.1",
|
|
55
55
|
"nock": "13.4.0",
|
|
56
56
|
"npm": "10.2.5",
|
|
57
|
-
"semantic-release": "22.0.
|
|
57
|
+
"semantic-release": "22.0.12"
|
|
58
58
|
},
|
|
59
59
|
"lint-staged": {
|
|
60
60
|
"*.js": "eslint"
|
package/src/OneDriveMock.js
CHANGED
|
@@ -434,6 +434,8 @@ export class OneDriveMock extends OneDrive {
|
|
|
434
434
|
return handleTable(sheet, segs, method, body);
|
|
435
435
|
case 'names':
|
|
436
436
|
return handleNamedItems(sheet, segs, method, body);
|
|
437
|
+
case 'application':
|
|
438
|
+
return { calculate: () => {} };
|
|
437
439
|
default:
|
|
438
440
|
if (type?.startsWith('range(address=') && sheet.usedRange?.values) {
|
|
439
441
|
const address = type.match(/range\(address='([^)]+)'\)/)[1];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Excel Workbook Application
|
|
15
|
+
*/
|
|
16
|
+
export declare interface Application {
|
|
17
|
+
/**
|
|
18
|
+
* Calculate formulas in the workbook.
|
|
19
|
+
* @param {string} calculationType calculation type
|
|
20
|
+
*/
|
|
21
|
+
calculate(calculationType: 'Recalculate' | 'Full' | 'FullRebuild'): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
export class Application {
|
|
13
|
+
/**
|
|
14
|
+
* Create a new instance of this class.
|
|
15
|
+
* @param {import('../GraphAPI.js').GraphAPI} graphAPI graph API
|
|
16
|
+
* @param {string} uri uri for this application
|
|
17
|
+
* @param {any} log logger
|
|
18
|
+
*/
|
|
19
|
+
constructor(graphAPI, uri, log) {
|
|
20
|
+
this._graphAPI = graphAPI;
|
|
21
|
+
this._uri = uri;
|
|
22
|
+
this._log = log;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async calculate(calculationType) {
|
|
26
|
+
return this._graphAPI.doFetch(`${this.uri}/calculate`, false, {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
body: { calculationType },
|
|
29
|
+
headers: { 'content-type': 'application/json' },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get uri() {
|
|
34
|
+
return this._uri;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/excel/Workbook.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { Table } from './Table';
|
|
|
13
13
|
import { Worksheet } from './Worksheet';
|
|
14
14
|
import { GraphResult } from '../OneDrive';
|
|
15
15
|
import { NamedItem } from './NamedItem';
|
|
16
|
+
import { Application } from './Application';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Excel Work book
|
|
@@ -120,4 +121,9 @@ export declare interface Workbook {
|
|
|
120
121
|
* @param {string} sessionId session id
|
|
121
122
|
*/
|
|
122
123
|
setSessionId(sessionId: string): void;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Return the workbook application
|
|
127
|
+
*/
|
|
128
|
+
application(): Application;
|
|
123
129
|
}
|
package/src/excel/Workbook.js
CHANGED
|
@@ -13,6 +13,7 @@ import { NamedItemContainer } from './NamedItemContainer.js';
|
|
|
13
13
|
import { StatusCodeError } from '../StatusCodeError.js';
|
|
14
14
|
import { Table } from './Table.js';
|
|
15
15
|
import { Worksheet } from './Worksheet.js';
|
|
16
|
+
import { Application } from './Application.js';
|
|
16
17
|
|
|
17
18
|
export class Workbook extends NamedItemContainer {
|
|
18
19
|
/**
|
|
@@ -158,6 +159,10 @@ export class Workbook extends NamedItemContainer {
|
|
|
158
159
|
return table;
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
application() {
|
|
163
|
+
return new Application(this, `${this._uri}/application`, this._log);
|
|
164
|
+
}
|
|
165
|
+
|
|
161
166
|
get uri() {
|
|
162
167
|
return this._uri;
|
|
163
168
|
}
|