@rolatech/angular-property 20.2.9-beta.5 → 20.2.9-beta.6

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.
@@ -4,7 +4,7 @@ import { AngularCommonModule } from '@rolatech/angular-common';
4
4
  import { BaseComponent, RichItemComponent, AngularComponentsModule, RichViewComponent } from '@rolatech/angular-components';
5
5
  import { PropertyService, PropertySearchService } from '@rolatech/angular-services';
6
6
  import { map, distinctUntilChanged, switchMap, finalize } from 'rxjs';
7
- import { P as PropertyUtil, a as PropertyViewType, b as PropertyManageItemSkeleton } from './rolatech-angular-property-rolatech-angular-property-nHa2eV9i.mjs';
7
+ import { P as PropertyUtil, a as PropertyViewType, b as PropertyManageItemSkeleton } from './rolatech-angular-property-rolatech-angular-property-BQ-earJm.mjs';
8
8
  import * as i1$1 from '@angular/common';
9
9
  import * as i2 from '@angular/material/paginator';
10
10
  import * as i1 from '@angular/router';
@@ -97,4 +97,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
97
97
  }] });
98
98
 
99
99
  export { PropertyIndexComponent };
100
- //# sourceMappingURL=rolatech-angular-property-property-index.component-DpBSSKtG.mjs.map
100
+ //# sourceMappingURL=rolatech-angular-property-property-index.component-svOlAAQR.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-property-property-index.component-DpBSSKtG.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, BaseComponent } 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';\nimport { PropertyManageItemSkeleton } from '../../../components/property-manage-item-skeleton/property-manage-item-skeleton';\n\n@Component({\n selector: 'rolatech-property-index',\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, PropertyManageItemSkeleton],\n templateUrl: './property-index.component.html',\n styleUrl: './property-index.component.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'rolatech-property-index',\n },\n})\nexport class PropertyIndexComponent extends BaseComponent implements OnInit {\n propertyService = inject(PropertyService);\n propertySearchService = inject(PropertySearchService);\n private util = inject(PropertyUtil);\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 params['sort'] = 'updatedAt desc';\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 error: (error) => {\n this.loading = false;\n },\n });\n }\n}\n","<div class=\"min-w-[320px] h-full\">\n @if (loading) {\n <div class=\"bg-[--rt-rasised-background] h-full\">\n <div class=\"flex flex-row flex-wrap\" [ngClass]=\"viewType === 1 ? 'flex-col' : 'flex-row flex-wrap'\">\n @for (row of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; track row) {\n <rolatech-property-manage-item-skeleton [list]=\"viewType === 1\"></rolatech-property-manage-item-skeleton>\n }\n </div>\n </div>\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 <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 }\n</div>\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;AAqBM,MAAO,sBAAuB,SAAQ,aAAa,CAAA;AACvD,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,IAAA,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC7C,IAAA,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC;AACnC,IAAA,UAAU,GAAG,MAAM,CAAa,EAAE,sDAAC;AACnC,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAG,GAAG;IACZ,QAAQ,GAAG,EAAE;AACb,IAAA,SAAS,GAAG,MAAM,CAAC,CAAC,qDAAC;IACrB,eAAe,GAAa,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;AAC5C,IAAA,QAAQ,GAAG,gBAAgB,CAAC,IAAI;IAEhC,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,KAAI;AACpC,YAAA,IAAI,CAAC,QAAQ,GAAG,GAAG;AACrB,QAAA,CAAC,CAAC;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AACpB,aAAA,IAAI,CACH,GAAG,CAAC,CAAC,CAAC,KAAI;YACR,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC;AACtD,YAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;YACzC,OAAO;gBACL,CAAC,EAAE,CAAC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uB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,cAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,MAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAqB,0BAA0B,EAAA,QAAA,EAAA,wCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,sBAAA,EAAA,CAAA,MAAA,CAAAC,EAAA,CAAA,UAAA,EAA7C,iBAAiB,CAAA,CAAA,EAAA,CAAA;;2FAQjF,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,WAC1B,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,0BAA0B,CAAC,EAAA,aAAA,EAG1G,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,yBAAyB;AACjC,qBAAA,EAAA,QAAA,EAAA,k/CAAA,EAAA,MAAA,EAAA,CAAA,+gBAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"rolatech-angular-property-property-index.component-svOlAAQR.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, BaseComponent } 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';\nimport { PropertyManageItemSkeleton } from '../../../components/property-manage-item-skeleton/property-manage-item-skeleton';\n\n@Component({\n selector: 'rolatech-property-index',\n imports: [AngularCommonModule, AngularComponentsModule, RichViewComponent, RichItemComponent, PropertyManageItemSkeleton],\n templateUrl: './property-index.component.html',\n styleUrl: './property-index.component.scss',\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'rolatech-property-index',\n },\n})\nexport class PropertyIndexComponent extends BaseComponent implements OnInit {\n propertyService = inject(PropertyService);\n propertySearchService = inject(PropertySearchService);\n private util = inject(PropertyUtil);\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 params['sort'] = 'updatedAt desc';\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 error: (error) => {\n this.loading = false;\n },\n });\n }\n}\n","<div class=\"min-w-[320px] h-full\">\n @if (loading) {\n <div class=\"bg-[--rt-rasised-background] h-full\">\n <div class=\"flex flex-row flex-wrap\" [ngClass]=\"viewType === 1 ? 'flex-col' : 'flex-row flex-wrap'\">\n @for (row of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; track row) {\n <rolatech-property-manage-item-skeleton [list]=\"viewType === 1\"></rolatech-property-manage-item-skeleton>\n }\n </div>\n </div>\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 <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 }\n</div>\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;;AAqBM,MAAO,sBAAuB,SAAQ,aAAa,CAAA;AACvD,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,IAAA,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC7C,IAAA,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC;AACnC,IAAA,UAAU,GAAG,MAAM,CAAa,EAAE,sDAAC;AACnC,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAG,GAAG;IACZ,QAAQ,GAAG,EAAE;AACb,IAAA,SAAS,GAAG,MAAM,CAAC,CAAC,qDAAC;IACrB,eAAe,GAAa,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;AAC5C,IAAA,QAAQ,GAAG,gBAAgB,CAAC,IAAI;IAEhC,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,KAAI;AACpC,YAAA,IAAI,CAAC,QAAQ,GAAG,GAAG;AACrB,QAAA,CAAC,CAAC;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AACpB,aAAA,IAAI,CACH,GAAG,CAAC,CAAC,CAA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AA,EAG1G,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B;AACJ,wBAAA,KAAK,EAAE,yBAAyB;AACjC,qBAAA,EAAA,QAAA,EAAA,k/CAAA,EAAA,MAAA,EAAA,CAAA,+gBAAA,CAAA,EAAA;;;;;"}
@@ -6,7 +6,7 @@ import { MatButtonModule } from '@angular/material/button';
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 { c as PropertyViewingItemComponent } from './rolatech-angular-property-rolatech-angular-property-nHa2eV9i.mjs';
9
+ import { c as PropertyViewingItemComponent } from './rolatech-angular-property-rolatech-angular-property-BQ-earJm.mjs';
10
10
  import * as i2 from '@angular/material/paginator';
