@rolatech/angular-property 20.1.6-beta.7 → 20.1.6-beta.9
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/fesm2022/{rolatech-angular-property-property-index.component-Bi3sRZjr.mjs → rolatech-angular-property-property-index.component-hkW0jalI.mjs} +2 -2
- package/fesm2022/{rolatech-angular-property-property-index.component-Bi3sRZjr.mjs.map → rolatech-angular-property-property-index.component-hkW0jalI.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-property-property-manage-viewings-index.component-CIEAeb7u.mjs → rolatech-angular-property-property-manage-viewings-index.component-DAuOdyR9.mjs} +2 -2
- package/fesm2022/{rolatech-angular-property-property-manage-viewings-index.component-CIEAeb7u.mjs.map → rolatech-angular-property-property-manage-viewings-index.component-DAuOdyR9.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-property-rolatech-angular-property-C1Plka3p.mjs → rolatech-angular-property-rolatech-angular-property-B10XiLy1.mjs} +25 -34
- package/fesm2022/rolatech-angular-property-rolatech-angular-property-B10XiLy1.mjs.map +1 -0
- package/fesm2022/rolatech-angular-property.mjs +1 -1
- package/package.json +5 -5
- package/fesm2022/rolatech-angular-property-rolatech-angular-property-C1Plka3p.mjs.map +0 -1
|
@@ -6,7 +6,7 @@ import { PropertyService, PropertySearchService } from '@rolatech/angular-servic
|
|
|
6
6
|
import { map, distinctUntilChanged, switchMap, finalize } from 'rxjs';
|
|
7
7
|
import * as i1 from '@angular/router';
|
|
8
8
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
9
|
-
import { P as PropertyUtil, a as PropertyViewType } from './rolatech-angular-property-rolatech-angular-property-
|
|
9
|
+
import { P as PropertyUtil, a as PropertyViewType } from './rolatech-angular-property-rolatech-angular-property-B10XiLy1.mjs';
|
|
10
10
|
import * as i1$1 from '@angular/material/paginator';
|
|
11
11
|
|
|
12
12
|
class PropertyIndexComponent {
|
|
@@ -94,4 +94,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
94
94
|
}] });
|
|
95
95
|
|
|
96
96
|
export { PropertyIndexComponent };
|
|
97
|
-
//# sourceMappingURL=rolatech-angular-property-property-index.component-
|
|
97
|
+
//# sourceMappingURL=rolatech-angular-property-property-index.component-hkW0jalI.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-property-property-index.component-Bi3sRZjr.mjs","sources":["../../../../packages/angular-property/src/lib/pages/property/property-index/property-index.component.ts","../../../../packages/angular-property/src/lib/pages/property/property-index/property-index.component.html"],"sourcesContent":["import { Component, DestroyRef, effect, inject, OnInit, signal, ViewEncapsulation } from '@angular/core';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, RichViewComponent, RichItemComponent } from '@rolatech/angular-components';\nimport { PropertySearchService, PropertyService } from '@rolatech/angular-services';\nimport { Property } from '../../../interfaces';\nimport { defer, distinctUntilChanged, finalize, map, switchMap } from 'rxjs';\nimport { PageEvent } from '@angular/material/paginator';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { PropertyUtil, PropertyViewType } from '../../../property-util';\n\n@Component({\n selector: 'rolatech-property-index',\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent],\n templateUrl: './property-index.component.html',\n styleUrl: './property-index.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class PropertyIndexComponent implements OnInit {\n propertyService = inject(PropertyService);\n propertySearchService = inject(PropertySearchService);\n private route = inject(ActivatedRoute);\n private destroyRef = inject(DestroyRef);\n private util = inject(PropertyUtil);\n private router = inject(Router);\n properties = signal<Property[]>([]);\n meta: any;\n loading = false;\n length = 100;\n pageSize = 15;\n pageIndex = signal(0);\n pageSizeOptions: number[] = [5, 10, 25, 100];\n viewType = PropertyViewType.GRID;\n\n ngOnInit(): void {\n this.util.viewEvent.subscribe((res) => {\n this.viewType = res;\n });\n const sub = this.route.queryParamMap\n .pipe(\n map((p) => {\n const page = p.get('page') ? Number(p.get('page')) : 1;\n this.pageIndex.set(Math.max(page - 1, 0));\n return {\n q: p.get('q') || undefined,\n town: p.get('town') || undefined,\n type: p.get('type') || undefined,\n market: p.get('market') || undefined,\n minBedrooms: p.get('minBedrooms') ? Number(p.get('minBedrooms')) : undefined,\n maxBedrooms: p.get('maxBedrooms') ? Number(p.get('maxBedrooms')) : undefined,\n minPrice: p.get('minPrice') ? Number(p.get('minPrice')) : undefined,\n maxPrice: p.get('maxPrice') ? Number(p.get('maxPrice')) : undefined,\n availableFrom: p.get('availableFrom') || undefined,\n availableTo: p.get('availableTo') || undefined,\n features: p.getAll('features')?.length ? p.getAll('features') : undefined,\n page,\n limit: p.get('limit') ? Number(p.get('limit')) : 15,\n sort: p.get('sort') || undefined,\n };\n }),\n // Cheap deep compare via JSON to avoid spam calls when nothing changed\n map((o) => JSON.stringify(o)),\n distinctUntilChanged(),\n map((s) => JSON.parse(s)),\n switchMap((params) => {\n this.loading = true;\n return this.propertySearchService.search<any>(params).pipe(finalize(() => (this.loading = false)));\n }),\n )\n .subscribe({\n next: (res) => {\n this.properties.set(res.data);\n this.meta = res.meta;\n this.length = res.meta.pagination.count;\n },\n error: () => {\n this.properties.set([]);\n this.length = 0;\n },\n });\n\n // // auto-unsubscribe on destroy\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n onPage(e: PageEvent) {\n this.router.navigate([], {\n queryParams: { page: e.pageIndex + 1, limit: e.pageSize },\n queryParamsHandling: 'merge',\n replaceUrl: true, // optional: avoid stacking history on every page click\n });\n }\n search(params: any) {\n this.propertySearchService.search(params).subscribe({\n next: (res) => {\n this.properties.set(res.data);\n this.meta = res.meta;\n this.loading = false;\n this.length = res.meta.pagination.count;\n },\n });\n }\n}\n","<div class=\"min-w-[320px] h-full m-auto\">\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n @if (properties() && properties().length > 0) {\n <rolatech-rich-view [wrap]=\"viewType === 0\" [list]=\"viewType === 1\">\n @for (item of properties(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media && item.media.length > 0 ? item.media[0].url : ''\"\n [title]=\"item.title\"\n thumbnailRatio=\"full\"\n [price]=\"item.price\"\n thumbnailMode=\"clip\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n } @else {\n <div class=\"flex w-full h-36 items-center justify-center\">\n <div>No data</div>\n </div>\n }\n }\n</div>\n<mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageIndex]=\"pageIndex()\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPage($event)\"\n hidePageSize\n showFirstLastButtons\n>\n</mat-paginator>\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;MAiBa,sBAAsB,CAAA;AACjC,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,IAAA,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC7C,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC;AAC3B,IAAA,MAAM,GAAG,MAAM,CAAC,MAA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iB,CAAC,EAAA,aAAA,EAG9E,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,81DAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"rolatech-angular-property-property-index.component-hkW0jalI.mjs","sources":["../../../../packages/angular-property/src/lib/pages/property/property-index/property-index.component.ts","../../../../packages/angular-property/src/lib/pages/property/property-index/property-index.component.html"],"sourcesContent":["import { Component, DestroyRef, effect, inject, OnInit, signal, ViewEncapsulation } from '@angular/core';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, RichViewComponent, RichItemComponent } from '@rolatech/angular-components';\nimport { PropertySearchService, PropertyService } from '@rolatech/angular-services';\nimport { Property } from '../../../interfaces';\nimport { defer, distinctUntilChanged, finalize, map, switchMap } from 'rxjs';\nimport { PageEvent } from '@angular/material/paginator';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { PropertyUtil, PropertyViewType } from '../../../property-util';\n\n@Component({\n selector: 'rolatech-property-index',\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent],\n templateUrl: './property-index.component.html',\n styleUrl: './property-index.component.scss',\n encapsulation: ViewEncapsulation.None,\n})\nexport class PropertyIndexComponent implements OnInit {\n propertyService = inject(PropertyService);\n propertySearchService = inject(PropertySearchService);\n private route = inject(ActivatedRoute);\n private destroyRef = inject(DestroyRef);\n private util = inject(PropertyUtil);\n private router = inject(Router);\n properties = signal<Property[]>([]);\n meta: any;\n loading = false;\n length = 100;\n pageSize = 15;\n pageIndex = signal(0);\n pageSizeOptions: number[] = [5, 10, 25, 100];\n viewType = PropertyViewType.GRID;\n\n ngOnInit(): void {\n this.util.viewEvent.subscribe((res) => {\n this.viewType = res;\n });\n const sub = this.route.queryParamMap\n .pipe(\n map((p) => {\n const page = p.get('page') ? Number(p.get('page')) : 1;\n this.pageIndex.set(Math.max(page - 1, 0));\n return {\n q: p.get('q') || undefined,\n town: p.get('town') || undefined,\n type: p.get('type') || undefined,\n market: p.get('market') || undefined,\n minBedrooms: p.get('minBedrooms') ? Number(p.get('minBedrooms')) : undefined,\n maxBedrooms: p.get('maxBedrooms') ? Number(p.get('maxBedrooms')) : undefined,\n minPrice: p.get('minPrice') ? Number(p.get('minPrice')) : undefined,\n maxPrice: p.get('maxPrice') ? Number(p.get('maxPrice')) : undefined,\n availableFrom: p.get('availableFrom') || undefined,\n availableTo: p.get('availableTo') || undefined,\n features: p.getAll('features')?.length ? p.getAll('features') : undefined,\n page,\n limit: p.get('limit') ? Number(p.get('limit')) : 15,\n sort: p.get('sort') || undefined,\n };\n }),\n // Cheap deep compare via JSON to avoid spam calls when nothing changed\n map((o) => JSON.stringify(o)),\n distinctUntilChanged(),\n map((s) => JSON.parse(s)),\n switchMap((params) => {\n this.loading = true;\n return this.propertySearchService.search<any>(params).pipe(finalize(() => (this.loading = false)));\n }),\n )\n .subscribe({\n next: (res) => {\n this.properties.set(res.data);\n this.meta = res.meta;\n this.length = res.meta.pagination.count;\n },\n error: () => {\n this.properties.set([]);\n this.length = 0;\n },\n });\n\n // // auto-unsubscribe on destroy\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n onPage(e: PageEvent) {\n this.router.navigate([], {\n queryParams: { page: e.pageIndex + 1, limit: e.pageSize },\n queryParamsHandling: 'merge',\n replaceUrl: true, // optional: avoid stacking history on every page click\n });\n }\n search(params: any) {\n this.propertySearchService.search(params).subscribe({\n next: (res) => {\n this.properties.set(res.data);\n this.meta = res.meta;\n this.loading = false;\n this.length = res.meta.pagination.count;\n },\n });\n }\n}\n","<div class=\"min-w-[320px] h-full m-auto\">\n @if (loading) {\n @for (number of [0, 1, 2, 3, 4, 5]; track number) {\n <div class=\"flex flex-row animate-pulse mt-3 mr-4 cursor-pointer w-full\">\n <div class=\"h-fit w-2/5 md:w-1/4 aspect-video hover:bg-[--rt-base-background] rounded-lg\"></div>\n <div class=\"w-3/5 md:w-3/4 ml-3 py-1 flex flex-col justify-between\">\n <div class=\"space-y-3\">\n <div class=\"h-4 bg-[--rt-base-background] rounded col-span-2\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1\"></div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-1 py-1\"></div>\n </div>\n <div>\n <div class=\"h-2 bg-[--rt-base-background] rounded col-span-2 py-1\"></div>\n </div>\n </div>\n </div>\n }\n } @else {\n @if (properties() && properties().length > 0) {\n <rolatech-rich-view [wrap]=\"viewType === 0\" [list]=\"viewType === 1\">\n @for (item of properties(); track item) {\n @defer {\n <rolatech-rich-item\n [routerLink]=\"['./', item.id]\"\n [thumbnail]=\"item.media && item.media.length > 0 ? item.media[0].url : ''\"\n [title]=\"item.title\"\n thumbnailRatio=\"full\"\n [price]=\"item.price\"\n thumbnailMode=\"clip\"\n ></rolatech-rich-item>\n }\n }\n </rolatech-rich-view>\n } @else {\n <div class=\"flex w-full h-36 items-center justify-center\">\n <div>No data</div>\n </div>\n }\n }\n</div>\n<mat-paginator\n #paginator\n [length]=\"length\"\n [pageSize]=\"pageSize\"\n [pageIndex]=\"pageIndex()\"\n [pageSizeOptions]=\"pageSizeOptions\"\n (page)=\"onPage($event)\"\n hidePageSize\n showFirstLastButtons\n>\n</mat-paginator>\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;MAiBa,sBAAsB,CAAA;AACjC,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,IAAA,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC7C,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC;AAC3B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC/B,IAAA,UAAU,GAAG,MAAM,CAAa,EAAE,sDAAC;AACnC,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAG,GAAG;IACZ,QAAQ,GAA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|
|
6
6
|
import * as i1 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
8
|
import { PropertyService } from '@rolatech/angular-services';
|
|
9
|
-
import { b as PropertyViewingItemComponent } from './rolatech-angular-property-rolatech-angular-property-
|
|
9
|
+
import { b as PropertyViewingItemComponent } from './rolatech-angular-property-rolatech-angular-property-B10XiLy1.mjs';
|
|
10
10
|
|
|
11
11
|
class PropertyManageViewingsIndexComponent extends BaseComponent {
|
|
12
12
|
propertyService = inject(PropertyService);
|
|
@@ -84,4 +84,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
84
84
|
}] });
|
|
85
85
|
|
|
86
86
|
export { PropertyManageViewingsIndexComponent };
|
|
87
|
-
//# sourceMappingURL=rolatech-angular-property-property-manage-viewings-index.component-
|
|
87
|
+
//# sourceMappingURL=rolatech-angular-property-property-manage-viewings-index.component-DAuOdyR9.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-property-property-manage-viewings-index.component-
|
|
1
|
+
{"version":3,"file":"rolatech-angular-property-property-manage-viewings-index.component-DAuOdyR9.mjs","sources":["../../../../packages/angular-property/src/lib/pages/property-manage/property-manage-viewings-index/property-manage-viewings-index.component.ts","../../../../packages/angular-property/src/lib/pages/property-manage/property-manage-viewings-index/property-manage-viewings-index.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BaseComponent, EmptyComponent, TabComponent, TabsComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { MatButtonModule } from '@angular/material/button';\nimport { RouterModule } from '@angular/router';\nimport { PropertyService } from '@rolatech/angular-services';\nimport { PropertyViewingItemComponent } from '../../../components/property-viewing-item/property-viewing-item.component';\nimport { PropertyViewing } from '../../../interfaces';\n\n@Component({\n selector: 'rolatech-property-manage-viewings-index',\n imports: [\n CommonModule,\n ToolbarComponent,\n MatButtonModule,\n TabsComponent,\n TabComponent,\n RouterModule,\n EmptyComponent,\n PropertyViewingItemComponent,\n ],\n templateUrl: './property-manage-viewings-index.component.html',\n styleUrl: './property-manage-viewings-index.component.scss',\n})\nexport class PropertyManageViewingsIndexComponent extends BaseComponent implements OnInit {\n propertyService = inject(PropertyService);\n select = 0;\n links = [\n {\n name: 'All',\n icon: 'dashboard',\n },\n {\n name: 'Completed',\n icon: 'category',\n status: 'completed',\n },\n {\n name: 'Cancelled',\n icon: 'category',\n status: 'cancelled',\n },\n ];\n filterOptions: any = {\n type: '',\n status: '',\n };\n viewings: PropertyViewing[] = [];\n\n ngOnInit(): void {\n this.route.queryParams.subscribe(({ status }) => {\n this.select = this.links.findIndex((item) => item.status === status);\n if (status) {\n this.filterOptions.status = (status as string).toUpperCase();\n } else {\n delete this.filterOptions.status;\n }\n this.findViewings();\n });\n }\n findViewings() {\n const options = {\n sort: 'updatedAt desc',\n };\n const filterString = this.convertFilterOptions(this.filterOptions);\n if (filterString) {\n options['filter'] = filterString;\n }\n this.propertyService.findViewingsByAgent(options).subscribe({\n next: (res: any) => {\n this.viewings = res.data;\n },\n });\n }\n convertFilterOptions(jsonObj) {\n return Object.entries(jsonObj)\n .filter(([key, value]) => value !== '' && value !== undefined)\n .map(([key, value]) => {\n return `${key}:${value}`;\n })\n .join(',');\n }\n}\n","<rolatech-toolbar title=\"Viewings\">\n <div class=\"flex items-center gap-2\"></div>\n</rolatech-toolbar>\n<rolatech-tabs [select]=\"select\">\n @for (item of links; track item) {\n @if (item.status) {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\" [queryParams]=\"{ status: item.status }\"></rolatech-tab>\n } @else {\n <rolatech-tab [label]=\"item.name\" routerLink=\"./\"></rolatech-tab>\n }\n }\n</rolatech-tabs>\n<div>\n @if (viewings) {\n @for (item of viewings; track $index) {\n <rolatech-property-viewing-item [routerLink]=\"['./', item.id]\" [viewing]=\"item\"></rolatech-property-viewing-item>\n }\n } @else {\n <rolatech-empty></rolatech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EAChB,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACf,aAAa,oHACb,YAAY,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACZ,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACZ,cAAc,2DACd,4BAA4B,EAAA,QAAA,EAAA,gCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKnB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAfhD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yCAAyC,EAAA,OAAA,EAC1C;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,aAAa;wBACb,YAAY;wBACZ,YAAY;wBACZ,cAAc;wBACd,4BAA4B;AAC7B,qBAAA,EAAA,QAAA,EAAA,itBAAA,EAAA;;;;;"}
|
|
@@ -14,7 +14,7 @@ import { ThumbnailComponent, ImagePlaceholderComponent, ToolbarComponent, Spinne
|
|
|
14
14
|
import { PropertyService, FeatureService, InvoiceService, PropertyHighlightsService, TimeZoneService, PaymentService, PropertySearchService, DialogService } from '@rolatech/angular-services';
|
|
15
15
|
import * as i1 from '@angular/common';
|
|
16
16
|
import { CommonModule, NgClass, isPlatformBrowser, ViewportScroller, KeyValuePipe, Location } from '@angular/common';
|
|
17
|
-
import { PricePipe, APP_CONFIG, AngularCommonModule, OptionsFormatPipe, DecimalDirective, DurationPipe } from '@rolatech/angular-common';
|
|
17
|
+
import { PricePipe, APP_CONFIG, AngularCommonModule, OptionsFormatPipe, DecimalDirective, DurationPipe, SafeUrlPipe } from '@rolatech/angular-common';
|
|
18
18
|
import * as i2 from '@angular/material/icon';
|
|
19
19
|
import { MatIconModule, MatIcon } from '@angular/material/icon';
|
|
20
20
|
import { MatDialog } from '@angular/material/dialog';
|
|
@@ -2809,7 +2809,7 @@ const propertyRoutes = [
|
|
|
2809
2809
|
children: [
|
|
2810
2810
|
{
|
|
2811
2811
|
path: '',
|
|
2812
|
-
loadComponent: () => import('./rolatech-angular-property-property-index.component-
|
|
2812
|
+
loadComponent: () => import('./rolatech-angular-property-property-index.component-hkW0jalI.mjs').then((x) => x.PropertyIndexComponent),
|
|
2813
2813
|
},
|
|
2814
2814
|
],
|
|
2815
2815
|
},
|
|
@@ -3911,26 +3911,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
3911
3911
|
args: [{ selector: 'rolatech-property-video-youtube-add', imports: [CommonModule, MatFormFieldModule, MatInputModule, FormsModule], template: "<mat-form-field appearance=\"fill\">\n <mat-label>Youtube Video URL</mat-label>\n <input matInput placeholder=\"Youtube Video URL\" type=\"text\" [(ngModel)]=\"url\" i18n />\n</mat-form-field>\n", styles: ["mat-form-field{width:100%}\n"] }]
|
|
3912
3912
|
}], propDecorators: { output: [{ type: i0.Output, args: ["output"] }] } });
|
|
3913
3913
|
|
|
3914
|
-
class SafeUrlPipe {
|
|
3915
|
-
sanitizer = inject(DomSanitizer);
|
|
3916
|
-
transform(url) {
|
|
3917
|
-
if (!url) {
|
|
3918
|
-
return null;
|
|
3919
|
-
}
|
|
3920
|
-
// If you want to allow in [href], [src], [poster], [srcdoc], etc.
|
|
3921
|
-
return this.sanitizer.bypassSecurityTrustResourceUrl(url);
|
|
3922
|
-
}
|
|
3923
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SafeUrlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3924
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: SafeUrlPipe, isStandalone: true, name: "safeUrl" });
|
|
3925
|
-
}
|
|
3926
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SafeUrlPipe, decorators: [{
|
|
3927
|
-
type: Pipe,
|
|
3928
|
-
args: [{
|
|
3929
|
-
name: 'safeUrl',
|
|
3930
|
-
standalone: true
|
|
3931
|
-
}]
|
|
3932
|
-
}] });
|
|
3933
|
-
|
|
3934
3914
|
class PropertyVideoItem {
|
|
3935
3915
|
platformId = inject(PLATFORM_ID);
|
|
3936
3916
|
el = inject(ElementRef);
|
|
@@ -4011,10 +3991,10 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4011
3991
|
selectProvider = '';
|
|
4012
3992
|
videoEditId = '';
|
|
4013
3993
|
get youtubeVideos() {
|
|
4014
|
-
return this.videos.filter(v => v.provider === PropertyVideoProvider.YOUTUBE);
|
|
3994
|
+
return this.videos.filter((v) => v.provider === PropertyVideoProvider.YOUTUBE);
|
|
4015
3995
|
}
|
|
4016
3996
|
get cosVideos() {
|
|
4017
|
-
return this.videos.filter(v => v.provider === PropertyVideoProvider.COS);
|
|
3997
|
+
return this.videos.filter((v) => v.provider === PropertyVideoProvider.COS);
|
|
4018
3998
|
}
|
|
4019
3999
|
constructor() {
|
|
4020
4000
|
super();
|
|
@@ -4062,7 +4042,7 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4062
4042
|
const data = {
|
|
4063
4043
|
url: res,
|
|
4064
4044
|
title: 'Youtube',
|
|
4065
|
-
provider: PropertyVideoProvider.YOUTUBE
|
|
4045
|
+
provider: PropertyVideoProvider.YOUTUBE,
|
|
4066
4046
|
};
|
|
4067
4047
|
this.propertyService.addVideo(this.id, data).subscribe({
|
|
4068
4048
|
next: (res) => {
|
|
@@ -4090,7 +4070,7 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4090
4070
|
if (res) {
|
|
4091
4071
|
const data = {
|
|
4092
4072
|
url: res,
|
|
4093
|
-
title: video.title
|
|
4073
|
+
title: video.title,
|
|
4094
4074
|
};
|
|
4095
4075
|
this.propertyService.updateVideo(this.id, video.id, data).subscribe({
|
|
4096
4076
|
next: (res) => {
|
|
@@ -4111,7 +4091,7 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4111
4091
|
}
|
|
4112
4092
|
addCOSVideo() {
|
|
4113
4093
|
const video = {
|
|
4114
|
-
provider: PropertyVideoProvider.COS
|
|
4094
|
+
provider: PropertyVideoProvider.COS,
|
|
4115
4095
|
};
|
|
4116
4096
|
this.propertyService.addVideo(this.id, video).subscribe({
|
|
4117
4097
|
next: (res) => {
|
|
@@ -4123,7 +4103,8 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4123
4103
|
onCOSVideoSave(event) {
|
|
4124
4104
|
const { id, title, url } = event;
|
|
4125
4105
|
const data = {
|
|
4126
|
-
title,
|
|
4106
|
+
title,
|
|
4107
|
+
url,
|
|
4127
4108
|
};
|
|
4128
4109
|
this.propertyService.updateVideo(this.id, id, data).subscribe({
|
|
4129
4110
|
next: (res) => {
|
|
@@ -4146,9 +4127,9 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4146
4127
|
next: (res) => {
|
|
4147
4128
|
if (res) {
|
|
4148
4129
|
this.propertyService.deleteVideo(this.id, video.id).subscribe({
|
|
4149
|
-
next: res => {
|
|
4150
|
-
this.videos = this.videos.filter(v => v.id !== video.id);
|
|
4151
|
-
this.snackBarService.open(
|
|
4130
|
+
next: (res) => {
|
|
4131
|
+
this.videos = this.videos.filter((v) => v.id !== video.id);
|
|
4132
|
+
this.snackBarService.open('Video deleted');
|
|
4152
4133
|
},
|
|
4153
4134
|
error: (error) => {
|
|
4154
4135
|
this.snackBarService.open(error.message);
|
|
@@ -4261,7 +4242,17 @@ class PropertyManageVideoComponent extends BaseComponent {
|
|
|
4261
4242
|
}
|
|
4262
4243
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PropertyManageVideoComponent, decorators: [{
|
|
4263
4244
|
type: Component,
|
|
4264
|
-
args: [{ selector: 'rolatech-property-manage-video', imports: [
|
|
4245
|
+
args: [{ selector: 'rolatech-property-manage-video', imports: [
|
|
4246
|
+
CommonModule,
|
|
4247
|
+
ToolbarComponent,
|
|
4248
|
+
PropertyManageContentComponent,
|
|
4249
|
+
MatButtonModule,
|
|
4250
|
+
TabsComponent,
|
|
4251
|
+
TabComponent,
|
|
4252
|
+
SafeUrlPipe,
|
|
4253
|
+
PropertyVideoItem,
|
|
4254
|
+
MatIcon,
|
|
4255
|
+
], template: "<rolatech-property-manage-content>\n <rolatech-toolbar title=\"Videos\" class=\"hidden md:block\" divider> </rolatech-toolbar>\n <rolatech-tabs [(select)]=\"tabIndex\">\n <rolatech-tab label=\"Youtube\"></rolatech-tab>\n <rolatech-tab label=\"COS\"></rolatech-tab>\n </rolatech-tabs>\n <div class=\"py-2\">\n @if (tabIndex() === 0) {\n @if (youtubeVideos.length > 0 && youtubeVideos[0].url) {\n <div class=\"relative w-full aspect-video\">\n @if (!iframeLoaded) {\n <div class=\"absolute inset-0 flex items-center justify-center bg-black/10 border bg-white\">\n <span>Loading...</span>\n </div>\n }\n <iframe\n [src]=\"toYoutubeEmbed(youtubeVideos[0].url) | safeUrl\"\n frameborder=\"0\"\n allowfullscreen\n class=\"w-full h-full\"\n (load)=\"iframeLoaded = true\"\n ></iframe>\n </div>\n <button mat-flat-button (click)=\"updateYoutubeUrl(youtubeVideos[0])\" class=\"mt-3\">Update Youtube url</button>\n } @else {\n <button mat-flat-button (click)=\"addYoutubeUrl()\" class=\"mt-3\">Add Youtube url</button>\n }\n }\n @if (tabIndex() === 1) {\n @for (video of cosVideos; track $index) {\n <rolatech-property-video-item\n [video]=\"video\"\n (save)=\"onCOSVideoSave($event)\"\n (delete)=\"onCOSVideoDelete(video, $event)\"\n (edit)=\"onVideoEdit($event)\"\n (upload)=\"onCOSVideoUpload(video, $event)\"\n [editId]=\"videoEditId\"\n ></rolatech-property-video-item>\n }\n @if (cosVideos.length === 0) {\n <div class=\"p-3\">\n <button mat-flat-button class=\"max-h-8\" (click)=\"addCOSVideo()\">\n <mat-icon>add</mat-icon>\n <span>Add video</span>\n </button>\n </div>\n }\n <!-- <rolatech-video-upload (upload)=\"onMediaUploadInit($event)\"></rolatech-video-upload> -->\n }\n </div>\n</rolatech-property-manage-content>\n" }]
|
|
4265
4256
|
}], ctorParameters: () => [] });
|
|
4266
4257
|
|
|
4267
4258
|
class PropertyManageHighlights extends BaseComponent {
|
|
@@ -4643,7 +4634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
4643
4634
|
const propertyManageViewingsRoutes = [
|
|
4644
4635
|
{
|
|
4645
4636
|
path: '',
|
|
4646
|
-
loadComponent: () => import('./rolatech-angular-property-property-manage-viewings-index.component-
|
|
4637
|
+
loadComponent: () => import('./rolatech-angular-property-property-manage-viewings-index.component-DAuOdyR9.mjs').then((x) => x.PropertyManageViewingsIndexComponent),
|
|
4647
4638
|
},
|
|
4648
4639
|
{
|
|
4649
4640
|
path: ':id',
|
|
@@ -5709,4 +5700,4 @@ const propertyAgentOfferRoutes = [
|
|
|
5709
5700
|
*/
|
|
5710
5701
|
|
|
5711
5702
|
export { ResidencyStatus as A, PropertyApplicantType as B, AdverseCreditStatus as C, BedroomRange as D, EmploymentStatus as E, PriceRange as F, Market as M, PropertyUtil as P, RentFrequency as R, ViewingTime as V, PropertyViewType as a, PropertyViewingItemComponent as b, propertyManageOffersRoutes as c, propertyRoutes as d, propertyManageRoutes as e, featureManageRoutes as f, propertyManageViewingsRoutes as g, propertyAgentViewingRoutes as h, propertyAgentOfferRoutes as i, PropertyActionsComponent as j, PropertyItemComponent as k, lettingManageRoutes as l, PropertyPricingComponent as m, PropertyPriceType as n, PropertyVideoProvider as o, propertyReviewRoutes as p, PropertyStatus as q, PropertyType as r, PropertyInventoryStatus as s, tenantManageRoutes as t, PropertyScope as u, PropertyViewingStatus as v, PropertyViewerCategory as w, PropertyOfferTimelineStatus as x, PropertyOfferType as y, PropertyOfferStatus as z };
|
|
5712
|
-
//# sourceMappingURL=rolatech-angular-property-rolatech-angular-property-
|
|
5703
|
+
//# sourceMappingURL=rolatech-angular-property-rolatech-angular-property-B10XiLy1.mjs.map
|