bruce-models 2.8.2 → 2.8.4
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/dist/bruce-models.es5.js +2 -38
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +1 -36
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/custom-form/custom-form-content.js +0 -36
- package/dist/lib/custom-form/custom-form-content.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/custom-form/custom-form-content.d.ts +18 -65
- package/dist/types/custom-form/custom-form.d.ts +1 -2
- package/dist/types/project/project-view-selection.d.ts +3 -4
- package/package.json +1 -1
package/dist/lib/bruce-models.js
CHANGED
|
@@ -98,5 +98,5 @@ __exportStar(require("./internal/uploader"), exports);
|
|
|
98
98
|
__exportStar(require("./plugin/plugin"), exports);
|
|
99
99
|
__exportStar(require("./environment"), exports);
|
|
100
100
|
__exportStar(require("./data-source/data-source"), exports);
|
|
101
|
-
exports.VERSION = "2.8.
|
|
101
|
+
exports.VERSION = "2.8.4";
|
|
102
102
|
//# sourceMappingURL=bruce-models.js.map
|
|
@@ -1,39 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CustomFormContent = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Describes content of a GENERIC type custom form.
|
|
6
|
-
* The alternative type is MARKUP (Markup.IMarkup).
|
|
7
|
-
*/
|
|
8
|
-
var CustomFormContent;
|
|
9
|
-
(function (CustomFormContent) {
|
|
10
|
-
let ECellType;
|
|
11
|
-
(function (ECellType) {
|
|
12
|
-
// Description-like text box that the user types in.
|
|
13
|
-
ECellType[ECellType["StaticText"] = 0] = "StaticText";
|
|
14
|
-
// Label + Value pair of an entity attribute.
|
|
15
|
-
ECellType[ECellType["DataValue"] = 1] = "DataValue";
|
|
16
|
-
// Static picture.
|
|
17
|
-
ECellType[ECellType["StaticPicture"] = 2] = "StaticPicture";
|
|
18
|
-
// Sub-section of the form. Contains other sections.
|
|
19
|
-
ECellType[ECellType["SubSection"] = 3] = "SubSection";
|
|
20
|
-
// Button that opens another form (or info view).
|
|
21
|
-
ECellType[ECellType["ButtonMore"] = 4] = "ButtonMore";
|
|
22
|
-
// Entity gallery.
|
|
23
|
-
ECellType[ECellType["EntityPhoto"] = 5] = "EntityPhoto";
|
|
24
|
-
// Embedded media frame. Eg: youtube video.
|
|
25
|
-
ECellType[ECellType["EmbeddedMedia"] = 6] = "EmbeddedMedia";
|
|
26
|
-
// Deprecated
|
|
27
|
-
ECellType[ECellType["Chart"] = 7] = "Chart";
|
|
28
|
-
// Similar to DataValue, except it populates a description-like text-box.
|
|
29
|
-
ECellType[ECellType["EntityText"] = 8] = "EntityText";
|
|
30
|
-
// Icon and optional action associated with it.
|
|
31
|
-
ECellType[ECellType["Icon"] = 9] = "Icon";
|
|
32
|
-
})(ECellType = CustomFormContent.ECellType || (CustomFormContent.ECellType = {}));
|
|
33
|
-
let EFlowDirection;
|
|
34
|
-
(function (EFlowDirection) {
|
|
35
|
-
EFlowDirection["Vertically"] = "v";
|
|
36
|
-
EFlowDirection["Horizontally"] = "h";
|
|
37
|
-
})(EFlowDirection = CustomFormContent.EFlowDirection || (CustomFormContent.EFlowDirection = {}));
|
|
38
|
-
})(CustomFormContent = exports.CustomFormContent || (exports.CustomFormContent = {}));
|
|
39
3
|
//# sourceMappingURL=custom-form-content.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-form-content.js","sourceRoot":"","sources":["../../../src/custom-form/custom-form-content.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-form-content.js","sourceRoot":"","sources":["../../../src/custom-form/custom-form-content.ts"],"names":[],"mappings":""}
|
|
@@ -1,74 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Describes content of a
|
|
3
|
-
* The alternative type is MARKUP (Markup.IMarkup).
|
|
2
|
+
* Describes content of a COMPONENT_STACK type custom form.
|
|
4
3
|
*/
|
|
5
4
|
export declare namespace CustomFormContent {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ButtonMore = 4,
|
|
12
|
-
EntityPhoto = 5,
|
|
13
|
-
EmbeddedMedia = 6,
|
|
14
|
-
Chart = 7,
|
|
15
|
-
EntityText = 8,
|
|
16
|
-
Icon = 9
|
|
5
|
+
interface IContent {
|
|
6
|
+
size?: {
|
|
7
|
+
width: number;
|
|
8
|
+
};
|
|
9
|
+
stack: IStackItem[];
|
|
17
10
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
interface IStackItem {
|
|
12
|
+
component: Component;
|
|
13
|
+
params: StackItemParams;
|
|
21
14
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Caption?: string;
|
|
26
|
-
};
|
|
27
|
-
Direction?: EFlowDirection;
|
|
28
|
-
Entries?: CellContent.Content[];
|
|
29
|
-
Width?: number;
|
|
30
|
-
WidthUnits?: "px" | "%";
|
|
15
|
+
type Component = "STATIC_TEXT" | "ENTITY_TEXT" | "IFRAME" | "ENTITY_GALLERY" | "ENTITY_ATTRIBUTES" | "ENTITY_COMMENTS";
|
|
16
|
+
interface IStaticTextParams {
|
|
17
|
+
text: string;
|
|
31
18
|
}
|
|
32
|
-
interface
|
|
33
|
-
|
|
34
|
-
Style?: {
|
|
35
|
-
BackgroundColor?: string;
|
|
36
|
-
TextColor?: string;
|
|
37
|
-
};
|
|
19
|
+
interface IEntityTextParams {
|
|
20
|
+
attrPath: string;
|
|
38
21
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Text?: string;
|
|
43
|
-
}
|
|
44
|
-
interface IDataValue extends ICell {
|
|
45
|
-
LabelIcon?: string;
|
|
46
|
-
LabelText?: string;
|
|
47
|
-
ValuePath?: string;
|
|
48
|
-
}
|
|
49
|
-
interface IStaticImage extends ICell {
|
|
50
|
-
ImageUrl?: string;
|
|
51
|
-
}
|
|
52
|
-
interface IMoreButton extends ICell {
|
|
53
|
-
ReferredCustomFormID?: number;
|
|
54
|
-
}
|
|
55
|
-
interface IEntityPhoto extends ICell {
|
|
56
|
-
}
|
|
57
|
-
interface IEmbeddedMedia {
|
|
58
|
-
HTML?: string;
|
|
59
|
-
}
|
|
60
|
-
interface IEntryEntityText extends ICell {
|
|
61
|
-
ValuePath?: string;
|
|
62
|
-
}
|
|
63
|
-
interface IEntryIcon extends ICell {
|
|
64
|
-
icon?: string;
|
|
65
|
-
color?: string;
|
|
66
|
-
action?: {
|
|
67
|
-
type: "NONE" | "LINK" | "RELATIONSHIPS";
|
|
68
|
-
params?: {
|
|
69
|
-
URL?: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
}
|
|
22
|
+
interface IIFrameParams {
|
|
23
|
+
url: string;
|
|
24
|
+
height: number;
|
|
73
25
|
}
|
|
26
|
+
type StackItemParams = IStaticTextParams | IEntityTextParams | IIFrameParams | any;
|
|
74
27
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Api } from "../api/api";
|
|
2
2
|
import { BruceApi } from "../api/bruce-api";
|
|
3
|
-
import { Markup } from "../markup/markup";
|
|
4
3
|
import { CustomFormContent } from "./custom-form-content";
|
|
5
4
|
/**
|
|
6
5
|
* Describes the "Custom Form" concept within Bruce.
|
|
@@ -13,7 +12,7 @@ export declare namespace CustomForm {
|
|
|
13
12
|
ID?: number;
|
|
14
13
|
"EntityType.ID"?: string;
|
|
15
14
|
Name?: string;
|
|
16
|
-
Settings?: CustomFormContent.
|
|
15
|
+
Settings?: CustomFormContent.IContent | any;
|
|
17
16
|
Type?: EType;
|
|
18
17
|
}
|
|
19
18
|
enum EType {
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { IDictionary } from "../bruce-models";
|
|
2
1
|
/**
|
|
3
2
|
* Describes settings for entity selection for a project view record.
|
|
4
3
|
*/
|
|
5
4
|
export declare namespace ProjectViewSelection {
|
|
6
5
|
interface ISelection {
|
|
7
6
|
defaultAction?: IItem;
|
|
8
|
-
entityTypeMapping?:
|
|
7
|
+
entityTypeMapping?: IItem[];
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
10
|
* This represents an action and related params to perform on user-click.
|
|
12
11
|
*/
|
|
13
12
|
interface IItem {
|
|
14
13
|
entityTypeId?: string;
|
|
15
|
-
action:
|
|
14
|
+
action: Action;
|
|
16
15
|
actionParams?: undefined | IActionInfoView | IActionCustomForm | IActionPlugin;
|
|
17
16
|
}
|
|
18
|
-
type
|
|
17
|
+
type Action = "INFO_VIEW" | "CUSTOM_FORM" | "PLUGIN" | "NONE";
|
|
19
18
|
/**
|
|
20
19
|
* These are the params related to the "info-view" action.
|
|
21
20
|
* This is the Nextspace default entity details panel.
|