@contrail/documents 1.0.53 → 1.0.54

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.
Files changed (33) hide show
  1. package/lib/components/components.d.ts +236 -236
  2. package/lib/components/components.js +83 -83
  3. package/lib/components/index.d.ts +1 -1
  4. package/lib/components/index.js +17 -17
  5. package/lib/document-action.d.ts +7 -7
  6. package/lib/document-action.js +10 -10
  7. package/lib/document-element-component-size-handler.d.ts +4 -4
  8. package/lib/document-element-component-size-handler.js +55 -55
  9. package/lib/document-element-factory.d.ts +12 -12
  10. package/lib/document-element-factory.js +76 -76
  11. package/lib/document-element-property-binding-handler.d.ts +5 -5
  12. package/lib/document-element-property-binding-handler.js +40 -28
  13. package/lib/index.d.ts +6 -6
  14. package/lib/index.js +22 -22
  15. package/lib/types/common.d.ts +63 -63
  16. package/lib/types/common.js +2 -2
  17. package/lib/types/data-object.d.ts +6 -6
  18. package/lib/types/data-object.js +2 -2
  19. package/lib/types/document-change.d.ts +13 -13
  20. package/lib/types/document-change.js +10 -10
  21. package/lib/types/document-element-event.d.ts +15 -15
  22. package/lib/types/document-element-event.js +2 -2
  23. package/lib/types/document-element-holder.d.ts +8 -8
  24. package/lib/types/document-element-holder.js +2 -2
  25. package/lib/types/document-element.d.ts +23 -23
  26. package/lib/types/document-element.js +2 -2
  27. package/lib/types/document.d.ts +22 -22
  28. package/lib/types/document.js +2 -2
  29. package/lib/types/element-transformation.d.ts +18 -18
  30. package/lib/types/element-transformation.js +2 -2
  31. package/lib/types/index.d.ts +8 -8
  32. package/lib/types/index.js +24 -24
  33. package/package.json +45 -45
