@openlettermarketing/olc-react-sdk 1.3.2 → 1.4.0

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/README.md CHANGED
@@ -72,11 +72,13 @@ The SDK uses several properties to manage its behavior. Below is a breakdown of
72
72
  | `olcTemplate` | _object_ | The template object to be edited or used as a base. | ⤫ | `{ ... }` |
73
73
  | `sandbox` | _boolean_ | The sandbox setting can be either true or false. Set to true for demo purposes and false for production. | ⤫ | `true` |
74
74
  | `allowSenderFields` | _boolean_ | The allowSenderFields prop can be set to either true or false. When set to true, it makes the sender fields visible in the custom fields section. | ⤫ | `true` |
75
+ | `allowPropertyFields` | _boolean_ | The allowPropertyFields prop can be set to either true or false. When set to true, it makes the property fields visible in the custom fields section. | ⤫ | `true` |
75
76
  | `onReturnAndNavigate` | _function_ | An event which triggers when a user navigates away. | ⤫ | `onReturnAndNavigate () { ... }` |
76
77
  | `onGetOneTemplate` | _function_ | An event which triggers when fetching a specific template. | ⤫ | `onGetOneTemplate ( payload ) { ... }` |
77
78
  | `onGetTemplates` | _function_ | An event which triggers when fetching all templates. | ⤫ | `onGetTemplates ( payload ) { ... }` |
78
79
  | `onGetCustomFields` | _function_ | An event which triggers when fetching custom fields for templates. | ⤫ | `onGetCustomFields () { ... }` |
79
80
  | `onSubmit` | _function_ | An event which triggers upon template submission. | ⤫ | `onSubmit () { ... }` |
81
+ | `destroy` | _function_ | An event that destroys the template builder instance and cleans up all associated components and cache. Call this function when unmounting the template builder component to ensure proper cleanup and avoid memory leaks. | ⤫ | `templateBuilderInstance.destroy()` |
80
82
  | `styles` | _object_ | An object of [JSS](https://reactjs.org/docs/faq-styling.html) props for customize styling of template builder. | ⤫ | `{ root: { ... } }` |
81
83
 
82
84
  ### 4. API Integration