@rippling/rippling-sdk 0.2.0-alpha.49 → 0.2.0-alpha.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +5 -0
  2. package/lib/manifest/custom-object-page-layout.d.mts +167 -48
  3. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  4. package/lib/manifest/custom-object-page-layout.d.ts +167 -48
  5. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  6. package/lib/manifest/custom-object-page-layout.js +202 -88
  7. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  8. package/lib/manifest/custom-object-page-layout.mjs +202 -88
  9. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  10. package/lib/manifest/custom-object.d.mts +1 -1
  11. package/lib/manifest/custom-object.d.ts +1 -1
  12. package/lib/manifest/custom-object.js +1 -1
  13. package/lib/manifest/custom-object.mjs +1 -1
  14. package/lib/manifest/existing-manifest-context.d.mts +1 -0
  15. package/lib/manifest/existing-manifest-context.d.mts.map +1 -1
  16. package/lib/manifest/existing-manifest-context.d.ts +1 -0
  17. package/lib/manifest/existing-manifest-context.d.ts.map +1 -1
  18. package/lib/manifest/existing-manifest-context.js +7 -6
  19. package/lib/manifest/existing-manifest-context.js.map +1 -1
  20. package/lib/manifest/existing-manifest-context.mjs +7 -6
  21. package/lib/manifest/existing-manifest-context.mjs.map +1 -1
  22. package/lib/manifest/field.d.mts +3 -3
  23. package/lib/manifest/field.d.ts +3 -3
  24. package/lib/manifest/field.js +2 -2
  25. package/lib/manifest/field.mjs +2 -2
  26. package/lib/manifest/index.d.mts +1 -1
  27. package/lib/manifest/index.d.mts.map +1 -1
  28. package/lib/manifest/index.d.ts +1 -1
  29. package/lib/manifest/index.d.ts.map +1 -1
  30. package/lib/manifest/index.js.map +1 -1
  31. package/lib/manifest/index.mjs.map +1 -1
  32. package/lib/sdui/components.d.mts +100 -211
  33. package/lib/sdui/components.d.mts.map +1 -1
  34. package/lib/sdui/components.d.ts +100 -211
  35. package/lib/sdui/components.d.ts.map +1 -1
  36. package/lib/sdui/components.js +96 -182
  37. package/lib/sdui/components.js.map +1 -1
  38. package/lib/sdui/components.mjs +93 -178
  39. package/lib/sdui/components.mjs.map +1 -1
  40. package/lib/sdui/index.d.mts +12 -52
  41. package/lib/sdui/index.d.mts.map +1 -1
  42. package/lib/sdui/index.d.ts +12 -52
  43. package/lib/sdui/index.d.ts.map +1 -1
  44. package/lib/sdui/index.js +10 -50
  45. package/lib/sdui/index.js.map +1 -1
  46. package/lib/sdui/index.mjs +5 -25
  47. package/lib/sdui/index.mjs.map +1 -1
  48. package/lib/sdui/propTypes.d.mts +3156 -3515
  49. package/lib/sdui/propTypes.d.mts.map +1 -1
  50. package/lib/sdui/propTypes.d.ts +3156 -3515
  51. package/lib/sdui/propTypes.d.ts.map +1 -1
  52. package/lib/sdui/propTypes.js +1 -1
  53. package/lib/sdui/propTypes.mjs +1 -1
  54. package/package.json +1 -1
  55. package/resources/leave-balances.d.mts +10 -0
  56. package/resources/leave-balances.d.mts.map +1 -1
  57. package/resources/leave-balances.d.ts +10 -0
  58. package/resources/leave-balances.d.ts.map +1 -1
  59. package/src/lib/manifest/custom-object-page-layout.ts +497 -180
  60. package/src/lib/manifest/custom-object.ts +1 -1
  61. package/src/lib/manifest/existing-manifest-context.ts +11 -6
  62. package/src/lib/manifest/field.ts +3 -3
  63. package/src/lib/manifest/index.ts +27 -0
  64. package/src/lib/sdui/components.ts +181 -332
  65. package/src/lib/sdui/index.ts +13 -93
  66. package/src/lib/sdui/propTypes.ts +3509 -3892
  67. package/src/resources/leave-balances.ts +12 -0
  68. package/src/version.ts +1 -1
  69. package/version.d.mts +1 -1
  70. package/version.d.ts +1 -1
  71. package/version.js +1 -1
  72. package/version.mjs +1 -1
