@rippling/rippling-sdk 0.2.0-alpha.38 → 0.2.0-alpha.40
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/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +240 -0
- 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 +206 -0
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts +206 -0
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.js +603 -1
- package/lib/manifest/custom-object-page-layout.js.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs +603 -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 +878 -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 +49 -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
|
@@ -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,KAAK,EAAE,YAAY,EAAE;OACrB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE;AAEzC,MAAM,WAAW,+CAAgD,SAAQ,8BAA8B;IACrG,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAG,6BAA6B,CAAU;IAEvE,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB;IAOzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC;;;OAGG;gBACS,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,6BAA6B;IAO5E;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,+CAAoD,GAC5D,wBAAwB;IAI3B,2EAA2E;IAC3E,MAAM,CAAC,sBAAsB,CAC3B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,wBAAwB;IAO3B;;;;;OAKG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { CustomObject } from "./custom-object.js";
|
|
2
|
+
import { type ExistingManifestContextOptions } 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","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,YAAY,EAAE;OACrB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,yBAAyB,EAAE;AAEzC,MAAM,WAAW,+CAAgD,SAAQ,8BAA8B;IACrG,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAG,6BAA6B,CAAU;IAEvE,MAAM,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,yBAAyB;IAOzE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;IAEtC;;;OAGG;gBACS,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,6BAA6B;IAO5E;;OAEG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,+CAAoD,GAC5D,wBAAwB;IAI3B,2EAA2E;IAC3E,MAAM,CAAC,sBAAsB,CAC3B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,wBAAwB;IAO3B;;;;;OAKG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACH,OAAO,IAAI,MAAM;IAIjB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAQ9B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
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,OAAO,CAAC,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;IAED,2EAA2E;IAC3E,MAAM,CAAC,sBAAsB,CAC3B,YAA0B,EAC1B,SAA8B;QAE9B,OAAO,IAAI,wBAAwB,CAAC,YAAY,EAAE;YAChD,SAAS,EAAE,SAAS,CAAC,YAAY,CAAC;YAClC,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,YAAY,CAAC;SACnD,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO;YACL,IAAI,EAAE,wBAAwB,CAAC,aAAa;YAC5C,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACpC,IAAI,EAAE,IAAI,CAAC,KAAK;SACjB,CAAC;IACJ,CAAC;;AAlFH,4DAmFC;AAlFiB,sCAAa,GAAG,6BAAsC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { generateId } from "./_helpers.mjs";
|
|
2
|
+
import { getExistingManifestContext } from "./existing-manifest-context.mjs";
|
|
2
3
|
/**
|
|
3
4
|
* Defines a field section and registers it with the manifest.
|
|
4
5
|
*
|
|
@@ -23,6 +24,12 @@ import { generateId } from "./_helpers.mjs";
|
|
|
23
24
|
* @see {@link CustomObjectPageLayout} — controls which sections appear on which tab.
|
|
24
25
|
*/
|
|
25
26
|
export class CustomObjectFieldSection {
|
|
27
|
+
static toDeletionIdentifier(sectionId) {
|
|
28
|
+
return {
|
|
29
|
+
type: CustomObjectFieldSection.componentType,
|
|
30
|
+
section_id: sectionId,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
26
33
|
/**
|
|
27
34
|
* @param customObject - The custom object this section belongs to.
|
|
28
35
|
* @param props - Initialization properties.
|
|
@@ -33,6 +40,19 @@ export class CustomObjectFieldSection {
|
|
|
33
40
|
this._model = customObject;
|
|
34
41
|
customObject._register(this);
|
|
35
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Loads this field section from the active existing-manifest JSON context.
|
|
45
|
+
*/
|
|
46
|
+
static loadFromExisting(sectionId, options = {}) {
|
|
47
|
+
return getExistingManifestContext(options).loadFieldSection(sectionId, options);
|
|
48
|
+
}
|
|
49
|
+
/** @internal Hydrates a field section from existing manifest wire JSON. */
|
|
50
|
+
static _fromExistingComponent(customObject, component) {
|
|
51
|
+
return new CustomObjectFieldSection(customObject, {
|
|
52
|
+
sectionId: component['section_id'],
|
|
53
|
+
name: component['name'] ?? component['section_id'],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
36
56
|
/**
|
|
37
57
|
* Returns the stable identifier for this section (e.g. `'sec_gm_profile'`).
|
|
38
58
|
*
|
|
@@ -61,11 +81,12 @@ export class CustomObjectFieldSection {
|
|
|
61
81
|
*/
|
|
62
82
|
toDict() {
|
|
63
83
|
return {
|
|
64
|
-
type:
|
|
84
|
+
type: CustomObjectFieldSection.componentType,
|
|
65
85
|
section_id: this._sectionId,
|
|
66
86
|
model_name: this._model.getApiName(),
|
|
67
87
|
name: this._name,
|
|
68
88
|
};
|
|
69
89
|
}
|
|
70
90
|
}
|
|
91
|
+
CustomObjectFieldSection.componentType = 'CUSTOM_OBJECT_FIELD_SECTION';
|
|
71
92
|
//# sourceMappingURL=custom-object-field-section.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-field-section.mjs","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"custom-object-field-section.mjs","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-field-section.ts"],"names":[],"mappings":"OAAO,EAAE,UAAU,EAAE;OAEd,EAAE,0BAA0B,EAAuC;AA2B1E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,wBAAwB;IAGnC,MAAM,CAAC,oBAAoB,CAAC,SAAiB;QAC3C,OAAO;YACL,IAAI,EAAE,wBAAwB,CAAC,aAAa;YAC5C,UAAU,EAAE,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BAAsC,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { CustomObjectFieldSection } from "./custom-object-field-section.mjs";
|
|
2
2
|
import type { CustomObject } from "./custom-object.mjs";
|
|
3
|
+
import { type ExistingManifestContextOptions } from "./existing-manifest-context.mjs";
|
|
3
4
|
import type { Field } from "./field.mjs";
|
|
5
|
+
import type { ManifestComponentDeletion } from "./manifest-builder.mjs";
|
|
6
|
+
export interface PageLayoutDeletionIdentifier {
|
|
7
|
+
layoutId: string;
|
|
8
|
+
objectRqlName: string;
|
|
9
|
+
}
|
|
4
10
|
/** Edit to a built-in (system) header field. */
|
|
5
11
|
export interface SystemHeaderFieldEdit {
|
|
6
12
|
/** Replace the system field's RQL field reference. Optional. */
|
|
@@ -181,6 +187,116 @@ export interface VisibilityConditions {
|
|
|
181
187
|
/** Per-tab visibility conditions, keyed by tab key. Optional. */
|
|
182
188
|
tabs?: Record<string, VisibilityCondition>;
|
|
183
189
|
}
|
|
190
|
+
/** Where to insert a new layout item. Defaults to `'end'`. */
|
|
191
|
+
export type PageLayoutMutationPosition = 'start' | 'end' | number;
|
|
192
|
+
/** Options for adding a field to an existing layout section. */
|
|
193
|
+
export interface AddPageLayoutFieldOptions extends SectionFieldOptions {
|
|
194
|
+
/**
|
|
195
|
+
* Tab key containing the target section. Optional when `sectionKey` is unique
|
|
196
|
+
* across the layout.
|
|
197
|
+
*/
|
|
198
|
+
tabKey?: string;
|
|
199
|
+
/** Section key to add the field to. Required. */
|
|
200
|
+
sectionKey: string;
|
|
201
|
+
/**
|
|
202
|
+
* Field-section metadata to assign to the field component.
|
|
203
|
+
*
|
|
204
|
+
* Existing layouts often use layout section keys that differ from field section
|
|
205
|
+
* ids. Pass this when the field was not constructed with a `section`.
|
|
206
|
+
*/
|
|
207
|
+
fieldSection?: CustomObjectFieldSection | string;
|
|
208
|
+
/** Insert position inside the section field list. Optional. @default `'end'` */
|
|
209
|
+
position?: PageLayoutMutationPosition;
|
|
210
|
+
/** Allow the same field to appear twice in the same section. Optional. @default false */
|
|
211
|
+
allowDuplicate?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Add to a built-in system section via `systemTabEdits`.
|
|
214
|
+
*
|
|
215
|
+
* When true, `tabKey` is required and the edit is created if it does not
|
|
216
|
+
* already exist.
|
|
217
|
+
*/
|
|
218
|
+
systemSection?: boolean;
|
|
219
|
+
}
|
|
220
|
+
/** Options for adding multiple fields to an existing layout section. */
|
|
221
|
+
export type AddPageLayoutFieldsOptions = AddPageLayoutFieldOptions;
|
|
222
|
+
/** Options for removing fields from a layout. */
|
|
223
|
+
export interface RemovePageLayoutFieldOptions {
|
|
224
|
+
/** Limit removal to one tab. Optional. */
|
|
225
|
+
tabKey?: string;
|
|
226
|
+
/** Limit removal to one section. Optional. */
|
|
227
|
+
sectionKey?: string;
|
|
228
|
+
/**
|
|
229
|
+
* Remove all matching occurrences. When false, removing a field that appears
|
|
230
|
+
* more than once throws. Optional. @default true
|
|
231
|
+
*/
|
|
232
|
+
removeAll?: boolean;
|
|
233
|
+
/** Remove from a built-in system section edit. Optional. */
|
|
234
|
+
systemSection?: boolean;
|
|
235
|
+
}
|
|
236
|
+
/** Options for adding a section to an existing tab. */
|
|
237
|
+
export interface AddPageLayoutSectionOptions {
|
|
238
|
+
/** Tab key to add the section to. Required. */
|
|
239
|
+
tabKey: string;
|
|
240
|
+
/** Insert position inside the tab. Optional. @default `'end'` */
|
|
241
|
+
position?: PageLayoutMutationPosition;
|
|
242
|
+
/** Allow another section with the same key in the same tab. Optional. @default false */
|
|
243
|
+
allowDuplicate?: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Add to a built-in system tab via `systemTabEdits.newSections`.
|
|
246
|
+
*
|
|
247
|
+
* When false, the tab must already be present in `newTabs`.
|
|
248
|
+
*/
|
|
249
|
+
systemTab?: boolean;
|
|
250
|
+
}
|
|
251
|
+
/** Options for removing sections from a layout. */
|
|
252
|
+
export interface RemovePageLayoutSectionOptions {
|
|
253
|
+
/** Limit removal to one tab. Optional. */
|
|
254
|
+
tabKey?: string;
|
|
255
|
+
/**
|
|
256
|
+
* Remove all matching occurrences. When false, removing a section that appears
|
|
257
|
+
* more than once throws. Optional. @default true
|
|
258
|
+
*/
|
|
259
|
+
removeAll?: boolean;
|
|
260
|
+
/** Delete a built-in system section via `systemSectionEdits`. Requires `tabKey`. */
|
|
261
|
+
systemSection?: boolean;
|
|
262
|
+
}
|
|
263
|
+
/** Options for adding a tab to a layout. */
|
|
264
|
+
export interface AddPageLayoutTabOptions {
|
|
265
|
+
/** Insert position inside `newTabs`. Optional. @default `'end'` */
|
|
266
|
+
position?: PageLayoutMutationPosition;
|
|
267
|
+
/** Allow another tab with the same key. Optional. @default false */
|
|
268
|
+
allowDuplicate?: boolean;
|
|
269
|
+
}
|
|
270
|
+
/** Options for removing a tab from a layout. */
|
|
271
|
+
export interface RemovePageLayoutTabOptions {
|
|
272
|
+
/**
|
|
273
|
+
* Remove all matching occurrences. When false, removing a tab that appears
|
|
274
|
+
* more than once throws. Optional. @default true
|
|
275
|
+
*/
|
|
276
|
+
removeAll?: boolean;
|
|
277
|
+
/** Delete a built-in system tab via `systemTabEdits`. */
|
|
278
|
+
systemTab?: boolean;
|
|
279
|
+
}
|
|
280
|
+
/** Options for adding a custom header field. */
|
|
281
|
+
export interface AddHeaderFieldOptions extends Omit<NewHeaderField, 'rqlName' | 'key'> {
|
|
282
|
+
/**
|
|
283
|
+
* Stable header key. Defaults to the field api_name when adding a `Field`.
|
|
284
|
+
* Required when adding a raw `NewHeaderField`.
|
|
285
|
+
*/
|
|
286
|
+
key?: string;
|
|
287
|
+
/** Insert position inside `newFields` and `headerFieldsOrder`. Optional. @default `'end'` */
|
|
288
|
+
position?: PageLayoutMutationPosition;
|
|
289
|
+
/** Allow another custom header field with the same key. Optional. @default false */
|
|
290
|
+
allowDuplicate?: boolean;
|
|
291
|
+
}
|
|
292
|
+
/** Options for removing custom header fields. */
|
|
293
|
+
export interface RemoveHeaderFieldOptions {
|
|
294
|
+
/**
|
|
295
|
+
* Remove all matching occurrences. When false, removing a header field that
|
|
296
|
+
* appears more than once throws. Optional. @default true
|
|
297
|
+
*/
|
|
298
|
+
removeAll?: boolean;
|
|
299
|
+
}
|
|
184
300
|
/**
|
|
185
301
|
* Initialization properties for {@link CustomObjectPageLayout}.
|
|
186
302
|
*/
|
|
@@ -231,6 +347,9 @@ export interface CustomObjectPageLayoutProps {
|
|
|
231
347
|
*/
|
|
232
348
|
blueprintKey?: string;
|
|
233
349
|
}
|
|
350
|
+
export interface CustomObjectPageLayoutLoadFromExistingOptions extends ExistingManifestContextOptions {
|
|
351
|
+
customObjectApiName?: string;
|
|
352
|
+
}
|
|
234
353
|
/**
|
|
235
354
|
* Defines a page layout and registers it with the manifest.
|
|
236
355
|
*
|
|
@@ -272,6 +391,8 @@ export interface CustomObjectPageLayoutProps {
|
|
|
272
391
|
* @see {@link CustomObjectPageLayout.basic} — factory for simple single-tab layouts.
|
|
273
392
|
*/
|
|
274
393
|
export declare class CustomObjectPageLayout {
|
|
394
|
+
static readonly componentType: "CUSTOM_OBJECT_PAGE_LAYOUT";
|
|
395
|
+
static toDeletionIdentifier(identifier: PageLayoutDeletionIdentifier): ManifestComponentDeletion;
|
|
275
396
|
private readonly _layoutId;
|
|
276
397
|
private readonly _apiName;
|
|
277
398
|
private readonly _customObjectApiName;
|
|
@@ -286,6 +407,16 @@ export declare class CustomObjectPageLayout {
|
|
|
286
407
|
* @throws {Error} If `apiName` or `name` is empty.
|
|
287
408
|
*/
|
|
288
409
|
constructor(customObject: CustomObject, props: CustomObjectPageLayoutProps);
|
|
410
|
+
/**
|
|
411
|
+
* Loads this page layout from the active existing-manifest JSON context.
|
|
412
|
+
*
|
|
413
|
+
* `id` resolves against `layout_id` first, then `api_name`. When loading by
|
|
414
|
+
* api_name such as `'default'`, pass `customObjectApiName` if multiple objects
|
|
415
|
+
* have a layout with the same api_name.
|
|
416
|
+
*/
|
|
417
|
+
static loadFromExisting(layoutIdOrApiName: string, options?: CustomObjectPageLayoutLoadFromExistingOptions): CustomObjectPageLayout;
|
|
418
|
+
/** @internal Hydrates a page layout from existing manifest wire JSON. */
|
|
419
|
+
static _fromExistingComponent(customObject: CustomObject, component: Record<string, any>): CustomObjectPageLayout;
|
|
289
420
|
/**
|
|
290
421
|
* Returns the stable identifier for this layout record (e.g. `'layout_gym_member'`).
|
|
291
422
|
*/
|
|
@@ -298,6 +429,81 @@ export declare class CustomObjectPageLayout {
|
|
|
298
429
|
* Returns the api_name of the custom object this layout belongs to.
|
|
299
430
|
*/
|
|
300
431
|
getCustomObjectApiName(): string;
|
|
432
|
+
/**
|
|
433
|
+
* Adds one field to an existing layout section.
|
|
434
|
+
*
|
|
435
|
+
* For loaded layouts, this mutates the preserved `tab_edits` JSON in place
|
|
436
|
+
* and normalizes only the inserted field entry.
|
|
437
|
+
*/
|
|
438
|
+
addField(field: Field, options: AddPageLayoutFieldOptions): this;
|
|
439
|
+
/**
|
|
440
|
+
* Adds multiple fields to an existing layout section.
|
|
441
|
+
*
|
|
442
|
+
* Fields are inserted in the order provided. If a field does not already have
|
|
443
|
+
* field-section metadata, it is assigned to `options.fieldSection` when
|
|
444
|
+
* provided, otherwise to `options.sectionKey`.
|
|
445
|
+
*/
|
|
446
|
+
addFields(fields: Field[], options: AddPageLayoutFieldsOptions): this;
|
|
447
|
+
/**
|
|
448
|
+
* Removes a field from the layout's field sections.
|
|
449
|
+
*
|
|
450
|
+
* This only removes the field from the page layout. It does not delete the
|
|
451
|
+
* `CUSTOM_OBJECT_FIELD` component from the manifest.
|
|
452
|
+
*/
|
|
453
|
+
removeField(field: Field | string, options?: RemovePageLayoutFieldOptions): this;
|
|
454
|
+
/** Removes multiple fields from the layout's field sections. */
|
|
455
|
+
removeFields(fields: Array<Field | string>, options?: RemovePageLayoutFieldOptions): this;
|
|
456
|
+
/**
|
|
457
|
+
* Adds a section to an existing tab.
|
|
458
|
+
*
|
|
459
|
+
* Pass `systemTab: true` to add a new section to a built-in tab via
|
|
460
|
+
* `systemTabEdits.newSections`.
|
|
461
|
+
*/
|
|
462
|
+
addSection(section: PageLayoutSection, options: AddPageLayoutSectionOptions): this;
|
|
463
|
+
/**
|
|
464
|
+
* Removes a section from `newTabs` / `systemTabEdits.newSections`.
|
|
465
|
+
*
|
|
466
|
+
* Pass `systemSection: true` with `tabKey` to delete a built-in section via
|
|
467
|
+
* `systemSectionEdits[sectionKey].deleted`.
|
|
468
|
+
*/
|
|
469
|
+
removeSection(sectionKey: string, options?: RemovePageLayoutSectionOptions): this;
|
|
470
|
+
/** Adds a new tab to `tab_edits.newTabs`. */
|
|
471
|
+
addTab(tab: PageLayoutTab, options?: AddPageLayoutTabOptions): this;
|
|
472
|
+
/**
|
|
473
|
+
* Removes a tab from `newTabs`.
|
|
474
|
+
*
|
|
475
|
+
* Pass `systemTab: true` to delete a built-in tab via `systemTabEdits[tabKey].deleted`.
|
|
476
|
+
*/
|
|
477
|
+
removeTab(tabKey: string, options?: RemovePageLayoutTabOptions): this;
|
|
478
|
+
/** Adds a custom header field to `header_edits.newFields`. */
|
|
479
|
+
addHeaderField(field: Field | NewHeaderField, options?: AddHeaderFieldOptions): this;
|
|
480
|
+
/** Removes custom header fields from `header_edits.newFields`. */
|
|
481
|
+
removeHeaderField(fieldOrKey: Field | string, options?: RemoveHeaderFieldOptions): this;
|
|
482
|
+
/** Sets the record title field in `header_edits`. */
|
|
483
|
+
setTitleField(field: Field | string | null): this;
|
|
484
|
+
/** Removes the record title field from the header. */
|
|
485
|
+
removeTitleField(): this;
|
|
486
|
+
/** Sets the record description field in `header_edits`. */
|
|
487
|
+
setDescriptionField(field: Field | string | null): this;
|
|
488
|
+
/** Removes the record description field from the header. */
|
|
489
|
+
removeDescriptionField(): this;
|
|
490
|
+
private serializeFieldForMutation;
|
|
491
|
+
private normalizeSectionFieldForMutation;
|
|
492
|
+
private normalizeSectionForMutation;
|
|
493
|
+
private normalizeTabForMutation;
|
|
494
|
+
private assignFieldSectionForMutation;
|
|
495
|
+
private assertFieldBelongsToLayout;
|
|
496
|
+
private requireOneFieldContainer;
|
|
497
|
+
private findFieldContainers;
|
|
498
|
+
private ensureSystemSectionFieldContainer;
|
|
499
|
+
private ensureSystemTabEdit;
|
|
500
|
+
private ensureSystemSectionEdit;
|
|
501
|
+
private findNewTabWithSections;
|
|
502
|
+
private assertSectionKeyAvailable;
|
|
503
|
+
private normalizeHeaderFieldForMutation;
|
|
504
|
+
private headerFieldApiName;
|
|
505
|
+
private removeSectionVisibility;
|
|
506
|
+
private removeTabVisibility;
|
|
301
507
|
/**
|
|
302
508
|
* Serializes this layout to the wire format consumed by the manifest install endpoint.
|
|
303
509
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-page-layout.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-page-layout.ts"],"names":[],"mappings":"OACO,EAAE,wBAAwB,EAAE;OAC5B,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"custom-object-page-layout.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-page-layout.ts"],"names":[],"mappings":"OACO,EAAE,wBAAwB,EAAE;OAC5B,KAAK,EAAE,YAAY,EAAE;OACrB,EAA8B,KAAK,8BAA8B,EAAE;OACnE,KAAK,EAAE,KAAK,EAAE;OACd,KAAK,EAAE,yBAAyB,EAAE;AAEzC,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAMD,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C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