design-angular-kit 1.0.0-3 → 1.0.0-5

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.
Files changed (29) hide show
  1. package/README.md +7 -2
  2. package/assets/i18n/en.json +84 -0
  3. package/assets/i18n/it.json +3 -0
  4. package/esm2020/lib/components/core/notifications/notifications.component.mjs +1 -1
  5. package/esm2020/lib/components/form/input/input.component.mjs +1 -1
  6. package/esm2020/lib/components/form/textarea/textarea.component.mjs +2 -2
  7. package/esm2020/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +7 -4
  8. package/esm2020/lib/components/form/upload-file-list/upload-file-list.component.mjs +6 -4
  9. package/esm2020/lib/components/utils/language-switcher/language-switcher.component.mjs +39 -0
  10. package/esm2020/lib/design-angular-kit.module.mjs +23 -8
  11. package/esm2020/lib/interfaces/form.mjs +1 -1
  12. package/esm2020/lib/interfaces/utils.mjs +2 -0
  13. package/esm2020/lib/modules/components.module.mjs +5 -1
  14. package/esm2020/lib/validators/it-validators.mjs +13 -10
  15. package/esm2020/public_api.mjs +3 -1
  16. package/fesm2015/design-angular-kit.mjs +114 -61
  17. package/fesm2015/design-angular-kit.mjs.map +1 -1
  18. package/fesm2020/design-angular-kit.mjs +117 -59
  19. package/fesm2020/design-angular-kit.mjs.map +1 -1
  20. package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +1 -1
  21. package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +3 -1
  22. package/lib/components/utils/language-switcher/language-switcher.component.d.ts +23 -0
  23. package/lib/design-angular-kit.module.d.ts +4 -1
  24. package/lib/interfaces/form.d.ts +2 -1
  25. package/lib/interfaces/utils.d.ts +10 -0
  26. package/lib/modules/components.module.d.ts +7 -6
  27. package/lib/validators/it-validators.d.ts +7 -7
  28. package/package.json +4 -2
  29. package/public_api.d.ts +2 -0
