@cityway/bo-ui 1.0.1 → 1.0.3
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/cityway-bo-ui-1.0.3.tgz +0 -0
- package/fesm2022/cityway-bo-ui.mjs +1598 -0
- package/fesm2022/cityway-bo-ui.mjs.map +1 -0
- package/index.d.ts +509 -0
- package/package.json +34 -21
- package/styles.min.css +5 -0
- package/styles.min.css.map +1 -0
- package/.eslintrc.json +0 -37
- package/ng-package.json +0 -21
- package/src/lib/bo-ui.config.ts +0 -8
- package/src/lib/components/accordions/accordions.component.html +0 -16
- package/src/lib/components/accordions/accordions.component.spec.ts +0 -24
- package/src/lib/components/accordions/accordions.component.ts +0 -27
- package/src/lib/components/accordions/components/accordions-content.component.spec.ts +0 -24
- package/src/lib/components/accordions/components/accordions-content.component.ts +0 -28
- package/src/lib/components/alert/alert.component.html +0 -15
- package/src/lib/components/alert/alert.component.spec.ts +0 -24
- package/src/lib/components/alert/alert.component.ts +0 -36
- package/src/lib/components/badge/badge.component.html +0 -7
- package/src/lib/components/badge/badge.component.spec.ts +0 -24
- package/src/lib/components/badge/badge.component.ts +0 -24
- package/src/lib/components/button/button.component.html +0 -43
- package/src/lib/components/button/button.component.spec.ts +0 -25
- package/src/lib/components/button/button.component.ts +0 -47
- package/src/lib/components/card/card.component.html +0 -15
- package/src/lib/components/card/card.component.spec.ts +0 -25
- package/src/lib/components/card/card.component.ts +0 -30
- package/src/lib/components/custom-list/custom-list.component.html +0 -31
- package/src/lib/components/custom-list/custom-list.component.spec.ts +0 -24
- package/src/lib/components/custom-list/custom-list.component.ts +0 -42
- package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.html +0 -27
- package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.spec.ts +0 -24
- package/src/lib/components/drag-n-drop-list/drag-n-drop-list.component.ts +0 -40
- package/src/lib/components/form-field/form-field.component.html +0 -333
- package/src/lib/components/form-field/form-field.component.spec.ts +0 -24
- package/src/lib/components/form-field/form-field.component.ts +0 -256
- package/src/lib/components/icon/icon.component.html +0 -9
- package/src/lib/components/icon/icon.component.spec.ts +0 -25
- package/src/lib/components/icon/icon.component.ts +0 -31
- package/src/lib/components/layout/admin-layout/admin-layout.component.html +0 -17
- package/src/lib/components/layout/admin-layout/admin-layout.component.ts +0 -181
- package/src/lib/components/layout/footer/footer.component.html +0 -51
- package/src/lib/components/layout/footer/footer.component.ts +0 -65
- package/src/lib/components/layout/header/header.component.html +0 -71
- package/src/lib/components/layout/header/header.component.ts +0 -95
- package/src/lib/components/layout/menu/menu.component.html +0 -115
- package/src/lib/components/layout/menu/menu.component.ts +0 -75
- package/src/lib/components/layout/menu-accordion/accordion.directive.ts +0 -57
- package/src/lib/components/layout/menu-accordion/accordionanchor.directive.ts +0 -21
- package/src/lib/components/layout/menu-accordion/accordionlink.directive.ts +0 -45
- package/src/lib/components/layout/menu-accordion/index.ts +0 -3
- package/src/lib/components/layout/sidebar/sidebar.component.html +0 -62
- package/src/lib/components/layout/sidebar/sidebar.component.ts +0 -28
- package/src/lib/components/layout/skip-links/skip-links.component.html +0 -3
- package/src/lib/components/layout/skip-links/skip-links.component.spec.ts +0 -25
- package/src/lib/components/layout/skip-links/skip-links.component.ts +0 -19
- package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.html +0 -10
- package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.spec.ts +0 -25
- package/src/lib/components/layout/title-breadcrumb/title-breadcrumb.component.ts +0 -16
- package/src/lib/components/legend/legend.component.html +0 -23
- package/src/lib/components/legend/legend.component.spec.ts +0 -24
- package/src/lib/components/legend/legend.component.ts +0 -28
- package/src/lib/components/loader/loader.component.html +0 -4
- package/src/lib/components/loader/loader.component.ts +0 -16
- package/src/lib/components/modals/modals.component.html +0 -71
- package/src/lib/components/modals/modals.component.spec.ts +0 -25
- package/src/lib/components/modals/modals.component.ts +0 -49
- package/src/lib/components/tab/components/tab-content.component.spec.ts +0 -24
- package/src/lib/components/tab/components/tab-content.component.ts +0 -27
- package/src/lib/components/tab/tab.component.html +0 -59
- package/src/lib/components/tab/tab.component.spec.ts +0 -24
- package/src/lib/components/tab/tab.component.ts +0 -79
- package/src/lib/components/table/components/actions-on-table/actions-on-table.component.html +0 -50
- package/src/lib/components/table/components/actions-on-table/actions-on-table.component.spec.ts +0 -24
- package/src/lib/components/table/components/actions-on-table/actions-on-table.component.ts +0 -33
- package/src/lib/components/table/components/filter/filter.component.html +0 -21
- package/src/lib/components/table/components/filter/filter.component.spec.ts +0 -24
- package/src/lib/components/table/components/filter/filter.component.ts +0 -38
- package/src/lib/components/table/table.component.html +0 -104
- package/src/lib/components/table/table.component.spec.ts +0 -24
- package/src/lib/components/table/table.component.ts +0 -85
- package/src/lib/components/wizard-stepper/components/wizard-step.component.spec.ts +0 -25
- package/src/lib/components/wizard-stepper/components/wizard-step.component.ts +0 -16
- package/src/lib/components/wizard-stepper/wizard-stepper.component.html +0 -45
- package/src/lib/components/wizard-stepper/wizard-stepper.component.spec.ts +0 -25
- package/src/lib/components/wizard-stepper/wizard-stepper.component.ts +0 -70
- package/src/lib/directives/double-scroll.ts +0 -64
- package/src/lib/directives/rwd-tabs.ts +0 -99
- package/src/lib/directives/show-hide-password.ts +0 -61
- package/src/lib/enum/drag-item.enum.ts +0 -5
- package/src/lib/enum/field-type.enum.ts +0 -36
- package/src/lib/enum/legend-type.enum.ts +0 -5
- package/src/lib/enum/modals.enum.ts +0 -6
- package/src/lib/enum/ui-type.enum.ts +0 -11
- package/src/lib/models/ui/custom-list.model.ts +0 -14
- package/src/lib/models/ui/legend.model.ts +0 -17
- package/src/lib/models/ui/table.model.ts +0 -33
- package/src/lib/services/ui/modals.service.ts +0 -47
- package/src/lib/services/version.service.ts +0 -22
- package/src/public-api.ts +0 -49
- package/tsconfig.lib.json +0 -18
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -14
- package/tslint.json +0 -17
- /package/{src/lib → lib}/assets/fonts/bo/_variables.scss +0 -0
- /package/{src/lib → lib}/assets/fonts/bo/bo.scss +0 -0
- /package/{src/lib → lib}/assets/fonts/bo/bo.woff +0 -0
- /package/{src/lib → lib}/assets/fonts/bo/bo.woff2 +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/_nunito.scss +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-bold.woff +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-bold.woff2 +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-extrabold.woff +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-extrabold.woff2 +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-regular.woff +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-regular.woff2 +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-semi-bold.woff +0 -0
- /package/{src/lib → lib}/assets/fonts/nunito/nunito-semi-bold.woff2 +0 -0
- /package/{src/lib → lib}/assets/fonts/optyweb/_variables.scss +0 -0
- /package/{src/lib → lib}/assets/fonts/optyweb/optyweb.scss +0 -0
- /package/{src/lib → lib}/assets/fonts/optyweb/optyweb.woff +0 -0
- /package/{src/lib → lib}/assets/fonts/optyweb/optyweb.woff2 +0 -0
- /package/{src/lib → lib}/assets/i18n/common.en.json +0 -0
- /package/{src/lib → lib}/assets/i18n/common.fr.json +0 -0
- /package/{src/lib → lib}/assets/i18n/label.en.json +0 -0
- /package/{src/lib → lib}/assets/i18n/label.fr.json +0 -0
- /package/{src/lib → lib}/assets/images/common/bg-loader.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/bg-menu.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/bg-round.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/check-mark.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/loader.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/logo-en-bw.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/logo-en.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/logo-fr-bw.svg +0 -0
- /package/{src/lib → lib}/assets/images/common/logo-fr.svg +0 -0
- /package/{src/lib → lib}/assets/images/favicon/android-chrome-192x192.png +0 -0
- /package/{src/lib → lib}/assets/images/favicon/android-chrome-512x512.png +0 -0
- /package/{src/lib → lib}/assets/images/favicon/apple-touch-icon.png +0 -0
- /package/{src/lib → lib}/assets/images/favicon/favicon-16x16.png +0 -0
- /package/{src/lib → lib}/assets/images/favicon/favicon-32x32.png +0 -0
- /package/{src/lib → lib}/assets/images/favicon/favicon-96x96.png +0 -0
- /package/{src/lib → lib}/assets/images/favicon/favicon.ico +0 -0
- /package/{src/lib → lib}/assets/images/favicon/site.webmanifest +0 -0
- /package/{src/lib → lib}/assets/images/icon/referential-icon.svg +0 -0
- /package/{src/lib → lib}/assets/images/login/login-bg.jpg +0 -0
- /package/{src/lib → lib}/assets/images/login/logo-cityway-baseline.svg +0 -0
- /package/{src/lib → lib}/assets/images/toast/warning.svg +0 -0
- /package/{src/lib → lib}/assets/styles/scss/_components.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/_core.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/_custom-bootstrap.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_accordion.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_alert.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_badge.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_breadcrumb.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_button-group.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_buttons.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_card.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_close.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_dropdown.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_forms.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_input-group.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_lists.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_modal.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_pagination.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_popover.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_progress.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_reboot.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_tables.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_tabs.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_tooltip.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/bootstrap/_type.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_forms-firefox.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_leaflet.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_legend.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ng-select.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ng2-dragula.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ng2-validation.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ng5-slider.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngb-datepicker.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngb-timepicker.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngx-chips.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngx-editor.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngx-file-drop.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngx-intl-tel-input.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngx-slider.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_ngx-toast.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_pwd-policy.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_table.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_vis.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/_wizard-stepper.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-action.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-bg-cell.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-double-scroll.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-filter.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-pagination.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-popover.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/components/table/_table-sorting.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/core/_footer.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/core/_header.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/core/_layout.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/core/_menu.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/core/_sidebar.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/mixins/_utilities.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/styles.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/tools/_focus.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/tools/_loader.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/variables/_colors.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/variables/_custom.scss +0 -0
- /package/{src/lib → lib}/assets/styles/scss/variables/_site.scss +0 -0
|
@@ -0,0 +1,1598 @@
|
|
|
1
|
+
import * as i1$1 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Directive, Input, HostBinding, Inject, HostListener, Component, EventEmitter, Output, ViewChild, ContentChildren, Injectable } from '@angular/core';
|
|
5
|
+
import * as i1 from '@angular/router';
|
|
6
|
+
import { NavigationEnd, RouterModule } from '@angular/router';
|
|
7
|
+
import { LoadingBarRouterModule } from '@ngx-loading-bar/router';
|
|
8
|
+
import { filter } from 'rxjs/operators';
|
|
9
|
+
import * as i2$1 from '@ng-bootstrap/ng-bootstrap';
|
|
10
|
+
import { NgbTooltipModule, NgbCollapseModule, NgbDropdownModule, NgbAccordionModule, NgbPopover, NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
|
|
11
|
+
import * as i2 from '@ngx-translate/core';
|
|
12
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
13
|
+
import * as i2$2 from '@angular/forms';
|
|
14
|
+
import { Validators, ReactiveFormsModule, FormGroup, FormsModule } from '@angular/forms';
|
|
15
|
+
import { JwtHelperService } from '@auth0/angular-jwt';
|
|
16
|
+
import * as i3 from '@angular/platform-browser';
|
|
17
|
+
import * as i4 from '@ngx-loading-bar/core';
|
|
18
|
+
import * as i2$3 from '@angular/cdk/drag-drop';
|
|
19
|
+
import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk/drag-drop';
|
|
20
|
+
import * as i4$1 from '@angular-slider/ngx-slider';
|
|
21
|
+
import { NgxSliderModule } from '@angular-slider/ngx-slider';
|
|
22
|
+
import * as i3$1 from '@ng-select/ng-select';
|
|
23
|
+
import { NgSelectModule } from '@ng-select/ng-select';
|
|
24
|
+
|
|
25
|
+
class AccordionDirective {
|
|
26
|
+
constructor(router) {
|
|
27
|
+
this.router = router;
|
|
28
|
+
this.navlinks = [];
|
|
29
|
+
setTimeout(() => this.checkOpenLinks());
|
|
30
|
+
}
|
|
31
|
+
ngAfterContentChecked() {
|
|
32
|
+
this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((e) => this.checkOpenLinks());
|
|
33
|
+
}
|
|
34
|
+
closeOtherLinks(openLink) {
|
|
35
|
+
this.navlinks.forEach((link) => {
|
|
36
|
+
if (link !== openLink) {
|
|
37
|
+
link.open = false;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
addLink(link) {
|
|
42
|
+
this.navlinks.push(link);
|
|
43
|
+
}
|
|
44
|
+
removeGroup(link) {
|
|
45
|
+
const index = this.navlinks.indexOf(link);
|
|
46
|
+
if (index !== -1) {
|
|
47
|
+
this.navlinks.splice(index, 1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
checkOpenLinks() {
|
|
51
|
+
this.navlinks.forEach((link) => {
|
|
52
|
+
if (link.group) {
|
|
53
|
+
const routeUrl = this.router.url;
|
|
54
|
+
const currentUrl = routeUrl.split('/');
|
|
55
|
+
if (currentUrl.indexOf(link.group) > 0) {
|
|
56
|
+
link.open = true;
|
|
57
|
+
this.closeOtherLinks(link);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionDirective, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
63
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: AccordionDirective, isStandalone: true, selector: "[appAccordion]", ngImport: i0 }); }
|
|
64
|
+
}
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionDirective, decorators: [{
|
|
66
|
+
type: Directive,
|
|
67
|
+
args: [{
|
|
68
|
+
selector: '[appAccordion]',
|
|
69
|
+
standalone: true
|
|
70
|
+
}]
|
|
71
|
+
}], ctorParameters: () => [{ type: i1.Router }] });
|
|
72
|
+
|
|
73
|
+
class AccordionLinkDirective {
|
|
74
|
+
constructor(nav) {
|
|
75
|
+
this.nav = nav;
|
|
76
|
+
}
|
|
77
|
+
get open() {
|
|
78
|
+
return this._open;
|
|
79
|
+
}
|
|
80
|
+
set open(value) {
|
|
81
|
+
this._open = value;
|
|
82
|
+
if (value) {
|
|
83
|
+
this.nav.closeOtherLinks(this);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
ngOnInit() {
|
|
87
|
+
this.nav.addLink(this);
|
|
88
|
+
}
|
|
89
|
+
ngOnDestroy() {
|
|
90
|
+
this.nav.removeGroup(this);
|
|
91
|
+
}
|
|
92
|
+
toggle() {
|
|
93
|
+
this.open = !this.open;
|
|
94
|
+
}
|
|
95
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionLinkDirective, deps: [{ token: AccordionDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
96
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: AccordionLinkDirective, isStandalone: true, selector: "[appAccordionLink]", inputs: { group: "group", open: "open" }, host: { properties: { "class.open": "this._open" } }, ngImport: i0 }); }
|
|
97
|
+
}
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionLinkDirective, decorators: [{
|
|
99
|
+
type: Directive,
|
|
100
|
+
args: [{
|
|
101
|
+
selector: '[appAccordionLink]',
|
|
102
|
+
standalone: true
|
|
103
|
+
}]
|
|
104
|
+
}], ctorParameters: () => [{ type: AccordionDirective, decorators: [{
|
|
105
|
+
type: Inject,
|
|
106
|
+
args: [AccordionDirective]
|
|
107
|
+
}] }], propDecorators: { group: [{
|
|
108
|
+
type: Input
|
|
109
|
+
}], _open: [{
|
|
110
|
+
type: HostBinding,
|
|
111
|
+
args: ['class.open']
|
|
112
|
+
}], open: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}] } });
|
|
115
|
+
|
|
116
|
+
class AccordionAnchorDirective {
|
|
117
|
+
constructor(navlink) {
|
|
118
|
+
this.navlink = navlink;
|
|
119
|
+
}
|
|
120
|
+
onClick(e) {
|
|
121
|
+
this.navlink.toggle();
|
|
122
|
+
}
|
|
123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionAnchorDirective, deps: [{ token: AccordionLinkDirective }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
124
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: AccordionAnchorDirective, isStandalone: true, selector: "[appAccordionToggle]", host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 }); }
|
|
125
|
+
}
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionAnchorDirective, decorators: [{
|
|
127
|
+
type: Directive,
|
|
128
|
+
args: [{
|
|
129
|
+
selector: '[appAccordionToggle]',
|
|
130
|
+
standalone: true
|
|
131
|
+
}]
|
|
132
|
+
}], ctorParameters: () => [{ type: AccordionLinkDirective, decorators: [{
|
|
133
|
+
type: Inject,
|
|
134
|
+
args: [AccordionLinkDirective]
|
|
135
|
+
}] }], propDecorators: { onClick: [{
|
|
136
|
+
type: HostListener,
|
|
137
|
+
args: ['click', ['$event']]
|
|
138
|
+
}] } });
|
|
139
|
+
|
|
140
|
+
class MenuComponent {
|
|
141
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: MenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
142
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: MenuComponent, isStandalone: true, selector: "app-menu", ngImport: i0, template: "<!-- <ul class=\"navigation\" appAccordion>\r\n <ng-container *ngFor=\"let menuitem of menus; index as Index\">\r\n <ng-container *ngIf=\"!menuitem.hide\">\r\n <li *ngIf=\"menuitem.type !== 'divider' && menuitem.type !== 'title'\" appAccordionLink [group]=\"menuitem.state\"\r\n [ngClass]=\"menuitem.state.includes(currentRoute) ? 'navigation-item menu-opened' : 'navigation-item'\" routerLinkActive=\"active\"> -->\r\n <!-- INTERNAL LINK -->\r\n <!-- <a *ngIf=\"menuitem.type === 'link' && isOpened\" [ngClass]=\"{'disabled': menuitem.disabled}\" class=\"navigation-link\"\r\n [routerLink]=\"menuitem.state\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a>\r\n <a *ngIf=\"menuitem.type === 'link' && !isOpened\" [ngClass]=\"{'disabled': menuitem.disabled}\" class=\"navigation-link\"\r\n [routerLink]=\"menuitem.state\" placement=\"right\" [ngbTooltip]=\"menuitem.name | translate\" container=\"body\"\r\n tooltipClass=\"menu-tooltip\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a> -->\r\n <!-- EXTERNAL LINK ou EXTERNAL LINK IN A TAB-->\r\n <!-- <a *ngIf=\"menuitem.type === 'extLink' || menuitem.type === 'extTabLink' && isOpened\" class=\"navigation-link\"\r\n [href]=\"menuitem.state\" [attr.target]=\"menuitem.type === 'extTabLink' ? '_blanck' : null\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a>\r\n <a *ngIf=\"menuitem.type === 'extLink' || menuitem.type === 'extTabLink' && !isOpened\" class=\"navigation-link\"\r\n [href]=\"menuitem.state\" [attr.target]=\"menuitem.type === 'extTabLink' ? '_blanck' : null\"\r\n placement=\"right\" [ngbTooltip]=\"menuitem.name | translate\" container=\"body\"\r\n tooltipClass=\"menu-tooltip\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a> -->\r\n\r\n<!--\r\n <ng-template #menuItem>\r\n <span class=\"{{ menuitem.icon }} me-3 icon\" aria-hidden=\"true\"></span>\r\n <span class=\"title me-auto\">{{ menuitem.name | translate }}</span>\r\n <span *ngFor=\"let badge of menuitem.badge\" class=\"badge badge-{{ badge.type }} me-3\">{{ badge.value }}</span>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isOpened\">\r\n <button *ngIf=\"menuitem.type === 'sub' || menuitem.type === 'sub-reorder'\" type=\"button\" class=\"navigation-link btn navigation-btn\"\r\n (click)=\"onShow(Index)\" [ngClass]=\"isCollapsed[Index] ? 'collapsed' : ''\"\r\n [attr.aria-expanded]=\"!isCollapsed[Index]\" aria-controls=\"collapseExample\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n <span class=\"menu-caret optyweb cw-nav-collapse2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <ul *ngIf=\"menuitem.type === 'sub'\" class=\"navigation-submenu\" [ngbCollapse]\r\n [(ngbCollapse)]=\"isCollapsed[Index]\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"['/', menuitem.state, childitem.state ]\" class=\"navigation-submenu-link\">\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n <ul *ngIf=\"menuitem.type === 'sub-reorder'\" class=\"navigation-submenu\" [ngbCollapse]\r\n [(ngbCollapse)]=\"isCollapsed[Index]\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"childitem.state\" class=\"navigation-submenu-link\">\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </ng-container>\r\n </li>\r\n\r\n <ng-container *ngIf=\"!isOpened\">\r\n <li ngbDropdown *ngIf=\"menuitem.type !== 'divider' && menuitem.type !== 'title'\" appAccordionLink\r\n [group]=\"menuitem.state\" class=\"navigation-dropdown\" [autoClose]=\"true\"\r\n [container]=\"'body'\" [dropdownClass]=\"'navigation-submenu-dropdown'\" routerLinkActive=\"active\" #myDrop=\"ngbDropdown\"\r\n (mouseenter)=\"$event.stopPropagation(); myDrop.open();\" (mouseleave)=\"$event.stopPropagation(); myDrop.close();\">\r\n <button *ngIf=\"menuitem.type === 'sub' || menuitem.type === 'sub-reorder'\" type=\"button\" class=\"navigation-link btn navigation-btn\"\r\n id=\"dropdownBasic1\" ngbDropdownToggle (click)=\"onShow(Index)\">\r\n <span class=\"{{ menuitem.icon }} me-3 icon\" aria-hidden=\"true\"></span>\r\n <span class=\"title me-auto\">{{ menuitem.name | translate }}</span>\r\n <span *ngFor=\"let badge of menuitem.badge\" class=\"badge badge-{{ badge.type }} me-3\">{{ badge.value\r\n }}</span>\r\n <span class=\"menu-caret optyweb cw-nav-expand2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <ul ngbDropdownMenu *ngIf=\"menuitem.type === 'sub'\" class=\"navigation-submenu\"\r\n [ngClass]=\"'navigation-submenu-collapsed'\"\r\n (mouseenter)=\"$event.stopPropagation(); myDrop.open();\" (mouseleave)=\"$event.stopPropagation(); myDrop.close();\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"['/', menuitem.state, childitem.state ]\" class=\"navigation-submenu-link\" ngbDropdownItem>\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n <ul ngbDropdownMenu *ngIf=\"menuitem.type === 'sub-reorder'\" class=\"navigation-submenu\"\r\n [ngClass]=\"'navigation-submenu-collapsed'\"\r\n (mouseenter)=\"$event.stopPropagation(); myDrop.open();\" (mouseleave)=\"$event.stopPropagation(); myDrop.close();\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"childitem.state\" class=\"navigation-submenu-link\" ngbDropdownItem>\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n\r\n <li *ngIf=\"menuitem.type === 'divider'\" class=\"navigation-item\">\r\n <hr />\r\n </li>\r\n <li *ngIf=\"menuitem.type === 'title'\" class=\"navigation-item\">\r\n <span class=\"navigation-title\">{{ menuitem.name | translate }}</span>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n</ul> -->\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: NgbTooltipModule }, { kind: "ngmodule", type: NgbCollapseModule }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "ngmodule", type: TranslateModule }] }); }
|
|
143
|
+
}
|
|
144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: MenuComponent, decorators: [{
|
|
145
|
+
type: Component,
|
|
146
|
+
args: [{ selector: 'app-menu', standalone: true, imports: [
|
|
147
|
+
CommonModule,
|
|
148
|
+
RouterModule,
|
|
149
|
+
NgbTooltipModule,
|
|
150
|
+
NgbCollapseModule,
|
|
151
|
+
NgbDropdownModule,
|
|
152
|
+
AccordionLinkDirective,
|
|
153
|
+
TranslateModule,
|
|
154
|
+
AccordionLinkDirective,
|
|
155
|
+
AccordionDirective
|
|
156
|
+
], template: "<!-- <ul class=\"navigation\" appAccordion>\r\n <ng-container *ngFor=\"let menuitem of menus; index as Index\">\r\n <ng-container *ngIf=\"!menuitem.hide\">\r\n <li *ngIf=\"menuitem.type !== 'divider' && menuitem.type !== 'title'\" appAccordionLink [group]=\"menuitem.state\"\r\n [ngClass]=\"menuitem.state.includes(currentRoute) ? 'navigation-item menu-opened' : 'navigation-item'\" routerLinkActive=\"active\"> -->\r\n <!-- INTERNAL LINK -->\r\n <!-- <a *ngIf=\"menuitem.type === 'link' && isOpened\" [ngClass]=\"{'disabled': menuitem.disabled}\" class=\"navigation-link\"\r\n [routerLink]=\"menuitem.state\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a>\r\n <a *ngIf=\"menuitem.type === 'link' && !isOpened\" [ngClass]=\"{'disabled': menuitem.disabled}\" class=\"navigation-link\"\r\n [routerLink]=\"menuitem.state\" placement=\"right\" [ngbTooltip]=\"menuitem.name | translate\" container=\"body\"\r\n tooltipClass=\"menu-tooltip\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a> -->\r\n <!-- EXTERNAL LINK ou EXTERNAL LINK IN A TAB-->\r\n <!-- <a *ngIf=\"menuitem.type === 'extLink' || menuitem.type === 'extTabLink' && isOpened\" class=\"navigation-link\"\r\n [href]=\"menuitem.state\" [attr.target]=\"menuitem.type === 'extTabLink' ? '_blanck' : null\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a>\r\n <a *ngIf=\"menuitem.type === 'extLink' || menuitem.type === 'extTabLink' && !isOpened\" class=\"navigation-link\"\r\n [href]=\"menuitem.state\" [attr.target]=\"menuitem.type === 'extTabLink' ? '_blanck' : null\"\r\n placement=\"right\" [ngbTooltip]=\"menuitem.name | translate\" container=\"body\"\r\n tooltipClass=\"menu-tooltip\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n </a> -->\r\n\r\n<!--\r\n <ng-template #menuItem>\r\n <span class=\"{{ menuitem.icon }} me-3 icon\" aria-hidden=\"true\"></span>\r\n <span class=\"title me-auto\">{{ menuitem.name | translate }}</span>\r\n <span *ngFor=\"let badge of menuitem.badge\" class=\"badge badge-{{ badge.type }} me-3\">{{ badge.value }}</span>\r\n </ng-template>\r\n\r\n <ng-container *ngIf=\"isOpened\">\r\n <button *ngIf=\"menuitem.type === 'sub' || menuitem.type === 'sub-reorder'\" type=\"button\" class=\"navigation-link btn navigation-btn\"\r\n (click)=\"onShow(Index)\" [ngClass]=\"isCollapsed[Index] ? 'collapsed' : ''\"\r\n [attr.aria-expanded]=\"!isCollapsed[Index]\" aria-controls=\"collapseExample\">\r\n <ng-container [ngTemplateOutlet]=\"menuItem\"></ng-container>\r\n <span class=\"menu-caret optyweb cw-nav-collapse2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <ul *ngIf=\"menuitem.type === 'sub'\" class=\"navigation-submenu\" [ngbCollapse]\r\n [(ngbCollapse)]=\"isCollapsed[Index]\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"['/', menuitem.state, childitem.state ]\" class=\"navigation-submenu-link\">\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n <ul *ngIf=\"menuitem.type === 'sub-reorder'\" class=\"navigation-submenu\" [ngbCollapse]\r\n [(ngbCollapse)]=\"isCollapsed[Index]\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"childitem.state\" class=\"navigation-submenu-link\">\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </ng-container>\r\n </li>\r\n\r\n <ng-container *ngIf=\"!isOpened\">\r\n <li ngbDropdown *ngIf=\"menuitem.type !== 'divider' && menuitem.type !== 'title'\" appAccordionLink\r\n [group]=\"menuitem.state\" class=\"navigation-dropdown\" [autoClose]=\"true\"\r\n [container]=\"'body'\" [dropdownClass]=\"'navigation-submenu-dropdown'\" routerLinkActive=\"active\" #myDrop=\"ngbDropdown\"\r\n (mouseenter)=\"$event.stopPropagation(); myDrop.open();\" (mouseleave)=\"$event.stopPropagation(); myDrop.close();\">\r\n <button *ngIf=\"menuitem.type === 'sub' || menuitem.type === 'sub-reorder'\" type=\"button\" class=\"navigation-link btn navigation-btn\"\r\n id=\"dropdownBasic1\" ngbDropdownToggle (click)=\"onShow(Index)\">\r\n <span class=\"{{ menuitem.icon }} me-3 icon\" aria-hidden=\"true\"></span>\r\n <span class=\"title me-auto\">{{ menuitem.name | translate }}</span>\r\n <span *ngFor=\"let badge of menuitem.badge\" class=\"badge badge-{{ badge.type }} me-3\">{{ badge.value\r\n }}</span>\r\n <span class=\"menu-caret optyweb cw-nav-expand2\" aria-hidden=\"true\"></span>\r\n </button>\r\n <ul ngbDropdownMenu *ngIf=\"menuitem.type === 'sub'\" class=\"navigation-submenu\"\r\n [ngClass]=\"'navigation-submenu-collapsed'\"\r\n (mouseenter)=\"$event.stopPropagation(); myDrop.open();\" (mouseleave)=\"$event.stopPropagation(); myDrop.close();\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"['/', menuitem.state, childitem.state ]\" class=\"navigation-submenu-link\" ngbDropdownItem>\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n <ul ngbDropdownMenu *ngIf=\"menuitem.type === 'sub-reorder'\" class=\"navigation-submenu\"\r\n [ngClass]=\"'navigation-submenu-collapsed'\"\r\n (mouseenter)=\"$event.stopPropagation(); myDrop.open();\" (mouseleave)=\"$event.stopPropagation(); myDrop.close();\">\r\n <ng-container *ngFor=\"let childitem of menuitem.children\">\r\n <li *ngIf=\"!childitem.hide\" class=\"navigation-item\" routerLinkActive=\"active\"\r\n [ngClass]=\"{disabled: childitem.disabled}\">\r\n <a [routerLink]=\"childitem.state\" class=\"navigation-submenu-link\" ngbDropdownItem>\r\n {{ childitem.name | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </li>\r\n </ng-container>\r\n\r\n <li *ngIf=\"menuitem.type === 'divider'\" class=\"navigation-item\">\r\n <hr />\r\n </li>\r\n <li *ngIf=\"menuitem.type === 'title'\" class=\"navigation-item\">\r\n <span class=\"navigation-title\">{{ menuitem.name | translate }}</span>\r\n </li>\r\n </ng-container>\r\n </ng-container>\r\n</ul> -->\r\n" }]
|
|
157
|
+
}] });
|
|
158
|
+
|
|
159
|
+
class SidebarComponent {
|
|
160
|
+
constructor() {
|
|
161
|
+
this.toggleSidenav = new EventEmitter();
|
|
162
|
+
}
|
|
163
|
+
onClick() {
|
|
164
|
+
this.toggleSidenav.emit();
|
|
165
|
+
}
|
|
166
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
167
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: SidebarComponent, isStandalone: true, selector: "app-sidebar", inputs: { isOpened: "isOpened" }, outputs: { toggleSidenav: "toggleSidenav" }, ngImport: i0, template: "<div class=\"sidebar-scroll\">\r\n <div class=\"sidebar\">\r\n <nav class=\"navbar custom-navbar main-brand justify-content-center text-center\">\r\n <a class=\"navbar-brand text-decoration-none\" [routerLink]=\"['/']\" [ngClass]=\"{'invisible': !isOpened}\">\r\n <div class=\"navbar-brand-name text-wrap\">\r\n <!-- {{ configuration.appSettings.name }} -->\r\n </div>\r\n <div class=\"navbar-brand-project\">\r\n <!-- {{ configuration.appSettings.clientName }} -->\r\n </div>\r\n </a>\r\n <button type=\"button\" class=\"btn btn-primary btn-close-menu d-lg-none\" (click)=\"onClick()\">\r\n <span class=\"optyweb cw-toolbar-close1\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._SIDEBAR.CLOSE_BTN' | translate }}</span>\r\n </button>\r\n </nav>\r\n\r\n <!-- main navigation -->\r\n <!-- <nav *ngIf=\"menuService.menu$ | async\" class=\"main-menu\">\r\n <app-menu [isOpened]=\"isOpened\"></app-menu>\r\n </nav> -->\r\n\r\n <nav class=\"navbar custom-navbar sidebar-footer bg-white\" [ngClass]=\"{'sidebar-footer-closed': !isOpened}\">\r\n <ul class=\"navbar-nav w-100\">\r\n <!-- <li class=\"nav-item\">\r\n <a class=\"btn nav-link d-flex\" href=\"assets/docs/fr/manuel.pdf\" container=\"body\" type=\"button\"\r\n [ngbTooltip]=\"'_COMMON._USER.LBL_USER_MANUAL' | translate\" [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"bo-icons bo-manual\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._USER.LBL_USER_MANUAL' | translate }}</span>\r\n </a>\r\n </li>\r\n <ng-container *ngIf=\"authService.isLoggedIn()\">\r\n <li class=\"nav-item\">\r\n <button (click)=\"authService.logout()\" class=\"btn nav-link d-flex\" container=\"body\" type=\"button\"\r\n [ngbTooltip]=\"'_COMMON._APPLICATION.LOGOUT' | translate\" [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"optyweb cw-nav-connexion\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._APPLICATION.LOGOUT' | translate }}</span>\r\n </button>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!authService.isLoggedIn()\">\r\n <li class=\"nav-item\">\r\n <button (click)=\"authService.startAuthentication()\" class=\"btn nav-link d-flex\" container=\"body\"\r\n type=\"button\" [ngbTooltip]=\"'_COMMON._APPLICATION.LOGIN' | translate\"\r\n [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"optyweb cw-nav-connexion\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._APPLICATION.LOGIN' | translate }}</span>\r\n </button>\r\n </li>\r\n </ng-container>\r\n <li class=\"nav-item docked-hidden\">\r\n <a [href]=\"configuration.authentication.portalSettings.urlApplications\" class=\"nav-link d-flex\"\r\n container=\"body\" [ngbTooltip]=\"'_COMMON._APPLICATION.CHANGE' | translate\"\r\n [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"bo-icons bo-change-app\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._APPLICATION.CHANGE' | translate }}</span>\r\n </a>\r\n </li> -->\r\n </ul>\r\n </nav>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NgbTooltipModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
168
|
+
}
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: SidebarComponent, decorators: [{
|
|
170
|
+
type: Component,
|
|
171
|
+
args: [{ selector: 'app-sidebar', standalone: true, imports: [
|
|
172
|
+
TranslateModule,
|
|
173
|
+
MenuComponent,
|
|
174
|
+
NgbTooltipModule,
|
|
175
|
+
CommonModule,
|
|
176
|
+
RouterModule
|
|
177
|
+
], template: "<div class=\"sidebar-scroll\">\r\n <div class=\"sidebar\">\r\n <nav class=\"navbar custom-navbar main-brand justify-content-center text-center\">\r\n <a class=\"navbar-brand text-decoration-none\" [routerLink]=\"['/']\" [ngClass]=\"{'invisible': !isOpened}\">\r\n <div class=\"navbar-brand-name text-wrap\">\r\n <!-- {{ configuration.appSettings.name }} -->\r\n </div>\r\n <div class=\"navbar-brand-project\">\r\n <!-- {{ configuration.appSettings.clientName }} -->\r\n </div>\r\n </a>\r\n <button type=\"button\" class=\"btn btn-primary btn-close-menu d-lg-none\" (click)=\"onClick()\">\r\n <span class=\"optyweb cw-toolbar-close1\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._SIDEBAR.CLOSE_BTN' | translate }}</span>\r\n </button>\r\n </nav>\r\n\r\n <!-- main navigation -->\r\n <!-- <nav *ngIf=\"menuService.menu$ | async\" class=\"main-menu\">\r\n <app-menu [isOpened]=\"isOpened\"></app-menu>\r\n </nav> -->\r\n\r\n <nav class=\"navbar custom-navbar sidebar-footer bg-white\" [ngClass]=\"{'sidebar-footer-closed': !isOpened}\">\r\n <ul class=\"navbar-nav w-100\">\r\n <!-- <li class=\"nav-item\">\r\n <a class=\"btn nav-link d-flex\" href=\"assets/docs/fr/manuel.pdf\" container=\"body\" type=\"button\"\r\n [ngbTooltip]=\"'_COMMON._USER.LBL_USER_MANUAL' | translate\" [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"bo-icons bo-manual\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._USER.LBL_USER_MANUAL' | translate }}</span>\r\n </a>\r\n </li>\r\n <ng-container *ngIf=\"authService.isLoggedIn()\">\r\n <li class=\"nav-item\">\r\n <button (click)=\"authService.logout()\" class=\"btn nav-link d-flex\" container=\"body\" type=\"button\"\r\n [ngbTooltip]=\"'_COMMON._APPLICATION.LOGOUT' | translate\" [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"optyweb cw-nav-connexion\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._APPLICATION.LOGOUT' | translate }}</span>\r\n </button>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!authService.isLoggedIn()\">\r\n <li class=\"nav-item\">\r\n <button (click)=\"authService.startAuthentication()\" class=\"btn nav-link d-flex\" container=\"body\"\r\n type=\"button\" [ngbTooltip]=\"'_COMMON._APPLICATION.LOGIN' | translate\"\r\n [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"optyweb cw-nav-connexion\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._APPLICATION.LOGIN' | translate }}</span>\r\n </button>\r\n </li>\r\n </ng-container>\r\n <li class=\"nav-item docked-hidden\">\r\n <a [href]=\"configuration.authentication.portalSettings.urlApplications\" class=\"nav-link d-flex\"\r\n container=\"body\" [ngbTooltip]=\"'_COMMON._APPLICATION.CHANGE' | translate\"\r\n [placement]=\"isOpened ? 'top' : 'right'\">\r\n <span class=\"bo-icons bo-change-app\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._APPLICATION.CHANGE' | translate }}</span>\r\n </a>\r\n </li> -->\r\n </ul>\r\n </nav>\r\n </div>\r\n</div>\r\n" }]
|
|
178
|
+
}], propDecorators: { toggleSidenav: [{
|
|
179
|
+
type: Output
|
|
180
|
+
}], isOpened: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}] } });
|
|
183
|
+
|
|
184
|
+
class SkipLinksComponent {
|
|
185
|
+
constructor() { }
|
|
186
|
+
ngOnInit() {
|
|
187
|
+
}
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: SkipLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: SkipLinksComponent, isStandalone: true, selector: "app-skip-links", ngImport: i0, template: "<div class=\"skip-links\">\r\n <a href=\"#content\">{{ '_COMMON._SKIP_LINKS.CONTENT' | translate }}</a>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
190
|
+
}
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: SkipLinksComponent, decorators: [{
|
|
192
|
+
type: Component,
|
|
193
|
+
args: [{ selector: 'app-skip-links', standalone: true, imports: [
|
|
194
|
+
TranslateModule
|
|
195
|
+
], template: "<div class=\"skip-links\">\r\n <a href=\"#content\">{{ '_COMMON._SKIP_LINKS.CONTENT' | translate }}</a>\r\n</div>\r\n" }]
|
|
196
|
+
}], ctorParameters: () => [] });
|
|
197
|
+
|
|
198
|
+
// import { Configuration } from '../../../models/configuration/configuration';
|
|
199
|
+
// import { KeyVersion, Version } from '../../../models/version';
|
|
200
|
+
// import { VersionService } from '../../../services/version.service';
|
|
201
|
+
class FooterComponent {
|
|
202
|
+
constructor(
|
|
203
|
+
// private versionService: VersionService,
|
|
204
|
+
modalService) {
|
|
205
|
+
this.modalService = modalService;
|
|
206
|
+
this._today = Date.now();
|
|
207
|
+
// this.configuration = JSON.parse(localStorage.getItem('configuration')) as Configuration;
|
|
208
|
+
}
|
|
209
|
+
get today() {
|
|
210
|
+
return this._today;
|
|
211
|
+
}
|
|
212
|
+
set today(value) {
|
|
213
|
+
this._today = value;
|
|
214
|
+
}
|
|
215
|
+
ngOnInit() {
|
|
216
|
+
// this.versionService.get().subscribe({
|
|
217
|
+
// next: (version: Version) => {
|
|
218
|
+
// this.versions = version;
|
|
219
|
+
// const keys = this.versions.bundle.projects.filter(x => x.name === this.configuration.appSettings.name);
|
|
220
|
+
// if (keys[0]) {
|
|
221
|
+
// this.productVersion = keys[0];
|
|
222
|
+
// }
|
|
223
|
+
// }
|
|
224
|
+
// });
|
|
225
|
+
}
|
|
226
|
+
open(content, size = 'lg') {
|
|
227
|
+
this.modalRef = this.modalService.open(content, {
|
|
228
|
+
size,
|
|
229
|
+
ariaLabelledBy: 'modal-basic-title',
|
|
230
|
+
centered: true
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
close() {
|
|
234
|
+
this.modalRef.dismiss();
|
|
235
|
+
}
|
|
236
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FooterComponent, deps: [{ token: i2$1.NgbModal }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
237
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: FooterComponent, isStandalone: true, selector: "app-footer", ngImport: i0, template: "<footer role=\"contentinfo\">\r\n <nav class=\"navbar custom-navbar main-footer px-3\">\r\n <ul class=\"list-inline text-center mb-0\">\r\n <li class=\"list-inline-item\">\r\n <span class=\"me-1\">Copyright © {{today | date:'yyyy'}}</span>\r\n Cityway\r\n </li>\r\n <!-- <li class=\"list-inline-item\">\r\n <a href=\"mailto:{{configuration.appSettings.emailSupport}}\">{{configuration.appSettings.emailSupport}}</a>\r\n </li>\r\n <li class=\"list-inline-item\">\r\n @if (versions) {\r\n <button type=\"button\" class=\"btn btn-link p-0 border-0\" (click)=\"open(modalversion, 'md')\">\r\n {{versions.bundle.version}}\r\n </button>\r\n }\r\n @else {\r\n {{configuration.appSettings.version}}\r\n }\r\n </li> -->\r\n </ul>\r\n </nav>\r\n</footer>\r\n\r\n<!-- <ng-template #modalversion let-c=\"close\" let-d=\"dismiss\">\r\n <div class=\"modal-header\">\r\n <h1 id=\"modal-basic-title\" class=\"modal-title\">{{productVersion.name}} - {{productVersion.version}} </h1>\r\n <button type=\"button\" class=\"btn-close\" attr.aria-label=\"{{'_COMMON._ACTION.CLOSE' | translate}}\" (click)=\"close()\">\r\n </button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <p class=\"fw-bold\">{{'_COMMON._VERSION.INCLUDED' | translate}}</p>\r\n\r\n <table class=\"table table-bordered table-striped\">\r\n <caption class=\"visually-hidden\"\r\n [innerHTML]=\"'_COMMON._TABLE.CAPTION' | translate: { label: '_COMMON._VERSION.INCLUDED' | translate } \">\r\n </caption>\r\n <tbody>\r\n <tr *ngFor=\"let version of versions.bundle.projects\">\r\n <td>{{version.name}}</td>\r\n <td>{{version.version}}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"close()\">\r\n {{'_COMMON._ACTION.CLOSE' | translate}}\r\n </button>\r\n </div>\r\n</ng-template> -->\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] }); }
|
|
238
|
+
}
|
|
239
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FooterComponent, decorators: [{
|
|
240
|
+
type: Component,
|
|
241
|
+
args: [{ selector: 'app-footer', standalone: true, imports: [
|
|
242
|
+
TranslateModule,
|
|
243
|
+
CommonModule
|
|
244
|
+
], template: "<footer role=\"contentinfo\">\r\n <nav class=\"navbar custom-navbar main-footer px-3\">\r\n <ul class=\"list-inline text-center mb-0\">\r\n <li class=\"list-inline-item\">\r\n <span class=\"me-1\">Copyright © {{today | date:'yyyy'}}</span>\r\n Cityway\r\n </li>\r\n <!-- <li class=\"list-inline-item\">\r\n <a href=\"mailto:{{configuration.appSettings.emailSupport}}\">{{configuration.appSettings.emailSupport}}</a>\r\n </li>\r\n <li class=\"list-inline-item\">\r\n @if (versions) {\r\n <button type=\"button\" class=\"btn btn-link p-0 border-0\" (click)=\"open(modalversion, 'md')\">\r\n {{versions.bundle.version}}\r\n </button>\r\n }\r\n @else {\r\n {{configuration.appSettings.version}}\r\n }\r\n </li> -->\r\n </ul>\r\n </nav>\r\n</footer>\r\n\r\n<!-- <ng-template #modalversion let-c=\"close\" let-d=\"dismiss\">\r\n <div class=\"modal-header\">\r\n <h1 id=\"modal-basic-title\" class=\"modal-title\">{{productVersion.name}} - {{productVersion.version}} </h1>\r\n <button type=\"button\" class=\"btn-close\" attr.aria-label=\"{{'_COMMON._ACTION.CLOSE' | translate}}\" (click)=\"close()\">\r\n </button>\r\n </div>\r\n <div class=\"modal-body\">\r\n <p class=\"fw-bold\">{{'_COMMON._VERSION.INCLUDED' | translate}}</p>\r\n\r\n <table class=\"table table-bordered table-striped\">\r\n <caption class=\"visually-hidden\"\r\n [innerHTML]=\"'_COMMON._TABLE.CAPTION' | translate: { label: '_COMMON._VERSION.INCLUDED' | translate } \">\r\n </caption>\r\n <tbody>\r\n <tr *ngFor=\"let version of versions.bundle.projects\">\r\n <td>{{version.name}}</td>\r\n <td>{{version.version}}</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"close()\">\r\n {{'_COMMON._ACTION.CLOSE' | translate}}\r\n </button>\r\n </div>\r\n</ng-template> -->\r\n" }]
|
|
245
|
+
}], ctorParameters: () => [{ type: i2$1.NgbModal }] });
|
|
246
|
+
|
|
247
|
+
class HeaderComponent {
|
|
248
|
+
constructor(translateService, fb) {
|
|
249
|
+
this.translateService = translateService;
|
|
250
|
+
this.fb = fb;
|
|
251
|
+
this.toggleSidenav = new EventEmitter();
|
|
252
|
+
this.parent = null;
|
|
253
|
+
this.jwtHelper = new JwtHelperService();
|
|
254
|
+
}
|
|
255
|
+
ngOnInit() {
|
|
256
|
+
this.formHeader = this.fb.group({
|
|
257
|
+
lang: ['fr', Validators.compose([Validators.required])],
|
|
258
|
+
});
|
|
259
|
+
this.loginName = 'Admin';
|
|
260
|
+
}
|
|
261
|
+
changeLang(lang) {
|
|
262
|
+
localStorage.setItem('lang', lang);
|
|
263
|
+
this.lang = lang;
|
|
264
|
+
this.translateService.setDefaultLang(lang);
|
|
265
|
+
this.translateService.use(lang);
|
|
266
|
+
}
|
|
267
|
+
ngOnChanges(simpleChanges) {
|
|
268
|
+
// Si il y a un changement et que la variable envoye par le parent a une currentValue
|
|
269
|
+
if (simpleChanges && simpleChanges['parent'] && simpleChanges['parent'].currentValue) {
|
|
270
|
+
// attribution des datas a nos variables pour notre HTML
|
|
271
|
+
this.parentLink = simpleChanges['parent'].currentValue.link;
|
|
272
|
+
this.parentTitle = simpleChanges['parent'].currentValue.title;
|
|
273
|
+
}
|
|
274
|
+
// Si il y a un changement et que la variable envoye par le parent a une currentValue
|
|
275
|
+
if (simpleChanges && simpleChanges['heading'] && simpleChanges['heading'].currentValue) {
|
|
276
|
+
// Attribution des datas a nos variables pour notre HTML
|
|
277
|
+
this.heading = simpleChanges['heading'].currentValue;
|
|
278
|
+
// Si la variable du parent (parent) n'as pas change
|
|
279
|
+
if (!simpleChanges['heading']) {
|
|
280
|
+
// alors on la supprime pour le cote HTML
|
|
281
|
+
delete this.parent;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/** Renvoie un tableau de menus */
|
|
286
|
+
getMenus(parent) {
|
|
287
|
+
if (parent === null || parent === undefined) {
|
|
288
|
+
return new Array();
|
|
289
|
+
}
|
|
290
|
+
// Soit 1 element , soit 1 tableau en entée
|
|
291
|
+
return parent instanceof Array ? parent : new Array(parent);
|
|
292
|
+
}
|
|
293
|
+
onClick() {
|
|
294
|
+
this.toggleSidenav.emit();
|
|
295
|
+
}
|
|
296
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: HeaderComponent, deps: [{ token: i2.TranslateService }, { token: i2$2.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
297
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: HeaderComponent, isStandalone: true, selector: "app-header", inputs: { heading: "heading", headingUrlParamsOptions: "headingUrlParamsOptions", parent: "parent", isMenuOpened: "isMenuOpened" }, outputs: { toggleSidenav: "toggleSidenav" }, usesOnChanges: true, ngImport: i0, template: "<header role=\"banner\" class=\"header\">\r\n <form [formGroup]=\"formHeader\">\r\n <nav class=\"navbar custom-navbar bg-faded main-header\">\r\n <button type=\"button\" class=\"btn btn-primary menu-link\" (click)=\"onClick()\"\r\n [title]=\"isMenuOpened ? ('_COMMON._MENU.BTN_MAIN_MENU_CLOSE' | translate) : ('_COMMON._MENU.BTN_MAIN_MENU_OPEN' | translate)\">\r\n <span class=\"bo-icons\" [ngClass]=\"isMenuOpened ? 'bo-menu-expanded' : 'bo-menu-collapsed' \"\r\n aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._MENU.BTN_MAIN_MENU' | translate}}</span>\r\n </button>\r\n\r\n <nav aria-label=\"breadcrumb\">\r\n <ol class=\"breadcrumb align-items-center\">\r\n <li class=\"breadcrumb-item\">\r\n <a href=\"/#\">\r\n <span class=\"optyweb cw-nav-home d-block d-md-none\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden d-block d-md-none\">{{ \"_COMMON._BREADCRUMB.HOME\" | translate }}</span>\r\n <span class=\"d-none d-md-block\">{{ \"_COMMON._BREADCRUMB.HOME\" | translate }}</span>\r\n </a>\r\n </li>\r\n <li *ngFor=\"let item of getMenus(parent)\" class=\"breadcrumb-item active\">\r\n <a *ngIf=\"!item.disabled\" [routerLink]=\"item.link\" href=\"#\">{{item.title | translate}}</a>\r\n <span *ngIf=\"item.disabled\">{{item.title | translate}}</span>\r\n </li>\r\n <li aria-current=\"page\" class=\"breadcrumb-item active navbar-heading\">\r\n <h1>{{ heading | translate:headingUrlParamsOptions }}</h1>\r\n </li>\r\n </ol>\r\n </nav>\r\n\r\n <span class=\"me-auto\"></span>\r\n\r\n <ul class=\"navbar-nav\">\r\n\r\n <li class=\"nav-item ms-0\" ngbDropdown placement=\"right\">\r\n <button class=\"header-login d-flex align-items-center btn btn-light\" id=\"language\"\r\n ngbDropdownToggle type=\"button\">\r\n <span class=\"optyweb cw-misc-man2 header-avatar\" aria-hidden=\"true\"></span>\r\n <span class=\"header-indicator\">\r\n <span class=\"bo-icons bo-alert-success\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._USER.LBL_LOGGED' | translate }}</span>\r\n <!-- <img src=\"assets/images/common/check-mark.svg\" [alt]=\"'_COMMON._USER.LBL_LOGGED' | translate\"\r\n class=\"header-indicator\" width=\"15\" height=\"15\"> -->\r\n </span>\r\n <span class=\"d-none d-lg-inline-block ms-3 me-1\">{{ loginName }}</span>\r\n </button>\r\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\r\n <div class=\"dropdown-header font-md d-md-none\">\r\n <span>{{ loginName }}</span>\r\n </div>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_SETTINGS' | translate}}</span>\r\n </a>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_PROFILE' | translate}}</span>\r\n </a>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_NOTIFICATIONS' | translate}}</span>\r\n </a>\r\n <div class=\"dropdown-divider\"></div>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_HELP' | translate}}</span>\r\n </a>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{ '_COMMON._ACTION.SIGN_OUT' | translate }}</span>\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </nav>\r\n </form>\r\n</header>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i2$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i2$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i2$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
298
|
+
}
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
300
|
+
type: Component,
|
|
301
|
+
args: [{ selector: 'app-header', standalone: true, imports: [
|
|
302
|
+
ReactiveFormsModule,
|
|
303
|
+
RouterModule,
|
|
304
|
+
CommonModule,
|
|
305
|
+
TranslateModule,
|
|
306
|
+
NgbDropdownModule
|
|
307
|
+
], template: "<header role=\"banner\" class=\"header\">\r\n <form [formGroup]=\"formHeader\">\r\n <nav class=\"navbar custom-navbar bg-faded main-header\">\r\n <button type=\"button\" class=\"btn btn-primary menu-link\" (click)=\"onClick()\"\r\n [title]=\"isMenuOpened ? ('_COMMON._MENU.BTN_MAIN_MENU_CLOSE' | translate) : ('_COMMON._MENU.BTN_MAIN_MENU_OPEN' | translate)\">\r\n <span class=\"bo-icons\" [ngClass]=\"isMenuOpened ? 'bo-menu-expanded' : 'bo-menu-collapsed' \"\r\n aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._MENU.BTN_MAIN_MENU' | translate}}</span>\r\n </button>\r\n\r\n <nav aria-label=\"breadcrumb\">\r\n <ol class=\"breadcrumb align-items-center\">\r\n <li class=\"breadcrumb-item\">\r\n <a href=\"/#\">\r\n <span class=\"optyweb cw-nav-home d-block d-md-none\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden d-block d-md-none\">{{ \"_COMMON._BREADCRUMB.HOME\" | translate }}</span>\r\n <span class=\"d-none d-md-block\">{{ \"_COMMON._BREADCRUMB.HOME\" | translate }}</span>\r\n </a>\r\n </li>\r\n <li *ngFor=\"let item of getMenus(parent)\" class=\"breadcrumb-item active\">\r\n <a *ngIf=\"!item.disabled\" [routerLink]=\"item.link\" href=\"#\">{{item.title | translate}}</a>\r\n <span *ngIf=\"item.disabled\">{{item.title | translate}}</span>\r\n </li>\r\n <li aria-current=\"page\" class=\"breadcrumb-item active navbar-heading\">\r\n <h1>{{ heading | translate:headingUrlParamsOptions }}</h1>\r\n </li>\r\n </ol>\r\n </nav>\r\n\r\n <span class=\"me-auto\"></span>\r\n\r\n <ul class=\"navbar-nav\">\r\n\r\n <li class=\"nav-item ms-0\" ngbDropdown placement=\"right\">\r\n <button class=\"header-login d-flex align-items-center btn btn-light\" id=\"language\"\r\n ngbDropdownToggle type=\"button\">\r\n <span class=\"optyweb cw-misc-man2 header-avatar\" aria-hidden=\"true\"></span>\r\n <span class=\"header-indicator\">\r\n <span class=\"bo-icons bo-alert-success\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\">{{ '_COMMON._USER.LBL_LOGGED' | translate }}</span>\r\n <!-- <img src=\"assets/images/common/check-mark.svg\" [alt]=\"'_COMMON._USER.LBL_LOGGED' | translate\"\r\n class=\"header-indicator\" width=\"15\" height=\"15\"> -->\r\n </span>\r\n <span class=\"d-none d-lg-inline-block ms-3 me-1\">{{ loginName }}</span>\r\n </button>\r\n <div ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\r\n <div class=\"dropdown-header font-md d-md-none\">\r\n <span>{{ loginName }}</span>\r\n </div>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_SETTINGS' | translate}}</span>\r\n </a>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_PROFILE' | translate}}</span>\r\n </a>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_NOTIFICATIONS' | translate}}</span>\r\n </a>\r\n <div class=\"dropdown-divider\"></div>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{'_COMMON._USER.LBL_HELP' | translate}}</span>\r\n </a>\r\n <a class=\"dropdown-item\" href=\"javascript:;\">\r\n <span>{{ '_COMMON._ACTION.SIGN_OUT' | translate }}</span>\r\n </a>\r\n </div>\r\n </li>\r\n </ul>\r\n </nav>\r\n </form>\r\n</header>\r\n" }]
|
|
308
|
+
}], ctorParameters: () => [{ type: i2.TranslateService }, { type: i2$2.UntypedFormBuilder }], propDecorators: { heading: [{
|
|
309
|
+
type: Input
|
|
310
|
+
}], headingUrlParamsOptions: [{
|
|
311
|
+
type: Input
|
|
312
|
+
}], parent: [{
|
|
313
|
+
type: Input
|
|
314
|
+
}], isMenuOpened: [{
|
|
315
|
+
type: Input
|
|
316
|
+
}], toggleSidenav: [{
|
|
317
|
+
type: Output
|
|
318
|
+
}] } });
|
|
319
|
+
|
|
320
|
+
const SMALL_WIDTH_BREAKPOINT = 1300;
|
|
321
|
+
class AdminLayoutComponent {
|
|
322
|
+
constructor(_element, router, route, translate, titleService, zone) {
|
|
323
|
+
this._element = _element;
|
|
324
|
+
this.router = router;
|
|
325
|
+
this.route = route;
|
|
326
|
+
this.translate = translate;
|
|
327
|
+
this.titleService = titleService;
|
|
328
|
+
this.zone = zone;
|
|
329
|
+
this.options = {
|
|
330
|
+
lang: 'en',
|
|
331
|
+
theme: 'test',
|
|
332
|
+
settings: false,
|
|
333
|
+
docked: false,
|
|
334
|
+
boxed: false,
|
|
335
|
+
opened: false
|
|
336
|
+
};
|
|
337
|
+
this.lang = 'lang-fr';
|
|
338
|
+
this.isMenuOpened = true;
|
|
339
|
+
this.mediaMatcher = matchMedia(`(max-width: 992px)`);
|
|
340
|
+
this.mediaMatcherLg = matchMedia(`(max-width: ${SMALL_WIDTH_BREAKPOINT}px)`);
|
|
341
|
+
this.handleMediaMatcherLg = (event) => {
|
|
342
|
+
this.zone.run(() => {
|
|
343
|
+
this.isMenuOpened = !event.matches;
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
this.handleMediaMatcher = (event) => {
|
|
347
|
+
this.zone.run(() => {
|
|
348
|
+
this.menuReponsiveMode = event.matches;
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
this.mediaMatcherLg.addEventListener('change', this.handleMediaMatcherLg);
|
|
352
|
+
this.mediaMatcher.addEventListener('change', this.handleMediaMatcher);
|
|
353
|
+
}
|
|
354
|
+
ngOnInit() {
|
|
355
|
+
this._router = this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => {
|
|
356
|
+
// Scroll to top on view load
|
|
357
|
+
document.querySelector('.main-content').scrollTop = 0;
|
|
358
|
+
if (this.isOver()) {
|
|
359
|
+
this.sideMenu.close();
|
|
360
|
+
}
|
|
361
|
+
this.runOnRouteChange();
|
|
362
|
+
});
|
|
363
|
+
this.runOnRouteChange();
|
|
364
|
+
this.onLangChange();
|
|
365
|
+
this.lang = 'lang-' + localStorage.getItem('lang');
|
|
366
|
+
// Check résolution pour menu au chargement
|
|
367
|
+
this.handleMediaMatcherLg(this.mediaMatcherLg);
|
|
368
|
+
this.handleMediaMatcher(this.mediaMatcher);
|
|
369
|
+
}
|
|
370
|
+
ngOnDestroy() {
|
|
371
|
+
this._router.unsubscribe();
|
|
372
|
+
this.mediaMatcherLg.removeEventListener('change', this.handleMediaMatcherLg);
|
|
373
|
+
this.mediaMatcher.removeEventListener('change', this.handleMediaMatcher);
|
|
374
|
+
}
|
|
375
|
+
isOver() {
|
|
376
|
+
return this.mediaMatcherLg.matches;
|
|
377
|
+
}
|
|
378
|
+
isClosed() {
|
|
379
|
+
if (this.mediaMatcherLg.matches) {
|
|
380
|
+
}
|
|
381
|
+
console.log(this.sideMenu.opened);
|
|
382
|
+
}
|
|
383
|
+
receiveMessage($event) {
|
|
384
|
+
this.options = $event;
|
|
385
|
+
}
|
|
386
|
+
toggleFullscreen() {
|
|
387
|
+
const elem = this._element.nativeElement.querySelector('.main-content');
|
|
388
|
+
if (elem.requestFullscreen) {
|
|
389
|
+
elem.requestFullscreen();
|
|
390
|
+
}
|
|
391
|
+
else if (elem.webkitRequestFullScreen) {
|
|
392
|
+
elem.webkitRequestFullScreen();
|
|
393
|
+
}
|
|
394
|
+
else if (elem.mozRequestFullScreen) {
|
|
395
|
+
elem.mozRequestFullScreen();
|
|
396
|
+
}
|
|
397
|
+
else if (elem.msRequestFullScreen) {
|
|
398
|
+
elem.msRequestFullScreen();
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
runOnRouteChange() {
|
|
402
|
+
this.route.children.forEach((route) => {
|
|
403
|
+
let activeRoute = route;
|
|
404
|
+
while (activeRoute.firstChild) {
|
|
405
|
+
activeRoute = activeRoute.firstChild;
|
|
406
|
+
}
|
|
407
|
+
this.routeOptions = activeRoute.snapshot.data;
|
|
408
|
+
this.urlParamsOptions = activeRoute.params;
|
|
409
|
+
});
|
|
410
|
+
if (this.routeOptions.hasOwnProperty('heading')) {
|
|
411
|
+
// init a null des data qui seront envoye (permet d'avoir toujours un changement pour le OnChange dans l'enfant)
|
|
412
|
+
this.parentProperties = null;
|
|
413
|
+
// Si notre route a bien la propriete "Parent"
|
|
414
|
+
if (this.routeOptions.hasOwnProperty('parent')) {
|
|
415
|
+
// alors on remplie la variable qui sera envoyer a l'enfant
|
|
416
|
+
this.parentProperties = this.routeOptions.parent;
|
|
417
|
+
}
|
|
418
|
+
// set du titre
|
|
419
|
+
this.setTitle(this.translate.instant(this.routeOptions.heading, this.urlParamsOptions.value));
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
onLangChange() {
|
|
423
|
+
this.translate.onLangChange.subscribe((event) => {
|
|
424
|
+
this.setTitle(this.translate.instant(this.routeOptions.heading, this.urlParamsOptions.value));
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
setTitle(newTitle) {
|
|
428
|
+
this.titleService.setTitle(this.translate.instant(newTitle));
|
|
429
|
+
}
|
|
430
|
+
onToggleMenu() {
|
|
431
|
+
this.isMenuOpened = !this.isMenuOpened;
|
|
432
|
+
}
|
|
433
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AdminLayoutComponent, deps: [{ token: i0.ElementRef }, { token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.TranslateService }, { token: i3.Title }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
434
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: AdminLayoutComponent, isStandalone: true, selector: "app-admin", viewQueries: [{ propertyName: "sidebar", first: true, predicate: ["sidebar"], descendants: true }, { propertyName: "sideMenu", first: true, predicate: ["sideMenu"], descendants: true }], ngImport: i0, template: "<ngx-loading-bar></ngx-loading-bar>\r\n\r\n<app-skip-links></app-skip-links>\r\n\r\n\r\n<div class=\"wrapper\">\r\n <app-sidebar [isOpened]=\"isMenuOpened\" class=\"bg-cover\" [ngClass]=\"{'bg-closed' : !isMenuOpened, 'bg-opened' : isMenuOpened, 'responsive-menu': menuReponsiveMode}\" (toggleSidenav)=\"onToggleMenu()\"></app-sidebar>\r\n <div class=\"wrapper-content flex-grow-1\" [ngClass]=\"{'wrapper-content-closed' : !isMenuOpened, 'wrapper-content-opened' : isMenuOpened, 'wrapper-content-responsive': menuReponsiveMode}\">\r\n <app-header (toggleSidenav)=\"onToggleMenu()\" [heading]=\"routeOptions.heading\" [isMenuOpened]=\"isMenuOpened\"\r\n [headingUrlParamsOptions]=\"urlParamsOptions.value\" [parent]=\"parentProperties\"></app-header>\r\n <main role=\"main\" id=\"content\" class=\"main-content\">\r\n <router-outlet>\r\n </router-outlet>\r\n </main>\r\n <app-footer></app-footer>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: LoadingBarRouterModule }, { kind: "directive", type: i1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i4.LoadingBarComponent, selector: "ngx-loading-bar", inputs: ["includeSpinner", "includeBar", "fixed", "color", "value", "ref", "height", "diameter"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SidebarComponent, selector: "app-sidebar", inputs: ["isOpened"], outputs: ["toggleSidenav"] }, { kind: "component", type: SkipLinksComponent, selector: "app-skip-links" }, { kind: "component", type: FooterComponent, selector: "app-footer" }, { kind: "component", type: HeaderComponent, selector: "app-header", inputs: ["heading", "headingUrlParamsOptions", "parent", "isMenuOpened"], outputs: ["toggleSidenav"] }] }); }
|
|
435
|
+
}
|
|
436
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AdminLayoutComponent, decorators: [{
|
|
437
|
+
type: Component,
|
|
438
|
+
args: [{ selector: 'app-admin', standalone: true, imports: [
|
|
439
|
+
LoadingBarRouterModule,
|
|
440
|
+
CommonModule,
|
|
441
|
+
SidebarComponent,
|
|
442
|
+
SkipLinksComponent,
|
|
443
|
+
FooterComponent,
|
|
444
|
+
HeaderComponent
|
|
445
|
+
], template: "<ngx-loading-bar></ngx-loading-bar>\r\n\r\n<app-skip-links></app-skip-links>\r\n\r\n\r\n<div class=\"wrapper\">\r\n <app-sidebar [isOpened]=\"isMenuOpened\" class=\"bg-cover\" [ngClass]=\"{'bg-closed' : !isMenuOpened, 'bg-opened' : isMenuOpened, 'responsive-menu': menuReponsiveMode}\" (toggleSidenav)=\"onToggleMenu()\"></app-sidebar>\r\n <div class=\"wrapper-content flex-grow-1\" [ngClass]=\"{'wrapper-content-closed' : !isMenuOpened, 'wrapper-content-opened' : isMenuOpened, 'wrapper-content-responsive': menuReponsiveMode}\">\r\n <app-header (toggleSidenav)=\"onToggleMenu()\" [heading]=\"routeOptions.heading\" [isMenuOpened]=\"isMenuOpened\"\r\n [headingUrlParamsOptions]=\"urlParamsOptions.value\" [parent]=\"parentProperties\"></app-header>\r\n <main role=\"main\" id=\"content\" class=\"main-content\">\r\n <router-outlet>\r\n </router-outlet>\r\n </main>\r\n <app-footer></app-footer>\r\n </div>\r\n</div>\r\n" }]
|
|
446
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.TranslateService }, { type: i3.Title }, { type: i0.NgZone }], propDecorators: { sidebar: [{
|
|
447
|
+
type: ViewChild,
|
|
448
|
+
args: ['sidebar', { static: false }]
|
|
449
|
+
}], sideMenu: [{
|
|
450
|
+
type: ViewChild,
|
|
451
|
+
args: ['sideMenu', { static: false }]
|
|
452
|
+
}] } });
|
|
453
|
+
|
|
454
|
+
class TitleBreadcrumbComponent {
|
|
455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TitleBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
456
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: TitleBreadcrumbComponent, isStandalone: true, selector: "app-title-breadcrumb", inputs: { heading: "heading" }, ngImport: i0, template: "<div class=\"bg-white border-bottom px-3 py-3\">\r\n <h1>{{heading}}</h1>\r\n <nav aria-label=\"breadcrumb\">\r\n <ol class=\"breadcrumb\">\r\n <li class=\"breadcrumb-item\"><a href=\"#\">{{ 'GENERIC.HOME' | translate}}</a></li>\r\n <li class=\"breadcrumb-item\">{{ 'GENERIC.HOME' | translate}}</li>\r\n <li class=\"breadcrumb-item active\" aria-current=\"page\">{{ heading | uppercase | translate }}</li>\r\n </ol>\r\n </nav>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }] }); }
|
|
457
|
+
}
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TitleBreadcrumbComponent, decorators: [{
|
|
459
|
+
type: Component,
|
|
460
|
+
args: [{ selector: 'app-title-breadcrumb', standalone: true, imports: [
|
|
461
|
+
TranslateModule,
|
|
462
|
+
CommonModule
|
|
463
|
+
], template: "<div class=\"bg-white border-bottom px-3 py-3\">\r\n <h1>{{heading}}</h1>\r\n <nav aria-label=\"breadcrumb\">\r\n <ol class=\"breadcrumb\">\r\n <li class=\"breadcrumb-item\"><a href=\"#\">{{ 'GENERIC.HOME' | translate}}</a></li>\r\n <li class=\"breadcrumb-item\">{{ 'GENERIC.HOME' | translate}}</li>\r\n <li class=\"breadcrumb-item active\" aria-current=\"page\">{{ heading | uppercase | translate }}</li>\r\n </ol>\r\n </nav>\r\n</div>\r\n" }]
|
|
464
|
+
}], propDecorators: { heading: [{
|
|
465
|
+
type: Input
|
|
466
|
+
}] } });
|
|
467
|
+
|
|
468
|
+
class AccordionsContentComponent {
|
|
469
|
+
constructor() {
|
|
470
|
+
this.disabled = false;
|
|
471
|
+
this.collapsed = true;
|
|
472
|
+
}
|
|
473
|
+
get fragment() {
|
|
474
|
+
return this.slugify(this.title);
|
|
475
|
+
}
|
|
476
|
+
slugify(text) {
|
|
477
|
+
return text
|
|
478
|
+
.toLowerCase()
|
|
479
|
+
.trim()
|
|
480
|
+
.normalize('NFD')
|
|
481
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
482
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
483
|
+
.replace(/^-+|-+$/g, '');
|
|
484
|
+
}
|
|
485
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionsContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
486
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: AccordionsContentComponent, isStandalone: true, selector: "app-accordions-content", inputs: { title: "title", disabled: "disabled", collapsed: "collapsed" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: '<ng-template #content><ng-content></ng-content></ng-template>', isInline: true }); }
|
|
487
|
+
}
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionsContentComponent, decorators: [{
|
|
489
|
+
type: Component,
|
|
490
|
+
args: [{
|
|
491
|
+
selector: 'app-accordions-content',
|
|
492
|
+
template: '<ng-template #content><ng-content></ng-content></ng-template>',
|
|
493
|
+
standalone: true
|
|
494
|
+
}]
|
|
495
|
+
}], propDecorators: { title: [{
|
|
496
|
+
type: Input
|
|
497
|
+
}], disabled: [{
|
|
498
|
+
type: Input
|
|
499
|
+
}], collapsed: [{
|
|
500
|
+
type: Input
|
|
501
|
+
}], templateRef: [{
|
|
502
|
+
type: ViewChild,
|
|
503
|
+
args: ['content', { static: true }]
|
|
504
|
+
}] } });
|
|
505
|
+
|
|
506
|
+
class AccordionsComponent {
|
|
507
|
+
constructor() {
|
|
508
|
+
this.closeOthers = false;
|
|
509
|
+
this.id = 'classic';
|
|
510
|
+
this.destroyOnHide = true;
|
|
511
|
+
}
|
|
512
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
513
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: AccordionsComponent, isStandalone: true, selector: "app-accordions", inputs: { title: "title", closeOthers: "closeOthers", id: "id", destroyOnHide: "destroyOnHide" }, queries: [{ propertyName: "accordions", predicate: AccordionsContentComponent }], ngImport: i0, template: "<div ngbAccordion [closeOthers]=\"closeOthers\" [destroyOnHide]=\"destroyOnHide\">\r\n @for (accordion of accordions.toArray(); track $index) {\r\n <div ngbAccordionItem [disabled]=\"accordion.disabled\" [collapsed]=\"accordion.collapsed\">\r\n <h2 ngbAccordionHeader>\r\n <button ngbAccordionButton [attr.data-test-ctw]=\"'button-accordion-' + id + '-' + $index\">\r\n {{ accordion.title | translate }}\r\n </button>\r\n </h2>\r\n <div ngbAccordionCollapse>\r\n <div ngbAccordionBody>\r\n <ng-container *ngTemplateOutlet=\"accordion.templateRef\"></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NgbAccordionModule }, { kind: "directive", type: i2$1.NgbAccordionButton, selector: "button[ngbAccordionButton]" }, { kind: "directive", type: i2$1.NgbAccordionDirective, selector: "[ngbAccordion]", inputs: ["animation", "closeOthers", "destroyOnHide"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordion"] }, { kind: "directive", type: i2$1.NgbAccordionItem, selector: "[ngbAccordionItem]", inputs: ["ngbAccordionItem", "destroyOnHide", "disabled", "collapsed"], outputs: ["show", "shown", "hide", "hidden"], exportAs: ["ngbAccordionItem"] }, { kind: "directive", type: i2$1.NgbAccordionHeader, selector: "[ngbAccordionHeader]" }, { kind: "component", type: i2$1.NgbAccordionBody, selector: "[ngbAccordionBody]" }, { kind: "directive", type: i2$1.NgbAccordionCollapse, selector: "[ngbAccordionCollapse]", exportAs: ["ngbAccordionCollapse"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
514
|
+
}
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AccordionsComponent, decorators: [{
|
|
516
|
+
type: Component,
|
|
517
|
+
args: [{ selector: 'app-accordions', standalone: true, imports: [
|
|
518
|
+
CommonModule,
|
|
519
|
+
TranslateModule,
|
|
520
|
+
NgbAccordionModule
|
|
521
|
+
], template: "<div ngbAccordion [closeOthers]=\"closeOthers\" [destroyOnHide]=\"destroyOnHide\">\r\n @for (accordion of accordions.toArray(); track $index) {\r\n <div ngbAccordionItem [disabled]=\"accordion.disabled\" [collapsed]=\"accordion.collapsed\">\r\n <h2 ngbAccordionHeader>\r\n <button ngbAccordionButton [attr.data-test-ctw]=\"'button-accordion-' + id + '-' + $index\">\r\n {{ accordion.title | translate }}\r\n </button>\r\n </h2>\r\n <div ngbAccordionCollapse>\r\n <div ngbAccordionBody>\r\n <ng-container *ngTemplateOutlet=\"accordion.templateRef\"></ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
522
|
+
}], ctorParameters: () => [], propDecorators: { title: [{
|
|
523
|
+
type: Input
|
|
524
|
+
}], closeOthers: [{
|
|
525
|
+
type: Input
|
|
526
|
+
}], id: [{
|
|
527
|
+
type: Input
|
|
528
|
+
}], destroyOnHide: [{
|
|
529
|
+
type: Input
|
|
530
|
+
}], accordions: [{
|
|
531
|
+
type: ContentChildren,
|
|
532
|
+
args: [AccordionsContentComponent]
|
|
533
|
+
}] } });
|
|
534
|
+
|
|
535
|
+
class AlertComponent {
|
|
536
|
+
constructor() {
|
|
537
|
+
this.isDismissible = false;
|
|
538
|
+
this.cssClass = '';
|
|
539
|
+
this.btnAction = new EventEmitter();
|
|
540
|
+
this.isVisible = true;
|
|
541
|
+
}
|
|
542
|
+
ngOnInit() {
|
|
543
|
+
}
|
|
544
|
+
closeAlert() {
|
|
545
|
+
this.isVisible = false;
|
|
546
|
+
}
|
|
547
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
548
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: AlertComponent, isStandalone: true, selector: "app-alert", inputs: { type: "type", title: "title", isDismissible: "isDismissible", cssClass: "cssClass", dataTest: "dataTest" }, outputs: { btnAction: "btnAction" }, ngImport: i0, template: "@if (isVisible) {\r\n <div [class]=\"'alert alert-' + type + ' '+ cssClass\" [ngClass]=\"{ 'alert-dismissible fade show': isDismissible }\"\r\n [attr.data-test-ctw]=\"dataTest ?? null\">\r\n\r\n @if (title) {\r\n <div class=\"fw-bold\">{{ title }}</div>\r\n }\r\n\r\n <ng-content></ng-content>\r\n\r\n @if (isDismissible) {\r\n <button type=\"button\" class=\"btn-close\" (click)=\"closeAlert()\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"></button>\r\n }\r\n </div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
549
|
+
}
|
|
550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: AlertComponent, decorators: [{
|
|
551
|
+
type: Component,
|
|
552
|
+
args: [{ selector: 'app-alert', standalone: true, imports: [
|
|
553
|
+
CommonModule,
|
|
554
|
+
TranslateModule
|
|
555
|
+
], template: "@if (isVisible) {\r\n <div [class]=\"'alert alert-' + type + ' '+ cssClass\" [ngClass]=\"{ 'alert-dismissible fade show': isDismissible }\"\r\n [attr.data-test-ctw]=\"dataTest ?? null\">\r\n\r\n @if (title) {\r\n <div class=\"fw-bold\">{{ title }}</div>\r\n }\r\n\r\n <ng-content></ng-content>\r\n\r\n @if (isDismissible) {\r\n <button type=\"button\" class=\"btn-close\" (click)=\"closeAlert()\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"></button>\r\n }\r\n </div>\r\n}\r\n" }]
|
|
556
|
+
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
557
|
+
type: Input
|
|
558
|
+
}], title: [{
|
|
559
|
+
type: Input
|
|
560
|
+
}], isDismissible: [{
|
|
561
|
+
type: Input
|
|
562
|
+
}], cssClass: [{
|
|
563
|
+
type: Input
|
|
564
|
+
}], dataTest: [{
|
|
565
|
+
type: Input
|
|
566
|
+
}], btnAction: [{
|
|
567
|
+
type: Output
|
|
568
|
+
}] } });
|
|
569
|
+
|
|
570
|
+
class IconComponent {
|
|
571
|
+
constructor() {
|
|
572
|
+
this.icon = 'cw-alert-help';
|
|
573
|
+
this.font = 'optyweb';
|
|
574
|
+
this.withOnlyIcon = false;
|
|
575
|
+
}
|
|
576
|
+
get hostClasses() {
|
|
577
|
+
return 'd-inline-flex align-items-center';
|
|
578
|
+
}
|
|
579
|
+
ngOnInit() {
|
|
580
|
+
}
|
|
581
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
582
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: IconComponent, isStandalone: true, selector: "app-icon", inputs: { icon: "icon", font: "font", withOnlyIcon: "withOnlyIcon", label: "label", iconCssClass: "iconCssClass", iconColorCustom: "iconColorCustom" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<span [class]=\"font + ' icon'\" [ngClass]=\"[icon, !withOnlyIcon ? 'me-2' : '', iconCssClass ? iconCssClass : '']\" aria-hidden=\"true\"\r\n [attr.style]=\"iconColorCustom ? 'color: ' + iconColorCustom : null\"></span>\r\n\r\n@if (!withOnlyIcon) {\r\n <span>{{ label }}</span>\r\n}\r\n@else {\r\n <span class=\"visually-hidden\">{{ label }}</span>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
583
|
+
}
|
|
584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: IconComponent, decorators: [{
|
|
585
|
+
type: Component,
|
|
586
|
+
args: [{ selector: 'app-icon', standalone: true, imports: [
|
|
587
|
+
CommonModule
|
|
588
|
+
], template: "<span [class]=\"font + ' icon'\" [ngClass]=\"[icon, !withOnlyIcon ? 'me-2' : '', iconCssClass ? iconCssClass : '']\" aria-hidden=\"true\"\r\n [attr.style]=\"iconColorCustom ? 'color: ' + iconColorCustom : null\"></span>\r\n\r\n@if (!withOnlyIcon) {\r\n <span>{{ label }}</span>\r\n}\r\n@else {\r\n <span class=\"visually-hidden\">{{ label }}</span>\r\n}\r\n" }]
|
|
589
|
+
}], ctorParameters: () => [], propDecorators: { icon: [{
|
|
590
|
+
type: Input
|
|
591
|
+
}], font: [{
|
|
592
|
+
type: Input
|
|
593
|
+
}], withOnlyIcon: [{
|
|
594
|
+
type: Input
|
|
595
|
+
}], label: [{
|
|
596
|
+
type: Input
|
|
597
|
+
}], iconCssClass: [{
|
|
598
|
+
type: Input
|
|
599
|
+
}], iconColorCustom: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}], hostClasses: [{
|
|
602
|
+
type: HostBinding,
|
|
603
|
+
args: ['class']
|
|
604
|
+
}] } });
|
|
605
|
+
|
|
606
|
+
class BadgeComponent {
|
|
607
|
+
constructor() {
|
|
608
|
+
this.cssClass = '';
|
|
609
|
+
}
|
|
610
|
+
ngOnInit() {
|
|
611
|
+
}
|
|
612
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: BadgeComponent, isStandalone: true, selector: "app-badge", inputs: { type: "type", label: "label", withIcon: "withIcon", cssClass: "cssClass", dataTest: "dataTest" }, ngImport: i0, template: "<div [class]=\"'badge badge-' + type + ' '+ cssClass\" [attr.data-test-ctw]=\"dataTest ? dataTest : null\">\r\n @if (withIcon) {\r\n <app-icon [icon]=\"withIcon\" [label]=\"label\"></app-icon>\r\n } @else {\r\n {{ label }}\r\n }\r\n</div>\r\n", dependencies: [{ kind: "component", type: IconComponent, selector: "app-icon", inputs: ["icon", "font", "withOnlyIcon", "label", "iconCssClass", "iconColorCustom"] }] }); }
|
|
614
|
+
}
|
|
615
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
616
|
+
type: Component,
|
|
617
|
+
args: [{ selector: 'app-badge', standalone: true, imports: [IconComponent], template: "<div [class]=\"'badge badge-' + type + ' '+ cssClass\" [attr.data-test-ctw]=\"dataTest ? dataTest : null\">\r\n @if (withIcon) {\r\n <app-icon [icon]=\"withIcon\" [label]=\"label\"></app-icon>\r\n } @else {\r\n {{ label }}\r\n }\r\n</div>\r\n" }]
|
|
618
|
+
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
619
|
+
type: Input
|
|
620
|
+
}], label: [{
|
|
621
|
+
type: Input
|
|
622
|
+
}], withIcon: [{
|
|
623
|
+
type: Input
|
|
624
|
+
}], cssClass: [{
|
|
625
|
+
type: Input
|
|
626
|
+
}], dataTest: [{
|
|
627
|
+
type: Input
|
|
628
|
+
}] } });
|
|
629
|
+
|
|
630
|
+
class ButtonComponent {
|
|
631
|
+
constructor() {
|
|
632
|
+
this.isDropdown = false;
|
|
633
|
+
this.withOnlyIcon = false;
|
|
634
|
+
this.isMinWidth = false;
|
|
635
|
+
this.isDisabled = false;
|
|
636
|
+
this.withSpinner = false;
|
|
637
|
+
this.small = false;
|
|
638
|
+
this.btnAction = new EventEmitter();
|
|
639
|
+
this.isLoading = false;
|
|
640
|
+
}
|
|
641
|
+
ngOnInit() {
|
|
642
|
+
}
|
|
643
|
+
onBtnAction() {
|
|
644
|
+
this.btnAction.emit();
|
|
645
|
+
if (this.withSpinner) {
|
|
646
|
+
this.isLoading = !this.isLoading;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
650
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: ButtonComponent, isStandalone: true, selector: "app-button", inputs: { type: "type", isDropdown: "isDropdown", withIcon: "withIcon", withOnlyIcon: "withOnlyIcon", isMinWidth: "isMinWidth", isDisabled: "isDisabled", withSpinner: "withSpinner", label: "label", small: "small", dataTest: "dataTest" }, outputs: { btnAction: "btnAction" }, ngImport: i0, template: "@if (!isDropdown) {\r\n <button type=\"button\" class=\"btn\"\r\n [class]=\"'btn-' + type\"\r\n [ngClass]=\"{ 'btn-min-width': isMinWidth, 'btn-sm': small }\"\r\n [disabled]=\"isDisabled\"\r\n (click)=\"onBtnAction()\"\r\n [attr.data-test-ctw]=\"dataTest ?? null\">\r\n\r\n @if (isLoading) {\r\n <span class=\"spinner-border spinner-border-sm me-2\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\r\n }\r\n\r\n @if (withIcon) {\r\n <app-icon [icon]=\"withIcon\" [label]=\"label\" [withOnlyIcon]=\"withOnlyIcon\"></app-icon>\r\n }\r\n @else {\r\n {{ label | translate }}\r\n }\r\n </button>\r\n}\r\n@else {\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button class=\"btn\"\r\n [class]=\"'btn-' + type\"\r\n ngbDropdownToggle\r\n type=\"button\"\r\n [ngClass]=\"{ 'btn-min-width': isMinWidth, 'spinner-border': isLoading }\"\r\n [disabled]=\"isDisabled\"\r\n [attr.data-test-ctw]=\"dataTest ?? null\">\r\n\r\n @if (withIcon) {\r\n <app-icon class=\"me-2\"></app-icon>\r\n }\r\n\r\n {{ label | translate }}\r\n </button>\r\n\r\n <ul ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\r\n <ng-content></ng-content>\r\n </ul>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i2$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i2$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i2$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "component", type: IconComponent, selector: "app-icon", inputs: ["icon", "font", "withOnlyIcon", "label", "iconCssClass", "iconColorCustom"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
651
|
+
}
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
653
|
+
type: Component,
|
|
654
|
+
args: [{ selector: 'app-button', standalone: true, imports: [
|
|
655
|
+
CommonModule,
|
|
656
|
+
TranslateModule,
|
|
657
|
+
NgbDropdownModule,
|
|
658
|
+
IconComponent
|
|
659
|
+
], template: "@if (!isDropdown) {\r\n <button type=\"button\" class=\"btn\"\r\n [class]=\"'btn-' + type\"\r\n [ngClass]=\"{ 'btn-min-width': isMinWidth, 'btn-sm': small }\"\r\n [disabled]=\"isDisabled\"\r\n (click)=\"onBtnAction()\"\r\n [attr.data-test-ctw]=\"dataTest ?? null\">\r\n\r\n @if (isLoading) {\r\n <span class=\"spinner-border spinner-border-sm me-2\" aria-hidden=\"true\"></span>\r\n <span class=\"visually-hidden\" role=\"status\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</span>\r\n }\r\n\r\n @if (withIcon) {\r\n <app-icon [icon]=\"withIcon\" [label]=\"label\" [withOnlyIcon]=\"withOnlyIcon\"></app-icon>\r\n }\r\n @else {\r\n {{ label | translate }}\r\n }\r\n </button>\r\n}\r\n@else {\r\n <div ngbDropdown class=\"d-inline-block\">\r\n <button class=\"btn\"\r\n [class]=\"'btn-' + type\"\r\n ngbDropdownToggle\r\n type=\"button\"\r\n [ngClass]=\"{ 'btn-min-width': isMinWidth, 'spinner-border': isLoading }\"\r\n [disabled]=\"isDisabled\"\r\n [attr.data-test-ctw]=\"dataTest ?? null\">\r\n\r\n @if (withIcon) {\r\n <app-icon class=\"me-2\"></app-icon>\r\n }\r\n\r\n {{ label | translate }}\r\n </button>\r\n\r\n <ul ngbDropdownMenu class=\"dropdown-menu dropdown-menu-right\">\r\n <ng-content></ng-content>\r\n </ul>\r\n </div>\r\n}\r\n" }]
|
|
660
|
+
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
661
|
+
type: Input
|
|
662
|
+
}], isDropdown: [{
|
|
663
|
+
type: Input
|
|
664
|
+
}], withIcon: [{
|
|
665
|
+
type: Input
|
|
666
|
+
}], withOnlyIcon: [{
|
|
667
|
+
type: Input
|
|
668
|
+
}], isMinWidth: [{
|
|
669
|
+
type: Input
|
|
670
|
+
}], isDisabled: [{
|
|
671
|
+
type: Input
|
|
672
|
+
}], withSpinner: [{
|
|
673
|
+
type: Input
|
|
674
|
+
}], label: [{
|
|
675
|
+
type: Input
|
|
676
|
+
}], small: [{
|
|
677
|
+
type: Input
|
|
678
|
+
}], dataTest: [{
|
|
679
|
+
type: Input
|
|
680
|
+
}], btnAction: [{
|
|
681
|
+
type: Output
|
|
682
|
+
}] } });
|
|
683
|
+
|
|
684
|
+
class CardComponent {
|
|
685
|
+
constructor(cdRef) {
|
|
686
|
+
this.cdRef = cdRef;
|
|
687
|
+
this.showFooter = true;
|
|
688
|
+
}
|
|
689
|
+
ngOnInit() {
|
|
690
|
+
}
|
|
691
|
+
ngAfterViewInit() {
|
|
692
|
+
this.showFooter = this.cardFooter.nativeElement && this.cardFooter.nativeElement.children.length > 0;
|
|
693
|
+
this.cdRef.detectChanges();
|
|
694
|
+
}
|
|
695
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CardComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
696
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: CardComponent, isStandalone: true, selector: "app-card", inputs: { title: "title" }, viewQueries: [{ propertyName: "cardFooter", first: true, predicate: ["cardFooter"], descendants: true }], ngImport: i0, template: "<div class=\"card\">\r\n @if (title) {\r\n <h2 class=\"card-header\">{{ title }}</h2>\r\n }\r\n\r\n <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (showFooter) {\r\n <div class=\"card-footer\" #cardFooter>\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
697
|
+
}
|
|
698
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CardComponent, decorators: [{
|
|
699
|
+
type: Component,
|
|
700
|
+
args: [{ selector: 'app-card', standalone: true, imports: [
|
|
701
|
+
CommonModule
|
|
702
|
+
], template: "<div class=\"card\">\r\n @if (title) {\r\n <h2 class=\"card-header\">{{ title }}</h2>\r\n }\r\n\r\n <div class=\"card-body\">\r\n <ng-content></ng-content>\r\n </div>\r\n\r\n @if (showFooter) {\r\n <div class=\"card-footer\" #cardFooter>\r\n <ng-content select=\"[card-footer]\"></ng-content>\r\n </div>\r\n }\r\n</div>\r\n" }]
|
|
703
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { title: [{
|
|
704
|
+
type: Input
|
|
705
|
+
}], cardFooter: [{
|
|
706
|
+
type: ViewChild,
|
|
707
|
+
args: ['cardFooter']
|
|
708
|
+
}] } });
|
|
709
|
+
|
|
710
|
+
class CustomListComponent {
|
|
711
|
+
constructor() {
|
|
712
|
+
this.customListData = [];
|
|
713
|
+
}
|
|
714
|
+
ngOnInit() {
|
|
715
|
+
}
|
|
716
|
+
hasValue(value) {
|
|
717
|
+
if (value === null || value === undefined) {
|
|
718
|
+
return false;
|
|
719
|
+
}
|
|
720
|
+
;
|
|
721
|
+
if (typeof value === 'string' && value.trim() === '') {
|
|
722
|
+
return false;
|
|
723
|
+
}
|
|
724
|
+
;
|
|
725
|
+
if (Array.isArray(value) && value.length === 0) {
|
|
726
|
+
return false;
|
|
727
|
+
}
|
|
728
|
+
;
|
|
729
|
+
if (typeof value === 'object' && Object.keys(value).length === 0) {
|
|
730
|
+
return false;
|
|
731
|
+
}
|
|
732
|
+
;
|
|
733
|
+
return true;
|
|
734
|
+
}
|
|
735
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CustomListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
736
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: CustomListComponent, isStandalone: true, selector: "app-custom-list", inputs: { customListData: "customListData" }, ngImport: i0, template: "<div class=\"custom-card-light\">\r\n @for (group of customListData; track group.title) {\r\n @if (group.title) {\r\n <h3>{{ group.title | translate }}</h3>\r\n }\r\n\r\n <dl class=\"custom-description-list\">\r\n @for (field of group.fields; track field.label) {\r\n @if (!field.hideIfEmpty || hasValue(field.value)) {\r\n <dt [innerHTML]=\"'_LABEL.COLON' | translate: { label: (field.label | translate) }\"></dt>\r\n <dd>\r\n @switch (field.type) {\r\n @case ('date') {\r\n {{ field.value | date: 'short' }}\r\n }\r\n @case ('boolean') {\r\n {{ (field.value ? '_COMMON._PRO_SENTENCE.YES' : '_COMMON._PRO_SENTENCE.NO') | translate }}\r\n }\r\n @case ('html') {\r\n <span [innerHTML]=\"field.value\"></span>\r\n }\r\n @default {\r\n {{ field.translateValue ? (field.value | translate) : field.value }}\r\n }\r\n }\r\n </dd>\r\n }\r\n }\r\n </dl>\r\n }\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
737
|
+
}
|
|
738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: CustomListComponent, decorators: [{
|
|
739
|
+
type: Component,
|
|
740
|
+
args: [{ selector: 'app-custom-list', standalone: true, imports: [
|
|
741
|
+
CommonModule,
|
|
742
|
+
TranslateModule
|
|
743
|
+
], template: "<div class=\"custom-card-light\">\r\n @for (group of customListData; track group.title) {\r\n @if (group.title) {\r\n <h3>{{ group.title | translate }}</h3>\r\n }\r\n\r\n <dl class=\"custom-description-list\">\r\n @for (field of group.fields; track field.label) {\r\n @if (!field.hideIfEmpty || hasValue(field.value)) {\r\n <dt [innerHTML]=\"'_LABEL.COLON' | translate: { label: (field.label | translate) }\"></dt>\r\n <dd>\r\n @switch (field.type) {\r\n @case ('date') {\r\n {{ field.value | date: 'short' }}\r\n }\r\n @case ('boolean') {\r\n {{ (field.value ? '_COMMON._PRO_SENTENCE.YES' : '_COMMON._PRO_SENTENCE.NO') | translate }}\r\n }\r\n @case ('html') {\r\n <span [innerHTML]=\"field.value\"></span>\r\n }\r\n @default {\r\n {{ field.translateValue ? (field.value | translate) : field.value }}\r\n }\r\n }\r\n </dd>\r\n }\r\n }\r\n </dl>\r\n }\r\n</div>\r\n" }]
|
|
744
|
+
}], ctorParameters: () => [], propDecorators: { customListData: [{
|
|
745
|
+
type: Input
|
|
746
|
+
}] } });
|
|
747
|
+
|
|
748
|
+
class DragNDropListComponent {
|
|
749
|
+
constructor() {
|
|
750
|
+
this.availableItems = [];
|
|
751
|
+
this.activeItems = [];
|
|
752
|
+
this.availableItemsChange = new EventEmitter();
|
|
753
|
+
this.activeItemsChange = new EventEmitter();
|
|
754
|
+
}
|
|
755
|
+
drop(event) {
|
|
756
|
+
if (event.previousContainer === event.container) {
|
|
757
|
+
moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
|
|
758
|
+
}
|
|
759
|
+
else {
|
|
760
|
+
transferArrayItem(event.previousContainer.data, event.container.data, event.previousIndex, event.currentIndex);
|
|
761
|
+
}
|
|
762
|
+
this.availableItemsChange.emit(this.availableItems);
|
|
763
|
+
this.activeItemsChange.emit(this.activeItems);
|
|
764
|
+
}
|
|
765
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DragNDropListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: DragNDropListComponent, isStandalone: true, selector: "app-drag-n-drop-list", inputs: { availableItems: "availableItems", activeItems: "activeItems", itemTemplate: "itemTemplate" }, outputs: { availableItemsChange: "availableItemsChange", activeItemsChange: "activeItemsChange" }, ngImport: i0, template: "<div class=\"drag-drop-list\">\r\n <div class=\"list-column\" cdkDropList #availableList=\"cdkDropList\" [cdkDropListData]=\"availableItems\"\r\n [cdkDropListConnectedTo]=\"[activeList]\" (cdkDropListDropped)=\"drop($event)\">\r\n <h3>Modes disponibles</h3>\r\n @for (item of availableItems; track item) {\r\n <div cdkDrag>\r\n <ng-container *ngTemplateOutlet=\"itemTemplate || defaultTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"list-column\" cdkDropList #activeList=\"cdkDropList\" [cdkDropListData]=\"activeItems\"\r\n [cdkDropListConnectedTo]=\"[availableList]\" (cdkDropListDropped)=\"drop($event)\">\r\n <h3>Modes activ\u00E9s</h3>\r\n @for (item of activeItems; track item) {\r\n <div cdkDrag>\r\n <ng-container *ngTemplateOutlet=\"itemTemplate || defaultTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <ng-template #defaultTemplate let-item>\r\n <div class=\"default-item\">\r\n Mode : {{ item.label }} ({{ item.code }} )\r\n </div>\r\n </ng-template>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2$3.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$3.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }] }); }
|
|
767
|
+
}
|
|
768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DragNDropListComponent, decorators: [{
|
|
769
|
+
type: Component,
|
|
770
|
+
args: [{ selector: 'app-drag-n-drop-list', standalone: true, imports: [
|
|
771
|
+
CommonModule,
|
|
772
|
+
TranslateModule,
|
|
773
|
+
DragDropModule
|
|
774
|
+
], template: "<div class=\"drag-drop-list\">\r\n <div class=\"list-column\" cdkDropList #availableList=\"cdkDropList\" [cdkDropListData]=\"availableItems\"\r\n [cdkDropListConnectedTo]=\"[activeList]\" (cdkDropListDropped)=\"drop($event)\">\r\n <h3>Modes disponibles</h3>\r\n @for (item of availableItems; track item) {\r\n <div cdkDrag>\r\n <ng-container *ngTemplateOutlet=\"itemTemplate || defaultTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"list-column\" cdkDropList #activeList=\"cdkDropList\" [cdkDropListData]=\"activeItems\"\r\n [cdkDropListConnectedTo]=\"[availableList]\" (cdkDropListDropped)=\"drop($event)\">\r\n <h3>Modes activ\u00E9s</h3>\r\n @for (item of activeItems; track item) {\r\n <div cdkDrag>\r\n <ng-container *ngTemplateOutlet=\"itemTemplate || defaultTemplate; context: { $implicit: item }\"></ng-container>\r\n </div>\r\n }\r\n </div>\r\n\r\n <ng-template #defaultTemplate let-item>\r\n <div class=\"default-item\">\r\n Mode : {{ item.label }} ({{ item.code }} )\r\n </div>\r\n </ng-template>\r\n</div>\r\n" }]
|
|
775
|
+
}], propDecorators: { availableItems: [{
|
|
776
|
+
type: Input
|
|
777
|
+
}], activeItems: [{
|
|
778
|
+
type: Input
|
|
779
|
+
}], itemTemplate: [{
|
|
780
|
+
type: Input
|
|
781
|
+
}], availableItemsChange: [{
|
|
782
|
+
type: Output
|
|
783
|
+
}], activeItemsChange: [{
|
|
784
|
+
type: Output
|
|
785
|
+
}] } });
|
|
786
|
+
|
|
787
|
+
var FormFieldTypeEnum;
|
|
788
|
+
(function (FormFieldTypeEnum) {
|
|
789
|
+
FormFieldTypeEnum["text"] = "text";
|
|
790
|
+
FormFieldTypeEnum["date"] = "date";
|
|
791
|
+
FormFieldTypeEnum["time"] = "time";
|
|
792
|
+
FormFieldTypeEnum["dateTime"] = "datetime-local";
|
|
793
|
+
FormFieldTypeEnum["textarea"] = "textarea";
|
|
794
|
+
FormFieldTypeEnum["select"] = "select";
|
|
795
|
+
FormFieldTypeEnum["radio"] = "radio";
|
|
796
|
+
FormFieldTypeEnum["radioInline"] = "radioInline";
|
|
797
|
+
FormFieldTypeEnum["radioButton"] = "radioButton";
|
|
798
|
+
FormFieldTypeEnum["checkbox"] = "checkbox";
|
|
799
|
+
FormFieldTypeEnum["checkboxInline"] = "checkboxInline";
|
|
800
|
+
FormFieldTypeEnum["checkboxButton"] = "checkboxButton";
|
|
801
|
+
FormFieldTypeEnum["switch"] = "switch";
|
|
802
|
+
FormFieldTypeEnum["switchSmall"] = "switchSmall";
|
|
803
|
+
FormFieldTypeEnum["ngSelect"] = "ngSelect";
|
|
804
|
+
FormFieldTypeEnum["ngSelectMultiple"] = "ngSelectMultiple";
|
|
805
|
+
FormFieldTypeEnum["number"] = "number";
|
|
806
|
+
FormFieldTypeEnum["color"] = "color";
|
|
807
|
+
FormFieldTypeEnum["file"] = "file";
|
|
808
|
+
FormFieldTypeEnum["password"] = "password";
|
|
809
|
+
FormFieldTypeEnum["email"] = "email";
|
|
810
|
+
FormFieldTypeEnum["slider"] = "slider";
|
|
811
|
+
FormFieldTypeEnum["dateToDate"] = "dateToDate";
|
|
812
|
+
FormFieldTypeEnum["datePlusOne"] = "datePlusOne";
|
|
813
|
+
FormFieldTypeEnum["datePlusTwo"] = "datePlusTwo";
|
|
814
|
+
FormFieldTypeEnum["datePlusSeven"] = "datePlusSeven";
|
|
815
|
+
FormFieldTypeEnum["dateComplexe"] = "dateComplexe";
|
|
816
|
+
FormFieldTypeEnum["dateTimeToDateTime"] = "dateTimeToDateTime";
|
|
817
|
+
FormFieldTypeEnum["timeToTime"] = "timeToTime";
|
|
818
|
+
})(FormFieldTypeEnum || (FormFieldTypeEnum = {}));
|
|
819
|
+
|
|
820
|
+
class ShowHidePasswordDirective {
|
|
821
|
+
constructor(el, renderer, translateService) {
|
|
822
|
+
this.el = el;
|
|
823
|
+
this.renderer = renderer;
|
|
824
|
+
this.translateService = translateService;
|
|
825
|
+
this.isShown = false;
|
|
826
|
+
}
|
|
827
|
+
ngOnInit() {
|
|
828
|
+
this.setup();
|
|
829
|
+
}
|
|
830
|
+
setup() {
|
|
831
|
+
const div = this.renderer.createElement('div');
|
|
832
|
+
this.renderer.insertBefore(this.el.nativeElement.parentNode, div, this.el.nativeElement);
|
|
833
|
+
this.renderer.appendChild(div, this.el.nativeElement);
|
|
834
|
+
this.renderer.addClass(div, 'see-password-container');
|
|
835
|
+
const button = this.renderer.createElement('button');
|
|
836
|
+
this.renderer.appendChild(this.el.nativeElement.parentNode, button);
|
|
837
|
+
this.renderer.addClass(button, 'btn');
|
|
838
|
+
this.renderer.setAttribute(button, 'type', 'button');
|
|
839
|
+
this.renderer.addClass(button, 'optyweb');
|
|
840
|
+
this.renderer.addClass(button, 'cw-hide-map');
|
|
841
|
+
this.renderer.addClass(button, 'py-2');
|
|
842
|
+
this.renderer.addClass(button, 'see-password');
|
|
843
|
+
const srOnly = this.renderer.createElement('span');
|
|
844
|
+
this.renderer.appendChild(button, srOnly);
|
|
845
|
+
this.renderer.addClass(srOnly, 'visually-hidden');
|
|
846
|
+
this.renderer.setProperty(srOnly, 'innerHTML', this.translateService.instant('_COMMON._FORM._SHOW_HIDE_PWD.SHOW'));
|
|
847
|
+
this.renderer.listen(button, 'click', (event) => {
|
|
848
|
+
this.isShown = !this.isShown;
|
|
849
|
+
if (this.isShown) {
|
|
850
|
+
this.el.nativeElement.setAttribute('type', 'text');
|
|
851
|
+
this.renderer.removeClass(button, 'cw-hide-map');
|
|
852
|
+
this.renderer.addClass(button, 'cw-show-map');
|
|
853
|
+
this.renderer.setProperty(srOnly, 'innerHTML', this.translateService.instant('_COMMON._FORM._SHOW_HIDE_PWD.HIDE'));
|
|
854
|
+
}
|
|
855
|
+
else {
|
|
856
|
+
this.el.nativeElement.setAttribute('type', 'password');
|
|
857
|
+
this.renderer.addClass(button, 'cw-hide-map');
|
|
858
|
+
this.renderer.removeClass(button, 'cw-show-map');
|
|
859
|
+
this.renderer.setProperty(srOnly, 'innerHTML', this.translateService.instant('_COMMON._FORM._SHOW_HIDE_PWD.SHOW'));
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ShowHidePasswordDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
864
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: ShowHidePasswordDirective, isStandalone: true, selector: "[showHidePassword]", ngImport: i0 }); }
|
|
865
|
+
}
|
|
866
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ShowHidePasswordDirective, decorators: [{
|
|
867
|
+
type: Directive,
|
|
868
|
+
args: [{
|
|
869
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
870
|
+
selector: '[showHidePassword]',
|
|
871
|
+
standalone: true
|
|
872
|
+
}]
|
|
873
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.TranslateService }] });
|
|
874
|
+
|
|
875
|
+
function rangeValidator(group, type) {
|
|
876
|
+
const startControl = group.get('start');
|
|
877
|
+
const endControl = group.get('end');
|
|
878
|
+
const start = startControl?.value;
|
|
879
|
+
const end = endControl?.value;
|
|
880
|
+
if (!start || !end)
|
|
881
|
+
return null;
|
|
882
|
+
let startValue;
|
|
883
|
+
let endValue;
|
|
884
|
+
switch (type) {
|
|
885
|
+
case 'time':
|
|
886
|
+
startValue = parseTime(start);
|
|
887
|
+
endValue = parseTime(end);
|
|
888
|
+
break;
|
|
889
|
+
case 'datetime':
|
|
890
|
+
startValue = new Date(start).getTime();
|
|
891
|
+
endValue = new Date(end).getTime();
|
|
892
|
+
break;
|
|
893
|
+
default: // date
|
|
894
|
+
startValue = new Date(start).setHours(0, 0, 0, 0);
|
|
895
|
+
endValue = new Date(end).setHours(0, 0, 0, 0);
|
|
896
|
+
}
|
|
897
|
+
if (startValue > endValue) {
|
|
898
|
+
// Marquer les enfants comme invalid
|
|
899
|
+
startControl?.setErrors({ ...startControl.errors, rangeInvalid: true });
|
|
900
|
+
endControl?.setErrors({ ...endControl.errors, rangeInvalid: true });
|
|
901
|
+
return { rangeInvalid: true };
|
|
902
|
+
}
|
|
903
|
+
else {
|
|
904
|
+
// Supprimer l’erreur rangeInvalid si présente
|
|
905
|
+
if (startControl?.errors?.['rangeInvalid']) {
|
|
906
|
+
const { rangeInvalid, ...rest } = startControl.errors;
|
|
907
|
+
startControl.setErrors(Object.keys(rest).length ? rest : null);
|
|
908
|
+
}
|
|
909
|
+
if (endControl?.errors?.['rangeInvalid']) {
|
|
910
|
+
const { rangeInvalid, ...rest } = endControl.errors;
|
|
911
|
+
endControl.setErrors(Object.keys(rest).length ? rest : null);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return null;
|
|
915
|
+
}
|
|
916
|
+
function parseTime(time) {
|
|
917
|
+
const [h, m] = time.split(':').map(Number);
|
|
918
|
+
return h * 60 + m;
|
|
919
|
+
}
|
|
920
|
+
class FormFieldComponent {
|
|
921
|
+
get hostClasses() {
|
|
922
|
+
return 'position-relative';
|
|
923
|
+
}
|
|
924
|
+
constructor() {
|
|
925
|
+
this.options = [];
|
|
926
|
+
this.isRequired = false;
|
|
927
|
+
this.isInAddon = false;
|
|
928
|
+
this.isReadonly = false;
|
|
929
|
+
this.isDisabled = false;
|
|
930
|
+
this.inTableFilter = false;
|
|
931
|
+
this.clearFieldFilter = new EventEmitter();
|
|
932
|
+
this.refreshEvent = new EventEmitter();
|
|
933
|
+
this.typeField = FormFieldTypeEnum;
|
|
934
|
+
}
|
|
935
|
+
get isRange() {
|
|
936
|
+
if (!this.control)
|
|
937
|
+
return false;
|
|
938
|
+
return this.control instanceof FormGroup &&
|
|
939
|
+
'start' in this.control.controls &&
|
|
940
|
+
'end' in this.control.controls;
|
|
941
|
+
}
|
|
942
|
+
get formControl() {
|
|
943
|
+
return this.control;
|
|
944
|
+
}
|
|
945
|
+
get controlOrGroup() {
|
|
946
|
+
return this.control ?? this.formGroup?.get(this.name);
|
|
947
|
+
}
|
|
948
|
+
ngOnInit() {
|
|
949
|
+
console.log(this.isRange, this.control);
|
|
950
|
+
if (this.formGroup && this.name) {
|
|
951
|
+
const group = this.formGroup.get(this.name);
|
|
952
|
+
if (group instanceof FormGroup) {
|
|
953
|
+
switch (this.type) {
|
|
954
|
+
case this.typeField.dateToDate:
|
|
955
|
+
group.setValidators(g => rangeValidator(g, 'date'));
|
|
956
|
+
break;
|
|
957
|
+
case this.typeField.timeToTime:
|
|
958
|
+
group.setValidators(g => rangeValidator(g, 'time'));
|
|
959
|
+
break;
|
|
960
|
+
case this.typeField.dateTimeToDateTime:
|
|
961
|
+
group.setValidators(g => rangeValidator(g, 'datetime'));
|
|
962
|
+
break;
|
|
963
|
+
}
|
|
964
|
+
group.updateValueAndValidity();
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
onCheckboxChange(event) {
|
|
969
|
+
const checkbox = event.target;
|
|
970
|
+
const valueArray = this.control.value || [];
|
|
971
|
+
if (checkbox.checked) {
|
|
972
|
+
this.control.setValue([...valueArray, checkbox.value]);
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
this.control.setValue(valueArray.filter((v) => v !== checkbox.value));
|
|
976
|
+
}
|
|
977
|
+
this.control.markAsTouched();
|
|
978
|
+
}
|
|
979
|
+
onBlur() {
|
|
980
|
+
if (this.control && !this.control.touched) {
|
|
981
|
+
this.control.markAsTouched();
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
isInInputGroup() {
|
|
985
|
+
const inInputGroup = [
|
|
986
|
+
this.typeField.text,
|
|
987
|
+
this.typeField.date,
|
|
988
|
+
this.typeField.time,
|
|
989
|
+
this.typeField.dateTime,
|
|
990
|
+
this.typeField.number,
|
|
991
|
+
this.typeField.email,
|
|
992
|
+
this.typeField.textarea,
|
|
993
|
+
this.typeField.password,
|
|
994
|
+
].includes(this.type);
|
|
995
|
+
return inInputGroup;
|
|
996
|
+
}
|
|
997
|
+
getControl(path) {
|
|
998
|
+
if (!this.isRange)
|
|
999
|
+
return null;
|
|
1000
|
+
const group = this.control;
|
|
1001
|
+
return group.get(path);
|
|
1002
|
+
}
|
|
1003
|
+
getInputType() {
|
|
1004
|
+
switch (this.type) {
|
|
1005
|
+
case this.typeField.dateToDate:
|
|
1006
|
+
return 'date';
|
|
1007
|
+
case this.typeField.timeToTime:
|
|
1008
|
+
return 'time';
|
|
1009
|
+
case this.typeField.dateTimeToDateTime:
|
|
1010
|
+
return 'datetime-local';
|
|
1011
|
+
default:
|
|
1012
|
+
return 'text';
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
onClearFieldFilter() {
|
|
1016
|
+
this.clearFieldFilter.emit();
|
|
1017
|
+
}
|
|
1018
|
+
onClearFieldPeriod(path) {
|
|
1019
|
+
const ctrl = this.getControl(path);
|
|
1020
|
+
if (ctrl) {
|
|
1021
|
+
ctrl.setValue(null);
|
|
1022
|
+
ctrl.markAsPristine();
|
|
1023
|
+
ctrl.markAsUntouched();
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
onClearField(control) {
|
|
1027
|
+
control?.setValue(null);
|
|
1028
|
+
control?.markAsPristine();
|
|
1029
|
+
control?.markAsUntouched();
|
|
1030
|
+
}
|
|
1031
|
+
onDateAddDay(direction) {
|
|
1032
|
+
const current = this.getDateValue();
|
|
1033
|
+
if (current) {
|
|
1034
|
+
const delta = direction === 'prev' ? -1 : 1;
|
|
1035
|
+
current.setDate(current.getDate() + delta);
|
|
1036
|
+
this.formControl.setValue(this.formatDate(current));
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
onTodayAddDay(days) {
|
|
1040
|
+
const today = new Date();
|
|
1041
|
+
today.setDate(today.getDate() + days);
|
|
1042
|
+
this.formControl.setValue(this.formatDate(today));
|
|
1043
|
+
}
|
|
1044
|
+
onRefresh() {
|
|
1045
|
+
this.refreshEvent.emit();
|
|
1046
|
+
}
|
|
1047
|
+
getDateValue() {
|
|
1048
|
+
const value = this.formControl.value;
|
|
1049
|
+
if (!value)
|
|
1050
|
+
return null;
|
|
1051
|
+
const date = new Date(value);
|
|
1052
|
+
return isNaN(date.getTime()) ? null : date;
|
|
1053
|
+
}
|
|
1054
|
+
formatDate(date) {
|
|
1055
|
+
const year = date.getFullYear();
|
|
1056
|
+
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
1057
|
+
const day = date.getDate().toString().padStart(2, '0');
|
|
1058
|
+
return `${year}-${month}-${day}`;
|
|
1059
|
+
}
|
|
1060
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1061
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: FormFieldComponent, isStandalone: true, selector: "app-form-field", inputs: { control: "control", formGroup: "formGroup", type: "type", label: "label", name: "name", placeholder: "placeholder", options: "options", isRequired: "isRequired", help: "help", tooltip: "tooltip", addonLeft: "addonLeft", addonRight: "addonRight", isInAddon: "isInAddon", isReadonly: "isReadonly", isDisabled: "isDisabled", sliderValue: "sliderValue", sliderOptions: "sliderOptions", cssClass: "cssClass", inTableFilter: "inTableFilter" }, outputs: { clearFieldFilter: "clearFieldFilter", refreshEvent: "refreshEvent" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "@if (!isInAddon && !inTableFilter) {\r\n <div class=\"form-group\">\r\n @if (\r\n type !== typeField.checkbox &&\r\n type !== typeField.radio &&\r\n type !== typeField.checkboxButton &&\r\n type !== typeField.radioButton &&\r\n type !== typeField.checkboxInline &&\r\n type !== typeField.radioInline &&\r\n type !== typeField.switch &&\r\n type !== typeField.switchSmall\r\n\r\n ) {\r\n <label [for]=\"name\" class=\"form-label\">\r\n {{ label }}\r\n\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n\r\n @if (tooltip) {\r\n <button type=\"button\" class=\"btn btn-link btn-popover\" placement=\"bottom\" [ngbPopover]=\"popContent\" container=\"body\"\r\n triggers=\"mouseenter:mouseleave\">\r\n <span class=\"btn-popover-icon bo-icons bo-help\"></span>\r\n </button>\r\n <ng-template #popContent>\r\n <div [innerHTML]=\"tooltip\"></div>\r\n </ng-template>\r\n }\r\n </label>\r\n }\r\n\r\n @if (addonLeft || addonRight) {\r\n <div class=\"input-group\">\r\n <ng-container *ngIf=\"addonLeft\" [ngTemplateOutlet]=\"addonLeft\"></ng-container>\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n <ng-container *ngIf=\"addonRight\" [ngTemplateOutlet]=\"addonRight\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n @if ( isInInputGroup() ) {\r\n <div class=\"input-group\">\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n }\r\n }\r\n\r\n <!-- Error message -->\r\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\r\n <div class=\"invalid-feedback d-block\" [id]=\"'error-' + name\">\r\n <span\r\n *ngIf=\"(controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required'])\"\r\n [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label}\">\r\n </span>\r\n <span *ngIf=\"controlOrGroup?.errors?.['rangeInvalid']\">\r\n {{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}\r\n </span>\r\n </div>\r\n }\r\n\r\n @if (help) {\r\n <small [id]=\"name + '-help'\" class=\"form-text text-muted\">{{help}}</small>\r\n }\r\n\r\n </div>\r\n}\r\n@else if ( inTableFilter ) {\r\n <label class=\"form-label\" [for]=\"name\" class=\"visually-hidden\">\r\n {{'_COMMON._FORM.FILTER_LABEL' | translate: { col: name } }}\r\n </label>\r\n\r\n @if ( isInInputGroup() ) {\r\n <div class=\"input-group\">\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n }\r\n}\r\n@else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n}\r\n\r\n<ng-template #field>\r\n <!-- Text -->\r\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number, typeField.file,\r\n typeField.email,\r\n typeField.color].includes(type)) {\r\n <input [type]=\"type\" class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isDisabled\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" />\r\n }\r\n\r\n @if (type === typeField.password) {\r\n <input showHidePassword [type]=\"type\" class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" />\r\n }\r\n\r\n <!-- Textarea -->\r\n @if (type === typeField.textarea) {\r\n <textarea class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isDisabled ? 'disabled' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\"></textarea>\r\n }\r\n\r\n <!-- Select -->\r\n @if (type === typeField.select) {\r\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" bindValue=\"value\"\r\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? placeholder : null\" [readonly]=\"isReadonly\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" [attr.id]=\"name\"\r\n (blur)=\"onBlur()\">\r\n <ng-content></ng-content>\r\n </ng-select>\r\n }\r\n\r\n <!-- NgSelect -->\r\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\r\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" bindValue=\"value\"\r\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\"\r\n [placeholder]=\"placeholder ? placeholder : null\" [readonly]=\"isReadonly\"\r\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isDisabled ? 'disabled' : null\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" [attr.id]=\"name\"\r\n (blur)=\"onBlur()\">\r\n <ng-content></ng-content>\r\n </ng-select>\r\n }\r\n\r\n <!-- Radio -->\r\n @if (type === typeField.radioInline || type === typeField.radio) {\r\n <fieldset [ngClass]=\"{ 'flex-column': type === typeField.radio }\">\r\n <legend>{{label}}</legend>\r\n <ul class=\" mb-0\" [ngClass]=\"type === typeField.radioInline ? 'list-inline' : 'list-unstyled'\">\r\n <li *ngFor=\"let opt of options\" class=\"form-check\"\r\n [ngClass]=\"{ 'form-check-inline': type === typeField.radioInline }\">\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"form-check-input\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"form-check-label\">{{ opt.label }}</label>\r\n </li>\r\n </ul>\r\n </fieldset>\r\n }\r\n\r\n <!-- Radio button -->\r\n @if (type === typeField.radioButton) {\r\n <fieldset>\r\n <legend>{{label}}</legend>\r\n <div class=\"btn-group btn-group-secondary\">\r\n <ng-container *ngFor=\"let opt of options\">\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"visually-hidden\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-form\">{{ opt.label }}</label>\r\n </ng-container>\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n <!-- Checkbox Switch -->\r\n @if (\r\n (type === typeField.checkbox ||\r\n type === typeField.switch ||\r\n type === typeField.switchSmall)\r\n && options.length === 0\r\n ) {\r\n <div class=\"form-check form-switch\" [ngClass]=\"{'form-switch-small': type === typeField.switchSmall}\">\r\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"form-check-input\" />\r\n <label [for]=\"name\" class=\"form-check-label\">{{ label }}</label>\r\n </div>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @if ((type === typeField.checkboxInline || type === typeField.checkbox) && options.length > 0) {\r\n <fieldset *ngIf=\"\" [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\r\n <legend>{{label}}</legend>\r\n <ul class=\"mb-0\" [ngClass]=\"type === typeField.checkboxInline ? 'list-inline' : 'list-unstyled'\">\r\n <li *ngFor=\"let opt of options\" class=\"form-check\"\r\n [ngClass]=\"{ 'form-check-inline': type === typeField.checkboxInline }\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"form-check-input\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"form-check-label\">{{ opt.label }}</label>\r\n </li>\r\n </ul>\r\n </fieldset>\r\n }\r\n\r\n <!-- Checkbox button -->\r\n @if (type === typeField.checkboxButton) {\r\n <fieldset>\r\n <legend>{{label}}</legend>\r\n <div class=\"btn-group btn-group-secondary\">\r\n <ng-container *ngFor=\"let opt of options\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-form\">{{ opt.label }}</label>\r\n </ng-container>\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\r\n @if ([typeField.dateToDate, typeField.timeToTime, typeField.dateTimeToDateTime].includes(type) && isRange) {\r\n\r\n <div class=\"input-group\">\r\n @if (!inTableFilter) {\r\n <span class=\"input-group-text text-lowercase\" [class.disabled]=\"isDisabled ? 'disabled' : null\">\r\n {{ type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\r\n }}\r\n </span>\r\n }\r\n\r\n <input [type]=\"getInputType()\" class=\"form-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')\"\r\n [attr.placeholder]=\"inTableFilter ? (type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)) : null\"\r\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\r\n [attr.aria-describedby]=\"getControl('start')?.invalid && getControl('start')?.touched ? 'error-' + name : null\" />\r\n\r\n <button *ngIf=\"getControl('start')?.value\" type=\"button\" class=\"btn btn-secondary btn-clear-field\"\r\n (click)=\"onClearFieldPeriod('start')\">\r\n ×\r\n </button>\r\n\r\n @if (!inTableFilter) {\r\n <span class=\"input-group-text text-lowercase\" [class.disabled]=\"isDisabled ? 'disabled' : null\">\r\n {{ type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate) }}\r\n </span>\r\n }\r\n\r\n <input [type]=\"getInputType()\" class=\"form-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')\"\r\n [attr.placeholder]=\"inTableFilter ? (type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)) : null\"\r\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\"\r\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\r\n [attr.aria-describedby]=\"getControl('end')?.invalid && getControl('end')?.touched ? 'error-' + name : null\" />\r\n\r\n <button *ngIf=\"getControl('end')?.value\" type=\"button\" class=\"btn btn-secondary btn-clear-field\"\r\n (click)=\"onClearFieldPeriod('end')\">\r\n ×\r\n </button>\r\n </div>\r\n }\r\n\r\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\r\n <div class=\"input-group\">\r\n\r\n @if (type === typeField.dateComplexe) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onDateAddDay('prev')\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n <app-icon font=\"optyweb\" icon=\"cw-nav-next-left\" [withOnlyIcon]=\"true\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></app-icon>\r\n </button>\r\n }\r\n\r\n <input type=\"date\" class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isDisabled\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" />\r\n <button *ngIf=\"formControl?.value\" class=\"btn btn-secondary btn-clear-field\" type=\"button\"\r\n (click)=\"onClearField(formControl)\">×</button>\r\n\r\n @if (type === typeField.dateComplexe) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onDateAddDay('next')\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n <app-icon font=\"optyweb\" icon=\"cw-nav-next-right\" [withOnlyIcon]=\"true\" [label]=\"'Jour suivant'\"></app-icon>\r\n </button>\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onRefresh()\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n <app-icon font=\"optyweb\" icon=\"cw-toolbar-reload\" [withOnlyIcon]=\"true\" [label]=\"'Rafra\u00EEchir'\"></app-icon>\r\n </button>\r\n }\r\n\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(0)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J\r\n <span class=\"visually-hidden\">Aujourd'hui</span>\r\n </button>\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(1)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J+1\r\n <span class=\"visually-hidden\">Demain</span>\r\n </button>\r\n\r\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(2)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J+2\r\n <span class=\"visually-hidden\">Dans 2 jours</span>\r\n </button>\r\n\r\n @if (type !== typeField.datePlusTwo) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(7)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J+7\r\n <span class=\"visually-hidden\">Dans 7 jours</span>\r\n </button>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (type === typeField.slider) {\r\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\r\n }\r\n\r\n @if (inTableFilter && isInInputGroup()) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onClearFieldFilter()\">×</button>\r\n }\r\n @else if (isInInputGroup()) {\r\n <button *ngIf=\"formControl?.value\" class=\"btn btn-secondary btn-clear-field\" type=\"button\"\r\n (click)=\"onClearField(formControl)\">×</button>\r\n }\r\n\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2$2.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i3$1.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "bindLabel", "bindValue", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "tabFocusOnClearButton", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick", "keyDownFn"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "ngmodule", type: NgxSliderModule }, { kind: "component", type: i4$1.SliderComponent, selector: "ngx-slider", inputs: ["value", "highValue", "options", "manualRefresh", "triggerFocus", "cancelUserChange"], outputs: ["valueChange", "highValueChange", "userChangeStart", "userChange", "userChangeEnd"] }, { kind: "directive", type: NgbPopover, selector: "[ngbPopover]", inputs: ["animation", "autoClose", "ngbPopover", "popoverTitle", "placement", "popperOptions", "triggers", "positionTarget", "container", "disablePopover", "popoverClass", "popoverContext", "openDelay", "closeDelay"], outputs: ["shown", "hidden"], exportAs: ["ngbPopover"] }, { kind: "directive", type: ShowHidePasswordDirective, selector: "[showHidePassword]" }, { kind: "component", type: IconComponent, selector: "app-icon", inputs: ["icon", "font", "withOnlyIcon", "label", "iconCssClass", "iconColorCustom"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1062
|
+
}
|
|
1063
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
1064
|
+
type: Component,
|
|
1065
|
+
args: [{ selector: 'app-form-field', standalone: true, imports: [
|
|
1066
|
+
CommonModule,
|
|
1067
|
+
TranslateModule,
|
|
1068
|
+
FormsModule,
|
|
1069
|
+
ReactiveFormsModule,
|
|
1070
|
+
NgSelectModule,
|
|
1071
|
+
NgbDropdownModule,
|
|
1072
|
+
NgxSliderModule,
|
|
1073
|
+
NgbPopover,
|
|
1074
|
+
ShowHidePasswordDirective,
|
|
1075
|
+
IconComponent
|
|
1076
|
+
], template: "@if (!isInAddon && !inTableFilter) {\r\n <div class=\"form-group\">\r\n @if (\r\n type !== typeField.checkbox &&\r\n type !== typeField.radio &&\r\n type !== typeField.checkboxButton &&\r\n type !== typeField.radioButton &&\r\n type !== typeField.checkboxInline &&\r\n type !== typeField.radioInline &&\r\n type !== typeField.switch &&\r\n type !== typeField.switchSmall\r\n\r\n ) {\r\n <label [for]=\"name\" class=\"form-label\">\r\n {{ label }}\r\n\r\n @if (isRequired) {\r\n <span class=\"text-danger\">*</span>\r\n }\r\n\r\n @if (tooltip) {\r\n <button type=\"button\" class=\"btn btn-link btn-popover\" placement=\"bottom\" [ngbPopover]=\"popContent\" container=\"body\"\r\n triggers=\"mouseenter:mouseleave\">\r\n <span class=\"btn-popover-icon bo-icons bo-help\"></span>\r\n </button>\r\n <ng-template #popContent>\r\n <div [innerHTML]=\"tooltip\"></div>\r\n </ng-template>\r\n }\r\n </label>\r\n }\r\n\r\n @if (addonLeft || addonRight) {\r\n <div class=\"input-group\">\r\n <ng-container *ngIf=\"addonLeft\" [ngTemplateOutlet]=\"addonLeft\"></ng-container>\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n <ng-container *ngIf=\"addonRight\" [ngTemplateOutlet]=\"addonRight\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n @if ( isInInputGroup() ) {\r\n <div class=\"input-group\">\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n }\r\n }\r\n\r\n <!-- Error message -->\r\n @if (controlOrGroup?.invalid && controlOrGroup?.touched) {\r\n <div class=\"invalid-feedback d-block\" [id]=\"'error-' + name\">\r\n <span\r\n *ngIf=\"(controlOrGroup?.errors?.['required']) || (getControl('start')?.errors?.['required'] || getControl('end')?.errors?.['required'])\"\r\n [innerHtml]=\"'_COMMON._FORM.ERROR_IS_MANDATORY' | translate: {label: label}\">\r\n </span>\r\n <span *ngIf=\"controlOrGroup?.errors?.['rangeInvalid']\">\r\n {{'_COMMON._DATES.ERROR_START_END_PERIOD' | translate}}\r\n </span>\r\n </div>\r\n }\r\n\r\n @if (help) {\r\n <small [id]=\"name + '-help'\" class=\"form-text text-muted\">{{help}}</small>\r\n }\r\n\r\n </div>\r\n}\r\n@else if ( inTableFilter ) {\r\n <label class=\"form-label\" [for]=\"name\" class=\"visually-hidden\">\r\n {{'_COMMON._FORM.FILTER_LABEL' | translate: { col: name } }}\r\n </label>\r\n\r\n @if ( isInInputGroup() ) {\r\n <div class=\"input-group\">\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n </div>\r\n }\r\n @else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n }\r\n}\r\n@else {\r\n <ng-container [ngTemplateOutlet]=\"field\"></ng-container>\r\n}\r\n\r\n<ng-template #field>\r\n <!-- Text -->\r\n @if ([typeField.text, typeField.date, typeField.time, typeField.dateTime, typeField.number, typeField.file,\r\n typeField.email,\r\n typeField.color].includes(type)) {\r\n <input [type]=\"type\" class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isDisabled\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" />\r\n }\r\n\r\n @if (type === typeField.password) {\r\n <input showHidePassword [type]=\"type\" class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" />\r\n }\r\n\r\n <!-- Textarea -->\r\n @if (type === typeField.textarea) {\r\n <textarea class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [attr.disabled]=\"isDisabled ? 'disabled' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\"></textarea>\r\n }\r\n\r\n <!-- Select -->\r\n @if (type === typeField.select) {\r\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" bindValue=\"value\"\r\n [ngClass]=\"cssClass\" [searchable]=\"false\" [placeholder]=\"placeholder ? placeholder : null\" [readonly]=\"isReadonly\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" [attr.id]=\"name\"\r\n (blur)=\"onBlur()\">\r\n <ng-content></ng-content>\r\n </ng-select>\r\n }\r\n\r\n <!-- NgSelect -->\r\n @if (type === typeField.ngSelect || type === typeField.ngSelectMultiple) {\r\n <ng-select [formControl]=\"formControl\" [items]=\"options\" bindLabel=\"label\" [labelForId]=\"name\" bindValue=\"value\"\r\n [multiple]=\"type === typeField.ngSelectMultiple\" [ngClass]=\"cssClass\"\r\n [placeholder]=\"placeholder ? placeholder : null\" [readonly]=\"isReadonly\"\r\n [notFoundText]=\"'_COMMON.NO_RESULT' | translate\" [attr.disabled]=\"isDisabled ? 'disabled' : null\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" [attr.id]=\"name\"\r\n (blur)=\"onBlur()\">\r\n <ng-content></ng-content>\r\n </ng-select>\r\n }\r\n\r\n <!-- Radio -->\r\n @if (type === typeField.radioInline || type === typeField.radio) {\r\n <fieldset [ngClass]=\"{ 'flex-column': type === typeField.radio }\">\r\n <legend>{{label}}</legend>\r\n <ul class=\" mb-0\" [ngClass]=\"type === typeField.radioInline ? 'list-inline' : 'list-unstyled'\">\r\n <li *ngFor=\"let opt of options\" class=\"form-check\"\r\n [ngClass]=\"{ 'form-check-inline': type === typeField.radioInline }\">\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"form-check-input\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"form-check-label\">{{ opt.label }}</label>\r\n </li>\r\n </ul>\r\n </fieldset>\r\n }\r\n\r\n <!-- Radio button -->\r\n @if (type === typeField.radioButton) {\r\n <fieldset>\r\n <legend>{{label}}</legend>\r\n <div class=\"btn-group btn-group-secondary\">\r\n <ng-container *ngFor=\"let opt of options\">\r\n <input type=\"radio\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" [formControl]=\"formControl\"\r\n class=\"visually-hidden\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-form\">{{ opt.label }}</label>\r\n </ng-container>\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n <!-- Checkbox Switch -->\r\n @if (\r\n (type === typeField.checkbox ||\r\n type === typeField.switch ||\r\n type === typeField.switchSmall)\r\n && options.length === 0\r\n ) {\r\n <div class=\"form-check form-switch\" [ngClass]=\"{'form-switch-small': type === typeField.switchSmall}\">\r\n <input type=\"checkbox\" [id]=\"name\" [formControl]=\"formControl\" class=\"form-check-input\" />\r\n <label [for]=\"name\" class=\"form-check-label\">{{ label }}</label>\r\n </div>\r\n }\r\n\r\n <!-- Checkbox -->\r\n @if ((type === typeField.checkboxInline || type === typeField.checkbox) && options.length > 0) {\r\n <fieldset *ngIf=\"\" [ngClass]=\"{ 'flex-column': type === typeField.checkbox }\">\r\n <legend>{{label}}</legend>\r\n <ul class=\"mb-0\" [ngClass]=\"type === typeField.checkboxInline ? 'list-inline' : 'list-unstyled'\">\r\n <li *ngFor=\"let opt of options\" class=\"form-check\"\r\n [ngClass]=\"{ 'form-check-inline': type === typeField.checkboxInline }\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"form-check-input\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"form-check-label\">{{ opt.label }}</label>\r\n </li>\r\n </ul>\r\n </fieldset>\r\n }\r\n\r\n <!-- Checkbox button -->\r\n @if (type === typeField.checkboxButton) {\r\n <fieldset>\r\n <legend>{{label}}</legend>\r\n <div class=\"btn-group btn-group-secondary\">\r\n <ng-container *ngFor=\"let opt of options\">\r\n <input type=\"checkbox\" [id]=\"name + '_' + opt.value\" [value]=\"opt.value\" (change)=\"onCheckboxChange($event)\"\r\n [checked]=\"control.value?.includes(opt.value)\" class=\"visually-hidden\" />\r\n <label [for]=\"name + '_' + opt.value\" class=\"btn btn-form\">{{ opt.label }}</label>\r\n </ng-container>\r\n </div>\r\n </fieldset>\r\n }\r\n\r\n <!-- Period - DateToDate / TimeToTime / DateTimeToDateTime -->\r\n @if ([typeField.dateToDate, typeField.timeToTime, typeField.dateTimeToDateTime].includes(type) && isRange) {\r\n\r\n <div class=\"input-group\">\r\n @if (!inTableFilter) {\r\n <span class=\"input-group-text text-lowercase\" [class.disabled]=\"isDisabled ? 'disabled' : null\">\r\n {{ type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)\r\n }}\r\n </span>\r\n }\r\n\r\n <input [type]=\"getInputType()\" class=\"form-control\" [id]=\"name + '_start'\" [formControl]=\"getControl('start')\"\r\n [attr.placeholder]=\"inTableFilter ? (type === typeField.timeToTime ? ('_COMMON._DATES.FROM' | translate) : ('_COMMON._DATES.FROM_TO_1' | translate)) : null\"\r\n [ngClass]=\"[(cssClass || ''), getControl('start')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\" [attr.aria-required]=\"isRequired\"\r\n [attr.aria-invalid]=\"getControl('start')?.invalid && getControl('start')?.touched\"\r\n [attr.aria-describedby]=\"getControl('start')?.invalid && getControl('start')?.touched ? 'error-' + name : null\" />\r\n\r\n <button *ngIf=\"getControl('start')?.value\" type=\"button\" class=\"btn btn-secondary btn-clear-field\"\r\n (click)=\"onClearFieldPeriod('start')\">\r\n ×\r\n </button>\r\n\r\n @if (!inTableFilter) {\r\n <span class=\"input-group-text text-lowercase\" [class.disabled]=\"isDisabled ? 'disabled' : null\">\r\n {{ type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate) }}\r\n </span>\r\n }\r\n\r\n <input [type]=\"getInputType()\" class=\"form-control\" [id]=\"name + '_end'\" [formControl]=\"getControl('end')\"\r\n [attr.placeholder]=\"inTableFilter ? (type === typeField.timeToTime ? ('_COMMON._DATES.TO' | translate) : ('_COMMON._DATES.FROM_TO_2' | translate)) : null\"\r\n [ngClass]=\"[(cssClass || ''), getControl('end')?.value ? 'has-value' : '']\"\r\n [attr.required]=\"isRequired ? 'required' : null\" [attr.readonly]=\"isReadonly ? 'readonly' : null\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\"\r\n [attr.aria-invalid]=\"getControl('end')?.invalid && getControl('end')?.touched\"\r\n [attr.aria-describedby]=\"getControl('end')?.invalid && getControl('end')?.touched ? 'error-' + name : null\" />\r\n\r\n <button *ngIf=\"getControl('end')?.value\" type=\"button\" class=\"btn btn-secondary btn-clear-field\"\r\n (click)=\"onClearFieldPeriod('end')\">\r\n ×\r\n </button>\r\n </div>\r\n }\r\n\r\n @if ([typeField.datePlusOne, typeField.datePlusTwo, typeField.datePlusSeven, typeField.dateComplexe].includes(type)) {\r\n <div class=\"input-group\">\r\n\r\n @if (type === typeField.dateComplexe) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onDateAddDay('prev')\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n <app-icon font=\"optyweb\" icon=\"cw-nav-next-left\" [withOnlyIcon]=\"true\" [label]=\"'Jour pr\u00E9c\u00E9dent'\"></app-icon>\r\n </button>\r\n }\r\n\r\n <input type=\"date\" class=\"form-control\" [id]=\"name\" [formControl]=\"formControl\"\r\n [ngClass]=\"[(cssClass || ''), formControl?.value ? 'has-value' : '']\"\r\n [attr.placeholder]=\"placeholder ? placeholder : null\" [attr.required]=\"isRequired ? 'required' : null\"\r\n [attr.readonly]=\"isReadonly ? 'readonly' : null\" [disabled]=\"isDisabled\"\r\n [attr.aria-required]=\"isRequired\" [attr.aria-invalid]=\"control.invalid && control.touched\"\r\n [attr.aria-describedby]=\"control.invalid && control.touched ? 'error-' + name : null\" />\r\n <button *ngIf=\"formControl?.value\" class=\"btn btn-secondary btn-clear-field\" type=\"button\"\r\n (click)=\"onClearField(formControl)\">×</button>\r\n\r\n @if (type === typeField.dateComplexe) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onDateAddDay('next')\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n <app-icon font=\"optyweb\" icon=\"cw-nav-next-right\" [withOnlyIcon]=\"true\" [label]=\"'Jour suivant'\"></app-icon>\r\n </button>\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onRefresh()\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n <app-icon font=\"optyweb\" icon=\"cw-toolbar-reload\" [withOnlyIcon]=\"true\" [label]=\"'Rafra\u00EEchir'\"></app-icon>\r\n </button>\r\n }\r\n\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(0)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J\r\n <span class=\"visually-hidden\">Aujourd'hui</span>\r\n </button>\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(1)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J+1\r\n <span class=\"visually-hidden\">Demain</span>\r\n </button>\r\n\r\n @if (type !== typeField.datePlusOne && type !== typeField.dateComplexe) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(2)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J+2\r\n <span class=\"visually-hidden\">Dans 2 jours</span>\r\n </button>\r\n\r\n @if (type !== typeField.datePlusTwo) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onTodayAddDay(7)\"\r\n [attr.disabled]=\"isDisabled ? 'disabled' : null\">\r\n J+7\r\n <span class=\"visually-hidden\">Dans 7 jours</span>\r\n </button>\r\n }\r\n }\r\n </div>\r\n }\r\n\r\n @if (type === typeField.slider) {\r\n <ngx-slider [(value)]=\"sliderValue\" [options]=\"sliderOptions\" [formControl]=\"formControl\"></ngx-slider>\r\n }\r\n\r\n @if (inTableFilter && isInInputGroup()) {\r\n <button class=\"btn btn-secondary btn-clear-field\" type=\"button\" (click)=\"onClearFieldFilter()\">×</button>\r\n }\r\n @else if (isInInputGroup()) {\r\n <button *ngIf=\"formControl?.value\" class=\"btn btn-secondary btn-clear-field\" type=\"button\"\r\n (click)=\"onClearField(formControl)\">×</button>\r\n }\r\n\r\n</ng-template>\r\n" }]
|
|
1077
|
+
}], ctorParameters: () => [], propDecorators: { control: [{
|
|
1078
|
+
type: Input
|
|
1079
|
+
}], formGroup: [{
|
|
1080
|
+
type: Input
|
|
1081
|
+
}], type: [{
|
|
1082
|
+
type: Input
|
|
1083
|
+
}], label: [{
|
|
1084
|
+
type: Input
|
|
1085
|
+
}], name: [{
|
|
1086
|
+
type: Input
|
|
1087
|
+
}], placeholder: [{
|
|
1088
|
+
type: Input
|
|
1089
|
+
}], options: [{
|
|
1090
|
+
type: Input
|
|
1091
|
+
}], isRequired: [{
|
|
1092
|
+
type: Input
|
|
1093
|
+
}], help: [{
|
|
1094
|
+
type: Input
|
|
1095
|
+
}], tooltip: [{
|
|
1096
|
+
type: Input
|
|
1097
|
+
}], addonLeft: [{
|
|
1098
|
+
type: Input
|
|
1099
|
+
}], addonRight: [{
|
|
1100
|
+
type: Input
|
|
1101
|
+
}], isInAddon: [{
|
|
1102
|
+
type: Input
|
|
1103
|
+
}], isReadonly: [{
|
|
1104
|
+
type: Input
|
|
1105
|
+
}], isDisabled: [{
|
|
1106
|
+
type: Input
|
|
1107
|
+
}], sliderValue: [{
|
|
1108
|
+
type: Input
|
|
1109
|
+
}], sliderOptions: [{
|
|
1110
|
+
type: Input
|
|
1111
|
+
}], cssClass: [{
|
|
1112
|
+
type: Input
|
|
1113
|
+
}], inTableFilter: [{
|
|
1114
|
+
type: Input
|
|
1115
|
+
}], clearFieldFilter: [{
|
|
1116
|
+
type: Output
|
|
1117
|
+
}], refreshEvent: [{
|
|
1118
|
+
type: Output
|
|
1119
|
+
}], hostClasses: [{
|
|
1120
|
+
type: HostBinding,
|
|
1121
|
+
args: ['class']
|
|
1122
|
+
}] } });
|
|
1123
|
+
|
|
1124
|
+
var LegendTypeEnum;
|
|
1125
|
+
(function (LegendTypeEnum) {
|
|
1126
|
+
LegendTypeEnum["icon"] = "icon";
|
|
1127
|
+
LegendTypeEnum["badge"] = "badge";
|
|
1128
|
+
LegendTypeEnum["color"] = "color";
|
|
1129
|
+
})(LegendTypeEnum || (LegendTypeEnum = {}));
|
|
1130
|
+
|
|
1131
|
+
class LegendComponent {
|
|
1132
|
+
constructor() {
|
|
1133
|
+
this.legendTypeEnum = LegendTypeEnum;
|
|
1134
|
+
}
|
|
1135
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: LegendComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1136
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: LegendComponent, isStandalone: true, selector: "app-legend", inputs: { legend: "legend" }, ngImport: i0, template: "<div *ngIf=\"legend.title\" class=\"legend-title\">\r\n {{ '_COMMON._TABLE.LEGEND' | translate }}\r\n</div>\r\n<ul class=\"list-inline legend-items\">\r\n @for (item of legend.data; track $index) {\r\n <li class=\"list-inline-item legend-item\">\r\n @switch (item.type) {\r\n @case (legendTypeEnum.icon) {\r\n <app-icon [icon]=\"item.icon\" [label]=\"item.label\" [iconCssClass]=\"'text-' + item.colorUi\" [iconColorCustom]=\"item.colorCustom\">\r\n </app-icon>\r\n }\r\n @case (legendTypeEnum.badge) {\r\n <app-badge [type]=\"item.colorUi\" [label]=\"item.labelBadge\"></app-badge>\r\n {{item.label}}\r\n }\r\n @case (legendTypeEnum.color) {\r\n <span class=\"legend-item-color\" [ngClass]=\"item.colorUi ?'legend-' + item.colorUi : ''\" [style.background-color]=\"item.colorCustom\"></span>\r\n {{item.label}}\r\n }\r\n }\r\n </li>\r\n }\r\n</ul>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "app-icon", inputs: ["icon", "font", "withOnlyIcon", "label", "iconCssClass", "iconColorCustom"] }, { kind: "component", type: BadgeComponent, selector: "app-badge", inputs: ["type", "label", "withIcon", "cssClass", "dataTest"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1137
|
+
}
|
|
1138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: LegendComponent, decorators: [{
|
|
1139
|
+
type: Component,
|
|
1140
|
+
args: [{ selector: 'app-legend', standalone: true, imports: [
|
|
1141
|
+
CommonModule,
|
|
1142
|
+
IconComponent,
|
|
1143
|
+
BadgeComponent,
|
|
1144
|
+
TranslateModule
|
|
1145
|
+
], template: "<div *ngIf=\"legend.title\" class=\"legend-title\">\r\n {{ '_COMMON._TABLE.LEGEND' | translate }}\r\n</div>\r\n<ul class=\"list-inline legend-items\">\r\n @for (item of legend.data; track $index) {\r\n <li class=\"list-inline-item legend-item\">\r\n @switch (item.type) {\r\n @case (legendTypeEnum.icon) {\r\n <app-icon [icon]=\"item.icon\" [label]=\"item.label\" [iconCssClass]=\"'text-' + item.colorUi\" [iconColorCustom]=\"item.colorCustom\">\r\n </app-icon>\r\n }\r\n @case (legendTypeEnum.badge) {\r\n <app-badge [type]=\"item.colorUi\" [label]=\"item.labelBadge\"></app-badge>\r\n {{item.label}}\r\n }\r\n @case (legendTypeEnum.color) {\r\n <span class=\"legend-item-color\" [ngClass]=\"item.colorUi ?'legend-' + item.colorUi : ''\" [style.background-color]=\"item.colorCustom\"></span>\r\n {{item.label}}\r\n }\r\n }\r\n </li>\r\n }\r\n</ul>\r\n" }]
|
|
1146
|
+
}], ctorParameters: () => [], propDecorators: { legend: [{
|
|
1147
|
+
type: Input
|
|
1148
|
+
}] } });
|
|
1149
|
+
|
|
1150
|
+
class LoaderComponent {
|
|
1151
|
+
constructor() { }
|
|
1152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1153
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: LoaderComponent, isStandalone: true, selector: "app-loader", ngImport: i0, template: "<div class=\"animated-loader-container animated-loader-medium animated-loader-container-top\">\r\n <div class=\"animated-loader mb-1\" aria-live=\"assertive\"></div>\r\n <div class=\"animated-loader-text\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1154
|
+
}
|
|
1155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
1156
|
+
type: Component,
|
|
1157
|
+
args: [{ selector: 'app-loader', standalone: true, imports: [
|
|
1158
|
+
TranslateModule
|
|
1159
|
+
], template: "<div class=\"animated-loader-container animated-loader-medium animated-loader-container-top\">\r\n <div class=\"animated-loader mb-1\" aria-live=\"assertive\"></div>\r\n <div class=\"animated-loader-text\">{{ '_COMMON._HTTP.TXT_LOADING' | translate }}</div>\r\n</div>\r\n" }]
|
|
1160
|
+
}], ctorParameters: () => [] });
|
|
1161
|
+
|
|
1162
|
+
var ModalsType;
|
|
1163
|
+
(function (ModalsType) {
|
|
1164
|
+
ModalsType["delete"] = "delete";
|
|
1165
|
+
ModalsType["loader"] = "loader";
|
|
1166
|
+
ModalsType["quickSideView"] = "quicksideview";
|
|
1167
|
+
ModalsType["custom"] = "custom";
|
|
1168
|
+
})(ModalsType || (ModalsType = {}));
|
|
1169
|
+
|
|
1170
|
+
var UiTypeEnum;
|
|
1171
|
+
(function (UiTypeEnum) {
|
|
1172
|
+
UiTypeEnum["primary"] = "primary";
|
|
1173
|
+
UiTypeEnum["secondary"] = "secondary";
|
|
1174
|
+
UiTypeEnum["light"] = "light";
|
|
1175
|
+
UiTypeEnum["info"] = "info";
|
|
1176
|
+
UiTypeEnum["success"] = "success";
|
|
1177
|
+
UiTypeEnum["warning"] = "warning";
|
|
1178
|
+
UiTypeEnum["danger"] = "danger";
|
|
1179
|
+
UiTypeEnum["link"] = "link";
|
|
1180
|
+
UiTypeEnum["dark"] = "dark";
|
|
1181
|
+
})(UiTypeEnum || (UiTypeEnum = {}));
|
|
1182
|
+
|
|
1183
|
+
class ModalsComponent {
|
|
1184
|
+
constructor(activeModal, translateService) {
|
|
1185
|
+
this.activeModal = activeModal;
|
|
1186
|
+
this.translateService = translateService;
|
|
1187
|
+
this.itemsToDelete = [];
|
|
1188
|
+
this.itemsToDeleteTitle = this.translateService.instant('_COMMON._MODAL_DELETE.DEFAULT_TYPE');
|
|
1189
|
+
this.btnAction = new EventEmitter();
|
|
1190
|
+
this.modalsType = ModalsType;
|
|
1191
|
+
this.buttonTypeEnum = UiTypeEnum;
|
|
1192
|
+
}
|
|
1193
|
+
ngOnInit() {
|
|
1194
|
+
this.labelBtnAction = this.type === this.modalsType.quickSideView
|
|
1195
|
+
? this.translateService.instant('_COMMON._ACTION.EDIT') : this.labelBtnAction;
|
|
1196
|
+
}
|
|
1197
|
+
actionClick() {
|
|
1198
|
+
this.activeModal.close();
|
|
1199
|
+
}
|
|
1200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ModalsComponent, deps: [{ token: i2$1.NgbActiveModal }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1201
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: ModalsComponent, isStandalone: true, selector: "app-modals", inputs: { type: "type", modalTitle: "modalTitle", itemsToDelete: "itemsToDelete", itemsToDeleteTitle: "itemsToDeleteTitle", labelBtnAction: "labelBtnAction", customBodyTemplate: "customBodyTemplate", customBodyContext: "customBodyContext" }, outputs: { btnAction: "btnAction" }, ngImport: i0, template: "@if (type !== modalsType.loader) {\r\n <div class=\"modal-header\">\r\n @if (type === modalsType.delete) {\r\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\r\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete.length, name: itemsToDeleteTitle } }}\r\n </h1>\r\n }\r\n @else {\r\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\r\n {{ modalTitle | translate }}\r\n </h1>\r\n }\r\n\r\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n (click)=\"activeModal.dismiss()\" data-test-ctw=\"btn-close-modal\">\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n @if (type === modalsType.delete) {\r\n @if (itemsToDelete.length === 1) {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\r\n }\r\n @if (itemsToDelete.length > 1) {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\r\n }\r\n @if (itemsToDelete.length > 0) {\r\n <ul class=\"mb-0\">\r\n @for (item of itemsToDelete; track item) {\r\n <li>{{ item }}</li>\r\n }\r\n </ul>\r\n }\r\n }\r\n @else if (type === modalsType.custom || type === modalsType.quickSideView) {\r\n @if (customBodyTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate\" [ngTemplateOutletContext]=\"customBodyContext\">\r\n </ng-container>\r\n }\r\n }\r\n </div>\r\n\r\n <div class=\"modal-footer\">\r\n @if (type === modalsType.delete) {\r\n <app-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\" [isMinWidth]=\"true\"\r\n (btnAction)=\"actionClick()\" dataTest=\"btn-action-modal\">\r\n </app-button>\r\n\r\n <app-button label=\"_COMMON._ACTION.CANCEL\" [type]=\"buttonTypeEnum.secondary\" [isMinWidth]=\"true\"\r\n (btnAction)=\"activeModal.dismiss()\" dataTest=\"btn-close-modal\">\r\n </app-button>\r\n }\r\n @else {\r\n @if(labelBtnAction) {\r\n <app-button [label]=\"labelBtnAction | translate\" [type]=\"buttonTypeEnum.primary\" [isMinWidth]=\"true\"\r\n (btnAction)=\"actionClick()\" dataTest=\"btn-close-modal\">\r\n </app-button>\r\n }\r\n\r\n <app-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\" [isMinWidth]=\"true\"\r\n (btnAction)=\"activeModal.dismiss()\" dataTest=\"btn-close-modal\">\r\n </app-button>\r\n }\r\n </div>\r\n}\r\n\r\n@if (type === modalsType.loader) {\r\n <div class=\"modal-body\">\r\n <app-loader></app-loader>\r\n </div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["type", "isDropdown", "withIcon", "withOnlyIcon", "isMinWidth", "isDisabled", "withSpinner", "label", "small", "dataTest"], outputs: ["btnAction"] }, { kind: "component", type: LoaderComponent, selector: "app-loader" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1202
|
+
}
|
|
1203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ModalsComponent, decorators: [{
|
|
1204
|
+
type: Component,
|
|
1205
|
+
args: [{ selector: 'app-modals', standalone: true, imports: [
|
|
1206
|
+
CommonModule,
|
|
1207
|
+
TranslateModule,
|
|
1208
|
+
ButtonComponent,
|
|
1209
|
+
LoaderComponent
|
|
1210
|
+
], template: "@if (type !== modalsType.loader) {\r\n <div class=\"modal-header\">\r\n @if (type === modalsType.delete) {\r\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\r\n {{ '_COMMON._MODAL_DELETE.TITLE' | translate: { number: itemsToDelete.length, name: itemsToDeleteTitle } }}\r\n </h1>\r\n }\r\n @else {\r\n <h1 class=\"modal-title\" id=\"modal-basic-title\">\r\n {{ modalTitle | translate }}\r\n </h1>\r\n }\r\n\r\n <button type=\"button\" class=\"btn-close\" [attr.aria-label]=\"'_COMMON._ACTION.CLOSE' | translate\"\r\n (click)=\"activeModal.dismiss()\" data-test-ctw=\"btn-close-modal\">\r\n </button>\r\n </div>\r\n\r\n <div class=\"modal-body\">\r\n @if (type === modalsType.delete) {\r\n @if (itemsToDelete.length === 1) {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.SIMPLE_TEXT' | translate\"></div>\r\n }\r\n @if (itemsToDelete.length > 1) {\r\n <div [innerHTML]=\"'_COMMON._MODAL_DELETE.MULTIPLE_TEXT' | translate\"></div>\r\n }\r\n @if (itemsToDelete.length > 0) {\r\n <ul class=\"mb-0\">\r\n @for (item of itemsToDelete; track item) {\r\n <li>{{ item }}</li>\r\n }\r\n </ul>\r\n }\r\n }\r\n @else if (type === modalsType.custom || type === modalsType.quickSideView) {\r\n @if (customBodyTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"customBodyTemplate\" [ngTemplateOutletContext]=\"customBodyContext\">\r\n </ng-container>\r\n }\r\n }\r\n </div>\r\n\r\n <div class=\"modal-footer\">\r\n @if (type === modalsType.delete) {\r\n <app-button label=\"_COMMON._ACTION.DELETE\" [type]=\"buttonTypeEnum.danger\" [isMinWidth]=\"true\"\r\n (btnAction)=\"actionClick()\" dataTest=\"btn-action-modal\">\r\n </app-button>\r\n\r\n <app-button label=\"_COMMON._ACTION.CANCEL\" [type]=\"buttonTypeEnum.secondary\" [isMinWidth]=\"true\"\r\n (btnAction)=\"activeModal.dismiss()\" dataTest=\"btn-close-modal\">\r\n </app-button>\r\n }\r\n @else {\r\n @if(labelBtnAction) {\r\n <app-button [label]=\"labelBtnAction | translate\" [type]=\"buttonTypeEnum.primary\" [isMinWidth]=\"true\"\r\n (btnAction)=\"actionClick()\" dataTest=\"btn-close-modal\">\r\n </app-button>\r\n }\r\n\r\n <app-button label=\"_COMMON._ACTION.CLOSE\" [type]=\"buttonTypeEnum.secondary\" [isMinWidth]=\"true\"\r\n (btnAction)=\"activeModal.dismiss()\" dataTest=\"btn-close-modal\">\r\n </app-button>\r\n }\r\n </div>\r\n}\r\n\r\n@if (type === modalsType.loader) {\r\n <div class=\"modal-body\">\r\n <app-loader></app-loader>\r\n </div>\r\n}\r\n" }]
|
|
1211
|
+
}], ctorParameters: () => [{ type: i2$1.NgbActiveModal }, { type: i2.TranslateService }], propDecorators: { type: [{
|
|
1212
|
+
type: Input
|
|
1213
|
+
}], modalTitle: [{
|
|
1214
|
+
type: Input
|
|
1215
|
+
}], itemsToDelete: [{
|
|
1216
|
+
type: Input
|
|
1217
|
+
}], itemsToDeleteTitle: [{
|
|
1218
|
+
type: Input
|
|
1219
|
+
}], labelBtnAction: [{
|
|
1220
|
+
type: Input
|
|
1221
|
+
}], customBodyTemplate: [{
|
|
1222
|
+
type: Input
|
|
1223
|
+
}], customBodyContext: [{
|
|
1224
|
+
type: Input
|
|
1225
|
+
}], btnAction: [{
|
|
1226
|
+
type: Output
|
|
1227
|
+
}] } });
|
|
1228
|
+
|
|
1229
|
+
class TabContentComponent {
|
|
1230
|
+
constructor() {
|
|
1231
|
+
this.disabled = false;
|
|
1232
|
+
}
|
|
1233
|
+
get fragment() {
|
|
1234
|
+
return this.slugify(this.title);
|
|
1235
|
+
}
|
|
1236
|
+
slugify(text) {
|
|
1237
|
+
return text
|
|
1238
|
+
.toLowerCase()
|
|
1239
|
+
.trim()
|
|
1240
|
+
.normalize('NFD')
|
|
1241
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
1242
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
1243
|
+
.replace(/^-+|-+$/g, '');
|
|
1244
|
+
}
|
|
1245
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TabContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1246
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: TabContentComponent, isStandalone: true, selector: "app-tab-content", inputs: { title: "title", disabled: "disabled" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: '<ng-template #content><ng-content></ng-content></ng-template>', isInline: true }); }
|
|
1247
|
+
}
|
|
1248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TabContentComponent, decorators: [{
|
|
1249
|
+
type: Component,
|
|
1250
|
+
args: [{
|
|
1251
|
+
selector: 'app-tab-content',
|
|
1252
|
+
template: '<ng-template #content><ng-content></ng-content></ng-template>',
|
|
1253
|
+
standalone: true
|
|
1254
|
+
}]
|
|
1255
|
+
}], propDecorators: { title: [{
|
|
1256
|
+
type: Input
|
|
1257
|
+
}], disabled: [{
|
|
1258
|
+
type: Input
|
|
1259
|
+
}], templateRef: [{
|
|
1260
|
+
type: ViewChild,
|
|
1261
|
+
args: ['content', { static: true }]
|
|
1262
|
+
}] } });
|
|
1263
|
+
|
|
1264
|
+
class TabComponent {
|
|
1265
|
+
constructor(router, route) {
|
|
1266
|
+
this.router = router;
|
|
1267
|
+
this.route = route;
|
|
1268
|
+
this.useFragment = true;
|
|
1269
|
+
this.basicDisplay = false;
|
|
1270
|
+
this.activeId = 0;
|
|
1271
|
+
}
|
|
1272
|
+
ngAfterContentInit() {
|
|
1273
|
+
const tabsArray = this.tabs.toArray();
|
|
1274
|
+
const firstEnabledIndex = tabsArray.findIndex(tab => !tab.disabled);
|
|
1275
|
+
this.activeId = firstEnabledIndex !== -1 ? firstEnabledIndex : 0;
|
|
1276
|
+
this.route.fragment.subscribe(fragment => {
|
|
1277
|
+
if (this.useFragment) {
|
|
1278
|
+
if (fragment) {
|
|
1279
|
+
const foundIndex = tabsArray.findIndex(tab => tab.fragment === fragment && !tab.disabled);
|
|
1280
|
+
if (foundIndex !== -1) {
|
|
1281
|
+
this.activeId = foundIndex;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
else {
|
|
1285
|
+
const currentTab = tabsArray[this.activeId];
|
|
1286
|
+
this.router.navigate([], {
|
|
1287
|
+
relativeTo: this.route,
|
|
1288
|
+
fragment: currentTab.fragment,
|
|
1289
|
+
queryParamsHandling: 'preserve',
|
|
1290
|
+
replaceUrl: true
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
onTabChange(newIndex) {
|
|
1297
|
+
this.activeId = newIndex;
|
|
1298
|
+
if (!this.useFragment) {
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
const tabsArray = this.tabs.toArray();
|
|
1302
|
+
const selectedTab = tabsArray[newIndex];
|
|
1303
|
+
if (selectedTab && !selectedTab.disabled) {
|
|
1304
|
+
this.router.navigate([], {
|
|
1305
|
+
relativeTo: this.route,
|
|
1306
|
+
fragment: selectedTab.fragment,
|
|
1307
|
+
queryParamsHandling: 'preserve',
|
|
1308
|
+
replaceUrl: true
|
|
1309
|
+
});
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TabComponent, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1313
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: TabComponent, isStandalone: true, selector: "app-tab", inputs: { useFragment: "useFragment", title: "title", id: "id", basicDisplay: "basicDisplay" }, queries: [{ propertyName: "tabs", predicate: TabContentComponent }], ngImport: i0, template: "@if (!basicDisplay) {\r\n <div class=\"card\">\r\n @if (title) {\r\n <h2 class=\"card-header\">{{ title | translate }}</h2>\r\n }\r\n\r\n <div class=\"card-body p-0\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"activeId\" class=\"nav-tabs nav-tabs-card\"\r\n (activeIdChange)=\"onTabChange($event)\" appRwdTabs>\r\n @for (tab of tabs.toArray(); track tab; let i = $index) {\r\n <li [ngbNavItem]=\"i\" [disabled]=\"tab.disabled\">\r\n <a ngbNavLink [attr.data-test-ctw]=\"'link-tab-' + id + '-' + i\">\r\n {{ tab.title | translate }}\r\n </a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngTemplateOutlet=\"tab.templateRef\"></ng-container>\r\n </ng-template>\r\n </li>\r\n }\r\n\r\n <li ngbDropdown class=\"nav-item d-none\" placement=\"bottom-right\">\r\n <button (click)=\"false\" class=\"nav-link\" ngbDropdownToggle>\r\n {{ '_COMMON._ACTION.MORE' | translate }}\r\n </button>\r\n <ul ngbDropdownMenu placement=\"bottom right\"></ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"tab-content-card\"></div>\r\n}\r\n@else {\r\n @if (title) {\r\n <h2>{{ title | translate }}</h2>\r\n }\r\n\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"activeId\" class=\"nav-tabs\" (activeIdChange)=\"onTabChange($event)\" appRwdTabs>\r\n @for (tab of tabs.toArray(); track tab; let i = $index) {\r\n <li [ngbNavItem]=\"i\" [disabled]=\"tab.disabled\">\r\n <a ngbNavLink [attr.data-test-ctw]=\"'link-tab-' + i\">\r\n {{ tab.title | translate }}\r\n </a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngTemplateOutlet=\"tab.templateRef\"></ng-container>\r\n </ng-template>\r\n </li>\r\n }\r\n\r\n <li ngbDropdown class=\"nav-item d-none\" placement=\"bottom-right\">\r\n <button (click)=\"false\" class=\"nav-link\" ngbDropdownToggle>\r\n {{ '_COMMON._ACTION.MORE' | translate }}\r\n </button>\r\n <ul ngbDropdownMenu placement=\"bottom right\"></ul>\r\n </li>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"tab-content\"></div>\r\n}\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: NgbNavModule }, { kind: "directive", type: i2$1.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i2$1.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i2$1.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i2$1.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i2$1.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i2$1.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i2$1.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1314
|
+
}
|
|
1315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TabComponent, decorators: [{
|
|
1316
|
+
type: Component,
|
|
1317
|
+
args: [{ selector: 'app-tab', standalone: true, imports: [
|
|
1318
|
+
CommonModule,
|
|
1319
|
+
TranslateModule,
|
|
1320
|
+
NgbNavModule
|
|
1321
|
+
], template: "@if (!basicDisplay) {\r\n <div class=\"card\">\r\n @if (title) {\r\n <h2 class=\"card-header\">{{ title | translate }}</h2>\r\n }\r\n\r\n <div class=\"card-body p-0\">\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"activeId\" class=\"nav-tabs nav-tabs-card\"\r\n (activeIdChange)=\"onTabChange($event)\" appRwdTabs>\r\n @for (tab of tabs.toArray(); track tab; let i = $index) {\r\n <li [ngbNavItem]=\"i\" [disabled]=\"tab.disabled\">\r\n <a ngbNavLink [attr.data-test-ctw]=\"'link-tab-' + id + '-' + i\">\r\n {{ tab.title | translate }}\r\n </a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngTemplateOutlet=\"tab.templateRef\"></ng-container>\r\n </ng-template>\r\n </li>\r\n }\r\n\r\n <li ngbDropdown class=\"nav-item d-none\" placement=\"bottom-right\">\r\n <button (click)=\"false\" class=\"nav-link\" ngbDropdownToggle>\r\n {{ '_COMMON._ACTION.MORE' | translate }}\r\n </button>\r\n <ul ngbDropdownMenu placement=\"bottom right\"></ul>\r\n </li>\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"tab-content-card\"></div>\r\n}\r\n@else {\r\n @if (title) {\r\n <h2>{{ title | translate }}</h2>\r\n }\r\n\r\n <ul ngbNav #nav=\"ngbNav\" [(activeId)]=\"activeId\" class=\"nav-tabs\" (activeIdChange)=\"onTabChange($event)\" appRwdTabs>\r\n @for (tab of tabs.toArray(); track tab; let i = $index) {\r\n <li [ngbNavItem]=\"i\" [disabled]=\"tab.disabled\">\r\n <a ngbNavLink [attr.data-test-ctw]=\"'link-tab-' + i\">\r\n {{ tab.title | translate }}\r\n </a>\r\n <ng-template ngbNavContent>\r\n <ng-container *ngTemplateOutlet=\"tab.templateRef\"></ng-container>\r\n </ng-template>\r\n </li>\r\n }\r\n\r\n <li ngbDropdown class=\"nav-item d-none\" placement=\"bottom-right\">\r\n <button (click)=\"false\" class=\"nav-link\" ngbDropdownToggle>\r\n {{ '_COMMON._ACTION.MORE' | translate }}\r\n </button>\r\n <ul ngbDropdownMenu placement=\"bottom right\"></ul>\r\n </li>\r\n </ul>\r\n\r\n <div [ngbNavOutlet]=\"nav\" class=\"tab-content\"></div>\r\n}\r\n" }]
|
|
1322
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: i1.ActivatedRoute }], propDecorators: { useFragment: [{
|
|
1323
|
+
type: Input
|
|
1324
|
+
}], title: [{
|
|
1325
|
+
type: Input
|
|
1326
|
+
}], id: [{
|
|
1327
|
+
type: Input
|
|
1328
|
+
}], basicDisplay: [{
|
|
1329
|
+
type: Input
|
|
1330
|
+
}], tabs: [{
|
|
1331
|
+
type: ContentChildren,
|
|
1332
|
+
args: [TabContentComponent]
|
|
1333
|
+
}] } });
|
|
1334
|
+
|
|
1335
|
+
class DoubleScrollDirective {
|
|
1336
|
+
constructor(el, renderer) {
|
|
1337
|
+
this.el = el;
|
|
1338
|
+
this.renderer = renderer;
|
|
1339
|
+
}
|
|
1340
|
+
onResize() {
|
|
1341
|
+
this.adaptScrollWidth();
|
|
1342
|
+
}
|
|
1343
|
+
// Si scroll le tableau on scroll aussi div.table-responsive-double-scroll
|
|
1344
|
+
onScroll() {
|
|
1345
|
+
this.div.scrollLeft = this.el.nativeElement.scrollLeft;
|
|
1346
|
+
}
|
|
1347
|
+
ngOnInit() {
|
|
1348
|
+
// On applique un margin-top à 0 à la table.
|
|
1349
|
+
this.el.nativeElement.style.marginTop = '0';
|
|
1350
|
+
// On crée le div.table-responsive-double-scroll et on l'insère avant le tableau
|
|
1351
|
+
this.div = this.renderer.createElement('div');
|
|
1352
|
+
this.renderer.addClass(this.div, 'table-responsive-double-scroll');
|
|
1353
|
+
this.renderer.insertBefore(this.el.nativeElement.parentNode, this.div, this.el.nativeElement);
|
|
1354
|
+
// On crée le div.scroll et on l'insère dans le div.table-responsive-double-scroll
|
|
1355
|
+
this.scroll = this.renderer.createElement('div');
|
|
1356
|
+
this.renderer.addClass(this.scroll, 'scroll');
|
|
1357
|
+
this.renderer.appendChild(this.div, this.scroll);
|
|
1358
|
+
// Si on scroll div.table-responsive-double-scroll on scroll aussi le tableau
|
|
1359
|
+
this.div.addEventListener('scroll', function () {
|
|
1360
|
+
//this.nextSibling.scrollLeft = this.scrollLeft;
|
|
1361
|
+
this.nextSibling.style.transform = "translateX(-" + this.scrollLeft + "px)";
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
adaptScrollWidth() {
|
|
1365
|
+
// On donne à div.scroll la taille du tableau
|
|
1366
|
+
if (this.el.nativeElement.firstChild.offsetWidth > this.el.nativeElement.offsetWidth) {
|
|
1367
|
+
this.scroll.style.width = (this.el.nativeElement.firstChild.offsetWidth + 17) + 'px';
|
|
1368
|
+
}
|
|
1369
|
+
else {
|
|
1370
|
+
this.scroll.style.widdth = 'auto';
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
ngAfterViewChecked() {
|
|
1374
|
+
this.adaptScrollWidth();
|
|
1375
|
+
}
|
|
1376
|
+
ngOnDestroy() {
|
|
1377
|
+
this.div.removeEventListener('scroll', null);
|
|
1378
|
+
}
|
|
1379
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DoubleScrollDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1380
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.13", type: DoubleScrollDirective, isStandalone: true, selector: "[appDoubleScroll]", host: { listeners: { "window:resize": "onResize($event)", "scroll": "onScroll($event)" } }, ngImport: i0 }); }
|
|
1381
|
+
}
|
|
1382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: DoubleScrollDirective, decorators: [{
|
|
1383
|
+
type: Directive,
|
|
1384
|
+
args: [{
|
|
1385
|
+
selector: '[appDoubleScroll]'
|
|
1386
|
+
}]
|
|
1387
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { onResize: [{
|
|
1388
|
+
type: HostListener,
|
|
1389
|
+
args: ['window:resize', ['$event']]
|
|
1390
|
+
}], onScroll: [{
|
|
1391
|
+
type: HostListener,
|
|
1392
|
+
args: ['scroll', ['$event']]
|
|
1393
|
+
}] } });
|
|
1394
|
+
|
|
1395
|
+
var ActionOnTableType;
|
|
1396
|
+
(function (ActionOnTableType) {
|
|
1397
|
+
ActionOnTableType["add"] = "add";
|
|
1398
|
+
ActionOnTableType["exportPage"] = "exportPage";
|
|
1399
|
+
ActionOnTableType["exportAll"] = "exportAll";
|
|
1400
|
+
ActionOnTableType["custom1"] = "custom1";
|
|
1401
|
+
ActionOnTableType["custom2"] = "custom2";
|
|
1402
|
+
})(ActionOnTableType || (ActionOnTableType = {}));
|
|
1403
|
+
|
|
1404
|
+
class ActionsOnTableComponent {
|
|
1405
|
+
constructor() {
|
|
1406
|
+
this.actionOnTable = [];
|
|
1407
|
+
this.actionClick = new EventEmitter();
|
|
1408
|
+
this.actionOnTableAction = ActionOnTableType;
|
|
1409
|
+
}
|
|
1410
|
+
onActionClick(action) {
|
|
1411
|
+
this.actionClick.emit(action);
|
|
1412
|
+
}
|
|
1413
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ActionsOnTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1414
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: ActionsOnTableComponent, isStandalone: true, selector: "app-actions-on-table", inputs: { actionOnTable: "actionOnTable", customContent: "customContent" }, outputs: { actionClick: "actionClick" }, ngImport: i0, template: "<div class=\"actions-on-table\" *ngIf=\"actionOnTable?.length || customContent\">\r\n <div class=\"me-auto\">\r\n @if (customContent) {\r\n <ng-container [ngTemplateOutlet]=\"customContent\"></ng-container>\r\n }\r\n </div>\r\n <div class=\"btn-group\">\r\n @for (action of actionOnTable; track action) {\r\n @if (action.action === actionOnTableAction.add) {\r\n <a (click)=\"onActionClick(actionOnTableAction.add)\" href=\"javascript:void(0)\" class=\"btn btn-primary btn-min-width\">\r\n {{ '_COMMON._ACTION.ADD' | translate }}\r\n </a>\r\n }\r\n\r\n @if (action.action === actionOnTableAction.exportAll) {\r\n <div class=\"btn-group\" ngbDropdown placement=\"bottom-right\">\r\n <button class=\"btn btn-secondary btn-min-width\" id=\"dd-export\" ngbDropdownToggle>\r\n {{ '_COMMON._ACTION.EXPORT' | translate }}\r\n </button>\r\n <ul ngbDropdownMenu aria-labelledby=\"dd-export\">\r\n <li>\r\n <button class=\"dropdown-item\" (click)=\"onActionClick(actionOnTableAction.exportPage)\">\r\n {{ '_COMMON._TABLE.EXPORT_CURRENT' | translate }}\r\n </button>\r\n </li>\r\n <li>\r\n <button class=\"dropdown-item\" (click)=\"onActionClick(actionOnTableAction.exportAll)\">\r\n {{ '_COMMON._TABLE.EXPORT_ALL' | translate }}\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n }\r\n\r\n @if (action.action === actionOnTableAction.custom1) {\r\n <a (click)=\"onActionClick(actionOnTableAction.custom1)\" href=\"javascript:void(0)\" class=\"btn btn-min-width\"\r\n [ngClass]=\"'btn-' + action.type\">\r\n {{ action.label }}\r\n </a>\r\n }\r\n\r\n @if (action.action === actionOnTableAction.custom2) {\r\n <a (click)=\"onActionClick(actionOnTableAction.custom2)\" href=\"javascript:void(0)\" class=\"btn btn-min-width\"\r\n [ngClass]=\"'btn-' + action.type\">\r\n {{ action.label }}\r\n </a>\r\n }\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: NgbDropdownModule }, { kind: "directive", type: i2$1.NgbDropdown, selector: "[ngbDropdown]", inputs: ["autoClose", "dropdownClass", "open", "placement", "popperOptions", "container", "display"], outputs: ["openChange"], exportAs: ["ngbDropdown"] }, { kind: "directive", type: i2$1.NgbDropdownToggle, selector: "[ngbDropdownToggle]" }, { kind: "directive", type: i2$1.NgbDropdownMenu, selector: "[ngbDropdownMenu]" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1415
|
+
}
|
|
1416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ActionsOnTableComponent, decorators: [{
|
|
1417
|
+
type: Component,
|
|
1418
|
+
args: [{ selector: 'app-actions-on-table', standalone: true, imports: [
|
|
1419
|
+
TranslateModule,
|
|
1420
|
+
CommonModule,
|
|
1421
|
+
NgbDropdownModule
|
|
1422
|
+
], template: "<div class=\"actions-on-table\" *ngIf=\"actionOnTable?.length || customContent\">\r\n <div class=\"me-auto\">\r\n @if (customContent) {\r\n <ng-container [ngTemplateOutlet]=\"customContent\"></ng-container>\r\n }\r\n </div>\r\n <div class=\"btn-group\">\r\n @for (action of actionOnTable; track action) {\r\n @if (action.action === actionOnTableAction.add) {\r\n <a (click)=\"onActionClick(actionOnTableAction.add)\" href=\"javascript:void(0)\" class=\"btn btn-primary btn-min-width\">\r\n {{ '_COMMON._ACTION.ADD' | translate }}\r\n </a>\r\n }\r\n\r\n @if (action.action === actionOnTableAction.exportAll) {\r\n <div class=\"btn-group\" ngbDropdown placement=\"bottom-right\">\r\n <button class=\"btn btn-secondary btn-min-width\" id=\"dd-export\" ngbDropdownToggle>\r\n {{ '_COMMON._ACTION.EXPORT' | translate }}\r\n </button>\r\n <ul ngbDropdownMenu aria-labelledby=\"dd-export\">\r\n <li>\r\n <button class=\"dropdown-item\" (click)=\"onActionClick(actionOnTableAction.exportPage)\">\r\n {{ '_COMMON._TABLE.EXPORT_CURRENT' | translate }}\r\n </button>\r\n </li>\r\n <li>\r\n <button class=\"dropdown-item\" (click)=\"onActionClick(actionOnTableAction.exportAll)\">\r\n {{ '_COMMON._TABLE.EXPORT_ALL' | translate }}\r\n </button>\r\n </li>\r\n </ul>\r\n </div>\r\n }\r\n\r\n @if (action.action === actionOnTableAction.custom1) {\r\n <a (click)=\"onActionClick(actionOnTableAction.custom1)\" href=\"javascript:void(0)\" class=\"btn btn-min-width\"\r\n [ngClass]=\"'btn-' + action.type\">\r\n {{ action.label }}\r\n </a>\r\n }\r\n\r\n @if (action.action === actionOnTableAction.custom2) {\r\n <a (click)=\"onActionClick(actionOnTableAction.custom2)\" href=\"javascript:void(0)\" class=\"btn btn-min-width\"\r\n [ngClass]=\"'btn-' + action.type\">\r\n {{ action.label }}\r\n </a>\r\n }\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
1423
|
+
}], ctorParameters: () => [], propDecorators: { actionOnTable: [{
|
|
1424
|
+
type: Input
|
|
1425
|
+
}], customContent: [{
|
|
1426
|
+
type: Input
|
|
1427
|
+
}], actionClick: [{
|
|
1428
|
+
type: Output
|
|
1429
|
+
}] } });
|
|
1430
|
+
|
|
1431
|
+
class TableComponent {
|
|
1432
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1433
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: TableComponent, isStandalone: true, selector: "app-table", ngImport: i0, template: "<!-- <app-actions-on-table [actionOnTable]=\"actionOnTable\" (actionClick)=\"onActionClick($event)\"\r\n [customContent]=\"customActionsTemplate\"></app-actions-on-table> -->\r\n\r\n<!-- <div *ngIf=\"checkbox\" class=\"actions-on-table on-selection\">\r\n <div class=\"on-selection-info\"> -->\r\n <!-- If one selected item on the current page -->\r\n <!-- <span class=\"fw-bold\">1</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEM_CURRENT_PAGE' | translate }} -->\r\n\r\n <!-- If one selected item on all pages -->\r\n <!-- <span class=\"fw-bold\">1</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEM_ALL_PAGES' | translate }}\r\n <span class=\"fw-bold\">{{total}}</span> -->\r\n\r\n <!-- If several selected items on the current page -->\r\n <!-- <span class=\"fw-bold\">{{number}}</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEMS_CURRENT_PAGE' | translate }} -->\r\n\r\n <!-- If several selected items on all pages -->\r\n <!-- <span class=\"fw-bold\">{{number}}</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEMS_ALL_PAGES' | translate }}\r\n <span class=\"fw-bold\">{{total}}</span> -->\r\n <!-- </div>\r\n\r\n <button class=\"btn btn-secondary btn-min-width\" type=\"button\">\r\n {{ '_COMMON._TABLE._BULK_ACTION.EXPORT_SELECTION' | translate }}\r\n </button>\r\n <button class=\"btn btn-danger btn-min-width\" type=\"button\">\r\n {{ '_COMMON._TABLE._BULK_ACTION.DELETE_SELECTION' | translate }}\r\n </button>\r\n</div>\r\n\r\n<div class=\"table-responsive table-responsive-full-width mb-3\" appDoubleScroll>\r\n <table class=\"table table-bordered table-striped table-hover table-full-width\">\r\n <caption class=\"visually-hidden\" [innerHTML]=\"'_COMMON._TABLE.CAPTION' | translate: { label: title } \"></caption>\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"checkbox\" scope=\"col\" width=\"10\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"checkme\">\r\n <label class=\"form-label\" class=\"form-check-label\" for=\"checkme\">\r\n <span class=\"visually-hidden\">{{ '_COMMON._TABLE._THEAD.CHECK_LINE' | translate }}</span>\r\n </label>\r\n </div>\r\n </th>\r\n <ng-container *ngFor=\"let column of columns\">\r\n <th scope=\"col\" [ngClass]=\"{'p-0': column.sort}\">\r\n <button *ngIf=\"column.sort\" class=\"sorting-btn\"\r\n [ngClass]=\"getSortIcon(column.key)\"\r\n (click)=\"setSortProperty(column.key)\">\r\n {{column.label}}\r\n <span class=\"sorting-icons\">\r\n <span class=\"bo-icons bo-sort\"></span>\r\n </span>\r\n </button>\r\n <ng-container *ngIf=\"!column.sort\">\r\n {{ column.label }}\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n <tr *ngIf=\"filterForm\" [formGroup]=\"filterForm\" class=\"table-filter\">\r\n <th *ngIf=\"checkbox\"></th>\r\n <ng-container *ngFor=\"let column of columns\">\r\n <th>\r\n <app-form-field *ngIf=\"column.filter\" [type]=\"column.filter?.type\" [name]=\"column.key\" [control]=\"filterForm.get(column.key)\"\r\n [options]=\"column.filter?.options\" [inTableFilter]=\"true\" [cssClass]=\"filterForm.get(column.key).value ? 'has-value' : ''\"\r\n [placeholder]=\"'_COMMON._ACTION.FILTER_BY' | translate\"\r\n (clearFieldFilter)=\"filterForm.get(column.key).setValue('')\"></app-form-field>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr>\r\n <td colspan=\"100\"> -->\r\n <!-- <app-loader></app-loader> -->\r\n <!-- </td>\r\n </tr>\r\n <ng-container> -->\r\n <!-- <tr *ngIf=\"paginedResult && paginedResult.result?.length <= 0\">\r\n <td class=\"table-info no-result\" colspan=\"100\">\r\n {{ '_COMMON._TABLE.NO_RESULT' | translate }}\r\n </td>\r\n </tr> -->\r\n <!-- </ng-container>\r\n </tbody>\r\n\r\n @if (legend) {\r\n <tfoot>\r\n <tr>\r\n <td class=\"table-legend\" colspan=\"100\">\r\n <app-legend [legend]=\"legend\"></app-legend>\r\n </td>\r\n </tr>\r\n </tfoot>\r\n }\r\n </table>\r\n</div> -->\r\n\r\n<!-- <cw-xpagination *ngIf=\"paginedResult && paginedResult?.pagination.PageCount >= 0\"\r\n [pagination]=\"paginedResult?.pagination\" [pagesToShow]=\"pageToShow\" (goPage)=\"goToPage($event)\" (goNext)=\"onNext()\"\r\n (goPrev)=\"onPrev()\" (nbResultChange)=\"onNbResultChange($event)\">\r\n</cw-xpagination> -->\r\n", dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type:
|
|
1434
|
+
// XpaginationComponent,
|
|
1435
|
+
ReactiveFormsModule }] }); }
|
|
1436
|
+
}
|
|
1437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: TableComponent, decorators: [{
|
|
1438
|
+
type: Component,
|
|
1439
|
+
args: [{ selector: 'app-table', standalone: true, imports: [
|
|
1440
|
+
ActionsOnTableComponent,
|
|
1441
|
+
TranslateModule,
|
|
1442
|
+
FormsModule,
|
|
1443
|
+
CommonModule,
|
|
1444
|
+
// XpaginationComponent,
|
|
1445
|
+
ReactiveFormsModule,
|
|
1446
|
+
DoubleScrollDirective,
|
|
1447
|
+
LegendComponent,
|
|
1448
|
+
FormFieldComponent
|
|
1449
|
+
], template: "<!-- <app-actions-on-table [actionOnTable]=\"actionOnTable\" (actionClick)=\"onActionClick($event)\"\r\n [customContent]=\"customActionsTemplate\"></app-actions-on-table> -->\r\n\r\n<!-- <div *ngIf=\"checkbox\" class=\"actions-on-table on-selection\">\r\n <div class=\"on-selection-info\"> -->\r\n <!-- If one selected item on the current page -->\r\n <!-- <span class=\"fw-bold\">1</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEM_CURRENT_PAGE' | translate }} -->\r\n\r\n <!-- If one selected item on all pages -->\r\n <!-- <span class=\"fw-bold\">1</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEM_ALL_PAGES' | translate }}\r\n <span class=\"fw-bold\">{{total}}</span> -->\r\n\r\n <!-- If several selected items on the current page -->\r\n <!-- <span class=\"fw-bold\">{{number}}</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEMS_CURRENT_PAGE' | translate }} -->\r\n\r\n <!-- If several selected items on all pages -->\r\n <!-- <span class=\"fw-bold\">{{number}}</span>\r\n {{ '_COMMON._TABLE._BULK_ACTION.SELECTED_ITEMS_ALL_PAGES' | translate }}\r\n <span class=\"fw-bold\">{{total}}</span> -->\r\n <!-- </div>\r\n\r\n <button class=\"btn btn-secondary btn-min-width\" type=\"button\">\r\n {{ '_COMMON._TABLE._BULK_ACTION.EXPORT_SELECTION' | translate }}\r\n </button>\r\n <button class=\"btn btn-danger btn-min-width\" type=\"button\">\r\n {{ '_COMMON._TABLE._BULK_ACTION.DELETE_SELECTION' | translate }}\r\n </button>\r\n</div>\r\n\r\n<div class=\"table-responsive table-responsive-full-width mb-3\" appDoubleScroll>\r\n <table class=\"table table-bordered table-striped table-hover table-full-width\">\r\n <caption class=\"visually-hidden\" [innerHTML]=\"'_COMMON._TABLE.CAPTION' | translate: { label: title } \"></caption>\r\n <thead>\r\n <tr>\r\n <th *ngIf=\"checkbox\" scope=\"col\" width=\"10\">\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input\" type=\"checkbox\" id=\"checkme\">\r\n <label class=\"form-label\" class=\"form-check-label\" for=\"checkme\">\r\n <span class=\"visually-hidden\">{{ '_COMMON._TABLE._THEAD.CHECK_LINE' | translate }}</span>\r\n </label>\r\n </div>\r\n </th>\r\n <ng-container *ngFor=\"let column of columns\">\r\n <th scope=\"col\" [ngClass]=\"{'p-0': column.sort}\">\r\n <button *ngIf=\"column.sort\" class=\"sorting-btn\"\r\n [ngClass]=\"getSortIcon(column.key)\"\r\n (click)=\"setSortProperty(column.key)\">\r\n {{column.label}}\r\n <span class=\"sorting-icons\">\r\n <span class=\"bo-icons bo-sort\"></span>\r\n </span>\r\n </button>\r\n <ng-container *ngIf=\"!column.sort\">\r\n {{ column.label }}\r\n </ng-container>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n <tr *ngIf=\"filterForm\" [formGroup]=\"filterForm\" class=\"table-filter\">\r\n <th *ngIf=\"checkbox\"></th>\r\n <ng-container *ngFor=\"let column of columns\">\r\n <th>\r\n <app-form-field *ngIf=\"column.filter\" [type]=\"column.filter?.type\" [name]=\"column.key\" [control]=\"filterForm.get(column.key)\"\r\n [options]=\"column.filter?.options\" [inTableFilter]=\"true\" [cssClass]=\"filterForm.get(column.key).value ? 'has-value' : ''\"\r\n [placeholder]=\"'_COMMON._ACTION.FILTER_BY' | translate\"\r\n (clearFieldFilter)=\"filterForm.get(column.key).setValue('')\"></app-form-field>\r\n </th>\r\n </ng-container>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr>\r\n <td colspan=\"100\"> -->\r\n <!-- <app-loader></app-loader> -->\r\n <!-- </td>\r\n </tr>\r\n <ng-container> -->\r\n <!-- <tr *ngIf=\"paginedResult && paginedResult.result?.length <= 0\">\r\n <td class=\"table-info no-result\" colspan=\"100\">\r\n {{ '_COMMON._TABLE.NO_RESULT' | translate }}\r\n </td>\r\n </tr> -->\r\n <!-- </ng-container>\r\n </tbody>\r\n\r\n @if (legend) {\r\n <tfoot>\r\n <tr>\r\n <td class=\"table-legend\" colspan=\"100\">\r\n <app-legend [legend]=\"legend\"></app-legend>\r\n </td>\r\n </tr>\r\n </tfoot>\r\n }\r\n </table>\r\n</div> -->\r\n\r\n<!-- <cw-xpagination *ngIf=\"paginedResult && paginedResult?.pagination.PageCount >= 0\"\r\n [pagination]=\"paginedResult?.pagination\" [pagesToShow]=\"pageToShow\" (goPage)=\"goToPage($event)\" (goNext)=\"onNext()\"\r\n (goPrev)=\"onPrev()\" (nbResultChange)=\"onNbResultChange($event)\">\r\n</cw-xpagination> -->\r\n" }]
|
|
1450
|
+
}] });
|
|
1451
|
+
|
|
1452
|
+
class WizardStepComponent {
|
|
1453
|
+
constructor() {
|
|
1454
|
+
this.completed = false;
|
|
1455
|
+
}
|
|
1456
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: WizardStepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1457
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.13", type: WizardStepComponent, isStandalone: true, selector: "app-wizard-step", inputs: { title: "title", completed: "completed" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: '<ng-template #content><ng-content></ng-content></ng-template>', isInline: true }); }
|
|
1458
|
+
}
|
|
1459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: WizardStepComponent, decorators: [{
|
|
1460
|
+
type: Component,
|
|
1461
|
+
args: [{
|
|
1462
|
+
selector: 'app-wizard-step',
|
|
1463
|
+
template: '<ng-template #content><ng-content></ng-content></ng-template>',
|
|
1464
|
+
standalone: true
|
|
1465
|
+
}]
|
|
1466
|
+
}], propDecorators: { title: [{
|
|
1467
|
+
type: Input
|
|
1468
|
+
}], completed: [{
|
|
1469
|
+
type: Input
|
|
1470
|
+
}], templateRef: [{
|
|
1471
|
+
type: ViewChild,
|
|
1472
|
+
args: ['content', { static: true }]
|
|
1473
|
+
}] } });
|
|
1474
|
+
|
|
1475
|
+
class WizardStepperComponent {
|
|
1476
|
+
constructor() {
|
|
1477
|
+
this.stepChange = new EventEmitter();
|
|
1478
|
+
this.stepNext = new EventEmitter();
|
|
1479
|
+
this.stepPrevious = new EventEmitter();
|
|
1480
|
+
this.stepEnd = new EventEmitter();
|
|
1481
|
+
this.selectedIndex = 0;
|
|
1482
|
+
}
|
|
1483
|
+
get stepList() {
|
|
1484
|
+
return this.steps.toArray();
|
|
1485
|
+
}
|
|
1486
|
+
goToStep(index) {
|
|
1487
|
+
if (index < 0 || index >= this.steps.length)
|
|
1488
|
+
return;
|
|
1489
|
+
// Vérifier que toutes les étapes précédentes sont complétées
|
|
1490
|
+
for (let i = 0; i < index; i++) {
|
|
1491
|
+
if (!this.steps.toArray()[i].completed) {
|
|
1492
|
+
return; // Empêche d'aller à cette étape si une étape précédente n'est pas validée
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
this.selectedIndex = index;
|
|
1496
|
+
this.stepChange.emit(this.selectedIndex);
|
|
1497
|
+
}
|
|
1498
|
+
nextStep() {
|
|
1499
|
+
if (this.selectedIndex < this.steps.length - 1) {
|
|
1500
|
+
const currentStep = this.steps.toArray()[this.selectedIndex];
|
|
1501
|
+
if (!currentStep.completed) {
|
|
1502
|
+
// Si l'étape courante n'est pas validée, on bloque
|
|
1503
|
+
return;
|
|
1504
|
+
}
|
|
1505
|
+
this.selectedIndex++;
|
|
1506
|
+
this.stepNext.emit(this.selectedIndex);
|
|
1507
|
+
this.stepChange.emit(this.selectedIndex);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
previousStep() {
|
|
1511
|
+
if (this.selectedIndex > 0) {
|
|
1512
|
+
this.selectedIndex--;
|
|
1513
|
+
this.stepPrevious.emit(this.selectedIndex);
|
|
1514
|
+
this.stepChange.emit(this.selectedIndex);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
endWizard() {
|
|
1518
|
+
if (this.selectedIndex > 0) {
|
|
1519
|
+
this.stepEnd.emit(this.selectedIndex);
|
|
1520
|
+
this.stepChange.emit(this.selectedIndex);
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: WizardStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1524
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.13", type: WizardStepperComponent, isStandalone: true, selector: "app-wizard-stepper", outputs: { stepChange: "stepChange", stepNext: "stepNext", stepPrevious: "stepPrevious", stepEnd: "stepEnd" }, queries: [{ propertyName: "steps", predicate: WizardStepComponent }], ngImport: i0, template: "<nav>\r\n <ul class=\"list-inline step-list\">\r\n @for (step of steps.toArray(); track step; let i = $index) {\r\n <li class=\"list-inline-item step-item\">\r\n <button class=\"btn step-button\" [ngClass]=\"{\r\n 'step-active': selectedIndex === i,\r\n 'step-completed': step.completed,\r\n 'step-current': selectedIndex === i && step.completed === false\r\n }\" [disabled]=\"(i > 0 && !steps.toArray()[i - 1]?.completed)\" (click)=\"goToStep(i)\" type=\"button\">\r\n <span class=\"step-indicator bo-icons bo-alert-success\" aria-hidden=\"true\"></span>\r\n <span class=\"step-label\">\r\n {{ step.title || ('_COMMON._STEPPER.STEP' | translate) + (i + 1) }}\r\n </span>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n</nav>\r\n\r\n@for (step of steps.toArray(); track step; let i = $index) {\r\n <section class=\"tab-pane\" [class.active]=\"selectedIndex === i\" [hidden]=\"selectedIndex !== i\" role=\"tabpanel\">\r\n <ng-container *ngTemplateOutlet=\"step.templateRef\"></ng-container>\r\n </section>\r\n}\r\n\r\n<div class=\"text-center mt-5\">\r\n <div class=\"btn-group\">\r\n <button class=\"btn btn-secondary btn-min-width\" (click)=\"previousStep()\" [disabled]=\"selectedIndex === 0\"\r\n type=\"button\">\r\n {{ '_COMMON._STEPPER.PREVIOUS_STEP' | translate }}\r\n </button>\r\n\r\n @if (selectedIndex !== steps.length - 1) {\r\n <button class=\"btn btn-primary btn-min-width\" (click)=\"nextStep()\"\r\n [disabled]=\"!steps.toArray()[selectedIndex]?.completed\" type=\"button\">\r\n {{ '_COMMON._STEPPER.NEXT_STEP' | translate }}\r\n </button>\r\n }\r\n @else {\r\n <button class=\"btn btn-primary btn-min-width\" (click)=\"endWizard()\" type=\"button\">\r\n {{ '_COMMON._ACTION.END' | translate }}\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
|
|
1525
|
+
}
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: WizardStepperComponent, decorators: [{
|
|
1527
|
+
type: Component,
|
|
1528
|
+
args: [{ selector: 'app-wizard-stepper', standalone: true, imports: [
|
|
1529
|
+
CommonModule,
|
|
1530
|
+
TranslateModule
|
|
1531
|
+
], template: "<nav>\r\n <ul class=\"list-inline step-list\">\r\n @for (step of steps.toArray(); track step; let i = $index) {\r\n <li class=\"list-inline-item step-item\">\r\n <button class=\"btn step-button\" [ngClass]=\"{\r\n 'step-active': selectedIndex === i,\r\n 'step-completed': step.completed,\r\n 'step-current': selectedIndex === i && step.completed === false\r\n }\" [disabled]=\"(i > 0 && !steps.toArray()[i - 1]?.completed)\" (click)=\"goToStep(i)\" type=\"button\">\r\n <span class=\"step-indicator bo-icons bo-alert-success\" aria-hidden=\"true\"></span>\r\n <span class=\"step-label\">\r\n {{ step.title || ('_COMMON._STEPPER.STEP' | translate) + (i + 1) }}\r\n </span>\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n</nav>\r\n\r\n@for (step of steps.toArray(); track step; let i = $index) {\r\n <section class=\"tab-pane\" [class.active]=\"selectedIndex === i\" [hidden]=\"selectedIndex !== i\" role=\"tabpanel\">\r\n <ng-container *ngTemplateOutlet=\"step.templateRef\"></ng-container>\r\n </section>\r\n}\r\n\r\n<div class=\"text-center mt-5\">\r\n <div class=\"btn-group\">\r\n <button class=\"btn btn-secondary btn-min-width\" (click)=\"previousStep()\" [disabled]=\"selectedIndex === 0\"\r\n type=\"button\">\r\n {{ '_COMMON._STEPPER.PREVIOUS_STEP' | translate }}\r\n </button>\r\n\r\n @if (selectedIndex !== steps.length - 1) {\r\n <button class=\"btn btn-primary btn-min-width\" (click)=\"nextStep()\"\r\n [disabled]=\"!steps.toArray()[selectedIndex]?.completed\" type=\"button\">\r\n {{ '_COMMON._STEPPER.NEXT_STEP' | translate }}\r\n </button>\r\n }\r\n @else {\r\n <button class=\"btn btn-primary btn-min-width\" (click)=\"endWizard()\" type=\"button\">\r\n {{ '_COMMON._ACTION.END' | translate }}\r\n </button>\r\n }\r\n </div>\r\n</div>\r\n" }]
|
|
1532
|
+
}], propDecorators: { steps: [{
|
|
1533
|
+
type: ContentChildren,
|
|
1534
|
+
args: [WizardStepComponent]
|
|
1535
|
+
}], stepChange: [{
|
|
1536
|
+
type: Output
|
|
1537
|
+
}], stepNext: [{
|
|
1538
|
+
type: Output
|
|
1539
|
+
}], stepPrevious: [{
|
|
1540
|
+
type: Output
|
|
1541
|
+
}], stepEnd: [{
|
|
1542
|
+
type: Output
|
|
1543
|
+
}] } });
|
|
1544
|
+
|
|
1545
|
+
class ModalsService {
|
|
1546
|
+
constructor(modalService) {
|
|
1547
|
+
this.modalService = modalService;
|
|
1548
|
+
}
|
|
1549
|
+
openModal(type, config, sizeOverride) {
|
|
1550
|
+
const size = sizeOverride ?? this.getModalSizeByType(type);
|
|
1551
|
+
const modalRef = this.modalService.open(ModalsComponent, {
|
|
1552
|
+
centered: true,
|
|
1553
|
+
size,
|
|
1554
|
+
backdrop: type === ModalsType.loader ? 'static' : true,
|
|
1555
|
+
ariaLabelledBy: 'modal-basic-title',
|
|
1556
|
+
keyboard: type !== ModalsType.loader,
|
|
1557
|
+
windowClass: type === ModalsType.quickSideView ? 'quick-view-modal' : null,
|
|
1558
|
+
scrollable: type === ModalsType.quickSideView
|
|
1559
|
+
});
|
|
1560
|
+
modalRef.componentInstance.type = type;
|
|
1561
|
+
if (config) {
|
|
1562
|
+
Object.assign(modalRef.componentInstance, config);
|
|
1563
|
+
}
|
|
1564
|
+
return modalRef;
|
|
1565
|
+
}
|
|
1566
|
+
getModalSizeByType(type) {
|
|
1567
|
+
switch (type) {
|
|
1568
|
+
case ModalsType.loader:
|
|
1569
|
+
return 'sm';
|
|
1570
|
+
case ModalsType.delete:
|
|
1571
|
+
return 'md';
|
|
1572
|
+
case ModalsType.quickSideView:
|
|
1573
|
+
return 'lg';
|
|
1574
|
+
default:
|
|
1575
|
+
return 'md';
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ModalsService, deps: [{ token: i2$1.NgbModal }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1579
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ModalsService, providedIn: 'root' }); }
|
|
1580
|
+
}
|
|
1581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.13", ngImport: i0, type: ModalsService, decorators: [{
|
|
1582
|
+
type: Injectable,
|
|
1583
|
+
args: [{ providedIn: 'root' }]
|
|
1584
|
+
}], ctorParameters: () => [{ type: i2$1.NgbModal }] });
|
|
1585
|
+
|
|
1586
|
+
/*
|
|
1587
|
+
* Public API Surface of bo-ui
|
|
1588
|
+
*/
|
|
1589
|
+
// LIB UI
|
|
1590
|
+
//---------------------------------------------------------
|
|
1591
|
+
// Layout
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* Generated bundle index. Do not edit.
|
|
1595
|
+
*/
|
|
1596
|
+
|
|
1597
|
+
export { AccordionsComponent, AccordionsContentComponent, ActionOnTableType, AdminLayoutComponent, AlertComponent, BadgeComponent, ButtonComponent, CardComponent, CustomListComponent, DragNDropListComponent, FooterComponent, FormFieldComponent, FormFieldTypeEnum, HeaderComponent, IconComponent, LegendComponent, LegendTypeEnum, LoaderComponent, MenuComponent, ModalsComponent, ModalsService, ModalsType, SidebarComponent, SkipLinksComponent, TabComponent, TabContentComponent, TableComponent, TitleBreadcrumbComponent, UiTypeEnum, WizardStepComponent, WizardStepperComponent, rangeValidator };
|
|
1598
|
+
//# sourceMappingURL=cityway-bo-ui.mjs.map
|