@newsletterstudio/umbraco 16.0.4 → 16.0.6

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.
@@ -750,7 +750,7 @@ export type MergeFieldModel = {
750
750
  /**
751
751
  * The Text / Label for the Merge Field. If this is set it will be used over any Translation Key.
752
752
  */
753
- text: string;
753
+ text?: string | null;
754
754
  /**
755
755
  * If set it will override Text with translated value if translation exists.
756
756
  */
@@ -758,7 +758,7 @@ export type MergeFieldModel = {
758
758
  /**
759
759
  * If the merge field belongs to a group, use this to indicate the group name
760
760
  */
761
- groupText: string;
761
+ groupText?: string | null;
762
762
  /**
763
763
  * If set it will override GroupText with translated value if translation exists.
764
764
  */
@@ -767,10 +767,15 @@ export type MergeFieldModel = {
767
767
  * Placeholder to use in html-template
768
768
  */
769
769
  placeholder: string;
770
+ /**
771
+ * Defines HTML to be inserted in e.g. the Rich Text Editor. Expected to contain the NewsletterStudio.Core.Rendering.MergeField.Placeholder as well.
772
+ * Use this to e.g. insert a link in the RTE
773
+ */
774
+ html?: string | null;
770
775
  /**
771
776
  * Tooltip to show in the UI (optional)
772
777
  */
773
- tooltip: string;
778
+ tooltip?: string | null;
774
779
  };
775
780
  export type NotificationHeaderModel = {
776
781
  message: string;
@@ -1,3 +1,8 @@
1
1
  import { UmbElement } from "@umbraco-cms/backoffice/element-api";
2
+ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
2
3
  /** If label is translation key returns translated text or returns label */
3
4
  export declare function localizeOrPrint(host: UmbElement, label?: string): string;
5
+ /**
6
+ * Localizes UMF-style placeholders for translations in texts like "Lorem {#ns_test}"
7
+ */
8
+ export declare function localizePlaceholders(host: UmbLitElement, text: string | null | undefined): string;
@@ -5,6 +5,6 @@ export declare function ensureEndsWithIgnoreCase(source: string, endsWith: strin
5
5
  * @param str
6
6
  */
7
7
  export declare function toFirstUpper(str: string): string;
8
- export declare function isStringEmpty(str: string | undefined | null): boolean;
8
+ export declare function isStringEmpty(str: string | undefined | null): str is "" | undefined | null;
9
9
  export declare function replaceTokens(textWithTokens: string, tokenValues: string[]): string;
10
10
  export declare function isValidEmail(email: string): boolean;
@@ -19,5 +19,6 @@ export type NsMergeFieldGroup = {
19
19
  export type NsMergeField = {
20
20
  label: string;
21
21
  value: string;
22
+ html?: string | null;
22
23
  };
23
24
  export type NsEditorToolboxTab = 'insert' | 'control' | 'row' | 'settings';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newsletterstudio/umbraco",
3
3
  "private": false,
4
- "version": "16.0.4",
4
+ "version": "16.0.6",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": null,