@@ -37,7 +37,7 @@ export declare class UploadDragDropComponent extends AbstractComponent {
37
37
  start(file: File): void;
38
38
  /**
39
39
  * Percentage of upload
40
- * @param value the percentage
40
+ * @param value the percentage [0 - 100]
41
41
  */
42
42
  progress(value: number): void;
43
43
  /**
@@ -9,7 +9,9 @@ export declare class UploadFileListComponent extends AbstractComponent implement
9
9
  */
10
10
  fileList: Array<UploadFileListItem>;
11
11
  /**
12
- * The accepted file type to upload
12
+ * The accepted file type to upload <br>
13
+ * Possible values: <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types">MIME Types</a> separated by comma
14
+ * @example application/pdf,image/png
13
15
  * @default *
14
16
  */
15
17
  accept: string;
@@ -0,0 +1,23 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { TranslateService } from '@ngx-translate/core';
4
+ import { AvailableLanguage } from '../../../interfaces/utils';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LanguageSwitcherComponent implements OnInit {
7
+ private readonly translateService;
8
+ /**
9
+ * The available languages
10
+ * @default The languages available through TranslateService (ngx-translate)
11
+ */
12
+ availableLanguages?: Array<AvailableLanguage>;
13
+ currentLang$: Observable<AvailableLanguage | undefined>;
14
+ constructor(translateService: TranslateService);
15
+ ngOnInit(): void;
16
+ /**
17
+ * Change the current language
18
+ * @param lang the language code
19
+ */
20
+ changeLanguage(lang: string): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<LanguageSwitcherComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<LanguageSwitcherComponent, "it-language-switcher", never, { "availableLanguages": "availableLanguages"; }, {}, never, never, false, never>;
23
+ }
@@ -1,9 +1,12 @@
1
+ import { TranslateService } from '@ngx-translate/core';
1
2
  import * as i0 from "@angular/core";
2
3
  import * as i1 from "./modules/components.module";
3
4
  import * as i2 from "@angular/common/http";
4
5
  import * as i3 from "@ngx-translate/core";
5
6
  export declare class DesignAngularKitModule {
7
+ private readonly translateService;
8
+ constructor(translateService: TranslateService);
6
9
  static ɵfac: i0.ɵɵFactoryDeclaration<DesignAngularKitModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<DesignAngularKitModule, never, [typeof i1.ComponentsModule, typeof i2.HttpClientModule, typeof i3.TranslateModule], [typeof i1.ComponentsModule]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DesignAngularKitModule, never, [typeof i1.ComponentsModule, typeof i2.HttpClientModule, typeof i3.TranslateModule], [typeof i1.ComponentsModule, typeof i3.TranslateModule]>;
8
11
  static ɵinj: i0.ɵɵInjectorDeclaration<DesignAngularKitModule>;
9
12
  }
@@ -36,9 +36,10 @@ export interface UploadFileListItem {
36
36
  /**
37
37
  * Set the status of the item as 'error'
38
38
  */
39
- error?: string;
39
+ error?: boolean;
40
40
  /**
41
41
  * Add tooltip on file item name
42
+ * @example It can be used to show the error message or additional information about the file
42
43
  */
43
44
  tooltip?: string;
44
45
  }
@@ -0,0 +1,10 @@
1
+ export interface AvailableLanguage {
2
+ /**
3
+ * The language code
4
+ */
5
+ code: string;
6
+ /**
7
+ * Label to show
8
+ */
9
+ label: string;
10
+ }
@@ -46,13 +46,14 @@ import * as i44 from "../components/navigation/breadcrumbs/breadcrumb-item/bread
46
46
  import * as i45 from "../components/navigation/header/header.component";
47
47
  import * as i46 from "../components/utils/icon/icon.component";
48
48
  import * as i47 from "../components/utils/not-found-page/not-found-page.component";
49
- import * as i48 from "../pipes/mark-matching-text.pipe";
50
- import * as i49 from "@angular/common";
51
- import * as i50 from "@ngx-translate/core";
52
- import * as i51 from "@angular/forms";
53
- import * as i52 from "@angular/router";
49
+ import * as i48 from "../components/utils/language-switcher/language-switcher.component";
50
+ import * as i49 from "../pipes/mark-matching-text.pipe";
51
+ import * as i50 from "@angular/common";
52
+ import * as i51 from "@ngx-translate/core";
53
+ import * as i52 from "@angular/forms";
54
+ import * as i53 from "@angular/router";
54
55
  export declare class ComponentsModule {
55
56
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
56
- static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.AbstractComponent, typeof i2.AbstractFormComponent, typeof i3.AccordionComponent, typeof i4.AlertComponent, typeof i5.BadgeDirective, typeof i6.ButtonDirective, typeof i7.CalloutComponent, typeof i8.CardComponent, typeof i9.CarouselComponent, typeof i10.CarouselItemComponent, typeof i11.ChipComponent, typeof i12.CollapseComponent, typeof i13.DimmerButtonsComponent, typeof i14.DimmerComponent, typeof i15.DimmerIconComponent, typeof i16.DropdownComponent, typeof i17.DropdownItemComponent, typeof i18.ForwardDirective, typeof i19.LinkComponent, typeof i20.ListComponent, typeof i21.ListItemComponent, typeof i22.ModalComponent, typeof i23.NotificationsComponent, typeof i24.PaginationComponent, typeof i25.PopoverDirective, typeof i26.ProgressBarComponent, typeof i27.ProgressButtonComponent, typeof i28.SpinnerComponent, typeof i29.TabContainerComponent, typeof i30.TabItemComponent, typeof i31.TableComponent, typeof i32.TooltipDirective, typeof i33.CheckboxComponent, typeof i34.InputComponent, typeof i35.PasswordInputComponent, typeof i36.RadioButtonComponent, typeof i37.SelectComponent, typeof i38.TextareaComponent, typeof i39.UploadDragDropComponent, typeof i40.UploadFileListComponent, typeof i41.BackButtonComponent, typeof i42.BackToTopComponent, typeof i43.BreadcrumbComponent, typeof i44.BreadcrumbItemComponent, typeof i45.HeaderComponent, typeof i46.IconComponent, typeof i47.NotFoundPageComponent, typeof i48.MarkMatchingTextPipe], [typeof i49.CommonModule, typeof i50.TranslateModule, typeof i51.ReactiveFormsModule, typeof i49.NgIf, typeof i49.NgForOf, typeof i52.RouterLink], [typeof i3.AccordionComponent, typeof i4.AlertComponent, typeof i5.BadgeDirective, typeof i6.ButtonDirective, typeof i7.CalloutComponent, typeof i8.CardComponent, typeof i9.CarouselComponent, typeof i10.CarouselItemComponent, typeof i11.ChipComponent, typeof i12.CollapseComponent, typeof i13.DimmerButtonsComponent, typeof i14.DimmerComponent, typeof i15.DimmerIconComponent, typeof i16.DropdownComponent, typeof i17.DropdownItemComponent, typeof i18.ForwardDirective, typeof i19.LinkComponent, typeof i20.ListComponent, typeof i21.ListItemComponent, typeof i22.ModalComponent, typeof i23.NotificationsComponent, typeof i24.PaginationComponent, typeof i25.PopoverDirective, typeof i26.ProgressBarComponent, typeof i27.ProgressButtonComponent, typeof i28.SpinnerComponent, typeof i29.TabContainerComponent, typeof i30.TabItemComponent, typeof i31.TableComponent, typeof i32.TooltipDirective, typeof i33.CheckboxComponent, typeof i34.InputComponent, typeof i35.PasswordInputComponent, typeof i36.RadioButtonComponent, typeof i37.SelectComponent, typeof i38.TextareaComponent, typeof i39.UploadDragDropComponent, typeof i40.UploadFileListComponent, typeof i41.BackButtonComponent, typeof i42.BackToTopComponent, typeof i43.BreadcrumbComponent, typeof i44.BreadcrumbItemComponent, typeof i45.HeaderComponent, typeof i46.IconComponent, typeof i47.NotFoundPageComponent, typeof i48.MarkMatchingTextPipe]>;
57
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.AbstractComponent, typeof i2.AbstractFormComponent, typeof i3.AccordionComponent, typeof i4.AlertComponent, typeof i5.BadgeDirective, typeof i6.ButtonDirective, typeof i7.CalloutComponent, typeof i8.CardComponent, typeof i9.CarouselComponent, typeof i10.CarouselItemComponent, typeof i11.ChipComponent, typeof i12.CollapseComponent, typeof i13.DimmerButtonsComponent, typeof i14.DimmerComponent, typeof i15.DimmerIconComponent, typeof i16.DropdownComponent, typeof i17.DropdownItemComponent, typeof i18.ForwardDirective, typeof i19.LinkComponent, typeof i20.ListComponent, typeof i21.ListItemComponent, typeof i22.ModalComponent, typeof i23.NotificationsComponent, typeof i24.PaginationComponent, typeof i25.PopoverDirective, typeof i26.ProgressBarComponent, typeof i27.ProgressButtonComponent, typeof i28.SpinnerComponent, typeof i29.TabContainerComponent, typeof i30.TabItemComponent, typeof i31.TableComponent, typeof i32.TooltipDirective, typeof i33.CheckboxComponent, typeof i34.InputComponent, typeof i35.PasswordInputComponent, typeof i36.RadioButtonComponent, typeof i37.SelectComponent, typeof i38.TextareaComponent, typeof i39.UploadDragDropComponent, typeof i40.UploadFileListComponent, typeof i41.BackButtonComponent, typeof i42.BackToTopComponent, typeof i43.BreadcrumbComponent, typeof i44.BreadcrumbItemComponent, typeof i45.HeaderComponent, typeof i46.IconComponent, typeof i47.NotFoundPageComponent, typeof i48.LanguageSwitcherComponent, typeof i49.MarkMatchingTextPipe], [typeof i50.CommonModule, typeof i51.TranslateModule, typeof i52.ReactiveFormsModule, typeof i50.NgIf, typeof i50.NgForOf, typeof i53.RouterLink], [typeof i3.AccordionComponent, typeof i4.AlertComponent, typeof i5.BadgeDirective, typeof i6.ButtonDirective, typeof i7.CalloutComponent, typeof i8.CardComponent, typeof i9.CarouselComponent, typeof i10.CarouselItemComponent, typeof i11.ChipComponent, typeof i12.CollapseComponent, typeof i13.DimmerButtonsComponent, typeof i14.DimmerComponent, typeof i15.DimmerIconComponent, typeof i16.DropdownComponent, typeof i17.DropdownItemComponent, typeof i18.ForwardDirective, typeof i19.LinkComponent, typeof i20.ListComponent, typeof i21.ListItemComponent, typeof i22.ModalComponent, typeof i23.NotificationsComponent, typeof i24.PaginationComponent, typeof i25.PopoverDirective, typeof i26.ProgressBarComponent, typeof i27.ProgressButtonComponent, typeof i28.SpinnerComponent, typeof i29.TabContainerComponent, typeof i30.TabItemComponent, typeof i31.TableComponent, typeof i32.TooltipDirective, typeof i33.CheckboxComponent, typeof i34.InputComponent, typeof i35.PasswordInputComponent, typeof i36.RadioButtonComponent, typeof i37.SelectComponent, typeof i38.TextareaComponent, typeof i39.UploadDragDropComponent, typeof i40.UploadFileListComponent, typeof i41.BackButtonComponent, typeof i42.BackToTopComponent, typeof i43.BreadcrumbComponent, typeof i44.BreadcrumbItemComponent, typeof i45.HeaderComponent, typeof i46.IconComponent, typeof i47.NotFoundPageComponent, typeof i48.LanguageSwitcherComponent, typeof i49.MarkMatchingTextPipe]>;
57
58
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
58
59
  }