@@ -301,7 +301,7 @@ export interface CustomObjectProps {
301
301
  * `owner_role`, `created_by`, and `last_modified_by` (all `Employee` references),
302
302
  * plus `name`, `created_at`, `updated_at`, `external_id`, and `id`. For any
303
303
  * "the employee responsible for this record" semantics, consider using
304
- * `owner_role` rather than adding a new {@link LookupField} targeting `'role'`.
304
+ * `owner_role` rather than adding a new {@link LookupField} targeting `'Employee'`.
305
305
  * `owner_role` drives Rippling's record-level permissions, so a parallel field
306
306
  * can fragment ownership and complicate the permission story.
307
307
  */
@@ -417,11 +417,9 @@ export class ExistingManifestContext {
417
417
  return this.getOrLoad(cacheKey, () => {
418
418
  const customObject = this.loadCustomObject(customObjectApiName);
419
419
  this.loadPageLayoutDependencies(customObjectApiName, component);
420
- return CustomObjectPageLayout._fromExistingComponent(customObject, component, (fieldApiName) => {
421
- const fieldComponent = this.findFieldComponent(customObjectApiName, fieldApiName);
422
- const sectionId = fieldComponent?.['section'];
423
- return typeof sectionId === 'string' ? sectionId : undefined;
424
- });
420
+ return CustomObjectPageLayout._fromExistingComponent(customObject, component, (fieldApiName) =>
421
+ this.fieldSectionIdForField(customObjectApiName, fieldApiName),
422
+ );
425
423
  });
426
424
  }
427
425
 
@@ -522,6 +520,12 @@ export class ExistingManifestContext {
522
520
  return matches[0] as Record<string, any>;
523
521
  }
524
522
 
523
+ private fieldSectionIdForField(customObjectApiName: string, fieldApiName: string): string | undefined {
524
+ const field = this.findFieldComponent(customObjectApiName, fieldApiName);
525
+ const section = field?.['section'];
526
+ return typeof section === 'string' && section.length > 0 ? section : undefined;
527
+ }
528
+
525
529
  private loadFieldReferenceComponent(component: Record<string, any>): Field {
526
530
  const cacheKey = this.cacheKey(
527
531
  'CUSTOM_OBJECT_FIELD_REF',
@@ -670,7 +674,8 @@ export class ExistingManifestContext {
670
674
  if (field == null || typeof field !== 'object') return;
671
675
  const record = field as Record<string, any>;
672
676
  const fieldSection = record['fieldSection'] ?? record['field_section'];
673
- const fieldApiName = record['fieldRqlName'] ?? record['field_rql_name'];
677
+ const fieldApiName =
678
+ record['fieldRqlName'] ?? record['field_rql_name'] ?? record['apiName'] ?? record['api_name'];
674
679
  if (typeof fieldSection === 'string') {
675
680
  const fieldLabel = typeof fieldApiName === 'string' ? ` ${fieldApiName}` : '';
676
681
  this.loadRequiredFieldSection(
@@ -721,7 +721,7 @@ export class FileField extends Field {
721
721
  export interface LookupFieldProps extends CommonFieldProps {
722
722
  /**
723
723
  * The object this field points to. Pass a live {@link CustomObject} instance,
724
- * or a raw api_name string for native Rippling models (e.g. `'role'`).
724
+ * or a raw api_name string for native Rippling models (e.g. `'Employee'`).
725
725
  *
726
726
  * Required.
727
727
  */
@@ -744,11 +744,11 @@ export interface LookupFieldProps extends CommonFieldProps {
744
744
  *
745
745
  * @remarks
746
746
  * **For "the employee responsible for this record" semantics, consider the built-in
747
- * `owner_role` standard field instead of a new `LookupField` to `'role'`.** Every
747
+ * `owner_role` standard field instead of a new `LookupField` to `'Employee'`.** Every
748
748
  * `CustomObject` ships with `owner_role` (an Employee reference) plus `created_by`
749
749
  * and `last_modified_by`. `owner_role` drives Rippling's record-level permissions,
750
750
  * so a parallel custom employee field can fragment ownership and complicate the
751
- * permission story. Consider a new `LookupField` to `'role'` when you need a
751
+ * permission story. Consider a new `LookupField` to `'Employee'` when you need a
752
752
  * *second*, non-owner employee reference (e.g. an "approver", a "manager on record").
753
753
  */
754
754
  export class LookupField extends Field {
@@ -35,28 +35,55 @@ export {
35
35
  type AddPageLayoutFieldsOptions,
36
36
  type AddPageLayoutSectionOptions,
37
37
  type AddPageLayoutTabOptions,
38
+ type BlueprintKey,
39
+ type CanvasCompositionId,
40
+ type CanvasSection,
41
+ type CustomObjectCustomSectionComponentKey,
38
42
  type CustomObjectPageLayoutLoadFromExistingOptions,
39
43
  type CustomObjectPageLayoutProps,
44
+ type CustomSection,
40
45
  type CustomTab,
46
+ type FieldMovementOption,
47
+ type FieldRqlName,
41
48
  type FieldsSection,
42
49
  type HeaderEdits,
50
+ type HeaderButtonKey,
51
+ type HeaderFieldKey,
52
+ type JsonObject,
53
+ type JsonPrimitive,
54
+ type JsonValue,
55
+ type LayoutApiName,
43
56
  type NewHeaderField,
57
+ type ObjectRqlName,
44
58
  type PageLayoutDeletionIdentifier,
45
59
  type PageLayoutMutationPosition,
46
60
  type PageLayoutSection,
61
+ type PageLayoutSectionOptions,
47
62
  type PageLayoutTab,
63
+ type RelatedFieldSection,
64
+ type RelatedObjectRqlName,
65
+ type RelatedObjectSection,
48
66
  type RemoveHeaderFieldOptions,
49
67
  type RemovePageLayoutFieldOptions,
50
68
  type RemovePageLayoutSectionOptions,
51
69
  type RemovePageLayoutTabOptions,
70
+ type ReportsSection,
71
+ type ReportsSectionItem,
72
+ type ResizableLayoutPosition,
52
73
  type SectionField,
74
+ type SectionFieldDefaultValue,
75
+ type SectionFieldInput,
53
76
  type SectionFieldOptions,
54
77
  type SectionFieldRef,
55
78
  type SectionFieldsLayout,
79
+ type SectionKey,
80
+ type SectionMovementOption,
56
81
  type SystemHeaderFieldEdit,
57
82
  type SystemSectionEdit,
58
83
  type SystemTabEdit,
84
+ type TabKey,
59
85
  type TabEdits,
86
+ type TabLayout,
60
87
  type TabWithSections,
61
88
  type VisibilityCondition,
62
89
  type VisibilityConditions,