11
11
  import { MatPaginatorModule } from '@angular/material/paginator';
12
12
  import { map, distinctUntilChanged, switchMap, finalize } from 'rxjs';
@@ -107,4 +107,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
107
107
  }] });
108
108
 
109
109
  export { PropertyManageViewingsIndexComponent };
110
- //# sourceMappingURL=rolatech-angular-property-property-manage-viewings-index.component-B5lCZM1L.mjs.map
110
+ //# sourceMappingURL=rolatech-angular-property-property-manage-viewings-index.component-CUNIyEhO.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"rolatech-angular-property-property-manage-viewings-index.component-B5lCZM1L.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, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n BaseComponent,\n EmptyComponent,\n TabComponent,\n TabsComponent,\n ToolbarComponent,\n ListComponent,\n} 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';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { map, distinctUntilChanged, switchMap, finalize } from 'rxjs';\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 MatPaginatorModule,\n ListComponent,\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 loading = false;\n viewings = signal<PropertyViewing[]>([]);\n meta: any;\n pageEvent!: PageEvent;\n length = 100;\n pageSize = 15;\n pageSizeOptions: number[] = [5, 10, 25, 100];\n pageIndex = signal(0);\n\n ngOnInit(): void {\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 const status = p.get('status') || undefined;\n\n let filter = '';\n if (status) {\n this.select = this.links.findIndex((item) => item.status === status);\n filter = `status:${status?.toUpperCase()}`;\n }\n return {\n page,\n filter,\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 params['sort'] = 'updatedAt desc';\n return this.propertyService.findViewings(params).pipe(finalize(() => (this.loading = false)));\n }),\n )\n .subscribe({\n next: (res: any) => {\n this.viewings.set(res.data);\n this.meta = res.meta;\n this.length = res.meta.pagination.count;\n },\n error: () => {\n this.viewings.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}\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(); as 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-empty>\n }\n</div> -->\n<rolatech-list>\n @if (viewings(); as viewings) {\n @for (item of viewings; track item) {\n <rolatech-property-viewing-item\n [loading]=\"loading\"\n [routerLink]=\"['./', item.id]\"\n [viewing]=\"item\"\n ></rolatech-property-viewing-item>\n }\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n</rolatech-list>\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":[],"mappings":";;;;;;;;;;;;;AAmCM,MAAO,oCAAqC,SAAQ,aAAa,CAAA;AACrE,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC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,"file":"rolatech-angular-property-property-manage-viewings-index.component-CUNIyEhO.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, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport {\n BaseComponent,\n EmptyComponent,\n TabComponent,\n TabsComponent,\n ToolbarComponent,\n ListComponent,\n} 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';\nimport { MatPaginatorModule, PageEvent } from '@angular/material/paginator';\nimport { map, distinctUntilChanged, switchMap, finalize } from 'rxjs';\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 MatPaginatorModule,\n ListComponent,\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 loading = false;\n viewings = signal<PropertyViewing[]>([]);\n meta: any;\n pageEvent!: PageEvent;\n length = 100;\n pageSize = 15;\n pageSizeOptions: number[] = [5, 10, 25, 100];\n pageIndex = signal(0);\n\n ngOnInit(): void {\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 const status = p.get('status') || undefined;\n\n let filter = '';\n if (status) {\n this.select = this.links.findIndex((item) => item.status === status);\n filter = `status:${status?.toUpperCase()}`;\n }\n return {\n page,\n filter,\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 params['sort'] = 'updatedAt desc';\n return this.propertyService.findViewings(params).pipe(finalize(() => (this.loading = false)));\n }),\n )\n .subscribe({\n next: (res: any) => {\n this.viewings.set(res.data);\n this.meta = res.meta;\n this.length = res.meta.pagination.count;\n },\n error: () => {\n this.viewings.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}\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(); as 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-empty>\n }\n</div> -->\n<rolatech-list>\n @if (viewings(); as viewings) {\n @for (item of viewings; track item) {\n <rolatech-property-viewing-item\n [loading]=\"loading\"\n [routerLink]=\"['./', item.id]\"\n [viewing]=\"item\"\n ></rolatech-property-viewing-item>\n }\n } @else {\n <rolatech-empty></rolatech-empty>\n }\n</rolatech-list>\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":[],"mappings":";;;;;;;;;;;;;AAmCM,MAAO,oCAAqC,SAAQ,aAAa,CAAA;AACrE,IAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACzC,MAAM,GAAG,CAAC;AACV,IAAA,KAAK,GAAG;AACN,QAAA;AACE,YAAA,IAAI,EAAE,KAAK;AACX,YAAA,IAAI,EAAE,WAAW;AAClB,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,WAAW;AACjB,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,MAAM,EAAE,WAAW;AACpB,SAAA;AACD,QAAA;AACE,YAAA,IAAI,EAAE,WAAW;AACjB,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,MAAM,EAAE,WAAW;AACpB,SAAA;KACF;AACD,IAAA,aAAa,GAAQ;AACnB,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,MAAM,EAAE,EAAE;KACX;IACD,OAAO,GAAG,KAAK;AACf,IAAA,QAAQ,GAAG,MAAM,CAAoB,EAAE,oDAAC;AACxC,IAAA,IAAI;AACJ,IAAA,SAAS;IACT,MAAM,GAAG,GAAG;IACZ,QAAQ,GAAG,EAAE;IACb,eAAe,GAAa,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;AAC5C,IAAA,SAAS,GAAG,MAAM,CAAC,CAAC,qDAAC;IAErB,QAAQ,GAAA;AACN,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;AACpB,aAAA,IAAI,CACH,GAAG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AA,EAAA,IAAA,EAClB,aAAa,EAAA,QAAA,EAAA,eAAA,EAAA,CAAA,EAAA,CAAA;;2FAKJ,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAjBhD,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;wBAC5B,kBAAkB;wBAClB,aAAa;AACd,qBAAA,EAAA,QAAA,EAAA,k0CAAA,EAAA;;;;;"}
@@ -34,7 +34,7 @@ import { ENTER, COMMA } from '@angular/cdk/keycodes';
34
34
  import * as i4$2 from '@angular/material/autocomplete';
