design-angular-kit 1.2.2 → 1.3.0
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/assets/i18n/en.json +89 -0
- package/assets/i18n/it.json +89 -0
- package/esm2022/lib/abstracts/abstract-form.component.mjs +19 -6
- package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +8 -6
- package/esm2022/lib/components/core/video-player/video-player-i18n.model.mjs +2 -0
- package/esm2022/lib/components/core/video-player/video-player-i18n.service.mjs +130 -0
- package/esm2022/lib/components/core/video-player/video-player.component.mjs +303 -0
- package/esm2022/lib/components/core/video-player/video-player.config.mjs +43 -0
- package/esm2022/lib/components/core/video-player/video-player.cookie.mjs +25 -0
- package/esm2022/lib/components/core/video-player/video-player.model.mjs +3 -0
- package/esm2022/lib/components/core/video-player/video-player.module.mjs +16 -0
- package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +144 -78
- package/esm2022/lib/components/form/form.module.mjs +6 -2
- package/esm2022/lib/components/form/input/input.component.mjs +3 -3
- package/esm2022/lib/components/form/search/search.component.mjs +112 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll-list-item.component.mjs +2 -3
- package/esm2022/lib/design-angular-kit.module.mjs +8 -4
- package/esm2022/lib/interfaces/form.mjs +1 -1
- package/esm2022/lib/validators/it-validators.mjs +6 -1
- package/esm2022/public_api.mjs +7 -3
- package/fesm2022/design-angular-kit.mjs +782 -90
- package/fesm2022/design-angular-kit.mjs.map +1 -1
- package/lib/abstracts/abstract-form.component.d.ts +6 -4
- package/lib/components/core/carousel/carousel/carousel.component.d.ts +1 -1
- package/lib/components/core/video-player/video-player-i18n.model.d.ts +179 -0
- package/lib/components/core/video-player/video-player-i18n.service.d.ts +17 -0
- package/lib/components/core/video-player/video-player.component.d.ts +48 -0
- package/lib/components/core/video-player/video-player.config.d.ts +68 -0
- package/lib/components/core/video-player/video-player.cookie.d.ts +6 -0
- package/lib/components/core/video-player/video-player.model.d.ts +44 -0
- package/lib/components/core/video-player/video-player.module.d.ts +7 -0
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +55 -39
- package/lib/components/form/form.module.d.ts +13 -12
- package/lib/components/form/search/search.component.d.ts +59 -0
- package/lib/design-angular-kit.module.d.ts +18 -17
- package/lib/interfaces/form.d.ts +3 -3
- package/lib/validators/it-validators.d.ts +1 -0
- package/package.json +20 -7
- package/public_api.d.ts +6 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ControlValueAccessor, FormControl, NgControl, ValidatorFn } from '@angular/forms';
|
|
1
|
+
import { ControlContainer, ControlValueAccessor, FormControl, NgControl, ValidatorFn } from '@angular/forms';
|
|
2
2
|
import { DoCheck, OnInit } from '@angular/core';
|
|
3
3
|
import { ItAbstractComponent } from './abstract.component';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
@@ -8,6 +8,7 @@ import * as i1 from "../utils/coercion";
|
|
|
8
8
|
export declare abstract class ItAbstractFormComponent<T = any> extends ItAbstractComponent implements OnInit, ControlValueAccessor, DoCheck {
|
|
9
9
|
protected readonly _translateService: TranslateService;
|
|
10
10
|
protected readonly _ngControl: NgControl;
|
|
11
|
+
protected fgd?: ControlContainer | undefined;
|
|
11
12
|
/**
|
|
12
13
|
* The label of form control
|
|
13
14
|
*/
|
|
@@ -18,7 +19,7 @@ export declare abstract class ItAbstractFormComponent<T = any> extends ItAbstrac
|
|
|
18
19
|
* - <b>false</b>: Never show validation color
|
|
19
20
|
* - <b>only-valid</b>: Show only valid validation color
|
|
20
21
|
* - <b>only-invalid</b>: Show only invalid validation color
|
|
21
|
-
* @default <b>
|
|
22
|
+
* @default <b>false</b>: Do not show the validation color by default
|
|
22
23
|
*/
|
|
23
24
|
validationMode: boolean | 'only-valid' | 'only-invalid';
|
|
24
25
|
/**
|
|
@@ -29,7 +30,7 @@ export declare abstract class ItAbstractFormComponent<T = any> extends ItAbstrac
|
|
|
29
30
|
* Internal form control
|
|
30
31
|
*/
|
|
31
32
|
protected control: FormControl<T>;
|
|
32
|
-
constructor(_translateService: TranslateService, _ngControl: NgControl);
|
|
33
|
+
constructor(_translateService: TranslateService, _ngControl: NgControl, fgd?: ControlContainer | undefined);
|
|
33
34
|
/**
|
|
34
35
|
* Check if field is invalid (Validation failed)
|
|
35
36
|
*/
|
|
@@ -81,7 +82,8 @@ export declare abstract class ItAbstractFormComponent<T = any> extends ItAbstrac
|
|
|
81
82
|
* null is returned.
|
|
82
83
|
*/
|
|
83
84
|
getError(errorCode: string, path?: Array<string | number> | string): any;
|
|
84
|
-
|
|
85
|
+
private setValidationModeWhenInAForm;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItAbstractFormComponent<any>, [null, { optional: true; self: true; }, { optional: true; }]>;
|
|
85
87
|
static ɵcmp: i0.ɵɵComponentDeclaration<ItAbstractFormComponent<any>, "ng-component", never, { "label": { "alias": "label"; "required": false; }; "validationMode": { "alias": "validationMode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
86
88
|
static ngAcceptInputType_disabled: i1.BooleanInput;
|
|
87
89
|
}
|
|
@@ -53,7 +53,7 @@ export declare class ItCarouselComponent implements AfterViewInit, OnDestroy {
|
|
|
53
53
|
ngAfterViewInit(): void;
|
|
54
54
|
ngOnDestroy(): void;
|
|
55
55
|
/**
|
|
56
|
-
* Removes
|
|
56
|
+
* Removes Carousel features
|
|
57
57
|
*/
|
|
58
58
|
dispose(): void;
|
|
59
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<ItCarouselComponent, never>;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
interface VideoJsTranslation {
|
|
2
|
+
'Audio Player': string;
|
|
3
|
+
'Video Player': string;
|
|
4
|
+
Play: string;
|
|
5
|
+
Pause: string;
|
|
6
|
+
Replay: string;
|
|
7
|
+
'Current Time': string;
|
|
8
|
+
Duration: string;
|
|
9
|
+
'Remaining Time': string;
|
|
10
|
+
'Stream Type': string;
|
|
11
|
+
LIVE: string;
|
|
12
|
+
Loaded: string;
|
|
13
|
+
Progress: string;
|
|
14
|
+
'Progress Bar': string;
|
|
15
|
+
'progress bar timing: currentTime={1} duration={2}': string;
|
|
16
|
+
Fullscreen: string;
|
|
17
|
+
'Exit Fullscreen': string;
|
|
18
|
+
Mute: string;
|
|
19
|
+
Unmute: string;
|
|
20
|
+
'Playback Rate': string;
|
|
21
|
+
Subtitles: string;
|
|
22
|
+
'subtitles off': string;
|
|
23
|
+
Captions: string;
|
|
24
|
+
'captions off': string;
|
|
25
|
+
Chapters: string;
|
|
26
|
+
Descriptions: string;
|
|
27
|
+
'descriptions off': string;
|
|
28
|
+
'Audio Track': string;
|
|
29
|
+
'Volume Level': string;
|
|
30
|
+
'You aborted the media playback': string;
|
|
31
|
+
'A network error caused the media download to fail part-way.': string;
|
|
32
|
+
'The media could not be loaded, either because the server or network failed or because the format is not supported.': string;
|
|
33
|
+
'The media playback was aborted due to a corruption problem or because the media used features your browser did not support.': string;
|
|
34
|
+
'No compatible source was found for this media.': string;
|
|
35
|
+
'The media is encrypted and we do not have the keys to decrypt it.': string;
|
|
36
|
+
'Play Video': string;
|
|
37
|
+
Close: string;
|
|
38
|
+
'Close Modal Dialog': string;
|
|
39
|
+
'Modal Window': string;
|
|
40
|
+
'This is a modal window': string;
|
|
41
|
+
'This modal can be closed by pressing the Escape key or activating the close button.': string;
|
|
42
|
+
', opens captions settings dialog': string;
|
|
43
|
+
', opens subtitles settings dialog': string;
|
|
44
|
+
', opens descriptions settings dialog': string;
|
|
45
|
+
', selected': string;
|
|
46
|
+
'captions settings': string;
|
|
47
|
+
'subtitles settings': string;
|
|
48
|
+
'descriptions settings': string;
|
|
49
|
+
Text: string;
|
|
50
|
+
White: string;
|
|
51
|
+
Black: string;
|
|
52
|
+
Red: string;
|
|
53
|
+
Green: string;
|
|
54
|
+
Blue: string;
|
|
55
|
+
Yellow: string;
|
|
56
|
+
Magenta: string;
|
|
57
|
+
Cyan: string;
|
|
58
|
+
Background: string;
|
|
59
|
+
Window: string;
|
|
60
|
+
Transparent: string;
|
|
61
|
+
'Semi-Transparent': string;
|
|
62
|
+
Opaque: string;
|
|
63
|
+
'Font Size': string;
|
|
64
|
+
'Text Edge Style': string;
|
|
65
|
+
None: string;
|
|
66
|
+
Uniform: string;
|
|
67
|
+
'Drop shadow': string;
|
|
68
|
+
'Font Family': string;
|
|
69
|
+
'Proportional Sans-Serif': string;
|
|
70
|
+
'Monospace Sans-Serif': string;
|
|
71
|
+
'Proportional Serif': string;
|
|
72
|
+
'Monospace Serif': string;
|
|
73
|
+
'Small Caps': string;
|
|
74
|
+
Reset: string;
|
|
75
|
+
'restore all settings to the default values': string;
|
|
76
|
+
Done: string;
|
|
77
|
+
'Caption Settings Dialog': string;
|
|
78
|
+
'Beginning of dialog window. Escape will cancel and close the window.': string;
|
|
79
|
+
'End of dialog window.': string;
|
|
80
|
+
'{1} is loading.': string;
|
|
81
|
+
'Exit Picture-in-Picture': string;
|
|
82
|
+
'Picture-in-Picture': string;
|
|
83
|
+
Color: string;
|
|
84
|
+
Opacity: string;
|
|
85
|
+
'Text Background': string;
|
|
86
|
+
'Caption Area Background': string;
|
|
87
|
+
'Skip forward {1} seconds': string;
|
|
88
|
+
'Skip backward {1} seconds': string;
|
|
89
|
+
}
|
|
90
|
+
interface VideoPlayerTranslations {
|
|
91
|
+
'audio-player': string;
|
|
92
|
+
'video-player': string;
|
|
93
|
+
play: string;
|
|
94
|
+
pause: string;
|
|
95
|
+
replay: string;
|
|
96
|
+
'current-time': string;
|
|
97
|
+
duration: string;
|
|
98
|
+
'remaining-time': string;
|
|
99
|
+
'stream-type': string;
|
|
100
|
+
live: string;
|
|
101
|
+
loaded: string;
|
|
102
|
+
progress: string;
|
|
103
|
+
'progress-bar': string;
|
|
104
|
+
'progress-bar-timing:-currenttime={1}-duration={2}': string;
|
|
105
|
+
fullscreen: string;
|
|
106
|
+
'exit-fullscreen': string;
|
|
107
|
+
mute: string;
|
|
108
|
+
unmute: string;
|
|
109
|
+
'playback-rate': string;
|
|
110
|
+
subtitles: string;
|
|
111
|
+
'subtitles-off': string;
|
|
112
|
+
captions: string;
|
|
113
|
+
'captions-off': string;
|
|
114
|
+
chapters: string;
|
|
115
|
+
descriptions: string;
|
|
116
|
+
'descriptions-off': string;
|
|
117
|
+
'audio-track': string;
|
|
118
|
+
'volume-level': string;
|
|
119
|
+
'you-aborted-the-media-playback': string;
|
|
120
|
+
'a-network-error-caused-the-media-download-to-fail-part-way.': string;
|
|
121
|
+
'the-media-could-not-be-loaded,-either-because-the-server-or-network-failed-or-because-the-format-is-not-supported.': string;
|
|
122
|
+
'the-media-playback-was-aborted-due-to-a-corruption-problem-or-because-the-media-used-features-your-browser-did-not-support.': string;
|
|
123
|
+
'no-compatible-source-was-found-for-this-media.': string;
|
|
124
|
+
'the-media-is-encrypted-and-we-do-not-have-the-keys-to-decrypt-it.': string;
|
|
125
|
+
'play-video': string;
|
|
126
|
+
close: string;
|
|
127
|
+
'close-modal-dialog': string;
|
|
128
|
+
'modal-window': string;
|
|
129
|
+
'this-is-a-modal-window': string;
|
|
130
|
+
'this-modal-can-be-closed-by-pressing-the-escape-key-or-activating-the-close-button.': string;
|
|
131
|
+
',-opens-captions-settings-dialog': string;
|
|
132
|
+
',-opens-subtitles-settings-dialog': string;
|
|
133
|
+
',-opens-descriptions-settings-dialog': string;
|
|
134
|
+
',-selected': string;
|
|
135
|
+
'captions-settings': string;
|
|
136
|
+
'subtitles-settings': string;
|
|
137
|
+
'descriptions-settings': string;
|
|
138
|
+
text: string;
|
|
139
|
+
white: string;
|
|
140
|
+
black: string;
|
|
141
|
+
red: string;
|
|
142
|
+
green: string;
|
|
143
|
+
blue: string;
|
|
144
|
+
yellow: string;
|
|
145
|
+
magenta: string;
|
|
146
|
+
cyan: string;
|
|
147
|
+
background: string;
|
|
148
|
+
window: string;
|
|
149
|
+
transparent: string;
|
|
150
|
+
'semi-transparent': string;
|
|
151
|
+
opaque: string;
|
|
152
|
+
'font-size': string;
|
|
153
|
+
'text-edge-style': string;
|
|
154
|
+
none: string;
|
|
155
|
+
uniform: string;
|
|
156
|
+
'drop-shadow': string;
|
|
157
|
+
'font-family': string;
|
|
158
|
+
'proportional-sans-serif': string;
|
|
159
|
+
'monospace-sans-serif': string;
|
|
160
|
+
'proportional-serif': string;
|
|
161
|
+
'monospace-serif': string;
|
|
162
|
+
'small-caps': string;
|
|
163
|
+
reset: string;
|
|
164
|
+
'restore-all-settings-to-the-default-values': string;
|
|
165
|
+
done: string;
|
|
166
|
+
'caption-settings-dialog': string;
|
|
167
|
+
'beginning-of-dialog-window.-escape-will-cancel-and-close-the-window.': string;
|
|
168
|
+
'end-of-dialog-window.': string;
|
|
169
|
+
'{1}-is-loading.': string;
|
|
170
|
+
'exit-picture-in-picture': string;
|
|
171
|
+
'picture-in-picture': string;
|
|
172
|
+
color: string;
|
|
173
|
+
opacity: string;
|
|
174
|
+
'text-background': string;
|
|
175
|
+
'caption-area-background': string;
|
|
176
|
+
'skip-forward-{1}-seconds': string;
|
|
177
|
+
'skip-backward-{1}-seconds': string;
|
|
178
|
+
}
|
|
179
|
+
export type { VideoJsTranslation, VideoPlayerTranslations };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DestroyRef } from '@angular/core';
|
|
2
|
+
import Player from 'video.js/dist/types/player';
|
|
3
|
+
import { VideoJsTranslation } from './video-player-i18n.model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class VideoPlayerI18nService {
|
|
6
|
+
#private;
|
|
7
|
+
init(player: Player, destroyRef: DestroyRef): void;
|
|
8
|
+
getLanguage(): {
|
|
9
|
+
languages: {
|
|
10
|
+
[x: string]: VideoJsTranslation;
|
|
11
|
+
};
|
|
12
|
+
language: string;
|
|
13
|
+
};
|
|
14
|
+
private getTranslations;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VideoPlayerI18nService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VideoPlayerI18nService>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import Player from 'video.js/dist/types/player';
|
|
4
|
+
import { ItAbstractComponent } from '../../../abstracts/abstract.component';
|
|
5
|
+
import { VideoPlayerI18nService } from './video-player-i18n.service';
|
|
6
|
+
import { VideoPlayerConfigService } from './video-player.config';
|
|
7
|
+
import { ItVideoPlayerOptions } from './video-player.model';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
declare enum ViewType {
|
|
10
|
+
Default = "DEFAULT",
|
|
11
|
+
Overlay = "OVERLAY"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Video Player
|
|
15
|
+
* @description Component that allows playing a video.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ItVideoPlayerComponent extends ItAbstractComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
18
|
+
#private;
|
|
19
|
+
private config;
|
|
20
|
+
/**
|
|
21
|
+
* Options for video player configuration
|
|
22
|
+
*/
|
|
23
|
+
options: ItVideoPlayerOptions;
|
|
24
|
+
videoPlayerRef?: ElementRef<HTMLVideoElement>;
|
|
25
|
+
acceptOveralyRef?: ElementRef<HTMLDivElement>;
|
|
26
|
+
acceptOverlayableRef?: ElementRef<HTMLDivElement>;
|
|
27
|
+
chrRememberRef?: ElementRef<HTMLInputElement>;
|
|
28
|
+
player?: Player;
|
|
29
|
+
readonly viewTypes: typeof ViewType;
|
|
30
|
+
readonly viewType$: BehaviorSubject<ViewType | undefined>;
|
|
31
|
+
readonly cookieAccepted$: BehaviorSubject<boolean>;
|
|
32
|
+
protected readonly i18nService: VideoPlayerI18nService;
|
|
33
|
+
private get viewType();
|
|
34
|
+
constructor(config: VideoPlayerConfigService);
|
|
35
|
+
ngOnInit(): Promise<void>;
|
|
36
|
+
ngAfterViewInit(): void;
|
|
37
|
+
ngOnDestroy(): void;
|
|
38
|
+
acceptCookieHandler(): void;
|
|
39
|
+
private initVideoPlayer;
|
|
40
|
+
private setVideoPlayer;
|
|
41
|
+
private setViewType;
|
|
42
|
+
private hideOverlay;
|
|
43
|
+
private rememberHandler;
|
|
44
|
+
private setVideoAttributes;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItVideoPlayerComponent, never>;
|
|
46
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ItVideoPlayerComponent, "it-video-player", never, { "options": { "alias": "options"; "required": false; }; }, {}, never, ["[transcriptionTitle]", "[transcriptionText]"], true, never>;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ItVideoPlayerOptions } from './video-player.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export type Tech = 'html5' | 'youtube';
|
|
4
|
+
export declare class VideoPlayerConfigService {
|
|
5
|
+
#private;
|
|
6
|
+
configureTech({ tech }: {
|
|
7
|
+
tech: Tech;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
mergeConfig(o: ItVideoPlayerOptions): {
|
|
10
|
+
preload: "" | "auto" | "none" | "metadata";
|
|
11
|
+
techOrder: string[];
|
|
12
|
+
tracks: {
|
|
13
|
+
kind: string;
|
|
14
|
+
lang: string;
|
|
15
|
+
src: string;
|
|
16
|
+
label: string;
|
|
17
|
+
default?: true | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
tech: string;
|
|
20
|
+
autoplay?: boolean | ("any" | "play" | "muted") | undefined;
|
|
21
|
+
controls?: boolean | undefined;
|
|
22
|
+
fluid?: boolean | undefined;
|
|
23
|
+
loop?: boolean | undefined;
|
|
24
|
+
muted?: boolean | undefined;
|
|
25
|
+
poster?: string | undefined;
|
|
26
|
+
sources: import("./video-player.model").Source[];
|
|
27
|
+
captions?: import("./video-player.model").Caption[] | undefined;
|
|
28
|
+
chapters?: import("./video-player.model").Chapter[] | undefined;
|
|
29
|
+
languages: {
|
|
30
|
+
[x: string]: import("./video-player-i18n.model").VideoJsTranslation;
|
|
31
|
+
};
|
|
32
|
+
language: string;
|
|
33
|
+
} | {
|
|
34
|
+
sources: (import("./video-player.model").Source & {
|
|
35
|
+
type: "video/youtube";
|
|
36
|
+
})[];
|
|
37
|
+
tech: string;
|
|
38
|
+
youtube: {
|
|
39
|
+
ytControls: number;
|
|
40
|
+
rel: number;
|
|
41
|
+
fs: number;
|
|
42
|
+
modestbranding: number;
|
|
43
|
+
};
|
|
44
|
+
preload: "" | "auto" | "none" | "metadata";
|
|
45
|
+
techOrder: string[];
|
|
46
|
+
tracks: {
|
|
47
|
+
kind: string;
|
|
48
|
+
lang: string;
|
|
49
|
+
src: string;
|
|
50
|
+
label: string;
|
|
51
|
+
default?: true | undefined;
|
|
52
|
+
}[];
|
|
53
|
+
autoplay?: boolean | ("any" | "play" | "muted") | undefined;
|
|
54
|
+
controls?: boolean | undefined;
|
|
55
|
+
fluid?: boolean | undefined;
|
|
56
|
+
loop?: boolean | undefined;
|
|
57
|
+
muted?: boolean | undefined;
|
|
58
|
+
poster?: string | undefined;
|
|
59
|
+
captions?: import("./video-player.model").Caption[] | undefined;
|
|
60
|
+
chapters?: import("./video-player.model").Chapter[] | undefined;
|
|
61
|
+
languages: {
|
|
62
|
+
[x: string]: import("./video-player-i18n.model").VideoJsTranslation;
|
|
63
|
+
};
|
|
64
|
+
language: string;
|
|
65
|
+
};
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VideoPlayerConfigService, never>;
|
|
67
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VideoPlayerConfigService>;
|
|
68
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
interface Source {
|
|
2
|
+
src: string;
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
5
|
+
interface Caption {
|
|
6
|
+
lang: string;
|
|
7
|
+
src: string;
|
|
8
|
+
label: string;
|
|
9
|
+
default?: true;
|
|
10
|
+
}
|
|
11
|
+
interface Chapter {
|
|
12
|
+
lang: string;
|
|
13
|
+
src: string;
|
|
14
|
+
label: string;
|
|
15
|
+
default?: true;
|
|
16
|
+
}
|
|
17
|
+
type Sources = Array<Source>;
|
|
18
|
+
type Captions = Array<Caption>;
|
|
19
|
+
type Chapters = Array<Chapter>;
|
|
20
|
+
type Preload = 'auto' | 'none' | 'metadata' | '';
|
|
21
|
+
type EmbedSourceType = 'video/youtube';
|
|
22
|
+
type TAutoplay = 'muted' | 'play' | 'any';
|
|
23
|
+
type ItNativeVideoPlayerOptions = {
|
|
24
|
+
autoplay?: boolean | TAutoplay;
|
|
25
|
+
controls?: boolean;
|
|
26
|
+
fluid?: boolean;
|
|
27
|
+
loop?: boolean;
|
|
28
|
+
muted?: boolean;
|
|
29
|
+
poster?: string;
|
|
30
|
+
preload?: Preload;
|
|
31
|
+
sources: Sources;
|
|
32
|
+
captions?: Captions;
|
|
33
|
+
chapters?: Chapters;
|
|
34
|
+
};
|
|
35
|
+
type ItEmbedVideoPlayerOptions = Omit<ItNativeVideoPlayerOptions, 'sources' | 'captions' | 'chapters'> & {
|
|
36
|
+
source: Source & {
|
|
37
|
+
type: EmbedSourceType;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
type ItVideoPlayerOptions = ItNativeVideoPlayerOptions | ItEmbedVideoPlayerOptions;
|
|
41
|
+
type ItVideoPlayerConfig = ItVideoPlayerOptions & {
|
|
42
|
+
tech: string;
|
|
43
|
+
};
|
|
44
|
+
export type { Caption, Chapter, ItEmbedVideoPlayerOptions, ItNativeVideoPlayerOptions, ItVideoPlayerConfig, ItVideoPlayerOptions, Source };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./video-player.component";
|
|
3
|
+
export declare class ItVideoPlayerModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItVideoPlayerModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ItVideoPlayerModule, never, [typeof i1.ItVideoPlayerComponent], [typeof i1.ItVideoPlayerComponent]>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ItVideoPlayerModule>;
|
|
7
|
+
}
|
|
@@ -1,59 +1,75 @@
|
|
|
1
|
-
import { EventEmitter
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
3
2
|
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
4
|
-
import { AutocompleteItem } from '../../../interfaces/form';
|
|
5
3
|
import * as i0 from "@angular/core";
|
|
6
|
-
|
|
7
|
-
export declare class ItAutocompleteComponent extends ItAbstractFormComponent<string | null | undefined>
|
|
4
|
+
type functionSource = (query: string, populateResults: (results: string[]) => void) => void;
|
|
5
|
+
export declare class ItAutocompleteComponent extends ItAbstractFormComponent<string | null | undefined> {
|
|
8
6
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @default undefined
|
|
7
|
+
* Autocomplete elements.
|
|
8
|
+
* @default []
|
|
12
9
|
*/
|
|
13
|
-
|
|
10
|
+
source: string[] | functionSource;
|
|
14
11
|
/**
|
|
15
|
-
*
|
|
12
|
+
* Autocomplete if required.
|
|
13
|
+
* @default false
|
|
16
14
|
*/
|
|
17
|
-
|
|
15
|
+
required: boolean;
|
|
18
16
|
/**
|
|
19
|
-
*
|
|
20
|
-
* Useful when the user is typing multiple letters
|
|
21
|
-
* @default 300 [ms]
|
|
17
|
+
* Input field name
|
|
22
18
|
*/
|
|
23
|
-
|
|
19
|
+
name: string | undefined;
|
|
24
20
|
/**
|
|
25
|
-
* The input
|
|
21
|
+
* The input description
|
|
26
22
|
*/
|
|
27
|
-
|
|
23
|
+
description: string | undefined;
|
|
28
24
|
/**
|
|
29
|
-
*
|
|
25
|
+
* Prevents suggestions from appearing if fewer than N characters are typed
|
|
26
|
+
* @default 0
|
|
30
27
|
*/
|
|
31
|
-
|
|
28
|
+
minLength: number;
|
|
32
29
|
/**
|
|
33
|
-
*
|
|
30
|
+
* Default value
|
|
34
31
|
*/
|
|
35
|
-
|
|
32
|
+
defaultValue: string | null;
|
|
36
33
|
/**
|
|
37
|
-
*
|
|
34
|
+
* Function to set assistive hint label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization
|
|
38
35
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
assistiveHintLabel: () => string;
|
|
37
|
+
/**
|
|
38
|
+
* Function to set label in case of no result. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization
|
|
39
|
+
*/
|
|
40
|
+
noResultsLabel: () => string;
|
|
41
|
+
/**
|
|
42
|
+
* Function to set label that alerts you that query's too short. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization
|
|
43
|
+
*/
|
|
44
|
+
statusQueryTooShortLabel: (minQueryLength: number) => string;
|
|
45
|
+
/**
|
|
46
|
+
* Function to set no results label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization
|
|
47
|
+
*/
|
|
48
|
+
statusNoResultsLabel: () => string;
|
|
49
|
+
/**
|
|
50
|
+
* Function to set selected option label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization
|
|
51
|
+
*/
|
|
52
|
+
statusSelectedOptionLabel: (selectedOption: string, length: number, index: number) => string;
|
|
47
53
|
/**
|
|
48
|
-
*
|
|
54
|
+
* Function to set status results label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization
|
|
49
55
|
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
statusResultsLabel: (length: number, contentSelectedOption: string) => string;
|
|
57
|
+
/**
|
|
58
|
+
* Fired when value changes
|
|
59
|
+
*/
|
|
60
|
+
selected: EventEmitter<any>;
|
|
61
|
+
private selectAutocompleteEl?;
|
|
62
|
+
private selectAutocomplete?;
|
|
63
|
+
private value;
|
|
64
|
+
private _interval;
|
|
65
|
+
private _inputEl;
|
|
66
|
+
ngOnInit(): void;
|
|
67
|
+
clear(): void;
|
|
68
|
+
_findInput(): void;
|
|
69
|
+
private _setAndCheck;
|
|
70
|
+
private _initInputEl;
|
|
71
|
+
ngAfterViewInit(): void;
|
|
55
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<ItAutocompleteComponent, never>;
|
|
56
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ItAutocompleteComponent, "it-autocomplete", never, { "
|
|
57
|
-
static ngAcceptInputType_big: i1.BooleanInput;
|
|
58
|
-
static ngAcceptInputType_forceShowLabel: i1.BooleanInput;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ItAutocompleteComponent, "it-autocomplete", never, { "source": { "alias": "source"; "required": false; }; "required": { "alias": "required"; "required": false; }; "name": { "alias": "name"; "required": false; }; "description": { "alias": "description"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "assistiveHintLabel": { "alias": "assistiveHintLabel"; "required": false; }; "noResultsLabel": { "alias": "noResultsLabel"; "required": false; }; "statusQueryTooShortLabel": { "alias": "statusQueryTooShortLabel"; "required": false; }; "statusNoResultsLabel": { "alias": "statusNoResultsLabel"; "required": false; }; "statusSelectedOptionLabel": { "alias": "statusSelectedOptionLabel"; "required": false; }; "statusResultsLabel": { "alias": "statusResultsLabel"; "required": false; }; }, { "selected": "selected"; }, never, ["[error]"], true, never>;
|
|
59
74
|
}
|
|
75
|
+
export {};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./autocomplete/autocomplete.component";
|
|
3
|
-
import * as i2 from "./
|
|
4
|
-
import * as i3 from "./
|
|
5
|
-
import * as i4 from "./
|
|
6
|
-
import * as i5 from "./
|
|
7
|
-
import * as i6 from "./
|
|
8
|
-
import * as i7 from "./
|
|
9
|
-
import * as i8 from "./
|
|
10
|
-
import * as i9 from "./
|
|
11
|
-
import * as i10 from "./
|
|
12
|
-
import * as i11 from "./
|
|
13
|
-
import * as i12 from "./upload-
|
|
3
|
+
import * as i2 from "./search/search.component";
|
|
4
|
+
import * as i3 from "./checkbox/checkbox.component";
|
|
5
|
+
import * as i4 from "./input/input.component";
|
|
6
|
+
import * as i5 from "./password-input/password-input.component";
|
|
7
|
+
import * as i6 from "./radio-button/radio-button.component";
|
|
8
|
+
import * as i7 from "./range/range.component";
|
|
9
|
+
import * as i8 from "./rating/rating.component";
|
|
10
|
+
import * as i9 from "./select/select.component";
|
|
11
|
+
import * as i10 from "./textarea/textarea.component";
|
|
12
|
+
import * as i11 from "./transfer/transfer.component";
|
|
13
|
+
import * as i12 from "./upload-drag-drop/upload-drag-drop.component";
|
|
14
|
+
import * as i13 from "./upload-file-list/upload-file-list.component";
|
|
14
15
|
export declare class ItFormModule {
|
|
15
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ItFormModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ItFormModule, never, [typeof i1.ItAutocompleteComponent, typeof i2.
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ItFormModule, never, [typeof i1.ItAutocompleteComponent, typeof i2.ItSearchComponent, typeof i3.ItCheckboxComponent, typeof i4.ItInputComponent, typeof i5.ItPasswordInputComponent, typeof i6.ItRadioButtonComponent, typeof i7.ItRangeComponent, typeof i8.ItRatingComponent, typeof i9.ItSelectComponent, typeof i10.ItTextareaComponent, typeof i11.ItTransferComponent, typeof i12.ItUploadDragDropComponent, typeof i13.ItUploadFileListComponent], [typeof i1.ItAutocompleteComponent, typeof i2.ItSearchComponent, typeof i3.ItCheckboxComponent, typeof i4.ItInputComponent, typeof i5.ItPasswordInputComponent, typeof i6.ItRadioButtonComponent, typeof i7.ItRangeComponent, typeof i8.ItRatingComponent, typeof i9.ItSelectComponent, typeof i10.ItTextareaComponent, typeof i11.ItTransferComponent, typeof i12.ItUploadDragDropComponent, typeof i13.ItUploadFileListComponent]>;
|
|
17
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<ItFormModule>;
|
|
18
19
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
4
|
+
import { SearchItem } from '../../../interfaces/form';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../../utils/coercion";
|
|
7
|
+
export declare class ItSearchComponent extends ItAbstractFormComponent<string | null | undefined> implements OnInit {
|
|
8
|
+
/**
|
|
9
|
+
* Indicates the list of searchable elements on which to base the input search system
|
|
10
|
+
* If you need to retrieve items via API, can pass a function of Observable
|
|
11
|
+
* @default undefined
|
|
12
|
+
*/
|
|
13
|
+
searchData: Array<SearchItem> | ((search?: string | null) => Observable<Array<SearchItem>>);
|
|
14
|
+
/**
|
|
15
|
+
* To get a large version of Search
|
|
16
|
+
*/
|
|
17
|
+
big?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Time span [ms] has passed without another source emission, to delay data filtering.
|
|
20
|
+
* Useful when the user is typing multiple letters
|
|
21
|
+
* @default 300 [ms]
|
|
22
|
+
*/
|
|
23
|
+
debounceTime: number;
|
|
24
|
+
/**
|
|
25
|
+
* The input placeholder
|
|
26
|
+
*/
|
|
27
|
+
placeholder: string;
|
|
28
|
+
/**
|
|
29
|
+
* The input label even get labelWaria icon
|
|
30
|
+
*/
|
|
31
|
+
labelWaria: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Show the label
|
|
34
|
+
*/
|
|
35
|
+
forceShowLabel: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Fired when the Search Item has been selected
|
|
38
|
+
*/
|
|
39
|
+
searchSelectedEvent: EventEmitter<SearchItem>;
|
|
40
|
+
protected showAutocompletion: boolean;
|
|
41
|
+
/** Observable da cui vengono emessi i risultati dell'auto completamento */
|
|
42
|
+
protected searchResults$: Observable<{
|
|
43
|
+
searchedValue: string | undefined | null;
|
|
44
|
+
relatedEntries: Array<SearchItem>;
|
|
45
|
+
}>;
|
|
46
|
+
ngOnInit(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Create the search list
|
|
49
|
+
*/
|
|
50
|
+
private getSearchResults$;
|
|
51
|
+
protected onEntryClick(entry: SearchItem, event: Event): void;
|
|
52
|
+
protected searchItemTrackByValueFn(index: number, item: SearchItem): string;
|
|
53
|
+
protected onKeyDown(): void;
|
|
54
|
+
protected get isActiveLabel(): boolean;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ItSearchComponent, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ItSearchComponent, "it-search", never, { "searchData": { "alias": "searchData"; "required": true; }; "big": { "alias": "big"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "labelWaria": { "alias": "labelWaria"; "required": false; }; "forceShowLabel": { "alias": "forceShowLabel"; "required": false; }; }, { "searchSelectedEvent": "searchSelectedEvent"; }, never, ["[error]"], true, never>;
|
|
57
|
+
static ngAcceptInputType_big: i1.BooleanInput;
|
|
58
|
+
static ngAcceptInputType_forceShowLabel: i1.BooleanInput;
|
|
59
|
+
}
|