design-angular-kit 1.1.0 → 1.1.2

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 (86) hide show
  1. package/README.md +66 -60
  2. package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +5 -5
  3. package/esm2022/lib/components/form/form.module.mjs +5 -1
  4. package/esm2022/lib/components/form/transfer/store/transfer.reducers.mjs +191 -0
  5. package/esm2022/lib/components/form/transfer/store/transfer.state.mjs +2 -0
  6. package/esm2022/lib/components/form/transfer/store/transfer.store.mjs +70 -0
  7. package/esm2022/lib/components/form/transfer/transfer-list/transfer-list.component.mjs +70 -0
  8. package/esm2022/lib/components/form/transfer/transfer.component.mjs +147 -0
  9. package/esm2022/lib/components/form/transfer/transfer.model.mjs +6 -0
  10. package/esm2022/lib/components/navigation/navscroll/navscroll-list-item.component.mjs +98 -0
  11. package/esm2022/lib/components/navigation/navscroll/navscroll-list-items.component.mjs +44 -0
  12. package/esm2022/lib/components/navigation/navscroll/navscroll.component.mjs +116 -0
  13. package/esm2022/lib/components/navigation/navscroll/navscroll.model.mjs +2 -0
  14. package/esm2022/lib/components/navigation/navscroll/navscroll.store.mjs +65 -0
  15. package/esm2022/lib/components/navigation/navscroll/navscroll.utils.mjs +23 -0
  16. package/esm2022/lib/design-angular-kit.module.mjs +10 -6
  17. package/esm2022/lib/provide-design-angular-kit.mjs +5 -5
  18. package/esm2022/public_api.mjs +25 -21
  19. package/fesm2022/design-angular-kit.mjs +1045 -255
  20. package/fesm2022/design-angular-kit.mjs.map +1 -1
  21. package/lib/components/form/form.module.d.ts +4 -3
  22. package/lib/components/form/transfer/store/transfer.reducers.d.ts +103 -0
  23. package/lib/components/form/transfer/store/transfer.state.d.ts +18 -0
  24. package/lib/components/form/transfer/store/transfer.store.d.ts +23 -0
  25. package/lib/components/form/transfer/transfer-list/transfer-list.component.d.ts +48 -0
  26. package/lib/components/form/transfer/transfer.component.d.ts +75 -0
  27. package/lib/components/form/transfer/transfer.model.d.ts +6 -0
  28. package/lib/components/navigation/navscroll/navscroll-list-item.component.d.ts +16 -0
  29. package/lib/components/navigation/navscroll/navscroll-list-items.component.d.ts +7 -0
  30. package/lib/components/navigation/navscroll/navscroll.component.d.ts +47 -0
  31. package/lib/components/navigation/navscroll/navscroll.model.d.ts +10 -0
  32. package/lib/components/navigation/navscroll/navscroll.store.d.ts +16 -0
  33. package/lib/components/navigation/navscroll/navscroll.utils.d.ts +6 -0
  34. package/lib/design-angular-kit.module.d.ts +8 -7
  35. package/package.json +5 -1
  36. package/public_api.d.ts +24 -20
  37. package/schematics/collection.json +19 -0
  38. package/schematics/ng-add/index.d.ts +3 -0
  39. package/schematics/ng-add/index.js +29 -0
  40. package/schematics/ng-add/index.js.map +1 -0
  41. package/schematics/ng-add/index.spec.d.ts +1 -0
  42. package/schematics/ng-add/index.spec.js +43 -0
  43. package/schematics/ng-add/index.spec.js.map +1 -0
  44. package/schematics/ng-add/rules/setup-project/add-animations.d.ts +2 -0
  45. package/schematics/ng-add/rules/setup-project/add-animations.js +11 -0
  46. package/schematics/ng-add/rules/setup-project/add-animations.js.map +1 -0
  47. package/schematics/ng-add/rules/setup-project/add-assets.d.ts +3 -0
  48. package/schematics/ng-add/rules/setup-project/add-assets.js +50 -0
  49. package/schematics/ng-add/rules/setup-project/add-assets.js.map +1 -0
  50. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.d.ts +3 -0
  51. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js +43 -0
  52. package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js.map +1 -0
  53. package/schematics/ng-add/rules/setup-project/add-http-client.d.ts +2 -0
  54. package/schematics/ng-add/rules/setup-project/add-http-client.js +11 -0
  55. package/schematics/ng-add/rules/setup-project/add-http-client.js.map +1 -0
  56. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.d.ts +11 -0
  57. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js +112 -0
  58. package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js.map +1 -0
  59. package/schematics/ng-add/rules/setup-project/add-localisation.d.ts +3 -0
  60. package/schematics/ng-add/rules/setup-project/add-localisation.js +50 -0
  61. package/schematics/ng-add/rules/setup-project/add-localisation.js.map +1 -0
  62. package/schematics/ng-add/rules/setup-project/angular-json-helper.d.ts +2 -0
  63. package/schematics/ng-add/rules/setup-project/angular-json-helper.js +13 -0
  64. package/schematics/ng-add/rules/setup-project/angular-json-helper.js.map +1 -0
  65. package/schematics/ng-add/rules/setup-project/exceptions.d.ts +7 -0
  66. package/schematics/ng-add/rules/setup-project/exceptions.js +17 -0
  67. package/schematics/ng-add/rules/setup-project/exceptions.js.map +1 -0
  68. package/schematics/ng-add/rules/setup-project/index.d.ts +6 -0
  69. package/schematics/ng-add/rules/setup-project/index.js +23 -0
  70. package/schematics/ng-add/rules/setup-project/index.js.map +1 -0
  71. package/schematics/ng-add/schema.d.ts +3 -0
  72. package/schematics/ng-add/schema.js +3 -0
  73. package/schematics/ng-add/schema.js.map +1 -0
  74. package/schematics/ng-add/schema.json +16 -0
  75. package/schematics/ng-add/setup-project.d.ts +3 -0
  76. package/schematics/ng-add/setup-project.js +37 -0
  77. package/schematics/ng-add/setup-project.js.map +1 -0
  78. package/schematics/ng-add/setup-project.spec.d.ts +1 -0
  79. package/schematics/ng-add/setup-project.spec.js +139 -0
  80. package/schematics/ng-add/setup-project.spec.js.map +1 -0
  81. package/schematics/ng-add/utils.d.ts +14 -0
  82. package/schematics/ng-add/utils.js +49 -0
  83. package/schematics/ng-add/utils.js.map +1 -0
  84. package/schematics/ng-add/versions-helper.d.ts +3 -0
  85. package/schematics/ng-add/versions-helper.js +40 -0
  86. package/schematics/ng-add/versions-helper.js.map +1 -0