35
35
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
36
36
  import { MatOptionModule, MAT_DATE_LOCALE, DateAdapter, MAT_DATE_FORMATS, MatNativeDateModule } from '@angular/material/core';
37
- import _, { findIndex, findLastIndex, first, remove } from 'lodash';
37
+ import { findIndex, findLastIndex, first, remove } from 'lodash';
38
38
  import * as i2$2 from '@angular/material/divider';
39
39
  import { MatDividerModule } from '@angular/material/divider';
40
40
  import { MomentDateAdapter } from '@angular/material-moment-adapter';
@@ -6510,7 +6510,7 @@ const propertyRoutes = [
6510
6510
  children: [
6511
6511
  {
6512
6512
  path: '',
6513
- loadComponent: () => import('./rolatech-angular-property-property-index.component-DpBSSKtG.mjs').then((x) => x.PropertyIndexComponent),
6513
+ loadComponent: () => import('./rolatech-angular-property-property-index.component-svOlAAQR.mjs').then((x) => x.PropertyIndexComponent),
6514
6514
  },
6515
6515
  ],
6516
6516
  },
@@ -8416,7 +8416,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
8416
8416
  const propertyManageViewingsRoutes = [
8417
8417
  {
8418
8418
  path: '',
8419
- loadComponent: () => import('./rolatech-angular-property-property-manage-viewings-index.component-B5lCZM1L.mjs').then((x) => x.PropertyManageViewingsIndexComponent),
8419
+ loadComponent: () => import('./rolatech-angular-property-property-manage-viewings-index.component-CUNIyEhO.mjs').then((x) => x.PropertyManageViewingsIndexComponent),
8420
8420
  },
8421
8421
  {
8422
8422
  path: ':id',
@@ -8467,16 +8467,6 @@ class LettingManageIndex extends BaseComponent {
8467
8467
  this.find();
8468
8468
  }
8469
8469
  find() {
8470
- this.loading = true;
8471
- this.propertyService.find({}).subscribe({
8472
- next: (res) => {
8473
- this.lettings = res.data;
8474
- this.loading = false;
8475
- },
8476
- error: (error) => {
8477
- this.loading = false;
8478
- },
8479
- });
8480
8470
  const sub = this.route.queryParamMap
8481
8471
  .pipe(map((p) => {
8482
8472
  const page = p.get('page') ? Number(p.get('page')) : 1;
@@ -8524,7 +8514,7 @@ class LettingManageIndex extends BaseComponent {
8524
8514
  });
8525
8515
  }
8526
8516
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: LettingManageIndex, deps: null, target: i0.ɵɵFactoryTarget.Component });
8527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: LettingManageIndex, isStandalone: true, selector: "rolatech-letting-manage-index", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"My listings\"> </rolatech-toolbar>\n@if (loading) {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <!-- <rolatech-property-manage-filter></rolatech-property-manage-filter> -->\n <div class=\"flex flex-wrap px-2\">\n @for (row of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; track row) {\n <rolatech-property-manage-item-skeleton></rolatech-property-manage-item-skeleton>\n }\n </div>\n</div>\n} @else {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <div class=\"flex flex-wrap px-2\">\n @for (item of lettings(); track $index) {\n <rolatech-letting-manage-item [letting]=\"item\" routerLink=\"./{{ item.id }}\"></rolatech-letting-manage-item>\n }\n </div>\n</div>\n}\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", styles: ["rolatech-letting-manage-index{display:flex;flex-direction:column;--rt-letting-view-items-per-row: 1;--rt-property-view-items-per-row: 1}@media(min-width:600px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 2;--rt-property-view-items-per-row: 2}}@media(min-width:768px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1280px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1536px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 4;--rt-property-view-items-per-row: 4}}@media(min-width:1920px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 5;--rt-property-view-items-per-row: 5}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LettingManageItem, selector: "rolatech-letting-manage-item", inputs: ["letting", "thumbnail", "list"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i2$3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: PropertyManageItemSkeleton, selector: "rolatech-property-manage-item-skeleton", inputs: ["loading", "list"] }], encapsulation: i0.ViewEncapsulation.None });
8517
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: LettingManageIndex, isStandalone: true, selector: "rolatech-letting-manage-index", usesInheritance: true, ngImport: i0, template: "<rolatech-toolbar title=\"Properties\"> </rolatech-toolbar>\n@if (loading) {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <!-- <rolatech-property-manage-filter></rolatech-property-manage-filter> -->\n <div class=\"flex flex-wrap px-2\">\n @for (row of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; track row) {\n <rolatech-property-manage-item-skeleton></rolatech-property-manage-item-skeleton>\n }\n </div>\n</div>\n} @else {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <div class=\"flex flex-wrap px-2\">\n @for (item of lettings(); track $index) {\n <rolatech-letting-manage-item [letting]=\"item\" routerLink=\"./{{ item.id }}\"></rolatech-letting-manage-item>\n }\n </div>\n</div>\n}\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", styles: ["rolatech-letting-manage-index{display:flex;flex-direction:column;--rt-letting-view-items-per-row: 1;--rt-property-view-items-per-row: 1}@media(min-width:600px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 2;--rt-property-view-items-per-row: 2}}@media(min-width:768px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1280px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1536px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 4;--rt-property-view-items-per-row: 4}}@media(min-width:1920px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 5;--rt-property-view-items-per-row: 5}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: LettingManageItem, selector: "rolatech-letting-manage-item", inputs: ["letting", "thumbnail", "list"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i2$3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "component", type: PropertyManageItemSkeleton, selector: "rolatech-property-manage-item-skeleton", inputs: ["loading", "list"] }], encapsulation: i0.ViewEncapsulation.None });
8528
8518
  }
8529
8519
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: LettingManageIndex, decorators: [{
8530
8520
  type: Component,
@@ -8536,7 +8526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
8536
8526
  LettingManageItem,
8537
8527
  MatPaginatorModule,
8538
8528
  PropertyManageItemSkeleton,
8539
- ], encapsulation: ViewEncapsulation.None, template: "<rolatech-toolbar title=\"My listings\"> </rolatech-toolbar>\n@if (loading) {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <!-- <rolatech-property-manage-filter></rolatech-property-manage-filter> -->\n <div class=\"flex flex-wrap px-2\">\n @for (row of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; track row) {\n <rolatech-property-manage-item-skeleton></rolatech-property-manage-item-skeleton>\n }\n </div>\n</div>\n} @else {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <div class=\"flex flex-wrap px-2\">\n @for (item of lettings(); track $index) {\n <rolatech-letting-manage-item [letting]=\"item\" routerLink=\"./{{ item.id }}\"></rolatech-letting-manage-item>\n }\n </div>\n</div>\n}\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", styles: ["rolatech-letting-manage-index{display:flex;flex-direction:column;--rt-letting-view-items-per-row: 1;--rt-property-view-items-per-row: 1}@media(min-width:600px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 2;--rt-property-view-items-per-row: 2}}@media(min-width:768px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1280px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1536px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 4;--rt-property-view-items-per-row: 4}}@media(min-width:1920px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 5;--rt-property-view-items-per-row: 5}}\n"] }]
8529
+ ], encapsulation: ViewEncapsulation.None, template: "<rolatech-toolbar title=\"Properties\"> </rolatech-toolbar>\n@if (loading) {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <!-- <rolatech-property-manage-filter></rolatech-property-manage-filter> -->\n <div class=\"flex flex-wrap px-2\">\n @for (row of [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; track row) {\n <rolatech-property-manage-item-skeleton></rolatech-property-manage-item-skeleton>\n }\n </div>\n</div>\n} @else {\n<div class=\"bg-[--rt-rasised-background] h-full\">\n <div class=\"flex flex-wrap px-2\">\n @for (item of lettings(); track $index) {\n <rolatech-letting-manage-item [letting]=\"item\" routerLink=\"./{{ item.id }}\"></rolatech-letting-manage-item>\n }\n </div>\n</div>\n}\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", styles: ["rolatech-letting-manage-index{display:flex;flex-direction:column;--rt-letting-view-items-per-row: 1;--rt-property-view-items-per-row: 1}@media(min-width:600px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 2;--rt-property-view-items-per-row: 2}}@media(min-width:768px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1280px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 3;--rt-property-view-items-per-row: 3}}@media(min-width:1536px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 4;--rt-property-view-items-per-row: 4}}@media(min-width:1920px){rolatech-letting-manage-index{--rt-letting-view-items-per-row: 5;--rt-property-view-items-per-row: 5}}\n"] }]
8540
8530
  }] });
