@forgeroute/ui 0.5.32 → 0.5.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeroute/ui",
3
- "version": "0.5.32",
3
+ "version": "0.5.34",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=22.0.0",
6
6
  "@angular/core": ">=22.0.0",
@@ -2749,7 +2749,7 @@ export declare class ButtonComponent {
2749
2749
  * `ghost-start`: a ghost button for list / section toggles - a full-width row with its content aligned to the start, transparent
2750
2750
  * background, hover tint and the normal focus ring. Pair it with `ariaExpanded` / `ariaPressed`; the label may contain a heading element.
2751
2751
  */
2752
- readonly variant: import("@angular/core").InputSignal<"primary" | "danger" | "warning" | "link" | "secondary" | "ghost" | "ghost-start" | "tab" | "icon" | "icon-danger">;
2752
+ readonly variant: import("@angular/core").InputSignal<"warning" | "primary" | "secondary" | "danger" | "link" | "ghost" | "ghost-start" | "tab" | "icon" | "icon-danger">;
2753
2753
  /** Renders an anchor to this route instead of a button (use with `variant="link"` for an inline text link). `['/settings']` or `'/settings'`. While `disabled` or `loading` it renders a non-clickable `<span role="link" aria-disabled>` with no href (like `href`). */
2754
2754
  readonly routerLink: import("@angular/core").InputSignal<string | readonly unknown[] | null>;
2755
2755
  /** Query params of the `routerLink` (e.g. `{ section: 'deal-defaults' }`). */
@@ -2944,7 +2944,7 @@ export declare class ModalComponent implements OnInit, OnDestroy {
2944
2944
  */
2945
2945
  readonly describedBy: import("@angular/core").InputSignal<string | null>;
2946
2946
  readonly maxWidth: import("@angular/core").InputSignal<string>;
2947
- readonly bodyOverflow: import("@angular/core").InputSignal<"hidden" | "auto" | "visible">;
2947
+ readonly bodyOverflow: import("@angular/core").InputSignal<"auto" | "hidden" | "visible">;
2948
2948
  /** `data-testid` of the dialog element itself (the host `<ui-modal>` is always in the page, the dialog only while open). None when empty. */
2949
2949
  readonly dialogTestId: import("@angular/core").InputSignal<string>;
2950
2950
  /** Hides the header X button (e.g. while a request is running). Escape and a backdrop click still close unless `closable` is false. */
@@ -3090,12 +3090,14 @@ export declare class SidePanelComponent implements OnDestroy {
3090
3090
  readonly subtitle: import("@angular/core").InputSignal<string>;
3091
3091
  readonly wide: import("@angular/core").InputSignal<boolean>;
3092
3092
  readonly extraWide: import("@angular/core").InputSignal<boolean>;
3093
+ /** 1040px (100vw on a phone): wider than `extraWide`, for a table with many columns. */
3094
+ readonly ultraWide: import("@angular/core").InputSignal<boolean>;
3093
3095
  /** Left-aligned cancel button. Default 'Cancel'. Set to '' to hide. */
3094
3096
  readonly cancelLabelInput: import("@angular/core").InputSignal<string | null>;
3095
3097
  readonly cancelLabel: import("@angular/core").Signal<string>;
3096
3098
  /** Right-aligned primary action button label. Empty string = hidden. */
3097
3099
  readonly primaryLabel: import("@angular/core").InputSignal<string>;
3098
- readonly primaryVariant: import("@angular/core").InputSignal<"primary" | "danger" | "warning">;
3100
+ readonly primaryVariant: import("@angular/core").InputSignal<"warning" | "primary" | "danger">;
3099
3101
  readonly primaryLoading: import("@angular/core").InputSignal<boolean>;
3100
3102
  readonly primaryDisabled: import("@angular/core").InputSignal<boolean>;
3101
3103
  /** `data-testid` of the Cancel button; none when empty (default). */
@@ -3175,6 +3177,11 @@ export declare class SidePanelComponent implements OnDestroy {
3175
3177
  "required": false;
3176
3178
  "isSignal": true;
3177
3179
  };
3180
+ "ultraWide": {
3181
+ "alias": "ultraWide";
3182
+ "required": false;
3183
+ "isSignal": true;
3184
+ };
3178
3185
  "cancelLabelInput": {
3179
3186
  "alias": "cancelLabel";
3180
3187
  "required": false;
@@ -276,6 +276,25 @@ export interface EmailTemplateVideoDefaults {
276
276
  export interface EmailTemplateVideoOptions extends EmailTemplateVideoDefaults {}
277
277
  /** Builds the link a video block points at; the default is the video's own share link. */
278
278
  export type EmailTemplateVideoLinkFn = (video: EmailTemplateVideo, options: EmailTemplateVideoOptions) => string;
279
+ /**
280
+ * How an app styles the Preview and Mobile tabs so the preview looks like the email its customers receive. Every field is optional and validated
281
+ * before it is written into the preview document (a colour must be `#rgb`..`#rrggbbaa` or a plain colour name, the font a plain family list, the logo an
282
+ * http(s) address, the texts are escaped); an invalid value is ignored and the default look stays. Only the preview changes: the saved message never contains it.
283
+ */
284
+ export interface EmailTemplatePreviewBrand {
285
+ /** A font-family list, e.g. `Georgia, 'Times New Roman', serif`. */
286
+ fontFamily?: string;
287
+ textColor?: string;
288
+ linkColor?: string;
289
+ /** Colour behind the whole message. */
290
+ backgroundColor?: string;
291
+ /** An http(s) image shown above the message. */
292
+ logoUrl?: string;
293
+ /** Shown beside / below the logo above the message. */
294
+ companyName?: string;
295
+ /** Shown under the message (an address, a signature, a legal line); line breaks are kept. */
296
+ footerText?: string;
297
+ }
279
298
  interface EmailBlock {
280
299
  id: string;
281
300
  html: string;
@@ -305,6 +324,12 @@ export declare class EmailTemplateEditorComponent {
305
324
  /** The template to edit. `null` = a blank new template. An object without `id` is a new template that starts from those values (e.g. a copy). */
306
325
  readonly template: import("@angular/core").InputSignal<EmailTemplateValue | null>;
307
326
  readonly categories: import("@angular/core").InputSignal<SelectOption<string>[]>;
327
+ /** Shows the Category field (default). An app without categories sets `false`; the saved `category` then stays whatever the template already had. */
328
+ readonly showCategory: import("@angular/core").InputSignal<boolean>;
329
+ /** Shows "Use this template all year" and the Active From / To dates (default). An app whose templates are not seasonal sets `false`: nothing is shown and Save always emits `useAllYear: true` with no dates. */
330
+ readonly showActiveRange: import("@angular/core").InputSignal<boolean>;
331
+ /** Styles the Preview and Mobile tabs like the app's real emails (font, colours, logo, company name, footer); see `EmailTemplatePreviewBrand`. `null` = the default look. */
332
+ readonly previewBrand: import("@angular/core").InputSignal<EmailTemplatePreviewBrand | null>;
308
333
  readonly categoryPlaceholderInput: import("@angular/core").InputSignal<string | null>;
309
334
  readonly categoryPlaceholder: import("@angular/core").Signal<string>;
310
335
  readonly assignmentOptions: import("@angular/core").InputSignal<EmailTemplateAssignmentOption[]>;
@@ -580,6 +605,21 @@ export declare class EmailTemplateEditorComponent {
580
605
  "required": false;
581
606
  "isSignal": true;
582
607
  };
608
+ "showCategory": {
609
+ "alias": "showCategory";
610
+ "required": false;
611
+ "isSignal": true;
612
+ };
613
+ "showActiveRange": {
614
+ "alias": "showActiveRange";
615
+ "required": false;
616
+ "isSignal": true;
617
+ };
618
+ "previewBrand": {
619
+ "alias": "previewBrand";
620
+ "required": false;
621
+ "isSignal": true;
622
+ };
583
623
  "categoryPlaceholderInput": {
584
624
  "alias": "categoryPlaceholder";
585
625
  "required": false;
@@ -770,7 +810,9 @@ export declare const DEFAULT_EMAIL_TEMPLATE_VARIABLE_GROUPS: {
770
810
  * The document the Preview / Mobile tabs show (inside a sandboxed iframe): the serialised message with the base look of a sent email. A
771
811
  * Content-Security-Policy meta blocks scripts and anything but images / inline styles, and links open nowhere (sandbox, no popups).
772
812
  */
773
- export declare function buildPreviewDocument(bodyHtml: string): string;
813
+ export declare function buildPreviewDocument(bodyHtml: string, brand?: EmailTemplatePreviewBrand | null): string;
814
+ /** Keeps only the brand values that are safe to write into the preview document (see `EmailTemplatePreviewBrand`); anything else is dropped. */
815
+ export declare function safePreviewBrand(brand?: EmailTemplatePreviewBrand | null): EmailTemplatePreviewBrand;
774
816
  /** The default merge variables with names in the app's active language (the `key` and the example value stay as they are). */
775
817
  export declare function localizedEmailVariableGroups(): {
776
818
  name: string;