docx-vue-viewer 1.1.2 → 1.3.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 +9 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +9 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -76,3 +76,12 @@ read-only).
|
|
|
76
76
|
## License
|
|
77
77
|
|
|
78
78
|
Apache-2.0.
|
|
79
|
+
|
|
80
|
+
## OneDrive integration
|
|
81
|
+
|
|
82
|
+
Use the optional shared `ooxml-core/embedding/onedrive` connection with host-supplied Microsoft
|
|
83
|
+
sign-in. See the [Office package and integration reference](https://github.com/ChristopherVR/ooxml/blob/main/docs/onedrive-integration.md#word-docx)
|
|
84
|
+
for this product's load/save API, native storage wiring, sharing permissions and conflict recovery.
|
|
85
|
+
The [testing guide](https://github.com/ChristopherVR/ooxml/blob/main/docs/onedrive-testing.md)
|
|
86
|
+
separates test-local transports from live Microsoft acceptance. No simulation service is shipped;
|
|
87
|
+
OneDrive storage does not provide Microsoft Office coauthoring or automatic document merging.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as vue from 'vue';
|
|
|
2
2
|
import { PropType, MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import { DocumentModel } from 'docx-core';
|
|
4
4
|
export * from 'docx-core';
|
|
5
|
-
import { DocumentStorage } from 'ooxml-core/embedding';
|
|
5
|
+
import { DocumentStorage, CloudFileProvider, CloudOpenedFile } from 'ooxml-core/embedding';
|
|
6
6
|
import { EditorTheme, EditorThemeMode, RibbonActionInput, RibbonAddInTab, DocxCollaborationOptions, WordCustomization, EditorLocaleInput, PageChangeDetail, FileCommandDetail, RibbonAction, RibbonAddInCommandDetail, DocxCollaborationState, DocxEditorElement, SurfaceHostActions, WordListState, WordAlignment, WordListChoice, WordNavigationProps, WordStatusProps, WordToolbarProps } from 'ooxml-ui/docx';
|
|
7
7
|
export * from 'ooxml-ui/docx';
|
|
8
8
|
export { WordNavigationProps, WordStatusProps, WordToolbarProps } from 'ooxml-ui/docx';
|
|
@@ -29,6 +29,7 @@ declare const WordEditor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
29
29
|
ribbonAddIns: PropType<readonly RibbonAddInTab[]>;
|
|
30
30
|
collaboration: PropType<DocxCollaborationOptions | null>;
|
|
31
31
|
storage: PropType<DocumentStorage | null>;
|
|
32
|
+
fileProviders: PropType<readonly CloudFileProvider[] | null>;
|
|
32
33
|
customization: PropType<WordCustomization | null>;
|
|
33
34
|
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
34
35
|
[key: string]: any;
|
|
@@ -49,6 +50,7 @@ declare const WordEditor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
49
50
|
ribbonAddIns: PropType<readonly RibbonAddInTab[]>;
|
|
50
51
|
collaboration: PropType<DocxCollaborationOptions | null>;
|
|
51
52
|
storage: PropType<DocumentStorage | null>;
|
|
53
|
+
fileProviders: PropType<readonly CloudFileProvider[] | null>;
|
|
52
54
|
customization: PropType<WordCustomization | null>;
|
|
53
55
|
}>> & Readonly<{
|
|
54
56
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
@@ -93,6 +95,13 @@ interface EditorProps {
|
|
|
93
95
|
* File > Open to `storage.open()` when it has one. `file-command` still fires first.
|
|
94
96
|
*/
|
|
95
97
|
storage?: DocumentStorage | null | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Cloud places for File > Open (OneDrive and the like): "This device" plus one place per
|
|
100
|
+
* provider. A file opened from a place saves through its own storage until another document
|
|
101
|
+
* loads, and is read-only when the provider says it cannot be edited. Forwarded when the array
|
|
102
|
+
* changes, so keep it stable; `null` or omitted removes the places.
|
|
103
|
+
*/
|
|
104
|
+
fileProviders?: readonly CloudFileProvider[] | null | undefined;
|
|
96
105
|
/**
|
|
97
106
|
* Host customisation (`WordCustomization`): `capabilities`, `backstage.extraPages` and
|
|
98
107
|
* `contextMenu.extraCommands`. Forwarded when the object changes, so keep it stable (memoise
|
|
@@ -143,6 +152,11 @@ interface EditorHandle {
|
|
|
143
152
|
/** Saves and downloads in the browser, then marks the document clean. */
|
|
144
153
|
download(fileName?: string): Promise<void>;
|
|
145
154
|
markClean(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Opens a file got from a `CloudFileProvider` (the host's own picker or a start page) the way File >
|
|
157
|
+
* Open > OneDrive does: its name, read-only state and storage for Save.
|
|
158
|
+
*/
|
|
159
|
+
openCloudFile(file: CloudOpenedFile): Promise<void>;
|
|
146
160
|
readonly dirty: boolean;
|
|
147
161
|
}
|
|
148
162
|
|
package/dist/index.js
CHANGED
|
@@ -85,6 +85,11 @@ var E = [
|
|
|
85
85
|
fallback: null,
|
|
86
86
|
apply: (e, t) => e.storage = t ?? void 0
|
|
87
87
|
},
|
|
88
|
+
fileProviders: {
|
|
89
|
+
forward: "changed",
|
|
90
|
+
fallback: null,
|
|
91
|
+
apply: (e, t) => e.fileProviders = t ?? []
|
|
92
|
+
},
|
|
88
93
|
collaboration: {
|
|
89
94
|
forward: "changed",
|
|
90
95
|
fallback: null,
|
|
@@ -114,6 +119,7 @@ var E = [
|
|
|
114
119
|
save: "async",
|
|
115
120
|
download: "async",
|
|
116
121
|
markClean: "optional-call",
|
|
122
|
+
openCloudFile: "async",
|
|
117
123
|
dirty: { fallback: !1 }
|
|
118
124
|
}
|
|
119
125
|
};
|
|
@@ -135,6 +141,7 @@ function O(e, n = {}, r = !1) {
|
|
|
135
141
|
save: () => i.save(),
|
|
136
142
|
download: (e) => i.download(e),
|
|
137
143
|
markClean: () => i.markClean(),
|
|
144
|
+
openCloudFile: (e) => i.openCloudFile(e),
|
|
138
145
|
get dirty() {
|
|
139
146
|
return i.dirty;
|
|
140
147
|
},
|
|
@@ -187,6 +194,7 @@ var A = e({
|
|
|
187
194
|
ribbonAddIns: Array,
|
|
188
195
|
collaboration: Object,
|
|
189
196
|
storage: Object,
|
|
197
|
+
fileProviders: Array,
|
|
190
198
|
customization: Object
|
|
191
199
|
},
|
|
192
200
|
contract: D,
|
|
@@ -263,6 +271,7 @@ function M(e = {}) {
|
|
|
263
271
|
save: () => m().save(),
|
|
264
272
|
download: (e) => m().download(e),
|
|
265
273
|
markClean: () => m().markClean(),
|
|
274
|
+
openCloudFile: (e) => m().openCloudFile(e),
|
|
266
275
|
get dirty() {
|
|
267
276
|
return n?.dirty ?? !1;
|
|
268
277
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docx-vue-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Vue 3 component for the DOCX editor. Self-contained: includes the editor, layout engine and legacy .doc reader.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"doc",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"docx-core": "^1.
|
|
44
|
-
"ooxml-core": "^1.
|
|
45
|
-
"ooxml-ui": "^1.
|
|
43
|
+
"docx-core": "^1.1.0",
|
|
44
|
+
"ooxml-core": "^1.39.0",
|
|
45
|
+
"ooxml-ui": "^1.41.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"vue": "^3.5.0"
|