suis 0.14.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -0
- package/esm2022/index.mjs +2 -1
- package/esm2022/lib/components/index.mjs +4 -1
- package/esm2022/lib/components/suis-notification/index.mjs +4 -0
- package/esm2022/lib/components/suis-notification/suis-notification.component.mjs +33 -0
- package/esm2022/lib/components/suis-notification/suis-notification.interfaces.mjs +2 -0
- package/esm2022/lib/components/suis-notification/suis-notification.types.mjs +2 -0
- package/esm2022/lib/components/suis-notifications/index.mjs +2 -0
- package/esm2022/lib/components/suis-notifications/suis-notifications.component.mjs +27 -0
- package/esm2022/lib/components/suis-select/suis-select.component.mjs +3 -3
- package/esm2022/lib/components/suis-select-multi/index.mjs +2 -0
- package/esm2022/lib/components/suis-select-multi/suis-select-multi-chips.pipe.mjs +25 -0
- package/esm2022/lib/components/suis-select-multi/suis-select-multi-is-selected.pipe.mjs +18 -0
- package/esm2022/lib/components/suis-select-multi/suis-select-multi.component.mjs +99 -0
- package/esm2022/lib/components/suis-select-option/suis-select-option.interfaces.mjs +1 -1
- package/esm2022/lib/services/index.mjs +2 -0
- package/esm2022/lib/services/suis-notification.service.mjs +79 -0
- package/esm2022/lib/shared/classes/suis-select.base.mjs +1 -1
- package/fesm2022/suis.mjs +246 -4
- package/fesm2022/suis.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/components/index.d.ts +3 -0
- package/lib/components/suis-notification/index.d.ts +3 -0
- package/lib/components/suis-notification/suis-notification.component.d.ts +19 -0
- package/lib/components/suis-notification/suis-notification.interfaces.d.ts +7 -0
- package/lib/components/suis-notification/suis-notification.types.d.ts +1 -0
- package/lib/components/suis-notifications/index.d.ts +1 -0
- package/lib/components/suis-notifications/suis-notifications.component.d.ts +12 -0
- package/lib/components/suis-select-multi/index.d.ts +1 -0
- package/lib/components/suis-select-multi/suis-select-multi-chips.pipe.d.ts +8 -0
- package/lib/components/suis-select-multi/suis-select-multi-is-selected.pipe.d.ts +7 -0
- package/lib/components/suis-select-multi/suis-select-multi.component.d.ts +26 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/suis-notification.service.d.ts +43 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -26,9 +26,18 @@ Modern UI component library. Supports Angular in version 16 and uses its latest
|
|
26
26
|
| InputNumber | SuisInputNumber | suis-input-number | 0.12.0 |
|
27
27
|
| ProgressBar | SuisProgressBar | suis-progress-bar | 0.13.0 |
|
28
28
|
| Container | SuisContainer | suis-container | 0.14.0 |
|
29
|
+
| SelectMulti | SuisSelectMulti | suis-select-multi | 0.15.0 |
|
30
|
+
| Notification | SuisNotification | suis-notification | 0.16.0 |
|
31
|
+
| Notifications | SuisNotifications | suis-notifications | 0.16.0 |
|
29
32
|
|
30
33
|
## Pipes
|
31
34
|
|
32
35
|
| Pipe | Class | Selector | Version |
|
33
36
|
|---|---|---|---|
|
34
37
|
| NgClass | SuisNgClass | suisNgClass | 0.6.0 |
|
38
|
+
|
39
|
+
## Services
|
40
|
+
|
41
|
+
| Class | Version |
|
42
|
+
|---|---|
|
43
|
+
| SuisNotification | 0.16.0 |
|
package/esm2022/index.mjs
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './lib/components';
|
2
2
|
export * from './lib/pipes';
|
3
|
+
export * from './lib/services';
|
3
4
|
export * from './lib/types';
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLGFBQWEsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL2NvbXBvbmVudHMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc2VydmljZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHlwZXMnO1xuIl19
|
@@ -9,9 +9,12 @@ export * from './suis-input-chips';
|
|
9
9
|
export * from './suis-input-number';
|
10
10
|
export * from './suis-input-text';
|
11
11
|
export * from './suis-label';
|
12
|
+
export * from './suis-notification';
|
13
|
+
export * from './suis-notifications';
|
12
14
|
export * from './suis-progress-bar';
|
13
15
|
export * from './suis-select';
|
14
16
|
export * from './suis-select-option';
|
17
|
+
export * from './suis-select-multi';
|
15
18
|
export * from './suis-spinner';
|
16
19
|
export * from './suis-spinner-container';
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsa0JBQWtCLENBQUM7QUFDakMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGFBQWEsQ0FBQztBQUM1QixjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLGNBQWMsQ0FBQztBQUM3QixjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0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LWNvbnRhaW5lcic7XG4iXX0=
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export * from './suis-notification.component';
|
2
|
+
export * from './suis-notification.interfaces';
|
3
|
+
export * from './suis-notification.types';
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbi5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbi5pbnRlcmZhY2VzJztcbmV4cG9ydCAqIGZyb20gJy4vc3Vpcy1ub3RpZmljYXRpb24udHlwZXMnO1xuIl19
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SuisNgClassPipe } from '../../pipes';
|
4
|
+
import { SuisIconType } from '../suis-icon/suis-icon.enums';
|
5
|
+
import { SuisIconComponent } from '../suis-icon';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
import * as i1 from "@angular/common";
|
8
|
+
class SuisNotificationComponent {
|
9
|
+
constructor() {
|
10
|
+
/** @internal */
|
11
|
+
this.SuisIconType = SuisIconType;
|
12
|
+
/**
|
13
|
+
* Emits on close button action.
|
14
|
+
*/
|
15
|
+
this.closed = new EventEmitter();
|
16
|
+
}
|
17
|
+
onClose() {
|
18
|
+
this.closed.emit();
|
19
|
+
}
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisNotificationComponent, isStandalone: true, selector: "suis-notification", inputs: { notification: "notification" }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n *ngIf=\"notification\"\n class=\"suis-notification\"\n [ngClass]=\"'suis-notification' | suisNgClass : notification.type\"\n>\n <button class=\"suis-notification__close\" type=\"button\" (click)=\"onClose()\">\n <suis-icon\n [type]=\"SuisIconType.CROSS\"\n [color]=\"'white'\"\n [size]=\"'lg'\"\n ></suis-icon>\n </button>\n <div class=\"suis-notification__message\">\n {{ notification.message }}\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-notification{min-width:15rem;max-width:15rem;padding:1rem;border-radius:.25rem;color:#fff;position:relative}.suis-notification--success{background-color:#2ed573}.suis-notification--warning{background-color:#ffa502}.suis-notification--danger{background-color:#ff4757}.suis-notification__close{position:absolute;top:0;right:0;width:100%;padding:.75rem;background-color:transparent;border:none;cursor:pointer;display:flex;justify-content:end}.suis-notification__message{margin-top:1.25rem;text-align:justify}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: SuisNgClassPipe, name: "suisNgClass" }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
22
|
+
}
|
23
|
+
export { SuisNotificationComponent };
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationComponent, decorators: [{
|
25
|
+
type: Component,
|
26
|
+
args: [{ selector: 'suis-notification', standalone: true, imports: [CommonModule, SuisNgClassPipe, SuisIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"notification\"\n class=\"suis-notification\"\n [ngClass]=\"'suis-notification' | suisNgClass : notification.type\"\n>\n <button class=\"suis-notification__close\" type=\"button\" (click)=\"onClose()\">\n <suis-icon\n [type]=\"SuisIconType.CROSS\"\n [color]=\"'white'\"\n [size]=\"'lg'\"\n ></suis-icon>\n </button>\n <div class=\"suis-notification__message\">\n {{ notification.message }}\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-notification{min-width:15rem;max-width:15rem;padding:1rem;border-radius:.25rem;color:#fff;position:relative}.suis-notification--success{background-color:#2ed573}.suis-notification--warning{background-color:#ffa502}.suis-notification--danger{background-color:#ff4757}.suis-notification__close{position:absolute;top:0;right:0;width:100%;padding:.75rem;background-color:transparent;border:none;cursor:pointer;display:flex;justify-content:end}.suis-notification__message{margin-top:1.25rem;text-align:justify}\n"] }]
|
27
|
+
}], propDecorators: { notification: [{
|
28
|
+
type: Input,
|
29
|
+
args: [{ required: true }]
|
30
|
+
}], closed: [{
|
31
|
+
type: Output
|
32
|
+
}] } });
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLW5vdGlmaWNhdGlvbi9zdWlzLW5vdGlmaWNhdGlv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XG4gIDwvZGl2PlxuPC9kaXY+XG4iXX0=
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export {};
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb24uaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1ub3RpZmljYXRpb24vc3Vpcy1ub3RpZmljYXRpb24uaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3Vpc05vdGlmaWNhdGlvblR5cGUgfSBmcm9tICcuL3N1aXMtbm90aWZpY2F0aW9uLnR5cGVzJztcblxuZXhwb3J0IGludGVyZmFjZSBTdWlzTm90aWZpY2F0aW9uIHtcbiAgaWQ6IHN0cmluZztcbiAgbWVzc2FnZTogc3RyaW5nO1xuICB0eXBlOiBTdWlzTm90aWZpY2F0aW9uVHlwZTtcbiAgZGVsYXk6IG51bWJlcjtcbn1cbiJdfQ==
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export {};
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb24udHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9uL3N1aXMtbm90aWZpY2F0aW9uLnR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBTdWlzTm90aWZpY2F0aW9uVHlwZSA9ICdzdWNjZXNzJyB8ICd3YXJuaW5nJyB8ICdkYW5nZXInO1xuIl19
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './suis-notifications.component';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9ucy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdDQUFnQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbnMuY29tcG9uZW50JztcbiJdfQ==
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, inject, } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SuisNotificationComponent } from '../suis-notification/suis-notification.component';
|
4
|
+
import { SuisNotificationService } from '../../services/suis-notification.service';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@angular/common";
|
7
|
+
class SuisNotificationsComponent {
|
8
|
+
constructor() {
|
9
|
+
this.notificationService = inject(SuisNotificationService);
|
10
|
+
this.notifications = this.notificationService.getNotifications();
|
11
|
+
}
|
12
|
+
remove(id) {
|
13
|
+
this.notificationService.forceRemoveNotification(id);
|
14
|
+
}
|
15
|
+
/** @internal */
|
16
|
+
notificationTrackBy(index, notification) {
|
17
|
+
return notification.id;
|
18
|
+
}
|
19
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisNotificationsComponent, isStandalone: true, selector: "suis-notifications", ngImport: i0, template: "<suis-notification\n *ngFor=\"let notification of notifications(); trackBy: notificationTrackBy\"\n [notification]=\"notification\"\n (closed)=\"remove(notification.id)\"\n></suis-notification>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{position:absolute;bottom:0;right:0;padding:1rem}:host suis-notification{display:block;margin-top:.75rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SuisNotificationComponent, selector: "suis-notification", inputs: ["notification"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
21
|
+
}
|
22
|
+
export { SuisNotificationsComponent };
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationsComponent, decorators: [{
|
24
|
+
type: Component,
|
25
|
+
args: [{ selector: 'suis-notifications', standalone: true, imports: [CommonModule, SuisNotificationComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<suis-notification\n *ngFor=\"let notification of notifications(); trackBy: notificationTrackBy\"\n [notification]=\"notification\"\n (closed)=\"remove(notification.id)\"\n></suis-notification>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{position:absolute;bottom:0;right:0;padding:1rem}:host suis-notification{display:block;margin-top:.75rem}\n"] }]
|
26
|
+
}] });
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb25zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcm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BDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXG59KVxuZXhwb3J0IGNsYXNzIFN1aXNOb3RpZmljYXRpb25zQ29tcG9uZW50IHtcbiAgcHJpdmF0ZSByZWFkb25seSBub3RpZmljYXRpb25TZXJ2aWNlID0gaW5qZWN0KFN1aXNOb3RpZmljYXRpb25TZXJ2aWNlKTtcblxuICBub3RpZmljYXRpb25zOiBTaWduYWw8U3Vpc05vdGlmaWNhdGlvbltdPiA9XG4gICAgdGhpcy5ub3RpZmljYXRpb25TZXJ2aWNlLmdldE5vdGlmaWNhdGlvbnMoKTtcblxuICByZW1vdmUoaWQ6IHN0cmluZyk6IHZvaWQge1xuICAgIHRoaXMubm90aWZpY2F0aW9uU2VydmljZS5mb3JjZVJlbW92ZU5vdGlmaWNhdGlvbihpZCk7XG4gIH1cblxuICAvKiogQGludGVybmFsICovXG4gIG5vdGlmaWNhdGlvblRyYWNrQnkoaW5kZXg6IG51bWJlciwgbm90aWZpY2F0aW9uOiBTdWlzTm90aWZpY2F0aW9uKTogc3RyaW5nIHtcbiAgICByZXR1cm4gbm90aWZpY2F0aW9uLmlkO1xuICB9XG59XG4iLCI8c3Vpcy1ub3RpZmljYXRpb25cbiAgKm5nRm9yPVwibGV0IG5vdGlmaWNhdGlvbiBvZiBub3RpZmljYXRpb25zKCk7IHRyYWNrQnk6IG5vdGlmaWNhdGlvblRyYWNrQnlcIlxuICBbbm90aWZpY2F0aW9uXT1cIm5vdGlmaWNhdGlvblwiXG4gIChjbG9zZWQpPVwicmVtb3ZlKG5vdGlmaWNhdGlvbi5pZClcIlxuPjwvc3Vpcy1ub3RpZmljYXRpb24+XG4iXX0=
|
@@ -44,7 +44,7 @@ class SuisSelectComponent extends SuisSelectBase {
|
|
44
44
|
multi: true,
|
45
45
|
useExisting: forwardRef(() => SuisSelectComponent),
|
46
46
|
},
|
47
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-select\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select__button\"\n [class.suis-select__button--invalid]=\"invalid\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select__button__value\">\n {{ value | suisSelectLabel : options : placeholder }}\n </span>\n <span class=\"suis-select__button__actions\">\n <suis-icon\n *ngIf=\"value\"\n class=\"suis-select__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n ></suis-icon>\n </span>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\n <input\n *ngIf=\"search\"\n [ngModel]=\"searchPhrase\"\n (ngModelChange)=\"onSearchPhraseChange($event)\"\n class=\"suis-select__list__search\"\n type=\"search\"\n [placeholder]=\"searchPlaceholder\"\n />\n <suis-select-option\n *ngFor=\"\n let option of options\n | suisSelectSortOptions\n | suisSelectFilterOptions : searchPhrase\n \"\n [option]=\"option\"\n [templateRef]=\"suisSelectOption?.templateRef\"\n [selected]=\"option.value | suisSelectIsSelected : value\"\n (clicked)=\"onSelect(option.value)\"\n ></suis-select-option>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;position:relative;display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem .25rem 1rem;cursor:pointer}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;text-overflow:ellipsis;text-wrap:nowrap;overflow:hidden}.suis-select__button__actions{margin-left:.25rem;display:flex;justify-content:right;align-items:center}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisSelectOptionComponent, selector: "suis-select-option", inputs: ["option", "templateRef", "selected", "checkbox"], outputs: ["clicked"] }, { kind: "pipe", type: SuisSelectLabelPipe, name: "suisSelectLabel" }, { kind: "pipe", type: SuisSelectIsSelectedPipe, name: "suisSelectIsSelected" }, { kind: "pipe", type: SuisSelectSortOptionsPipe, name: "suisSelectSortOptions" }, { kind: "pipe", type: SuisSelectFilterOptionsPipe, name: "suisSelectFilterOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
47
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-select\">\r\n <button\r\n type=\"button\"\r\n (click)=\"onExpand()\"\r\n class=\"suis-select__button\"\r\n [class.suis-select__button--invalid]=\"invalid\"\r\n [disabled]=\"readonly\"\r\n >\r\n <span class=\"suis-select__button__value\">\r\n {{ value | suisSelectLabel : options : placeholder }}\r\n </span>\r\n <span class=\"suis-select__button__actions\">\r\n <suis-icon\r\n *ngIf=\"value\"\r\n class=\"suis-select__button__cross\"\r\n [type]=\"SuisIconType.CROSS\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n (click)=\"onClear($event)\"\r\n ></suis-icon>\r\n <suis-icon\r\n class=\"suis-select__button__chevron\"\r\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n ></suis-icon>\r\n </span>\r\n </button>\r\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\r\n <input\r\n *ngIf=\"search\"\r\n [ngModel]=\"searchPhrase\"\r\n (ngModelChange)=\"onSearchPhraseChange($event)\"\r\n class=\"suis-select__list__search\"\r\n type=\"search\"\r\n [placeholder]=\"searchPlaceholder\"\r\n />\r\n <suis-select-option\r\n *ngFor=\"\r\n let option of options\r\n | suisSelectSortOptions\r\n | suisSelectFilterOptions : searchPhrase\r\n \"\r\n [option]=\"option\"\r\n [templateRef]=\"suisSelectOption?.templateRef\"\r\n [selected]=\"option.value | suisSelectIsSelected : value\"\r\n (clicked)=\"onSelect(option.value)\"\r\n ></suis-select-option>\r\n </div>\r\n</div>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;position:relative;display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem .25rem 1rem;cursor:pointer}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;text-overflow:ellipsis;text-wrap:nowrap;overflow:hidden}.suis-select__button__actions{margin-left:.25rem;display:flex;justify-content:right;align-items:center}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisSelectOptionComponent, selector: "suis-select-option", inputs: ["option", "templateRef", "selected", "checkbox"], outputs: ["clicked"] }, { kind: "pipe", type: SuisSelectLabelPipe, name: "suisSelectLabel" }, { kind: "pipe", type: SuisSelectIsSelectedPipe, name: "suisSelectIsSelected" }, { kind: "pipe", type: SuisSelectSortOptionsPipe, name: "suisSelectSortOptions" }, { kind: "pipe", type: SuisSelectFilterOptionsPipe, name: "suisSelectFilterOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
48
48
|
}
|
49
49
|
export { SuisSelectComponent };
|
50
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectComponent, decorators: [{
|
@@ -64,6 +64,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
64
64
|
multi: true,
|
65
65
|
useExisting: forwardRef(() => SuisSelectComponent),
|
66
66
|
},
|
67
|
-
], template: "<div class=\"suis-select\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select__button\"\n [class.suis-select__button--invalid]=\"invalid\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select__button__value\">\n {{ value | suisSelectLabel : options : placeholder }}\n </span>\n <span class=\"suis-select__button__actions\">\n <suis-icon\n *ngIf=\"value\"\n class=\"suis-select__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n ></suis-icon>\n </span>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\n <input\n *ngIf=\"search\"\n [ngModel]=\"searchPhrase\"\n (ngModelChange)=\"onSearchPhraseChange($event)\"\n class=\"suis-select__list__search\"\n type=\"search\"\n [placeholder]=\"searchPlaceholder\"\n />\n <suis-select-option\n *ngFor=\"\n let option of options\n | suisSelectSortOptions\n | suisSelectFilterOptions : searchPhrase\n \"\n [option]=\"option\"\n [templateRef]=\"suisSelectOption?.templateRef\"\n [selected]=\"option.value | suisSelectIsSelected : value\"\n (clicked)=\"onSelect(option.value)\"\n ></suis-select-option>\n </div>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;position:relative;display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem .25rem 1rem;cursor:pointer}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;text-overflow:ellipsis;text-wrap:nowrap;overflow:hidden}.suis-select__button__actions{margin-left:.25rem;display:flex;justify-content:right;align-items:center}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"] }]
|
67
|
+
], template: "<div class=\"suis-select\">\r\n <button\r\n type=\"button\"\r\n (click)=\"onExpand()\"\r\n class=\"suis-select__button\"\r\n [class.suis-select__button--invalid]=\"invalid\"\r\n [disabled]=\"readonly\"\r\n >\r\n <span class=\"suis-select__button__value\">\r\n {{ value | suisSelectLabel : options : placeholder }}\r\n </span>\r\n <span class=\"suis-select__button__actions\">\r\n <suis-icon\r\n *ngIf=\"value\"\r\n class=\"suis-select__button__cross\"\r\n [type]=\"SuisIconType.CROSS\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n (click)=\"onClear($event)\"\r\n ></suis-icon>\r\n <suis-icon\r\n class=\"suis-select__button__chevron\"\r\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n ></suis-icon>\r\n </span>\r\n </button>\r\n <div *ngIf=\"expanded\" class=\"suis-select__list\">\r\n <input\r\n *ngIf=\"search\"\r\n [ngModel]=\"searchPhrase\"\r\n (ngModelChange)=\"onSearchPhraseChange($event)\"\r\n class=\"suis-select__list__search\"\r\n type=\"search\"\r\n [placeholder]=\"searchPlaceholder\"\r\n />\r\n <suis-select-option\r\n *ngFor=\"\r\n let option of options\r\n | suisSelectSortOptions\r\n | suisSelectFilterOptions : searchPhrase\r\n \"\r\n [option]=\"option\"\r\n [templateRef]=\"suisSelectOption?.templateRef\"\r\n [selected]=\"option.value | suisSelectIsSelected : value\"\r\n (clicked)=\"onSelect(option.value)\"\r\n ></suis-select-option>\r\n </div>\r\n</div>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select{position:relative}.suis-select__button{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;position:relative;display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem .25rem 1rem;cursor:pointer}.suis-select__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select__button__value{width:100%;text-align:left;text-overflow:ellipsis;text-wrap:nowrap;overflow:hidden}.suis-select__button__actions{margin-left:.25rem;display:flex;justify-content:right;align-items:center}.suis-select__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select__list__search:focus{outline:none}.suis-select__list::-webkit-scrollbar{width:.5rem}.suis-select__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"] }]
|
68
68
|
}] });
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLXNlbGVjdC9zdWlzLXNlbGVjdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtc2VsZWN0L3N1aXMtc2VsZWN0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQy9FLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsV0FBVyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDaEUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sY0FBYyxDQUFDO0FBQ2pELE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQU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cl09XCJzZWFyY2hQbGFjZWhvbGRlclwiXHJcbiAgICAvPlxyXG4gICAgPHN1aXMtc2VsZWN0LW9wdGlvblxyXG4gICAgICAqbmdGb3I9XCJcclxuICAgICAgICBsZXQgb3B0aW9uIG9mIG9wdGlvbnNcclxuICAgICAgICAgIHwgc3Vpc1NlbGVjdFNvcnRPcHRpb25zXHJcbiAgICAgICAgICB8IHN1aXNTZWxlY3RGaWx0ZXJPcHRpb25zIDogc2VhcmNoUGhyYXNlXHJcbiAgICAgIFwiXHJcbiAgICAgIFtvcHRpb25dPVwib3B0aW9uXCJcclxuICAgICAgW3RlbXBsYXRlUmVmXT1cInN1aXNTZWxlY3RPcHRpb24/LnRlbXBsYXRlUmVmXCJcclxuICAgICAgW3NlbGVjdGVkXT1cIm9wdGlvbi52YWx1ZSB8IHN1aXNTZWxlY3RJc1NlbGVjdGVkIDogdmFsdWVcIlxyXG4gICAgICAoY2xpY2tlZCk9XCJvblNlbGVjdChvcHRpb24udmFsdWUpXCJcclxuICAgID48L3N1aXMtc2VsZWN0LW9wdGlvbj5cclxuICA8L2Rpdj5cclxuPC9kaXY+XHJcbiJdfQ==
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './suis-select-multi.component';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtc2VsZWN0LW11bHRpL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsK0JBQStCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3N1aXMtc2VsZWN0LW11bHRpLmNvbXBvbmVudCc7XG4iXX0=
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
class SuisSelectMultiChipsPipe {
|
4
|
+
transform(values, options) {
|
5
|
+
const selectedOptions = [];
|
6
|
+
values.forEach((value) => {
|
7
|
+
const selectedOption = options.find((option) => JSON.stringify(option.value) === JSON.stringify(value));
|
8
|
+
if (!selectedOption)
|
9
|
+
throw Error('[SuisSelectMultiLabelPipe] Provided value does not belong to valid values');
|
10
|
+
selectedOptions.push(selectedOption.label);
|
11
|
+
});
|
12
|
+
return selectedOptions;
|
13
|
+
}
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiChipsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
15
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiChipsPipe, isStandalone: true, name: "suisSelectMultiChips" }); }
|
16
|
+
}
|
17
|
+
export { SuisSelectMultiChipsPipe };
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiChipsPipe, decorators: [{
|
19
|
+
type: Pipe,
|
20
|
+
args: [{
|
21
|
+
standalone: true,
|
22
|
+
name: 'suisSelectMultiChips',
|
23
|
+
}]
|
24
|
+
}] });
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QtbXVsdGktY2hpcHMucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1zZWxlY3QtbXVsdGkvc3Vpcy1zZWxlY3QtbXVsdGktY2hpcHMucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQU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tcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbiAgbmFtZTogJ3N1aXNTZWxlY3RNdWx0aUNoaXBzJyxcbn0pXG5leHBvcnQgY2xhc3MgU3Vpc1NlbGVjdE11bHRpQ2hpcHNQaXBlPFQ+IGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gIHRyYW5zZm9ybSh2YWx1ZXM6IFRbXSwgb3B0aW9uczogU3Vpc1NlbGVjdE9wdGlvbjxUPltdKTogc3RyaW5nW10ge1xuICAgIGNvbnN0IHNlbGVjdGVkT3B0aW9uczogc3RyaW5nW10gPSBbXTtcblxuICAgIHZhbHVlcy5mb3JFYWNoKCh2YWx1ZSkgPT4ge1xuICAgICAgY29uc3Qgc2VsZWN0ZWRPcHRpb24gPSBvcHRpb25zLmZpbmQoXG4gICAgICAgIChvcHRpb24pID0+IEpTT04uc3RyaW5naWZ5KG9wdGlvbi52YWx1ZSkgPT09IEpTT04uc3RyaW5naWZ5KHZhbHVlKVxuICAgICAgKTtcbiAgICAgIGlmICghc2VsZWN0ZWRPcHRpb24pXG4gICAgICAgIHRocm93IEVycm9yKFxuICAgICAgICAgICdbU3Vpc1NlbGVjdE11bHRpTGFiZWxQaXBlXSBQcm92aWRlZCB2YWx1ZSBkb2VzIG5vdCBiZWxvbmcgdG8gdmFsaWQgdmFsdWVzJ1xuICAgICAgICApO1xuICAgICAgc2VsZWN0ZWRPcHRpb25zLnB1c2goc2VsZWN0ZWRPcHRpb24ubGFiZWwpO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIHNlbGVjdGVkT3B0aW9ucztcbiAgfVxufVxuIl19
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { Pipe } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
class SuisSelectMultiIsSelectedPipe {
|
4
|
+
transform(optionValue, values) {
|
5
|
+
return values.some((value) => JSON.stringify(value) === JSON.stringify(optionValue));
|
6
|
+
}
|
7
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiIsSelectedPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
8
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiIsSelectedPipe, isStandalone: true, name: "suisSelectMultiIsSelected" }); }
|
9
|
+
}
|
10
|
+
export { SuisSelectMultiIsSelectedPipe };
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiIsSelectedPipe, decorators: [{
|
12
|
+
type: Pipe,
|
13
|
+
args: [{
|
14
|
+
standalone: true,
|
15
|
+
name: 'suisSelectMultiIsSelected',
|
16
|
+
}]
|
17
|
+
}] });
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QtbXVsdGktaXMtc2VsZWN0ZWQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1zZWxlY3QtbXVsdGkvc3Vpcy1zZWxlY3QtbXVsdGktaXMtc2VsZWN0ZWQucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7QUFFcEQsTUFJYSw2QkFBNkI7SUFDeEMsU0FBUyxDQUFDLFdBQWMsRUFBRSxNQUFXO1FBQ25DLE9BQU8sTUFBTSxDQUFDLElBQUksQ0FDaEIsQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLEtBQUssSUFBSSxDQUFDLFNBQVMsQ0FBQyxXQUFXLENBQUMsQ0FDakUsQ0FBQztJQUNKLENBQUM7OEdBTFUsNkJBQTZCOzRHQUE3Qiw2QkFBNkI7O1NBQTdCLDZCQUE2QjsyRkFBN0IsNkJBQTZCO2tCQUp6QyxJQUFJO21CQUFDO29CQUNKLFVBQVUsRUFBRSxJQUFJO29CQUNoQixJQUFJLEVBQUUsMkJBQTJCO2lCQUNsQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFBpcGUsIFBpcGVUcmFuc2Zvcm0gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQFBpcGUoe1xuICBzdGFuZGFsb25lOiB0cnVlLFxuICBuYW1lOiAnc3Vpc1NlbGVjdE11bHRpSXNTZWxlY3RlZCcsXG59KVxuZXhwb3J0IGNsYXNzIFN1aXNTZWxlY3RNdWx0aUlzU2VsZWN0ZWRQaXBlPFQ+IGltcGxlbWVudHMgUGlwZVRyYW5zZm9ybSB7XG4gIHRyYW5zZm9ybShvcHRpb25WYWx1ZTogVCwgdmFsdWVzOiBUW10pOiBib29sZWFuIHtcbiAgICByZXR1cm4gdmFsdWVzLnNvbWUoXG4gICAgICAodmFsdWUpID0+IEpTT04uc3RyaW5naWZ5KHZhbHVlKSA9PT0gSlNPTi5zdHJpbmdpZnkob3B0aW9uVmFsdWUpXG4gICAgKTtcbiAgfVxufVxuIl19
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { ChangeDetectionStrategy, Component, Input, forwardRef, } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { SuisSelectBase } from '../../shared/classes/suis-select.base';
|
4
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
|
+
import { SuisIconComponent } from '../suis-icon/suis-icon.component';
|
6
|
+
import { SuisSelectOptionComponent } from '../suis-select-option/suis-select-option.component';
|
7
|
+
import { SuisSelectSortOptionsPipe } from '../../shared/pipes/suis-select-sort-options.pipe';
|
8
|
+
import { SuisSelectFilterOptionsPipe } from '../../shared/pipes/suis-select-filter-options.pipe';
|
9
|
+
import { SuisSelectMultiChipsPipe } from './suis-select-multi-chips.pipe';
|
10
|
+
import { SuisSelectMultiIsSelectedPipe } from './suis-select-multi-is-selected.pipe';
|
11
|
+
import { SuisChipComponent } from '../suis-chip';
|
12
|
+
import * as i0 from "@angular/core";
|
13
|
+
import * as i1 from "@angular/common";
|
14
|
+
import * as i2 from "@angular/forms";
|
15
|
+
class SuisSelectMultiComponent extends SuisSelectBase {
|
16
|
+
constructor() {
|
17
|
+
super(...arguments);
|
18
|
+
/** @internal */
|
19
|
+
this.values = [];
|
20
|
+
/**
|
21
|
+
* Allows to select duplicated values and remove checkboxes next to options' label. By default set to false.
|
22
|
+
*/
|
23
|
+
this.duplicate = false;
|
24
|
+
/**
|
25
|
+
* Sets the color pallette of the chips. Type of SuisColor. By default set to 'primary'.
|
26
|
+
*/
|
27
|
+
this.chipColor = 'primary';
|
28
|
+
/**
|
29
|
+
* Sets the color of the chips' cross icon. Type of SuisColor. By default set to 'white'.
|
30
|
+
*/
|
31
|
+
this.chipIconColor = 'white';
|
32
|
+
}
|
33
|
+
writeValue(obj) {
|
34
|
+
this.values = obj;
|
35
|
+
this._onChange(this.values);
|
36
|
+
this.cdRef.markForCheck();
|
37
|
+
}
|
38
|
+
onSelect(value) {
|
39
|
+
if (this.duplicate ||
|
40
|
+
!this.values.some((value) => JSON.stringify(value) === JSON.stringify(value))) {
|
41
|
+
this.setValue([...this.values, value]);
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
this.setValue([
|
45
|
+
...this.values.filter((value) => JSON.stringify(value) !== JSON.stringify(value)),
|
46
|
+
]);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
onRemove(index) {
|
50
|
+
const values = [...this.values];
|
51
|
+
values.splice(index, 1);
|
52
|
+
this.setValue([...values]);
|
53
|
+
}
|
54
|
+
clearValue() {
|
55
|
+
this.setValue([]);
|
56
|
+
}
|
57
|
+
setValue(value) {
|
58
|
+
this.values = value;
|
59
|
+
this._onChange(this.values);
|
60
|
+
this.changed.emit();
|
61
|
+
this.cdRef.markForCheck();
|
62
|
+
}
|
63
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
64
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: SuisSelectMultiComponent, isStandalone: true, selector: "suis-select-multi", inputs: { duplicate: "duplicate", chipColor: "chipColor", chipIconColor: "chipIconColor" }, providers: [
|
65
|
+
{
|
66
|
+
provide: NG_VALUE_ACCESSOR,
|
67
|
+
multi: true,
|
68
|
+
useExisting: forwardRef(() => SuisSelectMultiComponent),
|
69
|
+
},
|
70
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-select-multi\">\r\n <button\r\n type=\"button\"\r\n (click)=\"onExpand()\"\r\n class=\"suis-select-multi__button\"\r\n [class.suis-select-multi__button--invalid]=\"invalid\"\r\n [class.suis-select-multi__button--valid]=\"values.length > 0\"\r\n [disabled]=\"readonly\"\r\n >\r\n <span class=\"suis-select-multi__button__value\">\r\n <ng-container *ngIf=\"!values?.length\">\r\n {{ placeholder }}\r\n </ng-container>\r\n <ng-container *ngIf=\"values?.length\">\r\n <suis-chip\r\n *ngFor=\"\r\n let value of values | suisSelectMultiChips : options;\r\n let index = index\r\n \"\r\n [removable]=\"true\"\r\n [color]=\"chipColor\"\r\n [iconColor]=\"chipIconColor\"\r\n (remove)=\"onRemove(index)\"\r\n >\r\n {{ value }}\r\n </suis-chip>\r\n </ng-container>\r\n </span>\r\n <span class=\"suis-select-multi__button__actions\">\r\n <suis-icon\r\n *ngIf=\"values?.length\"\r\n class=\"suis-select-multi__button__cross\"\r\n [type]=\"SuisIconType.CROSS\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n (click)=\"onClear($event)\"\r\n tabindex=\"0\"\r\n ></suis-icon>\r\n <suis-icon\r\n class=\"suis-select-multi__button__chevron\"\r\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n tabindex=\"0\"\r\n ></suis-icon>\r\n </span>\r\n </button>\r\n <div *ngIf=\"expanded\" class=\"suis-select-multi__list\">\r\n <input\r\n *ngIf=\"search\"\r\n [ngModel]=\"searchPhrase\"\r\n (ngModelChange)=\"onSearchPhraseChange($event)\"\r\n class=\"suis-select-multi__list__search\"\r\n type=\"search\"\r\n [placeholder]=\"searchPlaceholder\"\r\n />\r\n <suis-select-option\r\n *ngFor=\"\r\n let option of options\r\n | suisSelectSortOptions\r\n | suisSelectFilterOptions : searchPhrase\r\n \"\r\n [option]=\"option\"\r\n [templateRef]=\"suisSelectOption?.templateRef\"\r\n [selected]=\"option.value | suisSelectMultiIsSelected : values\"\r\n [checkbox]=\"!duplicate\"\r\n (clicked)=\"onSelect(option.value)\"\r\n ></suis-select-option>\r\n </div>\r\n</div>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select-multi{position:relative}.suis-select-multi__button{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;position:relative;display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem .25rem 1rem;cursor:pointer}.suis-select-multi__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select-multi__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select-multi__button__value{width:100%;text-align:left;text-overflow:ellipsis;text-wrap:nowrap;overflow:hidden}.suis-select-multi__button__actions{margin-left:.25rem;display:flex;justify-content:right;align-items:center}.suis-select-multi__button--valid{padding-bottom:.125rem}.suis-select-multi__button suis-chip{margin-right:.25rem;margin-bottom:.125rem}.suis-select-multi__button suis-chip:last-child{margin-right:0}.suis-select-multi__button__value{display:flex;flex-wrap:wrap}.suis-select-multi__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select-multi__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select-multi__list__search:focus{outline:none}.suis-select-multi__list::-webkit-scrollbar{width:.5rem}.suis-select-multi__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select-multi__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select-multi__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }, { kind: "component", type: SuisChipComponent, selector: "suis-chip", inputs: ["color", "iconColor", "removable"], outputs: ["remove"] }, { kind: "component", type: SuisSelectOptionComponent, selector: "suis-select-option", inputs: ["option", "templateRef", "selected", "checkbox"], outputs: ["clicked"] }, { kind: "pipe", type: SuisSelectMultiChipsPipe, name: "suisSelectMultiChips" }, { kind: "pipe", type: SuisSelectMultiIsSelectedPipe, name: "suisSelectMultiIsSelected" }, { kind: "pipe", type: SuisSelectSortOptionsPipe, name: "suisSelectSortOptions" }, { kind: "pipe", type: SuisSelectFilterOptionsPipe, name: "suisSelectFilterOptions" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
71
|
+
}
|
72
|
+
export { SuisSelectMultiComponent };
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiComponent, decorators: [{
|
74
|
+
type: Component,
|
75
|
+
args: [{ selector: 'suis-select-multi', standalone: true, imports: [
|
76
|
+
CommonModule,
|
77
|
+
FormsModule,
|
78
|
+
SuisIconComponent,
|
79
|
+
SuisChipComponent,
|
80
|
+
SuisSelectOptionComponent,
|
81
|
+
SuisSelectMultiChipsPipe,
|
82
|
+
SuisSelectMultiIsSelectedPipe,
|
83
|
+
SuisSelectSortOptionsPipe,
|
84
|
+
SuisSelectFilterOptionsPipe,
|
85
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
86
|
+
{
|
87
|
+
provide: NG_VALUE_ACCESSOR,
|
88
|
+
multi: true,
|
89
|
+
useExisting: forwardRef(() => SuisSelectMultiComponent),
|
90
|
+
},
|
91
|
+
], template: "<div class=\"suis-select-multi\">\r\n <button\r\n type=\"button\"\r\n (click)=\"onExpand()\"\r\n class=\"suis-select-multi__button\"\r\n [class.suis-select-multi__button--invalid]=\"invalid\"\r\n [class.suis-select-multi__button--valid]=\"values.length > 0\"\r\n [disabled]=\"readonly\"\r\n >\r\n <span class=\"suis-select-multi__button__value\">\r\n <ng-container *ngIf=\"!values?.length\">\r\n {{ placeholder }}\r\n </ng-container>\r\n <ng-container *ngIf=\"values?.length\">\r\n <suis-chip\r\n *ngFor=\"\r\n let value of values | suisSelectMultiChips : options;\r\n let index = index\r\n \"\r\n [removable]=\"true\"\r\n [color]=\"chipColor\"\r\n [iconColor]=\"chipIconColor\"\r\n (remove)=\"onRemove(index)\"\r\n >\r\n {{ value }}\r\n </suis-chip>\r\n </ng-container>\r\n </span>\r\n <span class=\"suis-select-multi__button__actions\">\r\n <suis-icon\r\n *ngIf=\"values?.length\"\r\n class=\"suis-select-multi__button__cross\"\r\n [type]=\"SuisIconType.CROSS\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n (click)=\"onClear($event)\"\r\n tabindex=\"0\"\r\n ></suis-icon>\r\n <suis-icon\r\n class=\"suis-select-multi__button__chevron\"\r\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\r\n size=\"lg\"\r\n color=\"primary\"\r\n tabindex=\"0\"\r\n ></suis-icon>\r\n </span>\r\n </button>\r\n <div *ngIf=\"expanded\" class=\"suis-select-multi__list\">\r\n <input\r\n *ngIf=\"search\"\r\n [ngModel]=\"searchPhrase\"\r\n (ngModelChange)=\"onSearchPhraseChange($event)\"\r\n class=\"suis-select-multi__list__search\"\r\n type=\"search\"\r\n [placeholder]=\"searchPlaceholder\"\r\n />\r\n <suis-select-option\r\n *ngFor=\"\r\n let option of options\r\n | suisSelectSortOptions\r\n | suisSelectFilterOptions : searchPhrase\r\n \"\r\n [option]=\"option\"\r\n [templateRef]=\"suisSelectOption?.templateRef\"\r\n [selected]=\"option.value | suisSelectMultiIsSelected : values\"\r\n [checkbox]=\"!duplicate\"\r\n (clicked)=\"onSelect(option.value)\"\r\n ></suis-select-option>\r\n </div>\r\n</div>\r\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.suis-select-multi{position:relative}.suis-select-multi__button{width:100%;background-color:#fff;box-shadow:0 2px 5px #00000080;border-radius:.25rem;padding:.5rem 1rem;border:0;min-height:2rem;position:relative;display:flex;align-items:center;justify-content:space-between;padding:.25rem .5rem .25rem 1rem;cursor:pointer}.suis-select-multi__button:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-select-multi__button--invalid{box-shadow:0 2px 5px #ff4757bf}.suis-select-multi__button__value{width:100%;text-align:left;text-overflow:ellipsis;text-wrap:nowrap;overflow:hidden}.suis-select-multi__button__actions{margin-left:.25rem;display:flex;justify-content:right;align-items:center}.suis-select-multi__button--valid{padding-bottom:.125rem}.suis-select-multi__button suis-chip{margin-right:.25rem;margin-bottom:.125rem}.suis-select-multi__button suis-chip:last-child{margin-right:0}.suis-select-multi__button__value{display:flex;flex-wrap:wrap}.suis-select-multi__list{position:absolute;z-index:10;background-color:#fff;box-shadow:0 2px 5px #00000080;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem;width:100%;top:2rem;left:0;max-height:12.25rem;overflow-y:auto}.suis-select-multi__list__search{width:100%;border:none;border-bottom:1px solid #dcdde1;padding:.375rem 1rem}.suis-select-multi__list__search:focus{outline:none}.suis-select-multi__list::-webkit-scrollbar{width:.5rem}.suis-select-multi__list::-webkit-scrollbar-track{background:#f5f6fa}.suis-select-multi__list::-webkit-scrollbar-thumb{background:#dcdde1}.suis-select-multi__list::-webkit-scrollbar-thumb:hover{background:#bcbcbc}\n"] }]
|
92
|
+
}], propDecorators: { duplicate: [{
|
93
|
+
type: Input
|
94
|
+
}], chipColor: [{
|
95
|
+
type: Input
|
96
|
+
}], chipIconColor: [{
|
97
|
+
type: Input
|
98
|
+
}] } });
|
99
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QtbXVsdGkuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLXNlbGVjdC1tdWx0aS9zdWlzLXNlbGVjdC1tdWx0aS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtc2VsZWN0LW11bHRpL3N1aXM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3ZhYmxlXT1cInRydWVcIlxyXG4gICAgICAgICAgW2NvbG9yXT1cImNoaXBDb2xvclwiXHJcbiAgICAgICAgICBbaWNvbkNvbG9yXT1cImNoaXBJY29uQ29sb3JcIlxyXG4gICAgICAgICAgKHJlbW92ZSk9XCJvblJlbW92ZShpbmRleClcIlxyXG4gICAgICAgID5cclxuICAgICAgICAgIHt7IHZhbHVlIH19XHJcbiAgICAgICAgPC9zdWlzLWNoaXA+XHJcbiAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgPC9zcGFuPlxyXG4gICAgPHNwYW4gY2xhc3M9XCJzdWlzLXNlbGVjdC1tdWx0aV9fYnV0dG9uX19hY3Rpb25zXCI+XHJcbiAgICAgIDxzdWlzLWljb25cclxuICAgICAgICAqbmdJZj1cInZhbHVlcz8ubGVuZ3RoXCJcclxuICAgICAgICBjbGFzcz1cInN1aXMtc2VsZWN0LW11bHRpX19idXR0b25fX2Nyb3NzXCJcclxuICAgICAgICBbdHlwZV09XCJTdWlzSWNvblR5cGUuQ1JPU1NcIlxyXG4gICAgICAgIHNpemU9XCJsZ1wiXHJcbiAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcclxuICAgICAgICAoY2xpY2spPVwib25DbGVhcigkZXZlbnQpXCJcclxuICAgICAgICB0YWJpbmRleD1cIjBcIlxyXG4gICAgICA+PC9zdWlzLWljb24+XHJcbiAgICAgIDxzdWlzLWljb25cclxuICAgICAgICBjbGFzcz1cInN1aXMtc2VsZWN0LW11bHRpX19idXR0b25fX2NoZXZyb25cIlxyXG4gICAgICAgIFt0eXBlXT1cImV4cGFuZGVkID8gU3Vpc0ljb25UeXBlLkNIRVZST05fVVAgOiBTdWlzSWNvblR5cGUuQ0hFVlJPTl9ET1dOXCJcclxuICAgICAgICBzaXplPVwibGdcIlxyXG4gICAgICAgIGNvbG9yPVwicHJpbWFyeVwiXHJcbiAgICAgICAgdGFiaW5kZXg9XCIwXCJcclxuICAgICAgPjwvc3Vpcy1pY29uPlx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PC9kaXY+XHJcbjwvZGl2PlxyXG4iXX0=
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export {};
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3Qtb3B0aW9uLmludGVyZmFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtc2VsZWN0LW9wdGlvbi9zdWlzLXNlbGVjdC1vcHRpb24uaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBTdWlzU2VsZWN0T3B0aW9uPFQ+
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3Qtb3B0aW9uLmludGVyZmFjZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtc2VsZWN0LW9wdGlvbi9zdWlzLXNlbGVjdC1vcHRpb24uaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBTdWlzU2VsZWN0T3B0aW9uPFQ+IHtcclxuICBsYWJlbDogc3RyaW5nO1xyXG4gIHZhbHVlOiBUO1xyXG59XHJcbiJdfQ==
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export * from './suis-notification.service';
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9zZXJ2aWNlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbi5zZXJ2aWNlJztcbiJdfQ==
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import { Injectable, signal } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
let UNIQUE_ID = 1;
|
4
|
+
class SuisNotificationService {
|
5
|
+
constructor() {
|
6
|
+
this.notifications = signal([]);
|
7
|
+
}
|
8
|
+
/**
|
9
|
+
* @returns array of the current notifications. Type of SuisNotification[].
|
10
|
+
*/
|
11
|
+
getNotifications() {
|
12
|
+
return this.notifications.asReadonly();
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Adds success notification
|
16
|
+
* @param message text displayed in the notification
|
17
|
+
* @param delay time in ms after notification will be destroyed
|
18
|
+
*/
|
19
|
+
success(message, delay = 2500) {
|
20
|
+
this.addNotification(message, delay, 'success');
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Adds warning notification
|
24
|
+
* @param message text displayed in the notification
|
25
|
+
* @param delay time in ms after notification will be destroyed
|
26
|
+
*/
|
27
|
+
warning(message, delay = 2500) {
|
28
|
+
this.addNotification(message, delay, 'warning');
|
29
|
+
}
|
30
|
+
/**
|
31
|
+
* Adds danger notification
|
32
|
+
* @param message text displayed in the notification
|
33
|
+
* @param delay time in ms after notification will be destroyed
|
34
|
+
*/
|
35
|
+
danger(message, delay = 2500) {
|
36
|
+
this.addNotification(message, delay, 'danger');
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Removes notification immediately
|
40
|
+
* @param id id of the notification to be removed
|
41
|
+
*/
|
42
|
+
forceRemoveNotification(id) {
|
43
|
+
this.removeNotification(id);
|
44
|
+
}
|
45
|
+
/** @internal */
|
46
|
+
getId() {
|
47
|
+
return `suis-notification--${UNIQUE_ID++}`;
|
48
|
+
}
|
49
|
+
/** @internal */
|
50
|
+
addNotification(message, delay, type) {
|
51
|
+
const notification = {
|
52
|
+
id: this.getId(),
|
53
|
+
message: message,
|
54
|
+
delay: delay,
|
55
|
+
type: type,
|
56
|
+
};
|
57
|
+
this.notifications.set([...this.notifications(), notification]);
|
58
|
+
this.removeNotificationWithDelay(notification.id, notification.delay);
|
59
|
+
}
|
60
|
+
/** @internal */
|
61
|
+
removeNotification(id) {
|
62
|
+
this.notifications.set([
|
63
|
+
...this.notifications().filter((notification) => notification.id !== id),
|
64
|
+
]);
|
65
|
+
}
|
66
|
+
/** @internal */
|
67
|
+
removeNotificationWithDelay(id, delay) {
|
68
|
+
setTimeout(() => {
|
69
|
+
this.removeNotification(id);
|
70
|
+
}, delay);
|
71
|
+
}
|
72
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
73
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationService }); }
|
74
|
+
}
|
75
|
+
export { SuisNotificationService };
|
76
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationService, decorators: [{
|
77
|
+
type: Injectable
|
78
|
+
}] });
|
79
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL3NlcnZpY2VzL3N1aXMtbm90aWZpY2F0aW9uLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5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WZpY2F0aW9uV2l0aERlbGF5KGlkOiBzdHJpbmcsIGRlbGF5OiBudW1iZXIpOiB2b2lkIHtcbiAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgIHRoaXMucmVtb3ZlTm90aWZpY2F0aW9uKGlkKTtcbiAgICB9LCBkZWxheSk7XG4gIH1cbn1cbiJdfQ==
|
@@ -77,4 +77,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
77
77
|
type: HostListener,
|
78
78
|
args: ['document:click', ['$event']]
|
79
79
|
}] } });
|
80
|
-
//# sourceMappingURL=data:application/json;base64,
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1zZWxlY3QuYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL3NoYXJlZC9jbGFzc2VzL3N1aXMtc2VsZWN0LmJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFlBQVksRUFDWixTQUFTLEVBQ1QsWUFBWSxFQUNaLFlBQVksRUFDWixLQUFLLEVBQ0wsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUVsRCxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxrRUFBa0UsQ0FBQztBQUM3RyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNENBQTRDLENBQUM7O0FBRTFFLE1BQ3NCLGNBQWtCLFNBQVEsYUFBYTtJQUQ3RDs7UUFNRSxnQkFBZ0I7UUFDUCxpQkFBWSxHQUFHLFlBQVksQ0FBQztRQUVyQyxnQkFBZ0I7UUFDTixpQkFBWSxHQUFXLEVBQUUsQ0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