@@ -8,10 +8,11 @@ import * as i6 from "./range/range.component";
8
8
  import * as i7 from "./rating/rating.component";
9
9
  import * as i8 from "./select/select.component";
10
10
  import * as i9 from "./textarea/textarea.component";
11
- import * as i10 from "./upload-drag-drop/upload-drag-drop.component";
12
- import * as i11 from "./upload-file-list/upload-file-list.component";
11
+ import * as i10 from "./transfer/transfer.component";
12
+ import * as i11 from "./upload-drag-drop/upload-drag-drop.component";
13
+ import * as i12 from "./upload-file-list/upload-file-list.component";
13
14
  export declare class ItFormModule {
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ItFormModule, never>;
15
- static ɵmod: i0.ɵɵNgModuleDeclaration<ItFormModule, never, [typeof i1.ItAutocompleteComponent, typeof i2.ItCheckboxComponent, typeof i3.ItInputComponent, typeof i4.ItPasswordInputComponent, typeof i5.ItRadioButtonComponent, typeof i6.ItRangeComponent, typeof i7.ItRatingComponent, typeof i8.ItSelectComponent, typeof i9.ItTextareaComponent, typeof i10.ItUploadDragDropComponent, typeof i11.ItUploadFileListComponent], [typeof i1.ItAutocompleteComponent, typeof i2.ItCheckboxComponent, typeof i3.ItInputComponent, typeof i4.ItPasswordInputComponent, typeof i5.ItRadioButtonComponent, typeof i6.ItRangeComponent, typeof i7.ItRatingComponent, typeof i8.ItSelectComponent, typeof i9.ItTextareaComponent, typeof i10.ItUploadDragDropComponent, typeof i11.ItUploadFileListComponent]>;
16
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ItFormModule, never, [typeof i1.ItAutocompleteComponent, typeof i2.ItCheckboxComponent, typeof i3.ItInputComponent, typeof i4.ItPasswordInputComponent, typeof i5.ItRadioButtonComponent, typeof i6.ItRangeComponent, typeof i7.ItRatingComponent, typeof i8.ItSelectComponent, typeof i9.ItTextareaComponent, typeof i10.ItTransferComponent, typeof i11.ItUploadDragDropComponent, typeof i12.ItUploadFileListComponent], [typeof i1.ItAutocompleteComponent, typeof i2.ItCheckboxComponent, typeof i3.ItInputComponent, typeof i4.ItPasswordInputComponent, typeof i5.ItRadioButtonComponent, typeof i6.ItRangeComponent, typeof i7.ItRatingComponent, typeof i8.ItSelectComponent, typeof i9.ItTextareaComponent, typeof i10.ItTransferComponent, typeof i11.ItUploadDragDropComponent, typeof i12.ItUploadFileListComponent]>;
16
17
  static ɵinj: i0.ɵɵInjectorDeclaration<ItFormModule>;
17
18
  }