@@ -30,29 +30,29 @@ export declare class ItValidators {
30
30
  /**
31
31
  * Email validator
32
32
  */
33
- static email(): Array<ValidatorFn>;
33
+ static get email(): ValidatorFn;
34
34
  /**
35
35
  * Phone number validator
36
36
  */
37
- static tel(): ValidatorFn;
37
+ static get tel(): ValidatorFn;
38
38
  /**
39
39
  * URL validator
40
40
  */
41
- static url(): ValidatorFn;
41
+ static get url(): ValidatorFn;
42
42
  /**
43
43
  * Italian Tax Code validator
44
44
  */
45
- static taxCode(): ValidatorFn;
45
+ static get taxCode(): ValidatorFn;
46
46
  /**
47
47
  * VAT Number validator
48
48
  */
49
- static vatNumber(): ValidatorFn;
49
+ static get vatNumber(): ValidatorFn;
50
50
  /**
51
51
  * Italian Postal Code validator (CAP)
52
52
  */
53
- static cap(): ValidatorFn;
53
+ static get cap(): ValidatorFn;
54
54
  /**
55
55
  * Check if value is a valid RegExp
56
56
  */
57
- static regExp(): ValidatorFn;
57
+ static get regExp(): ValidatorFn;
58
58
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "design-angular-kit",
3
3
  "description": "Un toolkit Angular conforme alle linee guida di design per i servizi web della PA",
4
- "version": "1.0.0-3",
4
+ "version": "1.0.0-5",
5
5
  "license": "BSD-3-Clause",
6
6
  "keywords": [
7
7
  "angular",
@@ -31,11 +31,13 @@
31
31
  "tslib": "^2.4.1"
32
32
  },
33
33
  "peerDependencies": {
34
+ "@angular/animations": "^15.0.4",
34
35
  "@angular/common": "^15.0.4",
35
36
  "@angular/core": "^15.0.4",
37
+ "@angular/platform-browser": "^15.0.4",
36
38
  "@ngx-translate/core": "^14.0.0",
37
39
  "@ngx-translate/http-loader": "^7.0.0",
38
- "bootstrap-italia": "^2.2.0"
40
+ "bootstrap-italia": "^2.3.2"
39
41
  },
40
42
  "module": "fesm2015/design-angular-kit.mjs",
41
43
  "es2020": "fesm2020/design-angular-kit.mjs",
package/public_api.d.ts CHANGED
@@ -44,12 +44,14 @@ export * from './lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.com
44
44
  export * from './lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component';
45
45
  export * from './lib/components/navigation/header/header.component';
46
46
  export * from './lib/components/utils/icon/icon.component';
47
+ export * from './lib/components/utils/language-switcher/language-switcher.component';
47
48
  export * from './lib/components/utils/not-found-page/not-found-page.component';
48
49
  export * from './lib/services/notifications/notifications.service';
49
50
  export * from './lib/pipes/mark-matching-text.pipe';
50
51
  export * from './lib/interfaces/core';
51
52
  export * from './lib/interfaces/form';
52
53
  export * from './lib/interfaces/icon';
54
+ export * from './lib/interfaces/utils';
53
55
  export * from './lib/utils/regex';
54
56
  export * from './lib/utils/file-utils';
55
57
  export * from './lib/validators/it-validators';