@rippling/rippling-sdk 0.2.0-alpha.38 → 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.
- package/lib/manifest/app.d.mts +11 -1
- package/lib/manifest/app.d.mts.map +1 -1
- package/lib/manifest/app.d.ts +11 -1
- package/lib/manifest/app.d.ts.map +1 -1
- package/lib/manifest/app.js +42 -1
- package/lib/manifest/app.js.map +1 -1
- package/lib/manifest/app.mjs +42 -1
- package/lib/manifest/app.mjs.map +1 -1
- package/lib/manifest/category.d.mts +10 -1
- package/lib/manifest/category.d.mts.map +1 -1
- package/lib/manifest/category.d.ts +10 -1
- package/lib/manifest/category.d.ts.map +1 -1
- package/lib/manifest/category.js +23 -1
- package/lib/manifest/category.js.map +1 -1
- package/lib/manifest/category.mjs +23 -1
- package/lib/manifest/category.mjs.map +1 -1
- package/lib/manifest/custom-object-field-section.d.mts +13 -0
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
- package/lib/manifest/custom-object-field-section.d.ts +13 -0
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
- package/lib/manifest/custom-object-field-section.js +22 -1
- package/lib/manifest/custom-object-field-section.js.map +1 -1
- package/lib/manifest/custom-object-field-section.mjs +22 -1
- package/lib/manifest/custom-object-field-section.mjs.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.mts +21 -0
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts +21 -0
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.js +41 -1
- package/lib/manifest/custom-object-page-layout.js.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs +41 -1
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
- package/lib/manifest/custom-object.d.mts +11 -1
- package/lib/manifest/custom-object.d.mts.map +1 -1
- package/lib/manifest/custom-object.d.ts +11 -1
- package/lib/manifest/custom-object.d.ts.map +1 -1
- package/lib/manifest/custom-object.js +55 -2
- package/lib/manifest/custom-object.js.map +1 -1
- package/lib/manifest/custom-object.mjs +55 -2
- package/lib/manifest/custom-object.mjs.map +1 -1
- package/lib/manifest/existing-manifest-context.d.mts +87 -0
- package/lib/manifest/existing-manifest-context.d.mts.map +1 -0
- package/lib/manifest/existing-manifest-context.d.ts +87 -0
- package/lib/manifest/existing-manifest-context.d.ts.map +1 -0
- package/lib/manifest/existing-manifest-context.js +511 -0
- package/lib/manifest/existing-manifest-context.js.map +1 -0
- package/lib/manifest/existing-manifest-context.mjs +506 -0
- package/lib/manifest/existing-manifest-context.mjs.map +1 -0
- package/lib/manifest/field.d.mts +24 -0
- package/lib/manifest/field.d.mts.map +1 -1
- package/lib/manifest/field.d.ts +24 -0
- package/lib/manifest/field.d.ts.map +1 -1
- package/lib/manifest/field.js +114 -1
- package/lib/manifest/field.js.map +1 -1
- package/lib/manifest/field.mjs +114 -1
- package/lib/manifest/field.mjs.map +1 -1
- package/lib/manifest/index.d.mts +8 -7
- package/lib/manifest/index.d.mts.map +1 -1
- package/lib/manifest/index.d.ts +8 -7
- package/lib/manifest/index.d.ts.map +1 -1
- package/lib/manifest/index.js +3 -1
- package/lib/manifest/index.js.map +1 -1
- package/lib/manifest/index.mjs +5 -4
- package/lib/manifest/index.mjs.map +1 -1
- package/lib/manifest/list-view.d.mts +17 -0
- package/lib/manifest/list-view.d.mts.map +1 -1
- package/lib/manifest/list-view.d.ts +17 -0
- package/lib/manifest/list-view.d.ts.map +1 -1
- package/lib/manifest/list-view.js +38 -1
- package/lib/manifest/list-view.js.map +1 -1
- package/lib/manifest/list-view.mjs +38 -1
- package/lib/manifest/list-view.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +59 -6
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +59 -6
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js +61 -3
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs +61 -3
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +10 -1
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +10 -1
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +36 -1
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +36 -1
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/lib/manifest/rule.d.mts +17 -0
- package/lib/manifest/rule.d.mts.map +1 -1
- package/lib/manifest/rule.d.ts +17 -0
- package/lib/manifest/rule.d.ts.map +1 -1
- package/lib/manifest/rule.js +45 -1
- package/lib/manifest/rule.js.map +1 -1
- package/lib/manifest/rule.mjs +45 -1
- package/lib/manifest/rule.mjs.map +1 -1
- package/lib/manifest/sdui-page.d.mts +10 -1
- package/lib/manifest/sdui-page.d.mts.map +1 -1
- package/lib/manifest/sdui-page.d.ts +10 -1
- package/lib/manifest/sdui-page.d.ts.map +1 -1
- package/lib/manifest/sdui-page.js +28 -1
- package/lib/manifest/sdui-page.js.map +1 -1
- package/lib/manifest/sdui-page.mjs +28 -1
- package/lib/manifest/sdui-page.mjs.map +1 -1
- package/lib/manifest/validation.d.mts +17 -0
- package/lib/manifest/validation.d.mts.map +1 -1
- package/lib/manifest/validation.d.ts +17 -0
- package/lib/manifest/validation.d.ts.map +1 -1
- package/lib/manifest/validation.js +31 -1
- package/lib/manifest/validation.js.map +1 -1
- package/lib/manifest/validation.mjs +31 -1
- package/lib/manifest/validation.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/manifest/app.ts +46 -2
- package/src/lib/manifest/category.ts +28 -2
- package/src/lib/manifest/custom-object-field-section.ts +37 -1
- package/src/lib/manifest/custom-object-page-layout.ts +61 -1
- package/src/lib/manifest/custom-object.ts +58 -3
- package/src/lib/manifest/existing-manifest-context.ts +673 -0
- package/src/lib/manifest/field.ts +140 -1
- package/src/lib/manifest/index.ts +39 -4
- package/src/lib/manifest/list-view.ts +50 -1
- package/src/lib/manifest/manifest-builder.ts +114 -4
- package/src/lib/manifest/manifest-function.ts +36 -2
- package/src/lib/manifest/rule.ts +60 -1
- package/src/lib/manifest/sdui-page.ts +37 -2
- package/src/lib/manifest/validation.ts +48 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/lib/manifest/app.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CustomObject } from "./custom-object.mjs";
|
|
2
|
-
import type
|
|
2
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.mjs";
|
|
3
|
+
import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.mjs";
|
|
3
4
|
import { SduiPage } from "./sdui-page.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* A single page entry in an {@link App}.
|
|
@@ -83,6 +84,8 @@ export interface AppProps {
|
|
|
83
84
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
84
85
|
*/
|
|
85
86
|
export declare class App {
|
|
87
|
+
static readonly componentType: "CUSTOM_APP";
|
|
88
|
+
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
86
89
|
private readonly _apiName;
|
|
87
90
|
private readonly _name;
|
|
88
91
|
private readonly _description;
|
|
@@ -95,6 +98,13 @@ export declare class App {
|
|
|
95
98
|
* @param props - Initialization properties.
|
|
96
99
|
*/
|
|
97
100
|
constructor(scope: ManifestScope, props: AppProps);
|
|
101
|
+
/**
|
|
102
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
103
|
+
*/
|
|
104
|
+
static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): App;
|
|
105
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
106
|
+
static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): App;
|
|
107
|
+
private static appIconFromExistingComponent;
|
|
98
108
|
/**
|
|
99
109
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
100
110
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,KAAK,EAAE,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"app.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE;OACjD,EAAE,QAAQ,EAAE;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;CACnB;AAyBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,GAAG;IACd,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAG,YAAY,CAAU;IAEtD,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,yBAAyB;IAOvE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,2DAA2D;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwB;IAE/C;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ;IAUjD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,8BAAmC,GAAG,GAAG;IAI3F,kEAAkE;IAClE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG;IAcxF,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAO3C;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
|
package/lib/manifest/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CustomObject } from "./custom-object.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.js";
|
|
3
|
+
import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.js";
|
|
3
4
|
import { SduiPage } from "./sdui-page.js";
|
|
4
5
|
/**
|
|
5
6
|
* A single page entry in an {@link App}.
|
|
@@ -83,6 +84,8 @@ export interface AppProps {
|
|
|
83
84
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
84
85
|
*/
|
|
85
86
|
export declare class App {
|
|
87
|
+
static readonly componentType: "CUSTOM_APP";
|
|
88
|
+
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
86
89
|
private readonly _apiName;
|
|
87
90
|
private readonly _name;
|
|
88
91
|
private readonly _description;
|
|
@@ -95,6 +98,13 @@ export declare class App {
|
|
|
95
98
|
* @param props - Initialization properties.
|
|
96
99
|
*/
|
|
97
100
|
constructor(scope: ManifestScope, props: AppProps);
|
|
101
|
+
/**
|
|
102
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
103
|
+
*/
|
|
104
|
+
static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): App;
|
|
105
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
106
|
+
static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): App;
|
|
107
|
+
private static appIconFromExistingComponent;
|
|
98
108
|
/**
|
|
99
109
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
100
110
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,KAAK,EAAE,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE;OACjD,EAAE,QAAQ,EAAE;AAEnB;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,WAAW,CA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});
|
|
3
3
|
exports.App = void 0;
|
|
4
4
|
const custom_object_1 = require("./custom-object.js");
|
|
5
|
+
const existing_manifest_context_1 = require("./existing-manifest-context.js");
|
|
5
6
|
function resolvePage(entry) {
|
|
6
7
|
if (entry instanceof custom_object_1.CustomObject) {
|
|
7
8
|
const apiName = entry.getApiName();
|
|
@@ -20,6 +21,11 @@ function resolvePage(entry) {
|
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
}
|
|
24
|
+
function cloneJson(value) {
|
|
25
|
+
if (value == null)
|
|
26
|
+
return value;
|
|
27
|
+
return JSON.parse(JSON.stringify(value));
|
|
28
|
+
}
|
|
23
29
|
/**
|
|
24
30
|
* Defines a Rippling app and registers it with the manifest.
|
|
25
31
|
*
|
|
@@ -43,6 +49,12 @@ function resolvePage(entry) {
|
|
|
43
49
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
44
50
|
*/
|
|
45
51
|
class App {
|
|
52
|
+
static toDeletionIdentifier(apiName) {
|
|
53
|
+
return {
|
|
54
|
+
type: App.componentType,
|
|
55
|
+
api_name: apiName,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
46
58
|
/**
|
|
47
59
|
* @param scope - The manifest to register this app with.
|
|
48
60
|
* @param props - Initialization properties.
|
|
@@ -56,6 +68,34 @@ class App {
|
|
|
56
68
|
this._pages = (props.pages ?? []).map(resolvePage);
|
|
57
69
|
scope._register(this);
|
|
58
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
73
|
+
*/
|
|
74
|
+
static loadFromExisting(apiName, options = {}) {
|
|
75
|
+
return (0, existing_manifest_context_1.getExistingManifestContext)(options).loadApp(apiName);
|
|
76
|
+
}
|
|
77
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
78
|
+
static _fromExistingComponent(scope, component) {
|
|
79
|
+
const app = Object.create(App.prototype);
|
|
80
|
+
Object.assign(app, {
|
|
81
|
+
_apiName: component['api_name'],
|
|
82
|
+
_name: component['name'] ?? component['api_name'],
|
|
83
|
+
_description: component['description'],
|
|
84
|
+
_appType: component['app_type'],
|
|
85
|
+
_icon: App.appIconFromExistingComponent(component['icon']),
|
|
86
|
+
_pages: cloneJson(component['pages'] ?? []),
|
|
87
|
+
});
|
|
88
|
+
scope._register(app);
|
|
89
|
+
return app;
|
|
90
|
+
}
|
|
91
|
+
static appIconFromExistingComponent(value) {
|
|
92
|
+
if (value == null || typeof value !== 'object')
|
|
93
|
+
return undefined;
|
|
94
|
+
const wire = value;
|
|
95
|
+
if (typeof wire['s3_bucket'] !== 'string' || typeof wire['s3_key'] !== 'string')
|
|
96
|
+
return undefined;
|
|
97
|
+
return { s3Bucket: wire['s3_bucket'], s3Key: wire['s3_key'] };
|
|
98
|
+
}
|
|
59
99
|
/**
|
|
60
100
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
61
101
|
*/
|
|
@@ -75,7 +115,7 @@ class App {
|
|
|
75
115
|
*/
|
|
76
116
|
toDict() {
|
|
77
117
|
const component = {
|
|
78
|
-
type:
|
|
118
|
+
type: App.componentType,
|
|
79
119
|
api_name: this._apiName,
|
|
80
120
|
name: this._name,
|
|
81
121
|
};
|
|
@@ -92,4 +132,5 @@ class App {
|
|
|
92
132
|
}
|
|
93
133
|
}
|
|
94
134
|
exports.App = App;
|
|
135
|
+
App.componentType = 'CUSTOM_APP';
|
|
95
136
|
//# sourceMappingURL=app.js.map
|
package/lib/manifest/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":";;;AAAA,sDAA+C;
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":";;;AAAA,sDAA+C;AAC/C,8EAA8G;AAkE9G,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,4BAAY,EAAE,CAAC;QAClC,MA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AQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,GAAG,CAAC,aAAa;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnF,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,OAAO,SAAS,CAAC;IACnB,CAAC;;AA7FH,kBA8FC;AA7FiB,iBAAa,GAAG,YAAqB,CAAC"}
|
package/lib/manifest/app.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CustomObject } from "./custom-object.mjs";
|
|
2
|
+
import { getExistingManifestContext } from "./existing-manifest-context.mjs";
|
|
2
3
|
function resolvePage(entry) {
|
|
3
4
|
if (entry instanceof CustomObject) {
|
|
4
5
|
const apiName = entry.getApiName();
|
|
@@ -17,6 +18,11 @@ function resolvePage(entry) {
|
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
}
|
|
21
|
+
function cloneJson(value) {
|
|
22
|
+
if (value == null)
|
|
23
|
+
return value;
|
|
24
|
+
return JSON.parse(JSON.stringify(value));
|
|
25
|
+
}
|
|
20
26
|
/**
|
|
21
27
|
* Defines a Rippling app and registers it with the manifest.
|
|
22
28
|
*
|
|
@@ -40,6 +46,12 @@ function resolvePage(entry) {
|
|
|
40
46
|
* @see {@link SduiPage} — SDUI surface tab source.
|
|
41
47
|
*/
|
|
42
48
|
export class App {
|
|
49
|
+
static toDeletionIdentifier(apiName) {
|
|
50
|
+
return {
|
|
51
|
+
type: App.componentType,
|
|
52
|
+
api_name: apiName,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
43
55
|
/**
|
|
44
56
|
* @param scope - The manifest to register this app with.
|
|
45
57
|
* @param props - Initialization properties.
|
|
@@ -53,6 +65,34 @@ export class App {
|
|
|
53
65
|
this._pages = (props.pages ?? []).map(resolvePage);
|
|
54
66
|
scope._register(this);
|
|
55
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Loads this app from the active existing-manifest JSON context.
|
|
70
|
+
*/
|
|
71
|
+
static loadFromExisting(apiName, options = {}) {
|
|
72
|
+
return getExistingManifestContext(options).loadApp(apiName);
|
|
73
|
+
}
|
|
74
|
+
/** @internal Hydrates an app from existing manifest wire JSON. */
|
|
75
|
+
static _fromExistingComponent(scope, component) {
|
|
76
|
+
const app = Object.create(App.prototype);
|
|
77
|
+
Object.assign(app, {
|
|
78
|
+
_apiName: component['api_name'],
|
|
79
|
+
_name: component['name'] ?? component['api_name'],
|
|
80
|
+
_description: component['description'],
|
|
81
|
+
_appType: component['app_type'],
|
|
82
|
+
_icon: App.appIconFromExistingComponent(component['icon']),
|
|
83
|
+
_pages: cloneJson(component['pages'] ?? []),
|
|
84
|
+
});
|
|
85
|
+
scope._register(app);
|
|
86
|
+
return app;
|
|
87
|
+
}
|
|
88
|
+
static appIconFromExistingComponent(value) {
|
|
89
|
+
if (value == null || typeof value !== 'object')
|
|
90
|
+
return undefined;
|
|
91
|
+
const wire = value;
|
|
92
|
+
if (typeof wire['s3_bucket'] !== 'string' || typeof wire['s3_key'] !== 'string')
|
|
93
|
+
return undefined;
|
|
94
|
+
return { s3Bucket: wire['s3_bucket'], s3Key: wire['s3_key'] };
|
|
95
|
+
}
|
|
56
96
|
/**
|
|
57
97
|
* Returns the api_name of this app (e.g. `'gym_membership_management_app'`).
|
|
58
98
|
*/
|
|
@@ -72,7 +112,7 @@ export class App {
|
|
|
72
112
|
*/
|
|
73
113
|
toDict() {
|
|
74
114
|
const component = {
|
|
75
|
-
type:
|
|
115
|
+
type: App.componentType,
|
|
76
116
|
api_name: this._apiName,
|
|
77
117
|
name: this._name,
|
|
78
118
|
};
|
|
@@ -88,4 +128,5 @@ export class App {
|
|
|
88
128
|
return component;
|
|
89
129
|
}
|
|
90
130
|
}
|
|
131
|
+
App.componentType = 'CUSTOM_APP';
|
|
91
132
|
//# sourceMappingURL=app.mjs.map
|
package/lib/manifest/app.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.mjs","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"app.mjs","sourceRoot":"","sources":["../../src/lib/manifest/app.ts"],"names":[],"mappings":"OAAO,EAAE,YAAY,EAAE;OAChB,EAAE,0BAA0B,EAAuC;AAkE1E,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,YAAY,YAAY,EAAE,CAAC;QAClC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QACnC,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,aAAa;YACxB,eAAe,EAAE,OAAO;SACzB,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,UAAU,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC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YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnF,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;YAAE,SAAS,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;QACjE,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QACpF,OAAO,SAAS,CAAC;IACnB,CAAC;;AA5Fe,iBAAa,GAAG,YAAqB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.mjs";
|
|
2
|
+
import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.mjs";
|
|
2
3
|
/**
|
|
3
4
|
* Initialization properties for {@link Category}.
|
|
4
5
|
*/
|
|
@@ -55,6 +56,8 @@ export interface CategoryProps {
|
|
|
55
56
|
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
56
57
|
*/
|
|
57
58
|
export declare class Category {
|
|
59
|
+
static readonly componentType: "CUSTOM_CATEGORY";
|
|
60
|
+
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
58
61
|
private readonly _apiName;
|
|
59
62
|
private readonly _name;
|
|
60
63
|
private readonly _description;
|
|
@@ -63,6 +66,12 @@ export declare class Category {
|
|
|
63
66
|
* @param props - Initialization properties.
|
|
64
67
|
*/
|
|
65
68
|
constructor(scope: ManifestScope, props: CategoryProps);
|
|
69
|
+
/**
|
|
70
|
+
* Loads this category from the active existing-manifest JSON context.
|
|
71
|
+
*/
|
|
72
|
+
static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): Category;
|
|
73
|
+
/** @internal Hydrates a category from existing manifest wire JSON. */
|
|
74
|
+
static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): Category;
|
|
66
75
|
/**
|
|
67
76
|
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
68
77
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"category.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE;AAExD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAG,iBAAiB,CAAU;IAE3D,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,yBAAyB;IAOvE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAOtD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,8BAAmC,GAAG,QAAQ;IAIhG,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,QAAQ;IAQ7F;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.js";
|
|
2
|
+
import type { ManifestComponentDeletion, ManifestScope } from "./manifest-builder.js";
|
|
2
3
|
/**
|
|
3
4
|
* Initialization properties for {@link Category}.
|
|
4
5
|
*/
|
|
@@ -55,6 +56,8 @@ export interface CategoryProps {
|
|
|
55
56
|
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
56
57
|
*/
|
|
57
58
|
export declare class Category {
|
|
59
|
+
static readonly componentType: "CUSTOM_CATEGORY";
|
|
60
|
+
static toDeletionIdentifier(apiName: string): ManifestComponentDeletion;
|
|
58
61
|
private readonly _apiName;
|
|
59
62
|
private readonly _name;
|
|
60
63
|
private readonly _description;
|
|
@@ -63,6 +66,12 @@ export declare class Category {
|
|
|
63
66
|
* @param props - Initialization properties.
|
|
64
67
|
*/
|
|
65
68
|
constructor(scope: ManifestScope, props: CategoryProps);
|
|
69
|
+
/**
|
|
70
|
+
* Loads this category from the active existing-manifest JSON context.
|
|
71
|
+
*/
|
|
72
|
+
static loadFromExisting(apiName: string, options?: ExistingManifestContextOptions): Category;
|
|
73
|
+
/** @internal Hydrates a category from existing manifest wire JSON. */
|
|
74
|
+
static _fromExistingComponent(scope: ManifestScope, component: Record<string, any>): Category;
|
|
66
75
|
/**
|
|
67
76
|
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
68
77
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,KAAK,EAAE,aAAa,EAAE;
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE;AAExD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAG,iBAAiB,CAAU;IAE3D,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,yBAAyB;IAOvE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC;;;OAGG;gBACS,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAOtD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,8BAAmC,GAAG,QAAQ;IAIhG,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,QAAQ;IAQ7F;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
package/lib/manifest/category.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Category = void 0;
|
|
4
|
+
const existing_manifest_context_1 = require("./existing-manifest-context.js");
|
|
4
5
|
/**
|
|
5
6
|
* Defines a category and registers it with the manifest.
|
|
6
7
|
*
|
|
@@ -32,6 +33,12 @@ exports.Category = void 0;
|
|
|
32
33
|
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
33
34
|
*/
|
|
34
35
|
class Category {
|
|
36
|
+
static toDeletionIdentifier(apiName) {
|
|
37
|
+
return {
|
|
38
|
+
type: Category.componentType,
|
|
39
|
+
api_name: apiName,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
35
42
|
/**
|
|
36
43
|
* @param scope - The manifest to register this category with.
|
|
37
44
|
* @param props - Initialization properties.
|
|
@@ -42,6 +49,20 @@ class Category {
|
|
|
42
49
|
this._description = props.description;
|
|
43
50
|
scope._register(this);
|
|
44
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* Loads this category from the active existing-manifest JSON context.
|
|
54
|
+
*/
|
|
55
|
+
static loadFromExisting(apiName, options = {}) {
|
|
56
|
+
return (0, existing_manifest_context_1.getExistingManifestContext)(options).loadCategory(apiName);
|
|
57
|
+
}
|
|
58
|
+
/** @internal Hydrates a category from existing manifest wire JSON. */
|
|
59
|
+
static _fromExistingComponent(scope, component) {
|
|
60
|
+
return new Category(scope, {
|
|
61
|
+
apiName: component['api_name'],
|
|
62
|
+
name: component['name'] ?? component['api_name'],
|
|
63
|
+
description: component['description'] ?? '',
|
|
64
|
+
});
|
|
65
|
+
}
|
|
45
66
|
/**
|
|
46
67
|
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
47
68
|
*/
|
|
@@ -61,7 +82,7 @@ class Category {
|
|
|
61
82
|
*/
|
|
62
83
|
toDict() {
|
|
63
84
|
return {
|
|
64
|
-
type:
|
|
85
|
+
type: Category.componentType,
|
|
65
86
|
api_name: this._apiName,
|
|
66
87
|
name: this._name,
|
|
67
88
|
description: this._description,
|
|
@@ -69,4 +90,5 @@ class Category {
|
|
|
69
90
|
}
|
|
70
91
|
}
|
|
71
92
|
exports.Category = Category;
|
|
93
|
+
Category.componentType = 'CUSTOM_CATEGORY';
|
|
72
94
|
//# sourceMappingURL=category.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"category.js","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":";;;AAAA,8EAA8G;AA6B9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAa,QAAQ;IAGnB,MAAM,CAAC,oBAAoB,CAAC,OAAe;QACzC,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,aAAa;YAC5B,QAAQ,EAAE,OAAO;SAClB,CAAC;IACJ,CAAC;IAMD;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAoB;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;QACtC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAe,EAAE,UAA0C,EAAE;QACnF,OAAO,IAAA,sDAA0B,EAAC,OAAO,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC;IAED,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAoB,EAAE,SAA8B;QAChF,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE;YACzB,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC;YAC9B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC;YAChD,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE;SAC5C,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,aAAa;YAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,WAAW,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC;IACJ,CAAC;;AAnEH,4BAoEC;AAnEiB,sBAAa,GAAG,iBAA0B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getExistingManifestContext } from "./existing-manifest-context.mjs";
|
|
1
2
|
/**
|
|
2
3
|
* Defines a category and registers it with the manifest.
|
|
3
4
|
*
|
|
@@ -29,6 +30,12 @@
|
|
|
29
30
|
* @see {@link CustomObject} — references this category via instance or api_name string.
|
|
30
31
|
*/
|
|
31
32
|
export class Category {
|
|
33
|
+
static toDeletionIdentifier(apiName) {
|
|
34
|
+
return {
|
|
35
|
+
type: Category.componentType,
|
|
36
|
+
api_name: apiName,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
32
39
|
/**
|
|
33
40
|
* @param scope - The manifest to register this category with.
|
|
34
41
|
* @param props - Initialization properties.
|
|
@@ -39,6 +46,20 @@ export class Category {
|
|
|
39
46
|
this._description = props.description;
|
|
40
47
|
scope._register(this);
|
|
41
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Loads this category from the active existing-manifest JSON context.
|
|
51
|
+
*/
|
|
52
|
+
static loadFromExisting(apiName, options = {}) {
|
|
53
|
+
return getExistingManifestContext(options).loadCategory(apiName);
|
|
54
|
+
}
|
|
55
|
+
/** @internal Hydrates a category from existing manifest wire JSON. */
|
|
56
|
+
static _fromExistingComponent(scope, component) {
|
|
57
|
+
return new Category(scope, {
|
|
58
|
+
apiName: component['api_name'],
|
|
59
|
+
name: component['name'] ?? component['api_name'],
|
|
60
|
+
description: component['description'] ?? '',
|
|
61
|
+
});
|
|
62
|
+
}
|
|
42
63
|
/**
|
|
43
64
|
* Returns the api_name of this category (e.g. `'gym__c'`).
|
|
44
65
|
*/
|
|
@@ -58,11 +79,12 @@ export class Category {
|
|
|
58
79
|
*/
|
|
59
80
|
toDict() {
|
|
60
81
|
return {
|
|
61
|
-
type:
|
|
82
|
+
type: Category.componentType,
|
|
62
83
|
api_name: this._apiName,
|
|
63
84
|
name: this._name,
|
|
64
85
|
description: this._description,
|
|
65
86
|
};
|
|
66
87
|
}
|
|
67
88
|
}
|
|
89
|
+
Category.componentType = 'CUSTOM_CATEGORY';
|
|
68
90
|
//# sourceMappingURL=category.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.mjs","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"category.mjs","sourceRoot":"","sources":["../../src/lib/manifest/category.ts"],"names":[],"mappings":"OAAO,EAAE,0BAA0B,EAAuC;AA6B1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,QAAQ;IAGnB,MAAM,CAAC,oBAAoB,CAAC,OAAe;QACzC,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,aAAa;YAC5B,QAAQ,EAAE,OAAO;SAClB,CAAC;IACJ,CAAC;IAMD;;;OAGG;IACH,YAAY,KAAoB,EAAE,KAAoB;QACpD,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC;QACtC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAe,EAAE,UAA0C,EAAE;QACnF,OAAO,0BAA0B,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC;IAED,sEAAsE;IACtE,MAAM,CAAC,sBAAsB,CAAC,KAAoB,EAAE,SAA8B;QAChF,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE;YACzB,OAAO,EAAE,SAAS,CAAC,UAAU,CAAC;YAC9B,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,UAAU,CAAC;YAChD,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE;SAC5C,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,aAAa;YAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,KAAK;YAChB,WAAW,EAAE,IAAI,CAAC,YAAY;SAC/B,CAAC;IACJ,CAAC;;AAlEe,sBAAa,GAAG,iBAA0B,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { CustomObject } from "./custom-object.mjs";
|
|
2
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.mjs";
|
|
3
|
+
import type { ManifestComponentDeletion } from "./manifest-builder.mjs";
|
|
4
|
+
export interface CustomObjectFieldSectionLoadFromExistingOptions extends ExistingManifestContextOptions {
|
|
5
|
+
customObjectApiName?: string;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Initialization properties for {@link CustomObjectFieldSection}.
|
|
4
9
|
*/
|
|
@@ -42,6 +47,8 @@ export interface CustomObjectFieldSectionProps {
|
|
|
42
47
|
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
43
48
|
*/
|
|
44
49
|
export declare class CustomObjectFieldSection {
|
|
50
|
+
static readonly componentType: "CUSTOM_OBJECT_FIELD_SECTION";
|
|
51
|
+
static toDeletionIdentifier(sectionId: string): ManifestComponentDeletion;
|
|
45
52
|
private readonly _sectionId;
|
|
46
53
|
private readonly _name;
|
|
47
54
|
private readonly _model;
|
|
@@ -50,6 +57,12 @@ export declare class CustomObjectFieldSection {
|
|
|
50
57
|
* @param props - Initialization properties.
|
|
51
58
|
*/
|
|
52
59
|
constructor(customObject: CustomObject, props: CustomObjectFieldSectionProps);
|
|
60
|
+
/**
|
|
61
|
+
* Loads this field section from the active existing-manifest JSON context.
|
|
62
|
+
*/
|
|
63
|
+
static loadFromExisting(sectionId: string, options?: CustomObjectFieldSectionLoadFromExistingOptions): CustomObjectFieldSection;
|
|
64
|
+
/** @internal Hydrates a field section from existing manifest wire JSON. */
|
|
65
|
+
static _fromExistingComponent(customObject: CustomObject, component: Record<string, any>): CustomObjectFieldSection;
|
|
53
66
|
/**
|
|
54
67
|
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
55
68
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OACO,KA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from "./existing-manifest-context.js";
|
|
3
|
+
import type { ManifestComponentDeletion } from "./manifest-builder.js";
|
|
4
|
+
export interface CustomObjectFieldSectionLoadFromExistingOptions extends ExistingManifestContextOptions {
|
|
5
|
+
customObjectApiName?: string;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Initialization properties for {@link CustomObjectFieldSection}.
|
|
4
9
|
*/
|
|
@@ -42,6 +47,8 @@ export interface CustomObjectFieldSectionProps {
|
|
|
42
47
|
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
43
48
|
*/
|
|
44
49
|
export declare class CustomObjectFieldSection {
|
|
50
|
+
static readonly componentType: "CUSTOM_OBJECT_FIELD_SECTION";
|
|
51
|
+
static toDeletionIdentifier(sectionId: string): ManifestComponentDeletion;
|
|
45
52
|
private readonly _sectionId;
|
|
46
53
|
private readonly _name;
|
|
47
54
|
private readonly _model;
|
|
@@ -50,6 +57,12 @@ export declare class CustomObjectFieldSection {
|
|
|
50
57
|
* @param props - Initialization properties.
|
|
51
58
|
*/
|
|
52
59
|
constructor(customObject: CustomObject, props: CustomObjectFieldSectionProps);
|
|
60
|
+
/**
|
|
61
|
+
* Loads this field section from the active existing-manifest JSON context.
|
|
62
|
+
*/
|
|
63
|
+
static loadFromExisting(sectionId: string, options?: CustomObjectFieldSectionLoadFromExistingOptions): CustomObjectFieldSection;
|
|
64
|
+
/** @internal Hydrates a field section from existing manifest wire JSON. */
|
|
65
|
+
static _fromExistingComponent(customObject: CustomObject, component: Record<string, any>): CustomObjectFieldSection;
|
|
53
66
|
/**
|
|
54
67
|
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
55
68
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.d.ts","s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
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CustomObjectFieldSection = void 0;
|
|
4
4
|
const _helpers_1 = require("./_helpers.js");
|
|
5
|
+
const existing_manifest_context_1 = require("./existing-manifest-context.js");
|
|
5
6
|
/**
|
|
6
7
|
* Defines a field section and registers it with the manifest.
|
|
7
8
|
*
|
|
@@ -26,6 +27,12 @@ const _helpers_1 = require("./_helpers.js");
|
|
|
26
27
|
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
27
28
|
*/
|
|
28
29
|
class CustomObjectFieldSection {
|
|
30
|
+
static toDeletionIdentifier(sectionId) {
|
|
31
|
+
return {
|
|
32
|
+
type: CustomObjectFieldSection.componentType,
|
|
33
|
+
section_id: sectionId,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
29
36
|
/**
|
|
30
37
|
* @param customObject - The custom object this section belongs to.
|
|
31
38
|
* @param props - Initialization properties.
|
|
@@ -36,6 +43,19 @@ class CustomObjectFieldSection {
|
|
|
36
43
|
this._model = customObject;
|
|
37
44
|
customObject._register(this);
|
|
38
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Loads this field section from the active existing-manifest JSON context.
|
|
48
|
+
*/
|
|
49
|
+
static loadFromExisting(sectionId, options = {}) {
|
|
50
|
+
return (0, existing_manifest_context_1.getExistingManifestContext)(options).loadFieldSection(sectionId, options);
|
|
51
|
+
}
|
|
52
|
+
/** @internal Hydrates a field section from existing manifest wire JSON. */
|
|
53
|
+
static _fromExistingComponent(customObject, component) {
|
|
54
|
+
return new CustomObjectFieldSection(customObject, {
|
|
55
|
+
sectionId: component['section_id'],
|
|
56
|
+
name: component['name'] ?? component['section_id'],
|
|
57
|
+
});
|
|
58
|
+
}
|
|
39
59
|
/**
|
|
40
60
|
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
41
61
|
*
|
|
@@ -64,7 +84,7 @@ class CustomObjectFieldSection {
|
|
|
64
84
|
*/
|
|
65
85
|
toDict() {
|
|
66
86
|
return {
|
|
67
|
-
type:
|
|
87
|
+
type: CustomObjectFieldSection.componentType,
|
|
68
88
|
section_id: this._sectionId,
|
|
69
89
|
model_name: this._model.getApiName(),
|
|
70
90
|
name: this._name,
|
|
@@ -72,4 +92,5 @@ class CustomObjectFieldSection {
|
|
|
72
92
|
}
|
|
73
93
|
}
|
|
74
94
|
exports.CustomObjectFieldSection = CustomObjectFieldSection;
|
|
95
|
+
CustomObjectFieldSection.componentType = 'CUSTOM_OBJECT_FIELD_SECTION';
|
|
75
96
|
//# sourceMappingURL=custom-object-field-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.js","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":";;;AAAA,4CAAwC;
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.js","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":";;;AAAA,4CAAwC;AAExC,8EAA8G;AA2B9G;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,wBAAwB;IAGnC,MAAM,CAAC,oBAAoB,CAAC,SAAiB;QAC3C,OAAO;YACL,IAAI,EAAE,wBAAwB,CAAC,aAAa;YAC5C,UAAU,EAAE,SAAS;SACtB,CAAC;IACJ,CAAC;IAMD;;;OAGG;IACH,YAAY,YAA0B,EAAE,KAAoC;QAC1E,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,SAAS,IAAI,IAAA,qBAAU,EAAC,KAAK,CAAC,CAAC;QACvD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAiB,EACjB,UAA2D,EAAE;QAE7D,OAAO,IAAA,sDAA0B,EAAC,O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