@forgeroute/ui 0.5.35 → 0.5.36

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.
@@ -1827,6 +1827,9 @@ function safePreviewBrand(brand) {
1827
1827
  return out;
1828
1828
  }
1829
1829
  const VARIABLE_TOKEN = /\{\{\s*([A-Za-z0-9_]+)\s*\}\}/g;
1830
+ function isVariableAddress(value) {
1831
+ return /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(value.trim());
1832
+ }
1830
1833
  function usedVariableKeys(...texts) {
1831
1834
  const keys = [];
1832
1835
  for (const text of texts) for (const m of text.matchAll(VARIABLE_TOKEN)) if (!keys.includes(m[1])) keys.push(m[1]);
@@ -2179,11 +2182,12 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
2179
2182
  this.normalizedLink = computed(() => {
2180
2183
  const url = this.linkUrl().trim();
2181
2184
  if (!url) return "";
2182
- return url.startsWith("http://") || url.startsWith("https://") || url.startsWith("mailto:") ? url : "https://" + url;
2185
+ return isVariableAddress(url) || url.startsWith("http://") || url.startsWith("https://") || url.startsWith("mailto:") ? url : "https://" + url;
2183
2186
  }, ...ngDevMode ? [{ debugName: "normalizedLink" }] : /* istanbul ignore next */ []);
2184
2187
  this.linkUrlError = computed(() => {
2185
2188
  const url = this.normalizedLink();
2186
2189
  if (!url) return "";
2190
+ if (isVariableAddress(url)) return "";
2187
2191
  if (url.startsWith("mailto:")) return /^mailto:[^\s@"<>]+@[^\s@"<>]+\.[^\s@"<>]+$/.test(url) ? "" : this.labels.t("emailTemplateEditor.validEmail");
2188
2192
  return isWebUrl(url) ? "" : this.labels.t("emailTemplateEditor.validWebAddress");
2189
2193
  }, ...ngDevMode ? [{ debugName: "linkUrlError" }] : /* istanbul ignore next */ []);
@@ -3702,6 +3706,7 @@ var EmailTemplateEditorComponent = class EmailTemplateEditorComponent {
3702
3706
  inputs: [
3703
3707
  "placeholder",
3704
3708
  "ariaLabel",
3709
+ "width",
3705
3710
  "value",
3706
3711
  "maxlength",
3707
3712
  "endpoint",
@@ -4752,6 +4757,6 @@ i0.ɵɵngDeclareClassMetadata({
4752
4757
  args: [{ providedIn: "root" }]
4753
4758
  }]
4754
4759
  });
4755
- export { DEFAULT_EMAIL_TEMPLATE_BLOCK_GROUPS, DEFAULT_EMAIL_TEMPLATE_VARIABLE_GROUPS, EMAIL_BLOCK_DRAG_TYPE, EMAIL_TEMPLATE_MAX_BODY, EMAIL_TEMPLATE_MAX_TEXT, EMAIL_TEMPLATE_START_TEXT, EmailTemplateEditorComponent, InspectionTemplatePrintService, MAX_EMAIL_ADDRESS_LENGTH, RICH_TEXT_OPTIONS, RichTextEditorComponent, blockHasContent, buildInspectionTemplateHtml, buildPreviewDocument, buildVideoBlockHtml, escapeHtml, fillSampleVariables, findEmailChecks, formatCategoryLabel, formatVideoDuration, insideEditorBlock, inspectionTemplateStatusLabel, isBlockDrag, isValidEmailAddress, isWebUrl, localizedEmailBlockGroups, localizedEmailVariableGroups, plainTextToHtml, safePreviewBrand, sanitizeRichTextHtml, serializedTextLength, usedVariableKeys };
4760
+ export { DEFAULT_EMAIL_TEMPLATE_BLOCK_GROUPS, DEFAULT_EMAIL_TEMPLATE_VARIABLE_GROUPS, EMAIL_BLOCK_DRAG_TYPE, EMAIL_TEMPLATE_MAX_BODY, EMAIL_TEMPLATE_MAX_TEXT, EMAIL_TEMPLATE_START_TEXT, EmailTemplateEditorComponent, InspectionTemplatePrintService, MAX_EMAIL_ADDRESS_LENGTH, RICH_TEXT_OPTIONS, RichTextEditorComponent, blockHasContent, buildInspectionTemplateHtml, buildPreviewDocument, buildVideoBlockHtml, escapeHtml, fillSampleVariables, findEmailChecks, formatCategoryLabel, formatVideoDuration, insideEditorBlock, inspectionTemplateStatusLabel, isBlockDrag, isValidEmailAddress, isVariableAddress, isWebUrl, localizedEmailBlockGroups, localizedEmailVariableGroups, plainTextToHtml, safePreviewBrand, sanitizeRichTextHtml, serializedTextLength, usedVariableKeys };
4756
4761
 
4757
4762
  //# sourceMappingURL=forgeroute-ui-editor.mjs.map