@contrail/document-generation 2.1.20 → 2.1.22
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/lib/board-document-generator.d.ts +23 -0
- package/lib/board-document-generator.js +241 -0
- package/lib/components/component-generator.d.ts +6 -0
- package/lib/components/component-generator.js +55 -0
- package/lib/components/component-grid-generator.d.ts +7 -0
- package/lib/components/component-grid-generator.js +102 -0
- package/lib/components/component-util.d.ts +5 -0
- package/lib/components/component-util.js +43 -0
- package/lib/document-generator.d.ts +6 -0
- package/lib/document-generator.js +11 -0
- package/lib/frames/frame-generator.d.ts +12 -0
- package/lib/frames/frame-generator.js +160 -0
- package/lib/frames/frame.d.ts +18 -0
- package/lib/frames/frame.js +71 -0
- package/lib/frames/index.d.ts +2 -0
- package/lib/frames/index.js +18 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +22 -0
- package/lib/info-panel/info-panel-generator.d.ts +6 -0
- package/lib/info-panel/info-panel-generator.js +56 -0
- package/lib/interfaces.d.ts +73 -0
- package/lib/interfaces.js +8 -0
- package/lib/showcase-frame-generator.d.ts +8 -0
- package/lib/showcase-frame-generator.js +44 -0
- package/lib/util/document-dynamic-text-element-util.d.ts +9 -0
- package/lib/util/document-dynamic-text-element-util.js +61 -0
- package/lib/util/document-property-util.d.ts +9 -0
- package/lib/util/document-property-util.js +103 -0
- package/lib/util/document-text-element-util.d.ts +12 -0
- package/lib/util/document-text-element-util.js +148 -0
- package/lib/util/document-util.d.ts +8 -0
- package/lib/util/document-util.js +22 -0
- package/lib/util/index.d.ts +2 -0
- package/lib/util/index.js +18 -0
- package/lib/util/text-util.d.ts +4 -0
- package/lib/util/text-util.js +28 -0
- package/package.json +1 -1
- package/lib/mocks/test-type-data.d.ts +0 -142
- package/lib/mocks/test-type-data.js +0 -149
- package/mocks/test-type-data.ts +0 -146
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentPropertyUtil = void 0;
|
|
4
|
+
const util_1 = require("@contrail/util");
|
|
5
|
+
const documents_1 = require("@contrail/documents");
|
|
6
|
+
const types_1 = require("@contrail/types");
|
|
7
|
+
const document_text_element_util_1 = require("./document-text-element-util");
|
|
8
|
+
const text_util_1 = require("./text-util");
|
|
9
|
+
class DocumentPropertyUtil {
|
|
10
|
+
static generatePropertyElements(data, properties, options, startingPosition, imageDimension, isComponent = false) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
let yPosition = startingPosition.y || 0;
|
|
13
|
+
const xPosition = startingPosition.x || 0;
|
|
14
|
+
const elements = [];
|
|
15
|
+
const formatter = new types_1.PropertyValueFormatter();
|
|
16
|
+
let index = 0;
|
|
17
|
+
for (let property of properties) {
|
|
18
|
+
let element;
|
|
19
|
+
if (index === 0 && property.slug === 'annotation') {
|
|
20
|
+
yPosition = -15;
|
|
21
|
+
}
|
|
22
|
+
if (property.propertyDefinition) {
|
|
23
|
+
const fontSize = ((_b = (_a = property.style) === null || _a === void 0 ? void 0 : _a.font) === null || _b === void 0 ? void 0 : _b.size) || 12;
|
|
24
|
+
const PT_TO_PX = 1.3;
|
|
25
|
+
const LINE_HEIGHT = 1.4;
|
|
26
|
+
const PADDING = 1.6;
|
|
27
|
+
let height = fontSize * PT_TO_PX * LINE_HEIGHT * PADDING;
|
|
28
|
+
options.size = options.size || {};
|
|
29
|
+
options.size.height = height;
|
|
30
|
+
element = DocumentPropertyUtil.generatePropertyTextElement(data, property, options, formatter, { x: xPosition, y: yPosition }, isComponent);
|
|
31
|
+
yPosition += element.size.height - 10;
|
|
32
|
+
}
|
|
33
|
+
else if (property.slug === 'annotation') {
|
|
34
|
+
element = DocumentPropertyUtil.generatePropertyAnnotationElement(data, property, property.size, {
|
|
35
|
+
x: xPosition,
|
|
36
|
+
y: yPosition,
|
|
37
|
+
});
|
|
38
|
+
yPosition += element.size.height - 10;
|
|
39
|
+
}
|
|
40
|
+
else if (property.slug === 'thumbnail') {
|
|
41
|
+
const imageHeight = imageDimension.height || imageDimension.width || 125;
|
|
42
|
+
const imageWidth = imageDimension.width || 125;
|
|
43
|
+
element = DocumentPropertyUtil.generatePropertyImageElement(data, property, { width: imageWidth, height: imageHeight }, { x: xPosition, y: yPosition });
|
|
44
|
+
yPosition += imageHeight;
|
|
45
|
+
}
|
|
46
|
+
if (element)
|
|
47
|
+
elements.push(element);
|
|
48
|
+
index++;
|
|
49
|
+
}
|
|
50
|
+
return elements;
|
|
51
|
+
}
|
|
52
|
+
static generatePropertyTextElement(model, property, options, formatter, position, isComponent = false) {
|
|
53
|
+
var _a;
|
|
54
|
+
const modelKey = `${util_1.StringUtil.convertToCamelCase(property.typeRootSlug)}.${property.propertyDefinition.slug}`;
|
|
55
|
+
const value = util_1.ObjectUtil.getByPath(model, modelKey);
|
|
56
|
+
let display = formatter.formatValueForProperty(value, property.propertyDefinition);
|
|
57
|
+
if (!isComponent) {
|
|
58
|
+
const height = text_util_1.TextUtil.getHeightByTextWidth(display, property, options.size.width);
|
|
59
|
+
options.size.height = height;
|
|
60
|
+
}
|
|
61
|
+
if (!isComponent && property.includeLabel) {
|
|
62
|
+
display = property.propertyDefinition.label + ': ' + display;
|
|
63
|
+
}
|
|
64
|
+
const mergedOptions = util_1.ObjectUtil.mergeDeep(util_1.ObjectUtil.cloneDeep(options), { style: property.style || {} });
|
|
65
|
+
mergedOptions.position = position;
|
|
66
|
+
const useInlineFormatting = isComponent === false;
|
|
67
|
+
let element = document_text_element_util_1.DocumentTextElementUtil.generateTextElement(display, mergedOptions, useInlineFormatting, !isComponent);
|
|
68
|
+
if (property.includeLabel) {
|
|
69
|
+
element.label = (_a = property.propertyDefinition) === null || _a === void 0 ? void 0 : _a.label;
|
|
70
|
+
}
|
|
71
|
+
element.propertyBindings = { text: modelKey };
|
|
72
|
+
return element;
|
|
73
|
+
}
|
|
74
|
+
static generatePropertyAnnotationElement(data, property, size, position) {
|
|
75
|
+
const element = {
|
|
76
|
+
type: 'annotation',
|
|
77
|
+
size: size,
|
|
78
|
+
propertyBindings: { annotation: 'annotation' },
|
|
79
|
+
position,
|
|
80
|
+
};
|
|
81
|
+
if (property.isHidden) {
|
|
82
|
+
element.isHidden = property.isHidden;
|
|
83
|
+
}
|
|
84
|
+
return element;
|
|
85
|
+
}
|
|
86
|
+
static generatePropertyImageElement(data, property, imageDimension, position) {
|
|
87
|
+
var _a;
|
|
88
|
+
const imageUrl = (_a = data === null || data === void 0 ? void 0 : data.viewable) === null || _a === void 0 ? void 0 : _a.mediumViewableDownloadUrl;
|
|
89
|
+
const element = {
|
|
90
|
+
type: 'image',
|
|
91
|
+
size: imageDimension,
|
|
92
|
+
propertyBindings: { url: 'viewable.mediumViewableDownloadUrl' },
|
|
93
|
+
url: imageUrl,
|
|
94
|
+
position,
|
|
95
|
+
};
|
|
96
|
+
if (property.isHidden) {
|
|
97
|
+
element.isHidden = property.isHidden;
|
|
98
|
+
}
|
|
99
|
+
documents_1.DocumentElementPropertyBindingHandler.bindPropertiesToElement(element, data);
|
|
100
|
+
return element;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.DocumentPropertyUtil = DocumentPropertyUtil;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DocumentElement, StyleDefinition } from '@contrail/documents';
|
|
2
|
+
export declare class DocumentTextElementUtil {
|
|
3
|
+
static generateTextElement(textValue: any, options: any, applyInlineFormatting?: boolean, sanitizeHTML?: boolean): DocumentElement;
|
|
4
|
+
static applyInLineStyling(text: any, style: StyleDefinition): any;
|
|
5
|
+
static extractStyleFromInline(text: string): StyleDefinition;
|
|
6
|
+
static extractFontSizeFromHTML(text: any): number;
|
|
7
|
+
static extractColorFromHTML(text: any): string;
|
|
8
|
+
static extractTextDecorationFromHTML(text: any): string;
|
|
9
|
+
static extractFontFromHTML(text: any): any;
|
|
10
|
+
static extractTextStyleItalicFromHTML(text: any): string;
|
|
11
|
+
static extractTextStyleStrikethroughFromHTML(text: any): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentTextElementUtil = void 0;
|
|
4
|
+
const documents_1 = require("@contrail/documents");
|
|
5
|
+
const util_1 = require("@contrail/util");
|
|
6
|
+
const document_util_1 = require("./document-util");
|
|
7
|
+
class DocumentTextElementUtil {
|
|
8
|
+
static generateTextElement(textValue, options, applyInlineFormatting = true, sanitizeHTML = true) {
|
|
9
|
+
var _a;
|
|
10
|
+
const defaultStyle = {
|
|
11
|
+
font: {
|
|
12
|
+
size: 8,
|
|
13
|
+
},
|
|
14
|
+
color: 'rgba(0,0,0,.5)',
|
|
15
|
+
};
|
|
16
|
+
let style = util_1.ObjectUtil.mergeDeep(defaultStyle, options.style || {});
|
|
17
|
+
if ((_a = options === null || options === void 0 ? void 0 : options.style) === null || _a === void 0 ? void 0 : _a.text) {
|
|
18
|
+
style.text = options.style.text;
|
|
19
|
+
}
|
|
20
|
+
let position = options.position || { y: 0, x: 0 };
|
|
21
|
+
position.x = position.x || 0;
|
|
22
|
+
position.y = position.y || 0;
|
|
23
|
+
let size = options.size || { height: 25, width: 125 };
|
|
24
|
+
size.height = size.height || 25;
|
|
25
|
+
size.width = size.width || 125;
|
|
26
|
+
const defaultedOptions = util_1.ObjectUtil.mergeDeep(util_1.ObjectUtil.cloneDeep(options), { position, size, style });
|
|
27
|
+
let textVal = sanitizeHTML ? document_util_1.DocumentUtil.sanitizeHTML(textValue) : textValue;
|
|
28
|
+
if (textVal === undefined || textVal === null) {
|
|
29
|
+
textVal = '';
|
|
30
|
+
}
|
|
31
|
+
let element = documents_1.DocumentElementFactory.createTextElement(textVal);
|
|
32
|
+
element = Object.assign(element, defaultedOptions);
|
|
33
|
+
if (applyInlineFormatting) {
|
|
34
|
+
element.text = this.applyInLineStyling(element.text, element.style);
|
|
35
|
+
}
|
|
36
|
+
return element;
|
|
37
|
+
}
|
|
38
|
+
static applyInLineStyling(text, style) {
|
|
39
|
+
var _a, _b, _c, _d, _e;
|
|
40
|
+
let formattedText = text;
|
|
41
|
+
if ((style === null || style === void 0 ? void 0 : style.font.weight) === 'bold') {
|
|
42
|
+
formattedText = `<strong>${formattedText}</strong>`;
|
|
43
|
+
}
|
|
44
|
+
if (((_a = style === null || style === void 0 ? void 0 : style.text) === null || _a === void 0 ? void 0 : _a.decoration) === 'underline') {
|
|
45
|
+
formattedText = `<span style="text-decoration: underline;">${formattedText}</span>`;
|
|
46
|
+
}
|
|
47
|
+
let fontStyles = '';
|
|
48
|
+
if ((_b = style === null || style === void 0 ? void 0 : style.font) === null || _b === void 0 ? void 0 : _b.size) {
|
|
49
|
+
fontStyles += `font-size: ${style.font.size}pt; `;
|
|
50
|
+
}
|
|
51
|
+
if (style === null || style === void 0 ? void 0 : style.color) {
|
|
52
|
+
fontStyles += `color: ${style.color}; `;
|
|
53
|
+
}
|
|
54
|
+
if ((_c = style === null || style === void 0 ? void 0 : style.font) === null || _c === void 0 ? void 0 : _c.family) {
|
|
55
|
+
fontStyles += `font-family: '${style.font.family}'; `;
|
|
56
|
+
}
|
|
57
|
+
if (fontStyles.length) {
|
|
58
|
+
formattedText = `<span style="${fontStyles}">${formattedText}</span>`;
|
|
59
|
+
}
|
|
60
|
+
if ((_d = style === null || style === void 0 ? void 0 : style.font) === null || _d === void 0 ? void 0 : _d.strikethrough) {
|
|
61
|
+
formattedText = `<s>${formattedText}</s>`;
|
|
62
|
+
}
|
|
63
|
+
if ((_e = style === null || style === void 0 ? void 0 : style.font) === null || _e === void 0 ? void 0 : _e.italic) {
|
|
64
|
+
formattedText = `<em>${formattedText}</em>`;
|
|
65
|
+
}
|
|
66
|
+
formattedText = `<p>${formattedText}</p>`;
|
|
67
|
+
return formattedText;
|
|
68
|
+
}
|
|
69
|
+
static extractStyleFromInline(text) {
|
|
70
|
+
if (!text) {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const style = { font: {}, text: {} };
|
|
74
|
+
if (text.indexOf('<strong>') > -1 || text.indexOf('bold') > -1) {
|
|
75
|
+
style.font.weight = 'bold';
|
|
76
|
+
}
|
|
77
|
+
const fontSize = this.extractFontSizeFromHTML(text);
|
|
78
|
+
if (fontSize) {
|
|
79
|
+
style.font.size = fontSize;
|
|
80
|
+
}
|
|
81
|
+
const color = this.extractColorFromHTML(text);
|
|
82
|
+
if (color) {
|
|
83
|
+
style.color = color;
|
|
84
|
+
}
|
|
85
|
+
const decoration = this.extractTextDecorationFromHTML(text);
|
|
86
|
+
if (decoration) {
|
|
87
|
+
style.text.decoration = decoration;
|
|
88
|
+
}
|
|
89
|
+
const italic = this.extractTextStyleItalicFromHTML(text);
|
|
90
|
+
if (italic) {
|
|
91
|
+
style.font.italic = true;
|
|
92
|
+
}
|
|
93
|
+
const strikethrough = this.extractTextStyleStrikethroughFromHTML(text);
|
|
94
|
+
if (strikethrough) {
|
|
95
|
+
style.font.strikethrough = true;
|
|
96
|
+
}
|
|
97
|
+
const font = this.extractFontFromHTML(text);
|
|
98
|
+
if (font) {
|
|
99
|
+
style.font.family = font;
|
|
100
|
+
}
|
|
101
|
+
return style;
|
|
102
|
+
}
|
|
103
|
+
static extractFontSizeFromHTML(text) {
|
|
104
|
+
let regex = /font-size: (.*?)pt;/;
|
|
105
|
+
let match = text.match(regex);
|
|
106
|
+
if ((match === null || match === void 0 ? void 0 : match.length) && !isNaN(parseInt(match[1]))) {
|
|
107
|
+
return parseInt(match[1]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
static extractColorFromHTML(text) {
|
|
111
|
+
let regex = /color: (.*?);/;
|
|
112
|
+
let match = text.match(regex);
|
|
113
|
+
if (match === null || match === void 0 ? void 0 : match.length) {
|
|
114
|
+
let color = match[1];
|
|
115
|
+
color = color.replace(/['"]+/g, '');
|
|
116
|
+
return color;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
static extractTextDecorationFromHTML(text) {
|
|
120
|
+
let regex = /text-decoration: (.*?);/;
|
|
121
|
+
let match = text.match(regex);
|
|
122
|
+
if (match === null || match === void 0 ? void 0 : match.length) {
|
|
123
|
+
let decoration = match[1];
|
|
124
|
+
decoration = decoration.replace(/['"]+/g, '');
|
|
125
|
+
return decoration;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
static extractFontFromHTML(text) {
|
|
129
|
+
let regex = /font-family: (.*?);/;
|
|
130
|
+
let match = text.match(regex);
|
|
131
|
+
if (match === null || match === void 0 ? void 0 : match.length) {
|
|
132
|
+
let font = match[1];
|
|
133
|
+
font = font.replace(/['"]+/g, '');
|
|
134
|
+
return font;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
static extractTextStyleItalicFromHTML(text) {
|
|
138
|
+
if (text.indexOf('<em>') > -1 || text.indexOf('<i>') > -1) {
|
|
139
|
+
return 'italic';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
static extractTextStyleStrikethroughFromHTML(text) {
|
|
143
|
+
if (text.indexOf('<s>') > -1 || text.indexOf('<strike>') > -1) {
|
|
144
|
+
return 'strikethrough';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.DocumentTextElementUtil = DocumentTextElementUtil;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PositionDefinition } from '@contrail/documents';
|
|
2
|
+
export declare class DocumentUtil {
|
|
3
|
+
static getRelativePosition(position1: PositionDefinition, position2: PositionDefinition): {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
static sanitizeHTML(text: string): string;
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DocumentUtil = void 0;
|
|
4
|
+
class DocumentUtil {
|
|
5
|
+
static getRelativePosition(position1, position2) {
|
|
6
|
+
const relativePosition = {
|
|
7
|
+
x: position2.x - position1.x,
|
|
8
|
+
y: position2.y - position1.y,
|
|
9
|
+
};
|
|
10
|
+
return relativePosition;
|
|
11
|
+
}
|
|
12
|
+
static sanitizeHTML(text) {
|
|
13
|
+
if (text === undefined || text === null) {
|
|
14
|
+
return '';
|
|
15
|
+
}
|
|
16
|
+
if (typeof text !== 'string') {
|
|
17
|
+
return text;
|
|
18
|
+
}
|
|
19
|
+
return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.DocumentUtil = DocumentUtil;
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./document-text-element-util"), exports);
|
|
18
|
+
__exportStar(require("./document-property-util"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextUtil = void 0;
|
|
4
|
+
class TextUtil {
|
|
5
|
+
static getHeightByTextWidth(text, property, width) {
|
|
6
|
+
var _a, _b, _c, _d, _e;
|
|
7
|
+
let height = 0;
|
|
8
|
+
let div = document.createElement('DIV');
|
|
9
|
+
div.id = '__textMeasure';
|
|
10
|
+
div.innerHTML = (property.includeLabel ? ((_a = property.propertyDefinition) === null || _a === void 0 ? void 0 : _a.label) + ': ' : '') + text;
|
|
11
|
+
div.style.position = 'absolute';
|
|
12
|
+
div.style.top = '-500px';
|
|
13
|
+
div.style.left = '0';
|
|
14
|
+
div.style.width = width + 'px';
|
|
15
|
+
div.style.lineHeight = 'normal';
|
|
16
|
+
div.style.overflowWrap = 'break-word';
|
|
17
|
+
div.style.fontFamily = ((_c = (_b = property.style) === null || _b === void 0 ? void 0 : _b.font) === null || _c === void 0 ? void 0 : _c.family) || 'Roboto';
|
|
18
|
+
div.style.fontWeight = property.style.font.weight ? 'bold' : 'normal';
|
|
19
|
+
div.style.fontSize = (((_e = (_d = property.style) === null || _d === void 0 ? void 0 : _d.font) === null || _e === void 0 ? void 0 : _e.size) || 12) + 'pt';
|
|
20
|
+
div.style.padding = '11px';
|
|
21
|
+
document.body.appendChild(div);
|
|
22
|
+
height = div.offsetHeight;
|
|
23
|
+
document.body.removeChild(div);
|
|
24
|
+
div = null;
|
|
25
|
+
return height;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.TextUtil = TextUtil;
|
package/package.json
CHANGED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
export declare const typeMap: {
|
|
2
|
-
item: {
|
|
3
|
-
pk: number;
|
|
4
|
-
id: string;
|
|
5
|
-
createdOn: string;
|
|
6
|
-
updatedOn: string;
|
|
7
|
-
createdById: string;
|
|
8
|
-
updatedById: string;
|
|
9
|
-
isArchived: boolean;
|
|
10
|
-
orgId: string;
|
|
11
|
-
slug: string;
|
|
12
|
-
label: string;
|
|
13
|
-
typePath: string;
|
|
14
|
-
typeRootId: string;
|
|
15
|
-
parentId: any;
|
|
16
|
-
typePolicyIds: any[];
|
|
17
|
-
typePolicies: any[];
|
|
18
|
-
typeProperties: {
|
|
19
|
-
pk: number;
|
|
20
|
-
id: string;
|
|
21
|
-
createdOn: string;
|
|
22
|
-
updatedOn: string;
|
|
23
|
-
createdById: string;
|
|
24
|
-
updatedById: string;
|
|
25
|
-
isArchived: boolean;
|
|
26
|
-
orgId: string;
|
|
27
|
-
propertyType: string;
|
|
28
|
-
slug: string;
|
|
29
|
-
label: string;
|
|
30
|
-
editable: boolean;
|
|
31
|
-
core: boolean;
|
|
32
|
-
typePropertyOptionSetId: any;
|
|
33
|
-
typePropertyUserListId: any;
|
|
34
|
-
carryOverBehavior: any;
|
|
35
|
-
carryOverDefault: any;
|
|
36
|
-
copyBehavior: any;
|
|
37
|
-
copyDefault: any;
|
|
38
|
-
formula: any;
|
|
39
|
-
numberFormat: {
|
|
40
|
-
format: any;
|
|
41
|
-
currency: string;
|
|
42
|
-
};
|
|
43
|
-
referencedTypeRootSlug: any;
|
|
44
|
-
referencedTypeRole: any;
|
|
45
|
-
referencedTypeFilterProperties: any;
|
|
46
|
-
referencedTypeId: any;
|
|
47
|
-
referencedTypePath: any;
|
|
48
|
-
defaultValue: any;
|
|
49
|
-
propertyLevel: string;
|
|
50
|
-
formulaFunction: any;
|
|
51
|
-
validationFunction: string;
|
|
52
|
-
description: any;
|
|
53
|
-
apiDetails: any;
|
|
54
|
-
notes: any;
|
|
55
|
-
searchable: boolean;
|
|
56
|
-
isFederationProperty: boolean;
|
|
57
|
-
isUniqueProperty: boolean;
|
|
58
|
-
isUniquePropertyInFamily: boolean;
|
|
59
|
-
required: boolean;
|
|
60
|
-
sequenceSeedValue: any;
|
|
61
|
-
optionsSet: any;
|
|
62
|
-
inherited: boolean;
|
|
63
|
-
used: boolean;
|
|
64
|
-
overriddenPropertySlugs: any[];
|
|
65
|
-
typePropertyPolicyIds: any[];
|
|
66
|
-
canRead: boolean;
|
|
67
|
-
canUpdate: boolean;
|
|
68
|
-
canDelete: boolean;
|
|
69
|
-
canCreate: boolean;
|
|
70
|
-
}[];
|
|
71
|
-
};
|
|
72
|
-
projectItem: {
|
|
73
|
-
pk: number;
|
|
74
|
-
id: string;
|
|
75
|
-
createdOn: string;
|
|
76
|
-
updatedOn: string;
|
|
77
|
-
createdById: string;
|
|
78
|
-
updatedById: string;
|
|
79
|
-
isArchived: boolean;
|
|
80
|
-
orgId: string;
|
|
81
|
-
slug: string;
|
|
82
|
-
label: string;
|
|
83
|
-
typePath: string;
|
|
84
|
-
typeRootId: string;
|
|
85
|
-
parentId: any;
|
|
86
|
-
typePolicyIds: any[];
|
|
87
|
-
typePolicies: any[];
|
|
88
|
-
typeProperties: {
|
|
89
|
-
id: string;
|
|
90
|
-
createdOn: string;
|
|
91
|
-
updatedOn: string;
|
|
92
|
-
createdById: string;
|
|
93
|
-
updatedById: string;
|
|
94
|
-
isArchived: boolean;
|
|
95
|
-
orgId: string;
|
|
96
|
-
propertyType: string;
|
|
97
|
-
slug: string;
|
|
98
|
-
label: string;
|
|
99
|
-
editable: boolean;
|
|
100
|
-
core: boolean;
|
|
101
|
-
typePropertyOptionSetId: any;
|
|
102
|
-
typePropertyUserListId: any;
|
|
103
|
-
carryOverBehavior: any;
|
|
104
|
-
carryOverDefault: any;
|
|
105
|
-
copyBehavior: any;
|
|
106
|
-
copyDefault: any;
|
|
107
|
-
formula: any;
|
|
108
|
-
numberFormat: {
|
|
109
|
-
format: string;
|
|
110
|
-
currency: string;
|
|
111
|
-
precision: number;
|
|
112
|
-
};
|
|
113
|
-
referencedTypeRootSlug: any;
|
|
114
|
-
referencedTypeRole: any;
|
|
115
|
-
referencedTypeFilterProperties: any;
|
|
116
|
-
referencedTypeId: any;
|
|
117
|
-
referencedTypePath: any;
|
|
118
|
-
defaultValue: any;
|
|
119
|
-
propertyLevel: string;
|
|
120
|
-
formulaFunction: any;
|
|
121
|
-
validationFunction: string;
|
|
122
|
-
description: any;
|
|
123
|
-
apiDetails: any;
|
|
124
|
-
notes: any;
|
|
125
|
-
searchable: boolean;
|
|
126
|
-
isFederationProperty: boolean;
|
|
127
|
-
isUniqueProperty: boolean;
|
|
128
|
-
isUniquePropertyInFamily: boolean;
|
|
129
|
-
required: boolean;
|
|
130
|
-
sequenceSeedValue: any;
|
|
131
|
-
optionsSet: any;
|
|
132
|
-
inherited: boolean;
|
|
133
|
-
used: boolean;
|
|
134
|
-
overriddenPropertySlugs: any[];
|
|
135
|
-
typePropertyPolicyIds: string[];
|
|
136
|
-
canRead: boolean;
|
|
137
|
-
canUpdate: boolean;
|
|
138
|
-
canDelete: boolean;
|
|
139
|
-
canCreate: boolean;
|
|
140
|
-
}[];
|
|
141
|
-
};
|
|
142
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.typeMap = void 0;
|
|
4
|
-
exports.typeMap = {
|
|
5
|
-
item: {
|
|
6
|
-
pk: 731,
|
|
7
|
-
id: 'ivE7yP0zkKHIkfU-',
|
|
8
|
-
createdOn: '2021-07-09T14:01:49.217Z',
|
|
9
|
-
updatedOn: '2021-07-09T14:01:49.217Z',
|
|
10
|
-
createdById: 'G5YQopiRBlfmnDn3',
|
|
11
|
-
updatedById: 'G5YQopiRBlfmnDn3',
|
|
12
|
-
isArchived: false,
|
|
13
|
-
orgId: 'Z5KDga-mUfxIXk21',
|
|
14
|
-
slug: 'item',
|
|
15
|
-
label: 'Item',
|
|
16
|
-
typePath: 'item',
|
|
17
|
-
typeRootId: '3735b33f-52c4-4ff5-a52c-95c0f97f16c3',
|
|
18
|
-
parentId: null,
|
|
19
|
-
typePolicyIds: [],
|
|
20
|
-
typePolicies: [],
|
|
21
|
-
typeProperties: [
|
|
22
|
-
{
|
|
23
|
-
pk: 2370,
|
|
24
|
-
id: '4hL2d44GPxAzmr1S',
|
|
25
|
-
createdOn: '2022-05-26T18:30:35.057Z',
|
|
26
|
-
updatedOn: '2023-05-05T21:17:06.810Z',
|
|
27
|
-
createdById: 'G5YQopiRBlfmnDn3',
|
|
28
|
-
updatedById: 'G5YQopiRBlfmnDn3',
|
|
29
|
-
isArchived: false,
|
|
30
|
-
orgId: 'Z5KDga-mUfxIXk21',
|
|
31
|
-
propertyType: 'string',
|
|
32
|
-
slug: 'overridableProp',
|
|
33
|
-
label: 'Overridable Prop',
|
|
34
|
-
editable: true,
|
|
35
|
-
core: false,
|
|
36
|
-
typePropertyOptionSetId: null,
|
|
37
|
-
typePropertyUserListId: null,
|
|
38
|
-
carryOverBehavior: null,
|
|
39
|
-
carryOverDefault: null,
|
|
40
|
-
copyBehavior: null,
|
|
41
|
-
copyDefault: null,
|
|
42
|
-
formula: null,
|
|
43
|
-
numberFormat: {
|
|
44
|
-
format: null,
|
|
45
|
-
currency: 'USD',
|
|
46
|
-
},
|
|
47
|
-
referencedTypeRootSlug: null,
|
|
48
|
-
referencedTypeRole: null,
|
|
49
|
-
referencedTypeFilterProperties: null,
|
|
50
|
-
referencedTypeId: null,
|
|
51
|
-
referencedTypePath: null,
|
|
52
|
-
defaultValue: null,
|
|
53
|
-
propertyLevel: 'overridable',
|
|
54
|
-
formulaFunction: null,
|
|
55
|
-
validationFunction: '',
|
|
56
|
-
description: null,
|
|
57
|
-
apiDetails: null,
|
|
58
|
-
notes: null,
|
|
59
|
-
searchable: false,
|
|
60
|
-
isFederationProperty: false,
|
|
61
|
-
isUniqueProperty: false,
|
|
62
|
-
isUniquePropertyInFamily: false,
|
|
63
|
-
required: false,
|
|
64
|
-
sequenceSeedValue: null,
|
|
65
|
-
optionsSet: null,
|
|
66
|
-
inherited: false,
|
|
67
|
-
used: true,
|
|
68
|
-
overriddenPropertySlugs: [],
|
|
69
|
-
typePropertyPolicyIds: [],
|
|
70
|
-
canRead: true,
|
|
71
|
-
canUpdate: true,
|
|
72
|
-
canDelete: true,
|
|
73
|
-
canCreate: true,
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
projectItem: {
|
|
78
|
-
pk: 1291,
|
|
79
|
-
id: 'ina_V3kyFcasfKXE',
|
|
80
|
-
createdOn: '2022-07-08T18:48:05.530Z',
|
|
81
|
-
updatedOn: '2022-07-08T18:48:05.530Z',
|
|
82
|
-
createdById: 'G5YQopiRBlfmnDn3',
|
|
83
|
-
updatedById: 'G5YQopiRBlfmnDn3',
|
|
84
|
-
isArchived: false,
|
|
85
|
-
orgId: 'Z5KDga-mUfxIXk21',
|
|
86
|
-
slug: 'project-item',
|
|
87
|
-
label: 'ProjectItem',
|
|
88
|
-
typePath: 'project-item',
|
|
89
|
-
typeRootId: 'AX-F0PADgcRGENr3',
|
|
90
|
-
parentId: null,
|
|
91
|
-
typePolicyIds: [],
|
|
92
|
-
typePolicies: [],
|
|
93
|
-
typeProperties: [
|
|
94
|
-
{
|
|
95
|
-
id: 'mkO5HfQAELNJ__Yt',
|
|
96
|
-
createdOn: '2022-07-16T15:49:03.102Z',
|
|
97
|
-
updatedOn: '2025-07-28T04:09:25.706Z',
|
|
98
|
-
createdById: 'G5YQopiRBlfmnDn3',
|
|
99
|
-
updatedById: 'G5YQopiRBlfmnDn3',
|
|
100
|
-
isArchived: false,
|
|
101
|
-
orgId: 'Z5KDga-mUfxIXk21',
|
|
102
|
-
propertyType: 'currency',
|
|
103
|
-
slug: 'outletPrice',
|
|
104
|
-
label: 'Outlet Price',
|
|
105
|
-
editable: true,
|
|
106
|
-
core: false,
|
|
107
|
-
typePropertyOptionSetId: null,
|
|
108
|
-
typePropertyUserListId: null,
|
|
109
|
-
carryOverBehavior: null,
|
|
110
|
-
carryOverDefault: null,
|
|
111
|
-
copyBehavior: null,
|
|
112
|
-
copyDefault: null,
|
|
113
|
-
formula: null,
|
|
114
|
-
numberFormat: {
|
|
115
|
-
format: 'currency',
|
|
116
|
-
currency: 'USD',
|
|
117
|
-
precision: 2,
|
|
118
|
-
},
|
|
119
|
-
referencedTypeRootSlug: null,
|
|
120
|
-
referencedTypeRole: null,
|
|
121
|
-
referencedTypeFilterProperties: null,
|
|
122
|
-
referencedTypeId: null,
|
|
123
|
-
referencedTypePath: null,
|
|
124
|
-
defaultValue: null,
|
|
125
|
-
propertyLevel: 'option',
|
|
126
|
-
formulaFunction: null,
|
|
127
|
-
validationFunction: '',
|
|
128
|
-
description: null,
|
|
129
|
-
apiDetails: null,
|
|
130
|
-
notes: null,
|
|
131
|
-
searchable: false,
|
|
132
|
-
isFederationProperty: false,
|
|
133
|
-
isUniqueProperty: false,
|
|
134
|
-
isUniquePropertyInFamily: false,
|
|
135
|
-
required: false,
|
|
136
|
-
sequenceSeedValue: null,
|
|
137
|
-
optionsSet: null,
|
|
138
|
-
inherited: false,
|
|
139
|
-
used: true,
|
|
140
|
-
overriddenPropertySlugs: [],
|
|
141
|
-
typePropertyPolicyIds: ['daLwIOoOfKEaAm9F'],
|
|
142
|
-
canRead: true,
|
|
143
|
-
canUpdate: true,
|
|
144
|
-
canDelete: false,
|
|
145
|
-
canCreate: false,
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
},
|
|
149
|
-
};
|