@rippling/rippling-sdk 0.2.0-alpha.37 → 0.2.0-alpha.39

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 (202) hide show
  1. package/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +3 -3
  2. package/examples/sdui/sdui-showcase/sdui-showcase.ts +6 -11
  3. package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +14 -24
  4. package/examples/sdui/vote/vote.ts +7 -11
  5. package/lib/manifest/app.d.mts +11 -1
  6. package/lib/manifest/app.d.mts.map +1 -1
  7. package/lib/manifest/app.d.ts +11 -1
  8. package/lib/manifest/app.d.ts.map +1 -1
  9. package/lib/manifest/app.js +42 -1
  10. package/lib/manifest/app.js.map +1 -1
  11. package/lib/manifest/app.mjs +42 -1
  12. package/lib/manifest/app.mjs.map +1 -1
  13. package/lib/manifest/category.d.mts +14 -3
  14. package/lib/manifest/category.d.mts.map +1 -1
  15. package/lib/manifest/category.d.ts +14 -3
  16. package/lib/manifest/category.d.ts.map +1 -1
  17. package/lib/manifest/category.js +25 -3
  18. package/lib/manifest/category.js.map +1 -1
  19. package/lib/manifest/category.mjs +25 -3
  20. package/lib/manifest/category.mjs.map +1 -1
  21. package/lib/manifest/custom-object-field-section.d.mts +13 -0
  22. package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
  23. package/lib/manifest/custom-object-field-section.d.ts +13 -0
  24. package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
  25. package/lib/manifest/custom-object-field-section.js +22 -1
  26. package/lib/manifest/custom-object-field-section.js.map +1 -1
  27. package/lib/manifest/custom-object-field-section.mjs +22 -1
  28. package/lib/manifest/custom-object-field-section.mjs.map +1 -1
  29. package/lib/manifest/custom-object-page-layout.d.mts +23 -0
  30. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  31. package/lib/manifest/custom-object-page-layout.d.ts +23 -0
  32. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  33. package/lib/manifest/custom-object-page-layout.js +45 -2
  34. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  35. package/lib/manifest/custom-object-page-layout.mjs +45 -2
  36. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  37. package/lib/manifest/custom-object.d.mts +41 -2
  38. package/lib/manifest/custom-object.d.mts.map +1 -1
  39. package/lib/manifest/custom-object.d.ts +41 -2
  40. package/lib/manifest/custom-object.d.ts.map +1 -1
  41. package/lib/manifest/custom-object.js +70 -3
  42. package/lib/manifest/custom-object.js.map +1 -1
  43. package/lib/manifest/custom-object.mjs +70 -3
  44. package/lib/manifest/custom-object.mjs.map +1 -1
  45. package/lib/manifest/existing-manifest-context.d.mts +87 -0
  46. package/lib/manifest/existing-manifest-context.d.mts.map +1 -0
  47. package/lib/manifest/existing-manifest-context.d.ts +87 -0
  48. package/lib/manifest/existing-manifest-context.d.ts.map +1 -0
  49. package/lib/manifest/existing-manifest-context.js +511 -0
  50. package/lib/manifest/existing-manifest-context.js.map +1 -0
  51. package/lib/manifest/existing-manifest-context.mjs +506 -0
  52. package/lib/manifest/existing-manifest-context.mjs.map +1 -0
  53. package/lib/manifest/field.d.mts +44 -2
  54. package/lib/manifest/field.d.mts.map +1 -1
  55. package/lib/manifest/field.d.ts +44 -2
  56. package/lib/manifest/field.d.ts.map +1 -1
  57. package/lib/manifest/field.js +134 -3
  58. package/lib/manifest/field.js.map +1 -1
  59. package/lib/manifest/field.mjs +134 -3
  60. package/lib/manifest/field.mjs.map +1 -1
  61. package/lib/manifest/index.d.mts +8 -7
  62. package/lib/manifest/index.d.mts.map +1 -1
  63. package/lib/manifest/index.d.ts +8 -7
  64. package/lib/manifest/index.d.ts.map +1 -1
  65. package/lib/manifest/index.js +3 -1
  66. package/lib/manifest/index.js.map +1 -1
  67. package/lib/manifest/index.mjs +5 -4
  68. package/lib/manifest/index.mjs.map +1 -1
  69. package/lib/manifest/list-view.d.mts +17 -0
  70. package/lib/manifest/list-view.d.mts.map +1 -1
  71. package/lib/manifest/list-view.d.ts +17 -0
  72. package/lib/manifest/list-view.d.ts.map +1 -1
  73. package/lib/manifest/list-view.js +38 -1
  74. package/lib/manifest/list-view.js.map +1 -1
  75. package/lib/manifest/list-view.mjs +38 -1
  76. package/lib/manifest/list-view.mjs.map +1 -1
  77. package/lib/manifest/manifest-builder.d.mts +60 -7
  78. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  79. package/lib/manifest/manifest-builder.d.ts +60 -7
  80. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  81. package/lib/manifest/manifest-builder.js +62 -4
  82. package/lib/manifest/manifest-builder.js.map +1 -1
  83. package/lib/manifest/manifest-builder.mjs +62 -4
  84. package/lib/manifest/manifest-builder.mjs.map +1 -1
  85. package/lib/manifest/manifest-function.d.mts +18 -3
  86. package/lib/manifest/manifest-function.d.mts.map +1 -1
  87. package/lib/manifest/manifest-function.d.ts +18 -3
  88. package/lib/manifest/manifest-function.d.ts.map +1 -1
  89. package/lib/manifest/manifest-function.js +44 -3
  90. package/lib/manifest/manifest-function.js.map +1 -1
  91. package/lib/manifest/manifest-function.mjs +44 -3
  92. package/lib/manifest/manifest-function.mjs.map +1 -1
  93. package/lib/manifest/rule.d.mts +17 -0
  94. package/lib/manifest/rule.d.mts.map +1 -1
  95. package/lib/manifest/rule.d.ts +17 -0
  96. package/lib/manifest/rule.d.ts.map +1 -1
  97. package/lib/manifest/rule.js +45 -1
  98. package/lib/manifest/rule.js.map +1 -1
  99. package/lib/manifest/rule.mjs +45 -1
  100. package/lib/manifest/rule.mjs.map +1 -1
  101. package/lib/manifest/sdui-page.d.mts +10 -1
  102. package/lib/manifest/sdui-page.d.mts.map +1 -1
  103. package/lib/manifest/sdui-page.d.ts +10 -1
  104. package/lib/manifest/sdui-page.d.ts.map +1 -1
  105. package/lib/manifest/sdui-page.js +28 -1
  106. package/lib/manifest/sdui-page.js.map +1 -1
  107. package/lib/manifest/sdui-page.mjs +28 -1
  108. package/lib/manifest/sdui-page.mjs.map +1 -1
  109. package/lib/manifest/validation.d.mts +17 -0
  110. package/lib/manifest/validation.d.mts.map +1 -1
  111. package/lib/manifest/validation.d.ts +17 -0
  112. package/lib/manifest/validation.d.ts.map +1 -1
  113. package/lib/manifest/validation.js +31 -1
  114. package/lib/manifest/validation.js.map +1 -1
  115. package/lib/manifest/validation.mjs +31 -1
  116. package/lib/manifest/validation.mjs.map +1 -1
  117. package/lib/sdui/actions.d.mts.map +1 -1
  118. package/lib/sdui/actions.d.ts.map +1 -1
  119. package/lib/sdui/actions.js +23 -13
  120. package/lib/sdui/actions.js.map +1 -1
  121. package/lib/sdui/actions.mjs +23 -13
  122. package/lib/sdui/actions.mjs.map +1 -1
  123. package/lib/sdui/component.d.mts +28 -11
  124. package/lib/sdui/component.d.mts.map +1 -1
  125. package/lib/sdui/component.d.ts +28 -11
  126. package/lib/sdui/component.d.ts.map +1 -1
  127. package/lib/sdui/component.js +69 -36
  128. package/lib/sdui/component.js.map +1 -1
  129. package/lib/sdui/component.mjs +69 -36
  130. package/lib/sdui/component.mjs.map +1 -1
  131. package/lib/sdui/components.d.mts +1141 -132
  132. package/lib/sdui/components.d.mts.map +1 -1
  133. package/lib/sdui/components.d.ts +1141 -132
  134. package/lib/sdui/components.d.ts.map +1 -1
  135. package/lib/sdui/components.js +834 -206
  136. package/lib/sdui/components.js.map +1 -1
  137. package/lib/sdui/components.mjs +830 -203
  138. package/lib/sdui/components.mjs.map +1 -1
  139. package/lib/sdui/directives.d.mts.map +1 -1
  140. package/lib/sdui/directives.d.ts.map +1 -1
  141. package/lib/sdui/directives.js +4 -1
  142. package/lib/sdui/directives.js.map +1 -1
  143. package/lib/sdui/directives.mjs +4 -1
  144. package/lib/sdui/directives.mjs.map +1 -1
  145. package/lib/sdui/index.d.mts +314 -261
  146. package/lib/sdui/index.d.mts.map +1 -1
  147. package/lib/sdui/index.d.ts +314 -261
  148. package/lib/sdui/index.d.ts.map +1 -1
  149. package/lib/sdui/index.js +255 -204
  150. package/lib/sdui/index.js.map +1 -1
  151. package/lib/sdui/index.mjs +128 -103
  152. package/lib/sdui/index.mjs.map +1 -1
  153. package/lib/sdui/propTypes.d.mts +6330 -0
  154. package/lib/sdui/propTypes.d.mts.map +1 -0
  155. package/lib/sdui/propTypes.d.ts +6330 -0
  156. package/lib/sdui/propTypes.d.ts.map +1 -0
  157. package/lib/sdui/propTypes.js +14 -0
  158. package/lib/sdui/propTypes.js.map +1 -0
  159. package/lib/sdui/propTypes.mjs +13 -0
  160. package/lib/sdui/propTypes.mjs.map +1 -0
  161. package/lib/sdui/render.d.mts +1 -1
  162. package/lib/sdui/render.d.mts.map +1 -1
  163. package/lib/sdui/render.d.ts +1 -1
  164. package/lib/sdui/render.d.ts.map +1 -1
  165. package/lib/sdui/render.js +11 -3
  166. package/lib/sdui/render.js.map +1 -1
  167. package/lib/sdui/render.mjs +11 -3
  168. package/lib/sdui/render.mjs.map +1 -1
  169. package/lib/sdui/state.d.mts.map +1 -1
  170. package/lib/sdui/state.d.ts.map +1 -1
  171. package/lib/sdui/state.js +3 -1
  172. package/lib/sdui/state.js.map +1 -1
  173. package/lib/sdui/state.mjs +3 -1
  174. package/lib/sdui/state.mjs.map +1 -1
  175. package/package.json +1 -1
  176. package/src/lib/manifest/app.ts +46 -2
  177. package/src/lib/manifest/category.ts +35 -7
  178. package/src/lib/manifest/custom-object-field-section.ts +37 -1
  179. package/src/lib/manifest/custom-object-page-layout.ts +67 -2
  180. package/src/lib/manifest/custom-object.ts +88 -4
  181. package/src/lib/manifest/existing-manifest-context.ts +673 -0
  182. package/src/lib/manifest/field.ts +160 -3
  183. package/src/lib/manifest/index.ts +39 -4
  184. package/src/lib/manifest/list-view.ts +50 -1
  185. package/src/lib/manifest/manifest-builder.ts +115 -5
  186. package/src/lib/manifest/manifest-function.ts +44 -4
  187. package/src/lib/manifest/rule.ts +60 -1
  188. package/src/lib/manifest/sdui-page.ts +37 -2
  189. package/src/lib/manifest/validation.ts +48 -1
  190. package/src/lib/sdui/actions.ts +23 -10
  191. package/src/lib/sdui/component.ts +84 -44
  192. package/src/lib/sdui/components.ts +1627 -212
  193. package/src/lib/sdui/directives.ts +4 -1
  194. package/src/lib/sdui/index.ts +565 -200
  195. package/src/lib/sdui/propTypes.ts +8470 -0
  196. package/src/lib/sdui/render.ts +13 -5
  197. package/src/lib/sdui/state.ts +8 -2
  198. package/src/version.ts +1 -1
  199. package/version.d.mts +1 -1
  200. package/version.d.ts +1 -1
  201. package/version.js +1 -1
  202. package/version.mjs +1 -1
