@3ddv/software-division-components 2.0.10 → 2.0.14

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.
@@ -6,17 +6,19 @@ declare class MapLoaderComponent implements OnInit, OnDestroy {
6
6
  viewerService: _angular_core.InputSignal<{
7
7
  waitInitialize: () => Observable<any>;
8
8
  getObservable: (value: "load_success" | "load_start") => Observable<any>;
9
- }>;
9
+ } | undefined>;
10
10
  logo: _angular_core.InputSignal<string>;
11
11
  color: _angular_core.InputSignal<string>;
12
12
  duration: _angular_core.InputSignal<number>;
13
13
  size: _angular_core.InputSignal<"sm" | "md">;
14
+ isLoading: _angular_core.InputSignal<boolean | null>;
14
15
  pill: _angular_core.Signal<ElementRef<any> | undefined>;
15
16
  pillContainer: _angular_core.Signal<ElementRef<any> | undefined>;
16
17
  container: _angular_core.Signal<ElementRef<any> | undefined>;
17
18
  private isFirstLoad;
18
19
  private varName;
19
20
  private readonly handlers;
21
+ private _isLoading;
20
22
  /**
21
23
  * Retorna la variable CSS para el color del ripple.
22
24
  * Necesitamos setear la variable css --ripple-color con el color accent de la configuración.
@@ -52,7 +54,7 @@ declare class MapLoaderComponent implements OnInit, OnDestroy {
52
54
  */
53
55
  private destroyComponent;
