@factor_ec/ui 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/esm2022/lib/io/avatar/avatar.component.mjs +75 -0
  3. package/esm2022/lib/io/icon/icon.component.mjs +96 -0
  4. package/esm2022/lib/io/image/image.component.mjs +84 -0
  5. package/esm2022/lib/io/progress/progress.component.mjs +43 -0
  6. package/esm2022/lib/io/rating/rating.component.mjs +61 -0
  7. package/esm2022/lib/io/timeline/timeline.component.mjs +102 -0
  8. package/esm2022/lib/observe-inersecting.directive.mjs +43 -0
  9. package/esm2022/lib/ui.module.mjs +27 -0
  10. package/esm2022/public-api.mjs +12 -0
  11. package/fesm2022/factor_ec-ui.mjs +515 -0
  12. package/fesm2022/factor_ec-ui.mjs.map +1 -0
  13. package/lib/io/avatar/avatar.component.d.ts +1 -1
  14. package/lib/io/icon/icon.component.d.ts +1 -1
  15. package/lib/io/image/image.component.d.ts +1 -1
  16. package/lib/io/progress/progress.component.d.ts +1 -1
  17. package/lib/io/rating/rating.component.d.ts +1 -1
  18. package/lib/io/timeline/timeline.component.d.ts +1 -1
  19. package/lib/observe-inersecting.directive.d.ts +16 -0
  20. package/lib/ui.module.d.ts +4 -7
  21. package/package.json +9 -18
  22. package/public-api.d.ts +2 -13
  23. package/esm2020/lib/io/avatar/avatar.component.mjs +0 -74
  24. package/esm2020/lib/io/expression-builder/expression-builder.component.mjs +0 -72
  25. package/esm2020/lib/io/icon/icon.component.mjs +0 -95
  26. package/esm2020/lib/io/image/image.component.mjs +0 -80
  27. package/esm2020/lib/io/io.module.mjs +0 -81
  28. package/esm2020/lib/io/message/message.component.mjs +0 -30
  29. package/esm2020/lib/io/message-content/message-content.component.mjs +0 -19
  30. package/esm2020/lib/io/message.service.mjs +0 -58
  31. package/esm2020/lib/io/observe-intersecting.directive.mjs +0 -43
  32. package/esm2020/lib/io/progress/progress.component.mjs +0 -42
  33. package/esm2020/lib/io/progress.service.mjs +0 -48
  34. package/esm2020/lib/io/rating/rating.component.mjs +0 -60
  35. package/esm2020/lib/io/timeline/timeline.component.mjs +0 -101
  36. package/esm2020/lib/layout/collapsible/collapsible.component.mjs +0 -37
  37. package/esm2020/lib/layout/layout.module.mjs +0 -28
  38. package/esm2020/lib/models/action.mjs +0 -2
  39. package/esm2020/lib/models/content.mjs +0 -2
  40. package/esm2020/lib/models/icon.mjs +0 -2
  41. package/esm2020/lib/models/message-options.mjs +0 -2
  42. package/esm2020/lib/models/module-configuration.mjs +0 -2
  43. package/esm2020/lib/navigation/list/list.component.mjs +0 -100
  44. package/esm2020/lib/navigation/navigation.module.mjs +0 -49
  45. package/esm2020/lib/navigation/toolbar/toolbar.component.mjs +0 -53
  46. package/esm2020/lib/ui.module.mjs +0 -47
  47. package/esm2020/public-api.mjs +0 -23
  48. package/fesm2015/factor_ec-ui.mjs +0 -1053
  49. package/fesm2015/factor_ec-ui.mjs.map +0 -1
  50. package/fesm2020/factor_ec-ui.mjs +0 -1044
  51. package/fesm2020/factor_ec-ui.mjs.map +0 -1
  52. package/lib/io/expression-builder/expression-builder.component.d.ts +0 -46
  53. package/lib/io/io.module.d.ts +0 -20
  54. package/lib/io/message/message.component.d.ts +0 -11
  55. package/lib/io/message-content/message-content.component.d.ts +0 -7
  56. package/lib/io/message.service.d.ts +0 -15
  57. package/lib/io/observe-intersecting.directive.d.ts +0 -16
  58. package/lib/io/progress.service.d.ts +0 -15
  59. package/lib/layout/collapsible/collapsible.component.d.ts +0 -10
  60. package/lib/layout/layout.module.d.ts +0 -9
  61. package/lib/models/action.d.ts +0 -14
  62. package/lib/models/content.d.ts +0 -4
  63. package/lib/models/icon.d.ts +0 -6
  64. package/lib/models/message-options.d.ts +0 -13
  65. package/lib/models/module-configuration.d.ts +0 -6
  66. package/lib/navigation/list/list.component.d.ts +0 -23
  67. package/lib/navigation/navigation.module.d.ts +0 -14
  68. package/lib/navigation/toolbar/toolbar.component.d.ts +0 -17
  69. package/scss/all.scss +0 -5
  70. package/scss/components/avatar.scss +0 -15
  71. package/scss/components/collapsible.scss +0 -44
  72. package/scss/components/dropdown.scss +0 -56
  73. package/scss/components/icon.scss +0 -40
  74. package/scss/components/list.scss +0 -61
  75. package/scss/components/ph.scss +0 -27
  76. package/scss/components/popup.scss +0 -7
  77. package/scss/components/rating.scss +0 -61
  78. package/scss/components.scss +0 -8
  79. package/scss/mixins/breakpoints.scss +0 -123
  80. package/scss/mixins.scss +0 -1
  81. package/scss/reboot.scss +0 -586
  82. package/scss/root.scss +0 -52
  83. package/scss/variables.scss +0 -116
  84. /package/{esm2020 → esm2022}/factor_ec-ui.mjs +0 -0
  85. /package/{esm2020 → esm2022}/lib/models/task.mjs +0 -0
  86. /package/{esm2020 → esm2022}/lib/models/ui-configuration.mjs +0 -0
