@flower-city-online/itinerary-lib 0.0.49 → 0.0.51
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/itinerary-app/_enums/ItenariesRoutes.enum.mjs +12 -12
- package/esm2022/lib/itinerary-app/_services/bottom-navigation.service.mjs +5 -2
- package/esm2022/lib/itinerary-app/itinerary-lib-routing.module.mjs +34 -24
- package/esm2022/lib/itinerary-app/modules/itineraries/components/app-sidebar-desktop/app-sidebar-desktop.component.mjs +37 -25
- package/esm2022/lib/itinerary-app/modules/itineraries/pages/branched-itineraries/branched-itineraries.component.mjs +3 -2
- package/esm2022/lib/itinerary-app/modules/itineraries/pages/builder/builder.component.mjs +2 -2
- package/esm2022/lib/itinerary-app/shared/tab-bar/tab-bar.component.mjs +38 -11
- package/fesm2022/flower-city-online-itinerary-lib.mjs +123 -71
- package/fesm2022/flower-city-online-itinerary-lib.mjs.map +1 -1
- package/lib/itinerary-app/_enums/ItenariesRoutes.enum.d.ts +11 -11
- package/lib/itinerary-app/modules/itineraries/components/app-sidebar-desktop/app-sidebar-desktop.component.d.ts +4 -2
- package/lib/itinerary-app/shared/tab-bar/tab-bar.component.d.ts +4 -2
- package/package.json +1 -1
- package/styles.css +1 -1
|
@@ -8,39 +8,46 @@ import * as i2 from "@naniteninja/ionic-lib";
|
|
|
8
8
|
export class TabBarComponent {
|
|
9
9
|
router;
|
|
10
10
|
cdr;
|
|
11
|
+
route;
|
|
11
12
|
destroy$ = new Subject();
|
|
12
13
|
tabMenuItems = [
|
|
13
14
|
{
|
|
14
15
|
label: 'Explore',
|
|
15
16
|
icon: 'pi pi-fw pi-home',
|
|
16
|
-
routerLink: ItinerariesRoutesEnum.
|
|
17
|
+
routerLink: ItinerariesRoutesEnum.EXPLORE,
|
|
17
18
|
},
|
|
18
19
|
{
|
|
19
20
|
label: 'Builder',
|
|
20
21
|
icon: 'pi pi-fw pi-map-marker',
|
|
21
|
-
routerLink: ItinerariesRoutesEnum.
|
|
22
|
+
routerLink: ItinerariesRoutesEnum.BUILDER,
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
25
|
label: 'Favorites',
|
|
25
26
|
icon: 'pi pi-fw pi-user',
|
|
26
|
-
routerLink: ItinerariesRoutesEnum.
|
|
27
|
+
routerLink: ItinerariesRoutesEnum.FAVORITES,
|
|
27
28
|
},
|
|
28
29
|
];
|
|
29
30
|
activeItem = this.tabMenuItems[0];
|
|
30
31
|
//LIFE CYCLES
|
|
31
|
-
constructor(router, cdr) {
|
|
32
|
+
constructor(router, cdr, route) {
|
|
32
33
|
this.router = router;
|
|
33
34
|
this.cdr = cdr;
|
|
35
|
+
this.route = route;
|
|
34
36
|
}
|
|
35
37
|
ngOnInit() {
|
|
36
|
-
this.
|
|
38
|
+
this.updateActiveItem();
|
|
37
39
|
this.router.events
|
|
38
40
|
.pipe(filter((event) => event instanceof NavigationEnd), takeUntil(this.destroy$))
|
|
39
|
-
.subscribe((
|
|
40
|
-
this.
|
|
41
|
+
.subscribe(() => {
|
|
42
|
+
this.updateActiveItem();
|
|
41
43
|
this.cdr.detectChanges();
|
|
42
44
|
});
|
|
43
45
|
}
|
|
46
|
+
updateActiveItem() {
|
|
47
|
+
const currentUrl = this.router.url;
|
|
48
|
+
// Check if current URL ends with the route link
|
|
49
|
+
this.activeItem = this.tabMenuItems.find((x) => currentUrl.endsWith('/' + x.routerLink) || currentUrl.endsWith(x.routerLink)) || this.tabMenuItems[0];
|
|
50
|
+
}
|
|
44
51
|
ngOnDestroy() {
|
|
45
52
|
this.destroy$.next(); // Emit a value to trigger takeUntil
|
|
46
53
|
this.destroy$.complete(); // Complete the subject
|
|
@@ -48,15 +55,35 @@ export class TabBarComponent {
|
|
|
48
55
|
//UI LOGIC
|
|
49
56
|
onActiveItemChange(event) {
|
|
50
57
|
this.activeItem = event;
|
|
51
|
-
|
|
58
|
+
const routePath = typeof event.routerLink === 'string'
|
|
59
|
+
? [event.routerLink]
|
|
60
|
+
: event.routerLink;
|
|
61
|
+
// Get the current URL segments
|
|
62
|
+
const urlSegments = this.router.url.split('/').filter(s => s);
|
|
63
|
+
const routePathStr = typeof event.routerLink === 'string' ? event.routerLink : event.routerLink.join('/');
|
|
64
|
+
// Find where we are in the route hierarchy
|
|
65
|
+
// We need to navigate relative to the ItinerariesComponent route
|
|
66
|
+
// which is typically the route that has 'explore', 'builder', 'favorites' as children
|
|
67
|
+
// Try to find the index of the current child route (explore, builder, or favorites)
|
|
68
|
+
const childRouteIndex = urlSegments.findIndex(seg => seg === 'explore' || seg === 'builder' || seg === 'favorites');
|
|
69
|
+
if (childRouteIndex >= 0) {
|
|
70
|
+
// We're at a child route, navigate relative to the parent (ItinerariesComponent)
|
|
71
|
+
// Build the path up to the parent, then add the new child route
|
|
72
|
+
const basePath = urlSegments.slice(0, childRouteIndex);
|
|
73
|
+
this.router.navigate([...basePath, routePathStr]);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// Fallback: navigate relative to current route
|
|
77
|
+
this.router.navigate(routePath, { relativeTo: this.route });
|
|
78
|
+
}
|
|
52
79
|
}
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabBarComponent, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabBarComponent, deps: [{ token: i1.Router }, { token: i0.ChangeDetectorRef }, { token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
54
81
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TabBarComponent, selector: "app-tab-bar", inputs: { tabMenuItems: "tabMenuItems" }, ngImport: i0, template: "<lib-tab-menu\r\n [items]=\"tabMenuItems\"\r\n [activeItem]=\"activeItem\"\r\n (activeItemChange)=\"onActiveItemChange($event)\"\r\n #libTabMenu\r\n></lib-tab-menu>\r\n", styles: [""], dependencies: [{ kind: "component", type: i2.LibTabMenuComponent, selector: "lib-tab-menu", inputs: ["items", "activeItem", "stretchTabs"], outputs: ["activeItemChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
55
82
|
}
|
|
56
83
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabBarComponent, decorators: [{
|
|
57
84
|
type: Component,
|
|
58
85
|
args: [{ selector: 'app-tab-bar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<lib-tab-menu\r\n [items]=\"tabMenuItems\"\r\n [activeItem]=\"activeItem\"\r\n (activeItemChange)=\"onActiveItemChange($event)\"\r\n #libTabMenu\r\n></lib-tab-menu>\r\n" }]
|
|
59
|
-
}], ctorParameters: () => [{ type: i1.Router }, { type: i0.ChangeDetectorRef }], propDecorators: { tabMenuItems: [{
|
|
86
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: i0.ChangeDetectorRef }, { type: i1.ActivatedRoute }], propDecorators: { tabMenuItems: [{
|
|
60
87
|
type: Input
|
|
61
88
|
}] } });
|
|
62
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
89
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWJhci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9pdGluZXJhcnktbGliL3NyYy9saWIvaXRpbmVyYXJ5LWFwcC9zaGFyZWQvdGFiLWJhci90YWItYmFyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2l0aW5lcmFyeS1saWIvc3JjL2xpYi9pdGluZXJhcnktYXBwL3NoYXJlZC90YWItYmFyL3RhYi1iYXIuY29tcG9uZW50Lmh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09XCJhY3RpdmVJdGVtXCJcclxuICAoYWN0aXZlSXRlbUNoYW5nZSk9XCJvbkFjdGl2ZUl0ZW1DaGFuZ2UoJGV2ZW50KVwiXHJcbiAgI2xpYlRhYk1lbnVcclxuPjwvbGliLXRhYi1tZW51PlxyXG4iXX0=
|
|
@@ -27,17 +27,17 @@ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
|
27
27
|
|
|
28
28
|
var ItinerariesRoutesEnum;
|
|
29
29
|
(function (ItinerariesRoutesEnum) {
|
|
30
|
-
ItinerariesRoutesEnum["DASHBOARD"] = "
|
|
31
|
-
ItinerariesRoutesEnum["ITINERARY"] = "
|
|
32
|
-
ItinerariesRoutesEnum["ITINERARY_EXPLORE"] = "
|
|
33
|
-
ItinerariesRoutesEnum["ITINERARY_FAVOURITES"] = "
|
|
34
|
-
ItinerariesRoutesEnum["ITINERARY_BUILDER"] = "
|
|
35
|
-
ItinerariesRoutesEnum["SEARCH"] = "
|
|
36
|
-
ItinerariesRoutesEnum["REQUESTS"] = "
|
|
37
|
-
ItinerariesRoutesEnum["INFO"] = "
|
|
38
|
-
ItinerariesRoutesEnum["PROFILE"] = "
|
|
39
|
-
ItinerariesRoutesEnum["ARCHIVES"] = "
|
|
40
|
-
ItinerariesRoutesEnum["COMMENTS"] = "
|
|
30
|
+
ItinerariesRoutesEnum["DASHBOARD"] = "dashboard";
|
|
31
|
+
ItinerariesRoutesEnum["ITINERARY"] = "itineraries";
|
|
32
|
+
ItinerariesRoutesEnum["ITINERARY_EXPLORE"] = "itineraries/explore";
|
|
33
|
+
ItinerariesRoutesEnum["ITINERARY_FAVOURITES"] = "itineraries/favorites";
|
|
34
|
+
ItinerariesRoutesEnum["ITINERARY_BUILDER"] = "itineraries/builder";
|
|
35
|
+
ItinerariesRoutesEnum["SEARCH"] = "search";
|
|
36
|
+
ItinerariesRoutesEnum["REQUESTS"] = "requests";
|
|
37
|
+
ItinerariesRoutesEnum["INFO"] = "info";
|
|
38
|
+
ItinerariesRoutesEnum["PROFILE"] = "profile";
|
|
39
|
+
ItinerariesRoutesEnum["ARCHIVES"] = "archives/archives";
|
|
40
|
+
ItinerariesRoutesEnum["COMMENTS"] = "itineraries/comments";
|
|
41
41
|
ItinerariesRoutesEnum["EXPLORE"] = "explore";
|
|
42
42
|
ItinerariesRoutesEnum["BUILDER"] = "builder";
|
|
43
43
|
ItinerariesRoutesEnum["CREATE_ITINERARY"] = "create";
|
|
@@ -287,7 +287,10 @@ class BottomNavigationService {
|
|
|
287
287
|
}
|
|
288
288
|
onNavigationChange(data, nav) {
|
|
289
289
|
if (data) {
|
|
290
|
-
|
|
290
|
+
const routePath = typeof nav.routerLink === 'string'
|
|
291
|
+
? nav.routerLink.split('/').filter(p => p)
|
|
292
|
+
: nav.routerLink;
|
|
293
|
+
this.router.navigate(routePath);
|
|
291
294
|
}
|
|
292
295
|
}
|
|
293
296
|
setActive(nav) {
|
|
@@ -1465,39 +1468,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1465
1468
|
class TabBarComponent {
|
|
1466
1469
|
router;
|
|
1467
1470
|
cdr;
|
|
1471
|
+
route;
|
|
1468
1472
|
destroy$ = new Subject();
|
|
1469
1473
|
tabMenuItems = [
|
|
1470
1474
|
{
|
|
1471
1475
|
label: 'Explore',
|
|
1472
1476
|
icon: 'pi pi-fw pi-home',
|
|
1473
|
-
routerLink: ItinerariesRoutesEnum.
|
|
1477
|
+
routerLink: ItinerariesRoutesEnum.EXPLORE,
|
|
1474
1478
|
},
|
|
1475
1479
|
{
|
|
1476
1480
|
label: 'Builder',
|
|
1477
1481
|
icon: 'pi pi-fw pi-map-marker',
|
|
1478
|
-
routerLink: ItinerariesRoutesEnum.
|
|
1482
|
+
routerLink: ItinerariesRoutesEnum.BUILDER,
|
|
1479
1483
|
},
|
|
1480
1484
|
{
|
|
1481
1485
|
label: 'Favorites',
|
|
1482
1486
|
icon: 'pi pi-fw pi-user',
|
|
1483
|
-
routerLink: ItinerariesRoutesEnum.
|
|
1487
|
+
routerLink: ItinerariesRoutesEnum.FAVORITES,
|
|
1484
1488
|
},
|
|
1485
1489
|
];
|
|
1486
1490
|
activeItem = this.tabMenuItems[0];
|
|
1487
1491
|
//LIFE CYCLES
|
|
1488
|
-
constructor(router, cdr) {
|
|
1492
|
+
constructor(router, cdr, route) {
|
|
1489
1493
|
this.router = router;
|
|
1490
1494
|
this.cdr = cdr;
|
|
1495
|
+
this.route = route;
|
|
1491
1496
|
}
|
|
1492
1497
|
ngOnInit() {
|
|
1493
|
-
this.
|
|
1498
|
+
this.updateActiveItem();
|
|
1494
1499
|
this.router.events
|
|
1495
1500
|
.pipe(filter((event) => event instanceof NavigationEnd), takeUntil(this.destroy$))
|
|
1496
|
-
.subscribe((
|
|
1497
|
-
this.
|
|
1501
|
+
.subscribe(() => {
|
|
1502
|
+
this.updateActiveItem();
|
|
1498
1503
|
this.cdr.detectChanges();
|
|
1499
1504
|
});
|
|
1500
1505
|
}
|
|
1506
|
+
updateActiveItem() {
|
|
1507
|
+
const currentUrl = this.router.url;
|
|
1508
|
+
// Check if current URL ends with the route link
|
|
1509
|
+
this.activeItem = this.tabMenuItems.find((x) => currentUrl.endsWith('/' + x.routerLink) || currentUrl.endsWith(x.routerLink)) || this.tabMenuItems[0];
|
|
1510
|
+
}
|
|
1501
1511
|
ngOnDestroy() {
|
|
1502
1512
|
this.destroy$.next(); // Emit a value to trigger takeUntil
|
|
1503
1513
|
this.destroy$.complete(); // Complete the subject
|
|
@@ -1505,15 +1515,35 @@ class TabBarComponent {
|
|
|
1505
1515
|
//UI LOGIC
|
|
1506
1516
|
onActiveItemChange(event) {
|
|
1507
1517
|
this.activeItem = event;
|
|
1508
|
-
|
|
1518
|
+
const routePath = typeof event.routerLink === 'string'
|
|
1519
|
+
? [event.routerLink]
|
|
1520
|
+
: event.routerLink;
|
|
1521
|
+
// Get the current URL segments
|
|
1522
|
+
const urlSegments = this.router.url.split('/').filter(s => s);
|
|
1523
|
+
const routePathStr = typeof event.routerLink === 'string' ? event.routerLink : event.routerLink.join('/');
|
|
1524
|
+
// Find where we are in the route hierarchy
|
|
1525
|
+
// We need to navigate relative to the ItinerariesComponent route
|
|
1526
|
+
// which is typically the route that has 'explore', 'builder', 'favorites' as children
|
|
1527
|
+
// Try to find the index of the current child route (explore, builder, or favorites)
|
|
1528
|
+
const childRouteIndex = urlSegments.findIndex(seg => seg === 'explore' || seg === 'builder' || seg === 'favorites');
|
|
1529
|
+
if (childRouteIndex >= 0) {
|
|
1530
|
+
// We're at a child route, navigate relative to the parent (ItinerariesComponent)
|
|
1531
|
+
// Build the path up to the parent, then add the new child route
|
|
1532
|
+
const basePath = urlSegments.slice(0, childRouteIndex);
|
|
1533
|
+
this.router.navigate([...basePath, routePathStr]);
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
// Fallback: navigate relative to current route
|
|
1537
|
+
this.router.navigate(routePath, { relativeTo: this.route });
|
|
1538
|
+
}
|
|
1509
1539
|
}
|
|
1510
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabBarComponent, deps: [{ token: i2.Router }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1540
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabBarComponent, deps: [{ token: i2.Router }, { token: i0.ChangeDetectorRef }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
1511
1541
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: TabBarComponent, selector: "app-tab-bar", inputs: { tabMenuItems: "tabMenuItems" }, ngImport: i0, template: "<lib-tab-menu\r\n [items]=\"tabMenuItems\"\r\n [activeItem]=\"activeItem\"\r\n (activeItemChange)=\"onActiveItemChange($event)\"\r\n #libTabMenu\r\n></lib-tab-menu>\r\n", styles: [""], dependencies: [{ kind: "component", type: i4.LibTabMenuComponent, selector: "lib-tab-menu", inputs: ["items", "activeItem", "stretchTabs"], outputs: ["activeItemChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1512
1542
|
}
|
|
1513
1543
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: TabBarComponent, decorators: [{
|
|
1514
1544
|
type: Component,
|
|
1515
1545
|
args: [{ selector: 'app-tab-bar', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<lib-tab-menu\r\n [items]=\"tabMenuItems\"\r\n [activeItem]=\"activeItem\"\r\n (activeItemChange)=\"onActiveItemChange($event)\"\r\n #libTabMenu\r\n></lib-tab-menu>\r\n" }]
|
|
1516
|
-
}], ctorParameters: () => [{ type: i2.Router }, { type: i0.ChangeDetectorRef }], propDecorators: { tabMenuItems: [{
|
|
1546
|
+
}], ctorParameters: () => [{ type: i2.Router }, { type: i0.ChangeDetectorRef }, { type: i2.ActivatedRoute }], propDecorators: { tabMenuItems: [{
|
|
1517
1547
|
type: Input
|
|
1518
1548
|
}] } });
|
|
1519
1549
|
|
|
@@ -2181,56 +2211,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2181
2211
|
class AppSidebarDesktopComponent {
|
|
2182
2212
|
router;
|
|
2183
2213
|
location;
|
|
2214
|
+
route;
|
|
2184
2215
|
ICONS = ICONS;
|
|
2185
2216
|
currentUrl = '';
|
|
2186
2217
|
back() {
|
|
2187
2218
|
this.location.back();
|
|
2188
2219
|
}
|
|
2189
|
-
constructor(router, location) {
|
|
2220
|
+
constructor(router, location, route) {
|
|
2190
2221
|
this.router = router;
|
|
2191
2222
|
this.location = location;
|
|
2223
|
+
this.route = route;
|
|
2192
2224
|
this.router.events
|
|
2193
2225
|
.pipe(filter((event) => event instanceof NavigationEnd))
|
|
2194
2226
|
.subscribe((event) => {
|
|
2195
2227
|
this.currentUrl = event.urlAfterRedirects;
|
|
2196
2228
|
});
|
|
2197
2229
|
}
|
|
2230
|
+
navigateToChildRoute(routePath) {
|
|
2231
|
+
const urlSegments = this.router.url.split('/').filter(s => s);
|
|
2232
|
+
// Find current child route if we're on one
|
|
2233
|
+
const childRouteIndex = urlSegments.findIndex(seg => seg === 'explore' || seg === 'builder' || seg === 'favorites' ||
|
|
2234
|
+
seg === 'comment-search' || seg === 'comments');
|
|
2235
|
+
if (childRouteIndex >= 0) {
|
|
2236
|
+
// Replace the current child route with the new one
|
|
2237
|
+
const basePath = urlSegments.slice(0, childRouteIndex);
|
|
2238
|
+
this.router.navigate([...basePath, routePath]);
|
|
2239
|
+
}
|
|
2240
|
+
else {
|
|
2241
|
+
// Fallback: navigate relative to current route
|
|
2242
|
+
this.router.navigate([routePath], { relativeTo: this.route });
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2198
2245
|
openCommentsSearch() {
|
|
2199
|
-
this.
|
|
2200
|
-
ItinerariesRoutesEnum.ITINERARY,
|
|
2201
|
-
ItinerariesRoutesEnum.COMMENT_SEARCH,
|
|
2202
|
-
]);
|
|
2246
|
+
this.navigateToChildRoute(ItinerariesRoutesEnum.COMMENT_SEARCH);
|
|
2203
2247
|
}
|
|
2204
2248
|
openSearch() {
|
|
2205
|
-
this.router.
|
|
2206
|
-
|
|
2207
|
-
|
|
2249
|
+
const urlSegments = this.router.url.split('/').filter(s => s);
|
|
2250
|
+
// Search is a sibling route, not a child of itineraries
|
|
2251
|
+
const itinerariesIndex = urlSegments.findIndex(seg => seg === 'itineraries');
|
|
2252
|
+
if (itinerariesIndex >= 0) {
|
|
2253
|
+
const basePath = urlSegments.slice(0, itinerariesIndex);
|
|
2254
|
+
this.router.navigate([...basePath, 'search']);
|
|
2255
|
+
}
|
|
2256
|
+
else {
|
|
2257
|
+
this.router.navigate([ItinerariesRoutesEnum.SEARCH]);
|
|
2258
|
+
}
|
|
2208
2259
|
}
|
|
2209
2260
|
openExplorePage() {
|
|
2210
|
-
this.
|
|
2211
|
-
ItinerariesRoutesEnum.ITINERARY,
|
|
2212
|
-
ItinerariesRoutesEnum.EXPLORE,
|
|
2213
|
-
]);
|
|
2261
|
+
this.navigateToChildRoute(ItinerariesRoutesEnum.EXPLORE);
|
|
2214
2262
|
}
|
|
2215
2263
|
openBuilderPage() {
|
|
2216
|
-
this.
|
|
2217
|
-
ItinerariesRoutesEnum.ITINERARY,
|
|
2218
|
-
ItinerariesRoutesEnum.BUILDER,
|
|
2219
|
-
]);
|
|
2264
|
+
this.navigateToChildRoute(ItinerariesRoutesEnum.BUILDER);
|
|
2220
2265
|
}
|
|
2221
2266
|
openFavoritesPage() {
|
|
2222
|
-
this.
|
|
2223
|
-
ItinerariesRoutesEnum.ITINERARY,
|
|
2224
|
-
ItinerariesRoutesEnum.FAVORITES,
|
|
2225
|
-
]);
|
|
2267
|
+
this.navigateToChildRoute(ItinerariesRoutesEnum.FAVORITES);
|
|
2226
2268
|
}
|
|
2227
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AppSidebarDesktopComponent, deps: [{ token: i2.Router }, { token: i1$1.Location }], target: i0.ɵɵFactoryTarget.Component });
|
|
2228
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AppSidebarDesktopComponent, selector: "lib-app-sidebar-desktop", ngImport: i0, template: " <aside class=\"w-[260px] min-h-screen text-white p-4 flex flex-col gap-10 space-y-6 font-semibold
|
|
2269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AppSidebarDesktopComponent, deps: [{ token: i2.Router }, { token: i1$1.Location }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
2270
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AppSidebarDesktopComponent, selector: "lib-app-sidebar-desktop", ngImport: i0, template: " <aside class=\"w-[260px] min-h-screen text-white p-4 hidden md:flex md:flex-col gap-10 space-y-6 font-semibold\">\r\n <!-- Header -->\r\n <ng-template #suffix>\r\n <span class=\"discard\"><img [ngSrc]=\"ICONS['search']\" height=\"17\" width=\"18\" /></span>\r\n </ng-template>\r\n <section class=\"flex justify-between\">\r\n <lib-icon-btn (click)=\"back()\" class=\"checkmark-icon-button\">\r\n <img [ngSrc]=\"ICONS['back']\" height=\"17\" width=\"18\" />\r\n </lib-icon-btn>\r\n <h4 class=\"font-[Calistoga] text-[24px]\">{{ \"SIDEBAR.ITINERARIES\" | translate }}</h4>\r\n <lib-icon-btn (click)=\"openSearch()\" class=\"checkmark-icon-button\">\r\n <img [ngSrc]=\"ICONS['search']\" height=\"17\" width=\"18\" />\r\n </lib-icon-btn>\r\n </section>\r\n\r\n <section class=\"flex flex-col gap-10\">\r\n <!-- Explore Section -->\r\n <div class=\"flex flex-col justify-center\">\r\n <button class=\"m-auto w-[100px] text-center font-[Calistoga] text-[24px] font-normal\" (click)=\"openExplorePage()\">{{ \"SIDEBAR.EXPLORE\" | translate }}</button> \r\n <h2 *ngIf=\"currentUrl === '/itineraries/explore'\" class=\"m-auto w-[90px] mt-2 text-center underline-custom\"></h2> \r\n <div class=\"flex justify-center mt-6\">\r\n <div\r\n (click)=\"openCommentsSearch()\"\r\n class=\"flex items-center justify-center rounded-full cursor-pointer\"\r\n style=\"\r\n width: 40px;\r\n height: 40px;\r\n background: rgba(39, 36, 44, 1);\r\n box-shadow:\r\n -6.4px -6.4px 20.49px -3.84px rgba(203, 199, 209, 0.25),\r\n 14.08px 12.8px 34.57px 3.2px rgba(17, 16, 20, 0.65);\r\n \"\r\n \r\n >\r\n <img [ngSrc]=\"ICONS['desktopSearch']\" height=\"17\" width=\"18\" class=\"w-5 h-5\" />\r\n </div>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button font-[Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.FEATURED\" | translate}}</button>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button font-[Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.HOT\" | translate}}</button>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button [Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.BEST\" | translate}}</button>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button [Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.NEW\" | translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <!-- Builder Section -->\r\n <div class=\"flex flex-col justify-center\">\r\n <button class=\"font-[Calistoga] text-[24px] font-normal\" (click)=\"openBuilderPage()\">{{\"SIDEBAR.BUILDER\" | translate}}</button>\r\n <h2 *ngIf=\"currentUrl === '/itineraries/builder'\" class=\"m-auto w-[90px] mt-2 text-center underline-custom\"></h2> \r\n </div>\r\n\r\n <!-- Builder Section -->\r\n <div class=\"flex flex-col justify-center\">\r\n <button class=\"font-[Calistoga] text-[24px] font-normal\" (click)=\"openFavoritesPage()\">{{\"SIDEBAR.FAVOURITE\" | translate }}</button>\r\n <h2 *ngIf=\"currentUrl === '/itineraries/favorites'\" class=\"m-auto w-[90px] mt-2 text-center underline-custom\"></h2> \r\n </div>\r\n </section>\r\n</aside>", styles: ["aside{background-color:#27242c}.underline-custom{background:linear-gradient(94.44deg,#fe3c72 1.26%,#e15561);height:5px}.filter-outer{box-shadow:-6.4px -6.4px 20.49px -3.84px #cbc7d140;box-shadow:14.08px 12.8px 34.57px 3.2px #111014a6;height:40px;width:40px;border-radius:50%;background:#27242c}.filter-item-container{width:40px;height:40px;background:#27242c;box-shadow:-6.4px -6.4px 20.49px -3.84px #cbc7d140,14.08px 12.8px 34.57px 3.2px #111014a6}.custom-button{box-shadow:-6.4px -6.4px 20.49px -3.84px #cbc7d140,14.08px 12.8px 34.57px 3.2px #111014a6;background:#27242c;padding:10px 20px;border-radius:24px}.custom-button.active{background:linear-gradient(94.44deg,#fe3c72 1.26%,#e15561)!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.IconBtnComponent, selector: "lib-icon-btn", inputs: ["hoverOutline", "disabled", "type", "form", "label", "showArrowIcon", "disableTextShadow", "notificationCount", "loading$", "illuminateIcon"] }, { kind: "directive", type: i1$1.NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "directive", type: i4.LazyImageDirective, selector: "img" }, { kind: "pipe", type: i4$1.TranslatePipe, name: "translate" }] });
|
|
2229
2271
|
}
|
|
2230
2272
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AppSidebarDesktopComponent, decorators: [{
|
|
2231
2273
|
type: Component,
|
|
2232
|
-
args: [{ selector: 'lib-app-sidebar-desktop', standalone: false, template: " <aside class=\"w-[260px] min-h-screen text-white p-4 flex flex-col gap-10 space-y-6 font-semibold
|
|
2233
|
-
}], ctorParameters: () => [{ type: i2.Router }, { type: i1$1.Location }] });
|
|
2274
|
+
args: [{ selector: 'lib-app-sidebar-desktop', standalone: false, template: " <aside class=\"w-[260px] min-h-screen text-white p-4 hidden md:flex md:flex-col gap-10 space-y-6 font-semibold\">\r\n <!-- Header -->\r\n <ng-template #suffix>\r\n <span class=\"discard\"><img [ngSrc]=\"ICONS['search']\" height=\"17\" width=\"18\" /></span>\r\n </ng-template>\r\n <section class=\"flex justify-between\">\r\n <lib-icon-btn (click)=\"back()\" class=\"checkmark-icon-button\">\r\n <img [ngSrc]=\"ICONS['back']\" height=\"17\" width=\"18\" />\r\n </lib-icon-btn>\r\n <h4 class=\"font-[Calistoga] text-[24px]\">{{ \"SIDEBAR.ITINERARIES\" | translate }}</h4>\r\n <lib-icon-btn (click)=\"openSearch()\" class=\"checkmark-icon-button\">\r\n <img [ngSrc]=\"ICONS['search']\" height=\"17\" width=\"18\" />\r\n </lib-icon-btn>\r\n </section>\r\n\r\n <section class=\"flex flex-col gap-10\">\r\n <!-- Explore Section -->\r\n <div class=\"flex flex-col justify-center\">\r\n <button class=\"m-auto w-[100px] text-center font-[Calistoga] text-[24px] font-normal\" (click)=\"openExplorePage()\">{{ \"SIDEBAR.EXPLORE\" | translate }}</button> \r\n <h2 *ngIf=\"currentUrl === '/itineraries/explore'\" class=\"m-auto w-[90px] mt-2 text-center underline-custom\"></h2> \r\n <div class=\"flex justify-center mt-6\">\r\n <div\r\n (click)=\"openCommentsSearch()\"\r\n class=\"flex items-center justify-center rounded-full cursor-pointer\"\r\n style=\"\r\n width: 40px;\r\n height: 40px;\r\n background: rgba(39, 36, 44, 1);\r\n box-shadow:\r\n -6.4px -6.4px 20.49px -3.84px rgba(203, 199, 209, 0.25),\r\n 14.08px 12.8px 34.57px 3.2px rgba(17, 16, 20, 0.65);\r\n \"\r\n \r\n >\r\n <img [ngSrc]=\"ICONS['desktopSearch']\" height=\"17\" width=\"18\" class=\"w-5 h-5\" />\r\n </div>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button font-[Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.FEATURED\" | translate}}</button>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button font-[Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.HOT\" | translate}}</button>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button [Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.BEST\" | translate}}</button>\r\n </div>\r\n <div class=\"flex justify-center mt-6\">\r\n <button class=\"custom-button [Gilroy] font-normal text-[18px]\">{{\"SIDEBAR.NEW\" | translate}}</button>\r\n </div>\r\n </div>\r\n\r\n <!-- Builder Section -->\r\n <div class=\"flex flex-col justify-center\">\r\n <button class=\"font-[Calistoga] text-[24px] font-normal\" (click)=\"openBuilderPage()\">{{\"SIDEBAR.BUILDER\" | translate}}</button>\r\n <h2 *ngIf=\"currentUrl === '/itineraries/builder'\" class=\"m-auto w-[90px] mt-2 text-center underline-custom\"></h2> \r\n </div>\r\n\r\n <!-- Builder Section -->\r\n <div class=\"flex flex-col justify-center\">\r\n <button class=\"font-[Calistoga] text-[24px] font-normal\" (click)=\"openFavoritesPage()\">{{\"SIDEBAR.FAVOURITE\" | translate }}</button>\r\n <h2 *ngIf=\"currentUrl === '/itineraries/favorites'\" class=\"m-auto w-[90px] mt-2 text-center underline-custom\"></h2> \r\n </div>\r\n </section>\r\n</aside>", styles: ["aside{background-color:#27242c}.underline-custom{background:linear-gradient(94.44deg,#fe3c72 1.26%,#e15561);height:5px}.filter-outer{box-shadow:-6.4px -6.4px 20.49px -3.84px #cbc7d140;box-shadow:14.08px 12.8px 34.57px 3.2px #111014a6;height:40px;width:40px;border-radius:50%;background:#27242c}.filter-item-container{width:40px;height:40px;background:#27242c;box-shadow:-6.4px -6.4px 20.49px -3.84px #cbc7d140,14.08px 12.8px 34.57px 3.2px #111014a6}.custom-button{box-shadow:-6.4px -6.4px 20.49px -3.84px #cbc7d140,14.08px 12.8px 34.57px 3.2px #111014a6;background:#27242c;padding:10px 20px;border-radius:24px}.custom-button.active{background:linear-gradient(94.44deg,#fe3c72 1.26%,#e15561)!important}\n"] }]
|
|
2275
|
+
}], ctorParameters: () => [{ type: i2.Router }, { type: i1$1.Location }, { type: i2.ActivatedRoute }] });
|
|
2234
2276
|
|
|
2235
2277
|
class ItinerariesComponent {
|
|
2236
2278
|
router;
|
|
@@ -2783,7 +2825,8 @@ class BranchedItinerariesComponent {
|
|
|
2783
2825
|
}
|
|
2784
2826
|
navigateToDetail(_item) {
|
|
2785
2827
|
this.router.navigate([
|
|
2786
|
-
|
|
2828
|
+
ItinerariesRoutesEnum.ITINERARY,
|
|
2829
|
+
ItinerariesRoutesEnum.ITINERARY_DETAIL,
|
|
2787
2830
|
]);
|
|
2788
2831
|
}
|
|
2789
2832
|
navToBranchItinerary = (id) => {
|
|
@@ -2931,7 +2974,7 @@ class BuilderComponent {
|
|
|
2931
2974
|
}];
|
|
2932
2975
|
}
|
|
2933
2976
|
navigateArchives() {
|
|
2934
|
-
this.router.navigate([
|
|
2977
|
+
this.router.navigate([ItinerariesRoutesEnum.ARCHIVES]);
|
|
2935
2978
|
}
|
|
2936
2979
|
actionCardClicked() {
|
|
2937
2980
|
this.router.navigate([ItinerariesRoutesEnum.ITINERARY, ItinerariesRoutesEnum.CREATE_ITINERARY]);
|
|
@@ -9220,30 +9263,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
9220
9263
|
}] });
|
|
9221
9264
|
|
|
9222
9265
|
const routes = [
|
|
9223
|
-
{ path: '', redirectTo: 'itineraries', pathMatch: 'full' },
|
|
9224
|
-
{
|
|
9225
|
-
path: 'itineraries',
|
|
9226
|
-
loadChildren: () => ItinerariesModule
|
|
9227
|
-
},
|
|
9228
9266
|
{
|
|
9229
|
-
path: '
|
|
9230
|
-
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9239
|
-
|
|
9240
|
-
|
|
9241
|
-
|
|
9242
|
-
|
|
9243
|
-
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9267
|
+
path: '',
|
|
9268
|
+
component: ItineraryLibComponent,
|
|
9269
|
+
children: [
|
|
9270
|
+
{
|
|
9271
|
+
path: '',
|
|
9272
|
+
loadChildren: () => ItinerariesModule
|
|
9273
|
+
},
|
|
9274
|
+
{
|
|
9275
|
+
path: 'itineraries',
|
|
9276
|
+
loadChildren: () => ItinerariesModule
|
|
9277
|
+
},
|
|
9278
|
+
{
|
|
9279
|
+
path: 'search',
|
|
9280
|
+
loadChildren: () => SearchModule
|
|
9281
|
+
},
|
|
9282
|
+
{
|
|
9283
|
+
path: 'archives',
|
|
9284
|
+
loadChildren: () => ArchivesModule
|
|
9285
|
+
},
|
|
9286
|
+
{
|
|
9287
|
+
path: 'dashboard',
|
|
9288
|
+
loadChildren: () => DashboardModule,
|
|
9289
|
+
},
|
|
9290
|
+
{
|
|
9291
|
+
path: 'pathway',
|
|
9292
|
+
loadChildren: () => PathwayModule
|
|
9293
|
+
},
|
|
9294
|
+
{
|
|
9295
|
+
path: 'user',
|
|
9296
|
+
loadChildren: () => UserModule
|
|
9297
|
+
},
|
|
9298
|
+
]
|
|
9247
9299
|
},
|
|
9248
9300
|
];
|
|
9249
9301
|
class ItineraryLibRoutingModule {
|