8541
8531
 
8542
8532
  class LettingActions {
@@ -8584,21 +8574,32 @@ class LettingManageDetail extends BaseComponent {
8584
8574
  authService = inject(AuthService);
8585
8575
  authUserService = inject(AuthUserService);
8586
8576
  propertyService = inject(PropertyService);
8577
+ floorplanService = inject(FloorplanService);
8578
+ propertyHighlightsService = inject(PropertyHighlightsService);
8579
+ timezoneService = inject(TimeZoneService);
8587
8580
  authenticated = this.authService.authenticated;
8588
- property;
8581
+ property = signal(null, ...(ngDevMode ? [{ debugName: "property" }] : []));
8582
+ loading = signal(true, ...(ngDevMode ? [{ debugName: "loading" }] : []));
8583
+ features = [];
8584
+ allVideos = signal([], ...(ngDevMode ? [{ debugName: "allVideos" }] : []));
8585
+ highlights = [];
8586
+ floorplans = [];
8587
+ epc;
8588
+ timezone = signal('', ...(ngDevMode ? [{ debugName: "timezone" }] : []));
8589
8589
  fullname = '';
8590
8590
  username = '';
8591
8591
  user;
8592
8592
  inWishList = false;
8593
8593
  purchased = false;
8594
8594
  selectedOption;
8595
- variants = [];
8596
- selectedVariant;
8597
- variantOption = signal(undefined, ...(ngDevMode ? [{ debugName: "variantOption" }] : []));
8598
- variantOptionChanged = computed(() => {
8599
- return this.variantOption();
8600
- }, ...(ngDevMode ? [{ debugName: "variantOptionChanged" }] : []));
8601
- // results: any[] = [];
8595
+ videos = computed(() => {
8596
+ const v = this.allVideos(); // read signal once
8597
+ if (!v)
8598
+ return [];
8599
+ const tz = this.timezone();
8600
+ const provider = tz === 'Asia/Shanghai' ? PropertyVideoProvider.COS : PropertyVideoProvider.YOUTUBE;
8601
+ return v.filter((v) => v.provider === provider);
8602
+ }, ...(ngDevMode ? [{ debugName: "videos" }] : []));
8602
8603
  constructor() {
8603
8604
  super();
8604
8605
  effect(() => {
@@ -8609,30 +8610,67 @@ class LettingManageDetail extends BaseComponent {
8609
8610
  }
8610
8611
  ngOnInit() {
8611
8612
  this.getProperty();
8613
+ this.getVideos();
8614
+ this.getFeatures();
8615
+ this.getHighlights();
8616
+ this.getFloorplans();
8617
+ this.getEpc();
8618
+ const timezone = this.timezoneService.getBrowserTimeZone() ?? '';
8619
+ this.timezone.set(timezone);
8612
8620
  }
8613
8621
  getProperty() {
8622
+ this.loading.set(true);
8614
8623
  this.propertyService.get(this.id).subscribe({
8615
8624
  next: (res) => {
8616
- this.property = res.data;
8617
- if (this.property.variants) {
8618
- this.variants = this.property.variants;
8619
- this.selectedVariant = this.variants[0];
8620
- // this.selectedVariant.options.forEach((item) => {
8621
- // this.results.push([item.option.id, item.value.id]);
8622
- // });
8625
+ const p = res.data;
8626
+ this.property.set(p);
8627
+ const description = p?.description ?? '';
8628
+ const firstPart = description.split(/<br\s*\/?>/i)[0]?.trim() ?? '';
8629
+ const arr = firstPart.split('|').map((s) => s.trim());
8630
+ if (p?.agentId) {
8631
+ this.findUserBaseInfo(p.agentId);
8623
8632
  }
8624
- this.findUserBaseInfo(this.property.agentId);
8625
- this.titleService.setTitle(`${this.property.title}`);
8633
+ this.titleService.setTitle(`${p?.title}`);
8634
+ this.loading.set(false);
8635
+ },
8636
+ error: () => {
8637
+ this.loading.set(false);
8626
8638
  },
8627
8639
  });
8628
8640
  }
8629
- findVariant(optionId, valueId) {
8630
- return this.variants.find((item) => {
8631
- const exist = item.options.some((i) => i.option.id === optionId && i.value.id === valueId);
8632
- if (exist) {
8633
- return item;
8634
- }
8635
- return null;
8641
+ getVideos() {
8642
+ this.propertyService.getVideos(this.id).subscribe({
8643
+ next: (res) => {
8644
+ this.allVideos.set(res.data);
8645
+ },
8646
+ });
8647
+ }
8648
+ getFeatures() {
8649
+ this.propertyService.getFeatures(this.id).subscribe({
8650
+ next: (res) => {
8651
+ this.features = res.data || [];
8652
+ },
8653
+ });
8654
+ }
8655
+ getHighlights() {
8656
+ this.propertyHighlightsService.getHighlights(this.id).subscribe({
8657
+ next: (res) => {
8658
+ this.highlights = res.data || [];
8659
+ },
8660
+ });
8661
+ }
8662
+ getFloorplans() {
8663
+ this.floorplanService.listFloorplans(this.id).subscribe({
8664
+ next: (res) => {
8665
+ this.floorplans = res.data || [];
8666
+ },
8667
+ });
8668
+ }
8669
+ getEpc() {
8670
+ this.propertyService.getEpc(this.id).subscribe({
8671
+ next: (res) => {
8672
+ this.epc = res.data;
8673
+ },
8636
8674
  });
8637
8675
  }
8638
8676
  findUserBaseInfo(userId) {
@@ -8691,40 +8729,8 @@ class LettingManageDetail extends BaseComponent {
8691
8729
  this.snackBarService.open('Please sign in');
8692
8730
  }
8693
8731
  }
8694
- onOptionChange(e) {
8695
- const criteria = [];
8696
- this.selectedVariant.options.map((item) => {
8697
- criteria.push({
8698
- optionId: item.option.id === e.option.id ? e.option.id : item.option.id,
8699
- valueId: item.option.id === e.option.id ? e.value.id : item.value.id,
8700
- });
8701
- });
8702
- // const criteria = [
8703
- // { optionId: '249008855294545920', valueId: '249008855298740224' }, // color: red
8704
- // { optionId: '248661715955355648', valueId: '249001130061860865' }, // size: 256GB
8705
- // ];
8706
- // Function to check if a variant matches all the criteria
8707
- const matchesAllCriteria = (variant, criteria) => {
8708
- return _.every(criteria, (criterion) => {
8709
- return _.some(variant.options, (o) => o.option.id === criterion.optionId && o.value.id === criterion.valueId);
8710
- });
8711
- };
8712
- // Function to update the criteria based on a matching variant
8713
- const updateCriteriaFromVariant = (variant) => {
8714
- return _.map(variant.options, (o) => ({
8715
- optionId: o.option.id,
8716
- valueId: o.value.id,
8717
- }));
8718
- };
8719
- // Find the variant that matches all the criteria
8720
- const matchingVariant = _.find(this.variants, (variant) => matchesAllCriteria(variant, criteria));
8721
- if (matchingVariant) {
8722
- this.selectedVariant = matchingVariant;
8723
- }
8724
- // const updatedCriteria = matchingVariant ? updateCriteriaFromVariant(matchingVariant) : [];
8725
- }
8726
8732
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: LettingManageDetail, deps: [], target: i0.ɵɵFactoryTarget.Component });
8727
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: LettingManageDetail, isStandalone: true, selector: "rolatech-letting-manage-detail", usesInheritance: true, ngImport: i0, template: "@if (property) {\n<div class=\"flex flex-col w-full\">\n <div class=\"py-3\">\n <rolatech-property-media [media]=\"property.media\"></rolatech-property-media>\n </div>\n <div class=\"flex flex-col md:flex-row gap-3 w-full\">\n <div class=\"w-full md:w-2/3\">\n <rolatech-property-info [property]=\"property\" (wish)=\"onWish($event)\" [inWishList]=\"inWishList\"> </rolatech-property-info>\n <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n ></rolatech-property-agent-renderer>\n <rolatech-property-features [features]=\"property.userFeatures\"></rolatech-property-features>\n <rolatech-property-location [location]=\"property.location\"></rolatech-property-location>\n @if (property.videos) {\n <rolatech-property-video [video]=\"property.videos[0]\"></rolatech-property-video>\n }\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-bold pt-3\" i18n>Sections</div>\n @for (section of property.sections; track $index) {\n <rolatech-property-section [section]=\"section\"></rolatech-property-section>\n }\n </div>\n </div>\n <div class=\"w-full h-fit md:w-1/3 rounded-md border shadow p-3\">\n <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n subtitle=\"PrimeCase Agent\"\n ></rolatech-property-agent-renderer>\n <rolatech-property-pricing (wish)=\"onWish($event)\" [property]=\"property\"></rolatech-property-pricing>\n <rolatech-letting-actions\n [letting]=\"property\"\n (offer)=\"onOffer($event)\"\n (deposit)=\"onOffer($event)\"\n (requestViewing)=\"onRequestViewing($event)\"\n >\n @if (user) {\n <rolatech-letting-action-contact [phone]=\"user.phone\"></rolatech-letting-action-contact>\n }\n </rolatech-letting-actions>\n </div>\n </div>\n</div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: PropertyInfoComponent, selector: "rolatech-property-info", inputs: ["property", "inWishList"], outputs: ["wish"] }, { kind: "component", type: PropertyMediaComponent, selector: "rolatech-property-media", inputs: ["media", "min"] }, { kind: "component", type: PropertyPricingComponent, selector: "rolatech-property-pricing", inputs: ["property", "price"] }, { kind: "component", type: PropertySectionComponent, selector: "rolatech-property-section", inputs: ["section", "user", "username"] }, { kind: "component", type: LettingActions, selector: "rolatech-letting-actions", inputs: ["letting"], outputs: ["requestViewing", "offer", "deposit"] }, { kind: "component", type: LettingActionContact, selector: "rolatech-letting-action-contact", inputs: ["phone"], outputs: ["callAgent", "emailAgent"] }, { kind: "component", type: PropertyLocationComponent, selector: "rolatech-property-location", inputs: ["location"] }, { kind: "component", type: PropertyFeaturesComponent, selector: "rolatech-property-features", inputs: ["features"] }, { kind: "component", type: PropertyVideoComponent, selector: "rolatech-property-video", inputs: ["video"] }, { kind: "component", type: PropertyAgentRenderer, selector: "rolatech-property-agent-renderer", inputs: ["name", "avatar", "username", "subtitle"] }] });
8733
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: LettingManageDetail, isStandalone: true, selector: "rolatech-letting-manage-detail", usesInheritance: true, ngImport: i0, template: "<div class=\"flex flex-col w-full p-3\">\n @if (loading()) {\n <rolatech-property-media-skeleton></rolatech-property-media-skeleton>\n\n <div class=\"flex flex-col md:flex-row gap-3 w-full\">\n <rolatech-property-info-skeleton class=\"w-full md:w-2/3\"></rolatech-property-info-skeleton>\n <rolatech-property-agent-skeleton class=\"w-full md:w-1/3\"></rolatech-property-agent-skeleton>\n </div>\n } @else { @if (property(); as property) {\n <rolatech-property-media [media]=\"property.media ? property.media : []\"></rolatech-property-media>\n <div class=\"flex flex-col md:flex-row gap-3 w-full\">\n <div class=\"w-full md:w-2/3\">\n <rolatech-property-info [property]=\"property\" (wish)=\"onWish($event)\" [inWishList]=\"inWishList\"> </rolatech-property-info>\n <!-- <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n ></rolatech-property-agent-renderer> -->\n @if (features.length > 0) {\n <rolatech-property-features [features]=\"features\"></rolatech-property-features>\n } @if (highlights.length > 0) {\n <rolatech-property-highlights [highlights]=\"highlights\"></rolatech-property-highlights>\n } @if (floorplans.length > 0) {\n <rolatech-property-floorplan [floorplans]=\"floorplans\"></rolatech-property-floorplan>\n } @if (property.location) {\n <rolatech-property-location [location]=\"property.location\"></rolatech-property-location>\n } @if (videos() && videos().length > 0) { @for (item of videos(); track $index) {\n <rolatech-property-video [video]=\"item\"></rolatech-property-video>\n } } @if (epc && epc.currentScore) {\n <rolatech-property-epc [epc]=\"epc\"></rolatech-property-epc>\n }\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-bold pt-3\" i18n>Sections</div>\n @for (section of property.sections; track $index) {\n <rolatech-property-section [section]=\"section\"></rolatech-property-section>\n }\n </div>\n </div>\n <div class=\"w-full md:w-1/3\">\n <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n subtitle=\"PrimeCase Agent\"\n ></rolatech-property-agent-renderer>\n <rolatech-property-pricing (wish)=\"onWish($event)\" [property]=\"property\"></rolatech-property-pricing>\n <rolatech-letting-actions\n [letting]=\"property\"\n (offer)=\"onOffer($event)\"\n (deposit)=\"onOffer($event)\"\n (requestViewing)=\"onRequestViewing($event)\"\n >\n @if (user) {\n <rolatech-letting-action-contact [phone]=\"user.phone\"></rolatech-letting-action-contact>\n }\n </rolatech-letting-actions>\n </div>\n </div>\n } }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: PropertyInfoComponent, selector: "rolatech-property-info", inputs: ["property", "inWishList"], outputs: ["wish"] }, { kind: "component", type: PropertyMediaComponent, selector: "rolatech-property-media", inputs: ["media", "min"] }, { kind: "component", type: PropertyPricingComponent, selector: "rolatech-property-pricing", inputs: ["property", "price"] }, { kind: "component", type: PropertySectionComponent, selector: "rolatech-property-section", inputs: ["section", "user", "username"] }, { kind: "component", type: LettingActions, selector: "rolatech-letting-actions", inputs: ["letting"], outputs: ["requestViewing", "offer", "deposit"] }, { kind: "component", type: LettingActionContact, selector: "rolatech-letting-action-contact", inputs: ["phone"], outputs: ["callAgent", "emailAgent"] }, { kind: "component", type: PropertyLocationComponent, selector: "rolatech-property-location", inputs: ["location"] }, { kind: "component", type: PropertyFeaturesComponent, selector: "rolatech-property-features", inputs: ["features"] }, { kind: "component", type: PropertyVideoComponent, selector: "rolatech-property-video", inputs: ["video"] }, { kind: "component", type: PropertyAgentRenderer, selector: "rolatech-property-agent-renderer", inputs: ["name", "avatar", "username", "subtitle"] }, { kind: "component", type: PropertyMediaSkeleton, selector: "rolatech-property-media-skeleton" }, { kind: "component", type: PropertyInfoSkeleton, selector: "rolatech-property-info-skeleton" }, { kind: "component", type: PropertyAgentSkeleton, selector: "rolatech-property-agent-skeleton" }, { kind: "component", type: PropertyHighlights, selector: "rolatech-property-highlights", inputs: ["highlights"] }, { kind: "component", type: PropertyFloorplan, selector: "rolatech-property-floorplan", inputs: ["floorplans"] }, { kind: "component", type: PropertyEpc, selector: "rolatech-property-epc", inputs: ["epc"] }] });
8728
8734
  }
8729
8735
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: LettingManageDetail, decorators: [{
8730
8736
  type: Component,
@@ -8741,7 +8747,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
8741
8747
  PropertyFeaturesComponent,
8742
8748
  PropertyVideoComponent,
8743
8749
  PropertyAgentRenderer,
8744
- ], template: "@if (property) {\n<div class=\"flex flex-col w-full\">\n <div class=\"py-3\">\n <rolatech-property-media [media]=\"property.media\"></rolatech-property-media>\n </div>\n <div class=\"flex flex-col md:flex-row gap-3 w-full\">\n <div class=\"w-full md:w-2/3\">\n <rolatech-property-info [property]=\"property\" (wish)=\"onWish($event)\" [inWishList]=\"inWishList\"> </rolatech-property-info>\n <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n ></rolatech-property-agent-renderer>\n <rolatech-property-features [features]=\"property.userFeatures\"></rolatech-property-features>\n <rolatech-property-location [location]=\"property.location\"></rolatech-property-location>\n @if (property.videos) {\n <rolatech-property-video [video]=\"property.videos[0]\"></rolatech-property-video>\n }\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-bold pt-3\" i18n>Sections</div>\n @for (section of property.sections; track $index) {\n <rolatech-property-section [section]=\"section\"></rolatech-property-section>\n }\n </div>\n </div>\n <div class=\"w-full h-fit md:w-1/3 rounded-md border shadow p-3\">\n <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n subtitle=\"PrimeCase Agent\"\n ></rolatech-property-agent-renderer>\n <rolatech-property-pricing (wish)=\"onWish($event)\" [property]=\"property\"></rolatech-property-pricing>\n <rolatech-letting-actions\n [letting]=\"property\"\n (offer)=\"onOffer($event)\"\n (deposit)=\"onOffer($event)\"\n (requestViewing)=\"onRequestViewing($event)\"\n >\n @if (user) {\n <rolatech-letting-action-contact [phone]=\"user.phone\"></rolatech-letting-action-contact>\n }\n </rolatech-letting-actions>\n </div>\n </div>\n</div>\n}\n" }]
8750
+ PropertyMediaSkeleton,
8751
+ PropertyInfoSkeleton,
8752
+ PropertyAgentSkeleton,
8753
+ PropertyHighlights,
8754
+ PropertyFloorplan,
8755
+ PropertyEpc,
8756
+ ], template: "<div class=\"flex flex-col w-full p-3\">\n @if (loading()) {\n <rolatech-property-media-skeleton></rolatech-property-media-skeleton>\n\n <div class=\"flex flex-col md:flex-row gap-3 w-full\">\n <rolatech-property-info-skeleton class=\"w-full md:w-2/3\"></rolatech-property-info-skeleton>\n <rolatech-property-agent-skeleton class=\"w-full md:w-1/3\"></rolatech-property-agent-skeleton>\n </div>\n } @else { @if (property(); as property) {\n <rolatech-property-media [media]=\"property.media ? property.media : []\"></rolatech-property-media>\n <div class=\"flex flex-col md:flex-row gap-3 w-full\">\n <div class=\"w-full md:w-2/3\">\n <rolatech-property-info [property]=\"property\" (wish)=\"onWish($event)\" [inWishList]=\"inWishList\"> </rolatech-property-info>\n <!-- <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n ></rolatech-property-agent-renderer> -->\n @if (features.length > 0) {\n <rolatech-property-features [features]=\"features\"></rolatech-property-features>\n } @if (highlights.length > 0) {\n <rolatech-property-highlights [highlights]=\"highlights\"></rolatech-property-highlights>\n } @if (floorplans.length > 0) {\n <rolatech-property-floorplan [floorplans]=\"floorplans\"></rolatech-property-floorplan>\n } @if (property.location) {\n <rolatech-property-location [location]=\"property.location\"></rolatech-property-location>\n } @if (videos() && videos().length > 0) { @for (item of videos(); track $index) {\n <rolatech-property-video [video]=\"item\"></rolatech-property-video>\n } } @if (epc && epc.currentScore) {\n <rolatech-property-epc [epc]=\"epc\"></rolatech-property-epc>\n }\n <div class=\"flex flex-col\">\n <div class=\"text-2xl font-bold pt-3\" i18n>Sections</div>\n @for (section of property.sections; track $index) {\n <rolatech-property-section [section]=\"section\"></rolatech-property-section>\n }\n </div>\n </div>\n <div class=\"w-full md:w-1/3\">\n <rolatech-property-agent-renderer\n [name]=\"fullname\"\n [avatar]=\"user?.avatar\"\n [username]=\"username\"\n subtitle=\"PrimeCase Agent\"\n ></rolatech-property-agent-renderer>\n <rolatech-property-pricing (wish)=\"onWish($event)\" [property]=\"property\"></rolatech-property-pricing>\n <rolatech-letting-actions\n [letting]=\"property\"\n (offer)=\"onOffer($event)\"\n (deposit)=\"onOffer($event)\"\n (requestViewing)=\"onRequestViewing($event)\"\n >\n @if (user) {\n <rolatech-letting-action-contact [phone]=\"user.phone\"></rolatech-letting-action-contact>\n }\n </rolatech-letting-actions>\n </div>\n </div>\n } }\n</div>\n" }]
8745
8757
  }], ctorParameters: () => [] });
