visio-angular-viewer 0.6.1 → 0.7.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 CHANGED
@@ -51,7 +51,8 @@ export class DiagramComponent {
51
51
  ## API
52
52
 
53
53
  The shared properties are `document` (a parsed `VisioDocument`, or `null` to clear),
54
- `pageIndex` (zero-based), `zoom` (`1` means 100%), `showToolbar` and `events`.
54
+ `pageIndex` (zero-based), `zoom` (`1` means 100%), `showToolbar`, `ribbonAddIns` (tabs the host adds
55
+ after Help) and `events`.
55
56
  The callback map uses `document-load`, `document-change`, `document-error`,
56
57
  `page-change`, `zoom-change` and `shape-select`. File loading uses the imperative
57
58
  `load(File | Blob | Uint8Array | ArrayBuffer)` handle; `document` is not a file URL.
package/dist/index.js CHANGED
@@ -177,6 +177,7 @@ var VisioViewerComponent = class VisioViewerComponent {
177
177
  this.zoomChange = new EventEmitter();
178
178
  this.shapeSelect = new EventEmitter();
179
179
  this.selectionChange = new EventEmitter();
180
+ this.ribbonAddIn = new EventEmitter();
180
181
  this.host = inject(ElementRef);
181
182
  this.handle = viewerHandle(() => this.binding);
182
183
  this.stopState = () => {};
@@ -189,7 +190,8 @@ var VisioViewerComponent = class VisioViewerComponent {
189
190
  "page-change": this.pageChange,
190
191
  "zoom-change": this.zoomChange,
191
192
  "shape-select": this.shapeSelect,
192
- "selection-change": this.selectionChange
193
+ "selection-change": this.selectionChange,
194
+ "office-ribbon-add-in": this.ribbonAddIn
193
195
  };
194
196
  }
195
197
  options() {
@@ -285,6 +287,7 @@ __decorate([Input()], VisioViewerComponent.prototype, "document", void 0);
285
287
  __decorate([Input()], VisioViewerComponent.prototype, "pageIndex", void 0);
286
288
  __decorate([Input()], VisioViewerComponent.prototype, "zoom", void 0);
287
289
  __decorate([Input()], VisioViewerComponent.prototype, "showToolbar", void 0);
290
+ __decorate([Input()], VisioViewerComponent.prototype, "ribbonAddIns", void 0);
288
291
  __decorate([Input()], VisioViewerComponent.prototype, "events", void 0);
289
292
  __decorate([Output()], VisioViewerComponent.prototype, "documentLoad", void 0);
290
293
  __decorate([Output()], VisioViewerComponent.prototype, "documentChange", void 0);
@@ -293,6 +296,7 @@ __decorate([Output()], VisioViewerComponent.prototype, "pageChange", void 0);
293
296
  __decorate([Output()], VisioViewerComponent.prototype, "zoomChange", void 0);
294
297
  __decorate([Output()], VisioViewerComponent.prototype, "shapeSelect", void 0);
295
298
  __decorate([Output()], VisioViewerComponent.prototype, "selectionChange", void 0);
299
+ __decorate([Output()], VisioViewerComponent.prototype, "ribbonAddIn", void 0);
296
300
  VisioViewerComponent = __decorate([Component({
297
301
  selector: "visio-viewer-host",
298
302
  standalone: true,
@@ -6,6 +6,7 @@ export declare class VisioViewerComponent implements AfterViewInit, OnChanges, O
6
6
  pageIndex?: number;
7
7
  zoom?: number;
8
8
  showToolbar?: boolean;
9
+ ribbonAddIns?: ViewerProperties['ribbonAddIns'];
9
10
  events?: ViewerCallbacks;
10
11
  documentLoad: EventEmitter<import("visio-core").VisioDocument>;
11
12
  documentChange: EventEmitter<{
@@ -18,6 +19,7 @@ export declare class VisioViewerComponent implements AfterViewInit, OnChanges, O
18
19
  zoomChange: EventEmitter<number>;
19
20
  shapeSelect: EventEmitter<VisioShapeSelection | null>;
20
21
  selectionChange: EventEmitter<readonly VisioShapeSelection[]>;
22
+ ribbonAddIn: EventEmitter<import("ooxml-core/ribbon").RibbonAddInCommandDetail>;
21
23
  private readonly host;
22
24
  private binding;
23
25
  private readonly handle;
@@ -53,4 +55,4 @@ export declare class VisioViewerComponent implements AfterViewInit, OnChanges, O
53
55
  exportSvg(options?: SvgExportOptions): import("ooxml-ui/visio").SvgExportResult;
54
56
  createPrintSnapshot(options?: CurrentPagePrintSnapshotOptions): import("ooxml-ui/visio").PrintSnapshot;
55
57
  }
56
- export type { ViewerState, ViewerHandle, ViewerCallbacks, ViewerOptions, ViewerEvents, VisioShapeSelection, CreateVsdxOptions, ViewerEditState, VsdxExportResult, } from './common.js';
58
+ export type { ViewerState, ViewerHandle, ViewerCallbacks, ViewerOptions, ViewerEvents, VisioShapeSelection, CreateVsdxOptions, ViewerEditState, VsdxExportResult, RibbonAddInCommand, RibbonAddInGroup, RibbonAddInTab, } from './common.js';
@@ -38,4 +38,5 @@ export { ViewerController, type ViewerState } from 'ooxml-ui/visio';
38
38
  export type { SvgExportOptions, SvgExportResult } from 'ooxml-ui/visio';
39
39
  export type { CurrentPagePrintSnapshotOptions, PrintSnapshot, PrintSnapshotPage, PrintSnapshotOptions, PrintSnapshotLimits, PrintSnapshotUsage, } from 'ooxml-ui/visio';
40
40
  export type { ViewerEditState, VsdxExportResult } from 'ooxml-ui/visio';
41
+ export type { OfficeRibbonAddInEvent, RibbonAddInCommand, RibbonAddInGroup, RibbonAddInTab, } from 'ooxml-ui/visio';
41
42
  export type { VisioEdit, VisioGeometryEdit, CreateVsdxOptions } from 'ooxml-core/visio';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "visio-angular-viewer",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Local-first Visio viewer for angular",
5
5
  "homepage": "https://christophervr.github.io/ooxml/visio/",
6
6
  "bugs": {
@@ -30,9 +30,9 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "emf-converter": "4.8.21",
34
- "ooxml-core": "^1.4.0",
35
- "ooxml-ui": "^1.4.1",
33
+ "emf-converter": "4.11.2",
34
+ "ooxml-core": "^1.8.0",
35
+ "ooxml-ui": "^1.8.0",
36
36
  "visio-core": "^0.4.1"
37
37
  },
38
38
  "peerDependencies": {