ngx-ode-ui 4.6.0-dev.1 → 4.6.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/esm2020/lib/components/datepicker/datepicker.component.mjs +148 -0
- package/esm2020/lib/components/dropdown/dropdown.component.mjs +55 -0
- package/esm2020/lib/components/ellipsis/ellipsis.component.mjs +53 -0
- package/esm2020/lib/components/form-errors/form-errors.component.mjs +35 -0
- package/esm2020/lib/components/form-field/form-field.component.mjs +24 -0
- package/esm2020/lib/components/item-tree/item-tree.component.mjs +170 -0
- package/esm2020/lib/components/lightbox/lightbox.component.mjs +70 -0
- package/esm2020/lib/components/lightbox-confirm/lightbox-confirm.component.mjs +43 -0
- package/esm2020/lib/components/list/list.component.mjs +88 -0
- package/esm2020/lib/components/list-checkable/list-checkable.component.mjs +79 -0
- package/esm2020/lib/components/message-box/message-box.component.mjs +92 -0
- package/esm2020/lib/components/message-sticker/message-sticker.component.mjs +51 -0
- package/esm2020/lib/components/mono-select/mono-select.component.mjs +83 -0
- package/esm2020/lib/components/multi-combo/multi-combo.component.mjs +166 -0
- package/esm2020/lib/components/multi-select/multi-select.component.mjs +104 -0
- package/esm2020/lib/components/panel-section/panel-section.component.mjs +23 -0
- package/esm2020/lib/components/portal/portal.component.mjs +15 -0
- package/esm2020/lib/components/push-panel/push-panel.component.mjs +43 -0
- package/esm2020/lib/components/search-input/search-input.component.mjs +87 -0
- package/esm2020/lib/components/search-toolbar/search-toolbar.component.mjs +56 -0
- package/esm2020/lib/components/side-layout/side-layout.component.mjs +23 -0
- package/esm2020/lib/components/side-panel/side-panel.component.mjs +41 -0
- package/esm2020/lib/components/spinner-cube/spinner-cube.component.mjs +31 -0
- package/esm2020/lib/components/table/pager.component.mjs +48 -0
- package/esm2020/lib/components/tooltip/tooltip.component.mjs +104 -0
- package/esm2020/lib/components/upload-files/upload-files.component.mjs +59 -0
- package/esm2020/lib/components/value-editable/simple-select.component.mjs +29 -0
- package/esm2020/lib/components/wizard/wizard.component.mjs +152 -0
- package/esm2020/lib/directives/anchor.directive.mjs +27 -0
- package/esm2020/lib/directives/drag-and-drop-files.directive.mjs +82 -0
- package/esm2020/lib/directives/dynamic-component/component-descriptor.model.mjs +15 -0
- package/esm2020/lib/directives/dynamic-component/dynamic-component.directive.mjs +58 -0
- package/esm2020/lib/directives/dynamictemplate.directive.mjs +83 -0
- package/esm2020/lib/directives/object-url.directive.mjs +28 -0
- package/esm2020/lib/ngx-ode-ui.module.mjs +282 -0
- package/esm2020/lib/pipes/bytes.pipe.mjs +20 -0
- package/esm2020/lib/pipes/filter.pipe.mjs +97 -0
- package/esm2020/lib/pipes/flattenObjArray.pipe.mjs +35 -0
- package/esm2020/lib/pipes/keys.pipe.mjs +20 -0
- package/esm2020/lib/pipes/length.pipe.mjs +17 -0
- package/esm2020/lib/pipes/limit.pipe.mjs +17 -0
- package/esm2020/lib/pipes/localizedDate.pipe.mjs +23 -0
- package/esm2020/lib/pipes/orderBy.pipe.mjs +161 -0
- package/esm2020/lib/pipes/replace.pipe.mjs +20 -0
- package/esm2020/lib/pipes/store.pipe.mjs +17 -0
- package/esm2020/lib/services/dynamicModuleImports.service.mjs +13 -0
- package/esm2020/lib/services/inputFile.service.mjs +56 -0
- package/esm2020/lib/services/labels.service.mjs +32 -0
- package/esm2020/lib/services/spinner.service.mjs +76 -0
- package/esm2020/lib/utils/math.mjs +19 -0
- package/esm2020/lib/utils/string.mjs +11 -0
- package/esm2020/lib/utils/testing.mjs +7 -0
- package/esm2020/ngx-ode-ui.mjs +5 -0
- package/esm2020/public-api.mjs +57 -0
- package/fesm2015/ngx-ode-ui.mjs +2954 -0
- package/fesm2015/ngx-ode-ui.mjs.map +1 -0
- package/fesm2020/ngx-ode-ui.mjs +2952 -0
- package/fesm2020/ngx-ode-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/datepicker/datepicker.component.d.ts +7 -2
- package/lib/components/dropdown/dropdown.component.d.ts +3 -0
- package/lib/components/ellipsis/ellipsis.component.d.ts +4 -1
- package/lib/components/form-errors/form-errors.component.d.ts +3 -0
- package/lib/components/form-field/form-field.component.d.ts +3 -0
- package/lib/components/item-tree/item-tree.component.d.ts +5 -1
- package/lib/components/lightbox/lightbox.component.d.ts +5 -1
- package/lib/components/lightbox-confirm/lightbox-confirm.component.d.ts +3 -0
- package/lib/components/list/list.component.d.ts +5 -1
- package/lib/components/list-checkable/list-checkable.component.d.ts +5 -1
- package/lib/components/message-box/message-box.component.d.ts +8 -4
- package/lib/components/message-sticker/message-sticker.component.d.ts +3 -0
- package/lib/components/mono-select/mono-select.component.d.ts +3 -0
- package/lib/components/multi-combo/multi-combo.component.d.ts +4 -1
- package/lib/components/multi-select/multi-select.component.d.ts +3 -0
- package/lib/components/panel-section/panel-section.component.d.ts +3 -0
- package/lib/components/portal/portal.component.d.ts +3 -0
- package/lib/components/push-panel/push-panel.component.d.ts +4 -1
- package/lib/components/search-input/search-input.component.d.ts +5 -1
- package/lib/components/search-toolbar/search-toolbar.component.d.ts +3 -0
- package/lib/components/side-layout/side-layout.component.d.ts +3 -0
- package/lib/components/side-panel/side-panel.component.d.ts +4 -1
- package/lib/components/spinner-cube/spinner-cube.component.d.ts +5 -1
- package/lib/components/table/pager.component.d.ts +3 -0
- package/lib/components/tooltip/tooltip.component.d.ts +3 -0
- package/lib/components/upload-files/upload-files.component.d.ts +3 -0
- package/lib/components/value-editable/simple-select.component.d.ts +3 -0
- package/lib/components/wizard/wizard.component.d.ts +5 -0
- package/lib/directives/anchor.directive.d.ts +3 -0
- package/lib/directives/drag-and-drop-files.directive.d.ts +3 -0
- package/lib/directives/dynamic-component/dynamic-component.directive.d.ts +3 -0
- package/lib/directives/dynamictemplate.directive.d.ts +4 -1
- package/lib/directives/object-url.directive.d.ts +3 -0
- package/lib/ngx-ode-ui.module.d.ts +53 -2
- package/lib/pipes/bytes.pipe.d.ts +3 -0
- package/lib/pipes/filter.pipe.d.ts +3 -0
- package/lib/pipes/flattenObjArray.pipe.d.ts +3 -0
- package/lib/pipes/keys.pipe.d.ts +3 -0
- package/lib/pipes/length.pipe.d.ts +3 -0
- package/lib/pipes/limit.pipe.d.ts +3 -0
- package/lib/pipes/localizedDate.pipe.d.ts +3 -0
- package/lib/pipes/orderBy.pipe.d.ts +3 -0
- package/lib/pipes/replace.pipe.d.ts +8 -0
- package/lib/pipes/store.pipe.d.ts +3 -0
- package/lib/services/dynamicModuleImports.service.d.ts +3 -0
- package/lib/services/inputFile.service.d.ts +3 -0
- package/lib/services/labels.service.d.ts +3 -0
- package/lib/services/spinner.service.d.ts +4 -1
- package/package.json +29 -17
- package/public-api.d.ts +3 -0
- package/CHANGELOG.md +0 -14
- package/bundles/ngx-ode-ui.umd.js +0 -5804
- package/bundles/ngx-ode-ui.umd.js.map +0 -1
- package/bundles/ngx-ode-ui.umd.min.js +0 -17
- package/bundles/ngx-ode-ui.umd.min.js.map +0 -1
- package/esm2015/lib/components/datepicker/datepicker.component.js +0 -261
- package/esm2015/lib/components/dropdown/dropdown.component.js +0 -76
- package/esm2015/lib/components/ellipsis/ellipsis.component.js +0 -98
- package/esm2015/lib/components/form-errors/form-errors.component.js +0 -65
- package/esm2015/lib/components/form-field/form-field.component.js +0 -40
- package/esm2015/lib/components/item-tree/item-tree.component.js +0 -289
- package/esm2015/lib/components/lightbox/lightbox.component.js +0 -129
- package/esm2015/lib/components/lightbox-confirm/lightbox-confirm.component.js +0 -65
- package/esm2015/lib/components/list/list.component.js +0 -140
- package/esm2015/lib/components/list-checkable/list-checkable.component.js +0 -137
- package/esm2015/lib/components/message-box/message-box.component.js +0 -153
- package/esm2015/lib/components/message-sticker/message-sticker.component.js +0 -81
- package/esm2015/lib/components/mono-select/mono-select.component.js +0 -164
- package/esm2015/lib/components/multi-combo/multi-combo.component.js +0 -255
- package/esm2015/lib/components/multi-select/multi-select.component.js +0 -214
- package/esm2015/lib/components/panel-section/panel-section.component.js +0 -38
- package/esm2015/lib/components/portal/portal.component.js +0 -27
- package/esm2015/lib/components/push-panel/push-panel.component.js +0 -81
- package/esm2015/lib/components/search-input/search-input.component.js +0 -176
- package/esm2015/lib/components/search-toolbar/search-toolbar.component.js +0 -84
- package/esm2015/lib/components/side-layout/side-layout.component.js +0 -39
- package/esm2015/lib/components/side-panel/side-panel.component.js +0 -76
- package/esm2015/lib/components/spinner-cube/spinner-cube.component.js +0 -67
- package/esm2015/lib/components/table/pager.component.js +0 -95
- package/esm2015/lib/components/tooltip/tooltip.component.js +0 -172
- package/esm2015/lib/components/upload-files/upload-files.component.js +0 -112
- package/esm2015/lib/components/value-editable/simple-select.component.js +0 -57
- package/esm2015/lib/components/wizard/wizard.component.js +0 -225
- package/esm2015/lib/directives/anchor.directive.js +0 -34
- package/esm2015/lib/directives/drag-and-drop-files.directive.js +0 -126
- package/esm2015/lib/directives/dynamic-component/component-descriptor.model.js +0 -34
- package/esm2015/lib/directives/dynamic-component/dynamic-component.directive.js +0 -100
- package/esm2015/lib/directives/dynamictemplate.directive.js +0 -159
- package/esm2015/lib/directives/object-url.directive.js +0 -53
- package/esm2015/lib/ngx-ode-ui.module.js +0 -188
- package/esm2015/lib/pipes/bytes.pipe.js +0 -27
- package/esm2015/lib/pipes/filter.pipe.js +0 -141
- package/esm2015/lib/pipes/flattenObjArray.pipe.js +0 -52
- package/esm2015/lib/pipes/keys.pipe.js +0 -27
- package/esm2015/lib/pipes/length.pipe.js +0 -22
- package/esm2015/lib/pipes/limit.pipe.js +0 -24
- package/esm2015/lib/pipes/localizedDate.pipe.js +0 -44
- package/esm2015/lib/pipes/orderBy.pipe.js +0 -269
- package/esm2015/lib/pipes/store.pipe.js +0 -24
- package/esm2015/lib/services/dynamicModuleImports.service.js +0 -19
- package/esm2015/lib/services/inputFile.service.js +0 -80
- package/esm2015/lib/services/labels.service.js +0 -54
- package/esm2015/lib/services/spinner.service.js +0 -163
- package/esm2015/lib/utils/math.js +0 -49
- package/esm2015/lib/utils/string.js +0 -29
- package/esm2015/lib/utils/testing.js +0 -20
- package/esm2015/ngx-ode-ui.js +0 -12
- package/esm2015/public-api.js +0 -59
- package/esm5/lib/components/datepicker/datepicker.component.js +0 -292
- package/esm5/lib/components/dropdown/dropdown.component.js +0 -81
- package/esm5/lib/components/ellipsis/ellipsis.component.js +0 -106
- package/esm5/lib/components/form-errors/form-errors.component.js +0 -73
- package/esm5/lib/components/form-field/form-field.component.js +0 -41
- package/esm5/lib/components/item-tree/item-tree.component.js +0 -345
- package/esm5/lib/components/lightbox/lightbox.component.js +0 -141
- package/esm5/lib/components/lightbox-confirm/lightbox-confirm.component.js +0 -67
- package/esm5/lib/components/list/list.component.js +0 -146
- package/esm5/lib/components/list-checkable/list-checkable.component.js +0 -148
- package/esm5/lib/components/message-box/message-box.component.js +0 -190
- package/esm5/lib/components/message-sticker/message-sticker.component.js +0 -92
- package/esm5/lib/components/mono-select/mono-select.component.js +0 -192
- package/esm5/lib/components/multi-combo/multi-combo.component.js +0 -294
- package/esm5/lib/components/multi-select/multi-select.component.js +0 -258
- package/esm5/lib/components/panel-section/panel-section.component.js +0 -40
- package/esm5/lib/components/portal/portal.component.js +0 -28
- package/esm5/lib/components/push-panel/push-panel.component.js +0 -91
- package/esm5/lib/components/search-input/search-input.component.js +0 -199
- package/esm5/lib/components/search-toolbar/search-toolbar.component.js +0 -93
- package/esm5/lib/components/side-layout/side-layout.component.js +0 -41
- package/esm5/lib/components/side-panel/side-panel.component.js +0 -85
- package/esm5/lib/components/spinner-cube/spinner-cube.component.js +0 -76
- package/esm5/lib/components/table/pager.component.js +0 -113
- package/esm5/lib/components/tooltip/tooltip.component.js +0 -188
- package/esm5/lib/components/upload-files/upload-files.component.js +0 -133
- package/esm5/lib/components/value-editable/simple-select.component.js +0 -59
- package/esm5/lib/components/wizard/wizard.component.js +0 -161
- package/esm5/lib/directives/anchor.directive.js +0 -39
- package/esm5/lib/directives/drag-and-drop-files.directive.js +0 -146
- package/esm5/lib/directives/dynamic-component/component-descriptor.model.js +0 -44
- package/esm5/lib/directives/dynamic-component/dynamic-component.directive.js +0 -109
- package/esm5/lib/directives/dynamictemplate.directive.js +0 -175
- package/esm5/lib/directives/object-url.directive.js +0 -62
- package/esm5/lib/ngx-ode-ui.module.js +0 -199
- package/esm5/lib/pipes/bytes.pipe.js +0 -37
- package/esm5/lib/pipes/filter.pipe.js +0 -179
- package/esm5/lib/pipes/flattenObjArray.pipe.js +0 -62
- package/esm5/lib/pipes/keys.pipe.js +0 -36
- package/esm5/lib/pipes/length.pipe.js +0 -30
- package/esm5/lib/pipes/limit.pipe.js +0 -35
- package/esm5/lib/pipes/localizedDate.pipe.js +0 -49
- package/esm5/lib/pipes/orderBy.pipe.js +0 -280
- package/esm5/lib/pipes/store.pipe.js +0 -35
- package/esm5/lib/services/dynamicModuleImports.service.js +0 -21
- package/esm5/lib/services/inputFile.service.js +0 -98
- package/esm5/lib/services/labels.service.js +0 -68
- package/esm5/lib/services/spinner.service.js +0 -195
- package/esm5/lib/utils/math.js +0 -49
- package/esm5/lib/utils/string.js +0 -29
- package/esm5/lib/utils/testing.js +0 -20
- package/esm5/ngx-ode-ui.js +0 -12
- package/esm5/public-api.js +0 -59
- package/fesm2015/ngx-ode-ui.js +0 -5027
- package/fesm2015/ngx-ode-ui.js.map +0 -1
- package/fesm5/ngx-ode-ui.js +0 -5560
- package/fesm5/ngx-ode-ui.js.map +0 -1
- package/ngx-ode-ui.d.ts +0 -6
- package/ngx-ode-ui.metadata.json +0 -1
|
@@ -0,0 +1,2952 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, forwardRef, EventEmitter, Component, ViewChild, Input, Output, HostBinding, Directive, Pipe, TemplateRef, ContentChild, ChangeDetectionStrategy, HostListener, ContentChildren, Injector, NgModule } from '@angular/core';
|
|
3
|
+
import { throwError, Observable, Subject } from 'rxjs';
|
|
4
|
+
import { OdeComponent } from 'ngx-ode-core';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { NG_VALUE_ACCESSOR, NgModel, FormsModule } from '@angular/forms';
|
|
7
|
+
import Flatpickr from 'flatpickr';
|
|
8
|
+
import French from 'flatpickr/dist/l10n/fr.js';
|
|
9
|
+
import * as i1 from '@angular/common';
|
|
10
|
+
import { CommonModule, DatePipe } from '@angular/common';
|
|
11
|
+
import * as i2$1 from 'ngx-ode-sijil';
|
|
12
|
+
import { NgxOdeSijilModule } from 'ngx-ode-sijil';
|
|
13
|
+
import * as i2$2 from 'ngx-infinite-scroll';
|
|
14
|
+
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
|
15
|
+
import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
16
|
+
|
|
17
|
+
class DynamicModuleImportsService {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.imports = [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
DynamicModuleImportsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicModuleImportsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23
|
+
DynamicModuleImportsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicModuleImportsService });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicModuleImportsService, decorators: [{
|
|
25
|
+
type: Injectable
|
|
26
|
+
}] });
|
|
27
|
+
|
|
28
|
+
class InputFileService {
|
|
29
|
+
validateFiles(files, maxFilesNumber, allowedExtensions) {
|
|
30
|
+
if (!files) {
|
|
31
|
+
return throwError('files is empty');
|
|
32
|
+
}
|
|
33
|
+
if (files.length > maxFilesNumber) {
|
|
34
|
+
return throwError(`Only ${maxFilesNumber} file(s) allowed`);
|
|
35
|
+
}
|
|
36
|
+
const validFiles = [];
|
|
37
|
+
const invalidFiles = [];
|
|
38
|
+
for (let i = 0; i < files.length; i++) {
|
|
39
|
+
const filenameSplit = files[i].name.split('.');
|
|
40
|
+
const ext = filenameSplit[filenameSplit.length - 1];
|
|
41
|
+
if (allowedExtensions.lastIndexOf(ext.toLowerCase()) !== -1) {
|
|
42
|
+
validFiles.push(files[i]);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
invalidFiles.push(files[i]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return new Observable(observer => {
|
|
49
|
+
if (validFiles.length > 0) {
|
|
50
|
+
observer.next(validFiles);
|
|
51
|
+
}
|
|
52
|
+
if (invalidFiles.length > 0) {
|
|
53
|
+
observer.error(`Extension not allowed. Allowed extensions: ${allowedExtensions}`);
|
|
54
|
+
}
|
|
55
|
+
observer.complete();
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
isSrcExternalUrl(src) {
|
|
59
|
+
if (src) {
|
|
60
|
+
return src.startsWith('http://') || src.startsWith('https://');
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
isSrcWorkspace(src) {
|
|
67
|
+
if (src) {
|
|
68
|
+
return src.startsWith('/workspace');
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
InputFileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: InputFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
76
|
+
InputFileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: InputFileService });
|
|
77
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: InputFileService, decorators: [{
|
|
78
|
+
type: Injectable
|
|
79
|
+
}] });
|
|
80
|
+
|
|
81
|
+
class LabelsService {
|
|
82
|
+
constructor() {
|
|
83
|
+
this.labels = {
|
|
84
|
+
'select.all': 'Select all',
|
|
85
|
+
'deselect.all': 'Deselect all',
|
|
86
|
+
search: 'Search'
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
static withLabels(labels) {
|
|
90
|
+
const newService = new LabelsService();
|
|
91
|
+
for (const prop in labels) {
|
|
92
|
+
newService.labels[prop] = labels[prop];
|
|
93
|
+
}
|
|
94
|
+
return newService;
|
|
95
|
+
}
|
|
96
|
+
getLabel(label) {
|
|
97
|
+
return this.labels[label] || label;
|
|
98
|
+
}
|
|
99
|
+
mixin(labels) {
|
|
100
|
+
for (const property in labels) {
|
|
101
|
+
this.labels[property] = labels[property];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
LabelsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LabelsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
106
|
+
LabelsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LabelsService });
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LabelsService, decorators: [{
|
|
108
|
+
type: Injectable
|
|
109
|
+
}] });
|
|
110
|
+
|
|
111
|
+
class SpinnerService {
|
|
112
|
+
constructor(appRef) {
|
|
113
|
+
this.appRef = appRef;
|
|
114
|
+
this.timer = 250;
|
|
115
|
+
this.loading = new Set();
|
|
116
|
+
this.timers = new Map();
|
|
117
|
+
this._trigger = new Subject();
|
|
118
|
+
this.wrap = (func, label, props = {}, ...args) => {
|
|
119
|
+
this.load(label, props.delay);
|
|
120
|
+
const promise = props.binding ?
|
|
121
|
+
func.bind(props.binding)(...args) :
|
|
122
|
+
func(...args);
|
|
123
|
+
promise.catch((err) => {
|
|
124
|
+
this.done(label);
|
|
125
|
+
throw err;
|
|
126
|
+
}).then(_ => {
|
|
127
|
+
this.done(label);
|
|
128
|
+
return _;
|
|
129
|
+
});
|
|
130
|
+
if (props.cdRef) {
|
|
131
|
+
props.cdRef.markForCheck();
|
|
132
|
+
}
|
|
133
|
+
return promise;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
get trigger() {
|
|
137
|
+
return this._trigger;
|
|
138
|
+
}
|
|
139
|
+
isLoading(something, pending = false) {
|
|
140
|
+
return this.loading.has(something) ||
|
|
141
|
+
(pending && this.timers.has(something));
|
|
142
|
+
}
|
|
143
|
+
perform(something, promise, timer) {
|
|
144
|
+
this.load(something, timer);
|
|
145
|
+
return promise.catch(err => {
|
|
146
|
+
this.done(something);
|
|
147
|
+
throw err;
|
|
148
|
+
}).then(_ => {
|
|
149
|
+
this.done(something);
|
|
150
|
+
return _;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
load(something, timer) {
|
|
154
|
+
if (this.timers.has(something)) {
|
|
155
|
+
window.clearTimeout(this.timers.get(something));
|
|
156
|
+
}
|
|
157
|
+
const addToQueue = () => {
|
|
158
|
+
this.loading.add(something);
|
|
159
|
+
this.timers.delete(something);
|
|
160
|
+
this.appRef.tick();
|
|
161
|
+
this.trigger.next(true);
|
|
162
|
+
};
|
|
163
|
+
if (timer === 0) {
|
|
164
|
+
addToQueue();
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
this.timers.set(something, window.setTimeout(addToQueue, timer || this.timer));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
done(something) {
|
|
171
|
+
window.clearTimeout(this.timers.get(something));
|
|
172
|
+
this.timers.delete(something);
|
|
173
|
+
this.loading.delete(something);
|
|
174
|
+
this.trigger.next(true);
|
|
175
|
+
this.appRef.tick();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
SpinnerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SpinnerService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
179
|
+
SpinnerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SpinnerService });
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SpinnerService, decorators: [{
|
|
181
|
+
type: Injectable
|
|
182
|
+
}], ctorParameters: function () { return [{ type: i0.ApplicationRef }]; } });
|
|
183
|
+
|
|
184
|
+
// access ngmodel
|
|
185
|
+
const NOOP = () => {
|
|
186
|
+
};
|
|
187
|
+
const CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR = {
|
|
188
|
+
provide: NG_VALUE_ACCESSOR,
|
|
189
|
+
useExisting: forwardRef(() => DatepickerComponent),
|
|
190
|
+
multi: true
|
|
191
|
+
};
|
|
192
|
+
class DatepickerComponent extends OdeComponent {
|
|
193
|
+
constructor(renderer, labelsService, injector) {
|
|
194
|
+
super(injector);
|
|
195
|
+
this.renderer = renderer;
|
|
196
|
+
this.labelsService = labelsService;
|
|
197
|
+
this.innerValue = '';
|
|
198
|
+
this.disabled = false;
|
|
199
|
+
this._readonly = false;
|
|
200
|
+
this.enableTime = false;
|
|
201
|
+
this.placeholder = '';
|
|
202
|
+
this.changeDate = new EventEmitter();
|
|
203
|
+
this.onChangeCallback = NOOP;
|
|
204
|
+
this.onTouchedCallback = NOOP;
|
|
205
|
+
}
|
|
206
|
+
get value() {
|
|
207
|
+
return this.innerValue;
|
|
208
|
+
}
|
|
209
|
+
set value(v) {
|
|
210
|
+
let init = false;
|
|
211
|
+
if (this.innerValue === undefined) {
|
|
212
|
+
init = true;
|
|
213
|
+
}
|
|
214
|
+
if (v !== this.innerValue) {
|
|
215
|
+
this.innerValue = v;
|
|
216
|
+
this.onChangeCallback(v);
|
|
217
|
+
if (!init) {
|
|
218
|
+
this.changeDate.emit(v);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
set readonly(val) {
|
|
223
|
+
this._readonly = val;
|
|
224
|
+
if (this.datePickerInst && this.datePickerInst.altInput) {
|
|
225
|
+
// Apply the readonly attribute addition/removal to the visible input (wrapped)
|
|
226
|
+
if (val)
|
|
227
|
+
this.datePickerInst.altInput.setAttribute('readonly', "");
|
|
228
|
+
else
|
|
229
|
+
this.datePickerInst.altInput.removeAttribute('readonly');
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
get readonly() {
|
|
233
|
+
return this._readonly;
|
|
234
|
+
}
|
|
235
|
+
ngAfterViewInit() {
|
|
236
|
+
super.ngAfterViewInit();
|
|
237
|
+
// add attr data-input, mandatory for the picker to work in wrap mode
|
|
238
|
+
this.renderer.setAttribute(this.inputElement.nativeElement, 'data-input', '');
|
|
239
|
+
// disabled case
|
|
240
|
+
if (this.disabled === true) {
|
|
241
|
+
this.model.control.disable();
|
|
242
|
+
}
|
|
243
|
+
const navigatorLanguage = navigator.language.split('-')[0];
|
|
244
|
+
let datePickerLocale = {};
|
|
245
|
+
if (navigatorLanguage === 'fr') {
|
|
246
|
+
datePickerLocale = French.fr;
|
|
247
|
+
}
|
|
248
|
+
// options for the flatpickr instance
|
|
249
|
+
const options = {
|
|
250
|
+
altInput: !this.disabled,
|
|
251
|
+
altFormat: 'd/m/Y',
|
|
252
|
+
dateFormat: 'Y-m-d',
|
|
253
|
+
allowInput: false,
|
|
254
|
+
enableTime: this.enableTime,
|
|
255
|
+
minDate: this.minDate,
|
|
256
|
+
maxDate: this.maxDate,
|
|
257
|
+
clickOpens: false,
|
|
258
|
+
wrap: true,
|
|
259
|
+
locale: datePickerLocale
|
|
260
|
+
};
|
|
261
|
+
this.datePickerInst = new Flatpickr(this.datePickerElement.nativeElement, options);
|
|
262
|
+
if (!this.disabled) {
|
|
263
|
+
this.datePickerInst.altInput.addEventListener('click', e => {
|
|
264
|
+
if (!this.readonly) {
|
|
265
|
+
this.datePickerInst.toggle();
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
// Force updating the date input readonly attribute :
|
|
270
|
+
this.readonly = this._readonly;
|
|
271
|
+
}
|
|
272
|
+
ngOnDestroy() {
|
|
273
|
+
super.ngOnDestroy();
|
|
274
|
+
this.datePickerInst.destroy();
|
|
275
|
+
}
|
|
276
|
+
writeValue(value) {
|
|
277
|
+
if (value !== this.innerValue && this.datePickerInst) {
|
|
278
|
+
this.innerValue = value;
|
|
279
|
+
this.datePickerInst.setDate(value);
|
|
280
|
+
this.onChangeCallback(value);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
registerOnChange(fn) {
|
|
284
|
+
this.onChangeCallback = fn;
|
|
285
|
+
}
|
|
286
|
+
registerOnTouched(fn) {
|
|
287
|
+
this.onTouchedCallback = fn;
|
|
288
|
+
}
|
|
289
|
+
labels(label) {
|
|
290
|
+
return this.labelsService.getLabel(label);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
DatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DatepickerComponent, deps: [{ token: i0.Renderer2 }, { token: LabelsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
294
|
+
DatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: DatepickerComponent, selector: "ode-date-picker", inputs: { disabled: "disabled", readonly: "readonly", enableTime: "enableTime", placeholder: "placeholder", minDate: "minDate", maxDate: "maxDate" }, outputs: { changeDate: "changeDate" }, providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "datePickerElement", first: true, predicate: ["datePickerElement"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["inputRef"], descendants: true }, { propertyName: "model", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"flatpickr\" #datePickerElement>\n <input type=\"date\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [ngClass]=\"{ 'cursor-default': disabled }\" placeholder=\"{{ placeholder }}\" #inputRef>\n <a *ngIf=\"!disabled\" [class.hidden]=\"readonly\" data-toggle [title]=\"labels('datepicker.open')\"><i class=\"fa fa-calendar open\" aria-hidden=\"true\"></i></a>\n <a *ngIf=\"!disabled\" [class.hidden]=\"readonly\" data-clear [title]=\"labels('datepicker.delete')\"><i class=\"fa fa-times delete\" aria-hidden=\"true\"></i></a>\n</div>\n", styles: [".hidden{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DatepickerComponent, decorators: [{
|
|
296
|
+
type: Component,
|
|
297
|
+
args: [{ selector: 'ode-date-picker', providers: [CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR], template: "<div class=\"flatpickr\" #datePickerElement>\n <input type=\"date\" [(ngModel)]=\"value\" [disabled]=\"disabled\" [ngClass]=\"{ 'cursor-default': disabled }\" placeholder=\"{{ placeholder }}\" #inputRef>\n <a *ngIf=\"!disabled\" [class.hidden]=\"readonly\" data-toggle [title]=\"labels('datepicker.open')\"><i class=\"fa fa-calendar open\" aria-hidden=\"true\"></i></a>\n <a *ngIf=\"!disabled\" [class.hidden]=\"readonly\" data-clear [title]=\"labels('datepicker.delete')\"><i class=\"fa fa-times delete\" aria-hidden=\"true\"></i></a>\n</div>\n", styles: [".hidden{visibility:hidden}\n"] }]
|
|
298
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: LabelsService }, { type: i0.Injector }]; }, propDecorators: { datePickerElement: [{
|
|
299
|
+
type: ViewChild,
|
|
300
|
+
args: ['datePickerElement']
|
|
301
|
+
}], inputElement: [{
|
|
302
|
+
type: ViewChild,
|
|
303
|
+
args: ['inputRef']
|
|
304
|
+
}], model: [{
|
|
305
|
+
type: ViewChild,
|
|
306
|
+
args: [NgModel]
|
|
307
|
+
}], disabled: [{
|
|
308
|
+
type: Input
|
|
309
|
+
}], readonly: [{
|
|
310
|
+
type: Input
|
|
311
|
+
}], enableTime: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}], placeholder: [{
|
|
314
|
+
type: Input
|
|
315
|
+
}], minDate: [{
|
|
316
|
+
type: Input
|
|
317
|
+
}], maxDate: [{
|
|
318
|
+
type: Input
|
|
319
|
+
}], changeDate: [{
|
|
320
|
+
type: Output
|
|
321
|
+
}] } });
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* A simple ellipsis component that switches text-overflow on click.
|
|
325
|
+
* Add an ellipsis={'hide'| 'expand'} attirubute on your element.
|
|
326
|
+
* Default behavior is 'hide', so that it's the same than the raw CSS
|
|
327
|
+
*/
|
|
328
|
+
class EllipsisComponent extends OdeComponent {
|
|
329
|
+
constructor(eltRef, injector) {
|
|
330
|
+
super(injector);
|
|
331
|
+
this.eltRef = eltRef;
|
|
332
|
+
this._ellipsis = 'hide';
|
|
333
|
+
this.isExpanded = false;
|
|
334
|
+
this.initialStyle = Object.assign({}, this.eltRef.nativeElement.style);
|
|
335
|
+
}
|
|
336
|
+
set ellipsis(value) {
|
|
337
|
+
if (!!value) {
|
|
338
|
+
this._ellipsis = value;
|
|
339
|
+
if (this._ellipsis == 'expand') {
|
|
340
|
+
this.eltRef.nativeElement.className = 'expand';
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
onClick() {
|
|
345
|
+
if (this._ellipsis == 'hide') {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
if (!this.isExpanded) {
|
|
349
|
+
this.isExpanded = true;
|
|
350
|
+
Object.assign(this.eltRef.nativeElement.style, {
|
|
351
|
+
textOverflow: 'clip',
|
|
352
|
+
overflow: 'auto',
|
|
353
|
+
whiteSpace: 'normal',
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
this.isExpanded = false;
|
|
358
|
+
this.eltRef.nativeElement.style = this.initialStyle;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
EllipsisComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: EllipsisComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
363
|
+
EllipsisComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: EllipsisComponent, selector: "[ellipsis]", inputs: { ellipsis: "ellipsis" }, host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host{display:block;width:8em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host.expand{cursor:pointer}\n"] });
|
|
364
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: EllipsisComponent, decorators: [{
|
|
365
|
+
type: Component,
|
|
366
|
+
args: [{ selector: '[ellipsis]', template: `<ng-content></ng-content>`, host: {
|
|
367
|
+
'(click)': 'onClick()',
|
|
368
|
+
}, styles: [":host{display:block;width:8em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host.expand{cursor:pointer}\n"] }]
|
|
369
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { ellipsis: [{
|
|
370
|
+
type: Input
|
|
371
|
+
}] } });
|
|
372
|
+
|
|
373
|
+
class FormErrorsComponent extends OdeComponent {
|
|
374
|
+
constructor(labelsService, injector) {
|
|
375
|
+
super(injector);
|
|
376
|
+
this.labelsService = labelsService;
|
|
377
|
+
}
|
|
378
|
+
getErrorsArray() {
|
|
379
|
+
const errorsArray = [];
|
|
380
|
+
for (const prop in this.ref.errors) {
|
|
381
|
+
errorsArray.push({ name: prop, value: this.ref.errors[prop] });
|
|
382
|
+
}
|
|
383
|
+
return errorsArray;
|
|
384
|
+
}
|
|
385
|
+
labels(label) {
|
|
386
|
+
return this.labelsService.getLabel(label);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
FormErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FormErrorsComponent, deps: [{ token: LabelsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
390
|
+
FormErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FormErrorsComponent, selector: "ode-form-errors", inputs: { ref: ["control", "ref"], expectedPatternMsg: "expectedPatternMsg" }, usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"ref && ref.errors && (ref.dirty || ref.touched)\" class=\"form-errors\">\n <div *ngFor=\"let error of getErrorsArray()\">\n <span>{{ 'form.error.' + error.name | translate: error.value }}</span>\n <span *ngIf=\"error.name == 'pattern'\">{{expectedPatternMsg}}</span>\n </div>\n</div>\n", styles: [".form-errors{font-size:.8em;color:#dc143c;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FormErrorsComponent, decorators: [{
|
|
392
|
+
type: Component,
|
|
393
|
+
args: [{ selector: 'ode-form-errors', template: "<div *ngIf=\"ref && ref.errors && (ref.dirty || ref.touched)\" class=\"form-errors\">\n <div *ngFor=\"let error of getErrorsArray()\">\n <span>{{ 'form.error.' + error.name | translate: error.value }}</span>\n <span *ngIf=\"error.name == 'pattern'\">{{expectedPatternMsg}}</span>\n </div>\n</div>\n", styles: [".form-errors{font-size:.8em;color:#dc143c;font-style:italic}\n"] }]
|
|
394
|
+
}], ctorParameters: function () { return [{ type: LabelsService }, { type: i0.Injector }]; }, propDecorators: { ref: [{
|
|
395
|
+
type: Input,
|
|
396
|
+
args: ['control']
|
|
397
|
+
}], expectedPatternMsg: [{
|
|
398
|
+
type: Input,
|
|
399
|
+
args: ['expectedPatternMsg']
|
|
400
|
+
}] } });
|
|
401
|
+
|
|
402
|
+
const icons = {
|
|
403
|
+
info: 'fa-question-circle',
|
|
404
|
+
warning: 'fa-exclamation-circle',
|
|
405
|
+
danger: 'fa-ban',
|
|
406
|
+
success: 'fa-check-circle'
|
|
407
|
+
};
|
|
408
|
+
class MessageBoxComponent extends OdeComponent {
|
|
409
|
+
constructor(eltRef, injector) {
|
|
410
|
+
super(injector);
|
|
411
|
+
this.eltRef = eltRef;
|
|
412
|
+
this._position = 'inherit';
|
|
413
|
+
/**
|
|
414
|
+
* `gravity` set the relative position of the message box if its position is 'absolute'.
|
|
415
|
+
* No effect when position is 'inherit'.
|
|
416
|
+
*/
|
|
417
|
+
this.gravity = 'left';
|
|
418
|
+
this.hidden = false;
|
|
419
|
+
}
|
|
420
|
+
set messages(value) {
|
|
421
|
+
this._messages = [];
|
|
422
|
+
for (const message of value) {
|
|
423
|
+
if (typeof message == 'string') {
|
|
424
|
+
this._messages.push([message, {}]);
|
|
425
|
+
}
|
|
426
|
+
else if (typeof message == 'object') {
|
|
427
|
+
this._messages.push(message);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
get messages() {
|
|
432
|
+
return this._messages;
|
|
433
|
+
}
|
|
434
|
+
set position(value) {
|
|
435
|
+
this._position = value;
|
|
436
|
+
}
|
|
437
|
+
get isGravityLeft() { return this.gravity === 'left'; }
|
|
438
|
+
get isGravityRight() { return this.gravity === 'right'; }
|
|
439
|
+
canHide() {
|
|
440
|
+
if (this._position == 'absolute') {
|
|
441
|
+
return true;
|
|
442
|
+
}
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
hide() {
|
|
446
|
+
this.hidden = true;
|
|
447
|
+
this.hideEvent.emit();
|
|
448
|
+
}
|
|
449
|
+
ngOnInit() {
|
|
450
|
+
super.ngOnInit();
|
|
451
|
+
if (this.type == undefined) {
|
|
452
|
+
throw new Error('MessageSticker : type\' property must be set');
|
|
453
|
+
}
|
|
454
|
+
this.eltRef.nativeElement.style.position = this._position;
|
|
455
|
+
if (this._position == 'absolute') {
|
|
456
|
+
this.eltRef.nativeElement.style.width = '450px';
|
|
457
|
+
// TODO: Maybe use a static counter to push on top the last open MessageBox ?
|
|
458
|
+
this.eltRef.nativeElement.style.zIndex = '10';
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
MessageBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MessageBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
463
|
+
MessageBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: MessageBoxComponent, selector: "message-box", inputs: { type: "type", header: "header", messages: "messages", position: "position", gravity: "gravity" }, outputs: { hideEvent: "onHide" }, host: { properties: { "class.gravity-left": "this.isGravityLeft", "class.gravity-right": "this.isGravityRight" } }, usesInheritance: true, ngImport: i0, template: "<article class=\"message is-{{type}}\" [hidden]=\"hidden\">\n <div *ngIf=\"header\" class=\"message-header\">\n <p>\n <i *ngIf=\"canHide()\" (click)=\"hide()\" class=\"fa fa-times-circle\"></i>\n {{header | translate}}\n </p>\n </div>\n <div class=\"message-body\">\n <i *ngIf=\"canHide() && !header\" (click)=\"hide()\" class=\"fa fa-times-circle\"></i>\n <p *ngFor=\"let message of messages\">\n <s5l [s5l-params]=\"message[1]\">{{message[0]}}</s5l>\n </p>\n </div>\n</article>\n", styles: [":host{font-size:initial;position:inherit;top:-5px}:host.gravity-left{right:-5px}:host.gravity-right{left:-5px}:host .message{border:1px solid}i.fa-times-circle{display:inline-flex;float:right;cursor:pointer;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MessageBoxComponent, decorators: [{
|
|
465
|
+
type: Component,
|
|
466
|
+
args: [{ selector: 'message-box', template: "<article class=\"message is-{{type}}\" [hidden]=\"hidden\">\n <div *ngIf=\"header\" class=\"message-header\">\n <p>\n <i *ngIf=\"canHide()\" (click)=\"hide()\" class=\"fa fa-times-circle\"></i>\n {{header | translate}}\n </p>\n </div>\n <div class=\"message-body\">\n <i *ngIf=\"canHide() && !header\" (click)=\"hide()\" class=\"fa fa-times-circle\"></i>\n <p *ngFor=\"let message of messages\">\n <s5l [s5l-params]=\"message[1]\">{{message[0]}}</s5l>\n </p>\n </div>\n</article>\n", styles: [":host{font-size:initial;position:inherit;top:-5px}:host.gravity-left{right:-5px}:host.gravity-right{left:-5px}:host .message{border:1px solid}i.fa-times-circle{display:inline-flex;float:right;cursor:pointer;font-weight:700}\n"] }]
|
|
467
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { type: [{
|
|
468
|
+
type: Input
|
|
469
|
+
}], header: [{
|
|
470
|
+
type: Input
|
|
471
|
+
}], messages: [{
|
|
472
|
+
type: Input
|
|
473
|
+
}], position: [{
|
|
474
|
+
type: Input
|
|
475
|
+
}], gravity: [{
|
|
476
|
+
type: Input
|
|
477
|
+
}], isGravityLeft: [{
|
|
478
|
+
type: HostBinding,
|
|
479
|
+
args: ['class.gravity-left']
|
|
480
|
+
}], isGravityRight: [{
|
|
481
|
+
type: HostBinding,
|
|
482
|
+
args: ['class.gravity-right']
|
|
483
|
+
}], hideEvent: [{
|
|
484
|
+
type: Output,
|
|
485
|
+
args: ['onHide']
|
|
486
|
+
}] } });
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Dynamically load the component describe with the @input dynamic-component
|
|
490
|
+
*/
|
|
491
|
+
class DynamicComponentDirective {
|
|
492
|
+
constructor(viewContainerRef, componentFactoryResolver) {
|
|
493
|
+
this.viewContainerRef = viewContainerRef;
|
|
494
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
495
|
+
}
|
|
496
|
+
load(data) {
|
|
497
|
+
if (this.isLoaded()) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.componentDesc.type);
|
|
501
|
+
this.viewContainerRef.clear();
|
|
502
|
+
this.componentRef = this.viewContainerRef.createComponent(componentFactory);
|
|
503
|
+
if (data != undefined) {
|
|
504
|
+
this.componentDesc.assignData(data);
|
|
505
|
+
}
|
|
506
|
+
for (const attribute in this.componentDesc.data) {
|
|
507
|
+
this.componentRef.instance[attribute] = this.componentDesc.data[attribute];
|
|
508
|
+
if (attribute == 'hideEvent') {
|
|
509
|
+
this.componentRef.instance.hideEvent.subscribe(e => {
|
|
510
|
+
this.destroy();
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
isLoaded() {
|
|
516
|
+
if (this.componentRef == undefined) {
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
return this.componentRef.instance != null;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
destroy() {
|
|
524
|
+
if (this.componentRef.instance.hideEvent != undefined) {
|
|
525
|
+
this.componentRef.instance.hideEvent.unsubscribe();
|
|
526
|
+
}
|
|
527
|
+
// FIXME: this.componentRef.destroy(); => This one usually should work, better to use but do nothing...
|
|
528
|
+
delete this.componentRef;
|
|
529
|
+
this.viewContainerRef.clear();
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
DynamicComponentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicComponentDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Directive });
|
|
533
|
+
DynamicComponentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: DynamicComponentDirective, selector: "[dynamic-component]", inputs: { componentDesc: ["dynamic-component", "componentDesc"] }, ngImport: i0 });
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicComponentDirective, decorators: [{
|
|
535
|
+
type: Directive,
|
|
536
|
+
args: [{
|
|
537
|
+
selector: '[dynamic-component]',
|
|
538
|
+
}]
|
|
539
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { componentDesc: [{
|
|
540
|
+
type: Input,
|
|
541
|
+
args: ['dynamic-component']
|
|
542
|
+
}] } });
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Usefull to desccribe (type and input data) a component
|
|
546
|
+
* that will be dynamically instanciate
|
|
547
|
+
*/
|
|
548
|
+
class ComponentDescriptor {
|
|
549
|
+
constructor(type, data) {
|
|
550
|
+
this.type = type;
|
|
551
|
+
this.data = data;
|
|
552
|
+
}
|
|
553
|
+
assignData(data) {
|
|
554
|
+
Object.assign(this.data, data);
|
|
555
|
+
return this;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
class MessageStickerComponent extends OdeComponent {
|
|
560
|
+
constructor(injector) {
|
|
561
|
+
super(injector);
|
|
562
|
+
this.gravity = 'left';
|
|
563
|
+
this.icons = icons;
|
|
564
|
+
}
|
|
565
|
+
ngOnInit() {
|
|
566
|
+
super.ngOnInit();
|
|
567
|
+
if (this.type === undefined) {
|
|
568
|
+
throw new Error('MessageSticker : type\' property must be set');
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
newMessageBox() {
|
|
572
|
+
return new ComponentDescriptor(MessageBoxComponent, {
|
|
573
|
+
type: this.type,
|
|
574
|
+
header: this.header,
|
|
575
|
+
messages: this.messages,
|
|
576
|
+
position: 'absolute',
|
|
577
|
+
gravity: this.gravity,
|
|
578
|
+
hideEvent: new EventEmitter()
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
loadMessageBox() {
|
|
582
|
+
this.dComponent.load();
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
MessageStickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MessageStickerComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
586
|
+
MessageStickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: MessageStickerComponent, selector: "ode-message-sticker", inputs: { type: "type", header: "header", messages: "messages", gravity: "gravity" }, viewQueries: [{ propertyName: "dComponent", first: true, predicate: DynamicComponentDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<i (click)=\"loadMessageBox()\" class=\"fa {{icons[type]}} is-{{type}}\"></i>\n<span message-box-anchor>\n <ng-container [dynamic-component]=\"newMessageBox()\"></ng-container>\n </span>\n", styles: [":host{display:inline;padding-left:.2em}span[message-box-anchor]{position:absolute;z-index:8}i{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: DynamicComponentDirective, selector: "[dynamic-component]", inputs: ["dynamic-component"] }] });
|
|
587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MessageStickerComponent, decorators: [{
|
|
588
|
+
type: Component,
|
|
589
|
+
args: [{ selector: 'ode-message-sticker', template: "<i (click)=\"loadMessageBox()\" class=\"fa {{icons[type]}} is-{{type}}\"></i>\n<span message-box-anchor>\n <ng-container [dynamic-component]=\"newMessageBox()\"></ng-container>\n </span>\n", styles: [":host{display:inline;padding-left:.2em}span[message-box-anchor]{position:absolute;z-index:8}i{cursor:pointer}\n"] }]
|
|
590
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { type: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], header: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], messages: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], gravity: [{
|
|
597
|
+
type: Input
|
|
598
|
+
}], dComponent: [{
|
|
599
|
+
type: ViewChild,
|
|
600
|
+
args: [DynamicComponentDirective]
|
|
601
|
+
}] } });
|
|
602
|
+
|
|
603
|
+
class FormFieldComponent extends OdeComponent {
|
|
604
|
+
constructor(injector) {
|
|
605
|
+
super(injector);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
FormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FormFieldComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
609
|
+
FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: FormFieldComponent, selector: "ode-form-field", inputs: { label: "label", help: "help", required: "required" }, usesInheritance: true, ngImport: i0, template: "<div class=\"form-field\">\n <label>\n {{ label | translate }}\n <span *ngIf=\"required\" class=\"asterisque\">*</span>\n <ode-message-sticker *ngIf=\"help\"\n [type]=\"'info'\"\n [messages]=\"[help]\">\n </ode-message-sticker>\n </label>\n <ng-content></ng-content>\n</div>\n", styles: ["div.form-field{display:flex;align-items:center}div.form-field > > > > *{flex:1;margin-left:5px}div.form-field>*:first-child{flex:0 0 200px;margin-left:0}div.form-field message-sticker{font-size:1.3em}div.form-field .asterisque{color:#dc143c}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: MessageStickerComponent, selector: "ode-message-sticker", inputs: ["type", "header", "messages", "gravity"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
610
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
611
|
+
type: Component,
|
|
612
|
+
args: [{ selector: 'ode-form-field', template: "<div class=\"form-field\">\n <label>\n {{ label | translate }}\n <span *ngIf=\"required\" class=\"asterisque\">*</span>\n <ode-message-sticker *ngIf=\"help\"\n [type]=\"'info'\"\n [messages]=\"[help]\">\n </ode-message-sticker>\n </label>\n <ng-content></ng-content>\n</div>\n", styles: ["div.form-field{display:flex;align-items:center}div.form-field > > > > *{flex:1;margin-left:5px}div.form-field>*:first-child{flex:0 0 200px;margin-left:0}div.form-field message-sticker{font-size:1.3em}div.form-field .asterisque{color:#dc143c}\n"] }]
|
|
613
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { label: [{
|
|
614
|
+
type: Input
|
|
615
|
+
}], help: [{
|
|
616
|
+
type: Input
|
|
617
|
+
}], required: [{
|
|
618
|
+
type: Input
|
|
619
|
+
}] } });
|
|
620
|
+
|
|
621
|
+
class FilterPipe {
|
|
622
|
+
stringFullCompare(str1, str2) {
|
|
623
|
+
return str1.match(new RegExp(str2, 'i')) !== null;
|
|
624
|
+
}
|
|
625
|
+
_filterString(value, filter, arrayRef) {
|
|
626
|
+
if (typeof value === 'string' &&
|
|
627
|
+
typeof filter === 'string' &&
|
|
628
|
+
filter.trim() &&
|
|
629
|
+
this.stringFullCompare(value, filter)) {
|
|
630
|
+
arrayRef.push(value);
|
|
631
|
+
return true;
|
|
632
|
+
}
|
|
633
|
+
return false;
|
|
634
|
+
}
|
|
635
|
+
_filterObject(object, filter, objectRef, arrayRef) {
|
|
636
|
+
if (typeof object == 'object' && typeof filter === 'object') {
|
|
637
|
+
let check = true;
|
|
638
|
+
for (const property in filter) {
|
|
639
|
+
if (!check) {
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
const filterValue = filter[property];
|
|
643
|
+
const propsToCheck = property.split(",");
|
|
644
|
+
const objectValues = new Array(propsToCheck.length);
|
|
645
|
+
for (let i = propsToCheck.length; i-- > 0;)
|
|
646
|
+
objectValues[i] = object[propsToCheck[i].trim()];
|
|
647
|
+
if (filterValue instanceof Function) {
|
|
648
|
+
check = filterValue.apply(null, objectValues);
|
|
649
|
+
}
|
|
650
|
+
else if (filterValue instanceof Object) {
|
|
651
|
+
if (propsToCheck.length > 1)
|
|
652
|
+
throw "Multi-argument object filtering is not yet supported";
|
|
653
|
+
return this._filterObject(objectValues[0], filterValue, objectRef, arrayRef);
|
|
654
|
+
}
|
|
655
|
+
else {
|
|
656
|
+
for (let i = objectValues.length; i-- > 0;) {
|
|
657
|
+
if (!check)
|
|
658
|
+
break;
|
|
659
|
+
const objectValue = objectValues[i];
|
|
660
|
+
if (typeof objectValue === 'undefined' && typeof filterValue === 'string' && filterValue.length > 0) {
|
|
661
|
+
check = false;
|
|
662
|
+
}
|
|
663
|
+
else if (objectValue instanceof Array && typeof filterValue === 'string') {
|
|
664
|
+
check = this.stringFullCompare(objectValue.join(), filterValue);
|
|
665
|
+
}
|
|
666
|
+
else if (typeof filterValue === 'string' && typeof objectValue === 'string') {
|
|
667
|
+
check = this.stringFullCompare(objectValue, filterValue);
|
|
668
|
+
}
|
|
669
|
+
else if (filterValue instanceof Array && typeof objectValue === 'string') {
|
|
670
|
+
for (let i = 0; i < filterValue.length; i++) {
|
|
671
|
+
check = this.stringFullCompare(objectValue, filterValue[i]);
|
|
672
|
+
if (check) {
|
|
673
|
+
break;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
if (check) {
|
|
681
|
+
arrayRef.push(objectRef);
|
|
682
|
+
}
|
|
683
|
+
return true;
|
|
684
|
+
}
|
|
685
|
+
return false;
|
|
686
|
+
}
|
|
687
|
+
_filterFunction(value, filter, arrayRef) {
|
|
688
|
+
if (typeof filter === 'function') {
|
|
689
|
+
if (filter(value)) {
|
|
690
|
+
arrayRef.push(value);
|
|
691
|
+
}
|
|
692
|
+
return true;
|
|
693
|
+
}
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
transform(array, by) {
|
|
697
|
+
if (!array || !by) {
|
|
698
|
+
return array;
|
|
699
|
+
}
|
|
700
|
+
const filteredArray = [];
|
|
701
|
+
array.forEach(item => {
|
|
702
|
+
this._filterString(item, by, filteredArray) ||
|
|
703
|
+
this._filterObject(item, by, item, filteredArray) ||
|
|
704
|
+
this._filterFunction(item, by, filteredArray);
|
|
705
|
+
});
|
|
706
|
+
return filteredArray;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
FilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
710
|
+
FilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: FilterPipe, name: "filter", pure: false });
|
|
711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FilterPipe, decorators: [{
|
|
712
|
+
type: Pipe,
|
|
713
|
+
args: [{ name: 'filter', pure: false }]
|
|
714
|
+
}] });
|
|
715
|
+
|
|
716
|
+
class FlattenObjectArrayPipe {
|
|
717
|
+
transform(array, onlyProps) {
|
|
718
|
+
if (!array) {
|
|
719
|
+
return [];
|
|
720
|
+
}
|
|
721
|
+
if (onlyProps.length < 1) {
|
|
722
|
+
return array;
|
|
723
|
+
}
|
|
724
|
+
let flattenedArray = Array.from(array);
|
|
725
|
+
const flatten = (array) => {
|
|
726
|
+
array.forEach(item => {
|
|
727
|
+
for (const prop in item) {
|
|
728
|
+
const val = item[prop];
|
|
729
|
+
if (val instanceof Array &&
|
|
730
|
+
!onlyProps ||
|
|
731
|
+
onlyProps.indexOf(prop) > -1) {
|
|
732
|
+
flattenedArray = [...flattenedArray, ...val];
|
|
733
|
+
flatten(val);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
flatten(array);
|
|
739
|
+
return Array.from(new Set(flattenedArray));
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
FlattenObjectArrayPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FlattenObjectArrayPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
743
|
+
FlattenObjectArrayPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: FlattenObjectArrayPipe, name: "flattenObjArray" });
|
|
744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: FlattenObjectArrayPipe, decorators: [{
|
|
745
|
+
type: Pipe,
|
|
746
|
+
args: [{ name: 'flattenObjArray' }]
|
|
747
|
+
}] });
|
|
748
|
+
|
|
749
|
+
class OrderPipe {
|
|
750
|
+
transform(array, sortPredicate, reverseOrder, compareFn) {
|
|
751
|
+
if (array == null || !sortPredicate) {
|
|
752
|
+
return array;
|
|
753
|
+
}
|
|
754
|
+
/*** ***/
|
|
755
|
+
const isString = (value) => {
|
|
756
|
+
return typeof value === 'string';
|
|
757
|
+
};
|
|
758
|
+
const isFunction = (value) => {
|
|
759
|
+
return typeof value === 'function';
|
|
760
|
+
};
|
|
761
|
+
const isArray = (value) => {
|
|
762
|
+
return value && value instanceof Array;
|
|
763
|
+
};
|
|
764
|
+
const isObject = (value) => {
|
|
765
|
+
return typeof value === 'object';
|
|
766
|
+
};
|
|
767
|
+
const isPrimitive = (value) => {
|
|
768
|
+
switch (typeof value) {
|
|
769
|
+
case 'number': /* falls through */
|
|
770
|
+
case 'boolean': /* falls through */
|
|
771
|
+
case 'string':
|
|
772
|
+
return true;
|
|
773
|
+
default:
|
|
774
|
+
return false;
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
const hasCustomToString = (value) => {
|
|
778
|
+
return value &&
|
|
779
|
+
typeof value.toString === 'function' &&
|
|
780
|
+
value.toString !== Object.prototype.toString;
|
|
781
|
+
};
|
|
782
|
+
const getComparisonObject = (value, index) => {
|
|
783
|
+
// NOTE: We are adding an extra `tieBreaker` value based on the element's index.
|
|
784
|
+
// This will be used to keep the sort stable when none of the input predicates can
|
|
785
|
+
// distinguish between two elements.
|
|
786
|
+
return {
|
|
787
|
+
value,
|
|
788
|
+
tieBreaker: { value: index, type: 'number', index },
|
|
789
|
+
predicateValues: predicates.map(function (predicate) {
|
|
790
|
+
return getPredicateValue(predicate.get(value), index);
|
|
791
|
+
})
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
const doComparison = (v1, v2) => {
|
|
795
|
+
for (let i = 0, ii = predicates.length; i < ii; i++) {
|
|
796
|
+
const result = compare(v1.predicateValues[i], v2.predicateValues[i]);
|
|
797
|
+
if (result) {
|
|
798
|
+
return result * predicates[i].descending * descending;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
return compare(v1.tieBreaker, v2.tieBreaker) * descending;
|
|
802
|
+
};
|
|
803
|
+
const processPredicates = (sortPredicates) => {
|
|
804
|
+
return sortPredicates.map(function (predicate) {
|
|
805
|
+
let descending = 1, get = (value) => value;
|
|
806
|
+
if (isFunction(predicate)) {
|
|
807
|
+
get = predicate;
|
|
808
|
+
}
|
|
809
|
+
else if (isString(predicate)) {
|
|
810
|
+
if ((predicate.charAt(0) === '+' || predicate.charAt(0) === '-')) {
|
|
811
|
+
descending = predicate.charAt(0) === '-' ? -1 : 1;
|
|
812
|
+
predicate = predicate.substring(1);
|
|
813
|
+
}
|
|
814
|
+
if (predicate !== '') {
|
|
815
|
+
get = (value) => value[predicate];
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
return { get, descending };
|
|
819
|
+
});
|
|
820
|
+
};
|
|
821
|
+
const objectValue = (value) => {
|
|
822
|
+
// If `valueOf` is a valid function use that
|
|
823
|
+
if (isFunction(value.valueOf)) {
|
|
824
|
+
value = value.valueOf();
|
|
825
|
+
if (isPrimitive(value)) {
|
|
826
|
+
return value;
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
// If `toString` is a valid function and not the one from `Object.prototype` use that
|
|
830
|
+
if (hasCustomToString(value)) {
|
|
831
|
+
value = value.toString();
|
|
832
|
+
if (isPrimitive(value)) {
|
|
833
|
+
return value;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
return value;
|
|
837
|
+
};
|
|
838
|
+
const getPredicateValue = (value, index) => {
|
|
839
|
+
let type = typeof value;
|
|
840
|
+
if (value === null) {
|
|
841
|
+
type = 'string';
|
|
842
|
+
value = 'null';
|
|
843
|
+
}
|
|
844
|
+
else if (type === 'object') {
|
|
845
|
+
value = objectValue(value);
|
|
846
|
+
}
|
|
847
|
+
return { value, type, index };
|
|
848
|
+
};
|
|
849
|
+
const defaultCompare = (v1, v2) => {
|
|
850
|
+
let result = 0;
|
|
851
|
+
const type1 = v1.type;
|
|
852
|
+
const type2 = v2.type;
|
|
853
|
+
if (type1 === type2) {
|
|
854
|
+
let value1 = v1.value;
|
|
855
|
+
let value2 = v2.value;
|
|
856
|
+
if (type1 === 'string') {
|
|
857
|
+
// Compare strings case-insensitively
|
|
858
|
+
value1 = value1.toLowerCase();
|
|
859
|
+
value2 = value2.toLowerCase();
|
|
860
|
+
result = value1.localeCompare(value2);
|
|
861
|
+
}
|
|
862
|
+
else if (type1 === 'object') {
|
|
863
|
+
// For basic objects, use the position of the object
|
|
864
|
+
// in the collection instead of the value
|
|
865
|
+
if (isObject(value1)) {
|
|
866
|
+
value1 = v1.index;
|
|
867
|
+
}
|
|
868
|
+
if (isObject(value2)) {
|
|
869
|
+
value2 = v2.index;
|
|
870
|
+
}
|
|
871
|
+
if (value1 !== value2) {
|
|
872
|
+
result = value1 < value2 ? -1 : 1;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
else {
|
|
877
|
+
result = type1 < type2 ? -1 : 1;
|
|
878
|
+
}
|
|
879
|
+
return result;
|
|
880
|
+
};
|
|
881
|
+
/*** ***/
|
|
882
|
+
if (!isArray(sortPredicate)) {
|
|
883
|
+
sortPredicate = [sortPredicate];
|
|
884
|
+
}
|
|
885
|
+
if (sortPredicate.length === 0) {
|
|
886
|
+
sortPredicate = ['+'];
|
|
887
|
+
}
|
|
888
|
+
const predicates = processPredicates(sortPredicate);
|
|
889
|
+
const descending = reverseOrder ? -1 : 1;
|
|
890
|
+
// Define the `compare()` function. Use a default comparator if none is specified.
|
|
891
|
+
const compare = isFunction(compareFn) ? compareFn : defaultCompare;
|
|
892
|
+
// The next three lines are a version of a Swartzian Transform idiom from Perl
|
|
893
|
+
// (sometimes called the Decorate-Sort-Undecorate idiom)
|
|
894
|
+
// See https://en.wikipedia.org/wiki/Schwartzian_transform
|
|
895
|
+
const compareValues = Array.prototype.map.call(array, getComparisonObject);
|
|
896
|
+
compareValues.sort(doComparison);
|
|
897
|
+
array = compareValues.map(function (item) { return item.value; });
|
|
898
|
+
return array;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
OrderPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: OrderPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
902
|
+
OrderPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: OrderPipe, name: "orderBy" });
|
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: OrderPipe, decorators: [{
|
|
904
|
+
type: Pipe,
|
|
905
|
+
args: [{ name: 'orderBy' }]
|
|
906
|
+
}] });
|
|
907
|
+
|
|
908
|
+
class ItemTreeComponent extends OdeComponent {
|
|
909
|
+
constructor(injector) {
|
|
910
|
+
super(injector);
|
|
911
|
+
/**** Inputs ****/
|
|
912
|
+
// Items
|
|
913
|
+
this.items = [];
|
|
914
|
+
// Property containing the list of child objects.
|
|
915
|
+
this.childrenProperty = 'children';
|
|
916
|
+
// Property to display in the list
|
|
917
|
+
this.displayProperty = 'label';
|
|
918
|
+
// Filter pipe argument
|
|
919
|
+
this.filter = '';
|
|
920
|
+
// OrderBy pipe argument
|
|
921
|
+
this.order = [];
|
|
922
|
+
// Reverse the order pipe
|
|
923
|
+
this.reverse = false;
|
|
924
|
+
this._flattenProps = [];
|
|
925
|
+
// Disable the opener icon
|
|
926
|
+
this.disableOpener = false;
|
|
927
|
+
// Use checkboxes instead of selecting items
|
|
928
|
+
this.checkboxMode = false;
|
|
929
|
+
/**** Outputs ****/
|
|
930
|
+
this.onSelect = new EventEmitter();
|
|
931
|
+
this.onCheck = new EventEmitter();
|
|
932
|
+
this._depth = 0;
|
|
933
|
+
this.unfolded = [];
|
|
934
|
+
}
|
|
935
|
+
// Flatten the tree on the specified properties
|
|
936
|
+
set flatten(flattenProps) {
|
|
937
|
+
if (!this.isFlattened() && flattenProps.length > 0) {
|
|
938
|
+
this._selectedItem = this._lastSelectedItem;
|
|
939
|
+
}
|
|
940
|
+
else if (this.isFlattened && flattenProps.length < 1) {
|
|
941
|
+
this.flagIfParent();
|
|
942
|
+
}
|
|
943
|
+
this._flattenProps = flattenProps;
|
|
944
|
+
}
|
|
945
|
+
get flatten() {
|
|
946
|
+
return this._flattenProps;
|
|
947
|
+
}
|
|
948
|
+
ngOnInit() {
|
|
949
|
+
super.ngOnInit();
|
|
950
|
+
this.flagIfParent();
|
|
951
|
+
}
|
|
952
|
+
selectItem(item) {
|
|
953
|
+
this._selectedItem = item;
|
|
954
|
+
if (this.childItemTree) {
|
|
955
|
+
delete this.childItemTree._selectedItem;
|
|
956
|
+
}
|
|
957
|
+
const idx = this.unfolded.indexOf(item);
|
|
958
|
+
if (!this.disableOpener && idx < 0) {
|
|
959
|
+
this.unfolded.push(item);
|
|
960
|
+
}
|
|
961
|
+
else {
|
|
962
|
+
this.unfolded.splice(idx, 1);
|
|
963
|
+
}
|
|
964
|
+
this.bubbleSelect(item);
|
|
965
|
+
}
|
|
966
|
+
checkItem(item) {
|
|
967
|
+
this.onCheck.emit(item);
|
|
968
|
+
}
|
|
969
|
+
bubbleSelect(item) {
|
|
970
|
+
this._lastSelectedItem = item;
|
|
971
|
+
this.onSelect.emit(item);
|
|
972
|
+
}
|
|
973
|
+
isSelected(item) {
|
|
974
|
+
return (this.disableOpener ? this._selectedItem : this._lastSelectedItem) === item;
|
|
975
|
+
}
|
|
976
|
+
toggleFold(event, item) {
|
|
977
|
+
event.stopPropagation();
|
|
978
|
+
const idx = this.unfolded.indexOf(item);
|
|
979
|
+
if (idx < 0) {
|
|
980
|
+
this.unfolded.push(item);
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
this.unfolded.splice(idx, 1);
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
isFolded(item) {
|
|
987
|
+
return this.disableOpener ? !this.isSelected(item) : this.unfolded.indexOf(item) < 0;
|
|
988
|
+
}
|
|
989
|
+
display(item) {
|
|
990
|
+
return this.displayProperty && item[this.displayProperty];
|
|
991
|
+
}
|
|
992
|
+
getChildren(item) {
|
|
993
|
+
return item[this.childrenProperty] || [];
|
|
994
|
+
}
|
|
995
|
+
hasChildren(item) {
|
|
996
|
+
return this.getChildren(item).length > 0;
|
|
997
|
+
}
|
|
998
|
+
isFlattened() {
|
|
999
|
+
return this._flattenProps.length;
|
|
1000
|
+
}
|
|
1001
|
+
flagIfParent() {
|
|
1002
|
+
if (!this._lastSelectedItem) {
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
const findSubItem = (item, target) => {
|
|
1006
|
+
if (item === target) {
|
|
1007
|
+
return true;
|
|
1008
|
+
}
|
|
1009
|
+
if (this.hasChildren(item)) {
|
|
1010
|
+
return this.getChildren(item).find(subItem => {
|
|
1011
|
+
return findSubItem(subItem, target);
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
return false;
|
|
1015
|
+
};
|
|
1016
|
+
for (const i in this.items) {
|
|
1017
|
+
const item = this.items[i];
|
|
1018
|
+
if (item === this._lastSelectedItem ||
|
|
1019
|
+
findSubItem(item, this._lastSelectedItem)) {
|
|
1020
|
+
this._selectedItem = item;
|
|
1021
|
+
this.unfolded = [item];
|
|
1022
|
+
break;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
this.changeDetector.markForCheck();
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
ItemTreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ItemTreeComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1029
|
+
ItemTreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: ItemTreeComponent, selector: "ode-item-tree", inputs: { items: "items", childrenProperty: ["children", "childrenProperty"], displayProperty: ["display", "displayProperty"], displayTemplate: "displayTemplate", filter: "filter", order: "order", reverse: "reverse", flatten: "flatten", disableOpener: "disableOpener", checkboxMode: "checkboxMode", _lastSelectedItem: ["lastSelected", "_lastSelectedItem"], _depth: ["depth", "_depth"] }, outputs: { onSelect: "onSelect", onCheck: "onCheck" }, viewQueries: [{ propertyName: "childItemTree", first: true, predicate: ItemTreeComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ul [ngClass]=\"{ flattened: isFlattened() }\">\n <li *ngFor=\"let item of (items | flattenObjArray: flatten | filter: filter | orderBy: order:reverse)\"\n [ngClass]=\"{ selected: isSelected(item), unfolded: !isFolded(item), parent: hasChildren(item), root: _depth === 0 }\">\n <a href=\"javascript:void(0)\" (click)=\"selectItem(item)\" *ngIf=\"!checkboxMode\">\n <i class=\"opener\" (click)=\"toggleFold($event, item)\"\n *ngIf=\"!isFlattened() && hasChildren(item) && !disableOpener\"></i>\n <span *ngIf=\"displayProperty\">{{ display(item) }}</span>\n <span *ngIf=\"displayTemplate\">\n <ng-template [ngTemplateOutlet]=\"displayTemplate\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template>\n </span>\n </a>\n <div class=\"checkbox__item\" *ngIf=\"checkboxMode\">\n <input id=\"all\" type=\"checkbox\" [(ngModel)]=\"item.check\" ngDefaultControl>\n <label *ngIf=\"displayProperty\" for=\"all\" (click)=\"checkItem(item)\">{{display(item)}}</label>\n <span *ngIf=\"displayTemplate\">\n <ng-template [ngTemplateOutlet]=\"displayTemplate\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template>\n </span>\n </div>\n <ode-item-tree\n [items]=\"getChildren(item)\"\n [children]=\"childrenProperty\"\n [display]=\"displayProperty\"\n [displayTemplate]=\"displayTemplate\"\n [filter]=\"filter\"\n [order]=\"order\"\n [reverse]=\"reverse\"\n [lastSelected]=\"_lastSelectedItem\"\n [depth]=\"_depth + 1\"\n [disableOpener]=\"disableOpener\"\n [checkboxMode]=\"checkboxMode\"\n (onSelect)=\"bubbleSelect($event)\"\n (onCheck)=\"checkItem($event)\"\n *ngIf=\"(checkboxMode && hasChildren(item)) || (!isFlattened() && hasChildren(item) && !isFolded(item))\">\n </ode-item-tree>\n </li>\n</ul>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ItemTreeComponent, selector: "ode-item-tree", inputs: ["items", "children", "display", "displayTemplate", "filter", "order", "reverse", "flatten", "disableOpener", "checkboxMode", "lastSelected", "depth"], outputs: ["onSelect", "onCheck"] }, { kind: "pipe", type: FilterPipe, name: "filter" }, { kind: "pipe", type: FlattenObjectArrayPipe, name: "flattenObjArray" }, { kind: "pipe", type: OrderPipe, name: "orderBy" }] });
|
|
1030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ItemTreeComponent, decorators: [{
|
|
1031
|
+
type: Component,
|
|
1032
|
+
args: [{ selector: 'ode-item-tree', template: "<ul [ngClass]=\"{ flattened: isFlattened() }\">\n <li *ngFor=\"let item of (items | flattenObjArray: flatten | filter: filter | orderBy: order:reverse)\"\n [ngClass]=\"{ selected: isSelected(item), unfolded: !isFolded(item), parent: hasChildren(item), root: _depth === 0 }\">\n <a href=\"javascript:void(0)\" (click)=\"selectItem(item)\" *ngIf=\"!checkboxMode\">\n <i class=\"opener\" (click)=\"toggleFold($event, item)\"\n *ngIf=\"!isFlattened() && hasChildren(item) && !disableOpener\"></i>\n <span *ngIf=\"displayProperty\">{{ display(item) }}</span>\n <span *ngIf=\"displayTemplate\">\n <ng-template [ngTemplateOutlet]=\"displayTemplate\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template>\n </span>\n </a>\n <div class=\"checkbox__item\" *ngIf=\"checkboxMode\">\n <input id=\"all\" type=\"checkbox\" [(ngModel)]=\"item.check\" ngDefaultControl>\n <label *ngIf=\"displayProperty\" for=\"all\" (click)=\"checkItem(item)\">{{display(item)}}</label>\n <span *ngIf=\"displayTemplate\">\n <ng-template [ngTemplateOutlet]=\"displayTemplate\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template>\n </span>\n </div>\n <ode-item-tree\n [items]=\"getChildren(item)\"\n [children]=\"childrenProperty\"\n [display]=\"displayProperty\"\n [displayTemplate]=\"displayTemplate\"\n [filter]=\"filter\"\n [order]=\"order\"\n [reverse]=\"reverse\"\n [lastSelected]=\"_lastSelectedItem\"\n [depth]=\"_depth + 1\"\n [disableOpener]=\"disableOpener\"\n [checkboxMode]=\"checkboxMode\"\n (onSelect)=\"bubbleSelect($event)\"\n (onCheck)=\"checkItem($event)\"\n *ngIf=\"(checkboxMode && hasChildren(item)) || (!isFlattened() && hasChildren(item) && !isFolded(item))\">\n </ode-item-tree>\n </li>\n</ul>\n" }]
|
|
1033
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { items: [{
|
|
1034
|
+
type: Input
|
|
1035
|
+
}], childrenProperty: [{
|
|
1036
|
+
type: Input,
|
|
1037
|
+
args: ['children']
|
|
1038
|
+
}], displayProperty: [{
|
|
1039
|
+
type: Input,
|
|
1040
|
+
args: ['display']
|
|
1041
|
+
}], displayTemplate: [{
|
|
1042
|
+
type: Input
|
|
1043
|
+
}], filter: [{
|
|
1044
|
+
type: Input
|
|
1045
|
+
}], order: [{
|
|
1046
|
+
type: Input
|
|
1047
|
+
}], reverse: [{
|
|
1048
|
+
type: Input
|
|
1049
|
+
}], flatten: [{
|
|
1050
|
+
type: Input
|
|
1051
|
+
}], disableOpener: [{
|
|
1052
|
+
type: Input
|
|
1053
|
+
}], checkboxMode: [{
|
|
1054
|
+
type: Input
|
|
1055
|
+
}], onSelect: [{
|
|
1056
|
+
type: Output
|
|
1057
|
+
}], onCheck: [{
|
|
1058
|
+
type: Output
|
|
1059
|
+
}], childItemTree: [{
|
|
1060
|
+
type: ViewChild,
|
|
1061
|
+
args: [ItemTreeComponent]
|
|
1062
|
+
}], _lastSelectedItem: [{
|
|
1063
|
+
type: Input,
|
|
1064
|
+
args: ['lastSelected']
|
|
1065
|
+
}], _depth: [{
|
|
1066
|
+
type: Input,
|
|
1067
|
+
args: ['depth']
|
|
1068
|
+
}] } });
|
|
1069
|
+
|
|
1070
|
+
class LightBoxComponent extends OdeComponent {
|
|
1071
|
+
constructor(injector, renderer, host) {
|
|
1072
|
+
super(injector);
|
|
1073
|
+
this.renderer = renderer;
|
|
1074
|
+
this.host = host;
|
|
1075
|
+
this._show = false;
|
|
1076
|
+
this.showCloseButton = true;
|
|
1077
|
+
this.onClose = new EventEmitter();
|
|
1078
|
+
}
|
|
1079
|
+
set show(s) {
|
|
1080
|
+
if (this.timer) {
|
|
1081
|
+
clearTimeout(this.timer);
|
|
1082
|
+
}
|
|
1083
|
+
if (s) {
|
|
1084
|
+
this._show = true;
|
|
1085
|
+
this.timer = window.setTimeout(() => {
|
|
1086
|
+
this.renderer.addClass(this.host.nativeElement, 'shown');
|
|
1087
|
+
this.timer = null;
|
|
1088
|
+
this.changeDetector.markForCheck();
|
|
1089
|
+
}, 100);
|
|
1090
|
+
}
|
|
1091
|
+
else {
|
|
1092
|
+
const wait = parseFloat(this.section &&
|
|
1093
|
+
window.getComputedStyle(this.section.nativeElement)['transition-duration']);
|
|
1094
|
+
this.renderer.removeClass(this.host.nativeElement, 'shown');
|
|
1095
|
+
this.timer = window.setTimeout(() => {
|
|
1096
|
+
this._show = false;
|
|
1097
|
+
this.timer = null;
|
|
1098
|
+
this.changeDetector.markForCheck();
|
|
1099
|
+
}, wait * 1000);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
get show() {
|
|
1103
|
+
return this._show;
|
|
1104
|
+
}
|
|
1105
|
+
onClick(event) {
|
|
1106
|
+
if (this.overlay.nativeElement.contains(event.target)) {
|
|
1107
|
+
this.close();
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
close() {
|
|
1111
|
+
this.show = false;
|
|
1112
|
+
this.onClose.emit();
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
LightBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LightBoxComponent, deps: [{ token: i0.Injector }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1116
|
+
LightBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: LightBoxComponent, selector: "ode-lightbox", inputs: { show: "show", showCloseButton: "showCloseButton" }, outputs: { onClose: "onClose" }, host: { listeners: { "click": "onClick($event)" } }, viewQueries: [{ propertyName: "section", first: true, predicate: ["section"], descendants: true }, { propertyName: "overlay", first: true, predicate: ["overlay"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<section *ngIf=\"_show\" #section>\n <div overlay #overlay></div>\n <div content>\n <i (click)=\"close()\" *ngIf=\"showCloseButton == true\"></i>\n <ng-content></ng-content>\n </div>\n</section>\n", styles: ["section{position:fixed;display:flex;align-items:center;justify-content:center;height:100%;width:100%;z-index:100;top:0;left:0;opacity:0;transition:opacity .35s}section[hidden]{display:none!important}:host.shown>section{opacity:1}div[overlay]{position:absolute;top:0;left:0;opacity:.7;width:100%;height:100%;background-color:#000}div[content]{flex:0 0 auto;max-width:75%;max-height:75%;overflow:auto;background-color:#fff;z-index:2;position:relative}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LightBoxComponent, decorators: [{
|
|
1118
|
+
type: Component,
|
|
1119
|
+
args: [{ selector: 'ode-lightbox', host: {
|
|
1120
|
+
'(click)': 'onClick($event)'
|
|
1121
|
+
}, template: "<section *ngIf=\"_show\" #section>\n <div overlay #overlay></div>\n <div content>\n <i (click)=\"close()\" *ngIf=\"showCloseButton == true\"></i>\n <ng-content></ng-content>\n </div>\n</section>\n", styles: ["section{position:fixed;display:flex;align-items:center;justify-content:center;height:100%;width:100%;z-index:100;top:0;left:0;opacity:0;transition:opacity .35s}section[hidden]{display:none!important}:host.shown>section{opacity:1}div[overlay]{position:absolute;top:0;left:0;opacity:.7;width:100%;height:100%;background-color:#000}div[content]{flex:0 0 auto;max-width:75%;max-height:75%;overflow:auto;background-color:#fff;z-index:2;position:relative}\n"] }]
|
|
1122
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { show: [{
|
|
1123
|
+
type: Input
|
|
1124
|
+
}], showCloseButton: [{
|
|
1125
|
+
type: Input
|
|
1126
|
+
}], onClose: [{
|
|
1127
|
+
type: Output
|
|
1128
|
+
}], section: [{
|
|
1129
|
+
type: ViewChild,
|
|
1130
|
+
args: ['section']
|
|
1131
|
+
}], overlay: [{
|
|
1132
|
+
type: ViewChild,
|
|
1133
|
+
args: ['overlay']
|
|
1134
|
+
}] } });
|
|
1135
|
+
|
|
1136
|
+
class LightboxConfirmComponent extends OdeComponent {
|
|
1137
|
+
constructor(injector) {
|
|
1138
|
+
super(injector);
|
|
1139
|
+
this.cancelText = "cancel";
|
|
1140
|
+
this.confirmText = "confirm";
|
|
1141
|
+
this.extraButtons = [];
|
|
1142
|
+
this.disableConfirm = false;
|
|
1143
|
+
this.onConfirm = new EventEmitter();
|
|
1144
|
+
this.onCancel = new EventEmitter();
|
|
1145
|
+
this.onExtra = new EventEmitter();
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
LightboxConfirmComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LightboxConfirmComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1149
|
+
LightboxConfirmComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: LightboxConfirmComponent, selector: "ode-lightbox-confirm", inputs: { lightboxTitle: "lightboxTitle", show: "show", cancelText: "cancelText", confirmText: "confirmText", extraButtons: "extraButtons", disableConfirm: "disableConfirm" }, outputs: { onConfirm: "onConfirm", onCancel: "onCancel", onExtra: "onExtra" }, usesInheritance: true, ngImport: i0, template: "<ode-lightbox [show]=\"show\" (onClose)=\"onCancel.emit()\">\n <h2 class=\"lightbox-confirm__header\">{{ lightboxTitle | translate }}</h2>\n <div class=\"lightbox-confirm-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"lightbox-confirm-action\">\n <button (click)=\"onConfirm.emit()\" [disabled]=\"disableConfirm\" class=\"confirm\">{{ confirmText | translate }}</button>\n <button\n *ngFor=\"let extraBtn of extraButtons.slice().reverse(); index as i;\"\n (click)=\"onExtra.emit(extraButtons.length - 1 - i)\" class=\"confirm\">{{ extraBtn | translate }}</button>\n <button (click)=\"onCancel.emit()\" class=\"cancel\">{{ cancelText | translate }}</button>\n </div>\n</ode-lightbox>\n", styles: [".lightbox-confirm__header{margin-bottom:0}.lightbox-confirm-content{font-size:16px;padding:20px 0}.lightbox-confirm-action button{float:right;text-align:center;margin-left:5px;margin-bottom:20px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: LightBoxComponent, selector: "ode-lightbox", inputs: ["show", "showCloseButton"], outputs: ["onClose"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LightboxConfirmComponent, decorators: [{
|
|
1151
|
+
type: Component,
|
|
1152
|
+
args: [{ selector: 'ode-lightbox-confirm', template: "<ode-lightbox [show]=\"show\" (onClose)=\"onCancel.emit()\">\n <h2 class=\"lightbox-confirm__header\">{{ lightboxTitle | translate }}</h2>\n <div class=\"lightbox-confirm-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"lightbox-confirm-action\">\n <button (click)=\"onConfirm.emit()\" [disabled]=\"disableConfirm\" class=\"confirm\">{{ confirmText | translate }}</button>\n <button\n *ngFor=\"let extraBtn of extraButtons.slice().reverse(); index as i;\"\n (click)=\"onExtra.emit(extraButtons.length - 1 - i)\" class=\"confirm\">{{ extraBtn | translate }}</button>\n <button (click)=\"onCancel.emit()\" class=\"cancel\">{{ cancelText | translate }}</button>\n </div>\n</ode-lightbox>\n", styles: [".lightbox-confirm__header{margin-bottom:0}.lightbox-confirm-content{font-size:16px;padding:20px 0}.lightbox-confirm-action button{float:right;text-align:center;margin-left:5px;margin-bottom:20px}\n"] }]
|
|
1153
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { lightboxTitle: [{
|
|
1154
|
+
type: Input
|
|
1155
|
+
}], show: [{
|
|
1156
|
+
type: Input
|
|
1157
|
+
}], cancelText: [{
|
|
1158
|
+
type: Input
|
|
1159
|
+
}], confirmText: [{
|
|
1160
|
+
type: Input
|
|
1161
|
+
}], extraButtons: [{
|
|
1162
|
+
type: Input
|
|
1163
|
+
}], disableConfirm: [{
|
|
1164
|
+
type: Input
|
|
1165
|
+
}], onConfirm: [{
|
|
1166
|
+
type: Output
|
|
1167
|
+
}], onCancel: [{
|
|
1168
|
+
type: Output
|
|
1169
|
+
}], onExtra: [{
|
|
1170
|
+
type: Output
|
|
1171
|
+
}] } });
|
|
1172
|
+
|
|
1173
|
+
class SearchInputComponent extends OdeComponent {
|
|
1174
|
+
constructor(injector, _elRef, _renderer) {
|
|
1175
|
+
super(injector);
|
|
1176
|
+
this._elRef = _elRef;
|
|
1177
|
+
this._renderer = _renderer;
|
|
1178
|
+
/* Inputs / Outputs / View */
|
|
1179
|
+
this.isSearchActive = false;
|
|
1180
|
+
this.isSearchButtonDisabled = false;
|
|
1181
|
+
this.searchInput = false;
|
|
1182
|
+
this._delay = 200;
|
|
1183
|
+
this.onChange = new EventEmitter();
|
|
1184
|
+
/* Internal logic */
|
|
1185
|
+
this.$searchTerms = new Subject();
|
|
1186
|
+
}
|
|
1187
|
+
set delay(d) {
|
|
1188
|
+
this._delay = d;
|
|
1189
|
+
this.observable = this.$searchTerms.pipe(debounceTime(this.delay), distinctUntilChanged());
|
|
1190
|
+
if (this.observer) {
|
|
1191
|
+
this.observer.unsubscribe();
|
|
1192
|
+
}
|
|
1193
|
+
this.observer = this.observable.subscribe(val => {
|
|
1194
|
+
this.onChange.emit(val);
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
get delay() {
|
|
1198
|
+
return this._delay;
|
|
1199
|
+
}
|
|
1200
|
+
evalAttributes() {
|
|
1201
|
+
const element = this._elRef.nativeElement;
|
|
1202
|
+
if (element && this.searchBox) {
|
|
1203
|
+
for (let i = 0; i < element.attributes.length; i++) {
|
|
1204
|
+
const attr = element.attributes[i];
|
|
1205
|
+
this._renderer.setAttribute(this.searchBox.nativeElement, attr.name, attr.value);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
ngOnInit() {
|
|
1210
|
+
super.ngOnInit();
|
|
1211
|
+
if (!this.observable) {
|
|
1212
|
+
this.observable = this.$searchTerms
|
|
1213
|
+
.pipe(debounceTime(this.delay), distinctUntilChanged());
|
|
1214
|
+
this.observer = this.observable.subscribe(val => {
|
|
1215
|
+
this.onChange.emit(val);
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
setTimeout(() => this.evalAttributes(), 20);
|
|
1219
|
+
}
|
|
1220
|
+
ngOnDestroy() {
|
|
1221
|
+
super.ngOnDestroy();
|
|
1222
|
+
this.observer.unsubscribe();
|
|
1223
|
+
}
|
|
1224
|
+
search(str) {
|
|
1225
|
+
this.$searchTerms.next(str);
|
|
1226
|
+
}
|
|
1227
|
+
handleSubmit() {
|
|
1228
|
+
this.searchSubmit();
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
SearchInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SearchInputComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
1232
|
+
SearchInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: SearchInputComponent, selector: "ode-search-input", inputs: { isSearchActive: "isSearchActive", isSearchButtonDisabled: "isSearchButtonDisabled", searchInput: "searchInput", searchSubmit: "searchSubmit", delay: "delay" }, outputs: { onChange: "onChange" }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<form\n class=\"search-container\"\n (ngSubmit)=\"searchInput && handleSubmit()\">\n <input\n #searchBox\n class=\"search-input\"\n name=\"searchTerm\"\n type=\"search\"\n (input)=\"search(searchBox.value)\" />\n <button class=\"search-button\" *ngIf=\"searchInput\" [attr.disabled]=\"isSearchButtonDisabled ? true : null\">\n <i class=\"fa fa-search is-size-4 search-icon\"></i>\n </button>\n</form>\n\n<!-- <input *ngIf=\"!searchInput\" type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/> -->", styles: [":host .search-container{margin:0;display:flex}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
|
|
1233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SearchInputComponent, decorators: [{
|
|
1234
|
+
type: Component,
|
|
1235
|
+
args: [{ selector: 'ode-search-input', template: "<form\n class=\"search-container\"\n (ngSubmit)=\"searchInput && handleSubmit()\">\n <input\n #searchBox\n class=\"search-input\"\n name=\"searchTerm\"\n type=\"search\"\n (input)=\"search(searchBox.value)\" />\n <button class=\"search-button\" *ngIf=\"searchInput\" [attr.disabled]=\"isSearchButtonDisabled ? true : null\">\n <i class=\"fa fa-search is-size-4 search-icon\"></i>\n </button>\n</form>\n\n<!-- <input *ngIf=\"!searchInput\" type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/> -->", styles: [":host .search-container{margin:0;display:flex}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}\n"] }]
|
|
1236
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { isSearchActive: [{
|
|
1237
|
+
type: Input
|
|
1238
|
+
}], isSearchButtonDisabled: [{
|
|
1239
|
+
type: Input
|
|
1240
|
+
}], searchInput: [{
|
|
1241
|
+
type: Input
|
|
1242
|
+
}], searchSubmit: [{
|
|
1243
|
+
type: Input
|
|
1244
|
+
}], delay: [{
|
|
1245
|
+
type: Input
|
|
1246
|
+
}], onChange: [{
|
|
1247
|
+
type: Output
|
|
1248
|
+
}], searchBox: [{
|
|
1249
|
+
type: ViewChild,
|
|
1250
|
+
args: ['searchBox']
|
|
1251
|
+
}] } });
|
|
1252
|
+
|
|
1253
|
+
class StorePipe {
|
|
1254
|
+
transform(value, context, prop = '_storedRef') {
|
|
1255
|
+
context[prop] = value;
|
|
1256
|
+
return value;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
StorePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: StorePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
1260
|
+
StorePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: StorePipe, name: "store" });
|
|
1261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: StorePipe, decorators: [{
|
|
1262
|
+
type: Pipe,
|
|
1263
|
+
args: [{
|
|
1264
|
+
name: 'store'
|
|
1265
|
+
}]
|
|
1266
|
+
}] });
|
|
1267
|
+
|
|
1268
|
+
class ListComponent extends OdeComponent {
|
|
1269
|
+
constructor(injector) {
|
|
1270
|
+
super(injector);
|
|
1271
|
+
/* Store pipe */
|
|
1272
|
+
this.self = this;
|
|
1273
|
+
this._storedElements = [];
|
|
1274
|
+
this.searchPlaceholder = 'search';
|
|
1275
|
+
this.noResultsLabel = 'list.results.no.items';
|
|
1276
|
+
this.placeholder = 'list.placeholder';
|
|
1277
|
+
this.isSearchActive = true;
|
|
1278
|
+
this.isSearchButtonDisabled = false;
|
|
1279
|
+
this.searchInput = false;
|
|
1280
|
+
this.inputChange = new EventEmitter();
|
|
1281
|
+
this.onSelect = new EventEmitter();
|
|
1282
|
+
this.listChange = new EventEmitter();
|
|
1283
|
+
this.scrolledDown = new EventEmitter();
|
|
1284
|
+
this.isSelected = (arg) => false;
|
|
1285
|
+
this.isDisabled = (arg) => false;
|
|
1286
|
+
this.ngClass = (arg) => ({});
|
|
1287
|
+
}
|
|
1288
|
+
set storedElements(list) {
|
|
1289
|
+
this._storedElements = list;
|
|
1290
|
+
this.listChange.emit(list);
|
|
1291
|
+
}
|
|
1292
|
+
get storedElements() {
|
|
1293
|
+
return this._storedElements;
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ListComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1297
|
+
ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: ListComponent, selector: "ode-list", inputs: { model: "model", filters: "filters", inputFilter: "inputFilter", sort: "sort", limit: "limit", searchPlaceholder: "searchPlaceholder", noResultsLabel: "noResultsLabel", placeholder: "placeholder", isSearchActive: "isSearchActive", isSearchButtonDisabled: "isSearchButtonDisabled", searchInput: "searchInput", searchDelay: "searchDelay", searchSubmit: "searchSubmit", isSelected: "isSelected", isDisabled: "isDisabled", ngClass: "ngClass" }, outputs: { inputChange: "inputChange", onSelect: "onSelect", listChange: "listChange", scrolledDown: "scrolledDown" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<ode-search-input\n *ngIf=\"isSearchActive\"\n [isSearchButtonDisabled]=\"isSearchButtonDisabled\"\n [searchInput]=\"searchInput\"\n [searchSubmit]=\"searchSubmit\"\n [delay]=\"searchDelay\"\n [attr.placeholder]=\"searchPlaceholder | translate\"\n (onChange)=\"inputChange.emit($event)\"\n>\n</ode-search-input>\n\n<div class=\"toolbar\">\n <ng-content select=\"[toolbar]\"></ng-content>\n</div>\n\n<div\n class=\"list-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\"\n>\n <ul>\n <li\n *ngFor=\"let item of model | filter: filters | filter: inputFilter | store:self:'storedElements' | orderBy: sort | slice: 0:limit\"\n (click)=\"onSelect.emit(item)\"\n [class.selected]=\"isSelected(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n class=\"lct-list-item\"\n >\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\">\n </ng-template>\n </li>\n </ul>\n\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\">{{ noResultsLabel | translate }}</li>\n </ul>\n\n <ul *ngIf=\"!model\">\n <li class=\"placeholder\">{{ placeholder | translate }}</li>\n </ul>\n</div>\n", styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{cursor:pointer;border-top:1px solid #ddd;padding:10px}ul li.no-results{padding:50px;text-align:center;font-style:italic}ul li.no-results:hover{cursor:default!important;background-color:inherit!important}ul li.placeholder{color:#aaa;padding:2rem;text-align:left}ul li.placeholder:hover{cursor:default!important;background-color:inherit!important}ul li.disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: SearchInputComponent, selector: "ode-search-input", inputs: ["isSearchActive", "isSearchButtonDisabled", "searchInput", "searchSubmit", "delay"], outputs: ["onChange"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FilterPipe, name: "filter" }, { kind: "pipe", type: OrderPipe, name: "orderBy" }, { kind: "pipe", type: StorePipe, name: "store" }] });
|
|
1298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ListComponent, decorators: [{
|
|
1299
|
+
type: Component,
|
|
1300
|
+
args: [{ selector: 'ode-list', template: "<ode-search-input\n *ngIf=\"isSearchActive\"\n [isSearchButtonDisabled]=\"isSearchButtonDisabled\"\n [searchInput]=\"searchInput\"\n [searchSubmit]=\"searchSubmit\"\n [delay]=\"searchDelay\"\n [attr.placeholder]=\"searchPlaceholder | translate\"\n (onChange)=\"inputChange.emit($event)\"\n>\n</ode-search-input>\n\n<div class=\"toolbar\">\n <ng-content select=\"[toolbar]\"></ng-content>\n</div>\n\n<div\n class=\"list-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\"\n>\n <ul>\n <li\n *ngFor=\"let item of model | filter: filters | filter: inputFilter | store:self:'storedElements' | orderBy: sort | slice: 0:limit\"\n (click)=\"onSelect.emit(item)\"\n [class.selected]=\"isSelected(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n class=\"lct-list-item\"\n >\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\">\n </ng-template>\n </li>\n </ul>\n\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\">{{ noResultsLabel | translate }}</li>\n </ul>\n\n <ul *ngIf=\"!model\">\n <li class=\"placeholder\">{{ placeholder | translate }}</li>\n </ul>\n</div>\n", styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{cursor:pointer;border-top:1px solid #ddd;padding:10px}ul li.no-results{padding:50px;text-align:center;font-style:italic}ul li.no-results:hover{cursor:default!important;background-color:inherit!important}ul li.placeholder{color:#aaa;padding:2rem;text-align:left}ul li.placeholder:hover{cursor:default!important;background-color:inherit!important}ul li.disabled{pointer-events:none}\n"] }]
|
|
1301
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { model: [{
|
|
1302
|
+
type: Input
|
|
1303
|
+
}], filters: [{
|
|
1304
|
+
type: Input
|
|
1305
|
+
}], inputFilter: [{
|
|
1306
|
+
type: Input
|
|
1307
|
+
}], sort: [{
|
|
1308
|
+
type: Input
|
|
1309
|
+
}], limit: [{
|
|
1310
|
+
type: Input
|
|
1311
|
+
}], searchPlaceholder: [{
|
|
1312
|
+
type: Input
|
|
1313
|
+
}], noResultsLabel: [{
|
|
1314
|
+
type: Input
|
|
1315
|
+
}], placeholder: [{
|
|
1316
|
+
type: Input
|
|
1317
|
+
}], isSearchActive: [{
|
|
1318
|
+
type: Input
|
|
1319
|
+
}], isSearchButtonDisabled: [{
|
|
1320
|
+
type: Input
|
|
1321
|
+
}], searchInput: [{
|
|
1322
|
+
type: Input
|
|
1323
|
+
}], searchDelay: [{
|
|
1324
|
+
type: Input
|
|
1325
|
+
}], searchSubmit: [{
|
|
1326
|
+
type: Input
|
|
1327
|
+
}], inputChange: [{
|
|
1328
|
+
type: Output
|
|
1329
|
+
}], onSelect: [{
|
|
1330
|
+
type: Output
|
|
1331
|
+
}], listChange: [{
|
|
1332
|
+
type: Output
|
|
1333
|
+
}], scrolledDown: [{
|
|
1334
|
+
type: Output
|
|
1335
|
+
}], templateRef: [{
|
|
1336
|
+
type: ContentChild,
|
|
1337
|
+
args: [TemplateRef]
|
|
1338
|
+
}], isSelected: [{
|
|
1339
|
+
type: Input
|
|
1340
|
+
}], isDisabled: [{
|
|
1341
|
+
type: Input
|
|
1342
|
+
}], ngClass: [{
|
|
1343
|
+
type: Input
|
|
1344
|
+
}] } });
|
|
1345
|
+
|
|
1346
|
+
class ListCheckableComponent extends OdeComponent {
|
|
1347
|
+
constructor(injector) {
|
|
1348
|
+
super(injector);
|
|
1349
|
+
this.model = [];
|
|
1350
|
+
this.noResultsLabel = 'list.results.no.items';
|
|
1351
|
+
this.readOnly = false;
|
|
1352
|
+
this.onCheck = new EventEmitter();
|
|
1353
|
+
this.listChange = new EventEmitter();
|
|
1354
|
+
this.scrolledDown = new EventEmitter();
|
|
1355
|
+
this.areAllChecked = () => false;
|
|
1356
|
+
this.isChecked = (arg) => false;
|
|
1357
|
+
this.isDisabled = (arg) => false;
|
|
1358
|
+
this.ngClass = (arg) => ({});
|
|
1359
|
+
/* Store pipe */
|
|
1360
|
+
this.self = this;
|
|
1361
|
+
this._storedElements = [];
|
|
1362
|
+
}
|
|
1363
|
+
set storedElements(list) {
|
|
1364
|
+
this._storedElements = list;
|
|
1365
|
+
this.listChange.emit(list);
|
|
1366
|
+
}
|
|
1367
|
+
get storedElements() {
|
|
1368
|
+
return this._storedElements;
|
|
1369
|
+
}
|
|
1370
|
+
toggleAll(checkAll) {
|
|
1371
|
+
this.model.forEach(item => {
|
|
1372
|
+
const isChecked = this.isChecked(item);
|
|
1373
|
+
if (!this.isDisabled(item)
|
|
1374
|
+
&& ((isChecked && !checkAll) || (!isChecked && checkAll))) {
|
|
1375
|
+
this.onCheck.emit({ item: item, checked: checkAll });
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
ListCheckableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ListCheckableComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1381
|
+
ListCheckableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: ListCheckableComponent, selector: "ode-list-checkable", inputs: { model: "model", filters: "filters", sort: "sort", limit: "limit", noResultsLabel: "noResultsLabel", readOnly: "readOnly", areAllChecked: "areAllChecked", isChecked: "isChecked", isDisabled: "isDisabled", ngClass: "ngClass" }, outputs: { onCheck: "onCheck", listChange: "listChange", scrolledDown: "scrolledDown" }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"list-checkable-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\">\n\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\"><span>{{ noResultsLabel | translate }}</span></li>\n </ul>\n \n <ul>\n <li class=\"select-all\" \n [class.checked]=\"areAllChecked()\"\n *ngIf=\"!readOnly\">\n <label>\n <span>{{(areAllChecked() ? 'ux.multiselect.deselect-all' : 'ux.multiselect.select-all') | translate}}</span>\n <input type=\"checkbox\" [checked]=\"areAllChecked()\" (change)=\"toggleAll($event.target.checked)\" />\n </label>\n </li>\n\n <li class=\"lct-list-checkable-item\" \n [class.checked]=\"isChecked(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n *ngFor=\"let item of model | filter: filters | store:self:'storedElements' | orderBy: sort | slice: 0:limit\">\n <label>\n <span>\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template> \n </span>\n <input *ngIf=\"!readOnly\" type=\"checkbox\" \n [disabled]=\"isDisabled(item)\"\n [checked]=\"isChecked(item)\"\n (change)=\"onCheck.emit({item:item, checked:$event.target.checked})\"/>\n </label>\n </li>\n </ul>\n\n</div>\n", styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{border-top:1px solid #ddd;width:-webkit-fill-available;width:-moz-available;display:flex}ul li:not(.checked){color:#939393}ul li.disabled{pointer-events:none}ul li.select-all{background-color:#ff83520a;color:#5b6472}ul li.select-all span{text-align:right}ul li label{cursor:pointer;width:100%;display:flex}ul li label:hover{background-color:#eaedf2}ul li label span{padding:7px 15px;width:100%}ul li label input[type=checkbox]{margin-right:15px;align-self:center}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2$2.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FilterPipe, name: "filter" }, { kind: "pipe", type: OrderPipe, name: "orderBy" }, { kind: "pipe", type: StorePipe, name: "store" }] });
|
|
1382
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ListCheckableComponent, decorators: [{
|
|
1383
|
+
type: Component,
|
|
1384
|
+
args: [{ selector: 'ode-list-checkable', template: "<div class=\"list-checkable-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\">\n\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\"><span>{{ noResultsLabel | translate }}</span></li>\n </ul>\n \n <ul>\n <li class=\"select-all\" \n [class.checked]=\"areAllChecked()\"\n *ngIf=\"!readOnly\">\n <label>\n <span>{{(areAllChecked() ? 'ux.multiselect.deselect-all' : 'ux.multiselect.select-all') | translate}}</span>\n <input type=\"checkbox\" [checked]=\"areAllChecked()\" (change)=\"toggleAll($event.target.checked)\" />\n </label>\n </li>\n\n <li class=\"lct-list-checkable-item\" \n [class.checked]=\"isChecked(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n *ngFor=\"let item of model | filter: filters | store:self:'storedElements' | orderBy: sort | slice: 0:limit\">\n <label>\n <span>\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\"></ng-template> \n </span>\n <input *ngIf=\"!readOnly\" type=\"checkbox\" \n [disabled]=\"isDisabled(item)\"\n [checked]=\"isChecked(item)\"\n (change)=\"onCheck.emit({item:item, checked:$event.target.checked})\"/>\n </label>\n </li>\n </ul>\n\n</div>\n", styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{border-top:1px solid #ddd;width:-webkit-fill-available;width:-moz-available;display:flex}ul li:not(.checked){color:#939393}ul li.disabled{pointer-events:none}ul li.select-all{background-color:#ff83520a;color:#5b6472}ul li.select-all span{text-align:right}ul li label{cursor:pointer;width:100%;display:flex}ul li label:hover{background-color:#eaedf2}ul li label span{padding:7px 15px;width:100%}ul li label input[type=checkbox]{margin-right:15px;align-self:center}\n"] }]
|
|
1385
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { model: [{
|
|
1386
|
+
type: Input
|
|
1387
|
+
}], filters: [{
|
|
1388
|
+
type: Input
|
|
1389
|
+
}], sort: [{
|
|
1390
|
+
type: Input
|
|
1391
|
+
}], limit: [{
|
|
1392
|
+
type: Input
|
|
1393
|
+
}], noResultsLabel: [{
|
|
1394
|
+
type: Input
|
|
1395
|
+
}], readOnly: [{
|
|
1396
|
+
type: Input
|
|
1397
|
+
}], onCheck: [{
|
|
1398
|
+
type: Output
|
|
1399
|
+
}], listChange: [{
|
|
1400
|
+
type: Output
|
|
1401
|
+
}], scrolledDown: [{
|
|
1402
|
+
type: Output
|
|
1403
|
+
}], templateRef: [{
|
|
1404
|
+
type: ContentChild,
|
|
1405
|
+
args: [TemplateRef]
|
|
1406
|
+
}], areAllChecked: [{
|
|
1407
|
+
type: Input
|
|
1408
|
+
}], isChecked: [{
|
|
1409
|
+
type: Input
|
|
1410
|
+
}], isDisabled: [{
|
|
1411
|
+
type: Input
|
|
1412
|
+
}], ngClass: [{
|
|
1413
|
+
type: Input
|
|
1414
|
+
}] } });
|
|
1415
|
+
|
|
1416
|
+
class MonoSelectComponent extends OdeComponent {
|
|
1417
|
+
constructor(elementRef, injector) {
|
|
1418
|
+
super(injector);
|
|
1419
|
+
this.elementRef = elementRef;
|
|
1420
|
+
this.placeholder = 'monoselect.placeholder.default';
|
|
1421
|
+
this.options = [];
|
|
1422
|
+
this.translateOptions = true;
|
|
1423
|
+
this.opened = false;
|
|
1424
|
+
this.selectedOption = null;
|
|
1425
|
+
this.disabled = false;
|
|
1426
|
+
this.onChange = (_) => {
|
|
1427
|
+
};
|
|
1428
|
+
this.onTouched = () => {
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
optionClicked(option) {
|
|
1432
|
+
this.selectedOption = option;
|
|
1433
|
+
this.opened = false;
|
|
1434
|
+
this.onChange(this.selectedOption != null ? this.selectedOption.value : null);
|
|
1435
|
+
}
|
|
1436
|
+
onClickOnDocument(event) {
|
|
1437
|
+
if (this.opened &&
|
|
1438
|
+
!this.elementRef.nativeElement.querySelector('.lct-form-select').contains(event.target)) {
|
|
1439
|
+
this.opened = false;
|
|
1440
|
+
}
|
|
1441
|
+
return true;
|
|
1442
|
+
}
|
|
1443
|
+
onClickOnHost() {
|
|
1444
|
+
if (!this.opened && !this.disabled) {
|
|
1445
|
+
this.opened = true;
|
|
1446
|
+
}
|
|
1447
|
+
else {
|
|
1448
|
+
this.opened = false;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
registerOnChange(fn) {
|
|
1452
|
+
this.onChange = fn;
|
|
1453
|
+
}
|
|
1454
|
+
registerOnTouched(fn) {
|
|
1455
|
+
this.onTouched = fn;
|
|
1456
|
+
}
|
|
1457
|
+
setDisabledState(isDisabled) {
|
|
1458
|
+
this.disabled = isDisabled;
|
|
1459
|
+
}
|
|
1460
|
+
writeValue(obj) {
|
|
1461
|
+
this.selectedOption = this.options.find(option => option.value === obj);
|
|
1462
|
+
this.onChange(this.selectedOption ? this.selectedOption.value : null);
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
MonoSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MonoSelectComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1466
|
+
MonoSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: MonoSelectComponent, selector: "ode-mono-select", inputs: { placeholder: "placeholder", options: "options", trackByFn: "trackByFn", translateOptions: "translateOptions", disabled: "disabled" }, host: { listeners: { "document:click": "onClickOnDocument($event)", "click": "onClickOnHost()" } }, providers: [{
|
|
1467
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1468
|
+
useExisting: forwardRef(() => MonoSelectComponent),
|
|
1469
|
+
multi: true
|
|
1470
|
+
}], usesInheritance: true, ngImport: i0, template: "<div class=\"form-select lct-form-select\" [ngClass]=\"{'form-select--opened': opened, 'form-select--disabled': disabled}\">\n <ul>\n <li class=\"form-select__options--selected lct-form-select__options--selected\">\n <strong>{{selectedOption ? ((translateOptions == true) ? (selectedOption.label | translate) : selectedOption.label) : (placeholder | translate)}}</strong>\n <ul class=\"form-select__list lct-form-select__list\" *ngIf=\"opened\">\n <li class=\"form-select__options lct-form-select__options\"\n (click)=\"$event.stopPropagation(); optionClicked()\">{{placeholder | translate}}</li>\n <li class=\"form-select__options lct-form-select__options\"\n *ngFor=\"let option of options\"\n (click)=\"$event.stopPropagation(); optionClicked(option)\">{{(translateOptions == true) ? (option.label | translate) : option.label}}</li>\n </ul>\n </li>\n </ul>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MonoSelectComponent, decorators: [{
|
|
1472
|
+
type: Component,
|
|
1473
|
+
args: [{ selector: 'ode-mono-select', providers: [{
|
|
1474
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1475
|
+
useExisting: forwardRef(() => MonoSelectComponent),
|
|
1476
|
+
multi: true
|
|
1477
|
+
}], host: {
|
|
1478
|
+
'(document:click)': 'onClickOnDocument($event)',
|
|
1479
|
+
'(click)': 'onClickOnHost()'
|
|
1480
|
+
}, template: "<div class=\"form-select lct-form-select\" [ngClass]=\"{'form-select--opened': opened, 'form-select--disabled': disabled}\">\n <ul>\n <li class=\"form-select__options--selected lct-form-select__options--selected\">\n <strong>{{selectedOption ? ((translateOptions == true) ? (selectedOption.label | translate) : selectedOption.label) : (placeholder | translate)}}</strong>\n <ul class=\"form-select__list lct-form-select__list\" *ngIf=\"opened\">\n <li class=\"form-select__options lct-form-select__options\"\n (click)=\"$event.stopPropagation(); optionClicked()\">{{placeholder | translate}}</li>\n <li class=\"form-select__options lct-form-select__options\"\n *ngFor=\"let option of options\"\n (click)=\"$event.stopPropagation(); optionClicked(option)\">{{(translateOptions == true) ? (option.label | translate) : option.label}}</li>\n </ul>\n </li>\n </ul>\n</div>\n" }]
|
|
1481
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Injector }]; }, propDecorators: { placeholder: [{
|
|
1482
|
+
type: Input
|
|
1483
|
+
}], options: [{
|
|
1484
|
+
type: Input
|
|
1485
|
+
}], trackByFn: [{
|
|
1486
|
+
type: Input
|
|
1487
|
+
}], translateOptions: [{
|
|
1488
|
+
type: Input
|
|
1489
|
+
}], disabled: [{
|
|
1490
|
+
type: Input
|
|
1491
|
+
}] } });
|
|
1492
|
+
|
|
1493
|
+
/* If you need to use multi-combo in a form you should give a look to the MultiSelectComponent. */
|
|
1494
|
+
class MultiComboComponent extends OdeComponent {
|
|
1495
|
+
constructor(_eref, labelsService, injector) {
|
|
1496
|
+
super(injector);
|
|
1497
|
+
this._eref = _eref;
|
|
1498
|
+
this.labelsService = labelsService;
|
|
1499
|
+
this.filteredModel = [];
|
|
1500
|
+
this.title = 'Select';
|
|
1501
|
+
this.reverse = false;
|
|
1502
|
+
this.disabled = false;
|
|
1503
|
+
this.onSelectItem = new EventEmitter();
|
|
1504
|
+
this.onDeselectItem = new EventEmitter();
|
|
1505
|
+
this.filteredModelChange = new EventEmitter();
|
|
1506
|
+
this.onOpen = new EventEmitter();
|
|
1507
|
+
this.onClose = new EventEmitter();
|
|
1508
|
+
this.self = this;
|
|
1509
|
+
this._comboModel = [];
|
|
1510
|
+
this.filteredComboModel = [];
|
|
1511
|
+
this.search = {
|
|
1512
|
+
input: '',
|
|
1513
|
+
reset() {
|
|
1514
|
+
this.input = '';
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
this.show = false;
|
|
1518
|
+
}
|
|
1519
|
+
set comboModel(model) {
|
|
1520
|
+
this._comboModel = model;
|
|
1521
|
+
if (!model) {
|
|
1522
|
+
this.filteredModel = [];
|
|
1523
|
+
return;
|
|
1524
|
+
}
|
|
1525
|
+
for (let i = 0; i < this.filteredModel.length; i++) {
|
|
1526
|
+
const idx = model.indexOf(this.filteredModel[i]);
|
|
1527
|
+
if (idx < 0) {
|
|
1528
|
+
this.filteredModel.splice(idx, 1);
|
|
1529
|
+
i--;
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
labels(label) {
|
|
1534
|
+
return this.labelsService.getLabel(label);
|
|
1535
|
+
}
|
|
1536
|
+
toggleVisibility() {
|
|
1537
|
+
this.show = !this.show;
|
|
1538
|
+
if (this.show) {
|
|
1539
|
+
this.search.reset();
|
|
1540
|
+
this.onOpen.emit();
|
|
1541
|
+
}
|
|
1542
|
+
else {
|
|
1543
|
+
this.onClose.emit();
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
isSelected(item) {
|
|
1547
|
+
return this.filteredModel && this.filteredModel.indexOf(item) >= 0;
|
|
1548
|
+
}
|
|
1549
|
+
isDisabled() {
|
|
1550
|
+
return this.filteredModel && this.maxSelected &&
|
|
1551
|
+
this.maxSelected <= this.filteredModel.length;
|
|
1552
|
+
}
|
|
1553
|
+
toggleItem(item) {
|
|
1554
|
+
const idx = this.filteredModel.indexOf(item);
|
|
1555
|
+
if (idx >= 0) {
|
|
1556
|
+
this.filteredModel.splice(idx, 1);
|
|
1557
|
+
this.onDeselectItem.emit(item);
|
|
1558
|
+
}
|
|
1559
|
+
else if (!this.maxSelected ||
|
|
1560
|
+
this.filteredModel.length < this.maxSelected) {
|
|
1561
|
+
this.filteredModel.push(item);
|
|
1562
|
+
this.onSelectItem.emit(item);
|
|
1563
|
+
}
|
|
1564
|
+
this.filteredModelChange.emit(this.filteredModel);
|
|
1565
|
+
}
|
|
1566
|
+
selectAll() {
|
|
1567
|
+
this.filteredModel = [];
|
|
1568
|
+
for (let i = 0; i < this.filteredComboModel.length; i++) {
|
|
1569
|
+
this.filteredModel.push(this.filteredComboModel[i]);
|
|
1570
|
+
}
|
|
1571
|
+
this.filteredModelChange.emit(this.filteredModel);
|
|
1572
|
+
}
|
|
1573
|
+
deselectAll() {
|
|
1574
|
+
this.filteredModel = [];
|
|
1575
|
+
this.filteredModelChange.emit(this.filteredModel);
|
|
1576
|
+
}
|
|
1577
|
+
displayItem(item) {
|
|
1578
|
+
return item instanceof Object ?
|
|
1579
|
+
this.display && typeof this.display === 'string' ?
|
|
1580
|
+
item[this.display] :
|
|
1581
|
+
item.toString() :
|
|
1582
|
+
this.display && this.display instanceof Function ?
|
|
1583
|
+
this.display(item || '') :
|
|
1584
|
+
item;
|
|
1585
|
+
}
|
|
1586
|
+
onClick(event) {
|
|
1587
|
+
if (this.show && !this._eref.nativeElement.contains(event.target)) {
|
|
1588
|
+
this.toggleVisibility();
|
|
1589
|
+
}
|
|
1590
|
+
return true;
|
|
1591
|
+
}
|
|
1592
|
+
getFilter() {
|
|
1593
|
+
if (!this.filter) {
|
|
1594
|
+
return '';
|
|
1595
|
+
}
|
|
1596
|
+
let filter = '';
|
|
1597
|
+
if (this._comboModel.length > 0) {
|
|
1598
|
+
if (typeof this._comboModel[0] === 'string') {
|
|
1599
|
+
filter = this.search.input;
|
|
1600
|
+
}
|
|
1601
|
+
else {
|
|
1602
|
+
filter = {};
|
|
1603
|
+
filter[this.filter] = this.search.input;
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
return filter;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
MultiComboComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MultiComboComponent, deps: [{ token: i0.ElementRef }, { token: LabelsService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1610
|
+
MultiComboComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: MultiComboComponent, selector: "ode-multi-combo", inputs: { comboModel: "comboModel", filteredModel: ["outputModel", "filteredModel"], title: "title", display: "display", filter: "filter", orderBy: "orderBy", reverse: "reverse", maxSelected: ["max", "maxSelected"], disabled: "disabled" }, outputs: { onSelectItem: "onSelectItem", onDeselectItem: "onDeselectItem", filteredModelChange: "outputModelChange", onOpen: "onOpen", onClose: "onClose" }, host: { listeners: { "document:click": "onClick($event)" } }, usesInheritance: true, ngImport: i0, template: "<button (click)=\"toggleVisibility()\"\n [ngClass]=\"{ opened: show }\"\n [disabled]=\"disabled\"\n type=\"button\">\n {{ title }}\n</button>\n<div [ngClass]=\"{ hidden: !show }\">\n <div class=\"options\">\n <button class=\"select-all\" (click)=\"selectAll()\" *ngIf=\"!maxSelected\"\n [title]=\"labels('select.all')\" type=\"button\">{{ labels('select.all') }}</button>\n <button class=\"deselect-all\" (click)=\"deselectAll()\"\n [title]=\"labels('deselect.all')\" type=\"button\">{{ labels('deselect.all') }}</button>\n </div>\n <div *ngIf=\"filter\" class=\"filter\">\n <ode-search-input (onChange)=\"search.input = $event\" [attr.placeholder]=\"labels('search')\"></ode-search-input>\n </div>\n <ul>\n <li *ngFor=\"let item of _comboModel | filter: getFilter() | orderBy: orderBy | store: self:'filteredComboModel'\"\n (click)=\"toggleItem(item)\"\n [ngClass]=\"{ selected: isSelected(item) }\"\n [attr.disabled]=\"isDisabled()\">\n {{ displayItem(item) | translate }}\n </li>\n </ul>\n</div>\n", styles: [":host{position:relative}:host>button{min-width:150px}:host>div{position:absolute;z-index:2;left:0px;overflow:hidden;background:white;border:2px solid black}:host>div.hidden{max-height:0px;border-width:0px}:host>div>div.options>*{display:inline-block;vertical-align:middle}:host>div>div.filter{margin:10px 0;width:100%;position:relative}:host>div>div.filter input{width:100%}:host>div>ul{list-style:none;padding:0;overflow-y:auto;max-height:200px}:host>div>ul>li{white-space:nowrap;cursor:pointer}:host>div>ul>li:not(.selected)[disabled=true]{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SearchInputComponent, selector: "ode-search-input", inputs: ["isSearchActive", "isSearchButtonDisabled", "searchInput", "searchSubmit", "delay"], outputs: ["onChange"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: FilterPipe, name: "filter" }, { kind: "pipe", type: OrderPipe, name: "orderBy" }, { kind: "pipe", type: StorePipe, name: "store" }] });
|
|
1611
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MultiComboComponent, decorators: [{
|
|
1612
|
+
type: Component,
|
|
1613
|
+
args: [{ selector: 'ode-multi-combo', host: {
|
|
1614
|
+
'(document:click)': 'onClick($event)',
|
|
1615
|
+
}, template: "<button (click)=\"toggleVisibility()\"\n [ngClass]=\"{ opened: show }\"\n [disabled]=\"disabled\"\n type=\"button\">\n {{ title }}\n</button>\n<div [ngClass]=\"{ hidden: !show }\">\n <div class=\"options\">\n <button class=\"select-all\" (click)=\"selectAll()\" *ngIf=\"!maxSelected\"\n [title]=\"labels('select.all')\" type=\"button\">{{ labels('select.all') }}</button>\n <button class=\"deselect-all\" (click)=\"deselectAll()\"\n [title]=\"labels('deselect.all')\" type=\"button\">{{ labels('deselect.all') }}</button>\n </div>\n <div *ngIf=\"filter\" class=\"filter\">\n <ode-search-input (onChange)=\"search.input = $event\" [attr.placeholder]=\"labels('search')\"></ode-search-input>\n </div>\n <ul>\n <li *ngFor=\"let item of _comboModel | filter: getFilter() | orderBy: orderBy | store: self:'filteredComboModel'\"\n (click)=\"toggleItem(item)\"\n [ngClass]=\"{ selected: isSelected(item) }\"\n [attr.disabled]=\"isDisabled()\">\n {{ displayItem(item) | translate }}\n </li>\n </ul>\n</div>\n", styles: [":host{position:relative}:host>button{min-width:150px}:host>div{position:absolute;z-index:2;left:0px;overflow:hidden;background:white;border:2px solid black}:host>div.hidden{max-height:0px;border-width:0px}:host>div>div.options>*{display:inline-block;vertical-align:middle}:host>div>div.filter{margin:10px 0;width:100%;position:relative}:host>div>div.filter input{width:100%}:host>div>ul{list-style:none;padding:0;overflow-y:auto;max-height:200px}:host>div>ul>li{white-space:nowrap;cursor:pointer}:host>div>ul>li:not(.selected)[disabled=true]{pointer-events:none}\n"] }]
|
|
1616
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: LabelsService }, { type: i0.Injector }]; }, propDecorators: { comboModel: [{
|
|
1617
|
+
type: Input
|
|
1618
|
+
}], filteredModel: [{
|
|
1619
|
+
type: Input,
|
|
1620
|
+
args: ['outputModel']
|
|
1621
|
+
}], title: [{
|
|
1622
|
+
type: Input
|
|
1623
|
+
}], display: [{
|
|
1624
|
+
type: Input
|
|
1625
|
+
}], filter: [{
|
|
1626
|
+
type: Input
|
|
1627
|
+
}], orderBy: [{
|
|
1628
|
+
type: Input
|
|
1629
|
+
}], reverse: [{
|
|
1630
|
+
type: Input
|
|
1631
|
+
}], maxSelected: [{
|
|
1632
|
+
type: Input,
|
|
1633
|
+
args: ['max']
|
|
1634
|
+
}], disabled: [{
|
|
1635
|
+
type: Input
|
|
1636
|
+
}], onSelectItem: [{
|
|
1637
|
+
type: Output
|
|
1638
|
+
}], onDeselectItem: [{
|
|
1639
|
+
type: Output
|
|
1640
|
+
}], filteredModelChange: [{
|
|
1641
|
+
type: Output,
|
|
1642
|
+
args: ['outputModelChange']
|
|
1643
|
+
}], onOpen: [{
|
|
1644
|
+
type: Output
|
|
1645
|
+
}], onClose: [{
|
|
1646
|
+
type: Output
|
|
1647
|
+
}] } });
|
|
1648
|
+
|
|
1649
|
+
class MultiSelectComponent extends OdeComponent {
|
|
1650
|
+
constructor(injector, elementRef) {
|
|
1651
|
+
super(injector);
|
|
1652
|
+
this.elementRef = elementRef;
|
|
1653
|
+
this.label = '';
|
|
1654
|
+
this.options = [];
|
|
1655
|
+
this.preview = false;
|
|
1656
|
+
this.model = [];
|
|
1657
|
+
this.isDisabled = false;
|
|
1658
|
+
this.isOptionsVisible = false;
|
|
1659
|
+
this.onChange = (_) => {
|
|
1660
|
+
};
|
|
1661
|
+
this.onTouched = () => {
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
optionClicked(option) {
|
|
1665
|
+
if (this.model) {
|
|
1666
|
+
const index = this.getIndexOfOptionInModel(option);
|
|
1667
|
+
if (index < 0) {
|
|
1668
|
+
this.model.push(option.value);
|
|
1669
|
+
}
|
|
1670
|
+
else {
|
|
1671
|
+
this.model.splice(index, 1);
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
else {
|
|
1675
|
+
this.model = [option.value];
|
|
1676
|
+
}
|
|
1677
|
+
this.onChange(this.model);
|
|
1678
|
+
}
|
|
1679
|
+
selectAll() {
|
|
1680
|
+
this.options.forEach(option => {
|
|
1681
|
+
if (!this.model.includes(option.value)) {
|
|
1682
|
+
this.model.push(option.value);
|
|
1683
|
+
}
|
|
1684
|
+
});
|
|
1685
|
+
this.onChange(this.model);
|
|
1686
|
+
}
|
|
1687
|
+
deselectAll() {
|
|
1688
|
+
this.model = [];
|
|
1689
|
+
this.onChange(this.model);
|
|
1690
|
+
}
|
|
1691
|
+
toggleOptionsVisibility() {
|
|
1692
|
+
this.isOptionsVisible = !this.isOptionsVisible;
|
|
1693
|
+
}
|
|
1694
|
+
isSelected(option) {
|
|
1695
|
+
return this.model ? (this.getIndexOfOptionInModel(option) >= 0) : false;
|
|
1696
|
+
}
|
|
1697
|
+
closeIfOpened(event) {
|
|
1698
|
+
if (this.isOptionsVisible
|
|
1699
|
+
&& !this.elementRef.nativeElement.querySelector('.lct-multi-select__options-container').contains(event.target)
|
|
1700
|
+
&& !this.elementRef.nativeElement.querySelector('.lct-multi-select__toggle').contains(event.target)) {
|
|
1701
|
+
this.isOptionsVisible = false;
|
|
1702
|
+
}
|
|
1703
|
+
return true;
|
|
1704
|
+
}
|
|
1705
|
+
getIndexOfOptionInModel(option) {
|
|
1706
|
+
return this.model.map(this.trackByFn).indexOf(this.trackByFn(option.value));
|
|
1707
|
+
}
|
|
1708
|
+
registerOnChange(fn) {
|
|
1709
|
+
this.onChange = fn;
|
|
1710
|
+
}
|
|
1711
|
+
registerOnTouched(fn) {
|
|
1712
|
+
this.onTouched = fn;
|
|
1713
|
+
}
|
|
1714
|
+
setDisabledState(isDisabled) {
|
|
1715
|
+
this.isDisabled = isDisabled;
|
|
1716
|
+
}
|
|
1717
|
+
writeValue(obj) {
|
|
1718
|
+
this.model = obj;
|
|
1719
|
+
this.onChange(this.model);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
MultiSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MultiSelectComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1723
|
+
MultiSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: MultiSelectComponent, selector: "ode-multi-select", inputs: { label: "label", options: "options", preview: "preview", trackByFn: "trackByFn" }, host: { listeners: { "document:click": "closeIfOpened($event)" } }, providers: [{
|
|
1724
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1725
|
+
useExisting: forwardRef(() => MultiSelectComponent),
|
|
1726
|
+
multi: true
|
|
1727
|
+
}], usesInheritance: true, ngImport: i0, template: "<button type=\"button\"\n (click)=\"toggleOptionsVisibility()\" [disabled]=\"isDisabled\"\n class=\"multi-select__toggle lct-multi-select__toggle\"\n [ngClass]=\"{'multi-select__toggle--active': isOptionsVisible}\">{{label |\u00A0translate}}</button>\n<div class=\"multi-select__options-container lct-multi-select__options-container\"\n [ngClass]=\"{'multi-select__options-container--active': isOptionsVisible}\">\n <div class=\"multi-select__options-actions\">\n <button type=\"button\"\n class=\"multi-select__options-actions-item\"\n (click)=\"selectAll()\">{{'ux.multiselect.select-all' | translate}}</button>\n <button type=\"button\"\n class=\"multi-select__options-actions-item\"\n (click)=\"deselectAll()\">{{'ux.multiselect.deselect-all' | translate}}</button>\n </div>\n <ul class=\"multi-select__options lct-multi-select__options\">\n <li class=\"multi-select__options-item lct-multi-select__options-item\"\n *ngFor=\"let option of options\"\n (click)=\"optionClicked(option)\"\n [ngClass]=\"{'multi-select__options-item--selected': isSelected(option)}\">{{option.label | translate}}</li>\n </ul>\n</div>\n<div class=\"multi-select__options-preview lct-multi-select__options-preview\" *ngIf=\"preview\">\n <ng-container *ngFor=\"let option of options\">\n <button *ngIf=\"isSelected(option)\"\n type=\"button\"\n class=\"multi-select__options-preview-item lct-multi-select__options-preview-item\"\n (click)=\"optionClicked(option)\">\n <span>{{option.label | translate}}</span>\n <i class=\"multi-select__options-preview-item-delete-icon fa fa-trash is-size-5\"></i>\n </button>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{position:relative}.multi-select__toggle{min-width:210px;outline:none;background-color:#f2f2f2}.multi-select__toggle:after{content:\"\\25bc\";float:right;margin-left:10px;transition:transform .25s,color .25s}.multi-select__toggle:hover:after{color:#fff}.multi-select__toggle:hover,.multi-select__toggle.multi-select__toggle--active{background-color:#ff8352;color:#fff}.multi-select__toggle.multi-select__toggle--active:after{transform:rotate(180deg);color:#fff}.multi-select__options-container{display:none;position:absolute;z-index:2;left:1px;top:31px;overflow:hidden;background:white;border:1px solid #ddd;padding:0 10px 0 20px;min-width:160px}.multi-select__options-container.multi-select__options-container--active{display:block}.multi-select__options{list-style:none;padding:0;overflow-y:scroll;max-height:200px;margin-bottom:10px}.multi-select__options-item{white-space:nowrap;cursor:pointer;line-height:25px;font-size:13px;transition:background-color .25s,color .25s;margin-bottom:5px;padding:0 10px}.multi-select__options-item.multi-select__options-item--selected{color:#fff;background-color:#217b9e}.multi-select__options-preview{color:#fff;margin:10px 0}.multi-select__options-preview-item{border:1px solid #217b9e;display:inline-block;font-size:.8em;margin-right:10px;margin-bottom:10px;padding:10px;cursor:pointer;transition:all .25s;border-radius:3px;background-color:#217b9e;line-height:1.5em;color:#fff}.multi-select__options-preview-item:hover{background-color:#61bbde;border-color:#fff}.multi-select__options-preview-item-delete-icon{opacity:0;transition:opacity .25s;float:right;padding-left:10px}.multi-select__options-preview-item:hover .multi-select__options-preview-item-delete-icon{opacity:1}.multi-select__options-actions{margin-top:10px}.multi-select__options-actions-item{margin-bottom:3px;min-width:136px}.multi-select__options-actions-item:hover{background:#ffccb8}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
1728
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: MultiSelectComponent, decorators: [{
|
|
1729
|
+
type: Component,
|
|
1730
|
+
args: [{ selector: 'ode-multi-select', providers: [{
|
|
1731
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1732
|
+
useExisting: forwardRef(() => MultiSelectComponent),
|
|
1733
|
+
multi: true
|
|
1734
|
+
}], host: {
|
|
1735
|
+
'(document:click)': 'closeIfOpened($event)'
|
|
1736
|
+
}, template: "<button type=\"button\"\n (click)=\"toggleOptionsVisibility()\" [disabled]=\"isDisabled\"\n class=\"multi-select__toggle lct-multi-select__toggle\"\n [ngClass]=\"{'multi-select__toggle--active': isOptionsVisible}\">{{label |\u00A0translate}}</button>\n<div class=\"multi-select__options-container lct-multi-select__options-container\"\n [ngClass]=\"{'multi-select__options-container--active': isOptionsVisible}\">\n <div class=\"multi-select__options-actions\">\n <button type=\"button\"\n class=\"multi-select__options-actions-item\"\n (click)=\"selectAll()\">{{'ux.multiselect.select-all' | translate}}</button>\n <button type=\"button\"\n class=\"multi-select__options-actions-item\"\n (click)=\"deselectAll()\">{{'ux.multiselect.deselect-all' | translate}}</button>\n </div>\n <ul class=\"multi-select__options lct-multi-select__options\">\n <li class=\"multi-select__options-item lct-multi-select__options-item\"\n *ngFor=\"let option of options\"\n (click)=\"optionClicked(option)\"\n [ngClass]=\"{'multi-select__options-item--selected': isSelected(option)}\">{{option.label | translate}}</li>\n </ul>\n</div>\n<div class=\"multi-select__options-preview lct-multi-select__options-preview\" *ngIf=\"preview\">\n <ng-container *ngFor=\"let option of options\">\n <button *ngIf=\"isSelected(option)\"\n type=\"button\"\n class=\"multi-select__options-preview-item lct-multi-select__options-preview-item\"\n (click)=\"optionClicked(option)\">\n <span>{{option.label | translate}}</span>\n <i class=\"multi-select__options-preview-item-delete-icon fa fa-trash is-size-5\"></i>\n </button>\n </ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";:host{position:relative}.multi-select__toggle{min-width:210px;outline:none;background-color:#f2f2f2}.multi-select__toggle:after{content:\"\\25bc\";float:right;margin-left:10px;transition:transform .25s,color .25s}.multi-select__toggle:hover:after{color:#fff}.multi-select__toggle:hover,.multi-select__toggle.multi-select__toggle--active{background-color:#ff8352;color:#fff}.multi-select__toggle.multi-select__toggle--active:after{transform:rotate(180deg);color:#fff}.multi-select__options-container{display:none;position:absolute;z-index:2;left:1px;top:31px;overflow:hidden;background:white;border:1px solid #ddd;padding:0 10px 0 20px;min-width:160px}.multi-select__options-container.multi-select__options-container--active{display:block}.multi-select__options{list-style:none;padding:0;overflow-y:scroll;max-height:200px;margin-bottom:10px}.multi-select__options-item{white-space:nowrap;cursor:pointer;line-height:25px;font-size:13px;transition:background-color .25s,color .25s;margin-bottom:5px;padding:0 10px}.multi-select__options-item.multi-select__options-item--selected{color:#fff;background-color:#217b9e}.multi-select__options-preview{color:#fff;margin:10px 0}.multi-select__options-preview-item{border:1px solid #217b9e;display:inline-block;font-size:.8em;margin-right:10px;margin-bottom:10px;padding:10px;cursor:pointer;transition:all .25s;border-radius:3px;background-color:#217b9e;line-height:1.5em;color:#fff}.multi-select__options-preview-item:hover{background-color:#61bbde;border-color:#fff}.multi-select__options-preview-item-delete-icon{opacity:0;transition:opacity .25s;float:right;padding-left:10px}.multi-select__options-preview-item:hover .multi-select__options-preview-item-delete-icon{opacity:1}.multi-select__options-actions{margin-top:10px}.multi-select__options-actions-item{margin-bottom:3px;min-width:136px}.multi-select__options-actions-item:hover{background:#ffccb8}\n"] }]
|
|
1737
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { label: [{
|
|
1738
|
+
type: Input
|
|
1739
|
+
}], options: [{
|
|
1740
|
+
type: Input
|
|
1741
|
+
}], preview: [{
|
|
1742
|
+
type: Input
|
|
1743
|
+
}], trackByFn: [{
|
|
1744
|
+
type: Input
|
|
1745
|
+
}] } });
|
|
1746
|
+
|
|
1747
|
+
class PanelSectionComponent extends OdeComponent {
|
|
1748
|
+
constructor(injector) {
|
|
1749
|
+
super(injector);
|
|
1750
|
+
this.folded = null;
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
PanelSectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PanelSectionComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1754
|
+
PanelSectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: PanelSectionComponent, selector: "ode-panel-section", inputs: { sectionTitle: ["section-title", "sectionTitle"], folded: "folded" }, usesInheritance: true, ngImport: i0, template: "<section class=\"panel-section\">\n <div class=\"panel-section-header is-display-flex has-space-between\" (click)=\"folded !== null ? folded=!folded : null\" [class.foldable]=\"folded !== null\">\n <div class=\"is-display-flex\">\n <s5l>{{ sectionTitle\u00A0}}</s5l>\n <div class=\"has-left-padding-10\">\n <ng-content select=\"[panel-section-header-icons]\"></ng-content>\n </div>\n </div>\n\n <i class=\"opener\" *ngIf=\"folded !== null\"\n [class.opened]=\"!folded\"></i>\n </div>\n <div class=\"panel-section-content\" *ngIf=\"!folded\">\n <ng-content></ng-content>\n </div>\n</section>\n", styles: [".panel-section-header{font-size:1.1em;padding:10px}.panel-section-header.foldable{cursor:pointer}.panel-section-content{padding:15px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }] });
|
|
1755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PanelSectionComponent, decorators: [{
|
|
1756
|
+
type: Component,
|
|
1757
|
+
args: [{ selector: 'ode-panel-section', template: "<section class=\"panel-section\">\n <div class=\"panel-section-header is-display-flex has-space-between\" (click)=\"folded !== null ? folded=!folded : null\" [class.foldable]=\"folded !== null\">\n <div class=\"is-display-flex\">\n <s5l>{{ sectionTitle\u00A0}}</s5l>\n <div class=\"has-left-padding-10\">\n <ng-content select=\"[panel-section-header-icons]\"></ng-content>\n </div>\n </div>\n\n <i class=\"opener\" *ngIf=\"folded !== null\"\n [class.opened]=\"!folded\"></i>\n </div>\n <div class=\"panel-section-content\" *ngIf=\"!folded\">\n <ng-content></ng-content>\n </div>\n</section>\n", styles: [".panel-section-header{font-size:1.1em;padding:10px}.panel-section-header.foldable{cursor:pointer}.panel-section-content{padding:15px}\n"] }]
|
|
1758
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { sectionTitle: [{
|
|
1759
|
+
type: Input,
|
|
1760
|
+
args: ['section-title']
|
|
1761
|
+
}], folded: [{
|
|
1762
|
+
type: Input
|
|
1763
|
+
}] } });
|
|
1764
|
+
|
|
1765
|
+
class PortalComponent extends OdeComponent {
|
|
1766
|
+
constructor(injector) {
|
|
1767
|
+
super(injector);
|
|
1768
|
+
}
|
|
1769
|
+
}
|
|
1770
|
+
PortalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PortalComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1771
|
+
PortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: PortalComponent, selector: "ode-portal", usesInheritance: true, ngImport: i0, template: "<header>\n <ng-content select=\"[header-left]\"></ng-content>\n <ng-content select=\"[header-middle]\"></ng-content>\n <ng-content select=\"[header-right]\"></ng-content>\n</header>\n<section>\n <ng-content select=\"[section]\"></ng-content>\n</section>\n<footer>\n <ng-content select=\"[footer]\"></ng-content>\n</footer>\n", styles: ["header{position:relative;display:flex;align-items:center;top:0px;width:100%}\n"] });
|
|
1772
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PortalComponent, decorators: [{
|
|
1773
|
+
type: Component,
|
|
1774
|
+
args: [{ selector: 'ode-portal', template: "<header>\n <ng-content select=\"[header-left]\"></ng-content>\n <ng-content select=\"[header-middle]\"></ng-content>\n <ng-content select=\"[header-right]\"></ng-content>\n</header>\n<section>\n <ng-content select=\"[section]\"></ng-content>\n</section>\n<footer>\n <ng-content select=\"[footer]\"></ng-content>\n</footer>\n", styles: ["header{position:relative;display:flex;align-items:center;top:0px;width:100%}\n"] }]
|
|
1775
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1776
|
+
|
|
1777
|
+
class PushPanelComponent extends OdeComponent {
|
|
1778
|
+
constructor(injector) {
|
|
1779
|
+
super(injector);
|
|
1780
|
+
this.onClose = new EventEmitter();
|
|
1781
|
+
}
|
|
1782
|
+
set toggle(toggle) {
|
|
1783
|
+
this._opened = toggle;
|
|
1784
|
+
}
|
|
1785
|
+
onClick(event) {
|
|
1786
|
+
const checkOpener = this.opener &&
|
|
1787
|
+
(this.opener.contains && this.opener.contains(event.target)) ||
|
|
1788
|
+
(this.opener.nativeElement && this.opener.nativeElement.contains(event.target));
|
|
1789
|
+
if (this._opened &&
|
|
1790
|
+
!this.inside.nativeElement.contains(event.target) &&
|
|
1791
|
+
!checkOpener) {
|
|
1792
|
+
this._opened = false;
|
|
1793
|
+
this.onClose.emit();
|
|
1794
|
+
}
|
|
1795
|
+
return true;
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
PushPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PushPanelComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1799
|
+
PushPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: PushPanelComponent, selector: "ode-push-panel", inputs: { toggle: "toggle", opener: "opener" }, outputs: { onClose: "onClose" }, host: { listeners: { "document:click": "onClick($event)" } }, viewQueries: [{ propertyName: "inside", first: true, predicate: ["inside"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ opened: _opened }\" #inside>\n <ng-content select=\"[inside]\"></ng-content>\n</div>\n<div>\n <ng-content select=\"[companion]\"></ng-content>\n</div>\n", styles: [":host>div:nth-child(1){position:fixed;z-index:10;overflow-x:hidden;overflow-y:scroll;height:100%;top:0px;left:-30%;width:30%;transition:transform .25s}:host>div:nth-child(1).opened{transform:translate(100%)}:host>div:nth-child(2){position:relative;left:0%;opacity:1;transition:transform .25s,opacity .25s}:host>div:nth-child(1).opened+div{opacity:.7;transform:translate(30%);overflow-x:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PushPanelComponent, decorators: [{
|
|
1801
|
+
type: Component,
|
|
1802
|
+
args: [{ selector: 'ode-push-panel', host: {
|
|
1803
|
+
'(document:click)': 'onClick($event)',
|
|
1804
|
+
}, template: "<div [ngClass]=\"{ opened: _opened }\" #inside>\n <ng-content select=\"[inside]\"></ng-content>\n</div>\n<div>\n <ng-content select=\"[companion]\"></ng-content>\n</div>\n", styles: [":host>div:nth-child(1){position:fixed;z-index:10;overflow-x:hidden;overflow-y:scroll;height:100%;top:0px;left:-30%;width:30%;transition:transform .25s}:host>div:nth-child(1).opened{transform:translate(100%)}:host>div:nth-child(2){position:relative;left:0%;opacity:1;transition:transform .25s,opacity .25s}:host>div:nth-child(1).opened+div{opacity:.7;transform:translate(30%);overflow-x:hidden}\n"] }]
|
|
1805
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { toggle: [{
|
|
1806
|
+
type: Input
|
|
1807
|
+
}], opener: [{
|
|
1808
|
+
type: Input
|
|
1809
|
+
}], onClose: [{
|
|
1810
|
+
type: Output
|
|
1811
|
+
}], inside: [{
|
|
1812
|
+
type: ViewChild,
|
|
1813
|
+
args: ['inside']
|
|
1814
|
+
}] } });
|
|
1815
|
+
|
|
1816
|
+
class SideLayoutComponent extends OdeComponent {
|
|
1817
|
+
constructor(injector) {
|
|
1818
|
+
super(injector);
|
|
1819
|
+
this.showCompanion = false;
|
|
1820
|
+
this.close = new EventEmitter();
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1823
|
+
SideLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SideLayoutComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1824
|
+
SideLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: SideLayoutComponent, selector: "ode-side-layout", inputs: { showCompanion: "showCompanion" }, outputs: { close: "closeCompanion" }, usesInheritance: true, ngImport: i0, template: "<div class=\"side-layout\">\n <div class=\"side-card\">\n <ng-content select=\"[side-card]\"></ng-content>\n </div>\n <div class=\"side-companion\" *ngIf=\"showCompanion\">\n <ng-content select=\"[side-companion]\"></ng-content>\n </div>\n</div>\n", styles: ["div.side-layout{display:flex;flex-wrap:nowrap;align-items:flex-start}div.side-card{flex:400px 0 0;position:relative}div.side-companion{flex:1;position:relative;margin-left:25px}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SideLayoutComponent, decorators: [{
|
|
1826
|
+
type: Component,
|
|
1827
|
+
args: [{ selector: 'ode-side-layout', template: "<div class=\"side-layout\">\n <div class=\"side-card\">\n <ng-content select=\"[side-card]\"></ng-content>\n </div>\n <div class=\"side-companion\" *ngIf=\"showCompanion\">\n <ng-content select=\"[side-companion]\"></ng-content>\n </div>\n</div>\n", styles: ["div.side-layout{display:flex;flex-wrap:nowrap;align-items:flex-start}div.side-card{flex:400px 0 0;position:relative}div.side-companion{flex:1;position:relative;margin-left:25px}\n"] }]
|
|
1828
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { showCompanion: [{
|
|
1829
|
+
type: Input
|
|
1830
|
+
}], close: [{
|
|
1831
|
+
type: Output,
|
|
1832
|
+
args: ['closeCompanion']
|
|
1833
|
+
}] } });
|
|
1834
|
+
|
|
1835
|
+
class SidePanelComponent extends OdeComponent {
|
|
1836
|
+
constructor(injector, elementRef) {
|
|
1837
|
+
super(injector);
|
|
1838
|
+
this.elementRef = elementRef;
|
|
1839
|
+
this.onClose = new EventEmitter();
|
|
1840
|
+
}
|
|
1841
|
+
set toggle(toggle) {
|
|
1842
|
+
this.opened = toggle;
|
|
1843
|
+
}
|
|
1844
|
+
onClick(event) {
|
|
1845
|
+
const checkOpener = this.opener &&
|
|
1846
|
+
(this.opener.contains && this.opener.contains(event.target)) ||
|
|
1847
|
+
(this.opener.nativeElement && this.opener.nativeElement.contains(event.target));
|
|
1848
|
+
if (this.opened &&
|
|
1849
|
+
!this.elementRef.nativeElement.contains(event.target) &&
|
|
1850
|
+
!checkOpener) {
|
|
1851
|
+
this.opened = false;
|
|
1852
|
+
this.onClose.emit();
|
|
1853
|
+
}
|
|
1854
|
+
return true;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
SidePanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SidePanelComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1858
|
+
SidePanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: SidePanelComponent, selector: "ode-side-panel", inputs: { toggle: "toggle", opener: "opener" }, outputs: { onClose: "onClose" }, host: { listeners: { "document:click": "onClick($event)" } }, usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"{ opened: opened }\">\n <ng-content></ng-content>\n</div>\n", styles: ["div{position:fixed;z-index:10;overflow-x:hidden;overflow-y:scroll;top:0;left:-30%;width:30%;transition:transform .25s}div.opened{transform:translate(100%)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1859
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SidePanelComponent, decorators: [{
|
|
1860
|
+
type: Component,
|
|
1861
|
+
args: [{ selector: 'ode-side-panel', host: {
|
|
1862
|
+
'(document:click)': 'onClick($event)',
|
|
1863
|
+
}, template: "<div [ngClass]=\"{ opened: opened }\">\n <ng-content></ng-content>\n</div>\n", styles: ["div{position:fixed;z-index:10;overflow-x:hidden;overflow-y:scroll;top:0;left:-30%;width:30%;transition:transform .25s}div.opened{transform:translate(100%)}\n"] }]
|
|
1864
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { toggle: [{
|
|
1865
|
+
type: Input
|
|
1866
|
+
}], opener: [{
|
|
1867
|
+
type: Input
|
|
1868
|
+
}], onClose: [{
|
|
1869
|
+
type: Output
|
|
1870
|
+
}] } });
|
|
1871
|
+
|
|
1872
|
+
class SpinnerCubeComponent extends OdeComponent {
|
|
1873
|
+
constructor(injector, spinner) {
|
|
1874
|
+
super(injector);
|
|
1875
|
+
this.spinner = spinner;
|
|
1876
|
+
}
|
|
1877
|
+
set loadingProp(prop) {
|
|
1878
|
+
this._loadingProp = prop;
|
|
1879
|
+
}
|
|
1880
|
+
get loadingProp() { return this._loadingProp; }
|
|
1881
|
+
ngOnInit() {
|
|
1882
|
+
super.ngOnInit();
|
|
1883
|
+
this.subscriptions.add(this.spinner.trigger.subscribe(() => {
|
|
1884
|
+
this.changeDetector.markForCheck();
|
|
1885
|
+
}));
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
SpinnerCubeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SpinnerCubeComponent, deps: [{ token: i0.Injector }, { token: SpinnerService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1889
|
+
SpinnerCubeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: SpinnerCubeComponent, selector: "ode-spinner-cube", inputs: { loadingProp: ["waitingFor", "loadingProp"] }, usesInheritance: true, ngImport: i0, template: "<div class=\"spinner-wrapper\" *ngIf=\"spinner.isLoading(loadingProp)\">\n <div class=\"spinner-cube\">\n <div class=\"sk-cube sk-cube1\"></div>\n <div class=\"sk-cube sk-cube2\"></div>\n <div class=\"sk-cube sk-cube3\"></div>\n <div class=\"sk-cube sk-cube4\"></div>\n <div class=\"sk-cube sk-cube5\"></div>\n <div class=\"sk-cube sk-cube6\"></div>\n <div class=\"sk-cube sk-cube7\"></div>\n <div class=\"sk-cube sk-cube8\"></div>\n <div class=\"sk-cube sk-cube9\"></div>\n </div>\n</div>\n", styles: ["div.spinner-wrapper{position:fixed;width:100%;height:100%;pointer-events:all;display:flex;justify-content:center;align-items:center}div.spinner-cube{width:20vh;height:20vh}div.sk-cube{width:33%;height:33%;float:left;animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out}div.sk-cube1{animation-delay:.2s}div.sk-cube2{animation-delay:.3s}div.sk-cube3{animation-delay:.4s}div.sk-cube4{animation-delay:.1s}div.sk-cube5{animation-delay:.2s}div.sk-cube6{animation-delay:.3s}div.sk-cube7{animation-delay:0s}div.sk-cube8{animation-delay:.1s}div.sk-cube9{animation-delay:.2s}@keyframes sk-cubeGridScaleDelay{0%,70%,to{transform:scaleZ(1)}35%{transform:scale3D(0,0,1)}}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1890
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SpinnerCubeComponent, decorators: [{
|
|
1891
|
+
type: Component,
|
|
1892
|
+
args: [{ selector: 'ode-spinner-cube', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"spinner-wrapper\" *ngIf=\"spinner.isLoading(loadingProp)\">\n <div class=\"spinner-cube\">\n <div class=\"sk-cube sk-cube1\"></div>\n <div class=\"sk-cube sk-cube2\"></div>\n <div class=\"sk-cube sk-cube3\"></div>\n <div class=\"sk-cube sk-cube4\"></div>\n <div class=\"sk-cube sk-cube5\"></div>\n <div class=\"sk-cube sk-cube6\"></div>\n <div class=\"sk-cube sk-cube7\"></div>\n <div class=\"sk-cube sk-cube8\"></div>\n <div class=\"sk-cube sk-cube9\"></div>\n </div>\n</div>\n", styles: ["div.spinner-wrapper{position:fixed;width:100%;height:100%;pointer-events:all;display:flex;justify-content:center;align-items:center}div.spinner-cube{width:20vh;height:20vh}div.sk-cube{width:33%;height:33%;float:left;animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out}div.sk-cube1{animation-delay:.2s}div.sk-cube2{animation-delay:.3s}div.sk-cube3{animation-delay:.4s}div.sk-cube4{animation-delay:.1s}div.sk-cube5{animation-delay:.2s}div.sk-cube6{animation-delay:.3s}div.sk-cube7{animation-delay:0s}div.sk-cube8{animation-delay:.1s}div.sk-cube9{animation-delay:.2s}@keyframes sk-cubeGridScaleDelay{0%,70%,to{transform:scaleZ(1)}35%{transform:scale3D(0,0,1)}}\n"] }]
|
|
1893
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: SpinnerService }]; }, propDecorators: { loadingProp: [{
|
|
1894
|
+
type: Input,
|
|
1895
|
+
args: ['waitingFor']
|
|
1896
|
+
}] } });
|
|
1897
|
+
|
|
1898
|
+
class PagerComponent extends OdeComponent {
|
|
1899
|
+
constructor(injector, bundles) {
|
|
1900
|
+
super(injector);
|
|
1901
|
+
this.bundles = bundles;
|
|
1902
|
+
this.offsetChange = new EventEmitter();
|
|
1903
|
+
this.translate = (...args) => this.bundles.translate(...args);
|
|
1904
|
+
}
|
|
1905
|
+
ngOnInit() { }
|
|
1906
|
+
previousPage() {
|
|
1907
|
+
if (this.offset - this.limit >= 0) {
|
|
1908
|
+
this.offset = this.offset - this.limit;
|
|
1909
|
+
}
|
|
1910
|
+
else {
|
|
1911
|
+
this.offset = 0;
|
|
1912
|
+
}
|
|
1913
|
+
this.offsetChange.emit(this.offset);
|
|
1914
|
+
}
|
|
1915
|
+
nextPage() {
|
|
1916
|
+
if (this.offset + this.limit <= this.total) {
|
|
1917
|
+
this.offset = this.offset + this.limit;
|
|
1918
|
+
}
|
|
1919
|
+
this.offsetChange.emit(this.offset);
|
|
1920
|
+
}
|
|
1921
|
+
offsetLimit() {
|
|
1922
|
+
return this.offset + this.limit < this.total ?
|
|
1923
|
+
this.offset + this.limit : this.total;
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
PagerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PagerComponent, deps: [{ token: i0.Injector }, { token: i2$1.BundlesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1927
|
+
PagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: PagerComponent, selector: "ode-pager", inputs: { limit: "limit", offset: "offset", total: "total" }, outputs: { offsetChange: "offsetChange" }, usesInheritance: true, ngImport: i0, template: "<strong><s5l>pager.page</s5l></strong>\n<a class=\"button\" [ngClass]=\"{'is-hidden': offset - limit < 0}\" (click)=\"previousPage()\">\n <i class=\"fa fa-chevron-left\"></i> <s5l>pager.page.previous</s5l>\n</a>\n<span>{{\"pager.position\" | translate : {offset : offset+1, offsetLimit:offsetLimit(), total:total} }}</span>\n<a class=\"button\" [ngClass]=\"{'is-hidden': offset + limit > total}\" (click)=\"nextPage()\">\n <s5l>pager.page.next</s5l> <i class=\"fa fa-chevron-right\"></i>\n</a>\n", styles: ["i{cursor:pointer;padding:0 2px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1928
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: PagerComponent, decorators: [{
|
|
1929
|
+
type: Component,
|
|
1930
|
+
args: [{ selector: 'ode-pager', changeDetection: ChangeDetectionStrategy.OnPush, template: "<strong><s5l>pager.page</s5l></strong>\n<a class=\"button\" [ngClass]=\"{'is-hidden': offset - limit < 0}\" (click)=\"previousPage()\">\n <i class=\"fa fa-chevron-left\"></i> <s5l>pager.page.previous</s5l>\n</a>\n<span>{{\"pager.position\" | translate : {offset : offset+1, offsetLimit:offsetLimit(), total:total} }}</span>\n<a class=\"button\" [ngClass]=\"{'is-hidden': offset + limit > total}\" (click)=\"nextPage()\">\n <s5l>pager.page.next</s5l> <i class=\"fa fa-chevron-right\"></i>\n</a>\n", styles: ["i{cursor:pointer;padding:0 2px}\n"] }]
|
|
1931
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i2$1.BundlesService }]; }, propDecorators: { limit: [{
|
|
1932
|
+
type: Input
|
|
1933
|
+
}], offset: [{
|
|
1934
|
+
type: Input
|
|
1935
|
+
}], offsetChange: [{
|
|
1936
|
+
type: Output
|
|
1937
|
+
}], total: [{
|
|
1938
|
+
type: Input
|
|
1939
|
+
}] } });
|
|
1940
|
+
|
|
1941
|
+
class TooltipComponent extends OdeComponent {
|
|
1942
|
+
constructor(injector, ref, renderer) {
|
|
1943
|
+
super(injector);
|
|
1944
|
+
this.ref = ref;
|
|
1945
|
+
this.renderer = renderer;
|
|
1946
|
+
this.position = 'bottom';
|
|
1947
|
+
this.offset = 5;
|
|
1948
|
+
this.onTransitionEnd = () => {
|
|
1949
|
+
if (this.tooltipElt && !this.tooltipElt.classList.contains('shown')) {
|
|
1950
|
+
this.tooltipElt.parentNode.removeChild(this.tooltipElt);
|
|
1951
|
+
this.tooltipElt = null;
|
|
1952
|
+
}
|
|
1953
|
+
};
|
|
1954
|
+
}
|
|
1955
|
+
onMouseEnter() {
|
|
1956
|
+
const r = this.renderer;
|
|
1957
|
+
if (!this.tooltipElt) {
|
|
1958
|
+
this.tooltipElt = this.renderer.createElement('div');
|
|
1959
|
+
let tooltipText = this.renderer.createText(this.tooltipContents);
|
|
1960
|
+
this.renderer.appendChild(this.tooltipElt, tooltipText);
|
|
1961
|
+
this.renderer.addClass(this.tooltipElt, "tooltip");
|
|
1962
|
+
this.renderer.appendChild(document.getElementsByTagName('body')[0], this.tooltipElt);
|
|
1963
|
+
}
|
|
1964
|
+
const tip = this.tooltipElt;
|
|
1965
|
+
const pos = this.getPosition(this.ref.nativeElement, tip, this.position);
|
|
1966
|
+
for (const prop in pos) {
|
|
1967
|
+
this.renderer.setStyle(tip, prop, pos[prop] + 'px');
|
|
1968
|
+
}
|
|
1969
|
+
this.renderer.addClass(tip, 'shown');
|
|
1970
|
+
}
|
|
1971
|
+
onMouseLeave() {
|
|
1972
|
+
const wait = this.tooltipElt &&
|
|
1973
|
+
parseFloat(window.getComputedStyle(this.tooltipElt)['transition-duration']);
|
|
1974
|
+
this.renderer.removeClass(this.tooltipElt, 'shown');
|
|
1975
|
+
setTimeout(this.onTransitionEnd, wait * 1000);
|
|
1976
|
+
}
|
|
1977
|
+
getPosition(elt, tip, pos) {
|
|
1978
|
+
const rect = {
|
|
1979
|
+
top: elt.getBoundingClientRect().top + window.scrollY,
|
|
1980
|
+
left: elt.getBoundingClientRect().left + window.scrollX
|
|
1981
|
+
};
|
|
1982
|
+
let left, top;
|
|
1983
|
+
switch (pos) {
|
|
1984
|
+
case 'top':
|
|
1985
|
+
top = rect.top - tip.offsetHeight - this.offset;
|
|
1986
|
+
left = rect.left + elt.offsetWidth / 2 - tip.offsetWidth / 2;
|
|
1987
|
+
break;
|
|
1988
|
+
case 'left':
|
|
1989
|
+
top = rect.top + elt.offsetHeight / 2 - tip.offsetHeight / 2;
|
|
1990
|
+
left = rect.left - tip.offsetWidth - this.offset;
|
|
1991
|
+
break;
|
|
1992
|
+
case 'right':
|
|
1993
|
+
top = rect.top + elt.offsetHeight / 2 - tip.offsetHeight / 2;
|
|
1994
|
+
left = rect.left + elt.offsetWidth + this.offset;
|
|
1995
|
+
break;
|
|
1996
|
+
case 'bottom':
|
|
1997
|
+
default:
|
|
1998
|
+
top = rect.top + elt.offsetHeight + this.offset;
|
|
1999
|
+
left = rect.left + elt.offsetWidth / 2 - tip.offsetWidth / 2;
|
|
2000
|
+
}
|
|
2001
|
+
if (left < 0) {
|
|
2002
|
+
left = rect.left + elt.offsetWidth + this.offset;
|
|
2003
|
+
}
|
|
2004
|
+
if (top < 0) {
|
|
2005
|
+
top = rect.top + elt.offsetHeight + this.offset;
|
|
2006
|
+
}
|
|
2007
|
+
if (left + tip.offsetWidth >= window.pageXOffset + window.innerWidth) {
|
|
2008
|
+
left = rect.left - tip.offsetWidth - this.offset;
|
|
2009
|
+
}
|
|
2010
|
+
if (top - tip.offsetHeight >= window.pageYOffset + window.innerHeight) {
|
|
2011
|
+
top = rect.top - tip.offsetHeight - this.offset;
|
|
2012
|
+
}
|
|
2013
|
+
return {
|
|
2014
|
+
top: top < 5 ? 5 : top,
|
|
2015
|
+
left: left < 5 ? 5 : left
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
ngOnDestroy() {
|
|
2019
|
+
if (this.tooltipElt) {
|
|
2020
|
+
this.tooltipElt.parentNode.removeChild(this.tooltipElt);
|
|
2021
|
+
this.tooltipElt = null;
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2026
|
+
TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: TooltipComponent, selector: "[tooltip]", inputs: { tooltipContents: ["tooltip", "tooltipContents"], position: "position", offset: "offset" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: ["body>div.tooltip{position:absolute;z-index:100}\n"] });
|
|
2027
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
2028
|
+
type: Component,
|
|
2029
|
+
args: [{ selector: '[tooltip]', template: `<ng-content></ng-content>`, host: {
|
|
2030
|
+
'(mouseenter)': 'onMouseEnter()',
|
|
2031
|
+
'(mouseleave)': 'onMouseLeave()'
|
|
2032
|
+
}, styles: ["body>div.tooltip{position:absolute;z-index:100}\n"] }]
|
|
2033
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { tooltipContents: [{
|
|
2034
|
+
type: Input,
|
|
2035
|
+
args: ['tooltip']
|
|
2036
|
+
}], position: [{
|
|
2037
|
+
type: Input
|
|
2038
|
+
}], offset: [{
|
|
2039
|
+
type: Input
|
|
2040
|
+
}] } });
|
|
2041
|
+
|
|
2042
|
+
class DragAndDropFilesDirective {
|
|
2043
|
+
constructor(inputFileService) {
|
|
2044
|
+
this.inputFileService = inputFileService;
|
|
2045
|
+
this.allowedExtensions = [];
|
|
2046
|
+
this.maxFilesNumber = 1;
|
|
2047
|
+
this.dragAndDrop = new EventEmitter();
|
|
2048
|
+
this.invalidDragAndDrop = new EventEmitter();
|
|
2049
|
+
this.backgroundColor = '#fafafa';
|
|
2050
|
+
this.borderColor = '#ddd';
|
|
2051
|
+
}
|
|
2052
|
+
onDragOver(evt) {
|
|
2053
|
+
if (!this.disabled) {
|
|
2054
|
+
evt.preventDefault();
|
|
2055
|
+
evt.stopPropagation();
|
|
2056
|
+
this.highlightColors();
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
onDragLeave(evt) {
|
|
2060
|
+
if (!this.disabled) {
|
|
2061
|
+
evt.preventDefault();
|
|
2062
|
+
evt.stopPropagation();
|
|
2063
|
+
this.resetColors();
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
onDrop(event) {
|
|
2067
|
+
if (!this.disabled) {
|
|
2068
|
+
event.preventDefault();
|
|
2069
|
+
event.stopPropagation();
|
|
2070
|
+
if (event.dataTransfer) {
|
|
2071
|
+
this.inputFileService
|
|
2072
|
+
.validateFiles(event.dataTransfer.files, this.maxFilesNumber, this.allowedExtensions)
|
|
2073
|
+
.subscribe(files => this.dragAndDrop.emit(files), error => this.invalidDragAndDrop.emit(error));
|
|
2074
|
+
}
|
|
2075
|
+
this.resetColors();
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
resetColors() {
|
|
2079
|
+
this.backgroundColor = '#fafafa';
|
|
2080
|
+
this.borderColor = '#ddd';
|
|
2081
|
+
}
|
|
2082
|
+
highlightColors() {
|
|
2083
|
+
this.backgroundColor = '#ffd1b6';
|
|
2084
|
+
this.borderColor = '#ff8352';
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
DragAndDropFilesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DragAndDropFilesDirective, deps: [{ token: InputFileService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2088
|
+
DragAndDropFilesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: DragAndDropFilesDirective, selector: "[dragAndDropFiles]", inputs: { allowedExtensions: "allowedExtensions", maxFilesNumber: "maxFilesNumber", disabled: "disabled" }, outputs: { dragAndDrop: "dragAndDrop", invalidDragAndDrop: "invalidDragAndDrop" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "style.background": "this.backgroundColor", "style.border-color": "this.borderColor" } }, ngImport: i0 });
|
|
2089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DragAndDropFilesDirective, decorators: [{
|
|
2090
|
+
type: Directive,
|
|
2091
|
+
args: [{
|
|
2092
|
+
selector: '[dragAndDropFiles]'
|
|
2093
|
+
}]
|
|
2094
|
+
}], ctorParameters: function () { return [{ type: InputFileService }]; }, propDecorators: { allowedExtensions: [{
|
|
2095
|
+
type: Input
|
|
2096
|
+
}], maxFilesNumber: [{
|
|
2097
|
+
type: Input
|
|
2098
|
+
}], disabled: [{
|
|
2099
|
+
type: Input
|
|
2100
|
+
}], dragAndDrop: [{
|
|
2101
|
+
type: Output
|
|
2102
|
+
}], invalidDragAndDrop: [{
|
|
2103
|
+
type: Output
|
|
2104
|
+
}], backgroundColor: [{
|
|
2105
|
+
type: HostBinding,
|
|
2106
|
+
args: ['style.background']
|
|
2107
|
+
}], borderColor: [{
|
|
2108
|
+
type: HostBinding,
|
|
2109
|
+
args: ['style.border-color']
|
|
2110
|
+
}], onDragOver: [{
|
|
2111
|
+
type: HostListener,
|
|
2112
|
+
args: ['dragover', ['$event']]
|
|
2113
|
+
}], onDragLeave: [{
|
|
2114
|
+
type: HostListener,
|
|
2115
|
+
args: ['dragleave', ['$event']]
|
|
2116
|
+
}], onDrop: [{
|
|
2117
|
+
type: HostListener,
|
|
2118
|
+
args: ['drop', ['$event']]
|
|
2119
|
+
}] } });
|
|
2120
|
+
|
|
2121
|
+
class UploadFilesComponent extends OdeComponent {
|
|
2122
|
+
constructor(injector, inputFileService) {
|
|
2123
|
+
super(injector);
|
|
2124
|
+
this.inputFileService = inputFileService;
|
|
2125
|
+
this.upload = new EventEmitter();
|
|
2126
|
+
this.invalidUpload = new EventEmitter();
|
|
2127
|
+
}
|
|
2128
|
+
ngOnInit() {
|
|
2129
|
+
super.ngOnInit();
|
|
2130
|
+
this.multiple = this.maxFilesNumber > 1;
|
|
2131
|
+
}
|
|
2132
|
+
onChange($event) {
|
|
2133
|
+
if ($event.target) {
|
|
2134
|
+
this.inputFileService
|
|
2135
|
+
.validateFiles($event.target.files, this.maxFilesNumber, this.allowedExtensions)
|
|
2136
|
+
.subscribe(files => this.upload.emit(files), error => this.invalidUpload.emit(error));
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
onClickDropzoneInput($event) {
|
|
2140
|
+
$event.stopPropagation();
|
|
2141
|
+
const inputFileElement = this.inputFileRef.nativeElement;
|
|
2142
|
+
inputFileElement.click();
|
|
2143
|
+
}
|
|
2144
|
+
onDragAndDrop($event) {
|
|
2145
|
+
this.upload.emit($event);
|
|
2146
|
+
}
|
|
2147
|
+
onInvalidDragAndDrop($event) {
|
|
2148
|
+
this.invalidUpload.emit($event);
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
UploadFilesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: UploadFilesComponent, deps: [{ token: i0.Injector }, { token: InputFileService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2152
|
+
UploadFilesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: UploadFilesComponent, selector: "ode-upload-files", inputs: { fileSrc: "fileSrc", allowedExtensions: "allowedExtensions", maxFilesNumber: "maxFilesNumber", disabled: "disabled" }, outputs: { upload: "upload", invalidUpload: "invalidUpload" }, viewQueries: [{ propertyName: "inputFileRef", first: true, predicate: ["inputFileRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"upload-files-dropzone\"\n dragAndDropFiles\n [allowedExtensions]=\"allowedExtensions\"\n [maxFilesNumber]=\"maxFilesNumber\"\n [disabled]=\"disabled\"\n (dragAndDrop)=\"onDragAndDrop($event)\"\n (invalidDragAndDrop)=\"onInvalidDragAndDrop($event)\">\n <div *ngIf=\"fileSrc\" class=\"upload-files-dropzone-image\">\n <img src=\"{{ fileSrc }}\"\n *ngIf=\"inputFileService.isSrcExternalUrl(fileSrc)\"\n class=\"upload-files-dropzone-image__image\"/>\n <img src=\"{{ fileSrc }}\"\n *ngIf=\"inputFileService.isSrcWorkspace(fileSrc)\"\n class=\"upload-files-dropzone-image__image\"/>\n <i class=\"upload-files-dropzone-image__icon {{ fileSrc }}\"\n *ngIf=\"!inputFileService.isSrcExternalUrl(fileSrc)\n && !inputFileService.isSrcWorkspace(fileSrc)\"></i>\n </div>\n\n <div class=\"upload-files-dropzone-input\" *ngIf=\"!disabled\">\n <button class=\"confirm upload-files-dropzone-input__button\"\n (click)=\"onClickDropzoneInput($event)\">\n <s5l>ux.upload-files.button.label</s5l>\n </button>\n <i class=\"upload-files-dropzone-input__icon fa fa-cloud-upload fa-2x\">\n </i>\n <span class=\"upload-files-dropzone-input__help\">\n <s5l>ux.upload-files.button.help</s5l>\n </span>\n <input *ngIf=\"multiple === true else singleFileInput\"\n class=\"upload-files-dropzone-input__input\"\n type=\"file\"\n (change)=\"onChange($event)\"\n multiple\n #inputFileRef>\n <ng-template #singleFileInput>\n <input class=\"upload-files-dropzone-input__input\"\n type=\"file\"\n (change)=\"onChange($event)\"\n #inputFileRef>\n </ng-template>\n </div>\n</div>\n", styles: [".upload-files-dropzone{display:flex;align-items:center;justify-content:center;min-height:150px;margin:20px;padding:20px 10px;background-color:#fafafa;border:2px dashed #ddd;border-radius:5px}.upload-files-dropzone-image{display:flex;align-items:center;justify-content:center;width:120px;height:120px}.upload-files-dropzone-image__image{max-height:90%;max-width:90%}.upload-files-dropzone-image__icon{font-size:5em}.upload-files-dropzone-input{display:flex;align-items:center;background-color:#fff;border-radius:5px;box-shadow:1px 1px 5px #0000004d;padding:10px;margin:0 40px 0 20px}.upload-files-dropzone-input__input{display:none}.upload-files-dropzone-input__icon{margin-left:10px}.upload-files-dropzone-input__help{margin-left:10px;font-style:italic}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }, { kind: "directive", type: DragAndDropFilesDirective, selector: "[dragAndDropFiles]", inputs: ["allowedExtensions", "maxFilesNumber", "disabled"], outputs: ["dragAndDrop", "invalidDragAndDrop"] }] });
|
|
2153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: UploadFilesComponent, decorators: [{
|
|
2154
|
+
type: Component,
|
|
2155
|
+
args: [{ selector: 'ode-upload-files', template: "<div class=\"upload-files-dropzone\"\n dragAndDropFiles\n [allowedExtensions]=\"allowedExtensions\"\n [maxFilesNumber]=\"maxFilesNumber\"\n [disabled]=\"disabled\"\n (dragAndDrop)=\"onDragAndDrop($event)\"\n (invalidDragAndDrop)=\"onInvalidDragAndDrop($event)\">\n <div *ngIf=\"fileSrc\" class=\"upload-files-dropzone-image\">\n <img src=\"{{ fileSrc }}\"\n *ngIf=\"inputFileService.isSrcExternalUrl(fileSrc)\"\n class=\"upload-files-dropzone-image__image\"/>\n <img src=\"{{ fileSrc }}\"\n *ngIf=\"inputFileService.isSrcWorkspace(fileSrc)\"\n class=\"upload-files-dropzone-image__image\"/>\n <i class=\"upload-files-dropzone-image__icon {{ fileSrc }}\"\n *ngIf=\"!inputFileService.isSrcExternalUrl(fileSrc)\n && !inputFileService.isSrcWorkspace(fileSrc)\"></i>\n </div>\n\n <div class=\"upload-files-dropzone-input\" *ngIf=\"!disabled\">\n <button class=\"confirm upload-files-dropzone-input__button\"\n (click)=\"onClickDropzoneInput($event)\">\n <s5l>ux.upload-files.button.label</s5l>\n </button>\n <i class=\"upload-files-dropzone-input__icon fa fa-cloud-upload fa-2x\">\n </i>\n <span class=\"upload-files-dropzone-input__help\">\n <s5l>ux.upload-files.button.help</s5l>\n </span>\n <input *ngIf=\"multiple === true else singleFileInput\"\n class=\"upload-files-dropzone-input__input\"\n type=\"file\"\n (change)=\"onChange($event)\"\n multiple\n #inputFileRef>\n <ng-template #singleFileInput>\n <input class=\"upload-files-dropzone-input__input\"\n type=\"file\"\n (change)=\"onChange($event)\"\n #inputFileRef>\n </ng-template>\n </div>\n</div>\n", styles: [".upload-files-dropzone{display:flex;align-items:center;justify-content:center;min-height:150px;margin:20px;padding:20px 10px;background-color:#fafafa;border:2px dashed #ddd;border-radius:5px}.upload-files-dropzone-image{display:flex;align-items:center;justify-content:center;width:120px;height:120px}.upload-files-dropzone-image__image{max-height:90%;max-width:90%}.upload-files-dropzone-image__icon{font-size:5em}.upload-files-dropzone-input{display:flex;align-items:center;background-color:#fff;border-radius:5px;box-shadow:1px 1px 5px #0000004d;padding:10px;margin:0 40px 0 20px}.upload-files-dropzone-input__input{display:none}.upload-files-dropzone-input__icon{margin-left:10px}.upload-files-dropzone-input__help{margin-left:10px;font-style:italic}\n"] }]
|
|
2156
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: InputFileService }]; }, propDecorators: { fileSrc: [{
|
|
2157
|
+
type: Input
|
|
2158
|
+
}], allowedExtensions: [{
|
|
2159
|
+
type: Input
|
|
2160
|
+
}], maxFilesNumber: [{
|
|
2161
|
+
type: Input
|
|
2162
|
+
}], disabled: [{
|
|
2163
|
+
type: Input
|
|
2164
|
+
}], upload: [{
|
|
2165
|
+
type: Output
|
|
2166
|
+
}], invalidUpload: [{
|
|
2167
|
+
type: Output
|
|
2168
|
+
}], inputFileRef: [{
|
|
2169
|
+
type: ViewChild,
|
|
2170
|
+
args: ['inputFileRef']
|
|
2171
|
+
}] } });
|
|
2172
|
+
|
|
2173
|
+
class SimpleSelectComponent extends OdeComponent {
|
|
2174
|
+
constructor(injector) {
|
|
2175
|
+
super(injector);
|
|
2176
|
+
this.selectChange = new EventEmitter();
|
|
2177
|
+
}
|
|
2178
|
+
}
|
|
2179
|
+
SimpleSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SimpleSelectComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2180
|
+
SimpleSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: SimpleSelectComponent, selector: "ode-simple-select", inputs: { selected: "selected", model: "model", options: "options", ignoreOption: "ignoreOption" }, outputs: { selectChange: "selectChange" }, usesInheritance: true, ngImport: i0, template: "<select [ngModel]=\"model[selected]\" (ngModelChange)=\"model[selected] = $event; selectChange.emit($event)\">\n\n<option *ngIf=\"ignoreOption.length > 0 \" [ngValue]=\"ignoreOption[0].value\">\n {{ignoreOption[0].label}}\n</option>\n<option *ngFor=\"let option of options | orderBy: 'label'\" [ngValue]=\"option.value\">\n {{option.label}}\n</option>\n</select>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: OrderPipe, name: "orderBy" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SimpleSelectComponent, decorators: [{
|
|
2182
|
+
type: Component,
|
|
2183
|
+
args: [{ selector: 'ode-simple-select', changeDetection: ChangeDetectionStrategy.OnPush, template: "<select [ngModel]=\"model[selected]\" (ngModelChange)=\"model[selected] = $event; selectChange.emit($event)\">\n\n<option *ngIf=\"ignoreOption.length > 0 \" [ngValue]=\"ignoreOption[0].value\">\n {{ignoreOption[0].label}}\n</option>\n<option *ngFor=\"let option of options | orderBy: 'label'\" [ngValue]=\"option.value\">\n {{option.label}}\n</option>\n</select>\n" }]
|
|
2184
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { selected: [{
|
|
2185
|
+
type: Input
|
|
2186
|
+
}], model: [{
|
|
2187
|
+
type: Input
|
|
2188
|
+
}], options: [{
|
|
2189
|
+
type: Input
|
|
2190
|
+
}], ignoreOption: [{
|
|
2191
|
+
type: Input
|
|
2192
|
+
}], selectChange: [{
|
|
2193
|
+
type: Output
|
|
2194
|
+
}] } });
|
|
2195
|
+
|
|
2196
|
+
class StepComponent {
|
|
2197
|
+
constructor() {
|
|
2198
|
+
this.hasError = false;
|
|
2199
|
+
this.isFinished = false;
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
StepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: StepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2203
|
+
StepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: StepComponent, selector: "ode-step", inputs: { name: "name", isActived: "isActived" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, styles: [":host{display:none;overflow:auto;padding:1em}:host.active{display:block}\n"] });
|
|
2204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: StepComponent, decorators: [{
|
|
2205
|
+
type: Component,
|
|
2206
|
+
args: [{ selector: 'ode-step', template: `<ng-content></ng-content>`, styles: [":host{display:none;overflow:auto;padding:1em}:host.active{display:block}\n"] }]
|
|
2207
|
+
}], propDecorators: { name: [{
|
|
2208
|
+
type: Input
|
|
2209
|
+
}], isActived: [{
|
|
2210
|
+
type: Input
|
|
2211
|
+
}] } });
|
|
2212
|
+
class WizardComponent extends OdeComponent {
|
|
2213
|
+
constructor(injector) {
|
|
2214
|
+
super(injector);
|
|
2215
|
+
this.cancel = new EventEmitter();
|
|
2216
|
+
this.previousStep = new EventEmitter();
|
|
2217
|
+
this.nextStep = new EventEmitter();
|
|
2218
|
+
this.canDoNext = true;
|
|
2219
|
+
this.activeStep = 0;
|
|
2220
|
+
}
|
|
2221
|
+
doCancel() {
|
|
2222
|
+
this.activeStep = 0;
|
|
2223
|
+
this.steps.forEach((step, index) => {
|
|
2224
|
+
index === 0 ? step.isActived = true : step.isActived = false;
|
|
2225
|
+
});
|
|
2226
|
+
this.canDoNext = true;
|
|
2227
|
+
}
|
|
2228
|
+
onPreviousStep() {
|
|
2229
|
+
this.previousStep.emit(this.activeStep);
|
|
2230
|
+
}
|
|
2231
|
+
doPreviousStep() {
|
|
2232
|
+
if (this.activeStep > 0) {
|
|
2233
|
+
this.steps.toArray()[this.activeStep].isActived = false;
|
|
2234
|
+
this.steps.toArray()[this.activeStep - 1].isActived = true;
|
|
2235
|
+
this.activeStep--;
|
|
2236
|
+
this.canDoNext = true;
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
onNextStep() {
|
|
2240
|
+
this.nextStep.emit(this.activeStep);
|
|
2241
|
+
}
|
|
2242
|
+
doNextStep(error) {
|
|
2243
|
+
if (this.activeStep < this.steps.length - 1) {
|
|
2244
|
+
this.canDoNext = !error;
|
|
2245
|
+
this.steps.toArray()[this.activeStep].isActived = false;
|
|
2246
|
+
this.steps.toArray()[this.activeStep + 1].isActived = true;
|
|
2247
|
+
this.activeStep++;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
ngAfterContentInit() {
|
|
2251
|
+
super.ngAfterContentInit();
|
|
2252
|
+
if (this.steps.length === 0) {
|
|
2253
|
+
throw new Error('<wizard> component musts nest at least 1 <step> compoent');
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
WizardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: WizardComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2258
|
+
WizardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: WizardComponent, selector: "ode-wizard", outputs: { cancel: "cancel", previousStep: "previousStep", nextStep: "nextStep" }, queries: [{ propertyName: "steps", predicate: StepComponent }], usesInheritance: true, ngImport: i0, template: `
|
|
2259
|
+
<div class="wizard">
|
|
2260
|
+
<nav class="wizard-menu">
|
|
2261
|
+
<h2 class="wizard-menu__title"><s5l>wizard.steps</s5l></h2>
|
|
2262
|
+
<ul>
|
|
2263
|
+
<li *ngFor="let step of steps"
|
|
2264
|
+
[class.active]="step.isActived"
|
|
2265
|
+
[class.finish]="step.isFinished">
|
|
2266
|
+
{{step.name}}
|
|
2267
|
+
</li>
|
|
2268
|
+
</ul>
|
|
2269
|
+
</nav>
|
|
2270
|
+
<section class="wizard-content">
|
|
2271
|
+
<ng-content select="ode-step"></ng-content>
|
|
2272
|
+
<nav class="wizard-content-nav" *ngIf="activeStep < steps.length - 1">
|
|
2273
|
+
<button class="wizard-content-nav__button cancel"
|
|
2274
|
+
(click)="cancel.emit()"
|
|
2275
|
+
[title]="'cancel' | translate">
|
|
2276
|
+
{{ 'cancel' | translate }}
|
|
2277
|
+
</button>
|
|
2278
|
+
<button class="wizard-content-nav__button previous"
|
|
2279
|
+
(click)="onPreviousStep()"
|
|
2280
|
+
*ngIf="activeStep > 0"
|
|
2281
|
+
[title]="'previous' | translate">
|
|
2282
|
+
{{ 'wizard.previous' | translate }}
|
|
2283
|
+
</button>
|
|
2284
|
+
<button class="wizard-content-nav__button wizard-content-nav__button--next"
|
|
2285
|
+
(click)="onNextStep()"
|
|
2286
|
+
[disabled]="!canDoNext"
|
|
2287
|
+
[title]="'next' | translate">
|
|
2288
|
+
{{ 'wizard.next' | translate }}
|
|
2289
|
+
</button>
|
|
2290
|
+
</nav>
|
|
2291
|
+
</section>
|
|
2292
|
+
</div>
|
|
2293
|
+
`, isInline: true, styles: [".wizard{display:flex}.wizard-menu{background:#5b6472;flex:0 0 240px}.wizard-menu ul{padding:10px 30px}.wizard-menu ul li{color:#eaedf2;list-style-type:none;padding:5px 0}.wizard-menu ul li.active,.wizard-menu ul li.finish{font-weight:700;color:#fff}.wizard-menu ul li.finish{color:green}.wizard-menu__title{font-weight:700;font-size:1.2em;color:#fff;padding:25px 0 0 10px}.wizard-content{background:#fff;flex:auto}.wizard-content-nav{text-align:right}.wizard-content-nav__button{margin:10px 0}.wizard-content-nav__button--next{margin-right:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }, { kind: "pipe", type: i2$1.TranslatePipe, name: "translate" }] });
|
|
2294
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: WizardComponent, decorators: [{
|
|
2295
|
+
type: Component,
|
|
2296
|
+
args: [{ selector: 'ode-wizard', template: `
|
|
2297
|
+
<div class="wizard">
|
|
2298
|
+
<nav class="wizard-menu">
|
|
2299
|
+
<h2 class="wizard-menu__title"><s5l>wizard.steps</s5l></h2>
|
|
2300
|
+
<ul>
|
|
2301
|
+
<li *ngFor="let step of steps"
|
|
2302
|
+
[class.active]="step.isActived"
|
|
2303
|
+
[class.finish]="step.isFinished">
|
|
2304
|
+
{{step.name}}
|
|
2305
|
+
</li>
|
|
2306
|
+
</ul>
|
|
2307
|
+
</nav>
|
|
2308
|
+
<section class="wizard-content">
|
|
2309
|
+
<ng-content select="ode-step"></ng-content>
|
|
2310
|
+
<nav class="wizard-content-nav" *ngIf="activeStep < steps.length - 1">
|
|
2311
|
+
<button class="wizard-content-nav__button cancel"
|
|
2312
|
+
(click)="cancel.emit()"
|
|
2313
|
+
[title]="'cancel' | translate">
|
|
2314
|
+
{{ 'cancel' | translate }}
|
|
2315
|
+
</button>
|
|
2316
|
+
<button class="wizard-content-nav__button previous"
|
|
2317
|
+
(click)="onPreviousStep()"
|
|
2318
|
+
*ngIf="activeStep > 0"
|
|
2319
|
+
[title]="'previous' | translate">
|
|
2320
|
+
{{ 'wizard.previous' | translate }}
|
|
2321
|
+
</button>
|
|
2322
|
+
<button class="wizard-content-nav__button wizard-content-nav__button--next"
|
|
2323
|
+
(click)="onNextStep()"
|
|
2324
|
+
[disabled]="!canDoNext"
|
|
2325
|
+
[title]="'next' | translate">
|
|
2326
|
+
{{ 'wizard.next' | translate }}
|
|
2327
|
+
</button>
|
|
2328
|
+
</nav>
|
|
2329
|
+
</section>
|
|
2330
|
+
</div>
|
|
2331
|
+
`, styles: [".wizard{display:flex}.wizard-menu{background:#5b6472;flex:0 0 240px}.wizard-menu ul{padding:10px 30px}.wizard-menu ul li{color:#eaedf2;list-style-type:none;padding:5px 0}.wizard-menu ul li.active,.wizard-menu ul li.finish{font-weight:700;color:#fff}.wizard-menu ul li.finish{color:green}.wizard-menu__title{font-weight:700;font-size:1.2em;color:#fff;padding:25px 0 0 10px}.wizard-content{background:#fff;flex:auto}.wizard-content-nav{text-align:right}.wizard-content-nav__button{margin:10px 0}.wizard-content-nav__button--next{margin-right:16px}\n"] }]
|
|
2332
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { cancel: [{
|
|
2333
|
+
type: Output
|
|
2334
|
+
}], previousStep: [{
|
|
2335
|
+
type: Output
|
|
2336
|
+
}], nextStep: [{
|
|
2337
|
+
type: Output
|
|
2338
|
+
}], steps: [{
|
|
2339
|
+
type: ContentChildren,
|
|
2340
|
+
args: [StepComponent]
|
|
2341
|
+
}] } });
|
|
2342
|
+
|
|
2343
|
+
/**
|
|
2344
|
+
* DropdownComponent is an alternative to the MonoSelectComponent.
|
|
2345
|
+
* Accept everything inside <ng-content> but should work with <ode-list> component
|
|
2346
|
+
*
|
|
2347
|
+
* Simple Dropdown Component without search:
|
|
2348
|
+
* [isSearchActive] can be set to false to disable search input in <ode-list>
|
|
2349
|
+
```
|
|
2350
|
+
<ode-dropdown
|
|
2351
|
+
[name]="option_name"
|
|
2352
|
+
[isDropdownOpened]="a_boolean"
|
|
2353
|
+
(onDropdown)="toggle_func"
|
|
2354
|
+
>
|
|
2355
|
+
<ode-list
|
|
2356
|
+
[model]="model"
|
|
2357
|
+
[filters]="filters"
|
|
2358
|
+
(onSelect)="func_to_select_elem($event)"
|
|
2359
|
+
(inputChange)="a_string_for_input_value = $event"
|
|
2360
|
+
noResultsLabel="text_to_display"
|
|
2361
|
+
searchPlaceholder="default_placeholder_text"
|
|
2362
|
+
>
|
|
2363
|
+
<ng-template let-item>
|
|
2364
|
+
<div>{{ item.name }}</div>
|
|
2365
|
+
</ng-template>
|
|
2366
|
+
</ode-list>
|
|
2367
|
+
</ode-dropdown>
|
|
2368
|
+
`̀``
|
|
2369
|
+
*/
|
|
2370
|
+
class DropdownComponent extends OdeComponent {
|
|
2371
|
+
constructor(injector) {
|
|
2372
|
+
super(injector);
|
|
2373
|
+
this.name = '';
|
|
2374
|
+
this.isDropdownOpened = false;
|
|
2375
|
+
this.onDropdown = new EventEmitter();
|
|
2376
|
+
}
|
|
2377
|
+
ngOnInit() {
|
|
2378
|
+
super.ngOnInit();
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
DropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DropdownComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2382
|
+
DropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: DropdownComponent, selector: "ode-dropdown", inputs: { name: "name", isDropdownOpened: "isDropdownOpened" }, outputs: { onDropdown: "onDropdown" }, usesInheritance: true, ngImport: i0, template: "<div class=\"dropdown\" [ngClass]=\"isDropdownOpened ? 'open' : ''\">\n <button (click)=\"onDropdown.emit()\" class=\"dropdown-trigger\">\n <span class=\"cell-ellipsis\">{{ name }}</span> <i class=\"fonticon arrow-select\"></i>\n </button>\n <div class=\"dropdown-list\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".dropdown{position:relative;width:230px;box-sizing:border-box}.dropdown *{box-sizing:border-box}.dropdown-trigger{cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between;padding:12px 16px;font-size:14px;color:#4a4a4a;text-transform:uppercase;text-align:left;width:100%;border-radius:8px;border:1px solid #7a7a7a;background-color:#fff}.dropdown-trigger>span{display:inline-block;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dropdown-trigger i.arrow-select{display:inline-block;float:none!important;padding-left:0;transform:rotate(180deg);transform-origin:center center}.dropdown-trigger:hover{color:#4a4a4a;border-color:#7a7a7a;background-color:#fff}.dropdown-trigger:hover i.arrow-select{color:#4a4a4a!important}.dropdown-list{display:none;position:absolute;overflow:hidden;z-index:2;top:100%;left:0;right:0;width:316px;box-shadow:0 4px 12px #00000026;border-radius:8px;background-color:#fff}.dropdown::ng-deep ode-list li{justify-content:flex-start}.dropdown::ng-deep ode-list input[type=search]{padding:12px 16px}.dropdown.open .dropdown-list{display:block}.dropdown.open i.arrow-select{transform:rotate(0)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
2384
|
+
type: Component,
|
|
2385
|
+
args: [{ selector: 'ode-dropdown', template: "<div class=\"dropdown\" [ngClass]=\"isDropdownOpened ? 'open' : ''\">\n <button (click)=\"onDropdown.emit()\" class=\"dropdown-trigger\">\n <span class=\"cell-ellipsis\">{{ name }}</span> <i class=\"fonticon arrow-select\"></i>\n </button>\n <div class=\"dropdown-list\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".dropdown{position:relative;width:230px;box-sizing:border-box}.dropdown *{box-sizing:border-box}.dropdown-trigger{cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between;padding:12px 16px;font-size:14px;color:#4a4a4a;text-transform:uppercase;text-align:left;width:100%;border-radius:8px;border:1px solid #7a7a7a;background-color:#fff}.dropdown-trigger>span{display:inline-block;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dropdown-trigger i.arrow-select{display:inline-block;float:none!important;padding-left:0;transform:rotate(180deg);transform-origin:center center}.dropdown-trigger:hover{color:#4a4a4a;border-color:#7a7a7a;background-color:#fff}.dropdown-trigger:hover i.arrow-select{color:#4a4a4a!important}.dropdown-list{display:none;position:absolute;overflow:hidden;z-index:2;top:100%;left:0;right:0;width:316px;box-shadow:0 4px 12px #00000026;border-radius:8px;background-color:#fff}.dropdown::ng-deep ode-list li{justify-content:flex-start}.dropdown::ng-deep ode-list input[type=search]{padding:12px 16px}.dropdown.open .dropdown-list{display:block}.dropdown.open i.arrow-select{transform:rotate(0)}\n"] }]
|
|
2386
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { name: [{
|
|
2387
|
+
type: Input
|
|
2388
|
+
}], isDropdownOpened: [{
|
|
2389
|
+
type: Input
|
|
2390
|
+
}], onDropdown: [{
|
|
2391
|
+
type: Output
|
|
2392
|
+
}] } });
|
|
2393
|
+
|
|
2394
|
+
/**
|
|
2395
|
+
* Search Toolbar component.
|
|
2396
|
+
* Used within List component, Search Toolbar will display following information:
|
|
2397
|
+
* - Label of the search filter section (example: 'Search by')
|
|
2398
|
+
* - List of search type filters (example: 'Name', 'Email' , ...)
|
|
2399
|
+
* - Number of items returned by the search
|
|
2400
|
+
*
|
|
2401
|
+
```
|
|
2402
|
+
<ode-search-toolbar
|
|
2403
|
+
[label]="'user.searchType.label'"
|
|
2404
|
+
[searchTypes]="searchTypes"
|
|
2405
|
+
[nbItem]="nbUser || 0"
|
|
2406
|
+
[nbItemLabel]="'list.results.users'"
|
|
2407
|
+
(selectSearchType)="handleSelectSearchType($event)"
|
|
2408
|
+
>
|
|
2409
|
+
</ode-search-toolbar>
|
|
2410
|
+
```
|
|
2411
|
+
*/
|
|
2412
|
+
class SearchToolbarComponent extends OdeComponent {
|
|
2413
|
+
constructor(injector) {
|
|
2414
|
+
super(injector);
|
|
2415
|
+
this.nbItem = 0;
|
|
2416
|
+
this.selectSearchType = new EventEmitter();
|
|
2417
|
+
}
|
|
2418
|
+
ngOnInit() {
|
|
2419
|
+
if (this.searchTypes && this.searchTypes.length > 0) {
|
|
2420
|
+
this.selectedSearchTypeValue = this.searchTypes[0].value;
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
handleSearchTypeClick(searchTypeValue) {
|
|
2424
|
+
this.selectedSearchTypeValue = searchTypeValue;
|
|
2425
|
+
this.selectSearchType.emit(searchTypeValue);
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
SearchToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SearchToolbarComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
2429
|
+
SearchToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.1", type: SearchToolbarComponent, selector: "ode-search-toolbar", inputs: { label: "label", searchTypes: "searchTypes", nbItem: "nbItem", nbItemLabel: "nbItemLabel" }, outputs: { selectSearchType: "selectSearchType" }, usesInheritance: true, ngImport: i0, template: "<div class=\"search-toolbar\">\n <div class=\"search-toolbar-label\">\n <s5l>{{ label }}</s5l>\n <button\n *ngFor=\"let searchType of searchTypes\"\n class=\"button has-left-margin-5\"\n [ngClass]=\"{\n 'is-selected': searchType.value === selectedSearchTypeValue\n }\"\n (click)=\"handleSearchTypeClick(searchType.value)\"\n >\n <s5l>{{ searchType.label }}</s5l>\n </button>\n </div>\n <div>\n <strong class=\"badge\">{{ nbItem }} <s5l>{{ nbItemLabel }}</s5l></strong>\n </div>\n</div>\n", styles: [".search-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px}.search-toolbar .search-toolbar-label{font-size:.85rem}.search-toolbar .search-toolbar-label .button{padding:4px 12px;border-radius:20px;font-size:12px;border-width:2px;border-color:#ff8d2e}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2$1.S5lComponent, selector: "s5l", inputs: ["s5l-params", "s5l-lang"] }] });
|
|
2430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: SearchToolbarComponent, decorators: [{
|
|
2431
|
+
type: Component,
|
|
2432
|
+
args: [{ selector: 'ode-search-toolbar', template: "<div class=\"search-toolbar\">\n <div class=\"search-toolbar-label\">\n <s5l>{{ label }}</s5l>\n <button\n *ngFor=\"let searchType of searchTypes\"\n class=\"button has-left-margin-5\"\n [ngClass]=\"{\n 'is-selected': searchType.value === selectedSearchTypeValue\n }\"\n (click)=\"handleSearchTypeClick(searchType.value)\"\n >\n <s5l>{{ searchType.label }}</s5l>\n </button>\n </div>\n <div>\n <strong class=\"badge\">{{ nbItem }} <s5l>{{ nbItemLabel }}</s5l></strong>\n </div>\n</div>\n", styles: [".search-toolbar{display:flex;align-items:center;justify-content:space-between;padding:15px}.search-toolbar .search-toolbar-label{font-size:.85rem}.search-toolbar .search-toolbar-label .button{padding:4px 12px;border-radius:20px;font-size:12px;border-width:2px;border-color:#ff8d2e}\n"] }]
|
|
2433
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { label: [{
|
|
2434
|
+
type: Input
|
|
2435
|
+
}], searchTypes: [{
|
|
2436
|
+
type: Input
|
|
2437
|
+
}], nbItem: [{
|
|
2438
|
+
type: Input
|
|
2439
|
+
}], nbItemLabel: [{
|
|
2440
|
+
type: Input
|
|
2441
|
+
}], selectSearchType: [{
|
|
2442
|
+
type: Output
|
|
2443
|
+
}] } });
|
|
2444
|
+
|
|
2445
|
+
class AnchorDirective {
|
|
2446
|
+
constructor() {
|
|
2447
|
+
this.offset = 50;
|
|
2448
|
+
}
|
|
2449
|
+
onClick() {
|
|
2450
|
+
const element = document.getElementById(this.anchor);
|
|
2451
|
+
window.scrollBy(0, element.getBoundingClientRect().top - this.offset);
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
AnchorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: AnchorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2455
|
+
AnchorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: AnchorDirective, selector: "[anchor]", inputs: { anchor: "anchor", offset: "offset" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
2456
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: AnchorDirective, decorators: [{
|
|
2457
|
+
type: Directive,
|
|
2458
|
+
args: [{ selector: '[anchor]' }]
|
|
2459
|
+
}], propDecorators: { anchor: [{
|
|
2460
|
+
type: Input,
|
|
2461
|
+
args: ['anchor']
|
|
2462
|
+
}], offset: [{
|
|
2463
|
+
type: Input,
|
|
2464
|
+
args: ['offset']
|
|
2465
|
+
}], onClick: [{
|
|
2466
|
+
type: HostListener,
|
|
2467
|
+
args: ['click']
|
|
2468
|
+
}] } });
|
|
2469
|
+
|
|
2470
|
+
class DynamicTemplateDirective {
|
|
2471
|
+
constructor(elementRef, viewContainer, compiler, dynamicModuleImports) {
|
|
2472
|
+
this.elementRef = elementRef;
|
|
2473
|
+
this.viewContainer = viewContainer;
|
|
2474
|
+
this.compiler = compiler;
|
|
2475
|
+
this.dynamicModuleImports = dynamicModuleImports;
|
|
2476
|
+
this._html = '';
|
|
2477
|
+
this._selector = 'dynamic-view';
|
|
2478
|
+
}
|
|
2479
|
+
set templateContents(html) {
|
|
2480
|
+
if (html) {
|
|
2481
|
+
this._html = html;
|
|
2482
|
+
const cmpType = this._createDynamicComponent();
|
|
2483
|
+
const moduleType = this._createDynamicModule(cmpType);
|
|
2484
|
+
const injector = Injector.create({
|
|
2485
|
+
providers: [],
|
|
2486
|
+
parent: this.viewContainer.parentInjector,
|
|
2487
|
+
});
|
|
2488
|
+
this.compiler.compileModuleAndAllComponentsAsync(moduleType)
|
|
2489
|
+
.then(factory => {
|
|
2490
|
+
let cmpFactory;
|
|
2491
|
+
for (let i = factory.componentFactories.length - 1; i >= 0; i--) {
|
|
2492
|
+
if (factory.componentFactories[i].selector === this._selector) {
|
|
2493
|
+
cmpFactory = factory.componentFactories[i];
|
|
2494
|
+
break;
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
return cmpFactory;
|
|
2498
|
+
})
|
|
2499
|
+
.then(cmpFactory => {
|
|
2500
|
+
if (cmpFactory && this.viewContainer) {
|
|
2501
|
+
this.viewContainer.clear();
|
|
2502
|
+
this.viewContainer.createComponent(cmpFactory, 0, injector);
|
|
2503
|
+
}
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
else {
|
|
2507
|
+
this._html = '';
|
|
2508
|
+
this.viewContainer.clear();
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
_createDynamicComponent() {
|
|
2512
|
+
const metadata = {
|
|
2513
|
+
selector: this._selector,
|
|
2514
|
+
template: this._html,
|
|
2515
|
+
inputs: ['template']
|
|
2516
|
+
};
|
|
2517
|
+
class _cmp_ {
|
|
2518
|
+
}
|
|
2519
|
+
_cmp_.prototype = this.context;
|
|
2520
|
+
return Component(metadata)(_cmp_);
|
|
2521
|
+
}
|
|
2522
|
+
_createDynamicModule(componentType) {
|
|
2523
|
+
class _mod_ {
|
|
2524
|
+
}
|
|
2525
|
+
return NgModule({
|
|
2526
|
+
imports: [
|
|
2527
|
+
CommonModule,
|
|
2528
|
+
...this.dynamicModuleImports.imports
|
|
2529
|
+
],
|
|
2530
|
+
declarations: [componentType],
|
|
2531
|
+
providers: []
|
|
2532
|
+
})(_mod_);
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
DynamicTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicTemplateDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.Compiler }, { token: DynamicModuleImportsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2536
|
+
DynamicTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: DynamicTemplateDirective, selector: "dynamic-template", inputs: { templateContents: ["template", "templateContents"], context: "context" }, ngImport: i0 });
|
|
2537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: DynamicTemplateDirective, decorators: [{
|
|
2538
|
+
type: Directive,
|
|
2539
|
+
args: [{
|
|
2540
|
+
selector: 'dynamic-template'
|
|
2541
|
+
}]
|
|
2542
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.Compiler }, { type: DynamicModuleImportsService }]; }, propDecorators: { templateContents: [{
|
|
2543
|
+
type: Input,
|
|
2544
|
+
args: ['template']
|
|
2545
|
+
}], context: [{
|
|
2546
|
+
type: Input
|
|
2547
|
+
}] } });
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
*
|
|
2551
|
+
* see https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
|
|
2552
|
+
*/
|
|
2553
|
+
class ObjectURLDirective {
|
|
2554
|
+
constructor(elementRef) {
|
|
2555
|
+
this.elementRef = elementRef;
|
|
2556
|
+
}
|
|
2557
|
+
// TODO provide more specific method like createJSON, createCSV, createPDF
|
|
2558
|
+
// to free directive consumer from using Blog API
|
|
2559
|
+
create(blob, filename) {
|
|
2560
|
+
if (this.objectURL !== null) {
|
|
2561
|
+
window.URL.revokeObjectURL(this.objectURL);
|
|
2562
|
+
}
|
|
2563
|
+
this.objectURL = window.URL.createObjectURL(blob);
|
|
2564
|
+
this.elementRef.nativeElement.href = this.objectURL;
|
|
2565
|
+
this.elementRef.nativeElement.download = filename;
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
ObjectURLDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ObjectURLDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2569
|
+
ObjectURLDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.1", type: ObjectURLDirective, selector: "[object-url]", ngImport: i0 });
|
|
2570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ObjectURLDirective, decorators: [{
|
|
2571
|
+
type: Directive,
|
|
2572
|
+
args: [{ selector: '[object-url]' }]
|
|
2573
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
2574
|
+
|
|
2575
|
+
const UNITS = [
|
|
2576
|
+
{ label: "quota.byte", value: 1 },
|
|
2577
|
+
{ label: "quota.kilobyte", value: 1024 },
|
|
2578
|
+
{ label: "quota.megabyte", value: Math.pow(1024, 2) },
|
|
2579
|
+
{ label: "quota.gigabyte", value: Math.pow(1024, 3) }
|
|
2580
|
+
];
|
|
2581
|
+
function toDecimal(value, decimal) {
|
|
2582
|
+
return Math.round(value * Math.pow(10, decimal)) / Math.pow(10, decimal);
|
|
2583
|
+
}
|
|
2584
|
+
function getUnit(bytes) {
|
|
2585
|
+
let unit = 0;
|
|
2586
|
+
let finalValue = bytes;
|
|
2587
|
+
while (finalValue >= 1024 && unit < 3) {
|
|
2588
|
+
finalValue = finalValue / 1024;
|
|
2589
|
+
unit++;
|
|
2590
|
+
}
|
|
2591
|
+
return UNITS[unit];
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
class BytesPipe {
|
|
2595
|
+
transform(value, unit, decimal) {
|
|
2596
|
+
if (decimal) {
|
|
2597
|
+
return toDecimal((value / unit), decimal);
|
|
2598
|
+
}
|
|
2599
|
+
return Math.round(value / unit);
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
BytesPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BytesPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2603
|
+
BytesPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: BytesPipe, name: "bytes" });
|
|
2604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: BytesPipe, decorators: [{
|
|
2605
|
+
type: Pipe,
|
|
2606
|
+
args: [{
|
|
2607
|
+
name: 'bytes'
|
|
2608
|
+
}]
|
|
2609
|
+
}] });
|
|
2610
|
+
|
|
2611
|
+
class KeysPipe {
|
|
2612
|
+
transform(obj, args) {
|
|
2613
|
+
const keys = [];
|
|
2614
|
+
for (const key in obj) {
|
|
2615
|
+
if (key) {
|
|
2616
|
+
keys.push(key);
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
return keys;
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2623
|
+
KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: KeysPipe, name: "keys" });
|
|
2624
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: KeysPipe, decorators: [{
|
|
2625
|
+
type: Pipe,
|
|
2626
|
+
args: [{ name: 'keys' }]
|
|
2627
|
+
}] });
|
|
2628
|
+
|
|
2629
|
+
class LimitPipe {
|
|
2630
|
+
transform(array, limit, offset = 0) {
|
|
2631
|
+
return array.slice(offset, limit);
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
LimitPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LimitPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2635
|
+
LimitPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: LimitPipe, name: "limit", pure: false });
|
|
2636
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LimitPipe, decorators: [{
|
|
2637
|
+
type: Pipe,
|
|
2638
|
+
args: [{
|
|
2639
|
+
name: 'limit',
|
|
2640
|
+
pure: false
|
|
2641
|
+
}]
|
|
2642
|
+
}] });
|
|
2643
|
+
|
|
2644
|
+
class LocalizedDatePipe {
|
|
2645
|
+
constructor(bundlesService) {
|
|
2646
|
+
this.bundlesService = bundlesService;
|
|
2647
|
+
}
|
|
2648
|
+
transform(value, pattern = 'mediumDate') {
|
|
2649
|
+
const datePipe = new DatePipe(this.bundlesService.currentLanguage);
|
|
2650
|
+
return datePipe.transform(value, pattern);
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
LocalizedDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LocalizedDatePipe, deps: [{ token: i2$1.BundlesService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2654
|
+
LocalizedDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: LocalizedDatePipe, name: "localizedDate", pure: false });
|
|
2655
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LocalizedDatePipe, decorators: [{
|
|
2656
|
+
type: Pipe,
|
|
2657
|
+
args: [{
|
|
2658
|
+
name: 'localizedDate',
|
|
2659
|
+
pure: false
|
|
2660
|
+
}]
|
|
2661
|
+
}], ctorParameters: function () { return [{ type: i2$1.BundlesService }]; } });
|
|
2662
|
+
|
|
2663
|
+
class LengthPipe {
|
|
2664
|
+
transform(source) {
|
|
2665
|
+
return source.length;
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
LengthPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LengthPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2669
|
+
LengthPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: LengthPipe, name: "length", pure: false });
|
|
2670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: LengthPipe, decorators: [{
|
|
2671
|
+
type: Pipe,
|
|
2672
|
+
args: [{
|
|
2673
|
+
name: 'length',
|
|
2674
|
+
pure: false
|
|
2675
|
+
}]
|
|
2676
|
+
}] });
|
|
2677
|
+
|
|
2678
|
+
class ReplacePipe {
|
|
2679
|
+
transform(value, strToReplace, replacementStr) {
|
|
2680
|
+
if (!value || !strToReplace || !replacementStr) {
|
|
2681
|
+
return value;
|
|
2682
|
+
}
|
|
2683
|
+
return value.replace(new RegExp(this.escapeStr(strToReplace), 'g'), '' + replacementStr);
|
|
2684
|
+
}
|
|
2685
|
+
escapeStr(str) {
|
|
2686
|
+
return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
2687
|
+
}
|
|
2688
|
+
}
|
|
2689
|
+
ReplacePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ReplacePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2690
|
+
ReplacePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: ReplacePipe, name: "replace" });
|
|
2691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: ReplacePipe, decorators: [{
|
|
2692
|
+
type: Pipe,
|
|
2693
|
+
args: [{ name: 'replace' }]
|
|
2694
|
+
}] });
|
|
2695
|
+
|
|
2696
|
+
function trim(text) {
|
|
2697
|
+
if (text && text.length > 0) {
|
|
2698
|
+
return text.trim();
|
|
2699
|
+
}
|
|
2700
|
+
return text;
|
|
2701
|
+
}
|
|
2702
|
+
function standardise(str) {
|
|
2703
|
+
return removeAccents(str != null ? str : '').toLowerCase().replace('\\s+', ' ');
|
|
2704
|
+
}
|
|
2705
|
+
const removeAccents = (str) => str.normalize("NFD").replace(/\p{Diacritic}/gu, '');
|
|
2706
|
+
|
|
2707
|
+
function getText(el) {
|
|
2708
|
+
return el.nativeElement.textContent.trim();
|
|
2709
|
+
}
|
|
2710
|
+
function clickOn(el) {
|
|
2711
|
+
return el.triggerEventHandler('click', null);
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
class NgxOdeUiModule {
|
|
2715
|
+
static forRoot(labelsProvider) {
|
|
2716
|
+
return {
|
|
2717
|
+
ngModule: NgxOdeUiModule,
|
|
2718
|
+
providers: [
|
|
2719
|
+
DynamicModuleImportsService,
|
|
2720
|
+
labelsProvider || LabelsService
|
|
2721
|
+
]
|
|
2722
|
+
};
|
|
2723
|
+
}
|
|
2724
|
+
static forChild() {
|
|
2725
|
+
return {
|
|
2726
|
+
ngModule: NgxOdeUiModule,
|
|
2727
|
+
providers: []
|
|
2728
|
+
};
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
NgxOdeUiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NgxOdeUiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2732
|
+
NgxOdeUiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.1", ngImport: i0, type: NgxOdeUiModule, declarations: [
|
|
2733
|
+
// components
|
|
2734
|
+
DatepickerComponent,
|
|
2735
|
+
FormErrorsComponent,
|
|
2736
|
+
FormFieldComponent,
|
|
2737
|
+
ItemTreeComponent,
|
|
2738
|
+
LightBoxComponent,
|
|
2739
|
+
LightboxConfirmComponent,
|
|
2740
|
+
ListComponent,
|
|
2741
|
+
ListCheckableComponent,
|
|
2742
|
+
MonoSelectComponent,
|
|
2743
|
+
MultiSelectComponent,
|
|
2744
|
+
MultiComboComponent,
|
|
2745
|
+
PanelSectionComponent,
|
|
2746
|
+
PortalComponent,
|
|
2747
|
+
PushPanelComponent,
|
|
2748
|
+
SearchInputComponent,
|
|
2749
|
+
SideLayoutComponent,
|
|
2750
|
+
SidePanelComponent,
|
|
2751
|
+
StepComponent,
|
|
2752
|
+
TooltipComponent,
|
|
2753
|
+
WizardComponent,
|
|
2754
|
+
SimpleSelectComponent,
|
|
2755
|
+
MessageStickerComponent,
|
|
2756
|
+
MessageBoxComponent,
|
|
2757
|
+
UploadFilesComponent,
|
|
2758
|
+
SpinnerCubeComponent,
|
|
2759
|
+
PagerComponent,
|
|
2760
|
+
EllipsisComponent,
|
|
2761
|
+
DropdownComponent,
|
|
2762
|
+
SearchToolbarComponent,
|
|
2763
|
+
// directives
|
|
2764
|
+
AnchorDirective,
|
|
2765
|
+
DynamicTemplateDirective,
|
|
2766
|
+
DynamicComponentDirective,
|
|
2767
|
+
DragAndDropFilesDirective,
|
|
2768
|
+
ObjectURLDirective,
|
|
2769
|
+
// pipes
|
|
2770
|
+
FilterPipe,
|
|
2771
|
+
FlattenObjectArrayPipe,
|
|
2772
|
+
LimitPipe,
|
|
2773
|
+
OrderPipe,
|
|
2774
|
+
StorePipe,
|
|
2775
|
+
LocalizedDatePipe,
|
|
2776
|
+
BytesPipe,
|
|
2777
|
+
KeysPipe,
|
|
2778
|
+
LengthPipe,
|
|
2779
|
+
ReplacePipe], imports: [CommonModule,
|
|
2780
|
+
FormsModule, i2$1.NgxOdeSijilModule, InfiniteScrollModule], exports: [
|
|
2781
|
+
// components
|
|
2782
|
+
DatepickerComponent,
|
|
2783
|
+
FormErrorsComponent,
|
|
2784
|
+
FormFieldComponent,
|
|
2785
|
+
ItemTreeComponent,
|
|
2786
|
+
LightBoxComponent,
|
|
2787
|
+
LightboxConfirmComponent,
|
|
2788
|
+
ListComponent,
|
|
2789
|
+
ListCheckableComponent,
|
|
2790
|
+
MonoSelectComponent,
|
|
2791
|
+
MultiSelectComponent,
|
|
2792
|
+
MultiComboComponent,
|
|
2793
|
+
PanelSectionComponent,
|
|
2794
|
+
PortalComponent,
|
|
2795
|
+
PushPanelComponent,
|
|
2796
|
+
SearchInputComponent,
|
|
2797
|
+
SideLayoutComponent,
|
|
2798
|
+
SidePanelComponent,
|
|
2799
|
+
StepComponent,
|
|
2800
|
+
TooltipComponent,
|
|
2801
|
+
WizardComponent,
|
|
2802
|
+
SimpleSelectComponent,
|
|
2803
|
+
MessageStickerComponent,
|
|
2804
|
+
MessageBoxComponent,
|
|
2805
|
+
UploadFilesComponent,
|
|
2806
|
+
SpinnerCubeComponent,
|
|
2807
|
+
PagerComponent,
|
|
2808
|
+
EllipsisComponent,
|
|
2809
|
+
DropdownComponent,
|
|
2810
|
+
SearchToolbarComponent,
|
|
2811
|
+
// directives
|
|
2812
|
+
AnchorDirective,
|
|
2813
|
+
DynamicTemplateDirective,
|
|
2814
|
+
DynamicComponentDirective,
|
|
2815
|
+
DragAndDropFilesDirective,
|
|
2816
|
+
ObjectURLDirective,
|
|
2817
|
+
// pipes
|
|
2818
|
+
FilterPipe,
|
|
2819
|
+
FlattenObjectArrayPipe,
|
|
2820
|
+
LimitPipe,
|
|
2821
|
+
OrderPipe,
|
|
2822
|
+
StorePipe,
|
|
2823
|
+
LocalizedDatePipe,
|
|
2824
|
+
BytesPipe,
|
|
2825
|
+
KeysPipe,
|
|
2826
|
+
LengthPipe,
|
|
2827
|
+
ReplacePipe] });
|
|
2828
|
+
NgxOdeUiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NgxOdeUiModule, providers: [InputFileService, OrderPipe], imports: [CommonModule,
|
|
2829
|
+
FormsModule,
|
|
2830
|
+
NgxOdeSijilModule.forChild(),
|
|
2831
|
+
InfiniteScrollModule] });
|
|
2832
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: NgxOdeUiModule, decorators: [{
|
|
2833
|
+
type: NgModule,
|
|
2834
|
+
args: [{
|
|
2835
|
+
declarations: [
|
|
2836
|
+
// components
|
|
2837
|
+
DatepickerComponent,
|
|
2838
|
+
FormErrorsComponent,
|
|
2839
|
+
FormFieldComponent,
|
|
2840
|
+
ItemTreeComponent,
|
|
2841
|
+
LightBoxComponent,
|
|
2842
|
+
LightboxConfirmComponent,
|
|
2843
|
+
ListComponent,
|
|
2844
|
+
ListCheckableComponent,
|
|
2845
|
+
MonoSelectComponent,
|
|
2846
|
+
MultiSelectComponent,
|
|
2847
|
+
MultiComboComponent,
|
|
2848
|
+
PanelSectionComponent,
|
|
2849
|
+
PortalComponent,
|
|
2850
|
+
PushPanelComponent,
|
|
2851
|
+
SearchInputComponent,
|
|
2852
|
+
SideLayoutComponent,
|
|
2853
|
+
SidePanelComponent,
|
|
2854
|
+
StepComponent,
|
|
2855
|
+
TooltipComponent,
|
|
2856
|
+
WizardComponent,
|
|
2857
|
+
SimpleSelectComponent,
|
|
2858
|
+
MessageStickerComponent,
|
|
2859
|
+
MessageBoxComponent,
|
|
2860
|
+
UploadFilesComponent,
|
|
2861
|
+
SpinnerCubeComponent,
|
|
2862
|
+
PagerComponent,
|
|
2863
|
+
EllipsisComponent,
|
|
2864
|
+
DropdownComponent,
|
|
2865
|
+
SearchToolbarComponent,
|
|
2866
|
+
// directives
|
|
2867
|
+
AnchorDirective,
|
|
2868
|
+
DynamicTemplateDirective,
|
|
2869
|
+
DynamicComponentDirective,
|
|
2870
|
+
DragAndDropFilesDirective,
|
|
2871
|
+
ObjectURLDirective,
|
|
2872
|
+
// pipes
|
|
2873
|
+
FilterPipe,
|
|
2874
|
+
FlattenObjectArrayPipe,
|
|
2875
|
+
LimitPipe,
|
|
2876
|
+
OrderPipe,
|
|
2877
|
+
StorePipe,
|
|
2878
|
+
LocalizedDatePipe,
|
|
2879
|
+
BytesPipe,
|
|
2880
|
+
KeysPipe,
|
|
2881
|
+
LengthPipe,
|
|
2882
|
+
ReplacePipe
|
|
2883
|
+
],
|
|
2884
|
+
imports: [
|
|
2885
|
+
CommonModule,
|
|
2886
|
+
FormsModule,
|
|
2887
|
+
NgxOdeSijilModule.forChild(),
|
|
2888
|
+
InfiniteScrollModule
|
|
2889
|
+
],
|
|
2890
|
+
exports: [
|
|
2891
|
+
// components
|
|
2892
|
+
DatepickerComponent,
|
|
2893
|
+
FormErrorsComponent,
|
|
2894
|
+
FormFieldComponent,
|
|
2895
|
+
ItemTreeComponent,
|
|
2896
|
+
LightBoxComponent,
|
|
2897
|
+
LightboxConfirmComponent,
|
|
2898
|
+
ListComponent,
|
|
2899
|
+
ListCheckableComponent,
|
|
2900
|
+
MonoSelectComponent,
|
|
2901
|
+
MultiSelectComponent,
|
|
2902
|
+
MultiComboComponent,
|
|
2903
|
+
PanelSectionComponent,
|
|
2904
|
+
PortalComponent,
|
|
2905
|
+
PushPanelComponent,
|
|
2906
|
+
SearchInputComponent,
|
|
2907
|
+
SideLayoutComponent,
|
|
2908
|
+
SidePanelComponent,
|
|
2909
|
+
StepComponent,
|
|
2910
|
+
TooltipComponent,
|
|
2911
|
+
WizardComponent,
|
|
2912
|
+
SimpleSelectComponent,
|
|
2913
|
+
MessageStickerComponent,
|
|
2914
|
+
MessageBoxComponent,
|
|
2915
|
+
UploadFilesComponent,
|
|
2916
|
+
SpinnerCubeComponent,
|
|
2917
|
+
PagerComponent,
|
|
2918
|
+
EllipsisComponent,
|
|
2919
|
+
DropdownComponent,
|
|
2920
|
+
SearchToolbarComponent,
|
|
2921
|
+
// directives
|
|
2922
|
+
AnchorDirective,
|
|
2923
|
+
DynamicTemplateDirective,
|
|
2924
|
+
DynamicComponentDirective,
|
|
2925
|
+
DragAndDropFilesDirective,
|
|
2926
|
+
ObjectURLDirective,
|
|
2927
|
+
// pipes
|
|
2928
|
+
FilterPipe,
|
|
2929
|
+
FlattenObjectArrayPipe,
|
|
2930
|
+
LimitPipe,
|
|
2931
|
+
OrderPipe,
|
|
2932
|
+
StorePipe,
|
|
2933
|
+
LocalizedDatePipe,
|
|
2934
|
+
BytesPipe,
|
|
2935
|
+
KeysPipe,
|
|
2936
|
+
LengthPipe,
|
|
2937
|
+
ReplacePipe
|
|
2938
|
+
],
|
|
2939
|
+
providers: [InputFileService, OrderPipe]
|
|
2940
|
+
}]
|
|
2941
|
+
}] });
|
|
2942
|
+
|
|
2943
|
+
/*
|
|
2944
|
+
* Public API Surface of ngx-ode-ui
|
|
2945
|
+
*/
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* Generated bundle index. Do not edit.
|
|
2949
|
+
*/
|
|
2950
|
+
|
|
2951
|
+
export { AnchorDirective, BytesPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, ComponentDescriptor, DatepickerComponent, DragAndDropFilesDirective, DropdownComponent, DynamicComponentDirective, DynamicModuleImportsService, DynamicTemplateDirective, EllipsisComponent, FilterPipe, FlattenObjectArrayPipe, FormErrorsComponent, FormFieldComponent, InputFileService, ItemTreeComponent, KeysPipe, LabelsService, LengthPipe, LightBoxComponent, LightboxConfirmComponent, LimitPipe, ListCheckableComponent, ListComponent, LocalizedDatePipe, MessageBoxComponent, MessageStickerComponent, MonoSelectComponent, MultiComboComponent, MultiSelectComponent, NgxOdeUiModule, ObjectURLDirective, OrderPipe, PagerComponent, PanelSectionComponent, PortalComponent, PushPanelComponent, ReplacePipe, SearchInputComponent, SearchToolbarComponent, SideLayoutComponent, SidePanelComponent, SimpleSelectComponent, SpinnerCubeComponent, SpinnerService, StepComponent, StorePipe, TooltipComponent, UNITS, UploadFilesComponent, WizardComponent, clickOn, getText, getUnit, icons, removeAccents, standardise, toDecimal, trim };
|
|
2952
|
+
//# sourceMappingURL=ngx-ode-ui.mjs.map
|