@squiz/dxp-page-content-types 1.5.0 → 1.5.1

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.
@@ -6,10 +6,34 @@
6
6
  * The action that was performed.
7
7
  */
8
8
  export declare enum TVersionChangeSummaryAction {
9
+ /**
10
+ * When an item is add to the page.
11
+ */
9
12
  ADD = "add",
13
+ /**
14
+ * When a template or A/B test is changed.
15
+ */
16
+ CHANGE = "change",
17
+ /**
18
+ * When an item is edited that is not part of a change.
19
+ */
10
20
  EDIT = "edit",
21
+ /**
22
+ * When an item is deleted from the page.
23
+ */
11
24
  DELETE = "delete",
12
- MOVE = "move"
25
+ /**
26
+ * When something is changed in a layout.
27
+ */
28
+ LAYOUT_CHANGE = "layout-change",
29
+ /**
30
+ * When an item is moved within a layout or page.
31
+ */
32
+ MOVE = "move",
33
+ /**
34
+ * When a component is upgraded to a new version.
35
+ */
36
+ UPGRADE = "upgrade"
13
37
  }
14
38
  /**
15
39
  * A message describing a change in the version history of a page.
@@ -27,6 +51,13 @@ export interface VersionChangeSummaryMessage {
27
51
  * @memberof VersionChangeSummaryMessage
28
52
  */
29
53
  value: string;
54
+ /**
55
+ * The children of the change.
56
+ * The nested changes part of a layout change.
57
+ * @type {VersionChangeSummaryMessage[]}
58
+ * @memberof VersionChangeSummaryMessage
59
+ */
60
+ children?: VersionChangeSummaryMessage[];
30
61
  /**
31
62
  * The metadata of the change.
32
63
  * @type {{path?: string, componentId?: string, toPosition?: number, fromPosition?: number, position?: number, section?: string, nodeId?: string}}
@@ -40,32 +71,17 @@ export interface VersionChangeSummaryMessage {
40
71
  */
41
72
  path?: string;
42
73
  /**
43
- * The component id of the change.
44
- * @type {string}
74
+ * The parent layout path of the change.
75
+ * @type {string[]}
45
76
  * @memberof VersionChangeSummaryMessage
46
77
  */
47
- componentId?: string;
78
+ parentLayoutPath?: string[];
48
79
  /**
49
- * The to position of the change.
50
- * @type {number}
51
- * @memberof VersionChangeSummaryMessage
52
- * @format double
53
- */
54
- toPosition?: number;
55
- /**
56
- * The from position of the change.
57
- * @type {number}
58
- * @memberof VersionChangeSummaryMessage
59
- * @format double
60
- */
61
- fromPosition?: number;
62
- /**
63
- * The position of the change.
64
- * @type {number}
80
+ * The component id of the change.
81
+ * @type {string}
65
82
  * @memberof VersionChangeSummaryMessage
66
- * @format double
67
83
  */
68
- position?: number;
84
+ componentId?: string;
69
85
  /**
70
86
  * The section of the change.
71
87
  * @type {string}
@@ -10,9 +10,33 @@ exports.TVersionChangeSummaryAction = void 0;
10
10
  */
11
11
  var TVersionChangeSummaryAction;
12
12
  (function (TVersionChangeSummaryAction) {
13
+ /**
14
+ * When an item is add to the page.
15
+ */
13
16
  TVersionChangeSummaryAction["ADD"] = "add";
17
+ /**
18
+ * When a template or A/B test is changed.
19
+ */
20
+ TVersionChangeSummaryAction["CHANGE"] = "change";
21
+ /**
22
+ * When an item is edited that is not part of a change.
23
+ */
14
24
  TVersionChangeSummaryAction["EDIT"] = "edit";
25
+ /**
26
+ * When an item is deleted from the page.
27
+ */
15
28
  TVersionChangeSummaryAction["DELETE"] = "delete";
29
+ /**
30
+ * When something is changed in a layout.
31
+ */
32
+ TVersionChangeSummaryAction["LAYOUT_CHANGE"] = "layout-change";
33
+ /**
34
+ * When an item is moved within a layout or page.
35
+ */
16
36
  TVersionChangeSummaryAction["MOVE"] = "move";
37
+ /**
38
+ * When a component is upgraded to a new version.
39
+ */
40
+ TVersionChangeSummaryAction["UPGRADE"] = "upgrade";
17
41
  })(TVersionChangeSummaryAction || (exports.TVersionChangeSummaryAction = TVersionChangeSummaryAction = {}));
18
42
  //# sourceMappingURL=VersionChangeSummary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionChangeSummary.js","sourceRoot":"","sources":["../../src/VersionChangeSummary/VersionChangeSummary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,0CAAW,CAAA;IACX,4CAAa,CAAA;IACb,gDAAiB,CAAA;IACjB,4CAAa,CAAA;AACf,CAAC,EALW,2BAA2B,2CAA3B,2BAA2B,QAKtC"}
1
+ {"version":3,"file":"VersionChangeSummary.js","sourceRoot":"","sources":["../../src/VersionChangeSummary/VersionChangeSummary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACH,IAAY,2BA6BX;AA7BD,WAAY,2BAA2B;IACrC;;OAEG;IACH,0CAAW,CAAA;IACX;;OAEG;IACH,gDAAiB,CAAA;IACjB;;OAEG;IACH,4CAAa,CAAA;IACb;;OAEG;IACH,gDAAiB,CAAA;IACjB;;OAEG;IACH,8DAA+B,CAAA;IAC/B;;OAEG;IACH,4CAAa,CAAA;IACb;;OAEG;IACH,kDAAmB,CAAA;AACrB,CAAC,EA7BW,2BAA2B,2CAA3B,2BAA2B,QA6BtC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squiz/dxp-page-content-types",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": {