@rippling/rippling-sdk 0.2.0-alpha.34 → 0.2.0-alpha.35
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 +81 -13
- package/lib/manifest/app.d.mts.map +1 -1
- package/lib/manifest/app.d.ts +81 -13
- package/lib/manifest/app.d.ts.map +1 -1
- package/lib/manifest/app.js +37 -16
- package/lib/manifest/app.js.map +1 -1
- package/lib/manifest/app.mjs +37 -16
- package/lib/manifest/app.mjs.map +1 -1
- package/lib/manifest/category.d.mts +63 -7
- package/lib/manifest/category.d.mts.map +1 -1
- package/lib/manifest/category.d.ts +63 -7
- package/lib/manifest/category.d.ts.map +1 -1
- package/lib/manifest/category.js +45 -10
- package/lib/manifest/category.js.map +1 -1
- package/lib/manifest/category.mjs +43 -8
- package/lib/manifest/category.mjs.map +1 -1
- package/lib/manifest/custom-object-field-section.d.mts +56 -6
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
- package/lib/manifest/custom-object-field-section.d.ts +56 -6
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
- package/lib/manifest/custom-object-field-section.js +41 -14
- package/lib/manifest/custom-object-field-section.js.map +1 -1
- package/lib/manifest/custom-object-field-section.mjs +39 -12
- package/lib/manifest/custom-object-field-section.mjs.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.mts +201 -41
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
- package/lib/manifest/custom-object-page-layout.d.ts +201 -41
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
- package/lib/manifest/custom-object-page-layout.js +76 -30
- package/lib/manifest/custom-object-page-layout.js.map +1 -1
- package/lib/manifest/custom-object-page-layout.mjs +74 -28
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
- package/lib/manifest/custom-object.d.mts +128 -15
- package/lib/manifest/custom-object.d.mts.map +1 -1
- package/lib/manifest/custom-object.d.ts +128 -15
- package/lib/manifest/custom-object.d.ts.map +1 -1
- package/lib/manifest/custom-object.js +61 -26
- package/lib/manifest/custom-object.js.map +1 -1
- package/lib/manifest/custom-object.mjs +61 -26
- package/lib/manifest/custom-object.mjs.map +1 -1
- package/lib/manifest/field.d.mts +265 -54
- package/lib/manifest/field.d.mts.map +1 -1
- package/lib/manifest/field.d.ts +265 -54
- package/lib/manifest/field.d.ts.map +1 -1
- package/lib/manifest/field.js +100 -57
- package/lib/manifest/field.js.map +1 -1
- package/lib/manifest/field.mjs +100 -57
- package/lib/manifest/field.mjs.map +1 -1
- package/lib/manifest/list-view.d.mts +105 -14
- package/lib/manifest/list-view.d.mts.map +1 -1
- package/lib/manifest/list-view.d.ts +105 -14
- package/lib/manifest/list-view.d.ts.map +1 -1
- package/lib/manifest/list-view.js +50 -14
- package/lib/manifest/list-view.js.map +1 -1
- package/lib/manifest/list-view.mjs +48 -12
- package/lib/manifest/list-view.mjs.map +1 -1
- package/lib/manifest/manifest-builder.d.mts +77 -11
- package/lib/manifest/manifest-builder.d.mts.map +1 -1
- package/lib/manifest/manifest-builder.d.ts +77 -11
- package/lib/manifest/manifest-builder.d.ts.map +1 -1
- package/lib/manifest/manifest-builder.js +46 -24
- package/lib/manifest/manifest-builder.js.map +1 -1
- package/lib/manifest/manifest-builder.mjs +44 -22
- package/lib/manifest/manifest-builder.mjs.map +1 -1
- package/lib/manifest/manifest-function.d.mts +92 -12
- package/lib/manifest/manifest-function.d.mts.map +1 -1
- package/lib/manifest/manifest-function.d.ts +92 -12
- package/lib/manifest/manifest-function.d.ts.map +1 -1
- package/lib/manifest/manifest-function.js +40 -11
- package/lib/manifest/manifest-function.js.map +1 -1
- package/lib/manifest/manifest-function.mjs +38 -9
- package/lib/manifest/manifest-function.mjs.map +1 -1
- package/lib/manifest/rule.d.mts +94 -16
- package/lib/manifest/rule.d.mts.map +1 -1
- package/lib/manifest/rule.d.ts +94 -16
- package/lib/manifest/rule.d.ts.map +1 -1
- package/lib/manifest/rule.js +36 -15
- package/lib/manifest/rule.js.map +1 -1
- package/lib/manifest/rule.mjs +36 -15
- package/lib/manifest/rule.mjs.map +1 -1
- package/lib/manifest/sdui-page.d.mts +67 -11
- package/lib/manifest/sdui-page.d.mts.map +1 -1
- package/lib/manifest/sdui-page.d.ts +67 -11
- package/lib/manifest/sdui-page.d.ts.map +1 -1
- package/lib/manifest/sdui-page.js +44 -13
- package/lib/manifest/sdui-page.js.map +1 -1
- package/lib/manifest/sdui-page.mjs +42 -11
- package/lib/manifest/sdui-page.mjs.map +1 -1
- package/lib/manifest/validation.d.mts +87 -12
- package/lib/manifest/validation.d.mts.map +1 -1
- package/lib/manifest/validation.d.ts +87 -12
- package/lib/manifest/validation.d.ts.map +1 -1
- package/lib/manifest/validation.js +41 -15
- package/lib/manifest/validation.js.map +1 -1
- package/lib/manifest/validation.mjs +39 -13
- package/lib/manifest/validation.mjs.map +1 -1
- package/lib/sdui/actions.d.mts +25 -0
- package/lib/sdui/actions.d.mts.map +1 -0
- package/lib/sdui/actions.d.ts +25 -0
- package/lib/sdui/actions.d.ts.map +1 -0
- package/lib/sdui/actions.js +53 -0
- package/lib/sdui/actions.js.map +1 -0
- package/lib/sdui/actions.mjs +42 -0
- package/lib/sdui/actions.mjs.map +1 -0
- package/lib/sdui/component.d.mts +41 -0
- package/lib/sdui/component.d.mts.map +1 -0
- package/lib/sdui/component.d.ts +41 -0
- package/lib/sdui/component.d.ts.map +1 -0
- package/lib/sdui/component.js +95 -0
- package/lib/sdui/component.js.map +1 -0
- package/lib/sdui/component.mjs +91 -0
- package/lib/sdui/component.mjs.map +1 -0
- package/lib/sdui/components.d.mts +149 -0
- package/lib/sdui/components.d.mts.map +1 -0
- package/lib/sdui/components.d.ts +149 -0
- package/lib/sdui/components.d.ts.map +1 -0
- package/lib/sdui/components.js +303 -0
- package/lib/sdui/components.js.map +1 -0
- package/lib/sdui/components.mjs +298 -0
- package/lib/sdui/components.mjs.map +1 -0
- package/lib/sdui/conditions.d.mts +25 -0
- package/lib/sdui/conditions.d.mts.map +1 -0
- package/lib/sdui/conditions.d.ts +25 -0
- package/lib/sdui/conditions.d.ts.map +1 -0
- package/lib/sdui/conditions.js +47 -0
- package/lib/sdui/conditions.js.map +1 -0
- package/lib/sdui/conditions.mjs +35 -0
- package/lib/sdui/conditions.mjs.map +1 -0
- package/lib/sdui/directives.d.mts +18 -0
- package/lib/sdui/directives.d.mts.map +1 -0
- package/lib/sdui/directives.d.ts +18 -0
- package/lib/sdui/directives.d.ts.map +1 -0
- package/lib/sdui/directives.js +28 -0
- package/lib/sdui/directives.js.map +1 -0
- package/lib/sdui/directives.mjs +21 -0
- package/lib/sdui/directives.mjs.map +1 -0
- package/lib/sdui/index.d.mts +362 -0
- package/lib/sdui/index.d.mts.map +1 -0
- package/lib/sdui/index.d.ts +362 -0
- package/lib/sdui/index.d.ts.map +1 -0
- package/lib/sdui/index.js +375 -0
- package/lib/sdui/index.js.map +1 -0
- package/lib/sdui/index.mjs +199 -0
- package/lib/sdui/index.mjs.map +1 -0
- package/lib/sdui/props.d.mts +12 -0
- package/lib/sdui/props.d.mts.map +1 -0
- package/lib/sdui/props.d.ts +12 -0
- package/lib/sdui/props.d.ts.map +1 -0
- package/lib/sdui/props.js +25 -0
- package/lib/sdui/props.js.map +1 -0
- package/lib/sdui/props.mjs +21 -0
- package/lib/sdui/props.mjs.map +1 -0
- package/lib/sdui/render.d.mts +23 -0
- package/lib/sdui/render.d.mts.map +1 -0
- package/lib/sdui/render.d.ts +23 -0
- package/lib/sdui/render.d.ts.map +1 -0
- package/lib/sdui/render.js +40 -0
- package/lib/sdui/render.js.map +1 -0
- package/lib/sdui/render.mjs +37 -0
- package/lib/sdui/render.mjs.map +1 -0
- package/lib/sdui/state.d.mts +22 -0
- package/lib/sdui/state.d.mts.map +1 -0
- package/lib/sdui/state.d.ts +22 -0
- package/lib/sdui/state.d.ts.map +1 -0
- package/lib/sdui/state.js +57 -0
- package/lib/sdui/state.js.map +1 -0
- package/lib/sdui/state.mjs +53 -0
- package/lib/sdui/state.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/draft-hires.d.mts +4 -0
- package/resources/draft-hires.d.mts.map +1 -1
- package/resources/draft-hires.d.ts +4 -0
- package/resources/draft-hires.d.ts.map +1 -1
- package/resources/files.d.mts +16 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +16 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/headcount-positions.d.mts +2 -2
- package/resources/headcount-positions.d.mts.map +1 -1
- package/resources/headcount-positions.d.ts +2 -2
- package/resources/headcount-positions.d.ts.map +1 -1
- package/resources/legal-entities.d.mts +1 -1
- package/resources/legal-entities.d.mts.map +1 -1
- package/resources/legal-entities.d.ts +1 -1
- package/resources/legal-entities.d.ts.map +1 -1
- package/resources/location-factors.d.mts +2 -2
- package/resources/location-factors.d.mts.map +1 -1
- package/resources/location-factors.d.ts +2 -2
- package/resources/location-factors.d.ts.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/workers.d.mts +2 -2
- package/resources/workers.d.mts.map +1 -1
- package/resources/workers.d.ts +2 -2
- package/resources/workers.d.ts.map +1 -1
- package/src/lib/manifest/app.ts +81 -26
- package/src/lib/manifest/category.ts +63 -14
- package/src/lib/manifest/custom-object-field-section.ts +56 -17
- package/src/lib/manifest/custom-object-page-layout.ts +201 -66
- package/src/lib/manifest/custom-object.ts +128 -37
- package/src/lib/manifest/field.ts +265 -75
- package/src/lib/manifest/list-view.ts +105 -25
- package/src/lib/manifest/manifest-builder.ts +75 -32
- package/src/lib/manifest/manifest-function.ts +92 -22
- package/src/lib/manifest/rule.ts +95 -29
- package/src/lib/manifest/sdui-page.ts +67 -21
- package/src/lib/manifest/validation.ts +87 -24
- package/src/lib/sdui/actions.ts +58 -0
- package/src/lib/sdui/component.ts +122 -0
- package/src/lib/sdui/components.ts +308 -0
- package/src/lib/sdui/conditions.ts +59 -0
- package/src/lib/sdui/directives.ts +42 -0
- package/src/lib/sdui/index.ts +365 -0
- package/src/lib/sdui/props.ts +32 -0
- package/src/lib/sdui/render.ts +58 -0
- package/src/lib/sdui/state.ts +60 -0
- package/src/resources/draft-hires.ts +5 -0
- package/src/resources/files.ts +18 -1
- package/src/resources/headcount-positions.ts +2 -0
- package/src/resources/legal-entities.ts +1 -0
- package/src/resources/location-factors.ts +2 -0
- package/src/resources/shared.ts +1 -0
- package/src/resources/workers.ts +2 -0
- 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
|
@@ -2,135 +2,265 @@ import type { CustomObject } from "./custom-object.mjs";
|
|
|
2
2
|
import type { Field } from "./field.mjs";
|
|
3
3
|
/** Edit to a built-in (system) header field. */
|
|
4
4
|
export interface SystemHeaderFieldEdit {
|
|
5
|
+
/** Replace the system field's RQL field reference. Optional. */
|
|
5
6
|
newRqlField?: string;
|
|
7
|
+
/** Remove this system field from the header. Optional. */
|
|
6
8
|
deleted?: boolean;
|
|
7
9
|
}
|
|
8
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Custom header field added via `newFields`.
|
|
12
|
+
*
|
|
13
|
+
* `key` is required and must be non-empty — it is used as the stable identity
|
|
14
|
+
* for this field in `headerFieldsOrder` and visibility conditions.
|
|
15
|
+
*/
|
|
9
16
|
export interface NewHeaderField {
|
|
17
|
+
/** RQL field name to display. Required. */
|
|
10
18
|
rqlName: string;
|
|
19
|
+
/** Stable key for this field. Required. */
|
|
11
20
|
key: string;
|
|
21
|
+
/** Whether the user can remove this field. Optional. */
|
|
12
22
|
canBeDeleted?: boolean;
|
|
23
|
+
/** Whether the user can swap this field for another. Optional. */
|
|
13
24
|
canBeChanged?: boolean;
|
|
25
|
+
/** Whether the user can reorder this field. Optional. */
|
|
14
26
|
canBeMoved?: boolean;
|
|
15
27
|
}
|
|
16
28
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
29
|
+
* Header configuration for a page layout (`header_edits`).
|
|
30
|
+
*
|
|
31
|
+
* Only the keys listed here are accepted — anything else is silently dropped
|
|
32
|
+
* on the wire. Pass `{}` for an unchanged header.
|
|
33
|
+
*
|
|
34
|
+
* > **Caution:** key names are camelCase on the wire. Snake_case keys are
|
|
35
|
+
* > silently dropped and produce an empty header on deploy.
|
|
20
36
|
*/
|
|
21
37
|
export interface HeaderEdits {
|
|
38
|
+
/** Replace the record title field (pass the field's api_name). Optional. */
|
|
22
39
|
newTitleField?: string | null;
|
|
40
|
+
/** Remove the title field from the header. Optional. */
|
|
23
41
|
titleFieldDeleted?: boolean;
|
|
42
|
+
/** Replace the record description field. Optional. */
|
|
24
43
|
newDescriptionField?: string | null;
|
|
44
|
+
/** Remove the description field from the header. Optional. */
|
|
25
45
|
descriptionFieldDeleted?: boolean;
|
|
26
|
-
/**
|
|
46
|
+
/** Edits to built-in system header fields, keyed by system field key. Optional. */
|
|
27
47
|
systemFieldEdits?: Record<string, SystemHeaderFieldEdit>;
|
|
48
|
+
/** Additional custom fields to add to the header. Optional. */
|
|
28
49
|
newFields?: NewHeaderField[];
|
|
29
|
-
/**
|
|
50
|
+
/** Ordered list of header field `key` values (custom + system). Optional. */
|
|
30
51
|
headerFieldsOrder?: string[];
|
|
52
|
+
/** Action button keys to show in the header. Optional. */
|
|
31
53
|
buttons?: string[];
|
|
32
54
|
}
|
|
33
|
-
/**
|
|
55
|
+
/** One field entry inside a `fields_section`. */
|
|
34
56
|
export interface SectionField {
|
|
57
|
+
/** RQL name of the field to display. Required. */
|
|
35
58
|
fieldRqlName: string;
|
|
59
|
+
/** Hide this field from view. Optional. */
|
|
36
60
|
hidden?: boolean;
|
|
61
|
+
/** Allow inline editing of this field. Optional. */
|
|
37
62
|
editable?: boolean;
|
|
63
|
+
/** Controls how the field can be moved in the UI. Optional. */
|
|
38
64
|
movementOption?: 'tab' | 'free';
|
|
39
65
|
}
|
|
40
|
-
/**
|
|
66
|
+
/** A standard field-grid section inside a tab. */
|
|
41
67
|
export interface FieldsSection {
|
|
42
68
|
type: 'fields_section';
|
|
69
|
+
/** Stable key for this section. Required. */
|
|
43
70
|
key: string;
|
|
71
|
+
/** Display name of the section. Required. */
|
|
44
72
|
name: string;
|
|
73
|
+
/** Fields to display in this section. Required. */
|
|
45
74
|
fields: SectionField[];
|
|
46
75
|
}
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
76
|
+
/**
|
|
77
|
+
* A section inside a page layout tab.
|
|
78
|
+
*
|
|
79
|
+
* Only `fields_section` is modeled today. Add other section types
|
|
80
|
+
* (`related_object_section`, `custom_section`, …) explicitly as needed.
|
|
81
|
+
*/
|
|
49
82
|
export type PageLayoutSection = FieldsSection;
|
|
50
|
-
/**
|
|
83
|
+
/** A tab that contains one or more field-grid sections. */
|
|
51
84
|
export interface TabWithSections {
|
|
52
85
|
type: 'tab_with_sections';
|
|
86
|
+
/** Stable key for this tab. Required. */
|
|
53
87
|
key: string;
|
|
88
|
+
/** Display name of the tab. Required. */
|
|
54
89
|
name: string;
|
|
90
|
+
/** Sections inside this tab. Required. */
|
|
55
91
|
sections: PageLayoutSection[];
|
|
56
92
|
}
|
|
57
|
-
/**
|
|
93
|
+
/** A tab that hosts a custom UI component. */
|
|
58
94
|
export interface CustomTab {
|
|
59
95
|
type: 'custom_tab';
|
|
96
|
+
/** Stable key for this tab. Required. */
|
|
60
97
|
key: string;
|
|
98
|
+
/** Display name of the tab. Required. */
|
|
61
99
|
name: string;
|
|
100
|
+
/** Key of the custom component to render. Required. */
|
|
62
101
|
componentKey: string;
|
|
63
102
|
}
|
|
103
|
+
/** A tab entry in a page layout — either a sections-based tab or a custom component tab. */
|
|
64
104
|
export type PageLayoutTab = TabWithSections | CustomTab;
|
|
65
|
-
/**
|
|
105
|
+
/** Column layout for a `fields_section`. */
|
|
66
106
|
export type SectionFieldsLayout = 'one_column' | 'two_column' | 'three_column' | 'responsive';
|
|
67
|
-
/**
|
|
107
|
+
/** Edits to a built-in section inside a system tab. */
|
|
68
108
|
export interface SystemSectionEdit {
|
|
109
|
+
/** Rename this section. Optional. */
|
|
69
110
|
newName?: string;
|
|
111
|
+
/** Remove this section. Optional. */
|
|
70
112
|
deleted?: boolean;
|
|
113
|
+
/** Change the column layout. Optional. */
|
|
71
114
|
newLayout?: SectionFieldsLayout;
|
|
115
|
+
/** Add fields to this section. Optional. */
|
|
72
116
|
newFields?: SectionField[];
|
|
117
|
+
/** Hide the section name header. Optional. */
|
|
73
118
|
newHideName?: boolean;
|
|
74
119
|
}
|
|
75
|
-
/**
|
|
120
|
+
/** Edits to a built-in (system) tab. */
|
|
76
121
|
export interface SystemTabEdit {
|
|
122
|
+
/** Rename this tab. Optional. */
|
|
77
123
|
newName?: string;
|
|
124
|
+
/** Remove this tab. Optional. */
|
|
78
125
|
deleted?: boolean;
|
|
126
|
+
/** Add new sections to this tab. Optional. */
|
|
79
127
|
newSections?: PageLayoutSection[];
|
|
128
|
+
/** Edits to built-in sections inside this tab, keyed by section key. Optional. */
|
|
80
129
|
systemSectionEdits?: Record<string, SystemSectionEdit>;
|
|
130
|
+
/** Reorder sections by key. Optional. */
|
|
81
131
|
sectionsOrder?: string[];
|
|
82
132
|
}
|
|
83
133
|
/**
|
|
84
|
-
*
|
|
134
|
+
* Tab structure configuration for a page layout (`tab_edits`).
|
|
85
135
|
*
|
|
86
|
-
* All fields are optional
|
|
87
|
-
* list / empty dict). An omitted `tabEdits` defaults to `{}` in the
|
|
88
|
-
* constructor; partial objects rely on backend per-field defaults.
|
|
136
|
+
* All fields are optional. An omitted `tabEdits` defaults to `{}`.
|
|
89
137
|
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* - tabsOrder: ordered list of tab `key` values (new + system)
|
|
93
|
-
* - newTabLayout: optional orientation
|
|
138
|
+
* > **Caution:** key names are camelCase on the wire. Snake_case keys are
|
|
139
|
+
* > silently dropped and produce an empty layout on deploy.
|
|
94
140
|
*/
|
|
95
141
|
export interface TabEdits {
|
|
142
|
+
/** New tabs to add to this layout. Each must include a `type` discriminator. Optional. */
|
|
96
143
|
newTabs?: PageLayoutTab[];
|
|
144
|
+
/** Edits to existing system tabs, keyed by tab key. Optional. */
|
|
97
145
|
systemTabEdits?: Record<string, SystemTabEdit>;
|
|
146
|
+
/** Ordered list of tab `key` values (new + system). Optional. */
|
|
98
147
|
tabsOrder?: string[];
|
|
148
|
+
/** Tab strip orientation. Optional. */
|
|
99
149
|
newTabLayout?: 'vertical' | 'horizontal';
|
|
100
150
|
}
|
|
101
151
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
152
|
+
* A single visibility condition applied to a section or tab.
|
|
153
|
+
*
|
|
154
|
+
* Both fields are required by the backend — pass an empty string / empty object
|
|
155
|
+
* if you have no formula or condition tree.
|
|
104
156
|
*/
|
|
105
157
|
export interface VisibilityCondition {
|
|
158
|
+
/** RQL formula that controls visibility. Required. */
|
|
106
159
|
rqlFormula: string;
|
|
160
|
+
/** Layered conditions tree (AST). Required. */
|
|
107
161
|
layeredConditionsTree: Record<string, any>;
|
|
108
162
|
}
|
|
109
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Visibility conditions for sections and tabs on a page layout.
|
|
165
|
+
*
|
|
166
|
+
* Pass `{}` for no conditions.
|
|
167
|
+
*/
|
|
110
168
|
export interface VisibilityConditions {
|
|
169
|
+
/** Per-section visibility conditions, keyed by section key. Optional. */
|
|
111
170
|
sections?: Record<string, VisibilityCondition>;
|
|
171
|
+
/** Per-tab visibility conditions, keyed by tab key. Optional. */
|
|
112
172
|
tabs?: Record<string, VisibilityCondition>;
|
|
113
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Initialization properties for {@link CustomObjectPageLayout}.
|
|
176
|
+
*/
|
|
114
177
|
export interface CustomObjectPageLayoutProps {
|
|
115
178
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
179
|
+
* Stable identifier for this layout (e.g. `'default'`).
|
|
180
|
+
*
|
|
181
|
+
* Required. Use `'default'` for the layout that drives the **Add** form and
|
|
182
|
+
* the default record detail view. Each custom object supports one `'default'`
|
|
183
|
+
* layout.
|
|
119
184
|
*/
|
|
120
185
|
apiName: string;
|
|
121
|
-
/**
|
|
186
|
+
/**
|
|
187
|
+
* Display name of this layout shown in the layout selector.
|
|
188
|
+
*
|
|
189
|
+
* Required.
|
|
190
|
+
*/
|
|
122
191
|
name: string;
|
|
123
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* Tab structure — which tabs and sections to show on the detail page.
|
|
194
|
+
*
|
|
195
|
+
* Optional. @default `{}`
|
|
196
|
+
*/
|
|
124
197
|
tabEdits?: TabEdits;
|
|
125
|
-
/**
|
|
198
|
+
/**
|
|
199
|
+
* Header configuration — title field, description field, and action buttons.
|
|
200
|
+
*
|
|
201
|
+
* Optional. @default `{}`
|
|
202
|
+
*/
|
|
126
203
|
headerEdits?: HeaderEdits;
|
|
127
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Visibility conditions for individual tabs and sections.
|
|
206
|
+
*
|
|
207
|
+
* Optional. @default `{}`
|
|
208
|
+
*/
|
|
128
209
|
visibilityConditions?: VisibilityConditions;
|
|
129
|
-
/**
|
|
210
|
+
/**
|
|
211
|
+
* Stable identifier for this layout record. Pass a human-readable slug
|
|
212
|
+
* to keep it stable across regenerations.
|
|
213
|
+
*
|
|
214
|
+
* Optional. Auto-generated when omitted. @default generateId('layout')
|
|
215
|
+
*/
|
|
130
216
|
layoutId?: string;
|
|
131
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Blueprint key used during install. Defaults to the parent object's api_name.
|
|
219
|
+
*
|
|
220
|
+
* Optional.
|
|
221
|
+
*/
|
|
132
222
|
blueprintKey?: string;
|
|
133
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* Defines a page layout and registers it with the manifest.
|
|
226
|
+
*
|
|
227
|
+
* A page layout controls the tab structure, section groupings, header fields,
|
|
228
|
+
* and visibility conditions on a custom object's record detail page. You would
|
|
229
|
+
* normally define one layout per custom object using `apiName: 'default'`.
|
|
230
|
+
*
|
|
231
|
+
* For simple single-tab layouts, use the {@link CustomObjectPageLayout.basic}
|
|
232
|
+
* factory instead of constructing the full props manually.
|
|
233
|
+
*
|
|
234
|
+
* > **Caution:** all keys inside `tabEdits` and `headerEdits` must be camelCase.
|
|
235
|
+
* > Snake_case keys are silently dropped on the wire and produce an empty layout.
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```ts
|
|
239
|
+
* new CustomObjectPageLayout(memberObj, {
|
|
240
|
+
* apiName: 'default',
|
|
241
|
+
* name: 'Member',
|
|
242
|
+
* layoutId: 'layout_gym_member',
|
|
243
|
+
* headerEdits: { newTitleField: memberDisplayName.getApiName() },
|
|
244
|
+
* tabEdits: {
|
|
245
|
+
* newTabs: [{
|
|
246
|
+
* key: 'member', name: 'Member', type: 'tab_with_sections',
|
|
247
|
+
* sections: [{
|
|
248
|
+
* key: 'profile', name: 'Profile', type: 'fields_section',
|
|
249
|
+
* fields: [
|
|
250
|
+
* { fieldRqlName: memberFirstName.getApiName() },
|
|
251
|
+
* { fieldRqlName: memberEmail.getApiName() },
|
|
252
|
+
* ],
|
|
253
|
+
* }],
|
|
254
|
+
* }],
|
|
255
|
+
* systemTabEdits: {},
|
|
256
|
+
* tabsOrder: ['member'],
|
|
257
|
+
* },
|
|
258
|
+
* visibilityConditions: {},
|
|
259
|
+
* });
|
|
260
|
+
* ```
|
|
261
|
+
*
|
|
262
|
+
* @see {@link CustomObjectPageLayout.basic} — factory for simple single-tab layouts.
|
|
263
|
+
*/
|
|
134
264
|
export declare class CustomObjectPageLayout {
|
|
135
265
|
private readonly _layoutId;
|
|
136
266
|
private readonly _apiName;
|
|
@@ -140,17 +270,47 @@ export declare class CustomObjectPageLayout {
|
|
|
140
270
|
private readonly _headerEdits;
|
|
141
271
|
private readonly _visibilityConditions;
|
|
142
272
|
private readonly _blueprintKey;
|
|
143
|
-
/**
|
|
273
|
+
/**
|
|
274
|
+
* @param customObject - The custom object this layout belongs to.
|
|
275
|
+
* @param props - Initialization properties.
|
|
276
|
+
* @throws {Error} If `apiName` or `name` is empty.
|
|
277
|
+
*/
|
|
144
278
|
constructor(customObject: CustomObject, props: CustomObjectPageLayoutProps);
|
|
145
|
-
/**
|
|
279
|
+
/**
|
|
280
|
+
* Returns the stable identifier for this layout record (e.g. `'layout_gym_member'`).
|
|
281
|
+
*/
|
|
146
282
|
getLayoutId(): string;
|
|
147
|
-
/**
|
|
283
|
+
/**
|
|
284
|
+
* Returns the api_name of this layout (e.g. `'default'`).
|
|
285
|
+
*/
|
|
148
286
|
getApiName(): string;
|
|
149
|
-
/**
|
|
287
|
+
/**
|
|
288
|
+
* Returns the api_name of the custom object this layout belongs to.
|
|
289
|
+
*/
|
|
150
290
|
getCustomObjectApiName(): string;
|
|
151
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* Serializes this layout to the wire format consumed by the manifest install endpoint.
|
|
293
|
+
*
|
|
294
|
+
* @returns A plain object with `type: 'CUSTOM_OBJECT_PAGE_LAYOUT'`.
|
|
295
|
+
*/
|
|
152
296
|
toDict(): Record<string, any>;
|
|
153
|
-
/**
|
|
297
|
+
/**
|
|
298
|
+
* Creates a simple single-tab "Details" layout with a single "General" section.
|
|
299
|
+
*
|
|
300
|
+
* Use this factory when you want a straightforward layout without customizing
|
|
301
|
+
* tabs or sections. Always uses `apiName: 'default'`.
|
|
302
|
+
*
|
|
303
|
+
* @param customObject - The custom object to create the layout for.
|
|
304
|
+
* @param props - Optional. Pass `fields` to populate the General section.
|
|
305
|
+
* @returns A new `CustomObjectPageLayout` registered with the manifest.
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* ```ts
|
|
309
|
+
* CustomObjectPageLayout.basic(memberObj, {
|
|
310
|
+
* fields: [memberFirstName, memberEmail, memberStatusField],
|
|
311
|
+
* });
|
|
312
|
+
* ```
|
|
313
|
+
*/
|
|
154
314
|
static basic(customObject: CustomObject, props?: {
|
|
155
315
|
fields?: Field[];
|
|
156
316
|
}): CustomObjectPageLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-object-page-layout.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-page-layout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-object-page-layout.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-page-layout.ts"],"names":[],"mappings":"OACO,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAMrB,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,GAAG,EAAE,MAAM,CAAC;IACZ,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kEAAkE;IAClE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yDAAyD;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,wDAAwD;IACxD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sDAAsD;IACtD,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,8DAA8D;IAC9D,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACzD,+DAA+D;IAC/D,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B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