@block-auth.io/angular 0.2.6 → 0.2.7

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.
@@ -1,9 +1,9 @@
1
1
 
2
- > @block-auth.io/angular@0.2.6 pretypecheck /home/vlad/Escritorio/blockauth-code/blockauth-sdk/packages/angular
2
+ > @block-auth.io/angular@0.2.7 pretypecheck /home/vlad/Escritorio/blockauth-code/blockauth-sdk/packages/angular
3
3
  > pnpm build:css
4
4
 
5
5
 
6
- > @block-auth.io/angular@0.2.6 build:css /home/vlad/Escritorio/blockauth-code/blockauth-sdk/packages/angular
6
+ > @block-auth.io/angular@0.2.7 build:css /home/vlad/Escritorio/blockauth-code/blockauth-sdk/packages/angular
7
7
  > tailwindcss -i ../ui-styles/src/input.css -c ./tailwind.config.cjs -o ./src/styles.generated.css --minify && node scripts/css-to-ts.mjs
8
8
 
9
9
  Browserslist: caniuse-lite is outdated. Please run:
@@ -12,8 +12,8 @@ Browserslist: caniuse-lite is outdated. Please run:
12
12
 
13
13
  Rebuilding...
14
14
 
15
- Done in 1031ms.
15
+ Done in 904ms.
16
16
 
17
- > @block-auth.io/angular@0.2.6 typecheck /home/vlad/Escritorio/blockauth-code/blockauth-sdk/packages/angular
17
+ > @block-auth.io/angular@0.2.7 typecheck /home/vlad/Escritorio/blockauth-code/blockauth-sdk/packages/angular
18
18
  > tsc -p tsconfig.lib.json --noEmit
19
19
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@block-auth.io/angular",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "dependencies": {
5
5
  "nanostores": "^0.10.0",
6
6
  "tslib": "^2.6.0",
7
- "@block-auth.io/core": "0.7.0",
7
+ "@block-auth.io/core": "0.8.0",
8
8
  "@block-auth.io/ui-styles": "0.4.0"
9
9
  },
10
10
  "peerDependencies": {
@@ -1,12 +1,14 @@
1
- import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';
2
- import { $extension, $locale } from '@block-auth.io/core';
1
+ import {
2
+ ChangeDetectionStrategy,
3
+ Component,
4
+ computed,
5
+ input,
6
+ } from '@angular/core';
7
+ import { $extension, $locale, getExtensionStoreUrl } from '@block-auth.io/core';
3
8
  import { BtnBaseComponent } from '../../primitives/btn-base.component';
4
9
  import { injectBlockAuthClient } from '../../provide-block-auth';
5
10
  import { injectStore } from '../../inject-store';
6
11
 
7
- const CHROME_STORE_URL =
8
- 'https://chromewebstore.google.com/detail/block-auth-one/jhjjpmjhiamddbfhogknjibkacajkpdg';
9
-
10
12
  /**
11
13
  * El único botón que ramifica sobre el estado de la extensión (`$extension`,
12
14
  * que no está envuelto por `BlockAuthService`, se lee aquí con `injectStore`).
@@ -23,34 +25,36 @@ const CHROME_STORE_URL =
23
25
  imports: [BtnBaseComponent],
24
26
  template: `
25
27
  @if (isDropdownProfile()) {
26
- <button
27
- id="btn-provider-blockauth-dropdown"
28
- class="bas-h-full bas-w-full bas-border-0 bas-bg-transparent bas-p-0"
29
- (click)="onBtnBlockAuthClicked()"
30
- ><ng-content /></button>
28
+ <button
29
+ id="btn-provider-blockauth-dropdown"
30
+ class="bas-h-full bas-w-full bas-border-0 bas-bg-transparent bas-p-0"
31
+ (click)="onBtnBlockAuthClicked()"
32
+ >
33
+ <ng-content />
34
+ </button>
31
35
  } @else {
32
- <ba-btn-base
33
- btnId="btn-provider-blockauth"
34
- [text]="getBtnText() || text()"
35
- type="button-outlined"
36
- size="small"
37
- paddingClassNames="bas-px-12"
38
- [isIcon]="true"
39
- textClassNames="bas-text-white bas-font-semibold bas-leading-6 bas-text-base"
40
- [disabled]="disabled()"
41
- [applyDisabledStyles]="false"
42
- [isLoader]="false"
43
- [isFocusOutlinedEnabled]="false"
44
- (action)="onBtnBlockAuthClicked()"
45
- >
46
- <img
47
- slot="icon"
48
- src="https://dashboard.block-auth.io/img/blockauth_logo.png"
49
- width="24"
50
- height="24"
51
- alt="Block-Auth"
52
- />
53
- </ba-btn-base>
36
+ <ba-btn-base
37
+ btnId="btn-provider-blockauth"
38
+ [text]="getBtnText() || text()"
39
+ type="button-outlined"
40
+ size="small"
41
+ paddingClassNames="bas-px-12"
42
+ [isIcon]="true"
43
+ textClassNames="bas-text-white bas-font-semibold bas-leading-6 bas-text-base"
44
+ [disabled]="disabled()"
45
+ [applyDisabledStyles]="false"
46
+ [isLoader]="false"
47
+ [isFocusOutlinedEnabled]="false"
48
+ (action)="onBtnBlockAuthClicked()"
49
+ >
50
+ <img
51
+ slot="icon"
52
+ src="https://dashboard.block-auth.io/img/blockauth_logo.png"
53
+ width="24"
54
+ height="24"
55
+ alt="Block-Auth"
56
+ />
57
+ </ba-btn-base>
54
58
  }
55
59
  `,
56
60
  })
@@ -68,9 +72,13 @@ export class BtnBlockAuthComponent {
68
72
 
69
73
  private btnsTexts = computed(
70
74
  () =>
71
- (this.ui().uiConfig as
72
- | { config?: { content?: { btns?: Record<string, Record<string, string>> } } }
73
- | null)?.config?.content?.btns,
75
+ (
76
+ this.ui().uiConfig as {
77
+ config?: {
78
+ content?: { btns?: Record<string, Record<string, string>> };
79
+ };
80
+ } | null
81
+ )?.config?.content?.btns,
74
82
  );
75
83
  private txt = (key: string): string =>
76
84
  this.btnsTexts()?.[key]?.[this.locale()] ?? this.text();
@@ -90,7 +98,8 @@ export class BtnBlockAuthComponent {
90
98
  if (!this.ws().ready || !this.ui().isSdkSignedIn) return;
91
99
  const ext = this.ext();
92
100
  if (!ext.installed) {
93
- if (typeof window !== 'undefined') window.open(CHROME_STORE_URL, '_blank');
101
+ if (typeof window !== 'undefined')
102
+ window.open(getExtensionStoreUrl(), '_blank');
94
103
  return;
95
104
  }
96
105
  if (!ext.isUser || !ext.isUserActive || ext.isLocked) {