@@ -1,3 +1,4 @@
1
+ import { ExistingManifestContext, type ExistingManifestSource } from "./existing-manifest-context.js";
1
2
  /**
2
3
  * Any object that can be included in a manifest.
3
4
  *
@@ -7,6 +8,25 @@
7
8
  export interface ManifestComponent {
8
9
  toDict(): Record<string, any>;
9
10
  }
11
+ /**
12
+ * Wire-level component types supported by the manifest builder.
13
+ */
14
+ export type ManifestComponentType = 'CUSTOM_APP' | 'CUSTOM_CATEGORY' | 'CUSTOM_OBJECT' | 'CUSTOM_OBJECT_FIELD' | 'CUSTOM_OBJECT_FIELD_SECTION' | 'CUSTOM_OBJECT_LIST_VIEW' | 'CUSTOM_OBJECT_PAGE_LAYOUT' | 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW' | 'CUSTOM_OBJECT_VALIDATION_RULE' | 'FUNCTION' | 'SDUI_PAGE';
15
+ /**
16
+ * Static side of a manifest component class.
17
+ */
18
+ export interface ManifestComponentClass<TIdentifierInput = unknown> {
19
+ readonly componentType: ManifestComponentType;
20
+ toDeletionIdentifier(identifier: TIdentifierInput): ManifestComponentDeletion;
21
+ new (...args: any[]): ManifestComponent;
22
+ }
23
+ /**
24
+ * A manifest component reference that should be deleted during install.
25
+ */
26
+ export interface ManifestComponentDeletion extends Record<string, any> {
27
+ /** Wire-level component type, e.g. `'CUSTOM_OBJECT'` or `'CUSTOM_OBJECT_FIELD'`. */
28
+ type: ManifestComponentType;
29
+ }
10
30
  /**
11
31
  * A scope — anything that can accept child component registrations.
12
32
  *
@@ -41,6 +61,14 @@ export interface ManifestBuilderProps {
41
61
  */