8746
8758
 
8747
8759
  const MY_FORMATS$1 = {
@@ -9689,7 +9701,6 @@ class PropertyAgentListingIndex extends BaseComponent {
9689
9701
  meta;
9690
9702
  loading = false;
9691
9703
  ngOnInit() {
9692
- // this.findProperties();
9693
9704
  const sub = this.route.queryParamMap
9694
9705
  .pipe(map((p) => {
9695
9706
  const page = p.get('page') ? Number(p.get('page')) : 1;
@@ -9951,4 +9962,4 @@ const propertyAgentListingRoutes = [
9951
9962
  */
9952
9963
 
9953
9964
  export { PropertyViewerCategory as A, PropertyOfferTimelineStatus as B, PropertyOfferType as C, PropertyOfferStatus as D, EmploymentStatus as E, ResidencyStatus as F, PropertyApplicantType as G, AdverseCreditStatus as H, BedroomRange as I, PriceRange as J, Market as M, PropertyUtil as P, RentFrequency as R, ViewingTime as V, PropertyViewType as a, PropertyManageItemSkeleton as b, PropertyViewingItemComponent as c, propertyManageOffersRoutes as d, propertyRoutes as e, featureManageRoutes as f, propertyManageRoutes as g, propertyManageViewingsRoutes as h, propertyAgentViewingRoutes as i, propertyAgentOfferRoutes as j, propertyAgentOverviewRoutes as k, lettingManageRoutes as l, propertyManageOverviewRoutes as m, propertyAgentListingRoutes as n, PropertyActionsComponent as o, propertyReviewRoutes as p, PropertyItemComponent as q, PropertyPricingComponent as r, PropertyPriceType as s, tenantManageRoutes as t, PropertyVideoProvider as u, PropertyStatus as v, PropertyType as w, PropertyInventoryStatus as x, PropertyScope as y, PropertyViewingStatus as z };
9954
- //# sourceMappingURL=rolatech-angular-property-rolatech-angular-property-nHa2eV9i.mjs.map
9965
+ //# sourceMappingURL=rolatech-angular-property-rolatech-angular-property-BQ-earJm.mjs.map