54
56
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MapLoaderComponent, never>;
55
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MapLoaderComponent, "sdc-map-loader", never, { "viewerService": { "alias": "viewerService"; "required": true; "isSignal": true; }; "logo": { "alias": "logo"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
57
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MapLoaderComponent, "sdc-map-loader", never, { "viewerService": { "alias": "viewerService"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": true; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
56
58
  }
57
59
 
58
60
  export { MapLoaderComponent };
@@ -1,6 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit } from '@angular/core';
3
- import { BraintreePayload } from '@3ddv/software-division-components/generic/braintree';
3
+ import { BraintreePayload, BraintreeTrigger } from '@3ddv/software-division-components/generic/braintree';
4
4
  import { FormControl } from '@angular/forms';
5
5
 
6
6
  declare class AddDigitalWalletComponent implements OnInit {
@@ -12,9 +12,10 @@ declare class AddDigitalWalletComponent implements OnInit {
12
12
  readonly cancelClick: _angular_core.OutputEmitterRef<void>;
13
13
  readonly useDefaultCard: _angular_core.OutputEmitterRef<boolean>;
14
14
  useDefaultCardCtrl: FormControl<boolean | null>;
15
+ readonly trigger: BraintreeTrigger;
15
16
  private readonly destroyRef;
16
17
  ngOnInit(): void;
17
- onDigitalWalletSubmitted(data: BraintreePayload): void;
18
+ onSaveCard(): Promise<void>;
18
19
  onCancel(): void;
19
20
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AddDigitalWalletComponent, never>;
20
21
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AddDigitalWalletComponent, "sdc-add-digital-wallet", never, { "token": { "alias": "token"; "required": true; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "showCancelButton": { "alias": "showCancelButton"; "required": false; "isSignal": true; }; "showIsDefaultCardCheckbox": { "alias": "showIsDefaultCardCheckbox"; "required": false; "isSignal": true; }; }, { "braintreePayload": "braintreePayload"; "cancelClick": "cancelClick"; "useDefaultCard": "useDefaultCard"; }, never, never, true, never>;
@@ -28,9 +28,24 @@ interface BraintreeBinData {
28
28
  countryOfIssuance: string;
29
29
  }
30
30
 
31
+ /** Pass an instance to BraintreeComponent's [trigger] input. Call fire() to request payment. */
32
+ declare class BraintreeTrigger {
33
+ private readonly _count;
34
+ readonly signal: _angular_core.Signal<number>;
35
+ private _resolve;
36
+ private _reject;
37
+ /** Triggers the drop-in UI to request a payment method. Resolves with the payload on success, rejects on error. */
38
+ requestPayment(): Promise<BraintreePayload>;
39
+ /** @internal Called by BraintreeComponent when payment succeeds */
40
+ settle(payload: BraintreePayload): void;
41
+ /** @internal Called by BraintreeComponent when payment fails */
42
+ fail(err: any): void;
43
+ }
44
+
31
45
  /**
32
46
  * Braintree Drop‑in component that auto‑wires clicks
33
47
  * on the first projected element and errors if more than one.
48
+ * It also accepts a BraintreeTrigger to get the nonce without a projected element.
34
49
  * Recreates the drop‑in UI whenever isDigitalWalletPayment changes,
35
50
  * ensuring the container is empty before initialization.
36
51
  */
@@ -42,6 +57,8 @@ declare class BraintreeComponent implements OnDestroy {
42
57
  readonly token: _angular_core.InputSignal<string>;
43
58
  /** Toggle to require cardholder name */
44
59
  readonly isDigitalWalletPayment: _angular_core.InputSignal<boolean>;
60
+ /** BraintreeTrigger instance — call trigger.fire() from anywhere to request payment */
61
+ readonly trigger: _angular_core.InputSignal<BraintreeTrigger | undefined>;
45
62
  /** Emits when a payment payload is ready */
46
63
  readonly onSubmit: _angular_core.OutputEmitterRef<BraintreePayload>;
47
64
  /** Holds the Drop‑in instance */
@@ -51,12 +68,14 @@ declare class BraintreeComponent implements OnDestroy {
51
68
  /** Clears previous drop-in UI and recreates it */
52
69
  private initializeDropin;
53
70
  /** Requests payment method and emits payload */
54
- private requestPayment;
71
+ requestPayment(): void;
72
+ /** Scrolls the drop-in container into view and focuses it — called on payment error to redirect user attention. */
73
+ private focusContainer;
55
74
  /** Tears down the drop-in instance if present */
56
75
  private teardownDropin;
57
76
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<BraintreeComponent, never>;
58
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BraintreeComponent, "sdc-braintree", never, { "token": { "alias": "token"; "required": true; "isSignal": true; }; "isDigitalWalletPayment": { "alias": "isDigitalWalletPayment"; "required": false; "isSignal": true; }; }, { "onSubmit": "onSubmit"; }, never, ["*"], true, never>;
77
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BraintreeComponent, "sdc-braintree", never, { "token": { "alias": "token"; "required": true; "isSignal": true; }; "isDigitalWalletPayment": { "alias": "isDigitalWalletPayment"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; }, { "onSubmit": "onSubmit"; }, never, ["*"], true, never>;
59
78
  }
60
79
 
61
- export { BraintreeComponent };
80
+ export { BraintreeComponent, BraintreeTrigger };
62
81
  export type { BraintreeBinData, BraintreeDetails, BraintreePayload };
@@ -8,6 +8,7 @@ import { ClassValue } from 'clsx';
8
8
  declare const BUTTON_VARIANTS: {
9
9
  readonly primary: "primary";
10
10
  readonly secondary: "secondary";
11
+ readonly 'secondary-blue': "secondary-blue";
11
12
  readonly accent: "accent";
12
13
  readonly alternative: "alternative";
13
14
  readonly warning: "warning";
@@ -26,6 +27,7 @@ declare const BUTTON_VARIANTS: {
26
27
  readonly link: "link";
27
28
  readonly gray: "gray";
28
29
  readonly white: "white";
30
+ readonly icon: "icon";
29
31
  };
30
32
  type ButtonVariant = (typeof BUTTON_VARIANTS)[keyof typeof BUTTON_VARIANTS];
31
33
  type ButtonType = 'button' | 'submit' | 'reset';
@@ -54,7 +56,7 @@ declare class ButtonComponent {
54
56
  * Predefined styles to apply to the component.
55
57
  * Can be a single class or multiple classes from different categories.
56
58
  */
57
- readonly styleClass: _angular_core.InputSignal<("variant-destructive" | "variant-outline" | "variant-secondary" | "variant-link" | "variant-primary" | "variant-accent" | "variant-alternative" | "variant-warning" | "variant-success" | "variant-primary-light" | "variant-alternative-light" | "variant-success-muted" | "variant-accent-light" | "variant-warning-light" | "variant-destructive-light" | "variant-outline-white" | "variant-outline-alternative" | "variant-outline-accent" | "variant-gray" | "variant-white" | "size-sm" | "size-lg" | "size-xxs" | "size-xs" | "size-md" | "size-xl" | "size-2xl" | "size-circle-sm" | "size-circle-md" | "size-circle-lg" | "size-circle-xl" | "radius-default" | "radius-sm" | "radius-md" | "radius-lg" | "radius-xl" | "radius-2xl" | "radius-full" | "border-0" | "border-default" | "border-2" | "border-4" | "border-8")[]>;
59
+ readonly styleClass: _angular_core.InputSignal<("variant-destructive" | "variant-outline" | "variant-secondary" | "variant-link" | "variant-icon" | "variant-primary" | "variant-secondary-blue" | "variant-accent" | "variant-alternative" | "variant-warning" | "variant-success" | "variant-primary-light" | "variant-alternative-light" | "variant-success-muted" | "variant-accent-light" | "variant-warning-light" | "variant-destructive-light" | "variant-outline-white" | "variant-outline-alternative" | "variant-outline-accent" | "variant-gray" | "variant-white" | "size-sm" | "size-lg" | "size-xxs" | "size-xs" | "size-md" | "size-xl" | "size-2xl" | "size-circle-xs" | "size-circle-sm" | "size-circle-md" | "size-circle-lg" | "size-circle-xl" | "radius-default" | "radius-sm" | "radius-md" | "radius-lg" | "radius-xl" | "radius-2xl" | "radius-full" | "border-0" | "border-default" | "border-2" | "border-4" | "border-8")[]>;
58
60
  private readonly _validatedStyleClass;
59
61
  /**
60
62
  * Additional classes
@@ -138,6 +140,7 @@ declare class ButtonComponent {
138
140
  /**
139
141
  * Handles click events with debounce functionality.
140
142
  */
143
+ protected onHostClick(event: MouseEvent): void;
141
144
  protected handleClick(event: MouseEvent): void;
142
145
  /**
143
146
  * Handles focus events and emits the onFocus output.