suis 0.15.0 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -0
- package/esm2022/index.mjs +2 -1
- package/esm2022/lib/components/index.mjs +3 -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/suis-select-multi.component.mjs +3 -3
- 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 +127 -6
- package/fesm2022/suis.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/lib/components/index.d.ts +2 -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/services/index.d.ts +1 -0
- package/lib/services/suis-notification.service.d.ts +43 -0
- package/package.json +1 -1
package/fesm2022/suis.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Pipe, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, inject, ElementRef, Renderer2, Directive, ChangeDetectorRef, TemplateRef, ContentChild, HostListener, ViewEncapsulation, forwardRef, ViewChild } from '@angular/core';
|
2
|
+
import { Pipe, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, inject, ElementRef, Renderer2, Directive, ChangeDetectorRef, TemplateRef, ContentChild, HostListener, ViewEncapsulation, forwardRef, ViewChild, signal, Injectable } from '@angular/core';
|
3
3
|
import * as i1 from '@angular/common';
|
4
4
|
import { CommonModule } from '@angular/common';
|
5
5
|
import * as i2 from '@angular/forms';
|
@@ -699,6 +699,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
699
699
|
type: Input
|
700
700
|
}] } });
|
701
701
|
|
702
|
+
class SuisNotificationComponent {
|
703
|
+
constructor() {
|
704
|
+
/** @internal */
|
705
|
+
this.SuisIconType = SuisIconType;
|
706
|
+
/**
|
707
|
+
* Emits on close button action.
|
708
|
+
*/
|
709
|
+
this.closed = new EventEmitter();
|
710
|
+
}
|
711
|
+
onClose() {
|
712
|
+
this.closed.emit();
|
713
|
+
}
|
714
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
715
|
+
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 }); }
|
716
|
+
}
|
717
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationComponent, decorators: [{
|
718
|
+
type: Component,
|
719
|
+
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"] }]
|
720
|
+
}], propDecorators: { notification: [{
|
721
|
+
type: Input,
|
722
|
+
args: [{ required: true }]
|
723
|
+
}], closed: [{
|
724
|
+
type: Output
|
725
|
+
}] } });
|
726
|
+
|
727
|
+
let UNIQUE_ID = 1;
|
728
|
+
class SuisNotificationService {
|
729
|
+
constructor() {
|
730
|
+
this.notifications = signal([]);
|
731
|
+
}
|
732
|
+
/**
|
733
|
+
* @returns array of the current notifications. Type of SuisNotification[].
|
734
|
+
*/
|
735
|
+
getNotifications() {
|
736
|
+
return this.notifications.asReadonly();
|
737
|
+
}
|
738
|
+
/**
|
739
|
+
* Adds success notification
|
740
|
+
* @param message text displayed in the notification
|
741
|
+
* @param delay time in ms after notification will be destroyed
|
742
|
+
*/
|
743
|
+
success(message, delay = 2500) {
|
744
|
+
this.addNotification(message, delay, 'success');
|
745
|
+
}
|
746
|
+
/**
|
747
|
+
* Adds warning notification
|
748
|
+
* @param message text displayed in the notification
|
749
|
+
* @param delay time in ms after notification will be destroyed
|
750
|
+
*/
|
751
|
+
warning(message, delay = 2500) {
|
752
|
+
this.addNotification(message, delay, 'warning');
|
753
|
+
}
|
754
|
+
/**
|
755
|
+
* Adds danger notification
|
756
|
+
* @param message text displayed in the notification
|
757
|
+
* @param delay time in ms after notification will be destroyed
|
758
|
+
*/
|
759
|
+
danger(message, delay = 2500) {
|
760
|
+
this.addNotification(message, delay, 'danger');
|
761
|
+
}
|
762
|
+
/**
|
763
|
+
* Removes notification immediately
|
764
|
+
* @param id id of the notification to be removed
|
765
|
+
*/
|
766
|
+
forceRemoveNotification(id) {
|
767
|
+
this.removeNotification(id);
|
768
|
+
}
|
769
|
+
/** @internal */
|
770
|
+
getId() {
|
771
|
+
return `suis-notification--${UNIQUE_ID++}`;
|
772
|
+
}
|
773
|
+
/** @internal */
|
774
|
+
addNotification(message, delay, type) {
|
775
|
+
const notification = {
|
776
|
+
id: this.getId(),
|
777
|
+
message: message,
|
778
|
+
delay: delay,
|
779
|
+
type: type,
|
780
|
+
};
|
781
|
+
this.notifications.set([...this.notifications(), notification]);
|
782
|
+
this.removeNotificationWithDelay(notification.id, notification.delay);
|
783
|
+
}
|
784
|
+
/** @internal */
|
785
|
+
removeNotification(id) {
|
786
|
+
this.notifications.set([
|
787
|
+
...this.notifications().filter((notification) => notification.id !== id),
|
788
|
+
]);
|
789
|
+
}
|
790
|
+
/** @internal */
|
791
|
+
removeNotificationWithDelay(id, delay) {
|
792
|
+
setTimeout(() => {
|
793
|
+
this.removeNotification(id);
|
794
|
+
}, delay);
|
795
|
+
}
|
796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
797
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationService }); }
|
798
|
+
}
|
799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationService, decorators: [{
|
800
|
+
type: Injectable
|
801
|
+
}] });
|
802
|
+
|
803
|
+
class SuisNotificationsComponent {
|
804
|
+
constructor() {
|
805
|
+
this.notificationService = inject(SuisNotificationService);
|
806
|
+
this.notifications = this.notificationService.getNotifications();
|
807
|
+
}
|
808
|
+
remove(id) {
|
809
|
+
this.notificationService.forceRemoveNotification(id);
|
810
|
+
}
|
811
|
+
/** @internal */
|
812
|
+
notificationTrackBy(index, notification) {
|
813
|
+
return notification.id;
|
814
|
+
}
|
815
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
816
|
+
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 }); }
|
817
|
+
}
|
818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisNotificationsComponent, decorators: [{
|
819
|
+
type: Component,
|
820
|
+
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"] }]
|
821
|
+
}] });
|
822
|
+
|
702
823
|
class SuisProgressBarPipe {
|
703
824
|
transform(value) {
|
704
825
|
return `${(value / 100) * 100}%`;
|
@@ -899,7 +1020,7 @@ class SuisSelectComponent extends SuisSelectBase {
|
|
899
1020
|
multi: true,
|
900
1021
|
useExisting: forwardRef(() => SuisSelectComponent),
|
901
1022
|
},
|
902
|
-
], 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 }); }
|
1023
|
+
], 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 }); }
|
903
1024
|
}
|
904
1025
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectComponent, decorators: [{
|
905
1026
|
type: Component,
|
@@ -918,7 +1039,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
918
1039
|
multi: true,
|
919
1040
|
useExisting: forwardRef(() => SuisSelectComponent),
|
920
1041
|
},
|
921
|
-
], 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"] }]
|
1042
|
+
], 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"] }]
|
922
1043
|
}] });
|
923
1044
|
|
924
1045
|
class SuisSelectMultiChipsPipe {
|
@@ -1013,7 +1134,7 @@ class SuisSelectMultiComponent extends SuisSelectBase {
|
|
1013
1134
|
multi: true,
|
1014
1135
|
useExisting: forwardRef(() => SuisSelectMultiComponent),
|
1015
1136
|
},
|
1016
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-select-multi\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select-multi__button\"\n [class.suis-select-multi__button--invalid]=\"invalid\"\n [class.suis-select-multi__button--valid]=\"values.length > 0\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select-multi__button__value\">\n <ng-container *ngIf=\"!values?.length\">\n {{ placeholder }}\n </ng-container>\n <ng-container *ngIf=\"values?.length\">\n <suis-chip\n *ngFor=\"\n let value of values | suisSelectMultiChips : options;\n let index = index\n \"\n [removable]=\"true\"\n [color]=\"chipColor\"\n [iconColor]=\"chipIconColor\"\n (remove)=\"onRemove(index)\"\n >\n {{ value }}\n </suis-chip>\n </ng-container>\n </span>\n <span class=\"suis-select-multi__button__actions\">\n <suis-icon\n *ngIf=\"values?.length\"\n class=\"suis-select-multi__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n tabindex=\"0\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select-multi__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n tabindex=\"0\"\n ></suis-icon>\n </span>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select-multi__list\">\n <input\n *ngIf=\"search\"\n [ngModel]=\"searchPhrase\"\n (ngModelChange)=\"onSearchPhraseChange($event)\"\n class=\"suis-select-multi__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 | suisSelectMultiIsSelected : values\"\n [checkbox]=\"!duplicate\"\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-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 }); }
|
1137
|
+
], 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 }); }
|
1017
1138
|
}
|
1018
1139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SuisSelectMultiComponent, decorators: [{
|
1019
1140
|
type: Component,
|
@@ -1033,7 +1154,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
1033
1154
|
multi: true,
|
1034
1155
|
useExisting: forwardRef(() => SuisSelectMultiComponent),
|
1035
1156
|
},
|
1036
|
-
], template: "<div class=\"suis-select-multi\">\n <button\n type=\"button\"\n (click)=\"onExpand()\"\n class=\"suis-select-multi__button\"\n [class.suis-select-multi__button--invalid]=\"invalid\"\n [class.suis-select-multi__button--valid]=\"values.length > 0\"\n [disabled]=\"readonly\"\n >\n <span class=\"suis-select-multi__button__value\">\n <ng-container *ngIf=\"!values?.length\">\n {{ placeholder }}\n </ng-container>\n <ng-container *ngIf=\"values?.length\">\n <suis-chip\n *ngFor=\"\n let value of values | suisSelectMultiChips : options;\n let index = index\n \"\n [removable]=\"true\"\n [color]=\"chipColor\"\n [iconColor]=\"chipIconColor\"\n (remove)=\"onRemove(index)\"\n >\n {{ value }}\n </suis-chip>\n </ng-container>\n </span>\n <span class=\"suis-select-multi__button__actions\">\n <suis-icon\n *ngIf=\"values?.length\"\n class=\"suis-select-multi__button__cross\"\n [type]=\"SuisIconType.CROSS\"\n size=\"lg\"\n color=\"primary\"\n (click)=\"onClear($event)\"\n tabindex=\"0\"\n ></suis-icon>\n <suis-icon\n class=\"suis-select-multi__button__chevron\"\n [type]=\"expanded ? SuisIconType.CHEVRON_UP : SuisIconType.CHEVRON_DOWN\"\n size=\"lg\"\n color=\"primary\"\n tabindex=\"0\"\n ></suis-icon>\n </span>\n </button>\n <div *ngIf=\"expanded\" class=\"suis-select-multi__list\">\n <input\n *ngIf=\"search\"\n [ngModel]=\"searchPhrase\"\n (ngModelChange)=\"onSearchPhraseChange($event)\"\n class=\"suis-select-multi__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 | suisSelectMultiIsSelected : values\"\n [checkbox]=\"!duplicate\"\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-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"] }]
|
1157
|
+
], 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"] }]
|
1037
1158
|
}], propDecorators: { duplicate: [{
|
1038
1159
|
type: Input
|
1039
1160
|
}], chipColor: [{
|
@@ -1104,5 +1225,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
1104
1225
|
* Generated bundle index. Do not edit.
|
1105
1226
|
*/
|
1106
1227
|
|
1107
|
-
export { SuisAlertComponent, SuisAnchorButtonComponent, SuisBoxComponent, SuisButtonComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisContainerComponent, SuisFormFieldComponent, SuisIconComponent, SuisIconType, SuisInputChipsComponent, SuisInputNumberComponent, SuisInputTextComponent, SuisLabelComponent, SuisNgClassPipe, SuisProgressBarComponent, SuisSelectComponent, SuisSelectMultiComponent, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent };
|
1228
|
+
export { SuisAlertComponent, SuisAnchorButtonComponent, SuisBoxComponent, SuisButtonComponent, SuisButtonOutlinedComponent, SuisChipComponent, SuisContainerComponent, SuisFormFieldComponent, SuisIconComponent, SuisIconType, SuisInputChipsComponent, SuisInputNumberComponent, SuisInputTextComponent, SuisLabelComponent, SuisNgClassPipe, SuisNotificationComponent, SuisNotificationService, SuisNotificationsComponent, SuisProgressBarComponent, SuisSelectComponent, SuisSelectMultiComponent, SuisSelectOptionComponent, SuisSelectOptionDirective, SuisSpinnerComponent, SuisSpinnerContainerComponent };
|
1108
1229
|
//# sourceMappingURL=suis.mjs.map
|