42
62
  description?: string;
43
63
  }
64
+ /**
65
+ * Plain object returned by {@link ManifestBuilder.buildManifest}.
66
+ */
67
+ export interface BuiltManifest {
68
+ metadata: Record<string, any>;
69
+ components: Record<string, any>[];
70
+ components_to_delete?: ManifestComponentDeletion[];
71
+ }
44
72
  /**
45
73
  * Root container for a manifest — collects all components and serializes them to JSON.
46
74
  *
@@ -60,7 +88,7 @@ export interface ManifestBuilderProps {
60
88
  * description: 'Members, trainers, schedules, and check-in',
61
89
  * });
62
90
  *
63
- * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym' });
91
+ * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym', description: 'Gym domain' });
64
92
  * const memberObj = new CustomObject(manifest, { apiName: 'gym_member__c', name: 'Member', category });
65
93
  * // ... define fields, rules, list views, etc. ...
66
94
  *
@@ -72,31 +100,56 @@ export declare class ManifestBuilder implements ManifestScope {
72
100
  readonly name: string;
73
101
  readonly description: string;
74
102
  private readonly _components;
103
+ private readonly _componentsToDelete;
75
104
  /**
76
105
  * @param props - Initialization properties.
77
106
  * @throws {Error} If `props.key` is empty or missing.
78
107
  */