@@ -0,0 +1,103 @@
1
+ import { TransferItem } from '../transfer.model';
2
+ import { SelectionState, State } from './transfer.state';
3
+ declare const _default: {
4
+ initialStateFn: <T>() => {
5
+ initialItems: {
6
+ source: never[];
7
+ target: never[];
8
+ };
9
+ current: {
10
+ source: never[];
11
+ target: never[];
12
+ };
13
+ selections: {
14
+ source: Set<TransferItem<T>>;
15
+ target: Set<TransferItem<T>>;
16
+ };
17
+ operationsEnabled: {
18
+ transfer: boolean;
19
+ backtransfer: boolean;
20
+ reset: boolean;
21
+ };
22
+ };
23
+ initFn: <T_1>(payload: SelectionState<T_1>) => (state: State<T_1>) => {
24
+ initialItems: {
25
+ source: TransferItem<T_1>[];
26
+ target: TransferItem<T_1>[];
27
+ };
28
+ current: {
29
+ source: TransferItem<T_1>[];
30
+ target: TransferItem<T_1>[];
31
+ };
32
+ selections: {
33
+ source: Set<TransferItem<T_1>>;
34
+ target: Set<TransferItem<T_1>>;
35
+ };
36
+ operationsEnabled: {
37
+ transfer: boolean;
38
+ backtransfer: boolean;
39
+ reset: boolean;
40
+ };
41
+ };
42
+ transferFn: <T_2>() => (state: State<T_2>) => {
43
+ current: {
44
+ source: TransferItem<T_2>[];
45
+ target: TransferItem<T_2>[];
46
+ };
47
+ selections: {
48
+ source: Set<TransferItem<T_2>>;
49
+ target: Set<TransferItem<T_2>>;
50
+ };
51
+ operationsEnabled: {
52
+ transfer: false;
53
+ reset: true;
54
+ backtransfer: boolean;
55
+ };
56
+ initialItems: SelectionState<T_2>;
57
+ };
58
+ backtransferFn: <T_3>() => (state: State<T_3>) => {
59
+ current: {
60
+ target: TransferItem<T_3>[];
61
+ source: TransferItem<T_3>[];
62
+ };
63
+ selections: {
64
+ target: Set<TransferItem<T_3>>;
65
+ source: Set<TransferItem<T_3>>;
66
+ };
67
+ operationsEnabled: {
68
+ backtransfer: false;
69
+ reset: true;
70
+ transfer: boolean;
71
+ };
72
+ initialItems: SelectionState<T_3>;
73
+ };
74
+ resetFn: <T_4>() => (state: State<T_4>) => {
75
+ current: {
76
+ source: TransferItem<T_4>[];
77
+ target: TransferItem<T_4>[];
78
+ };
79
+ operationsEnabled: {
80
+ reset: false;
81
+ transfer: boolean;
82
+ backtransfer: boolean;
83
+ };
84
+ initialItems: SelectionState<T_4>;
85
+ selections: {
86
+ source: Set<TransferItem<T_4>>;
87
+ target: Set<TransferItem<T_4>>;
88
+ };
89
+ };
90
+ selectAllSourceFn: <T_5>({ checked }: {
91
+ checked: boolean;
92
+ }) => (state: State<T_5>) => State<T_5>;
93
+ selectAllTargetFn: <T_6>({ checked }: {
94
+ checked: boolean;
95
+ }) => (state: State<T_6>) => State<T_6>;
96
+ selectionItemSourceFn: <T_7>({ item }: {
97
+ item: TransferItem<T_7>;
98
+ }) => (state: State<T_7>) => State<T_7>;
99
+ selectionItemTargetFn: <T_8>({ item }: {
100
+ item: TransferItem<T_8>;
101
+ }) => (state: State<T_8>) => State<T_8>;
102
+ };
103
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { TransferItem } from '../transfer.model';
2
+ export interface SelectionState<T> {
3
+ source: Array<TransferItem<T>>;
4
+ target: Array<TransferItem<T>>;
5
+ }
6
+ export interface State<T> {
7
+ initialItems: SelectionState<T>;
8
+ current: SelectionState<T>;
9
+ selections: {
10
+ source: Set<TransferItem<T>>;
11
+ target: Set<TransferItem<T>>;
12
+ };
13
+ operationsEnabled: {
14
+ transfer: boolean;
15
+ backtransfer: boolean;
16
+ reset: boolean;
17
+ };
18
+ }
@@ -0,0 +1,23 @@
1
+ import { SourceType, TransferItem } from '../transfer.model';
2
+ import { SelectionState } from './transfer.state';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TransferStore<T> {
5
+ private readonly _state;
6
+ private readonly sourceItems;
7
+ private readonly targetItems;
8
+ readonly valueChanged: import("rxjs").Observable<TransferItem<T>[]>;
9
+ readonly selectItems: (sourceType: SourceType) => import("rxjs").Observable<TransferItem<T>[]>;
10
+ readonly selectSelectedItems: (sourceType: SourceType) => import("rxjs").Observable<Set<TransferItem<T>>>;
11
+ readonly transferEnabled: import("rxjs").Observable<boolean>;
12
+ readonly backtransferEnabled: import("rxjs").Observable<boolean>;
13
+ readonly resetEnabled: import("rxjs").Observable<boolean>;
14
+ init({ source, target }: SelectionState<T>): void;
15
+ transfer(): void;
16
+ backtransfer(): void;
17
+ reset(): void;
18
+ checkboxSelection(item: TransferItem<T>, sourceType: SourceType): void;
19
+ selectAllSelection(checked: boolean, sourceType: SourceType): void;
20
+ private updateState;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<TransferStore<any>, never>;
22
+ static ɵprov: i0.ɵɵInjectableDeclaration<TransferStore<any>>;
23
+ }
@@ -0,0 +1,48 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { ItAbstractComponent } from '../../../../abstracts/abstract.component';
3
+ import { TransferStore } from '../store/transfer.store';
4
+ import { SourceType, TransferItem } from '../transfer.model';
5
+ import * as i0 from "@angular/core";
6
+ interface SelectableTransferItem<T> extends TransferItem<T> {
7
+ selected: boolean;
8
+ }
9
+ export declare class ItTransferListComponent<T> extends ItAbstractComponent {
10
+ private readonly store;
11
+ /**
12
+ * Widget title
13
+ */
14
+ readonly title: string | null;
15
+ readonly sourceType: SourceType;
16
+ private readonly items;
17
+ private readonly selected;
18
+ readonly numberOfItems$: import("rxjs").Observable<{
19
+ length: number;
20
+ } | {
21
+ length: number;
22
+ }>;
23
+ readonly selectAllDisabled: import("rxjs").Observable<boolean>;
24
+ /**
25
+ * Items of the list
26
+ * @default []
27
+ */
28
+ readonly items$: import("rxjs").Observable<SelectableTransferItem<T>[]>;
29
+ selectAllCheckboxRef: ElementRef<HTMLInputElement>;
30
+ readonly instanceId: string;
31
+ constructor(store: TransferStore<T>);
32
+ /**
33
+ * Checkbox selection click handler
34
+ */
35
+ checkboxSelectionHandler(item: TransferItem<T>): void;
36
+ /**
37
+ * Checkbox select all selection handler
38
+ */
39
+ checkboxSelectAllHandler(event: Event): void;
40
+ /**
41
+ * Items update subscription
42
+ */
43
+ private onItemsUpdate;
44
+ private getInstanceId;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<ItTransferListComponent<any>, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<ItTransferListComponent<any>, "it-transfer-list", never, {}, {}, never, never, true, never>;
47
+ }
48
+ export {};
@@ -0,0 +1,75 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { NgControl } from '@angular/forms';
3
+ import { TranslateService } from '@ngx-translate/core';
4
+ import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
5
+ import { TransferStore } from './store/transfer.store';
6
+ import { TransferItem } from './transfer.model';
7
+ import * as i0 from "@angular/core";
8
+ /**
9
+ * Transfer
10
+ * @description Component that allows the creation of checkbox lists.
11
+ */
12
+ export declare class ItTransferComponent<T = any> extends ItAbstractFormComponent<T> implements OnInit {
13
+ readonly _ngControl: NgControl;
14
+ readonly _translateService: TranslateService;
15
+ private readonly store;
16
+ /**
17
+ * The select options (left side)
18
+ */
19
+ options: never[];
20
+ /**
21
+ * The selected options (right side)
22
+ */
23
+ selected: never[];
24
+ /**
25
+ * Fired when there is a transfer, a backtransfer or a reset event
26
+ */
27
+ readonly transferChanges: EventEmitter<TransferItem<T>[]>;
28
+ /**
29
+ * Enable transfer button
30
+ * @default false
31
+ */
32
+ readonly transferEnabled: import("rxjs").Observable<boolean>;
33
+ /**
34
+ * Enable backtransfer button
35
+ * @default false
36
+ */
37
+ readonly backtransferEnabled: import("rxjs").Observable<boolean>;
38
+ /**
39
+ * Enable reset button
40
+ * @default false
41
+ */
42
+ readonly resetEnabled: import("rxjs").Observable<boolean>;
43
+ private readonly destroyRef;
44
+ constructor(_ngControl: NgControl, _translateService: TranslateService, store: TransferStore<T>);
45
+ ngOnInit(): void;
46
+ /**
47
+ * Transfer button click handler
48
+ */
49
+ transferClickHandler(event: MouseEvent): void;
50
+ /**
51
+ * Transfer button keypress handler
52
+ */
53
+ transferKeyPressHandler(event: KeyboardEvent): void;
54
+ /**
55
+ * Backtransfer button click handler
56
+ */
57
+ backtransferClickHandler(event: MouseEvent): void;
58
+ /**
59
+ * Backtransfer button keypress handler
60
+ */
61
+ backtransferKeyPressHandler(event: KeyboardEvent): void;
62
+ /**
63
+ * Reset button click handler
64
+ */
65
+ resetClickHandler(event: MouseEvent): void;
66
+ /**
67
+ * Reset button keypress handler
68
+ */
69
+ resetKeyPressHandler(event: KeyboardEvent): void;
70
+ private buttonEventHandler;
71
+ private storeInit;
72
+ private onStoreValueChanged;
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<ItTransferComponent<any>, [{ optional: true; self: true; }, null, null]>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<ItTransferComponent<any>, "it-transfer", never, { "options": { "alias": "options"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "transferChanges": "transferChanges"; }, never, never, true, never>;
75
+ }
@@ -0,0 +1,6 @@
1
+ export interface TransferItem<ValueType> {
2
+ text: string;
3
+ value: ValueType;
4
+ }
5
+ export type TransferItemSelection<ValueType> = Array<TransferItem<ValueType>>;
6
+ export type SourceType = 'source' | 'target';
@@ -0,0 +1,16 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { IsActiveMatchOptions } from '@angular/router';
3
+ import { NavscrollItem } from './navscroll.model';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ItNavscrollListItemComponent implements OnInit {
6
+ #private;
7
+ item: NavscrollItem;
8
+ readonly checkActive: EventEmitter<NavscrollItem>;
9
+ readonly rtl: any;
10
+ readonly routerLinkActiveOptions: IsActiveMatchOptions;
11
+ readonly active: import("rxjs").Observable<boolean>;
12
+ ngOnInit(): void;
13
+ clickHandler(event: Event): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ItNavscrollListItemComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<ItNavscrollListItemComponent, "it-navscroll-list-item", never, { "item": { "alias": "item"; "required": false; }; }, { "checkActive": "checkActive"; }, never, never, true, never>;
16
+ }
@@ -0,0 +1,7 @@
1
+ import { NavscrollItems } from './navscroll.model';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ItNavscrollListItemsComponent {
4
+ items: NavscrollItems;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ItNavscrollListItemsComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<ItNavscrollListItemsComponent, "it-navscroll-list-items", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,47 @@
1
+ import { ElementRef, OnInit, TemplateRef } from '@angular/core';
2
+ import { NavscrollItem } from './navscroll.model';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Navscroll
6
+ * @description Show a list of links to anchor of the document.
7
+ */
8
+ export declare class ItNavscrollComponent implements OnInit {
9
+ #private;
10
+ /**
11
+ * Header of the Navscroll
12
+ */
13
+ header: string;
14
+ /**
15
+ * A list of links
16
+ */
17
+ items: Array<NavscrollItem>;
18
+ /**
19
+ * Border position
20
+ * @default left
21
+ */
22
+ borderPosition: 'left' | 'right';
23
+ /**
24
+ * Alignment
25
+ * @default top
26
+ */
27
+ alignment: 'top' | 'bottom';
28
+ /**
29
+ * Theme
30
+ * @default light
31
+ */
32
+ theme: 'light' | 'dark';
33
+ /**
34
+ * Custom template for the content section
35
+ */
36
+ pageSectionsTemplate?: TemplateRef<any>;
37
+ onScroll(): void;
38
+ onResize(): void;
39
+ readonly toggleButtonRef: ElementRef<HTMLButtonElement>;
40
+ readonly selectedTitle: import("rxjs").Observable<string>;
41
+ readonly progressBarValue: import("rxjs").Observable<number>;
42
+ readonly isMobile: import("rxjs").Observable<boolean>;
43
+ constructor();
44
+ ngOnInit(): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<ItNavscrollComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<ItNavscrollComponent, "it-navscroll", never, { "header": { "alias": "header"; "required": false; }; "items": { "alias": "items"; "required": false; }; "borderPosition": { "alias": "borderPosition"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "pageSectionsTemplate": { "alias": "pageSectionsTemplate"; "required": false; }; }, {}, never, never, true, never>;
47
+ }
@@ -0,0 +1,10 @@
1
+ export interface NavscrollItem {
2
+ title: string;
3
+ text: string;
4
+ href: string;
5
+ childs: NavscrollItems;
6
+ }
7
+ export type NavscrollItems = Array<NavscrollItem>;
8
+ export interface NavscrollItemActive {
9
+ active: boolean;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { NavscrollItem } from './navscroll.model';
2
+ export declare class NavscrollStore {
3
+ #private;
4
+ readonly selected: import("rxjs").Observable<NavscrollItem | undefined>;
5
+ readonly progressBar: import("rxjs").Observable<number>;
6
+ readonly isMobile: import("rxjs").Observable<boolean>;
7
+ readonly menuItemSelected: import("rxjs").Observable<unknown>;
8
+ init(navscrollItems: Array<NavscrollItem>): void;
9
+ setActive(item: NavscrollItem): void;
10
+ isActive$(item: NavscrollItem): import("rxjs").Observable<boolean>;
11
+ updateProgressBar(container: HTMLElement): void;
12
+ selectMenuItem(): void;
13
+ setMobile({ innerWidth }: {
14
+ innerWidth: number;
15
+ }): void;
16
+ }
@@ -0,0 +1,6 @@
1
+ import { NavscrollItem, NavscrollItems } from './navscroll.model';
2
+ declare function searchFn(items: Set<NavscrollItem>, item: NavscrollItem): Array<NavscrollItem>;
3
+ declare function flattenNavscrollItemsFn(items: NavscrollItems): NavscrollItems;
4
+ export declare const search: typeof searchFn;
5
+ export declare const flattenNavscrollItems: typeof flattenNavscrollItemsFn;
6
+ export {};
@@ -36,16 +36,17 @@ import * as i32 from "./components/navigation/header/header.component";
36
36
  import * as i33 from "./components/navigation/navbar/navbar.module";
37
37
  import * as i34 from "./components/navigation/sidebar/sidebar.component";
38
38
  import * as i35 from "./components/navigation/megamenu/megamenu.component";
39
- import * as i36 from "./components/utils/error-page/error-page.component";
40
- import * as i37 from "./components/utils/icon/icon.component";
41
- import * as i38 from "./components/utils/language-switcher/language-switcher.component";
42
- import * as i39 from "./pipes/date-ago.pipe";
43
- import * as i40 from "./pipes/duration.pipe";
44
- import * as i41 from "./pipes/mark-matching-text.pipe";
39
+ import * as i36 from "./components/navigation/navscroll/navscroll.component";
40
+ import * as i37 from "./components/utils/error-page/error-page.component";
41
+ import * as i38 from "./components/utils/icon/icon.component";
42
+ import * as i39 from "./components/utils/language-switcher/language-switcher.component";
43
+ import * as i40 from "./pipes/date-ago.pipe";
44
+ import * as i41 from "./pipes/duration.pipe";
45
+ import * as i42 from "./pipes/mark-matching-text.pipe";
45
46
  export declare class DesignAngularKitModule {
46
47
  static forRoot(config?: DesignAngularKitConfig): ModuleWithProviders<DesignAngularKitModule>;
47
48
  static forChild(): ModuleWithProviders<DesignAngularKitModule>;
48
49
  static ɵfac: i0.ɵɵFactoryDeclaration<DesignAngularKitModule, never>;
49
- static ɵmod: i0.ɵɵNgModuleDeclaration<DesignAngularKitModule, never, [typeof i1.ItAccordionComponent, typeof i2.ItAlertComponent, typeof i3.ItAvatarModule, typeof i4.ItBadgeDirective, typeof i5.ItButtonDirective, typeof i6.ItCalloutComponent, typeof i7.ItCardComponent, typeof i8.ItCarouselModule, typeof i9.ItChipComponent, typeof i10.ItCollapseComponent, typeof i11.ItDimmerModule, typeof i12.ItDropdownModule, typeof i13.ItForwardDirective, typeof i14.ItLinkComponent, typeof i15.ItListModule, typeof i16.ItModalComponent, typeof i17.ItNotificationsComponent, typeof i18.ItPaginationComponent, typeof i19.ItPopoverDirective, typeof i20.ItProgressBarComponent, typeof i21.ItProgressButtonComponent, typeof i22.ItSpinnerComponent, typeof i23.ItSteppersModule, typeof i24.ItTabModule, typeof i25.ItTableModule, typeof i26.ItTooltipDirective, typeof i27.ItTimelineModule, typeof i28.ItFormModule, typeof i29.ItBackButtonComponent, typeof i30.ItBackToTopComponent, typeof i31.ItBreadcrumbsModule, typeof i32.ItHeaderComponent, typeof i33.ItNavBarModule, typeof i34.ItSidebarComponent, typeof i35.ItMegamenuComponent, typeof i36.ItErrorPageComponent, typeof i37.ItIconComponent, typeof i38.ItLanguageSwitcherComponent, typeof i39.ItDateAgoPipe, typeof i40.ItDurationPipe, typeof i41.ItMarkMatchingTextPipe], [typeof i1.ItAccordionComponent, typeof i2.ItAlertComponent, typeof i3.ItAvatarModule, typeof i4.ItBadgeDirective, typeof i5.ItButtonDirective, typeof i6.ItCalloutComponent, typeof i7.ItCardComponent, typeof i8.ItCarouselModule, typeof i9.ItChipComponent, typeof i10.ItCollapseComponent, typeof i11.ItDimmerModule, typeof i12.ItDropdownModule, typeof i13.ItForwardDirective, typeof i14.ItLinkComponent, typeof i15.ItListModule, typeof i16.ItModalComponent, typeof i17.ItNotificationsComponent, typeof i18.ItPaginationComponent, typeof i19.ItPopoverDirective, typeof i20.ItProgressBarComponent, typeof i21.ItProgressButtonComponent, typeof i22.ItSpinnerComponent, typeof i23.ItSteppersModule, typeof i24.ItTabModule, typeof i25.ItTableModule, typeof i26.ItTooltipDirective, typeof i27.ItTimelineModule, typeof i28.ItFormModule, typeof i29.ItBackButtonComponent, typeof i30.ItBackToTopComponent, typeof i31.ItBreadcrumbsModule, typeof i32.ItHeaderComponent, typeof i33.ItNavBarModule, typeof i34.ItSidebarComponent, typeof i35.ItMegamenuComponent, typeof i36.ItErrorPageComponent, typeof i37.ItIconComponent, typeof i38.ItLanguageSwitcherComponent, typeof i39.ItDateAgoPipe, typeof i40.ItDurationPipe, typeof i41.ItMarkMatchingTextPipe]>;
50
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DesignAngularKitModule, never, [typeof i1.ItAccordionComponent, typeof i2.ItAlertComponent, typeof i3.ItAvatarModule, typeof i4.ItBadgeDirective, typeof i5.ItButtonDirective, typeof i6.ItCalloutComponent, typeof i7.ItCardComponent, typeof i8.ItCarouselModule, typeof i9.ItChipComponent, typeof i10.ItCollapseComponent, typeof i11.ItDimmerModule, typeof i12.ItDropdownModule, typeof i13.ItForwardDirective, typeof i14.ItLinkComponent, typeof i15.ItListModule, typeof i16.ItModalComponent, typeof i17.ItNotificationsComponent, typeof i18.ItPaginationComponent, typeof i19.ItPopoverDirective, typeof i20.ItProgressBarComponent, typeof i21.ItProgressButtonComponent, typeof i22.ItSpinnerComponent, typeof i23.ItSteppersModule, typeof i24.ItTabModule, typeof i25.ItTableModule, typeof i26.ItTooltipDirective, typeof i27.ItTimelineModule, typeof i28.ItFormModule, typeof i29.ItBackButtonComponent, typeof i30.ItBackToTopComponent, typeof i31.ItBreadcrumbsModule, typeof i32.ItHeaderComponent, typeof i33.ItNavBarModule, typeof i34.ItSidebarComponent, typeof i35.ItMegamenuComponent, typeof i36.ItNavscrollComponent, typeof i37.ItErrorPageComponent, typeof i38.ItIconComponent, typeof i39.ItLanguageSwitcherComponent, typeof i40.ItDateAgoPipe, typeof i41.ItDurationPipe, typeof i42.ItMarkMatchingTextPipe], [typeof i1.ItAccordionComponent, typeof i2.ItAlertComponent, typeof i3.ItAvatarModule, typeof i4.ItBadgeDirective, typeof i5.ItButtonDirective, typeof i6.ItCalloutComponent, typeof i7.ItCardComponent, typeof i8.ItCarouselModule, typeof i9.ItChipComponent, typeof i10.ItCollapseComponent, typeof i11.ItDimmerModule, typeof i12.ItDropdownModule, typeof i13.ItForwardDirective, typeof i14.ItLinkComponent, typeof i15.ItListModule, typeof i16.ItModalComponent, typeof i17.ItNotificationsComponent, typeof i18.ItPaginationComponent, typeof i19.ItPopoverDirective, typeof i20.ItProgressBarComponent, typeof i21.ItProgressButtonComponent, typeof i22.ItSpinnerComponent, typeof i23.ItSteppersModule, typeof i24.ItTabModule, typeof i25.ItTableModule, typeof i26.ItTooltipDirective, typeof i27.ItTimelineModule, typeof i28.ItFormModule, typeof i29.ItBackButtonComponent, typeof i30.ItBackToTopComponent, typeof i31.ItBreadcrumbsModule, typeof i32.ItHeaderComponent, typeof i33.ItNavBarModule, typeof i34.ItSidebarComponent, typeof i35.ItMegamenuComponent, typeof i36.ItNavscrollComponent, typeof i37.ItErrorPageComponent, typeof i38.ItIconComponent, typeof i39.ItLanguageSwitcherComponent, typeof i40.ItDateAgoPipe, typeof i41.ItDurationPipe, typeof i42.ItMarkMatchingTextPipe]>;
50
51
  static ɵinj: i0.ɵɵInjectorDeclaration<DesignAngularKitModule>;
51
52
  }
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.1.0",
4
+ "version": "1.1.2",
5
5
  "license": "BSD-3-Clause",
6
6
  "keywords": [
7
7
  "angular",
@@ -27,6 +27,10 @@
27
27
  "url": "https://www.net-serv.it/"
28
28
  }
29
29
  ],
30
+ "schematics": "./schematics/collection.json",
31
+ "ng-add": {
32
+ "save": "dependencies"
33
+ },
30
34
  "dependencies": {
31
35
  "tslib": "^2.6.3"
32
36
  },
package/public_api.d.ts CHANGED
@@ -1,32 +1,32 @@
1
- export * from './lib/provide-design-angular-kit';
2
1
  export * from './lib/design-angular-kit.module';
2
+ export * from './lib/provide-design-angular-kit';
3
3
  export * from './lib/components/core/accordion/accordion.component';
4
4
  export * from './lib/components/core/alert/alert.component';
5
- export * from './lib/components/core/avatar/avatar.module';
6
- export * from './lib/components/core/avatar/avatar.directive';
7
5
  export * from './lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component';
8
6
  export * from './lib/components/core/avatar/avatar-group/avatar-group.component';
7
+ export * from './lib/components/core/avatar/avatar.directive';
8
+ export * from './lib/components/core/avatar/avatar.module';
9
9
  export * from './lib/components/core/badge/badge.directive';
10
10
  export * from './lib/components/core/button/button.directive';
11
11
  export * from './lib/components/core/callout/callout.component';
12
12
  export * from './lib/components/core/card/card.component';
13
+ export * from './lib/components/core/carousel/carousel-item/carousel-item.component';
13
14
  export * from './lib/components/core/carousel/carousel.module';
14
15
  export * from './lib/components/core/carousel/carousel/carousel.component';
15
- export * from './lib/components/core/carousel/carousel-item/carousel-item.component';
16
16
  export * from './lib/components/core/chip/chip.component';
17
17
  export * from './lib/components/core/collapse/collapse.component';
18
- export * from './lib/components/core/dimmer/dimmer.module';
19
- export * from './lib/components/core/dimmer/dimmer.component';
20
18
  export * from './lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component';
21
19
  export * from './lib/components/core/dimmer/dimmer-icon/dimmer-icon.component';
20
+ export * from './lib/components/core/dimmer/dimmer.component';
21
+ export * from './lib/components/core/dimmer/dimmer.module';
22
+ export * from './lib/components/core/dropdown/dropdown-item/dropdown-item.component';
22
23
  export * from './lib/components/core/dropdown/dropdown.module';
23
24
  export * from './lib/components/core/dropdown/dropdown/dropdown.component';
24
- export * from './lib/components/core/dropdown/dropdown-item/dropdown-item.component';
25
25
  export * from './lib/components/core/forward/forward.directive';
26
26
  export * from './lib/components/core/link/link.component';
27
+ export * from './lib/components/core/list/list-item/list-item.component';
27
28
  export * from './lib/components/core/list/list.module';
28
29
  export * from './lib/components/core/list/list/list.component';
29
- export * from './lib/components/core/list/list-item/list-item.component';
30
30
  export * from './lib/components/core/modal/modal.component';
31
31
  export * from './lib/components/core/notifications/notifications.component';
32
32
  export * from './lib/components/core/pagination/pagination.component';
@@ -34,23 +34,23 @@ export * from './lib/components/core/popover/popover.directive';
34
34
  export * from './lib/components/core/progress-bar/progress-bar.component';
35
35
  export * from './lib/components/core/progress-button/progress-button.component';
36
36
  export * from './lib/components/core/spinner/spinner.component';
37
- export * from './lib/components/core/steppers/steppers.module';
38
37
  export * from './lib/components/core/steppers/steppers-container/steppers-container.component';
39
38
  export * from './lib/components/core/steppers/steppers-item/steppers-item.component';
40
- export * from './lib/components/core/tab/tab.module';
39
+ export * from './lib/components/core/steppers/steppers.module';
41
40
  export * from './lib/components/core/tab/tab-container/tab-container.component';
42
41
  export * from './lib/components/core/tab/tab-item/tab-item.component';
43
- export * from './lib/components/core/table/table.module';
44
- export * from './lib/components/core/table/table.component';
45
- export * from './lib/components/core/table/sort/sort.directive';
42
+ export * from './lib/components/core/tab/tab.module';
46
43
  export * from './lib/components/core/table/sort/sort-header/sort-header.component';
47
- export * from './lib/components/core/timeline/timeline.module';
48
- export * from './lib/components/core/timeline/timeline.component';
44
+ export * from './lib/components/core/table/sort/sort.directive';
45
+ export * from './lib/components/core/table/table.component';
46
+ export * from './lib/components/core/table/table.module';
49
47
  export * from './lib/components/core/timeline/timeline-item/timeline-item.component';
48
+ export * from './lib/components/core/timeline/timeline.component';
49
+ export * from './lib/components/core/timeline/timeline.module';
50
50
  export * from './lib/components/core/tooltip/tooltip.directive';
51
- export * from './lib/components/form/form.module';
52
51
  export * from './lib/components/form/autocomplete/autocomplete.component';
53
52
  export * from './lib/components/form/checkbox/checkbox.component';
53
+ export * from './lib/components/form/form.module';
54
54
  export * from './lib/components/form/input/input.component';
55
55
  export * from './lib/components/form/password-input/password-input.component';
56
56
  export * from './lib/components/form/radio-button/radio-button.component';
@@ -58,18 +58,22 @@ export * from './lib/components/form/range/range.component';
58
58
  export * from './lib/components/form/rating/rating.component';
59
59
  export * from './lib/components/form/select/select.component';
60
60
  export * from './lib/components/form/textarea/textarea.component';
61
+ export * from './lib/components/form/transfer/transfer.component';
62
+ export * from './lib/components/form/transfer/transfer.model';
61
63
  export * from './lib/components/form/upload-drag-drop/upload-drag-drop.component';
62
64
  export * from './lib/components/form/upload-file-list/upload-file-list.component';
63
65
  export * from './lib/components/navigation/back-button/back-button.component';
64
66
  export * from './lib/components/navigation/back-to-top/back-to-top.component';
65
- export * from './lib/components/navigation/breadcrumbs/breadcrumbs.module';
66
- export * from './lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component';
67
67
  export * from './lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component';
68
+ export * from './lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component';
69
+ export * from './lib/components/navigation/breadcrumbs/breadcrumbs.module';
68
70
  export * from './lib/components/navigation/header/header.component';
69
71
  export * from './lib/components/navigation/megamenu/megamenu.component';
72
+ export * from './lib/components/navigation/navbar/navbar-item/navbar-item.component';
70
73
  export * from './lib/components/navigation/navbar/navbar.module';
71
74
  export * from './lib/components/navigation/navbar/navbar/navbar.component';
72
- export * from './lib/components/navigation/navbar/navbar-item/navbar-item.component';
75
+ export * from './lib/components/navigation/navscroll/navscroll.component';
76
+ export * from './lib/components/navigation/navscroll/navscroll.model';
73
77
  export * from './lib/components/navigation/sidebar/sidebar.component';
74
78
  export * from './lib/components/utils/error-page/error-page.component';
75
79
  export * from './lib/components/utils/icon/icon.component';
@@ -84,7 +88,7 @@ export * from './lib/interfaces/core';
84
88
  export * from './lib/interfaces/form';
85
89
  export * from './lib/interfaces/icon';
86
90
  export * from './lib/interfaces/utils';
87
- export * from './lib/utils/regex';
88
91
  export * from './lib/utils/date-utils';
89
92
  export * from './lib/utils/file-utils';
93
+ export * from './lib/utils/regex';
90
94
  export * from './lib/validators/it-validators';
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "ng-add": {
5
+ "description": "Add my Design Angular Kit to the project.",
6
+ "factory": "./ng-add/index",
7
+ "schema": "./ng-add/schema.json",
8
+ "hidden": true,
9
+ "aliases": ["install"]
10
+ },
11
+ "ng-add-setup-project": {
12
+ "description": "Sets up the specified project after the ng-add dependencies have been installed",
13
+ "factory": "./ng-add/setup-project",
14
+ "schema": "./ng-add/schema.json",
15
+ "hidden": true,
16
+ "private": true
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,3 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ import { Schema } from './schema';
3
+ export default function (options: Schema): Rule;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
4
+ const utils_1 = require("./utils");
5
+ const versions_helper_1 = require("./versions-helper");
6
+ const DESIGN_ANGULAR_KIT_PACKAGE_NAME = 'design-angular-kit';
7
+ const NG_LATEST_VERSION = '19.0.0';
8
+ function default_1(options) {
9
+ return (host, context) => {
10
+ // Get the version of `@angular/core`
11
+ // This tag should be preferred because all Angular dependencies should have the same version tag if possible.
12
+ const ngCoreVersionTag = (0, utils_1.getPackageVersionFromPackageJson)(host, '@angular/core');
13
+ const designAngularKitVersionRange = (0, utils_1.getPackageVersionFromPackageJson)(host, DESIGN_ANGULAR_KIT_PACKAGE_NAME);
14
+ const angularDependencyVersion = ngCoreVersionTag || NG_LATEST_VERSION;
15
+ const { major: angularMajorVersion } = (0, utils_1.toSemVerObject)(angularDependencyVersion);
16
+ const designAngularKitPackageVersion = (0, versions_helper_1.getPackageVersion)({ angularMajorVersion });
17
+ // The CLI inserts `design-angular-kit` into the `package.json` before this schematic runs.
18
+ // This means that we do not need to insert Design Angular Kit into `package.json` files again.
19
+ if (designAngularKitVersionRange === null) {
20
+ (0, utils_1.addPackageToPackageJson)(host, DESIGN_ANGULAR_KIT_PACKAGE_NAME, designAngularKitPackageVersion);
21
+ }
22
+ (0, utils_1.addPackageToPackageJson)(host, '@angular/cdk', angularDependencyVersion);
23
+ (0, utils_1.addPackageToPackageJson)(host, '@angular/animations', angularDependencyVersion);
24
+ const installTaskId = context.addTask(new tasks_1.NodePackageInstallTask());
25
+ context.addTask(new tasks_1.RunSchematicTask('ng-add-setup-project', options), [installTaskId]);
26
+ };
27
+ }
28
+ exports.default = default_1;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/design-angular-kit/schematics/ng-add/index.ts"],"names":[],"mappings":";;AACA,4DAA4F;AAG5F,mCAAoG;AACpG,uDAAsD;AAEtD,MAAM,+BAA+B,GAAG,oBAAoB,CAAC;AAC7D,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEnC,mBAAyB,OAAe;IACtC,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,qCAAqC;QACrC,+GAA+G;QAC/G,MAAM,gBAAgB,GAAG,IAAA,wCAAgC,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QACjF,MAAM,4BAA4B,GAAG,IAAA,wCAAgC,EAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;QAC7G,MAAM,wBAAwB,GAAG,gBAAgB,IAAI,iBAAiB,CAAC;QAEvE,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,GAAG,IAAA,sBAAc,EAAC,wBAAwB,CAAC,CAAC;QAEhF,MAAM,8BAA8B,GAAG,IAAA,mCAAiB,EAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAElF,2FAA2F;QAC3F,+FAA+F;QAC/F,IAAI,4BAA4B,KAAK,IAAI,EAAE,CAAC;YAC1C,IAAA,+BAAuB,EAAC,IAAI,EAAE,+BAA+B,EAAE,8BAA8B,CAAC,CAAC;QACjG,CAAC;QAED,IAAA,+BAAuB,EAAC,IAAI,EAAE,cAAc,EAAE,wBAAwB,CAAC,CAAC;QACxE,IAAA,+BAAuB,EAAC,IAAI,EAAE,qBAAqB,EAAE,wBAAwB,CAAC,CAAC;QAE/E,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAEpE,OAAO,CAAC,OAAO,CAAC,IAAI,wBAAgB,CAAC,sBAAsB,EAAE,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAC1F,CAAC,CAAC;AACJ,CAAC;AAzBD,4BAyBC"}
@@ -0,0 +1 @@
1
+ export {};