mediasfu-angular 2.2.1 → 2.2.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.
- package/README.md +832 -1
- package/dist/README.md +832 -1
- package/dist/fesm2022/mediasfu-angular.mjs +9284 -4188
- package/dist/fesm2022/mediasfu-angular.mjs.map +1 -1
- package/dist/lib/@types/types.d.ts +6 -1
- package/dist/lib/@types/ui-overrides.types.d.ts +310 -0
- package/dist/lib/components/background-components/background-modal/background-modal.component.d.ts +1023 -2
- package/dist/lib/components/breakout-components/breakout-rooms-modal.component.d.ts +1069 -45
- package/dist/lib/components/breakout-components/edit-room-modal/edit-room-modal.component.d.ts +1054 -42
- package/dist/lib/components/co-host-components/co-host-modal/co-host-modal.component.d.ts +1067 -56
- package/dist/lib/components/display-components/alert-component/alert.component.component.d.ts +80 -24
- package/dist/lib/components/display-components/audio-grid/audio-grid.component.d.ts +83 -11
- package/dist/lib/components/display-components/flexible-grid/flexible-grid.component.d.ts +96 -33
- package/dist/lib/components/display-components/loading-modal/loading-modal.component.d.ts +16 -26
- package/dist/lib/components/display-components/main-aspect-component/main-aspect-component.component.d.ts +6 -2
- package/dist/lib/components/display-components/main-container-component/main-container-component.component.d.ts +6 -2
- package/dist/lib/components/display-components/main-grid-component/main-grid-component.component.d.ts +7 -13
- package/dist/lib/components/display-components/main-screen-component/main-screen-component.component.d.ts +508 -7
- package/dist/lib/components/display-components/other-grid-component/other-grid-component.component.d.ts +7 -1
- package/dist/lib/components/display-components/sub-aspect-component/sub-aspect-component.component.d.ts +7 -2
- package/dist/lib/components/display-settings-components/display-settings-modal.component.d.ts +1107 -27
- package/dist/lib/components/event-settings-components/event-settings-modal/event-settings-modal.component.d.ts +1134 -49
- package/dist/lib/components/exit-components/confirm-exit-modal/confirm-exit-modal.component.d.ts +94 -32
- package/dist/lib/components/media-settings-components/media-settings-modal/media-settings-modal.component.d.ts +1123 -47
- package/dist/lib/components/mediasfu-components/mediasfu-broadcast.component.d.ts +24914 -73
- package/dist/lib/components/mediasfu-components/mediasfu-chat.component.d.ts +224 -73
- package/dist/lib/components/mediasfu-components/mediasfu-conference.component.d.ts +18068 -93
- package/dist/lib/components/mediasfu-components/mediasfu-generic.component.d.ts +56280 -93
- package/dist/lib/components/mediasfu-components/mediasfu-webinar.component.d.ts +20785 -93
- package/dist/lib/components/menu-components/custom-buttons/custom-buttons.component.d.ts +23 -4
- package/dist/lib/components/menu-components/meeting-id-component/meeting-id-component.component.d.ts +78 -1
- package/dist/lib/components/menu-components/meeting-passcode-component/meeting-passcode-component.component.d.ts +37 -1
- package/dist/lib/components/menu-components/menu-modal/menu-modal.component.d.ts +689 -9
- package/dist/lib/components/menu-components/share-buttons-component/share-buttons-component.component.d.ts +46 -2
- package/dist/lib/components/message-components/messages-modal/messages-modal.component.d.ts +76 -13
- package/dist/lib/components/misc-components/confirm-here-modal/confirm-here-modal.component.d.ts +1113 -17
- package/dist/lib/components/misc-components/share-event-modal/share-event-modal.component.d.ts +1114 -29
- package/dist/lib/components/participants-components/participants-modal/participants-modal.component.d.ts +1084 -6
- package/dist/lib/components/polls-components/poll-modal/poll-modal.component.d.ts +1060 -21
- package/dist/lib/components/recording-components/recording-modal/recording-modal.component.d.ts +1054 -35
- package/dist/lib/components/requests-components/requests-modal/requests-modal.component.d.ts +1117 -45
- package/dist/lib/components/screenboard-components/screenboard-modal/screenboard-modal.component.d.ts +1059 -47
- package/dist/lib/components/waiting-components/waiting-room-modal.component.d.ts +1119 -46
- package/dist/lib/components/whiteboard-components/configure-whiteboard-modal/configure-whiteboard-modal.component.d.ts +1049 -16
- package/dist/lib/consumers/add-videos-grid.service.d.ts +3 -0
- package/dist/lib/consumers/connect-ips.service.d.ts +3 -1
- package/dist/lib/consumers/connect-recv-transport.service.d.ts +4 -1
- package/dist/lib/consumers/connect-send-transport-audio.service.d.ts +5 -1
- package/dist/lib/consumers/connect-send-transport-screen.service.d.ts +6 -1
- package/dist/lib/consumers/connect-send-transport-video.service.d.ts +6 -1
- package/dist/lib/consumers/connect-send-transport.service.d.ts +3 -1
- package/dist/lib/consumers/consumer-resume.service.d.ts +2 -1
- package/dist/lib/consumers/create-send-transport.service.d.ts +4 -1
- package/dist/lib/consumers/disconnect-send-transport-audio.service.d.ts +3 -1
- package/dist/lib/consumers/disconnect-send-transport-screen.service.d.ts +3 -1
- package/dist/lib/consumers/disconnect-send-transport-video.service.d.ts +3 -1
- package/dist/lib/consumers/prepopulate-user-media.service.d.ts +3 -0
- package/dist/lib/consumers/resume-send-transport-audio.service.d.ts +3 -1
- package/dist/lib/consumers/signal-new-consumer-transport.service.d.ts +3 -1
- package/dist/lib/consumers/socket-receive-methods/join-consume-room.service.d.ts +3 -1
- package/dist/lib/consumers/socket-receive-methods/new-pipe-producer.service.d.ts +3 -1
- package/dist/lib/consumers/stream-success-audio-switch.service.d.ts +5 -1
- package/dist/lib/consumers/stream-success-audio.service.d.ts +3 -1
- package/dist/lib/consumers/stream-success-video.service.d.ts +5 -1
- package/dist/lib/directives/with-override.directive.d.ts +76 -0
- package/dist/lib/methods/utils/initial-values.util.d.ts +7 -2
- package/dist/lib/methods/utils/mini-audio-player/mini-audio-player.component.d.ts +3 -1
- package/dist/lib/methods/utils/producer/a-params.service.d.ts +4 -1
- package/dist/lib/methods/utils/producer/h-params.service.d.ts +4 -1
- package/dist/lib/methods/utils/producer/screen-params.service.d.ts +4 -1
- package/dist/lib/methods/utils/producer/v-params.service.d.ts +4 -1
- package/dist/lib/methods/whiteboard-methods/capture-canvas-stream.service.d.ts +3 -1
- package/dist/lib/producer-client/producer-client-emits/create-device-client.service.d.ts +4 -1
- package/dist/lib/producer-client/producer-client-emits/update-room-parameters-client.service.d.ts +3 -1
- package/dist/lib/producers/producer-emits/join-con-room.service.d.ts +3 -1
- package/dist/lib/producers/socket-receive-methods/get-domains.service.d.ts +3 -1
- package/dist/lib/services/ui-override-resolver.service.d.ts +91 -0
- package/dist/public-api.d.ts +4 -0
- package/package.json +2 -2
package/dist/lib/components/display-components/alert-component/alert.component.component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export interface AlertComponentOptions {
|
|
4
4
|
visible: boolean;
|
|
@@ -7,40 +7,94 @@ export interface AlertComponentOptions {
|
|
|
7
7
|
duration?: number;
|
|
8
8
|
onHide?: () => void;
|
|
9
9
|
textColor?: string;
|
|
10
|
+
alertStyle?: Partial<CSSStyleDeclaration>;
|
|
11
|
+
customTemplate?: TemplateRef<any>;
|
|
10
12
|
}
|
|
11
13
|
export type AlertComponentType = (options: AlertComponentOptions) => HTMLElement;
|
|
12
14
|
/**
|
|
13
|
-
* AlertComponent
|
|
14
|
-
* It can automatically hide after a set duration and includes a manual dismiss option.
|
|
15
|
+
* AlertComponent - Toast-style notification component for success and error messages
|
|
15
16
|
*
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
18
|
-
*
|
|
17
|
+
* @component
|
|
18
|
+
* @description
|
|
19
|
+
* Displays toast-style alert messages with automatic dismiss timer and manual close option.
|
|
20
|
+
* Supports three levels of customization:
|
|
21
|
+
* 1. **Basic Usage**: Use default alert styles with custom message and type
|
|
22
|
+
* 2. **Style Customization**: Override alert appearance with alertStyle prop
|
|
23
|
+
* 3. **Full Override**: Provide a custom template via customTemplate for complete control
|
|
19
24
|
*
|
|
20
|
-
*
|
|
21
|
-
* -
|
|
22
|
-
* -
|
|
23
|
-
* -
|
|
24
|
-
* -
|
|
25
|
-
* -
|
|
26
|
-
* - `onHide` (function): Optional callback invoked when the alert is hidden.
|
|
25
|
+
* Key Features:
|
|
26
|
+
* - Auto-dismiss with configurable duration
|
|
27
|
+
* - Success/danger type indicators
|
|
28
|
+
* - Manual dismiss capability
|
|
29
|
+
* - Customizable text color and styling
|
|
30
|
+
* - Full template override support
|
|
27
31
|
*
|
|
28
|
-
* @
|
|
29
|
-
*
|
|
30
|
-
*
|
|
32
|
+
* @example
|
|
33
|
+
* Basic Usage:
|
|
34
|
+
* ```html
|
|
35
|
+
* <app-alert-component
|
|
36
|
+
* [visible]="showAlert"
|
|
37
|
+
* [message]="'Operation completed successfully!'"
|
|
38
|
+
* [type]="'success'"
|
|
39
|
+
* [duration]="5000"
|
|
40
|
+
* [onHide]="handleAlertClose">
|
|
41
|
+
* </app-alert-component>
|
|
42
|
+
* ```
|
|
31
43
|
*
|
|
32
44
|
* @example
|
|
45
|
+
* Style Customization:
|
|
33
46
|
* ```html
|
|
34
47
|
* <app-alert-component
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
48
|
+
* [visible]="showError"
|
|
49
|
+
* [message]="'An error occurred'"
|
|
50
|
+
* [type]="'danger'"
|
|
51
|
+
* [textColor]="'white'"
|
|
52
|
+
* [alertStyle]="{
|
|
53
|
+
* backgroundColor: '#dc3545',
|
|
54
|
+
* border: '2px solid #c82333',
|
|
55
|
+
* borderRadius: '8px',
|
|
56
|
+
* padding: '15px 20px'
|
|
57
|
+
* }"
|
|
58
|
+
* [onHide]="handleErrorClose">
|
|
41
59
|
* </app-alert-component>
|
|
42
60
|
* ```
|
|
43
|
-
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* Custom Template Override:
|
|
64
|
+
* ```html
|
|
65
|
+
* <app-alert-component
|
|
66
|
+
* [visible]="showAlert"
|
|
67
|
+
* [message]="alertMessage"
|
|
68
|
+
* [type]="alertType"
|
|
69
|
+
* [customTemplate]="customAlertTemplate"
|
|
70
|
+
* [onHide]="handleAlertClose">
|
|
71
|
+
* </app-alert-component>
|
|
72
|
+
*
|
|
73
|
+
* <ng-template #customAlertTemplate let-visible="visible" let-message="message" let-type="type">
|
|
74
|
+
* <div class="custom-alert" [class.success]="type === 'success'" [class.danger]="type === 'danger'">
|
|
75
|
+
* <i [class]="type === 'success' ? 'fa fa-check-circle' : 'fa fa-exclamation-triangle'"></i>
|
|
76
|
+
* <span>{{ message }}</span>
|
|
77
|
+
* <button (click)="handleAlertClose()">×</button>
|
|
78
|
+
* </div>
|
|
79
|
+
* </ng-template>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @selector app-alert-component
|
|
83
|
+
* @standalone true
|
|
84
|
+
* @imports CommonModule
|
|
85
|
+
*
|
|
86
|
+
* @input visible - Whether the alert is currently visible. Default: `false`
|
|
87
|
+
* @input message - The message text to display in the alert. Default: `''`
|
|
88
|
+
* @input type - Alert type ('success' or 'danger') affecting color scheme. Default: `'success'`
|
|
89
|
+
* @input duration - Auto-dismiss duration in milliseconds. Default: `4000`
|
|
90
|
+
* @input textColor - Color of the message text. Default: `'black'`
|
|
91
|
+
* @input onHide - Callback function invoked when alert is dismissed (auto or manual). Default: `undefined`
|
|
92
|
+
* @input alertStyle - Custom CSS styles to apply to the alert container. Default: `undefined`
|
|
93
|
+
* @input customTemplate - Custom TemplateRef to completely replace default alert template. Default: `undefined`
|
|
94
|
+
*
|
|
95
|
+
* @method ngOnChanges - Handles input changes and triggers auto-dismiss timer when visible
|
|
96
|
+
* @method handlePress - Manually dismisses the alert by invoking onHide callback
|
|
97
|
+
*/
|
|
44
98
|
export declare class AlertComponent implements OnChanges {
|
|
45
99
|
visible: boolean;
|
|
46
100
|
message: string;
|
|
@@ -48,9 +102,11 @@ export declare class AlertComponent implements OnChanges {
|
|
|
48
102
|
duration: number;
|
|
49
103
|
textColor: string;
|
|
50
104
|
onHide: () => void;
|
|
105
|
+
alertStyle?: Partial<CSSStyleDeclaration>;
|
|
106
|
+
customTemplate?: TemplateRef<any>;
|
|
51
107
|
alertType: 'success' | 'danger';
|
|
52
108
|
ngOnChanges(changes: SimpleChanges): void;
|
|
53
109
|
handlePress(): void;
|
|
54
110
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
55
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "app-alert-component", never, { "visible": { "alias": "visible"; "required": false; }; "message": { "alias": "message"; "required": false; }; "type": { "alias": "type"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "onHide": { "alias": "onHide"; "required": false; }; }, {}, never, never, true, never>;
|
|
111
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "app-alert-component", never, { "visible": { "alias": "visible"; "required": false; }; "message": { "alias": "message"; "required": false; }; "type": { "alias": "type"; "required": false; }; "duration": { "alias": "duration"; "required": false; }; "textColor": { "alias": "textColor"; "required": false; }; "onHide": { "alias": "onHide"; "required": false; }; "alertStyle": { "alias": "alertStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
56
112
|
}
|
|
@@ -1,31 +1,100 @@
|
|
|
1
|
-
import { Injector, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { Injector, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export interface AudioGridOptions {
|
|
4
4
|
componentsToRender: {
|
|
5
5
|
component: any;
|
|
6
6
|
inputs?: any;
|
|
7
7
|
}[];
|
|
8
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
9
|
+
customTemplate?: TemplateRef<any>;
|
|
8
10
|
}
|
|
9
11
|
export type AudioGridType = (options: AudioGridOptions) => HTMLElement;
|
|
10
12
|
/**
|
|
11
|
-
*
|
|
13
|
+
* @component AudioGrid
|
|
14
|
+
*
|
|
15
|
+
* A dynamic grid component specifically designed for rendering audio-only participants with customizable
|
|
16
|
+
* layout and styling. Supports full template customization for complete control over participant presentation.
|
|
17
|
+
*
|
|
18
|
+
* @description
|
|
19
|
+
* AudioGrid provides three levels of customization to display audio-only participants:
|
|
20
|
+
*
|
|
21
|
+
* 1. **Basic Usage**: Use the default vertical stacked layout for audio participants
|
|
22
|
+
* 2. **Style Customization**: Apply custom styles via `containerStyle` to modify grid appearance
|
|
23
|
+
* 3. **Full Template Override**: Provide a custom `ng-template` via `customTemplate` for complete control
|
|
24
|
+
*
|
|
25
|
+
* **Key Features:**
|
|
26
|
+
* - Dynamic rendering of audio-only participant components
|
|
27
|
+
* - Efficient injector caching for performance optimization
|
|
28
|
+
* - Automatic cache clearing on component changes to prevent memory leaks
|
|
29
|
+
* - Customizable container styling
|
|
30
|
+
* - Full template override support for custom layouts
|
|
12
31
|
*
|
|
13
32
|
* @selector app-audio-grid
|
|
14
33
|
* @standalone true
|
|
15
34
|
* @imports CommonModule
|
|
16
35
|
*
|
|
17
|
-
* @
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
36
|
+
* @example
|
|
37
|
+
* Basic Usage:
|
|
38
|
+
* ```html
|
|
39
|
+
* <app-audio-grid
|
|
40
|
+
* [componentsToRender]="[
|
|
41
|
+
* { component: AudioCard, inputs: { name: 'John Doe', audioLevel: 0.8 } },
|
|
42
|
+
* { component: AudioCard, inputs: { name: 'Jane Smith', audioLevel: 0.5 } }
|
|
43
|
+
* ]">
|
|
44
|
+
* </app-audio-grid>
|
|
45
|
+
* ```
|
|
24
46
|
*
|
|
25
47
|
* @example
|
|
48
|
+
* Style Customization:
|
|
26
49
|
* ```html
|
|
27
|
-
* <app-audio-grid
|
|
50
|
+
* <app-audio-grid
|
|
51
|
+
* [componentsToRender]="audioParticipants"
|
|
52
|
+
* [containerStyle]="{
|
|
53
|
+
* display: 'flex',
|
|
54
|
+
* flexWrap: 'wrap',
|
|
55
|
+
* gap: '12px',
|
|
56
|
+
* padding: '20px',
|
|
57
|
+
* backgroundColor: '#f5f5f5',
|
|
58
|
+
* borderRadius: '8px'
|
|
59
|
+
* }">
|
|
60
|
+
* </app-audio-grid>
|
|
28
61
|
* ```
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* Custom Template Override:
|
|
65
|
+
* ```typescript
|
|
66
|
+
* // In your component
|
|
67
|
+
* @Component({
|
|
68
|
+
* template: `
|
|
69
|
+
* <app-audio-grid
|
|
70
|
+
* [componentsToRender]="audioParticipants"
|
|
71
|
+
* [customTemplate]="customAudioLayout">
|
|
72
|
+
* </app-audio-grid>
|
|
73
|
+
*
|
|
74
|
+
* <ng-template #customAudioLayout let-gridData>
|
|
75
|
+
* <div class="custom-audio-grid">
|
|
76
|
+
* <h3>Audio Participants ({{ gridData.componentsToRender.length }})</h3>
|
|
77
|
+
* <div class="audio-list">
|
|
78
|
+
* <div *ngFor="let item of gridData.componentsToRender; let i = index"
|
|
79
|
+
* class="audio-item"
|
|
80
|
+
* [class.active]="i === activeIndex">
|
|
81
|
+
* <span class="index">{{ i + 1 }}</span>
|
|
82
|
+
* <ng-container *ngComponentOutlet="item.component; injector: createInjector(item.inputs)"></ng-container>
|
|
83
|
+
* </div>
|
|
84
|
+
* </div>
|
|
85
|
+
* </div>
|
|
86
|
+
* </ng-template>
|
|
87
|
+
* `
|
|
88
|
+
* })
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @input componentsToRender - Array of components with optional inputs to render in the grid
|
|
92
|
+
* @input containerStyle - Custom CSS styles for the grid container
|
|
93
|
+
* @input customTemplate - Custom ng-template for complete grid layout override
|
|
94
|
+
*
|
|
95
|
+
* @method ngOnChanges - Clears the injector cache on changes to componentsToRender
|
|
96
|
+
* @method createInjector - Creates and caches an injector with specific inputs for each component
|
|
97
|
+
* @method clearInjectorCache - Clears the cache to avoid memory leaks and ensure updated injectors
|
|
29
98
|
**/
|
|
30
99
|
export declare class AudioGrid implements OnChanges {
|
|
31
100
|
private injector;
|
|
@@ -33,11 +102,14 @@ export declare class AudioGrid implements OnChanges {
|
|
|
33
102
|
component: any;
|
|
34
103
|
inputs?: any;
|
|
35
104
|
}[];
|
|
105
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
106
|
+
customTemplate?: TemplateRef<any>;
|
|
36
107
|
private injectorCache;
|
|
37
108
|
constructor(injector: Injector);
|
|
109
|
+
get computedContainerStyle(): any;
|
|
38
110
|
ngOnChanges(changes: SimpleChanges): void;
|
|
39
111
|
createInjector(inputs: any): Injector;
|
|
40
112
|
private clearInjectorCache;
|
|
41
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<AudioGrid, never>;
|
|
42
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AudioGrid, "app-audio-grid", never, { "componentsToRender": { "alias": "componentsToRender"; "required": false; }; }, {}, never, never, true, never>;
|
|
114
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AudioGrid, "app-audio-grid", never, { "componentsToRender": { "alias": "componentsToRender"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
43
115
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, OnChanges, SimpleChanges, Injector } from '@angular/core';
|
|
1
|
+
import { OnInit, OnChanges, SimpleChanges, Injector, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export interface FlexibleGridOptions {
|
|
4
4
|
customWidth: number;
|
|
@@ -10,42 +10,111 @@ export interface FlexibleGridOptions {
|
|
|
10
10
|
inputs?: any;
|
|
11
11
|
}[];
|
|
12
12
|
backgroundColor?: string;
|
|
13
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
14
|
+
customTemplate?: TemplateRef<any>;
|
|
13
15
|
}
|
|
14
16
|
export type FlexibleGridType = (options: FlexibleGridOptions) => HTMLElement;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
+
* @component FlexibleGrid
|
|
19
|
+
*
|
|
20
|
+
* A dynamic, highly customizable grid component that renders a specified number of rows and columns,
|
|
21
|
+
* with each grid item containing a provided component. Supports full template customization and style overrides.
|
|
22
|
+
*
|
|
23
|
+
* @description
|
|
24
|
+
* FlexibleGrid offers three levels of customization to fit your application's needs:
|
|
25
|
+
*
|
|
26
|
+
* 1. **Basic Usage**: Use the default grid layout with configurable rows, columns, and components
|
|
27
|
+
* 2. **Style Customization**: Apply custom styles via `containerStyle` to modify grid appearance
|
|
28
|
+
* 3. **Full Template Override**: Provide a custom `ng-template` via `customTemplate` for complete control
|
|
29
|
+
*
|
|
30
|
+
* **Key Features:**
|
|
31
|
+
* - Dynamic grid generation based on rows and columns
|
|
32
|
+
* - Flexible component rendering with input injection
|
|
33
|
+
* - Automatic grid recalculation on property changes
|
|
34
|
+
* - Customizable grid item dimensions and background colors
|
|
35
|
+
* - Full template override support for custom layouts
|
|
18
36
|
*
|
|
19
37
|
* @selector app-flexible-grid
|
|
20
38
|
* @standalone true
|
|
21
39
|
* @imports CommonModule
|
|
22
40
|
*
|
|
23
|
-
* @inputs
|
|
24
|
-
* - `customWidth` (number): The width for each grid item in pixels. Default is 0.
|
|
25
|
-
* - `customHeight` (number): The height for each grid item in pixels. Default is 0.
|
|
26
|
-
* - `rows` (number): Number of rows in the grid. Default is 0.
|
|
27
|
-
* - `columns` (number): Number of columns in the grid. Default is 0.
|
|
28
|
-
* - `componentsToRender` ({ component: any, inputs?: any }[]): Array of components to render in the grid, each with optional inputs.
|
|
29
|
-
* - `backgroundColor` (string): Background color for each grid item. Default is 'transparent'.
|
|
30
|
-
*
|
|
31
|
-
* @methods
|
|
32
|
-
* - `ngOnInit()`: Initializes and generates the grid on component load.
|
|
33
|
-
* - `ngOnChanges(changes: SimpleChanges)`: Regenerates the grid if `columns`, `componentsToRender`, or `rows` change.
|
|
34
|
-
* - `generateGrid()`: Builds the grid based on the row, column, and component configurations.
|
|
35
|
-
* - `getGridItemStyle()`: Returns a style object for each grid item, including custom width, height, and background color.
|
|
36
|
-
* - `createInjector(inputs: any)`: Creates a cached injector for each component to support dynamic component inputs.
|
|
37
|
-
*
|
|
38
41
|
* @example
|
|
42
|
+
* Basic Usage:
|
|
39
43
|
* ```html
|
|
40
44
|
* <app-flexible-grid
|
|
41
|
-
* [customWidth]="
|
|
42
|
-
* [customHeight]="
|
|
45
|
+
* [customWidth]="200"
|
|
46
|
+
* [customHeight]="150"
|
|
43
47
|
* [rows]="2"
|
|
44
48
|
* [columns]="3"
|
|
45
|
-
* [componentsToRender]="
|
|
46
|
-
* backgroundColor="
|
|
47
|
-
*
|
|
49
|
+
* [componentsToRender]="videoComponents"
|
|
50
|
+
* backgroundColor="#f0f0f0">
|
|
51
|
+
* </app-flexible-grid>
|
|
48
52
|
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* Style Customization:
|
|
56
|
+
* ```html
|
|
57
|
+
* <app-flexible-grid
|
|
58
|
+
* [customWidth]="250"
|
|
59
|
+
* [customHeight]="200"
|
|
60
|
+
* [rows]="3"
|
|
61
|
+
* [columns]="4"
|
|
62
|
+
* [componentsToRender]="participantComponents"
|
|
63
|
+
* [containerStyle]="{
|
|
64
|
+
* padding: '20px',
|
|
65
|
+
* borderRadius: '12px',
|
|
66
|
+
* boxShadow: '0 4px 6px rgba(0,0,0,0.1)'
|
|
67
|
+
* }"
|
|
68
|
+
* backgroundColor="white">
|
|
69
|
+
* </app-flexible-grid>
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* Custom Template Override:
|
|
74
|
+
* ```typescript
|
|
75
|
+
* // In your component
|
|
76
|
+
* @Component({
|
|
77
|
+
* template: `
|
|
78
|
+
* <app-flexible-grid
|
|
79
|
+
* [customWidth]="300"
|
|
80
|
+
* [customHeight]="200"
|
|
81
|
+
* [rows]="2"
|
|
82
|
+
* [columns]="2"
|
|
83
|
+
* [componentsToRender]="components"
|
|
84
|
+
* [customTemplate]="customGridTemplate">
|
|
85
|
+
* </app-flexible-grid>
|
|
86
|
+
*
|
|
87
|
+
* <ng-template #customGridTemplate let-gridData>
|
|
88
|
+
* <div class="my-custom-grid">
|
|
89
|
+
* <h3>Custom Grid Layout</h3>
|
|
90
|
+
* <div class="grid-container"
|
|
91
|
+
* [style.grid-template-columns]="'repeat(' + gridData.columns + ', 1fr)'">
|
|
92
|
+
* <div *ngFor="let row of gridData.grid" class="grid-row">
|
|
93
|
+
* <div *ngFor="let component of row" class="grid-item">
|
|
94
|
+
* <ng-container *ngComponentOutlet="component.component"></ng-container>
|
|
95
|
+
* </div>
|
|
96
|
+
* </div>
|
|
97
|
+
* </div>
|
|
98
|
+
* </div>
|
|
99
|
+
* </ng-template>
|
|
100
|
+
* `
|
|
101
|
+
* })
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* @input customWidth - Width for each grid item in pixels. Default: 0
|
|
105
|
+
* @input customHeight - Height for each grid item in pixels. Default: 0
|
|
106
|
+
* @input rows - Number of rows in the grid. Default: 0
|
|
107
|
+
* @input columns - Number of columns in the grid. Default: 0
|
|
108
|
+
* @input componentsToRender - Array of components to render in the grid, each with optional inputs
|
|
109
|
+
* @input backgroundColor - Background color for each grid item. Default: 'transparent'
|
|
110
|
+
* @input containerStyle - Custom CSS styles for the grid container
|
|
111
|
+
* @input customTemplate - Custom ng-template for complete grid layout override
|
|
112
|
+
*
|
|
113
|
+
* @method ngOnInit - Initializes and generates the grid on component load
|
|
114
|
+
* @method ngOnChanges - Regenerates the grid if columns, componentsToRender, or rows change
|
|
115
|
+
* @method generateGrid - Builds the grid based on the row, column, and component configurations
|
|
116
|
+
* @method getGridItemStyle - Returns a style object for each grid item
|
|
117
|
+
* @method createInjector - Creates a cached injector for each component to support dynamic inputs
|
|
49
118
|
**/
|
|
50
119
|
export declare class FlexibleGrid implements OnInit, OnChanges {
|
|
51
120
|
private injector;
|
|
@@ -58,22 +127,16 @@ export declare class FlexibleGrid implements OnInit, OnChanges {
|
|
|
58
127
|
inputs?: any;
|
|
59
128
|
}[];
|
|
60
129
|
backgroundColor: string;
|
|
130
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
131
|
+
customTemplate?: TemplateRef<any>;
|
|
61
132
|
grid: any[][];
|
|
62
133
|
private injectorCache;
|
|
63
134
|
constructor(injector: Injector);
|
|
64
135
|
ngOnInit(): void;
|
|
65
136
|
ngOnChanges(changes: SimpleChanges): void;
|
|
66
137
|
generateGrid(): void;
|
|
67
|
-
getGridItemStyle():
|
|
68
|
-
flex: number;
|
|
69
|
-
width: string;
|
|
70
|
-
height: string;
|
|
71
|
-
backgroundColor: string;
|
|
72
|
-
margin: string;
|
|
73
|
-
padding: number;
|
|
74
|
-
borderRadius: string;
|
|
75
|
-
};
|
|
138
|
+
getGridItemStyle(): any;
|
|
76
139
|
createInjector(inputs: any): Injector;
|
|
77
140
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlexibleGrid, never>;
|
|
78
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FlexibleGrid, "app-flexible-grid", never, { "customWidth": { "alias": "customWidth"; "required": false; }; "customHeight": { "alias": "customHeight"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "componentsToRender": { "alias": "componentsToRender"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FlexibleGrid, "app-flexible-grid", never, { "customWidth": { "alias": "customWidth"; "required": false; }; "customHeight": { "alias": "customHeight"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "componentsToRender": { "alias": "componentsToRender"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
79
142
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export interface LoadingModalOptions {
|
|
3
4
|
isVisible: boolean;
|
|
4
5
|
backgroundColor?: string;
|
|
5
6
|
displayColor?: string;
|
|
7
|
+
overlayStyle?: Partial<CSSStyleDeclaration>;
|
|
8
|
+
contentStyle?: Partial<CSSStyleDeclaration>;
|
|
9
|
+
spinnerStyle?: Partial<CSSStyleDeclaration>;
|
|
10
|
+
textStyle?: Partial<CSSStyleDeclaration>;
|
|
11
|
+
customTemplate?: TemplateRef<any>;
|
|
6
12
|
}
|
|
7
13
|
export type LoadingModalType = (options: LoadingModalOptions) => HTMLElement;
|
|
8
14
|
/**
|
|
@@ -42,31 +48,15 @@ export declare class LoadingModal {
|
|
|
42
48
|
isVisible: boolean;
|
|
43
49
|
backgroundColor?: string;
|
|
44
50
|
displayColor?: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
justifyContent: string;
|
|
55
|
-
zIndex: string;
|
|
56
|
-
};
|
|
57
|
-
get modalContentStyle(): {
|
|
58
|
-
backgroundColor: string | undefined;
|
|
59
|
-
borderRadius: string;
|
|
60
|
-
padding: string;
|
|
61
|
-
maxWidth: string;
|
|
62
|
-
textAlign: string;
|
|
63
|
-
};
|
|
64
|
-
get spinnerContainerStyle(): {
|
|
65
|
-
marginBottom: string;
|
|
66
|
-
};
|
|
67
|
-
get loadingTextStyle(): {
|
|
68
|
-
color: string | undefined;
|
|
69
|
-
};
|
|
51
|
+
overlayStyle?: Partial<CSSStyleDeclaration>;
|
|
52
|
+
contentStyle?: Partial<CSSStyleDeclaration>;
|
|
53
|
+
spinnerStyle?: Partial<CSSStyleDeclaration>;
|
|
54
|
+
textStyle?: Partial<CSSStyleDeclaration>;
|
|
55
|
+
customTemplate?: TemplateRef<any>;
|
|
56
|
+
get modalContainerStyle(): any;
|
|
57
|
+
get modalContentStyle(): any;
|
|
58
|
+
get spinnerContainerStyle(): any;
|
|
59
|
+
get loadingTextStyle(): any;
|
|
70
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingModal, never>;
|
|
71
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingModal, "app-loading-modal", never, { "isVisible": { "alias": "isVisible"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "displayColor": { "alias": "displayColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LoadingModal, "app-loading-modal", never, { "isVisible": { "alias": "isVisible"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "displayColor": { "alias": "displayColor"; "required": false; }; "overlayStyle": { "alias": "overlayStyle"; "required": false; }; "contentStyle": { "alias": "contentStyle"; "required": false; }; "spinnerStyle": { "alias": "spinnerStyle"; "required": false; }; "textStyle": { "alias": "textStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
72
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export interface MainAspectComponentOptions {
|
|
4
4
|
backgroundColor?: string;
|
|
@@ -9,6 +9,8 @@ export interface MainAspectComponentOptions {
|
|
|
9
9
|
updateIsWideScreen: (isWideScreen: boolean) => void;
|
|
10
10
|
updateIsMediumScreen: (isMediumScreen: boolean) => void;
|
|
11
11
|
updateIsSmallScreen: (isSmallScreen: boolean) => void;
|
|
12
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
13
|
+
customTemplate?: TemplateRef<any>;
|
|
12
14
|
}
|
|
13
15
|
export type MainAspectComponentType = (options: MainAspectComponentOptions) => HTMLElement;
|
|
14
16
|
/**
|
|
@@ -68,6 +70,8 @@ export declare class MainAspectComponent implements OnInit, OnDestroy, OnChanges
|
|
|
68
70
|
updateIsWideScreen: (isWideScreen: boolean) => void;
|
|
69
71
|
updateIsMediumScreen: (isMediumScreen: boolean) => void;
|
|
70
72
|
updateIsSmallScreen: (isSmallScreen: boolean) => void;
|
|
73
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
74
|
+
customTemplate?: TemplateRef<any>;
|
|
71
75
|
aspectStyles: {
|
|
72
76
|
[key: string]: any;
|
|
73
77
|
};
|
|
@@ -76,5 +80,5 @@ export declare class MainAspectComponent implements OnInit, OnDestroy, OnChanges
|
|
|
76
80
|
ngOnDestroy(): void;
|
|
77
81
|
private updateAspectStyles;
|
|
78
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<MainAspectComponent, never>;
|
|
79
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MainAspectComponent, "app-main-aspect-component", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "showControls": { "alias": "showControls"; "required": false; }; "containerWidthFraction": { "alias": "containerWidthFraction"; "required": false; }; "containerHeightFraction": { "alias": "containerHeightFraction"; "required": false; }; "defaultFraction": { "alias": "defaultFraction"; "required": false; }; "updateIsWideScreen": { "alias": "updateIsWideScreen"; "required": false; }; "updateIsMediumScreen": { "alias": "updateIsMediumScreen"; "required": false; }; "updateIsSmallScreen": { "alias": "updateIsSmallScreen"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
83
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MainAspectComponent, "app-main-aspect-component", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "showControls": { "alias": "showControls"; "required": false; }; "containerWidthFraction": { "alias": "containerWidthFraction"; "required": false; }; "containerHeightFraction": { "alias": "containerHeightFraction"; "required": false; }; "defaultFraction": { "alias": "defaultFraction"; "required": false; }; "updateIsWideScreen": { "alias": "updateIsWideScreen"; "required": false; }; "updateIsMediumScreen": { "alias": "updateIsMediumScreen"; "required": false; }; "updateIsSmallScreen": { "alias": "updateIsSmallScreen"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
80
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export interface MainContainerComponentOptions {
|
|
4
4
|
backgroundColor?: string;
|
|
@@ -9,6 +9,8 @@ export interface MainContainerComponentOptions {
|
|
|
9
9
|
marginTop?: number;
|
|
10
10
|
marginBottom?: number;
|
|
11
11
|
padding?: number;
|
|
12
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
13
|
+
customTemplate?: TemplateRef<any>;
|
|
12
14
|
}
|
|
13
15
|
export type MainContainerComponentType = (options: MainContainerComponentOptions) => HTMLElement;
|
|
14
16
|
/**
|
|
@@ -63,6 +65,8 @@ export declare class MainContainerComponent implements OnInit, OnDestroy, OnChan
|
|
|
63
65
|
marginTop: number;
|
|
64
66
|
marginBottom: number;
|
|
65
67
|
padding: number;
|
|
68
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
69
|
+
customTemplate?: TemplateRef<any>;
|
|
66
70
|
containerStyles: {
|
|
67
71
|
[key: string]: any;
|
|
68
72
|
};
|
|
@@ -71,5 +75,5 @@ export declare class MainContainerComponent implements OnInit, OnDestroy, OnChan
|
|
|
71
75
|
ngOnDestroy(): void;
|
|
72
76
|
updateContainerStyles: () => void;
|
|
73
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<MainContainerComponent, never>;
|
|
74
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MainContainerComponent, "app-main-container-component", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "containerWidthFraction": { "alias": "containerWidthFraction"; "required": false; }; "containerHeightFraction": { "alias": "containerHeightFraction"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MainContainerComponent, "app-main-container-component", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "containerWidthFraction": { "alias": "containerWidthFraction"; "required": false; }; "containerHeightFraction": { "alias": "containerHeightFraction"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
75
79
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
export interface MainGridComponentOptions {
|
|
3
4
|
backgroundColor?: string;
|
|
@@ -8,6 +9,8 @@ export interface MainGridComponentOptions {
|
|
|
8
9
|
timeBackgroundColor?: string;
|
|
9
10
|
showTimer?: boolean;
|
|
10
11
|
meetingProgressTime?: string;
|
|
12
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
13
|
+
customTemplate?: TemplateRef<any>;
|
|
11
14
|
}
|
|
12
15
|
export type MainGridComponentType = (options: MainGridComponentOptions) => HTMLElement;
|
|
13
16
|
/**
|
|
@@ -64,18 +67,9 @@ export declare class MainGridComponent {
|
|
|
64
67
|
timeBackgroundColor: string;
|
|
65
68
|
showTimer: boolean;
|
|
66
69
|
meetingProgressTime: string;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
height: string;
|
|
71
|
-
width: string;
|
|
72
|
-
flexDirection: string;
|
|
73
|
-
justifyContent: string;
|
|
74
|
-
alignItems: string;
|
|
75
|
-
borderStyle: string;
|
|
76
|
-
borderColor: string;
|
|
77
|
-
borderWidth: string;
|
|
78
|
-
};
|
|
70
|
+
containerStyle?: Partial<CSSStyleDeclaration>;
|
|
71
|
+
customTemplate?: TemplateRef<any>;
|
|
72
|
+
get maingridContainerStyle(): any;
|
|
79
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<MainGridComponent, never>;
|
|
80
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MainGridComponent, "app-main-grid-component", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "mainSize": { "alias": "mainSize"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "showAspect": { "alias": "showAspect"; "required": false; }; "timeBackgroundColor": { "alias": "timeBackgroundColor"; "required": false; }; "showTimer": { "alias": "showTimer"; "required": false; }; "meetingProgressTime": { "alias": "meetingProgressTime"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MainGridComponent, "app-main-grid-component", never, { "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "mainSize": { "alias": "mainSize"; "required": false; }; "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "showAspect": { "alias": "showAspect"; "required": false; }; "timeBackgroundColor": { "alias": "timeBackgroundColor"; "required": false; }; "showTimer": { "alias": "showTimer"; "required": false; }; "meetingProgressTime": { "alias": "meetingProgressTime"; "required": false; }; "containerStyle": { "alias": "containerStyle"; "required": false; }; "customTemplate": { "alias": "customTemplate"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
81
75
|
}
|