79
108
  constructor(props: ManifestBuilderProps);
109
+ /**
110
+ * Parses an existing manifest JSON blob, installs it as the active load context,
111
+ * hydrates every known component, and returns a normal `ManifestBuilder`.
112
+ */
113
+ static loadFromExistingJson(source: ExistingManifestSource): ManifestBuilder;
114
+ /**
115
+ * Parses an existing manifest JSON blob and installs it as the active lazy-load context.
116
+ *
117
+ * After calling this, individual components can be loaded with
118
+ * `CustomObjectPageLayout.loadFromExisting(...)`, `Field.loadFromExisting(...)`, etc.
119
+ */
120
+ static useExistingJson(source: ExistingManifestSource): ExistingManifestContext;
80
121
  /**
81
122
  * @internal Scope hook invoked by child constructors. Components enter the
82
123
  * manifest here — there is no other path.
83
124
  */
84
125
  _register(component: ManifestComponent): void;
85
126
  /**
86
- * Returns the manifest as a plain object with `metadata` and a flat `components` array.
127
+ * Marks a component to be deleted when this manifest is installed.
87
128
  *
88
- * @returns `{ metadata: { key, name, description? }, components: Record<string, any>[] }`
129
+ * @param componentClass - Component class, e.g. `CustomObject`.
130
+ * @param identifier - Component identifier/key, such as an api_name or the component's identifier object.
131
+ * @returns This builder for chaining.
89
132
  */
90
- buildManifest(): {
91
- metadata: Record<string, any>;
92
- components: Record<string, any>[];
93
- };
133
+ markComponentForDeletion<TIdentifierInput>(componentClass: ManifestComponentClass<TIdentifierInput>, identifier: TIdentifierInput): this;
134
+ /**
135
+ * Returns the manifest as a plain object with `metadata`, a flat `components` array,
136
+ * and a `components_to_delete` array when deletions are registered.
137
+ *
138
+ * @returns `{ metadata: { key, name, description? }, components, components_to_delete? }`
139
+ */
140
+ buildManifest(): BuiltManifest;
94
141
  /**
95
142
  * Returns the flat list of all registered component dicts.
96
143
  *
97
144
  * @returns An array of wire-format component objects, in registration order.
98
145
  */
99
146
  componentsList(): Record<string, any>[];
147
+ /**
148
+ * Returns the flat list of component deletion references.
149
+ *
150
+ * @returns An array of component identifier objects, in registration order.
151
+ */
152
+ componentsToDeleteList(): ManifestComponentDeletion[];
100
153
  /**
101
154
  * Returns the full manifest as a pretty-printed JSON string.
102
155
  *
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-builder.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,IAAI,CAA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sBAAsB,GAAG,eAAe;IAI5E;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,sBAAsB,GAAG,uBAAuB;IAI/E;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAO7C;;;;;;OAMG;IACH,wBAAwB,CAAC,gBAAgB,EACvC,cAAc,EAAE,sBAAsB,CAAC,gBAAgB,CAAC,EACxD,UAAU,EAAE,gBAAgB,GAC3B,IAAI;IAuBP;;;;;OAKG;IACH,aAAa,IAAI,aAAa;IAgB9B;;;;OAIG;IACH,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;IAIvC;;;;OAIG;IACH,sBAAsB,IAAI,yBAAyB,EAAE;IAIrD;;;;;;;OAOG;IACH,OAAO,IAAI,MAAM;CAGlB"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ManifestBuilder = void 0;
4
+ const existing_manifest_context_1 = require("./existing-manifest-context.js");
4
5
  /**
5
6
  * Root container for a manifest — collects all components and serializes them to JSON.
6
7
  *
@@ -20,7 +21,7 @@ exports.ManifestBuilder = void 0;
20
21
  * description: 'Members, trainers, schedules, and check-in',
21
22
  * });
22
23
  *
23
- * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym' });
24
+ * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym', description: 'Gym domain' });
24
25
  * const memberObj = new CustomObject(manifest, { apiName: 'gym_member__c', name: 'Member', category });
25
26
  * // ... define fields, rules, list views, etc. ...
26
27
  *
@@ -34,6 +35,7 @@ class ManifestBuilder {
34
35
  */
