@ecodev/natural 52.0.0 → 53.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/classes/providers.mjs +13 -0
- package/esm2022/lib/directives/http-prefix.directive.mjs +3 -2
- package/esm2022/lib/modules/alert/confirm.component.mjs +5 -4
- package/esm2022/lib/modules/alert/public-api.mjs +1 -2
- package/esm2022/lib/modules/avatar/component/avatar.component.mjs +8 -8
- package/esm2022/lib/modules/avatar/public-api.mjs +1 -2
- package/esm2022/lib/modules/avatar/service/avatar.service.mjs +1 -1
- package/esm2022/lib/modules/columns-picker/columns-picker.component.mjs +29 -11
- package/esm2022/lib/modules/columns-picker/public-api.mjs +1 -2
- package/esm2022/lib/modules/common/directives/linkable-tab.directive.mjs +3 -2
- package/esm2022/lib/modules/common/directives/src-density.directive.mjs +3 -2
- package/esm2022/lib/modules/common/pipes/capitalize.pipe.mjs +6 -3
- package/esm2022/lib/modules/common/pipes/ellipsis.pipe.mjs +6 -3
- package/esm2022/lib/modules/common/pipes/enum.pipe.mjs +3 -2
- package/esm2022/lib/modules/common/pipes/swiss-date.pipe.mjs +3 -2
- package/esm2022/lib/modules/common/pipes/time-ago.pipe.mjs +3 -2
- package/esm2022/lib/modules/common/public-api.mjs +2 -2
- package/esm2022/lib/modules/common/services/seo.provider.mjs +23 -0
- package/esm2022/lib/modules/detail-header/detail-header.component.mjs +10 -8
- package/esm2022/lib/modules/detail-header/public-api.mjs +1 -2
- package/esm2022/lib/modules/dialog-trigger/dialog-trigger.component.mjs +3 -2
- package/esm2022/lib/modules/dialog-trigger/public-api.mjs +1 -2
- package/esm2022/lib/modules/dropdown-components/public-api.mjs +1 -2
- package/esm2022/lib/modules/dropdown-components/type-date/type-date.component.mjs +27 -11
- package/esm2022/lib/modules/dropdown-components/type-date-range/type-date-range.component.mjs +12 -9
- package/esm2022/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.mjs +22 -9
- package/esm2022/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.mjs +22 -9
- package/esm2022/lib/modules/dropdown-components/type-number/type-number.component.mjs +23 -10
- package/esm2022/lib/modules/dropdown-components/type-select/type-select.component.mjs +23 -11
- package/esm2022/lib/modules/dropdown-components/type-text/type-text.component.mjs +10 -8
- package/esm2022/lib/modules/file/component/file.component.mjs +22 -13
- package/esm2022/lib/modules/file/file-drop.directive.mjs +3 -2
- package/esm2022/lib/modules/file/file-select.directive.mjs +3 -2
- package/esm2022/lib/modules/file/public-api.mjs +1 -2
- package/esm2022/lib/modules/fixed-button/fixed-button.component.mjs +9 -7
- package/esm2022/lib/modules/fixed-button/public-api.mjs +1 -2
- package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.component.mjs +7 -6
- package/esm2022/lib/modules/fixed-button-detail/public-api.mjs +1 -2
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.mjs +29 -12
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.service.mjs +4 -3
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.mjs +6 -5
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.service.mjs +4 -3
- package/esm2022/lib/modules/hierarchic-selector/public-api.mjs +1 -2
- package/esm2022/lib/modules/icon/icon.directive.mjs +9 -6
- package/esm2022/lib/modules/icon/icon.module.mjs +31 -41
- package/esm2022/lib/modules/icon/public-api.mjs +2 -2
- package/esm2022/lib/modules/logger/error-handler.mjs +3 -3
- package/esm2022/lib/modules/logger/error.module.mjs +14 -28
- package/esm2022/lib/modules/logger/public-api.mjs +2 -2
- package/esm2022/lib/modules/matomo/public-api.mjs +1 -2
- package/esm2022/lib/modules/panels/panels.component.mjs +3 -3
- package/esm2022/lib/modules/panels/panels.module.mjs +8 -31
- package/esm2022/lib/modules/panels/public-api.mjs +2 -2
- package/esm2022/lib/modules/relations/public-api.mjs +1 -2
- package/esm2022/lib/modules/relations/relations.component.mjs +27 -11
- package/esm2022/lib/modules/search/dropdown-container/dropdown-container.component.mjs +7 -6
- package/esm2022/lib/modules/search/facet-selector/facet-selector.component.mjs +6 -5
- package/esm2022/lib/modules/search/group/group.component.mjs +5 -5
- package/esm2022/lib/modules/search/input/input.component.mjs +27 -13
- package/esm2022/lib/modules/search/public-api.mjs +1 -2
- package/esm2022/lib/modules/search/search/search.component.mjs +23 -8
- package/esm2022/lib/modules/select/public-api.mjs +1 -2
- package/esm2022/lib/modules/select/select/select.component.mjs +40 -15
- package/esm2022/lib/modules/select/select-enum/select-enum.component.mjs +22 -8
- package/esm2022/lib/modules/select/select-hierarchic/select-hierarchic.component.mjs +27 -10
- package/esm2022/lib/modules/sidenav/public-api.mjs +1 -2
- package/esm2022/lib/modules/sidenav/sidenav/sidenav.component.mjs +3 -2
- package/esm2022/lib/modules/sidenav/sidenav-container/sidenav-container.component.mjs +6 -6
- package/esm2022/lib/modules/sidenav/sidenav-content/sidenav-content.component.mjs +3 -3
- package/esm2022/lib/modules/stamp/public-api.mjs +1 -2
- package/esm2022/lib/modules/stamp/stamp.component.mjs +6 -6
- package/esm2022/lib/modules/table-button/public-api.mjs +1 -2
- package/esm2022/lib/modules/table-button/table-button.component.mjs +10 -8
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ecodev-natural.mjs +977 -1339
- package/fesm2022/ecodev-natural.mjs.map +1 -1
- package/lib/classes/providers.d.ts +5 -0
- package/lib/directives/http-prefix.directive.d.ts +1 -1
- package/lib/modules/alert/confirm.component.d.ts +1 -1
- package/lib/modules/alert/public-api.d.ts +0 -1
- package/lib/modules/avatar/component/avatar.component.d.ts +3 -3
- package/lib/modules/avatar/public-api.d.ts +0 -1
- package/lib/modules/avatar/service/avatar.service.d.ts +2 -2
- package/lib/modules/columns-picker/columns-picker.component.d.ts +1 -1
- package/lib/modules/columns-picker/public-api.d.ts +0 -1
- package/lib/modules/common/directives/linkable-tab.directive.d.ts +1 -1
- package/lib/modules/common/directives/src-density.directive.d.ts +1 -1
- package/lib/modules/common/pipes/capitalize.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/ellipsis.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/enum.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/swiss-date.pipe.d.ts +1 -1
- package/lib/modules/common/pipes/time-ago.pipe.d.ts +1 -1
- package/lib/modules/common/public-api.d.ts +1 -1
- package/lib/modules/common/services/seo.provider.d.ts +6 -0
- package/lib/modules/detail-header/detail-header.component.d.ts +1 -1
- package/lib/modules/detail-header/public-api.d.ts +0 -1
- package/lib/modules/dialog-trigger/dialog-trigger.component.d.ts +1 -1
- package/lib/modules/dialog-trigger/public-api.d.ts +0 -1
- package/lib/modules/dropdown-components/public-api.d.ts +0 -1
- package/lib/modules/dropdown-components/type-date/type-date.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-date-range/type-date-range.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-hierarchic-selector/type-hierarchic-selector.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-natural-select/type-natural-select.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-number/type-number.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-select/type-select.component.d.ts +1 -1
- package/lib/modules/dropdown-components/type-text/type-text.component.d.ts +1 -1
- package/lib/modules/file/component/file.component.d.ts +3 -3
- package/lib/modules/file/file-drop.directive.d.ts +1 -1
- package/lib/modules/file/file-select.directive.d.ts +1 -1
- package/lib/modules/file/public-api.d.ts +0 -1
- package/lib/modules/fixed-button/fixed-button.component.d.ts +1 -1
- package/lib/modules/fixed-button/public-api.d.ts +0 -1
- package/lib/modules/fixed-button-detail/fixed-button-detail.component.d.ts +1 -1
- package/lib/modules/fixed-button-detail/public-api.d.ts +0 -1
- package/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.d.ts +1 -1
- package/lib/modules/hierarchic-selector/hierarchic-selector-dialog/hierarchic-selector-dialog.component.d.ts +1 -1
- package/lib/modules/hierarchic-selector/public-api.d.ts +0 -1
- package/lib/modules/icon/icon.directive.d.ts +3 -3
- package/lib/modules/icon/icon.module.d.ts +5 -13
- package/lib/modules/icon/public-api.d.ts +1 -1
- package/lib/modules/logger/error-handler.d.ts +2 -2
- package/lib/modules/logger/error.module.d.ts +2 -9
- package/lib/modules/logger/public-api.d.ts +1 -1
- package/lib/modules/matomo/public-api.d.ts +0 -1
- package/lib/modules/panels/panels.component.d.ts +1 -2
- package/lib/modules/panels/panels.module.d.ts +2 -12
- package/lib/modules/panels/public-api.d.ts +1 -1
- package/lib/modules/relations/public-api.d.ts +0 -1
- package/lib/modules/relations/relations.component.d.ts +1 -1
- package/lib/modules/search/dropdown-container/dropdown-container.component.d.ts +1 -1
- package/lib/modules/search/facet-selector/facet-selector.component.d.ts +1 -1
- package/lib/modules/search/group/group.component.d.ts +1 -1
- package/lib/modules/search/input/input.component.d.ts +1 -1
- package/lib/modules/search/public-api.d.ts +0 -1
- package/lib/modules/search/search/search.component.d.ts +1 -1
- package/lib/modules/select/public-api.d.ts +0 -1
- package/lib/modules/select/select/select.component.d.ts +1 -1
- package/lib/modules/select/select-enum/select-enum.component.d.ts +1 -1
- package/lib/modules/select/select-hierarchic/select-hierarchic.component.d.ts +1 -1
- package/lib/modules/sidenav/public-api.d.ts +0 -1
- package/lib/modules/sidenav/sidenav/sidenav.component.d.ts +1 -1
- package/lib/modules/sidenav/sidenav-container/sidenav-container.component.d.ts +1 -1
- package/lib/modules/sidenav/sidenav-content/sidenav-content.component.d.ts +1 -1
- package/lib/modules/stamp/public-api.d.ts +0 -1
- package/lib/modules/stamp/stamp.component.d.ts +1 -1
- package/lib/modules/table-button/public-api.d.ts +0 -1
- package/lib/modules/table-button/table-button.component.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/esm2022/lib/modules/alert/alert.module.mjs +0 -20
- package/esm2022/lib/modules/avatar/avatar.module.mjs +0 -19
- package/esm2022/lib/modules/columns-picker/columns-picker.module.mjs +0 -48
- package/esm2022/lib/modules/common/common-module.mjs +0 -54
- package/esm2022/lib/modules/detail-header/detail-header.module.mjs +0 -22
- package/esm2022/lib/modules/dialog-trigger/dialog-trigger.module.mjs +0 -19
- package/esm2022/lib/modules/dropdown-components/natural-dropdown-components.module.mjs +0 -90
- package/esm2022/lib/modules/file/file.module.mjs +0 -25
- package/esm2022/lib/modules/fixed-button/fixed-button.module.mjs +0 -22
- package/esm2022/lib/modules/fixed-button-detail/fixed-button-detail.module.mjs +0 -20
- package/esm2022/lib/modules/hierarchic-selector/hierarchic-selector.module.mjs +0 -79
- package/esm2022/lib/modules/matomo/matomo-module.module.mjs +0 -12
- package/esm2022/lib/modules/relations/relations.module.mjs +0 -60
- package/esm2022/lib/modules/search/search.module.mjs +0 -90
- package/esm2022/lib/modules/select/select.module.mjs +0 -70
- package/esm2022/lib/modules/sidenav/sidenav.module.mjs +0 -25
- package/esm2022/lib/modules/stamp/stamp-module.module.mjs +0 -20
- package/esm2022/lib/modules/table-button/table-button.module.mjs +0 -22
- package/lib/modules/alert/alert.module.d.ts +0 -11
- package/lib/modules/avatar/avatar.module.d.ts +0 -8
- package/lib/modules/columns-picker/columns-picker.module.d.ts +0 -15
- package/lib/modules/common/common-module.d.ts +0 -18
- package/lib/modules/detail-header/detail-header.module.d.ts +0 -12
- package/lib/modules/dialog-trigger/dialog-trigger.module.d.ts +0 -9
- package/lib/modules/dropdown-components/natural-dropdown-components.module.d.ts +0 -24
- package/lib/modules/file/file.module.d.ts +0 -14
- package/lib/modules/fixed-button/fixed-button.module.d.ts +0 -12
- package/lib/modules/fixed-button-detail/fixed-button-detail.module.d.ts +0 -10
- package/lib/modules/hierarchic-selector/hierarchic-selector.module.d.ts +0 -23
- package/lib/modules/matomo/matomo-module.module.d.ts +0 -6
- package/lib/modules/relations/relations.module.d.ts +0 -18
- package/lib/modules/search/search.module.d.ts +0 -23
- package/lib/modules/select/select.module.d.ts +0 -22
- package/lib/modules/sidenav/sidenav.module.d.ts +0 -13
- package/lib/modules/stamp/stamp-module.module.d.ts +0 -9
- package/lib/modules/table-button/table-button.module.d.ts +0 -12
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
import '@angular/localize/init';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Directive, Component, Inject, Injectable, HostBinding, HostListener, inject, InjectionToken, TemplateRef, ViewEncapsulation, ViewChild, Injector, Optional, Input,
|
|
3
|
+
import { Directive, Component, Inject, Injectable, HostBinding, HostListener, inject, InjectionToken, TemplateRef, ViewEncapsulation, ViewChild, Injector, Optional, Input, Host, Self, EventEmitter, Output, Pipe, APP_INITIALIZER, ContentChild, createEnvironmentInjector, createComponent, runInInjectionContext, PLATFORM_ID, ErrorHandler, importProvidersFrom } from '@angular/core';
|
|
4
4
|
import { Subject, BehaviorSubject, of, timer, switchMap as switchMap$1, endWith, last, EMPTY, merge as merge$1, Observable, first as first$1, combineLatest, catchError, from, ReplaySubject, debounceTime as debounceTime$1, raceWith, take as take$1, mergeMap, shareReplay as shareReplay$1, forkJoin, map as map$1, tap as tap$1, asyncScheduler } from 'rxjs';
|
|
5
|
-
import * as
|
|
6
|
-
import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, FormControl,
|
|
7
|
-
import * as i2$
|
|
8
|
-
import { Router, ActivatedRoute, NavigationStart, NavigationEnd, PRIMARY_OUTLET,
|
|
5
|
+
import * as i2$3 from '@angular/forms';
|
|
6
|
+
import { FormGroup, FormArray, Validators, UntypedFormGroup, UntypedFormArray, FormControl, FormsModule, ReactiveFormsModule, UntypedFormControl, FormControlDirective, FormControlName } from '@angular/forms';
|
|
7
|
+
import * as i2$4 from '@angular/router';
|
|
8
|
+
import { Router, ActivatedRoute, NavigationStart, NavigationEnd, PRIMARY_OUTLET, RouterLink, NavigationError, DefaultUrlSerializer } from '@angular/router';
|
|
9
9
|
import { merge, isArray, pickBy, isEmpty, cloneDeep, uniq, groupBy, mergeWith, defaultsDeep, omit, kebabCase, clone, pick, isEqual, defaults, isObject, intersection, flatten, differenceWith } from 'lodash-es';
|
|
10
10
|
import * as i1 from '@angular/material/dialog';
|
|
11
11
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
12
|
-
import * as
|
|
12
|
+
import * as i2 from '@angular/material/button';
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
|
-
import * as i2 from '@angular/material/snack-bar';
|
|
14
|
+
import * as i2$1 from '@angular/material/snack-bar';
|
|
15
15
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
16
16
|
import { switchMap, first, map, filter, finalize, takeUntil, take, tap, takeWhile, debounceTime, shareReplay, startWith, distinctUntilChanged, throttleTime } from 'rxjs/operators';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i3$5 from '@angular/material/table';
|
|
18
18
|
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
19
19
|
import { DataSource, SelectionModel } from '@angular/cdk/collections';
|
|
20
20
|
import * as i1$3 from '@angular/material/core';
|
|
21
|
-
import { MAT_DATE_FORMATS, NativeDateAdapter, ErrorStateMatcher, MatRipple, MatRippleModule } from '@angular/material/core';
|
|
21
|
+
import { MAT_DATE_FORMATS, MatOptionModule, NativeDateAdapter, ErrorStateMatcher, MatRipple, MatRippleModule } from '@angular/material/core';
|
|
22
22
|
import * as i1$2 from '@angular/cdk/overlay';
|
|
23
|
-
import { OverlayConfig
|
|
24
|
-
import * as
|
|
25
|
-
import { BasePortalOutlet, CdkPortalOutlet,
|
|
23
|
+
import { OverlayConfig } from '@angular/cdk/overlay';
|
|
24
|
+
import * as i2$2 from '@angular/cdk/portal';
|
|
25
|
+
import { BasePortalOutlet, CdkPortalOutlet, PortalModule, ComponentPortal } from '@angular/cdk/portal';
|
|
26
26
|
import { trigger, state, style, transition, sequence, query, animate, group } from '@angular/animations';
|
|
27
|
+
import { NgIf, NgFor, NgClass, AsyncPipe, DatePipe, NgTemplateOutlet, DOCUMENT, UpperCasePipe, NgStyle, isPlatformBrowser } from '@angular/common';
|
|
27
28
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
28
|
-
import * as i2$1 from '@angular/common';
|
|
29
|
-
import { CommonModule, DatePipe, DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
30
29
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
31
|
-
import * as
|
|
32
|
-
import { MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
33
|
-
import * as i5 from '@angular/material/input';
|
|
34
|
-
import { MatInputModule } from '@angular/material/input';
|
|
35
|
-
import * as i6 from '@angular/material/checkbox';
|
|
30
|
+
import * as i7 from '@angular/material/checkbox';
|
|
36
31
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
37
|
-
import * as
|
|
32
|
+
import * as i6 from '@angular/material/datepicker';
|
|
38
33
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
39
|
-
import * as i4
|
|
34
|
+
import * as i4 from '@angular/material/input';
|
|
35
|
+
import { MatInputModule } from '@angular/material/input';
|
|
36
|
+
import * as i3$1 from '@angular/material/select';
|
|
40
37
|
import { MatSelectModule } from '@angular/material/select';
|
|
38
|
+
import * as i3 from '@angular/material/form-field';
|
|
39
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
41
40
|
import * as i1$4 from 'apollo-angular';
|
|
42
41
|
import { gql } from 'apollo-angular';
|
|
43
42
|
import { NetworkStatus } from '@apollo/client/core';
|
|
44
43
|
import * as i1$6 from '@angular/cdk/layout';
|
|
45
44
|
import { Breakpoints } from '@angular/cdk/layout';
|
|
46
|
-
import * as
|
|
47
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
48
|
-
import * as i1$5 from '@angular/material/icon';
|
|
49
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
50
|
-
import * as i2$3 from '@angular/platform-browser';
|
|
51
|
-
import * as i8 from '@angular/material/tooltip';
|
|
45
|
+
import * as i6$1 from '@angular/material/tooltip';
|
|
52
46
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
47
|
+
import * as i1$5 from '@angular/material/icon';
|
|
48
|
+
import { MatIconModule, MatIconRegistry } from '@angular/material/icon';
|
|
49
|
+
import * as i2$5 from '@angular/platform-browser';
|
|
50
|
+
import * as i3$2 from '@angular/material/menu';
|
|
51
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
53
52
|
import * as i1$7 from '@angular/material/tabs';
|
|
54
|
-
import * as
|
|
53
|
+
import * as i5 from '@angular/material/list';
|
|
55
54
|
import { MatSelectionList, MatListModule } from '@angular/material/list';
|
|
56
|
-
import * as
|
|
55
|
+
import * as i1$8 from '@angular/material/autocomplete';
|
|
57
56
|
import { MatAutocompleteTrigger, MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
58
57
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
59
58
|
import * as i7$1 from '@angular/material/progress-spinner';
|
|
60
59
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
61
|
-
import { FlatTreeControl
|
|
62
|
-
import * as
|
|
60
|
+
import { FlatTreeControl } from '@angular/cdk/tree';
|
|
61
|
+
import * as i3$3 from '@angular/material/tree';
|
|
63
62
|
import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
|
|
64
|
-
import * as
|
|
63
|
+
import * as i7$2 from '@angular/material/chips';
|
|
65
64
|
import { MatChipsModule } from '@angular/material/chips';
|
|
66
65
|
import * as i5$1 from '@angular/material/divider';
|
|
67
|
-
import
|
|
68
|
-
import * as
|
|
66
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
67
|
+
import * as i3$4 from '@ngbracket/ngx-layout';
|
|
68
|
+
import * as i7$3 from '@angular/material/paginator';
|
|
69
69
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
70
|
-
import * as
|
|
70
|
+
import * as i2$6 from '@angular/material/sidenav';
|
|
71
71
|
import { MatSidenavContainer, MatSidenav, MatSidenavModule } from '@angular/material/sidenav';
|
|
72
|
-
import * as i1$
|
|
73
|
-
import { HttpHeaders
|
|
72
|
+
import * as i1$9 from '@angular/common/http';
|
|
73
|
+
import { HttpHeaders } from '@angular/common/http';
|
|
74
74
|
|
|
75
75
|
class NaturalAbstractController {
|
|
76
76
|
constructor() {
|
|
@@ -104,11 +104,11 @@ class NaturalConfirmComponent {
|
|
|
104
104
|
this.data = data;
|
|
105
105
|
}
|
|
106
106
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalConfirmComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
107
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalConfirmComponent, selector: "ng-component", ngImport: i0, template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions align=\"end\">\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n", styles: ["mat-dialog-content{max-width:40em}\n"], dependencies: [{ kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type:
|
|
107
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalConfirmComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions align=\"end\">\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n", styles: ["mat-dialog-content{max-width:40em}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] }); }
|
|
108
108
|
}
|
|
109
109
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalConfirmComponent, decorators: [{
|
|
110
110
|
type: Component,
|
|
111
|
-
args: [{ template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions align=\"end\">\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n", styles: ["mat-dialog-content{max-width:40em}\n"] }]
|
|
111
|
+
args: [{ standalone: true, imports: [MatDialogModule, MatButtonModule], template: "<h2 mat-dialog-title>{{ data.title }}</h2>\n<mat-dialog-content\n ><p class=\"mat-body\">{{ data.message }}</p></mat-dialog-content\n>\n<mat-dialog-actions align=\"end\">\n <button [mat-dialog-close]=\"false\" mat-button>{{ data.cancelText }}</button>\n <button [mat-dialog-close]=\"true\" mat-stroked-button cdkFocusInitial>{{ data.confirmText }}</button>\n</mat-dialog-actions>\n", styles: ["mat-dialog-content{max-width:40em}\n"] }]
|
|
112
112
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
113
113
|
type: Inject,
|
|
114
114
|
args: [MAT_DIALOG_DATA]
|
|
@@ -154,7 +154,7 @@ class NaturalAlertService {
|
|
|
154
154
|
});
|
|
155
155
|
return dialog.afterClosed();
|
|
156
156
|
}
|
|
157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertService, deps: [{ token: i1.MatDialog }, { token: i2.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertService, deps: [{ token: i1.MatDialog }, { token: i2$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
158
158
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertService, providedIn: 'root' }); }
|
|
159
159
|
}
|
|
160
160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertService, decorators: [{
|
|
@@ -162,7 +162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
162
162
|
args: [{
|
|
163
163
|
providedIn: 'root',
|
|
164
164
|
}]
|
|
165
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2.MatSnackBar }]; } });
|
|
165
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2$1.MatSnackBar }]; } });
|
|
166
166
|
|
|
167
167
|
class NaturalAbstractPanel extends NaturalAbstractController {
|
|
168
168
|
constructor() {
|
|
@@ -2763,11 +2763,11 @@ class NaturalDropdownContainerComponent extends BasePortalOutlet {
|
|
|
2763
2763
|
}
|
|
2764
2764
|
}
|
|
2765
2765
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDropdownContainerComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ConfigurableFocusTrapFactory }, { token: NATURAL_DROPDOWN_CONTAINER_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2766
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalDropdownContainerComponent, selector: "ng-component", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "directive", type: i2$
|
|
2766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalDropdownContainerComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2767
2767
|
}
|
|
2768
2768
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDropdownContainerComponent, decorators: [{
|
|
2769
2769
|
type: Component,
|
|
2770
|
-
args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"] }]
|
|
2770
|
+
args: [{ encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, animations: [naturalDropdownAnimations.transformMenu, naturalDropdownAnimations.fadeInItems], standalone: true, imports: [PortalModule, NgIf, MatButtonModule], template: "<div\n (@transformMenu.done)=\"onAnimationDone($event)\"\n [@transformMenu]=\"panelAnimationState\"\n class=\"natural-dropdown-container mat-elevation-z2\"\n role=\"menu\"\n tabindex=\"-1\"\n>\n <div class=\"natural-dropdown-container-content\">\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div *ngIf=\"data.showValidateButton\" class=\"natural-dropdown-validate-button\">\n <button (click)=\"close()\" color=\"primary\" mat-raised-button i18n>Valider</button>\n </div>\n</div>\n", styles: [".natural-dropdown-container{display:flex;flex-direction:column;border-radius:2px;height:100%}.natural-dropdown-container-content{flex:1;padding:5px;overflow:auto}.natural-dropdown-container .natural-dropdown-validate-button{flex:none;display:flex;flex-direction:row;justify-content:flex-end;margin:5px}\n"] }]
|
|
2771
2771
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ConfigurableFocusTrapFactory }, { type: undefined, decorators: [{
|
|
2772
2772
|
type: Inject,
|
|
2773
2773
|
args: [NATURAL_DROPDOWN_CONTAINER_DATA]
|
|
@@ -3093,11 +3093,22 @@ class TypeDateComponent {
|
|
|
3093
3093
|
}
|
|
3094
3094
|
}
|
|
3095
3095
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeDateComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$3.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3096
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeDateComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matIconSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "
|
|
3096
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeDateComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matIconSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }] }); }
|
|
3097
3097
|
}
|
|
3098
3098
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeDateComponent, decorators: [{
|
|
3099
3099
|
type: Component,
|
|
3100
|
-
args: [{
|
|
3100
|
+
args: [{ standalone: true, imports: [
|
|
3101
|
+
FormsModule,
|
|
3102
|
+
ReactiveFormsModule,
|
|
3103
|
+
MatFormFieldModule,
|
|
3104
|
+
MatSelectModule,
|
|
3105
|
+
NgFor,
|
|
3106
|
+
MatOptionModule,
|
|
3107
|
+
MatInputModule,
|
|
3108
|
+
MatDatepickerModule,
|
|
3109
|
+
NgIf,
|
|
3110
|
+
MatCheckboxModule,
|
|
3111
|
+
], template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Date</mat-label>\n <input\n [formControl]=\"valueCtrl\"\n [matDatepicker]=\"value\"\n [max]=\"configuration.max\"\n [min]=\"configuration.min\"\n [required]=\"true\"\n matInput\n />\n <mat-datepicker-toggle [for]=\"value\" matIconSuffix></mat-datepicker-toggle>\n <mat-datepicker #value></mat-datepicker>\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-checkbox [formControl]=\"todayCtrl\" i18n>Aujourd'hui</mat-checkbox>\n</form>\n", styles: ["form{display:grid;grid:auto auto/4em auto;grid-gap:0 1em}form>mat-checkbox{grid-column-start:2;margin-bottom:.3em}\n"] }]
|
|
3101
3112
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
3102
3113
|
type: Inject,
|
|
3103
3114
|
args: [NATURAL_DROPDOWN_DATA]
|
|
@@ -3475,7 +3486,7 @@ class NaturalPersistenceService {
|
|
|
3475
3486
|
}
|
|
3476
3487
|
return this.isValid(key, storageKey, result) ? result : null;
|
|
3477
3488
|
}
|
|
3478
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPersistenceService, deps: [{ token: i2$
|
|
3489
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPersistenceService, deps: [{ token: i2$4.Router }, { token: SESSION_STORAGE }, { token: NATURAL_PERSISTENCE_VALIDATOR, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3479
3490
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPersistenceService, providedIn: 'root' }); }
|
|
3480
3491
|
}
|
|
3481
3492
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPersistenceService, decorators: [{
|
|
@@ -3483,7 +3494,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
3483
3494
|
args: [{
|
|
3484
3495
|
providedIn: 'root',
|
|
3485
3496
|
}]
|
|
3486
|
-
}], ctorParameters: function () { return [{ type: i2$
|
|
3497
|
+
}], ctorParameters: function () { return [{ type: i2$4.Router }, { type: undefined, decorators: [{
|
|
3487
3498
|
type: Inject,
|
|
3488
3499
|
args: [SESSION_STORAGE]
|
|
3489
3500
|
}] }, { type: undefined, decorators: [{
|
|
@@ -5062,19 +5073,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
5062
5073
|
}]
|
|
5063
5074
|
}] });
|
|
5064
5075
|
|
|
5065
|
-
class NaturalAlertModule {
|
|
5066
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5067
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertModule, declarations: [NaturalConfirmComponent], imports: [CommonModule, MatDialogModule, MatSnackBarModule, MatButtonModule] }); }
|
|
5068
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertModule, imports: [CommonModule, MatDialogModule, MatSnackBarModule, MatButtonModule] }); }
|
|
5069
|
-
}
|
|
5070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAlertModule, decorators: [{
|
|
5071
|
-
type: NgModule,
|
|
5072
|
-
args: [{
|
|
5073
|
-
declarations: [NaturalConfirmComponent],
|
|
5074
|
-
imports: [CommonModule, MatDialogModule, MatSnackBarModule, MatButtonModule],
|
|
5075
|
-
}]
|
|
5076
|
-
}] });
|
|
5077
|
-
|
|
5078
5076
|
/*
|
|
5079
5077
|
* Public API Surface of natural
|
|
5080
5078
|
*/
|
|
@@ -5105,12 +5103,12 @@ class NaturalIconDirective {
|
|
|
5105
5103
|
this.matIconComponent = matIconComponent;
|
|
5106
5104
|
this._size = undefined;
|
|
5107
5105
|
this.classes = '';
|
|
5108
|
-
this.registerIcons(config);
|
|
5106
|
+
this.registerIcons(config ?? {});
|
|
5109
5107
|
}
|
|
5110
5108
|
set naturalIcon(value) {
|
|
5111
5109
|
const newIcon = {
|
|
5112
5110
|
name: value,
|
|
5113
|
-
...(this.config[value] ?? { font: value }),
|
|
5111
|
+
...(this.config?.[value] ?? { font: value }),
|
|
5114
5112
|
};
|
|
5115
5113
|
if (newIcon.class) {
|
|
5116
5114
|
this.classes = newIcon.class;
|
|
@@ -5142,15 +5140,18 @@ class NaturalIconDirective {
|
|
|
5142
5140
|
}
|
|
5143
5141
|
}
|
|
5144
5142
|
}
|
|
5145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconDirective, deps: [{ token: i1$5.MatIconRegistry }, { token: i2$
|
|
5146
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: { naturalIcon: "naturalIcon", size: "size" }, host: { properties: { "style.font-size.px": "this._size", "style.min-height.px": "this._size", "style.min-width.px": "this._size", "class": "this.classes" } }, ngImport: i0 }); }
|
|
5143
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconDirective, deps: [{ token: i1$5.MatIconRegistry }, { token: i2$5.DomSanitizer }, { token: NATURAL_ICONS_CONFIG, optional: true }, { token: i1$5.MatIcon, host: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5144
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalIconDirective, isStandalone: true, selector: "mat-icon[naturalIcon]", inputs: { naturalIcon: "naturalIcon", size: "size" }, host: { properties: { "style.font-size.px": "this._size", "style.min-height.px": "this._size", "style.min-width.px": "this._size", "class": "this.classes" } }, ngImport: i0 }); }
|
|
5147
5145
|
}
|
|
5148
5146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconDirective, decorators: [{
|
|
5149
5147
|
type: Directive,
|
|
5150
5148
|
args: [{
|
|
5151
5149
|
selector: 'mat-icon[naturalIcon]',
|
|
5150
|
+
standalone: true,
|
|
5152
5151
|
}]
|
|
5153
|
-
}], ctorParameters: function () { return [{ type: i1$5.MatIconRegistry }, { type: i2$
|
|
5152
|
+
}], ctorParameters: function () { return [{ type: i1$5.MatIconRegistry }, { type: i2$5.DomSanitizer }, { type: undefined, decorators: [{
|
|
5153
|
+
type: Optional
|
|
5154
|
+
}, {
|
|
5154
5155
|
type: Inject,
|
|
5155
5156
|
args: [NATURAL_ICONS_CONFIG]
|
|
5156
5157
|
}] }, { type: i1$5.MatIcon, decorators: [{
|
|
@@ -5268,11 +5269,23 @@ class NaturalColumnsPickerComponent {
|
|
|
5268
5269
|
return visibleButtons > 0;
|
|
5269
5270
|
}
|
|
5270
5271
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalColumnsPickerComponent, deps: [{ token: i1$6.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5271
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalColumnsPickerComponent, selector: "natural-columns-picker", inputs: { buttons: "buttons", availableColumns: "availableColumns", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div>\n <ng-container *ngIf=\"(isMobile | async) && someVisibleButtons(); else elseBlock\">\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\"></mat-icon>\n </button>\n\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n <ng-container *ngFor=\"let button of buttons\">\n <a\n mat-menu-item\n *ngIf=\"button.href\"\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </a>\n\n <button\n mat-menu-item\n *ngIf=\"defaultTrue(button.show) && !button.href && !button.buttons\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </button>\n\n <ng-container *ngIf=\"defaultTrue(button.show) && button.buttons\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n (click)=\"button.click?.(button, $event)\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n <a\n *ngFor=\"let subButton of button.buttons\"\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n </ng-template>\n </mat-menu>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"displayedColumns.length\"\n [matMenuTriggerFor]=\"columnMenu\"\n mat-menu-item\n [ngClass]=\"needMargin(null)\"\n >\n <span i18n>Colonnes</span>\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n\n <ng-template #elseBlock>\n <ng-container *ngFor=\"let button of buttons\">\n <a\n mat-icon-button\n *ngIf=\"button.href\"\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </a>\n\n <button\n mat-icon-button\n *ngIf=\"defaultTrue(button.show) && !button.href && !button.buttons\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </button>\n\n <ng-container *ngIf=\"defaultTrue(button.show) && button.buttons\">\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n <a\n *ngFor=\"let subButton of button.buttons\"\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n </ng-template>\n </mat-menu>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"displayedColumns.length\"\n [matMenuTriggerFor]=\"columnMenu\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n >\n <mat-icon naturalIcon=\"view_column\"></mat-icon>\n </button>\n </ng-template>\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n <div\n (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\"\n *ngFor=\"let column of displayedColumns\"\n mat-menu-item\n >\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"updateColumns()\" [(ngModel)]=\"column.checked\">{{\n column.label\n }}</mat-checkbox>\n </div>\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"], dependencies: [{ kind: "directive", type:
|
|
5272
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalColumnsPickerComponent, isStandalone: true, selector: "natural-columns-picker", inputs: { buttons: "buttons", availableColumns: "availableColumns", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div>\n <ng-container *ngIf=\"(isMobile | async) && someVisibleButtons(); else elseBlock\">\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\"></mat-icon>\n </button>\n\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n <ng-container *ngFor=\"let button of buttons\">\n <a\n mat-menu-item\n *ngIf=\"button.href\"\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </a>\n\n <button\n mat-menu-item\n *ngIf=\"defaultTrue(button.show) && !button.href && !button.buttons\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </button>\n\n <ng-container *ngIf=\"defaultTrue(button.show) && button.buttons\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n (click)=\"button.click?.(button, $event)\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n <a\n *ngFor=\"let subButton of button.buttons\"\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n </ng-template>\n </mat-menu>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"displayedColumns.length\"\n [matMenuTriggerFor]=\"columnMenu\"\n mat-menu-item\n [ngClass]=\"needMargin(null)\"\n >\n <span i18n>Colonnes</span>\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n\n <ng-template #elseBlock>\n <ng-container *ngFor=\"let button of buttons\">\n <a\n mat-icon-button\n *ngIf=\"button.href\"\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </a>\n\n <button\n mat-icon-button\n *ngIf=\"defaultTrue(button.show) && !button.href && !button.buttons\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </button>\n\n <ng-container *ngIf=\"defaultTrue(button.show) && button.buttons\">\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n <a\n *ngFor=\"let subButton of button.buttons\"\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n </ng-template>\n </mat-menu>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"displayedColumns.length\"\n [matMenuTriggerFor]=\"columnMenu\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n >\n <mat-icon naturalIcon=\"view_column\"></mat-icon>\n </button>\n </ng-template>\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n <div\n (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\"\n *ngFor=\"let column of displayedColumns\"\n mat-menu-item\n >\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"updateColumns()\" [(ngModel)]=\"column.checked\">{{\n column.label\n }}</mat-checkbox>\n </div>\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i3$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$2.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i3$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
5272
5273
|
}
|
|
5273
5274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalColumnsPickerComponent, decorators: [{
|
|
5274
5275
|
type: Component,
|
|
5275
|
-
args: [{ selector: 'natural-columns-picker',
|
|
5276
|
+
args: [{ selector: 'natural-columns-picker', standalone: true, imports: [
|
|
5277
|
+
NgIf,
|
|
5278
|
+
MatButtonModule,
|
|
5279
|
+
MatMenuModule,
|
|
5280
|
+
MatIconModule,
|
|
5281
|
+
NaturalIconDirective,
|
|
5282
|
+
NgFor,
|
|
5283
|
+
NgClass,
|
|
5284
|
+
MatCheckboxModule,
|
|
5285
|
+
MatTooltipModule,
|
|
5286
|
+
FormsModule,
|
|
5287
|
+
AsyncPipe,
|
|
5288
|
+
], template: "<div>\n <ng-container *ngIf=\"(isMobile | async) && someVisibleButtons(); else elseBlock\">\n <button mat-icon-button [matMenuTriggerFor]=\"mobileMenu\">\n <mat-icon naturalIcon=\"more_vert\"></mat-icon>\n </button>\n\n <mat-menu #mobileMenu=\"matMenu\">\n <ng-template matMenuContent>\n <ng-container *ngFor=\"let button of buttons\">\n <a\n mat-menu-item\n *ngIf=\"button.href\"\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </a>\n\n <button\n mat-menu-item\n *ngIf=\"defaultTrue(button.show) && !button.href && !button.buttons\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </button>\n\n <ng-container *ngIf=\"defaultTrue(button.show) && button.buttons\">\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"subMenu\"\n (click)=\"button.click?.(button, $event)\"\n [ngClass]=\"needMargin(button)\"\n >\n <mat-checkbox *ngIf=\"useCheckbox(button)\" [checked]=\"button.checked\"></mat-checkbox>\n\n {{ button.label }}\n </button>\n\n <mat-menu #subMenu=\"matMenu\">\n <ng-template matMenuContent>\n <a\n *ngFor=\"let subButton of button.buttons\"\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n </ng-template>\n </mat-menu>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"displayedColumns.length\"\n [matMenuTriggerFor]=\"columnMenu\"\n mat-menu-item\n [ngClass]=\"needMargin(null)\"\n >\n <span i18n>Colonnes</span>\n </button>\n </ng-template>\n </mat-menu>\n </ng-container>\n\n <ng-template #elseBlock>\n <ng-container *ngFor=\"let button of buttons\">\n <a\n mat-icon-button\n *ngIf=\"button.href\"\n [href]=\"defaultTrue(button.show) && button.href\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </a>\n\n <button\n mat-icon-button\n *ngIf=\"defaultTrue(button.show) && !button.href && !button.buttons\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </button>\n\n <ng-container *ngIf=\"defaultTrue(button.show) && button.buttons\">\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"menu\"\n (click)=\"button.click?.(button, $event)\"\n [disabled]=\"button.disabled\"\n [color]=\"color(button)\"\n [matTooltip]=\"button.label\"\n >\n <mat-icon [naturalIcon]=\"button.icon\"></mat-icon>\n </button>\n\n <mat-menu #menu=\"matMenu\">\n <ng-template matMenuContent>\n <a\n *ngFor=\"let subButton of button.buttons\"\n mat-menu-item\n [disabled]=\"subButton.disabled\"\n (click)=\"subButton.click(subButton, $event)\"\n >\n {{ subButton.label }}\n </a>\n </ng-template>\n </mat-menu>\n </ng-container>\n </ng-container>\n\n <button\n *ngIf=\"displayedColumns.length\"\n [matMenuTriggerFor]=\"columnMenu\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"S\u00E9lectionner les colonnes\"\n >\n <mat-icon naturalIcon=\"view_column\"></mat-icon>\n </button>\n </ng-template>\n</div>\n\n<mat-menu #columnMenu=\"matMenu\">\n <ng-template matMenuContent>\n <div\n (click)=\"$event.stopPropagation(); column.checked = !column.checked; updateColumns()\"\n *ngFor=\"let column of displayedColumns\"\n mat-menu-item\n >\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"updateColumns()\" [(ngModel)]=\"column.checked\">{{\n column.label\n }}</mat-checkbox>\n </div>\n </ng-template>\n</mat-menu>\n", styles: [".align-with-checkbox{padding-left:61px}\n"] }]
|
|
5276
5289
|
}], ctorParameters: function () { return [{ type: i1$6.BreakpointObserver }]; }, propDecorators: { buttons: [{
|
|
5277
5290
|
type: Input
|
|
5278
5291
|
}], availableColumns: [{
|
|
@@ -5283,130 +5296,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
5283
5296
|
type: Output
|
|
5284
5297
|
}] } });
|
|
5285
5298
|
|
|
5286
|
-
class NaturalIconModule {
|
|
5287
|
-
constructor(iconRegistry) {
|
|
5288
|
-
// Replace the old Material Icons by the new Material Symbols
|
|
5289
|
-
// This means that `https://fonts.googleapis.com/icon?family=Material+Icons` must be
|
|
5290
|
-
// replaced by `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1`
|
|
5291
|
-
const defaultFontSetClasses = iconRegistry.getDefaultFontSetClass();
|
|
5292
|
-
const outlinedFontSetClasses = defaultFontSetClasses
|
|
5293
|
-
.filter(fontSetClass => fontSetClass !== 'material-icons')
|
|
5294
|
-
.concat(['material-symbols-outlined']);
|
|
5295
|
-
iconRegistry.setDefaultFontSetClass(...outlinedFontSetClasses);
|
|
5296
|
-
iconRegistry.foobar = 'myocnosernoienr';
|
|
5297
|
-
}
|
|
5298
|
-
static forRoot(config) {
|
|
5299
|
-
return {
|
|
5300
|
-
ngModule: NaturalIconModule,
|
|
5301
|
-
providers: [
|
|
5302
|
-
{
|
|
5303
|
-
provide: NATURAL_ICONS_CONFIG,
|
|
5304
|
-
useValue: config,
|
|
5305
|
-
},
|
|
5306
|
-
],
|
|
5307
|
-
};
|
|
5308
|
-
}
|
|
5309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconModule, deps: [{ token: i1$5.MatIconRegistry }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5310
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconModule, declarations: [NaturalIconDirective], imports: [CommonModule, MatIconModule], exports: [NaturalIconDirective] }); }
|
|
5311
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconModule, imports: [CommonModule, MatIconModule] }); }
|
|
5312
|
-
}
|
|
5313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalIconModule, decorators: [{
|
|
5314
|
-
type: NgModule,
|
|
5315
|
-
args: [{
|
|
5316
|
-
declarations: [NaturalIconDirective],
|
|
5317
|
-
imports: [CommonModule, MatIconModule],
|
|
5318
|
-
exports: [NaturalIconDirective],
|
|
5319
|
-
}]
|
|
5320
|
-
}], ctorParameters: function () { return [{ type: i1$5.MatIconRegistry }]; } });
|
|
5321
|
-
|
|
5322
|
-
class NaturalColumnsPickerModule {
|
|
5323
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalColumnsPickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5324
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalColumnsPickerModule, declarations: [NaturalColumnsPickerComponent], imports: [CommonModule,
|
|
5325
|
-
FormsModule,
|
|
5326
|
-
MatMenuModule,
|
|
5327
|
-
MatButtonModule,
|
|
5328
|
-
MatCheckboxModule,
|
|
5329
|
-
NaturalIconModule,
|
|
5330
|
-
MatTooltipModule,
|
|
5331
|
-
MatIconModule], exports: [NaturalColumnsPickerComponent] }); }
|
|
5332
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalColumnsPickerModule, imports: [CommonModule,
|
|
5333
|
-
FormsModule,
|
|
5334
|
-
MatMenuModule,
|
|
5335
|
-
MatButtonModule,
|
|
5336
|
-
MatCheckboxModule,
|
|
5337
|
-
NaturalIconModule,
|
|
5338
|
-
MatTooltipModule,
|
|
5339
|
-
MatIconModule] }); }
|
|
5340
|
-
}
|
|
5341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalColumnsPickerModule, decorators: [{
|
|
5342
|
-
type: NgModule,
|
|
5343
|
-
args: [{
|
|
5344
|
-
declarations: [NaturalColumnsPickerComponent],
|
|
5345
|
-
imports: [
|
|
5346
|
-
CommonModule,
|
|
5347
|
-
FormsModule,
|
|
5348
|
-
MatMenuModule,
|
|
5349
|
-
MatButtonModule,
|
|
5350
|
-
MatCheckboxModule,
|
|
5351
|
-
NaturalIconModule,
|
|
5352
|
-
MatTooltipModule,
|
|
5353
|
-
MatIconModule,
|
|
5354
|
-
],
|
|
5355
|
-
exports: [NaturalColumnsPickerComponent],
|
|
5356
|
-
}]
|
|
5357
|
-
}] });
|
|
5358
|
-
|
|
5359
5299
|
/*
|
|
5360
5300
|
* Public API Surface of natural
|
|
5361
5301
|
*/
|
|
5362
5302
|
|
|
5363
|
-
/**
|
|
5364
|
-
* Need to add http:// prefix if we don't have prefix already AND we don't have part of it
|
|
5365
|
-
*/
|
|
5366
|
-
function ensureHttpPrefix(value) {
|
|
5367
|
-
if (!value) {
|
|
5368
|
-
return value;
|
|
5369
|
-
}
|
|
5370
|
-
const completePrefix = /^(https?):\/\//i.test(value);
|
|
5371
|
-
const startingPrefix = 'https://'.indexOf(value) === 0 || 'http://'.indexOf(value) === 0;
|
|
5372
|
-
if (!completePrefix && !startingPrefix) {
|
|
5373
|
-
return 'http://' + value;
|
|
5374
|
-
}
|
|
5375
|
-
else {
|
|
5376
|
-
return value;
|
|
5377
|
-
}
|
|
5378
|
-
}
|
|
5379
|
-
/**
|
|
5380
|
-
* This directive only supports ReactiveForms due to ngModel/ngControl encapsulation and changes emissions.
|
|
5381
|
-
*/
|
|
5382
|
-
class NaturalHttpPrefixDirective extends NaturalAbstractController {
|
|
5383
|
-
constructor() {
|
|
5384
|
-
super();
|
|
5385
|
-
this.naturalHttpPrefix = null;
|
|
5386
|
-
}
|
|
5387
|
-
httpize($event) {
|
|
5388
|
-
if (this.naturalHttpPrefix) {
|
|
5389
|
-
const newValue = ensureHttpPrefix($event) || $event;
|
|
5390
|
-
if ($event !== newValue) {
|
|
5391
|
-
this.naturalHttpPrefix.setValue(newValue);
|
|
5392
|
-
}
|
|
5393
|
-
}
|
|
5394
|
-
}
|
|
5395
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHttpPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5396
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHttpPrefixDirective, selector: "[naturalHttpPrefix]", inputs: { naturalHttpPrefix: "naturalHttpPrefix" }, host: { listeners: { "ngModelChange": "httpize($event)" } }, usesInheritance: true, ngImport: i0 }); }
|
|
5397
|
-
}
|
|
5398
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHttpPrefixDirective, decorators: [{
|
|
5399
|
-
type: Directive,
|
|
5400
|
-
args: [{
|
|
5401
|
-
selector: '[naturalHttpPrefix]',
|
|
5402
|
-
}]
|
|
5403
|
-
}], ctorParameters: function () { return []; }, propDecorators: { naturalHttpPrefix: [{
|
|
5404
|
-
type: Input
|
|
5405
|
-
}], httpize: [{
|
|
5406
|
-
type: HostListener,
|
|
5407
|
-
args: ['ngModelChange', ['$event']]
|
|
5408
|
-
}] } });
|
|
5409
|
-
|
|
5410
5303
|
/**
|
|
5411
5304
|
* Returns an identifier for the tab
|
|
5412
5305
|
*/
|
|
@@ -5467,15 +5360,16 @@ class NaturalLinkableTabDirective extends NaturalAbstractController {
|
|
|
5467
5360
|
getTabIndex(fragment) {
|
|
5468
5361
|
return this.component._tabs.toArray().findIndex(tab => fragment === getTabId(tab));
|
|
5469
5362
|
}
|
|
5470
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalLinkableTabDirective, deps: [{ token: i1$7.MatTabGroup }, { token: i2$
|
|
5471
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalLinkableTabDirective, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, usesInheritance: true, ngImport: i0 }); }
|
|
5363
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalLinkableTabDirective, deps: [{ token: i1$7.MatTabGroup }, { token: i2$4.ActivatedRoute }, { token: i2$4.Router }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5364
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalLinkableTabDirective, isStandalone: true, selector: "mat-tab-group[naturalLinkableTab]", inputs: { naturalLinkableTab: "naturalLinkableTab" }, usesInheritance: true, ngImport: i0 }); }
|
|
5472
5365
|
}
|
|
5473
5366
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalLinkableTabDirective, decorators: [{
|
|
5474
5367
|
type: Directive,
|
|
5475
5368
|
args: [{
|
|
5476
5369
|
selector: 'mat-tab-group[naturalLinkableTab]',
|
|
5370
|
+
standalone: true,
|
|
5477
5371
|
}]
|
|
5478
|
-
}], ctorParameters: function () { return [{ type: i1$7.MatTabGroup }, { type: i2$
|
|
5372
|
+
}], ctorParameters: function () { return [{ type: i1$7.MatTabGroup }, { type: i2$4.ActivatedRoute }, { type: i2$4.Router }]; }, propDecorators: { naturalLinkableTab: [{
|
|
5479
5373
|
type: Input
|
|
5480
5374
|
}] } });
|
|
5481
5375
|
|
|
@@ -5490,11 +5384,14 @@ class NaturalCapitalizePipe {
|
|
|
5490
5384
|
return value;
|
|
5491
5385
|
}
|
|
5492
5386
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalCapitalizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5493
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalCapitalizePipe, name: "capitalize" }); }
|
|
5387
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalCapitalizePipe, isStandalone: true, name: "capitalize" }); }
|
|
5494
5388
|
}
|
|
5495
5389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalCapitalizePipe, decorators: [{
|
|
5496
5390
|
type: Pipe,
|
|
5497
|
-
args: [{
|
|
5391
|
+
args: [{
|
|
5392
|
+
name: 'capitalize',
|
|
5393
|
+
standalone: true,
|
|
5394
|
+
}]
|
|
5498
5395
|
}] });
|
|
5499
5396
|
|
|
5500
5397
|
class NaturalEllipsisPipe {
|
|
@@ -5502,11 +5399,14 @@ class NaturalEllipsisPipe {
|
|
|
5502
5399
|
return value.substr(0, limit - 1) + (value.length > limit ? '…' : '');
|
|
5503
5400
|
}
|
|
5504
5401
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalEllipsisPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5505
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalEllipsisPipe, name: "ellipsis" }); }
|
|
5402
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalEllipsisPipe, isStandalone: true, name: "ellipsis" }); }
|
|
5506
5403
|
}
|
|
5507
5404
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalEllipsisPipe, decorators: [{
|
|
5508
5405
|
type: Pipe,
|
|
5509
|
-
args: [{
|
|
5406
|
+
args: [{
|
|
5407
|
+
name: 'ellipsis',
|
|
5408
|
+
standalone: true,
|
|
5409
|
+
}]
|
|
5510
5410
|
}] });
|
|
5511
5411
|
|
|
5512
5412
|
/**
|
|
@@ -5522,12 +5422,13 @@ class NaturalEnumPipe {
|
|
|
5522
5422
|
return this.enumService.getValueName(value, enumName);
|
|
5523
5423
|
}
|
|
5524
5424
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalEnumPipe, deps: [{ token: NaturalEnumService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5525
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalEnumPipe, name: "enum" }); }
|
|
5425
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalEnumPipe, isStandalone: true, name: "enum" }); }
|
|
5526
5426
|
}
|
|
5527
5427
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalEnumPipe, decorators: [{
|
|
5528
5428
|
type: Pipe,
|
|
5529
5429
|
args: [{
|
|
5530
5430
|
name: 'enum',
|
|
5431
|
+
standalone: true,
|
|
5531
5432
|
}]
|
|
5532
5433
|
}], ctorParameters: function () { return [{ type: NaturalEnumService }]; } });
|
|
5533
5434
|
|
|
@@ -5539,76 +5440,16 @@ class NaturalSwissDatePipe extends DatePipe {
|
|
|
5539
5440
|
return super.transform(value, format, timezone, locale);
|
|
5540
5441
|
}
|
|
5541
5442
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSwissDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5542
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalSwissDatePipe, name: "swissDate" }); }
|
|
5443
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalSwissDatePipe, isStandalone: true, name: "swissDate" }); }
|
|
5543
5444
|
}
|
|
5544
5445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSwissDatePipe, decorators: [{
|
|
5545
5446
|
type: Pipe,
|
|
5546
5447
|
args: [{
|
|
5547
5448
|
name: 'swissDate',
|
|
5449
|
+
standalone: true,
|
|
5548
5450
|
}]
|
|
5549
5451
|
}] });
|
|
5550
5452
|
|
|
5551
|
-
class NaturalSrcDensityDirective {
|
|
5552
|
-
/**
|
|
5553
|
-
* Automatically apply image selection based on screen density.
|
|
5554
|
-
*
|
|
5555
|
-
* The given URL **MUST** be the normal density URL. And it **MUST** include
|
|
5556
|
-
* the size as last path segment. That size will automatically be changed
|
|
5557
|
-
* for other screen densities. That means that the server **MUST** be able to
|
|
5558
|
-
* serve an image of the given size.
|
|
5559
|
-
*
|
|
5560
|
-
* Usage:
|
|
5561
|
-
*
|
|
5562
|
-
* ```html
|
|
5563
|
-
* <img [naturalSrcDensity]="'/api/image/123/200'" />
|
|
5564
|
-
* ```
|
|
5565
|
-
*
|
|
5566
|
-
* Will generate something like:
|
|
5567
|
-
*
|
|
5568
|
-
* ```html
|
|
5569
|
-
* <img
|
|
5570
|
-
* src="/api/image/123/200"
|
|
5571
|
-
* srcset="/api/image/123/200, /api/image/123/300 1.5x, /api/image/123/400 2x, /api/image/123/600 3x, /api/image/123/800 4x"
|
|
5572
|
-
* />
|
|
5573
|
-
* ```
|
|
5574
|
-
*
|
|
5575
|
-
* See https://web.dev/codelab-density-descriptors/
|
|
5576
|
-
*/
|
|
5577
|
-
set naturalSrcDensity(src) {
|
|
5578
|
-
if (!src) {
|
|
5579
|
-
return;
|
|
5580
|
-
}
|
|
5581
|
-
const match = src.match(/^(.*\/)(\d+)$/);
|
|
5582
|
-
const base = match?.[1];
|
|
5583
|
-
const size = +(match?.[2] ?? 0);
|
|
5584
|
-
let srcset = '';
|
|
5585
|
-
if (base && size) {
|
|
5586
|
-
// This should cover most common densities according to https://www.mydevice.io/#tab1
|
|
5587
|
-
const size15 = Math.round(size * 1.5);
|
|
5588
|
-
const size2 = size * 2;
|
|
5589
|
-
const size3 = size * 3;
|
|
5590
|
-
const size4 = size * 4;
|
|
5591
|
-
srcset = `${base}${size}, ${base}${size15} 1.5x, ${base}${size2} 2x, ${base}${size3} 3x, ${base}${size4} 4x`;
|
|
5592
|
-
}
|
|
5593
|
-
this.elementRef.nativeElement.src = src;
|
|
5594
|
-
this.elementRef.nativeElement.srcset = srcset;
|
|
5595
|
-
}
|
|
5596
|
-
constructor(elementRef) {
|
|
5597
|
-
this.elementRef = elementRef;
|
|
5598
|
-
}
|
|
5599
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSrcDensityDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5600
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSrcDensityDirective, selector: "img[naturalSrcDensity]", inputs: { naturalSrcDensity: "naturalSrcDensity" }, ngImport: i0 }); }
|
|
5601
|
-
}
|
|
5602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSrcDensityDirective, decorators: [{
|
|
5603
|
-
type: Directive,
|
|
5604
|
-
args: [{
|
|
5605
|
-
selector: 'img[naturalSrcDensity]',
|
|
5606
|
-
}]
|
|
5607
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { naturalSrcDensity: [{
|
|
5608
|
-
type: Input,
|
|
5609
|
-
args: [{ required: true }]
|
|
5610
|
-
}] } });
|
|
5611
|
-
|
|
5612
5453
|
function isDate(value) {
|
|
5613
5454
|
return value instanceof Date && !isNaN(value.valueOf());
|
|
5614
5455
|
}
|
|
@@ -5731,12 +5572,13 @@ class NaturalTimeAgoPipe {
|
|
|
5731
5572
|
}
|
|
5732
5573
|
}
|
|
5733
5574
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTimeAgoPipe, deps: [{ token: 'SHOULD_NEVER_BE_INJECTED', optional: true }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5734
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalTimeAgoPipe, name: "timeAgo" }); }
|
|
5575
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalTimeAgoPipe, isStandalone: true, name: "timeAgo" }); }
|
|
5735
5576
|
}
|
|
5736
5577
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTimeAgoPipe, decorators: [{
|
|
5737
5578
|
type: Pipe,
|
|
5738
5579
|
args: [{
|
|
5739
5580
|
name: 'timeAgo',
|
|
5581
|
+
standalone: true,
|
|
5740
5582
|
}]
|
|
5741
5583
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
5742
5584
|
type: Optional
|
|
@@ -5745,44 +5587,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
5745
5587
|
args: ['SHOULD_NEVER_BE_INJECTED']
|
|
5746
5588
|
}] }]; } });
|
|
5747
5589
|
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5590
|
+
class NaturalSrcDensityDirective {
|
|
5591
|
+
/**
|
|
5592
|
+
* Automatically apply image selection based on screen density.
|
|
5593
|
+
*
|
|
5594
|
+
* The given URL **MUST** be the normal density URL. And it **MUST** include
|
|
5595
|
+
* the size as last path segment. That size will automatically be changed
|
|
5596
|
+
* for other screen densities. That means that the server **MUST** be able to
|
|
5597
|
+
* serve an image of the given size.
|
|
5598
|
+
*
|
|
5599
|
+
* Usage:
|
|
5600
|
+
*
|
|
5601
|
+
* ```html
|
|
5602
|
+
* <img [naturalSrcDensity]="'/api/image/123/200'" />
|
|
5603
|
+
* ```
|
|
5604
|
+
*
|
|
5605
|
+
* Will generate something like:
|
|
5606
|
+
*
|
|
5607
|
+
* ```html
|
|
5608
|
+
* <img
|
|
5609
|
+
* src="/api/image/123/200"
|
|
5610
|
+
* srcset="/api/image/123/200, /api/image/123/300 1.5x, /api/image/123/400 2x, /api/image/123/600 3x, /api/image/123/800 4x"
|
|
5611
|
+
* />
|
|
5612
|
+
* ```
|
|
5613
|
+
*
|
|
5614
|
+
* See https://web.dev/codelab-density-descriptors/
|
|
5615
|
+
*/
|
|
5616
|
+
set naturalSrcDensity(src) {
|
|
5617
|
+
if (!src) {
|
|
5618
|
+
return;
|
|
5619
|
+
}
|
|
5620
|
+
const match = src.match(/^(.*\/)(\d+)$/);
|
|
5621
|
+
const base = match?.[1];
|
|
5622
|
+
const size = +(match?.[2] ?? 0);
|
|
5623
|
+
let srcset = '';
|
|
5624
|
+
if (base && size) {
|
|
5625
|
+
// This should cover most common densities according to https://www.mydevice.io/#tab1
|
|
5626
|
+
const size15 = Math.round(size * 1.5);
|
|
5627
|
+
const size2 = size * 2;
|
|
5628
|
+
const size3 = size * 3;
|
|
5629
|
+
const size4 = size * 4;
|
|
5630
|
+
srcset = `${base}${size}, ${base}${size15} 1.5x, ${base}${size2} 2x, ${base}${size3} 3x, ${base}${size4} 4x`;
|
|
5631
|
+
}
|
|
5632
|
+
this.elementRef.nativeElement.src = src;
|
|
5633
|
+
this.elementRef.nativeElement.srcset = srcset;
|
|
5634
|
+
}
|
|
5635
|
+
constructor(elementRef) {
|
|
5636
|
+
this.elementRef = elementRef;
|
|
5637
|
+
}
|
|
5638
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSrcDensityDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5639
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSrcDensityDirective, isStandalone: true, selector: "img[naturalSrcDensity]", inputs: { naturalSrcDensity: "naturalSrcDensity" }, ngImport: i0 }); }
|
|
5640
|
+
}
|
|
5641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSrcDensityDirective, decorators: [{
|
|
5642
|
+
type: Directive,
|
|
5779
5643
|
args: [{
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
exports: [...declarationsToExport$1],
|
|
5783
|
-
providers: [sessionStorageProvider, localStorageProvider],
|
|
5644
|
+
selector: 'img[naturalSrcDensity]',
|
|
5645
|
+
standalone: true,
|
|
5784
5646
|
}]
|
|
5785
|
-
}] }
|
|
5647
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { naturalSrcDensity: [{
|
|
5648
|
+
type: Input,
|
|
5649
|
+
args: [{ required: true }]
|
|
5650
|
+
}] } });
|
|
5786
5651
|
|
|
5787
5652
|
class NaturalDialogTriggerComponent {
|
|
5788
5653
|
constructor(dialog, route, router) {
|
|
@@ -5839,15 +5704,16 @@ class NaturalDialogTriggerComponent {
|
|
|
5839
5704
|
this.router.navigate(['.'], { relativeTo: this.route.parent });
|
|
5840
5705
|
}
|
|
5841
5706
|
}
|
|
5842
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerComponent, deps: [{ token: i1.MatDialog }, { token: i2$
|
|
5843
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalDialogTriggerComponent, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
|
|
5707
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerComponent, deps: [{ token: i1.MatDialog }, { token: i2$4.ActivatedRoute }, { token: i2$4.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5708
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalDialogTriggerComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
|
|
5844
5709
|
}
|
|
5845
5710
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerComponent, decorators: [{
|
|
5846
5711
|
type: Component,
|
|
5847
5712
|
args: [{
|
|
5848
5713
|
template: '',
|
|
5714
|
+
standalone: true,
|
|
5849
5715
|
}]
|
|
5850
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2$
|
|
5716
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: i2$4.ActivatedRoute }, { type: i2$4.Router }]; } });
|
|
5851
5717
|
|
|
5852
5718
|
const NATURAL_SEO_CONFIG = new InjectionToken('Configuration for SEO service');
|
|
5853
5719
|
function stripTags(str) {
|
|
@@ -5972,7 +5838,7 @@ class NaturalSeoService {
|
|
|
5972
5838
|
}
|
|
5973
5839
|
return seo;
|
|
5974
5840
|
}
|
|
5975
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSeoService, deps: [{ token: NATURAL_SEO_CONFIG }, { token: i2$
|
|
5841
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSeoService, deps: [{ token: NATURAL_SEO_CONFIG }, { token: i2$4.Router }, { token: i2$5.Title }, { token: i2$5.Meta }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5976
5842
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSeoService, providedIn: 'root' }); }
|
|
5977
5843
|
}
|
|
5978
5844
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSeoService, decorators: [{
|
|
@@ -5983,7 +5849,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
5983
5849
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
5984
5850
|
type: Inject,
|
|
5985
5851
|
args: [NATURAL_SEO_CONFIG]
|
|
5986
|
-
}] }, { type: i2$
|
|
5852
|
+
}] }, { type: i2$4.Router }, { type: i2$5.Title }, { type: i2$5.Meta }]; } });
|
|
5853
|
+
|
|
5854
|
+
/**
|
|
5855
|
+
* Configure and starts `NaturalSeoService`
|
|
5856
|
+
*/
|
|
5857
|
+
function provideSeo(config) {
|
|
5858
|
+
return [
|
|
5859
|
+
{
|
|
5860
|
+
provide: NATURAL_SEO_CONFIG,
|
|
5861
|
+
useValue: config,
|
|
5862
|
+
},
|
|
5863
|
+
{
|
|
5864
|
+
provide: APP_INITIALIZER,
|
|
5865
|
+
multi: true,
|
|
5866
|
+
useFactory: () => {
|
|
5867
|
+
// injection required, but works without doing anything else
|
|
5868
|
+
inject(NaturalSeoService);
|
|
5869
|
+
return () => undefined;
|
|
5870
|
+
},
|
|
5871
|
+
},
|
|
5872
|
+
];
|
|
5873
|
+
}
|
|
5987
5874
|
|
|
5988
5875
|
/*
|
|
5989
5876
|
* Public API Surface of natural
|
|
@@ -6030,11 +5917,11 @@ class NaturalDetailHeaderComponent {
|
|
|
6030
5917
|
return this.getRootLink().concat([id]);
|
|
6031
5918
|
}
|
|
6032
5919
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDetailHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6033
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalDetailHeaderComponent, selector: "natural-detail-header", inputs: { currentBaseUrl: "currentBaseUrl", isPanel: "isPanel", icon: "icon", label: "label", rootLabel: "rootLabel", newLabel: "newLabel", model: "model", breadcrumbs: "breadcrumbs", listRoute: "listRoute", listFragment: "listFragment", link: "link" }, ngImport: i0, template: "<div class=\"breadcrumb\">\n <a\n *ngIf=\"rootLabel || label\"\n [routerLink]=\"isPanel ? [] : getRootLink()\"\n [fragment]=\"listFragment\"\n color=\"primary\"\n mat-button\n >{{ rootLabel || label }}</a\n >\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline-5 no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline-5 no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"], dependencies: [{ kind: "directive", type:
|
|
5920
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalDetailHeaderComponent, isStandalone: true, selector: "natural-detail-header", inputs: { currentBaseUrl: "currentBaseUrl", isPanel: "isPanel", icon: "icon", label: "label", rootLabel: "rootLabel", newLabel: "newLabel", model: "model", breadcrumbs: "breadcrumbs", listRoute: "listRoute", listFragment: "listFragment", link: "link" }, ngImport: i0, template: "<div class=\"breadcrumb\">\n <a\n *ngIf=\"rootLabel || label\"\n [routerLink]=\"isPanel ? [] : getRootLink()\"\n [fragment]=\"listFragment\"\n color=\"primary\"\n mat-button\n >{{ rootLabel || label }}</a\n >\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline-5 no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline-5 no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] }); }
|
|
6034
5921
|
}
|
|
6035
5922
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDetailHeaderComponent, decorators: [{
|
|
6036
5923
|
type: Component,
|
|
6037
|
-
args: [{ selector: 'natural-detail-header', template: "<div class=\"breadcrumb\">\n <a\n *ngIf=\"rootLabel || label\"\n [routerLink]=\"isPanel ? [] : getRootLink()\"\n [fragment]=\"listFragment\"\n color=\"primary\"\n mat-button\n >{{ rootLabel || label }}</a\n >\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline-5 no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline-5 no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"] }]
|
|
5924
|
+
args: [{ selector: 'natural-detail-header', standalone: true, imports: [NgIf, MatButtonModule, RouterLink, NgFor, MatIconModule, NaturalIconDirective], template: "<div class=\"breadcrumb\">\n <a\n *ngIf=\"rootLabel || label\"\n [routerLink]=\"isPanel ? [] : getRootLink()\"\n [fragment]=\"listFragment\"\n color=\"primary\"\n mat-button\n >{{ rootLabel || label }}</a\n >\n <ng-container *ngFor=\"let parent of breadcrumbs\">\n /\n <a [routerLink]=\"isPanel ? [] : getLink(parent.id)\" color=\"primary\" mat-button>\n {{ parent?.fullName || parent?.name }}</a\n >\n </ng-container>\n</div>\n\n<div class=\"body\">\n <div *ngIf=\"icon\" style=\"width: 30px\">\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n </div>\n <div *ngIf=\"!model.id\" class=\"mat-headline-5 no-margin newLabel\">{{ newLabel }}</div>\n <div *ngIf=\"model.id\" class=\"mat-headline-5 no-margin label\">{{ model.name || model.fullName || label }}</div>\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host .breadcrumb,:host .body{display:flex;flex-direction:row;align-items:center}:host .breadcrumb{position:relative;top:5px}:host .body{min-height:40px}:host .body>*:not(:last-child){margin-right:5px}:host .body .label,:host .body .newLabel{flex:1}@media screen and (max-width: 600px){:host .body{flex-direction:column;align-items:flex-start}:host .body>*:not(:last-child){margin-bottom:10px!important}:host .body mat-icon{display:none}}\n"] }]
|
|
6038
5925
|
}], propDecorators: { currentBaseUrl: [{
|
|
6039
5926
|
type: Input
|
|
6040
5927
|
}], isPanel: [{
|
|
@@ -6060,20 +5947,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
6060
5947
|
type: Input
|
|
6061
5948
|
}] } });
|
|
6062
5949
|
|
|
6063
|
-
class NaturalDetailHeaderModule {
|
|
6064
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDetailHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6065
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalDetailHeaderModule, declarations: [NaturalDetailHeaderComponent], imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule, MatIconModule], exports: [NaturalDetailHeaderComponent] }); }
|
|
6066
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDetailHeaderModule, imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule, MatIconModule] }); }
|
|
6067
|
-
}
|
|
6068
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDetailHeaderModule, decorators: [{
|
|
6069
|
-
type: NgModule,
|
|
6070
|
-
args: [{
|
|
6071
|
-
declarations: [NaturalDetailHeaderComponent],
|
|
6072
|
-
imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule, MatIconModule],
|
|
6073
|
-
exports: [NaturalDetailHeaderComponent],
|
|
6074
|
-
}]
|
|
6075
|
-
}] });
|
|
6076
|
-
|
|
6077
5950
|
/*
|
|
6078
5951
|
* Public API Surface of natural
|
|
6079
5952
|
*/
|
|
@@ -6223,11 +6096,20 @@ class TypeSelectComponent extends NaturalAbstractController {
|
|
|
6223
6096
|
}
|
|
6224
6097
|
}
|
|
6225
6098
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeSelectComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6226
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeSelectComponent, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\" *ngIf=\"configuration.operators\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-selection-list *ngIf=\"requireValueCtrl\" [formControl]=\"valueCtrl\">\n <mat-list-option *ngFor=\"let item of items\" [value]=\"getId(item)\" checkboxPosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n </mat-selection-list>\n</form>\n", dependencies: [{ kind: "
|
|
6099
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeSelectComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "list", first: true, predicate: MatSelectionList, descendants: true }], usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\" *ngIf=\"configuration.operators\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-selection-list *ngIf=\"requireValueCtrl\" [formControl]=\"valueCtrl\">\n <mat-list-option *ngFor=\"let item of items\" [value]=\"getId(item)\" checkboxPosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n </mat-selection-list>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i5.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }] }); }
|
|
6227
6100
|
}
|
|
6228
6101
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeSelectComponent, decorators: [{
|
|
6229
6102
|
type: Component,
|
|
6230
|
-
args: [{
|
|
6103
|
+
args: [{ standalone: true, imports: [
|
|
6104
|
+
FormsModule,
|
|
6105
|
+
ReactiveFormsModule,
|
|
6106
|
+
NgIf,
|
|
6107
|
+
MatFormFieldModule,
|
|
6108
|
+
MatSelectModule,
|
|
6109
|
+
NgFor,
|
|
6110
|
+
MatOptionModule,
|
|
6111
|
+
MatListModule,
|
|
6112
|
+
], template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\" *ngIf=\"configuration.operators\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-selection-list *ngIf=\"requireValueCtrl\" [formControl]=\"valueCtrl\">\n <mat-list-option *ngFor=\"let item of items\" [value]=\"getId(item)\" checkboxPosition=\"before\">\n {{ getDisplay(item) }}\n </mat-list-option>\n </mat-selection-list>\n</form>\n" }]
|
|
6231
6113
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
6232
6114
|
type: Inject,
|
|
6233
6115
|
args: [NATURAL_DROPDOWN_DATA]
|
|
@@ -6486,12 +6368,12 @@ class AbstractSelect extends NaturalAbstractController {
|
|
|
6486
6368
|
}
|
|
6487
6369
|
this.internalCtrl.updateValueAndValidity();
|
|
6488
6370
|
}
|
|
6489
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: AbstractSelect, deps: [{ token:
|
|
6371
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: AbstractSelect, deps: [{ token: i2$3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
6490
6372
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: AbstractSelect, inputs: { placeholder: "placeholder", required: "required", navigateTo: "navigateTo", clearLabel: "clearLabel", showIcon: "showIcon", icon: "icon", displayWith: "displayWith", disabled: "disabled" }, outputs: { selectionChange: "selectionChange", blur: "blur" }, usesInheritance: true, ngImport: i0 }); }
|
|
6491
6373
|
}
|
|
6492
6374
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: AbstractSelect, decorators: [{
|
|
6493
6375
|
type: Directive
|
|
6494
|
-
}], ctorParameters: function () { return [{ type:
|
|
6376
|
+
}], ctorParameters: function () { return [{ type: i2$3.NgControl, decorators: [{
|
|
6495
6377
|
type: Optional
|
|
6496
6378
|
}, {
|
|
6497
6379
|
type: Self
|
|
@@ -6751,11 +6633,28 @@ class NaturalSelectComponent extends AbstractSelect {
|
|
|
6751
6633
|
return this.variablesManager.variables.value;
|
|
6752
6634
|
}
|
|
6753
6635
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6754
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSelectComponent, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", filter: "filter", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"!loading && showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <div class=\"loading-wrapper\" matIconPrefix *ngIf=\"loading\">\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\"></mat-progress-spinner>\n </div>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n *ngIf=\"internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n (click)=\"clear()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.dirty && internalCtrl.enabled && optionRequired\"\n (click)=\"reset()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"undo\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.pristine && internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "
|
|
6636
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSelectComponent, isStandalone: true, selector: "natural-select", inputs: { service: "service", optionRequired: "optionRequired", searchField: "searchField", searchOperator: "searchOperator", filter: "filter", disabled: "disabled" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "autoTrigger", first: true, predicate: MatAutocompleteTrigger, descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"!loading && showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <div class=\"loading-wrapper\" matIconPrefix *ngIf=\"loading\">\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\"></mat-progress-spinner>\n </div>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n *ngIf=\"internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n (click)=\"clear()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.dirty && internalCtrl.enabled && optionRequired\"\n (click)=\"reset()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"undo\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.pristine && internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1$8.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$8.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
6755
6637
|
}
|
|
6756
6638
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectComponent, decorators: [{
|
|
6757
6639
|
type: Component,
|
|
6758
|
-
args: [{ selector: 'natural-select',
|
|
6640
|
+
args: [{ selector: 'natural-select', standalone: true, imports: [
|
|
6641
|
+
MatAutocompleteModule,
|
|
6642
|
+
NgFor,
|
|
6643
|
+
MatOptionModule,
|
|
6644
|
+
NgTemplateOutlet,
|
|
6645
|
+
NgIf,
|
|
6646
|
+
MatFormFieldModule,
|
|
6647
|
+
MatInputModule,
|
|
6648
|
+
FormsModule,
|
|
6649
|
+
ReactiveFormsModule,
|
|
6650
|
+
MatIconModule,
|
|
6651
|
+
NaturalIconDirective,
|
|
6652
|
+
MatProgressSpinnerModule,
|
|
6653
|
+
MatButtonModule,
|
|
6654
|
+
MatTooltipModule,
|
|
6655
|
+
RouterLink,
|
|
6656
|
+
AsyncPipe,
|
|
6657
|
+
], template: "<!-- Autocomplete menu -->\n<mat-autocomplete\n #ac=\"matAutocomplete\"\n (optionSelected)=\"propagateValue($event.option.value)\"\n [displayWith]=\"getDisplayFn()\"\n panelWidth=\"auto !important\"\n>\n <mat-option *ngFor=\"let item of items | async\" [value]=\"item\">\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultACItem\"\n ></ng-template>\n </mat-option>\n <div *ngIf=\"moreNbItems > 0\" class=\"mat-caption\" i18n style=\"padding: 5px 10px\"\n >{{ moreNbItems }} \u00E9l\u00E9ment(s) suppl\u00E9mentaire(s)</div\n >\n</mat-autocomplete>\n\n<ng-template #defaultACItem let-item=\"item\">\n <span>{{ getDisplayFn()(item) }}</span>\n</ng-template>\n\n<!-- Input for autocomplete -->\n<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <input\n (blur)=\"onBlur()\"\n (change)=\"onInternalFormChange()\"\n (click)=\"autoTrigger.openPanel()\"\n (focus)=\"startSearch()\"\n (keydown.esc)=\"reset()\"\n (keydown.enter)=\"onKeyEnter()\"\n [formControl]=\"internalCtrl\"\n [matAutocomplete]=\"ac\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n [errorStateMatcher]=\"matcher\"\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"!loading && showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <div class=\"loading-wrapper\" matIconPrefix *ngIf=\"loading\">\n <mat-progress-spinner [diameter]=\"21\" [strokeWidth]=\"5\" mode=\"indeterminate\"></mat-progress-spinner>\n </div>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n *ngIf=\"internalCtrl.pristine && internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n (click)=\"clear()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.dirty && internalCtrl.enabled && optionRequired\"\n (click)=\"reset()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"undo\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.pristine && internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showClearButton()\" class=\"external-buttons\">\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host>mat-autocomplete{margin-bottom:0!important}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}:host .loading-wrapper{display:flex;justify-content:center;align-items:center;width:48px;height:48px}\n"] }]
|
|
6759
6658
|
}], propDecorators: { autoTrigger: [{
|
|
6760
6659
|
type: ViewChild,
|
|
6761
6660
|
args: [MatAutocompleteTrigger]
|
|
@@ -6798,11 +6697,20 @@ class TypeNaturalSelectComponent extends AbstractAssociationSelectComponent {
|
|
|
6798
6697
|
return selectedName;
|
|
6799
6698
|
}
|
|
6800
6699
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeNaturalSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6801
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeNaturalSelectComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-select\n style=\"display: inline\"\n *ngIf=\"configuration && requireValueCtrl\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n ></natural-select>\n</form>\n", dependencies: [{ kind: "
|
|
6700
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeNaturalSelectComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-select\n style=\"display: inline\"\n *ngIf=\"configuration && requireValueCtrl\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n ></natural-select>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] }); }
|
|
6802
6701
|
}
|
|
6803
6702
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeNaturalSelectComponent, decorators: [{
|
|
6804
6703
|
type: Component,
|
|
6805
|
-
args: [{
|
|
6704
|
+
args: [{ standalone: true, imports: [
|
|
6705
|
+
FormsModule,
|
|
6706
|
+
ReactiveFormsModule,
|
|
6707
|
+
MatFormFieldModule,
|
|
6708
|
+
MatSelectModule,
|
|
6709
|
+
NgFor,
|
|
6710
|
+
MatOptionModule,
|
|
6711
|
+
NgIf,
|
|
6712
|
+
NaturalSelectComponent,
|
|
6713
|
+
], template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-select\n style=\"display: inline\"\n *ngIf=\"configuration && requireValueCtrl\"\n [formControl]=\"valueCtrl\"\n [placeholder]=\"configuration.placeholder\"\n [service]=\"configuration.service\"\n [filter]=\"configuration.filter\"\n ></natural-select>\n</form>\n" }]
|
|
6806
6714
|
}] });
|
|
6807
6715
|
|
|
6808
6716
|
let InvalidWithValueStateMatcher$1 = class InvalidWithValueStateMatcher {
|
|
@@ -6845,11 +6753,11 @@ class TypeTextComponent {
|
|
|
6845
6753
|
}
|
|
6846
6754
|
}
|
|
6847
6755
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeTextComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6848
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeTextComponent, selector: "ng-component", ngImport: i0, template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type:
|
|
6756
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeTextComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
6849
6757
|
}
|
|
6850
6758
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeTextComponent, decorators: [{
|
|
6851
6759
|
type: Component,
|
|
6852
|
-
args: [{ template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
|
|
6760
|
+
args: [{ standalone: true, imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, NgIf], template: "<mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"formCtrl\"\n [required]=\"true\"\n matInput\n type=\"text\"\n />\n <mat-error *ngIf=\"formCtrl.hasError('required')\">*</mat-error>\n</mat-form-field>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
|
|
6853
6761
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
6854
6762
|
type: Inject,
|
|
6855
6763
|
args: [NATURAL_DROPDOWN_DATA]
|
|
@@ -6938,11 +6846,20 @@ class TypeNumberComponent {
|
|
|
6938
6846
|
}
|
|
6939
6847
|
}
|
|
6940
6848
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeNumberComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6941
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeNumberComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "
|
|
6849
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeNumberComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.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$3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
6942
6850
|
}
|
|
6943
6851
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeNumberComponent, decorators: [{
|
|
6944
6852
|
type: Component,
|
|
6945
|
-
args: [{
|
|
6853
|
+
args: [{ standalone: true, imports: [
|
|
6854
|
+
FormsModule,
|
|
6855
|
+
ReactiveFormsModule,
|
|
6856
|
+
MatFormFieldModule,
|
|
6857
|
+
MatSelectModule,
|
|
6858
|
+
NgFor,
|
|
6859
|
+
MatOptionModule,
|
|
6860
|
+
MatInputModule,
|
|
6861
|
+
NgIf,
|
|
6862
|
+
], template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 4em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label i18n>Valeur</mat-label>\n <input\n (keydown.enter)=\"close()\"\n [errorStateMatcher]=\"matcher\"\n [formControl]=\"valueCtrl\"\n [attr.max]=\"configuration.max\"\n [attr.min]=\"configuration.min\"\n [required]=\"true\"\n [step]=\"configuration.step\"\n matInput\n type=\"number\"\n />\n <mat-error *ngIf=\"valueCtrl.hasError('min')\">< {{ configuration.min }}</mat-error>\n <mat-error *ngIf=\"valueCtrl.hasError('max')\">> {{ configuration.max }}</mat-error>\n </mat-form-field>\n</form>\n", styles: [":host input::-webkit-outer-spin-button,:host input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
|
|
6946
6863
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
6947
6864
|
type: Inject,
|
|
6948
6865
|
args: [NATURAL_DROPDOWN_DATA]
|
|
@@ -7210,10 +7127,11 @@ class NaturalHierarchicSelectorService {
|
|
|
7210
7127
|
return node || new HierarchicModelNode(item, configuration);
|
|
7211
7128
|
}
|
|
7212
7129
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7213
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorService }); }
|
|
7130
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorService, providedIn: 'root' }); }
|
|
7214
7131
|
}
|
|
7215
7132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorService, decorators: [{
|
|
7216
|
-
type: Injectable
|
|
7133
|
+
type: Injectable,
|
|
7134
|
+
args: [{ providedIn: 'root' }]
|
|
7217
7135
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
7218
7136
|
|
|
7219
7137
|
class FacetSelectorComponent {
|
|
@@ -7249,11 +7167,11 @@ class FacetSelectorComponent {
|
|
|
7249
7167
|
return true;
|
|
7250
7168
|
}
|
|
7251
7169
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: FacetSelectorComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: NaturalDropdownRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7252
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: FacetSelectorComponent, selector: "ng-component", ngImport: i0, template: "<div class=\"dropdown-title mat-body-2\" *ngIf=\"data.title\">{{ data.title }}</div>\n<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{padding:5px;font-variant:all-small-caps;font-size:18px;opacity:.7}\n"], dependencies: [{ kind: "directive", type:
|
|
7170
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: FacetSelectorComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<div class=\"dropdown-title mat-body-2\" *ngIf=\"data.title\">{{ data.title }}</div>\n<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{padding:5px;font-variant:all-small-caps;font-size:18px;opacity:.7}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i5.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i5.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
|
|
7253
7171
|
}
|
|
7254
7172
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: FacetSelectorComponent, decorators: [{
|
|
7255
7173
|
type: Component,
|
|
7256
|
-
args: [{ template: "<div class=\"dropdown-title mat-body-2\" *ngIf=\"data.title\">{{ data.title }}</div>\n<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{padding:5px;font-variant:all-small-caps;font-size:18px;opacity:.7}\n"] }]
|
|
7174
|
+
args: [{ standalone: true, imports: [NgIf, MatListModule, NgFor], template: "<div class=\"dropdown-title mat-body-2\" *ngIf=\"data.title\">{{ data.title }}</div>\n<mat-nav-list>\n <mat-list-item (click)=\"selection = facet; close()\" *ngFor=\"let facet of facets\">\n <a>{{ facet.display }}</a>\n </mat-list-item>\n</mat-nav-list>\n", styles: [".mat-nav-list{padding:0}.dropdown-title{padding:5px;font-variant:all-small-caps;font-size:18px;opacity:.7}\n"] }]
|
|
7257
7175
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
7258
7176
|
type: Inject,
|
|
7259
7177
|
args: [NATURAL_DROPDOWN_DATA]
|
|
@@ -7548,11 +7466,21 @@ class NaturalInputComponent {
|
|
|
7548
7466
|
return selection;
|
|
7549
7467
|
}
|
|
7550
7468
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalInputComponent, deps: [{ token: i0.ElementRef }, { token: NaturalDropdownService }, { token: i0.EnvironmentInjector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7551
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalInputComponent, selector: "natural-input", inputs: { placeholder: "placeholder", searchFieldName: "searchFieldName", selection: "selection", facets: "facets", dropdownTitle: "dropdownTitle" }, outputs: { selectionChange: "selectionChange", cleared: "cleared" }, host: { listeners: { "focus": "focus()" } }, viewQueries: [{ propertyName: "ripple", first: true, predicate: MatRipple, descendants: true, static: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <mat-icon *ngIf=\"!facet && !selection\" naturalIcon=\"search\" matIconPrefix></mat-icon>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"undo\"></mat-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}\n"], dependencies: [{ kind: "
|
|
7469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalInputComponent, isStandalone: true, selector: "natural-input", inputs: { placeholder: "placeholder", searchFieldName: "searchFieldName", selection: "selection", facets: "facets", dropdownTitle: "dropdownTitle" }, outputs: { selectionChange: "selectionChange", cleared: "cleared" }, host: { listeners: { "focus": "focus()" } }, viewQueries: [{ propertyName: "ripple", first: true, predicate: MatRipple, descendants: true, static: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <mat-icon *ngIf=\"!facet && !selection\" naturalIcon=\"search\" matIconPrefix></mat-icon>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"undo\"></mat-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i1$3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] }); }
|
|
7552
7470
|
}
|
|
7553
7471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalInputComponent, decorators: [{
|
|
7554
7472
|
type: Component,
|
|
7555
|
-
args: [{ selector: 'natural-input',
|
|
7473
|
+
args: [{ selector: 'natural-input', standalone: true, imports: [
|
|
7474
|
+
MatFormFieldModule,
|
|
7475
|
+
MatRippleModule,
|
|
7476
|
+
NgIf,
|
|
7477
|
+
MatInputModule,
|
|
7478
|
+
FormsModule,
|
|
7479
|
+
ReactiveFormsModule,
|
|
7480
|
+
MatIconModule,
|
|
7481
|
+
NaturalIconDirective,
|
|
7482
|
+
MatButtonModule,
|
|
7483
|
+
], template: "<!-- click condition should match to allow click action only when no other button is visible -->\n<mat-form-field #field matRipple (click)=\"!selection && !(facet && !selection) ? openDropdown() : null\">\n <mat-label *ngIf=\"facet\">{{ facet.display }}</mat-label>\n <mat-label *ngIf=\"!facet\">{{ placeholder }}</mat-label>\n\n <input\n #input\n (blur)=\"search($event)\"\n (keydown.enter)=\"search($event)\"\n [attr.size]=\"length\"\n [errorStateMatcher]=\"errorMatcher\"\n [formControl]=\"formCtrl\"\n [readonly]=\"(isDropdown() && !!selection) || isFlag()\"\n autocomplete=\"off\"\n matInput\n type=\"text\"\n />\n\n <mat-icon *ngIf=\"!facet && !selection\" naturalIcon=\"search\" matIconPrefix></mat-icon>\n\n <button (click)=\"clear()\" *ngIf=\"selection\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n\n <button (click)=\"clear()\" *ngIf=\"facet && !selection\" mat-icon-button matIconSuffix>\n <mat-icon naturalIcon=\"undo\"></mat-icon>\n </button>\n</mat-form-field>\n<div class=\"hide\">{{ formCtrl.value ? formCtrl.value : facet ? facet.display : placeholder }}</div>\n", styles: [":host{position:relative;overflow:hidden;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;flex-direction:column}:host .hide{color:transparent;height:0;margin:0 50px 0 10px;font-size:inherit;white-space:nowrap;font-family:Roboto,Helvetica Neue,sans-serif}\n"] }]
|
|
7556
7484
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: NaturalDropdownService }, { type: i0.EnvironmentInjector }]; }, propDecorators: { ripple: [{
|
|
7557
7485
|
type: ViewChild,
|
|
7558
7486
|
args: [MatRipple, { static: true }]
|
|
@@ -7605,11 +7533,11 @@ class NaturalGroupComponent {
|
|
|
7605
7533
|
this.selectionChange.emit(this.innerSelections);
|
|
7606
7534
|
}
|
|
7607
7535
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7608
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalGroupComponent, selector: "natural-group", inputs: { dropdownTitle: "dropdownTitle", placeholder: "placeholder", facets: "facets", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "newValueInput", first: true, predicate: ["newValueInput"], descendants: true }], ngImport: i0, template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n [dropdownTitle]=\"dropdownTitle\"\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"], dependencies: [{ kind: "directive", type:
|
|
7536
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalGroupComponent, isStandalone: true, selector: "natural-group", inputs: { dropdownTitle: "dropdownTitle", placeholder: "placeholder", facets: "facets", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "newValueInput", first: true, predicate: ["newValueInput"], descendants: true }], ngImport: i0, template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n [dropdownTitle]=\"dropdownTitle\"\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NaturalInputComponent, selector: "natural-input", inputs: ["placeholder", "searchFieldName", "selection", "facets", "dropdownTitle"], outputs: ["selectionChange", "cleared"] }] }); }
|
|
7609
7537
|
}
|
|
7610
7538
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalGroupComponent, decorators: [{
|
|
7611
7539
|
type: Component,
|
|
7612
|
-
args: [{ selector: 'natural-group', template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n [dropdownTitle]=\"dropdownTitle\"\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"] }]
|
|
7540
|
+
args: [{ selector: 'natural-group', standalone: true, imports: [NgFor, NaturalInputComponent], template: "<natural-input\n (cleared)=\"removeInput(i)\"\n (selectionChange)=\"updateInput($event, i)\"\n *ngFor=\"let selection of innerSelections; let i = index\"\n [facets]=\"facets\"\n [selection]=\"selection\"\n></natural-input>\n\n<natural-input\n #newValueInput\n (selectionChange)=\"addInput($event)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n tabIndex=\"10\"\n cdkFocusInitial\n [dropdownTitle]=\"dropdownTitle\"\n></natural-input>\n", styles: [":host{display:flex;flex-direction:row;flex-wrap:wrap}:host natural-input{flex:auto;display:inline-flex;margin-right:10px;margin-bottom:10px}:host natural-input:last-of-type{flex:1;min-width:250px}\n"] }]
|
|
7613
7541
|
}], propDecorators: { newValueInput: [{
|
|
7614
7542
|
type: ViewChild,
|
|
7615
7543
|
args: ['newValueInput']
|
|
@@ -7687,12 +7615,23 @@ class NaturalSearchComponent {
|
|
|
7687
7615
|
this.selectionChange.emit([[]]);
|
|
7688
7616
|
}
|
|
7689
7617
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSearchComponent, deps: [{ token: i1$6.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7690
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSearchComponent, selector: "natural-search", inputs: { placeholder: "placeholder", facets: "facets", multipleGroups: "multipleGroups", dropdownTitle: "dropdownTitle", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"natural-search\" [ngClass]=\"{mobile: isMobile | async, hasMultipleGroups: innerSelections.length > 1}\">\n <div class=\"groupsWrapper\">\n <ng-container *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\">\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n ></natural-group>\n\n <div class=\"endOfRowButton\">\n <button\n (click)=\"removeGroup(i)\"\n *ngIf=\"innerSelections.length > 1\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n >\n <mat-icon naturalIcon=\"remove\"></mat-icon>\n </button>\n </div>\n </div>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n </ng-container>\n </div>\n\n <div class=\"endOfRowButton\">\n <button\n (click)=\"addGroup()\"\n *ngIf=\"multipleGroups\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Ajouter un groupe\"\n >\n <mat-icon naturalIcon=\"add\"></mat-icon>\n </button>\n\n <button\n (click)=\"clear()\"\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n </div>\n</div>\n", styles: [".natural-search{display:flex;flex-direction:row;align-items:flex-end}.natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1;min-width:0}.natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}.natural-search .groupWrapper natural-group{flex:1;max-width:100%}.natural-search .groupWrapper:last-of-type{margin-bottom:0}.natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center;margin-bottom:15px}.natural-search mat-divider{margin:-10px 0 10px}.natural-search.mobile .clear-button{display:none}.natural-search.mobile.hasMultipleGroups{flex-direction:column;align-items:stretch}.natural-search.mobile.hasMultipleGroups .endOfRowButton{flex-direction:row-reverse;margin-bottom:0}\n"], dependencies: [{ kind: "directive", type:
|
|
7618
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSearchComponent, isStandalone: true, selector: "natural-search", inputs: { placeholder: "placeholder", facets: "facets", multipleGroups: "multipleGroups", dropdownTitle: "dropdownTitle", selections: "selections" }, outputs: { selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"natural-search\" [ngClass]=\"{mobile: isMobile | async, hasMultipleGroups: innerSelections.length > 1}\">\n <div class=\"groupsWrapper\">\n <ng-container *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\">\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n ></natural-group>\n\n <div class=\"endOfRowButton\">\n <button\n (click)=\"removeGroup(i)\"\n *ngIf=\"innerSelections.length > 1\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n >\n <mat-icon naturalIcon=\"remove\"></mat-icon>\n </button>\n </div>\n </div>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n </ng-container>\n </div>\n\n <div class=\"endOfRowButton\">\n <button\n (click)=\"addGroup()\"\n *ngIf=\"multipleGroups\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Ajouter un groupe\"\n >\n <mat-icon naturalIcon=\"add\"></mat-icon>\n </button>\n\n <button\n (click)=\"clear()\"\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n </div>\n</div>\n", styles: [".natural-search{display:flex;flex-direction:row;align-items:flex-end}.natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1;min-width:0}.natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}.natural-search .groupWrapper natural-group{flex:1;max-width:100%}.natural-search .groupWrapper:last-of-type{margin-bottom:0}.natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center;margin-bottom:15px}.natural-search mat-divider{margin:-10px 0 10px}.natural-search.mobile .clear-button{display:none}.natural-search.mobile.hasMultipleGroups{flex-direction:column;align-items:stretch}.natural-search.mobile.hasMultipleGroups .endOfRowButton{flex-direction:row-reverse;margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: NaturalGroupComponent, selector: "natural-group", inputs: ["dropdownTitle", "placeholder", "facets", "selections"], outputs: ["selectionChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i5$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "pipe", type: AsyncPipe, name: "async" }] }); }
|
|
7691
7619
|
}
|
|
7692
7620
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSearchComponent, decorators: [{
|
|
7693
7621
|
type: Component,
|
|
7694
|
-
args: [{ selector: 'natural-search',
|
|
7695
|
-
|
|
7622
|
+
args: [{ selector: 'natural-search', standalone: true, imports: [
|
|
7623
|
+
NgClass,
|
|
7624
|
+
NgFor,
|
|
7625
|
+
NaturalGroupComponent,
|
|
7626
|
+
NgIf,
|
|
7627
|
+
MatButtonModule,
|
|
7628
|
+
MatTooltipModule,
|
|
7629
|
+
MatIconModule,
|
|
7630
|
+
NaturalIconDirective,
|
|
7631
|
+
MatDividerModule,
|
|
7632
|
+
AsyncPipe,
|
|
7633
|
+
], template: "<div class=\"natural-search\" [ngClass]=\"{mobile: isMobile | async, hasMultipleGroups: innerSelections.length > 1}\">\n <div class=\"groupsWrapper\">\n <ng-container *ngFor=\"let groupSelections of innerSelections; let i = index; let last = last\">\n <div class=\"groupWrapper\">\n <natural-group\n (selectionChange)=\"updateGroup($event, i)\"\n [facets]=\"facets\"\n [placeholder]=\"placeholder\"\n [selections]=\"groupSelections\"\n [dropdownTitle]=\"dropdownTitle\"\n ></natural-group>\n\n <div class=\"endOfRowButton\">\n <button\n (click)=\"removeGroup(i)\"\n *ngIf=\"innerSelections.length > 1\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Supprimer ce groupe\"\n >\n <mat-icon naturalIcon=\"remove\"></mat-icon>\n </button>\n </div>\n </div>\n <mat-divider *ngIf=\"!last\"></mat-divider>\n </ng-container>\n </div>\n\n <div class=\"endOfRowButton\">\n <button\n (click)=\"addGroup()\"\n *ngIf=\"multipleGroups\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Ajouter un groupe\"\n >\n <mat-icon naturalIcon=\"add\"></mat-icon>\n </button>\n\n <button\n (click)=\"clear()\"\n mat-icon-button\n class=\"clear-button\"\n i18n-matTooltip\n matTooltip=\"Annuler la recherche\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n </div>\n</div>\n", styles: [".natural-search{display:flex;flex-direction:row;align-items:flex-end}.natural-search .groupsWrapper{display:flex;flex-direction:column;flex:1;min-width:0}.natural-search .groupWrapper{display:flex;flex-direction:row;margin-bottom:10px;min-width:0}.natural-search .groupWrapper natural-group{flex:1;max-width:100%}.natural-search .groupWrapper:last-of-type{margin-bottom:0}.natural-search .endOfRowButton{height:53px;display:flex;flex-direction:row;align-items:center;margin-bottom:15px}.natural-search mat-divider{margin:-10px 0 10px}.natural-search.mobile .clear-button{display:none}.natural-search.mobile.hasMultipleGroups{flex-direction:column;align-items:stretch}.natural-search.mobile.hasMultipleGroups .endOfRowButton{flex-direction:row-reverse;margin-bottom:0}\n"] }]
|
|
7634
|
+
}], ctorParameters: function () { return [{ type: i1$6.BreakpointObserver }]; }, propDecorators: { placeholder: [{
|
|
7696
7635
|
type: Input
|
|
7697
7636
|
}], facets: [{
|
|
7698
7637
|
type: Input
|
|
@@ -8023,11 +7962,23 @@ class NaturalHierarchicSelectorComponent extends NaturalAbstractController {
|
|
|
8023
7962
|
return model.__typename + '-' + model.id;
|
|
8024
7963
|
}
|
|
8025
7964
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorComponent, deps: [{ token: NaturalHierarchicSelectorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8026
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: { displayWith: "displayWith", config: "config", multiple: "multiple", selected: "selected", allowUnselect: "allowUnselect", filters: "filters", searchFacets: "searchFacets", searchSelections: "searchSelections" }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <mat-icon\n *ngIf=\"!node.loading\"\n [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n ></mat-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <mat-icon\n *ngIf=\"node.node.config.icon\"\n [naturalIcon]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></mat-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n <mat-chip-option\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <mat-icon *ngIf=\"node.config.icon\" [naturalIcon]=\"node.config.icon\"></mat-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <mat-icon matChipRemove naturalIcon=\"cancel\"></mat-icon>\n </mat-chip-option>\n </mat-chip-listbox>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "
|
|
7965
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHierarchicSelectorComponent, isStandalone: true, selector: "natural-hierarchic-selector", inputs: { displayWith: "displayWith", config: "config", multiple: "multiple", selected: "selected", allowUnselect: "allowUnselect", filters: "filters", searchFacets: "searchFacets", searchSelections: "searchSelections" }, outputs: { searchSelectionChange: "searchSelectionChange", selectionChange: "selectionChange" }, providers: [NaturalHierarchicSelectorService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <mat-icon\n *ngIf=\"!node.loading\"\n [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n ></mat-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <mat-icon\n *ngIf=\"node.node.config.icon\"\n [naturalIcon]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></mat-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n <mat-chip-option\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <mat-icon *ngIf=\"node.config.icon\" [naturalIcon]=\"node.config.icon\"></mat-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <mat-icon matChipRemove naturalIcon=\"cancel\"></mat-icon>\n </mat-chip-option>\n </mat-chip-listbox>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"], dependencies: [{ kind: "component", type: NaturalSearchComponent, selector: "natural-search", inputs: ["placeholder", "facets", "multipleGroups", "dropdownTitle", "selections"], outputs: ["selectionChange"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i3$3.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i3$3.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i3$3.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i3$3.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i3$3.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i7.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7$2.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i7$2.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["color", "disabled", "disableRipple", "tabIndex", "selectable", "selected"], outputs: ["selectionChange"] }, { kind: "directive", type: i7$2.MatChipRemove, selector: "[matChipRemove]" }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
|
|
8027
7966
|
}
|
|
8028
7967
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorComponent, decorators: [{
|
|
8029
7968
|
type: Component,
|
|
8030
|
-
args: [{ selector: 'natural-hierarchic-selector', providers: [NaturalHierarchicSelectorService],
|
|
7969
|
+
args: [{ selector: 'natural-hierarchic-selector', providers: [NaturalHierarchicSelectorService], standalone: true, imports: [
|
|
7970
|
+
NaturalSearchComponent,
|
|
7971
|
+
NgIf,
|
|
7972
|
+
MatProgressSpinnerModule,
|
|
7973
|
+
MatTreeModule,
|
|
7974
|
+
NgClass,
|
|
7975
|
+
MatButtonModule,
|
|
7976
|
+
MatIconModule,
|
|
7977
|
+
NaturalIconDirective,
|
|
7978
|
+
MatCheckboxModule,
|
|
7979
|
+
MatChipsModule,
|
|
7980
|
+
NgFor,
|
|
7981
|
+
], template: "<div [style.margin-bottom.px]=\"20\">\n <natural-search\n (selectionChange)=\"search($event)\"\n [facets]=\"searchFacets\"\n [selections]=\"searchSelections\"\n ></natural-search>\n</div>\n\n<div class=\"body\">\n <mat-progress-spinner\n *ngIf=\"loading\"\n [diameter]=\"36\"\n mode=\"indeterminate\"\n style=\"margin: 10px\"\n ></mat-progress-spinner>\n\n <mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <mat-tree-node *matTreeNodeDef=\"let node\" [ngClass]=\"{leaf: !node.expandable}\" matTreeNodePadding>\n <button\n (click)=\"loadChildren(node)\"\n *ngIf=\"node.expandable\"\n [attr.aria-label]=\"'toggle ' + node.name\"\n mat-icon-button\n matTreeNodeToggle\n >\n <mat-progress-spinner\n *ngIf=\"node.loading\"\n [diameter]=\"24\"\n [strokeWidth]=\"5\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n\n <mat-icon\n *ngIf=\"!node.loading\"\n [naturalIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\"\n ></mat-icon>\n </button>\n\n <mat-checkbox\n (change)=\"toggleFlatNode(node)\"\n [checked]=\"flatNodesSelection.isSelected(node)\"\n [disabled]=\"!isNodeTogglable(node)\"\n style=\"margin-right: 10px\"\n >\n <mat-icon\n *ngIf=\"node.node.config.icon\"\n [naturalIcon]=\"node.node.config.icon\"\n style=\"margin-right: 10px\"\n ></mat-icon>\n <span>{{ node.name }}</span>\n </mat-checkbox>\n </mat-tree-node>\n </mat-tree>\n\n <mat-chip-listbox aria-orientation=\"vertical\" class=\"mat-mdc-chip-set-stacked\">\n <mat-chip-option\n (removed)=\"unselectModelNode(node)\"\n *ngFor=\"let node of selectedNodes\"\n [removable]=\"true\"\n [selectable]=\"false\"\n >\n <mat-icon *ngIf=\"node.config.icon\" [naturalIcon]=\"node.config.icon\"></mat-icon>\n <div class=\"mat-body chip-label\">{{ node.model.name || node.model.fullName }}</div>\n <mat-icon matChipRemove naturalIcon=\"cancel\"></mat-icon>\n </mat-chip-option>\n </mat-chip-listbox>\n</div>\n\n<div *ngIf=\"!loading && !dataSource.data.length\" class=\"margin-v\" i18n>Aucun r\u00E9sultat</div>\n", styles: [":host{display:block}:host ul,:host li{-webkit-margin-before:0;-webkit-margin-after:0;list-style-type:none}:host mat-icon{width:18px;height:18px;font-size:18px}:host .mat-tree-node.leaf{margin-left:48px}:host .body{display:flex;flex-direction:row;justify-content:space-between}:host .body mat-tree{flex:66}:host .body mat-chip-listbox{flex:33}:host mat-tree{flex-shrink:0}:host mat-chip-listbox{margin-left:10px}\n"] }]
|
|
8031
7982
|
}], ctorParameters: function () { return [{ type: NaturalHierarchicSelectorService }]; }, propDecorators: { displayWith: [{
|
|
8032
7983
|
type: Input
|
|
8033
7984
|
}], config: [{
|
|
@@ -8101,11 +8052,20 @@ class TypeHierarchicSelectorComponent extends AbstractAssociationSelectComponent
|
|
|
8101
8052
|
return selection[this.configuration.key].length ? selection : null;
|
|
8102
8053
|
}
|
|
8103
8054
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeHierarchicSelectorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
8104
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeHierarchicSelectorComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-hierarchic-selector\n *ngIf=\"requireValueCtrl\"\n (selectionChange)=\"selectionChange($event)\"\n [config]=\"configuration.config\"\n [filters]=\"configuration.filters\"\n [multiple]=\"true\"\n [selected]=\"valueCtrl.value || {}\"\n style=\"margin-right: 20px\"\n ></natural-hierarchic-selector>\n</form>\n", dependencies: [{ kind: "
|
|
8055
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeHierarchicSelectorComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-hierarchic-selector\n *ngIf=\"requireValueCtrl\"\n (selectionChange)=\"selectionChange($event)\"\n [config]=\"configuration.config\"\n [filters]=\"configuration.filters\"\n [multiple]=\"true\"\n [selected]=\"valueCtrl.value || {}\"\n style=\"margin-right: 20px\"\n ></natural-hierarchic-selector>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }] }); }
|
|
8105
8056
|
}
|
|
8106
8057
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeHierarchicSelectorComponent, decorators: [{
|
|
8107
8058
|
type: Component,
|
|
8108
|
-
args: [{
|
|
8059
|
+
args: [{ standalone: true, imports: [
|
|
8060
|
+
FormsModule,
|
|
8061
|
+
ReactiveFormsModule,
|
|
8062
|
+
MatFormFieldModule,
|
|
8063
|
+
MatSelectModule,
|
|
8064
|
+
NgFor,
|
|
8065
|
+
MatOptionModule,
|
|
8066
|
+
NgIf,
|
|
8067
|
+
NaturalHierarchicSelectorComponent,
|
|
8068
|
+
], template: "<form [formGroup]=\"form\">\n <mat-form-field style=\"max-width: 7em; margin-right: 1em\">\n <mat-label i18n=\"Mathematical operator < > =\">Op\u00E9rateur</mat-label>\n <mat-select [formControl]=\"operatorCtrl\" [required]=\"true\">\n <mat-option *ngFor=\"let item of operators\" [value]=\"item.key\">\n {{ item.label }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <natural-hierarchic-selector\n *ngIf=\"requireValueCtrl\"\n (selectionChange)=\"selectionChange($event)\"\n [config]=\"configuration.config\"\n [filters]=\"configuration.filters\"\n [multiple]=\"true\"\n [selected]=\"valueCtrl.value || {}\"\n style=\"margin-right: 20px\"\n ></natural-hierarchic-selector>\n</form>\n" }]
|
|
8109
8069
|
}] });
|
|
8110
8070
|
|
|
8111
8071
|
class InvalidWithValueStateMatcher {
|
|
@@ -8219,11 +8179,11 @@ class TypeDateRangeComponent {
|
|
|
8219
8179
|
}
|
|
8220
8180
|
}
|
|
8221
8181
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeDateRangeComponent, deps: [{ token: NATURAL_DROPDOWN_DATA }, { token: i1$3.DateAdapter }, { token: MAT_DATE_FORMATS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeDateRangeComponent, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "
|
|
8182
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: TypeDateRangeComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
8223
8183
|
}
|
|
8224
8184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: TypeDateRangeComponent, decorators: [{
|
|
8225
8185
|
type: Component,
|
|
8226
|
-
args: [{ template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n" }]
|
|
8186
|
+
args: [{ standalone: true, imports: [FormsModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatDatepickerModule, NgIf], template: "<form [formGroup]=\"form\">\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"from\"\n placeholder=\"De\"\n [formControl]=\"fromCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"from\"></mat-datepicker-toggle>\n <mat-datepicker #from></mat-datepicker>\n <mat-error *ngIf=\"form.hasError('toGreaterThanFrom')\"\n >{{ render(fromCtrl.value) }} > {{ render(toCtrl.value) }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\"\n >< {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\"\n >> {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"fromCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n\n <mat-form-field>\n <input\n matInput\n [matDatepicker]=\"to\"\n placeholder=\"\u00E0\"\n [formControl]=\"toCtrl\"\n [errorStateMatcher]=\"matcher\"\n [min]=\"configuration.min\"\n [max]=\"configuration.max\"\n />\n <mat-datepicker-toggle matIconSuffix [for]=\"to\"></mat-datepicker-toggle>\n <mat-datepicker #to></mat-datepicker>\n <mat-error *ngIf=\"toCtrl.hasError('min') && !form.hasError('toGreaterThanFrom')\">\n < {{ configuration.min }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('max') && !form.hasError('toGreaterThanFrom')\">\n > {{ configuration.max }}</mat-error\n >\n <mat-error *ngIf=\"toCtrl.hasError('required')\">*</mat-error>\n </mat-form-field>\n</form>\n" }]
|
|
8227
8187
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8228
8188
|
type: Inject,
|
|
8229
8189
|
args: [NATURAL_DROPDOWN_DATA]
|
|
@@ -8232,638 +8192,187 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
8232
8192
|
args: [MAT_DATE_FORMATS]
|
|
8233
8193
|
}] }]; } });
|
|
8234
8194
|
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
NaturalGroupComponent,
|
|
8239
|
-
NaturalInputComponent,
|
|
8240
|
-
NaturalDropdownContainerComponent,
|
|
8241
|
-
FacetSelectorComponent], imports: [CommonModule,
|
|
8242
|
-
MatButtonModule,
|
|
8243
|
-
MatIconModule,
|
|
8244
|
-
MatInputModule,
|
|
8245
|
-
MatListModule,
|
|
8246
|
-
MatMenuModule,
|
|
8247
|
-
MatRippleModule,
|
|
8248
|
-
MatTooltipModule,
|
|
8249
|
-
NaturalIconModule,
|
|
8250
|
-
OverlayModule,
|
|
8251
|
-
PortalModule,
|
|
8252
|
-
ReactiveFormsModule], exports: [NaturalSearchComponent] }); }
|
|
8253
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSearchModule, providers: [
|
|
8254
|
-
{
|
|
8255
|
-
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
8256
|
-
useValue: { appearance: 'fill' },
|
|
8257
|
-
},
|
|
8258
|
-
], imports: [CommonModule,
|
|
8259
|
-
MatButtonModule,
|
|
8260
|
-
MatIconModule,
|
|
8261
|
-
MatInputModule,
|
|
8262
|
-
MatListModule,
|
|
8263
|
-
MatMenuModule,
|
|
8264
|
-
MatRippleModule,
|
|
8265
|
-
MatTooltipModule,
|
|
8266
|
-
NaturalIconModule,
|
|
8267
|
-
OverlayModule,
|
|
8268
|
-
PortalModule,
|
|
8269
|
-
ReactiveFormsModule] }); }
|
|
8270
|
-
}
|
|
8271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSearchModule, decorators: [{
|
|
8272
|
-
type: NgModule,
|
|
8273
|
-
args: [{
|
|
8274
|
-
declarations: [
|
|
8275
|
-
NaturalSearchComponent,
|
|
8276
|
-
NaturalGroupComponent,
|
|
8277
|
-
NaturalInputComponent,
|
|
8278
|
-
NaturalDropdownContainerComponent,
|
|
8279
|
-
FacetSelectorComponent,
|
|
8280
|
-
],
|
|
8281
|
-
exports: [NaturalSearchComponent],
|
|
8282
|
-
imports: [
|
|
8283
|
-
CommonModule,
|
|
8284
|
-
MatButtonModule,
|
|
8285
|
-
MatIconModule,
|
|
8286
|
-
MatInputModule,
|
|
8287
|
-
MatListModule,
|
|
8288
|
-
MatMenuModule,
|
|
8289
|
-
MatRippleModule,
|
|
8290
|
-
MatTooltipModule,
|
|
8291
|
-
NaturalIconModule,
|
|
8292
|
-
OverlayModule,
|
|
8293
|
-
PortalModule,
|
|
8294
|
-
ReactiveFormsModule,
|
|
8295
|
-
],
|
|
8296
|
-
providers: [
|
|
8297
|
-
{
|
|
8298
|
-
provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
|
|
8299
|
-
useValue: { appearance: 'fill' },
|
|
8300
|
-
},
|
|
8301
|
-
],
|
|
8302
|
-
}]
|
|
8303
|
-
}] });
|
|
8195
|
+
/*
|
|
8196
|
+
* Public API Surface of natural-search dropdown components
|
|
8197
|
+
*/
|
|
8304
8198
|
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
this.config = defaults(data, { multiple: true, allowUnselect: true });
|
|
8309
|
-
this.searchSelectionsOutput = this.config.searchSelections;
|
|
8199
|
+
function acceptType(accept, type, filename) {
|
|
8200
|
+
if (!accept.trim()) {
|
|
8201
|
+
return true;
|
|
8310
8202
|
}
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8203
|
+
type = type.toLowerCase();
|
|
8204
|
+
filename = filename.toLowerCase();
|
|
8205
|
+
return accept.split(',').some(mimeOrExtension => {
|
|
8206
|
+
mimeOrExtension = mimeOrExtension.trim().toLowerCase();
|
|
8207
|
+
if (mimeOrExtension.startsWith('.')) {
|
|
8208
|
+
return filename.endsWith(mimeOrExtension);
|
|
8209
|
+
}
|
|
8210
|
+
else {
|
|
8211
|
+
// Transform `*` into `.*`
|
|
8212
|
+
const pattern = mimeOrExtension.replace(/\*/g, '.*');
|
|
8213
|
+
return type.match(pattern);
|
|
8214
|
+
}
|
|
8215
|
+
});
|
|
8216
|
+
}
|
|
8217
|
+
function isFileInput(elm) {
|
|
8218
|
+
const type = elm.getAttribute('type');
|
|
8219
|
+
return elm.tagName.toLowerCase() === 'input' && !!type && type.toLowerCase() === 'file';
|
|
8220
|
+
}
|
|
8221
|
+
let initialTouchStartY = 0;
|
|
8222
|
+
let initialTouchStartX = 0;
|
|
8223
|
+
function detectSwipe(event) {
|
|
8224
|
+
const touches = 'changedTouches' in event ? event.changedTouches : null;
|
|
8225
|
+
if (!touches) {
|
|
8226
|
+
return false;
|
|
8227
|
+
}
|
|
8228
|
+
if (event.type === 'touchstart') {
|
|
8229
|
+
initialTouchStartX = touches[0].clientX;
|
|
8230
|
+
initialTouchStartY = touches[0].clientY;
|
|
8231
|
+
return true; // don't block event default
|
|
8232
|
+
}
|
|
8233
|
+
else {
|
|
8234
|
+
// prevent scroll from triggering event
|
|
8235
|
+
if (event.type === 'touchend') {
|
|
8236
|
+
const currentX = touches[0].clientX;
|
|
8237
|
+
const currentY = touches[0].clientY;
|
|
8238
|
+
if (Math.abs(currentX - initialTouchStartX) > 20 || Math.abs(currentY - initialTouchStartY) > 20) {
|
|
8239
|
+
event.stopPropagation();
|
|
8240
|
+
if (event.cancelable) {
|
|
8241
|
+
event.preventDefault();
|
|
8242
|
+
}
|
|
8243
|
+
return false;
|
|
8244
|
+
}
|
|
8245
|
+
}
|
|
8246
|
+
return true;
|
|
8247
|
+
}
|
|
8248
|
+
}
|
|
8249
|
+
function createInvisibleFileInputWrap(document) {
|
|
8250
|
+
const fileElem = createFileInput(document);
|
|
8251
|
+
const label = document.createElement('label');
|
|
8252
|
+
label.innerHTML = 'upload';
|
|
8253
|
+
label.style.visibility = 'hidden';
|
|
8254
|
+
label.style.position = 'absolute';
|
|
8255
|
+
label.style.overflow = 'hidden';
|
|
8256
|
+
label.style.width = '0px';
|
|
8257
|
+
label.style.height = '0px';
|
|
8258
|
+
label.style.border = 'none';
|
|
8259
|
+
label.style.margin = '0px';
|
|
8260
|
+
label.style.padding = '0px';
|
|
8261
|
+
label.setAttribute('tabindex', '-1');
|
|
8262
|
+
label.appendChild(fileElem);
|
|
8263
|
+
return label;
|
|
8264
|
+
}
|
|
8265
|
+
function createFileInput(document) {
|
|
8266
|
+
const fileElem = document.createElement('input');
|
|
8267
|
+
fileElem.type = 'file';
|
|
8268
|
+
return fileElem;
|
|
8269
|
+
}
|
|
8270
|
+
function isDirectory(file) {
|
|
8271
|
+
return blobText(file.slice(0, 1)).then(text => {
|
|
8272
|
+
// Firefox will return empty string for a folder, so we must check that special case.
|
|
8273
|
+
// That means that any empty file will incorrectly be interpreted as a folder on all
|
|
8274
|
+
// browsers, but that's tolerable because there is no real use-case to upload an empty file.
|
|
8275
|
+
return text !== '';
|
|
8276
|
+
}, () => false);
|
|
8277
|
+
}
|
|
8278
|
+
/**
|
|
8279
|
+
* This is a ponyfill for `Blob.text()`, because Safari 13 and 14 do not support it, https://caniuse.com/?search=blob.text,
|
|
8280
|
+
* and we try our best not to break iPhone users too much.
|
|
8281
|
+
*/
|
|
8282
|
+
function blobText(blob) {
|
|
8283
|
+
return new Promise((resolve, reject) => {
|
|
8284
|
+
const reader = new FileReader();
|
|
8285
|
+
reader.onload = () => {
|
|
8286
|
+
resolve(reader.result);
|
|
8315
8287
|
};
|
|
8316
|
-
|
|
8288
|
+
reader.onerror = reject;
|
|
8289
|
+
reader.readAsText(blob);
|
|
8290
|
+
});
|
|
8291
|
+
}
|
|
8292
|
+
function stopEvent(event) {
|
|
8293
|
+
event.preventDefault();
|
|
8294
|
+
event.stopPropagation();
|
|
8295
|
+
}
|
|
8296
|
+
function fileListToArray(fileList) {
|
|
8297
|
+
const result = [];
|
|
8298
|
+
for (let i = 0; i < fileList.length; i++) {
|
|
8299
|
+
const file = fileList.item(i);
|
|
8300
|
+
if (file) {
|
|
8301
|
+
result.push(file);
|
|
8302
|
+
}
|
|
8317
8303
|
}
|
|
8318
|
-
|
|
8319
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHierarchicSelectorDialogComponent, selector: "ng-component", ngImport: i0, template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n ></natural-hierarchic-selector>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-dialog-close mat-button i18n>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }] }); }
|
|
8304
|
+
return result;
|
|
8320
8305
|
}
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
class NaturalHierarchicSelectorDialogService {
|
|
8330
|
-
constructor(dialog) {
|
|
8331
|
-
this.dialog = dialog;
|
|
8306
|
+
function dataTransferItemListToArray(items) {
|
|
8307
|
+
const result = [];
|
|
8308
|
+
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
8309
|
+
for (let i = 0; i < items.length; i++) {
|
|
8310
|
+
const file = items[i].getAsFile();
|
|
8311
|
+
if (file) {
|
|
8312
|
+
result.push(file);
|
|
8313
|
+
}
|
|
8332
8314
|
}
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
return
|
|
8315
|
+
return result;
|
|
8316
|
+
}
|
|
8317
|
+
function eventToFiles(event) {
|
|
8318
|
+
const transfer = 'dataTransfer' in event ? event.dataTransfer : null;
|
|
8319
|
+
if (transfer?.files?.length) {
|
|
8320
|
+
return fileListToArray(transfer.files);
|
|
8339
8321
|
}
|
|
8340
|
-
|
|
8341
|
-
|
|
8322
|
+
if (transfer) {
|
|
8323
|
+
return dataTransferItemListToArray(transfer.items);
|
|
8324
|
+
}
|
|
8325
|
+
return [];
|
|
8342
8326
|
}
|
|
8343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorDialogService, decorators: [{
|
|
8344
|
-
type: Injectable
|
|
8345
|
-
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
8346
8327
|
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
}
|
|
8380
|
-
|
|
8381
|
-
|
|
8328
|
+
// @dynamic
|
|
8329
|
+
class NaturalFileService {
|
|
8330
|
+
constructor(document) {
|
|
8331
|
+
this.document = document;
|
|
8332
|
+
/**
|
|
8333
|
+
* Allow to subscribe to selected files in the entire application. So a
|
|
8334
|
+
* child component is able to receive a file that was dropped on a parent
|
|
8335
|
+
* component.
|
|
8336
|
+
*
|
|
8337
|
+
* Typically useful to drop a file on the entire screen, instead of a precise
|
|
8338
|
+
* component.
|
|
8339
|
+
*/
|
|
8340
|
+
this.filesChanged = new Subject();
|
|
8341
|
+
}
|
|
8342
|
+
getDownloadLink(model) {
|
|
8343
|
+
const window = this.document.defaultView;
|
|
8344
|
+
if (!window) {
|
|
8345
|
+
throw new Error('Cannot build download link because `window` is undefined');
|
|
8346
|
+
}
|
|
8347
|
+
const hostname = window.location.protocol + '//' + window.location.hostname;
|
|
8348
|
+
if (model?.__typename === 'File') {
|
|
8349
|
+
return hostname + '/api/file/' + model.id;
|
|
8350
|
+
}
|
|
8351
|
+
else if (model?.__typename === 'AccountingDocument') {
|
|
8352
|
+
return hostname + '/api/accounting-document/' + model.id;
|
|
8353
|
+
}
|
|
8354
|
+
else if (model?.__typename === 'Image') {
|
|
8355
|
+
return hostname + '/api/image/' + model.id;
|
|
8356
|
+
}
|
|
8357
|
+
return null;
|
|
8358
|
+
}
|
|
8359
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8360
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileService, providedIn: 'root' }); }
|
|
8361
|
+
}
|
|
8362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileService, decorators: [{
|
|
8363
|
+
type: Injectable,
|
|
8382
8364
|
args: [{
|
|
8383
|
-
|
|
8384
|
-
imports: [
|
|
8385
|
-
CommonModule,
|
|
8386
|
-
FormsModule,
|
|
8387
|
-
CdkTreeModule,
|
|
8388
|
-
MatCheckboxModule,
|
|
8389
|
-
MatFormFieldModule,
|
|
8390
|
-
MatButtonModule,
|
|
8391
|
-
MatTreeModule,
|
|
8392
|
-
MatIconModule,
|
|
8393
|
-
MatInputModule,
|
|
8394
|
-
MatProgressSpinnerModule,
|
|
8395
|
-
MatDialogModule,
|
|
8396
|
-
NaturalIconModule,
|
|
8397
|
-
MatChipsModule,
|
|
8398
|
-
NaturalSearchModule,
|
|
8399
|
-
NaturalCommonModule,
|
|
8400
|
-
],
|
|
8401
|
-
providers: [NaturalHierarchicSelectorDialogService],
|
|
8402
|
-
exports: [NaturalHierarchicSelectorComponent],
|
|
8365
|
+
providedIn: 'root',
|
|
8403
8366
|
}]
|
|
8404
|
-
}]
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
*/
|
|
8367
|
+
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
8368
|
+
type: Inject,
|
|
8369
|
+
args: [DOCUMENT]
|
|
8370
|
+
}] }]; } });
|
|
8409
8371
|
|
|
8410
|
-
function defaultDisplayFn(item) {
|
|
8411
|
-
if (!item) {
|
|
8412
|
-
return '';
|
|
8413
|
-
}
|
|
8414
|
-
return item.fullName || item.name || item.iban || item.id || item;
|
|
8415
|
-
}
|
|
8416
8372
|
/**
|
|
8417
|
-
*
|
|
8418
|
-
* <natural-select [config]="myConfig" [(ngModel)]="amazingModel"
|
|
8419
|
-
* (ngModelChange)=amazingChangeFn($event)></natural-select>
|
|
8373
|
+
* A master base set of logic intended to support file select/drag/drop operations
|
|
8420
8374
|
*
|
|
8421
|
-
*
|
|
8422
|
-
*
|
|
8423
|
-
* Placeholder :
|
|
8424
|
-
* <natural-select placeholder="amazing placeholder">
|
|
8425
|
-
*/
|
|
8426
|
-
class NaturalSelectHierarchicComponent extends AbstractSelect {
|
|
8427
|
-
constructor(hierarchicSelectorDialogService, ngControl) {
|
|
8428
|
-
super(ngControl);
|
|
8429
|
-
this.hierarchicSelectorDialogService = hierarchicSelectorDialogService;
|
|
8430
|
-
/**
|
|
8431
|
-
* Configuration for hierarchic relations
|
|
8432
|
-
*
|
|
8433
|
-
* It should be an array with at least one element with `selectableAtKey` configured, otherwise the selector will never open.
|
|
8434
|
-
*/
|
|
8435
|
-
this.config = null;
|
|
8436
|
-
/**
|
|
8437
|
-
* The selected value as an object. The internal value is `internalCtrl.value`, and that is a string.
|
|
8438
|
-
*/
|
|
8439
|
-
this.value = null;
|
|
8440
|
-
/**
|
|
8441
|
-
* On Firefox, the combination of <input (focus)> event and dialog opening cause some strange bug where focus event is called multiple
|
|
8442
|
-
* times This prevents it.
|
|
8443
|
-
*/
|
|
8444
|
-
this.lockOpenDialog = false;
|
|
8445
|
-
}
|
|
8446
|
-
/**
|
|
8447
|
-
* Very important to return something, above all if [select]='displayedValue' attribute value is used
|
|
8448
|
-
*/
|
|
8449
|
-
getDisplayFn() {
|
|
8450
|
-
if (this.displayWith) {
|
|
8451
|
-
return this.displayWith;
|
|
8452
|
-
}
|
|
8453
|
-
return defaultDisplayFn;
|
|
8454
|
-
}
|
|
8455
|
-
/**
|
|
8456
|
-
* Override parent because our internalCtrl store the textual representation as string instead of raw Literal
|
|
8457
|
-
*/
|
|
8458
|
-
writeValue(value) {
|
|
8459
|
-
this.value = value;
|
|
8460
|
-
this.internalCtrl.setValue(this.getDisplayFn()(this.value));
|
|
8461
|
-
}
|
|
8462
|
-
openDialog() {
|
|
8463
|
-
if (this.internalCtrl.disabled) {
|
|
8464
|
-
return;
|
|
8465
|
-
}
|
|
8466
|
-
if (this.lockOpenDialog) {
|
|
8467
|
-
return;
|
|
8468
|
-
}
|
|
8469
|
-
const selectAtKey = this.getSelectKey();
|
|
8470
|
-
if (!selectAtKey || !this.config) {
|
|
8471
|
-
return;
|
|
8472
|
-
}
|
|
8473
|
-
this.lockOpenDialog = true;
|
|
8474
|
-
if (this.onTouched) {
|
|
8475
|
-
this.onTouched();
|
|
8476
|
-
}
|
|
8477
|
-
const selected = {};
|
|
8478
|
-
if (this.internalCtrl.value) {
|
|
8479
|
-
selected[selectAtKey] = [this.value];
|
|
8480
|
-
}
|
|
8481
|
-
const hierarchicConfig = {
|
|
8482
|
-
hierarchicConfig: this.config,
|
|
8483
|
-
hierarchicSelection: selected,
|
|
8484
|
-
hierarchicFilters: this.filters,
|
|
8485
|
-
multiple: false,
|
|
8486
|
-
};
|
|
8487
|
-
const dialogFocus = { restoreFocus: false };
|
|
8488
|
-
this.hierarchicSelectorDialogService
|
|
8489
|
-
.open(hierarchicConfig, dialogFocus)
|
|
8490
|
-
.afterClosed()
|
|
8491
|
-
.subscribe(result => {
|
|
8492
|
-
this.lockOpenDialog = false;
|
|
8493
|
-
if (result && result.hierarchicSelection) {
|
|
8494
|
-
const selection = result.hierarchicSelection;
|
|
8495
|
-
// Find the only selection amongst all possible keys
|
|
8496
|
-
const keyWithSelection = Object.keys(selection).find(key => selection[key][0]);
|
|
8497
|
-
const singleSelection = keyWithSelection ? selection[keyWithSelection][0] : null;
|
|
8498
|
-
this.writeValue(singleSelection);
|
|
8499
|
-
this.propagateValue(singleSelection);
|
|
8500
|
-
}
|
|
8501
|
-
});
|
|
8502
|
-
}
|
|
8503
|
-
showSelectButton() {
|
|
8504
|
-
return !!(this.internalCtrl?.enabled && this.selectLabel && this.getSelectKey());
|
|
8505
|
-
}
|
|
8506
|
-
getSelectKey() {
|
|
8507
|
-
return this.config?.filter(c => !!c.selectableAtKey)[0]?.selectableAtKey;
|
|
8508
|
-
}
|
|
8509
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: [{ token: NaturalHierarchicSelectorDialogService }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSelectHierarchicComponent, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i4$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
8511
|
-
}
|
|
8512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectHierarchicComponent, decorators: [{
|
|
8513
|
-
type: Component,
|
|
8514
|
-
args: [{ selector: 'natural-select-hierarchic', template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"] }]
|
|
8515
|
-
}], ctorParameters: function () { return [{ type: NaturalHierarchicSelectorDialogService }, { type: i3.NgControl, decorators: [{
|
|
8516
|
-
type: Optional
|
|
8517
|
-
}, {
|
|
8518
|
-
type: Self
|
|
8519
|
-
}] }]; }, propDecorators: { selectLabel: [{
|
|
8520
|
-
type: Input
|
|
8521
|
-
}], config: [{
|
|
8522
|
-
type: Input
|
|
8523
|
-
}], filters: [{
|
|
8524
|
-
type: Input
|
|
8525
|
-
}] } });
|
|
8526
|
-
|
|
8527
|
-
class NaturalSelectEnumComponent extends AbstractSelect {
|
|
8528
|
-
constructor(enumService, ngControl) {
|
|
8529
|
-
super(ngControl);
|
|
8530
|
-
this.enumService = enumService;
|
|
8531
|
-
/**
|
|
8532
|
-
* Whether the user should be allowed to select multiple options
|
|
8533
|
-
*/
|
|
8534
|
-
this.multiple = false;
|
|
8535
|
-
}
|
|
8536
|
-
ngOnInit() {
|
|
8537
|
-
super.ngOnInit();
|
|
8538
|
-
this.items = this.enumService.get(this.enumName);
|
|
8539
|
-
}
|
|
8540
|
-
getDisplayFn() {
|
|
8541
|
-
throw new Error('This should never be called');
|
|
8542
|
-
}
|
|
8543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectEnumComponent, deps: [{ token: NaturalEnumService }, { token: i3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8544
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSelectEnumComponent, selector: "natural-select-enum", inputs: { enumName: "enumName", nullLabel: "nullLabel", optionDisabled: "optionDisabled", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] }); }
|
|
8545
|
-
}
|
|
8546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectEnumComponent, decorators: [{
|
|
8547
|
-
type: Component,
|
|
8548
|
-
args: [{ selector: 'natural-select-enum', template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
8549
|
-
}], ctorParameters: function () { return [{ type: NaturalEnumService }, { type: i3.NgControl, decorators: [{
|
|
8550
|
-
type: Optional
|
|
8551
|
-
}, {
|
|
8552
|
-
type: Self
|
|
8553
|
-
}] }]; }, propDecorators: { enumName: [{
|
|
8554
|
-
type: Input,
|
|
8555
|
-
args: [{ required: true }]
|
|
8556
|
-
}], nullLabel: [{
|
|
8557
|
-
type: Input
|
|
8558
|
-
}], optionDisabled: [{
|
|
8559
|
-
type: Input
|
|
8560
|
-
}], multiple: [{
|
|
8561
|
-
type: Input
|
|
8562
|
-
}] } });
|
|
8563
|
-
|
|
8564
|
-
class NaturalSelectModule {
|
|
8565
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8566
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectModule, declarations: [NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent], imports: [CommonModule,
|
|
8567
|
-
MatAutocompleteModule,
|
|
8568
|
-
MatButtonModule,
|
|
8569
|
-
MatFormFieldModule,
|
|
8570
|
-
MatInputModule,
|
|
8571
|
-
MatProgressSpinnerModule,
|
|
8572
|
-
MatSelectModule,
|
|
8573
|
-
MatTooltipModule,
|
|
8574
|
-
NaturalCommonModule,
|
|
8575
|
-
NaturalIconModule,
|
|
8576
|
-
ReactiveFormsModule,
|
|
8577
|
-
RouterModule,
|
|
8578
|
-
MatIconModule], exports: [NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent] }); }
|
|
8579
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectModule, imports: [CommonModule,
|
|
8580
|
-
MatAutocompleteModule,
|
|
8581
|
-
MatButtonModule,
|
|
8582
|
-
MatFormFieldModule,
|
|
8583
|
-
MatInputModule,
|
|
8584
|
-
MatProgressSpinnerModule,
|
|
8585
|
-
MatSelectModule,
|
|
8586
|
-
MatTooltipModule,
|
|
8587
|
-
NaturalCommonModule,
|
|
8588
|
-
NaturalIconModule,
|
|
8589
|
-
ReactiveFormsModule,
|
|
8590
|
-
RouterModule,
|
|
8591
|
-
MatIconModule] }); }
|
|
8592
|
-
}
|
|
8593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectModule, decorators: [{
|
|
8594
|
-
type: NgModule,
|
|
8595
|
-
args: [{
|
|
8596
|
-
declarations: [NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent],
|
|
8597
|
-
imports: [
|
|
8598
|
-
CommonModule,
|
|
8599
|
-
MatAutocompleteModule,
|
|
8600
|
-
MatButtonModule,
|
|
8601
|
-
MatFormFieldModule,
|
|
8602
|
-
MatInputModule,
|
|
8603
|
-
MatProgressSpinnerModule,
|
|
8604
|
-
MatSelectModule,
|
|
8605
|
-
MatTooltipModule,
|
|
8606
|
-
NaturalCommonModule,
|
|
8607
|
-
NaturalIconModule,
|
|
8608
|
-
ReactiveFormsModule,
|
|
8609
|
-
RouterModule,
|
|
8610
|
-
MatIconModule,
|
|
8611
|
-
],
|
|
8612
|
-
exports: [NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent],
|
|
8613
|
-
}]
|
|
8614
|
-
}] });
|
|
8615
|
-
|
|
8616
|
-
const components = [
|
|
8617
|
-
TypeNumberComponent,
|
|
8618
|
-
TypeSelectComponent,
|
|
8619
|
-
TypeDateComponent,
|
|
8620
|
-
TypeDateRangeComponent,
|
|
8621
|
-
TypeNaturalSelectComponent,
|
|
8622
|
-
TypeTextComponent,
|
|
8623
|
-
TypeHierarchicSelectorComponent,
|
|
8624
|
-
];
|
|
8625
|
-
class NaturalDropdownComponentsModule {
|
|
8626
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDropdownComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
8627
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalDropdownComponentsModule, declarations: [TypeNumberComponent,
|
|
8628
|
-
TypeSelectComponent,
|
|
8629
|
-
TypeDateComponent,
|
|
8630
|
-
TypeDateRangeComponent,
|
|
8631
|
-
TypeNaturalSelectComponent,
|
|
8632
|
-
TypeTextComponent,
|
|
8633
|
-
TypeHierarchicSelectorComponent], imports: [CommonModule,
|
|
8634
|
-
FormsModule,
|
|
8635
|
-
MatFormFieldModule,
|
|
8636
|
-
ReactiveFormsModule,
|
|
8637
|
-
MatButtonModule,
|
|
8638
|
-
MatInputModule,
|
|
8639
|
-
MatListModule,
|
|
8640
|
-
MatCheckboxModule,
|
|
8641
|
-
MatDatepickerModule,
|
|
8642
|
-
MatSelectModule,
|
|
8643
|
-
NaturalSelectModule,
|
|
8644
|
-
NaturalHierarchicSelectorModule], exports: [TypeNumberComponent,
|
|
8645
|
-
TypeSelectComponent,
|
|
8646
|
-
TypeDateComponent,
|
|
8647
|
-
TypeDateRangeComponent,
|
|
8648
|
-
TypeNaturalSelectComponent,
|
|
8649
|
-
TypeTextComponent,
|
|
8650
|
-
TypeHierarchicSelectorComponent] }); }
|
|
8651
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDropdownComponentsModule, imports: [CommonModule,
|
|
8652
|
-
FormsModule,
|
|
8653
|
-
MatFormFieldModule,
|
|
8654
|
-
ReactiveFormsModule,
|
|
8655
|
-
MatButtonModule,
|
|
8656
|
-
MatInputModule,
|
|
8657
|
-
MatListModule,
|
|
8658
|
-
MatCheckboxModule,
|
|
8659
|
-
MatDatepickerModule,
|
|
8660
|
-
MatSelectModule,
|
|
8661
|
-
NaturalSelectModule,
|
|
8662
|
-
NaturalHierarchicSelectorModule] }); }
|
|
8663
|
-
}
|
|
8664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDropdownComponentsModule, decorators: [{
|
|
8665
|
-
type: NgModule,
|
|
8666
|
-
args: [{
|
|
8667
|
-
declarations: [...components],
|
|
8668
|
-
exports: [...components],
|
|
8669
|
-
imports: [
|
|
8670
|
-
CommonModule,
|
|
8671
|
-
FormsModule,
|
|
8672
|
-
MatFormFieldModule,
|
|
8673
|
-
ReactiveFormsModule,
|
|
8674
|
-
MatButtonModule,
|
|
8675
|
-
MatInputModule,
|
|
8676
|
-
MatListModule,
|
|
8677
|
-
MatCheckboxModule,
|
|
8678
|
-
MatDatepickerModule,
|
|
8679
|
-
MatSelectModule,
|
|
8680
|
-
NaturalSelectModule,
|
|
8681
|
-
NaturalHierarchicSelectorModule,
|
|
8682
|
-
],
|
|
8683
|
-
}]
|
|
8684
|
-
}] });
|
|
8685
|
-
|
|
8686
|
-
/*
|
|
8687
|
-
* Public API Surface of natural-search dropdown components
|
|
8688
|
-
*/
|
|
8689
|
-
|
|
8690
|
-
function acceptType(accept, type, filename) {
|
|
8691
|
-
if (!accept.trim()) {
|
|
8692
|
-
return true;
|
|
8693
|
-
}
|
|
8694
|
-
type = type.toLowerCase();
|
|
8695
|
-
filename = filename.toLowerCase();
|
|
8696
|
-
return accept.split(',').some(mimeOrExtension => {
|
|
8697
|
-
mimeOrExtension = mimeOrExtension.trim().toLowerCase();
|
|
8698
|
-
if (mimeOrExtension.startsWith('.')) {
|
|
8699
|
-
return filename.endsWith(mimeOrExtension);
|
|
8700
|
-
}
|
|
8701
|
-
else {
|
|
8702
|
-
// Transform `*` into `.*`
|
|
8703
|
-
const pattern = mimeOrExtension.replace(/\*/g, '.*');
|
|
8704
|
-
return type.match(pattern);
|
|
8705
|
-
}
|
|
8706
|
-
});
|
|
8707
|
-
}
|
|
8708
|
-
function isFileInput(elm) {
|
|
8709
|
-
const type = elm.getAttribute('type');
|
|
8710
|
-
return elm.tagName.toLowerCase() === 'input' && !!type && type.toLowerCase() === 'file';
|
|
8711
|
-
}
|
|
8712
|
-
let initialTouchStartY = 0;
|
|
8713
|
-
let initialTouchStartX = 0;
|
|
8714
|
-
function detectSwipe(event) {
|
|
8715
|
-
const touches = 'changedTouches' in event ? event.changedTouches : null;
|
|
8716
|
-
if (!touches) {
|
|
8717
|
-
return false;
|
|
8718
|
-
}
|
|
8719
|
-
if (event.type === 'touchstart') {
|
|
8720
|
-
initialTouchStartX = touches[0].clientX;
|
|
8721
|
-
initialTouchStartY = touches[0].clientY;
|
|
8722
|
-
return true; // don't block event default
|
|
8723
|
-
}
|
|
8724
|
-
else {
|
|
8725
|
-
// prevent scroll from triggering event
|
|
8726
|
-
if (event.type === 'touchend') {
|
|
8727
|
-
const currentX = touches[0].clientX;
|
|
8728
|
-
const currentY = touches[0].clientY;
|
|
8729
|
-
if (Math.abs(currentX - initialTouchStartX) > 20 || Math.abs(currentY - initialTouchStartY) > 20) {
|
|
8730
|
-
event.stopPropagation();
|
|
8731
|
-
if (event.cancelable) {
|
|
8732
|
-
event.preventDefault();
|
|
8733
|
-
}
|
|
8734
|
-
return false;
|
|
8735
|
-
}
|
|
8736
|
-
}
|
|
8737
|
-
return true;
|
|
8738
|
-
}
|
|
8739
|
-
}
|
|
8740
|
-
function createInvisibleFileInputWrap(document) {
|
|
8741
|
-
const fileElem = createFileInput(document);
|
|
8742
|
-
const label = document.createElement('label');
|
|
8743
|
-
label.innerHTML = 'upload';
|
|
8744
|
-
label.style.visibility = 'hidden';
|
|
8745
|
-
label.style.position = 'absolute';
|
|
8746
|
-
label.style.overflow = 'hidden';
|
|
8747
|
-
label.style.width = '0px';
|
|
8748
|
-
label.style.height = '0px';
|
|
8749
|
-
label.style.border = 'none';
|
|
8750
|
-
label.style.margin = '0px';
|
|
8751
|
-
label.style.padding = '0px';
|
|
8752
|
-
label.setAttribute('tabindex', '-1');
|
|
8753
|
-
label.appendChild(fileElem);
|
|
8754
|
-
return label;
|
|
8755
|
-
}
|
|
8756
|
-
function createFileInput(document) {
|
|
8757
|
-
const fileElem = document.createElement('input');
|
|
8758
|
-
fileElem.type = 'file';
|
|
8759
|
-
return fileElem;
|
|
8760
|
-
}
|
|
8761
|
-
function isDirectory(file) {
|
|
8762
|
-
return blobText(file.slice(0, 1)).then(text => {
|
|
8763
|
-
// Firefox will return empty string for a folder, so we must check that special case.
|
|
8764
|
-
// That means that any empty file will incorrectly be interpreted as a folder on all
|
|
8765
|
-
// browsers, but that's tolerable because there is no real use-case to upload an empty file.
|
|
8766
|
-
return text !== '';
|
|
8767
|
-
}, () => false);
|
|
8768
|
-
}
|
|
8769
|
-
/**
|
|
8770
|
-
* This is a ponyfill for `Blob.text()`, because Safari 13 and 14 do not support it, https://caniuse.com/?search=blob.text,
|
|
8771
|
-
* and we try our best not to break iPhone users too much.
|
|
8772
|
-
*/
|
|
8773
|
-
function blobText(blob) {
|
|
8774
|
-
return new Promise((resolve, reject) => {
|
|
8775
|
-
const reader = new FileReader();
|
|
8776
|
-
reader.onload = () => {
|
|
8777
|
-
resolve(reader.result);
|
|
8778
|
-
};
|
|
8779
|
-
reader.onerror = reject;
|
|
8780
|
-
reader.readAsText(blob);
|
|
8781
|
-
});
|
|
8782
|
-
}
|
|
8783
|
-
function stopEvent(event) {
|
|
8784
|
-
event.preventDefault();
|
|
8785
|
-
event.stopPropagation();
|
|
8786
|
-
}
|
|
8787
|
-
function fileListToArray(fileList) {
|
|
8788
|
-
const result = [];
|
|
8789
|
-
for (let i = 0; i < fileList.length; i++) {
|
|
8790
|
-
const file = fileList.item(i);
|
|
8791
|
-
if (file) {
|
|
8792
|
-
result.push(file);
|
|
8793
|
-
}
|
|
8794
|
-
}
|
|
8795
|
-
return result;
|
|
8796
|
-
}
|
|
8797
|
-
function dataTransferItemListToArray(items) {
|
|
8798
|
-
const result = [];
|
|
8799
|
-
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
8800
|
-
for (let i = 0; i < items.length; i++) {
|
|
8801
|
-
const file = items[i].getAsFile();
|
|
8802
|
-
if (file) {
|
|
8803
|
-
result.push(file);
|
|
8804
|
-
}
|
|
8805
|
-
}
|
|
8806
|
-
return result;
|
|
8807
|
-
}
|
|
8808
|
-
function eventToFiles(event) {
|
|
8809
|
-
const transfer = 'dataTransfer' in event ? event.dataTransfer : null;
|
|
8810
|
-
if (transfer?.files?.length) {
|
|
8811
|
-
return fileListToArray(transfer.files);
|
|
8812
|
-
}
|
|
8813
|
-
if (transfer) {
|
|
8814
|
-
return dataTransferItemListToArray(transfer.items);
|
|
8815
|
-
}
|
|
8816
|
-
return [];
|
|
8817
|
-
}
|
|
8818
|
-
|
|
8819
|
-
// @dynamic
|
|
8820
|
-
class NaturalFileService {
|
|
8821
|
-
constructor(document) {
|
|
8822
|
-
this.document = document;
|
|
8823
|
-
/**
|
|
8824
|
-
* Allow to subscribe to selected files in the entire application. So a
|
|
8825
|
-
* child component is able to receive a file that was dropped on a parent
|
|
8826
|
-
* component.
|
|
8827
|
-
*
|
|
8828
|
-
* Typically useful to drop a file on the entire screen, instead of a precise
|
|
8829
|
-
* component.
|
|
8830
|
-
*/
|
|
8831
|
-
this.filesChanged = new Subject();
|
|
8832
|
-
}
|
|
8833
|
-
getDownloadLink(model) {
|
|
8834
|
-
const window = this.document.defaultView;
|
|
8835
|
-
if (!window) {
|
|
8836
|
-
throw new Error('Cannot build download link because `window` is undefined');
|
|
8837
|
-
}
|
|
8838
|
-
const hostname = window.location.protocol + '//' + window.location.hostname;
|
|
8839
|
-
if (model?.__typename === 'File') {
|
|
8840
|
-
return hostname + '/api/file/' + model.id;
|
|
8841
|
-
}
|
|
8842
|
-
else if (model?.__typename === 'AccountingDocument') {
|
|
8843
|
-
return hostname + '/api/accounting-document/' + model.id;
|
|
8844
|
-
}
|
|
8845
|
-
else if (model?.__typename === 'Image') {
|
|
8846
|
-
return hostname + '/api/image/' + model.id;
|
|
8847
|
-
}
|
|
8848
|
-
return null;
|
|
8849
|
-
}
|
|
8850
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8851
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileService, providedIn: 'root' }); }
|
|
8852
|
-
}
|
|
8853
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileService, decorators: [{
|
|
8854
|
-
type: Injectable,
|
|
8855
|
-
args: [{
|
|
8856
|
-
providedIn: 'root',
|
|
8857
|
-
}]
|
|
8858
|
-
}], ctorParameters: function () { return [{ type: Document, decorators: [{
|
|
8859
|
-
type: Inject,
|
|
8860
|
-
args: [DOCUMENT]
|
|
8861
|
-
}] }]; } });
|
|
8862
|
-
|
|
8863
|
-
/**
|
|
8864
|
-
* A master base set of logic intended to support file select/drag/drop operations
|
|
8865
|
-
*
|
|
8866
|
-
* In most cases you probably want click-to-select and drag-to-select, so you should use:
|
|
8375
|
+
* In most cases you probably want click-to-select and drag-to-select, so you should use:
|
|
8867
8376
|
*
|
|
8868
8377
|
* <div naturalFileDrop [selectable]="true"></div>
|
|
8869
8378
|
*
|
|
@@ -9162,12 +8671,13 @@ class NaturalFileDropDirective extends NaturalAbstractFile {
|
|
|
9162
8671
|
(this.broadcast && this.naturalFileService.filesChanged.observed));
|
|
9163
8672
|
}
|
|
9164
8673
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileDropDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
9165
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: { fileOver: "fileOver" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)" }, properties: { "class.natural-file-over": "this.fileOverClass" } }, usesInheritance: true, ngImport: i0 }); }
|
|
8674
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFileDropDirective, isStandalone: true, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: { fileOver: "fileOver" }, host: { listeners: { "drop": "onDrop($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)" }, properties: { "class.natural-file-over": "this.fileOverClass" } }, usesInheritance: true, ngImport: i0 }); }
|
|
9166
8675
|
}
|
|
9167
8676
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileDropDirective, decorators: [{
|
|
9168
8677
|
type: Directive,
|
|
9169
8678
|
args: [{
|
|
9170
8679
|
selector: ':not([naturalFileSelect])[naturalFileDrop]',
|
|
8680
|
+
standalone: true,
|
|
9171
8681
|
}]
|
|
9172
8682
|
}], propDecorators: { fileOverClass: [{
|
|
9173
8683
|
type: HostBinding,
|
|
@@ -9199,19 +8709,20 @@ class NaturalFileSelectDirective extends NaturalAbstractFile {
|
|
|
9199
8709
|
this.selectable = true;
|
|
9200
8710
|
}
|
|
9201
8711
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileSelectDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
9202
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFileSelectDirective, selector: ":not([naturalFileDrop])[naturalFileSelect]", inputs: { selectable: "selectable" }, usesInheritance: true, ngImport: i0 }); }
|
|
8712
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFileSelectDirective, isStandalone: true, selector: ":not([naturalFileDrop])[naturalFileSelect]", inputs: { selectable: "selectable" }, usesInheritance: true, ngImport: i0 }); }
|
|
9203
8713
|
}
|
|
9204
8714
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileSelectDirective, decorators: [{
|
|
9205
8715
|
type: Directive,
|
|
9206
8716
|
args: [{
|
|
9207
8717
|
selector: ':not([naturalFileDrop])[naturalFileSelect]',
|
|
8718
|
+
standalone: true,
|
|
9208
8719
|
}]
|
|
9209
8720
|
}], propDecorators: { selectable: [{
|
|
9210
8721
|
type: Input
|
|
9211
8722
|
}] } });
|
|
9212
8723
|
|
|
9213
8724
|
// @dynamic
|
|
9214
|
-
class
|
|
8725
|
+
class NaturalFileComponent {
|
|
9215
8726
|
constructor(naturalFileService, alertService, sanitizer, document) {
|
|
9216
8727
|
this.naturalFileService = naturalFileService;
|
|
9217
8728
|
this.alertService = alertService;
|
|
@@ -9319,13 +8830,21 @@ class FileComponent {
|
|
|
9319
8830
|
reader.readAsBinaryString(file);
|
|
9320
8831
|
return subject.asObservable();
|
|
9321
8832
|
}
|
|
9322
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
9323
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type:
|
|
8833
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileComponent, deps: [{ token: NaturalFileService }, { token: NaturalAlertService }, { token: i2$5.DomSanitizer }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8834
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFileComponent, isStandalone: true, selector: "natural-file", inputs: { height: "height", action: "action", backgroundSize: "backgroundSize", accept: "accept", uploader: "uploader", model: "model", formCtrl: "formCtrl" }, outputs: { modelChange: "modelChange" }, host: { properties: { "style.height.px": "this.height" } }, usesOnChanges: true, ngImport: i0, template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <mat-icon [size]=\"height * 0.33\" naturalIcon=\"attachment\"></mat-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <mat-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" naturalIcon=\"cloud_upload\"></mat-icon>\n <mat-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" naturalIcon=\"get_app\"></mat-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;inset:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;inset:0;display:flex;justify-content:center;align-items:center}\n"], dependencies: [{ kind: "directive", type: NaturalFileDropDirective, selector: ":not([naturalFileSelect])[naturalFileDrop]", outputs: ["fileOver"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i1$3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "pipe", type: UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] }); }
|
|
9324
8835
|
}
|
|
9325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
8836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileComponent, decorators: [{
|
|
9326
8837
|
type: Component,
|
|
9327
|
-
args: [{ selector: 'natural-file',
|
|
9328
|
-
|
|
8838
|
+
args: [{ selector: 'natural-file', standalone: true, imports: [
|
|
8839
|
+
NaturalFileDropDirective,
|
|
8840
|
+
MatRippleModule,
|
|
8841
|
+
NgIf,
|
|
8842
|
+
MatIconModule,
|
|
8843
|
+
NaturalIconDirective,
|
|
8844
|
+
UpperCasePipe,
|
|
8845
|
+
NaturalCapitalizePipe,
|
|
8846
|
+
], template: "<a\n (fileChange)=\"upload($event)\"\n naturalFileDrop\n [selectable]=\"true\"\n [accept]=\"accept\"\n [attr.href]=\"getDownloadLink()\"\n [class.has-action]=\"!!action\"\n [class.suggest-upload]=\"!model && action === 'upload'\"\n [fileSelectionDisabled]=\"action !== 'upload'\"\n [matRippleDisabled]=\"!action\"\n [style.backgroundImage]=\"imagePreview\"\n [style.backgroundSize]=\"backgroundSize\"\n matRipple\n target=\"_blank\"\n>\n <div *ngIf=\"filePreview\" class=\"file-preview\">\n <mat-icon [size]=\"height * 0.33\" naturalIcon=\"attachment\"></mat-icon>\n {{ filePreview | uppercase }}\n </div>\n\n <div class=\"action-overlay\">\n <mat-icon *ngIf=\"action === 'upload'\" [size]=\"height * 0.66\" naturalIcon=\"cloud_upload\"></mat-icon>\n <mat-icon *ngIf=\"action === 'download'\" [size]=\"height * 0.66\" naturalIcon=\"get_app\"></mat-icon>\n {{ action | capitalize }}\n </div>\n</a>\n", styles: [":host{display:flex;flex-direction:row;overflow:hidden;position:relative}:host>a{position:relative;flex:1;background-position:center;background-repeat:no-repeat}:host>a.has-action{cursor:pointer}:host>a.has-action.suggest-upload .action-overlay{opacity:.66}:host>a.has-action:hover .action-overlay,:host>a.has-action.natural-file-over .action-overlay{opacity:1}:host .action-overlay,:host .file-preview{display:flex;flex-direction:column;position:absolute;inset:0;justify-content:center;align-items:center;font-size:36px;line-height:1.3em;text-align:center}:host .action-overlay{opacity:0}:host .action-overlay>div{opacity:0;position:absolute;inset:0;display:flex;justify-content:center;align-items:center}\n"] }]
|
|
8847
|
+
}], ctorParameters: function () { return [{ type: NaturalFileService }, { type: NaturalAlertService }, { type: i2$5.DomSanitizer }, { type: Document, decorators: [{
|
|
9329
8848
|
type: Inject,
|
|
9330
8849
|
args: [DOCUMENT]
|
|
9331
8850
|
}] }]; }, propDecorators: { height: [{
|
|
@@ -9349,21 +8868,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
9349
8868
|
type: Output
|
|
9350
8869
|
}] } });
|
|
9351
8870
|
|
|
9352
|
-
const declarations$2 = [NaturalFileDropDirective, NaturalFileSelectDirective, FileComponent];
|
|
9353
|
-
class NaturalFileModule {
|
|
9354
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9355
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileModule, declarations: [NaturalFileDropDirective, NaturalFileSelectDirective, FileComponent], imports: [CommonModule, NaturalIconModule, MatRippleModule, NaturalCommonModule, MatIconModule], exports: [NaturalFileDropDirective, NaturalFileSelectDirective, FileComponent] }); }
|
|
9356
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileModule, imports: [CommonModule, NaturalIconModule, MatRippleModule, NaturalCommonModule, MatIconModule] }); }
|
|
9357
|
-
}
|
|
9358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFileModule, decorators: [{
|
|
9359
|
-
type: NgModule,
|
|
9360
|
-
args: [{
|
|
9361
|
-
imports: [CommonModule, NaturalIconModule, MatRippleModule, NaturalCommonModule, MatIconModule],
|
|
9362
|
-
declarations: declarations$2,
|
|
9363
|
-
exports: declarations$2,
|
|
9364
|
-
}]
|
|
9365
|
-
}] });
|
|
9366
|
-
|
|
9367
8871
|
/*
|
|
9368
8872
|
* Public API Surface of natural
|
|
9369
8873
|
*/
|
|
@@ -9375,11 +8879,11 @@ class NaturalFixedButtonComponent {
|
|
|
9375
8879
|
this.disabled = false;
|
|
9376
8880
|
}
|
|
9377
8881
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9378
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: { icon: "icon", link: "link", color: "color", disabled: "disabled" }, ngImport: i0, template: "<button [color]=\"color\" [disabled]=\"disabled\" [routerLink]=\"link\" mat-fab>\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n</button>\n", styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"], dependencies: [{ kind: "
|
|
8882
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFixedButtonComponent, isStandalone: true, selector: "natural-fixed-button", inputs: { icon: "icon", link: "link", color: "color", disabled: "disabled" }, ngImport: i0, template: "<button [color]=\"color\" [disabled]=\"disabled\" [routerLink]=\"link\" mat-fab>\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n</button>\n", styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatFabButton, selector: "button[mat-fab]", inputs: ["disabled", "disableRipple", "color", "tabIndex", "extended"], exportAs: ["matButton"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }] }); }
|
|
9379
8883
|
}
|
|
9380
8884
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonComponent, decorators: [{
|
|
9381
8885
|
type: Component,
|
|
9382
|
-
args: [{ selector: 'natural-fixed-button', template: "<button [color]=\"color\" [disabled]=\"disabled\" [routerLink]=\"link\" mat-fab>\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n</button>\n", styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"] }]
|
|
8886
|
+
args: [{ selector: 'natural-fixed-button', standalone: true, imports: [MatButtonModule, RouterLink, MatIconModule, NaturalIconDirective], template: "<button [color]=\"color\" [disabled]=\"disabled\" [routerLink]=\"link\" mat-fab>\n <mat-icon [naturalIcon]=\"icon\"></mat-icon>\n</button>\n", styles: [":host{position:fixed!important;z-index:999;bottom:32px;right:32px}\n"] }]
|
|
9383
8887
|
}], propDecorators: { icon: [{
|
|
9384
8888
|
type: Input,
|
|
9385
8889
|
args: [{ required: true }]
|
|
@@ -9391,20 +8895,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
9391
8895
|
type: Input
|
|
9392
8896
|
}] } });
|
|
9393
8897
|
|
|
9394
|
-
class NaturalFixedButtonModule {
|
|
9395
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9396
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonModule, declarations: [NaturalFixedButtonComponent], imports: [CommonModule, RouterModule, MatButtonModule, MatIconModule, NaturalIconModule], exports: [NaturalFixedButtonComponent] }); }
|
|
9397
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonModule, imports: [CommonModule, RouterModule, MatButtonModule, MatIconModule, NaturalIconModule] }); }
|
|
9398
|
-
}
|
|
9399
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonModule, decorators: [{
|
|
9400
|
-
type: NgModule,
|
|
9401
|
-
args: [{
|
|
9402
|
-
declarations: [NaturalFixedButtonComponent],
|
|
9403
|
-
imports: [CommonModule, RouterModule, MatButtonModule, MatIconModule, NaturalIconModule],
|
|
9404
|
-
exports: [NaturalFixedButtonComponent],
|
|
9405
|
-
}]
|
|
9406
|
-
}] });
|
|
9407
|
-
|
|
9408
8898
|
/*
|
|
9409
8899
|
* Public API Surface of natural
|
|
9410
8900
|
*/
|
|
@@ -9437,46 +8927,119 @@ class NaturalFixedButtonDetailComponent {
|
|
|
9437
8927
|
this.delete.emit();
|
|
9438
8928
|
}
|
|
9439
8929
|
}
|
|
9440
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [{ token: i2$
|
|
9441
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFixedButtonDetailComponent, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, ngImport: i0, template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n", styles: [""], dependencies: [{ kind: "directive", type:
|
|
8930
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonDetailComponent, deps: [{ token: i2$4.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8931
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalFixedButtonDetailComponent, isStandalone: true, selector: "natural-fixed-button-detail", inputs: { model: "model", form: "form" }, outputs: { create: "create", delete: "delete" }, ngImport: i0, template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NaturalFixedButtonComponent, selector: "natural-fixed-button", inputs: ["icon", "link", "color", "disabled"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] }); }
|
|
8932
|
+
}
|
|
8933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalFixedButtonDetailComponent, decorators: [{
|
|
8934
|
+
type: Component,
|
|
8935
|
+
args: [{ selector: 'natural-fixed-button-detail', standalone: true, imports: [NgIf, NaturalFixedButtonComponent, MatTooltipModule], template: "<natural-fixed-button\n (click)=\"clickCreate()\"\n *ngIf=\"isCreation\"\n [disabled]=\"form.disabled\"\n [color]=\"form.valid ? 'accent' : 'warn'\"\n class=\"detail-speed-dial\"\n icon=\"save\"\n></natural-fixed-button>\n\n<natural-fixed-button\n (click)=\"clickDelete()\"\n *ngIf=\"!isCreation && (!model.permissions || model.permissions.delete)\"\n [disabled]=\"form.disabled\"\n class=\"detail-speed-dial\"\n color=\"warn\"\n icon=\"delete_forever\"\n i18n-matTooltip\n matTooltip=\"Supprimer d\u00E9finitivement\"\n matTooltipPosition=\"left\"\n></natural-fixed-button>\n" }]
|
|
8936
|
+
}], ctorParameters: function () { return [{ type: i2$4.ActivatedRoute }]; }, propDecorators: { model: [{
|
|
8937
|
+
type: Input,
|
|
8938
|
+
args: [{ required: true }]
|
|
8939
|
+
}], form: [{
|
|
8940
|
+
type: Input,
|
|
8941
|
+
args: [{ required: true }]
|
|
8942
|
+
}], create: [{
|
|
8943
|
+
type: Output
|
|
8944
|
+
}], delete: [{
|
|
8945
|
+
type: Output
|
|
8946
|
+
}] } });
|
|
8947
|
+
|
|
8948
|
+
/*
|
|
8949
|
+
* Public API Surface of natural
|
|
8950
|
+
*/
|
|
8951
|
+
|
|
8952
|
+
class NaturalHierarchicSelectorDialogComponent {
|
|
8953
|
+
constructor(data, dialogRef) {
|
|
8954
|
+
this.dialogRef = dialogRef;
|
|
8955
|
+
this.config = defaults(data, { multiple: true, allowUnselect: true });
|
|
8956
|
+
this.searchSelectionsOutput = this.config.searchSelections;
|
|
8957
|
+
}
|
|
8958
|
+
close(selected) {
|
|
8959
|
+
const result = {
|
|
8960
|
+
hierarchicSelection: clone(selected),
|
|
8961
|
+
searchSelections: clone(this.searchSelectionsOutput),
|
|
8962
|
+
};
|
|
8963
|
+
this.dialogRef.close(result);
|
|
8964
|
+
}
|
|
8965
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8966
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHierarchicSelectorDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n ></natural-hierarchic-selector>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-dialog-close mat-button i18n>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: NaturalHierarchicSelectorComponent, selector: "natural-hierarchic-selector", inputs: ["displayWith", "config", "multiple", "selected", "allowUnselect", "filters", "searchFacets", "searchSelections"], outputs: ["searchSelectionChange", "selectionChange"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] }); }
|
|
9442
8967
|
}
|
|
9443
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
8968
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorDialogComponent, decorators: [{
|
|
9444
8969
|
type: Component,
|
|
9445
|
-
args: [{
|
|
9446
|
-
}], ctorParameters: function () { return [{ type:
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
type: Input,
|
|
9451
|
-
args: [{ required: true }]
|
|
9452
|
-
}], create: [{
|
|
9453
|
-
type: Output
|
|
9454
|
-
}], delete: [{
|
|
9455
|
-
type: Output
|
|
9456
|
-
}] } });
|
|
8970
|
+
args: [{ standalone: true, imports: [MatDialogModule, NaturalHierarchicSelectorComponent, MatButtonModule], template: "<h2 i18n mat-dialog-title>S\u00E9lection</h2>\n\n<mat-dialog-content>\n <natural-hierarchic-selector\n (selectionChange)=\"config.hierarchicSelection = $event\"\n [selected]=\"config.hierarchicSelection ?? {}\"\n [config]=\"config.hierarchicConfig\"\n [filters]=\"config.hierarchicFilters\"\n [multiple]=\"config.multiple ?? false\"\n [allowUnselect]=\"config.allowUnselect ?? true\"\n [searchFacets]=\"config.searchFacets ?? []\"\n [searchSelections]=\"config.searchSelections ?? []\"\n (searchSelectionChange)=\"searchSelectionsOutput = $event\"\n ></natural-hierarchic-selector>\n</mat-dialog-content>\n\n<mat-dialog-actions align=\"end\">\n <button mat-dialog-close mat-button i18n>Annuler</button>\n <button (click)=\"close(config.hierarchicSelection)\" color=\"primary\" mat-raised-button\n ><span i18n>Valider</span>\n </button>\n</mat-dialog-actions>\n" }]
|
|
8971
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
8972
|
+
type: Inject,
|
|
8973
|
+
args: [MAT_DIALOG_DATA]
|
|
8974
|
+
}] }, { type: i1.MatDialogRef }]; } });
|
|
9457
8975
|
|
|
9458
|
-
class
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
8976
|
+
class NaturalHierarchicSelectorDialogService {
|
|
8977
|
+
constructor(dialog) {
|
|
8978
|
+
this.dialog = dialog;
|
|
8979
|
+
}
|
|
8980
|
+
open(hierarchicConfig, dialogConfig) {
|
|
8981
|
+
const defaultDialogConfig = {
|
|
8982
|
+
width: '700px',
|
|
8983
|
+
data: hierarchicConfig,
|
|
8984
|
+
};
|
|
8985
|
+
return this.dialog.open(NaturalHierarchicSelectorDialogComponent, defaults(dialogConfig, defaultDialogConfig));
|
|
8986
|
+
}
|
|
8987
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorDialogService, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8988
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorDialogService, providedIn: 'root' }); }
|
|
9462
8989
|
}
|
|
9463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
9464
|
-
type:
|
|
9465
|
-
args: [{
|
|
9466
|
-
|
|
9467
|
-
imports: [CommonModule, NaturalFixedButtonModule, MatTooltipModule],
|
|
9468
|
-
exports: [NaturalFixedButtonDetailComponent],
|
|
9469
|
-
}]
|
|
9470
|
-
}] });
|
|
8990
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHierarchicSelectorDialogService, decorators: [{
|
|
8991
|
+
type: Injectable,
|
|
8992
|
+
args: [{ providedIn: 'root' }]
|
|
8993
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialog }]; } });
|
|
9471
8994
|
|
|
9472
8995
|
/*
|
|
9473
8996
|
* Public API Surface of natural
|
|
9474
8997
|
*/
|
|
9475
8998
|
|
|
8999
|
+
/**
|
|
9000
|
+
* Configure Material Symbols, instead of Material Icons, and configure custom Natural icons
|
|
9001
|
+
*/
|
|
9002
|
+
function provideIcons(config) {
|
|
9003
|
+
return [
|
|
9004
|
+
{
|
|
9005
|
+
provide: NATURAL_ICONS_CONFIG,
|
|
9006
|
+
useValue: config,
|
|
9007
|
+
},
|
|
9008
|
+
{
|
|
9009
|
+
provide: APP_INITIALIZER,
|
|
9010
|
+
multi: true,
|
|
9011
|
+
useFactory: () => {
|
|
9012
|
+
const iconRegistry = inject(MatIconRegistry);
|
|
9013
|
+
return () => {
|
|
9014
|
+
// Replace the old Material Icons by the new Material Symbols
|
|
9015
|
+
// This means that `https://fonts.googleapis.com/icon?family=Material+Icons` must be
|
|
9016
|
+
// replaced by `https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@1`
|
|
9017
|
+
const defaultFontSetClasses = iconRegistry.getDefaultFontSetClass();
|
|
9018
|
+
const outlinedFontSetClasses = defaultFontSetClasses
|
|
9019
|
+
.filter(fontSetClass => fontSetClass !== 'material-icons')
|
|
9020
|
+
.concat(['material-symbols-outlined']);
|
|
9021
|
+
iconRegistry.setDefaultFontSetClass(...outlinedFontSetClasses);
|
|
9022
|
+
};
|
|
9023
|
+
},
|
|
9024
|
+
},
|
|
9025
|
+
];
|
|
9026
|
+
}
|
|
9027
|
+
|
|
9476
9028
|
/*
|
|
9477
9029
|
* Public API Surface of natural
|
|
9478
9030
|
*/
|
|
9479
9031
|
|
|
9032
|
+
const PanelsHooksConfig = new InjectionToken('NaturalPanelsHooksConfig');
|
|
9033
|
+
|
|
9034
|
+
function providePanels(hooks) {
|
|
9035
|
+
return [
|
|
9036
|
+
{
|
|
9037
|
+
provide: PanelsHooksConfig,
|
|
9038
|
+
useValue: hooks,
|
|
9039
|
+
},
|
|
9040
|
+
];
|
|
9041
|
+
}
|
|
9042
|
+
|
|
9480
9043
|
function getConsumedSegments(segments, routes) {
|
|
9481
9044
|
return flatten(getStackConfig(segments, routes).map(conf => conf.route.segments));
|
|
9482
9045
|
}
|
|
@@ -9551,8 +9114,6 @@ const naturalPanelsUrlMatcher = (segments, group, route) => {
|
|
|
9551
9114
|
return null;
|
|
9552
9115
|
};
|
|
9553
9116
|
|
|
9554
|
-
const PanelsHooksConfig = new InjectionToken('NaturalPanelsHooksConfig');
|
|
9555
|
-
|
|
9556
9117
|
function segmentsToString(segments) {
|
|
9557
9118
|
return segments.map(s => s.toString()).join('/');
|
|
9558
9119
|
}
|
|
@@ -9857,7 +9418,7 @@ class NaturalPanelsService {
|
|
|
9857
9418
|
dialog.updatePosition(position);
|
|
9858
9419
|
}
|
|
9859
9420
|
}
|
|
9860
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, deps: [{ token: i2$
|
|
9421
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, deps: [{ token: i2$4.Router }, { token: i1.MatDialog }, { token: i0.Injector }, { token: PanelsHooksConfig }, { token: i3$4.MediaObserver }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
9861
9422
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, providedIn: 'root' }); }
|
|
9862
9423
|
}
|
|
9863
9424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsService, decorators: [{
|
|
@@ -9865,58 +9426,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
9865
9426
|
args: [{
|
|
9866
9427
|
providedIn: 'root',
|
|
9867
9428
|
}]
|
|
9868
|
-
}], ctorParameters: function () { return [{ type: i2$
|
|
9429
|
+
}], ctorParameters: function () { return [{ type: i2$4.Router }, { type: i1.MatDialog }, { type: i0.Injector }, { type: undefined, decorators: [{
|
|
9869
9430
|
type: Inject,
|
|
9870
9431
|
args: [PanelsHooksConfig]
|
|
9871
|
-
}] }, { type: i3$
|
|
9432
|
+
}] }, { type: i3$4.MediaObserver }]; } });
|
|
9872
9433
|
|
|
9873
9434
|
class NaturalPanelsComponent {
|
|
9874
9435
|
// PanelsComponent is kind of a "ghost" component to respond to an url matcher in route config,
|
|
9875
9436
|
// An UrlMatcher (matcher attribute) is required to catch urls with an undefined number of params in url after a given param /panels/
|
|
9876
9437
|
constructor(panelsService, route) {
|
|
9877
9438
|
this.panelsService = panelsService;
|
|
9878
|
-
this.route = route;
|
|
9879
9439
|
this.panelsService.start(route);
|
|
9880
9440
|
}
|
|
9881
9441
|
ngOnDestroy() {
|
|
9882
9442
|
this.panelsService.stop();
|
|
9883
9443
|
}
|
|
9884
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsComponent, deps: [{ token: NaturalPanelsService }, { token: i2$
|
|
9885
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalPanelsComponent, selector: "natural-panels", ngImport: i0, template: '', isInline: true }); }
|
|
9444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsComponent, deps: [{ token: NaturalPanelsService }, { token: i2$4.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalPanelsComponent, isStandalone: true, selector: "natural-panels", ngImport: i0, template: '', isInline: true }); }
|
|
9886
9446
|
}
|
|
9887
9447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsComponent, decorators: [{
|
|
9888
9448
|
type: Component,
|
|
9889
9449
|
args: [{
|
|
9890
9450
|
selector: 'natural-panels',
|
|
9891
9451
|
template: '',
|
|
9452
|
+
standalone: true,
|
|
9892
9453
|
}]
|
|
9893
|
-
}], ctorParameters: function () { return [{ type: NaturalPanelsService }, { type: i2$
|
|
9894
|
-
|
|
9895
|
-
const declarations$1 = [NaturalPanelsComponent];
|
|
9896
|
-
class NaturalPanelsModule {
|
|
9897
|
-
static forRoot(hooks) {
|
|
9898
|
-
return {
|
|
9899
|
-
ngModule: NaturalPanelsModule,
|
|
9900
|
-
providers: [
|
|
9901
|
-
{
|
|
9902
|
-
provide: PanelsHooksConfig,
|
|
9903
|
-
useValue: hooks,
|
|
9904
|
-
},
|
|
9905
|
-
],
|
|
9906
|
-
};
|
|
9907
|
-
}
|
|
9908
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
9909
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsModule, declarations: [NaturalPanelsComponent], imports: [CommonModule, RouterModule, MatDialogModule], exports: [NaturalPanelsComponent] }); }
|
|
9910
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsModule, imports: [CommonModule, RouterModule, MatDialogModule] }); }
|
|
9911
|
-
}
|
|
9912
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalPanelsModule, decorators: [{
|
|
9913
|
-
type: NgModule,
|
|
9914
|
-
args: [{
|
|
9915
|
-
declarations: declarations$1,
|
|
9916
|
-
imports: [CommonModule, RouterModule, MatDialogModule],
|
|
9917
|
-
exports: declarations$1,
|
|
9918
|
-
}]
|
|
9919
|
-
}] });
|
|
9454
|
+
}], ctorParameters: function () { return [{ type: NaturalPanelsService }, { type: i2$4.ActivatedRoute }]; } });
|
|
9920
9455
|
|
|
9921
9456
|
/**
|
|
9922
9457
|
* Url fallback matcher to be used instead of `path: '**'` when Panel system
|
|
@@ -10013,168 +9548,308 @@ class NaturalRelationsComponent extends NaturalAbstractController {
|
|
|
10013
9548
|
.subscribe(() => this.dataSource?.remove(relation));
|
|
10014
9549
|
}
|
|
10015
9550
|
/**
|
|
10016
|
-
* Link action
|
|
10017
|
-
* Refetch result to display it in table
|
|
10018
|
-
* TODO : could maybe use "update" attribute of apollo.mutate function to update table faster (but hard to do it here)
|
|
9551
|
+
* Link action
|
|
9552
|
+
* Refetch result to display it in table
|
|
9553
|
+
* TODO : could maybe use "update" attribute of apollo.mutate function to update table faster (but hard to do it here)
|
|
9554
|
+
*/
|
|
9555
|
+
addRelations(relations) {
|
|
9556
|
+
const observables = relations
|
|
9557
|
+
.filter((relation) => !!relation && typeof relation === 'object')
|
|
9558
|
+
.map(relation => this.linkMutationService.link(this.main, relation, this.otherName));
|
|
9559
|
+
forkJoin(observables).subscribe(() => {
|
|
9560
|
+
this.selectionChange.emit();
|
|
9561
|
+
this.select?.clear();
|
|
9562
|
+
});
|
|
9563
|
+
}
|
|
9564
|
+
pagination(event) {
|
|
9565
|
+
let pagination = null;
|
|
9566
|
+
if (event &&
|
|
9567
|
+
(event.pageIndex !== this.defaultPagination.pageIndex || event.pageSize !== this.defaultPagination.pageSize)) {
|
|
9568
|
+
pagination = {
|
|
9569
|
+
pageIndex: event.pageIndex,
|
|
9570
|
+
pageSize: event.pageSize,
|
|
9571
|
+
};
|
|
9572
|
+
}
|
|
9573
|
+
this.variablesManager.set('pagination', { pagination: pagination ? pagination : this.defaultPagination });
|
|
9574
|
+
}
|
|
9575
|
+
getDisplayFn() {
|
|
9576
|
+
if (this.displayWith) {
|
|
9577
|
+
return this.displayWith;
|
|
9578
|
+
}
|
|
9579
|
+
return (item) => (item ? item.fullName || item.name : '');
|
|
9580
|
+
}
|
|
9581
|
+
openNaturalHierarchicSelector() {
|
|
9582
|
+
const selectAtKey = this.getSelectKey();
|
|
9583
|
+
if (!selectAtKey || !this.hierarchicSelectorConfig) {
|
|
9584
|
+
return;
|
|
9585
|
+
}
|
|
9586
|
+
const selected = {};
|
|
9587
|
+
const hierarchicConfig = {
|
|
9588
|
+
hierarchicConfig: this.hierarchicSelectorConfig,
|
|
9589
|
+
hierarchicSelection: selected,
|
|
9590
|
+
hierarchicFilters: this.hierarchicSelectorFilters,
|
|
9591
|
+
multiple: true,
|
|
9592
|
+
};
|
|
9593
|
+
this.hierarchicSelectorDialog
|
|
9594
|
+
.open(hierarchicConfig)
|
|
9595
|
+
.afterClosed()
|
|
9596
|
+
.subscribe(result => {
|
|
9597
|
+
if (result && result.hierarchicSelection !== undefined) {
|
|
9598
|
+
const selection = result.hierarchicSelection[selectAtKey];
|
|
9599
|
+
if (selection.length) {
|
|
9600
|
+
this.addRelations(selection);
|
|
9601
|
+
}
|
|
9602
|
+
}
|
|
9603
|
+
});
|
|
9604
|
+
}
|
|
9605
|
+
/**
|
|
9606
|
+
* Get list from database
|
|
9607
|
+
*/
|
|
9608
|
+
queryItems() {
|
|
9609
|
+
if (!this.service) {
|
|
9610
|
+
return;
|
|
9611
|
+
}
|
|
9612
|
+
this.loading = true;
|
|
9613
|
+
const queryRef = this.service.watchAll(this.variablesManager).pipe(takeUntil(this.ngUnsubscribe), tap$1({
|
|
9614
|
+
next: () => (this.loading = false),
|
|
9615
|
+
complete: () => (this.loading = false),
|
|
9616
|
+
error: () => (this.loading = false),
|
|
9617
|
+
}));
|
|
9618
|
+
this.dataSource = new NaturalDataSource(queryRef);
|
|
9619
|
+
}
|
|
9620
|
+
getSelectKey() {
|
|
9621
|
+
if (!this.hierarchicSelectorConfig) {
|
|
9622
|
+
return;
|
|
9623
|
+
}
|
|
9624
|
+
return this.hierarchicSelectorConfig.filter(c => !!c.selectableAtKey)[0].selectableAtKey;
|
|
9625
|
+
}
|
|
9626
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsComponent, deps: [{ token: NaturalLinkMutationService }, { token: NaturalHierarchicSelectorDialogService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9627
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalRelationsComponent, isStandalone: true, selector: "natural-relations", inputs: { service: "service", placeholder: "placeholder", autocompleteSelectorFilter: "autocompleteSelectorFilter", displayWith: "displayWith", disabled: "disabled", main: "main", hierarchicSelectorFilters: "hierarchicSelectorFilters", hierarchicSelectorConfig: "hierarchicSelectorConfig", otherName: "otherName", filter: "filter" }, outputs: { selectionChange: "selectionChange" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true }], viewQueries: [{ propertyName: "select", first: true, predicate: NaturalSelectComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\"></mat-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n (selectionChange)=\"addRelations([$event])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3$5.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3$5.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3$5.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3$5.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i3$5.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3$5.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3$5.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3$5.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3$5.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3$5.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i7$3.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i7$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: NaturalSelectComponent, selector: "natural-select", inputs: ["service", "optionRequired", "searchField", "searchOperator", "filter", "disabled"] }] }); }
|
|
9628
|
+
}
|
|
9629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsComponent, decorators: [{
|
|
9630
|
+
type: Component,
|
|
9631
|
+
args: [{ selector: 'natural-relations', standalone: true, imports: [
|
|
9632
|
+
NgIf,
|
|
9633
|
+
MatTableModule,
|
|
9634
|
+
NgTemplateOutlet,
|
|
9635
|
+
MatButtonModule,
|
|
9636
|
+
MatTooltipModule,
|
|
9637
|
+
MatIconModule,
|
|
9638
|
+
NaturalIconDirective,
|
|
9639
|
+
MatPaginatorModule,
|
|
9640
|
+
MatProgressSpinnerModule,
|
|
9641
|
+
NaturalSelectComponent,
|
|
9642
|
+
], template: "<div class=\"body\">\n <ng-template #defaultNameCell let-item=\"item\">\n {{ getDisplayFn()(item) }}\n </ng-template>\n\n <table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" class=\"natural-row-click\" mat-table>\n <tr *matHeaderRowDef=\"displayedColumns\" mat-header-row style=\"display: none\"></tr>\n <tr *matRowDef=\"let row; columns: displayedColumns\" mat-row></tr>\n\n <ng-container matColumnDef=\"name\">\n <th *matHeaderCellDef i18n mat-header-cell>Titre</th>\n <td *matCellDef=\"let item\" mat-cell>\n <ng-template\n [ngTemplateOutletContext]=\"{item: item}\"\n [ngTemplateOutlet]=\"itemTemplate ? itemTemplate : defaultNameCell\"\n ></ng-template>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"unlink\">\n <th *matHeaderCellDef mat-header-cell></th>\n <td *matCellDef=\"let element\" mat-cell>\n <button\n *ngIf=\"!disabled\"\n (click)=\"removeRelation(element)\"\n [disabled]=\"removing.has(element)\"\n color=\"warn\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Dissocier\"\n >\n <mat-icon naturalIcon=\"link_off\"></mat-icon>\n </button>\n </td>\n </ng-container>\n </table>\n\n <mat-paginator\n (page)=\"pagination($event)\"\n *ngIf=\"dataSource?.data && (dataSource?.data?.length || 0) > (dataSource?.data?.pageSize || 0)\"\n [length]=\"dataSource?.data?.length || 0\"\n [pageIndex]=\"dataSource?.data?.pageIndex || 0\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [pageSize]=\"dataSource?.data?.pageSize || 0\"\n ></mat-paginator>\n\n <div *ngIf=\"!loading && dataSource?.data?.length === 0\" class=\"margin-v mat-body\">\n <span i18n>Aucun r\u00E9sultat</span>\n </div>\n\n <mat-progress-spinner *ngIf=\"loading\" [diameter]=\"40\" class=\"loading\" mode=\"indeterminate\"></mat-progress-spinner>\n</div>\n\n<natural-select\n (selectionChange)=\"addRelations([$event])\"\n *ngIf=\"!hierarchicSelectorConfig && service && !disabled\"\n [displayWith]=\"$any(getDisplayFn())\"\n [filter]=\"autocompleteSelectorFilter\"\n [placeholder]=\"placeholder\"\n [service]=\"service\"\n [showIcon]=\"false\"\n></natural-select>\n\n<div *ngIf=\"hierarchicSelectorConfig && !disabled\">\n <button (click)=\"openNaturalHierarchicSelector()\" color=\"primary\" mat-flat-button>{{ placeholder }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .body{display:flex;flex-direction:column}:host .loading{margin:20px auto}:host .mat-column-unlink{width:2.5em}\n"] }]
|
|
9643
|
+
}], ctorParameters: function () { return [{ type: NaturalLinkMutationService }, { type: NaturalHierarchicSelectorDialogService }]; }, propDecorators: { select: [{
|
|
9644
|
+
type: ViewChild,
|
|
9645
|
+
args: [NaturalSelectComponent]
|
|
9646
|
+
}], itemTemplate: [{
|
|
9647
|
+
type: ContentChild,
|
|
9648
|
+
args: [TemplateRef]
|
|
9649
|
+
}], service: [{
|
|
9650
|
+
type: Input
|
|
9651
|
+
}], placeholder: [{
|
|
9652
|
+
type: Input
|
|
9653
|
+
}], autocompleteSelectorFilter: [{
|
|
9654
|
+
type: Input
|
|
9655
|
+
}], displayWith: [{
|
|
9656
|
+
type: Input
|
|
9657
|
+
}], disabled: [{
|
|
9658
|
+
type: Input
|
|
9659
|
+
}], main: [{
|
|
9660
|
+
type: Input,
|
|
9661
|
+
args: [{ required: true }]
|
|
9662
|
+
}], selectionChange: [{
|
|
9663
|
+
type: Output
|
|
9664
|
+
}], hierarchicSelectorFilters: [{
|
|
9665
|
+
type: Input
|
|
9666
|
+
}], hierarchicSelectorConfig: [{
|
|
9667
|
+
type: Input
|
|
9668
|
+
}], otherName: [{
|
|
9669
|
+
type: Input
|
|
9670
|
+
}], filter: [{
|
|
9671
|
+
type: Input
|
|
9672
|
+
}] } });
|
|
9673
|
+
|
|
9674
|
+
/*
|
|
9675
|
+
* Public API Surface of natural
|
|
9676
|
+
*/
|
|
9677
|
+
|
|
9678
|
+
class NaturalSelectEnumComponent extends AbstractSelect {
|
|
9679
|
+
constructor(enumService, ngControl) {
|
|
9680
|
+
super(ngControl);
|
|
9681
|
+
this.enumService = enumService;
|
|
9682
|
+
/**
|
|
9683
|
+
* Whether the user should be allowed to select multiple options
|
|
9684
|
+
*/
|
|
9685
|
+
this.multiple = false;
|
|
9686
|
+
}
|
|
9687
|
+
ngOnInit() {
|
|
9688
|
+
super.ngOnInit();
|
|
9689
|
+
this.items = this.enumService.get(this.enumName);
|
|
9690
|
+
}
|
|
9691
|
+
getDisplayFn() {
|
|
9692
|
+
throw new Error('This should never be called');
|
|
9693
|
+
}
|
|
9694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectEnumComponent, deps: [{ token: NaturalEnumService }, { token: i2$3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9695
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSelectEnumComponent, isStandalone: true, selector: "natural-select-enum", inputs: { enumName: "enumName", nullLabel: "nullLabel", optionDisabled: "optionDisabled", multiple: "multiple" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "panelWidth", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i1$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatOptionModule }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: NaturalCapitalizePipe, name: "capitalize" }] }); }
|
|
9696
|
+
}
|
|
9697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectEnumComponent, decorators: [{
|
|
9698
|
+
type: Component,
|
|
9699
|
+
args: [{ selector: 'natural-select-enum', standalone: true, imports: [
|
|
9700
|
+
MatFormFieldModule,
|
|
9701
|
+
MatSelectModule,
|
|
9702
|
+
FormsModule,
|
|
9703
|
+
ReactiveFormsModule,
|
|
9704
|
+
NgIf,
|
|
9705
|
+
MatOptionModule,
|
|
9706
|
+
NgFor,
|
|
9707
|
+
AsyncPipe,
|
|
9708
|
+
NaturalCapitalizePipe,
|
|
9709
|
+
], template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n <mat-select\n (selectionChange)=\"propagateValue($event.value)\"\n [formControl]=\"internalCtrl\"\n (blur)=\"onBlur()\"\n [errorStateMatcher]=\"matcher\"\n [multiple]=\"multiple\"\n >\n <mat-option *ngIf=\"nullLabel\" [value]=\"null\">{{ nullLabel }}</mat-option>\n <mat-option\n *ngFor=\"let item of items | async\"\n [value]=\"item.value\"\n [disabled]=\"optionDisabled ? optionDisabled(item) : false\"\n >\n {{ item.name | capitalize }}\n </mat-option>\n </mat-select>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error></mat-form-field\n>\n", styles: [":host{display:flex;flex-direction:column}\n"] }]
|
|
9710
|
+
}], ctorParameters: function () { return [{ type: NaturalEnumService }, { type: i2$3.NgControl, decorators: [{
|
|
9711
|
+
type: Optional
|
|
9712
|
+
}, {
|
|
9713
|
+
type: Self
|
|
9714
|
+
}] }]; }, propDecorators: { enumName: [{
|
|
9715
|
+
type: Input,
|
|
9716
|
+
args: [{ required: true }]
|
|
9717
|
+
}], nullLabel: [{
|
|
9718
|
+
type: Input
|
|
9719
|
+
}], optionDisabled: [{
|
|
9720
|
+
type: Input
|
|
9721
|
+
}], multiple: [{
|
|
9722
|
+
type: Input
|
|
9723
|
+
}] } });
|
|
9724
|
+
|
|
9725
|
+
function defaultDisplayFn(item) {
|
|
9726
|
+
if (!item) {
|
|
9727
|
+
return '';
|
|
9728
|
+
}
|
|
9729
|
+
return item.fullName || item.name || item.iban || item.id || item;
|
|
9730
|
+
}
|
|
9731
|
+
/**
|
|
9732
|
+
* Default usage:
|
|
9733
|
+
* <natural-select [config]="myConfig" [(ngModel)]="amazingModel"
|
|
9734
|
+
* (ngModelChange)=amazingChangeFn($event)></natural-select>
|
|
9735
|
+
*
|
|
9736
|
+
* [(ngModel)] and (ngModelChange) are optional
|
|
9737
|
+
*
|
|
9738
|
+
* Placeholder :
|
|
9739
|
+
* <natural-select placeholder="amazing placeholder">
|
|
9740
|
+
*/
|
|
9741
|
+
class NaturalSelectHierarchicComponent extends AbstractSelect {
|
|
9742
|
+
constructor(hierarchicSelectorDialogService, ngControl) {
|
|
9743
|
+
super(ngControl);
|
|
9744
|
+
this.hierarchicSelectorDialogService = hierarchicSelectorDialogService;
|
|
9745
|
+
/**
|
|
9746
|
+
* Configuration for hierarchic relations
|
|
9747
|
+
*
|
|
9748
|
+
* It should be an array with at least one element with `selectableAtKey` configured, otherwise the selector will never open.
|
|
9749
|
+
*/
|
|
9750
|
+
this.config = null;
|
|
9751
|
+
/**
|
|
9752
|
+
* The selected value as an object. The internal value is `internalCtrl.value`, and that is a string.
|
|
9753
|
+
*/
|
|
9754
|
+
this.value = null;
|
|
9755
|
+
/**
|
|
9756
|
+
* On Firefox, the combination of <input (focus)> event and dialog opening cause some strange bug where focus event is called multiple
|
|
9757
|
+
* times This prevents it.
|
|
9758
|
+
*/
|
|
9759
|
+
this.lockOpenDialog = false;
|
|
9760
|
+
}
|
|
9761
|
+
/**
|
|
9762
|
+
* Very important to return something, above all if [select]='displayedValue' attribute value is used
|
|
10019
9763
|
*/
|
|
10020
|
-
addRelations(relations) {
|
|
10021
|
-
const observables = relations
|
|
10022
|
-
.filter((relation) => !!relation && typeof relation === 'object')
|
|
10023
|
-
.map(relation => this.linkMutationService.link(this.main, relation, this.otherName));
|
|
10024
|
-
forkJoin(observables).subscribe(() => {
|
|
10025
|
-
this.selectionChange.emit();
|
|
10026
|
-
this.select?.clear();
|
|
10027
|
-
});
|
|
10028
|
-
}
|
|
10029
|
-
pagination(event) {
|
|
10030
|
-
let pagination = null;
|
|
10031
|
-
if (event &&
|
|
10032
|
-
(event.pageIndex !== this.defaultPagination.pageIndex || event.pageSize !== this.defaultPagination.pageSize)) {
|
|
10033
|
-
pagination = {
|
|
10034
|
-
pageIndex: event.pageIndex,
|
|
10035
|
-
pageSize: event.pageSize,
|
|
10036
|
-
};
|
|
10037
|
-
}
|
|
10038
|
-
this.variablesManager.set('pagination', { pagination: pagination ? pagination : this.defaultPagination });
|
|
10039
|
-
}
|
|
10040
9764
|
getDisplayFn() {
|
|
10041
9765
|
if (this.displayWith) {
|
|
10042
9766
|
return this.displayWith;
|
|
10043
9767
|
}
|
|
10044
|
-
return
|
|
9768
|
+
return defaultDisplayFn;
|
|
10045
9769
|
}
|
|
10046
|
-
|
|
9770
|
+
/**
|
|
9771
|
+
* Override parent because our internalCtrl store the textual representation as string instead of raw Literal
|
|
9772
|
+
*/
|
|
9773
|
+
writeValue(value) {
|
|
9774
|
+
this.value = value;
|
|
9775
|
+
this.internalCtrl.setValue(this.getDisplayFn()(this.value));
|
|
9776
|
+
}
|
|
9777
|
+
openDialog() {
|
|
9778
|
+
if (this.internalCtrl.disabled) {
|
|
9779
|
+
return;
|
|
9780
|
+
}
|
|
9781
|
+
if (this.lockOpenDialog) {
|
|
9782
|
+
return;
|
|
9783
|
+
}
|
|
10047
9784
|
const selectAtKey = this.getSelectKey();
|
|
10048
|
-
if (!selectAtKey || !this.
|
|
9785
|
+
if (!selectAtKey || !this.config) {
|
|
10049
9786
|
return;
|
|
10050
9787
|
}
|
|
9788
|
+
this.lockOpenDialog = true;
|
|
9789
|
+
if (this.onTouched) {
|
|
9790
|
+
this.onTouched();
|
|
9791
|
+
}
|
|
10051
9792
|
const selected = {};
|
|
9793
|
+
if (this.internalCtrl.value) {
|
|
9794
|
+
selected[selectAtKey] = [this.value];
|
|
9795
|
+
}
|
|
10052
9796
|
const hierarchicConfig = {
|
|
10053
|
-
hierarchicConfig: this.
|
|
9797
|
+
hierarchicConfig: this.config,
|
|
10054
9798
|
hierarchicSelection: selected,
|
|
10055
|
-
hierarchicFilters: this.
|
|
10056
|
-
multiple:
|
|
9799
|
+
hierarchicFilters: this.filters,
|
|
9800
|
+
multiple: false,
|
|
10057
9801
|
};
|
|
10058
|
-
|
|
10059
|
-
|
|
9802
|
+
const dialogFocus = { restoreFocus: false };
|
|
9803
|
+
this.hierarchicSelectorDialogService
|
|
9804
|
+
.open(hierarchicConfig, dialogFocus)
|
|
10060
9805
|
.afterClosed()
|
|
10061
9806
|
.subscribe(result => {
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
9807
|
+
this.lockOpenDialog = false;
|
|
9808
|
+
if (result && result.hierarchicSelection) {
|
|
9809
|
+
const selection = result.hierarchicSelection;
|
|
9810
|
+
// Find the only selection amongst all possible keys
|
|
9811
|
+
const keyWithSelection = Object.keys(selection).find(key => selection[key][0]);
|
|
9812
|
+
const singleSelection = keyWithSelection ? selection[keyWithSelection][0] : null;
|
|
9813
|
+
this.writeValue(singleSelection);
|
|
9814
|
+
this.propagateValue(singleSelection);
|
|
10067
9815
|
}
|
|
10068
9816
|
});
|
|
10069
9817
|
}
|
|
10070
|
-
|
|
10071
|
-
|
|
10072
|
-
*/
|
|
10073
|
-
queryItems() {
|
|
10074
|
-
if (!this.service) {
|
|
10075
|
-
return;
|
|
10076
|
-
}
|
|
10077
|
-
this.loading = true;
|
|
10078
|
-
const queryRef = this.service.watchAll(this.variablesManager).pipe(takeUntil(this.ngUnsubscribe), tap$1({
|
|
10079
|
-
next: () => (this.loading = false),
|
|
10080
|
-
complete: () => (this.loading = false),
|
|
10081
|
-
error: () => (this.loading = false),
|
|
10082
|
-
}));
|
|
10083
|
-
this.dataSource = new NaturalDataSource(queryRef);
|
|
9818
|
+
showSelectButton() {
|
|
9819
|
+
return !!(this.internalCtrl?.enabled && this.selectLabel && this.getSelectKey());
|
|
10084
9820
|
}
|
|
10085
9821
|
getSelectKey() {
|
|
10086
|
-
|
|
10087
|
-
return;
|
|
10088
|
-
}
|
|
10089
|
-
return this.hierarchicSelectorConfig.filter(c => !!c.selectableAtKey)[0].selectableAtKey;
|
|
9822
|
+
return this.config?.filter(c => !!c.selectableAtKey)[0]?.selectableAtKey;
|
|
10090
9823
|
}
|
|
10091
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
10092
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type:
|
|
9824
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectHierarchicComponent, deps: [{ token: NaturalHierarchicSelectorDialogService }, { token: i2$3.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9825
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSelectHierarchicComponent, isStandalone: true, selector: "natural-select-hierarchic", inputs: { selectLabel: "selectLabel", config: "config", filters: "filters" }, usesInheritance: true, ngImport: i0, template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2$3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i6$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
10093
9826
|
}
|
|
10094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
9827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSelectHierarchicComponent, decorators: [{
|
|
10095
9828
|
type: Component,
|
|
10096
|
-
args: [{ selector: 'natural-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
}
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
}], main: [{
|
|
10114
|
-
type: Input,
|
|
10115
|
-
args: [{ required: true }]
|
|
10116
|
-
}], selectionChange: [{
|
|
10117
|
-
type: Output
|
|
10118
|
-
}], hierarchicSelectorFilters: [{
|
|
10119
|
-
type: Input
|
|
10120
|
-
}], hierarchicSelectorConfig: [{
|
|
9829
|
+
args: [{ selector: 'natural-select-hierarchic', standalone: true, imports: [
|
|
9830
|
+
MatFormFieldModule,
|
|
9831
|
+
MatInputModule,
|
|
9832
|
+
FormsModule,
|
|
9833
|
+
ReactiveFormsModule,
|
|
9834
|
+
NgIf,
|
|
9835
|
+
MatIconModule,
|
|
9836
|
+
NaturalIconDirective,
|
|
9837
|
+
MatButtonModule,
|
|
9838
|
+
MatTooltipModule,
|
|
9839
|
+
RouterLink,
|
|
9840
|
+
], template: "<mat-form-field>\n <mat-label>{{ placeholder }}</mat-label>\n\n <!-- Input for hierarchical selector -->\n <input\n (blur)=\"blur.emit()\"\n (focus)=\"openDialog()\"\n [formControl]=\"internalCtrl\"\n [errorStateMatcher]=\"matcher\"\n aria-label=\"Recherche et s\u00E9lection\"\n i18n-aria-label\n matInput\n />\n\n <!-- Meta data -->\n <mat-icon *ngIf=\"showIcon\" [naturalIcon]=\"icon\" matIconPrefix></mat-icon>\n\n <!-- Clear button -->\n <div class=\"suffix-buttons\" matIconSuffix>\n <button\n (click)=\"clear(); $event.stopPropagation()\"\n *ngIf=\"internalCtrl.value && internalCtrl.enabled && !clearLabel\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"D\u00E9s\u00E9lectionner\"\n >\n <mat-icon naturalIcon=\"close\"></mat-icon>\n </button>\n <button\n *ngIf=\"internalCtrl.value && navigateTo\"\n [routerLink]=\"navigateTo\"\n (click)=\"$event.stopPropagation()\"\n mat-icon-button\n i18n-matTooltip\n matTooltip=\"Naviguer vers\"\n >\n <mat-icon naturalIcon=\"open_in_browser\"></mat-icon>\n </button>\n </div>\n\n <mat-error *ngIf=\"hasRequiredError()\" i18n>Ce champ est requis</mat-error>\n</mat-form-field>\n\n<!-- Additional (un)select/(un)link buttons for more visual cohesion with natural-relations --><!-- [clearLabel] and/or [selectLabel] has to be given as attribute input -->\n<div *ngIf=\"showSelectButton() || showClearButton()\" class=\"external-buttons\">\n <button (click)=\"openDialog()\" *ngIf=\"showSelectButton()\" color=\"primary\" mat-flat-button>{{ selectLabel }}</button>\n <button (click)=\"clear()\" *ngIf=\"showClearButton()\" color=\"warn\" mat-button>{{ clearLabel }}</button>\n</div>\n", styles: [":host{display:flex;flex-direction:column}:host>*:not(:last-child){margin-bottom:20px}:host .suffix-buttons,:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons{display:flex;flex-direction:row}:host .external-buttons>*:not(:last-child){margin-right:10px}\n"] }]
|
|
9841
|
+
}], ctorParameters: function () { return [{ type: NaturalHierarchicSelectorDialogService }, { type: i2$3.NgControl, decorators: [{
|
|
9842
|
+
type: Optional
|
|
9843
|
+
}, {
|
|
9844
|
+
type: Self
|
|
9845
|
+
}] }]; }, propDecorators: { selectLabel: [{
|
|
10121
9846
|
type: Input
|
|
10122
|
-
}],
|
|
9847
|
+
}], config: [{
|
|
10123
9848
|
type: Input
|
|
10124
|
-
}],
|
|
9849
|
+
}], filters: [{
|
|
10125
9850
|
type: Input
|
|
10126
9851
|
}] } });
|
|
10127
9852
|
|
|
10128
|
-
class NaturalRelationsModule {
|
|
10129
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10130
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsModule, declarations: [NaturalRelationsComponent], imports: [CommonModule,
|
|
10131
|
-
MatInputModule,
|
|
10132
|
-
MatButtonModule,
|
|
10133
|
-
MatProgressSpinnerModule,
|
|
10134
|
-
NaturalIconModule,
|
|
10135
|
-
MatTableModule,
|
|
10136
|
-
NaturalSelectModule,
|
|
10137
|
-
NaturalHierarchicSelectorModule,
|
|
10138
|
-
MatPaginatorModule,
|
|
10139
|
-
MatTooltipModule,
|
|
10140
|
-
MatIconModule], exports: [NaturalRelationsComponent] }); }
|
|
10141
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsModule, imports: [CommonModule,
|
|
10142
|
-
MatInputModule,
|
|
10143
|
-
MatButtonModule,
|
|
10144
|
-
MatProgressSpinnerModule,
|
|
10145
|
-
NaturalIconModule,
|
|
10146
|
-
MatTableModule,
|
|
10147
|
-
NaturalSelectModule,
|
|
10148
|
-
NaturalHierarchicSelectorModule,
|
|
10149
|
-
MatPaginatorModule,
|
|
10150
|
-
MatTooltipModule,
|
|
10151
|
-
MatIconModule] }); }
|
|
10152
|
-
}
|
|
10153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalRelationsModule, decorators: [{
|
|
10154
|
-
type: NgModule,
|
|
10155
|
-
args: [{
|
|
10156
|
-
declarations: [NaturalRelationsComponent],
|
|
10157
|
-
imports: [
|
|
10158
|
-
CommonModule,
|
|
10159
|
-
MatInputModule,
|
|
10160
|
-
MatButtonModule,
|
|
10161
|
-
MatProgressSpinnerModule,
|
|
10162
|
-
NaturalIconModule,
|
|
10163
|
-
MatTableModule,
|
|
10164
|
-
NaturalSelectModule,
|
|
10165
|
-
NaturalHierarchicSelectorModule,
|
|
10166
|
-
MatPaginatorModule,
|
|
10167
|
-
MatTooltipModule,
|
|
10168
|
-
MatIconModule,
|
|
10169
|
-
],
|
|
10170
|
-
exports: [NaturalRelationsComponent],
|
|
10171
|
-
}]
|
|
10172
|
-
}] });
|
|
10173
|
-
|
|
10174
|
-
/*
|
|
10175
|
-
* Public API Surface of natural
|
|
10176
|
-
*/
|
|
10177
|
-
|
|
10178
9853
|
/*
|
|
10179
9854
|
* Public API Surface of natural
|
|
10180
9855
|
*/
|
|
@@ -10403,17 +10078,30 @@ class NaturalSidenavService extends NaturalAbstractController {
|
|
|
10403
10078
|
this.sessionStorage.setItem(this.openedStorageKeyWithName, this.opened ? 'true' : 'false');
|
|
10404
10079
|
}
|
|
10405
10080
|
}
|
|
10406
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, deps: [{ token: i3$
|
|
10081
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, deps: [{ token: i3$4.MediaObserver }, { token: i2$4.Router }, { token: SESSION_STORAGE }, { token: NaturalSidenavStackService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
10407
10082
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, providedIn: 'root' }); }
|
|
10408
10083
|
}
|
|
10409
10084
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavService, decorators: [{
|
|
10410
10085
|
type: Injectable,
|
|
10411
10086
|
args: [{ providedIn: 'root' }]
|
|
10412
|
-
}], ctorParameters: function () { return [{ type: i3$
|
|
10087
|
+
}], ctorParameters: function () { return [{ type: i3$4.MediaObserver }, { type: i2$4.Router }, { type: undefined, decorators: [{
|
|
10413
10088
|
type: Inject,
|
|
10414
10089
|
args: [SESSION_STORAGE]
|
|
10415
10090
|
}] }, { type: NaturalSidenavStackService }]; } });
|
|
10416
10091
|
|
|
10092
|
+
class NaturalSidenavComponent {
|
|
10093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10094
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSidenavComponent, isStandalone: true, selector: "natural-sidenav", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
|
10095
|
+
}
|
|
10096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavComponent, decorators: [{
|
|
10097
|
+
type: Component,
|
|
10098
|
+
args: [{
|
|
10099
|
+
selector: 'natural-sidenav',
|
|
10100
|
+
template: '<ng-content></ng-content>',
|
|
10101
|
+
standalone: true,
|
|
10102
|
+
}]
|
|
10103
|
+
}] });
|
|
10104
|
+
|
|
10417
10105
|
class NaturalSidenavContainerComponent {
|
|
10418
10106
|
constructor(sidenavService) {
|
|
10419
10107
|
this.sidenavService = sidenavService;
|
|
@@ -10467,11 +10155,11 @@ class NaturalSidenavContainerComponent {
|
|
|
10467
10155
|
this.sidenavService.toggleMinimized();
|
|
10468
10156
|
}
|
|
10469
10157
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavContainerComponent, deps: [{ token: NaturalSidenavService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10470
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSidenavContainerComponent, selector: "natural-sidenav-container", inputs: { name: "name", position: "position", mobileAutoClose: "mobileAutoClose", minimizedWidth: "minimizedWidth", noScroll: "noScroll" }, host: { properties: { "attr.no-scroll": "this.noScroll" } }, providers: [NaturalSidenavService], viewQueries: [{ propertyName: "menuContainer", first: true, predicate: MatSidenavContainer, descendants: true, static: true }, { propertyName: "menuSidenav", first: true, predicate: MatSidenav, descendants: true, static: true }], ngImport: i0, template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "
|
|
10158
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSidenavContainerComponent, isStandalone: true, selector: "natural-sidenav-container", inputs: { name: "name", position: "position", mobileAutoClose: "mobileAutoClose", minimizedWidth: "minimizedWidth", noScroll: "noScroll" }, host: { properties: { "attr.no-scroll": "this.noScroll" } }, providers: [NaturalSidenavService], viewQueries: [{ propertyName: "menuContainer", first: true, predicate: MatSidenavContainer, descendants: true, static: true }, { propertyName: "menuSidenav", first: true, predicate: MatSidenav, descendants: true, static: true }], ngImport: i0, template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i2$6.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i2$6.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i2$6.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
10471
10159
|
}
|
|
10472
10160
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavContainerComponent, decorators: [{
|
|
10473
10161
|
type: Component,
|
|
10474
|
-
args: [{ selector: 'natural-sidenav-container', providers: [NaturalSidenavService], template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
|
|
10162
|
+
args: [{ selector: 'natural-sidenav-container', providers: [NaturalSidenavService], standalone: true, imports: [MatSidenavModule, NgClass], template: "<mat-sidenav-container (backdropClick)=\"sidenavService.setOpened(false)\">\n <mat-sidenav\n [mode]=\"sidenavService.activeMode\"\n [ngClass]=\"sidenavService.isMinimized ? 'menuMinimized' : ''\"\n [opened]=\"sidenavService.isOpened\"\n [style.min-width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [style.width.px]=\"sidenavService.isMinimized && minimizedWidth ? minimizedWidth : null\"\n [position]=\"position\"\n >\n <ng-content select=\"natural-sidenav\"></ng-content>\n </mat-sidenav>\n\n <mat-sidenav-content>\n <div>\n <ng-content select=\"natural-sidenav-content\"></ng-content>\n </div>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:flex;flex-direction:column}:host mat-sidenav-container{display:flex;flex-direction:column;flex:1}:host mat-sidenav-content>div{overflow:auto}:host .menuMinimized{overflow-x:hidden}:host .buttons{display:flex;flex-direction:row;justify-content:flex-end}\n"] }]
|
|
10475
10163
|
}], ctorParameters: function () { return [{ type: NaturalSidenavService }]; }, propDecorators: { name: [{
|
|
10476
10164
|
type: Input,
|
|
10477
10165
|
args: [{ required: true }]
|
|
@@ -10496,38 +10184,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
10496
10184
|
|
|
10497
10185
|
class NaturalSidenavContentComponent {
|
|
10498
10186
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10499
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSidenavContentComponent, selector: "natural-sidenav-content", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] }); }
|
|
10187
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSidenavContentComponent, isStandalone: true, selector: "natural-sidenav-content", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] }); }
|
|
10500
10188
|
}
|
|
10501
10189
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavContentComponent, decorators: [{
|
|
10502
10190
|
type: Component,
|
|
10503
|
-
args: [{ selector: 'natural-sidenav-content', template: '<ng-content></ng-content>', styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] }]
|
|
10504
|
-
}] });
|
|
10505
|
-
|
|
10506
|
-
class NaturalSidenavComponent {
|
|
10507
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10508
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalSidenavComponent, selector: "natural-sidenav", ngImport: i0, template: '<ng-content></ng-content>', isInline: true }); }
|
|
10509
|
-
}
|
|
10510
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavComponent, decorators: [{
|
|
10511
|
-
type: Component,
|
|
10512
|
-
args: [{
|
|
10513
|
-
selector: 'natural-sidenav',
|
|
10514
|
-
template: '<ng-content></ng-content>',
|
|
10515
|
-
}]
|
|
10516
|
-
}] });
|
|
10517
|
-
|
|
10518
|
-
class NaturalSidenavModule {
|
|
10519
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10520
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavModule, declarations: [NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent], imports: [CommonModule, MatSidenavModule, MatIconModule, MatButtonModule], exports: [NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent] }); }
|
|
10521
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavModule, providers: [sessionStorageProvider], imports: [CommonModule, MatSidenavModule, MatIconModule, MatButtonModule] }); }
|
|
10522
|
-
}
|
|
10523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalSidenavModule, decorators: [{
|
|
10524
|
-
type: NgModule,
|
|
10525
|
-
args: [{
|
|
10526
|
-
declarations: [NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent],
|
|
10527
|
-
imports: [CommonModule, MatSidenavModule, MatIconModule, MatButtonModule],
|
|
10528
|
-
exports: [NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent],
|
|
10529
|
-
providers: [sessionStorageProvider],
|
|
10530
|
-
}]
|
|
10191
|
+
args: [{ selector: 'natural-sidenav-content', template: '<ng-content></ng-content>', standalone: true, styles: [":host{flex:1;display:flex;flex-direction:column;overflow:auto}\n"] }]
|
|
10531
10192
|
}] });
|
|
10532
10193
|
|
|
10533
10194
|
/*
|
|
@@ -10542,31 +10203,16 @@ class NaturalStampComponent {
|
|
|
10542
10203
|
return !same && (!!this.item.updateDate || !!this.item.updater);
|
|
10543
10204
|
}
|
|
10544
10205
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalStampComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10545
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalStampComponent, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-subtitle-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-subtitle-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">, </span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type:
|
|
10206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalStampComponent, isStandalone: true, selector: "natural-stamp", inputs: { item: "item" }, ngImport: i0, template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-subtitle-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-subtitle-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">, </span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: NaturalSwissDatePipe, name: "swissDate" }, { kind: "pipe", type: NaturalTimeAgoPipe, name: "timeAgo" }] }); }
|
|
10546
10207
|
}
|
|
10547
10208
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalStampComponent, decorators: [{
|
|
10548
10209
|
type: Component,
|
|
10549
|
-
args: [{ selector: 'natural-stamp', template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-subtitle-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-subtitle-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">, </span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n" }]
|
|
10210
|
+
args: [{ selector: 'natural-stamp', standalone: true, imports: [NgIf, NaturalSwissDatePipe, NaturalTimeAgoPipe], template: "<ng-container *ngIf=\"item\">\n <div *ngIf=\"item.creationDate || item.creator\">\n <span class=\"mat-subtitle-2\" i18n>Cr\u00E9ation</span>\n :\n <span *ngIf=\"item.creator\">{{ item.creator.fullName || item.creator.name }}</span>\n <span *ngIf=\"item.creator && item.creationDate\">, </span>\n <span *ngIf=\"item.creationDate\">{{ item.creationDate | swissDate }} ({{ item.creationDate | timeAgo }})</span>\n </div>\n\n <div *ngIf=\"showUpdate()\">\n <span class=\"mat-subtitle-2\" i18n>Modification</span>\n :\n <span *ngIf=\"item.updater\">{{ item.updater.fullName || item.updater.name }}</span>\n <span *ngIf=\"item.updater && item.updateDate\">, </span>\n <span *ngIf=\"item.updateDate\">{{ item.updateDate | swissDate }} ({{ item.updateDate | timeAgo }})</span>\n </div>\n</ng-container>\n" }]
|
|
10550
10211
|
}], propDecorators: { item: [{
|
|
10551
10212
|
type: Input,
|
|
10552
10213
|
args: [{ required: true }]
|
|
10553
10214
|
}] } });
|
|
10554
10215
|
|
|
10555
|
-
const declarationsToExport = [NaturalStampComponent];
|
|
10556
|
-
class NaturalStampModule {
|
|
10557
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalStampModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10558
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalStampModule, declarations: [NaturalStampComponent], imports: [CommonModule, NaturalCommonModule], exports: [NaturalStampComponent] }); }
|
|
10559
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalStampModule, imports: [CommonModule, NaturalCommonModule] }); }
|
|
10560
|
-
}
|
|
10561
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalStampModule, decorators: [{
|
|
10562
|
-
type: NgModule,
|
|
10563
|
-
args: [{
|
|
10564
|
-
declarations: [...declarationsToExport],
|
|
10565
|
-
imports: [CommonModule, NaturalCommonModule],
|
|
10566
|
-
exports: [...declarationsToExport],
|
|
10567
|
-
}]
|
|
10568
|
-
}] });
|
|
10569
|
-
|
|
10570
10216
|
/*
|
|
10571
10217
|
* Public API Surface of natural
|
|
10572
10218
|
*/
|
|
@@ -10607,11 +10253,11 @@ class NaturalTableButtonComponent {
|
|
|
10607
10253
|
}
|
|
10608
10254
|
}
|
|
10609
10255
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTableButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10610
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalTableButtonComponent, selector: "natural-table-button", inputs: { queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", label: "label", icon: "icon", href: "href", navigate: "navigate", fragment: "fragment", preserveFragment: "preserveFragment", disabled: "disabled", raised: "raised", color: "color" }, outputs: { buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-icon-button>\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-raised-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{padding:0 8px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}\n"], dependencies: [{ kind: "directive", type:
|
|
10256
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalTableButtonComponent, isStandalone: true, selector: "natural-table-button", inputs: { queryParams: "queryParams", queryParamsHandling: "queryParamsHandling", label: "label", icon: "icon", href: "href", navigate: "navigate", fragment: "fragment", preserveFragment: "preserveFragment", disabled: "disabled", raised: "raised", color: "color" }, outputs: { buttonClick: "buttonClick" }, usesOnChanges: true, ngImport: i0, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-icon-button>\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-raised-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{padding:0 8px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: NaturalIconDirective, selector: "mat-icon[naturalIcon]", inputs: ["naturalIcon", "size"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconAnchor, selector: "a[mat-icon-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
10611
10257
|
}
|
|
10612
10258
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTableButtonComponent, decorators: [{
|
|
10613
10259
|
type: Component,
|
|
10614
|
-
args: [{ selector: 'natural-table-button', encapsulation: ViewEncapsulation.None, template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-icon-button>\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-raised-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{padding:0 8px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}\n"] }]
|
|
10260
|
+
args: [{ selector: 'natural-table-button', encapsulation: ViewEncapsulation.None, standalone: true, imports: [NgIf, MatIconModule, NaturalIconDirective, MatButtonModule, RouterLink], template: "<!-- Because directives can't be applied conditionally (routerLink, mat-button and mat-icon-button), we have to use different elements -->\n\n<!-- Edge case of a button without any kind of link at all -->\n<span *ngIf=\"type === 'none'\">\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span *ngIf=\"label\">{{ label }}</span>\n</span>\n\n<ng-container *ngIf=\"!raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n (click)=\"buttonClick.emit($event)\"\n [disabled]=\"disabled\"\n mat-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a *ngIf=\"type === 'click' && !label\" (click)=\"buttonClick.emit($event)\" [disabled]=\"disabled\" mat-icon-button>\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n\n<ng-container *ngIf=\"raised\">\n <!-- App routed link with label... -->\n <a\n *ngIf=\"type === 'routerLink' && label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'routerLink' && !label\"\n [color]=\"color\"\n [queryParams]=\"queryParams\"\n [queryParamsHandling]=\"queryParamsHandling\"\n [routerLink]=\"navigate\"\n [fragment]=\"fragment\"\n [preserveFragment]=\"preserveFragment\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n <!-- Click with label... -->\n <a\n *ngIf=\"type === 'click' && label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-raised-button\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'click' && !label\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick.emit($event)\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n\n <!-- External link with label... -->\n <a\n *ngIf=\"type === 'href' && label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-raised-button\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n <span>{{ label }}</span>\n </a>\n\n <!-- ... and without label -->\n <a\n *ngIf=\"type === 'href' && !label\"\n [attr.href]=\"href\"\n [color]=\"color\"\n [disabled]=\"disabled\"\n mat-icon-button\n class=\"mat-elevation-z4\"\n target=\"_blank\"\n >\n <mat-icon *ngIf=\"icon\" [naturalIcon]=\"icon\"></mat-icon>\n </a>\n</ng-container>\n", styles: ["natural-table-button{flex:1;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}natural-table-button mat-icon:not(:last-child){margin-right:5px}natural-table-button a.mat-mdc-button{flex:1;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}natural-table-button a.mat-mdc-button .mdc-button__label{display:flex;flex-direction:row;align-items:center}natural-table-button>span{padding:0 8px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}\n"] }]
|
|
10615
10261
|
}], propDecorators: { queryParams: [{
|
|
10616
10262
|
type: Input
|
|
10617
10263
|
}], queryParamsHandling: [{
|
|
@@ -10638,38 +10284,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
10638
10284
|
type: Output
|
|
10639
10285
|
}] } });
|
|
10640
10286
|
|
|
10641
|
-
class NaturalTableButtonModule {
|
|
10642
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTableButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10643
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalTableButtonModule, declarations: [NaturalTableButtonComponent], imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule, MatIconModule], exports: [NaturalTableButtonComponent] }); }
|
|
10644
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTableButtonModule, imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule, MatIconModule] }); }
|
|
10645
|
-
}
|
|
10646
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalTableButtonModule, decorators: [{
|
|
10647
|
-
type: NgModule,
|
|
10648
|
-
args: [{
|
|
10649
|
-
declarations: [NaturalTableButtonComponent],
|
|
10650
|
-
imports: [CommonModule, RouterModule, MatButtonModule, NaturalIconModule, MatIconModule],
|
|
10651
|
-
exports: [NaturalTableButtonComponent],
|
|
10652
|
-
}]
|
|
10653
|
-
}] });
|
|
10654
|
-
|
|
10655
10287
|
/*
|
|
10656
10288
|
* Public API Surface of natural
|
|
10657
10289
|
*/
|
|
10658
10290
|
|
|
10659
|
-
class NaturalDialogTriggerModule {
|
|
10660
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
10661
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerModule, declarations: [NaturalDialogTriggerComponent], imports: [CommonModule, MatDialogModule], exports: [NaturalDialogTriggerComponent] }); }
|
|
10662
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerModule, imports: [CommonModule, MatDialogModule] }); }
|
|
10663
|
-
}
|
|
10664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalDialogTriggerModule, decorators: [{
|
|
10665
|
-
type: NgModule,
|
|
10666
|
-
args: [{
|
|
10667
|
-
declarations: [NaturalDialogTriggerComponent],
|
|
10668
|
-
imports: [CommonModule, MatDialogModule],
|
|
10669
|
-
exports: [NaturalDialogTriggerComponent],
|
|
10670
|
-
}]
|
|
10671
|
-
}] });
|
|
10672
|
-
|
|
10673
10291
|
/*
|
|
10674
10292
|
* Public API Surface of natural
|
|
10675
10293
|
*/
|
|
@@ -11029,7 +10647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11029
10647
|
/**
|
|
11030
10648
|
* Show an avatar from different sources
|
|
11031
10649
|
*/
|
|
11032
|
-
class
|
|
10650
|
+
class NaturalAvatarComponent {
|
|
11033
10651
|
constructor(avatarService) {
|
|
11034
10652
|
this.avatarService = avatarService;
|
|
11035
10653
|
this.size = 50;
|
|
@@ -11144,8 +10762,8 @@ class AvatarComponent {
|
|
|
11144
10762
|
height: this.size + 'px',
|
|
11145
10763
|
};
|
|
11146
10764
|
}
|
|
11147
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
11148
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type:
|
|
10765
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAvatarComponent, deps: [{ token: AvatarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10766
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.2", type: NaturalAvatarComponent, isStandalone: true, selector: "natural-avatar", inputs: { image: "image", initials: "initials", gravatar: "gravatar", size: "size", textSizeRatio: "textSizeRatio", bgColor: "bgColor", fgColor: "fgColor", borderRadius: "borderRadius", textMaximumLength: "textMaximumLength" }, usesOnChanges: true, ngImport: i0, template: `
|
|
11149
10767
|
<div class="avatar-container" [ngStyle]="hostStyle">
|
|
11150
10768
|
<img
|
|
11151
10769
|
*ngIf="avatarSrc"
|
|
@@ -11161,9 +10779,9 @@ class AvatarComponent {
|
|
|
11161
10779
|
{{ avatarText }}
|
|
11162
10780
|
</div>
|
|
11163
10781
|
</div>
|
|
11164
|
-
`, isInline: true, styles: [":host{border-radius:50%}\n"], dependencies: [{ kind: "directive", type:
|
|
10782
|
+
`, isInline: true, styles: [":host{border-radius:50%}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
11165
10783
|
}
|
|
11166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
10784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAvatarComponent, decorators: [{
|
|
11167
10785
|
type: Component,
|
|
11168
10786
|
args: [{ selector: 'natural-avatar', template: `
|
|
11169
10787
|
<div class="avatar-container" [ngStyle]="hostStyle">
|
|
@@ -11181,7 +10799,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11181
10799
|
{{ avatarText }}
|
|
11182
10800
|
</div>
|
|
11183
10801
|
</div>
|
|
11184
|
-
`, styles: [":host{border-radius:50%}\n"] }]
|
|
10802
|
+
`, standalone: true, imports: [NgStyle, NgIf], styles: [":host{border-radius:50%}\n"] }]
|
|
11185
10803
|
}], ctorParameters: function () { return [{ type: AvatarService }]; }, propDecorators: { image: [{
|
|
11186
10804
|
type: Input
|
|
11187
10805
|
}], initials: [{
|
|
@@ -11202,35 +10820,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11202
10820
|
type: Input
|
|
11203
10821
|
}] } });
|
|
11204
10822
|
|
|
11205
|
-
const declarations = [AvatarComponent];
|
|
11206
|
-
class NaturalAvatarModule {
|
|
11207
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11208
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalAvatarModule, declarations: [AvatarComponent], imports: [CommonModule], exports: [AvatarComponent] }); }
|
|
11209
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAvatarModule, imports: [CommonModule] }); }
|
|
11210
|
-
}
|
|
11211
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalAvatarModule, decorators: [{
|
|
11212
|
-
type: NgModule,
|
|
11213
|
-
args: [{
|
|
11214
|
-
imports: [CommonModule],
|
|
11215
|
-
declarations: declarations,
|
|
11216
|
-
exports: declarations,
|
|
11217
|
-
}]
|
|
11218
|
-
}] });
|
|
11219
|
-
|
|
11220
10823
|
/*
|
|
11221
10824
|
* Public API Surface of ngx-avatar
|
|
11222
10825
|
*/
|
|
11223
10826
|
|
|
11224
|
-
class NaturalMatomoModule {
|
|
11225
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
11226
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoModule }); }
|
|
11227
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoModule }); }
|
|
11228
|
-
}
|
|
11229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoModule, decorators: [{
|
|
11230
|
-
type: NgModule,
|
|
11231
|
-
args: [{}]
|
|
11232
|
-
}] });
|
|
11233
|
-
|
|
11234
10827
|
/**
|
|
11235
10828
|
* Service to track visitors via Matomo.
|
|
11236
10829
|
*
|
|
@@ -11314,7 +10907,7 @@ class NaturalMatomoService {
|
|
|
11314
10907
|
this.referrerUrl = currentUrl;
|
|
11315
10908
|
});
|
|
11316
10909
|
}
|
|
11317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoService, deps: [{ token: i2$
|
|
10910
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoService, deps: [{ token: i2$4.Router }, { token: DOCUMENT }, { token: PLATFORM_ID }, { token: i2$5.Title }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11318
10911
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoService, providedIn: 'root' }); }
|
|
11319
10912
|
}
|
|
11320
10913
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalMatomoService, decorators: [{
|
|
@@ -11322,13 +10915,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11322
10915
|
args: [{
|
|
11323
10916
|
providedIn: 'root',
|
|
11324
10917
|
}]
|
|
11325
|
-
}], ctorParameters: function () { return [{ type: i2$
|
|
10918
|
+
}], ctorParameters: function () { return [{ type: i2$4.Router }, { type: Document, decorators: [{
|
|
11326
10919
|
type: Inject,
|
|
11327
10920
|
args: [DOCUMENT]
|
|
11328
10921
|
}] }, { type: Object, decorators: [{
|
|
11329
10922
|
type: Inject,
|
|
11330
10923
|
args: [PLATFORM_ID]
|
|
11331
|
-
}] }, { type: i2$
|
|
10924
|
+
}] }, { type: i2$5.Title }]; } });
|
|
11332
10925
|
|
|
11333
10926
|
/*
|
|
11334
10927
|
* Public API Surface of natural
|
|
@@ -11339,10 +10932,10 @@ const NaturalLoggerConfigExtra = new InjectionToken('Class that may provide extr
|
|
|
11339
10932
|
/**
|
|
11340
10933
|
* Replace Angular's error handler to also send the log to a remote server via HTTP POST.
|
|
11341
10934
|
*
|
|
11342
|
-
* Usage is automatic as soon we
|
|
10935
|
+
* Usage is automatic as soon as we provide it via:
|
|
11343
10936
|
*
|
|
11344
10937
|
* ```ts
|
|
11345
|
-
*
|
|
10938
|
+
* provideErrorHandler('http://example.com', ExtraService),
|
|
11346
10939
|
* ```
|
|
11347
10940
|
*/
|
|
11348
10941
|
class NaturalErrorHandler extends ErrorHandler {
|
|
@@ -11406,7 +10999,7 @@ class NaturalErrorHandler extends ErrorHandler {
|
|
|
11406
10999
|
.subscribe();
|
|
11407
11000
|
}
|
|
11408
11001
|
}
|
|
11409
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalErrorHandler, deps: [{ token: i1$
|
|
11002
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalErrorHandler, deps: [{ token: i1$9.HttpClient }, { token: DOCUMENT }, { token: NaturalLoggerConfigUrl, optional: true }, { token: NaturalLoggerConfigExtra, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
11410
11003
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalErrorHandler, providedIn: 'root' }); }
|
|
11411
11004
|
}
|
|
11412
11005
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalErrorHandler, decorators: [{
|
|
@@ -11414,7 +11007,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11414
11007
|
args: [{
|
|
11415
11008
|
providedIn: 'root',
|
|
11416
11009
|
}]
|
|
11417
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
11010
|
+
}], ctorParameters: function () { return [{ type: i1$9.HttpClient }, { type: Document, decorators: [{
|
|
11418
11011
|
type: Inject,
|
|
11419
11012
|
args: [DOCUMENT]
|
|
11420
11013
|
}] }, { type: undefined, decorators: [{
|
|
@@ -11429,41 +11022,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11429
11022
|
args: [NaturalLoggerConfigExtra]
|
|
11430
11023
|
}] }]; } });
|
|
11431
11024
|
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
providers.push({
|
|
11025
|
+
function provideErrorHandler(url, extraService) {
|
|
11026
|
+
const providers = [
|
|
11027
|
+
{
|
|
11436
11028
|
provide: ErrorHandler,
|
|
11437
11029
|
useClass: NaturalErrorHandler,
|
|
11438
|
-
},
|
|
11030
|
+
},
|
|
11031
|
+
{
|
|
11439
11032
|
provide: NaturalLoggerConfigUrl,
|
|
11440
11033
|
useValue: url,
|
|
11034
|
+
},
|
|
11035
|
+
];
|
|
11036
|
+
if (extraService) {
|
|
11037
|
+
providers.push({
|
|
11038
|
+
provide: NaturalLoggerConfigExtra,
|
|
11039
|
+
useClass: extraService,
|
|
11441
11040
|
});
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11041
|
+
}
|
|
11042
|
+
return providers;
|
|
11043
|
+
}
|
|
11044
|
+
|
|
11045
|
+
/*
|
|
11046
|
+
* Public API Surface of natural
|
|
11047
|
+
*/
|
|
11048
|
+
|
|
11049
|
+
/**
|
|
11050
|
+
* Need to add http:// prefix if we don't have prefix already AND we don't have part of it
|
|
11051
|
+
*/
|
|
11052
|
+
function ensureHttpPrefix(value) {
|
|
11053
|
+
if (!value) {
|
|
11054
|
+
return value;
|
|
11055
|
+
}
|
|
11056
|
+
const completePrefix = /^(https?):\/\//i.test(value);
|
|
11057
|
+
const startingPrefix = 'https://'.indexOf(value) === 0 || 'http://'.indexOf(value) === 0;
|
|
11058
|
+
if (!completePrefix && !startingPrefix) {
|
|
11059
|
+
return 'http://' + value;
|
|
11060
|
+
}
|
|
11061
|
+
else {
|
|
11062
|
+
return value;
|
|
11063
|
+
}
|
|
11064
|
+
}
|
|
11065
|
+
/**
|
|
11066
|
+
* This directive only supports ReactiveForms due to ngModel/ngControl encapsulation and changes emissions.
|
|
11067
|
+
*/
|
|
11068
|
+
class NaturalHttpPrefixDirective extends NaturalAbstractController {
|
|
11069
|
+
constructor() {
|
|
11070
|
+
super();
|
|
11071
|
+
this.naturalHttpPrefix = null;
|
|
11072
|
+
}
|
|
11073
|
+
httpize($event) {
|
|
11074
|
+
if (this.naturalHttpPrefix) {
|
|
11075
|
+
const newValue = ensureHttpPrefix($event) || $event;
|
|
11076
|
+
if ($event !== newValue) {
|
|
11077
|
+
this.naturalHttpPrefix.setValue(newValue);
|
|
11078
|
+
}
|
|
11447
11079
|
}
|
|
11448
|
-
return {
|
|
11449
|
-
ngModule: NaturalErrorModule,
|
|
11450
|
-
providers: providers,
|
|
11451
|
-
};
|
|
11452
11080
|
}
|
|
11453
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
11454
|
-
static { this.ɵ
|
|
11455
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalErrorModule, imports: [HttpClientModule] }); }
|
|
11081
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHttpPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
11082
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.2", type: NaturalHttpPrefixDirective, isStandalone: true, selector: "[naturalHttpPrefix]", inputs: { naturalHttpPrefix: "naturalHttpPrefix" }, host: { listeners: { "ngModelChange": "httpize($event)" } }, usesInheritance: true, ngImport: i0 }); }
|
|
11456
11083
|
}
|
|
11457
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type:
|
|
11458
|
-
type:
|
|
11084
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImport: i0, type: NaturalHttpPrefixDirective, decorators: [{
|
|
11085
|
+
type: Directive,
|
|
11459
11086
|
args: [{
|
|
11460
|
-
|
|
11087
|
+
selector: '[naturalHttpPrefix]',
|
|
11088
|
+
standalone: true,
|
|
11461
11089
|
}]
|
|
11462
|
-
}]
|
|
11090
|
+
}], ctorParameters: function () { return []; }, propDecorators: { naturalHttpPrefix: [{
|
|
11091
|
+
type: Input
|
|
11092
|
+
}], httpize: [{
|
|
11093
|
+
type: HostListener,
|
|
11094
|
+
args: ['ngModelChange', ['$event']]
|
|
11095
|
+
}] } });
|
|
11463
11096
|
|
|
11464
|
-
|
|
11465
|
-
*
|
|
11097
|
+
/**
|
|
11098
|
+
* Minimal, global providers for Natural to work
|
|
11466
11099
|
*/
|
|
11100
|
+
const naturalProviders = [
|
|
11101
|
+
importProvidersFrom([MatDialogModule, MatSnackBarModule]),
|
|
11102
|
+
sessionStorageProvider,
|
|
11103
|
+
localStorageProvider,
|
|
11104
|
+
];
|
|
11467
11105
|
|
|
11468
11106
|
// Load `$localize` onto the global scope - to be able to use that function to translate strings in components/services.
|
|
11469
11107
|
|
|
@@ -11471,5 +11109,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.2", ngImpor
|
|
|
11471
11109
|
* Generated bundle index. Do not edit.
|
|
11472
11110
|
*/
|
|
11473
11111
|
|
|
11474
|
-
export {
|
|
11112
|
+
export { AvatarService, LOCAL_STORAGE, NATURAL_DROPDOWN_DATA, NATURAL_ICONS_CONFIG, NATURAL_PERSISTENCE_VALIDATOR, NATURAL_SEO_CONFIG, NaturalAbstractController, NaturalAbstractDetail, NaturalAbstractEditableList, NaturalAbstractList, NaturalAbstractModelService, NaturalAbstractNavigableList, NaturalAbstractPanel, NaturalAlertService, NaturalAvatarComponent, NaturalCapitalizePipe, NaturalColumnsPickerComponent, NaturalConfirmComponent, NaturalDataSource, NaturalDebounceService, NaturalDetailHeaderComponent, NaturalDialogTriggerComponent, NaturalDropdownRef, NaturalEllipsisPipe, NaturalEnumPipe, NaturalEnumService, NaturalErrorHandler, NaturalFileComponent, NaturalFileDropDirective, NaturalFileSelectDirective, NaturalFileService, NaturalFixedButtonComponent, NaturalFixedButtonDetailComponent, NaturalHierarchicSelectorComponent, NaturalHierarchicSelectorDialogComponent, NaturalHierarchicSelectorDialogService, NaturalHierarchicSelectorService, NaturalHttpPrefixDirective, NaturalIconDirective, NaturalLinkMutationService, NaturalLinkableTabDirective, NaturalLoggerConfigExtra, NaturalLoggerConfigUrl, NaturalMatomoService, NaturalMemoryStorage, NaturalPanelsComponent, NaturalPanelsService, NaturalPersistenceService, NaturalQueryVariablesManager, NaturalRelationsComponent, NaturalSearchComponent, NaturalSelectComponent, NaturalSelectEnumComponent, NaturalSelectHierarchicComponent, NaturalSeoService, NaturalSidenavComponent, NaturalSidenavContainerComponent, NaturalSidenavContentComponent, NaturalSidenavService, NaturalSidenavStackService, NaturalSrcDensityDirective, NaturalStampComponent, NaturalSwissDatePipe, NaturalSwissParsingDateAdapter, NaturalTableButtonComponent, NaturalTimeAgoPipe, PanelsHooksConfig, SESSION_STORAGE, SortingOrder, TypeDateComponent, TypeDateRangeComponent, TypeHierarchicSelectorComponent, TypeNaturalSelectComponent, TypeNumberComponent, TypeSelectComponent, TypeTextComponent, available, cancellableTimeout, cleanSameValues, collectErrors, copyToClipboard, debug, decimal, deepFreeze, deliverableEmail, ensureHttpPrefix, fallbackIfNoOpenedPanels, formatIsoDate, formatIsoDateTime, fromUrl, getForegroundColor, hasFilesAndProcessDate, ifValid, integer, isMutation, localStorageFactory, localStorageProvider, lowerCaseFirstLetter, makePlural, memoryLocalStorageProvider, memorySessionStorageProvider, mergeOverrideArray, money, naturalPanelsUrlMatcher, naturalProviders, provideErrorHandler, provideIcons, providePanels, provideSeo, relationsToIds, replaceObjectKeepingReference, replaceOperatorByField, replaceOperatorByName, sessionStorageFactory, sessionStorageProvider, toGraphQLDoctrineFilter, toNavigationParameters, toUrl, unique, upperCaseFirstLetter, urlValidator, validTlds, validateAllFormControls, wrapLike };
|
|
11475
11113
|
//# sourceMappingURL=ecodev-natural.mjs.map
|