@@ -1,13 +1,13 @@
1
- import { DocumentElement } from './document-element';
2
- export declare enum DocumentChangeType {
3
- ADD_ELEMENT = "ADD_ELEMENT",
4
- DELETE_ELEMENT = "DELETE_ELEMENT",
5
- MODIFY_ELEMENT = "MODIFY_ELEMENT",
6
- REORDER_ELEMENT = "REORDER_ELEMENT"
7
- }
8
- export interface DocumentChange {
9
- changeType: DocumentChangeType;
10
- documentId?: string;
11
- elementData?: DocumentElement;
12
- elementId?: string;
13
- }
1
+ import { DocumentElement } from './document-element';
2
+ export declare enum DocumentChangeType {
3
+ ADD_ELEMENT = "ADD_ELEMENT",
4
+ DELETE_ELEMENT = "DELETE_ELEMENT",
5
+ MODIFY_ELEMENT = "MODIFY_ELEMENT",
6
+ REORDER_ELEMENT = "REORDER_ELEMENT"
7
+ }
8
+ export interface DocumentChange {
9
+ changeType: DocumentChangeType;
10
+ documentId?: string;
11
+ elementData?: DocumentElement;
12
+ elementId?: string;
13
+ }
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DocumentChangeType = void 0;
4
- var DocumentChangeType;
5
- (function (DocumentChangeType) {
6
- DocumentChangeType["ADD_ELEMENT"] = "ADD_ELEMENT";
7
- DocumentChangeType["DELETE_ELEMENT"] = "DELETE_ELEMENT";
8
- DocumentChangeType["MODIFY_ELEMENT"] = "MODIFY_ELEMENT";
9
- DocumentChangeType["REORDER_ELEMENT"] = "REORDER_ELEMENT";
10
- })(DocumentChangeType = exports.DocumentChangeType || (exports.DocumentChangeType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocumentChangeType = void 0;
4
+ var DocumentChangeType;
5
+ (function (DocumentChangeType) {
6
+ DocumentChangeType["ADD_ELEMENT"] = "ADD_ELEMENT";
7
+ DocumentChangeType["DELETE_ELEMENT"] = "DELETE_ELEMENT";
8
+ DocumentChangeType["MODIFY_ELEMENT"] = "MODIFY_ELEMENT";
9
+ DocumentChangeType["REORDER_ELEMENT"] = "REORDER_ELEMENT";
10
+ })(DocumentChangeType = exports.DocumentChangeType || (exports.DocumentChangeType = {}));
@@ -1,15 +1,15 @@
1
- import { PositionDefinition, SizeDefinition } from "./common";
2
- import { DocumentElement } from "./document-element";
3
- export interface DocumentElementEvent {
4
- element: DocumentElement;
5
- selectedElements?: Array<DocumentElement>;
6
- renderedElementPosition?: PositionDefinition;
7
- renderedElementSize?: SizeDefinition;
8
- eventType?: string;
9
- sourceMouseEvent?: MouseEvent;
10
- relativeMousePosition?: PositionDefinition;
11
- }
12
- export interface DocumentTextElementEvent {
13
- element: DocumentElement;
14
- textFormat: any;
15
- }
1
+ import { PositionDefinition, SizeDefinition } from "./common";
2
+ import { DocumentElement } from "./document-element";
3
+ export interface DocumentElementEvent {
4
+ element: DocumentElement;
5
+ selectedElements?: Array<DocumentElement>;
6
+ renderedElementPosition?: PositionDefinition;
7
+ renderedElementSize?: SizeDefinition;
8
+ eventType?: string;
9
+ sourceMouseEvent?: MouseEvent;
10
+ relativeMousePosition?: PositionDefinition;
11
+ }
12
+ export interface DocumentTextElementEvent {
13
+ element: DocumentElement;
14
+ textFormat: any;
15
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
- import { DocumentElement } from './document-element';
2
- interface AddElement {
3
- (elements: Array<DocumentElement>): Promise<any>;
4
- }
5
- export interface DocumentElementHolder {
6
- addElements: AddElement;
7
- }
8
- export {};
1
+ import { DocumentElement } from './document-element';
2
+ interface AddElement {
3
+ (elements: Array<DocumentElement>): Promise<any>;
4
+ }
5
+ export interface DocumentElementHolder {
6
+ addElements: AddElement;
7
+ }
8
+ export {};
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,23 +1,23 @@
1
- import { CropDefinition, LineDefinition, PositionDefinition, RotationDefinition } from './common';
2
- import { Document } from './document';
3
- export interface AlternateUrls {
4
- highResolution?: string;
5
- lowResolution?: string;
6
- originalFile?: string;
7
- }
8
- export interface DocumentElement extends Document {
9
- id?: string;
10
- type?: string;
11
- position?: PositionDefinition;
12
- rotate?: RotationDefinition;
13
- text?: string;
14
- url?: string;
15
- alternateUrls?: AlternateUrls;
16
- propertyBindings?: any;
17
- lineDefinition?: LineDefinition;
18
- label?: string;
19
- annotations?: any;
20
- isLocked?: boolean;
21
- cropDefinition?: CropDefinition;
22
- embedInfo?: any;
23
- }
1
+ import { CropDefinition, LineDefinition, PositionDefinition, RotationDefinition } from './common';
2
+ import { Document } from './document';
3
+ export interface AlternateUrls {
4
+ highResolution?: string;
5
+ lowResolution?: string;
6
+ originalFile?: string;
7
+ }
8
+ export interface DocumentElement extends Document {
9
+ id?: string;
10
+ type?: string;
11
+ position?: PositionDefinition;
12
+ rotate?: RotationDefinition;
13
+ text?: string;
14
+ url?: string;
15
+ alternateUrls?: AlternateUrls;
16
+ propertyBindings?: any;
17
+ lineDefinition?: LineDefinition;
18
+ label?: string;
19
+ annotations?: any;
20
+ isLocked?: boolean;
21
+ cropDefinition?: CropDefinition;
22
+ embedInfo?: any;
23
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,22 +1,22 @@
1
- import { PositionDefinition, SizeDefinition, StyleDefinition, ViewBox } from "./common";
2
- import { DocumentElement } from "./document-element";
3
- export interface ImportReferenceDetail {
4
- importedSlideReference?: string;
5
- importedFileReference?: string;
6
- }
7
- export interface Document {
8
- id?: string;
9
- name?: string;
10
- elements?: Array<DocumentElement>;
11
- size?: SizeDefinition;
12
- style?: StyleDefinition;
13
- model?: any;
14
- modelBindings?: any;
15
- background?: Array<DocumentElement>;
16
- importedFrom?: ImportReferenceDetail;
17
- startingViewBox?: ViewBox;
18
- startingLocation?: {
19
- position: PositionDefinition;
20
- zoom: number;
21
- };
22
- }
1
+ import { PositionDefinition, SizeDefinition, StyleDefinition, ViewBox } from "./common";
2
+ import { DocumentElement } from "./document-element";
3
+ export interface ImportReferenceDetail {
4
+ importedSlideReference?: string;
5
+ importedFileReference?: string;
6
+ }
7
+ export interface Document {
8
+ id?: string;
9
+ name?: string;
10
+ elements?: Array<DocumentElement>;
11
+ size?: SizeDefinition;
12
+ style?: StyleDefinition;
13
+ model?: any;
14
+ modelBindings?: any;
15
+ background?: Array<DocumentElement>;
16
+ importedFrom?: ImportReferenceDetail;
17
+ startingViewBox?: ViewBox;
18
+ startingLocation?: {
19
+ position: PositionDefinition;
20
+ zoom: number;
21
+ };
22
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +1,18 @@
1
- export interface ScaleTransformation {
2
- x?: number;
3
- y?: number;
4
- }
5
- export interface TranslateTransformation {
6
- x?: number;
7
- y?: number;
8
- }
9
- export interface RotationTransformation {
10
- angle?: number;
11
- cx?: number;
12
- cy?: number;
13
- }
14
- export interface ElementTransformation {
15
- translate?: TranslateTransformation;
16
- scale?: ScaleTransformation;
17
- rotate?: RotationTransformation;
18
- }
1
+ export interface ScaleTransformation {
2
+ x?: number;
3
+ y?: number;
4
+ }
5
+ export interface TranslateTransformation {
6
+ x?: number;
7
+ y?: number;
8
+ }
9
+ export interface RotationTransformation {
10
+ angle?: number;
11
+ cx?: number;
12
+ cy?: number;
13
+ }
14
+ export interface ElementTransformation {
15
+ translate?: TranslateTransformation;
16
+ scale?: ScaleTransformation;
17
+ rotate?: RotationTransformation;
18
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
- export * from './common';
2
- export * from './data-object';
3
- export * from './document-change';
4
- export * from './document-element-event';
5
- export * from './document-element-holder';
6
- export * from './document-element';
7
- export * from './document';
8
- export * from './element-transformation';
1
+ export * from './common';
2
+ export * from './data-object';
3
+ export * from './document-change';
4
+ export * from './document-element-event';
5
+ export * from './document-element-holder';
6
+ export * from './document-element';
7
+ export * from './document';
8
+ export * from './element-transformation';
@@ -1,24 +1,24 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./common"), exports);
18
- __exportStar(require("./data-object"), exports);
19
- __exportStar(require("./document-change"), exports);
20
- __exportStar(require("./document-element-event"), exports);
21
- __exportStar(require("./document-element-holder"), exports);
22
- __exportStar(require("./document-element"), exports);
23
- __exportStar(require("./document"), exports);
24
- __exportStar(require("./element-transformation"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common"), exports);
18
+ __exportStar(require("./data-object"), exports);
19
+ __exportStar(require("./document-change"), exports);
20
+ __exportStar(require("./document-element-event"), exports);
21
+ __exportStar(require("./document-element-holder"), exports);
22
+ __exportStar(require("./document-element"), exports);
23
+ __exportStar(require("./document"), exports);
24
+ __exportStar(require("./element-transformation"), exports);
package/package.json CHANGED
@@ -1,45 +1,45 @@
1
- {
2
- "name": "@contrail/documents",
3
- "version": "1.0.53",
4
- "description": "Documents library for contrail platform",
5
- "main": "lib/index.js",
6
- "types": "lib/index.d.ts",
7
- "scripts": {
8
- "build": "tsc",
9
- "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
10
- "lint": "tslint -p tsconfig.json",
11
- "test": "jest"
12
- },
13
- "keywords": [],
14
- "author": "",
15
- "license": "ISC",
16
- "devDependencies": {
17
- "@types/jest": "^29.5.2",
18
- "jest": "^29.5.0",
19
- "nanoid": "^3.2.0",
20
- "prettier": "^1.19.1",
21
- "ts-jest": "^29.1.1",
22
- "tslint": "^5.11.0",
23
- "tslint-config-prettier": "^1.18.0",
24
- "typescript": "^4.0.0"
25
- },
26
- "jest": {
27
- "moduleFileExtensions": [
28
- "js",
29
- "json",
30
- "ts"
31
- ],
32
- "rootDir": "src",
33
- "testRegex": ".spec.ts$",
34
- "transform": {
35
- "^.+\\.(t|j)s$": "ts-jest"
36
- },
37
- "coverageDirectory": "../coverage",
38
- "testEnvironment": "node"
39
- },
40
- "dependencies": {
41
- "@contrail/actions": "^1.0.14",
42
- "@contrail/util": "^1.0.19",
43
- "reflect-metadata": "^0.1.13"
44
- }
45
- }
1
+ {
2
+ "name": "@contrail/documents",
3
+ "version": "1.0.54",
4
+ "description": "Documents library for contrail platform",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "scripts": {
8
+ "build": "tsc",
9
+ "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
10
+ "lint": "tslint -p tsconfig.json",
11
+ "test": "jest"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "devDependencies": {
17
+ "@types/jest": "^29.5.2",
18
+ "jest": "^29.5.0",
19
+ "nanoid": "^3.2.0",
20
+ "prettier": "^1.19.1",
21
+ "ts-jest": "^29.1.1",
22
+ "tslint": "^5.11.0",
23
+ "tslint-config-prettier": "^1.18.0",
24
+ "typescript": "^4.0.0"
25
+ },
26
+ "jest": {
27
+ "moduleFileExtensions": [
28
+ "js",
29
+ "json",
30
+ "ts"
31
+ ],
32
+ "rootDir": "src",
33
+ "testRegex": ".spec.ts$",
34
+ "transform": {
35
+ "^.+\\.(t|j)s$": "ts-jest"
36
+ },
37
+ "coverageDirectory": "../coverage",
38
+ "testEnvironment": "node"
39
+ },
40
+ "dependencies": {
41
+ "@contrail/actions": "^1.0.14",
42
+ "@contrail/util": "^1.0.19",
43
+ "reflect-metadata": "^0.1.13"
44
+ }
45
+ }