35
36
  constructor(props) {
36
37
  this._components = [];
38
+ this._componentsToDelete = [];
37
39
  if (!props.key) {
38
40
  throw new Error('key is required');
39
41
  }
@@ -41,6 +43,22 @@ class ManifestBuilder {
41
43
  this.name = props.name || props.key;
42
44
  this.description = props.description ?? '';
43
45
  }
46
+ /**
47
+ * Parses an existing manifest JSON blob, installs it as the active load context,
48
+ * hydrates every known component, and returns a normal `ManifestBuilder`.
49
+ */
50
+ static loadFromExistingJson(source) {
51
+ return existing_manifest_context_1.ExistingManifestContext.fromJson(source).loadManifestBuilder();
52
+ }
53
+ /**
54
+ * Parses an existing manifest JSON blob and installs it as the active lazy-load context.
55
+ *
56
+ * After calling this, individual components can be loaded with
57
+ * `CustomObjectPageLayout.loadFromExisting(...)`, `Field.loadFromExisting(...)`, etc.
58
+ */
59
+ static useExistingJson(source) {
60
+ return existing_manifest_context_1.ExistingManifestContext.fromJson(source);
61
+ }
44
62
  /**
45
63
  * @internal Scope hook invoked by child constructors. Components enter the
46
64
  * manifest here — there is no other path.
@@ -52,9 +70,37 @@ class ManifestBuilder {
52
70
  this._components.push(component);
53
71
  }
54
72
  /**
55
- * Returns the manifest as a plain object with `metadata` and a flat `components` array.
73
+ * Marks a component to be deleted when this manifest is installed.
56
74
  *
57
- * @returns `{ metadata: { key, name, description? }, components: Record<string, any>[] }`
75
+ * @param componentClass - Component class, e.g. `CustomObject`.
76
+ * @param identifier - Component identifier/key, such as an api_name or the component's identifier object.
77
+ * @returns This builder for chaining.
78
+ */
79
+ markComponentForDeletion(componentClass, identifier) {
80
+ if (identifier == null || identifier === '') {
81
+ throw new Error('identifier is required');
82
+ }
83
+ if (!componentClass.componentType) {
84
+ throw new Error('type is required');
85
+ }
86
+ if (typeof componentClass.toDeletionIdentifier !== 'function') {
87
+ throw new TypeError('Component class must have a toDeletionIdentifier() method');
88
+ }
89
+ const deletion = componentClass.toDeletionIdentifier(identifier);
90
+ if (!deletion.type) {
91
+ throw new Error('type is required');
92
+ }
93
+ if (Object.keys(deletion).length <= 1) {
94
+ throw new Error('identifier is required');
95
+ }
96
+ this._componentsToDelete.push({ ...deletion });
97
+ return this;
98
+ }
99
+ /**
100
+ * Returns the manifest as a plain object with `metadata`, a flat `components` array,
101
+ * and a `components_to_delete` array when deletions are registered.
102
+ *
103
+ * @returns `{ metadata: { key, name, description? }, components, components_to_delete? }`
58
104
  */
59
105
  buildManifest() {
60
106
  const metadata = {
@@ -65,7 +111,11 @@ class ManifestBuilder {
65
111
  metadata['description'] = this.description;
66
112
  }
67
113
  const components = this._components.map((c) => c.toDict());
68
- return { metadata, components };
114
+ const manifest = { metadata, components };
115
+ if (this._componentsToDelete.length > 0) {
116
+ manifest.components_to_delete = this.componentsToDeleteList();
117
+ }
118
+ return manifest;
69
119
  }
70
120
  /**
71
121
  * Returns the flat list of all registered component dicts.
@@ -75,6 +125,14 @@ class ManifestBuilder {
75
125
  componentsList() {
76
126
  return this._components.map((c) => c.toDict());
77
127
  }
128
+ /**
129
+ * Returns the flat list of component deletion references.
130
+ *
131
+ * @returns An array of component identifier objects, in registration order.
132
+ */
133
+ componentsToDeleteList() {
134
+ return this._componentsToDelete.map((component) => ({ ...component }));
135
+ }
78
136
  /**
79
137
  * Returns the full manifest as a pretty-printed JSON string.
80
138
  *
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-builder.js","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":";;;AA8CA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAa,eAAe;IAM1B;;;OAGG;IACH,YAAY,KAA2B;QANtB,gBAAW,GAAwB,EAAE,CAAC;QAOrD,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,SAA4B;QACpC,IAAI,OAAO,SAAS,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YAC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E,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACF;AArID,0CAqIC"}
@@ -1,3 +1,4 @@
1
+ import { ExistingManifestContext } from "./existing-manifest-context.mjs";
1
2
  /**
2
3
  * Root container for a manifest — collects all components and serializes them to JSON.
3
4
  *
@@ -17,7 +18,7 @@
17
18
  * description: 'Members, trainers, schedules, and check-in',
18
19
  * });
19
20
  *
20
- * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym' });
21
+ * const category = new Category(manifest, { apiName: 'gym__c', name: 'Gym', description: 'Gym domain' });
21
22
  * const memberObj = new CustomObject(manifest, { apiName: 'gym_member__c', name: 'Member', category });
22
23
  * // ... define fields, rules, list views, etc. ...
23
24
  *
@@ -31,6 +32,7 @@ export class ManifestBuilder {
31
32
  */
32
33
  constructor(props) {
33
34
  this._components = [];
35
+ this._componentsToDelete = [];
34
36
  if (!props.key) {
35
37
  throw new Error('key is required');
36
38
  }
@@ -38,6 +40,22 @@ export class ManifestBuilder {
38
40
  this.name = props.name || props.key;
39
41
  this.description = props.description ?? '';
40
42
  }
43
+ /**
44
+ * Parses an existing manifest JSON blob, installs it as the active load context,
45
+ * hydrates every known component, and returns a normal `ManifestBuilder`.
46
+ */
47
+ static loadFromExistingJson(source) {
48
+ return ExistingManifestContext.fromJson(source).loadManifestBuilder();
49
+ }
50
+ /**
51
+ * Parses an existing manifest JSON blob and installs it as the active lazy-load context.
52
+ *
53
+ * After calling this, individual components can be loaded with
54
+ * `CustomObjectPageLayout.loadFromExisting(...)`, `Field.loadFromExisting(...)`, etc.
55
+ */
56
+ static useExistingJson(source) {
57
+ return ExistingManifestContext.fromJson(source);
58
+ }
41
59
  /**
42
60
  * @internal Scope hook invoked by child constructors. Components enter the
43
61
  * manifest here — there is no other path.
@@ -49,9 +67,37 @@ export class ManifestBuilder {
49
67
  this._components.push(component);
50
68
  }
51
69
  /**
52
- * Returns the manifest as a plain object with `metadata` and a flat `components` array.
70
+ * Marks a component to be deleted when this manifest is installed.
53
71
  *
54
- * @returns `{ metadata: { key, name, description? }, components: Record<string, any>[] }`
72
+ * @param componentClass - Component class, e.g. `CustomObject`.
73
+ * @param identifier - Component identifier/key, such as an api_name or the component's identifier object.
74
+ * @returns This builder for chaining.
75
+ */
76
+ markComponentForDeletion(componentClass, identifier) {
77
+ if (identifier == null || identifier === '') {
78
+ throw new Error('identifier is required');
79
+ }
80
+ if (!componentClass.componentType) {
81
+ throw new Error('type is required');
82
+ }
83
+ if (typeof componentClass.toDeletionIdentifier !== 'function') {
84
+ throw new TypeError('Component class must have a toDeletionIdentifier() method');
85
+ }
86
+ const deletion = componentClass.toDeletionIdentifier(identifier);
87
+ if (!deletion.type) {
88
+ throw new Error('type is required');
89
+ }
90
+ if (Object.keys(deletion).length <= 1) {
91
+ throw new Error('identifier is required');
92
+ }
93
+ this._componentsToDelete.push({ ...deletion });
94
+ return this;
95
+ }
96
+ /**
97
+ * Returns the manifest as a plain object with `metadata`, a flat `components` array,
98
+ * and a `components_to_delete` array when deletions are registered.
99
+ *
100
+ * @returns `{ metadata: { key, name, description? }, components, components_to_delete? }`
55
101
  */
56
102
  buildManifest() {
57
103
  const metadata = {
@@ -62,7 +108,11 @@ export class ManifestBuilder {
62
108
  metadata['description'] = this.description;
63
109
  }
64
110
  const components = this._components.map((c) => c.toDict());
65
- return { metadata, components };
111
+ const manifest = { metadata, components };
112
+ if (this._componentsToDelete.length > 0) {
113
+ manifest.components_to_delete = this.componentsToDeleteList();
114
+ }
115
+ return manifest;
66
116
  }
67
117
  /**
68
118
  * Returns the flat list of all registered component dicts.
@@ -72,6 +122,14 @@ export class ManifestBuilder {
72
122
  componentsList() {
73
123
  return this._components.map((c) => c.toDict());
74
124
  }
125
+ /**
126
+ * Returns the flat list of component deletion references.
127
+ *
128
+ * @returns An array of component identifier objects, in registration order.
129
+ */
130
+ componentsToDeleteList() {
131
+ return this._componentsToDelete.map((component) => ({ ...component }));
132
+ }
75
133
  /**
76
134
  * Returns the full manifest as a pretty-printed JSON string.
77
135
  *
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-builder.mjs","sourceRoot":"","sources":["../../src/lib/manifest/manifest-builder.ts"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,eAAe;IAM1B;;;OAGG;IACH,YAAY,KAA2B;QANtB,gBAAW,GAAwB,EAAE,CAAC;QAOrD,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,SAA4B;QACpC,IAAI,OAAO,SAAS,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YAC3C,MAAM,IAAI,SAAS,CAAC,uCAAuC,CAAC,CAAC;QAC/D,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;IAED;;;;OAIG;IACH,aAAa;QACX,MAAM,QAAQ,GAAwB;YACpC,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QACF,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,QAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC7C,CAAC;QACD,MAAM,UAAU,G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MAAM,QAAQ,GAAwB;YACpC,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QACF,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,QAAQ,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;QAC7C,CAAC;QACD,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3D,MAAM,QAAQ,GAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;QACzD,IAAI,IAAI,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxC,QAAQ,CAAC,oBAAoB,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAChE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;OAIG;IACH,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;OAOG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC;CACF"}
@@ -1,5 +1,6 @@
1
1
  import type { FunctionRuntime } from "./_helpers.mjs";
2
- import type { ManifestScope } from "./manifest-builder.mjs";
2
+ import { type ExistingManifestContextOptions } from "./existing-manifest-context.mjs";
3
+ import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.mjs";
3
4
  /**
4
5
  * Initialization properties for {@link ManifestFunction}.
5
6
  */
@@ -66,8 +67,14 @@ export interface ManifestFunctionProps {
66
67
  * Defines a serverless function and registers it with the manifest.
67
68
  *
68
69
  * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
69
- * serverless infrastructure. Functions are the backing implementation for
70
- * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
70
+ * serverless infrastructure. The handler must export `onRipplingEvent`.
71
+ *
72
+ * Functions have two primary uses:
73
+ * 1. **Authoring SDUI for Custom Apps** — the function returns an SDUI spec
74
+ * (built with `@rippling/sdui-builder`) that renders as a page tab. Wrap the
75
+ * function in an {@link SduiPage} and reference it from an {@link App}.
76
+ * 2. **Workflow / event handlers** — functions invoked from rules, automations,
77
+ * or callbacks that do not render UI.
71
78
  *
72
79
  * This class is named `ManifestFunction` to avoid collision with the JavaScript
73
80
  * built-in `Function`. It is also re-exported as `Function` from the barrel for
@@ -92,6 +99,8 @@ export interface ManifestFunctionProps {
92
99
  * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
93
100
  */
94
101
  export declare class ManifestFunction {
102
+ static readonly componentType: "FUNCTION";
103
+ static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
95
104
  private readonly _apiName;
96
105
  private readonly _name;
97
106
  private readonly _code;
@@ -105,6 +114,12 @@ export declare class ManifestFunction {
105
114
  * @param props - Initialization properties.
106
115
  */
107
116
  constructor(scope: ManifestScope, props: ManifestFunctionProps);
117
+ /**
118
+ * Loads this function from the active existing-manifest JSON context.
119
+ */
120
+ static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): ManifestFunction;
121
+ /** @internal Hydrates a function from existing manifest wire JSON. */
122
+ static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): ManifestFunction;
108
123
  /**
109
124
  * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
110
125
  */
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-function.d.mts","sourceRoot":"","s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CAAC,kBAAkB,CAAkC;IACrE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAuB;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB;IAe9D;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,8BAAmC,GAAG,gBAAgB;IAIxG,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB;IAgBrG;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -1,5 +1,6 @@
1
1
  import type { FunctionRuntime } from "./_helpers.js";
2
- import type { ManifestScope } from "./manifest-builder.js";
2
+ import { type ExistingManifestContextOptions } from "./existing-manifest-context.js";
3
+ import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.js";
3
4
  /**
4
5
  * Initialization properties for {@link ManifestFunction}.
5
6
  */
@@ -66,8 +67,14 @@ export interface ManifestFunctionProps {
66
67
  * Defines a serverless function and registers it with the manifest.
67
68
  *
68
69
  * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
69
- * serverless infrastructure. Functions are the backing implementation for
70
- * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
70
+ * serverless infrastructure. The handler must export `onRipplingEvent`.
71
+ *
72
+ * Functions have two primary uses:
73
+ * 1. **Authoring SDUI for Custom Apps** — the function returns an SDUI spec
74
+ * (built with `@rippling/sdui-builder`) that renders as a page tab. Wrap the
75
+ * function in an {@link SduiPage} and reference it from an {@link App}.
76
+ * 2. **Workflow / event handlers** — functions invoked from rules, automations,
77
+ * or callbacks that do not render UI.
71
78
  *
72
79
  * This class is named `ManifestFunction` to avoid collision with the JavaScript
73
80
  * built-in `Function`. It is also re-exported as `Function` from the barrel for
@@ -92,6 +99,8 @@ export interface ManifestFunctionProps {
92
99
  * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
93
100
  */
94
101
  export declare class ManifestFunction {
102
+ static readonly componentType: "FUNCTION";
103
+ static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
95
104
  private readonly _apiName;
96
105
  private readonly _name;
97
106
  private readonly _code;
@@ -105,6 +114,12 @@ export declare class ManifestFunction {
105
114
  * @param props - Initialization properties.
106
115
  */
107
116
  constructor(scope: ManifestScope, props: ManifestFunctionProps);
117
+ /**
118
+ * Loads this function from the active existing-manifest JSON context.
119
+ */
120
+ static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): ManifestFunction;
121
+ /** @internal Hydrates a function from existing manifest wire JSON. */
122
+ static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): ManifestFunction;
108
123
  /**
109
124
  * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
110
125
  */
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-function.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,eAAe,EAAE;OACxB,KAAK,EAAE,aAAa,EAAE;AAE7B;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,E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"}
@@ -1,12 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ManifestFunction = void 0;
4
+ const existing_manifest_context_1 = require("./existing-manifest-context.js");
4
5
  /**
5
6
  * Defines a serverless function and registers it with the manifest.
6
7
  *
7
8
  * A `ManifestFunction` packages TypeScript handler code that runs on Rippling's
8
- * serverless infrastructure. Functions are the backing implementation for
9
- * {@link SduiPage} surfaces. The handler must export `onRipplingEvent`.
9
+ * serverless infrastructure. The handler must export `onRipplingEvent`.
10
+ *
11
+ * Functions have two primary uses:
12
+ * 1. **Authoring SDUI for Custom Apps** — the function returns an SDUI spec
13
+ * (built with `@rippling/sdui-builder`) that renders as a page tab. Wrap the
14
+ * function in an {@link SduiPage} and reference it from an {@link App}.
15
+ * 2. **Workflow / event handlers** — functions invoked from rules, automations,
16
+ * or callbacks that do not render UI.
10
17
  *
11
18
  * This class is named `ManifestFunction` to avoid collision with the JavaScript
12
19
  * built-in `Function`. It is also re-exported as `Function` from the barrel for
@@ -31,6 +38,12 @@ exports.ManifestFunction = void 0;
31
38
  * @see {@link SduiPage} — wraps a `ManifestFunction` as a navigable UI surface.
32
39
  */
33
40
  class ManifestFunction {
41
+ static toDeletionIdentifier(apiName) {
42
+ return {
43
+ type: ManifestFunction.componentType,
44
+ api_name: apiName,
45
+ };
46
+ }
34
47
  /**
35
48
  * @param scope - The manifest to register this function with.
36
49
  * @param props - Initialization properties.
@@ -49,6 +62,33 @@ class ManifestFunction {
49
62
  this._isAsync = props.isAsync ?? false;
50
63
  scope._register(this);
51
64
  }
65
+ /**
66
+ * Loads this function from the active existing-manifest JSON context.
67
+ */
68
+ static loadFromExisting(apiName, options = {}) {
69
+ return (0, existing_manifest_context_1.getExistingManifestContext)(options).loadFunction(apiName);
70
+ }
71
+ /** @internal Hydrates a function from existing manifest wire JSON. */
72
+ static _fromExistingComponent(scope, component) {
73
+ const props = {
74
+ apiName: component['api_name'],
75
+ name: component['name'] ?? component['api_name'],
76
+ };
77
+ if (component['code_draft'] !== undefined)
78
+ props.code = component['code_draft'];
79
+ if (component['description'] !== undefined)
80
+ props.description = component['description'];
81
+ if (component['dependencies'] !== undefined)
82
+ props.dependencies = component['dependencies'];
83
+ if (component['deployment_options'] !== undefined) {
84
+ props.deploymentOptions = component['deployment_options'];
85
+ }
86
+ if (component['allowed_domains'] !== undefined)
87
+ props.allowedDomains = component['allowed_domains'];
88
+ if (component['is_async'] !== undefined)
89
+ props.isAsync = component['is_async'];
90
+ return new ManifestFunction(scope, props);
91
+ }
52
92
  /**
53
93
  * Returns the api_name of this function (e.g. `'gym_today_schedule_fn'`).
54
94
  */
@@ -62,7 +102,7 @@ class ManifestFunction {
62
102
  */
63
103
  toDict() {
64
104
  const component = {
65
- type: 'FUNCTION',
105
+ type: ManifestFunction.componentType,
66
106
  name: this._name,
67
107
  api_name: this._apiName,
68
108
  };
@@ -82,4 +122,5 @@ class ManifestFunction {
82
122
  }
83
123
  }
84
124
  exports.ManifestFunction = ManifestFunction;
125
+ ManifestFunction.componentType = 'FUNCTION';
85
126
  //# sourceMappingURL=manifest-function.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-function.js","sourceRoot":"","sources":["../../src/lib/manifest/manifest-function.ts"],"names":[],"mappings":";;;AAkEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAa,gBAAgB;IAU3B;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAA4B;QAC5D,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC;QAC9B,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,IAAI,EAAE,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,kBAAkB,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