ngx-sfc-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +685 -0
- package/esm2020/lib/components/avatar/avatar.component.mjs +83 -0
- package/esm2020/lib/components/avatar/avatar.constants.mjs +9 -0
- package/esm2020/lib/components/avatar/models/avatar-data.model.mjs +2 -0
- package/esm2020/lib/components/avatar/models/avatar-image.model.mjs +14 -0
- package/esm2020/lib/components/avatar/models/avatar-progress.model.mjs +2 -0
- package/esm2020/lib/components/avatar/parts/badge/avatar-badge-position.enum.mjs +12 -0
- package/esm2020/lib/components/avatar/parts/badge/avatar-badge.component.mjs +88 -0
- package/esm2020/lib/components/avatar/parts/badge/avatar-badge.constants.mjs +5 -0
- package/esm2020/lib/components/carousel/carousel.component.mjs +230 -0
- package/esm2020/lib/components/carousel/carousel.enum.mjs +33 -0
- package/esm2020/lib/components/carousel/directive/carousel-slide.directive.mjs +31 -0
- package/esm2020/lib/components/carousel/models/dom.model.mjs +2 -0
- package/esm2020/lib/components/carousel/models/navigation.model.mjs +2 -0
- package/esm2020/lib/components/carousel/models/options.model.mjs +2 -0
- package/esm2020/lib/components/carousel/models/slide.model.mjs +3 -0
- package/esm2020/lib/components/carousel/parts/stage/carousel-stage.component.mjs +83 -0
- package/esm2020/lib/components/carousel/parts/stage/carousel-stage.model.mjs +2 -0
- package/esm2020/lib/components/carousel/service/animate/carousel-animate.service.mjs +86 -0
- package/esm2020/lib/components/carousel/service/autoplay/carousel-autoplay.service.mjs +129 -0
- package/esm2020/lib/components/carousel/service/carousel/carousel-service.constants.mjs +44 -0
- package/esm2020/lib/components/carousel/service/carousel/carousel-service.enum.mjs +14 -0
- package/esm2020/lib/components/carousel/service/carousel/carousel-service.model.mjs +2 -0
- package/esm2020/lib/components/carousel/service/carousel/carousel.service.mjs +697 -0
- package/esm2020/lib/components/carousel/service/lazy/carousel-lazy-load.service.mjs +59 -0
- package/esm2020/lib/components/carousel/service/navigation/carousel-navigation.service.mjs +211 -0
- package/esm2020/lib/components/chart/chart-option.model.mjs +2 -0
- package/esm2020/lib/components/chart/chart.component.mjs +124 -0
- package/esm2020/lib/components/chart/chart.constants.mjs +95 -0
- package/esm2020/lib/components/chart/service/settings/chart-settings.service.mjs +87 -0
- package/esm2020/lib/components/chart/service/theme/chart-theme.model.mjs +2 -0
- package/esm2020/lib/components/chart/service/theme/chart-theme.service.mjs +25 -0
- package/esm2020/lib/components/index.mjs +40 -0
- package/esm2020/lib/components/menu/dropdown/dropdown-menu.component.mjs +86 -0
- package/esm2020/lib/components/menu/dropdown/parts/item/dropdown-menu-item.component.mjs +26 -0
- package/esm2020/lib/components/menu/dropdown/parts/item/dropdown-menu-item.model.mjs +2 -0
- package/esm2020/lib/components/menu/navigation/navigation-menu.component.mjs +26 -0
- package/esm2020/lib/components/menu/navigation/parts/item/navigation-menu-item.component.mjs +31 -0
- package/esm2020/lib/components/menu/navigation/parts/item/navigation-menu-item.model.mjs +2 -0
- package/esm2020/lib/components/menu/side/parts/header/side-menu-header.component.mjs +31 -0
- package/esm2020/lib/components/menu/side/parts/item/content/side-menu-item-content.component.mjs +56 -0
- package/esm2020/lib/components/menu/side/parts/item/side-menu-item.component.mjs +81 -0
- package/esm2020/lib/components/menu/side/parts/title/side-menu-title.component.mjs +24 -0
- package/esm2020/lib/components/menu/side/side-menu.component.mjs +47 -0
- package/esm2020/lib/components/menu/side/side-menu.model.mjs +6 -0
- package/esm2020/lib/components/no-export-index.mjs +15 -0
- package/esm2020/lib/components/notification/enums/notification-template.enum.mjs +5 -0
- package/esm2020/lib/components/notification/enums/notification-type.enum.mjs +7 -0
- package/esm2020/lib/components/notification/notification-auto-close.model.mjs +2 -0
- package/esm2020/lib/components/notification/notification.component.mjs +67 -0
- package/esm2020/lib/components/notification/parts/content/notification-content.component.mjs +33 -0
- package/esm2020/lib/components/notification/parts/content/notification-content.model.mjs +2 -0
- package/esm2020/lib/components/progress/circle/progress-circle.component.mjs +23 -0
- package/esm2020/lib/components/progress/line/progress-line.component.mjs +40 -0
- package/esm2020/lib/components/progress/progress-color.enum.mjs +13 -0
- package/esm2020/lib/components/progress/progress.component.mjs +50 -0
- package/esm2020/lib/components/progress/semi-circle/progress-semi-circle.component.mjs +42 -0
- package/esm2020/lib/components/slider/parts/button/slider-button-type.enum.mjs +6 -0
- package/esm2020/lib/components/slider/parts/button/slider-button.component.mjs +34 -0
- package/esm2020/lib/components/slider/parts/item/slider-item.component.mjs +17 -0
- package/esm2020/lib/components/slider/parts/item/slider-item.model.mjs +2 -0
- package/esm2020/lib/components/slider/parts/pagination/slider-pagination.component.mjs +29 -0
- package/esm2020/lib/components/slider/service/automatic/slider-automatic.service.mjs +35 -0
- package/esm2020/lib/components/slider/service/slider/slider-move-type.enum.mjs +7 -0
- package/esm2020/lib/components/slider/service/slider/slider-move.event.mjs +2 -0
- package/esm2020/lib/components/slider/service/slider/slider-move.model.mjs +2 -0
- package/esm2020/lib/components/slider/service/slider/slider.service.mjs +40 -0
- package/esm2020/lib/components/slider/slider-type.enum.mjs +6 -0
- package/esm2020/lib/components/slider/slider.component.mjs +116 -0
- package/esm2020/lib/components/stars/star-type.enum.mjs +9 -0
- package/esm2020/lib/components/stars/stars.component.mjs +42 -0
- package/esm2020/lib/components/table/enums/table-data-type.enum.mjs +6 -0
- package/esm2020/lib/components/table/enums/table-template.enum.mjs +7 -0
- package/esm2020/lib/components/table/models/table-pagination.model.mjs +2 -0
- package/esm2020/lib/components/table/models/table.model.mjs +2 -0
- package/esm2020/lib/components/table/parts/columns/default/default-table-column.component.mjs +24 -0
- package/esm2020/lib/components/table/parts/columns/selectable/selectable-table-column.component.mjs +30 -0
- package/esm2020/lib/components/table/parts/columns/table-column-type.enum.mjs +8 -0
- package/esm2020/lib/components/table/parts/columns/table-column.model.mjs +2 -0
- package/esm2020/lib/components/table/parts/content/base-default-table-content.component.mjs +74 -0
- package/esm2020/lib/components/table/parts/content/cards/default/default-table-card.component.mjs +14 -0
- package/esm2020/lib/components/table/parts/content/rows/default/default-table-row.component.mjs +28 -0
- package/esm2020/lib/components/table/parts/content/rows/expanded/expanded-table-row-template.enum.mjs +6 -0
- package/esm2020/lib/components/table/parts/content/rows/expanded/expanded-table-row.component.mjs +42 -0
- package/esm2020/lib/components/table/parts/content/rows/expanded/expanded-table-row.model.mjs +2 -0
- package/esm2020/lib/components/table/parts/toggle/columns-toggle.component.mjs +33 -0
- package/esm2020/lib/components/table/parts/toggle/columns-toggle.constants.mjs +11 -0
- package/esm2020/lib/components/table/parts/toggle/service/columns-toggle.service.mjs +34 -0
- package/esm2020/lib/components/table/service/select/table-select.event.mjs +2 -0
- package/esm2020/lib/components/table/service/select/table-select.service.mjs +24 -0
- package/esm2020/lib/components/table/table.component.mjs +250 -0
- package/esm2020/lib/components/table/table.constants.mjs +11 -0
- package/esm2020/lib/components/tabs/models/tab.model.mjs +2 -0
- package/esm2020/lib/components/tabs/models/tabs-view.model.mjs +2 -0
- package/esm2020/lib/components/tabs/parts/labels/tab-label-content-base.component.mjs +29 -0
- package/esm2020/lib/components/tabs/parts/labels/tab-label-icon/tab-label-icon.component.mjs +20 -0
- package/esm2020/lib/components/tabs/parts/labels/tab-label-line/tab-label-line.component.mjs +13 -0
- package/esm2020/lib/components/tabs/parts/sliders/tab-label-icon/tab-label-icon-slider.component.mjs +20 -0
- package/esm2020/lib/components/tabs/parts/sliders/tab-label-line/tab-label-line-slider.component.mjs +20 -0
- package/esm2020/lib/components/tabs/parts/sliders/tab-slider-base.component.mjs +18 -0
- package/esm2020/lib/components/tabs/parts/sliders/tab-slider-context.model.mjs +2 -0
- package/esm2020/lib/components/tabs/service/tab.service.mjs +11 -0
- package/esm2020/lib/components/tabs/tabs-template.enum.mjs +7 -0
- package/esm2020/lib/components/tabs/tabs.component.mjs +69 -0
- package/esm2020/lib/components/tags/parts/tag/tag.component.mjs +18 -0
- package/esm2020/lib/components/tags/parts/tag/tag.model.mjs +2 -0
- package/esm2020/lib/components/tags/tags.component.mjs +18 -0
- package/esm2020/lib/components/timeline/parts/item/timeline-item-position.enum.mjs +6 -0
- package/esm2020/lib/components/timeline/parts/item/timeline-item.component.mjs +34 -0
- package/esm2020/lib/components/timeline/parts/item/timeline-item.model.mjs +2 -0
- package/esm2020/lib/components/timeline/timeline.component.mjs +18 -0
- package/esm2020/lib/ngx-sfc-components.module.mjs +208 -0
- package/esm2020/ngx-sfc-components.mjs +5 -0
- package/esm2020/public-api.mjs +6 -0
- package/fesm2015/ngx-sfc-components.mjs +4006 -0
- package/fesm2015/ngx-sfc-components.mjs.map +1 -0
- package/fesm2020/ngx-sfc-components.mjs +3989 -0
- package/fesm2020/ngx-sfc-components.mjs.map +1 -0
- package/lib/components/avatar/avatar.component.d.ts +42 -0
- package/lib/components/avatar/avatar.constants.d.ts +8 -0
- package/lib/components/avatar/models/avatar-data.model.d.ts +6 -0
- package/lib/components/avatar/models/avatar-image.model.d.ts +12 -0
- package/lib/components/avatar/models/avatar-progress.model.d.ts +4 -0
- package/lib/components/avatar/parts/badge/avatar-badge-position.enum.d.ts +10 -0
- package/lib/components/avatar/parts/badge/avatar-badge.component.d.ts +14 -0
- package/lib/components/avatar/parts/badge/avatar-badge.constants.d.ts +4 -0
- package/lib/components/carousel/carousel.component.d.ts +62 -0
- package/lib/components/carousel/carousel.enum.d.ts +26 -0
- package/lib/components/carousel/directive/carousel-slide.directive.d.ts +13 -0
- package/lib/components/carousel/models/dom.model.d.ts +7 -0
- package/lib/components/carousel/models/navigation.model.d.ts +17 -0
- package/lib/components/carousel/models/options.model.d.ts +40 -0
- package/lib/components/carousel/models/slide.model.d.ts +28 -0
- package/lib/components/carousel/parts/stage/carousel-stage.component.d.ts +30 -0
- package/lib/components/carousel/parts/stage/carousel-stage.model.d.ts +7 -0
- package/lib/components/carousel/service/animate/carousel-animate.service.d.ts +17 -0
- package/lib/components/carousel/service/autoplay/carousel-autoplay.service.d.ts +29 -0
- package/lib/components/carousel/service/carousel/carousel-service.constants.d.ts +5 -0
- package/lib/components/carousel/service/carousel/carousel-service.enum.d.ts +9 -0
- package/lib/components/carousel/service/carousel/carousel-service.model.d.ts +21 -0
- package/lib/components/carousel/service/carousel/carousel.service.d.ts +92 -0
- package/lib/components/carousel/service/lazy/carousel-lazy-load.service.d.ts +14 -0
- package/lib/components/carousel/service/navigation/carousel-navigation.service.d.ts +28 -0
- package/lib/components/chart/chart-option.model.d.ts +9 -0
- package/lib/components/chart/chart.component.d.ts +38 -0
- package/lib/components/chart/chart.constants.d.ts +100 -0
- package/lib/components/chart/service/settings/chart-settings.service.d.ts +14 -0
- package/lib/components/chart/service/theme/chart-theme.model.d.ts +15 -0
- package/lib/components/chart/service/theme/chart-theme.service.d.ts +11 -0
- package/lib/components/index.d.ts +56 -0
- package/lib/components/menu/dropdown/dropdown-menu.component.d.ts +28 -0
- package/lib/components/menu/dropdown/parts/item/dropdown-menu-item.component.d.ts +8 -0
- package/lib/components/menu/dropdown/parts/item/dropdown-menu-item.model.d.ts +6 -0
- package/lib/components/menu/navigation/navigation-menu.component.d.ts +10 -0
- package/lib/components/menu/navigation/parts/item/navigation-menu-item.component.d.ts +9 -0
- package/lib/components/menu/navigation/parts/item/navigation-menu-item.model.d.ts +6 -0
- package/lib/components/menu/side/parts/header/side-menu-header.component.d.ts +11 -0
- package/lib/components/menu/side/parts/item/content/side-menu-item-content.component.d.ts +17 -0
- package/lib/components/menu/side/parts/item/side-menu-item.component.d.ts +17 -0
- package/lib/components/menu/side/parts/title/side-menu-title.component.d.ts +7 -0
- package/lib/components/menu/side/side-menu.component.d.ts +13 -0
- package/lib/components/menu/side/side-menu.model.d.ts +15 -0
- package/lib/components/no-export-index.d.ts +14 -0
- package/lib/components/notification/enums/notification-template.enum.d.ts +3 -0
- package/lib/components/notification/enums/notification-type.enum.d.ts +5 -0
- package/lib/components/notification/notification-auto-close.model.d.ts +4 -0
- package/lib/components/notification/notification.component.d.ts +26 -0
- package/lib/components/notification/parts/content/notification-content.component.d.ts +14 -0
- package/lib/components/notification/parts/content/notification-content.model.d.ts +8 -0
- package/lib/components/progress/circle/progress-circle.component.d.ts +8 -0
- package/lib/components/progress/line/progress-line.component.d.ts +17 -0
- package/lib/components/progress/progress-color.enum.d.ts +11 -0
- package/lib/components/progress/progress.component.d.ts +9 -0
- package/lib/components/progress/semi-circle/progress-semi-circle.component.d.ts +16 -0
- package/lib/components/slider/parts/button/slider-button-type.enum.d.ts +4 -0
- package/lib/components/slider/parts/button/slider-button.component.d.ts +11 -0
- package/lib/components/slider/parts/item/slider-item.component.d.ts +7 -0
- package/lib/components/slider/parts/item/slider-item.model.d.ts +5 -0
- package/lib/components/slider/parts/pagination/slider-pagination.component.d.ts +11 -0
- package/lib/components/slider/service/automatic/slider-automatic.service.d.ts +17 -0
- package/lib/components/slider/service/slider/slider-move-type.enum.d.ts +5 -0
- package/lib/components/slider/service/slider/slider-move.event.d.ts +5 -0
- package/lib/components/slider/service/slider/slider-move.model.d.ts +4 -0
- package/lib/components/slider/service/slider/slider.service.d.ts +12 -0
- package/lib/components/slider/slider-type.enum.d.ts +4 -0
- package/lib/components/slider/slider.component.d.ts +45 -0
- package/lib/components/stars/star-type.enum.d.ts +7 -0
- package/lib/components/stars/stars.component.d.ts +11 -0
- package/lib/components/table/enums/table-data-type.enum.d.ts +4 -0
- package/lib/components/table/enums/table-template.enum.d.ts +5 -0
- package/lib/components/table/models/table-pagination.model.d.ts +5 -0
- package/lib/components/table/models/table.model.d.ts +9 -0
- package/lib/components/table/parts/columns/default/default-table-column.component.d.ts +8 -0
- package/lib/components/table/parts/columns/selectable/selectable-table-column.component.d.ts +10 -0
- package/lib/components/table/parts/columns/table-column-type.enum.d.ts +6 -0
- package/lib/components/table/parts/columns/table-column.model.d.ts +11 -0
- package/lib/components/table/parts/content/base-default-table-content.component.d.ts +27 -0
- package/lib/components/table/parts/content/cards/default/default-table-card.component.d.ts +6 -0
- package/lib/components/table/parts/content/rows/default/default-table-row.component.d.ts +10 -0
- package/lib/components/table/parts/content/rows/expanded/expanded-table-row-template.enum.d.ts +4 -0
- package/lib/components/table/parts/content/rows/expanded/expanded-table-row.component.d.ts +16 -0
- package/lib/components/table/parts/content/rows/expanded/expanded-table-row.model.d.ts +11 -0
- package/lib/components/table/parts/toggle/columns-toggle.component.d.ts +13 -0
- package/lib/components/table/parts/toggle/columns-toggle.constants.d.ts +10 -0
- package/lib/components/table/parts/toggle/service/columns-toggle.service.d.ts +15 -0
- package/lib/components/table/service/select/table-select.event.d.ts +4 -0
- package/lib/components/table/service/select/table-select.service.d.ts +11 -0
- package/lib/components/table/table.component.d.ts +74 -0
- package/lib/components/table/table.constants.d.ts +11 -0
- package/lib/components/tabs/models/tab.model.d.ts +7 -0
- package/lib/components/tabs/models/tabs-view.model.d.ts +8 -0
- package/lib/components/tabs/parts/labels/tab-label-content-base.component.d.ts +9 -0
- package/lib/components/tabs/parts/labels/tab-label-icon/tab-label-icon.component.d.ts +9 -0
- package/lib/components/tabs/parts/labels/tab-label-line/tab-label-line.component.d.ts +6 -0
- package/lib/components/tabs/parts/sliders/tab-label-icon/tab-label-icon-slider.component.d.ts +7 -0
- package/lib/components/tabs/parts/sliders/tab-label-line/tab-label-line-slider.component.d.ts +10 -0
- package/lib/components/tabs/parts/sliders/tab-slider-base.component.d.ts +8 -0
- package/lib/components/tabs/parts/sliders/tab-slider-context.model.d.ts +4 -0
- package/lib/components/tabs/service/tab.service.d.ts +6 -0
- package/lib/components/tabs/tabs-template.enum.d.ts +5 -0
- package/lib/components/tabs/tabs.component.d.ts +26 -0
- package/lib/components/tags/parts/tag/tag.component.d.ts +7 -0
- package/lib/components/tags/parts/tag/tag.model.d.ts +4 -0
- package/lib/components/tags/tags.component.d.ts +7 -0
- package/lib/components/timeline/parts/item/timeline-item-position.enum.d.ts +4 -0
- package/lib/components/timeline/parts/item/timeline-item.component.d.ts +11 -0
- package/lib/components/timeline/parts/item/timeline-item.model.d.ts +10 -0
- package/lib/components/timeline/timeline.component.d.ts +7 -0
- package/lib/ngx-sfc-components.module.d.ts +49 -0
- package/ngx-sfc-components.d.ts +5 -0
- package/package.json +50 -0
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,4006 @@
|
|
|
1
|
+
import * as i2 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Component, Input, ContentChildren, Directive, HostBinding, EventEmitter, Output, HostListener, Inject, QueryList, Injectable, ViewChild, ViewChildren, NgModule } from '@angular/core';
|
|
5
|
+
import { Chart, Title, Tooltip, Filler, Legend, LineController, LineElement, PointElement, LinearScale, CategoryScale, BarController, BarElement, DoughnutController, ArcElement, RadarController, RadialLinearScale, PieController, PolarAreaController, BubbleController, ScatterController, TimeSeriesScale } from 'chart.js';
|
|
6
|
+
import * as i1 from 'ngx-sfc-common';
|
|
7
|
+
import { isDefined, firstOrDefault, CommonConstants, TemplateReferenceDirective, UIClass, isNullOrEmptyString, getCalcValue, UIConstants, any, Position, MediaLimits, WINDOW, getCssLikeValue, ButtonType, replaceRgbOpacity, Theme, mergeDeep, SortingDirection, all, hasItemBy, sortByPath, PaginationService, SortingService, ResizeService, isNumeric, DOCUMENT, NgxSfcCommonModule } from 'ngx-sfc-common';
|
|
8
|
+
import { Subject, BehaviorSubject, startWith, combineLatest, map, distinctUntilChanged, tap, shareReplay, merge, fromEvent, of, switchMap, first, filter, from, skip, take, toArray, delay } from 'rxjs';
|
|
9
|
+
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
10
|
+
|
|
11
|
+
class TabService {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.selectSubject = new Subject();
|
|
14
|
+
this.selected$ = this.selectSubject.asObservable();
|
|
15
|
+
}
|
|
16
|
+
select(index) {
|
|
17
|
+
this.selectSubject.next(index);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var TabsTemplate;
|
|
22
|
+
(function (TabsTemplate) {
|
|
23
|
+
TabsTemplate["Label"] = "label";
|
|
24
|
+
TabsTemplate["Slider"] = "slider";
|
|
25
|
+
TabsTemplate["Body"] = "body";
|
|
26
|
+
})(TabsTemplate || (TabsTemplate = {}));
|
|
27
|
+
|
|
28
|
+
class TabsComponent {
|
|
29
|
+
constructor(tabService) {
|
|
30
|
+
this.tabService = tabService;
|
|
31
|
+
this.TabsTemplate = TabsTemplate;
|
|
32
|
+
this.tabs = [];
|
|
33
|
+
}
|
|
34
|
+
ngOnInit() {
|
|
35
|
+
this.tabsSubject = new BehaviorSubject(this.tabs);
|
|
36
|
+
const selectedIndex = this.getSelectedIndex(this.tabs), tabs$ = this.tabsSubject.asObservable(), selected$ = this.tabService.selected$
|
|
37
|
+
.pipe(startWith(selectedIndex));
|
|
38
|
+
this.vm$ = combineLatest([
|
|
39
|
+
tabs$,
|
|
40
|
+
selected$
|
|
41
|
+
]).pipe(map(([tabs, selectedIndex]) => {
|
|
42
|
+
this.updateSelected(tabs, selectedIndex);
|
|
43
|
+
return {
|
|
44
|
+
tabs: tabs,
|
|
45
|
+
selectedTab: isDefined(selectedIndex) ? tabs[selectedIndex] : null,
|
|
46
|
+
sliderContextData: { count: tabs.length, index: selectedIndex },
|
|
47
|
+
tabWidth: 100 / (tabs ? tabs.length : 1)
|
|
48
|
+
};
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
selectTab(tab, index) {
|
|
52
|
+
if (!tab.disabled && !tab.selected) {
|
|
53
|
+
this.tabService.select(index);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
getSelectedIndex(tabs) {
|
|
57
|
+
let selectedIndex = tabs.indexOf(firstOrDefault(tabs, tab => tab.selected && !tab.disabled));
|
|
58
|
+
if (selectedIndex == CommonConstants.NOT_FOUND_INDEX) {
|
|
59
|
+
selectedIndex = tabs.indexOf(firstOrDefault(tabs, tab => !tab.disabled));
|
|
60
|
+
return selectedIndex == CommonConstants.NOT_FOUND_INDEX ? 0 : selectedIndex;
|
|
61
|
+
}
|
|
62
|
+
return selectedIndex;
|
|
63
|
+
}
|
|
64
|
+
updateSelected(tabs, selectedIndex) {
|
|
65
|
+
tabs.forEach((item, index) => {
|
|
66
|
+
item.selected = index == selectedIndex;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabsComponent, deps: [{ token: TabService }], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
+
TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabsComponent, selector: "sfc-tabs", inputs: { tabs: "tabs", label: "label", slider: "slider", body: "body" }, providers: [TabService], queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <div class=\"tabs-container\">\r\n <div class=\"tabs\">\r\n <div class=\"tab\" [style.width.%]=\"vm.tabWidth\" *ngFor=\"let tab of vm.tabs; index as index\"\r\n (click)=\"selectTab(tab, index)\">\r\n\r\n <sfc-template-content [referenceContent]=\"label\" [templatesContent]=\"templates\"\r\n [templateType]=\"TabsTemplate.Label\" [defaultContent]=\"defaultLabel\" [contextData]=\"tab\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultLabel>{{ tab.label }}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <sfc-template-content [referenceContent]=\"slider\" [templatesContent]=\"templates\"\r\n [templateType]=\"TabsTemplate.Slider\" [contextData]=\"vm.sliderContextData\"></sfc-template-content>\r\n\r\n </div>\r\n\r\n <div class=\"body-container\">\r\n <ng-container *ngIf=\"vm.selectedTab\">\r\n\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"TabsTemplate.Body\" [contextData]=\"vm.selectedTab.data\">\r\n </sfc-template-content>\r\n\r\n </ng-container>\r\n </div>\r\n</div>", styles: [":host{width:100%}:host .container .tabs{display:flex;flex-wrap:wrap}:host .container .tabs .tab{text-align:center}:host-context(.sfc-default-theme) :host .container .tabs .tab{color:#545e61}:host-context(.sfc-dark-theme) :host .container .tabs .tab{color:#ccd1d9}:host .container .body-container{margin-top:.6em}:host-context(.sfc-default-theme) :host .container .body-container{color:#545e61}:host-context(.sfc-dark-theme) :host .container .body-container{color:#ccd1d9}\n"], components: [{ type: i1.TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i2.AsyncPipe } });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabsComponent, decorators: [{
|
|
73
|
+
type: Component,
|
|
74
|
+
args: [{ selector: 'sfc-tabs', providers: [TabService], template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <div class=\"tabs-container\">\r\n <div class=\"tabs\">\r\n <div class=\"tab\" [style.width.%]=\"vm.tabWidth\" *ngFor=\"let tab of vm.tabs; index as index\"\r\n (click)=\"selectTab(tab, index)\">\r\n\r\n <sfc-template-content [referenceContent]=\"label\" [templatesContent]=\"templates\"\r\n [templateType]=\"TabsTemplate.Label\" [defaultContent]=\"defaultLabel\" [contextData]=\"tab\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultLabel>{{ tab.label }}</ng-template>\r\n </div>\r\n </div>\r\n\r\n <sfc-template-content [referenceContent]=\"slider\" [templatesContent]=\"templates\"\r\n [templateType]=\"TabsTemplate.Slider\" [contextData]=\"vm.sliderContextData\"></sfc-template-content>\r\n\r\n </div>\r\n\r\n <div class=\"body-container\">\r\n <ng-container *ngIf=\"vm.selectedTab\">\r\n\r\n <sfc-template-content [referenceContent]=\"body\" [templatesContent]=\"templates\"\r\n [templateType]=\"TabsTemplate.Body\" [contextData]=\"vm.selectedTab.data\">\r\n </sfc-template-content>\r\n\r\n </ng-container>\r\n </div>\r\n</div>", styles: [":host{width:100%}:host .container .tabs{display:flex;flex-wrap:wrap}:host .container .tabs .tab{text-align:center}:host-context(.sfc-default-theme) :host .container .tabs .tab{color:#545e61}:host-context(.sfc-dark-theme) :host .container .tabs .tab{color:#ccd1d9}:host .container .body-container{margin-top:.6em}:host-context(.sfc-default-theme) :host .container .body-container{color:#545e61}:host-context(.sfc-dark-theme) :host .container .body-container{color:#ccd1d9}\n"] }]
|
|
75
|
+
}], ctorParameters: function () { return [{ type: TabService }]; }, propDecorators: { tabs: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}], label: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}], slider: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], body: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], templates: [{
|
|
84
|
+
type: ContentChildren,
|
|
85
|
+
args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
|
|
86
|
+
}] } });
|
|
87
|
+
|
|
88
|
+
class TabLabelContentBase {
|
|
89
|
+
constructor() {
|
|
90
|
+
this.disabled = false;
|
|
91
|
+
this.selected = false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
TabLabelContentBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelContentBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
95
|
+
TabLabelContentBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: TabLabelContentBase, inputs: { label: "label", icon: "icon", disabled: "disabled", selected: "selected" }, host: { properties: { "class.disabled": "this.disabled", "class.selected": "this.selected" } }, ngImport: i0 });
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelContentBase, decorators: [{
|
|
97
|
+
type: Directive
|
|
98
|
+
}], propDecorators: { label: [{
|
|
99
|
+
type: Input
|
|
100
|
+
}], icon: [{
|
|
101
|
+
type: Input
|
|
102
|
+
}], disabled: [{
|
|
103
|
+
type: Input
|
|
104
|
+
}, {
|
|
105
|
+
type: HostBinding,
|
|
106
|
+
args: ['class.' + UIClass.Disabled]
|
|
107
|
+
}], selected: [{
|
|
108
|
+
type: Input
|
|
109
|
+
}, {
|
|
110
|
+
type: HostBinding,
|
|
111
|
+
args: ['class.' + UIClass.Selected]
|
|
112
|
+
}] } });
|
|
113
|
+
|
|
114
|
+
class TabLabelLineComponent extends TabLabelContentBase {
|
|
115
|
+
}
|
|
116
|
+
TabLabelLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelLineComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
TabLabelLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabLabelLineComponent, selector: "sfc-tab-label-line", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <i *ngIf=\"icon\" class=\"{{icon}}\"></i>\r\n <span>{{label}}</span>\r\n </div>\r\n</div>", styles: [":host{width:100%;cursor:pointer;font-weight:700;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#ccd1d9}:host.disabled{cursor:default;pointer-events:none}:host-context(.sfc-default-theme) :host.disabled{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled{color:#656d78}:host.selected:not(.disabled),:host:hover:not(.disabled){color:#2bbbad}:host .container{width:100%;display:flex;justify-content:center;align-items:center;transition:color .2s ease;border-bottom:1px solid #e6e9ed}:host .container .content{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;text-align:center;padding:1.25em 0}:host .container .content i{margin-right:.18em}@media (max-width: 430px){:host .container .content i{display:none}}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelLineComponent, decorators: [{
|
|
119
|
+
type: Component,
|
|
120
|
+
args: [{ selector: 'sfc-tab-label-line', template: "<div class=\"container\">\r\n <div class=\"content\">\r\n <i *ngIf=\"icon\" class=\"{{icon}}\"></i>\r\n <span>{{label}}</span>\r\n </div>\r\n</div>", styles: [":host{width:100%;cursor:pointer;font-weight:700;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#ccd1d9}:host.disabled{cursor:default;pointer-events:none}:host-context(.sfc-default-theme) :host.disabled{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled{color:#656d78}:host.selected:not(.disabled),:host:hover:not(.disabled){color:#2bbbad}:host .container{width:100%;display:flex;justify-content:center;align-items:center;transition:color .2s ease;border-bottom:1px solid #e6e9ed}:host .container .content{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;text-align:center;padding:1.25em 0}:host .container .content i{margin-right:.18em}@media (max-width: 430px){:host .container .content i{display:none}}\n"] }]
|
|
121
|
+
}] });
|
|
122
|
+
|
|
123
|
+
class TabLabelIconComponent extends TabLabelContentBase {
|
|
124
|
+
constructor() {
|
|
125
|
+
super(...arguments);
|
|
126
|
+
this.TAB_DEFAULT_ICON = 'fa fa-circle';
|
|
127
|
+
}
|
|
128
|
+
ngOnInit() {
|
|
129
|
+
this.icon = !isNullOrEmptyString(this.icon) ? this.icon : this.TAB_DEFAULT_ICON;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
TabLabelIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelIconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
133
|
+
TabLabelIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabLabelIconComponent, selector: "sfc-tab-label-icon", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <i class=\"{{icon}}\"></i>\r\n <span>{{label}}</span>\r\n</div>", styles: [":host{width:100%;cursor:pointer;font-weight:700;-webkit-user-select:none;user-select:none;padding-bottom:1.25em;display:inline-block;transition:all .2s ease-in-out}:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#ccd1d9}:host.selected:not(.disabled),:host:hover:not(.disabled){color:#2bbbad}:host.disabled{cursor:default;pointer-events:none}:host-context(.sfc-default-theme) :host.disabled{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled{color:#656d78}:host .container{display:inline-flex;align-items:center;flex-flow:column wrap;justify-content:center;text-align:center;overflow:hidden;text-overflow:ellipsis}:host .container i{height:1.2em;margin-bottom:.2em}:host .container span{font-size:.8em}@media (max-width: 430px){:host{padding-bottom:.6em}:host .container{padding:.8em;border-radius:.3em;text-overflow:initial}:host .container i{height:auto;margin-bottom:0}:host .container span{display:none}:host-context(.sfc-default-theme) :host.selected .container{background:#e6e9ed}:host-context(.sfc-dark-theme) :host.selected .container{background:#f5f7fa}}\n"] });
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelIconComponent, decorators: [{
|
|
135
|
+
type: Component,
|
|
136
|
+
args: [{ selector: 'sfc-tab-label-icon', template: "<div class=\"container\">\r\n <i class=\"{{icon}}\"></i>\r\n <span>{{label}}</span>\r\n</div>", styles: [":host{width:100%;cursor:pointer;font-weight:700;-webkit-user-select:none;user-select:none;padding-bottom:1.25em;display:inline-block;transition:all .2s ease-in-out}:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#ccd1d9}:host.selected:not(.disabled),:host:hover:not(.disabled){color:#2bbbad}:host.disabled{cursor:default;pointer-events:none}:host-context(.sfc-default-theme) :host.disabled{color:#bdbdbd}:host-context(.sfc-dark-theme) :host.disabled{color:#656d78}:host .container{display:inline-flex;align-items:center;flex-flow:column wrap;justify-content:center;text-align:center;overflow:hidden;text-overflow:ellipsis}:host .container i{height:1.2em;margin-bottom:.2em}:host .container span{font-size:.8em}@media (max-width: 430px){:host{padding-bottom:.6em}:host .container{padding:.8em;border-radius:.3em;text-overflow:initial}:host .container i{height:auto;margin-bottom:0}:host .container span{display:none}:host-context(.sfc-default-theme) :host.selected .container{background:#e6e9ed}:host-context(.sfc-dark-theme) :host.selected .container{background:#f5f7fa}}\n"] }]
|
|
137
|
+
}] });
|
|
138
|
+
|
|
139
|
+
class TabSliderBase {
|
|
140
|
+
constructor() {
|
|
141
|
+
this.count = 1;
|
|
142
|
+
this.index = 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
TabSliderBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabSliderBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
146
|
+
TabSliderBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: TabSliderBase, inputs: { count: "count", index: "index" }, ngImport: i0 });
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabSliderBase, decorators: [{
|
|
148
|
+
type: Directive
|
|
149
|
+
}], propDecorators: { count: [{
|
|
150
|
+
type: Input
|
|
151
|
+
}], index: [{
|
|
152
|
+
type: Input
|
|
153
|
+
}] } });
|
|
154
|
+
|
|
155
|
+
class TabLabelIconSliderComponent extends TabSliderBase {
|
|
156
|
+
get style() {
|
|
157
|
+
return {
|
|
158
|
+
width: getCalcValue(this.count),
|
|
159
|
+
transform: `translateX(${100 * this.index}${UIConstants.CSS_PERCENTAGE})`
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
TabLabelIconSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelIconSliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
164
|
+
TabLabelIconSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabLabelIconSliderComponent, selector: "sfc-tab-label-icon-slider", usesInheritance: true, ngImport: i0, template: "<div class=\"slider\" [ngStyle]=\"style\">\r\n <div class=\"indicator\"></div>\r\n</div>", styles: [".slider{transition:all .33s cubic-bezier(.38,.8,.32,1.07)}.slider .indicator{width:50%;margin:0 auto;height:.25em;background:#2bbbad;border-radius:.0625em}@media (max-width: 430px){.slider{display:none}}\n"], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelIconSliderComponent, decorators: [{
|
|
166
|
+
type: Component,
|
|
167
|
+
args: [{ selector: 'sfc-tab-label-icon-slider', template: "<div class=\"slider\" [ngStyle]=\"style\">\r\n <div class=\"indicator\"></div>\r\n</div>", styles: [".slider{transition:all .33s cubic-bezier(.38,.8,.32,1.07)}.slider .indicator{width:50%;margin:0 auto;height:.25em;background:#2bbbad;border-radius:.0625em}@media (max-width: 430px){.slider{display:none}}\n"] }]
|
|
168
|
+
}] });
|
|
169
|
+
|
|
170
|
+
class TabLabelLineSliderComponent extends TabSliderBase {
|
|
171
|
+
get style() {
|
|
172
|
+
return {
|
|
173
|
+
width: getCalcValue(this.count),
|
|
174
|
+
left: getCalcValue((this.count / this.index))
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
TabLabelLineSliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelLineSliderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
179
|
+
TabLabelLineSliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TabLabelLineSliderComponent, selector: "sfc-tab-label-line-slider", usesInheritance: true, ngImport: i0, template: "<div class=\"slider\" [ngStyle]=\"style\"></div>", styles: [":host{position:relative;display:flex}:host .slider{background:#2bbbad;height:.125em;position:absolute;left:0;top:calc(100% - .1em);transition:left .3s ease-out}\n"], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TabLabelLineSliderComponent, decorators: [{
|
|
181
|
+
type: Component,
|
|
182
|
+
args: [{ selector: 'sfc-tab-label-line-slider', template: "<div class=\"slider\" [ngStyle]=\"style\"></div>", styles: [":host{position:relative;display:flex}:host .slider{background:#2bbbad;height:.125em;position:absolute;left:0;top:calc(100% - .1em);transition:left .3s ease-out}\n"] }]
|
|
183
|
+
}] });
|
|
184
|
+
|
|
185
|
+
var SideMenuItemType;
|
|
186
|
+
(function (SideMenuItemType) {
|
|
187
|
+
SideMenuItemType["Item"] = "item";
|
|
188
|
+
SideMenuItemType["Title"] = "title";
|
|
189
|
+
})(SideMenuItemType || (SideMenuItemType = {}));
|
|
190
|
+
|
|
191
|
+
class SideMenuHeaderComponent {
|
|
192
|
+
constructor() {
|
|
193
|
+
this.DEFAULT_MENU_HEADER_TEXT = 'Menu';
|
|
194
|
+
this.label = CommonConstants.EMPTY_STRING;
|
|
195
|
+
this.open = false;
|
|
196
|
+
this.toggle = new EventEmitter();
|
|
197
|
+
}
|
|
198
|
+
ngOnInit() {
|
|
199
|
+
this.label = this.label || this.DEFAULT_MENU_HEADER_TEXT;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
SideMenuHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
203
|
+
SideMenuHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SideMenuHeaderComponent, selector: "sfc-side-menu-header", inputs: { label: "label", open: "open" }, outputs: { toggle: "toggle" }, host: { properties: { "class.open": "this.open" } }, ngImport: i0, template: "<li>\r\n <span>{{label}}</span>\r\n <sfc-hamburger [open]=\"open\" (click)=\"toggle.emit()\"></sfc-hamburger>\r\n</li>", styles: [":host li{display:flex;align-items:center;justify-content:center;padding:1.25em}:host li span{display:none;text-transform:uppercase;font-weight:700;font-size:.8em;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host li span{color:#545e61}:host-context(.sfc-dark-theme) :host li span{color:#ccd1d9}:host.open li{justify-content:space-between}:host.open li span{display:block}\n"], components: [{ type: i1.HamburgerComponent, selector: "sfc-hamburger", inputs: ["open"] }] });
|
|
204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuHeaderComponent, decorators: [{
|
|
205
|
+
type: Component,
|
|
206
|
+
args: [{ selector: 'sfc-side-menu-header', template: "<li>\r\n <span>{{label}}</span>\r\n <sfc-hamburger [open]=\"open\" (click)=\"toggle.emit()\"></sfc-hamburger>\r\n</li>", styles: [":host li{display:flex;align-items:center;justify-content:center;padding:1.25em}:host li span{display:none;text-transform:uppercase;font-weight:700;font-size:.8em;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host li span{color:#545e61}:host-context(.sfc-dark-theme) :host li span{color:#ccd1d9}:host.open li{justify-content:space-between}:host.open li span{display:block}\n"] }]
|
|
207
|
+
}], propDecorators: { label: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}], open: [{
|
|
210
|
+
type: Input
|
|
211
|
+
}, {
|
|
212
|
+
type: HostBinding,
|
|
213
|
+
args: ['class.' + UIClass.Open]
|
|
214
|
+
}], toggle: [{
|
|
215
|
+
type: Output
|
|
216
|
+
}] } });
|
|
217
|
+
|
|
218
|
+
class SideMenuItemContentComponent {
|
|
219
|
+
constructor() {
|
|
220
|
+
this.ANGLE_UP_ICON = 'fa fa-angle-up';
|
|
221
|
+
this.ANGLE_DOWM_ICON = 'fa fa-angle-down';
|
|
222
|
+
this.item = {
|
|
223
|
+
icon: CommonConstants.EMPTY_STRING,
|
|
224
|
+
label: CommonConstants.EMPTY_STRING,
|
|
225
|
+
type: SideMenuItemType.Item,
|
|
226
|
+
active: false
|
|
227
|
+
};
|
|
228
|
+
this.active = false;
|
|
229
|
+
this.open = false;
|
|
230
|
+
this.openParent = false;
|
|
231
|
+
this.hasChildren = false;
|
|
232
|
+
this.selectItem = new EventEmitter();
|
|
233
|
+
}
|
|
234
|
+
onClick() {
|
|
235
|
+
this.selectItem.emit(this.item);
|
|
236
|
+
}
|
|
237
|
+
get expandIcon() {
|
|
238
|
+
return this.openParent ? this.ANGLE_UP_ICON : this.ANGLE_DOWM_ICON;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
SideMenuItemContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuItemContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
242
|
+
SideMenuItemContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SideMenuItemContentComponent, selector: "sfc-side-menu-item-content", inputs: { item: "item", active: "active", open: "open", openParent: "openParent", hasChildren: "hasChildren" }, outputs: { selectItem: "selectItem" }, host: { listeners: { "click": "onClick()" }, properties: { "class.active": "this.active", "class.open": "this.open" } }, ngImport: i0, template: "<li>\r\n <div class=\"item-container\">\r\n <div class=\"item\">\r\n <a><i class=\"{{item.icon}}\"></i></a>\r\n </div>\r\n <span class=\"label\">{{item.label}}</span>\r\n </div>\r\n\r\n <div *ngIf=\"hasChildren\" class=\"expand-container\">\r\n <i class=\"{{expandIcon}}\"></i>\r\n </div>\r\n</li>", styles: [":host li{display:inline-flex;align-items:center;padding:0 1.25em 0 1.5em;cursor:pointer;width:calc(100% - 2.75em);justify-content:space-between}:host-context(.sfc-default-theme) :host li{color:#545e61}:host-context(.sfc-dark-theme) :host li{color:#ccd1d9}:host li .expand-container{visibility:hidden;opacity:0;width:0}:host li .expand-container>i{font-weight:700}:host li .item-container{display:inline-flex;align-items:center}:host li .item-container .item{width:2em;height:1.9em;display:flex;justify-content:center;border-radius:.7em;align-items:center}:host li .item-container .item a{border-radius:.45em;display:flex;align-items:center;justify-content:center;transition:.3s ease-in-out;font-size:1.3em;padding:.3em}:host li .item-container .item a>i{font-size:1em}:host li .item-container .label{font-weight:700;font-size:.9em;visibility:hidden;opacity:0;transition:color .3s,visibility .3s,opacity .5s ease-in-out;-webkit-user-select:none;user-select:none;width:0}:host.active li,:host:hover li{color:#fff}:host.active li .item-container .item a,:host:hover li .item-container .item a{background-color:#2bbbad;box-shadow:0 .3em 1em #2bbbad1a}:host.active li .item-container .label,:host:hover li .item-container .label{color:#2bbbad}:host.active li .expand-container,:host:hover li .expand-container{color:#2bbbad}:host.open li .item-container .item a{margin-right:1em}:host.open li .item-container .label{visibility:visible;opacity:1;width:auto}:host.open li .expand-container{width:auto;visibility:visible;opacity:1}:host :host-context(.children) li{margin:.2em 0}:host :host-context(.children) li .item-container .item a{padding:.3em;border-radius:.35em}:host :host-context(.children) li .item-container .item a>i{font-size:.5em}:host :host-context(.children) li .item-container .label{font-size:.8em}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuItemContentComponent, decorators: [{
|
|
244
|
+
type: Component,
|
|
245
|
+
args: [{ selector: 'sfc-side-menu-item-content', template: "<li>\r\n <div class=\"item-container\">\r\n <div class=\"item\">\r\n <a><i class=\"{{item.icon}}\"></i></a>\r\n </div>\r\n <span class=\"label\">{{item.label}}</span>\r\n </div>\r\n\r\n <div *ngIf=\"hasChildren\" class=\"expand-container\">\r\n <i class=\"{{expandIcon}}\"></i>\r\n </div>\r\n</li>", styles: [":host li{display:inline-flex;align-items:center;padding:0 1.25em 0 1.5em;cursor:pointer;width:calc(100% - 2.75em);justify-content:space-between}:host-context(.sfc-default-theme) :host li{color:#545e61}:host-context(.sfc-dark-theme) :host li{color:#ccd1d9}:host li .expand-container{visibility:hidden;opacity:0;width:0}:host li .expand-container>i{font-weight:700}:host li .item-container{display:inline-flex;align-items:center}:host li .item-container .item{width:2em;height:1.9em;display:flex;justify-content:center;border-radius:.7em;align-items:center}:host li .item-container .item a{border-radius:.45em;display:flex;align-items:center;justify-content:center;transition:.3s ease-in-out;font-size:1.3em;padding:.3em}:host li .item-container .item a>i{font-size:1em}:host li .item-container .label{font-weight:700;font-size:.9em;visibility:hidden;opacity:0;transition:color .3s,visibility .3s,opacity .5s ease-in-out;-webkit-user-select:none;user-select:none;width:0}:host.active li,:host:hover li{color:#fff}:host.active li .item-container .item a,:host:hover li .item-container .item a{background-color:#2bbbad;box-shadow:0 .3em 1em #2bbbad1a}:host.active li .item-container .label,:host:hover li .item-container .label{color:#2bbbad}:host.active li .expand-container,:host:hover li .expand-container{color:#2bbbad}:host.open li .item-container .item a{margin-right:1em}:host.open li .item-container .label{visibility:visible;opacity:1;width:auto}:host.open li .expand-container{width:auto;visibility:visible;opacity:1}:host :host-context(.children) li{margin:.2em 0}:host :host-context(.children) li .item-container .item a{padding:.3em;border-radius:.35em}:host :host-context(.children) li .item-container .item a>i{font-size:.5em}:host :host-context(.children) li .item-container .label{font-size:.8em}\n"] }]
|
|
246
|
+
}], propDecorators: { item: [{
|
|
247
|
+
type: Input
|
|
248
|
+
}], active: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}, {
|
|
251
|
+
type: HostBinding,
|
|
252
|
+
args: ['class.' + UIClass.Active]
|
|
253
|
+
}], open: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}, {
|
|
256
|
+
type: HostBinding,
|
|
257
|
+
args: ['class.' + UIClass.Open]
|
|
258
|
+
}], openParent: [{
|
|
259
|
+
type: Input
|
|
260
|
+
}], hasChildren: [{
|
|
261
|
+
type: Input
|
|
262
|
+
}], selectItem: [{
|
|
263
|
+
type: Output
|
|
264
|
+
}], onClick: [{
|
|
265
|
+
type: HostListener,
|
|
266
|
+
args: ['click']
|
|
267
|
+
}] } });
|
|
268
|
+
|
|
269
|
+
class SideMenuItemComponent {
|
|
270
|
+
constructor() {
|
|
271
|
+
this.item = {
|
|
272
|
+
icon: CommonConstants.EMPTY_STRING,
|
|
273
|
+
label: CommonConstants.EMPTY_STRING,
|
|
274
|
+
type: SideMenuItemType.Item,
|
|
275
|
+
items: [],
|
|
276
|
+
active: false
|
|
277
|
+
};
|
|
278
|
+
this.open = false;
|
|
279
|
+
this.selectItem = new EventEmitter();
|
|
280
|
+
this.openParent = false;
|
|
281
|
+
}
|
|
282
|
+
get hasActiveChild() {
|
|
283
|
+
return isDefined(firstOrDefault(this.item.items, (item) => item.active));
|
|
284
|
+
}
|
|
285
|
+
hasChildren(item) {
|
|
286
|
+
return any(item.items);
|
|
287
|
+
}
|
|
288
|
+
isActive(item) {
|
|
289
|
+
return this.hasChildren(item)
|
|
290
|
+
? this.hasActiveChild && !this.openParent
|
|
291
|
+
: item.active;
|
|
292
|
+
}
|
|
293
|
+
ngOnInit() {
|
|
294
|
+
this.openParent = this.hasActiveChild;
|
|
295
|
+
}
|
|
296
|
+
onParentClick(item) {
|
|
297
|
+
this.openParent = !this.openParent;
|
|
298
|
+
this.selectItem.emit(item);
|
|
299
|
+
}
|
|
300
|
+
onChildClick(item, child) {
|
|
301
|
+
var _a;
|
|
302
|
+
(_a = item.items) === null || _a === void 0 ? void 0 : _a.forEach((item) => item.active = false);
|
|
303
|
+
this.selectItem.emit(child);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
SideMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
307
|
+
SideMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SideMenuItemComponent, selector: "sfc-side-menu-item", inputs: { item: "item", open: "open" }, outputs: { selectItem: "selectItem" }, host: { properties: { "class.open": "this.open" } }, ngImport: i0, template: "<div class=\"container\">\r\n <sfc-side-menu-item-content [item]=\"item\" [active]=\"isActive(item)\" [open]=\"open\" [openParent]=\"openParent\"\r\n [hasChildren]=\"hasChildren(item)\" (selectItem)=\"onParentClick(item)\">\r\n </sfc-side-menu-item-content>\r\n\r\n <div class=\"children\" *ngIf=\"hasChildren(item) && openParent\" [@enterAnimation]>\r\n\r\n <sfc-side-menu-item-content *ngFor=\"let child of item.items\" [item]=\"child\" [open]=\"open\"\r\n [active]=\"isActive(child)\" [openParent]=\"true\" (selectItem)=\"onChildClick(item, child)\">\r\n </sfc-side-menu-item-content>\r\n\r\n </div>\r\n</div>", styles: [":host .container{margin-bottom:1em}:host .container .children{margin:1em 0}\n"], components: [{ type: SideMenuItemContentComponent, selector: "sfc-side-menu-item-content", inputs: ["item", "active", "open", "openParent", "hasChildren"], outputs: ["selectItem"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
|
|
308
|
+
trigger('enterAnimation', [
|
|
309
|
+
transition(':enter', [
|
|
310
|
+
style({ transform: 'translateX(-20%)', opacity: 0 }),
|
|
311
|
+
animate('300ms', style({ transform: 'translateX(0%)', opacity: 1 }))
|
|
312
|
+
]),
|
|
313
|
+
transition(':leave', [
|
|
314
|
+
style({ transform: 'translateX(0%)', opacity: 1 }),
|
|
315
|
+
animate('300ms', style({ transform: 'translateX(-20%)', opacity: 0 }))
|
|
316
|
+
])
|
|
317
|
+
])
|
|
318
|
+
] });
|
|
319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuItemComponent, decorators: [{
|
|
320
|
+
type: Component,
|
|
321
|
+
args: [{ selector: 'sfc-side-menu-item', animations: [
|
|
322
|
+
trigger('enterAnimation', [
|
|
323
|
+
transition(':enter', [
|
|
324
|
+
style({ transform: 'translateX(-20%)', opacity: 0 }),
|
|
325
|
+
animate('300ms', style({ transform: 'translateX(0%)', opacity: 1 }))
|
|
326
|
+
]),
|
|
327
|
+
transition(':leave', [
|
|
328
|
+
style({ transform: 'translateX(0%)', opacity: 1 }),
|
|
329
|
+
animate('300ms', style({ transform: 'translateX(-20%)', opacity: 0 }))
|
|
330
|
+
])
|
|
331
|
+
])
|
|
332
|
+
], template: "<div class=\"container\">\r\n <sfc-side-menu-item-content [item]=\"item\" [active]=\"isActive(item)\" [open]=\"open\" [openParent]=\"openParent\"\r\n [hasChildren]=\"hasChildren(item)\" (selectItem)=\"onParentClick(item)\">\r\n </sfc-side-menu-item-content>\r\n\r\n <div class=\"children\" *ngIf=\"hasChildren(item) && openParent\" [@enterAnimation]>\r\n\r\n <sfc-side-menu-item-content *ngFor=\"let child of item.items\" [item]=\"child\" [open]=\"open\"\r\n [active]=\"isActive(child)\" [openParent]=\"true\" (selectItem)=\"onChildClick(item, child)\">\r\n </sfc-side-menu-item-content>\r\n\r\n </div>\r\n</div>", styles: [":host .container{margin-bottom:1em}:host .container .children{margin:1em 0}\n"] }]
|
|
333
|
+
}], propDecorators: { item: [{
|
|
334
|
+
type: Input
|
|
335
|
+
}], open: [{
|
|
336
|
+
type: Input
|
|
337
|
+
}, {
|
|
338
|
+
type: HostBinding,
|
|
339
|
+
args: ['class.' + UIClass.Open]
|
|
340
|
+
}], selectItem: [{
|
|
341
|
+
type: Output
|
|
342
|
+
}] } });
|
|
343
|
+
|
|
344
|
+
class SideMenuTitleComponent {
|
|
345
|
+
constructor() {
|
|
346
|
+
this.label = CommonConstants.EMPTY_STRING;
|
|
347
|
+
this.open = false;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
SideMenuTitleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuTitleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
351
|
+
SideMenuTitleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SideMenuTitleComponent, selector: "sfc-side-menu-title", inputs: { label: "label", open: "open" }, host: { properties: { "class.open": "this.open" } }, ngImport: i0, template: "<sfc-delimeter></sfc-delimeter>\r\n<li><span>{{label}}</span></li>", styles: [":host li{text-transform:uppercase;font-weight:700;font-size:.65em;padding:1.25em 0;transform:translate(7%);display:inline-block;transition:transform .5s ease-in-out}:host-context(.sfc-default-theme) :host li{color:#545e61}:host-context(.sfc-dark-theme) :host li{color:#ccd1d9}:host.open li{transform:translate(30%)}\n"], components: [{ type: i1.DelimeterComponent, selector: "sfc-delimeter" }] });
|
|
352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuTitleComponent, decorators: [{
|
|
353
|
+
type: Component,
|
|
354
|
+
args: [{ selector: 'sfc-side-menu-title', template: "<sfc-delimeter></sfc-delimeter>\r\n<li><span>{{label}}</span></li>", styles: [":host li{text-transform:uppercase;font-weight:700;font-size:.65em;padding:1.25em 0;transform:translate(7%);display:inline-block;transition:transform .5s ease-in-out}:host-context(.sfc-default-theme) :host li{color:#545e61}:host-context(.sfc-dark-theme) :host li{color:#ccd1d9}:host.open li{transform:translate(30%)}\n"] }]
|
|
355
|
+
}], propDecorators: { label: [{
|
|
356
|
+
type: Input
|
|
357
|
+
}], open: [{
|
|
358
|
+
type: Input
|
|
359
|
+
}, {
|
|
360
|
+
type: HostBinding,
|
|
361
|
+
args: ['class.' + UIClass.Open]
|
|
362
|
+
}] } });
|
|
363
|
+
|
|
364
|
+
class SideMenuComponent {
|
|
365
|
+
constructor() {
|
|
366
|
+
this.SideMenuItemType = SideMenuItemType;
|
|
367
|
+
this.model = { open: false, items: [] };
|
|
368
|
+
this.selected = new EventEmitter();
|
|
369
|
+
}
|
|
370
|
+
get open() {
|
|
371
|
+
return this.model.open;
|
|
372
|
+
}
|
|
373
|
+
set open(value) {
|
|
374
|
+
this.model.open = value;
|
|
375
|
+
}
|
|
376
|
+
onItemSelect(item) {
|
|
377
|
+
// handle only items without childrens
|
|
378
|
+
if (!any(item.items)) {
|
|
379
|
+
this.model.items.forEach((item) => {
|
|
380
|
+
var _a;
|
|
381
|
+
item.active = false;
|
|
382
|
+
if (any(item.items))
|
|
383
|
+
(_a = item.items) === null || _a === void 0 ? void 0 : _a.forEach((item) => item.active = false);
|
|
384
|
+
});
|
|
385
|
+
item.active = true;
|
|
386
|
+
}
|
|
387
|
+
this.selected.emit(item);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
SideMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
391
|
+
SideMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SideMenuComponent, selector: "sfc-side-menu", inputs: { model: "model" }, outputs: { selected: "selected" }, host: { properties: { "class.open": "this.open" } }, ngImport: i0, template: "<div class=\"container\">\r\n <ul>\r\n <sfc-side-menu-header [open]=\"open\" (toggle)=\"open =!open\"></sfc-side-menu-header>\r\n\r\n <ng-container *ngFor=\"let item of model.items\" [ngSwitch]=\"item.type\">\r\n <sfc-side-menu-item *ngSwitchCase=\"SideMenuItemType.Item\" [item]=\"item\" [open]=\"open\"\r\n (selectItem)=\"onItemSelect($event)\">\r\n </sfc-side-menu-item>\r\n\r\n <sfc-side-menu-title *ngSwitchCase=\"SideMenuItemType.Title\" [label]=\"item.label\" [open]=\"open\">\r\n </sfc-side-menu-title>\r\n </ng-container>\r\n </ul>\r\n</div>", styles: [":host .container{width:5em;overflow:hidden;transition:width .5s ease-in-out}:host-context(.sfc-default-theme) :host .container{background:#f5f7fa}:host-context(.sfc-dark-theme) :host .container{background:#1b1d1f}:host .container ul{margin:0;padding:0;list-style:none;overflow:hidden;display:flex;flex-direction:column}:host.open .container{width:11.25em}\n"], components: [{ type: SideMenuHeaderComponent, selector: "sfc-side-menu-header", inputs: ["label", "open"], outputs: ["toggle"] }, { type: SideMenuItemComponent, selector: "sfc-side-menu-item", inputs: ["item", "open"], outputs: ["selectItem"] }, { type: SideMenuTitleComponent, selector: "sfc-side-menu-title", inputs: ["label", "open"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }] });
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SideMenuComponent, decorators: [{
|
|
393
|
+
type: Component,
|
|
394
|
+
args: [{ selector: 'sfc-side-menu', template: "<div class=\"container\">\r\n <ul>\r\n <sfc-side-menu-header [open]=\"open\" (toggle)=\"open =!open\"></sfc-side-menu-header>\r\n\r\n <ng-container *ngFor=\"let item of model.items\" [ngSwitch]=\"item.type\">\r\n <sfc-side-menu-item *ngSwitchCase=\"SideMenuItemType.Item\" [item]=\"item\" [open]=\"open\"\r\n (selectItem)=\"onItemSelect($event)\">\r\n </sfc-side-menu-item>\r\n\r\n <sfc-side-menu-title *ngSwitchCase=\"SideMenuItemType.Title\" [label]=\"item.label\" [open]=\"open\">\r\n </sfc-side-menu-title>\r\n </ng-container>\r\n </ul>\r\n</div>", styles: [":host .container{width:5em;overflow:hidden;transition:width .5s ease-in-out}:host-context(.sfc-default-theme) :host .container{background:#f5f7fa}:host-context(.sfc-dark-theme) :host .container{background:#1b1d1f}:host .container ul{margin:0;padding:0;list-style:none;overflow:hidden;display:flex;flex-direction:column}:host.open .container{width:11.25em}\n"] }]
|
|
395
|
+
}], propDecorators: { model: [{
|
|
396
|
+
type: Input
|
|
397
|
+
}], selected: [{
|
|
398
|
+
type: Output
|
|
399
|
+
}], open: [{
|
|
400
|
+
type: HostBinding,
|
|
401
|
+
args: ['class.' + UIClass.Open]
|
|
402
|
+
}] } });
|
|
403
|
+
|
|
404
|
+
class DropdownMenuItemComponent {
|
|
405
|
+
constructor() {
|
|
406
|
+
this.item = { label: CommonConstants.EMPTY_STRING };
|
|
407
|
+
}
|
|
408
|
+
click() {
|
|
409
|
+
if (this.item.click)
|
|
410
|
+
this.item.click(this.item);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
DropdownMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DropdownMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
414
|
+
DropdownMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DropdownMenuItemComponent, selector: "sfc-dropdown-menu-item", inputs: { item: "item" }, host: { listeners: { "click": "click()" } }, ngImport: i0, template: "<li>\r\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\"></i>\r\n <a>{{item.label}}</a>\r\n</li>\r\n\r\n<sfc-delimeter *ngIf=\"item.delimeter\"></sfc-delimeter>", styles: [":host{display:flex;flex-direction:column}:host li{color:#545e61;display:flex;align-items:center;flex-wrap:wrap;padding:.4em;border:.0063em solid transparent;border-radius:.31em;font-weight:700;font-size:.8em;-webkit-user-select:none;user-select:none}:host li:hover,:host li:focus-within{background:#f5f7fa;border-color:#f5f7fa;color:#2bbbad;cursor:pointer;outline:none}:host li i{padding-right:.625em;width:10%}:host-context(.sfc-default-theme) :host ::ng-deep sfc-delimeter{background:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 17%,rgba(0,0,0,.3) 83%,rgba(0,0,0,0) 100%)}:host-context(.sfc-dark-theme) :host ::ng-deep sfc-delimeter{background:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 17%,rgba(0,0,0,.3) 83%,rgba(0,0,0,0) 100%)}\n"], components: [{ type: i1.DelimeterComponent, selector: "sfc-delimeter" }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
415
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DropdownMenuItemComponent, decorators: [{
|
|
416
|
+
type: Component,
|
|
417
|
+
args: [{ selector: 'sfc-dropdown-menu-item', template: "<li>\r\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\"></i>\r\n <a>{{item.label}}</a>\r\n</li>\r\n\r\n<sfc-delimeter *ngIf=\"item.delimeter\"></sfc-delimeter>", styles: [":host{display:flex;flex-direction:column}:host li{color:#545e61;display:flex;align-items:center;flex-wrap:wrap;padding:.4em;border:.0063em solid transparent;border-radius:.31em;font-weight:700;font-size:.8em;-webkit-user-select:none;user-select:none}:host li:hover,:host li:focus-within{background:#f5f7fa;border-color:#f5f7fa;color:#2bbbad;cursor:pointer;outline:none}:host li i{padding-right:.625em;width:10%}:host-context(.sfc-default-theme) :host ::ng-deep sfc-delimeter{background:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 17%,rgba(0,0,0,.3) 83%,rgba(0,0,0,0) 100%)}:host-context(.sfc-dark-theme) :host ::ng-deep sfc-delimeter{background:linear-gradient(to right,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 17%,rgba(0,0,0,.3) 83%,rgba(0,0,0,0) 100%)}\n"] }]
|
|
418
|
+
}], propDecorators: { item: [{
|
|
419
|
+
type: Input
|
|
420
|
+
}], click: [{
|
|
421
|
+
type: HostListener,
|
|
422
|
+
args: ['click']
|
|
423
|
+
}] } });
|
|
424
|
+
|
|
425
|
+
class DropdownMenuComponent {
|
|
426
|
+
constructor(resizeService, window) {
|
|
427
|
+
this.resizeService = resizeService;
|
|
428
|
+
this.window = window;
|
|
429
|
+
this.items = [];
|
|
430
|
+
this.hideOnClick = true;
|
|
431
|
+
this.hideOnClickOutside = true;
|
|
432
|
+
this.bordered = false;
|
|
433
|
+
this.position = [Position.Left];
|
|
434
|
+
this.open = false;
|
|
435
|
+
this.selected = new EventEmitter();
|
|
436
|
+
// preserved position
|
|
437
|
+
this._position = [Position.Left];
|
|
438
|
+
}
|
|
439
|
+
get showDots() {
|
|
440
|
+
return isNullOrEmptyString(this.label) && isNullOrEmptyString(this.icon);
|
|
441
|
+
}
|
|
442
|
+
ngOnInit() {
|
|
443
|
+
this._position = this.position;
|
|
444
|
+
}
|
|
445
|
+
ngAfterContentInit() {
|
|
446
|
+
this._resizeSubscription = this.resizeService.onResize$
|
|
447
|
+
.pipe(startWith(this.window))
|
|
448
|
+
.subscribe(window => {
|
|
449
|
+
this.position = window.innerWidth <= MediaLimits.Tablet
|
|
450
|
+
? [Position.Left, Position.Top] : this._position;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
ngOnDestroy() {
|
|
454
|
+
var _a;
|
|
455
|
+
(_a = this._resizeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
456
|
+
}
|
|
457
|
+
onClick(item) {
|
|
458
|
+
if (this.hideOnClick)
|
|
459
|
+
this.open = false;
|
|
460
|
+
this.selected.emit(item);
|
|
461
|
+
}
|
|
462
|
+
onClickOutside(event) {
|
|
463
|
+
if (event.value && this.open) {
|
|
464
|
+
this.open = false;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
DropdownMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DropdownMenuComponent, deps: [{ token: i1.ResizeService }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Component });
|
|
469
|
+
DropdownMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DropdownMenuComponent, selector: "sfc-dropdown-menu", inputs: { items: "items", icon: "icon", label: "label", hideOnClick: "hideOnClick", hideOnClickOutside: "hideOnClickOutside", bordered: "bordered", position: "position", open: "open" }, outputs: { selected: "selected" }, host: { properties: { "class.bordered": "this.bordered", "class": "this.position", "class.open": "this.open" } }, ngImport: i0, template: "<ul [sfcClickOutside]=\"hideOnClickOutside\" (action)=\"onClickOutside($event)\">\r\n <li>\r\n <div class=\"container\" (click)=\"open = !open\">\r\n <span *ngIf=\"label\">{{label}}</span>\r\n <i *ngIf=\"icon\" class=\"{{icon}}\"></i>\r\n <sfc-dots *ngIf=\"showDots\" [open]=\"open\"></sfc-dots>\r\n </div>\r\n\r\n <ul *ngIf=\"items.length\" class=\"dropdown-container\">\r\n <sfc-dropdown-menu-item *ngFor=\"let item of items\" [item]=\"item\" (click)=\"onClick(item)\">\r\n </sfc-dropdown-menu-item>\r\n </ul>\r\n </li>\r\n</ul>", styles: [":host{display:inline-flex}:host ul{list-style:none;margin:0;padding-left:0}:host ul li{position:relative}:host ul li .container{display:flex;justify-content:center;flex-wrap:wrap;cursor:pointer;transition:all .3s ease;padding:.3em}:host-context(.sfc-default-theme) :host ul li .container{color:#545e61}:host-context(.sfc-dark-theme) :host ul li .container{color:#ccd1d9}:host ul li .container span,:host ul li .container i{font-size:.8em;font-weight:700}:host ul li .container span~i{margin-left:.3em}:host ul li .container:hover{color:#2bbbad}:host ul li .dropdown-container{flex-direction:column;width:max-content;background:#fff;visibility:hidden;opacity:0;position:absolute;right:0;transition:all .5s ease;margin-top:1em;display:none;padding:.6em;border:.0063em solid #f5f7fa;border-radius:.1875em;box-shadow:0 .125em .625em;z-index:9999}:host-context(.sfc-default-theme) :host ul li .dropdown-container{color:#e6e9ed}:host-context(.sfc-dark-theme) :host ul li .dropdown-container{color:#656d78}:host.open ul li .dropdown-container{visibility:visible;opacity:1;display:flex}:host.bordered ul li .container{border:.15em solid;border-radius:.3em}:host-context(.sfc-default-theme) :host.bordered ul li .container{border-color:#545e61}:host-context(.sfc-dark-theme) :host.bordered ul li .container{border-color:#ccd1d9}:host.bordered ul li .container:hover{border-color:#2bbbad}:host.bordered ul li .container:hover ::ng-deep sfc-dots .dot{background:#2bbbad}:host.top ul li .dropdown-container{bottom:0;margin-bottom:2.18em;margin-top:0}:host.center ul li .dropdown-container{left:50%;transform:translate(-50%)}:host.left ul li .dropdown-container{right:0}:host.right ul li .dropdown-container{left:0}\n"], components: [{ type: i1.DotsComponent, selector: "sfc-dots", inputs: ["open", "direction"] }, { type: DropdownMenuItemComponent, selector: "sfc-dropdown-menu-item", inputs: ["item"] }], directives: [{ type: i1.ClickOutsideDirective, selector: "[sfcClickOutside]", inputs: ["sfcClickOutside"], outputs: ["action"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DropdownMenuComponent, decorators: [{
|
|
471
|
+
type: Component,
|
|
472
|
+
args: [{ selector: 'sfc-dropdown-menu', template: "<ul [sfcClickOutside]=\"hideOnClickOutside\" (action)=\"onClickOutside($event)\">\r\n <li>\r\n <div class=\"container\" (click)=\"open = !open\">\r\n <span *ngIf=\"label\">{{label}}</span>\r\n <i *ngIf=\"icon\" class=\"{{icon}}\"></i>\r\n <sfc-dots *ngIf=\"showDots\" [open]=\"open\"></sfc-dots>\r\n </div>\r\n\r\n <ul *ngIf=\"items.length\" class=\"dropdown-container\">\r\n <sfc-dropdown-menu-item *ngFor=\"let item of items\" [item]=\"item\" (click)=\"onClick(item)\">\r\n </sfc-dropdown-menu-item>\r\n </ul>\r\n </li>\r\n</ul>", styles: [":host{display:inline-flex}:host ul{list-style:none;margin:0;padding-left:0}:host ul li{position:relative}:host ul li .container{display:flex;justify-content:center;flex-wrap:wrap;cursor:pointer;transition:all .3s ease;padding:.3em}:host-context(.sfc-default-theme) :host ul li .container{color:#545e61}:host-context(.sfc-dark-theme) :host ul li .container{color:#ccd1d9}:host ul li .container span,:host ul li .container i{font-size:.8em;font-weight:700}:host ul li .container span~i{margin-left:.3em}:host ul li .container:hover{color:#2bbbad}:host ul li .dropdown-container{flex-direction:column;width:max-content;background:#fff;visibility:hidden;opacity:0;position:absolute;right:0;transition:all .5s ease;margin-top:1em;display:none;padding:.6em;border:.0063em solid #f5f7fa;border-radius:.1875em;box-shadow:0 .125em .625em;z-index:9999}:host-context(.sfc-default-theme) :host ul li .dropdown-container{color:#e6e9ed}:host-context(.sfc-dark-theme) :host ul li .dropdown-container{color:#656d78}:host.open ul li .dropdown-container{visibility:visible;opacity:1;display:flex}:host.bordered ul li .container{border:.15em solid;border-radius:.3em}:host-context(.sfc-default-theme) :host.bordered ul li .container{border-color:#545e61}:host-context(.sfc-dark-theme) :host.bordered ul li .container{border-color:#ccd1d9}:host.bordered ul li .container:hover{border-color:#2bbbad}:host.bordered ul li .container:hover ::ng-deep sfc-dots .dot{background:#2bbbad}:host.top ul li .dropdown-container{bottom:0;margin-bottom:2.18em;margin-top:0}:host.center ul li .dropdown-container{left:50%;transform:translate(-50%)}:host.left ul li .dropdown-container{right:0}:host.right ul li .dropdown-container{left:0}\n"] }]
|
|
473
|
+
}], ctorParameters: function () {
|
|
474
|
+
return [{ type: i1.ResizeService }, { type: Window, decorators: [{
|
|
475
|
+
type: Inject,
|
|
476
|
+
args: [WINDOW]
|
|
477
|
+
}] }];
|
|
478
|
+
}, propDecorators: { items: [{
|
|
479
|
+
type: Input
|
|
480
|
+
}], icon: [{
|
|
481
|
+
type: Input
|
|
482
|
+
}], label: [{
|
|
483
|
+
type: Input
|
|
484
|
+
}], hideOnClick: [{
|
|
485
|
+
type: Input
|
|
486
|
+
}], hideOnClickOutside: [{
|
|
487
|
+
type: Input
|
|
488
|
+
}], bordered: [{
|
|
489
|
+
type: Input
|
|
490
|
+
}, {
|
|
491
|
+
type: HostBinding,
|
|
492
|
+
args: ['class.' + UIClass.Bordered]
|
|
493
|
+
}], position: [{
|
|
494
|
+
type: Input
|
|
495
|
+
}, {
|
|
496
|
+
type: HostBinding,
|
|
497
|
+
args: ['class']
|
|
498
|
+
}], open: [{
|
|
499
|
+
type: Input
|
|
500
|
+
}, {
|
|
501
|
+
type: HostBinding,
|
|
502
|
+
args: ['class.' + UIClass.Open]
|
|
503
|
+
}], selected: [{
|
|
504
|
+
type: Output
|
|
505
|
+
}] } });
|
|
506
|
+
|
|
507
|
+
class NavigationMenuItemComponent {
|
|
508
|
+
constructor() {
|
|
509
|
+
this.item = { label: CommonConstants.EMPTY_STRING, active: false };
|
|
510
|
+
}
|
|
511
|
+
get active() {
|
|
512
|
+
return this.item.active;
|
|
513
|
+
}
|
|
514
|
+
click() {
|
|
515
|
+
if (this.item.click)
|
|
516
|
+
this.item.click(this.item);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
NavigationMenuItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NavigationMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
520
|
+
NavigationMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: NavigationMenuItemComponent, selector: "sfc-navigation-menu-item", inputs: { item: "item" }, host: { listeners: { "click": "click()" }, properties: { "class.active": "this.active" } }, ngImport: i0, template: "<div class=\"container\">\r\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\"></i>\r\n <span>{{item.label}}</span>\r\n</div>", styles: [":host{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;transition:color .2s ease-in-out}:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#ccd1d9}:host .container{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:1em .3em;margin:.625em;width:100%;border-radius:.625em;transition:background .2s ease-in-out}:host .container i{font-size:1.5em}:host .container span{font-size:1em;font-weight:700;margin-top:.625em;text-align:center}:host:hover,:host.active{color:#fff}:host:hover .container,:host.active .container{background:#2bbbad}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NavigationMenuItemComponent, decorators: [{
|
|
522
|
+
type: Component,
|
|
523
|
+
args: [{ selector: 'sfc-navigation-menu-item', template: "<div class=\"container\">\r\n <i *ngIf=\"item.icon\" class=\"{{item.icon}}\"></i>\r\n <span>{{item.label}}</span>\r\n</div>", styles: [":host{display:inline-flex;justify-content:center;align-items:center;cursor:pointer;transition:color .2s ease-in-out}:host-context(.sfc-default-theme) :host{color:#545e61}:host-context(.sfc-dark-theme) :host{color:#ccd1d9}:host .container{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:1em .3em;margin:.625em;width:100%;border-radius:.625em;transition:background .2s ease-in-out}:host .container i{font-size:1.5em}:host .container span{font-size:1em;font-weight:700;margin-top:.625em;text-align:center}:host:hover,:host.active{color:#fff}:host:hover .container,:host.active .container{background:#2bbbad}\n"] }]
|
|
524
|
+
}], propDecorators: { item: [{
|
|
525
|
+
type: Input
|
|
526
|
+
}], active: [{
|
|
527
|
+
type: HostBinding,
|
|
528
|
+
args: ['class.' + UIClass.Active]
|
|
529
|
+
}], click: [{
|
|
530
|
+
type: HostListener,
|
|
531
|
+
args: ['click']
|
|
532
|
+
}] } });
|
|
533
|
+
|
|
534
|
+
class NavigationMenuComponent {
|
|
535
|
+
constructor() {
|
|
536
|
+
this.items = [];
|
|
537
|
+
this.selected = new EventEmitter();
|
|
538
|
+
}
|
|
539
|
+
onClick(item) {
|
|
540
|
+
this.items.forEach((item) => item.active = false);
|
|
541
|
+
item.active = true;
|
|
542
|
+
this.selected.emit(item);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
NavigationMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NavigationMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
546
|
+
NavigationMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: NavigationMenuComponent, selector: "sfc-navigation-menu", inputs: { items: "items" }, outputs: { selected: "selected" }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"items\">\r\n <sfc-navigation-menu-item *ngFor=\"let item of items\" [item]=\"item\" (click)=\"onClick(item)\">\r\n </sfc-navigation-menu-item>\r\n </div>\r\n</div>", styles: [":host-context(.sfc-default-theme) :host .container{background:#f5f7fa}:host-context(.sfc-dark-theme) :host .container{background:#1b1d1f}:host .container .items{display:flex;flex-wrap:wrap;padding:.625em}:host .container .items sfc-navigation-menu-item{flex:50%}\n"], components: [{ type: NavigationMenuItemComponent, selector: "sfc-navigation-menu-item", inputs: ["item"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NavigationMenuComponent, decorators: [{
|
|
548
|
+
type: Component,
|
|
549
|
+
args: [{ selector: 'sfc-navigation-menu', template: "<div class=\"container\">\r\n <div class=\"items\">\r\n <sfc-navigation-menu-item *ngFor=\"let item of items\" [item]=\"item\" (click)=\"onClick(item)\">\r\n </sfc-navigation-menu-item>\r\n </div>\r\n</div>", styles: [":host-context(.sfc-default-theme) :host .container{background:#f5f7fa}:host-context(.sfc-dark-theme) :host .container{background:#1b1d1f}:host .container .items{display:flex;flex-wrap:wrap;padding:.625em}:host .container .items sfc-navigation-menu-item{flex:50%}\n"] }]
|
|
550
|
+
}], propDecorators: { items: [{
|
|
551
|
+
type: Input
|
|
552
|
+
}], selected: [{
|
|
553
|
+
type: Output
|
|
554
|
+
}] } });
|
|
555
|
+
|
|
556
|
+
var StarType;
|
|
557
|
+
(function (StarType) {
|
|
558
|
+
StarType["None"] = "none";
|
|
559
|
+
StarType["S25"] = "s25";
|
|
560
|
+
StarType["Half"] = "half";
|
|
561
|
+
StarType["S75"] = "s75";
|
|
562
|
+
StarType["Full"] = "full";
|
|
563
|
+
})(StarType || (StarType = {}));
|
|
564
|
+
|
|
565
|
+
class StarsComponent {
|
|
566
|
+
constructor() {
|
|
567
|
+
this.DEFAULT_COUNT = 5;
|
|
568
|
+
this.value = 0;
|
|
569
|
+
this.count = this.DEFAULT_COUNT;
|
|
570
|
+
}
|
|
571
|
+
get stars() {
|
|
572
|
+
return new Array(this.count);
|
|
573
|
+
}
|
|
574
|
+
getStarType(index) {
|
|
575
|
+
index += 1;
|
|
576
|
+
if ((index - this.value) >= 1) {
|
|
577
|
+
return StarType.None;
|
|
578
|
+
}
|
|
579
|
+
if (this.value >= index) {
|
|
580
|
+
return StarType.Full;
|
|
581
|
+
}
|
|
582
|
+
const part = this.value - Math.floor(this.value);
|
|
583
|
+
if (part < 0.25 || (part >= 0.25 && part < 0.5)) {
|
|
584
|
+
return StarType.S25;
|
|
585
|
+
}
|
|
586
|
+
if (part >= 0.5 && part < 0.75) {
|
|
587
|
+
return StarType.Half;
|
|
588
|
+
}
|
|
589
|
+
return StarType.S75;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
StarsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: StarsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
593
|
+
StarsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: StarsComponent, selector: "sfc-stars", inputs: { value: "value", count: "count" }, ngImport: i0, template: "<div class=\"container\">\r\n <button *ngFor=\"let star of stars; let i = index;\" [ngClass]=\"getStarType(i)\"></button>\r\n</div>", styles: [":host .container button{width:1.8em;height:1.8em;font-size:1em;background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat;cursor:pointer;border:0;outline:none;transition:transform .25s,background .25s ease}:host .container button:hover{transform:scale(1.1)}:host .container button.none{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.s25{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat,url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.half{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat,url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.s75{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat,url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.full{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}\n"], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
594
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: StarsComponent, decorators: [{
|
|
595
|
+
type: Component,
|
|
596
|
+
args: [{ selector: 'sfc-stars', template: "<div class=\"container\">\r\n <button *ngFor=\"let star of stars; let i = index;\" [ngClass]=\"getStarType(i)\"></button>\r\n</div>", styles: [":host .container button{width:1.8em;height:1.8em;font-size:1em;background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat;cursor:pointer;border:0;outline:none;transition:transform .25s,background .25s ease}:host .container button:hover{transform:scale(1.1)}:host .container button.none{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.s25{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M196.208 415.2v-224.8l-139.504 20.272 100.944 98.384-23.84 138.928z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat,url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.half{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M258.672 64l-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6v-318.4z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat,url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.s75{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M321.616 190.496l-0.656-0.096-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 63.024 33.136z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat,url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22%23ddd%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}:host .container button.full{background:url(\"data:image/svg+xml;utf8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20width%3D%22512%22%20height%3D%22512%22%20viewBox%3D%220%200%20512%20512%22%3E%3Cpath%20fill%3D%22gold%22%20d%3D%22M457.888 210.672l-139.504-20.272-62.384-126.4-62.384 126.4-139.504 20.272 100.944 98.384-23.84 138.928 124.768-65.6 124.768 65.6-23.84-138.928c0 0 100.944-98.384 100.944-98.384z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E\") center/cover no-repeat}\n"] }]
|
|
597
|
+
}], propDecorators: { value: [{
|
|
598
|
+
type: Input
|
|
599
|
+
}], count: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}] } });
|
|
602
|
+
|
|
603
|
+
class AvatarConstants {
|
|
604
|
+
}
|
|
605
|
+
AvatarConstants.DEFAULT_RADIUS = 80;
|
|
606
|
+
AvatarConstants.DEFAULT_STROKE = 2;
|
|
607
|
+
AvatarConstants.STARS_DEFAULT_COUNT = 5;
|
|
608
|
+
AvatarConstants.PROGRESS_DEFAULT_COLOR = '#CCD1D9';
|
|
609
|
+
AvatarConstants.PROGRESS_DEFAULT_FILLED_COLOR = '#2bbbad';
|
|
610
|
+
AvatarConstants.DATA_DEFAULT_IMAGE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABHNCSVQICAgIfAhkiA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59FWuURpgAKTEtLi9VoNO4BcJgQshvAQQB7CCHODRat2JhNeOjPA+iTZflsX1/febD5e0FhCmCDaGlpqTUaje0JpbAHQDMWFUPDBotWUCilgwAGAQxQSq8qinJeEITz3d3dsxstWznCFECR0djYaHI4HM2CIDRRSps4jqunlDYRQhoopQ0AGgghRZnElTDZJwEMARgFMEQpHUt8Huzt7R0Ce6MXFUwBlCBdXV1VAKri8Xgtx3G1CcdjIyHEpChKLQAsJUERQoSE4kglSZEkkl6SIISMJrzsy9sJIaNYHMTDiqIEKKWzHMeNKooy29fX58nrhTIYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYDAYDAaDwWAwGAwGg8FgMBgMBoPBYJQw/xfwNfNModoTCwAAAABJRU5ErkJggg==";
|
|
611
|
+
|
|
612
|
+
class AvatarImageModel {
|
|
613
|
+
constructor(radius, stroke, image) {
|
|
614
|
+
var _a;
|
|
615
|
+
this.radius = radius;
|
|
616
|
+
this.stroke = stroke;
|
|
617
|
+
this.image = image;
|
|
618
|
+
this.NormalizedRadius = this.radius - this.stroke * 2;
|
|
619
|
+
this.Circumference = Math.round(this.NormalizedRadius * 2 * Math.PI);
|
|
620
|
+
this.Height = this.Width = this.radius * 2;
|
|
621
|
+
this.ImageRadius = this.NormalizedRadius - (this.NormalizedRadius * 0.15);
|
|
622
|
+
this.ImageId = Math.random() + (((_a = this.image) === null || _a === void 0 ? void 0 : _a.split(/(\\|\/)/g).pop()) || CommonConstants.EMPTY_STRING);
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
var AvatarBadgePosition;
|
|
627
|
+
(function (AvatarBadgePosition) {
|
|
628
|
+
AvatarBadgePosition["Top"] = "top";
|
|
629
|
+
AvatarBadgePosition["RightTop"] = "right-top";
|
|
630
|
+
AvatarBadgePosition["Right"] = "right";
|
|
631
|
+
AvatarBadgePosition["RightBottom"] = "right-bottom";
|
|
632
|
+
AvatarBadgePosition["Bottom"] = "bottom";
|
|
633
|
+
AvatarBadgePosition["LeftTop"] = "left-top";
|
|
634
|
+
AvatarBadgePosition["Left"] = "left";
|
|
635
|
+
AvatarBadgePosition["LeftBottom"] = "left-bottom";
|
|
636
|
+
})(AvatarBadgePosition || (AvatarBadgePosition = {}));
|
|
637
|
+
|
|
638
|
+
class AvatarBadgeConstants {
|
|
639
|
+
}
|
|
640
|
+
AvatarBadgeConstants.SIZE_MULTIPLIER = 0.3;
|
|
641
|
+
AvatarBadgeConstants.TEXT_SIZE_MULTIPLIER = 0.15;
|
|
642
|
+
|
|
643
|
+
class AvatarBadgeComponent {
|
|
644
|
+
constructor() {
|
|
645
|
+
this.position = AvatarBadgePosition.Right;
|
|
646
|
+
this.radius = AvatarConstants.DEFAULT_RADIUS;
|
|
647
|
+
this.normalizedRadius = AvatarConstants.DEFAULT_RADIUS;
|
|
648
|
+
this.stroke = AvatarConstants.DEFAULT_STROKE;
|
|
649
|
+
}
|
|
650
|
+
get styles() {
|
|
651
|
+
const badgeSize = getCssLikeValue(this.sizePart);
|
|
652
|
+
return Object.assign({
|
|
653
|
+
height: badgeSize,
|
|
654
|
+
width: badgeSize,
|
|
655
|
+
background: this.background,
|
|
656
|
+
fontSize: getCssLikeValue(this.radius * AvatarBadgeConstants.TEXT_SIZE_MULTIPLIER)
|
|
657
|
+
}, this.positionStyle);
|
|
658
|
+
}
|
|
659
|
+
get positionStyle() {
|
|
660
|
+
const halfNormilizedSizePart = this.normalizedRadius * AvatarBadgeConstants.SIZE_MULTIPLIER / 2, halfNormilizedSizePartPx = getCssLikeValue(halfNormilizedSizePart), strokedHalfNormilizedSizePartPx = `-${getCssLikeValue(Math.abs(halfNormilizedSizePart - this.stroke))}`, strokePx = getCssLikeValue(this.stroke), positionPart = `calc(50${UIConstants.CSS_PERCENTAGE} - ${getCssLikeValue((this.sizePart / 2))}`, positionBottomPart = `calc(25${UIConstants.CSS_PERCENTAGE} - ${halfNormilizedSizePartPx}`, positionTopPart = `calc(75${UIConstants.CSS_PERCENTAGE} - ${halfNormilizedSizePartPx}`;
|
|
661
|
+
switch (this.position) {
|
|
662
|
+
case AvatarBadgePosition.Top:
|
|
663
|
+
return {
|
|
664
|
+
right: positionPart,
|
|
665
|
+
top: strokedHalfNormilizedSizePartPx
|
|
666
|
+
};
|
|
667
|
+
case AvatarBadgePosition.Right:
|
|
668
|
+
return {
|
|
669
|
+
right: strokedHalfNormilizedSizePartPx,
|
|
670
|
+
bottom: positionPart
|
|
671
|
+
};
|
|
672
|
+
case AvatarBadgePosition.RightTop:
|
|
673
|
+
return {
|
|
674
|
+
right: strokePx,
|
|
675
|
+
bottom: positionTopPart
|
|
676
|
+
};
|
|
677
|
+
case AvatarBadgePosition.RightBottom:
|
|
678
|
+
return {
|
|
679
|
+
right: strokePx,
|
|
680
|
+
bottom: positionBottomPart
|
|
681
|
+
};
|
|
682
|
+
case AvatarBadgePosition.Bottom:
|
|
683
|
+
return {
|
|
684
|
+
right: positionPart,
|
|
685
|
+
bottom: strokedHalfNormilizedSizePartPx,
|
|
686
|
+
};
|
|
687
|
+
case AvatarBadgePosition.Left:
|
|
688
|
+
return {
|
|
689
|
+
left: strokedHalfNormilizedSizePartPx,
|
|
690
|
+
bottom: positionPart
|
|
691
|
+
};
|
|
692
|
+
case AvatarBadgePosition.LeftTop:
|
|
693
|
+
return {
|
|
694
|
+
left: strokePx,
|
|
695
|
+
bottom: positionTopPart
|
|
696
|
+
};
|
|
697
|
+
case AvatarBadgePosition.LeftBottom:
|
|
698
|
+
return {
|
|
699
|
+
left: strokePx,
|
|
700
|
+
bottom: positionBottomPart
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
get sizePart() {
|
|
705
|
+
return this.radius * AvatarBadgeConstants.SIZE_MULTIPLIER;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
AvatarBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AvatarBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
709
|
+
AvatarBadgeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AvatarBadgeComponent, selector: "sfc-avatar-badge", inputs: { position: "position", background: "background" }, host: { properties: { "style": "this.styles" } }, ngImport: i0, template: "<span class=\"container\">\r\n <ng-content></ng-content>\r\n</span>", styles: [":host{display:flex;position:absolute;flex-wrap:wrap;align-items:center;justify-content:center;font-weight:700;box-shadow:0 0 0 2px #fff;-webkit-user-select:none;user-select:none;border-radius:50%;color:#fff}\n"] });
|
|
710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AvatarBadgeComponent, decorators: [{
|
|
711
|
+
type: Component,
|
|
712
|
+
args: [{ selector: 'sfc-avatar-badge', template: "<span class=\"container\">\r\n <ng-content></ng-content>\r\n</span>", styles: [":host{display:flex;position:absolute;flex-wrap:wrap;align-items:center;justify-content:center;font-weight:700;box-shadow:0 0 0 2px #fff;-webkit-user-select:none;user-select:none;border-radius:50%;color:#fff}\n"] }]
|
|
713
|
+
}], propDecorators: { position: [{
|
|
714
|
+
type: Input
|
|
715
|
+
}], background: [{
|
|
716
|
+
type: Input
|
|
717
|
+
}], styles: [{
|
|
718
|
+
type: HostBinding,
|
|
719
|
+
args: ['style']
|
|
720
|
+
}] } });
|
|
721
|
+
|
|
722
|
+
class AvatarComponent {
|
|
723
|
+
constructor() {
|
|
724
|
+
this.PROGRESS_MODEL_DEFAULT = {
|
|
725
|
+
color: AvatarConstants.PROGRESS_DEFAULT_COLOR,
|
|
726
|
+
filledColor: AvatarConstants.PROGRESS_DEFAULT_FILLED_COLOR
|
|
727
|
+
};
|
|
728
|
+
this.DATA_MODEL_DEFAULT = {
|
|
729
|
+
image: AvatarConstants.DATA_DEFAULT_IMAGE
|
|
730
|
+
};
|
|
731
|
+
this.STROKE_HOVER_VALUE = 2;
|
|
732
|
+
this.FULLNAME_PART_VALUE = 4;
|
|
733
|
+
this.TITLE_PART_VALUE = 5;
|
|
734
|
+
/**
|
|
735
|
+
* Avatar radius (80 by default)
|
|
736
|
+
*/
|
|
737
|
+
this.radius = AvatarConstants.DEFAULT_RADIUS;
|
|
738
|
+
/**
|
|
739
|
+
* Size of avatar progress circle (2 by default)
|
|
740
|
+
*/
|
|
741
|
+
this.stroke = AvatarConstants.DEFAULT_STROKE;
|
|
742
|
+
/**
|
|
743
|
+
* Progress value
|
|
744
|
+
*/
|
|
745
|
+
this.progress = 0;
|
|
746
|
+
/**
|
|
747
|
+
* Progress colors model
|
|
748
|
+
*/
|
|
749
|
+
this.progressModel = this.PROGRESS_MODEL_DEFAULT;
|
|
750
|
+
this.data = this.DATA_MODEL_DEFAULT;
|
|
751
|
+
this.stars = false;
|
|
752
|
+
this.starsValue = 0;
|
|
753
|
+
this.badges = new QueryList();
|
|
754
|
+
}
|
|
755
|
+
ngOnInit() {
|
|
756
|
+
this.imageModel = new AvatarImageModel(this.radius, this.stroke, this.data.image);
|
|
757
|
+
this.progressModel = Object.assign(Object.assign({}, this.PROGRESS_MODEL_DEFAULT), this.progressModel);
|
|
758
|
+
this.data = Object.assign(Object.assign({}, this.DATA_MODEL_DEFAULT), this.data);
|
|
759
|
+
}
|
|
760
|
+
ngAfterContentInit() {
|
|
761
|
+
this.badges.forEach(badge => {
|
|
762
|
+
badge.radius = this.radius;
|
|
763
|
+
badge.normalizedRadius = this.imageModel.NormalizedRadius;
|
|
764
|
+
badge.stroke = this.stroke;
|
|
765
|
+
if (isNullOrEmptyString(badge.background))
|
|
766
|
+
badge.background = this.progressModel.filledColor;
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
get strokeDashOffset() {
|
|
770
|
+
return Math.round(this.imageModel.Circumference - (this.progress / 100 * this.imageModel.Circumference));
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
774
|
+
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: AvatarComponent, selector: "sfc-avatar", inputs: { radius: "radius", stroke: "stroke", progress: "progress", progressModel: "progressModel", data: "data", stars: "stars", starsValue: "starsValue" }, queries: [{ propertyName: "badges", predicate: AvatarBadgeComponent, read: AvatarBadgeComponent }], ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"avatar-image-container\">\r\n <div class=\"avatar\" (mouseenter)=\"stroke = stroke * STROKE_HOVER_VALUE\"\r\n (mouseleave)=\"stroke = stroke / STROKE_HOVER_VALUE\">\r\n\r\n <div class=\"avatar-image\">\r\n <svg [attr.height]=\"imageModel.Height\" [attr.width]=\"imageModel.Width\">\r\n <defs>\r\n <pattern id=\"{{imageModel.ImageId}}\" patternUnits=\"userSpaceOnUse\"\r\n [attr.height]=\"imageModel.Height\" [attr.width]=\"imageModel.Width\">\r\n <image [attr.height]=\"imageModel.Height\" [attr.width]=\"imageModel.Width\"\r\n [attr.xlink:href]=\"data.image\" preserveAspectRatio=\"xMidYMid slice\"></image>\r\n </pattern>\r\n </defs>\r\n <circle class=\"progress\" [attr.stroke]=\"progressModel.color\" [attr.stroke-width]=\"stroke\"\r\n fill=\"transparent\" [attr.r]=\"imageModel.NormalizedRadius\" [attr.cx]=\"radius\"\r\n [attr.cy]=\"radius\" />\r\n <circle class=\"progress\" [attr.stroke]=\"progressModel.filledColor\"\r\n [attr.stroke-dasharray]=\"imageModel.Circumference + ' ' + imageModel.Circumference\"\r\n [ngStyle]=\"{'stroke-dashoffset':strokeDashOffset}\" [attr.stroke-width]=\"stroke\"\r\n fill=\"transparent\" [attr.r]=\"imageModel.NormalizedRadius\" [attr.cx]=\"radius\"\r\n [attr.cy]=\"radius\" />\r\n\r\n <circle [attr.cx]=\"radius\" [attr.cy]=\"radius\" [attr.r]=\"imageModel.ImageRadius\"\r\n attr.fill=\"url('#{{imageModel.ImageId}}')\" />\r\n </svg>\r\n </div>\r\n\r\n <ng-content></ng-content>\r\n\r\n </div>\r\n\r\n <sfc-stars *ngIf=\"stars\" [value]=\"starsValue\"></sfc-stars>\r\n </div>\r\n\r\n <div class=\"avatar-data-container\">\r\n <div class=\"fullname\" [style.fontSize.px]=\"radius / FULLNAME_PART_VALUE\">\r\n <span>{{data.firstName}} {{data.lastName}}</span>\r\n </div>\r\n <div class=\"title\" [style.fontSize.px]=\"radius / TITLE_PART_VALUE\">\r\n <span>{{data.title}}</span>\r\n </div>\r\n </div>\r\n</div>", styles: [":host .container .avatar-image-container{display:flex;justify-content:center;flex-direction:column;align-items:center}:host .container .avatar-image-container .avatar{position:relative;margin-bottom:.5em}:host .container .avatar-image-container .avatar .avatar-image{display:flex;overflow:hidden;align-items:center;justify-content:center}:host .container .avatar-image-container .avatar .avatar-image circle{transform-origin:50% 50%;transition:stroke-dashoffset .35s,stroke-width .3s}:host .container .avatar-image-container .avatar .avatar-image circle.progress{transform:rotate(-90deg)}:host .container .avatar-data-container{display:flex;flex-direction:column;align-items:center;font-size:1em;font-weight:700;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host .container .avatar-data-container .fullname{color:#545e61}:host-context(.sfc-dark-theme) :host .container .avatar-data-container .fullname{color:#f5f7fa}:host .container .avatar-data-container .title{color:#aab2bd}\n"], components: [{ type: StarsComponent, selector: "sfc-stars", inputs: ["value", "count"] }], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
775
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
776
|
+
type: Component,
|
|
777
|
+
args: [{ selector: 'sfc-avatar', template: "<div class=\"container\">\r\n <div class=\"avatar-image-container\">\r\n <div class=\"avatar\" (mouseenter)=\"stroke = stroke * STROKE_HOVER_VALUE\"\r\n (mouseleave)=\"stroke = stroke / STROKE_HOVER_VALUE\">\r\n\r\n <div class=\"avatar-image\">\r\n <svg [attr.height]=\"imageModel.Height\" [attr.width]=\"imageModel.Width\">\r\n <defs>\r\n <pattern id=\"{{imageModel.ImageId}}\" patternUnits=\"userSpaceOnUse\"\r\n [attr.height]=\"imageModel.Height\" [attr.width]=\"imageModel.Width\">\r\n <image [attr.height]=\"imageModel.Height\" [attr.width]=\"imageModel.Width\"\r\n [attr.xlink:href]=\"data.image\" preserveAspectRatio=\"xMidYMid slice\"></image>\r\n </pattern>\r\n </defs>\r\n <circle class=\"progress\" [attr.stroke]=\"progressModel.color\" [attr.stroke-width]=\"stroke\"\r\n fill=\"transparent\" [attr.r]=\"imageModel.NormalizedRadius\" [attr.cx]=\"radius\"\r\n [attr.cy]=\"radius\" />\r\n <circle class=\"progress\" [attr.stroke]=\"progressModel.filledColor\"\r\n [attr.stroke-dasharray]=\"imageModel.Circumference + ' ' + imageModel.Circumference\"\r\n [ngStyle]=\"{'stroke-dashoffset':strokeDashOffset}\" [attr.stroke-width]=\"stroke\"\r\n fill=\"transparent\" [attr.r]=\"imageModel.NormalizedRadius\" [attr.cx]=\"radius\"\r\n [attr.cy]=\"radius\" />\r\n\r\n <circle [attr.cx]=\"radius\" [attr.cy]=\"radius\" [attr.r]=\"imageModel.ImageRadius\"\r\n attr.fill=\"url('#{{imageModel.ImageId}}')\" />\r\n </svg>\r\n </div>\r\n\r\n <ng-content></ng-content>\r\n\r\n </div>\r\n\r\n <sfc-stars *ngIf=\"stars\" [value]=\"starsValue\"></sfc-stars>\r\n </div>\r\n\r\n <div class=\"avatar-data-container\">\r\n <div class=\"fullname\" [style.fontSize.px]=\"radius / FULLNAME_PART_VALUE\">\r\n <span>{{data.firstName}} {{data.lastName}}</span>\r\n </div>\r\n <div class=\"title\" [style.fontSize.px]=\"radius / TITLE_PART_VALUE\">\r\n <span>{{data.title}}</span>\r\n </div>\r\n </div>\r\n</div>", styles: [":host .container .avatar-image-container{display:flex;justify-content:center;flex-direction:column;align-items:center}:host .container .avatar-image-container .avatar{position:relative;margin-bottom:.5em}:host .container .avatar-image-container .avatar .avatar-image{display:flex;overflow:hidden;align-items:center;justify-content:center}:host .container .avatar-image-container .avatar .avatar-image circle{transform-origin:50% 50%;transition:stroke-dashoffset .35s,stroke-width .3s}:host .container .avatar-image-container .avatar .avatar-image circle.progress{transform:rotate(-90deg)}:host .container .avatar-data-container{display:flex;flex-direction:column;align-items:center;font-size:1em;font-weight:700;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host .container .avatar-data-container .fullname{color:#545e61}:host-context(.sfc-dark-theme) :host .container .avatar-data-container .fullname{color:#f5f7fa}:host .container .avatar-data-container .title{color:#aab2bd}\n"] }]
|
|
778
|
+
}], propDecorators: { radius: [{
|
|
779
|
+
type: Input
|
|
780
|
+
}], stroke: [{
|
|
781
|
+
type: Input
|
|
782
|
+
}], progress: [{
|
|
783
|
+
type: Input
|
|
784
|
+
}], progressModel: [{
|
|
785
|
+
type: Input
|
|
786
|
+
}], data: [{
|
|
787
|
+
type: Input
|
|
788
|
+
}], stars: [{
|
|
789
|
+
type: Input
|
|
790
|
+
}], starsValue: [{
|
|
791
|
+
type: Input
|
|
792
|
+
}], badges: [{
|
|
793
|
+
type: ContentChildren,
|
|
794
|
+
args: [AvatarBadgeComponent, { read: AvatarBadgeComponent }]
|
|
795
|
+
}] } });
|
|
796
|
+
|
|
797
|
+
var ProgressColor;
|
|
798
|
+
(function (ProgressColor) {
|
|
799
|
+
ProgressColor["MIN_LOW"] = "#f08d97";
|
|
800
|
+
ProgressColor["LOW"] = "#ED5565";
|
|
801
|
+
ProgressColor["MAX_LOW"] = "#DA4453";
|
|
802
|
+
ProgressColor["MIN_MEDIUM"] = "#dfc47f";
|
|
803
|
+
ProgressColor["MEDIUM"] = "#FFCE54";
|
|
804
|
+
ProgressColor["MAX_MEDIUM"] = "#FCBB42";
|
|
805
|
+
ProgressColor["MIN_HIGH"] = "#b5dd88";
|
|
806
|
+
ProgressColor["HIGH"] = "#A0D468";
|
|
807
|
+
ProgressColor["MAX_HIGH"] = "#8CC152";
|
|
808
|
+
})(ProgressColor || (ProgressColor = {}));
|
|
809
|
+
|
|
810
|
+
class ProgressBaseComponent {
|
|
811
|
+
constructor() {
|
|
812
|
+
this.progress = 0;
|
|
813
|
+
this.getColor = this.getDefaultColor;
|
|
814
|
+
}
|
|
815
|
+
getDefaultColor(value) {
|
|
816
|
+
if (value < 12) {
|
|
817
|
+
return ProgressColor.MIN_LOW;
|
|
818
|
+
}
|
|
819
|
+
else if (value >= 12 && value < 24) {
|
|
820
|
+
return ProgressColor.LOW;
|
|
821
|
+
}
|
|
822
|
+
else if (value >= 24 && value < 36) {
|
|
823
|
+
return ProgressColor.MAX_LOW;
|
|
824
|
+
}
|
|
825
|
+
else if (value >= 36 && value < 48) {
|
|
826
|
+
return ProgressColor.MIN_MEDIUM;
|
|
827
|
+
}
|
|
828
|
+
else if (value >= 48 && value < 60) {
|
|
829
|
+
return ProgressColor.MEDIUM;
|
|
830
|
+
}
|
|
831
|
+
else if (value >= 60 && value < 72) {
|
|
832
|
+
return ProgressColor.MAX_MEDIUM;
|
|
833
|
+
}
|
|
834
|
+
else if (value >= 72 && value < 84) {
|
|
835
|
+
return ProgressColor.MIN_HIGH;
|
|
836
|
+
}
|
|
837
|
+
else if (value >= 84 && value < 96) {
|
|
838
|
+
return ProgressColor.HIGH;
|
|
839
|
+
}
|
|
840
|
+
else {
|
|
841
|
+
return ProgressColor.MAX_HIGH;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
ProgressBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
846
|
+
ProgressBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: ProgressBaseComponent, inputs: { progress: "progress", background: "background", getColor: "getColor" }, ngImport: i0 });
|
|
847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressBaseComponent, decorators: [{
|
|
848
|
+
type: Directive
|
|
849
|
+
}], propDecorators: { progress: [{
|
|
850
|
+
type: Input
|
|
851
|
+
}], background: [{
|
|
852
|
+
type: Input
|
|
853
|
+
}], getColor: [{
|
|
854
|
+
type: Input
|
|
855
|
+
}] } });
|
|
856
|
+
|
|
857
|
+
class ProgressLineComponent extends ProgressBaseComponent {
|
|
858
|
+
constructor() {
|
|
859
|
+
super(...arguments);
|
|
860
|
+
this.total = CommonConstants.FULL_PERCENTAGE;
|
|
861
|
+
this.hideEnd = false;
|
|
862
|
+
}
|
|
863
|
+
ngOnInit() {
|
|
864
|
+
if (this.progress > this.total)
|
|
865
|
+
this.progress = this.total = CommonConstants.FULL_PERCENTAGE;
|
|
866
|
+
}
|
|
867
|
+
get label() {
|
|
868
|
+
return isNullOrEmptyString(this.labelEnd) ? `${this.progress}` : this.labelEnd;
|
|
869
|
+
}
|
|
870
|
+
get progressStyles() {
|
|
871
|
+
return {
|
|
872
|
+
width: getCssLikeValue((this.progress / this.total) * CommonConstants.FULL_PERCENTAGE, UIConstants.CSS_PERCENTAGE),
|
|
873
|
+
backgroundColor: this.getColor(this.progress)
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
ProgressLineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressLineComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
878
|
+
ProgressLineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ProgressLineComponent, selector: "sfc-progress-line", inputs: { total: "total", labelStart: "labelStart", labelEnd: "labelEnd", hideEnd: "hideEnd" }, usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"labels\">\r\n <span>{{labelStart}}</span>\r\n <span *ngIf=\"!hideEnd\">{{label}}</span>\r\n </div>\r\n <div class=\"progress-bar\" [style.background]=\"background\">\r\n <div class=\"progress\" [ngStyle]=\"progressStyles\"></div>\r\n </div>\r\n</div>", styles: [":host{width:100%}:host .container .progress-bar{border-radius:.5em;background:#e6e9ed}:host .container .progress-bar .progress{height:.4em;border-radius:.5em;background-image:linear-gradient(to bottom,rgba(255,255,255,.3),rgba(255,255,255,.05));transition:.4s linear;transition-property:width,background-color}:host .container .labels{display:flex;justify-content:space-between;margin-bottom:.3em;font-weight:700;-webkit-user-select:none;user-select:none;font-size:.8em}:host-context(.sfc-default-theme) :host .container .labels{color:#545e61}:host-context(.sfc-dark-theme) :host .container .labels{color:#ccd1d9}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressLineComponent, decorators: [{
|
|
880
|
+
type: Component,
|
|
881
|
+
args: [{ selector: 'sfc-progress-line', template: "<div class=\"container\">\r\n <div class=\"labels\">\r\n <span>{{labelStart}}</span>\r\n <span *ngIf=\"!hideEnd\">{{label}}</span>\r\n </div>\r\n <div class=\"progress-bar\" [style.background]=\"background\">\r\n <div class=\"progress\" [ngStyle]=\"progressStyles\"></div>\r\n </div>\r\n</div>", styles: [":host{width:100%}:host .container .progress-bar{border-radius:.5em;background:#e6e9ed}:host .container .progress-bar .progress{height:.4em;border-radius:.5em;background-image:linear-gradient(to bottom,rgba(255,255,255,.3),rgba(255,255,255,.05));transition:.4s linear;transition-property:width,background-color}:host .container .labels{display:flex;justify-content:space-between;margin-bottom:.3em;font-weight:700;-webkit-user-select:none;user-select:none;font-size:.8em}:host-context(.sfc-default-theme) :host .container .labels{color:#545e61}:host-context(.sfc-dark-theme) :host .container .labels{color:#ccd1d9}\n"] }]
|
|
882
|
+
}], propDecorators: { total: [{
|
|
883
|
+
type: Input
|
|
884
|
+
}], labelStart: [{
|
|
885
|
+
type: Input
|
|
886
|
+
}], labelEnd: [{
|
|
887
|
+
type: Input
|
|
888
|
+
}], hideEnd: [{
|
|
889
|
+
type: Input
|
|
890
|
+
}] } });
|
|
891
|
+
|
|
892
|
+
class ProgressSemiCircleComponent extends ProgressBaseComponent {
|
|
893
|
+
constructor() {
|
|
894
|
+
super(...arguments);
|
|
895
|
+
this.limits = true;
|
|
896
|
+
this.min = 0;
|
|
897
|
+
this.max = CommonConstants.FULL_PERCENTAGE;
|
|
898
|
+
}
|
|
899
|
+
ngOnInit() {
|
|
900
|
+
if (this.min > this.max)
|
|
901
|
+
this.min = 0;
|
|
902
|
+
if (this.progress < this.min)
|
|
903
|
+
this.progress = this.min;
|
|
904
|
+
if (this.progress > this.max)
|
|
905
|
+
this.progress = this.max;
|
|
906
|
+
}
|
|
907
|
+
get barStyles() {
|
|
908
|
+
const color = this.getColor(this.progress), differenceLimits = this.max - this.min, rotateValue = 45 + (180 - ((this.max - this.progress) * 180 / differenceLimits));
|
|
909
|
+
return {
|
|
910
|
+
transform: `rotate(${getCssLikeValue(rotateValue, UIConstants.CSS_DEGREES)})`,
|
|
911
|
+
borderBottomColor: color,
|
|
912
|
+
borderRightColor: color
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
ProgressSemiCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressSemiCircleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
917
|
+
ProgressSemiCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ProgressSemiCircleComponent, selector: "sfc-progress-semi-circle", inputs: { limits: "limits", min: "min", max: "max" }, usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"progress-bar\">\r\n <div class=\"bar\" [style.border-color]=\"background\" [ngStyle]=\"barStyles\"></div>\r\n </div>\r\n <span class=\"value\">{{progress}}</span>\r\n <div class=\"limits\" *ngIf=\"limits\">\r\n <span>{{min}}</span>\r\n <span>{{max}}</span>\r\n </div>\r\n</div>", styles: [":host .container{position:relative;width:1em;height:.5em;font-size:5em}:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#ccd1d9}:host .container .progress-bar{position:relative;overflow:hidden;height:inherit}:host .container .progress-bar .bar{width:1em;height:1em;border-radius:50%;box-sizing:border-box;border:.1em solid;border-color:#e6e9ed;transition-property:all;transition-duration:.2s;transition-timing-function:ease-out}:host .container .value{font-weight:700;font-size:.2em;-webkit-user-select:none;user-select:none;position:absolute;z-index:1;top:50%;width:5em;text-align:center;white-space:nowrap;transition-property:all;transition-duration:.2s;transition-timing-function:ease-out}:host .container .limits{font-size:.06em;font-weight:700;display:flex;justify-content:space-between;align-items:center;margin-top:3px}:host .container:hover .progress-bar .bar{border-width:.08em}:host .container:hover .value{font-size:.3em;width:3.33em;top:30%}\n"], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressSemiCircleComponent, decorators: [{
|
|
919
|
+
type: Component,
|
|
920
|
+
args: [{ selector: 'sfc-progress-semi-circle', template: "<div class=\"container\">\r\n <div class=\"progress-bar\">\r\n <div class=\"bar\" [style.border-color]=\"background\" [ngStyle]=\"barStyles\"></div>\r\n </div>\r\n <span class=\"value\">{{progress}}</span>\r\n <div class=\"limits\" *ngIf=\"limits\">\r\n <span>{{min}}</span>\r\n <span>{{max}}</span>\r\n </div>\r\n</div>", styles: [":host .container{position:relative;width:1em;height:.5em;font-size:5em}:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#ccd1d9}:host .container .progress-bar{position:relative;overflow:hidden;height:inherit}:host .container .progress-bar .bar{width:1em;height:1em;border-radius:50%;box-sizing:border-box;border:.1em solid;border-color:#e6e9ed;transition-property:all;transition-duration:.2s;transition-timing-function:ease-out}:host .container .value{font-weight:700;font-size:.2em;-webkit-user-select:none;user-select:none;position:absolute;z-index:1;top:50%;width:5em;text-align:center;white-space:nowrap;transition-property:all;transition-duration:.2s;transition-timing-function:ease-out}:host .container .limits{font-size:.06em;font-weight:700;display:flex;justify-content:space-between;align-items:center;margin-top:3px}:host .container:hover .progress-bar .bar{border-width:.08em}:host .container:hover .value{font-size:.3em;width:3.33em;top:30%}\n"] }]
|
|
921
|
+
}], propDecorators: { limits: [{
|
|
922
|
+
type: Input
|
|
923
|
+
}], min: [{
|
|
924
|
+
type: Input
|
|
925
|
+
}], max: [{
|
|
926
|
+
type: Input
|
|
927
|
+
}] } });
|
|
928
|
+
|
|
929
|
+
class ProgressCircleComponent extends ProgressBaseComponent {
|
|
930
|
+
get reversed() {
|
|
931
|
+
return this.progress > 50;
|
|
932
|
+
}
|
|
933
|
+
get transformRotate() {
|
|
934
|
+
return `rotate(${getCssLikeValue((this.progress * 360) / CommonConstants.FULL_PERCENTAGE, UIConstants.CSS_DEGREES)})`;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
ProgressCircleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressCircleComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
938
|
+
ProgressCircleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ProgressCircleComponent, selector: "sfc-progress-circle", host: { properties: { "class.reversed": "this.reversed" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"container\" [style.background]=\"background\">\r\n <span>{{progress}}</span>\r\n <div class=\"circle\">\r\n <div class=\"bar\" [ngStyle]=\"{'transform': transformRotate, \r\n 'border-color': getColor(progress)}\"></div>\r\n <div class=\"fill\" [ngStyle]=\"{'border-color': getColor(progress)}\"></div>\r\n </div>\r\n</div>", styles: [":host.reversed .container .circle .fill,:host .container .circle .bar{position:absolute;border:.09em solid;clip:rect(0,.5em,1em,0);border-radius:50%;width:.82em;height:.82em}:host .container{position:relative;border-radius:50%;background:#e6e9ed;font-size:5em;text-align:initial;width:1em;height:1em}:host .container:after{position:absolute;top:.082em;left:.09em;content:\" \";border-radius:50%;background:#fff;transition-property:all;transition-duration:.2s;transition-timing-function:ease-in;width:.83em;height:.83em}:host .container span{position:absolute;z-index:1;width:5em;line-height:5em;font-size:.2em;color:#545e61;font-weight:700;text-align:center;white-space:nowrap;-webkit-user-select:none;user-select:none;transition-property:all;transition-duration:.2s;transition-timing-function:ease-out}:host .container:hover:after{top:.07em;left:.07em;width:.86em;height:.86em}:host .container:hover span{width:3.33em;line-height:3.33em;font-size:.3em}:host .container .circle{position:absolute;clip:rect(0,1em,1em,.5em);width:1em;height:1em}:host .container .circle .bar{transition:transform .2s ease-out,border-color .2s ease-out}:host.reversed .container .circle{clip:rect(auto,auto,auto,auto)}:host.reversed .container .circle .fill{transform:rotate(180deg)}\n"], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
939
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ProgressCircleComponent, decorators: [{
|
|
940
|
+
type: Component,
|
|
941
|
+
args: [{ selector: 'sfc-progress-circle', template: "<div class=\"container\" [style.background]=\"background\">\r\n <span>{{progress}}</span>\r\n <div class=\"circle\">\r\n <div class=\"bar\" [ngStyle]=\"{'transform': transformRotate, \r\n 'border-color': getColor(progress)}\"></div>\r\n <div class=\"fill\" [ngStyle]=\"{'border-color': getColor(progress)}\"></div>\r\n </div>\r\n</div>", styles: [":host.reversed .container .circle .fill,:host .container .circle .bar{position:absolute;border:.09em solid;clip:rect(0,.5em,1em,0);border-radius:50%;width:.82em;height:.82em}:host .container{position:relative;border-radius:50%;background:#e6e9ed;font-size:5em;text-align:initial;width:1em;height:1em}:host .container:after{position:absolute;top:.082em;left:.09em;content:\" \";border-radius:50%;background:#fff;transition-property:all;transition-duration:.2s;transition-timing-function:ease-in;width:.83em;height:.83em}:host .container span{position:absolute;z-index:1;width:5em;line-height:5em;font-size:.2em;color:#545e61;font-weight:700;text-align:center;white-space:nowrap;-webkit-user-select:none;user-select:none;transition-property:all;transition-duration:.2s;transition-timing-function:ease-out}:host .container:hover:after{top:.07em;left:.07em;width:.86em;height:.86em}:host .container:hover span{width:3.33em;line-height:3.33em;font-size:.3em}:host .container .circle{position:absolute;clip:rect(0,1em,1em,.5em);width:1em;height:1em}:host .container .circle .bar{transition:transform .2s ease-out,border-color .2s ease-out}:host.reversed .container .circle{clip:rect(auto,auto,auto,auto)}:host.reversed .container .circle .fill{transform:rotate(180deg)}\n"] }]
|
|
942
|
+
}], propDecorators: { reversed: [{
|
|
943
|
+
type: HostBinding,
|
|
944
|
+
args: ['class.reversed']
|
|
945
|
+
}] } });
|
|
946
|
+
|
|
947
|
+
class TagComponent {
|
|
948
|
+
constructor() {
|
|
949
|
+
this.model = { label: CommonConstants.EMPTY_STRING };
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
TagComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
953
|
+
TagComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TagComponent, selector: "sfc-tag", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"container\">\r\n <a class=\"tag\">\r\n <div class=\"content\">\r\n <i *ngIf=\"model.icon\" class=\"{{model.icon}}\"></i>\r\n <span>{{model.label}}</span>\r\n </div>\r\n </a>\r\n</div>", styles: [":host{display:inline-flex;margin:0 .18em}:host .container{margin-top:.3em;font-size:.8em;-webkit-user-select:none;user-select:none}:host .container .tag{display:inline-flex;border-radius:1em;font-weight:700;color:#545e61;background-color:#f5f7fa;border:.125em solid transparent;padding:.3em}:host .container .tag .content{display:flex;align-items:center;text-align:center;padding:0 .8em}:host .container .tag .content i{margin-right:.18em}:host .container:hover .tag{background-color:#2bbbad;color:#fff}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
954
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TagComponent, decorators: [{
|
|
955
|
+
type: Component,
|
|
956
|
+
args: [{ selector: 'sfc-tag', template: "<div class=\"container\">\r\n <a class=\"tag\">\r\n <div class=\"content\">\r\n <i *ngIf=\"model.icon\" class=\"{{model.icon}}\"></i>\r\n <span>{{model.label}}</span>\r\n </div>\r\n </a>\r\n</div>", styles: [":host{display:inline-flex;margin:0 .18em}:host .container{margin-top:.3em;font-size:.8em;-webkit-user-select:none;user-select:none}:host .container .tag{display:inline-flex;border-radius:1em;font-weight:700;color:#545e61;background-color:#f5f7fa;border:.125em solid transparent;padding:.3em}:host .container .tag .content{display:flex;align-items:center;text-align:center;padding:0 .8em}:host .container .tag .content i{margin-right:.18em}:host .container:hover .tag{background-color:#2bbbad;color:#fff}\n"] }]
|
|
957
|
+
}], propDecorators: { model: [{
|
|
958
|
+
type: Input
|
|
959
|
+
}] } });
|
|
960
|
+
|
|
961
|
+
class TagsComponent {
|
|
962
|
+
constructor() {
|
|
963
|
+
this.tags = [];
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
TagsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TagsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
967
|
+
TagsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TagsComponent, selector: "sfc-tags", inputs: { tags: "tags" }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"tags\">\r\n <sfc-tag *ngFor=\"let tag of tags\" [model]=\"tag\"></sfc-tag>\r\n </div>\r\n</div>", components: [{ type: TagComponent, selector: "sfc-tag", inputs: ["model"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TagsComponent, decorators: [{
|
|
969
|
+
type: Component,
|
|
970
|
+
args: [{ selector: 'sfc-tags', template: "<div class=\"container\">\r\n <div class=\"tags\">\r\n <sfc-tag *ngFor=\"let tag of tags\" [model]=\"tag\"></sfc-tag>\r\n </div>\r\n</div>" }]
|
|
971
|
+
}], propDecorators: { tags: [{
|
|
972
|
+
type: Input
|
|
973
|
+
}] } });
|
|
974
|
+
|
|
975
|
+
var SliderButtonType;
|
|
976
|
+
(function (SliderButtonType) {
|
|
977
|
+
SliderButtonType["Next"] = "next";
|
|
978
|
+
SliderButtonType["Previous"] = "previous";
|
|
979
|
+
})(SliderButtonType || (SliderButtonType = {}));
|
|
980
|
+
|
|
981
|
+
class SliderItemComponent {
|
|
982
|
+
constructor() {
|
|
983
|
+
this.model = { imageSrc: CommonConstants.EMPTY_STRING };
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
SliderItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
987
|
+
SliderItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SliderItemComponent, selector: "sfc-slider-item", inputs: { model: "model" }, ngImport: i0, template: "<li>\r\n <div>\r\n <h2>{{model.title}}</h2>\r\n <span>{{model.subTitle}}</span>\r\n </div>\r\n <img [src]=\"model.imageSrc\">\r\n</li>", styles: [":host{display:inline-block}:host li{position:relative;width:37.5em;height:25em;background:#434a54}:host li div{position:absolute;top:10%;left:6%;-webkit-user-select:none;user-select:none;font-size:1.5em}:host li div h2{margin:0;text-transform:uppercase}:host li img{width:100%;height:100%;object-fit:fill}\n"] });
|
|
988
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderItemComponent, decorators: [{
|
|
989
|
+
type: Component,
|
|
990
|
+
args: [{ selector: 'sfc-slider-item', template: "<li>\r\n <div>\r\n <h2>{{model.title}}</h2>\r\n <span>{{model.subTitle}}</span>\r\n </div>\r\n <img [src]=\"model.imageSrc\">\r\n</li>", styles: [":host{display:inline-block}:host li{position:relative;width:37.5em;height:25em;background:#434a54}:host li div{position:absolute;top:10%;left:6%;-webkit-user-select:none;user-select:none;font-size:1.5em}:host li div h2{margin:0;text-transform:uppercase}:host li img{width:100%;height:100%;object-fit:fill}\n"] }]
|
|
991
|
+
}], propDecorators: { model: [{
|
|
992
|
+
type: Input
|
|
993
|
+
}] } });
|
|
994
|
+
|
|
995
|
+
var SliderMoveType;
|
|
996
|
+
(function (SliderMoveType) {
|
|
997
|
+
SliderMoveType["Next"] = "next";
|
|
998
|
+
SliderMoveType["Previous"] = "previous";
|
|
999
|
+
SliderMoveType["Select"] = "select";
|
|
1000
|
+
})(SliderMoveType || (SliderMoveType = {}));
|
|
1001
|
+
|
|
1002
|
+
class SliderService {
|
|
1003
|
+
constructor() {
|
|
1004
|
+
// hold current image index
|
|
1005
|
+
this.index = 0;
|
|
1006
|
+
this.moveSubject = new Subject();
|
|
1007
|
+
this.move$ = this.moveSubject.asObservable();
|
|
1008
|
+
}
|
|
1009
|
+
init(count$) {
|
|
1010
|
+
this.model$ = combineLatest([
|
|
1011
|
+
this.move$.pipe(startWith({ type: SliderMoveType.Select, index: this.index })),
|
|
1012
|
+
count$.pipe(startWith(0))
|
|
1013
|
+
]).pipe(map(([event, count]) => {
|
|
1014
|
+
var _a;
|
|
1015
|
+
switch (event.type) {
|
|
1016
|
+
case SliderMoveType.Select:
|
|
1017
|
+
this.index = (_a = event.index) !== null && _a !== void 0 ? _a : this.index;
|
|
1018
|
+
break;
|
|
1019
|
+
case SliderMoveType.Next:
|
|
1020
|
+
this.index++;
|
|
1021
|
+
break;
|
|
1022
|
+
case SliderMoveType.Previous:
|
|
1023
|
+
this.index--;
|
|
1024
|
+
break;
|
|
1025
|
+
}
|
|
1026
|
+
if (this.index == count)
|
|
1027
|
+
this.index = 0;
|
|
1028
|
+
if (this.index < 0)
|
|
1029
|
+
this.index = count - 1;
|
|
1030
|
+
return { index: this.index, count };
|
|
1031
|
+
}));
|
|
1032
|
+
}
|
|
1033
|
+
move(type) {
|
|
1034
|
+
this.moveSubject.next({ type });
|
|
1035
|
+
}
|
|
1036
|
+
select(index) {
|
|
1037
|
+
this.moveSubject.next({ type: SliderMoveType.Select, index });
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
class SliderAutomaticService {
|
|
1042
|
+
constructor(sliderService) {
|
|
1043
|
+
this.sliderService = sliderService;
|
|
1044
|
+
this.AUTOMATIC_INTERVAL_MS = 3000;
|
|
1045
|
+
this.pause = true;
|
|
1046
|
+
}
|
|
1047
|
+
start() {
|
|
1048
|
+
this.pause = false;
|
|
1049
|
+
// stop previous if exist
|
|
1050
|
+
if (isDefined(this.autoSlider))
|
|
1051
|
+
this.stop();
|
|
1052
|
+
this.autoSlider = setInterval(() => this.sliderService.move(SliderMoveType.Next), this.AUTOMATIC_INTERVAL_MS);
|
|
1053
|
+
}
|
|
1054
|
+
stop() {
|
|
1055
|
+
clearInterval(this.autoSlider);
|
|
1056
|
+
}
|
|
1057
|
+
toggle() {
|
|
1058
|
+
this.pause = !this.pause;
|
|
1059
|
+
if (this.pause)
|
|
1060
|
+
this.stop();
|
|
1061
|
+
else
|
|
1062
|
+
this.start();
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
SliderAutomaticService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderAutomaticService, deps: [{ token: SliderService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1066
|
+
SliderAutomaticService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderAutomaticService });
|
|
1067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderAutomaticService, decorators: [{
|
|
1068
|
+
type: Injectable
|
|
1069
|
+
}], ctorParameters: function () { return [{ type: SliderService }]; } });
|
|
1070
|
+
|
|
1071
|
+
var SliderType;
|
|
1072
|
+
(function (SliderType) {
|
|
1073
|
+
SliderType["Default"] = "default";
|
|
1074
|
+
SliderType["Automatic"] = "automatic";
|
|
1075
|
+
})(SliderType || (SliderType = {}));
|
|
1076
|
+
|
|
1077
|
+
class SliderButtonComponent {
|
|
1078
|
+
constructor() {
|
|
1079
|
+
this.ICON_NEXT = 'fa fa-arrow-right';
|
|
1080
|
+
this.ICON_PREVIOUS = 'fa fa-arrow-left';
|
|
1081
|
+
this.type = SliderButtonType.Next;
|
|
1082
|
+
this.active = false;
|
|
1083
|
+
}
|
|
1084
|
+
get icon() {
|
|
1085
|
+
return this.type == SliderButtonType.Next
|
|
1086
|
+
? this.ICON_NEXT
|
|
1087
|
+
: this.ICON_PREVIOUS;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
SliderButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1091
|
+
SliderButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SliderButtonComponent, selector: "sfc-slider-button", inputs: { type: "type", active: "active" }, host: { properties: { "class": "this.type", "class.active": "this.active" } }, ngImport: i0, template: "<div>\r\n <i class=\"{{icon}}\"></i>\r\n</div>", styles: [":host{position:absolute;width:3em;height:3.7em;top:50%;margin-top:-1.5em;line-height:3.7em;text-align:center;cursor:pointer;background:#0000001a;transition:all .1s ease}:host:hover{background:#0000004d}:host.next{right:-3em;border-radius:.43em 0 0 .43em}:host.previous{left:-3em;border-radius:0 .43em .43em 0}:host.active.next{right:0}:host.active.previous{left:0}\n"] });
|
|
1092
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderButtonComponent, decorators: [{
|
|
1093
|
+
type: Component,
|
|
1094
|
+
args: [{ selector: 'sfc-slider-button', template: "<div>\r\n <i class=\"{{icon}}\"></i>\r\n</div>", styles: [":host{position:absolute;width:3em;height:3.7em;top:50%;margin-top:-1.5em;line-height:3.7em;text-align:center;cursor:pointer;background:#0000001a;transition:all .1s ease}:host:hover{background:#0000004d}:host.next{right:-3em;border-radius:.43em 0 0 .43em}:host.previous{left:-3em;border-radius:0 .43em .43em 0}:host.active.next{right:0}:host.active.previous{left:0}\n"] }]
|
|
1095
|
+
}], propDecorators: { type: [{
|
|
1096
|
+
type: Input
|
|
1097
|
+
}, {
|
|
1098
|
+
type: HostBinding,
|
|
1099
|
+
args: ['class']
|
|
1100
|
+
}], active: [{
|
|
1101
|
+
type: Input
|
|
1102
|
+
}, {
|
|
1103
|
+
type: HostBinding,
|
|
1104
|
+
args: ['class.' + UIClass.Active]
|
|
1105
|
+
}] } });
|
|
1106
|
+
|
|
1107
|
+
class SliderPaginationComponent {
|
|
1108
|
+
constructor() {
|
|
1109
|
+
this.count = 0;
|
|
1110
|
+
this.index = 0;
|
|
1111
|
+
this.selected = new EventEmitter();
|
|
1112
|
+
}
|
|
1113
|
+
get items() {
|
|
1114
|
+
return Array.from({ length: this.count });
|
|
1115
|
+
}
|
|
1116
|
+
selectItem(index) {
|
|
1117
|
+
this.selected.emit(index);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
SliderPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1121
|
+
SliderPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SliderPaginationComponent, selector: "sfc-slider-pagination", inputs: { count: "count", index: "index" }, outputs: { selected: "selected" }, ngImport: i0, template: "<ul>\r\n <li *ngFor=\"let _ of items; let itemIndex = index;\" [class.active]=\"itemIndex === index\"\r\n (click)=\"selectItem(itemIndex)\"></li>\r\n</ul>", styles: [":host{display:inline-block}:host ul{display:flex;align-items:center;margin:0;padding:0}:host ul li{margin:.3em;display:inline-block;width:.6em;height:.6em;border-radius:50%;background:#fff;opacity:.5;cursor:pointer;transition:all .3s cubic-bezier(1,.01,.32,1)}:host ul li.active{transform:scale(1.7);opacity:1}\n"], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderPaginationComponent, decorators: [{
|
|
1123
|
+
type: Component,
|
|
1124
|
+
args: [{ selector: 'sfc-slider-pagination', template: "<ul>\r\n <li *ngFor=\"let _ of items; let itemIndex = index;\" [class.active]=\"itemIndex === index\"\r\n (click)=\"selectItem(itemIndex)\"></li>\r\n</ul>", styles: [":host{display:inline-block}:host ul{display:flex;align-items:center;margin:0;padding:0}:host ul li{margin:.3em;display:inline-block;width:.6em;height:.6em;border-radius:50%;background:#fff;opacity:.5;cursor:pointer;transition:all .3s cubic-bezier(1,.01,.32,1)}:host ul li.active{transform:scale(1.7);opacity:1}\n"] }]
|
|
1125
|
+
}], propDecorators: { count: [{
|
|
1126
|
+
type: Input
|
|
1127
|
+
}], index: [{
|
|
1128
|
+
type: Input
|
|
1129
|
+
}], selected: [{
|
|
1130
|
+
type: Output
|
|
1131
|
+
}] } });
|
|
1132
|
+
|
|
1133
|
+
class SliderComponent {
|
|
1134
|
+
constructor(sliderService, automaticService, changeDetector) {
|
|
1135
|
+
this.sliderService = sliderService;
|
|
1136
|
+
this.automaticService = automaticService;
|
|
1137
|
+
this.changeDetector = changeDetector;
|
|
1138
|
+
this.PAUSE_ICON = 'fas fa-pause-circle';
|
|
1139
|
+
this.PLAY_ICON = 'fas fa-play-circle';
|
|
1140
|
+
this.SliderButtonType = SliderButtonType;
|
|
1141
|
+
this.SliderMoveType = SliderMoveType;
|
|
1142
|
+
this.items = [];
|
|
1143
|
+
this.type = SliderType.Default;
|
|
1144
|
+
this.showCount = true;
|
|
1145
|
+
this.pagination = true;
|
|
1146
|
+
/**
|
|
1147
|
+
* If active show buttons
|
|
1148
|
+
*/
|
|
1149
|
+
this.active = false;
|
|
1150
|
+
}
|
|
1151
|
+
onEnter() {
|
|
1152
|
+
this.active = true;
|
|
1153
|
+
// stop automatic move on hover
|
|
1154
|
+
if (this.isAutomatic)
|
|
1155
|
+
this.automaticService.stop();
|
|
1156
|
+
}
|
|
1157
|
+
onLeave() {
|
|
1158
|
+
this.active = false;
|
|
1159
|
+
// start automatic move on hover end
|
|
1160
|
+
if (this.isAutomatic && !this.automaticService.pause)
|
|
1161
|
+
this.automaticService.start();
|
|
1162
|
+
}
|
|
1163
|
+
get isAutomatic() {
|
|
1164
|
+
return this.type == SliderType.Automatic;
|
|
1165
|
+
}
|
|
1166
|
+
get automaticIcon() {
|
|
1167
|
+
return this.automaticService.pause ? this.PLAY_ICON : this.PAUSE_ICON;
|
|
1168
|
+
}
|
|
1169
|
+
ngAfterViewInit() {
|
|
1170
|
+
const count$ = this.sliderItems.changes.pipe(map(c => c.length));
|
|
1171
|
+
this.sliderService.init(count$);
|
|
1172
|
+
this.vm$ = this.sliderService.model$.pipe(map(model => {
|
|
1173
|
+
return {
|
|
1174
|
+
index: model.index,
|
|
1175
|
+
styles: this.getStyles(model.index, model.count),
|
|
1176
|
+
label: `${model.count > 0 ? model.index + 1 : 0} / ${model.count}`,
|
|
1177
|
+
count: model.count
|
|
1178
|
+
};
|
|
1179
|
+
}));
|
|
1180
|
+
if (this.isAutomatic)
|
|
1181
|
+
this.automaticService.start();
|
|
1182
|
+
}
|
|
1183
|
+
ngAfterViewChecked() {
|
|
1184
|
+
this.changeDetector.detectChanges();
|
|
1185
|
+
}
|
|
1186
|
+
getStyles(index, count) {
|
|
1187
|
+
if (this.slider) {
|
|
1188
|
+
const width = this.slider.nativeElement.offsetWidth;
|
|
1189
|
+
return {
|
|
1190
|
+
width: getCssLikeValue(width * count),
|
|
1191
|
+
left: getCssLikeValue(-width * index)
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
return null;
|
|
1195
|
+
}
|
|
1196
|
+
move(type) {
|
|
1197
|
+
this.sliderService.move(type);
|
|
1198
|
+
}
|
|
1199
|
+
select(index) {
|
|
1200
|
+
this.sliderService.select(index);
|
|
1201
|
+
}
|
|
1202
|
+
toggleAutomatic() {
|
|
1203
|
+
this.automaticService.toggle();
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
SliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderComponent, deps: [{ token: SliderService }, { token: SliderAutomaticService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1207
|
+
SliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SliderComponent, selector: "sfc-slider", inputs: { items: "items", type: "type", showCount: "showCount", pagination: "pagination" }, host: { listeners: { "mouseenter": "onEnter()", "mouseleave": "onLeave()" } }, providers: [SliderService, SliderAutomaticService], viewQueries: [{ propertyName: "slider", first: true, predicate: ["slider"], descendants: true }, { propertyName: "sliderItems", predicate: SliderItemComponent, descendants: true }], ngImport: i0, template: "<div class=\"container\">\r\n <div *ngIf=\"vm$ | async as vm\" #slider class=\"slider\">\r\n <ul [ngStyle]=\"vm.styles\">\r\n <sfc-slider-item *ngFor=\"let item of items\" [model]=\"item\"></sfc-slider-item>\r\n </ul>\r\n\r\n <div class=\"buttons\">\r\n <sfc-slider-button [active]=\"active\" [type]=\"SliderButtonType.Next\" (click)=\"move(SliderMoveType.Next)\">\r\n </sfc-slider-button>\r\n <sfc-slider-button [active]=\"active\" [type]=\"SliderButtonType.Previous\" (click)=\"move(SliderMoveType.Previous)\">\r\n </sfc-slider-button>\r\n </div>\r\n\r\n <div class=\"counter\" *ngIf=\"showCount\">{{vm.label}}</div>\r\n\r\n <div class=\"actions\">\r\n <sfc-slider-pagination *ngIf=\"pagination\" [count]=\"vm.count\" [index]=\"vm.index\" (selected)=\"select($event)\">\r\n </sfc-slider-pagination>\r\n\r\n <div *ngIf=\"isAutomatic\" class=\"automatic\" (click)=\"toggleAutomatic()\">\r\n <i class=\"{{automaticIcon}}\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host .container{width:37.5em;height:25em;color:#fff}:host .container .slider{height:inherit;position:relative;overflow:hidden;background:#434a54;display:flex;justify-content:center;align-items:flex-end}:host .container .slider>ul{position:absolute;list-style:none;margin:0;padding:0;height:inherit;transition:all .3s cubic-bezier(1,.01,.32,1)}:host .container .slider .counter{top:10%;right:6%;position:absolute;font-weight:700;-webkit-user-select:none;user-select:none}:host .container .slider .actions{margin-bottom:1em;cursor:pointer;display:flex;flex-direction:column;justify-content:center;position:relative;align-items:center}:host .container .slider .actions .automatic{margin-top:.3em}\n"], components: [{ type: SliderItemComponent, selector: "sfc-slider-item", inputs: ["model"] }, { type: SliderButtonComponent, selector: "sfc-slider-button", inputs: ["type", "active"] }, { type: SliderPaginationComponent, selector: "sfc-slider-pagination", inputs: ["count", "index"], outputs: ["selected"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i2.AsyncPipe } });
|
|
1208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SliderComponent, decorators: [{
|
|
1209
|
+
type: Component,
|
|
1210
|
+
args: [{ selector: 'sfc-slider', providers: [SliderService, SliderAutomaticService], template: "<div class=\"container\">\r\n <div *ngIf=\"vm$ | async as vm\" #slider class=\"slider\">\r\n <ul [ngStyle]=\"vm.styles\">\r\n <sfc-slider-item *ngFor=\"let item of items\" [model]=\"item\"></sfc-slider-item>\r\n </ul>\r\n\r\n <div class=\"buttons\">\r\n <sfc-slider-button [active]=\"active\" [type]=\"SliderButtonType.Next\" (click)=\"move(SliderMoveType.Next)\">\r\n </sfc-slider-button>\r\n <sfc-slider-button [active]=\"active\" [type]=\"SliderButtonType.Previous\" (click)=\"move(SliderMoveType.Previous)\">\r\n </sfc-slider-button>\r\n </div>\r\n\r\n <div class=\"counter\" *ngIf=\"showCount\">{{vm.label}}</div>\r\n\r\n <div class=\"actions\">\r\n <sfc-slider-pagination *ngIf=\"pagination\" [count]=\"vm.count\" [index]=\"vm.index\" (selected)=\"select($event)\">\r\n </sfc-slider-pagination>\r\n\r\n <div *ngIf=\"isAutomatic\" class=\"automatic\" (click)=\"toggleAutomatic()\">\r\n <i class=\"{{automaticIcon}}\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [":host .container{width:37.5em;height:25em;color:#fff}:host .container .slider{height:inherit;position:relative;overflow:hidden;background:#434a54;display:flex;justify-content:center;align-items:flex-end}:host .container .slider>ul{position:absolute;list-style:none;margin:0;padding:0;height:inherit;transition:all .3s cubic-bezier(1,.01,.32,1)}:host .container .slider .counter{top:10%;right:6%;position:absolute;font-weight:700;-webkit-user-select:none;user-select:none}:host .container .slider .actions{margin-bottom:1em;cursor:pointer;display:flex;flex-direction:column;justify-content:center;position:relative;align-items:center}:host .container .slider .actions .automatic{margin-top:.3em}\n"] }]
|
|
1211
|
+
}], ctorParameters: function () { return [{ type: SliderService }, { type: SliderAutomaticService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { items: [{
|
|
1212
|
+
type: Input
|
|
1213
|
+
}], type: [{
|
|
1214
|
+
type: Input
|
|
1215
|
+
}], showCount: [{
|
|
1216
|
+
type: Input
|
|
1217
|
+
}], pagination: [{
|
|
1218
|
+
type: Input
|
|
1219
|
+
}], slider: [{
|
|
1220
|
+
type: ViewChild,
|
|
1221
|
+
args: ['slider', { static: false }]
|
|
1222
|
+
}], sliderItems: [{
|
|
1223
|
+
type: ViewChildren,
|
|
1224
|
+
args: [SliderItemComponent]
|
|
1225
|
+
}], onEnter: [{
|
|
1226
|
+
type: HostListener,
|
|
1227
|
+
args: ['mouseenter']
|
|
1228
|
+
}], onLeave: [{
|
|
1229
|
+
type: HostListener,
|
|
1230
|
+
args: ['mouseleave']
|
|
1231
|
+
}] } });
|
|
1232
|
+
|
|
1233
|
+
var TimelineItemPosition;
|
|
1234
|
+
(function (TimelineItemPosition) {
|
|
1235
|
+
TimelineItemPosition["Left"] = "left";
|
|
1236
|
+
TimelineItemPosition["Right"] = "right";
|
|
1237
|
+
})(TimelineItemPosition || (TimelineItemPosition = {}));
|
|
1238
|
+
|
|
1239
|
+
class TimelineItemComponent {
|
|
1240
|
+
constructor() {
|
|
1241
|
+
this.model = { title: CommonConstants.EMPTY_STRING };
|
|
1242
|
+
}
|
|
1243
|
+
get position() {
|
|
1244
|
+
return this.model.position || TimelineItemPosition.Left;
|
|
1245
|
+
}
|
|
1246
|
+
get period() {
|
|
1247
|
+
return this.model.period || false;
|
|
1248
|
+
}
|
|
1249
|
+
get showImage() {
|
|
1250
|
+
return !isNullOrEmptyString(this.model.image) && isNullOrEmptyString(this.model.icon);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
TimelineItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TimelineItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1254
|
+
TimelineItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TimelineItemComponent, selector: "sfc-timeline-item", inputs: { model: "model" }, host: { properties: { "class": "this.position", "class.period": "this.period" } }, ngImport: i0, template: "<li class=\"container\">\r\n <div class=\"date-time\">\r\n <span>{{model.dateTimeLabel}}</span>\r\n </div>\r\n <div class=\"marker\">\r\n <div class=\"delimeter\"></div>\r\n </div>\r\n <div class=\"content\">\r\n <div class=\"title\">\r\n <i *ngIf=\"model.icon\" class=\"{{model.icon}}\"></i>\r\n <img *ngIf=\"showImage\" [src]=\"model.image\">\r\n <span>{{model.title}}</span>\r\n </div> \r\n <p>{{model.description}}</p>\r\n </div>\r\n</li>", styles: [":host{display:block}:host .container{padding:0 0 .5em 2.5em;position:relative}:host .container .date-time{font-size:.8em;font-weight:700;letter-spacing:.06em;margin:0 0 .5em;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}:host-context(.sfc-default-theme) :host .container .date-time{color:#545e61}:host-context(.sfc-dark-theme) :host .container .date-time{color:#ccd1d9}:host .container .marker{position:absolute;top:0;bottom:0;left:0}:host .container .marker:before{box-sizing:border-box;background:#2bbbad;border:.18em solid transparent;border-radius:100%;content:\"\";display:block;position:absolute;top:.25em;width:1em;height:1em;transition:background .3s ease-in-out,border .3s ease-in-out}:host .container .marker:after{content:\"\";width:.18em;display:block;position:absolute;top:1.5em;bottom:0;left:.375em;box-sizing:border-box}:host-context(.sfc-default-theme) :host .container .marker:after{background:#545e61}:host-context(.sfc-dark-theme) :host .container .marker:after{background:#ccd1d9}:host .container .marker .delimeter{display:none;width:1em;bottom:0;position:absolute;border-bottom:.18em solid}:host-context(.sfc-default-theme) :host .container .marker .delimeter{border-color:#545e61}:host-context(.sfc-dark-theme) :host .container .marker .delimeter{border-color:#ccd1d9}:host .container .content{font-size:1em;font-weight:700;line-height:initial;padding-bottom:2.5em;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:flex;flex-flow:column wrap;align-items:flex-start}:host-context(.sfc-default-theme) :host .container .content{color:#545e61}:host-context(.sfc-dark-theme) :host .container .content{color:#fff}:host .container .content p{font-size:.8em;line-height:1em;color:#aab2bd;margin:0}:host .container .content i,:host .container .content img{margin-right:.31em}:host .container .content img{width:1em}:host.period .container{padding:0}:host.period .container .date-time{display:none}:host.period .container .marker:before{background:transparent;content:\"\";height:auto;border:none;border-radius:0;top:0;bottom:1.875em;border-top:.18em solid;border-bottom:.18em solid;transition:none}:host-context(.sfc-default-theme) :host.period .container .marker:before{border-color:#545e61}:host-context(.sfc-dark-theme) :host.period .container .marker:before{border-color:#ccd1d9}:host.period .container .marker:after{content:\"\";height:2em;top:auto}:host.period .container .content{padding:2.5em 0 4.375em;justify-content:start}:host.period .container .content span{margin:0;font-size:1.875em}:host:not(.period):hover .container .marker:before{border:.18em solid #2bbbad}:host-context(.sfc-default-theme) :host:not(.period):hover .container .marker:before{background:transparent}:host-context(.sfc-dark-theme) :host:not(.period):hover .container .marker:before{background:#fff}@media (min-width: 992px){:host .container{padding:0 0 .31em;overflow:hidden}:host .container .date-time{width:50%}:host .container .marker{left:50%;margin-left:-.46em}:host .container .content{padding:0;width:50%}:host.period .container{padding:2em 0 3.5em}:host.period .container .content{padding:0;width:100%;text-align:center;justify-content:center;align-items:center}:host:not(.period).right .container .date-time{float:left;text-align:right;padding-right:1.875em}:host:not(.period).right .container .content{padding-left:1.5em;justify-content:start}:host:not(.period).left .container .date-time{float:right;padding-left:1.875em}:host:not(.period).left .container .content{padding-right:1.5em;justify-content:end;align-items:end}:host:not(.period).left .container .content .title{text-align:end}:host:not(.period).left .container .content span,:host:not(.period).left .container .content p{text-align:end}}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1255
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TimelineItemComponent, decorators: [{
|
|
1256
|
+
type: Component,
|
|
1257
|
+
args: [{ selector: 'sfc-timeline-item', template: "<li class=\"container\">\r\n <div class=\"date-time\">\r\n <span>{{model.dateTimeLabel}}</span>\r\n </div>\r\n <div class=\"marker\">\r\n <div class=\"delimeter\"></div>\r\n </div>\r\n <div class=\"content\">\r\n <div class=\"title\">\r\n <i *ngIf=\"model.icon\" class=\"{{model.icon}}\"></i>\r\n <img *ngIf=\"showImage\" [src]=\"model.image\">\r\n <span>{{model.title}}</span>\r\n </div> \r\n <p>{{model.description}}</p>\r\n </div>\r\n</li>", styles: [":host{display:block}:host .container{padding:0 0 .5em 2.5em;position:relative}:host .container .date-time{font-size:.8em;font-weight:700;letter-spacing:.06em;margin:0 0 .5em;text-transform:uppercase;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box}:host-context(.sfc-default-theme) :host .container .date-time{color:#545e61}:host-context(.sfc-dark-theme) :host .container .date-time{color:#ccd1d9}:host .container .marker{position:absolute;top:0;bottom:0;left:0}:host .container .marker:before{box-sizing:border-box;background:#2bbbad;border:.18em solid transparent;border-radius:100%;content:\"\";display:block;position:absolute;top:.25em;width:1em;height:1em;transition:background .3s ease-in-out,border .3s ease-in-out}:host .container .marker:after{content:\"\";width:.18em;display:block;position:absolute;top:1.5em;bottom:0;left:.375em;box-sizing:border-box}:host-context(.sfc-default-theme) :host .container .marker:after{background:#545e61}:host-context(.sfc-dark-theme) :host .container .marker:after{background:#ccd1d9}:host .container .marker .delimeter{display:none;width:1em;bottom:0;position:absolute;border-bottom:.18em solid}:host-context(.sfc-default-theme) :host .container .marker .delimeter{border-color:#545e61}:host-context(.sfc-dark-theme) :host .container .marker .delimeter{border-color:#ccd1d9}:host .container .content{font-size:1em;font-weight:700;line-height:initial;padding-bottom:2.5em;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:flex;flex-flow:column wrap;align-items:flex-start}:host-context(.sfc-default-theme) :host .container .content{color:#545e61}:host-context(.sfc-dark-theme) :host .container .content{color:#fff}:host .container .content p{font-size:.8em;line-height:1em;color:#aab2bd;margin:0}:host .container .content i,:host .container .content img{margin-right:.31em}:host .container .content img{width:1em}:host.period .container{padding:0}:host.period .container .date-time{display:none}:host.period .container .marker:before{background:transparent;content:\"\";height:auto;border:none;border-radius:0;top:0;bottom:1.875em;border-top:.18em solid;border-bottom:.18em solid;transition:none}:host-context(.sfc-default-theme) :host.period .container .marker:before{border-color:#545e61}:host-context(.sfc-dark-theme) :host.period .container .marker:before{border-color:#ccd1d9}:host.period .container .marker:after{content:\"\";height:2em;top:auto}:host.period .container .content{padding:2.5em 0 4.375em;justify-content:start}:host.period .container .content span{margin:0;font-size:1.875em}:host:not(.period):hover .container .marker:before{border:.18em solid #2bbbad}:host-context(.sfc-default-theme) :host:not(.period):hover .container .marker:before{background:transparent}:host-context(.sfc-dark-theme) :host:not(.period):hover .container .marker:before{background:#fff}@media (min-width: 992px){:host .container{padding:0 0 .31em;overflow:hidden}:host .container .date-time{width:50%}:host .container .marker{left:50%;margin-left:-.46em}:host .container .content{padding:0;width:50%}:host.period .container{padding:2em 0 3.5em}:host.period .container .content{padding:0;width:100%;text-align:center;justify-content:center;align-items:center}:host:not(.period).right .container .date-time{float:left;text-align:right;padding-right:1.875em}:host:not(.period).right .container .content{padding-left:1.5em;justify-content:start}:host:not(.period).left .container .date-time{float:right;padding-left:1.875em}:host:not(.period).left .container .content{padding-right:1.5em;justify-content:end;align-items:end}:host:not(.period).left .container .content .title{text-align:end}:host:not(.period).left .container .content span,:host:not(.period).left .container .content p{text-align:end}}\n"] }]
|
|
1258
|
+
}], propDecorators: { model: [{
|
|
1259
|
+
type: Input
|
|
1260
|
+
}], position: [{
|
|
1261
|
+
type: HostBinding,
|
|
1262
|
+
args: ['class']
|
|
1263
|
+
}], period: [{
|
|
1264
|
+
type: HostBinding,
|
|
1265
|
+
args: ['class.period']
|
|
1266
|
+
}] } });
|
|
1267
|
+
|
|
1268
|
+
class TimelineComponent {
|
|
1269
|
+
constructor() {
|
|
1270
|
+
this.items = [];
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
TimelineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1274
|
+
TimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TimelineComponent, selector: "sfc-timeline", inputs: { items: "items" }, ngImport: i0, template: "<div class=\"container\">\r\n <ul class=\"timeline\">\r\n <sfc-timeline-item *ngFor=\"let item of items\" [model]=\"item\"></sfc-timeline-item>\r\n </ul>\r\n</div>", styles: [":host{display:block}:host .container .timeline{line-height:1.4em;list-style:none;margin:0;padding:0}:host .container .timeline ::ng-deep sfc-timeline-item:first-child.period .container{padding-top:0}:host .container .timeline ::ng-deep sfc-timeline-item:first-child.period .container .marker:before{border-top:none!important}:host .container .timeline ::ng-deep sfc-timeline-item:last-child .delimeter{display:block}\n"], components: [{ type: TimelineItemComponent, selector: "sfc-timeline-item", inputs: ["model"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TimelineComponent, decorators: [{
|
|
1276
|
+
type: Component,
|
|
1277
|
+
args: [{ selector: 'sfc-timeline', template: "<div class=\"container\">\r\n <ul class=\"timeline\">\r\n <sfc-timeline-item *ngFor=\"let item of items\" [model]=\"item\"></sfc-timeline-item>\r\n </ul>\r\n</div>", styles: [":host{display:block}:host .container .timeline{line-height:1.4em;list-style:none;margin:0;padding:0}:host .container .timeline ::ng-deep sfc-timeline-item:first-child.period .container{padding-top:0}:host .container .timeline ::ng-deep sfc-timeline-item:first-child.period .container .marker:before{border-top:none!important}:host .container .timeline ::ng-deep sfc-timeline-item:last-child .delimeter{display:block}\n"] }]
|
|
1278
|
+
}], propDecorators: { items: [{
|
|
1279
|
+
type: Input
|
|
1280
|
+
}] } });
|
|
1281
|
+
|
|
1282
|
+
var NotificationTemplate;
|
|
1283
|
+
(function (NotificationTemplate) {
|
|
1284
|
+
NotificationTemplate["Content"] = "content";
|
|
1285
|
+
})(NotificationTemplate || (NotificationTemplate = {}));
|
|
1286
|
+
|
|
1287
|
+
var NotificationType;
|
|
1288
|
+
(function (NotificationType) {
|
|
1289
|
+
NotificationType["Info"] = "info";
|
|
1290
|
+
NotificationType["Success"] = "success";
|
|
1291
|
+
NotificationType["Failed"] = "failed";
|
|
1292
|
+
})(NotificationType || (NotificationType = {}));
|
|
1293
|
+
|
|
1294
|
+
class NotificationContentComponent {
|
|
1295
|
+
constructor() {
|
|
1296
|
+
this.ButtonType = ButtonType;
|
|
1297
|
+
this.type = NotificationType.Info;
|
|
1298
|
+
this.model = {};
|
|
1299
|
+
this.buttonClicked = new EventEmitter();
|
|
1300
|
+
}
|
|
1301
|
+
get showImage() {
|
|
1302
|
+
return !isNullOrEmptyString(this.model.image) && isNullOrEmptyString(this.model.icon);
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
NotificationContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NotificationContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1306
|
+
NotificationContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: NotificationContentComponent, selector: "sfc-notification-content", inputs: { type: "type", model: "model" }, outputs: { buttonClicked: "buttonClicked" }, host: { properties: { "class": "this.type" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"illustration\">\r\n <div *ngIf=\"model.icon\">\r\n <i class=\"{{model.icon}}\"></i>\r\n </div>\r\n <div *ngIf=\"showImage\">\r\n <img [src]=\"model.image\">\r\n </div>\r\n </div>\r\n <div class=\"message\">\r\n <h1>{{model.title}}</h1>\r\n <p>{{model.subTitle}}</p>\r\n </div>\r\n <div *ngIf=\"model.showButton\" class=\"action\">\r\n <sfc-button text=\"{{model.buttonText || type}}\" [types]=\"[ButtonType.Rounded, ButtonType.Filled]\"\r\n (click)=\"buttonClicked.emit()\"></sfc-button>\r\n </div>\r\n</div>", styles: [":host{display:inline-block;font-size:3em}:host.info ::ng-deep sfc-button .button.filled{color:#4fc1e9!important}:host.success ::ng-deep sfc-button .button.filled{color:#4ec07d!important}:host.failed ::ng-deep sfc-button .button.filled{color:#e96075!important}:host .container{display:flex;flex-direction:column;justify-content:center;align-items:center}:host .container .illustration{color:#f5f7fa;display:flex;justify-content:center;align-items:center;font-size:.7em}:host .container .illustration img{object-fit:contain;width:3em;height:3em}:host .container .message{text-align:center;-webkit-user-select:none;user-select:none}:host .container .message h1{font-size:.4em;color:#f5f7fa;font-weight:700;letter-spacing:.3em;text-transform:uppercase}:host .container .message p{font-size:.2em;font-weight:100;color:#434a54;letter-spacing:.1em}:host .container .action{font-size:.25em}:host .container .action ::ng-deep sfc-button{transition:transform .3s ease-in-out}:host .container .action ::ng-deep sfc-button .button.filled{background:#f5f7fa;border:solid .125em #f5f7fa}:host .container .action ::ng-deep sfc-button:hover{transform:scale(1.05)}\n"], components: [{ type: i1.ButtonComponent, selector: "sfc-button", inputs: ["text", "iconBefore", "iconAfter", "disabled", "types"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NotificationContentComponent, decorators: [{
|
|
1308
|
+
type: Component,
|
|
1309
|
+
args: [{ selector: 'sfc-notification-content', template: "<div class=\"container\">\r\n <div class=\"illustration\">\r\n <div *ngIf=\"model.icon\">\r\n <i class=\"{{model.icon}}\"></i>\r\n </div>\r\n <div *ngIf=\"showImage\">\r\n <img [src]=\"model.image\">\r\n </div>\r\n </div>\r\n <div class=\"message\">\r\n <h1>{{model.title}}</h1>\r\n <p>{{model.subTitle}}</p>\r\n </div>\r\n <div *ngIf=\"model.showButton\" class=\"action\">\r\n <sfc-button text=\"{{model.buttonText || type}}\" [types]=\"[ButtonType.Rounded, ButtonType.Filled]\"\r\n (click)=\"buttonClicked.emit()\"></sfc-button>\r\n </div>\r\n</div>", styles: [":host{display:inline-block;font-size:3em}:host.info ::ng-deep sfc-button .button.filled{color:#4fc1e9!important}:host.success ::ng-deep sfc-button .button.filled{color:#4ec07d!important}:host.failed ::ng-deep sfc-button .button.filled{color:#e96075!important}:host .container{display:flex;flex-direction:column;justify-content:center;align-items:center}:host .container .illustration{color:#f5f7fa;display:flex;justify-content:center;align-items:center;font-size:.7em}:host .container .illustration img{object-fit:contain;width:3em;height:3em}:host .container .message{text-align:center;-webkit-user-select:none;user-select:none}:host .container .message h1{font-size:.4em;color:#f5f7fa;font-weight:700;letter-spacing:.3em;text-transform:uppercase}:host .container .message p{font-size:.2em;font-weight:100;color:#434a54;letter-spacing:.1em}:host .container .action{font-size:.25em}:host .container .action ::ng-deep sfc-button{transition:transform .3s ease-in-out}:host .container .action ::ng-deep sfc-button .button.filled{background:#f5f7fa;border:solid .125em #f5f7fa}:host .container .action ::ng-deep sfc-button:hover{transform:scale(1.05)}\n"] }]
|
|
1310
|
+
}], propDecorators: { type: [{
|
|
1311
|
+
type: Input
|
|
1312
|
+
}, {
|
|
1313
|
+
type: HostBinding,
|
|
1314
|
+
args: ['class']
|
|
1315
|
+
}], model: [{
|
|
1316
|
+
type: Input
|
|
1317
|
+
}], buttonClicked: [{
|
|
1318
|
+
type: Output
|
|
1319
|
+
}] } });
|
|
1320
|
+
|
|
1321
|
+
class NotificationComponent {
|
|
1322
|
+
constructor() {
|
|
1323
|
+
this.AUTO_CLOSE_INTERVAL_DEFAULT = 5000;
|
|
1324
|
+
this.DESTROY_HOST_INTERVAL = 500;
|
|
1325
|
+
this.NotificationTemplate = NotificationTemplate;
|
|
1326
|
+
this.showClose = true;
|
|
1327
|
+
this.autoCloseModel = { enabled: false, interval: this.AUTO_CLOSE_INTERVAL_DEFAULT };
|
|
1328
|
+
this.type = NotificationType.Info;
|
|
1329
|
+
this.model = { showButton: true };
|
|
1330
|
+
this.closed = new EventEmitter();
|
|
1331
|
+
this.buttonClicked = new EventEmitter();
|
|
1332
|
+
this.destroy = false;
|
|
1333
|
+
this.show = false;
|
|
1334
|
+
}
|
|
1335
|
+
ngOnInit() {
|
|
1336
|
+
if (!isDefined(this.autoCloseModel.interval))
|
|
1337
|
+
this.autoCloseModel.interval = this.AUTO_CLOSE_INTERVAL_DEFAULT;
|
|
1338
|
+
if (this.autoCloseModel.enabled)
|
|
1339
|
+
setTimeout(() => {
|
|
1340
|
+
if (this.show) {
|
|
1341
|
+
this.close();
|
|
1342
|
+
}
|
|
1343
|
+
}, this.autoCloseModel.interval);
|
|
1344
|
+
// for animation purpose
|
|
1345
|
+
setTimeout(() => this.show = true);
|
|
1346
|
+
}
|
|
1347
|
+
close() {
|
|
1348
|
+
this.show = false;
|
|
1349
|
+
this.destroy = true;
|
|
1350
|
+
this.closed.emit();
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
NotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1354
|
+
NotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: NotificationComponent, selector: "sfc-notification", inputs: { showClose: "showClose", autoCloseModel: "autoCloseModel", type: "type", model: "model", content: "content" }, outputs: { closed: "closed", buttonClicked: "buttonClicked" }, host: { properties: { "class": "this.type" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"container\" [sfcDestroyParent]=\"destroy\" [delay]=\"DESTROY_HOST_INTERVAL\">\r\n <div class=\"notification\" [sfcShowHideElement]=\"show\">\r\n <sfc-close *ngIf=\"showClose\" (click)=\"close()\"></sfc-close>\r\n\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"NotificationTemplate.Content\" [defaultContent]=\"defaultContent\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultContent>\r\n <sfc-notification-content [type]=\"type\" [model]=\"model\" (buttonClicked)=\"buttonClicked.emit()\">\r\n </sfc-notification-content>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [":host{display:inline-block}:host .container .notification{border-radius:1.25em;box-shadow:5px 5px 20px #656d78;padding:1em;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#f5f7fa}:host .container .notification sfc-close{align-self:end}:host .container .notification ::ng-deep sfc-close{color:#f5f7fa}:host .container .notification ::ng-deep sfc-close:hover{color:#fff}:host.info .container .notification{background:linear-gradient(to bottom right,#4fc1e9 40%,#4a89dc 100%)}:host.success .container .notification{background:linear-gradient(to bottom right,#b0db7d 40%,#99dbb4 100%)}:host.failed .container .notification{background:linear-gradient(to bottom left,#ef8d9c 40%,#ffc39e 100%)}\n"], components: [{ type: i1.CloseComponent, selector: "sfc-close" }, { type: i1.TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { type: NotificationContentComponent, selector: "sfc-notification-content", inputs: ["type", "model"], outputs: ["buttonClicked"] }], directives: [{ type: i1.DestroyParentDirective, selector: "[sfcDestroyParent]", inputs: ["sfcDestroyParent", "delay"] }, { type: i1.ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NotificationComponent, decorators: [{
|
|
1356
|
+
type: Component,
|
|
1357
|
+
args: [{ selector: 'sfc-notification', template: "<div class=\"container\" [sfcDestroyParent]=\"destroy\" [delay]=\"DESTROY_HOST_INTERVAL\">\r\n <div class=\"notification\" [sfcShowHideElement]=\"show\">\r\n <sfc-close *ngIf=\"showClose\" (click)=\"close()\"></sfc-close>\r\n\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"NotificationTemplate.Content\" [defaultContent]=\"defaultContent\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultContent>\r\n <sfc-notification-content [type]=\"type\" [model]=\"model\" (buttonClicked)=\"buttonClicked.emit()\">\r\n </sfc-notification-content>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [":host{display:inline-block}:host .container .notification{border-radius:1.25em;box-shadow:5px 5px 20px #656d78;padding:1em;display:flex;justify-content:center;align-items:center;flex-direction:column;color:#f5f7fa}:host .container .notification sfc-close{align-self:end}:host .container .notification ::ng-deep sfc-close{color:#f5f7fa}:host .container .notification ::ng-deep sfc-close:hover{color:#fff}:host.info .container .notification{background:linear-gradient(to bottom right,#4fc1e9 40%,#4a89dc 100%)}:host.success .container .notification{background:linear-gradient(to bottom right,#b0db7d 40%,#99dbb4 100%)}:host.failed .container .notification{background:linear-gradient(to bottom left,#ef8d9c 40%,#ffc39e 100%)}\n"] }]
|
|
1358
|
+
}], propDecorators: { showClose: [{
|
|
1359
|
+
type: Input
|
|
1360
|
+
}], autoCloseModel: [{
|
|
1361
|
+
type: Input
|
|
1362
|
+
}], type: [{
|
|
1363
|
+
type: Input
|
|
1364
|
+
}, {
|
|
1365
|
+
type: HostBinding,
|
|
1366
|
+
args: ['class']
|
|
1367
|
+
}], model: [{
|
|
1368
|
+
type: Input
|
|
1369
|
+
}], content: [{
|
|
1370
|
+
type: Input
|
|
1371
|
+
}], closed: [{
|
|
1372
|
+
type: Output
|
|
1373
|
+
}], buttonClicked: [{
|
|
1374
|
+
type: Output
|
|
1375
|
+
}], templates: [{
|
|
1376
|
+
type: ContentChildren,
|
|
1377
|
+
args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
|
|
1378
|
+
}] } });
|
|
1379
|
+
|
|
1380
|
+
const DEFAULT_BACKGROUND_COLORS = [
|
|
1381
|
+
`rgb(93%, 33%, 40%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1382
|
+
`rgba(99%, 43%, 32%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1383
|
+
`rgb(100%, 81%, 33%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1384
|
+
`rgb(63%, 83%, 41%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1385
|
+
`rgb(28%, 81%, 68%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1386
|
+
`rgb(31%, 76%, 91%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1387
|
+
`rgb(36%, 61%, 93%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1388
|
+
`rgb(67%, 57%, 93%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1389
|
+
`rgb(93%, 53%, 75%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`,
|
|
1390
|
+
`rgb(80%, 82%, 85%, ${UIConstants.RGB_OPACITY_PLACEHOLDER})`
|
|
1391
|
+
];
|
|
1392
|
+
const DEFAULT_BORDER_COLORS = ['#DA4453', '#E9573F', '#FCBB42', '#8CC152', '#37BC9B', '#3BAFDA', '#4A89DC', '#967ADC', '#D770AD', '#AAB2BD'];
|
|
1393
|
+
const DEFAULT_MODE_COLORS = { GRID: 'rgba(0,0,0,0.1)', TICKS: '#666' };
|
|
1394
|
+
const DARK_MODE_COLORS = { GRID: '#656D78', TICKS: '#E6E9ED' };
|
|
1395
|
+
const CHART_DEFAULTS = {
|
|
1396
|
+
OPTIONS: _getOptions(),
|
|
1397
|
+
OPTIONS_NOT_LINES: _getOptions(false),
|
|
1398
|
+
OPTIONS_RADIAL: _getOptions(false, true),
|
|
1399
|
+
COLORS: _getColors(),
|
|
1400
|
+
HALF_TRANSPARENT_COLORS: _getColors(0.5),
|
|
1401
|
+
THEME: {
|
|
1402
|
+
DEFAULT: _getThemeOptions(false),
|
|
1403
|
+
DARK: _getThemeOptions(true)
|
|
1404
|
+
}
|
|
1405
|
+
};
|
|
1406
|
+
function _getOptions(showAxes = true, showRadialAxes = false) {
|
|
1407
|
+
return {
|
|
1408
|
+
responsive: true,
|
|
1409
|
+
maintainAspectRatio: false,
|
|
1410
|
+
scales: {
|
|
1411
|
+
x: {
|
|
1412
|
+
display: showAxes,
|
|
1413
|
+
grid: { display: true },
|
|
1414
|
+
ticks: { display: true }
|
|
1415
|
+
},
|
|
1416
|
+
y: {
|
|
1417
|
+
display: showAxes,
|
|
1418
|
+
grid: { display: true },
|
|
1419
|
+
ticks: { display: true }
|
|
1420
|
+
},
|
|
1421
|
+
r: {
|
|
1422
|
+
display: showRadialAxes,
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
plugins: {
|
|
1426
|
+
tooltip: { enabled: true },
|
|
1427
|
+
legend: { display: true }
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
function _getColors(opacity = 1) {
|
|
1432
|
+
const backgrounds = DEFAULT_BACKGROUND_COLORS.map(b => replaceRgbOpacity(b, opacity));
|
|
1433
|
+
return backgrounds.map((background, index) => {
|
|
1434
|
+
const border = DEFAULT_BORDER_COLORS[index];
|
|
1435
|
+
return {
|
|
1436
|
+
backgroundColor: background,
|
|
1437
|
+
hoverBackgroundColor: background,
|
|
1438
|
+
borderColor: border,
|
|
1439
|
+
pointBackgroundColor: background,
|
|
1440
|
+
pointBorderColor: border
|
|
1441
|
+
};
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
function _getThemeOptions(dark) {
|
|
1445
|
+
const grid = dark ? DARK_MODE_COLORS.GRID : DEFAULT_MODE_COLORS.GRID, ticks = dark ? DARK_MODE_COLORS.TICKS : DEFAULT_MODE_COLORS.TICKS;
|
|
1446
|
+
return {
|
|
1447
|
+
scales: {
|
|
1448
|
+
x: {
|
|
1449
|
+
grid: { color: grid },
|
|
1450
|
+
ticks: { color: ticks }
|
|
1451
|
+
},
|
|
1452
|
+
y: {
|
|
1453
|
+
grid: { color: grid },
|
|
1454
|
+
ticks: { color: ticks }
|
|
1455
|
+
},
|
|
1456
|
+
r: {
|
|
1457
|
+
angleLines: { color: grid },
|
|
1458
|
+
grid: { color: grid },
|
|
1459
|
+
ticks: { color: ticks, backdropColor: 'transparent' },
|
|
1460
|
+
pointLabels: { color: ticks }
|
|
1461
|
+
}
|
|
1462
|
+
},
|
|
1463
|
+
plugins: {
|
|
1464
|
+
legend: {
|
|
1465
|
+
labels: { color: ticks }
|
|
1466
|
+
},
|
|
1467
|
+
title: {
|
|
1468
|
+
color: ticks
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
};
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
class ChartThemeService {
|
|
1475
|
+
constructor() {
|
|
1476
|
+
this.colorsSubject = new Subject();
|
|
1477
|
+
this.colors$ = this.colorsSubject.asObservable();
|
|
1478
|
+
}
|
|
1479
|
+
setColors(model) {
|
|
1480
|
+
this.model = model;
|
|
1481
|
+
this.colorsSubject.next(model);
|
|
1482
|
+
}
|
|
1483
|
+
getColors() {
|
|
1484
|
+
return this.model;
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
ChartThemeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartThemeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1488
|
+
ChartThemeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartThemeService, providedIn: 'root' });
|
|
1489
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartThemeService, decorators: [{
|
|
1490
|
+
type: Injectable,
|
|
1491
|
+
args: [{
|
|
1492
|
+
providedIn: 'root'
|
|
1493
|
+
}]
|
|
1494
|
+
}] });
|
|
1495
|
+
|
|
1496
|
+
class ChartSettingsService {
|
|
1497
|
+
getDefaultOptions(type) {
|
|
1498
|
+
let defaultChartOptions = {};
|
|
1499
|
+
switch (type) {
|
|
1500
|
+
case 'polarArea':
|
|
1501
|
+
case 'radar':
|
|
1502
|
+
defaultChartOptions = CHART_DEFAULTS.OPTIONS_RADIAL;
|
|
1503
|
+
break;
|
|
1504
|
+
case 'pie':
|
|
1505
|
+
case 'doughnut':
|
|
1506
|
+
defaultChartOptions = CHART_DEFAULTS.OPTIONS_NOT_LINES;
|
|
1507
|
+
break;
|
|
1508
|
+
default:
|
|
1509
|
+
defaultChartOptions = CHART_DEFAULTS.OPTIONS;
|
|
1510
|
+
break;
|
|
1511
|
+
}
|
|
1512
|
+
return JSON.parse(JSON.stringify(defaultChartOptions));
|
|
1513
|
+
}
|
|
1514
|
+
getDefaultChartOptions(type) {
|
|
1515
|
+
switch (type) {
|
|
1516
|
+
case 'pie':
|
|
1517
|
+
case 'radar':
|
|
1518
|
+
case 'polarArea':
|
|
1519
|
+
case 'doughnut':
|
|
1520
|
+
return { legend: true, gridLines: true, xAxe: false, yAxe: false, tooltip: true, ticks: true, defaultColors: true };
|
|
1521
|
+
default:
|
|
1522
|
+
return { legend: true, gridLines: true, xAxe: true, yAxe: true, tooltip: true, ticks: true, defaultColors: true };
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
setDatasetStyles(type, datasets, colors) {
|
|
1526
|
+
switch (type) {
|
|
1527
|
+
case 'polarArea':
|
|
1528
|
+
case 'pie':
|
|
1529
|
+
case 'doughnut':
|
|
1530
|
+
this.setBackgroundDatasetStyles(datasets, colors || CHART_DEFAULTS.COLORS);
|
|
1531
|
+
break;
|
|
1532
|
+
case 'radar':
|
|
1533
|
+
this.setDefaultDatasetStyles(datasets, colors || CHART_DEFAULTS.HALF_TRANSPARENT_COLORS);
|
|
1534
|
+
break;
|
|
1535
|
+
default:
|
|
1536
|
+
this.setDefaultDatasetStyles(datasets, colors || CHART_DEFAULTS.COLORS);
|
|
1537
|
+
break;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
setDefaultDatasetStyles(datasets, colors) {
|
|
1541
|
+
datasets.forEach((item, index) => {
|
|
1542
|
+
if (index <= colors.length - 1) {
|
|
1543
|
+
const dataSetColor = colors[index];
|
|
1544
|
+
item.backgroundColor = dataSetColor.backgroundColor;
|
|
1545
|
+
item.hoverBackgroundColor = dataSetColor.hoverBackgroundColor;
|
|
1546
|
+
item.borderColor = dataSetColor.borderColor;
|
|
1547
|
+
item.hoverBorderColor = dataSetColor.hoverBorderColor;
|
|
1548
|
+
item.pointBackgroundColor = dataSetColor.pointBackgroundColor;
|
|
1549
|
+
item.pointHoverBackgroundColor = dataSetColor.pointHoverBackgroundColor;
|
|
1550
|
+
item.pointBorderColor = dataSetColor.pointBorderColor;
|
|
1551
|
+
item.pointHoverBorderColor = dataSetColor.pointHoverBorderColor;
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
setBackgroundDatasetStyles(datasets, colors) {
|
|
1556
|
+
datasets.forEach((item) => {
|
|
1557
|
+
item.backgroundColor = this.replaceColors(item.backgroundColor, colors, c => c.backgroundColor);
|
|
1558
|
+
item.hoverBackgroundColor = this.replaceColors(item.hoverBackgroundColor, colors, c => c.hoverBackgroundColor);
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
replaceColors(oldColors, newColors, mapFunc) {
|
|
1562
|
+
const colors = newColors.map(mapFunc).filter((color) => isDefined(color));
|
|
1563
|
+
if (oldColors) {
|
|
1564
|
+
oldColors.splice(0, Math.min(oldColors.length, colors.length));
|
|
1565
|
+
return colors.concat(oldColors);
|
|
1566
|
+
}
|
|
1567
|
+
return colors;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
ChartSettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1571
|
+
ChartSettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartSettingsService, providedIn: 'root' });
|
|
1572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartSettingsService, decorators: [{
|
|
1573
|
+
type: Injectable,
|
|
1574
|
+
args: [{
|
|
1575
|
+
providedIn: 'root'
|
|
1576
|
+
}]
|
|
1577
|
+
}] });
|
|
1578
|
+
|
|
1579
|
+
class ChartComponent {
|
|
1580
|
+
constructor(zone, themeService, settingsService) {
|
|
1581
|
+
this.zone = zone;
|
|
1582
|
+
this.themeService = themeService;
|
|
1583
|
+
this.settingsService = settingsService;
|
|
1584
|
+
// Chart configuration
|
|
1585
|
+
this.type = 'line';
|
|
1586
|
+
this.plugins = [];
|
|
1587
|
+
this._theme = Theme.Default;
|
|
1588
|
+
this._themeSubscription = this.themeService.colors$
|
|
1589
|
+
.pipe(distinctUntilChanged())
|
|
1590
|
+
.subscribe((model) => this.updateColors(model));
|
|
1591
|
+
}
|
|
1592
|
+
get theme() {
|
|
1593
|
+
return this._theme;
|
|
1594
|
+
}
|
|
1595
|
+
set theme(value) {
|
|
1596
|
+
if (this._theme != value) {
|
|
1597
|
+
this._theme = value;
|
|
1598
|
+
this.themeService.setColors({ options: this.themeOptions });
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
get themeOptions() {
|
|
1602
|
+
return this.theme === Theme.Dark ? CHART_DEFAULTS.THEME.DARK : CHART_DEFAULTS.THEME.DEFAULT;
|
|
1603
|
+
}
|
|
1604
|
+
ngOnInit() {
|
|
1605
|
+
this.chartOptions = Object.assign(Object.assign({}, this.settingsService.getDefaultChartOptions(this.type)), this.chartOptions);
|
|
1606
|
+
}
|
|
1607
|
+
ngAfterViewInit() {
|
|
1608
|
+
const ctx = this.canvas.nativeElement.getContext('2d');
|
|
1609
|
+
if (this.chart) {
|
|
1610
|
+
this.chart.destroy();
|
|
1611
|
+
}
|
|
1612
|
+
this.zone.runOutsideAngular(() => this.chart = new Chart(ctx, this.getChartConfiguration()));
|
|
1613
|
+
}
|
|
1614
|
+
ngOnDestroy() {
|
|
1615
|
+
var _a;
|
|
1616
|
+
if (this.chart) {
|
|
1617
|
+
this.chart.destroy();
|
|
1618
|
+
this.chart = void 0;
|
|
1619
|
+
}
|
|
1620
|
+
(_a = this._themeSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1621
|
+
}
|
|
1622
|
+
update() {
|
|
1623
|
+
this.zone.runOutsideAngular(() => { var _a; return (_a = this.chart) === null || _a === void 0 ? void 0 : _a.update(); });
|
|
1624
|
+
}
|
|
1625
|
+
getChartConfiguration() {
|
|
1626
|
+
return {
|
|
1627
|
+
type: this.type,
|
|
1628
|
+
data: this.getChartData(),
|
|
1629
|
+
options: this.getChartOptions(),
|
|
1630
|
+
plugins: this.plugins
|
|
1631
|
+
};
|
|
1632
|
+
}
|
|
1633
|
+
getChartData() {
|
|
1634
|
+
const chartData = this.data ? this.data : {
|
|
1635
|
+
labels: this.labels || [],
|
|
1636
|
+
datasets: this.datasets || []
|
|
1637
|
+
};
|
|
1638
|
+
if (this.chartOptions.defaultColors)
|
|
1639
|
+
this.settingsService.setDatasetStyles(this.type, chartData.datasets);
|
|
1640
|
+
return chartData;
|
|
1641
|
+
}
|
|
1642
|
+
getChartOptions() {
|
|
1643
|
+
const chartOptions = this.overrideDefaultOptionsByModel();
|
|
1644
|
+
return mergeDeep(chartOptions, this.options);
|
|
1645
|
+
}
|
|
1646
|
+
overrideDefaultOptionsByModel() {
|
|
1647
|
+
const defaultChartOptions = this.settingsService.getDefaultOptions(this.type);
|
|
1648
|
+
defaultChartOptions.scales.x.grid.display = this.chartOptions.gridLines;
|
|
1649
|
+
defaultChartOptions.scales.x.display = this.chartOptions.xAxe;
|
|
1650
|
+
defaultChartOptions.scales.y.grid.display = this.chartOptions.gridLines;
|
|
1651
|
+
defaultChartOptions.scales.y.display = this.chartOptions.yAxe;
|
|
1652
|
+
defaultChartOptions.scales.x.ticks.display = this.chartOptions.ticks;
|
|
1653
|
+
defaultChartOptions.scales.y.ticks.display = this.chartOptions.ticks;
|
|
1654
|
+
defaultChartOptions.plugins.tooltip.enabled = this.chartOptions.tooltip;
|
|
1655
|
+
defaultChartOptions.plugins.legend.display = this.chartOptions.legend;
|
|
1656
|
+
return mergeDeep(defaultChartOptions, this.themeOptions);
|
|
1657
|
+
}
|
|
1658
|
+
updateColors(model) {
|
|
1659
|
+
if (this.chart) {
|
|
1660
|
+
mergeDeep(this.chart.config.options, model.options);
|
|
1661
|
+
if (isDefined(model.dataSetColors))
|
|
1662
|
+
this.settingsService.setDatasetStyles(this.type, this.chart.config.data.datasets, model.dataSetColors);
|
|
1663
|
+
this.update();
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
ChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartComponent, deps: [{ token: i0.NgZone }, { token: ChartThemeService }, { token: ChartSettingsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1668
|
+
ChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ChartComponent, selector: "sfc-chart", inputs: { type: "type", data: "data", options: "options", plugins: "plugins", labels: "labels", datasets: "datasets", chartOptions: "chartOptions", theme: "theme" }, viewQueries: [{ propertyName: "canvas", first: true, predicate: ["chart"], descendants: true }], ngImport: i0, template: "<canvas #chart></canvas>", styles: [":host{height:inherit;width:inherit}\n"] });
|
|
1669
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ChartComponent, decorators: [{
|
|
1670
|
+
type: Component,
|
|
1671
|
+
args: [{ selector: 'sfc-chart', styles: [':host { height: inherit; width: inherit;}'], template: "<canvas #chart></canvas>" }]
|
|
1672
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: ChartThemeService }, { type: ChartSettingsService }]; }, propDecorators: { type: [{
|
|
1673
|
+
type: Input
|
|
1674
|
+
}], data: [{
|
|
1675
|
+
type: Input
|
|
1676
|
+
}], options: [{
|
|
1677
|
+
type: Input
|
|
1678
|
+
}], plugins: [{
|
|
1679
|
+
type: Input
|
|
1680
|
+
}], labels: [{
|
|
1681
|
+
type: Input
|
|
1682
|
+
}], datasets: [{
|
|
1683
|
+
type: Input
|
|
1684
|
+
}], chartOptions: [{
|
|
1685
|
+
type: Input
|
|
1686
|
+
}], theme: [{
|
|
1687
|
+
type: Input
|
|
1688
|
+
}], canvas: [{
|
|
1689
|
+
type: ViewChild,
|
|
1690
|
+
args: ['chart']
|
|
1691
|
+
}] } });
|
|
1692
|
+
|
|
1693
|
+
var TableColumnType;
|
|
1694
|
+
(function (TableColumnType) {
|
|
1695
|
+
TableColumnType["Data"] = "data";
|
|
1696
|
+
TableColumnType["Sequence"] = "sequence";
|
|
1697
|
+
TableColumnType["Selectable"] = "selectable";
|
|
1698
|
+
TableColumnType["Expanded"] = "expanded";
|
|
1699
|
+
})(TableColumnType || (TableColumnType = {}));
|
|
1700
|
+
|
|
1701
|
+
class ColumnsToggleService {
|
|
1702
|
+
constructor(window, resizeService) {
|
|
1703
|
+
this.window = window;
|
|
1704
|
+
this.resizeService = resizeService;
|
|
1705
|
+
// current state of toggle
|
|
1706
|
+
this.showColumns = false;
|
|
1707
|
+
this.toggleSubject = new Subject();
|
|
1708
|
+
// toggle state observable
|
|
1709
|
+
this.toggle$ = this.toggleSubject.asObservable()
|
|
1710
|
+
.pipe(tap(() => this.showColumns = !this.showColumns), shareReplay());
|
|
1711
|
+
// show column observable
|
|
1712
|
+
this.showColumns$ = merge(this.resizeService.onResize$.pipe(startWith(null)), this.toggle$).pipe(map(() => this.window.innerWidth >= MediaLimits.Tablet ? true : this.showColumns));
|
|
1713
|
+
}
|
|
1714
|
+
toggle() {
|
|
1715
|
+
this.toggleSubject.next();
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
ColumnsToggleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ColumnsToggleService, deps: [{ token: WINDOW }, { token: i1.ResizeService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1719
|
+
ColumnsToggleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ColumnsToggleService, providedIn: 'root' });
|
|
1720
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ColumnsToggleService, decorators: [{
|
|
1721
|
+
type: Injectable,
|
|
1722
|
+
args: [{
|
|
1723
|
+
providedIn: 'root'
|
|
1724
|
+
}]
|
|
1725
|
+
}], ctorParameters: function () {
|
|
1726
|
+
return [{ type: Window, decorators: [{
|
|
1727
|
+
type: Inject,
|
|
1728
|
+
args: [WINDOW]
|
|
1729
|
+
}] }, { type: i1.ResizeService }];
|
|
1730
|
+
} });
|
|
1731
|
+
|
|
1732
|
+
class TableSelectService {
|
|
1733
|
+
constructor() {
|
|
1734
|
+
this.selectSubject = new Subject();
|
|
1735
|
+
this.select$ = this.selectSubject.asObservable();
|
|
1736
|
+
}
|
|
1737
|
+
selectAll(selected) {
|
|
1738
|
+
this.selectSubject.next({ index: null, selected: selected });
|
|
1739
|
+
}
|
|
1740
|
+
select(index, selected) {
|
|
1741
|
+
this.selectSubject.next({ index, selected });
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
TableSelectService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TableSelectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1745
|
+
TableSelectService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TableSelectService, providedIn: 'root' });
|
|
1746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TableSelectService, decorators: [{
|
|
1747
|
+
type: Injectable,
|
|
1748
|
+
args: [{
|
|
1749
|
+
providedIn: 'root'
|
|
1750
|
+
}]
|
|
1751
|
+
}] });
|
|
1752
|
+
|
|
1753
|
+
var TableDataType;
|
|
1754
|
+
(function (TableDataType) {
|
|
1755
|
+
TableDataType["Rows"] = "rows";
|
|
1756
|
+
TableDataType["Cards"] = "cards";
|
|
1757
|
+
})(TableDataType || (TableDataType = {}));
|
|
1758
|
+
|
|
1759
|
+
class TableConstants {
|
|
1760
|
+
}
|
|
1761
|
+
TableConstants.SEQUENCE_COLUMN = { name: '№', field: '', type: TableColumnType.Sequence };
|
|
1762
|
+
TableConstants.SELECTABLE_COLUMN = { name: '', field: '', type: TableColumnType.Selectable };
|
|
1763
|
+
TableConstants.EXPANDED_COLUMN = { name: '', field: '', type: TableColumnType.Expanded };
|
|
1764
|
+
TableConstants.TOGGLE_SWITCHER_LEFT_MODEL = { label: 'List', icon: 'fa fa-table-list' };
|
|
1765
|
+
TableConstants.TOGGLE_SWITCHER_RIGHT_MODEL = { label: 'Cards', icon: 'fa fa-border-all' };
|
|
1766
|
+
TableConstants.DEFAULT_PAGE = 1;
|
|
1767
|
+
TableConstants.DEFAULT_PAGE_SIZE = 5;
|
|
1768
|
+
|
|
1769
|
+
var TableTemplate;
|
|
1770
|
+
(function (TableTemplate) {
|
|
1771
|
+
TableTemplate["Column"] = "column";
|
|
1772
|
+
TableTemplate["Row"] = "row";
|
|
1773
|
+
TableTemplate["Card"] = "card";
|
|
1774
|
+
})(TableTemplate || (TableTemplate = {}));
|
|
1775
|
+
|
|
1776
|
+
class ColumnsToggleConstants {
|
|
1777
|
+
}
|
|
1778
|
+
ColumnsToggleConstants.HIDE = {
|
|
1779
|
+
LABEL: 'Hide',
|
|
1780
|
+
ICON: 'fa fa-eye-slash'
|
|
1781
|
+
};
|
|
1782
|
+
ColumnsToggleConstants.SHOW = {
|
|
1783
|
+
LABEL: 'Show',
|
|
1784
|
+
ICON: 'fa fa-eye'
|
|
1785
|
+
};
|
|
1786
|
+
|
|
1787
|
+
class ColumnsToggleComponent {
|
|
1788
|
+
constructor(service) {
|
|
1789
|
+
this.service = service;
|
|
1790
|
+
}
|
|
1791
|
+
onToggle() {
|
|
1792
|
+
this.service.toggle();
|
|
1793
|
+
}
|
|
1794
|
+
ngOnInit() {
|
|
1795
|
+
this.vm$ = this.service.showColumns$.pipe(map(show => {
|
|
1796
|
+
return {
|
|
1797
|
+
model: show ? ColumnsToggleConstants.HIDE : ColumnsToggleConstants.SHOW,
|
|
1798
|
+
show: show
|
|
1799
|
+
};
|
|
1800
|
+
}));
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
ColumnsToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ColumnsToggleComponent, deps: [{ token: ColumnsToggleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1804
|
+
ColumnsToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ColumnsToggleComponent, selector: "sfc-columns-toggle", host: { listeners: { "click": "onToggle()" } }, ngImport: i0, template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <div>\r\n <span class=\"icon\" [sfcShowHideElement]=\"!vm.show\">\r\n <i class=\"{{vm.model.ICON}}\"></i>\r\n </span>\r\n <span class=\"icon\" [sfcShowHideElement]=\"vm.show\">\r\n <i class=\"{{vm.model.ICON}}\"></i>\r\n </span>\r\n <span class=\"label\">{{vm.model.LABEL}}</span>\r\n </div>\r\n</div>", styles: [":host{display:flex;align-items:center}:host .container{font-size:.625em;font-weight:700;text-transform:uppercase;width:100%;text-align:end;display:none;cursor:pointer;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#ccd1d9}:host .container:hover{color:#2bbbad}:host .container span.icon{position:absolute}:host .container span.label{padding-left:1.3em}@media all and (max-width: 767px){:host .container{display:block}}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.ShowHideElementDirective, selector: "[sfcShowHideElement]", inputs: ["sfcShowHideElement", "delay"] }], pipes: { "async": i2.AsyncPipe } });
|
|
1805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ColumnsToggleComponent, decorators: [{
|
|
1806
|
+
type: Component,
|
|
1807
|
+
args: [{ selector: 'sfc-columns-toggle', template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <div>\r\n <span class=\"icon\" [sfcShowHideElement]=\"!vm.show\">\r\n <i class=\"{{vm.model.ICON}}\"></i>\r\n </span>\r\n <span class=\"icon\" [sfcShowHideElement]=\"vm.show\">\r\n <i class=\"{{vm.model.ICON}}\"></i>\r\n </span>\r\n <span class=\"label\">{{vm.model.LABEL}}</span>\r\n </div>\r\n</div>", styles: [":host{display:flex;align-items:center}:host .container{font-size:.625em;font-weight:700;text-transform:uppercase;width:100%;text-align:end;display:none;cursor:pointer;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#ccd1d9}:host .container:hover{color:#2bbbad}:host .container span.icon{position:absolute}:host .container span.label{padding-left:1.3em}@media all and (max-width: 767px){:host .container{display:block}}\n"] }]
|
|
1808
|
+
}], ctorParameters: function () { return [{ type: ColumnsToggleService }]; }, propDecorators: { onToggle: [{
|
|
1809
|
+
type: HostListener,
|
|
1810
|
+
args: ['click']
|
|
1811
|
+
}] } });
|
|
1812
|
+
|
|
1813
|
+
class SelectableTableColumnComponent {
|
|
1814
|
+
constructor(service) {
|
|
1815
|
+
this.service = service;
|
|
1816
|
+
this.selected = false;
|
|
1817
|
+
}
|
|
1818
|
+
selectAll() {
|
|
1819
|
+
this.selected = !this.selected;
|
|
1820
|
+
this.service.selectAll(this.selected);
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
SelectableTableColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SelectableTableColumnComponent, deps: [{ token: TableSelectService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1824
|
+
SelectableTableColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: SelectableTableColumnComponent, selector: "sfc-selectable-table-column", inputs: { selected: "selected" }, host: { listeners: { "click": "selectAll()" }, properties: { "class.active": "this.selected" } }, ngImport: i0, template: "<div class=\"container\">\r\n <sfc-checkmark [active]=\"selected\"></sfc-checkmark>\r\n <span>ALL</span>\r\n</div>", styles: [":host{display:inline-block}:host:hover{color:#2bbbad}:host:hover span{color:#2bbbad}:host .container{text-transform:uppercase;font-size:.875em;font-weight:700;display:flex;align-items:center;justify-content:center;transition:color .3s;cursor:pointer;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#ccd1d9}:host .container span{padding-left:.31em}\n"], components: [{ type: i1.CheckmarkComponent, selector: "sfc-checkmark", inputs: ["active", "icon"] }] });
|
|
1825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: SelectableTableColumnComponent, decorators: [{
|
|
1826
|
+
type: Component,
|
|
1827
|
+
args: [{ selector: 'sfc-selectable-table-column', template: "<div class=\"container\">\r\n <sfc-checkmark [active]=\"selected\"></sfc-checkmark>\r\n <span>ALL</span>\r\n</div>", styles: [":host{display:inline-block}:host:hover{color:#2bbbad}:host:hover span{color:#2bbbad}:host .container{text-transform:uppercase;font-size:.875em;font-weight:700;display:flex;align-items:center;justify-content:center;transition:color .3s;cursor:pointer;-webkit-user-select:none;user-select:none}:host-context(.sfc-default-theme) :host .container{color:#545e61}:host-context(.sfc-dark-theme) :host .container{color:#ccd1d9}:host .container span{padding-left:.31em}\n"] }]
|
|
1828
|
+
}], ctorParameters: function () { return [{ type: TableSelectService }]; }, propDecorators: { selected: [{
|
|
1829
|
+
type: Input
|
|
1830
|
+
}, {
|
|
1831
|
+
type: HostBinding,
|
|
1832
|
+
args: [`class.${UIClass.Active}`]
|
|
1833
|
+
}], selectAll: [{
|
|
1834
|
+
type: HostListener,
|
|
1835
|
+
args: ['click']
|
|
1836
|
+
}] } });
|
|
1837
|
+
|
|
1838
|
+
class DefaultTableColumnComponent {
|
|
1839
|
+
constructor() {
|
|
1840
|
+
this.model = { name: CommonConstants.EMPTY_STRING, field: CommonConstants.EMPTY_STRING };
|
|
1841
|
+
}
|
|
1842
|
+
get active() {
|
|
1843
|
+
var _a;
|
|
1844
|
+
return ((_a = this.model.sorting) === null || _a === void 0 ? void 0 : _a.active) || false;
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
DefaultTableColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DefaultTableColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1848
|
+
DefaultTableColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DefaultTableColumnComponent, selector: "sfc-default-table-column", inputs: { model: "model" }, host: { properties: { "class.active": "this.active" } }, ngImport: i0, template: "<div class=\"container\">\r\n <div *ngIf=\"model.icon\" class=\"icon\">\r\n <i class=\"{{model.icon}}\"></i>\r\n </div>\r\n <div>\r\n <span>{{model.name}}</span>\r\n </div>\r\n</div>", styles: [":host{display:inline-block}:host.active{color:#2bbbad}:host .container{text-transform:uppercase;font-size:.875em;font-weight:700;display:flex;align-items:center;justify-content:center;color:inherit;transition:color .3s}:host .container .icon{margin-right:5px}\n"], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DefaultTableColumnComponent, decorators: [{
|
|
1850
|
+
type: Component,
|
|
1851
|
+
args: [{ selector: 'sfc-default-table-column', template: "<div class=\"container\">\r\n <div *ngIf=\"model.icon\" class=\"icon\">\r\n <i class=\"{{model.icon}}\"></i>\r\n </div>\r\n <div>\r\n <span>{{model.name}}</span>\r\n </div>\r\n</div>", styles: [":host{display:inline-block}:host.active{color:#2bbbad}:host .container{text-transform:uppercase;font-size:.875em;font-weight:700;display:flex;align-items:center;justify-content:center;color:inherit;transition:color .3s}:host .container .icon{margin-right:5px}\n"] }]
|
|
1852
|
+
}], propDecorators: { model: [{
|
|
1853
|
+
type: Input
|
|
1854
|
+
}], active: [{
|
|
1855
|
+
type: HostBinding,
|
|
1856
|
+
args: [`class.${UIClass.Active}`]
|
|
1857
|
+
}] } });
|
|
1858
|
+
|
|
1859
|
+
class BaseDefaultTableContentComponent {
|
|
1860
|
+
constructor() {
|
|
1861
|
+
this.TableColumnType = TableColumnType;
|
|
1862
|
+
this.model = { dataModel: { data: {} }, index: 0 };
|
|
1863
|
+
this.columns = [];
|
|
1864
|
+
this.selectOnClick = false;
|
|
1865
|
+
this.position = Position.Left;
|
|
1866
|
+
this.columnWidth = this.columns.length || 1;
|
|
1867
|
+
this.selected = new EventEmitter();
|
|
1868
|
+
}
|
|
1869
|
+
onContentClick() {
|
|
1870
|
+
if (this.selectOnClick)
|
|
1871
|
+
this.selected.emit(this.selectEvent);
|
|
1872
|
+
}
|
|
1873
|
+
get even() {
|
|
1874
|
+
return (this.model.index + 1) % 2 === 0;
|
|
1875
|
+
}
|
|
1876
|
+
get pointer() {
|
|
1877
|
+
return this.selectOnClick;
|
|
1878
|
+
}
|
|
1879
|
+
ngAfterViewInit() {
|
|
1880
|
+
if (this.columnCheckmark) {
|
|
1881
|
+
this._columnCheckmarkSubscription = fromEvent(this.columnCheckmark.nativeElement, 'click')
|
|
1882
|
+
.subscribe((event) => {
|
|
1883
|
+
if (this.selectOnClick)
|
|
1884
|
+
event.stopPropagation();
|
|
1885
|
+
this.selected.emit(this.selectEvent);
|
|
1886
|
+
});
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
ngOnDestroy() {
|
|
1890
|
+
if (this._columnCheckmarkSubscription)
|
|
1891
|
+
this._columnCheckmarkSubscription.unsubscribe();
|
|
1892
|
+
}
|
|
1893
|
+
get selectEvent() {
|
|
1894
|
+
return { index: this.model.index, selected: !this.model.dataModel.selected };
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
BaseDefaultTableContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: BaseDefaultTableContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1898
|
+
BaseDefaultTableContentComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: BaseDefaultTableContentComponent, inputs: { model: "model", columns: "columns", selectOnClick: "selectOnClick", position: "position", columnWidth: "columnWidth" }, outputs: { selected: "selected" }, host: { listeners: { "click": "onContentClick()" }, properties: { "class.even": "this.even", "class.pointer": "this.pointer" } }, viewQueries: [{ propertyName: "columnCheckmark", first: true, predicate: ["columnCheckmark"], descendants: true }], ngImport: i0 });
|
|
1899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: BaseDefaultTableContentComponent, decorators: [{
|
|
1900
|
+
type: Directive
|
|
1901
|
+
}], propDecorators: { model: [{
|
|
1902
|
+
type: Input
|
|
1903
|
+
}], columns: [{
|
|
1904
|
+
type: Input
|
|
1905
|
+
}], selectOnClick: [{
|
|
1906
|
+
type: Input
|
|
1907
|
+
}], position: [{
|
|
1908
|
+
type: Input
|
|
1909
|
+
}], columnWidth: [{
|
|
1910
|
+
type: Input
|
|
1911
|
+
}], selected: [{
|
|
1912
|
+
type: Output
|
|
1913
|
+
}], columnCheckmark: [{
|
|
1914
|
+
type: ViewChild,
|
|
1915
|
+
args: ['columnCheckmark', { static: false }]
|
|
1916
|
+
}], onContentClick: [{
|
|
1917
|
+
type: HostListener,
|
|
1918
|
+
args: ['click']
|
|
1919
|
+
}], even: [{
|
|
1920
|
+
type: HostBinding,
|
|
1921
|
+
args: [`class.${UIClass.Even}`]
|
|
1922
|
+
}], pointer: [{
|
|
1923
|
+
type: HostBinding,
|
|
1924
|
+
args: [`class.${UIClass.Pointer}`]
|
|
1925
|
+
}] } });
|
|
1926
|
+
|
|
1927
|
+
class DefaultTableRowComponent extends BaseDefaultTableContentComponent {
|
|
1928
|
+
get width() {
|
|
1929
|
+
return { width: getCalcValue(this.columnWidth) };
|
|
1930
|
+
}
|
|
1931
|
+
get contentPosition() {
|
|
1932
|
+
switch (this.position) {
|
|
1933
|
+
case Position.Left:
|
|
1934
|
+
return UIConstants.CSS_START;
|
|
1935
|
+
case Position.Right:
|
|
1936
|
+
return UIConstants.CSS_END;
|
|
1937
|
+
default:
|
|
1938
|
+
return UIConstants.CSS_CENTER;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
DefaultTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DefaultTableRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1943
|
+
DefaultTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DefaultTableRowComponent, selector: "sfc-default-table-row", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div [ngStyle]=\"width\" [style.text-align]=\"position\" class=\"content-container\" *ngFor=\"let column of columns\">\r\n <div class=\"content\" [style.align-items]=\"contentPosition\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <div class=\"checkmark\" #columnCheckmark *ngSwitchCase=\"TableColumnType.Selectable\">\r\n <sfc-checkmark [active]=\"model.dataModel.selected || false\"></sfc-checkmark>\r\n </div>\r\n <div *ngSwitchCase=\"TableColumnType.Sequence\">\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.sequence}}</span>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.dataModel.data[column.field]}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;border-radius:1.25em;box-shadow:0 .625em 1em #00000005;transition:background-color .3s,box-shadow .6s cubic-bezier(.25,1,.5,.1);background-color:#f5f7fa}:host.even{background-color:#e6e9ed}:host.even:hover{background-color:#ccd1d9}:host:hover{background-color:#ccd1d9}:host.pointer{cursor:pointer}:host .container{flex-flow:row wrap;padding:0 .31em;display:flex;align-items:center}:host .container .content-container{color:#545e61;font-weight:700;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none}:host .container .content-container .content{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.7em .5em}:host .container .content-container .content .name{display:none;font-size:.625em;line-height:.625em;font-weight:700;text-transform:uppercase;color:#656d78}@media all and (max-width: 767px){:host .container{align-items:flex-start}:host .container .content-container .content{align-items:flex-start;padding:.625em 1.25em}:host .container .content-container .content .name{display:block}}\n"], components: [{ type: i1.CheckmarkComponent, selector: "sfc-checkmark", inputs: ["active", "icon"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
|
1944
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DefaultTableRowComponent, decorators: [{
|
|
1945
|
+
type: Component,
|
|
1946
|
+
args: [{ selector: 'sfc-default-table-row', template: "<div class=\"container\">\r\n <div [ngStyle]=\"width\" [style.text-align]=\"position\" class=\"content-container\" *ngFor=\"let column of columns\">\r\n <div class=\"content\" [style.align-items]=\"contentPosition\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <div class=\"checkmark\" #columnCheckmark *ngSwitchCase=\"TableColumnType.Selectable\">\r\n <sfc-checkmark [active]=\"model.dataModel.selected || false\"></sfc-checkmark>\r\n </div>\r\n <div *ngSwitchCase=\"TableColumnType.Sequence\">\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.sequence}}</span>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.dataModel.data[column.field]}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{width:100%;border-radius:1.25em;box-shadow:0 .625em 1em #00000005;transition:background-color .3s,box-shadow .6s cubic-bezier(.25,1,.5,.1);background-color:#f5f7fa}:host.even{background-color:#e6e9ed}:host.even:hover{background-color:#ccd1d9}:host:hover{background-color:#ccd1d9}:host.pointer{cursor:pointer}:host .container{flex-flow:row wrap;padding:0 .31em;display:flex;align-items:center}:host .container .content-container{color:#545e61;font-weight:700;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none}:host .container .content-container .content{display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.7em .5em}:host .container .content-container .content .name{display:none;font-size:.625em;line-height:.625em;font-weight:700;text-transform:uppercase;color:#656d78}@media all and (max-width: 767px){:host .container{align-items:flex-start}:host .container .content-container .content{align-items:flex-start;padding:.625em 1.25em}:host .container .content-container .content .name{display:block}}\n"] }]
|
|
1947
|
+
}] });
|
|
1948
|
+
|
|
1949
|
+
class DefaultTableCardComponent extends BaseDefaultTableContentComponent {
|
|
1950
|
+
}
|
|
1951
|
+
DefaultTableCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DefaultTableCardComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1952
|
+
DefaultTableCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: DefaultTableCardComponent, selector: "sfc-default-table-card", usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content-container\" *ngFor=\"let column of columns\">\r\n <div class=\"content\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <div #columnCheckmark *ngSwitchCase=\"TableColumnType.Selectable\">\r\n <sfc-checkmark [active]=\"model.dataModel.selected || false\"></sfc-checkmark>\r\n </div>\r\n <div *ngSwitchCase=\"TableColumnType.Sequence\">\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.sequence}}</span>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.dataModel.data[column.field]}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{box-shadow:0 .625em 1.25em #00000030,0 .3753em .3753em #0000003b;transition:all .2s ease-in-out;border-radius:.75em;background-color:#f5f7fa}:host.even{background-color:#e6e9ed}:host.even:hover{background-color:#ccd1d9}:host:hover{background-color:#ccd1d9}:host.pointer{cursor:pointer}:host .container{flex-flow:column wrap;justify-content:center;width:min-content;display:flex;align-items:center}:host .container .content-container{color:#545e61;font-weight:700;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-align:center;text-align:left}:host .container .content-container .content{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:.625em 1.25em}:host .container .content-container .content div{width:100%;padding:0 5em}:host .container .content-container .content .name{display:block;font-size:.625em;line-height:.625em;font-weight:700;text-transform:uppercase;color:#656d78}\n"], components: [{ type: i1.CheckmarkComponent, selector: "sfc-checkmark", inputs: ["active", "icon"] }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
|
1953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: DefaultTableCardComponent, decorators: [{
|
|
1954
|
+
type: Component,
|
|
1955
|
+
args: [{ selector: 'sfc-default-table-card', template: "<div class=\"container\">\r\n <div class=\"content-container\" *ngFor=\"let column of columns\">\r\n <div class=\"content\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <div #columnCheckmark *ngSwitchCase=\"TableColumnType.Selectable\">\r\n <sfc-checkmark [active]=\"model.dataModel.selected || false\"></sfc-checkmark>\r\n </div>\r\n <div *ngSwitchCase=\"TableColumnType.Sequence\">\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.sequence}}</span>\r\n </div>\r\n <div *ngSwitchDefault>\r\n <span class=\"name\">{{column.name}}</span>\r\n <span>{{model.dataModel.data[column.field]}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>", styles: [":host{box-shadow:0 .625em 1.25em #00000030,0 .3753em .3753em #0000003b;transition:all .2s ease-in-out;border-radius:.75em;background-color:#f5f7fa}:host.even{background-color:#e6e9ed}:host.even:hover{background-color:#ccd1d9}:host:hover{background-color:#ccd1d9}:host.pointer{cursor:pointer}:host .container{flex-flow:column wrap;justify-content:center;width:min-content;display:flex;align-items:center}:host .container .content-container{color:#545e61;font-weight:700;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-align:center;text-align:left}:host .container .content-container .content{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:.625em 1.25em}:host .container .content-container .content div{width:100%;padding:0 5em}:host .container .content-container .content .name{display:block;font-size:.625em;line-height:.625em;font-weight:700;text-transform:uppercase;color:#656d78}\n"] }]
|
|
1956
|
+
}] });
|
|
1957
|
+
|
|
1958
|
+
class TableComponent {
|
|
1959
|
+
constructor(window, paginationService, selectedService, sortingService, changeDetector, resizeService, columnsToggleService, iterableDiffers) {
|
|
1960
|
+
this.window = window;
|
|
1961
|
+
this.paginationService = paginationService;
|
|
1962
|
+
this.selectedService = selectedService;
|
|
1963
|
+
this.sortingService = sortingService;
|
|
1964
|
+
this.changeDetector = changeDetector;
|
|
1965
|
+
this.resizeService = resizeService;
|
|
1966
|
+
this.columnsToggleService = columnsToggleService;
|
|
1967
|
+
this.iterableDiffers = iterableDiffers;
|
|
1968
|
+
this.TableDataType = TableDataType;
|
|
1969
|
+
this.TableColumnType = TableColumnType;
|
|
1970
|
+
this.TableTemplate = TableTemplate;
|
|
1971
|
+
this.Constants = TableConstants;
|
|
1972
|
+
this.position = Position.Center;
|
|
1973
|
+
this.delimeter = false;
|
|
1974
|
+
this.dataType = TableDataType.Rows;
|
|
1975
|
+
this.dataToggle = true;
|
|
1976
|
+
this.showColumns = true;
|
|
1977
|
+
this.pagination = { enabled: true, page: TableConstants.DEFAULT_PAGE, size: TableConstants.DEFAULT_PAGE_SIZE };
|
|
1978
|
+
this.sequence = false;
|
|
1979
|
+
this.expanded = false;
|
|
1980
|
+
this.selectable = false;
|
|
1981
|
+
this.selectOnClick = false;
|
|
1982
|
+
// End Template references
|
|
1983
|
+
//Data
|
|
1984
|
+
this.data = [];
|
|
1985
|
+
// End Data
|
|
1986
|
+
// Columns
|
|
1987
|
+
this.columns = [];
|
|
1988
|
+
this.columnsSubject = new BehaviorSubject(this.columns);
|
|
1989
|
+
// End Columns
|
|
1990
|
+
this.allRowsSelected = false;
|
|
1991
|
+
this.dataDiffer = iterableDiffers.find([]).create(undefined);
|
|
1992
|
+
this.columnsDiffer = iterableDiffers.find([]).create(undefined);
|
|
1993
|
+
}
|
|
1994
|
+
set data$(value) {
|
|
1995
|
+
this._data$ = value;
|
|
1996
|
+
this.paginationService.init(this._data$, this.pagination.page, this.pagination.size);
|
|
1997
|
+
}
|
|
1998
|
+
get data$() {
|
|
1999
|
+
return this._data$;
|
|
2000
|
+
}
|
|
2001
|
+
ngOnInit() {
|
|
2002
|
+
// if data is static, make it observable
|
|
2003
|
+
if (!isDefined(this.data$)) {
|
|
2004
|
+
this.dataSubject = new BehaviorSubject(this.data);
|
|
2005
|
+
this.data$ = this.dataSubject.asObservable();
|
|
2006
|
+
}
|
|
2007
|
+
// set up data models with indexes
|
|
2008
|
+
const dataIndexed$ = this.data$.pipe(map((data) => data.map((dataModel, index) => { return { index, dataModel }; }))),
|
|
2009
|
+
// set up sorting observable
|
|
2010
|
+
sorting$ = this.getSortingObservable(),
|
|
2011
|
+
// set up selection observable
|
|
2012
|
+
selection$ = this.selectedService.select$.pipe(startWith(null));
|
|
2013
|
+
// set up columns (conditionally add sequence or selectable columns)
|
|
2014
|
+
this.columns$ = this.columnsSubject.asObservable().pipe(map(columns => {
|
|
2015
|
+
let tableColumns = columns.slice(0);
|
|
2016
|
+
if (this.sequence)
|
|
2017
|
+
tableColumns.unshift(TableConstants.SEQUENCE_COLUMN);
|
|
2018
|
+
if (this.selectable)
|
|
2019
|
+
tableColumns.unshift(TableConstants.SELECTABLE_COLUMN);
|
|
2020
|
+
if (this.expanded)
|
|
2021
|
+
tableColumns.push(TableConstants.EXPANDED_COLUMN);
|
|
2022
|
+
return tableColumns;
|
|
2023
|
+
}));
|
|
2024
|
+
this.columnsSorting$ = combineLatest([this.columns$, sorting$]).pipe(map(([columns, event]) => {
|
|
2025
|
+
columns.forEach(column => {
|
|
2026
|
+
var _a;
|
|
2027
|
+
if ((_a = column.sorting) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
2028
|
+
column.sorting.active = column.field == (event === null || event === void 0 ? void 0 : event.id) || false;
|
|
2029
|
+
if (!column.sorting.active)
|
|
2030
|
+
column.sorting.direction = SortingDirection.Ascending;
|
|
2031
|
+
}
|
|
2032
|
+
});
|
|
2033
|
+
return columns;
|
|
2034
|
+
}));
|
|
2035
|
+
// set up main data observable
|
|
2036
|
+
this.dataValue$ = combineLatest([
|
|
2037
|
+
dataIndexed$,
|
|
2038
|
+
this.paginationService.pagination$,
|
|
2039
|
+
sorting$,
|
|
2040
|
+
selection$
|
|
2041
|
+
]).pipe(map(([data, paginationEvent, sortingEvent, selectionEvent]) => {
|
|
2042
|
+
// handle selection
|
|
2043
|
+
this.handleSelectionEvent(data, selectionEvent);
|
|
2044
|
+
// handle pagination and sorting
|
|
2045
|
+
let sortedData = this.sortData(data, sortingEvent), paginatedData = this.paginateData(sortedData, paginationEvent);
|
|
2046
|
+
// handle data sequence
|
|
2047
|
+
if (this.sequence) {
|
|
2048
|
+
this.updateRowSequenceValues(paginationEvent.page, paginatedData);
|
|
2049
|
+
}
|
|
2050
|
+
return paginatedData;
|
|
2051
|
+
}));
|
|
2052
|
+
}
|
|
2053
|
+
ngAfterViewInit() {
|
|
2054
|
+
// combine all observable to view model
|
|
2055
|
+
this.vm$ = combineLatest([
|
|
2056
|
+
this.columnsSorting$,
|
|
2057
|
+
this.dataValue$,
|
|
2058
|
+
this.columnsToggleService.showColumns$,
|
|
2059
|
+
this.columnWidth$
|
|
2060
|
+
]).pipe(map(([columns, data, showColumns, columnWidth]) => {
|
|
2061
|
+
return {
|
|
2062
|
+
columns,
|
|
2063
|
+
data,
|
|
2064
|
+
columnWidth,
|
|
2065
|
+
showColumns: this.showColumns && showColumns,
|
|
2066
|
+
columnStyle: { width: getCalcValue(columnWidth), justifyContent: this.position }
|
|
2067
|
+
};
|
|
2068
|
+
}));
|
|
2069
|
+
}
|
|
2070
|
+
ngAfterViewChecked() {
|
|
2071
|
+
this.changeDetector.detectChanges();
|
|
2072
|
+
}
|
|
2073
|
+
ngDoCheck() {
|
|
2074
|
+
if (this.dataDiffer.diff(this.data)) {
|
|
2075
|
+
this.dataSubject.next(this.data);
|
|
2076
|
+
}
|
|
2077
|
+
if (this.columnsDiffer.diff(this.columns)) {
|
|
2078
|
+
this.columnsSubject.next(this.columns);
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
ngAfterContentChecked() {
|
|
2082
|
+
this.changeDetector.detectChanges();
|
|
2083
|
+
}
|
|
2084
|
+
ngAfterContentInit() {
|
|
2085
|
+
this.columnWidth$ = combineLatest([
|
|
2086
|
+
this.resizeService.onResize$.pipe(startWith({})),
|
|
2087
|
+
this.columns$
|
|
2088
|
+
]).pipe(map(([_, columns]) => this.getColumnWidth(this.window.innerWidth, columns.length)));
|
|
2089
|
+
}
|
|
2090
|
+
onDataTypeToggle() {
|
|
2091
|
+
this.dataType = this.dataType == TableDataType.Rows ? TableDataType.Cards : TableDataType.Rows;
|
|
2092
|
+
}
|
|
2093
|
+
selectRow(model) {
|
|
2094
|
+
this.selectedService.select(model.index, model.selected);
|
|
2095
|
+
}
|
|
2096
|
+
getSortingObservable() {
|
|
2097
|
+
var _a;
|
|
2098
|
+
const firstSortingColumn = firstOrDefault(this.columns, column => { var _a; return ((_a = column === null || column === void 0 ? void 0 : column.sorting) === null || _a === void 0 ? void 0 : _a.enabled) || false; });
|
|
2099
|
+
return this.sortingService.sorting$.pipe(startWith(firstSortingColumn ? { id: firstSortingColumn.field, direction: ((_a = firstSortingColumn.sorting) === null || _a === void 0 ? void 0 : _a.direction) || SortingDirection.Ascending } : null));
|
|
2100
|
+
}
|
|
2101
|
+
getColumnWidth(windowWidth, columnsLength) {
|
|
2102
|
+
if (windowWidth <= MediaLimits.Phone)
|
|
2103
|
+
return 1;
|
|
2104
|
+
if (windowWidth <= MediaLimits.Tablet)
|
|
2105
|
+
return Math.ceil(columnsLength / 2);
|
|
2106
|
+
return columnsLength;
|
|
2107
|
+
}
|
|
2108
|
+
handleSelectionEvent(data, selectionEvent) {
|
|
2109
|
+
if (selectionEvent != null) {
|
|
2110
|
+
if (selectionEvent.index == null) {
|
|
2111
|
+
data.forEach(item => item.dataModel.selected = selectionEvent.selected);
|
|
2112
|
+
}
|
|
2113
|
+
else {
|
|
2114
|
+
data.forEach(item => {
|
|
2115
|
+
if (selectionEvent.index === item.index) {
|
|
2116
|
+
item.dataModel.selected = selectionEvent.selected;
|
|
2117
|
+
}
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
this.allRowsSelected = all(data, item => Boolean(item.dataModel.selected));
|
|
2122
|
+
}
|
|
2123
|
+
paginateData(data, paginationEvent) {
|
|
2124
|
+
let pagedData = this.pagination.enabled
|
|
2125
|
+
? data.slice((paginationEvent.page - 1) * this.pagination.size, paginationEvent.page * this.pagination.size)
|
|
2126
|
+
: data;
|
|
2127
|
+
return pagedData;
|
|
2128
|
+
}
|
|
2129
|
+
sortData(data, sortingEvent) {
|
|
2130
|
+
const sortedData = sortingEvent && hasItemBy(this.columns, col => col.field == sortingEvent.id)
|
|
2131
|
+
? sortByPath(data, `dataModel.data.${sortingEvent.id}`, sortingEvent.direction)
|
|
2132
|
+
: data;
|
|
2133
|
+
return sortedData;
|
|
2134
|
+
}
|
|
2135
|
+
updateRowSequenceValues(page, data) {
|
|
2136
|
+
let from = (page - 1) * this.pagination.size;
|
|
2137
|
+
data.forEach(item => {
|
|
2138
|
+
item.sequence = from + 1;
|
|
2139
|
+
from++;
|
|
2140
|
+
});
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TableComponent, deps: [{ token: WINDOW }, { token: i1.PaginationService }, { token: TableSelectService }, { token: i1.SortingService }, { token: i0.ChangeDetectorRef }, { token: i1.ResizeService }, { token: ColumnsToggleService }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
|
|
2144
|
+
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: TableComponent, selector: "sfc-table", inputs: { position: "position", delimeter: "delimeter", dataType: "dataType", dataToggle: "dataToggle", showColumns: "showColumns", pagination: "pagination", sequence: "sequence", expanded: "expanded", selectable: "selectable", selectOnClick: "selectOnClick", columnContent: "columnContent", rowContent: "rowContent", cardContent: "cardContent", data: "data", data$: "data$", columns: "columns" }, host: { properties: { "class": "this.dataType" } }, providers: [PaginationService, SortingService, TableSelectService, ColumnsToggleService, ResizeService], queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], ngImport: i0, template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <div class=\"columns-container\">\r\n <div class=\"columns-actions\">\r\n <sfc-columns-toggle *ngIf=\"showColumns\"></sfc-columns-toggle>\r\n <sfc-toggle-switcher *ngIf=\"dataToggle\" [active]=\"dataType === TableDataType.Cards\"\r\n [leftModel]=\"Constants.TOGGLE_SWITCHER_LEFT_MODEL\" [rightModel]=\"Constants.TOGGLE_SWITCHER_RIGHT_MODEL\"\r\n (click)=\"onDataTypeToggle()\">\r\n </sfc-toggle-switcher>\r\n </div>\r\n\r\n <div *ngIf=\"vm.showColumns\" class=\"columns\">\r\n <div class=\"column\" [ngStyle]=\"vm.columnStyle\" *ngFor=\"let column of vm.columns\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <sfc-selectable-table-column *ngSwitchCase=\"TableColumnType.Selectable\"\r\n [selected]=\"allRowsSelected\">\r\n </sfc-selectable-table-column>\r\n\r\n <sfc-sorting *ngSwitchDefault [model]=\"column.sorting\" [id]=\"column.field\">\r\n\r\n <sfc-template-content [referenceContent]=\"columnContent\" [templatesContent]=\"templates\"\r\n [templateType]=\"TableTemplate.Column\" [defaultContent]=\"defaultColumn\"\r\n [contextData]=\"column\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultColumn>\r\n <sfc-default-table-column [model]=\"column\"></sfc-default-table-column>\r\n </ng-template>\r\n\r\n </sfc-sorting>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <sfc-delimeter *ngIf=\"delimeter\"></sfc-delimeter>\r\n\r\n <div class=\"rows-container\">\r\n <div class=\"row\" *ngFor=\"let item of vm.data\">\r\n\r\n <ng-container [ngSwitch]=\"dataType\">\r\n <sfc-template-content *ngSwitchCase=\"TableDataType.Rows\" [referenceContent]=\"rowContent\"\r\n [templatesContent]=\"templates\" [templateType]=\"TableTemplate.Row\" [defaultContent]=\"defaultRow\"\r\n [contextData]=\"{model: item, columns: vm.columns, columnWidth: vm.columnWidth, position: position}\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultRow>\r\n <sfc-default-table-row [columns]=\"vm.columns\" [model]=\"item\" [position]=\"position\"\r\n [columnWidth]=\"vm.columnWidth\" [selectOnClick]=\"selectOnClick\" (selected)=\"selectRow($event)\">\r\n </sfc-default-table-row>\r\n </ng-template>\r\n\r\n <sfc-template-content *ngSwitchCase=\"TableDataType.Cards\" [referenceContent]=\"cardContent\"\r\n [templatesContent]=\"templates\" [templateType]=\"TableTemplate.Card\" [defaultContent]=\"defaultCard\"\r\n [contextData]=\"{model: item, columns: vm.columns}\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultCard>\r\n <sfc-default-table-card [columns]=\"vm.columns\" [model]=\"item\" [selectOnClick]=\"selectOnClick\"\r\n (selected)=\"selectRow($event)\">\r\n </sfc-default-table-card>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"pagination-container\">\r\n <sfc-pagination *ngIf=\"pagination.enabled\" [limits]=\"false\" [full]=\"false\" [data$]=\"data$\"></sfc-pagination>\r\n </div>\r\n</div>", styles: [":host .container{display:block;margin:2em auto;width:90%}:host .container .columns-container{display:flex;flex-flow:row wrap;transition:.5s;justify-content:space-between}:host .container .columns-container .columns-actions{display:flex;align-items:center;width:100%}:host .container .columns-container .columns-actions sfc-toggle-switcher{margin-left:auto}:host .container .columns-container .columns{text-align:center;padding:.5em;width:100%;display:flex;flex-flow:row wrap}:host .container .columns-container .columns .column{text-align:center;padding:.5em;display:flex;align-items:center;justify-content:center;box-sizing:border-box}:host .container .rows-container{display:flex;flex-wrap:wrap;justify-content:center;transition:.5s;gap:1em;margin-block:1em 2em}:host .container .rows-container .row{display:contents}\n"], components: [{ type: ColumnsToggleComponent, selector: "sfc-columns-toggle" }, { type: i1.ToggleSwitcherComponent, selector: "sfc-toggle-switcher", inputs: ["active", "leftModel", "rightModel"] }, { type: SelectableTableColumnComponent, selector: "sfc-selectable-table-column", inputs: ["selected"] }, { type: i1.SortingComponent, selector: "sfc-sorting", inputs: ["id", "model"] }, { type: i1.TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }, { type: DefaultTableColumnComponent, selector: "sfc-default-table-column", inputs: ["model"] }, { type: i1.DelimeterComponent, selector: "sfc-delimeter" }, { type: DefaultTableRowComponent, selector: "sfc-default-table-row" }, { type: DefaultTableCardComponent, selector: "sfc-default-table-card" }, { type: i1.PaginationComponent, selector: "sfc-pagination", inputs: ["count", "full", "limits", "data$"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }], pipes: { "async": i2.AsyncPipe } });
|
|
2145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: TableComponent, decorators: [{
|
|
2146
|
+
type: Component,
|
|
2147
|
+
args: [{ selector: 'sfc-table', providers: [PaginationService, SortingService, TableSelectService, ColumnsToggleService, ResizeService], template: "<div class=\"container\" *ngIf=\"vm$ | async as vm\">\r\n <div class=\"columns-container\">\r\n <div class=\"columns-actions\">\r\n <sfc-columns-toggle *ngIf=\"showColumns\"></sfc-columns-toggle>\r\n <sfc-toggle-switcher *ngIf=\"dataToggle\" [active]=\"dataType === TableDataType.Cards\"\r\n [leftModel]=\"Constants.TOGGLE_SWITCHER_LEFT_MODEL\" [rightModel]=\"Constants.TOGGLE_SWITCHER_RIGHT_MODEL\"\r\n (click)=\"onDataTypeToggle()\">\r\n </sfc-toggle-switcher>\r\n </div>\r\n\r\n <div *ngIf=\"vm.showColumns\" class=\"columns\">\r\n <div class=\"column\" [ngStyle]=\"vm.columnStyle\" *ngFor=\"let column of vm.columns\">\r\n <ng-container [ngSwitch]=\"column.type\">\r\n <sfc-selectable-table-column *ngSwitchCase=\"TableColumnType.Selectable\"\r\n [selected]=\"allRowsSelected\">\r\n </sfc-selectable-table-column>\r\n\r\n <sfc-sorting *ngSwitchDefault [model]=\"column.sorting\" [id]=\"column.field\">\r\n\r\n <sfc-template-content [referenceContent]=\"columnContent\" [templatesContent]=\"templates\"\r\n [templateType]=\"TableTemplate.Column\" [defaultContent]=\"defaultColumn\"\r\n [contextData]=\"column\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultColumn>\r\n <sfc-default-table-column [model]=\"column\"></sfc-default-table-column>\r\n </ng-template>\r\n\r\n </sfc-sorting>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <sfc-delimeter *ngIf=\"delimeter\"></sfc-delimeter>\r\n\r\n <div class=\"rows-container\">\r\n <div class=\"row\" *ngFor=\"let item of vm.data\">\r\n\r\n <ng-container [ngSwitch]=\"dataType\">\r\n <sfc-template-content *ngSwitchCase=\"TableDataType.Rows\" [referenceContent]=\"rowContent\"\r\n [templatesContent]=\"templates\" [templateType]=\"TableTemplate.Row\" [defaultContent]=\"defaultRow\"\r\n [contextData]=\"{model: item, columns: vm.columns, columnWidth: vm.columnWidth, position: position}\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultRow>\r\n <sfc-default-table-row [columns]=\"vm.columns\" [model]=\"item\" [position]=\"position\"\r\n [columnWidth]=\"vm.columnWidth\" [selectOnClick]=\"selectOnClick\" (selected)=\"selectRow($event)\">\r\n </sfc-default-table-row>\r\n </ng-template>\r\n\r\n <sfc-template-content *ngSwitchCase=\"TableDataType.Cards\" [referenceContent]=\"cardContent\"\r\n [templatesContent]=\"templates\" [templateType]=\"TableTemplate.Card\" [defaultContent]=\"defaultCard\"\r\n [contextData]=\"{model: item, columns: vm.columns}\">\r\n </sfc-template-content>\r\n\r\n <ng-template #defaultCard>\r\n <sfc-default-table-card [columns]=\"vm.columns\" [model]=\"item\" [selectOnClick]=\"selectOnClick\"\r\n (selected)=\"selectRow($event)\">\r\n </sfc-default-table-card>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n <div class=\"pagination-container\">\r\n <sfc-pagination *ngIf=\"pagination.enabled\" [limits]=\"false\" [full]=\"false\" [data$]=\"data$\"></sfc-pagination>\r\n </div>\r\n</div>", styles: [":host .container{display:block;margin:2em auto;width:90%}:host .container .columns-container{display:flex;flex-flow:row wrap;transition:.5s;justify-content:space-between}:host .container .columns-container .columns-actions{display:flex;align-items:center;width:100%}:host .container .columns-container .columns-actions sfc-toggle-switcher{margin-left:auto}:host .container .columns-container .columns{text-align:center;padding:.5em;width:100%;display:flex;flex-flow:row wrap}:host .container .columns-container .columns .column{text-align:center;padding:.5em;display:flex;align-items:center;justify-content:center;box-sizing:border-box}:host .container .rows-container{display:flex;flex-wrap:wrap;justify-content:center;transition:.5s;gap:1em;margin-block:1em 2em}:host .container .rows-container .row{display:contents}\n"] }]
|
|
2148
|
+
}], ctorParameters: function () {
|
|
2149
|
+
return [{ type: Window, decorators: [{
|
|
2150
|
+
type: Inject,
|
|
2151
|
+
args: [WINDOW]
|
|
2152
|
+
}] }, { type: i1.PaginationService }, { type: TableSelectService }, { type: i1.SortingService }, { type: i0.ChangeDetectorRef }, { type: i1.ResizeService }, { type: ColumnsToggleService }, { type: i0.IterableDiffers }];
|
|
2153
|
+
}, propDecorators: { position: [{
|
|
2154
|
+
type: Input
|
|
2155
|
+
}], delimeter: [{
|
|
2156
|
+
type: Input
|
|
2157
|
+
}], dataType: [{
|
|
2158
|
+
type: Input
|
|
2159
|
+
}, {
|
|
2160
|
+
type: HostBinding,
|
|
2161
|
+
args: ['class']
|
|
2162
|
+
}], dataToggle: [{
|
|
2163
|
+
type: Input
|
|
2164
|
+
}], showColumns: [{
|
|
2165
|
+
type: Input
|
|
2166
|
+
}], pagination: [{
|
|
2167
|
+
type: Input
|
|
2168
|
+
}], sequence: [{
|
|
2169
|
+
type: Input
|
|
2170
|
+
}], expanded: [{
|
|
2171
|
+
type: Input
|
|
2172
|
+
}], selectable: [{
|
|
2173
|
+
type: Input
|
|
2174
|
+
}], selectOnClick: [{
|
|
2175
|
+
type: Input
|
|
2176
|
+
}], columnContent: [{
|
|
2177
|
+
type: Input
|
|
2178
|
+
}], rowContent: [{
|
|
2179
|
+
type: Input
|
|
2180
|
+
}], cardContent: [{
|
|
2181
|
+
type: Input
|
|
2182
|
+
}], data: [{
|
|
2183
|
+
type: Input
|
|
2184
|
+
}], data$: [{
|
|
2185
|
+
type: Input
|
|
2186
|
+
}], columns: [{
|
|
2187
|
+
type: Input
|
|
2188
|
+
}], templates: [{
|
|
2189
|
+
type: ContentChildren,
|
|
2190
|
+
args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
|
|
2191
|
+
}] } });
|
|
2192
|
+
|
|
2193
|
+
var ExpandedTableRowTemplate;
|
|
2194
|
+
(function (ExpandedTableRowTemplate) {
|
|
2195
|
+
ExpandedTableRowTemplate["Row"] = "row";
|
|
2196
|
+
ExpandedTableRowTemplate["Content"] = "content";
|
|
2197
|
+
})(ExpandedTableRowTemplate || (ExpandedTableRowTemplate = {}));
|
|
2198
|
+
|
|
2199
|
+
class ExpandedTableRowComponent extends BaseDefaultTableContentComponent {
|
|
2200
|
+
constructor() {
|
|
2201
|
+
super(...arguments);
|
|
2202
|
+
this.ExpandedTemplate = ExpandedTableRowTemplate;
|
|
2203
|
+
this.expanded = false;
|
|
2204
|
+
}
|
|
2205
|
+
get contextData() {
|
|
2206
|
+
return {
|
|
2207
|
+
model: this.model,
|
|
2208
|
+
columns: this.columns,
|
|
2209
|
+
columnWidth: Math.max(1, this.columnWidth),
|
|
2210
|
+
position: this.position,
|
|
2211
|
+
expanded: this.expanded,
|
|
2212
|
+
even: this.even
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
ExpandedTableRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ExpandedTableRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2217
|
+
ExpandedTableRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: ExpandedTableRowComponent, selector: "sfc-expanded-table-row", inputs: { expanded: "expanded", row: "row", content: "content" }, host: { properties: { "class.expanded": "this.expanded" } }, queries: [{ propertyName: "templates", predicate: TemplateReferenceDirective, read: TemplateReferenceDirective }], usesInheritance: true, ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"content\" (click)=\"expanded = !expanded\">\r\n <sfc-template-content [referenceContent]=\"row\" [templatesContent]=\"templates\"\r\n [templateType]=\"ExpandedTemplate.Row\" [contextData]=\"contextData\">\r\n </sfc-template-content>\r\n </div>\r\n <div class=\"expanded\">\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"ExpandedTemplate.Content\" [contextData]=\"contextData\">\r\n </sfc-template-content>\r\n </div>\r\n</div>", styles: [":host{width:100%;cursor:pointer;-webkit-user-select:none;user-select:none}:host .expanded{max-height:0;overflow:hidden}:host.expanded .expanded{max-height:3000px}\n"], components: [{ type: i1.TemplateContentComponent, selector: "sfc-template-content", inputs: ["contextData", "referenceContent", "templateType", "templatesContent", "defaultContent"] }] });
|
|
2218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: ExpandedTableRowComponent, decorators: [{
|
|
2219
|
+
type: Component,
|
|
2220
|
+
args: [{ selector: 'sfc-expanded-table-row', template: "<div class=\"container\">\r\n <div class=\"content\" (click)=\"expanded = !expanded\">\r\n <sfc-template-content [referenceContent]=\"row\" [templatesContent]=\"templates\"\r\n [templateType]=\"ExpandedTemplate.Row\" [contextData]=\"contextData\">\r\n </sfc-template-content>\r\n </div>\r\n <div class=\"expanded\">\r\n <sfc-template-content [referenceContent]=\"content\" [templatesContent]=\"templates\"\r\n [templateType]=\"ExpandedTemplate.Content\" [contextData]=\"contextData\">\r\n </sfc-template-content>\r\n </div>\r\n</div>", styles: [":host{width:100%;cursor:pointer;-webkit-user-select:none;user-select:none}:host .expanded{max-height:0;overflow:hidden}:host.expanded .expanded{max-height:3000px}\n"] }]
|
|
2221
|
+
}], propDecorators: { expanded: [{
|
|
2222
|
+
type: Input
|
|
2223
|
+
}, {
|
|
2224
|
+
type: HostBinding,
|
|
2225
|
+
args: ['class.' + UIClass.Expanded]
|
|
2226
|
+
}], row: [{
|
|
2227
|
+
type: Input
|
|
2228
|
+
}], content: [{
|
|
2229
|
+
type: Input
|
|
2230
|
+
}], templates: [{
|
|
2231
|
+
type: ContentChildren,
|
|
2232
|
+
args: [TemplateReferenceDirective, { read: TemplateReferenceDirective }]
|
|
2233
|
+
}] } });
|
|
2234
|
+
|
|
2235
|
+
var CarouselProperty;
|
|
2236
|
+
(function (CarouselProperty) {
|
|
2237
|
+
CarouselProperty["Position"] = "position";
|
|
2238
|
+
CarouselProperty["Settings"] = "settings";
|
|
2239
|
+
CarouselProperty["Width"] = "width";
|
|
2240
|
+
CarouselProperty["Items"] = "items";
|
|
2241
|
+
})(CarouselProperty || (CarouselProperty = {}));
|
|
2242
|
+
;
|
|
2243
|
+
var CarouselState;
|
|
2244
|
+
(function (CarouselState) {
|
|
2245
|
+
CarouselState["Busy"] = "busy";
|
|
2246
|
+
CarouselState["Interacting"] = "interacting";
|
|
2247
|
+
CarouselState["Rotating"] = "rotating";
|
|
2248
|
+
})(CarouselState || (CarouselState = {}));
|
|
2249
|
+
;
|
|
2250
|
+
var CarouselEventType;
|
|
2251
|
+
(function (CarouselEventType) {
|
|
2252
|
+
CarouselEventType["Initializing"] = "initializing";
|
|
2253
|
+
CarouselEventType["Initialized"] = "initialized";
|
|
2254
|
+
CarouselEventType["Change"] = "change";
|
|
2255
|
+
CarouselEventType["Changed"] = "changed";
|
|
2256
|
+
CarouselEventType["Resize"] = "resize";
|
|
2257
|
+
CarouselEventType["Resizing"] = "resizing";
|
|
2258
|
+
CarouselEventType["Resized"] = "resized";
|
|
2259
|
+
CarouselEventType["Refresh"] = "refresh";
|
|
2260
|
+
CarouselEventType["Refreshed"] = "refreshed";
|
|
2261
|
+
CarouselEventType["Translate"] = "translate";
|
|
2262
|
+
CarouselEventType["Translated"] = "translated";
|
|
2263
|
+
CarouselEventType["Animating"] = "animating";
|
|
2264
|
+
CarouselEventType["Refreshing"] = "refreshing";
|
|
2265
|
+
})(CarouselEventType || (CarouselEventType = {}));
|
|
2266
|
+
;
|
|
2267
|
+
|
|
2268
|
+
let nextId = 0;
|
|
2269
|
+
/* eslint-disable */
|
|
2270
|
+
class CarouselSlideDirective {
|
|
2271
|
+
constructor(tplRef) {
|
|
2272
|
+
this.tplRef = tplRef;
|
|
2273
|
+
this.id = `slide-${nextId++}`;
|
|
2274
|
+
this._dataMerge = 1;
|
|
2275
|
+
this.width = 0;
|
|
2276
|
+
}
|
|
2277
|
+
set dataMerge(data) {
|
|
2278
|
+
this._dataMerge = isNumeric(data) ? data : 1;
|
|
2279
|
+
}
|
|
2280
|
+
;
|
|
2281
|
+
get dataMerge() { return this._dataMerge; }
|
|
2282
|
+
}
|
|
2283
|
+
CarouselSlideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselSlideDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2284
|
+
CarouselSlideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.7", type: CarouselSlideDirective, selector: "ng-template[sfcCarouselSlide]", inputs: { id: "id", dataMerge: "dataMerge", width: "width" }, ngImport: i0 });
|
|
2285
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselSlideDirective, decorators: [{
|
|
2286
|
+
type: Directive,
|
|
2287
|
+
args: [{ selector: 'ng-template[sfcCarouselSlide]' }]
|
|
2288
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { id: [{
|
|
2289
|
+
type: Input
|
|
2290
|
+
}], dataMerge: [{
|
|
2291
|
+
type: Input
|
|
2292
|
+
}], width: [{
|
|
2293
|
+
type: Input
|
|
2294
|
+
}] } });
|
|
2295
|
+
|
|
2296
|
+
class CarouselServiceConstants {
|
|
2297
|
+
}
|
|
2298
|
+
CarouselServiceConstants.CLONE_ID_PREFIX = 'cloned-';
|
|
2299
|
+
CarouselServiceConstants.DEFAULT_OPTIONS = {
|
|
2300
|
+
items: 3,
|
|
2301
|
+
skip_validateItems: false,
|
|
2302
|
+
loop: false,
|
|
2303
|
+
center: false,
|
|
2304
|
+
rewind: false,
|
|
2305
|
+
margin: 0,
|
|
2306
|
+
stagePadding: 0,
|
|
2307
|
+
merge: false,
|
|
2308
|
+
mergeFit: true,
|
|
2309
|
+
autoWidth: false,
|
|
2310
|
+
startPosition: 0,
|
|
2311
|
+
rtl: false,
|
|
2312
|
+
responsive: {},
|
|
2313
|
+
responsiveRefreshRate: 200,
|
|
2314
|
+
// defaults to Navigation
|
|
2315
|
+
nav: false,
|
|
2316
|
+
navText: ['prev', 'next'],
|
|
2317
|
+
navSpeed: false,
|
|
2318
|
+
slideBy: 1,
|
|
2319
|
+
dots: true,
|
|
2320
|
+
dotsEach: false,
|
|
2321
|
+
navigationDotsModel: false,
|
|
2322
|
+
dotsSpeed: false,
|
|
2323
|
+
// defaults to Autoplay
|
|
2324
|
+
autoplay: false,
|
|
2325
|
+
autoplayTimeout: 5000,
|
|
2326
|
+
autoplayHoverPause: false,
|
|
2327
|
+
autoplaySpeed: false,
|
|
2328
|
+
autoplayMouseleaveTimeout: 1,
|
|
2329
|
+
// defaults to LazyLoading
|
|
2330
|
+
lazyLoad: false,
|
|
2331
|
+
lazyLoadEager: 0,
|
|
2332
|
+
// defaults to Animate
|
|
2333
|
+
slideTransition: '',
|
|
2334
|
+
animateOut: false,
|
|
2335
|
+
animateIn: false,
|
|
2336
|
+
// defaults to AutoHeight
|
|
2337
|
+
autoHeight: false
|
|
2338
|
+
};
|
|
2339
|
+
|
|
2340
|
+
var Type;
|
|
2341
|
+
(function (Type) {
|
|
2342
|
+
Type["Event"] = "event";
|
|
2343
|
+
Type["State"] = "state";
|
|
2344
|
+
})(Type || (Type = {}));
|
|
2345
|
+
;
|
|
2346
|
+
var Width;
|
|
2347
|
+
(function (Width) {
|
|
2348
|
+
Width["Default"] = "default";
|
|
2349
|
+
Width["Inner"] = "inner";
|
|
2350
|
+
Width["Outer"] = "outer";
|
|
2351
|
+
})(Width || (Width = {}));
|
|
2352
|
+
;
|
|
2353
|
+
|
|
2354
|
+
class CarouselService {
|
|
2355
|
+
constructor() {
|
|
2356
|
+
this._viewSettingsShipper$ = new Subject();
|
|
2357
|
+
this._initializedCarousel$ = new Subject();
|
|
2358
|
+
this._changeSettingsCarousel$ = new Subject();
|
|
2359
|
+
this._changedSettingsCarousel$ = new Subject();
|
|
2360
|
+
this._translateCarousel$ = new Subject();
|
|
2361
|
+
this._translatedCarousel$ = new Subject();
|
|
2362
|
+
this._resizeCarousel$ = new Subject();
|
|
2363
|
+
this._resizedCarousel$ = new Subject();
|
|
2364
|
+
this._refreshCarousel$ = new Subject();
|
|
2365
|
+
this._refreshedCarousel$ = new Subject();
|
|
2366
|
+
this.carouselDOMModel = {
|
|
2367
|
+
rtl: false,
|
|
2368
|
+
isResponsive: false,
|
|
2369
|
+
isRefreshed: false,
|
|
2370
|
+
isLoaded: false,
|
|
2371
|
+
isLoading: false
|
|
2372
|
+
};
|
|
2373
|
+
this.stageModel = {
|
|
2374
|
+
transform: 'translate3d(0px,0px,0px)',
|
|
2375
|
+
transition: '0s',
|
|
2376
|
+
width: 0,
|
|
2377
|
+
paddingL: 0,
|
|
2378
|
+
paddingR: 0
|
|
2379
|
+
};
|
|
2380
|
+
this._items = [];
|
|
2381
|
+
this._widths = [];
|
|
2382
|
+
this._supress = {};
|
|
2383
|
+
this._current = null;
|
|
2384
|
+
this._clones = [];
|
|
2385
|
+
this._mergers = [];
|
|
2386
|
+
this._speed = null;
|
|
2387
|
+
this._coordinates = [];
|
|
2388
|
+
this._invalidated = {};
|
|
2389
|
+
this._states = {
|
|
2390
|
+
current: {},
|
|
2391
|
+
tags: {
|
|
2392
|
+
initializing: [CarouselState.Busy],
|
|
2393
|
+
animating: [CarouselState.Busy]
|
|
2394
|
+
}
|
|
2395
|
+
};
|
|
2396
|
+
this._pipe = [
|
|
2397
|
+
{
|
|
2398
|
+
filter: [CarouselProperty.Width, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2399
|
+
run: (cache) => {
|
|
2400
|
+
cache.current = this._items && this._items[this.relative(this._current || 0)].id;
|
|
2401
|
+
}
|
|
2402
|
+
},
|
|
2403
|
+
{
|
|
2404
|
+
filter: [CarouselProperty.Width, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2405
|
+
run: (cache) => {
|
|
2406
|
+
const margin = this.settings.margin || CommonConstants.EMPTY_STRING, grid = !this.settings.autoWidth, rtl = this.settings.rtl, css = {
|
|
2407
|
+
'margin-left': rtl ? margin : CommonConstants.EMPTY_STRING,
|
|
2408
|
+
'margin-right': rtl ? CommonConstants.EMPTY_STRING : margin
|
|
2409
|
+
};
|
|
2410
|
+
if (!grid) {
|
|
2411
|
+
this.slidesModel.forEach(slide => {
|
|
2412
|
+
slide.marginL = css['margin-left'];
|
|
2413
|
+
slide.marginR = css['margin-right'];
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
cache.css = css;
|
|
2417
|
+
}
|
|
2418
|
+
}, {
|
|
2419
|
+
filter: [CarouselProperty.Width, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2420
|
+
run: (cache) => {
|
|
2421
|
+
const width = +(this.width() / (this.settings.items || 0)).toFixed(3) - (this.settings.margin || 0), grid = !this.settings.autoWidth, widths = [];
|
|
2422
|
+
let merge = null, iterator = this._items.length;
|
|
2423
|
+
cache.items = {
|
|
2424
|
+
merge: false,
|
|
2425
|
+
width: width
|
|
2426
|
+
};
|
|
2427
|
+
while (iterator--) {
|
|
2428
|
+
merge = this._mergers[iterator];
|
|
2429
|
+
merge = this.settings.mergeFit && Math.min(merge, (this.settings.items || 0)) || merge;
|
|
2430
|
+
cache.items.merge = merge > 1 || cache.items.merge;
|
|
2431
|
+
widths[iterator] = !grid ? this._items[iterator].width ? this._items[iterator].width : width : width * merge;
|
|
2432
|
+
}
|
|
2433
|
+
this._widths = widths;
|
|
2434
|
+
this.slidesModel.forEach((slide, i) => {
|
|
2435
|
+
slide.width = this._widths[i];
|
|
2436
|
+
slide.marginR = cache.css['margin-right'];
|
|
2437
|
+
slide.marginL = cache.css['margin-left'];
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
}, {
|
|
2441
|
+
filter: [CarouselProperty.Items, CarouselProperty.Settings],
|
|
2442
|
+
run: () => {
|
|
2443
|
+
const clones = [], items = this._items, settings = this.settings, view = Math.max(settings.items * 2, 4), size = Math.ceil(items.length / 2) * 2;
|
|
2444
|
+
let append = [], prepend = [], repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0;
|
|
2445
|
+
repeat /= 2;
|
|
2446
|
+
while (repeat--) {
|
|
2447
|
+
clones.push(this.normalize(clones.length / 2, true));
|
|
2448
|
+
append.push(Object.assign({}, this.slidesModel[clones[clones.length - 1]]));
|
|
2449
|
+
clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
|
|
2450
|
+
prepend.unshift(Object.assign({}, this.slidesModel[clones[clones.length - 1]]));
|
|
2451
|
+
}
|
|
2452
|
+
this._clones = clones;
|
|
2453
|
+
append = append.map(slide => {
|
|
2454
|
+
slide.id = `${CarouselServiceConstants.CLONE_ID_PREFIX}${slide.id}`;
|
|
2455
|
+
slide.isActive = false;
|
|
2456
|
+
slide.isCloned = true;
|
|
2457
|
+
return slide;
|
|
2458
|
+
});
|
|
2459
|
+
prepend = prepend.map(slide => {
|
|
2460
|
+
slide.id = `${CarouselServiceConstants.CLONE_ID_PREFIX}${slide.id}`;
|
|
2461
|
+
slide.isActive = false;
|
|
2462
|
+
slide.isCloned = true;
|
|
2463
|
+
return slide;
|
|
2464
|
+
});
|
|
2465
|
+
this.slidesModel = prepend.concat(this.slidesModel).concat(append);
|
|
2466
|
+
}
|
|
2467
|
+
}, {
|
|
2468
|
+
filter: [CarouselProperty.Width, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2469
|
+
run: () => {
|
|
2470
|
+
const rtl = this.settings.rtl ? 1 : -1, size = this._clones.length + this._items.length, coordinates = [];
|
|
2471
|
+
let iterator = -1, previous = 0, current = 0;
|
|
2472
|
+
while (++iterator < size) {
|
|
2473
|
+
previous = coordinates[iterator - 1] || 0;
|
|
2474
|
+
current = this._widths[this.relative(iterator)] + this.settings.margin;
|
|
2475
|
+
coordinates.push(previous + current * rtl);
|
|
2476
|
+
}
|
|
2477
|
+
this._coordinates = coordinates;
|
|
2478
|
+
}
|
|
2479
|
+
}, {
|
|
2480
|
+
filter: [CarouselProperty.Width, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2481
|
+
run: () => {
|
|
2482
|
+
const padding = this.settings.stagePadding || 0, coordinates = this._coordinates, css = {
|
|
2483
|
+
'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
|
|
2484
|
+
'padding-left': padding || '',
|
|
2485
|
+
'padding-right': padding || ''
|
|
2486
|
+
};
|
|
2487
|
+
this.stageModel.width = css.width;
|
|
2488
|
+
this.stageModel.paddingR = css['padding-right'];
|
|
2489
|
+
}
|
|
2490
|
+
}, {
|
|
2491
|
+
filter: [CarouselProperty.Width, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2492
|
+
run: (cache) => {
|
|
2493
|
+
let current = cache.current ? this.slidesModel.findIndex(slide => slide.id === cache.current) : 0;
|
|
2494
|
+
current = Math.max(this.minimum(), Math.min(this.maximum(), current));
|
|
2495
|
+
this.reset(current);
|
|
2496
|
+
}
|
|
2497
|
+
}, {
|
|
2498
|
+
filter: [CarouselProperty.Position],
|
|
2499
|
+
run: () => {
|
|
2500
|
+
this.animate(this.coordinates(this._current));
|
|
2501
|
+
}
|
|
2502
|
+
}, {
|
|
2503
|
+
filter: [CarouselProperty.Width, CarouselProperty.Position, CarouselProperty.Items, CarouselProperty.Settings],
|
|
2504
|
+
run: () => {
|
|
2505
|
+
const rtl = this.settings.rtl ? 1 : -1, padding = (this.settings.stagePadding || 0) * 2, matches = [];
|
|
2506
|
+
let begin, end, inner, outer, i, n;
|
|
2507
|
+
begin = this.coordinates(this.current());
|
|
2508
|
+
if (typeof begin === 'number') {
|
|
2509
|
+
begin += padding;
|
|
2510
|
+
}
|
|
2511
|
+
else {
|
|
2512
|
+
begin = 0;
|
|
2513
|
+
}
|
|
2514
|
+
end = begin + this.width() * rtl;
|
|
2515
|
+
if (rtl === -1 && this.settings.center) {
|
|
2516
|
+
const result = this._coordinates.filter(element => {
|
|
2517
|
+
return (this.settings.items || 0) % 2 === 1 ? element >= begin : element > begin;
|
|
2518
|
+
});
|
|
2519
|
+
begin = result.length ? result[result.length - 1] : begin;
|
|
2520
|
+
}
|
|
2521
|
+
for (i = 0, n = this._coordinates.length; i < n; i++) {
|
|
2522
|
+
inner = Math.ceil(this._coordinates[i - 1] || 0);
|
|
2523
|
+
outer = Math.ceil(Math.abs(this._coordinates[i]) + padding * rtl);
|
|
2524
|
+
if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end)))
|
|
2525
|
+
|| (this.op(outer, '<', begin) && this.op(outer, '>', end))) {
|
|
2526
|
+
matches.push(i);
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
this.slidesModel.forEach(slide => {
|
|
2530
|
+
slide.isActive = false;
|
|
2531
|
+
return slide;
|
|
2532
|
+
});
|
|
2533
|
+
matches.forEach(item => {
|
|
2534
|
+
this.slidesModel[item].isActive = true;
|
|
2535
|
+
});
|
|
2536
|
+
if (this.settings.center) {
|
|
2537
|
+
this.slidesModel.forEach(slide => {
|
|
2538
|
+
slide.isCentered = false;
|
|
2539
|
+
return slide;
|
|
2540
|
+
});
|
|
2541
|
+
const currentValue = this.current();
|
|
2542
|
+
if (currentValue)
|
|
2543
|
+
this.slidesModel[currentValue].isCentered = true;
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
];
|
|
2548
|
+
this.settings = {
|
|
2549
|
+
items: 0
|
|
2550
|
+
};
|
|
2551
|
+
this.options = {};
|
|
2552
|
+
}
|
|
2553
|
+
get viewCurrrentSettings() {
|
|
2554
|
+
return this._viewSettingsShipper$.asObservable();
|
|
2555
|
+
}
|
|
2556
|
+
get initializedState() {
|
|
2557
|
+
return this._initializedCarousel$.asObservable();
|
|
2558
|
+
}
|
|
2559
|
+
get changeState() {
|
|
2560
|
+
return this._changeSettingsCarousel$.asObservable();
|
|
2561
|
+
}
|
|
2562
|
+
get changedState() {
|
|
2563
|
+
return this._changedSettingsCarousel$.asObservable();
|
|
2564
|
+
}
|
|
2565
|
+
get translateState() {
|
|
2566
|
+
return this._translateCarousel$.asObservable();
|
|
2567
|
+
}
|
|
2568
|
+
get translatedState() {
|
|
2569
|
+
return this._translatedCarousel$.asObservable();
|
|
2570
|
+
}
|
|
2571
|
+
get resizeState() {
|
|
2572
|
+
return this._resizeCarousel$.asObservable();
|
|
2573
|
+
}
|
|
2574
|
+
get resizedState() {
|
|
2575
|
+
return this._resizedCarousel$.asObservable();
|
|
2576
|
+
}
|
|
2577
|
+
get refreshState() {
|
|
2578
|
+
return this._refreshCarousel$.asObservable();
|
|
2579
|
+
}
|
|
2580
|
+
get refreshedState() {
|
|
2581
|
+
return this._refreshedCarousel$.asObservable();
|
|
2582
|
+
}
|
|
2583
|
+
setup(carouselWidth, slides, options) {
|
|
2584
|
+
this.setCarouselWidth(carouselWidth);
|
|
2585
|
+
this.setItems(slides);
|
|
2586
|
+
this.defineSlidesData();
|
|
2587
|
+
this.setOptions(options);
|
|
2588
|
+
this.settings = Object.assign({}, this.options);
|
|
2589
|
+
this.setOptionsForViewport();
|
|
2590
|
+
this.trigger(CarouselEventType.Change, { property: { name: CarouselProperty.Settings, value: this.settings } });
|
|
2591
|
+
this.invalidate(CarouselProperty.Settings);
|
|
2592
|
+
this.trigger(CarouselEventType.Changed, { property: { name: CarouselProperty.Settings, value: this.settings } });
|
|
2593
|
+
}
|
|
2594
|
+
initialize(slides) {
|
|
2595
|
+
this.enter(CarouselEventType.Initializing);
|
|
2596
|
+
this.carouselDOMModel.rtl = this.settings.rtl || false;
|
|
2597
|
+
if (this._mergers.length) {
|
|
2598
|
+
this._mergers = [];
|
|
2599
|
+
}
|
|
2600
|
+
slides.forEach(item => {
|
|
2601
|
+
const mergeN = this.settings.merge ? item.dataMerge : 1;
|
|
2602
|
+
this._mergers.push(mergeN);
|
|
2603
|
+
});
|
|
2604
|
+
this._clones = [];
|
|
2605
|
+
this.reset(isNumeric(this.settings.startPosition) ? +(this.settings.startPosition || 0) : 0);
|
|
2606
|
+
this.invalidate(CarouselProperty.Items);
|
|
2607
|
+
this.refresh();
|
|
2608
|
+
this.carouselDOMModel.isLoaded = true;
|
|
2609
|
+
this.sendChanges();
|
|
2610
|
+
this.leave(CarouselEventType.Initializing);
|
|
2611
|
+
this.trigger(CarouselEventType.Initialized);
|
|
2612
|
+
}
|
|
2613
|
+
;
|
|
2614
|
+
sendChanges() {
|
|
2615
|
+
this._viewSettingsShipper$.next({
|
|
2616
|
+
carouselDOMModel: this.carouselDOMModel,
|
|
2617
|
+
stageModel: this.stageModel,
|
|
2618
|
+
slidesModel: this.slidesModel,
|
|
2619
|
+
navigationModel: this.navigationModel,
|
|
2620
|
+
navigationDotsModel: this.navigationDotsModel
|
|
2621
|
+
});
|
|
2622
|
+
}
|
|
2623
|
+
onResize(curWidth) {
|
|
2624
|
+
if (this._items.length) {
|
|
2625
|
+
this.setCarouselWidth(curWidth);
|
|
2626
|
+
this.enter(CarouselEventType.Resizing);
|
|
2627
|
+
this.trigger(CarouselEventType.Resize);
|
|
2628
|
+
this.invalidate(CarouselProperty.Width);
|
|
2629
|
+
this.refresh();
|
|
2630
|
+
this.leave(CarouselEventType.Resizing);
|
|
2631
|
+
this.trigger(CarouselEventType.Resized);
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
is(state) {
|
|
2635
|
+
return this._states.current[state] && this._states.current[state] > 0;
|
|
2636
|
+
}
|
|
2637
|
+
;
|
|
2638
|
+
current(position) {
|
|
2639
|
+
if (position === undefined) {
|
|
2640
|
+
return this._current;
|
|
2641
|
+
}
|
|
2642
|
+
if (this._items.length === 0) {
|
|
2643
|
+
return undefined;
|
|
2644
|
+
}
|
|
2645
|
+
position = this.normalize(position);
|
|
2646
|
+
if (this._current !== position) {
|
|
2647
|
+
this.trigger(CarouselEventType.Change, { property: { name: CarouselProperty.Position, value: position } });
|
|
2648
|
+
this._current = position;
|
|
2649
|
+
this.invalidate(CarouselProperty.Position);
|
|
2650
|
+
this.trigger(CarouselEventType.Changed, { property: { name: CarouselProperty.Position, value: this._current } });
|
|
2651
|
+
}
|
|
2652
|
+
return this._current;
|
|
2653
|
+
}
|
|
2654
|
+
relative(position) {
|
|
2655
|
+
position -= this._clones.length / 2;
|
|
2656
|
+
return this.normalize(position, true);
|
|
2657
|
+
}
|
|
2658
|
+
maximum(relative = false) {
|
|
2659
|
+
const settings = this.settings;
|
|
2660
|
+
let maximum = this._coordinates.length, iterator, reciprocalItemsWidth, elementWidth;
|
|
2661
|
+
if (settings.loop) {
|
|
2662
|
+
maximum = this._clones.length / 2 + this._items.length - 1;
|
|
2663
|
+
}
|
|
2664
|
+
else if (settings.autoWidth || settings.merge) {
|
|
2665
|
+
iterator = this._items.length;
|
|
2666
|
+
reciprocalItemsWidth = this.slidesModel[--iterator].width;
|
|
2667
|
+
elementWidth = this._width;
|
|
2668
|
+
while (iterator--) {
|
|
2669
|
+
reciprocalItemsWidth += +this.slidesModel[iterator].width + (this.settings.margin || 0).toString();
|
|
2670
|
+
if (reciprocalItemsWidth > elementWidth) {
|
|
2671
|
+
break;
|
|
2672
|
+
}
|
|
2673
|
+
}
|
|
2674
|
+
maximum = iterator + 1;
|
|
2675
|
+
}
|
|
2676
|
+
else if (settings.center) {
|
|
2677
|
+
maximum = this._items.length - 1;
|
|
2678
|
+
}
|
|
2679
|
+
else {
|
|
2680
|
+
maximum = this._items.length - (settings.items || 0);
|
|
2681
|
+
}
|
|
2682
|
+
if (relative) {
|
|
2683
|
+
maximum -= this._clones.length / 2;
|
|
2684
|
+
}
|
|
2685
|
+
return Math.max(maximum, 0);
|
|
2686
|
+
}
|
|
2687
|
+
minimum(relative = false) {
|
|
2688
|
+
return relative ? 0 : this._clones.length / 2;
|
|
2689
|
+
}
|
|
2690
|
+
items(position) {
|
|
2691
|
+
if (position === undefined) {
|
|
2692
|
+
return this._items.slice();
|
|
2693
|
+
}
|
|
2694
|
+
position = this.normalize(position, true);
|
|
2695
|
+
return [this._items[position]];
|
|
2696
|
+
}
|
|
2697
|
+
mergers(position) {
|
|
2698
|
+
if (position === undefined) {
|
|
2699
|
+
return this._mergers.slice();
|
|
2700
|
+
}
|
|
2701
|
+
position = this.normalize(position, true);
|
|
2702
|
+
return this._mergers[position];
|
|
2703
|
+
}
|
|
2704
|
+
clones(position) {
|
|
2705
|
+
const odd = this._clones.length / 2, even = odd + this._items.length, map = (index) => index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2;
|
|
2706
|
+
if (position === undefined) {
|
|
2707
|
+
return this._clones.map((v, i) => map(i));
|
|
2708
|
+
}
|
|
2709
|
+
return this._clones.map((v, i) => v === position ? map(i) : null).filter(item => item);
|
|
2710
|
+
}
|
|
2711
|
+
speed(speed) {
|
|
2712
|
+
if (speed !== undefined) {
|
|
2713
|
+
this._speed = speed;
|
|
2714
|
+
}
|
|
2715
|
+
return this._speed || 0;
|
|
2716
|
+
}
|
|
2717
|
+
coordinates(position) {
|
|
2718
|
+
let multiplier = 1, newPosition = (position || 0) - 1, coordinate, result;
|
|
2719
|
+
if (position === undefined) {
|
|
2720
|
+
result = this._coordinates.map((_, index) => {
|
|
2721
|
+
return this.coordinates(index);
|
|
2722
|
+
});
|
|
2723
|
+
return result;
|
|
2724
|
+
}
|
|
2725
|
+
if (this.settings.center) {
|
|
2726
|
+
if (this.settings.rtl) {
|
|
2727
|
+
multiplier = -1;
|
|
2728
|
+
newPosition = (position || 0) + 1;
|
|
2729
|
+
}
|
|
2730
|
+
coordinate = this._coordinates[(position || 0)];
|
|
2731
|
+
coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier;
|
|
2732
|
+
}
|
|
2733
|
+
else {
|
|
2734
|
+
coordinate = this._coordinates[newPosition] || 0;
|
|
2735
|
+
}
|
|
2736
|
+
coordinate = Math.ceil(coordinate);
|
|
2737
|
+
return coordinate;
|
|
2738
|
+
}
|
|
2739
|
+
to(position, speed) {
|
|
2740
|
+
let current = this.current(), revert = null, distance = position - this.relative(current || 0), maximum = this.maximum(), delayForLoop = 0;
|
|
2741
|
+
const direction = +(distance > 0) - +(distance < 0), items = this._items.length, minimum = this.minimum();
|
|
2742
|
+
if (this.settings.loop) {
|
|
2743
|
+
if (!this.settings.rewind && Math.abs(distance) > items / 2) {
|
|
2744
|
+
distance += direction * -1 * items;
|
|
2745
|
+
}
|
|
2746
|
+
position = (current || 0) + distance;
|
|
2747
|
+
revert = ((position - minimum) % items + items) % items + minimum;
|
|
2748
|
+
if (revert !== position && revert - distance <= maximum && revert - distance > 0) {
|
|
2749
|
+
current = revert - distance;
|
|
2750
|
+
position = revert;
|
|
2751
|
+
delayForLoop = 30;
|
|
2752
|
+
this.reset(current);
|
|
2753
|
+
this.sendChanges();
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
else if (this.settings.rewind) {
|
|
2757
|
+
maximum += 1;
|
|
2758
|
+
position = (position % maximum + maximum) % maximum;
|
|
2759
|
+
}
|
|
2760
|
+
else {
|
|
2761
|
+
position = Math.max(minimum, Math.min(maximum, position));
|
|
2762
|
+
}
|
|
2763
|
+
setTimeout(() => {
|
|
2764
|
+
this.speed(this.duration(current || 0, position, speed));
|
|
2765
|
+
this.current(position);
|
|
2766
|
+
this.update();
|
|
2767
|
+
}, delayForLoop);
|
|
2768
|
+
}
|
|
2769
|
+
next(speed) {
|
|
2770
|
+
speed = speed || false;
|
|
2771
|
+
this.to(this.relative(this.current() || 0) + 1, speed);
|
|
2772
|
+
}
|
|
2773
|
+
previous(speed) {
|
|
2774
|
+
speed = speed || false;
|
|
2775
|
+
this.to(this.relative(this.current() || 0) - 1, speed);
|
|
2776
|
+
}
|
|
2777
|
+
onTransitionEnd(event) {
|
|
2778
|
+
if (!event) {
|
|
2779
|
+
this.leave(CarouselEventType.Animating);
|
|
2780
|
+
this.trigger(CarouselEventType.Translated);
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
setCurrentSlideClasses(slide) {
|
|
2784
|
+
const currentClasses = {
|
|
2785
|
+
'active': slide.isActive || false,
|
|
2786
|
+
'center': slide.isCentered || false,
|
|
2787
|
+
'cloned': slide.isCloned || false,
|
|
2788
|
+
'animated': slide.isAnimated || false,
|
|
2789
|
+
'animated-in': slide.isDefAnimatedIn || false,
|
|
2790
|
+
'animated-out': slide.isDefAnimatedOut || false
|
|
2791
|
+
};
|
|
2792
|
+
if (this.settings.animateIn) {
|
|
2793
|
+
currentClasses[this.settings.animateIn] = slide.isCustomAnimatedIn || false;
|
|
2794
|
+
}
|
|
2795
|
+
if (this.settings.animateOut) {
|
|
2796
|
+
currentClasses[this.settings.animateOut] = slide.isCustomAnimatedOut || false;
|
|
2797
|
+
}
|
|
2798
|
+
return currentClasses;
|
|
2799
|
+
}
|
|
2800
|
+
enter(name) {
|
|
2801
|
+
[name].concat(this._states.tags[name] || []).forEach((stateName) => {
|
|
2802
|
+
if (this._states.current[stateName] === undefined) {
|
|
2803
|
+
this._states.current[stateName] = 0;
|
|
2804
|
+
}
|
|
2805
|
+
this._states.current[stateName]++;
|
|
2806
|
+
});
|
|
2807
|
+
}
|
|
2808
|
+
;
|
|
2809
|
+
leave(name) {
|
|
2810
|
+
[name].concat(this._states.tags[name] || []).forEach((stateName) => {
|
|
2811
|
+
if (this._states.current[stateName] === 0 || !!this._states.current[stateName]) {
|
|
2812
|
+
this._states.current[stateName]--;
|
|
2813
|
+
}
|
|
2814
|
+
});
|
|
2815
|
+
}
|
|
2816
|
+
;
|
|
2817
|
+
setOptions(options) {
|
|
2818
|
+
this.options = Object.assign(Object.assign({}, CarouselServiceConstants.DEFAULT_OPTIONS), options);
|
|
2819
|
+
}
|
|
2820
|
+
validateItems(items, skip_validateItems) {
|
|
2821
|
+
let result = items;
|
|
2822
|
+
if (items > this._items.length && !skip_validateItems) {
|
|
2823
|
+
result = this._items.length;
|
|
2824
|
+
}
|
|
2825
|
+
return result;
|
|
2826
|
+
}
|
|
2827
|
+
setCarouselWidth(width) {
|
|
2828
|
+
this._width = width;
|
|
2829
|
+
}
|
|
2830
|
+
setOptionsForViewport() {
|
|
2831
|
+
const viewport = this._width, overwrites = this.options.responsive || {};
|
|
2832
|
+
let match = -1;
|
|
2833
|
+
if (!Object.keys(overwrites).length) {
|
|
2834
|
+
return;
|
|
2835
|
+
}
|
|
2836
|
+
if (!viewport) {
|
|
2837
|
+
this.settings.items = 1;
|
|
2838
|
+
return;
|
|
2839
|
+
}
|
|
2840
|
+
for (const key in overwrites) {
|
|
2841
|
+
if (overwrites.hasOwnProperty(key)) {
|
|
2842
|
+
if (+key <= viewport && +key > match) {
|
|
2843
|
+
match = Number(key);
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
}
|
|
2847
|
+
this.settings = Object.assign(Object.assign(Object.assign({}, this.options), overwrites[match]), { items: (overwrites[match] && overwrites[match].items) ? this.validateItems(overwrites[match].items || 0, this.options.skip_validateItems || false) : this.options.items });
|
|
2848
|
+
delete this.settings.responsive;
|
|
2849
|
+
this.carouselDOMModel.isResponsive = true;
|
|
2850
|
+
const mergers = [];
|
|
2851
|
+
this._items.forEach(item => {
|
|
2852
|
+
const mergeN = this.settings.merge ? item.dataMerge : 1;
|
|
2853
|
+
mergers.push(mergeN);
|
|
2854
|
+
});
|
|
2855
|
+
this._mergers = mergers;
|
|
2856
|
+
this.invalidate(CarouselProperty.Settings);
|
|
2857
|
+
}
|
|
2858
|
+
optionsLogic() {
|
|
2859
|
+
if (this.settings.autoWidth) {
|
|
2860
|
+
this.settings.stagePadding = 0;
|
|
2861
|
+
this.settings.merge = false;
|
|
2862
|
+
}
|
|
2863
|
+
}
|
|
2864
|
+
update() {
|
|
2865
|
+
let i = 0;
|
|
2866
|
+
const n = this._pipe.length, filter = (item) => this._invalidated[item], cache = {};
|
|
2867
|
+
while (i < n) {
|
|
2868
|
+
const filteredPipe = this._pipe[i].filter.filter(filter);
|
|
2869
|
+
if (this._invalidated.all || filteredPipe.length > 0) {
|
|
2870
|
+
this._pipe[i].run(cache);
|
|
2871
|
+
}
|
|
2872
|
+
i++;
|
|
2873
|
+
}
|
|
2874
|
+
this.slidesModel.forEach(slide => slide.classes = this.setCurrentSlideClasses(slide));
|
|
2875
|
+
this.sendChanges();
|
|
2876
|
+
this._invalidated = {};
|
|
2877
|
+
if (!this.is('valid')) {
|
|
2878
|
+
this.enter('valid');
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
width(dimension) {
|
|
2882
|
+
dimension = dimension || Width.Default;
|
|
2883
|
+
switch (dimension) {
|
|
2884
|
+
case Width.Inner:
|
|
2885
|
+
case Width.Outer:
|
|
2886
|
+
return this._width;
|
|
2887
|
+
default:
|
|
2888
|
+
return this._width - (this.settings.stagePadding || 0) * 2 + (this.settings.margin || 0);
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
refresh() {
|
|
2892
|
+
this.enter(CarouselEventType.Refreshing);
|
|
2893
|
+
this.trigger(CarouselEventType.Refresh);
|
|
2894
|
+
this.defineSlidesData();
|
|
2895
|
+
this.setOptionsForViewport();
|
|
2896
|
+
this.optionsLogic();
|
|
2897
|
+
this.update();
|
|
2898
|
+
this.leave(CarouselEventType.Refreshing);
|
|
2899
|
+
this.trigger(CarouselEventType.Refreshed);
|
|
2900
|
+
}
|
|
2901
|
+
animate(coordinate) {
|
|
2902
|
+
const animate = this.speed() > 0;
|
|
2903
|
+
if (this.is(CarouselEventType.Animating)) {
|
|
2904
|
+
this.onTransitionEnd();
|
|
2905
|
+
}
|
|
2906
|
+
if (animate) {
|
|
2907
|
+
this.enter(CarouselEventType.Animating);
|
|
2908
|
+
this.trigger(CarouselEventType.Translate);
|
|
2909
|
+
}
|
|
2910
|
+
this.stageModel.transform = 'translate3d(' + coordinate + 'px,0px,0px)';
|
|
2911
|
+
this.stageModel.transition = (this.speed() / 1000) + 's' + (this.settings.slideTransition ? ' ' + this.settings.slideTransition : '');
|
|
2912
|
+
}
|
|
2913
|
+
invalidate(part) {
|
|
2914
|
+
if (typeof part === 'string') {
|
|
2915
|
+
this._invalidated[part] = true;
|
|
2916
|
+
if (this.is('valid')) {
|
|
2917
|
+
this.leave('valid');
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
return Object.keys(this._invalidated);
|
|
2921
|
+
}
|
|
2922
|
+
;
|
|
2923
|
+
reset(position) {
|
|
2924
|
+
position = this.normalize(position);
|
|
2925
|
+
if (position === undefined) {
|
|
2926
|
+
return;
|
|
2927
|
+
}
|
|
2928
|
+
this._speed = 0;
|
|
2929
|
+
this._current = position;
|
|
2930
|
+
this.suppress([CarouselEventType.Translate, CarouselEventType.Translated]);
|
|
2931
|
+
this.animate(this.coordinates(position));
|
|
2932
|
+
this.release([CarouselEventType.Translate, CarouselEventType.Translated]);
|
|
2933
|
+
}
|
|
2934
|
+
normalize(position, relative) {
|
|
2935
|
+
const n = this._items.length, m = relative ? 0 : this._clones.length;
|
|
2936
|
+
if (!isNumeric(position) || n < 1) {
|
|
2937
|
+
position = 0;
|
|
2938
|
+
}
|
|
2939
|
+
else if (position < 0 || position >= n + m) {
|
|
2940
|
+
position = ((position - m / 2) % n + n) % n + m / 2;
|
|
2941
|
+
}
|
|
2942
|
+
return position;
|
|
2943
|
+
}
|
|
2944
|
+
duration(from, to, factor) {
|
|
2945
|
+
if (factor === 0) {
|
|
2946
|
+
return 0;
|
|
2947
|
+
}
|
|
2948
|
+
return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((+factor));
|
|
2949
|
+
}
|
|
2950
|
+
setItems(content) {
|
|
2951
|
+
this._items = content;
|
|
2952
|
+
}
|
|
2953
|
+
defineSlidesData() {
|
|
2954
|
+
let loadMap;
|
|
2955
|
+
if (this.slidesModel && this.slidesModel.length) {
|
|
2956
|
+
loadMap = new Map();
|
|
2957
|
+
this.slidesModel.forEach(item => {
|
|
2958
|
+
if (item.load) {
|
|
2959
|
+
loadMap.set(item.id, item.load);
|
|
2960
|
+
}
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
this.slidesModel = this._items.map(slide => {
|
|
2964
|
+
return {
|
|
2965
|
+
id: `${slide.id}`,
|
|
2966
|
+
isActive: false,
|
|
2967
|
+
tplRef: slide.tplRef,
|
|
2968
|
+
dataMerge: slide.dataMerge,
|
|
2969
|
+
width: 0,
|
|
2970
|
+
isCloned: false,
|
|
2971
|
+
load: loadMap ? loadMap.get(slide.id) : false,
|
|
2972
|
+
classes: {}
|
|
2973
|
+
};
|
|
2974
|
+
});
|
|
2975
|
+
}
|
|
2976
|
+
op(a, o, b) {
|
|
2977
|
+
const rtl = this.settings.rtl;
|
|
2978
|
+
switch (o) {
|
|
2979
|
+
case '<':
|
|
2980
|
+
return rtl ? a > b : a < b;
|
|
2981
|
+
case '>':
|
|
2982
|
+
return rtl ? a < b : a > b;
|
|
2983
|
+
case '>=':
|
|
2984
|
+
return rtl ? a <= b : a >= b;
|
|
2985
|
+
case '<=':
|
|
2986
|
+
return rtl ? a >= b : a <= b;
|
|
2987
|
+
default:
|
|
2988
|
+
return false;
|
|
2989
|
+
}
|
|
2990
|
+
}
|
|
2991
|
+
trigger(name, data) {
|
|
2992
|
+
switch (name) {
|
|
2993
|
+
case CarouselEventType.Initialized:
|
|
2994
|
+
this._initializedCarousel$.next(name);
|
|
2995
|
+
break;
|
|
2996
|
+
case CarouselEventType.Change:
|
|
2997
|
+
this._changeSettingsCarousel$.next(data);
|
|
2998
|
+
break;
|
|
2999
|
+
case CarouselEventType.Changed:
|
|
3000
|
+
this._changedSettingsCarousel$.next(data);
|
|
3001
|
+
break;
|
|
3002
|
+
case CarouselEventType.Resize:
|
|
3003
|
+
this._resizeCarousel$.next(name);
|
|
3004
|
+
break;
|
|
3005
|
+
case CarouselEventType.Resized:
|
|
3006
|
+
this._resizedCarousel$.next(name);
|
|
3007
|
+
break;
|
|
3008
|
+
case CarouselEventType.Refresh:
|
|
3009
|
+
this._refreshCarousel$.next(name);
|
|
3010
|
+
break;
|
|
3011
|
+
case CarouselEventType.Refreshed:
|
|
3012
|
+
this._refreshedCarousel$.next(name);
|
|
3013
|
+
break;
|
|
3014
|
+
case CarouselEventType.Translate:
|
|
3015
|
+
this._translateCarousel$.next(name);
|
|
3016
|
+
break;
|
|
3017
|
+
case CarouselEventType.Translated:
|
|
3018
|
+
this._translatedCarousel$.next(name);
|
|
3019
|
+
break;
|
|
3020
|
+
default:
|
|
3021
|
+
break;
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
suppress(events) {
|
|
3025
|
+
events.forEach(event => {
|
|
3026
|
+
this._supress[event] = true;
|
|
3027
|
+
});
|
|
3028
|
+
}
|
|
3029
|
+
release(events) {
|
|
3030
|
+
events.forEach(event => {
|
|
3031
|
+
delete this._supress[event];
|
|
3032
|
+
});
|
|
3033
|
+
}
|
|
3034
|
+
}
|
|
3035
|
+
CarouselService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3036
|
+
CarouselService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselService, providedIn: 'root' });
|
|
3037
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselService, decorators: [{
|
|
3038
|
+
type: Injectable,
|
|
3039
|
+
args: [{
|
|
3040
|
+
providedIn: 'root'
|
|
3041
|
+
}]
|
|
3042
|
+
}] });
|
|
3043
|
+
|
|
3044
|
+
class CarouselAnimateService {
|
|
3045
|
+
constructor(carouselService) {
|
|
3046
|
+
this.carouselService = carouselService;
|
|
3047
|
+
this.swapping = true;
|
|
3048
|
+
this.next = undefined;
|
|
3049
|
+
this.initDataStreams();
|
|
3050
|
+
}
|
|
3051
|
+
ngOnDestroy() {
|
|
3052
|
+
this.animateSubscription.unsubscribe();
|
|
3053
|
+
}
|
|
3054
|
+
initDataStreams() {
|
|
3055
|
+
const changeSettings$ = this.carouselService.changeState.pipe(tap(data => {
|
|
3056
|
+
if (data.property.name === CarouselProperty.Position) {
|
|
3057
|
+
this.previous = this.carouselService.current();
|
|
3058
|
+
this.next = data.property.value;
|
|
3059
|
+
}
|
|
3060
|
+
}));
|
|
3061
|
+
const translateCarousel$ = this.carouselService.translateState.pipe(tap(() => {
|
|
3062
|
+
if (this.swapping && (this.carouselService.options.animateOut || this.carouselService.options.animateIn)) {
|
|
3063
|
+
this.swap();
|
|
3064
|
+
}
|
|
3065
|
+
}));
|
|
3066
|
+
this.animateSubscription = merge(changeSettings$, translateCarousel$).subscribe();
|
|
3067
|
+
}
|
|
3068
|
+
swap() {
|
|
3069
|
+
if (this.carouselService.settings.items !== 1)
|
|
3070
|
+
return;
|
|
3071
|
+
this.carouselService.speed(0);
|
|
3072
|
+
let left;
|
|
3073
|
+
const previous = this.carouselService.slidesModel[this.previous || 0], next = this.carouselService.slidesModel[this.next || 0], incoming = this.carouselService.settings.animateIn, outgoing = this.carouselService.settings.animateOut;
|
|
3074
|
+
if (this.carouselService.current() === this.previous)
|
|
3075
|
+
return;
|
|
3076
|
+
if (outgoing) {
|
|
3077
|
+
left = +this.carouselService.coordinates(this.previous) - +this.carouselService.coordinates(this.next);
|
|
3078
|
+
this.carouselService.slidesModel.forEach(slide => {
|
|
3079
|
+
if (slide.id === previous.id) {
|
|
3080
|
+
slide.left = getCssLikeValue(left);
|
|
3081
|
+
slide.isAnimated = true;
|
|
3082
|
+
slide.isDefAnimatedOut = true;
|
|
3083
|
+
slide.isCustomAnimatedOut = true;
|
|
3084
|
+
}
|
|
3085
|
+
});
|
|
3086
|
+
}
|
|
3087
|
+
if (incoming) {
|
|
3088
|
+
this.carouselService.slidesModel.forEach(slide => {
|
|
3089
|
+
if (slide.id === next.id) {
|
|
3090
|
+
slide.isAnimated = true;
|
|
3091
|
+
slide.isDefAnimatedIn = true;
|
|
3092
|
+
slide.isCustomAnimatedIn = true;
|
|
3093
|
+
}
|
|
3094
|
+
});
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
;
|
|
3098
|
+
clear(id) {
|
|
3099
|
+
this.carouselService.slidesModel.forEach(slide => {
|
|
3100
|
+
if (slide.id === id) {
|
|
3101
|
+
slide.left = CommonConstants.EMPTY_STRING;
|
|
3102
|
+
slide.isAnimated = false;
|
|
3103
|
+
slide.isDefAnimatedOut = false;
|
|
3104
|
+
slide.isCustomAnimatedOut = false;
|
|
3105
|
+
slide.isDefAnimatedIn = false;
|
|
3106
|
+
slide.isCustomAnimatedIn = false;
|
|
3107
|
+
slide.classes = this.carouselService.setCurrentSlideClasses(slide);
|
|
3108
|
+
}
|
|
3109
|
+
});
|
|
3110
|
+
this.carouselService.onTransitionEnd();
|
|
3111
|
+
}
|
|
3112
|
+
;
|
|
3113
|
+
}
|
|
3114
|
+
CarouselAnimateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselAnimateService, deps: [{ token: CarouselService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3115
|
+
CarouselAnimateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselAnimateService, providedIn: 'root' });
|
|
3116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselAnimateService, decorators: [{
|
|
3117
|
+
type: Injectable,
|
|
3118
|
+
args: [{
|
|
3119
|
+
providedIn: 'root'
|
|
3120
|
+
}]
|
|
3121
|
+
}], ctorParameters: function () { return [{ type: CarouselService }]; } });
|
|
3122
|
+
|
|
3123
|
+
class CarouselAutoplayService {
|
|
3124
|
+
constructor(carouselService, winRef, docRef) {
|
|
3125
|
+
this.carouselService = carouselService;
|
|
3126
|
+
this.timeout = 0;
|
|
3127
|
+
this.paused = false;
|
|
3128
|
+
this.isArtificialAutoplayTimeout = false;
|
|
3129
|
+
this._isAutoplayStopped = false;
|
|
3130
|
+
this.winRef = winRef;
|
|
3131
|
+
this.docRef = docRef;
|
|
3132
|
+
this.initDataStreams();
|
|
3133
|
+
}
|
|
3134
|
+
get isAutoplayStopped() {
|
|
3135
|
+
return this._isAutoplayStopped;
|
|
3136
|
+
}
|
|
3137
|
+
set isAutoplayStopped(value) {
|
|
3138
|
+
this._isAutoplayStopped = value;
|
|
3139
|
+
}
|
|
3140
|
+
ngOnDestroy() {
|
|
3141
|
+
this.autoplaySubscription.unsubscribe();
|
|
3142
|
+
}
|
|
3143
|
+
play() {
|
|
3144
|
+
if (this.paused) {
|
|
3145
|
+
this.paused = false;
|
|
3146
|
+
this.setAutoPlayInterval(this.carouselService.settings.autoplayMouseleaveTimeout);
|
|
3147
|
+
}
|
|
3148
|
+
if (this.carouselService.is(CarouselState.Rotating))
|
|
3149
|
+
return;
|
|
3150
|
+
this.carouselService.enter(CarouselState.Rotating);
|
|
3151
|
+
this.setAutoPlayInterval();
|
|
3152
|
+
}
|
|
3153
|
+
;
|
|
3154
|
+
stop() {
|
|
3155
|
+
if (!this.carouselService.is(CarouselState.Rotating)) {
|
|
3156
|
+
return;
|
|
3157
|
+
}
|
|
3158
|
+
this.paused = true;
|
|
3159
|
+
this.winRef.clearTimeout(this.timeout);
|
|
3160
|
+
this.carouselService.leave(CarouselState.Rotating);
|
|
3161
|
+
}
|
|
3162
|
+
;
|
|
3163
|
+
pause() {
|
|
3164
|
+
if (!this.carouselService.is(CarouselState.Rotating))
|
|
3165
|
+
return;
|
|
3166
|
+
this.paused = true;
|
|
3167
|
+
}
|
|
3168
|
+
;
|
|
3169
|
+
startPausing() {
|
|
3170
|
+
if (this.carouselService.settings.autoplayHoverPause && this.carouselService.is(CarouselState.Rotating)) {
|
|
3171
|
+
this.pause();
|
|
3172
|
+
}
|
|
3173
|
+
}
|
|
3174
|
+
startPlayingMouseLeave() {
|
|
3175
|
+
if (this.carouselService.settings.autoplayHoverPause && this.carouselService.is(CarouselState.Rotating)) {
|
|
3176
|
+
this.play();
|
|
3177
|
+
this.playAfterTranslated();
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
initDataStreams() {
|
|
3181
|
+
const initializedCarousel$ = this.carouselService.initializedState.pipe(tap(() => {
|
|
3182
|
+
if (this.carouselService.settings.autoplay) {
|
|
3183
|
+
this.play();
|
|
3184
|
+
}
|
|
3185
|
+
}));
|
|
3186
|
+
const changedSettings$ = this.carouselService.changedState.pipe(tap(data => {
|
|
3187
|
+
this.handleChangeObservable(data);
|
|
3188
|
+
}));
|
|
3189
|
+
const resized$ = this.carouselService.resizedState.pipe(tap(() => {
|
|
3190
|
+
if (this.carouselService.settings.autoplay)
|
|
3191
|
+
this.play();
|
|
3192
|
+
else
|
|
3193
|
+
this.stop();
|
|
3194
|
+
}));
|
|
3195
|
+
this.autoplaySubscription = merge(initializedCarousel$, changedSettings$, resized$).subscribe();
|
|
3196
|
+
}
|
|
3197
|
+
getNextTimeout(timeout, speed) {
|
|
3198
|
+
if (this.timeout)
|
|
3199
|
+
this.winRef.clearTimeout(this.timeout);
|
|
3200
|
+
this.isArtificialAutoplayTimeout = timeout ? true : false;
|
|
3201
|
+
return this.winRef.setTimeout(() => {
|
|
3202
|
+
if (this.paused || this.carouselService.is(CarouselState.Busy) || this.carouselService.is(CarouselState.Interacting) || this.docRef.hidden)
|
|
3203
|
+
return;
|
|
3204
|
+
this.carouselService.next(speed || this.carouselService.settings.autoplaySpeed || 0);
|
|
3205
|
+
}, timeout || this.carouselService.settings.autoplayTimeout);
|
|
3206
|
+
}
|
|
3207
|
+
;
|
|
3208
|
+
setAutoPlayInterval(timeout) {
|
|
3209
|
+
this.timeout = this.getNextTimeout(timeout);
|
|
3210
|
+
}
|
|
3211
|
+
;
|
|
3212
|
+
handleChangeObservable(data) {
|
|
3213
|
+
if (data.property.name === CarouselProperty.Settings) {
|
|
3214
|
+
if (this.carouselService.settings.autoplay) {
|
|
3215
|
+
this.play();
|
|
3216
|
+
}
|
|
3217
|
+
else {
|
|
3218
|
+
this.stop();
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
else if (data.property.name === CarouselProperty.Position) {
|
|
3222
|
+
if (this.carouselService.settings.autoplay) {
|
|
3223
|
+
this.setAutoPlayInterval();
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
playAfterTranslated() {
|
|
3228
|
+
of('translated').pipe(switchMap(() => this.carouselService.translatedState), first(), filter(() => this.isArtificialAutoplayTimeout), tap(() => this.setAutoPlayInterval())).subscribe(() => { });
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
CarouselAutoplayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselAutoplayService, deps: [{ token: CarouselService }, { token: WINDOW }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3232
|
+
CarouselAutoplayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselAutoplayService, providedIn: 'root' });
|
|
3233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselAutoplayService, decorators: [{
|
|
3234
|
+
type: Injectable,
|
|
3235
|
+
args: [{
|
|
3236
|
+
providedIn: 'root'
|
|
3237
|
+
}]
|
|
3238
|
+
}], ctorParameters: function () {
|
|
3239
|
+
return [{ type: CarouselService }, { type: undefined, decorators: [{
|
|
3240
|
+
type: Inject,
|
|
3241
|
+
args: [WINDOW]
|
|
3242
|
+
}] }, { type: undefined, decorators: [{
|
|
3243
|
+
type: Inject,
|
|
3244
|
+
args: [DOCUMENT]
|
|
3245
|
+
}] }];
|
|
3246
|
+
} });
|
|
3247
|
+
|
|
3248
|
+
class CarouselLazyLoadService {
|
|
3249
|
+
constructor(carouselService) {
|
|
3250
|
+
this.carouselService = carouselService;
|
|
3251
|
+
this.initDataStreams();
|
|
3252
|
+
}
|
|
3253
|
+
ngOnDestroy() {
|
|
3254
|
+
this.lazyLoadSubscription.unsubscribe();
|
|
3255
|
+
}
|
|
3256
|
+
initDataStreams() {
|
|
3257
|
+
const initializedCarousel$ = this.carouselService.initializedState.pipe(tap(() => {
|
|
3258
|
+
const isLazyLoad = this.carouselService.settings && !this.carouselService.settings.lazyLoad;
|
|
3259
|
+
this.carouselService.slidesModel.forEach(item => item.load = isLazyLoad ? true : false);
|
|
3260
|
+
}));
|
|
3261
|
+
const changeSettings$ = this.carouselService.changeState;
|
|
3262
|
+
const resizedCarousel$ = this.carouselService.resizedState;
|
|
3263
|
+
this.lazyLoadSubscription = merge(initializedCarousel$, changeSettings$, resizedCarousel$).pipe(tap(data => this.defineLazyLoadSlides(data))).subscribe();
|
|
3264
|
+
}
|
|
3265
|
+
defineLazyLoadSlides(data) {
|
|
3266
|
+
if (!this.carouselService.settings || !this.carouselService.settings.lazyLoad)
|
|
3267
|
+
return;
|
|
3268
|
+
if ((data.property && data.property.name === CarouselProperty.Position) || data === CarouselEventType.Initialized || data === CarouselEventType.Resized) {
|
|
3269
|
+
const settings = this.carouselService.settings, clones = this.carouselService.clones().length;
|
|
3270
|
+
let n = (settings.center && Math.ceil((settings.items || 0) / 2) || settings.items) || 0, i = ((settings.center && n * -1) || 0), position = (data.property && data.property.value !== undefined ? data.property.value : this.carouselService.current()) + i;
|
|
3271
|
+
if ((settings.lazyLoadEager || 0) > 0) {
|
|
3272
|
+
n += settings.lazyLoadEager || 0;
|
|
3273
|
+
if (settings.loop) {
|
|
3274
|
+
position -= settings.lazyLoadEager || 0;
|
|
3275
|
+
n++;
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
while (i++ < n) {
|
|
3279
|
+
this.load(clones / 2 + this.carouselService.relative(position));
|
|
3280
|
+
if (clones) {
|
|
3281
|
+
this.carouselService.clones(this.carouselService.relative(position)).forEach(value => this.load(value));
|
|
3282
|
+
}
|
|
3283
|
+
position++;
|
|
3284
|
+
}
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
load(position) {
|
|
3288
|
+
if (this.carouselService.slidesModel[position].load)
|
|
3289
|
+
return;
|
|
3290
|
+
this.carouselService.slidesModel[position].load = true;
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
CarouselLazyLoadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselLazyLoadService, deps: [{ token: CarouselService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3294
|
+
CarouselLazyLoadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselLazyLoadService, providedIn: 'root' });
|
|
3295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselLazyLoadService, decorators: [{
|
|
3296
|
+
type: Injectable,
|
|
3297
|
+
args: [{
|
|
3298
|
+
providedIn: 'root'
|
|
3299
|
+
}]
|
|
3300
|
+
}], ctorParameters: function () { return [{ type: CarouselService }]; } });
|
|
3301
|
+
|
|
3302
|
+
class CarouselNavigationService {
|
|
3303
|
+
constructor(carouselService) {
|
|
3304
|
+
this.carouselService = carouselService;
|
|
3305
|
+
this.pages = [];
|
|
3306
|
+
this.navigationModel = {
|
|
3307
|
+
disabled: false,
|
|
3308
|
+
previous: {
|
|
3309
|
+
disabled: false,
|
|
3310
|
+
label: CommonConstants.EMPTY_STRING
|
|
3311
|
+
},
|
|
3312
|
+
next: {
|
|
3313
|
+
disabled: false,
|
|
3314
|
+
label: CommonConstants.EMPTY_STRING
|
|
3315
|
+
}
|
|
3316
|
+
};
|
|
3317
|
+
this.navigationDotsModel = {
|
|
3318
|
+
disabled: false,
|
|
3319
|
+
dots: []
|
|
3320
|
+
};
|
|
3321
|
+
this.initDataStreams();
|
|
3322
|
+
}
|
|
3323
|
+
ngOnDestroy() {
|
|
3324
|
+
this.navSubscription.unsubscribe();
|
|
3325
|
+
}
|
|
3326
|
+
next(speed) {
|
|
3327
|
+
this.carouselService.to(this.getPosition(true), speed);
|
|
3328
|
+
}
|
|
3329
|
+
;
|
|
3330
|
+
previous(speed) {
|
|
3331
|
+
this.carouselService.to(this.getPosition(false), speed);
|
|
3332
|
+
}
|
|
3333
|
+
;
|
|
3334
|
+
to(position, speed, standard) {
|
|
3335
|
+
let length;
|
|
3336
|
+
if (!standard && this.pages.length) {
|
|
3337
|
+
length = this.pages.length;
|
|
3338
|
+
this.carouselService.to(this.pages[((position % length) + length) % length].start, speed);
|
|
3339
|
+
}
|
|
3340
|
+
else {
|
|
3341
|
+
this.carouselService.to(position, speed);
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
;
|
|
3345
|
+
moveByDot(dotId) {
|
|
3346
|
+
const index = this.navigationDotsModel.dots.findIndex(dot => dotId === dot.id);
|
|
3347
|
+
this.to(index, this.carouselService.settings.dotsSpeed || 0);
|
|
3348
|
+
}
|
|
3349
|
+
toSlideById(id) {
|
|
3350
|
+
const position = this.carouselService.slidesModel.findIndex(slide => slide.id === id && slide.isCloned === false);
|
|
3351
|
+
if (position === -1 || position === this.carouselService.current())
|
|
3352
|
+
return;
|
|
3353
|
+
this.carouselService.to(this.carouselService.relative(position), false);
|
|
3354
|
+
}
|
|
3355
|
+
initDataStreams() {
|
|
3356
|
+
const initializedCarousel$ = this.carouselService.initializedState.pipe(tap(() => {
|
|
3357
|
+
this.initialize();
|
|
3358
|
+
this.updateNavPages();
|
|
3359
|
+
this.draw();
|
|
3360
|
+
this.update();
|
|
3361
|
+
this.carouselService.sendChanges();
|
|
3362
|
+
}));
|
|
3363
|
+
const changedSettings$ = this.carouselService.changedState.pipe(filter(data => data.property.name === CarouselProperty.Position), tap(() => this.update()));
|
|
3364
|
+
const refreshedCarousel$ = this.carouselService.refreshedState.pipe(tap(() => {
|
|
3365
|
+
this.updateNavPages();
|
|
3366
|
+
this.draw();
|
|
3367
|
+
this.update();
|
|
3368
|
+
this.carouselService.sendChanges();
|
|
3369
|
+
}));
|
|
3370
|
+
this.navSubscription = merge(initializedCarousel$, changedSettings$, refreshedCarousel$).subscribe();
|
|
3371
|
+
}
|
|
3372
|
+
initialize() {
|
|
3373
|
+
this.navigationModel.disabled = true;
|
|
3374
|
+
if (this.carouselService.settings.navText) {
|
|
3375
|
+
this.navigationModel.previous.label = this.carouselService.settings.navText[0];
|
|
3376
|
+
this.navigationModel.next.label = this.carouselService.settings.navText[1];
|
|
3377
|
+
}
|
|
3378
|
+
this.navigationDotsModel.disabled = true;
|
|
3379
|
+
this.carouselService.navigationModel = this.navigationModel;
|
|
3380
|
+
this.carouselService.navigationDotsModel = this.navigationDotsModel;
|
|
3381
|
+
}
|
|
3382
|
+
updateNavPages() {
|
|
3383
|
+
let i, j, k;
|
|
3384
|
+
const lower = this.carouselService.clones().length / 2, upper = lower + this.carouselService.items().length, maximum = this.carouselService.maximum(true), pages = [], settings = this.carouselService.settings;
|
|
3385
|
+
let size = settings.center || settings.autoWidth || settings.navigationDotsModel
|
|
3386
|
+
? 1 : settings.dotsEach || settings.items;
|
|
3387
|
+
size = +size;
|
|
3388
|
+
if (settings.slideBy !== 'page') {
|
|
3389
|
+
settings.slideBy = Math.min(+settings.slideBy, settings.items || 0);
|
|
3390
|
+
}
|
|
3391
|
+
if (settings.dots || settings.slideBy === 'page') {
|
|
3392
|
+
for (i = lower, j = 0, k = 0; i < upper; i++) {
|
|
3393
|
+
if (j >= size || j === 0) {
|
|
3394
|
+
pages.push({
|
|
3395
|
+
start: Math.min(maximum, i - lower),
|
|
3396
|
+
end: i - lower + size - 1
|
|
3397
|
+
});
|
|
3398
|
+
if (Math.min(maximum, i - lower) === maximum) {
|
|
3399
|
+
break;
|
|
3400
|
+
}
|
|
3401
|
+
j = 0, ++k;
|
|
3402
|
+
}
|
|
3403
|
+
j += this.carouselService.mergers(this.carouselService.relative(i));
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
this.pages = pages;
|
|
3407
|
+
}
|
|
3408
|
+
draw() {
|
|
3409
|
+
let difference;
|
|
3410
|
+
const settings = this.carouselService.settings, items = this.carouselService.items(), disabled = items.length <= (settings.items || 0);
|
|
3411
|
+
this.navigationModel.disabled = !settings.nav || disabled;
|
|
3412
|
+
this.navigationDotsModel.disabled = !settings.dots || disabled;
|
|
3413
|
+
if (settings.dots) {
|
|
3414
|
+
difference = this.pages.length - this.navigationDotsModel.dots.length;
|
|
3415
|
+
if (settings.navigationDotsModel && difference !== 0) {
|
|
3416
|
+
this.navigationDotsModel.dots = [];
|
|
3417
|
+
items.forEach(item => {
|
|
3418
|
+
this.navigationDotsModel.dots.push({
|
|
3419
|
+
active: false,
|
|
3420
|
+
id: `dot-${item.id}`
|
|
3421
|
+
});
|
|
3422
|
+
});
|
|
3423
|
+
}
|
|
3424
|
+
else if (difference > 0) {
|
|
3425
|
+
const startI = this.navigationDotsModel.dots.length > 0 ? this.navigationDotsModel.dots.length : 0;
|
|
3426
|
+
for (let i = 0; i < difference; i++) {
|
|
3427
|
+
this.navigationDotsModel.dots.push({
|
|
3428
|
+
active: false,
|
|
3429
|
+
id: `dot-${i + startI}`
|
|
3430
|
+
});
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
else if (difference < 0) {
|
|
3434
|
+
this.navigationDotsModel.dots.splice(difference, Math.abs(difference));
|
|
3435
|
+
}
|
|
3436
|
+
}
|
|
3437
|
+
this.carouselService.navigationModel = this.navigationModel;
|
|
3438
|
+
this.carouselService.navigationDotsModel = this.navigationDotsModel;
|
|
3439
|
+
}
|
|
3440
|
+
;
|
|
3441
|
+
update() {
|
|
3442
|
+
this.updateNavButtons();
|
|
3443
|
+
this.updateDots();
|
|
3444
|
+
}
|
|
3445
|
+
updateNavButtons() {
|
|
3446
|
+
const settings = this.carouselService.settings, loop = settings.loop || settings.rewind || false, index = this.carouselService.relative(this.carouselService.current() || 0);
|
|
3447
|
+
if (settings.nav) {
|
|
3448
|
+
this.navigationModel.previous.disabled = !loop && index <= this.carouselService.minimum(true);
|
|
3449
|
+
this.navigationModel.next.disabled = !loop && index >= this.carouselService.maximum(true);
|
|
3450
|
+
}
|
|
3451
|
+
this.carouselService.navigationModel = this.navigationModel;
|
|
3452
|
+
}
|
|
3453
|
+
updateDots() {
|
|
3454
|
+
let curActiveDotI;
|
|
3455
|
+
if (!this.carouselService.settings.dots)
|
|
3456
|
+
return;
|
|
3457
|
+
this.navigationDotsModel.dots.forEach(item => {
|
|
3458
|
+
if (item.active === true) {
|
|
3459
|
+
item.active = false;
|
|
3460
|
+
}
|
|
3461
|
+
});
|
|
3462
|
+
curActiveDotI = this.getCurrent();
|
|
3463
|
+
if (this.navigationDotsModel.dots.length) {
|
|
3464
|
+
this.navigationDotsModel.dots[curActiveDotI].active = true;
|
|
3465
|
+
}
|
|
3466
|
+
this.carouselService.navigationDotsModel = this.navigationDotsModel;
|
|
3467
|
+
}
|
|
3468
|
+
getCurrent() {
|
|
3469
|
+
const current = this.carouselService.relative(this.carouselService.current() || 0);
|
|
3470
|
+
let finalCurrent;
|
|
3471
|
+
const pages = this.pages.filter((page, index) => {
|
|
3472
|
+
return page.start <= current && page.end >= current;
|
|
3473
|
+
}).pop();
|
|
3474
|
+
finalCurrent = this.pages.findIndex(page => {
|
|
3475
|
+
return page.start === pages.start && page.end === pages.end;
|
|
3476
|
+
});
|
|
3477
|
+
return finalCurrent;
|
|
3478
|
+
}
|
|
3479
|
+
;
|
|
3480
|
+
getPosition(successor) {
|
|
3481
|
+
let position, length;
|
|
3482
|
+
const settings = this.carouselService.settings;
|
|
3483
|
+
if (settings.slideBy === 'page') {
|
|
3484
|
+
position = this.getCurrent();
|
|
3485
|
+
length = this.pages.length;
|
|
3486
|
+
successor ? ++position : --position;
|
|
3487
|
+
position = this.pages[((position % length) + length) % length].start;
|
|
3488
|
+
}
|
|
3489
|
+
else {
|
|
3490
|
+
position = this.carouselService.relative(this.carouselService.current() || 0);
|
|
3491
|
+
length = this.carouselService.items().length;
|
|
3492
|
+
successor ? position += +settings.slideBy : position -= +settings.slideBy;
|
|
3493
|
+
}
|
|
3494
|
+
return position;
|
|
3495
|
+
}
|
|
3496
|
+
;
|
|
3497
|
+
}
|
|
3498
|
+
CarouselNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselNavigationService, deps: [{ token: CarouselService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3499
|
+
CarouselNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselNavigationService, providedIn: 'root' });
|
|
3500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselNavigationService, decorators: [{
|
|
3501
|
+
type: Injectable,
|
|
3502
|
+
args: [{
|
|
3503
|
+
providedIn: 'root'
|
|
3504
|
+
}]
|
|
3505
|
+
}], ctorParameters: function () { return [{ type: CarouselService }]; } });
|
|
3506
|
+
|
|
3507
|
+
class CarouselStageComponent {
|
|
3508
|
+
constructor(carouselService, animateService) {
|
|
3509
|
+
this.carouselService = carouselService;
|
|
3510
|
+
this.animateService = animateService;
|
|
3511
|
+
this.stageModel = {
|
|
3512
|
+
width: 0,
|
|
3513
|
+
paddingL: 0,
|
|
3514
|
+
paddingR: 0,
|
|
3515
|
+
transform: CommonConstants.EMPTY_STRING,
|
|
3516
|
+
transition: CommonConstants.EMPTY_STRING
|
|
3517
|
+
};
|
|
3518
|
+
this.slidesModel = [];
|
|
3519
|
+
this.preparePublicSlide = (slide) => {
|
|
3520
|
+
const newSlide = Object.assign({}, slide);
|
|
3521
|
+
newSlide.tplRef = null;
|
|
3522
|
+
return newSlide;
|
|
3523
|
+
};
|
|
3524
|
+
}
|
|
3525
|
+
get styles() {
|
|
3526
|
+
return {
|
|
3527
|
+
width: getCssLikeValue(this.stageModel.width),
|
|
3528
|
+
transform: this.stageModel.transform,
|
|
3529
|
+
transition: this.stageModel.transition,
|
|
3530
|
+
paddingLeft: getCssLikeValue(this.stageModel.paddingL),
|
|
3531
|
+
paddingRight: getCssLikeValue(this.stageModel.paddingR)
|
|
3532
|
+
};
|
|
3533
|
+
}
|
|
3534
|
+
getItemStyles(slide) {
|
|
3535
|
+
return {
|
|
3536
|
+
width: getCssLikeValue(slide.width),
|
|
3537
|
+
marginLeft: getCssLikeValue(slide.marginL),
|
|
3538
|
+
marginRight: getCssLikeValue(slide.marginR),
|
|
3539
|
+
left: getCssLikeValue(slide.left)
|
|
3540
|
+
};
|
|
3541
|
+
}
|
|
3542
|
+
onTransitionEnd() {
|
|
3543
|
+
this.carouselService.onTransitionEnd();
|
|
3544
|
+
}
|
|
3545
|
+
clear(id) {
|
|
3546
|
+
this.animateService.clear(id);
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
CarouselStageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselStageComponent, deps: [{ token: CarouselService }, { token: CarouselAnimateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3550
|
+
CarouselStageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: CarouselStageComponent, selector: "sfc-carousel-stage", inputs: { stageModel: "stageModel", slidesModel: "slidesModel" }, ngImport: i0, template: "<div class=\"container\" [ngStyle]=\"styles\" (transitionend)=\"onTransitionEnd()\">\r\n <ng-container *ngFor=\"let slide of slidesModel; let i = index\">\r\n <div class=\"item\" [ngClass]=\"slide.classes\" [ngStyle]=\"getItemStyles(slide)\" (animationend)=\"clear(slide.id)\"\r\n [@autoHeight]=\"slide.heightState\">\r\n <ng-template *ngIf=\"slide.load\" [ngTemplateOutlet]=\"slide.tplRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: preparePublicSlide(slide), index: i }\">\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host .container{position:relative;touch-action:pan-y;touch-action:manipulation;-webkit-backface-visibility:hidden;backface-visibility:hidden}:host .container:after{content:\".\";display:block;clear:both;visibility:hidden;line-height:0;height:0}:host .container .item{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translate(0);position:relative;min-height:1px;float:left;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}:host .container .item.center{z-index:5}:host .container .item img{display:block;width:100%}\n"], directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
|
|
3551
|
+
trigger('autoHeight', [
|
|
3552
|
+
state('nulled', style({ height: 0 })),
|
|
3553
|
+
state('full', style({ height: '*' })),
|
|
3554
|
+
transition('full => nulled', [
|
|
3555
|
+
animate('700ms 350ms')
|
|
3556
|
+
]),
|
|
3557
|
+
transition('nulled => full', [
|
|
3558
|
+
animate(350)
|
|
3559
|
+
]),
|
|
3560
|
+
])
|
|
3561
|
+
] });
|
|
3562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselStageComponent, decorators: [{
|
|
3563
|
+
type: Component,
|
|
3564
|
+
args: [{ selector: 'sfc-carousel-stage', animations: [
|
|
3565
|
+
trigger('autoHeight', [
|
|
3566
|
+
state('nulled', style({ height: 0 })),
|
|
3567
|
+
state('full', style({ height: '*' })),
|
|
3568
|
+
transition('full => nulled', [
|
|
3569
|
+
animate('700ms 350ms')
|
|
3570
|
+
]),
|
|
3571
|
+
transition('nulled => full', [
|
|
3572
|
+
animate(350)
|
|
3573
|
+
]),
|
|
3574
|
+
])
|
|
3575
|
+
], template: "<div class=\"container\" [ngStyle]=\"styles\" (transitionend)=\"onTransitionEnd()\">\r\n <ng-container *ngFor=\"let slide of slidesModel; let i = index\">\r\n <div class=\"item\" [ngClass]=\"slide.classes\" [ngStyle]=\"getItemStyles(slide)\" (animationend)=\"clear(slide.id)\"\r\n [@autoHeight]=\"slide.heightState\">\r\n <ng-template *ngIf=\"slide.load\" [ngTemplateOutlet]=\"slide.tplRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: preparePublicSlide(slide), index: i }\">\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host .container{position:relative;touch-action:pan-y;touch-action:manipulation;-webkit-backface-visibility:hidden;backface-visibility:hidden}:host .container:after{content:\".\";display:block;clear:both;visibility:hidden;line-height:0;height:0}:host .container .item{-webkit-backface-visibility:hidden;backface-visibility:hidden;transform:translate(0);position:relative;min-height:1px;float:left;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}:host .container .item.center{z-index:5}:host .container .item img{display:block;width:100%}\n"] }]
|
|
3576
|
+
}], ctorParameters: function () { return [{ type: CarouselService }, { type: CarouselAnimateService }]; }, propDecorators: { stageModel: [{
|
|
3577
|
+
type: Input
|
|
3578
|
+
}], slidesModel: [{
|
|
3579
|
+
type: Input
|
|
3580
|
+
}] } });
|
|
3581
|
+
|
|
3582
|
+
class CarouselComponent {
|
|
3583
|
+
constructor(el, resizeService, carouselService, navigationService, autoplayService, lazyLoadService, animateService, changeDetectorRef, documentRef) {
|
|
3584
|
+
this.el = el;
|
|
3585
|
+
this.resizeService = resizeService;
|
|
3586
|
+
this.carouselService = carouselService;
|
|
3587
|
+
this.navigationService = navigationService;
|
|
3588
|
+
this.autoplayService = autoplayService;
|
|
3589
|
+
this.lazyLoadService = lazyLoadService;
|
|
3590
|
+
this.animateService = animateService;
|
|
3591
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
3592
|
+
this.translated = new EventEmitter();
|
|
3593
|
+
this.initialized = new EventEmitter();
|
|
3594
|
+
this.changing = new EventEmitter();
|
|
3595
|
+
this.changed = new EventEmitter();
|
|
3596
|
+
this.slidesModel = [];
|
|
3597
|
+
this.carouselLoaded = false;
|
|
3598
|
+
this.carouselWindowWidth = 0;
|
|
3599
|
+
this.documentRef = documentRef;
|
|
3600
|
+
}
|
|
3601
|
+
get rtl() {
|
|
3602
|
+
var _a;
|
|
3603
|
+
return ((_a = this.carouselDOMModel) === null || _a === void 0 ? void 0 : _a.rtl) || false;
|
|
3604
|
+
}
|
|
3605
|
+
get clientWidth() {
|
|
3606
|
+
return this.el.nativeElement.querySelector('.container').clientWidth;
|
|
3607
|
+
}
|
|
3608
|
+
onVisibilityChange() {
|
|
3609
|
+
if (this.carouselService.settings.autoplay) {
|
|
3610
|
+
switch (this.documentRef.visibilityState) {
|
|
3611
|
+
case UIClass.Visible:
|
|
3612
|
+
if (!this.autoplayService.isAutoplayStopped)
|
|
3613
|
+
this.autoplayService.play();
|
|
3614
|
+
break;
|
|
3615
|
+
case UIClass.Hidden:
|
|
3616
|
+
this.autoplayService.pause();
|
|
3617
|
+
break;
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
;
|
|
3622
|
+
ngOnInit() {
|
|
3623
|
+
this.carouselWindowWidth = this.clientWidth;
|
|
3624
|
+
this.initDataStreams();
|
|
3625
|
+
}
|
|
3626
|
+
ngAfterContentInit() {
|
|
3627
|
+
if (any(this.slides.toArray())) {
|
|
3628
|
+
this.carouselService.setup(this.carouselWindowWidth, this.slides.toArray(), this.options);
|
|
3629
|
+
this.carouselService.initialize(this.slides.toArray());
|
|
3630
|
+
this.initResizeWatcher();
|
|
3631
|
+
}
|
|
3632
|
+
this.slidesChangesSubscription = this.slides.changes.pipe(tap((slides) => {
|
|
3633
|
+
if (any(slides)) {
|
|
3634
|
+
this.carouselService.setup(this.carouselWindowWidth, slides.toArray(), this.options);
|
|
3635
|
+
this.carouselService.initialize(slides.toArray());
|
|
3636
|
+
}
|
|
3637
|
+
else {
|
|
3638
|
+
this.carouselLoaded = false;
|
|
3639
|
+
}
|
|
3640
|
+
})).subscribe();
|
|
3641
|
+
}
|
|
3642
|
+
ngOnDestroy() {
|
|
3643
|
+
if (this.resizeSubscription)
|
|
3644
|
+
this.resizeSubscription.unsubscribe();
|
|
3645
|
+
if (this.slidesChangesSubscription)
|
|
3646
|
+
this.slidesChangesSubscription.unsubscribe();
|
|
3647
|
+
if (this.carouselSubscription)
|
|
3648
|
+
this.carouselSubscription.unsubscribe();
|
|
3649
|
+
}
|
|
3650
|
+
initDataStreams() {
|
|
3651
|
+
const _viewCurSettings$ = this.carouselService.viewCurrrentSettings.pipe(tap(data => {
|
|
3652
|
+
this.carouselDOMModel = data.carouselDOMModel;
|
|
3653
|
+
this.stageModel = data.stageModel;
|
|
3654
|
+
this.slidesModel = data.slidesModel;
|
|
3655
|
+
if (!this.carouselLoaded) {
|
|
3656
|
+
this.carouselLoaded = true;
|
|
3657
|
+
}
|
|
3658
|
+
this.navigationModel = data.navigationModel;
|
|
3659
|
+
this.navigationDotsModel = data.navigationDotsModel;
|
|
3660
|
+
this.changeDetectorRef.markForCheck();
|
|
3661
|
+
}));
|
|
3662
|
+
const _initializedCarousel$ = this.carouselService.initializedState.pipe(tap(() => {
|
|
3663
|
+
this.gatherTranslatedData();
|
|
3664
|
+
this.initialized.emit(this.slideEvent);
|
|
3665
|
+
}));
|
|
3666
|
+
const _translatedCarousel$ = this.carouselService.translatedState.pipe(tap(() => {
|
|
3667
|
+
this.gatherTranslatedData();
|
|
3668
|
+
this.translated.emit(this.slideEvent);
|
|
3669
|
+
}));
|
|
3670
|
+
const _changeCarousel$ = this.carouselService.changeState.pipe(tap(() => {
|
|
3671
|
+
this.gatherTranslatedData();
|
|
3672
|
+
this.changing.emit(this.slideEvent);
|
|
3673
|
+
}));
|
|
3674
|
+
const _changedCarousel$ = this.carouselService.changeState.pipe(switchMap(value => {
|
|
3675
|
+
const changedPosition = of(value).pipe(filter(() => value.property.name === CarouselProperty.Position), switchMap(() => from(this.slidesModel)), skip(value.property.value), take(this.carouselService.settings.items || 0), map(slide => {
|
|
3676
|
+
const id = slide.id.indexOf(CarouselServiceConstants.CLONE_ID_PREFIX) >= 0 ? slide.id.slice(CarouselServiceConstants.CLONE_ID_PREFIX.length) : slide.id;
|
|
3677
|
+
return Object.assign(Object.assign({}, slide), { id: id, isActive: true });
|
|
3678
|
+
}), toArray(), map(slides => {
|
|
3679
|
+
return {
|
|
3680
|
+
slides: slides,
|
|
3681
|
+
startPosition: this.carouselService.relative(value.property.value)
|
|
3682
|
+
};
|
|
3683
|
+
}));
|
|
3684
|
+
return merge(changedPosition);
|
|
3685
|
+
}), tap(slidesData => {
|
|
3686
|
+
var _a;
|
|
3687
|
+
this.gatherTranslatedData();
|
|
3688
|
+
this.changed.emit(((_a = slidesData.slides) === null || _a === void 0 ? void 0 : _a.length) ? slidesData : this.slideEvent);
|
|
3689
|
+
}));
|
|
3690
|
+
this.carouselSubscription = merge(_viewCurSettings$, _translatedCarousel$, _changeCarousel$, _changedCarousel$, _initializedCarousel$).subscribe();
|
|
3691
|
+
}
|
|
3692
|
+
initResizeWatcher() {
|
|
3693
|
+
if (Object.keys(this.carouselService.options.responsive || {}).length) {
|
|
3694
|
+
this.resizeSubscription = this.resizeService.onResize$
|
|
3695
|
+
.pipe(filter(() => this.carouselWindowWidth !== this.clientWidth), delay(this.carouselService.settings.responsiveRefreshRate || 0)).subscribe(() => {
|
|
3696
|
+
this.carouselService.onResize(this.clientWidth);
|
|
3697
|
+
this.carouselWindowWidth = this.clientWidth;
|
|
3698
|
+
});
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
onTransitionEnd() {
|
|
3702
|
+
this.carouselService.onTransitionEnd();
|
|
3703
|
+
}
|
|
3704
|
+
next() {
|
|
3705
|
+
if (this.carouselLoaded)
|
|
3706
|
+
this.navigationService.next(this.carouselService.settings.navSpeed || false);
|
|
3707
|
+
}
|
|
3708
|
+
previous() {
|
|
3709
|
+
if (this.carouselLoaded)
|
|
3710
|
+
this.navigationService.previous(this.carouselService.settings.navSpeed || false);
|
|
3711
|
+
}
|
|
3712
|
+
moveByDot(dotId) {
|
|
3713
|
+
if (this.carouselLoaded)
|
|
3714
|
+
this.navigationService.moveByDot(dotId);
|
|
3715
|
+
}
|
|
3716
|
+
pause() {
|
|
3717
|
+
this.autoplayService.startPausing();
|
|
3718
|
+
}
|
|
3719
|
+
play() {
|
|
3720
|
+
this.autoplayService.startPlayingMouseLeave();
|
|
3721
|
+
}
|
|
3722
|
+
stopAutoplay() {
|
|
3723
|
+
this.autoplayService.isAutoplayStopped = true;
|
|
3724
|
+
this.autoplayService.stop();
|
|
3725
|
+
}
|
|
3726
|
+
startAutoplay() {
|
|
3727
|
+
this.autoplayService.isAutoplayStopped = false;
|
|
3728
|
+
this.autoplayService.play();
|
|
3729
|
+
}
|
|
3730
|
+
gatherTranslatedData() {
|
|
3731
|
+
let startPosition;
|
|
3732
|
+
const activeSlides = this.slidesModel
|
|
3733
|
+
.filter(slide => slide.isActive === true)
|
|
3734
|
+
.map(slide => {
|
|
3735
|
+
return {
|
|
3736
|
+
id: slide.id.indexOf(CarouselServiceConstants.CLONE_ID_PREFIX) >= 0 ? slide.id.slice(CarouselServiceConstants.CLONE_ID_PREFIX.length) : slide.id,
|
|
3737
|
+
width: slide.width,
|
|
3738
|
+
marginL: slide.marginL,
|
|
3739
|
+
marginR: slide.marginR,
|
|
3740
|
+
center: slide.isCentered,
|
|
3741
|
+
tplRef: null,
|
|
3742
|
+
classes: {}
|
|
3743
|
+
};
|
|
3744
|
+
});
|
|
3745
|
+
startPosition = this.carouselService.relative(this.carouselService.current() || 0);
|
|
3746
|
+
this.slideEvent = {
|
|
3747
|
+
startPosition: startPosition,
|
|
3748
|
+
slides: activeSlides
|
|
3749
|
+
};
|
|
3750
|
+
}
|
|
3751
|
+
}
|
|
3752
|
+
CarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.ElementRef }, { token: i1.ResizeService }, { token: CarouselService }, { token: CarouselNavigationService }, { token: CarouselAutoplayService }, { token: CarouselLazyLoadService }, { token: CarouselAnimateService }, { token: i0.ChangeDetectorRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
3753
|
+
CarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.7", type: CarouselComponent, selector: "sfc-carousel", inputs: { options: "options" }, outputs: { translated: "translated", initialized: "initialized", changing: "changing", changed: "changed" }, host: { listeners: { "document:visibilitychange": "onVisibilityChange()" }, properties: { "class.rtl": "this.rtl" } }, providers: [
|
|
3754
|
+
CarouselNavigationService,
|
|
3755
|
+
CarouselAutoplayService,
|
|
3756
|
+
CarouselService,
|
|
3757
|
+
CarouselAnimateService,
|
|
3758
|
+
CarouselLazyLoadService
|
|
3759
|
+
], queries: [{ propertyName: "slides", predicate: CarouselSlideDirective }], ngImport: i0, template: "<div class=\"container\" (mouseover)=\"pause()\" (mouseleave)=\"play()\">\r\n <div *ngIf=\"carouselLoaded\" class=\"stage\">\r\n <sfc-carousel-stage [stageModel]=\"stageModel\" [slidesModel]=\"slidesModel\"></sfc-carousel-stage>\r\n </div>\r\n <ng-container *ngIf=\"slides.toArray().length\">\r\n <div class=\"navigation\" [class.disabled]=\"navigationModel?.disabled\">\r\n <div class=\"action previous\" [class.disabled]=\"navigationModel?.previous?.disabled\" (click)=\"previous()\">\r\n {{navigationModel?.previous?.label}}\r\n </div>\r\n <div class=\"action next\" [class.disabled]=\"navigationModel?.next?.disabled\" (click)=\"next()\">\r\n {{navigationModel?.next?.label}}\r\n </div>\r\n </div>\r\n <div class=\"dots\" [class.disabled]=\"navigationDotsModel?.disabled\">\r\n <div *ngFor=\"let dot of navigationDotsModel?.dots\" class=\"dot\" [class.active]=\"dot.active\"\r\n (click)=\"moveByDot(dot.id)\">\r\n <span></span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host .container{display:block;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}:host .container .stage{position:relative;overflow:hidden;transform:translate(0)}:host .container .dots{text-align:center;-webkit-tap-highlight-color:transparent}:host .container .dots.disabled{display:none}:host .container .dots .dot{display:inline-block;zoom:1;cursor:pointer;-webkit-user-select:none;user-select:none}:host .container .dots .dot span{width:10px;height:10px;margin:5px 7px;display:block;-webkit-backface-visibility:visible;backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}:host-context(.sfc-default-theme) :host .container .dots .dot span{background:#d8d7d7}:host-context(.sfc-dark-theme) :host .container .dots .dot span{background:#f6f6f6}:host-context(.sfc-default-theme) :host .container .dots .dot.active span,:host-context(.sfc-default-theme) :host .container .dots .dot:hover span{background:#656d78}:host-context(.sfc-dark-theme) :host .container .dots .dot.active span,:host-context(.sfc-dark-theme) :host .container .dots .dot:hover span{background:#aab2bd}:host .container .navigation{margin-top:10px;text-align:center;-webkit-tap-highlight-color:transparent}:host .container .navigation .action{font-size:14px;margin:5px;padding:4px 7px;display:inline-block;cursor:pointer;border-radius:3px}:host-context(.sfc-default-theme) :host .container .navigation .action{color:#fff}:host-context(.sfc-dark-theme) :host .container .navigation .action{color:#545e61}:host-context(.sfc-default-theme) :host .container .navigation .action{background:#d8d7d7}:host-context(.sfc-dark-theme) :host .container .navigation .action{background:#f6f6f6}:host .container .navigation .action:hover{text-decoration:none}:host-context(.sfc-default-theme) :host .container .navigation .action:hover{background:#0000001a}:host-context(.sfc-dark-theme) :host .container .navigation .action:hover{background:#d8d7d7}:host .container .navigation .action.previous,:host .container .navigation .action.next{cursor:pointer;-webkit-user-select:none;user-select:none}:host .container .navigation .action.disabled{opacity:.5;cursor:default}:host .container .navigation.disabled{display:none}:host .container .navigation.disabled+.dots{margin-top:10px}:host.rtl .container{direction:rtl}\n"], components: [{ type: CarouselStageComponent, selector: "sfc-carousel-stage", inputs: ["stageModel", "slidesModel"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
3760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
3761
|
+
type: Component,
|
|
3762
|
+
args: [{ selector: 'sfc-carousel', providers: [
|
|
3763
|
+
CarouselNavigationService,
|
|
3764
|
+
CarouselAutoplayService,
|
|
3765
|
+
CarouselService,
|
|
3766
|
+
CarouselAnimateService,
|
|
3767
|
+
CarouselLazyLoadService
|
|
3768
|
+
], template: "<div class=\"container\" (mouseover)=\"pause()\" (mouseleave)=\"play()\">\r\n <div *ngIf=\"carouselLoaded\" class=\"stage\">\r\n <sfc-carousel-stage [stageModel]=\"stageModel\" [slidesModel]=\"slidesModel\"></sfc-carousel-stage>\r\n </div>\r\n <ng-container *ngIf=\"slides.toArray().length\">\r\n <div class=\"navigation\" [class.disabled]=\"navigationModel?.disabled\">\r\n <div class=\"action previous\" [class.disabled]=\"navigationModel?.previous?.disabled\" (click)=\"previous()\">\r\n {{navigationModel?.previous?.label}}\r\n </div>\r\n <div class=\"action next\" [class.disabled]=\"navigationModel?.next?.disabled\" (click)=\"next()\">\r\n {{navigationModel?.next?.label}}\r\n </div>\r\n </div>\r\n <div class=\"dots\" [class.disabled]=\"navigationDotsModel?.disabled\">\r\n <div *ngFor=\"let dot of navigationDotsModel?.dots\" class=\"dot\" [class.active]=\"dot.active\"\r\n (click)=\"moveByDot(dot.id)\">\r\n <span></span>\r\n </div>\r\n </div>\r\n </ng-container>\r\n</div>", styles: [":host .container{display:block;width:100%;-webkit-tap-highlight-color:transparent;position:relative;z-index:1}:host .container .stage{position:relative;overflow:hidden;transform:translate(0)}:host .container .dots{text-align:center;-webkit-tap-highlight-color:transparent}:host .container .dots.disabled{display:none}:host .container .dots .dot{display:inline-block;zoom:1;cursor:pointer;-webkit-user-select:none;user-select:none}:host .container .dots .dot span{width:10px;height:10px;margin:5px 7px;display:block;-webkit-backface-visibility:visible;backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}:host-context(.sfc-default-theme) :host .container .dots .dot span{background:#d8d7d7}:host-context(.sfc-dark-theme) :host .container .dots .dot span{background:#f6f6f6}:host-context(.sfc-default-theme) :host .container .dots .dot.active span,:host-context(.sfc-default-theme) :host .container .dots .dot:hover span{background:#656d78}:host-context(.sfc-dark-theme) :host .container .dots .dot.active span,:host-context(.sfc-dark-theme) :host .container .dots .dot:hover span{background:#aab2bd}:host .container .navigation{margin-top:10px;text-align:center;-webkit-tap-highlight-color:transparent}:host .container .navigation .action{font-size:14px;margin:5px;padding:4px 7px;display:inline-block;cursor:pointer;border-radius:3px}:host-context(.sfc-default-theme) :host .container .navigation .action{color:#fff}:host-context(.sfc-dark-theme) :host .container .navigation .action{color:#545e61}:host-context(.sfc-default-theme) :host .container .navigation .action{background:#d8d7d7}:host-context(.sfc-dark-theme) :host .container .navigation .action{background:#f6f6f6}:host .container .navigation .action:hover{text-decoration:none}:host-context(.sfc-default-theme) :host .container .navigation .action:hover{background:#0000001a}:host-context(.sfc-dark-theme) :host .container .navigation .action:hover{background:#d8d7d7}:host .container .navigation .action.previous,:host .container .navigation .action.next{cursor:pointer;-webkit-user-select:none;user-select:none}:host .container .navigation .action.disabled{opacity:.5;cursor:default}:host .container .navigation.disabled{display:none}:host .container .navigation.disabled+.dots{margin-top:10px}:host.rtl .container{direction:rtl}\n"] }]
|
|
3769
|
+
}], ctorParameters: function () {
|
|
3770
|
+
return [{ type: i0.ElementRef }, { type: i1.ResizeService }, { type: CarouselService }, { type: CarouselNavigationService }, { type: CarouselAutoplayService }, { type: CarouselLazyLoadService }, { type: CarouselAnimateService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
3771
|
+
type: Inject,
|
|
3772
|
+
args: [DOCUMENT]
|
|
3773
|
+
}] }];
|
|
3774
|
+
}, propDecorators: { options: [{
|
|
3775
|
+
type: Input
|
|
3776
|
+
}], translated: [{
|
|
3777
|
+
type: Output
|
|
3778
|
+
}], initialized: [{
|
|
3779
|
+
type: Output
|
|
3780
|
+
}], changing: [{
|
|
3781
|
+
type: Output
|
|
3782
|
+
}], changed: [{
|
|
3783
|
+
type: Output
|
|
3784
|
+
}], slides: [{
|
|
3785
|
+
type: ContentChildren,
|
|
3786
|
+
args: [CarouselSlideDirective]
|
|
3787
|
+
}], rtl: [{
|
|
3788
|
+
type: HostBinding,
|
|
3789
|
+
args: ['class.rtl']
|
|
3790
|
+
}], onVisibilityChange: [{
|
|
3791
|
+
type: HostListener,
|
|
3792
|
+
args: ['document:visibilitychange']
|
|
3793
|
+
}] } });
|
|
3794
|
+
|
|
3795
|
+
Chart.register(Title, Tooltip, Filler, Legend, LineController, LineElement, PointElement, LinearScale, CategoryScale, BarController, BarElement, DoughnutController, ArcElement, RadarController, RadialLinearScale, PieController, PolarAreaController, BubbleController, ScatterController, TimeSeriesScale);
|
|
3796
|
+
class NgxSfcComponentsModule {
|
|
3797
|
+
}
|
|
3798
|
+
NgxSfcComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NgxSfcComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3799
|
+
NgxSfcComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NgxSfcComponentsModule, declarations: [
|
|
3800
|
+
// Tabs
|
|
3801
|
+
TabsComponent,
|
|
3802
|
+
TabLabelLineComponent,
|
|
3803
|
+
TabLabelIconComponent,
|
|
3804
|
+
TabLabelLineSliderComponent,
|
|
3805
|
+
TabLabelIconSliderComponent,
|
|
3806
|
+
// Menus
|
|
3807
|
+
SideMenuComponent,
|
|
3808
|
+
SideMenuHeaderComponent,
|
|
3809
|
+
SideMenuItemComponent,
|
|
3810
|
+
SideMenuTitleComponent,
|
|
3811
|
+
SideMenuItemContentComponent,
|
|
3812
|
+
DropdownMenuComponent,
|
|
3813
|
+
DropdownMenuItemComponent,
|
|
3814
|
+
NavigationMenuComponent,
|
|
3815
|
+
NavigationMenuItemComponent,
|
|
3816
|
+
// Stars
|
|
3817
|
+
StarsComponent,
|
|
3818
|
+
// Avatar
|
|
3819
|
+
AvatarComponent,
|
|
3820
|
+
AvatarBadgeComponent,
|
|
3821
|
+
// Progress
|
|
3822
|
+
ProgressLineComponent,
|
|
3823
|
+
ProgressSemiCircleComponent,
|
|
3824
|
+
ProgressCircleComponent,
|
|
3825
|
+
// Tags
|
|
3826
|
+
TagsComponent,
|
|
3827
|
+
TagComponent,
|
|
3828
|
+
// Slider
|
|
3829
|
+
SliderComponent,
|
|
3830
|
+
SliderItemComponent,
|
|
3831
|
+
SliderButtonComponent,
|
|
3832
|
+
SliderPaginationComponent,
|
|
3833
|
+
// Timeline
|
|
3834
|
+
TimelineComponent,
|
|
3835
|
+
TimelineItemComponent,
|
|
3836
|
+
// Notification
|
|
3837
|
+
NotificationComponent,
|
|
3838
|
+
NotificationContentComponent,
|
|
3839
|
+
// Chart
|
|
3840
|
+
ChartComponent,
|
|
3841
|
+
// Table
|
|
3842
|
+
TableComponent,
|
|
3843
|
+
DefaultTableColumnComponent,
|
|
3844
|
+
SelectableTableColumnComponent,
|
|
3845
|
+
ColumnsToggleComponent,
|
|
3846
|
+
DefaultTableRowComponent,
|
|
3847
|
+
ExpandedTableRowComponent,
|
|
3848
|
+
DefaultTableCardComponent,
|
|
3849
|
+
// Carousel
|
|
3850
|
+
CarouselComponent,
|
|
3851
|
+
CarouselStageComponent,
|
|
3852
|
+
CarouselSlideDirective
|
|
3853
|
+
], imports: [CommonModule,
|
|
3854
|
+
NgxSfcCommonModule], exports: [
|
|
3855
|
+
// Tabs
|
|
3856
|
+
TabsComponent,
|
|
3857
|
+
TabLabelLineComponent,
|
|
3858
|
+
TabLabelIconComponent,
|
|
3859
|
+
TabLabelLineSliderComponent,
|
|
3860
|
+
TabLabelIconSliderComponent,
|
|
3861
|
+
// Menus
|
|
3862
|
+
SideMenuComponent,
|
|
3863
|
+
DropdownMenuComponent,
|
|
3864
|
+
NavigationMenuComponent,
|
|
3865
|
+
// Stars
|
|
3866
|
+
StarsComponent,
|
|
3867
|
+
// Avatar
|
|
3868
|
+
AvatarComponent,
|
|
3869
|
+
AvatarBadgeComponent,
|
|
3870
|
+
// Progress
|
|
3871
|
+
ProgressLineComponent,
|
|
3872
|
+
ProgressSemiCircleComponent,
|
|
3873
|
+
ProgressCircleComponent,
|
|
3874
|
+
// Tags
|
|
3875
|
+
TagsComponent,
|
|
3876
|
+
// Slider
|
|
3877
|
+
SliderComponent,
|
|
3878
|
+
// Timeline
|
|
3879
|
+
TimelineComponent,
|
|
3880
|
+
// Notification
|
|
3881
|
+
NotificationComponent,
|
|
3882
|
+
// Chart
|
|
3883
|
+
ChartComponent,
|
|
3884
|
+
// Table
|
|
3885
|
+
TableComponent,
|
|
3886
|
+
ExpandedTableRowComponent,
|
|
3887
|
+
// Carousel
|
|
3888
|
+
CarouselComponent,
|
|
3889
|
+
CarouselSlideDirective
|
|
3890
|
+
] });
|
|
3891
|
+
NgxSfcComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NgxSfcComponentsModule, imports: [[
|
|
3892
|
+
CommonModule,
|
|
3893
|
+
NgxSfcCommonModule
|
|
3894
|
+
]] });
|
|
3895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.7", ngImport: i0, type: NgxSfcComponentsModule, decorators: [{
|
|
3896
|
+
type: NgModule,
|
|
3897
|
+
args: [{
|
|
3898
|
+
declarations: [
|
|
3899
|
+
// Tabs
|
|
3900
|
+
TabsComponent,
|
|
3901
|
+
TabLabelLineComponent,
|
|
3902
|
+
TabLabelIconComponent,
|
|
3903
|
+
TabLabelLineSliderComponent,
|
|
3904
|
+
TabLabelIconSliderComponent,
|
|
3905
|
+
// Menus
|
|
3906
|
+
SideMenuComponent,
|
|
3907
|
+
SideMenuHeaderComponent,
|
|
3908
|
+
SideMenuItemComponent,
|
|
3909
|
+
SideMenuTitleComponent,
|
|
3910
|
+
SideMenuItemContentComponent,
|
|
3911
|
+
DropdownMenuComponent,
|
|
3912
|
+
DropdownMenuItemComponent,
|
|
3913
|
+
NavigationMenuComponent,
|
|
3914
|
+
NavigationMenuItemComponent,
|
|
3915
|
+
// Stars
|
|
3916
|
+
StarsComponent,
|
|
3917
|
+
// Avatar
|
|
3918
|
+
AvatarComponent,
|
|
3919
|
+
AvatarBadgeComponent,
|
|
3920
|
+
// Progress
|
|
3921
|
+
ProgressLineComponent,
|
|
3922
|
+
ProgressSemiCircleComponent,
|
|
3923
|
+
ProgressCircleComponent,
|
|
3924
|
+
// Tags
|
|
3925
|
+
TagsComponent,
|
|
3926
|
+
TagComponent,
|
|
3927
|
+
// Slider
|
|
3928
|
+
SliderComponent,
|
|
3929
|
+
SliderItemComponent,
|
|
3930
|
+
SliderButtonComponent,
|
|
3931
|
+
SliderPaginationComponent,
|
|
3932
|
+
// Timeline
|
|
3933
|
+
TimelineComponent,
|
|
3934
|
+
TimelineItemComponent,
|
|
3935
|
+
// Notification
|
|
3936
|
+
NotificationComponent,
|
|
3937
|
+
NotificationContentComponent,
|
|
3938
|
+
// Chart
|
|
3939
|
+
ChartComponent,
|
|
3940
|
+
// Table
|
|
3941
|
+
TableComponent,
|
|
3942
|
+
DefaultTableColumnComponent,
|
|
3943
|
+
SelectableTableColumnComponent,
|
|
3944
|
+
ColumnsToggleComponent,
|
|
3945
|
+
DefaultTableRowComponent,
|
|
3946
|
+
ExpandedTableRowComponent,
|
|
3947
|
+
DefaultTableCardComponent,
|
|
3948
|
+
// Carousel
|
|
3949
|
+
CarouselComponent,
|
|
3950
|
+
CarouselStageComponent,
|
|
3951
|
+
CarouselSlideDirective
|
|
3952
|
+
],
|
|
3953
|
+
imports: [
|
|
3954
|
+
CommonModule,
|
|
3955
|
+
NgxSfcCommonModule
|
|
3956
|
+
],
|
|
3957
|
+
exports: [
|
|
3958
|
+
// Tabs
|
|
3959
|
+
TabsComponent,
|
|
3960
|
+
TabLabelLineComponent,
|
|
3961
|
+
TabLabelIconComponent,
|
|
3962
|
+
TabLabelLineSliderComponent,
|
|
3963
|
+
TabLabelIconSliderComponent,
|
|
3964
|
+
// Menus
|
|
3965
|
+
SideMenuComponent,
|
|
3966
|
+
DropdownMenuComponent,
|
|
3967
|
+
NavigationMenuComponent,
|
|
3968
|
+
// Stars
|
|
3969
|
+
StarsComponent,
|
|
3970
|
+
// Avatar
|
|
3971
|
+
AvatarComponent,
|
|
3972
|
+
AvatarBadgeComponent,
|
|
3973
|
+
// Progress
|
|
3974
|
+
ProgressLineComponent,
|
|
3975
|
+
ProgressSemiCircleComponent,
|
|
3976
|
+
ProgressCircleComponent,
|
|
3977
|
+
// Tags
|
|
3978
|
+
TagsComponent,
|
|
3979
|
+
// Slider
|
|
3980
|
+
SliderComponent,
|
|
3981
|
+
// Timeline
|
|
3982
|
+
TimelineComponent,
|
|
3983
|
+
// Notification
|
|
3984
|
+
NotificationComponent,
|
|
3985
|
+
// Chart
|
|
3986
|
+
ChartComponent,
|
|
3987
|
+
// Table
|
|
3988
|
+
TableComponent,
|
|
3989
|
+
ExpandedTableRowComponent,
|
|
3990
|
+
// Carousel
|
|
3991
|
+
CarouselComponent,
|
|
3992
|
+
CarouselSlideDirective
|
|
3993
|
+
]
|
|
3994
|
+
}]
|
|
3995
|
+
}] });
|
|
3996
|
+
|
|
3997
|
+
/*
|
|
3998
|
+
* Public API Surface of ngx-sfc-components
|
|
3999
|
+
*/
|
|
4000
|
+
|
|
4001
|
+
/**
|
|
4002
|
+
* Generated bundle index. Do not edit.
|
|
4003
|
+
*/
|
|
4004
|
+
|
|
4005
|
+
export { AvatarBadgeComponent, AvatarBadgePosition, AvatarComponent, CarouselComponent, CarouselSlideDirective, ChartComponent, ChartThemeService, ColumnsToggleComponent, DefaultTableCardComponent, DefaultTableColumnComponent, DefaultTableRowComponent, DropdownMenuComponent, ExpandedTableRowComponent, ExpandedTableRowTemplate, NavigationMenuComponent, NgxSfcComponentsModule, NotificationComponent, NotificationTemplate, NotificationType, ProgressCircleComponent, ProgressLineComponent, ProgressSemiCircleComponent, SelectableTableColumnComponent, SideMenuComponent, SideMenuItemType, SliderComponent, SliderType, StarsComponent, TabLabelIconComponent, TabLabelIconSliderComponent, TabLabelLineComponent, TabLabelLineSliderComponent, TableComponent, TableDataType, TableTemplate, TabsComponent, TabsTemplate, TagsComponent, TimelineComponent, TimelineItemPosition };
|
|
4006
|
+
//# sourceMappingURL=ngx-sfc-components.mjs.map
|