bruce-models 2.8.3 → 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.
@@ -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.3";
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":";;;AAAA;;;GAGG;AACH,IAAiB,iBAAiB,CA8FjC;AA9FD,WAAiB,iBAAiB;IAC9B,IAAY,SAqBX;IArBD,WAAY,SAAS;QACjB,oDAAoD;QACpD,qDAAc,CAAA;QACd,6CAA6C;QAC7C,mDAAa,CAAA;QACb,kBAAkB;QAClB,2DAAiB,CAAA;QACjB,oDAAoD;QACpD,qDAAc,CAAA;QACd,iDAAiD;QACjD,qDAAc,CAAA;QACd,kBAAkB;QAClB,uDAAe,CAAA;QACf,2CAA2C;QAC3C,2DAAiB,CAAA;QACjB,aAAa;QACb,2CAAS,CAAA;QACT,yEAAyE;QACzE,qDAAc,CAAA;QACd,+CAA+C;QAC/C,yCAAQ,CAAA;IACZ,CAAC,EArBW,SAAS,GAAT,2BAAS,KAAT,2BAAS,QAqBpB;IAED,IAAY,cAGX;IAHD,WAAY,cAAc;QACtB,kCAAgB,CAAA;QAChB,oCAAkB,CAAA;IACtB,CAAC,EAHW,cAAc,GAAd,gCAAc,KAAd,gCAAc,QAGzB;AAmEL,CAAC,EA9FgB,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QA8FjC"}
1
+ {"version":3,"file":"custom-form-content.js","sourceRoot":"","sources":["../../../src/custom-form/custom-form-content.ts"],"names":[],"mappings":""}
@@ -81,4 +81,4 @@ export * from "./internal/uploader";
81
81
  export * from "./plugin/plugin";
82
82
  export * from "./environment";
83
83
  export * from "./data-source/data-source";
84
- export declare const VERSION = "2.8.3";
84
+ export declare const VERSION = "2.8.4";
@@ -1,74 +1,27 @@
1
1
  /**
2
- * Describes content of a GENERIC type custom form.
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
- enum ECellType {
7
- StaticText = 0,
8
- DataValue = 1,
9
- StaticPicture = 2,
10
- SubSection = 3,
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
- enum EFlowDirection {
19
- Vertically = "v",
20
- Horizontally = "h"
11
+ interface IStackItem {
12
+ component: Component;
13
+ params: StackItemParams;
21
14
  }
22
- interface ISection extends ICell {
23
- Heading?: {
24
- Icon?: string;
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 ICell {
33
- Type?: ECellType;
34
- Style?: {
35
- BackgroundColor?: string;
36
- TextColor?: string;
37
- };
19
+ interface IEntityTextParams {
20
+ attrPath: string;
38
21
  }
39
- namespace CellContent {
40
- type Content = IStatic | IDataValue | IStaticImage | IMoreButton | IEntityPhoto | IEmbeddedMedia;
41
- interface IStatic extends ICell {
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.ISection | Markup.IMarkup | any;
15
+ Settings?: CustomFormContent.IContent | any;
17
16
  Type?: EType;
18
17
  }
19
18
  enum EType {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bruce-models",
3
- "version": "2.8.3",
3
+ "version": "2.8.4",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/bruce-models.umd.js",