@@ -1,1044 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Input, HostBinding, Inject, EventEmitter, Output, Injectable, ApplicationRef, PLATFORM_ID, Directive, NgModule } from '@angular/core';
3
- import * as i1 from '@factor_ec/utils';
4
- import * as i1$1 from '@angular/common';
5
- import { isPlatformBrowser, CommonModule } from '@angular/common';
6
- import * as i1$2 from '@angular/material/snack-bar';
7
- import { MAT_SNACK_BAR_DATA, MatSnackBarModule } from '@angular/material/snack-bar';
8
- import * as i3 from '@angular/material/dialog';
9
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
10
- import * as i2 from '@angular/material/button';
11
- import { MatButtonModule } from '@angular/material/button';
12
- import { ReplaySubject } from 'rxjs';
13
- import * as i4 from '@angular/router';
14
- import { RouterModule } from '@angular/router';
15
- import * as i5 from '@angular/material/menu';
16
- import { MatMenuModule } from '@angular/material/menu';
17
-
18
- class AvatarComponent {
19
- constructor(colorService) {
20
- this.colorService = colorService;
21
- this.class = '';
22
- }
23
- set src(value) {
24
- if (value && value.trim() != '') {
25
- this._src = value;
26
- let image = new Image();
27
- image.src = value;
28
- image.onload = () => {
29
- if ("decode" in image) {
30
- image.decode().then(() => {
31
- this.loaded = true;
32
- });
33
- }
34
- else {
35
- console.error('Image.decode not available.');
36
- }
37
- };
38
- }
39
- }
40
- set label(value) {
41
- this._label = value;
42
- this.initials = this.getInitials(value);
43
- }
44
- get backgroundColor() {
45
- return this.color || this.colorService.hex(this._label);
46
- }
47
- get backgroundImage() {
48
- return this._src ? `url(${this._src})` : '';
49
- }
50
- get hostClasses() {
51
- return [
52
- 'ft-avatar',
53
- this.class
54
- ].join(' ');
55
- }
56
- ngOnInit() {
57
- }
58
- getInitials(value) {
59
- let allInitials = value.match(/\b\w/g) || [];
60
- let initials = ((allInitials.shift() || '') + (allInitials.pop() || '')).toUpperCase();
61
- return initials;
62
- }
63
- }
64
- AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: AvatarComponent, deps: [{ token: i1.ColorService }], target: i0.ɵɵFactoryTarget.Component });
65
- AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: AvatarComponent, selector: "ft-avatar", inputs: { color: "color", src: "src", label: "label", class: "class" }, host: { properties: { "style.background-color": "this.backgroundColor", "style.background-image": "this.backgroundImage", "class": "this.hostClasses" } }, ngImport: i0, template: "<div *ngIf=\"!loaded\">{{ initials }}</div>", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: AvatarComponent, decorators: [{
67
- type: Component,
68
- args: [{ selector: 'ft-avatar', template: "<div *ngIf=\"!loaded\">{{ initials }}</div>" }]
69
- }], ctorParameters: function () { return [{ type: i1.ColorService }]; }, propDecorators: { color: [{
70
- type: Input
71
- }], src: [{
72
- type: Input
73
- }], label: [{
74
- type: Input
75
- }], backgroundColor: [{
76
- type: HostBinding,
77
- args: ['style.background-color']
78
- }], backgroundImage: [{
79
- type: HostBinding,
80
- args: ['style.background-image']
81
- }], class: [{
82
- type: Input
83
- }], hostClasses: [{
84
- type: HostBinding,
85
- args: ['class']
86
- }] } });
87
-
88
- class IconComponent {
89
- constructor(configuration) {
90
- this.configuration = configuration;
91
- this.class = '';
92
- }
93
- set collection(collection) {
94
- this._collection = collection;
95
- this.update();
96
- }
97
- set mode(mode) {
98
- this._mode = mode;
99
- this.update();
100
- }
101
- set name(name) {
102
- this._name = name;
103
- this.update();
104
- }
105
- set path(path) {
106
- this._path = path;
107
- this.update();
108
- }
109
- get hostClasses() {
110
- return [
111
- 'ft-icon',
112
- this.class
113
- ].join(' ');
114
- }
115
- ngOnInit() {
116
- this.update();
117
- }
118
- update() {
119
- // Set the default collection if the mode is external
120
- if (!this._collection) {
121
- if (this.configuration.icon && this.configuration.icon.collection) {
122
- this._collection = this.configuration.icon.collection;
123
- }
124
- else if (this._mode === 'external') {
125
- this._collection = 'icons';
126
- }
127
- }
128
- if (!this._mode) {
129
- if (this.configuration.icon && this.configuration.icon.mode) {
130
- this._mode = this.configuration.icon.mode;
131
- }
132
- else {
133
- this._mode = 'external';
134
- }
135
- }
136
- if (this._mode === 'external') {
137
- // If the icon mode is external
138
- if (!this._path) {
139
- if (this.configuration.icon && this.configuration.icon.path) {
140
- this._path = this.configuration.icon.path;
141
- }
142
- else {
143
- this._path = 'assets';
144
- }
145
- }
146
- this.url = `${this._path}/${this._collection}.svg#${this._name}`;
147
- }
148
- else {
149
- // If the icon mode is inline
150
- const name = this._collection && this._collection !== 'unset' ? `${this._collection}--${this._name}` : this._name;
151
- this.url = `#${name}`;
152
- }
153
- }
154
- }
155
- IconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: IconComponent, deps: [{ token: 'FactorUiConfiguration' }], target: i0.ɵɵFactoryTarget.Component });
156
- IconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: IconComponent, selector: "ft-icon", inputs: { collection: "collection", mode: "mode", name: "name", path: "path", src: "src", class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<svg *ngIf=\"!src; else imageTemplate\">\n <use attr.xlink:href=\"{{ url }}\" attr.href=\"{{ url }}\" />\n</svg>\n<ng-template #imageTemplate>\n <img [src]=\"src\" />\n</ng-template>", dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: IconComponent, decorators: [{
158
- type: Component,
159
- args: [{ selector: 'ft-icon', template: "<svg *ngIf=\"!src; else imageTemplate\">\n <use attr.xlink:href=\"{{ url }}\" attr.href=\"{{ url }}\" />\n</svg>\n<ng-template #imageTemplate>\n <img [src]=\"src\" />\n</ng-template>" }]
160
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
161
- type: Inject,
162
- args: ['FactorUiConfiguration']
163
- }] }]; }, propDecorators: { collection: [{
164
- type: Input
165
- }], mode: [{
166
- type: Input
167
- }], name: [{
168
- type: Input
169
- }], path: [{
170
- type: Input
171
- }], src: [{
172
- type: Input
173
- }], class: [{
174
- type: Input
175
- }], hostClasses: [{
176
- type: HostBinding,
177
- args: ['class']
178
- }] } });
179
-
180
- class ImageComponent {
181
- constructor(element) {
182
- this.element = element;
183
- this.class = '';
184
- this.loading = false;
185
- this.shown = false;
186
- }
187
- ngOnInit() {
188
- if ("IntersectionObserver" in window) {
189
- let elementObserver = new IntersectionObserver((entries, observer) => {
190
- entries.forEach((entry) => {
191
- if (entry.isIntersecting) {
192
- let image = new Image();
193
- image.src = this.src;
194
- setTimeout(() => {
195
- if (!this.shown && !this.error) {
196
- this.loading = true;
197
- }
198
- }, 100);
199
- image.onerror = () => {
200
- this.error = true;
201
- this.loading = false;
202
- };
203
- image.onload = () => {
204
- if ("decode" in image) {
205
- image.decode().then(() => {
206
- this.loading = false;
207
- this.shown = true;
208
- });
209
- }
210
- else {
211
- this.loading = false;
212
- this.shown = true;
213
- }
214
- };
215
- elementObserver.unobserve(this.element.nativeElement);
216
- }
217
- });
218
- }, {
219
- rootMargin: "0px 0px 200px 0px"
220
- });
221
- elementObserver.observe(this.element.nativeElement);
222
- }
223
- else {
224
- console.error('IntersectionObserver not available.');
225
- this.loading = false;
226
- this.shown = true;
227
- }
228
- }
229
- get hostClasses() {
230
- return [
231
- 'ft-image',
232
- this.class
233
- ].join(' ');
234
- }
235
- }
236
- ImageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ImageComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
237
- ImageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ImageComponent, selector: "ft-image", inputs: { class: "class", src: "src" }, host: { properties: { "class.ft-image--error": "this.error", "class.ft-image--loading": "this.loading", "class": "this.hostClasses" } }, ngImport: i0, template: "<img *ngIf=\"shown\" [src]=\"src\" />\n<ft-icon name=\"warning\" size=\"2\" *ngIf=\"error\"></ft-icon>\n", styles: [":host{display:inline-block;overflow:hidden;display:flex;align-items:center;justify-content:center}:host.ft-image--loading{background-color:#00000008;position:relative;overflow:hidden}:host.ft-image--loading:after{content:\"\";display:block;background-color:#00000005;position:absolute;top:0;bottom:0;width:100%;height:100%;transform:translate(0);animation:1.5s ft-placeholder-loading ease-in-out infinite}:host.ft-image--error{background-color:#ff000008}:host.ft-image--error ft-icon{color:var(--danger)}img{position:relative;z-index:1;max-width:100%;max-height:100%;animation:ft-fade-in .3s}@keyframes ft-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ft-placeholder-loading{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "ft-icon", inputs: ["collection", "mode", "name", "path", "src", "class"] }] });
238
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ImageComponent, decorators: [{
239
- type: Component,
240
- args: [{ selector: 'ft-image', template: "<img *ngIf=\"shown\" [src]=\"src\" />\n<ft-icon name=\"warning\" size=\"2\" *ngIf=\"error\"></ft-icon>\n", styles: [":host{display:inline-block;overflow:hidden;display:flex;align-items:center;justify-content:center}:host.ft-image--loading{background-color:#00000008;position:relative;overflow:hidden}:host.ft-image--loading:after{content:\"\";display:block;background-color:#00000005;position:absolute;top:0;bottom:0;width:100%;height:100%;transform:translate(0);animation:1.5s ft-placeholder-loading ease-in-out infinite}:host.ft-image--error{background-color:#ff000008}:host.ft-image--error ft-icon{color:var(--danger)}img{position:relative;z-index:1;max-width:100%;max-height:100%;animation:ft-fade-in .3s}@keyframes ft-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ft-placeholder-loading{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n"] }]
241
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { class: [{
242
- type: Input
243
- }], error: [{
244
- type: HostBinding,
245
- args: ['class.ft-image--error']
246
- }], loading: [{
247
- type: HostBinding,
248
- args: ['class.ft-image--loading']
249
- }], src: [{
250
- type: Input
251
- }], hostClasses: [{
252
- type: HostBinding,
253
- args: ['class']
254
- }] } });
255
-
256
- class MessageContentComponent {
257
- constructor(data) {
258
- this.data = data;
259
- }
260
- }
261
- MessageContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageContentComponent, deps: [{ token: MAT_SNACK_BAR_DATA }], target: i0.ɵɵFactoryTarget.Component });
262
- MessageContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: MessageContentComponent, selector: "ft-message-content", ngImport: i0, template: "<ng-container [ngSwitch]=\"data.message?.type\">\n <div *ngSwitchCase=\"'html'\" [innerHTML]=\"data.message?.content\"></div>\n <ng-container *ngSwitchDefault>{{ data.message?.content }}</ng-container>\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageContentComponent, decorators: [{
264
- type: Component,
265
- args: [{ selector: 'ft-message-content', template: "<ng-container [ngSwitch]=\"data.message?.type\">\n <div *ngSwitchCase=\"'html'\" [innerHTML]=\"data.message?.content\"></div>\n <ng-container *ngSwitchDefault>{{ data.message?.content }}</ng-container>\n</ng-container>" }]
266
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
267
- type: Inject,
268
- args: [MAT_SNACK_BAR_DATA]
269
- }] }]; } });
270
-
271
- class MessageComponent {
272
- constructor(data) {
273
- this.data = data;
274
- this.beforeSelect = new EventEmitter();
275
- }
276
- ngOnInit() {
277
- }
278
- select(value) {
279
- this.beforeSelect.emit(value);
280
- }
281
- }
282
- MessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
283
- MessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: MessageComponent, selector: "ft-message", outputs: { beforeSelect: "beforeSelect" }, ngImport: i0, template: "<h1 mat-dialog-title class=\"ft-message__title\" *ngIf=\"data.options?.title\">\n <ft-icon *ngIf=\"data.options?.titleIcon\" [name]=\"data.options?.titleIcon?.name\"\n [collection]=\"data.options?.titleIcon?.collection\" [ngClass]=\"data.options?.titleIcon?.class\"></ft-icon>\n <div>{{ data.options?.title }}</div>\n</h1>\n<div mat-dialog-content class=\"ft-message__content\" [ngClass]=\"data.options?.class\">\n <ft-icon *ngIf=\"data.options?.icon\" [name]=\"data.options?.icon?.name\" [collection]=\"data.options?.icon?.collection\"\n [ngClass]=\"data.options?.icon?.class\"></ft-icon>\n <ng-container [ngSwitch]=\"data.message?.type\">\n <div *ngSwitchCase=\"'html'\" [innerHTML]=\"data.message?.content\"></div>\n <ng-container *ngSwitchDefault>{{ data.message?.content }}</ng-container>\n </ng-container>\n</div>\n<div mat-dialog-actions class=\"ft-message__actions\" *ngIf=\"data.options.actionsVisible\">\n <ng-container *ngIf=\"data.options?.actions?.length > 0; else acceptTemplate\">\n <ng-container *ngFor=\"let action of data.options?.actions; let i = index\">\n <ng-container [ngSwitch]=\"action.type\">\n <button type=\"button\" *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\" autofocus>{{ action.label }}</button>\n <button type=\"button\" *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\" autofocus>{{ action.label }}</button>\n <button type=\"button\" *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\" autofocus>{{ action.label }}</button>\n <button type=\"button\" *ngSwitchDefault mat-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\">{{ action.label }}</button>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n<ng-template #acceptTemplate>\n <button type=\"button\" mat-stroked-button color=\"primary\" autofocus (click)=\"select('-1')\" i18n>Accept</button>\n</ng-template>", styles: [".mat-mdc-dialog-title{display:flex;align-items:center;gap:.5rem}.mat-mdc-dialog-content{display:flex;align-items:center;margin-bottom:.5rem}.mat-mdc-dialog-content ft-icon{margin-right:.5rem}.mat-mdc-dialog-actions{display:flex;align-items:center;justify-content:flex-end;padding-bottom:1.5rem}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: IconComponent, selector: "ft-icon", inputs: ["collection", "mode", "name", "path", "src", "class"] }] });
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageComponent, decorators: [{
285
- type: Component,
286
- args: [{ selector: 'ft-message', template: "<h1 mat-dialog-title class=\"ft-message__title\" *ngIf=\"data.options?.title\">\n <ft-icon *ngIf=\"data.options?.titleIcon\" [name]=\"data.options?.titleIcon?.name\"\n [collection]=\"data.options?.titleIcon?.collection\" [ngClass]=\"data.options?.titleIcon?.class\"></ft-icon>\n <div>{{ data.options?.title }}</div>\n</h1>\n<div mat-dialog-content class=\"ft-message__content\" [ngClass]=\"data.options?.class\">\n <ft-icon *ngIf=\"data.options?.icon\" [name]=\"data.options?.icon?.name\" [collection]=\"data.options?.icon?.collection\"\n [ngClass]=\"data.options?.icon?.class\"></ft-icon>\n <ng-container [ngSwitch]=\"data.message?.type\">\n <div *ngSwitchCase=\"'html'\" [innerHTML]=\"data.message?.content\"></div>\n <ng-container *ngSwitchDefault>{{ data.message?.content }}</ng-container>\n </ng-container>\n</div>\n<div mat-dialog-actions class=\"ft-message__actions\" *ngIf=\"data.options.actionsVisible\">\n <ng-container *ngIf=\"data.options?.actions?.length > 0; else acceptTemplate\">\n <ng-container *ngFor=\"let action of data.options?.actions; let i = index\">\n <ng-container [ngSwitch]=\"action.type\">\n <button type=\"button\" *ngSwitchCase=\"'raised'\" mat-raised-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\" autofocus>{{ action.label }}</button>\n <button type=\"button\" *ngSwitchCase=\"'flat'\" mat-flat-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\" autofocus>{{ action.label }}</button>\n <button type=\"button\" *ngSwitchCase=\"'stroked'\" mat-stroked-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\" autofocus>{{ action.label }}</button>\n <button type=\"button\" *ngSwitchDefault mat-button [color]=\"action.metadata?.color\"\n (click)=\"select(action.value)\">{{ action.label }}</button>\n </ng-container>\n </ng-container>\n </ng-container>\n</div>\n<ng-template #acceptTemplate>\n <button type=\"button\" mat-stroked-button color=\"primary\" autofocus (click)=\"select('-1')\" i18n>Accept</button>\n</ng-template>", styles: [".mat-mdc-dialog-title{display:flex;align-items:center;gap:.5rem}.mat-mdc-dialog-content{display:flex;align-items:center;margin-bottom:.5rem}.mat-mdc-dialog-content ft-icon{margin-right:.5rem}.mat-mdc-dialog-actions{display:flex;align-items:center;justify-content:flex-end;padding-bottom:1.5rem}\n"] }]
287
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
288
- type: Inject,
289
- args: [MAT_DIALOG_DATA]
290
- }] }]; }, propDecorators: { beforeSelect: [{
291
- type: Output
292
- }] } });
293
-
294
- class MessageService {
295
- constructor(snackBar, dialog) {
296
- this.snackBar = snackBar;
297
- this.dialog = dialog;
298
- }
299
- show(message, options) {
300
- let selectionSource = new ReplaySubject(undefined);
301
- let selection = selectionSource.asObservable();
302
- const defaults = {
303
- type: 'notification',
304
- duration: 2000,
305
- actionsVisible: true
306
- };
307
- options = Object.assign(defaults, options);
308
- const data = { message: typeof message === 'string' ? { content: message, type: 'text' } : message, options };
309
- switch (options.type) {
310
- default:
311
- case 'notification':
312
- this.snackBar.openFromComponent(MessageContentComponent, {
313
- data,
314
- panelClass: ['ft-message', 'ft-message--notification'],
315
- duration: options.duration || 2000,
316
- });
317
- break;
318
- case 'modal':
319
- const dialogRef = this.dialog.open(MessageComponent, {
320
- width: options.width || '350px',
321
- data,
322
- panelClass: ['ft-message', 'ft-message--modal'],
323
- autoFocus: false,
324
- disableClose: true
325
- });
326
- dialogRef.componentInstance.beforeSelect.subscribe((response) => {
327
- selectionSource.next(response);
328
- dialogRef.close();
329
- });
330
- this.snackBar.dismiss();
331
- break;
332
- }
333
- return selection;
334
- }
335
- }
336
- MessageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageService, deps: [{ token: i1$2.MatSnackBar }, { token: i3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
337
- MessageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageService, providedIn: 'root' });
338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: MessageService, decorators: [{
339
- type: Injectable,
340
- args: [{
341
- providedIn: 'root'
342
- }]
343
- }], ctorParameters: function () { return [{ type: i1$2.MatSnackBar }, { type: i3.MatDialog }]; } });
344
-
345
- class ProgressComponent {
346
- constructor() {
347
- this.class = '';
348
- this.mode = 'indeterminate';
349
- this.overlay = false;
350
- }
351
- ngOnInit() {
352
- this.value = 0;
353
- }
354
- get hostClasses() {
355
- return [
356
- 'ft-progress',
357
- this.overlay ? 'ft-progress--overlay' : '',
358
- this.class
359
- ].join(' ');
360
- }
361
- }
362
- ProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
363
- ProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ProgressComponent, selector: "ft-progress", inputs: { class: "class", color: "color", mode: "mode", overlay: "overlay", size: "size", value: "value" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<svg [ngStyle]=\"{'--ft-bar-color': color}\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"xMidYMid\">\n <circle class=\"ft-track\" cx=\"50\" cy=\"50\" r=\"40\" />\n <circle class=\"ft-bar\" [ngClass]=\"mode === 'determinate' ? 'ft-bar--determinate' : 'ft-bar--indeterminate'\" cx=\"50\" cy=\"50\" r=\"40\"\n [ngStyle]=\"{'stroke-dashoffset': mode=='determinate'? 'calc((3.14159265 * 40 * 2 * (100 - '+value+')) / 100)' : null}\">\n </circle>\n</svg>", styles: [":host{--ft-track-color: rgba(0, 0, 0, .08);--ft-bar-color: var(--ft-primary-color);line-height:0;display:inline-block}:host.ft-progress--1{font-size:1rem}:host.ft-progress--2{font-size:1.5rem}:host.ft-progress--3{font-size:2rem}:host.ft-progress--4{font-size:3rem}:host.ft-progress--5{font-size:4.5rem}:host.ft-progress--6{font-size:8rem}:host.ft-progress--7{font-size:16rem}:host.ft-progress--8{font-size:32rem}:host.ft-progress--overlay{position:fixed;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:var(--ft-z-index-modal, 1000);inset:0;font-size:42px}:host.ft-progress--overlay svg{background:rgba(255,255,255,.6);-webkit-backdrop-filter:saturate(50%) blur(3px);backdrop-filter:saturate(50%) blur(3px);box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f;border-radius:100vh;padding:.3125rem;animation:ft-progress-reveal .2s;animation-fill-mode:forwards}:host.ft-progress--overlay svg .ft-track{display:none}svg{width:1em;height:1em;vertical-align:middle}svg .ft-track{fill:none;stroke-width:10;stroke:var(--ft-track-color)}svg .ft-bar{fill:none;stroke-opacity:.9;stroke-width:6;stroke:var(--ft-bar-color)}svg .ft-bar.ft-bar--indeterminate{animation:ft-progress-rotation 2s infinite linear}svg .ft-bar.ft-bar--determinate{stroke-dasharray:251.327412288}@keyframes ft-progress-reveal{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes ft-progress-rotation{0%{stroke-dashoffset:0;stroke-dasharray:150.6 100.4}50%{stroke-dasharray:1 250}to{stroke-dashoffset:502;stroke-dasharray:150.6 100.4}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ProgressComponent, decorators: [{
365
- type: Component,
366
- args: [{ selector: 'ft-progress', template: "<svg [ngStyle]=\"{'--ft-bar-color': color}\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"xMidYMid\">\n <circle class=\"ft-track\" cx=\"50\" cy=\"50\" r=\"40\" />\n <circle class=\"ft-bar\" [ngClass]=\"mode === 'determinate' ? 'ft-bar--determinate' : 'ft-bar--indeterminate'\" cx=\"50\" cy=\"50\" r=\"40\"\n [ngStyle]=\"{'stroke-dashoffset': mode=='determinate'? 'calc((3.14159265 * 40 * 2 * (100 - '+value+')) / 100)' : null}\">\n </circle>\n</svg>", styles: [":host{--ft-track-color: rgba(0, 0, 0, .08);--ft-bar-color: var(--ft-primary-color);line-height:0;display:inline-block}:host.ft-progress--1{font-size:1rem}:host.ft-progress--2{font-size:1.5rem}:host.ft-progress--3{font-size:2rem}:host.ft-progress--4{font-size:3rem}:host.ft-progress--5{font-size:4.5rem}:host.ft-progress--6{font-size:8rem}:host.ft-progress--7{font-size:16rem}:host.ft-progress--8{font-size:32rem}:host.ft-progress--overlay{position:fixed;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:var(--ft-z-index-modal, 1000);inset:0;font-size:42px}:host.ft-progress--overlay svg{background:rgba(255,255,255,.6);-webkit-backdrop-filter:saturate(50%) blur(3px);backdrop-filter:saturate(50%) blur(3px);box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f;border-radius:100vh;padding:.3125rem;animation:ft-progress-reveal .2s;animation-fill-mode:forwards}:host.ft-progress--overlay svg .ft-track{display:none}svg{width:1em;height:1em;vertical-align:middle}svg .ft-track{fill:none;stroke-width:10;stroke:var(--ft-track-color)}svg .ft-bar{fill:none;stroke-opacity:.9;stroke-width:6;stroke:var(--ft-bar-color)}svg .ft-bar.ft-bar--indeterminate{animation:ft-progress-rotation 2s infinite linear}svg .ft-bar.ft-bar--determinate{stroke-dasharray:251.327412288}@keyframes ft-progress-reveal{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes ft-progress-rotation{0%{stroke-dashoffset:0;stroke-dasharray:150.6 100.4}50%{stroke-dasharray:1 250}to{stroke-dashoffset:502;stroke-dasharray:150.6 100.4}}\n"] }]
367
- }], ctorParameters: function () { return []; }, propDecorators: { class: [{
368
- type: Input
369
- }], color: [{
370
- type: Input
371
- }], mode: [{
372
- type: Input
373
- }], overlay: [{
374
- type: Input
375
- }], size: [{
376
- type: Input
377
- }], value: [{
378
- type: Input
379
- }], hostClasses: [{
380
- type: HostBinding,
381
- args: ['class']
382
- }] } });
383
-
384
- class ProgressService {
385
- constructor(viewContainerRef, injector) {
386
- this.viewContainerRef = viewContainerRef;
387
- this.injector = injector;
388
- }
389
- show() {
390
- if (!this.componentRef) {
391
- this.appRef = this.injector.get(ApplicationRef);
392
- // 1. Create a component reference from the component
393
- this.componentRef = this.viewContainerRef.createComponent(ProgressComponent);
394
- // 2. Attach component to the appRef so that it's inside the ng component tree
395
- this.appRef.attachView(this.componentRef.hostView);
396
- this.componentRef.instance.overlay = true;
397
- // 3. Get DOM element from component
398
- const domElem = this.componentRef.hostView
399
- .rootNodes[0];
400
- // 4. Append DOM element to the body
401
- document.body.appendChild(domElem);
402
- return true;
403
- }
404
- else {
405
- return false;
406
- }
407
- }
408
- hide() {
409
- if (this.componentRef) {
410
- this.appRef.detachView(this.componentRef.hostView);
411
- this.componentRef.destroy();
412
- this.componentRef = null;
413
- return true;
414
- }
415
- else {
416
- return false;
417
- }
418
- }
419
- }
420
- ProgressService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ProgressService, deps: [{ token: i0.ViewContainerRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
421
- ProgressService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ProgressService, providedIn: 'root' });
422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ProgressService, decorators: [{
423
- type: Injectable,
424
- args: [{
425
- providedIn: 'root'
426
- }]
427
- }], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.Injector }]; } });
428
-
429
- class ObserveIntersectingDirective {
430
- constructor(element, platformId) {
431
- this.element = element;
432
- this.platformId = platformId;
433
- this.event = new EventEmitter();
434
- }
435
- ngOnInit() {
436
- if (isPlatformBrowser(this.platformId)) {
437
- if ("IntersectionObserver" in window) {
438
- const elementObserver = new IntersectionObserver((entries, observer) => {
439
- entries.forEach((entry) => {
440
- this.event.emit(entry.isIntersecting);
441
- });
442
- }, this.options);
443
- elementObserver.observe(this.element.nativeElement);
444
- }
445
- else {
446
- console.error('ftObserveIntersecting not available in this browser.');
447
- }
448
- }
449
- }
450
- }
451
- ObserveIntersectingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveIntersectingDirective, deps: [{ token: i0.ElementRef }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
452
- ObserveIntersectingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ObserveIntersectingDirective, selector: "[ftObserveIntersecting]", inputs: { options: ["ftObserveIntersectingOptions", "options"] }, outputs: { event: "ftObserveIntersecting" }, ngImport: i0 });
453
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ObserveIntersectingDirective, decorators: [{
454
- type: Directive,
455
- args: [{
456
- selector: '[ftObserveIntersecting]'
457
- }]
458
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: Object, decorators: [{
459
- type: Inject,
460
- args: [PLATFORM_ID]
461
- }] }]; }, propDecorators: { options: [{
462
- type: Input,
463
- args: ['ftObserveIntersectingOptions']
464
- }], event: [{
465
- type: Output,
466
- args: ['ftObserveIntersecting']
467
- }] } });
468
-
469
- class RatingComponent {
470
- constructor() {
471
- this.disabled = false;
472
- this.propagateChange = (_) => { };
473
- this.readOnly = false;
474
- this.stars = [
475
- { value: 1 },
476
- { value: 2 },
477
- { value: 3 },
478
- { value: 4 },
479
- { value: 5 }
480
- ];
481
- }
482
- ngOnInit() {
483
- }
484
- get value() {
485
- return this._value;
486
- }
487
- set value(value) {
488
- this._value = value;
489
- this.propagateChange(this._value);
490
- }
491
- registerOnChange(fn) {
492
- this.propagateChange = fn;
493
- }
494
- registerOnTouched(fn) {
495
- //this.propagateChange = fn;
496
- }
497
- setDisabledState(isDisabled) {
498
- this.disabled = isDisabled;
499
- }
500
- setRate(value, isHover) {
501
- if (isHover) {
502
- this.hoverValue = value;
503
- }
504
- else {
505
- this.value = value;
506
- }
507
- }
508
- updateValue(event) {
509
- this.value = event.target.value;
510
- }
511
- writeValue(value) {
512
- this.value = value;
513
- }
514
- }
515
- RatingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RatingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
516
- RatingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: RatingComponent, selector: "ft-rating", inputs: { readOnly: "readOnly", value: "value" }, ngImport: i0, template: "<ng-container *ngFor=\"let star of stars\">\n <ng-container *ngTemplateOutlet=\"!readOnly? buttonTemplate : starTemplate; context:{star:star}\"></ng-container>\n</ng-container>\n<ng-template #buttonTemplate let-star=\"star\">\n <button type=\"button\" class=\"ft-rating__item\" *ngIf=\"!readOnly; else starTemplate\" [disabled]=\"disabled\"\n (mouseover)=\"setRate(star.value, true)\" (focus)=\"setRate(star.value, true)\" (blur)=\"setRate(0, true)\"\n (mouseout)=\"setRate(0, true)\" (click)=\"setRate(star.value)\">\n <ng-container *ngTemplateOutlet=\"starTemplate; context:{star:star}\"></ng-container>\n </button>\n</ng-template>\n<ng-template #starTemplate let-star=\"star\">\n <svg [ngClass]=\"{'ft-rating__item-icon--hover': hoverValue >= star.value, 'ft-rating__item-icon--active': value >= star.value}\" viewBox=\"0 0 24 24\">\n <path\n d=\"M17.93 21.315c-.534.408-5.22-3.186-5.881-3.181-.663 0-5.307 3.656-5.846 3.254-.537-.403 1.29-6.165 1.081-6.822-.209-.656-4.972-4.138-4.772-4.796.201-.658 6.015-.627 6.55-1.036.533-.41 2.233-6.215 2.895-6.219.663 0 2.43 5.779 2.968 6.182.539.403 6.352.297 6.56.953.21.656-4.513 4.197-4.714 4.856-.2.658 1.692 6.398 1.159 6.808z\" />\n </svg>\n</ng-template>", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
517
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: RatingComponent, decorators: [{
518
- type: Component,
519
- args: [{ selector: 'ft-rating', template: "<ng-container *ngFor=\"let star of stars\">\n <ng-container *ngTemplateOutlet=\"!readOnly? buttonTemplate : starTemplate; context:{star:star}\"></ng-container>\n</ng-container>\n<ng-template #buttonTemplate let-star=\"star\">\n <button type=\"button\" class=\"ft-rating__item\" *ngIf=\"!readOnly; else starTemplate\" [disabled]=\"disabled\"\n (mouseover)=\"setRate(star.value, true)\" (focus)=\"setRate(star.value, true)\" (blur)=\"setRate(0, true)\"\n (mouseout)=\"setRate(0, true)\" (click)=\"setRate(star.value)\">\n <ng-container *ngTemplateOutlet=\"starTemplate; context:{star:star}\"></ng-container>\n </button>\n</ng-template>\n<ng-template #starTemplate let-star=\"star\">\n <svg [ngClass]=\"{'ft-rating__item-icon--hover': hoverValue >= star.value, 'ft-rating__item-icon--active': value >= star.value}\" viewBox=\"0 0 24 24\">\n <path\n d=\"M17.93 21.315c-.534.408-5.22-3.186-5.881-3.181-.663 0-5.307 3.656-5.846 3.254-.537-.403 1.29-6.165 1.081-6.822-.209-.656-4.972-4.138-4.772-4.796.201-.658 6.015-.627 6.55-1.036.533-.41 2.233-6.215 2.895-6.219.663 0 2.43 5.779 2.968 6.182.539.403 6.352.297 6.56.953.21.656-4.513 4.197-4.714 4.856-.2.658 1.692 6.398 1.159 6.808z\" />\n </svg>\n</ng-template>" }]
520
- }], ctorParameters: function () { return []; }, propDecorators: { readOnly: [{
521
- type: Input
522
- }], value: [{
523
- type: Input
524
- }] } });
525
-
526
- class TimelineComponent {
527
- constructor() {
528
- this.startDate = new Date();
529
- this.data = [];
530
- this.dataParsed = {
531
- months: [],
532
- days: [],
533
- weekends: []
534
- };
535
- this.class = '';
536
- }
537
- get hostClasses() {
538
- return [
539
- 'ft-timeline',
540
- this.class
541
- ].join(' ');
542
- }
543
- ;
544
- ngOnInit() {
545
- this.addMonth(this.calcStartDate());
546
- }
547
- addMonth(date) {
548
- const month = this.getMonth(date.getMonth(), date.getFullYear());
549
- const currentDays = this.dataParsed.days.length;
550
- this.dataParsed.months = [...this.dataParsed.months, { date: month.days[0], daysInMonth: month.days.length }];
551
- this.dataParsed.days = [...this.dataParsed.days, ...month.days];
552
- this.dataParsed.weekends = [...this.dataParsed.weekends, ...month.weekends];
553
- if (!this.currentDate && month.currentDate) {
554
- this.currentDate = currentDays + month.currentDate;
555
- }
556
- this.dataParsed.days.some((day, index) => {
557
- if ([0, 6].includes(day.getDay())) {
558
- this.dataParsed.weekendStart = index;
559
- return true;
560
- }
561
- return false;
562
- });
563
- this.parseTasks();
564
- }
565
- calcStartDate() {
566
- return new Date();
567
- }
568
- getMonth(month, year) {
569
- const days = [];
570
- const weekends = [];
571
- let currentDate = null;
572
- let today = new Date();
573
- const date = new Date(year, month + 1, 0);
574
- for (let i = 1; i <= date.getDate(); i++) {
575
- const idate = new Date(year, month, i);
576
- if ([0, 6].includes(idate.getDay())) {
577
- if (idate.getDay() === 6) {
578
- weekends.push([idate]);
579
- }
580
- else {
581
- weekends[weekends.length - 1].push(idate);
582
- }
583
- }
584
- if (idate.getTime() === new Date(today.getFullYear(), today.getMonth(), today.getDate()).getTime()) {
585
- currentDate = i - 1;
586
- }
587
- days.push(idate);
588
- }
589
- const data = { days, weekends };
590
- if (currentDate) {
591
- data.currentDate = currentDate;
592
- }
593
- return data;
594
- }
595
- parseTasks() {
596
- let tasks = this.data.filter(task => task.endAt) /*.sort((a, b) => a.)*/;
597
- this.dataParsed.tasks = tasks.map((task) => {
598
- return {
599
- label: task.label,
600
- start: 10,
601
- type: task.type,
602
- size: 1
603
- };
604
- });
605
- }
606
- }
607
- TimelineComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
608
- TimelineComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: TimelineComponent, selector: "ft-timeline", inputs: { data: "data", class: "class" }, host: { properties: { "style.--current-date": "this.currentDate", "class": "this.hostClasses" } }, ngImport: i0, template: "<div class=\"ft-weekends\" [style.--start]=\"dataParsed.weekendStart\">\n <div class=\"ft-weekends__item\" [style.--weekend-size]=\"weekend.length\" *ngFor=\"let weekend of dataParsed.weekends\">\n </div>\n</div>\n<div class=\"ft-current-date\" *ngIf=\"currentDate\"></div>\n<div class=\"ft-header\">\n <div class=\"ft-header__months\">\n <div [style.--days-in-month]=\"month.daysInMonth\" *ngFor=\"let month of dataParsed.months; let i = index\">{{\n month.date\n | date: 'MMMM, yyyy' }}</div>\n </div>\n <div class=\"ft-header__days\">\n <div *ngFor=\"let day of dataParsed.days; let i = index\">\n <div [ngClass]=\"{active: currentDate && currentDate === i}\">{{ day | date:'d' }}</div>\n </div>\n </div>\n</div>\n<div class=\"ft-tasks\">\n <button type=\"button\" class=\"ft-tasks__item\" [class.tasks__item--milestone]=\"task.type === 'milestone'\"\n [style.--start]=\"task.start\" [style.--days]=\"task.type === 'milestone' ? 1 : task.size\"\n style=\" --color-rgb: 130, 121, 210;\" *ngFor=\"let task of dataParsed.tasks;\">{{ task.label }}</button>\n</div>", styles: [":host{position:relative;display:flex;flex-direction:column;--background-color: #fff;--column-width: 30px;--current-date-color: #ff9800}.ft-header{background-color:var(--background-color);border-bottom:1px solid rgba(0,0,0,.1);font-size:.75rem;font-weight:100;padding-bottom:.25rem;position:sticky;top:0;z-index:4;width:-moz-fit-content;width:fit-content}.ft-header__months{display:flex}.ft-header__months>div{background-color:var(--background-color);box-sizing:border-box;font-weight:400;padding:.5rem;white-space:nowrap;width:calc(var(--column-width) * var(--days-in-month))}.ft-header__days{display:flex}.ft-header__days>div{display:flex;align-items:center;justify-content:center;min-width:var(--column-width);padding:.25rem;border-radius:100vh;box-sizing:border-box}.ft-header__days>div>.ft-active{display:flex;align-items:center;justify-content:center;width:100%;height:20px;background-color:var(--current-date-color);color:var(--background-color);border-radius:100vh;box-sizing:border-box}.ft-weekends{position:absolute;inset:0;display:flex;padding-left:calc(var(--column-width) * var(--start))}.ft-weekends__item{min-width:calc(var(--column-width) * var(--weekend-size, 2));background-image:url(https://factor.ec/timesheet/es/bg-weekend.aff6b9d13e42ca0e1023.svg);background-size:25px;z-index:1;top:0;bottom:0}.ft-weekends__item~.ft-weekends__item{margin-left:calc(var(--column-width) * 5)}.ft-current-date{position:absolute;width:var(--column-width);left:calc(var(--column-width) * var(--current-date));z-index:2;top:0;bottom:0;background-color:var(--current-date-color);opacity:.1}.ft-tasks{position:relative;z-index:3;display:flex;padding-top:.5rem;gap:.5rem;flex-direction:column}.ft-tasks__item{border:1px solid transparent;height:28px;background-color:var(--background-color);background-image:linear-gradient(rgba(var(--color-rgb),.1),rgba(var(--color-rgb),.1));border-radius:.25rem;width:calc(var(--column-width) * var(--days));margin-left:calc(var(--column-width) * var(--start));white-space:nowrap;font-size:.875rem;display:flex;align-items:center;padding:0 8px;cursor:pointer;box-sizing:border-box}.ft-tasks__item:hover:not(.tasks__item--milestone){background-image:linear-gradient(rgba(var(--color-rgb),.2),rgba(var(--color-rgb),.2))}.ft-tasks__item:focus:not(.tasks__item--milestone),.ft-tasks__item:active:not(.tasks__item--milestone){background-image:linear-gradient(rgba(var(--color-rgb),.3),rgba(var(--color-rgb),.3))}.ft-tasks__item--milestone{background-color:unset;background-image:unset}.ft-tasks__item--milestone:before{border-radius:6px;min-height:12px;min-width:12px;margin-right:.5rem;content:\"\";background-color:rgba(var(--color-rgb),1)}.ft-tasks__item--milestone:hover:before{transform:scale(1.2)}.ft-tasks__item--milestone:focus:before,.ft-tasks__item--milestone:active:before{transform:scale(.9)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
609
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: TimelineComponent, decorators: [{
610
- type: Component,
611
- args: [{ selector: 'ft-timeline', template: "<div class=\"ft-weekends\" [style.--start]=\"dataParsed.weekendStart\">\n <div class=\"ft-weekends__item\" [style.--weekend-size]=\"weekend.length\" *ngFor=\"let weekend of dataParsed.weekends\">\n </div>\n</div>\n<div class=\"ft-current-date\" *ngIf=\"currentDate\"></div>\n<div class=\"ft-header\">\n <div class=\"ft-header__months\">\n <div [style.--days-in-month]=\"month.daysInMonth\" *ngFor=\"let month of dataParsed.months; let i = index\">{{\n month.date\n | date: 'MMMM, yyyy' }}</div>\n </div>\n <div class=\"ft-header__days\">\n <div *ngFor=\"let day of dataParsed.days; let i = index\">\n <div [ngClass]=\"{active: currentDate && currentDate === i}\">{{ day | date:'d' }}</div>\n </div>\n </div>\n</div>\n<div class=\"ft-tasks\">\n <button type=\"button\" class=\"ft-tasks__item\" [class.tasks__item--milestone]=\"task.type === 'milestone'\"\n [style.--start]=\"task.start\" [style.--days]=\"task.type === 'milestone' ? 1 : task.size\"\n style=\" --color-rgb: 130, 121, 210;\" *ngFor=\"let task of dataParsed.tasks;\">{{ task.label }}</button>\n</div>", styles: [":host{position:relative;display:flex;flex-direction:column;--background-color: #fff;--column-width: 30px;--current-date-color: #ff9800}.ft-header{background-color:var(--background-color);border-bottom:1px solid rgba(0,0,0,.1);font-size:.75rem;font-weight:100;padding-bottom:.25rem;position:sticky;top:0;z-index:4;width:-moz-fit-content;width:fit-content}.ft-header__months{display:flex}.ft-header__months>div{background-color:var(--background-color);box-sizing:border-box;font-weight:400;padding:.5rem;white-space:nowrap;width:calc(var(--column-width) * var(--days-in-month))}.ft-header__days{display:flex}.ft-header__days>div{display:flex;align-items:center;justify-content:center;min-width:var(--column-width);padding:.25rem;border-radius:100vh;box-sizing:border-box}.ft-header__days>div>.ft-active{display:flex;align-items:center;justify-content:center;width:100%;height:20px;background-color:var(--current-date-color);color:var(--background-color);border-radius:100vh;box-sizing:border-box}.ft-weekends{position:absolute;inset:0;display:flex;padding-left:calc(var(--column-width) * var(--start))}.ft-weekends__item{min-width:calc(var(--column-width) * var(--weekend-size, 2));background-image:url(https://factor.ec/timesheet/es/bg-weekend.aff6b9d13e42ca0e1023.svg);background-size:25px;z-index:1;top:0;bottom:0}.ft-weekends__item~.ft-weekends__item{margin-left:calc(var(--column-width) * 5)}.ft-current-date{position:absolute;width:var(--column-width);left:calc(var(--column-width) * var(--current-date));z-index:2;top:0;bottom:0;background-color:var(--current-date-color);opacity:.1}.ft-tasks{position:relative;z-index:3;display:flex;padding-top:.5rem;gap:.5rem;flex-direction:column}.ft-tasks__item{border:1px solid transparent;height:28px;background-color:var(--background-color);background-image:linear-gradient(rgba(var(--color-rgb),.1),rgba(var(--color-rgb),.1));border-radius:.25rem;width:calc(var(--column-width) * var(--days));margin-left:calc(var(--column-width) * var(--start));white-space:nowrap;font-size:.875rem;display:flex;align-items:center;padding:0 8px;cursor:pointer;box-sizing:border-box}.ft-tasks__item:hover:not(.tasks__item--milestone){background-image:linear-gradient(rgba(var(--color-rgb),.2),rgba(var(--color-rgb),.2))}.ft-tasks__item:focus:not(.tasks__item--milestone),.ft-tasks__item:active:not(.tasks__item--milestone){background-image:linear-gradient(rgba(var(--color-rgb),.3),rgba(var(--color-rgb),.3))}.ft-tasks__item--milestone{background-color:unset;background-image:unset}.ft-tasks__item--milestone:before{border-radius:6px;min-height:12px;min-width:12px;margin-right:.5rem;content:\"\";background-color:rgba(var(--color-rgb),1)}.ft-tasks__item--milestone:hover:before{transform:scale(1.2)}.ft-tasks__item--milestone:focus:before,.ft-tasks__item--milestone:active:before{transform:scale(.9)}\n"] }]
612
- }], ctorParameters: function () { return []; }, propDecorators: { data: [{
613
- type: Input
614
- }], currentDate: [{
615
- type: HostBinding,
616
- args: ['style.--current-date']
617
- }], class: [{
618
- type: Input
619
- }], hostClasses: [{
620
- type: HostBinding,
621
- args: ['class']
622
- }] } });
623
-
624
- class ExpressionBuilderComponent {
625
- constructor() {
626
- this.properties = [
627
- { label: 'Nombre', type: 'string', field: 'name' },
628
- { label: 'Monto', type: 'number', field: 'amount' },
629
- { label: 'Tarjeta adicional', type: 'boolean', field: 'additional' }
630
- ];
631
- this.groupOperators = [
632
- { label: 'Y', value: 'AND' },
633
- { label: 'O', value: 'OR' }
634
- ];
635
- this.filters = {
636
- id: 'root',
637
- type: 'group',
638
- operator: 'AND',
639
- children: [
640
- {
641
- type: 'filter',
642
- property: '',
643
- operator: '>',
644
- value: ''
645
- },
646
- {
647
- type: 'filter',
648
- property: '',
649
- operator: true,
650
- value: ''
651
- },
652
- {
653
- type: 'filter',
654
- property: '',
655
- operator: '==',
656
- value: ''
657
- },
658
- {
659
- type: 'group',
660
- operator: 'OR',
661
- children: [
662
- {
663
- type: 'filter',
664
- property: '',
665
- operator: '==',
666
- value: ''
667
- }
668
- ]
669
- }
670
- ]
671
- };
672
- }
673
- add(type, filter) {
674
- if (!filter.children) {
675
- filter.children = [];
676
- }
677
- filter.children.push({ type });
678
- filter.children = filter.children.sort((a, b) => a.type !== 'group' ? -1 : 0);
679
- }
680
- remove(filter, parent) {
681
- const index = parent.indexOf(filter);
682
- parent.splice(index, 1);
683
- }
684
- }
685
- ExpressionBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ExpressionBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
686
- ExpressionBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ExpressionBuilderComponent, selector: "ft-expression-builder", ngImport: i0, template: "<ng-container [ngTemplateOutlet]=\"filterGroupTemplate\" [ngTemplateOutletContext]=\"{filter:filters, parent:null}\">\n</ng-container>\n<ng-template #filterGroupTemplate let-filter=\"filter\" let-parent=\"parent\">\n <div class=\"ft-filter\">\n <div class=\"ft-filter__tools\">\n <button type=\"button\" class=\"filter__button filter__button--icon filter__button--toggle\"\n (click)=\"filter.collapsed = !filter.collapsed\" *ngIf=\"filter.children && filter.children.length > 0\">\n <ft-icon name=\"angle-right\" [ngClass]=\"{'ft-icon--open': !filter.collapsed}\"></ft-icon>\n </button>\n <div class=\"ft-filter__button-group\">\n <button type=\"button\" class=\"filter__button\"\n [ngClass]=\"{'ft-filter__button--active': filter.operator === operator.value}\"\n *ngFor=\"let operator of groupOperators\" (click)=\"filter.operator = operator.value\">{{ operator.label\n }}</button>\n </div>\n <button type=\"button\" class=\"ft-filter__button\" (click)=\"add('filter', filter)\" *ngIf=\"filter.operator\">Agregar\n filtro</button>\n <button type=\"button\" class=\"ft-filter__button\" (click)=\"add('group', filter)\" *ngIf=\"filter.operator\">Agregar\n grupo</button>\n <button type=\"button\" class=\"ft-filter__button filter__button--icon filter__button--remove\"\n (click)=\"remove(filter, parent)\" *ngIf=\"parent\">\n <ft-icon name=\"close\"></ft-icon>\n </button>\n </div>\n <div class=\"ft-filter__children\" *ngIf=\"filter.children && filter.children.length > 0 && !filter.collapsed\">\n <ng-container *ngFor=\"let child of filter.children\">\n <ng-container [ngTemplateOutlet]=\"child.type === 'group' ? filterGroupTemplate : filterTemplate\"\n [ngTemplateOutletContext]=\"{filter:child, parent:filter.children}\">\n </ng-container>\n </ng-container>\n </div>\n </div>\n</ng-template>\n<ng-template #filterTemplate let-filter=\"filter\" let-parent=\"parent\">\n <div class=\"ft-filter\">\n <div class=\"ft-filter__tools\">\n <select class=\"filter__input\">\n <option *ngFor=\"let property of properties\" value=\"property.value\">{{ property.label }}</option>\n </select>\n <select class=\"ft-filter__input\">\n <option>Mayor que</option>\n <option>Mayor igual que</option>\n <option>Igual que</option>\n <option>Menor que</option>\n <option>Menor igual que</option>\n </select>\n <input type=\"text\" class=\"ft-filter__input\" />\n <button type=\"button\" class=\"filter__button filter__button--icon\" (click)=\"remove(filter, parent)\">\n <ft-icon name=\"close\"></ft-icon>\n </button>\n </div>\n </div>\n</ng-template>", styles: [":host{display:block;padding:2rem}.ft-filter{--focus-color: #00bcd4;--focus-color-rgb: 0, 188, 212;display:inline-flex;flex-direction:column;align-items:flex-start;gap:.5rem}.ft-filter__tools{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem;background-color:#0000000d;border:1px solid rgba(0,0,0,.1);border-radius:.5rem;overflow:hidden}.ft-filter__children{padding-left:1rem;position:relative;display:inline-flex;flex-direction:column;align-items:flex-start;gap:.5rem}.ft-filter__button{border:1px solid rgba(0,0,0,.2);background-color:transparent;border-radius:.25rem;padding:.25rem .5rem;background-color:#ffffff4d}.ft-filter__button--icon{border-color:transparent;background-color:transparent;padding:.25rem}.ft-filter__button--active{background-color:var(--focus-color);color:#fff}.ft-filter__button:not(.ft-filter__button--active):hover{border-color:var(--focus-color);background-color:rgba(var(--focus-color-rgb),.1)}.ft-filter__button:not(.ft-filter__button--active):active{background-color:rgba(var(--focus-color-rgb),.3)}.ft-filter__button:focus{outline:none;border-color:var(--focus-color)}.ft-filter__button .ft-icon{display:block;transition:transform .2s}.ft-filter__button .ft-icon--open{transform:rotate(90deg)}.ft-filter__button-group .ft-filter__button{border-radius:0}.ft-filter__button-group .ft-filter__button:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-right:0}.ft-filter__button-group .ft-filter__button:last-child{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.ft-filter__input{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:.25rem;padding:.25rem;transition:box-shadow .2s}.ft-filter__input:hover{border-color:var(--focus-color)}.ft-filter__input:focus{outline:none;border-color:var(--focus-color);box-shadow:0 0 0 2px rgba(var(--focus-color-rgb),.2)}.ft-filter select.ft-filter__input{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .5rem center;background-size:.625rem;padding-right:1.5rem;-webkit-appearance:none;appearance:none}@keyframes slide-right{0%{margin-left:calc(-40px + .5rem)}to{margin-left:0}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "ft-icon", inputs: ["collection", "mode", "name", "path", "src", "class"] }] });
687
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ExpressionBuilderComponent, decorators: [{
688
- type: Component,
689
- args: [{ selector: 'ft-expression-builder', template: "<ng-container [ngTemplateOutlet]=\"filterGroupTemplate\" [ngTemplateOutletContext]=\"{filter:filters, parent:null}\">\n</ng-container>\n<ng-template #filterGroupTemplate let-filter=\"filter\" let-parent=\"parent\">\n <div class=\"ft-filter\">\n <div class=\"ft-filter__tools\">\n <button type=\"button\" class=\"filter__button filter__button--icon filter__button--toggle\"\n (click)=\"filter.collapsed = !filter.collapsed\" *ngIf=\"filter.children && filter.children.length > 0\">\n <ft-icon name=\"angle-right\" [ngClass]=\"{'ft-icon--open': !filter.collapsed}\"></ft-icon>\n </button>\n <div class=\"ft-filter__button-group\">\n <button type=\"button\" class=\"filter__button\"\n [ngClass]=\"{'ft-filter__button--active': filter.operator === operator.value}\"\n *ngFor=\"let operator of groupOperators\" (click)=\"filter.operator = operator.value\">{{ operator.label\n }}</button>\n </div>\n <button type=\"button\" class=\"ft-filter__button\" (click)=\"add('filter', filter)\" *ngIf=\"filter.operator\">Agregar\n filtro</button>\n <button type=\"button\" class=\"ft-filter__button\" (click)=\"add('group', filter)\" *ngIf=\"filter.operator\">Agregar\n grupo</button>\n <button type=\"button\" class=\"ft-filter__button filter__button--icon filter__button--remove\"\n (click)=\"remove(filter, parent)\" *ngIf=\"parent\">\n <ft-icon name=\"close\"></ft-icon>\n </button>\n </div>\n <div class=\"ft-filter__children\" *ngIf=\"filter.children && filter.children.length > 0 && !filter.collapsed\">\n <ng-container *ngFor=\"let child of filter.children\">\n <ng-container [ngTemplateOutlet]=\"child.type === 'group' ? filterGroupTemplate : filterTemplate\"\n [ngTemplateOutletContext]=\"{filter:child, parent:filter.children}\">\n </ng-container>\n </ng-container>\n </div>\n </div>\n</ng-template>\n<ng-template #filterTemplate let-filter=\"filter\" let-parent=\"parent\">\n <div class=\"ft-filter\">\n <div class=\"ft-filter__tools\">\n <select class=\"filter__input\">\n <option *ngFor=\"let property of properties\" value=\"property.value\">{{ property.label }}</option>\n </select>\n <select class=\"ft-filter__input\">\n <option>Mayor que</option>\n <option>Mayor igual que</option>\n <option>Igual que</option>\n <option>Menor que</option>\n <option>Menor igual que</option>\n </select>\n <input type=\"text\" class=\"ft-filter__input\" />\n <button type=\"button\" class=\"filter__button filter__button--icon\" (click)=\"remove(filter, parent)\">\n <ft-icon name=\"close\"></ft-icon>\n </button>\n </div>\n </div>\n</ng-template>", styles: [":host{display:block;padding:2rem}.ft-filter{--focus-color: #00bcd4;--focus-color-rgb: 0, 188, 212;display:inline-flex;flex-direction:column;align-items:flex-start;gap:.5rem}.ft-filter__tools{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem;background-color:#0000000d;border:1px solid rgba(0,0,0,.1);border-radius:.5rem;overflow:hidden}.ft-filter__children{padding-left:1rem;position:relative;display:inline-flex;flex-direction:column;align-items:flex-start;gap:.5rem}.ft-filter__button{border:1px solid rgba(0,0,0,.2);background-color:transparent;border-radius:.25rem;padding:.25rem .5rem;background-color:#ffffff4d}.ft-filter__button--icon{border-color:transparent;background-color:transparent;padding:.25rem}.ft-filter__button--active{background-color:var(--focus-color);color:#fff}.ft-filter__button:not(.ft-filter__button--active):hover{border-color:var(--focus-color);background-color:rgba(var(--focus-color-rgb),.1)}.ft-filter__button:not(.ft-filter__button--active):active{background-color:rgba(var(--focus-color-rgb),.3)}.ft-filter__button:focus{outline:none;border-color:var(--focus-color)}.ft-filter__button .ft-icon{display:block;transition:transform .2s}.ft-filter__button .ft-icon--open{transform:rotate(90deg)}.ft-filter__button-group .ft-filter__button{border-radius:0}.ft-filter__button-group .ft-filter__button:first-child{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-right:0}.ft-filter__button-group .ft-filter__button:last-child{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.ft-filter__input{background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:.25rem;padding:.25rem;transition:box-shadow .2s}.ft-filter__input:hover{border-color:var(--focus-color)}.ft-filter__input:focus{outline:none;border-color:var(--focus-color);box-shadow:0 0 0 2px rgba(var(--focus-color-rgb),.2)}.ft-filter select.ft-filter__input{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e\");background-repeat:no-repeat;background-position:right .5rem center;background-size:.625rem;padding-right:1.5rem;-webkit-appearance:none;appearance:none}@keyframes slide-right{0%{margin-left:calc(-40px + .5rem)}to{margin-left:0}}\n"] }]
690
- }], ctorParameters: function () { return []; } });
691
-
692
- class IoModule {
693
- }
694
- IoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: IoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
695
- IoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: IoModule, declarations: [AvatarComponent,
696
- IconComponent,
697
- ImageComponent,
698
- MessageComponent,
699
- ProgressComponent,
700
- RatingComponent,
701
- ObserveIntersectingDirective,
702
- TimelineComponent,
703
- MessageContentComponent,
704
- ExpressionBuilderComponent], imports: [CommonModule,
705
- MatButtonModule,
706
- MatDialogModule,
707
- MatSnackBarModule], exports: [AvatarComponent,
708
- IconComponent,
709
- ImageComponent,
710
- MessageComponent,
711
- ProgressComponent,
712
- RatingComponent,
713
- ObserveIntersectingDirective,
714
- TimelineComponent,
715
- MessageContentComponent,
716
- ExpressionBuilderComponent] });
717
- IoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: IoModule, imports: [CommonModule,
718
- MatButtonModule,
719
- MatDialogModule,
720
- MatSnackBarModule] });
721
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: IoModule, decorators: [{
722
- type: NgModule,
723
- args: [{
724
- declarations: [
725
- AvatarComponent,
726
- IconComponent,
727
- ImageComponent,
728
- MessageComponent,
729
- ProgressComponent,
730
- RatingComponent,
731
- ObserveIntersectingDirective,
732
- TimelineComponent,
733
- MessageContentComponent,
734
- ExpressionBuilderComponent
735
- ],
736
- imports: [
737
- CommonModule,
738
- MatButtonModule,
739
- MatDialogModule,
740
- MatSnackBarModule
741
- ],
742
- exports: [
743
- AvatarComponent,
744
- IconComponent,
745
- ImageComponent,
746
- MessageComponent,
747
- ProgressComponent,
748
- RatingComponent,
749
- ObserveIntersectingDirective,
750
- TimelineComponent,
751
- MessageContentComponent,
752
- ExpressionBuilderComponent
753
- ]
754
- }]
755
- }] });
756
-
757
- class CollapsibleComponent {
758
- constructor() {
759
- this.class = '';
760
- this.expanded = true;
761
- this.header = '';
762
- }
763
- get hostClasses() {
764
- return [
765
- 'ft-collapsible',
766
- this.expanded ? 'ft-collapsible--show' : '',
767
- this.class
768
- ].join(' ');
769
- }
770
- ;
771
- toggleCollapsible() {
772
- this.expanded = !this.expanded;
773
- }
774
- }
775
- CollapsibleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CollapsibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
776
- CollapsibleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: CollapsibleComponent, selector: "ft-collapsible", inputs: { class: "class", expanded: "expanded", header: "header" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<button type=\"button\" class=\"ft-button ft-collapsible__header\" (click)=\"toggleCollapsible()\">\n <div class=\"ft-item\">\n <div class=\"ft-item__label\">{{ header }}</div>\n <ft-icon class=\"ft-item__toggle\" name=\"angle-down\"></ft-icon>\n </div>\n</button>\n<div class=\"ft-collapsible__content\">\n <ng-content></ng-content>\n</div>", dependencies: [{ kind: "component", type: IconComponent, selector: "ft-icon", inputs: ["collection", "mode", "name", "path", "src", "class"] }] });
777
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CollapsibleComponent, decorators: [{
778
- type: Component,
779
- args: [{ selector: 'ft-collapsible', template: "<button type=\"button\" class=\"ft-button ft-collapsible__header\" (click)=\"toggleCollapsible()\">\n <div class=\"ft-item\">\n <div class=\"ft-item__label\">{{ header }}</div>\n <ft-icon class=\"ft-item__toggle\" name=\"angle-down\"></ft-icon>\n </div>\n</button>\n<div class=\"ft-collapsible__content\">\n <ng-content></ng-content>\n</div>" }]
780
- }], propDecorators: { class: [{
781
- type: Input
782
- }], hostClasses: [{
783
- type: HostBinding,
784
- args: ['class']
785
- }], expanded: [{
786
- type: Input
787
- }], header: [{
788
- type: Input
789
- }] } });
790
-
791
- class LayoutModule {
792
- }
793
- LayoutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
794
- LayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: LayoutModule, declarations: [CollapsibleComponent], imports: [CommonModule,
795
- IoModule], exports: [CollapsibleComponent] });
796
- LayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LayoutModule, imports: [CommonModule,
797
- IoModule] });
798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: LayoutModule, decorators: [{
799
- type: NgModule,
800
- args: [{
801
- declarations: [
802
- CollapsibleComponent
803
- ],
804
- exports: [
805
- CollapsibleComponent
806
- ],
807
- imports: [
808
- CommonModule,
809
- IoModule
810
- ]
811
- }]
812
- }] });
813
-
814
- class ListComponent {
815
- constructor() {
816
- this.actionSelected = new EventEmitter();
817
- this.iconNameField = 'iconName';
818
- this.labelField = 'label';
819
- this.selectable = null;
820
- this.selection = [];
821
- this.class = '';
822
- this.actionSelected.subscribe((action) => {
823
- switch (this.selectable) {
824
- case 'single':
825
- this.selection = [action];
826
- break;
827
- case 'multiple':
828
- this.selection.push(action);
829
- break;
830
- }
831
- });
832
- }
833
- get hostClasses() {
834
- return [
835
- 'ft-list',
836
- this.class
837
- ].join(' ');
838
- }
839
- ;
840
- updateAction(action) {
841
- action.metadata = action.metadata || {};
842
- if (!action.id) {
843
- action.id = Math.floor(Math.random() * 1000000).toString();
844
- }
845
- if (!action.url) {
846
- action.metadata.componentType = 'button';
847
- }
848
- else {
849
- action.metadata.componentType = 'link';
850
- const urlParts = action.url.split('?');
851
- if (urlParts.length > 1) {
852
- const queryString = urlParts.at(-1);
853
- const searchParams = new URLSearchParams(queryString);
854
- action.url = urlParts[0];
855
- action.metadata.queryParams = Object.fromEntries(searchParams.entries());
856
- }
857
- }
858
- return action;
859
- }
860
- handleClick(action) {
861
- this.actionSelected.emit(action);
862
- if (action.url && action.url.match(/^(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/)) {
863
- window.location.href = action.url;
864
- }
865
- else if (typeof action.click === 'function') {
866
- action.click();
867
- }
868
- }
869
- toggleCollapsible(action) {
870
- action.metadata = action.metadata || {};
871
- action.metadata.show = !action.metadata?.show;
872
- this.actionSelected.emit(action);
873
- }
874
- trackById(index, action) {
875
- return action.id || index;
876
- }
877
- }
878
- ListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
879
- ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ListComponent, selector: "ft-list", inputs: { iconCollection: "iconCollection", iconNameField: "iconNameField", iconPath: "iconPath", labelField: "labelField", items: "items", selectable: "selectable", selection: "selection", itemTemplate: "itemTemplate", class: "class" }, outputs: { actionSelected: "actionSelected" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<ng-container *ngTemplateOutlet=\"switchTemplate; context: { children: items }\"></ng-container>\n<ng-template #switchTemplate let-children=\"children\" let-level=\"level\">\n <ng-container *ngFor=\"let action of children; trackBy: trackById\" [ngSwitch]=\"action.type\">\n <ng-container *ngSwitchCase=\"'collapsible'\">\n <ng-container *ngTemplateOutlet=\"collapsibleTemplate; context: { action: action }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'header'\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { action: action }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"actionTemplate; context: { action: updateAction(action) }\"></ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #actionTemplate let-action=\"action\">\n <ng-container [ngSwitch]=\"action.metadata.componentType\">\n <button *ngSwitchCase=\"'button'\" type=\"button\" class=\"ft-button ft-list__item\"\n [ngClass]=\"[action.class || '', selectable && selection.indexOf(action) !== -1 ? 'ft-list__item--selected' : '']\"\n (click)=\"handleClick(action)\" [disabled]=\"action.disabled\">\n <ng-container *ngTemplateOutlet=\"itemTemplate || textTemplate; context: { action: action }\"></ng-container>\n </button>\n <a *ngSwitchCase=\"'link'\" [routerLink]=\"action.url\" [queryParams]=\"action.metadata?.queryParams\"\n routerLinkActive=\"ft-list__item--active\" class=\"ft-button ft-list__item\"\n [ngClass]=\"[action.class || '', selectable && selection.indexOf(action) !== -1 ? 'ft-list__item--selected' : '']\"\n (click)=\"handleClick(action)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate || textTemplate; context: { action: action }\"></ng-container>\n </a>\n </ng-container>\n</ng-template>\n<ng-template #collapsibleTemplate let-action=\"action\">\n <ft-collapsible [header]=\"action[labelField]\" [expanded]=\"action.metadata?.show\">\n <div class=\"ft-list\">\n <ng-container *ngTemplateOutlet=\"switchTemplate; context: { children: action.children }\"></ng-container>\n </div>\n </ft-collapsible>\n</ng-template>\n<ng-template #headerTemplate let-action=\"action\">\n <div class=\"ft-list__header\" [ngClass]=\"action.class\">\n {{ action[labelField] }}\n </div>\n</ng-template>\n<ng-template #textTemplate let-action=\"action\">\n <div class=\"ft-item\">\n <ft-icon class=\"ft-item__icon\" *ngIf=\"action[iconNameField] || (selectable && selection.indexOf(action) !== -1)\"\n [name]=\"action[iconNameField]\" [collection]=\"iconCollection\" [path]=\"iconPath\"></ft-icon>\n <div class=\"ft-item__label\">{{ action[labelField] }}</div>\n </div>\n</ng-template>", dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: IconComponent, selector: "ft-icon", inputs: ["collection", "mode", "name", "path", "src", "class"] }, { kind: "component", type: CollapsibleComponent, selector: "ft-collapsible", inputs: ["class", "expanded", "header"] }, { kind: "directive", type: i4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i4.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
880
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ListComponent, decorators: [{
881
- type: Component,
882
- args: [{ selector: 'ft-list', template: "<ng-container *ngTemplateOutlet=\"switchTemplate; context: { children: items }\"></ng-container>\n<ng-template #switchTemplate let-children=\"children\" let-level=\"level\">\n <ng-container *ngFor=\"let action of children; trackBy: trackById\" [ngSwitch]=\"action.type\">\n <ng-container *ngSwitchCase=\"'collapsible'\">\n <ng-container *ngTemplateOutlet=\"collapsibleTemplate; context: { action: action }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'header'\">\n <ng-container *ngTemplateOutlet=\"headerTemplate; context: { action: action }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container *ngTemplateOutlet=\"actionTemplate; context: { action: updateAction(action) }\"></ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #actionTemplate let-action=\"action\">\n <ng-container [ngSwitch]=\"action.metadata.componentType\">\n <button *ngSwitchCase=\"'button'\" type=\"button\" class=\"ft-button ft-list__item\"\n [ngClass]=\"[action.class || '', selectable && selection.indexOf(action) !== -1 ? 'ft-list__item--selected' : '']\"\n (click)=\"handleClick(action)\" [disabled]=\"action.disabled\">\n <ng-container *ngTemplateOutlet=\"itemTemplate || textTemplate; context: { action: action }\"></ng-container>\n </button>\n <a *ngSwitchCase=\"'link'\" [routerLink]=\"action.url\" [queryParams]=\"action.metadata?.queryParams\"\n routerLinkActive=\"ft-list__item--active\" class=\"ft-button ft-list__item\"\n [ngClass]=\"[action.class || '', selectable && selection.indexOf(action) !== -1 ? 'ft-list__item--selected' : '']\"\n (click)=\"handleClick(action)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate || textTemplate; context: { action: action }\"></ng-container>\n </a>\n </ng-container>\n</ng-template>\n<ng-template #collapsibleTemplate let-action=\"action\">\n <ft-collapsible [header]=\"action[labelField]\" [expanded]=\"action.metadata?.show\">\n <div class=\"ft-list\">\n <ng-container *ngTemplateOutlet=\"switchTemplate; context: { children: action.children }\"></ng-container>\n </div>\n </ft-collapsible>\n</ng-template>\n<ng-template #headerTemplate let-action=\"action\">\n <div class=\"ft-list__header\" [ngClass]=\"action.class\">\n {{ action[labelField] }}\n </div>\n</ng-template>\n<ng-template #textTemplate let-action=\"action\">\n <div class=\"ft-item\">\n <ft-icon class=\"ft-item__icon\" *ngIf=\"action[iconNameField] || (selectable && selection.indexOf(action) !== -1)\"\n [name]=\"action[iconNameField]\" [collection]=\"iconCollection\" [path]=\"iconPath\"></ft-icon>\n <div class=\"ft-item__label\">{{ action[labelField] }}</div>\n </div>\n</ng-template>" }]
883
- }], ctorParameters: function () { return []; }, propDecorators: { actionSelected: [{
884
- type: Output
885
- }], iconCollection: [{
886
- type: Input
887
- }], iconNameField: [{
888
- type: Input
889
- }], iconPath: [{
890
- type: Input
891
- }], labelField: [{
892
- type: Input
893
- }], items: [{
894
- type: Input
895
- }], selectable: [{
896
- type: Input
897
- }], selection: [{
898
- type: Input
899
- }], itemTemplate: [{
900
- type: Input
901
- }], class: [{
902
- type: Input
903
- }], hostClasses: [{
904
- type: HostBinding,
905
- args: ['class']
906
- }] } });
907
-
908
- class ToolbarComponent {
909
- constructor() {
910
- this.rootMargin = { rootMargin: '0px 0px 0px 0px' };
911
- this.class = '';
912
- const breakpointSm = parseInt(getComputedStyle(document.documentElement).getPropertyValue('--breakpoint-sm'));
913
- if (window.innerWidth < breakpointSm) {
914
- this.rootMargin = { rootMargin: '0px 0px 0px 0px' };
915
- }
916
- }
917
- get hostClasses() {
918
- return [
919
- 'ft-toolbar',
920
- this.class,
921
- this.overlapped ? 'overlapped' : ''
922
- ].join(' ');
923
- }
924
- ;
925
- ngOnInit() {
926
- if (this.titleOptions && !this.currentTitleOption) {
927
- this.currentTitleOption = this.titleOptions[0];
928
- }
929
- }
930
- setOverlapped(overlapped) {
931
- this.overlapped = !overlapped;
932
- }
933
- }
934
- ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
935
- ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ToolbarComponent, selector: "ft-toolbar", inputs: { actionOptions: "actionOptions", currentTitleOption: "currentTitleOption", title: "title", titleOptions: "titleOptions", class: "class" }, host: { properties: { "class": "this.hostClasses" } }, ngImport: i0, template: "<div (ftObserveIntersecting)=\"setOverlapped($event)\" [ftObserveIntersectingOptions]=\"rootMargin\"></div>\n<div class=\"content\">\n <div class=\"container p-2 p-sm-3 pb-md-3 pt-md-5 px-md-3 px-lg-5\">\n <div class=\"d-flex align-items-center\">\n <h5 class=\"title ml-2 ml-md-0 mb-0 mr-auto\" *ngIf=\"!titleOptions; else titleForm\">{{ title }}</h5>\n <ng-container *ngFor=\"let option of actionOptions\">\n <button type=\"button\" class=\"p-2\" mat-button [ngClass]=\"option.class || ''\" *ngIf=\"!option.children\"\n (click)=\"option.click ? option.click($event) : null\" title=\"{{ option.label }}\">\n <div class=\"d-flex align-items-center\">\n <ft-icon *ngIf=\"option.iconName\" [name]=\"option.iconName\" size=\"2\"></ft-icon>\n <div *ngIf=\"option.label\" class=\"label d-none d-sm-inline-block ml-1\">{{ option.label }}</div>\n </div>\n </button>\n <ng-container *ngIf=\"option.children\">\n <button type=\"button\" class=\"p-2\" mat-button [matMenuTriggerFor]=\"menu\"\n [ngClass]=\"option.class || ''\" title=\"{{ option.label }}\">\n <div class=\"d-flex align-items-center\">\n <ft-icon *ngIf=\"option.iconName\" [name]=\"option.iconName\" size=\"2\"></ft-icon>\n <div *ngIf=\"option.label\" class=\"label d-none d-sm-inline-block ml-1\">{{ option.label }}\n </div>\n </div>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let childOption of option.children\"\n (click)=\"childOption.click ? childOption.click($event): null\">{{ childOption.label\n }}</button>\n </mat-menu>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n<ng-template #titleForm>\n <button type=\"button\" class=\"title p-2 pl-3 mr-auto\" mat-button [matMenuTriggerFor]=\"titleMenu\">\n <div class=\"d-flex align-items-center\">\n <div class=\"label mr-1\">{{ currentTitleOption.label }}</div>\n <ft-icon name=\"angle-down\" size=\"1\"></ft-icon>\n </div>\n </button>\n <mat-menu #titleMenu=\"matMenu\">\n <button class=\"mr-4\" mat-menu-item [disabled]=\"option == currentTitleOption\" *ngFor=\"let option of titleOptions\"\n (click)=\"currentTitleOption = option; option.click ? option.click($event) : null\">\n <div class=\"d-flex align-items-center\">\n <ft-icon [name]=\"option == currentTitleOption? 'check' : ''\" class=\"mr-1\"></ft-icon>\n <div>{{ option.label }}</div>\n </div>\n </button>\n </mat-menu>\n</ng-template>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "ft-icon", inputs: ["collection", "mode", "name", "path", "src", "class"] }, { kind: "directive", type: ObserveIntersectingDirective, selector: "[ftObserveIntersecting]", inputs: ["ftObserveIntersectingOptions"], outputs: ["ftObserveIntersecting"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i5.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }] });
936
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ToolbarComponent, decorators: [{
937
- type: Component,
938
- args: [{ selector: 'ft-toolbar', template: "<div (ftObserveIntersecting)=\"setOverlapped($event)\" [ftObserveIntersectingOptions]=\"rootMargin\"></div>\n<div class=\"content\">\n <div class=\"container p-2 p-sm-3 pb-md-3 pt-md-5 px-md-3 px-lg-5\">\n <div class=\"d-flex align-items-center\">\n <h5 class=\"title ml-2 ml-md-0 mb-0 mr-auto\" *ngIf=\"!titleOptions; else titleForm\">{{ title }}</h5>\n <ng-container *ngFor=\"let option of actionOptions\">\n <button type=\"button\" class=\"p-2\" mat-button [ngClass]=\"option.class || ''\" *ngIf=\"!option.children\"\n (click)=\"option.click ? option.click($event) : null\" title=\"{{ option.label }}\">\n <div class=\"d-flex align-items-center\">\n <ft-icon *ngIf=\"option.iconName\" [name]=\"option.iconName\" size=\"2\"></ft-icon>\n <div *ngIf=\"option.label\" class=\"label d-none d-sm-inline-block ml-1\">{{ option.label }}</div>\n </div>\n </button>\n <ng-container *ngIf=\"option.children\">\n <button type=\"button\" class=\"p-2\" mat-button [matMenuTriggerFor]=\"menu\"\n [ngClass]=\"option.class || ''\" title=\"{{ option.label }}\">\n <div class=\"d-flex align-items-center\">\n <ft-icon *ngIf=\"option.iconName\" [name]=\"option.iconName\" size=\"2\"></ft-icon>\n <div *ngIf=\"option.label\" class=\"label d-none d-sm-inline-block ml-1\">{{ option.label }}\n </div>\n </div>\n </button>\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item *ngFor=\"let childOption of option.children\"\n (click)=\"childOption.click ? childOption.click($event): null\">{{ childOption.label\n }}</button>\n </mat-menu>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n<ng-template #titleForm>\n <button type=\"button\" class=\"title p-2 pl-3 mr-auto\" mat-button [matMenuTriggerFor]=\"titleMenu\">\n <div class=\"d-flex align-items-center\">\n <div class=\"label mr-1\">{{ currentTitleOption.label }}</div>\n <ft-icon name=\"angle-down\" size=\"1\"></ft-icon>\n </div>\n </button>\n <mat-menu #titleMenu=\"matMenu\">\n <button class=\"mr-4\" mat-menu-item [disabled]=\"option == currentTitleOption\" *ngFor=\"let option of titleOptions\"\n (click)=\"currentTitleOption = option; option.click ? option.click($event) : null\">\n <div class=\"d-flex align-items-center\">\n <ft-icon [name]=\"option == currentTitleOption? 'check' : ''\" class=\"mr-1\"></ft-icon>\n <div>{{ option.label }}</div>\n </div>\n </button>\n </mat-menu>\n</ng-template>" }]
939
- }], ctorParameters: function () { return []; }, propDecorators: { actionOptions: [{
940
- type: Input
941
- }], currentTitleOption: [{
942
- type: Input
943
- }], title: [{
944
- type: Input
945
- }], titleOptions: [{
946
- type: Input
947
- }], class: [{
948
- type: Input
949
- }], hostClasses: [{
950
- type: HostBinding,
951
- args: ['class']
952
- }] } });
953
-
954
- class NavigationModule {
955
- }
956
- NavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
957
- NavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: NavigationModule, declarations: [ListComponent,
958
- ToolbarComponent], imports: [CommonModule,
959
- IoModule,
960
- LayoutModule,
961
- RouterModule,
962
- MatButtonModule,
963
- MatMenuModule], exports: [ListComponent,
964
- ToolbarComponent] });
965
- NavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NavigationModule, imports: [CommonModule,
966
- IoModule,
967
- LayoutModule,
968
- RouterModule,
969
- MatButtonModule,
970
- MatMenuModule] });
971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: NavigationModule, decorators: [{
972
- type: NgModule,
973
- args: [{
974
- declarations: [
975
- ListComponent,
976
- ToolbarComponent
977
- ],
978
- exports: [
979
- ListComponent,
980
- ToolbarComponent
981
- ],
982
- imports: [
983
- CommonModule,
984
- IoModule,
985
- LayoutModule,
986
- RouterModule,
987
- MatButtonModule,
988
- MatMenuModule
989
- ]
990
- }]
991
- }] });
992
-
993
- class UiModule {
994
- static forRoot(configuration) {
995
- return {
996
- ngModule: UiModule,
997
- providers: [
998
- { provide: 'FactorUiConfiguration', useValue: configuration }
999
- ]
1000
- };
1001
- }
1002
- }
1003
- UiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1004
- UiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: UiModule, imports: [CommonModule,
1005
- IoModule,
1006
- LayoutModule,
1007
- NavigationModule], exports: [IoModule,
1008
- LayoutModule,
1009
- NavigationModule] });
1010
- UiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UiModule, imports: [CommonModule,
1011
- IoModule,
1012
- LayoutModule,
1013
- NavigationModule, IoModule,
1014
- LayoutModule,
1015
- NavigationModule] });
1016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: UiModule, decorators: [{
1017
- type: NgModule,
1018
- args: [{
1019
- declarations: [],
1020
- imports: [
1021
- CommonModule,
1022
- IoModule,
1023
- LayoutModule,
1024
- NavigationModule
1025
- ],
1026
- exports: [
1027
- IoModule,
1028
- LayoutModule,
1029
- NavigationModule
1030
- ]
1031
- }]
1032
- }] });
1033
-
1034
- /*
1035
- * Public API Surface of ui
1036
- */
1037
-
1038
- /**
1039
- * Generated bundle index. Do not edit.
1040
- */
1041
-
1042
- export { AvatarComponent, CollapsibleComponent, ExpressionBuilderComponent, IconComponent, ImageComponent, IoModule, LayoutModule, ListComponent, MessageComponent, MessageContentComponent, MessageService, NavigationModule, ObserveIntersectingDirective, ProgressComponent, ProgressService, RatingComponent, TimelineComponent, ToolbarComponent, UiModule };
1043
- //# sourceMappingURL=factor_ec-ui.mjs.map
1044
- //# sourceMappingURL=factor_ec-ui.mjs.map