simpo-component-library 3.1.1 → 3.1.30
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/esm2022/lib/components/hover-elements/hover-elements.component.mjs +3 -3
- package/esm2022/lib/directive/contenteditable.directive.mjs +83 -0
- package/esm2022/lib/directive/image-editor.directive.mjs +54 -0
- package/esm2022/lib/elements/add-section/add-section.component.mjs +3 -3
- package/esm2022/lib/elements/image-editor/image-editor.component.mjs +62 -0
- package/esm2022/lib/elements/link-editor/link-editor.component.mjs +92 -0
- package/esm2022/lib/elements/media-selector/media-selector.component.mjs +198 -0
- package/esm2022/lib/elements/text-editor/text-editor.component.mjs +215 -0
- package/esm2022/lib/sections/banner-section/banner-section.component.mjs +7 -5
- package/esm2022/lib/sections/footer/footer.component.mjs +128 -0
- package/esm2022/lib/sections/footer/footer.modal.mjs +2 -0
- package/esm2022/lib/services/image-upload-service.service.mjs +63 -4
- package/esm2022/lib/services/rest.service.mjs +12 -1
- package/esm2022/lib/styles/index.mjs +8 -1
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/simpo-component-library.mjs +609 -64
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/directive/contenteditable.directive.d.ts +22 -0
- package/lib/directive/image-editor.directive.d.ts +18 -0
- package/lib/elements/image-editor/image-editor.component.d.ts +21 -0
- package/lib/elements/link-editor/link-editor.component.d.ts +29 -0
- package/lib/elements/media-selector/media-selector.component.d.ts +43 -0
- package/lib/elements/text-editor/text-editor.component.d.ts +28 -0
- package/lib/sections/footer/footer.component.d.ts +37 -0
- package/lib/sections/footer/footer.modal.d.ts +60 -0
- package/lib/services/image-upload-service.service.d.ts +11 -0
- package/lib/services/rest.service.d.ts +3 -0
- package/lib/styles/index.d.ts +6 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/simpo-component-library-3.1.30.tgz +0 -0
- package/src/lib/styles/global-styles.css +12 -1
- package/simpo-component-library-3.1.1.tgz +0 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
import { AfterViewInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class ContenteditableValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
5
|
+
private readonly elementRef;
|
6
|
+
private readonly renderer;
|
7
|
+
private onTouched;
|
8
|
+
contenteditable: boolean;
|
9
|
+
private onChange;
|
10
|
+
private observer?;
|
11
|
+
constructor(elementRef: ElementRef<Element>, renderer: Renderer2);
|
12
|
+
ngAfterViewInit(): void;
|
13
|
+
ngOnDestroy(): void;
|
14
|
+
onInput(): void;
|
15
|
+
onBlur(): void;
|
16
|
+
writeValue(value: string): void;
|
17
|
+
registerOnChange(onChange: (value: string) => void): void;
|
18
|
+
registerOnTouched(onTouched: () => void): void;
|
19
|
+
setDisabledState(disabled: boolean): void;
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContenteditableValueAccessor, never>;
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ContenteditableValueAccessor, "[contenteditable][ngModel]", never, { "contenteditable": { "alias": "contenteditable"; "required": false; }; }, {}, never, never, true, never>;
|
22
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
2
|
+
import { Image } from '../styles/style.model';
|
3
|
+
import { MatDialog } from '@angular/material/dialog';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class ImageEditorDirective {
|
6
|
+
private el;
|
7
|
+
private renderer;
|
8
|
+
private matDialog;
|
9
|
+
appImageEditor: boolean;
|
10
|
+
imageData?: Image;
|
11
|
+
sectionId?: string;
|
12
|
+
constructor(el: ElementRef, renderer: Renderer2, matDialog: MatDialog);
|
13
|
+
onMouseEnter(): void;
|
14
|
+
onMouseLeave(): void;
|
15
|
+
onClick(event: Event): void;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageEditorDirective, never>;
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ImageEditorDirective, "img[appImageEditor]", never, { "appImageEditor": { "alias": "appImageEditor"; "required": false; }; "imageData": { "alias": "imageData"; "required": false; }; "sectionId": { "alias": "sectionId"; "required": false; }; }, {}, never, never, true, never>;
|
18
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
2
|
+
import { EventsService } from '../../services/events.service';
|
3
|
+
import { Image } from '../../styles/style.model';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class ImageEditorComponent {
|
6
|
+
private eventsService;
|
7
|
+
dialogRef: MatDialogRef<ImageEditorComponent>;
|
8
|
+
data: any;
|
9
|
+
private matDialog;
|
10
|
+
constructor(eventsService: EventsService, dialogRef: MatDialogRef<ImageEditorComponent>, data: any, matDialog: MatDialog);
|
11
|
+
imageData: Image;
|
12
|
+
sectionId: string;
|
13
|
+
ngOnInit(): void;
|
14
|
+
max: number;
|
15
|
+
min: number;
|
16
|
+
updateImage(): Promise<void>;
|
17
|
+
horizontalPosition(): void;
|
18
|
+
deleteImage(): void;
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageEditorComponent, never>;
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageEditorComponent, "simpo-image-editor", never, {}, {}, never, never, true, never>;
|
21
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Button } from '../../styles/style.model';
|
2
|
+
import { RedirectionLinkType } from '../../styles/index';
|
3
|
+
import { RestService } from '../../services/rest.service';
|
4
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class LinkEditorComponent {
|
7
|
+
private restService;
|
8
|
+
dialogRef: MatDialogRef<LinkEditorComponent>;
|
9
|
+
data: any;
|
10
|
+
link: Button;
|
11
|
+
RedirectionLink: typeof RedirectionLinkType;
|
12
|
+
externalLinkType: Array<type>;
|
13
|
+
selectedType: RedirectionLinkType;
|
14
|
+
linkType: any[];
|
15
|
+
templatePage: any[];
|
16
|
+
addLink: boolean;
|
17
|
+
constructor(restService: RestService, dialogRef: MatDialogRef<LinkEditorComponent>, data: any);
|
18
|
+
ngOnInit(): void;
|
19
|
+
closeDialog(): void;
|
20
|
+
getTemplatePage(): void;
|
21
|
+
changeType(type: RedirectionLinkType): void;
|
22
|
+
addNewLink(): void;
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkEditorComponent, never>;
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LinkEditorComponent, "simpo-link-editor", never, {}, {}, never, never, true, never>;
|
25
|
+
}
|
26
|
+
interface type {
|
27
|
+
type: string;
|
28
|
+
}
|
29
|
+
export {};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
2
|
+
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
3
|
+
import { FormControl } from '@angular/forms';
|
4
|
+
import { ImageUplaodService } from '../../services/image-upload-service.service';
|
5
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
6
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
7
|
+
import { RestService } from '../../services/rest.service';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
export declare class MediaSelectorComponent implements AfterViewInit {
|
10
|
+
private imageUploadService;
|
11
|
+
private _dialogRef;
|
12
|
+
private dialogData;
|
13
|
+
private snackBar;
|
14
|
+
private restService;
|
15
|
+
viewport: CdkVirtualScrollViewport;
|
16
|
+
tabs: string[];
|
17
|
+
activeTab: string;
|
18
|
+
searchControl: FormControl<string | null>;
|
19
|
+
pageNo: number;
|
20
|
+
isLoading: boolean;
|
21
|
+
unsplashImages: any[];
|
22
|
+
imageLibrary: any[];
|
23
|
+
imageSize: number;
|
24
|
+
multiple: boolean;
|
25
|
+
selectedImage: Map<string, any>;
|
26
|
+
constructor(imageUploadService: ImageUplaodService, _dialogRef: MatDialogRef<MediaSelectorComponent>, dialogData: any, snackBar: MatSnackBar, restService: RestService);
|
27
|
+
ngOnInit(): void;
|
28
|
+
ngAfterViewInit(): void;
|
29
|
+
getImageLibrary(): void;
|
30
|
+
/** ✅ Search API with debounce to reduce unnecessary calls */
|
31
|
+
searchUnsplashImages(): void;
|
32
|
+
/** ✅ Infinite Scroll */
|
33
|
+
setupInfiniteScroll(): void;
|
34
|
+
/** ✅ Load More Images */
|
35
|
+
loadMoreImages(): void;
|
36
|
+
selectUnsplashImage(image: any): void;
|
37
|
+
uploadImageFromSystem(event: any): void;
|
38
|
+
deleteSystemImage(imageId: string): void;
|
39
|
+
selectFromImageLibrary(image: any): void;
|
40
|
+
uploadImage(): Promise<void>;
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaSelectorComponent, never>;
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MediaSelectorComponent, "simpo-media-selector", never, {}, {}, never, never, true, never>;
|
43
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class TextEditorComponent {
|
4
|
+
toolbar: ElementRef;
|
5
|
+
editor: ElementRef;
|
6
|
+
colorPicker: ElementRef;
|
7
|
+
value: string;
|
8
|
+
editable: boolean;
|
9
|
+
show: boolean;
|
10
|
+
toolbarX: number;
|
11
|
+
toolbarY: number;
|
12
|
+
toolbarData: any;
|
13
|
+
constructor();
|
14
|
+
ngOnInit(): void;
|
15
|
+
ngOnDestroy(): void;
|
16
|
+
showToolbar(event: MouseEvent): void;
|
17
|
+
hideToolbar(event: MouseEvent): void;
|
18
|
+
formatText(command: string, value?: string): void;
|
19
|
+
changeFontSize(event: any): void;
|
20
|
+
changeColor(event: any): void;
|
21
|
+
updateText(event: Event): void;
|
22
|
+
onFormatChange(event: Event): void;
|
23
|
+
openColorPicker(): void;
|
24
|
+
readFormattingProperties(): void;
|
25
|
+
reFormattingData(): void;
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextEditorComponent, never>;
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextEditorComponent, "simpo-text-editor", never, { "value": { "alias": "value"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; }, {}, never, never, true, never>;
|
28
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { FooterContentModel, FooterSectionModel, FooterStylesModel } from './footer.modal';
|
2
|
+
import { Button, LayOutModel } from '../../styles/style.model';
|
3
|
+
import BaseSection from '../BaseSection';
|
4
|
+
import { EventsService } from '../../services/events.service';
|
5
|
+
import { MatDialog } from '@angular/material/dialog';
|
6
|
+
import { RestService } from '../../services/rest.service';
|
7
|
+
import { Subscription } from 'rxjs';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
export declare class FooterComponent extends BaseSection {
|
10
|
+
private _eventService;
|
11
|
+
private restService;
|
12
|
+
private matDialog;
|
13
|
+
data?: FooterSectionModel;
|
14
|
+
index?: number;
|
15
|
+
edit?: boolean;
|
16
|
+
delete?: boolean | undefined;
|
17
|
+
content?: FooterContentModel;
|
18
|
+
style?: FooterStylesModel;
|
19
|
+
linkEditorSubscription?: Subscription;
|
20
|
+
footerType: string;
|
21
|
+
screenWidth: number;
|
22
|
+
constructor(_eventService: EventsService, restService: RestService, matDialog: MatDialog);
|
23
|
+
ngOnInit(): Promise<void>;
|
24
|
+
ngOnDestroy(): void;
|
25
|
+
getScreenSize(event?: number): void;
|
26
|
+
get stylesLayout(): LayOutModel;
|
27
|
+
pageLink: string;
|
28
|
+
pages: any;
|
29
|
+
deleteFolderLinks(folderIndex: number, linkIndex: number): void;
|
30
|
+
editLinks(): void;
|
31
|
+
redirectTo(link: Button): void;
|
32
|
+
getPages(): void;
|
33
|
+
redirectToPage(pageData: any): void;
|
34
|
+
createNewLink(folderIndex: number): void;
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FooterComponent, never>;
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FooterComponent, "simpo-footer", never, { "data": { "alias": "data"; "required": false; }; "index": { "alias": "index"; "required": false; }; "edit": { "alias": "edit"; "required": false; }; "delete": { "alias": "delete"; "required": false; }; }, {}, never, never, true, never>;
|
37
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { ChannelType, FooterType } from "./../../styles/index";
|
2
|
+
import { ActionModel, BackgroundModel, InputTextModel, LayOutModel, Button } from "./../../styles/style.model";
|
3
|
+
import { FOOTER_IMAGE_SOURCE, SOCIAL_ICON_SHAPE, SOCIAL_ICON_SIZE, SOCIAL_ICON_TYPE } from "./../../styles/types";
|
4
|
+
export interface FooterSectionModel {
|
5
|
+
id: string;
|
6
|
+
sectionType: string;
|
7
|
+
sectionName: string;
|
8
|
+
content: FooterContentModel;
|
9
|
+
styles: FooterStylesModel;
|
10
|
+
action: ActionModel;
|
11
|
+
}
|
12
|
+
export interface FooterStylesModel {
|
13
|
+
layout: LayOutModel;
|
14
|
+
background: BackgroundModel;
|
15
|
+
footerType: FooterType;
|
16
|
+
socialIcon: FooterSocialIconSizeModel;
|
17
|
+
}
|
18
|
+
export interface FooterSocialIconSizeModel {
|
19
|
+
size: SOCIAL_ICON_SIZE;
|
20
|
+
shape: SOCIAL_ICON_SHAPE;
|
21
|
+
type: SOCIAL_ICON_TYPE;
|
22
|
+
}
|
23
|
+
export interface FooterContentModel {
|
24
|
+
siteNameAndLogo: string;
|
25
|
+
siteName: InputTextModel;
|
26
|
+
additionalDetails: InputTextModel;
|
27
|
+
logo: FooterLogoModel;
|
28
|
+
socialLinks: FooterSocialLinkModel;
|
29
|
+
displayBranding: boolean;
|
30
|
+
folder: FolderModel[];
|
31
|
+
}
|
32
|
+
export interface FooterLogoModel {
|
33
|
+
isImage: boolean;
|
34
|
+
text: FooterLogoTextModel;
|
35
|
+
image: footerLogobrandingModel;
|
36
|
+
size: number;
|
37
|
+
}
|
38
|
+
export interface footerLogobrandingModel {
|
39
|
+
source: FOOTER_IMAGE_SOURCE;
|
40
|
+
url: string;
|
41
|
+
}
|
42
|
+
export interface FooterLogoTextModel {
|
43
|
+
isText: boolean;
|
44
|
+
isIcon: boolean;
|
45
|
+
url: string;
|
46
|
+
fontFamily: string;
|
47
|
+
}
|
48
|
+
export interface FooterSocialLinkModel {
|
49
|
+
display: boolean;
|
50
|
+
channels: FooterSocialChannelModel[];
|
51
|
+
}
|
52
|
+
export interface FooterSocialChannelModel {
|
53
|
+
type: ChannelType;
|
54
|
+
url: string;
|
55
|
+
link: string;
|
56
|
+
}
|
57
|
+
export interface FolderModel {
|
58
|
+
label: string;
|
59
|
+
links: Button[];
|
60
|
+
}
|
@@ -1,7 +1,18 @@
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
1
2
|
import * as i0 from "@angular/core";
|
2
3
|
export declare class ImageUplaodService {
|
4
|
+
private http;
|
3
5
|
cmisFileUpload: any;
|
6
|
+
UNSPLASH_API_TOKEN: string;
|
7
|
+
private s3Client?;
|
8
|
+
region: string;
|
9
|
+
identityPoolId: string;
|
10
|
+
bucketName: string;
|
11
|
+
constructor(http: HttpClient);
|
4
12
|
uploadFileInAzure(file: File, folderName?: string): Promise<import("@azure/storage-blob").BlockBlobClient | null>;
|
13
|
+
uploadFileInAWS(file: File, folderName?: string): Promise<string>;
|
14
|
+
private fileToArrayBuffer;
|
15
|
+
searchPhotosInUnsplash(searchedText: string, page?: number, size?: number): import("rxjs").Observable<Object>;
|
5
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImageUplaodService, never>;
|
6
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<ImageUplaodService>;
|
7
18
|
}
|
@@ -80,6 +80,9 @@ export declare class RestService implements OnDestroy {
|
|
80
80
|
getLeadById(leadId: any): Observable<Object>;
|
81
81
|
getRegistrationList(payload: any): Observable<Object>;
|
82
82
|
getAllComponentCategories(): Observable<Object>;
|
83
|
+
getTemplate(): Observable<Object>;
|
84
|
+
getImageLibrary(): Observable<Object>;
|
85
|
+
saveImagesToBusinessLibrary(mediaRequest: any): Observable<Object>;
|
83
86
|
getFieldsToDisplay(fieldsList: any[]): any;
|
84
87
|
static ɵfac: i0.ɵɵFactoryDeclaration<RestService, never>;
|
85
88
|
static ɵprov: i0.ɵɵInjectableDeclaration<RestService>;
|
package/lib/styles/index.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
@@ -36,6 +36,7 @@ export * from './lib/sections/registration-form/registration-form.component';
|
|
36
36
|
export * from './lib/sections/property-component/property-component.component';
|
37
37
|
export * from './lib/sections/usp-video-section/usp-video-section.component';
|
38
38
|
export * from './lib/sections/property-list/property-list.component';
|
39
|
+
export * from './lib/sections/footer/footer.component';
|
39
40
|
export * from './lib/ecommerce/sections/featured-products/featured-products.component';
|
40
41
|
export * from './lib/ecommerce/sections/featured-category/featured-category.component';
|
41
42
|
export * from './lib/ecommerce/sections/product-desc/product-desc.component';
|
Binary file
|
@@ -7,7 +7,7 @@
|
|
7
7
|
position: absolute !important;
|
8
8
|
width: 40%;
|
9
9
|
top: 0;
|
10
|
-
left: 0;
|
10
|
+
left: 0 !important;
|
11
11
|
height: 100vh;
|
12
12
|
background-color: transparent !important;
|
13
13
|
box-shadow: none !important;
|
@@ -127,3 +127,14 @@ animation: slideInLeft 0.5s ease-in-out forwards;
|
|
127
127
|
line-height: 21px;
|
128
128
|
}
|
129
129
|
}
|
130
|
+
.link-editor {
|
131
|
+
height: 100vh;
|
132
|
+
width: 28vw;
|
133
|
+
position: absolute!important;
|
134
|
+
top: 0;
|
135
|
+
left: 0 !important;
|
136
|
+
animation: slideInLeft 0.5s ease-in-out forwards;
|
137
|
+
}
|
138
|
+
.mat-mdc-form-field-subscript-wrapper{
|
139
|
+
display: none;
|
140
|
+
}
|
Binary file
|