@wawjs/ngx-bos 22.0.3 → 22.0.4

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": "@wawjs/ngx-bos",
3
- "version": "22.0.3",
3
+ "version": "22.0.4",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^22.0.0",
@@ -8,15 +8,15 @@
8
8
  "@angular/core": "^22.0.0",
9
9
  "@angular/forms": "^22.0.0",
10
10
  "@angular/router": "^22.0.0",
11
- "@wawjs/ngx-core": "^22.0.3",
12
- "@wawjs/ngx-crud": "^22.0.3",
13
- "@wawjs/ngx-ace": "^22.0.3",
14
- "@wawjs/ngx-fabric": "^22.0.3",
15
- "@wawjs/ngx-form": "^22.0.3",
16
- "@wawjs/ngx-http": "^22.0.3",
17
- "@wawjs/ngx-tinymce": "^22.0.3",
18
- "@wawjs/ngx-translate": "^22.0.3",
19
- "@wawjs/ngx-ui": "^22.0.3",
11
+ "@wawjs/ngx-core": "^22.0.7",
12
+ "@wawjs/ngx-crud": "^22.0.7",
13
+ "@wawjs/ngx-ace": "^22.0.7",
14
+ "@wawjs/ngx-fabric": "^22.0.7",
15
+ "@wawjs/ngx-form": "^22.0.7",
16
+ "@wawjs/ngx-http": "^22.0.7",
17
+ "@wawjs/ngx-tinymce": "^22.0.7",
18
+ "@wawjs/ngx-translate": "^22.0.7",
19
+ "@wawjs/ngx-ui": "^22.0.7",
20
20
  "libphonenumber-js": "^1.13.7"
21
21
  },
22
22
  "dependencies": {
@@ -7,9 +7,9 @@
7
7
  >
8
8
  @for (role of roles; track role) {
9
9
  <ng-template [cell]="role" let-user>
10
- <winput
11
- (click)="$event.stopPropagation()"
12
- (wChange)="updateRole(user, role, !!$event)"
10
+ <winput
11
+ (click)="$event.stopPropagation()"
12
+ (wChange)="updateRole(user, role, !!$event)"
13
13
  [wModel]="user.is[role]"
14
14
  type="checkbox"
15
15
  />
@@ -1,12 +1,12 @@
1
- :host ::ng-deep {
2
- .wtable__th:nth-child(n + 3):not(:last-child),
3
- .wtable__td:nth-child(n + 3):not(:last-child) {
4
- width: 1%;
5
- padding-inline: var(--sp-2);
6
- white-space: nowrap;
7
- }
8
-
9
- .wtable__td:nth-child(n + 3):not(:last-child) winput {
10
- display: inline-flex;
11
- }
12
- }
1
+ :host ::ng-deep {
2
+ .wtable__th:nth-child(n + 3):not(:last-child),
3
+ .wtable__td:nth-child(n + 3):not(:last-child) {
4
+ width: 1%;
5
+ padding-inline: var(--sp-2);
6
+ white-space: nowrap;
7
+ }
8
+
9
+ .wtable__td:nth-child(n + 3):not(:last-child) winput {
10
+ display: inline-flex;
11
+ }
12
+ }
@@ -8,55 +8,55 @@ import { User } from '../../user.interface';
8
8
  import { UserService } from '../../user.service';
9
9
 
10
10
  @Component({
11
- imports: [TableComponent, CellDirective, InputComponent],
12
- templateUrl: './users.component.html',
13
- styleUrl: './users.component.scss',
14
- })
11
+ imports: [TableComponent, CellDirective, InputComponent],
12
+ templateUrl: './users.component.html',
13
+ styleUrl: './users.component.scss',
14
+ })
15
15
  export class UsersComponent extends CrudComponent<
16
16
  UserService,
17
17
  User,
18
18
  FormInterface
19
19
  > {
20
- protected override configType: 'server' | 'local' = 'local';
21
- private readonly _formService = inject(FormService);
20
+ protected override configType: 'server' | 'local' = 'local';
21
+ private readonly _formService = inject(FormService);
22
22
 
23
23
  protected override allowUrl(): boolean {
24
24
  return false;
25
25
  }
26
26
 
27
- protected override async delete(doc: User) {
27
+ protected override async delete(doc: User) {
28
28
  this.userService.deleteAdmin(doc).subscribe(() => {
29
29
  this.setDocuments();
30
30
  });
31
- }
32
-
33
- protected override update(doc: User): void {
34
- if (this.form.formId) {
35
- this._formService.reset(
36
- this.form.formId,
37
- doc as unknown as Record<string, unknown>,
38
- );
39
- }
40
-
41
- this._formService.modal(
42
- this.form,
43
- {
44
- label: 'Update',
45
- click: (updated: unknown, close: () => void) => {
46
- close();
47
- Object.assign(doc, updated as User);
48
- this.userService.updateAdmin(doc).subscribe(() => {
49
- this.setDocuments();
50
- });
51
- },
52
- },
53
- doc,
54
- );
55
- }
31
+ }
32
+
33
+ protected override update(doc: User): void {
34
+ if (this.form.formId) {
35
+ this._formService.reset(
36
+ this.form.formId,
37
+ doc as unknown as Record<string, unknown>,
38
+ );
39
+ }
40
+
41
+ this._formService.modal(
42
+ this.form,
43
+ {
44
+ label: 'Update',
45
+ click: (updated: unknown, close: () => void) => {
46
+ close();
47
+ Object.assign(doc, updated as User);
48
+ this.userService.updateAdmin(doc).subscribe(() => {
49
+ this.setDocuments();
50
+ });
51
+ },
52
+ },
53
+ doc,
54
+ );
55
+ }
56
56
 
57
57
  private _router = inject(Router);
58
58
 
59
- userService = inject(UserService);
59
+ userService = inject(UserService);
60
60
 
61
61
  readonly roles = this._router.url.includes('admin')
62
62
  ? this.userService.roles
@@ -79,12 +79,12 @@ export class UsersComponent extends CrudComponent<
79
79
  for (const role of this.userService.roles) {
80
80
  this.columns.push(role);
81
81
  }
82
- }
83
-
84
- updateRole(user: User, role: string, value: boolean): void {
85
- user.is[role] = value;
86
- this.userService.updateAdmin(user).subscribe(() => {
87
- this.setDocuments();
88
- });
89
- }
90
- }
82
+ }
83
+
84
+ updateRole(user: User, role: string, value: boolean): void {
85
+ user.is[role] = value;
86
+ this.userService.updateAdmin(user).subscribe(() => {
87
+ this.setDocuments();
88
+ });
89
+ }
90
+ }
@@ -6,10 +6,10 @@ import { Component, input } from '@angular/core';
6
6
  styleUrl: './spider.component.scss',
7
7
  host: {
8
8
  class: 'spider',
9
- '[style.--spider-w]': 'width()',
10
- '[style.--spider-h]': 'height()',
11
- '[style.--spider-start]': 'start()',
12
- '[style.--spider-end]': 'end()',
9
+ '[style.--spider-w]': 'width()',
10
+ '[style.--spider-h]': 'height()',
11
+ '[style.--spider-start]': 'start()',
12
+ '[style.--spider-end]': 'end()',
13
13
  },
14
14
  })
15
15
  export class SpiderComponent {
@@ -27,7 +27,7 @@ export const DEFAULT_NGX_BOS_CONFIG: Required<NgxBosConfig> = {
27
27
  userForm: [],
28
28
  signPath: '/sign',
29
29
  profilePath: '/profile',
30
- defaultUserThumb: 'default.png',
30
+ defaultUserThumb: 'default.png',
31
31
  };
32
32
 
33
33
  export const NGX_BOS_CONFIG = new InjectionToken<Required<NgxBosConfig>>(
package/src/public-api.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * the source app into the package.
6
6
  */
7
7
 
8
- export const NGX_BOS_VERSION = '22.0.2' as const;
8
+ export const NGX_BOS_VERSION = '22.0.4' as const;
9
9
 
10
10
  export type NgxBosVersion = typeof NGX_BOS_VERSION;
11
11
 
@@ -331,7 +331,7 @@ declare class PhonePipe implements PipeTransform {
331
331
  static ɵpipe: _angular_core.ɵɵPipeDeclaration<PhonePipe, "phone", true>;
332
332
  }
333
333
 
334
- declare const NGX_BOS_VERSION: "22.0.2";
334
+ declare const NGX_BOS_VERSION: "22.0.4";
335
335
  type NgxBosVersion = typeof NGX_BOS_VERSION;
336
336
 
337
337
  export { ClientsComponent, DEFAULT_NGX_BOS_CONFIG, FORM_COMPONENTS, FORM_COMPONENT_FORM, FORM_TEMPLATE_COMPONENTS, FileComponent, FileSelectorComponent, FileService, FilesComponent, FormComponent, FormsComponent, NEW_USER, NGX_BOS_CONFIG, NGX_BOS_VERSION, PhonePipe, SpiderComponent, UserPreviewComponent, UserSelectorComponent, UserService, UsersComponent, adminsGuard, authenticatedGuard, clientsRoutes, createUserFormComponents, fileDefaults, fileToDataUrl, filesRoutes, formRoutes, formsRoutes, guestGuard, ngxBosProvide, provideFormComponents, provideNgxBos, resizeImageToBounds, userFormComponentsFactory, usersRoutes };