suis 3.0.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/fesm2022/suis.mjs +329 -362
- package/fesm2022/suis.mjs.map +1 -1
- package/lib/modules/suis-select/classes/suis-select-button.base.d.ts +1 -1
- package/lib/modules/suis-select/classes/suis-select-multi.base.d.ts +1 -1
- package/lib/modules/suis-select/classes/suis-select-single.base.d.ts +1 -1
- package/lib/modules/suis-select/classes/suis-select.base.d.ts +1 -1
- package/lib/shared/classes/suis-button.base.d.ts +1 -1
- package/lib/shared/classes/suis-checkbox.base.d.ts +1 -1
- package/lib/shared/classes/suis-input.base.d.ts +1 -1
- package/package.json +5 -7
- package/esm2022/index.mjs +0 -6
- package/esm2022/lib/components/index.mjs +0 -33
- package/esm2022/lib/components/suis-accordion/index.mjs +0 -2
- package/esm2022/lib/components/suis-accordion/suis-accordion.component.mjs +0 -31
- package/esm2022/lib/components/suis-alert/index.mjs +0 -2
- package/esm2022/lib/components/suis-alert/suis-alert.component.mjs +0 -38
- package/esm2022/lib/components/suis-box/index.mjs +0 -2
- package/esm2022/lib/components/suis-box/suis-box.component.mjs +0 -25
- package/esm2022/lib/components/suis-breadcrumbs/index.mjs +0 -3
- package/esm2022/lib/components/suis-breadcrumbs/suis-breadcrumbs.component.mjs +0 -26
- package/esm2022/lib/components/suis-breadcrumbs/suis-breadcrumbs.interface.mjs +0 -2
- package/esm2022/lib/components/suis-chart/index.mjs +0 -3
- package/esm2022/lib/components/suis-chart/suis-chart-data.pipe.mjs +0 -35
- package/esm2022/lib/components/suis-chart/suis-chart-height.pipe.mjs +0 -19
- package/esm2022/lib/components/suis-chart/suis-chart.component.mjs +0 -82
- package/esm2022/lib/components/suis-chart/suis-chart.interfaces.mjs +0 -2
- package/esm2022/lib/components/suis-chip/index.mjs +0 -2
- package/esm2022/lib/components/suis-chip/suis-chip.component.mjs +0 -44
- package/esm2022/lib/components/suis-container/index.mjs +0 -2
- package/esm2022/lib/components/suis-container/suis-container.component.mjs +0 -19
- package/esm2022/lib/components/suis-dialog/index.mjs +0 -2
- package/esm2022/lib/components/suis-dialog/suis-dialog.component.mjs +0 -62
- package/esm2022/lib/components/suis-dialog-container/index.mjs +0 -3
- package/esm2022/lib/components/suis-dialog-container/suis-dialog-container.component.mjs +0 -17
- package/esm2022/lib/components/suis-dialog-container/suis-dialog-container.interfaces.mjs +0 -2
- package/esm2022/lib/components/suis-divider/index.mjs +0 -2
- package/esm2022/lib/components/suis-divider/suis-divider.component.mjs +0 -22
- package/esm2022/lib/components/suis-form-field/index.mjs +0 -2
- package/esm2022/lib/components/suis-form-field/suis-form-field.component.mjs +0 -14
- package/esm2022/lib/components/suis-icon/index.mjs +0 -3
- package/esm2022/lib/components/suis-icon/suis-icon-type.pipe.mjs +0 -44
- package/esm2022/lib/components/suis-icon/suis-icon.component.mjs +0 -58
- package/esm2022/lib/components/suis-icon/suis-icon.types.mjs +0 -2
- package/esm2022/lib/components/suis-input/index.mjs +0 -3
- package/esm2022/lib/components/suis-input/suis-input.component.mjs +0 -64
- package/esm2022/lib/components/suis-input/suis-input.types.mjs +0 -2
- package/esm2022/lib/components/suis-input-checkbox/index.mjs +0 -2
- package/esm2022/lib/components/suis-input-checkbox/suis-input-checkbox.component.mjs +0 -28
- package/esm2022/lib/components/suis-input-chips/index.mjs +0 -2
- package/esm2022/lib/components/suis-input-chips/suis-input-chips.component.mjs +0 -91
- package/esm2022/lib/components/suis-input-image/index.mjs +0 -2
- package/esm2022/lib/components/suis-input-image/suis-input-image.component.mjs +0 -62
- package/esm2022/lib/components/suis-input-number/index.mjs +0 -2
- package/esm2022/lib/components/suis-input-number/suis-input-number.component.mjs +0 -49
- package/esm2022/lib/components/suis-input-radio/index.mjs +0 -2
- package/esm2022/lib/components/suis-input-radio/suis-input-radio.component.mjs +0 -56
- package/esm2022/lib/components/suis-item/index.mjs +0 -2
- package/esm2022/lib/components/suis-item/suis-item.component.mjs +0 -31
- package/esm2022/lib/components/suis-label/index.mjs +0 -2
- package/esm2022/lib/components/suis-label/suis-label.component.mjs +0 -34
- package/esm2022/lib/components/suis-notification/index.mjs +0 -4
- package/esm2022/lib/components/suis-notification/suis-notification.component.mjs +0 -33
- package/esm2022/lib/components/suis-notification/suis-notification.interfaces.mjs +0 -2
- package/esm2022/lib/components/suis-notification/suis-notification.types.mjs +0 -2
- package/esm2022/lib/components/suis-notifications/index.mjs +0 -2
- package/esm2022/lib/components/suis-notifications/suis-notifications.component.mjs +0 -25
- package/esm2022/lib/components/suis-pagination/index.mjs +0 -2
- package/esm2022/lib/components/suis-pagination/suis-pagination-items.pipe.mjs +0 -21
- package/esm2022/lib/components/suis-pagination/suis-pagination-page.pipe.mjs +0 -20
- package/esm2022/lib/components/suis-pagination/suis-pagination-per-page-options.pipe.mjs +0 -19
- package/esm2022/lib/components/suis-pagination/suis-pagination.component.mjs +0 -120
- package/esm2022/lib/components/suis-progress-bar/index.mjs +0 -2
- package/esm2022/lib/components/suis-progress-bar/suis-progress-bar.component.mjs +0 -46
- package/esm2022/lib/components/suis-progress-bar/suis-progress-bar.pipe.mjs +0 -19
- package/esm2022/lib/components/suis-spinner/index.mjs +0 -2
- package/esm2022/lib/components/suis-spinner/suis-spinner.component.mjs +0 -27
- package/esm2022/lib/components/suis-spinner-container/index.mjs +0 -2
- package/esm2022/lib/components/suis-spinner-container/suis-spinner-container.component.mjs +0 -38
- package/esm2022/lib/components/suis-table/index.mjs +0 -6
- package/esm2022/lib/components/suis-table/suis-table-cell.directive.mjs +0 -21
- package/esm2022/lib/components/suis-table/suis-table-column.directive.mjs +0 -41
- package/esm2022/lib/components/suis-table/suis-table.component.mjs +0 -79
- package/esm2022/lib/components/suis-table/suis-table.interfaces.mjs +0 -2
- package/esm2022/lib/components/suis-table/suis-table.module.mjs +0 -30
- package/esm2022/lib/components/suis-tabs/index.mjs +0 -4
- package/esm2022/lib/components/suis-tabs/suis-tab-actions.pipe.mjs +0 -19
- package/esm2022/lib/components/suis-tabs/suis-tab-template.pipe.mjs +0 -23
- package/esm2022/lib/components/suis-tabs/suis-tab.directive.mjs +0 -25
- package/esm2022/lib/components/suis-tabs/suis-tabs.component.mjs +0 -36
- package/esm2022/lib/components/suis-tabs/suis-tabs.module.mjs +0 -17
- package/esm2022/lib/components/suis-text-area/index.mjs +0 -2
- package/esm2022/lib/components/suis-text-area/suis-text-area.component.mjs +0 -49
- package/esm2022/lib/components/suis-title/index.mjs +0 -3
- package/esm2022/lib/components/suis-title/suis-title.component.mjs +0 -23
- package/esm2022/lib/components/suis-title/suis-title.enum.mjs +0 -7
- package/esm2022/lib/components/suis-toggle/index.mjs +0 -2
- package/esm2022/lib/components/suis-toggle/suis-toggle.component.mjs +0 -26
- package/esm2022/lib/components/suis-toolbar/index.mjs +0 -2
- package/esm2022/lib/components/suis-toolbar/suis-toolbar.component.mjs +0 -19
- package/esm2022/lib/modules/index.mjs +0 -4
- package/esm2022/lib/modules/suis-button/components/suis-button/index.mjs +0 -2
- package/esm2022/lib/modules/suis-button/components/suis-button/suis-button.component.mjs +0 -15
- package/esm2022/lib/modules/suis-button/components/suis-button-link/index.mjs +0 -2
- package/esm2022/lib/modules/suis-button/components/suis-button-link/suis-button-link.component.mjs +0 -37
- package/esm2022/lib/modules/suis-button/components/suis-button-outlined/index.mjs +0 -2
- package/esm2022/lib/modules/suis-button/components/suis-button-outlined/suis-button-outlined.component.mjs +0 -15
- package/esm2022/lib/modules/suis-button/index.mjs +0 -5
- package/esm2022/lib/modules/suis-button/suis-button.module.mjs +0 -30
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation/index.mjs +0 -2
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation/suis-navigation.component.mjs +0 -70
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation-group/index.mjs +0 -2
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation-group/suis-navigation-group.component.mjs +0 -49
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation-group-item/suis-navigation-group-item.component.mjs +0 -51
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation-item/index.mjs +0 -2
- package/esm2022/lib/modules/suis-navigation/components/suis-navigation-item/suis-navigation-item.component.mjs +0 -26
- package/esm2022/lib/modules/suis-navigation/directives/suis-navigation-item.directive.mjs +0 -20
- package/esm2022/lib/modules/suis-navigation/index.mjs +0 -5
- package/esm2022/lib/modules/suis-navigation/interfaces/suis-navigation-item.interfaces.mjs +0 -2
- package/esm2022/lib/modules/suis-navigation/suis-navigation.module.mjs +0 -17
- package/esm2022/lib/modules/suis-select/classes/suis-select-button.base.mjs +0 -56
- package/esm2022/lib/modules/suis-select/classes/suis-select-multi.base.mjs +0 -66
- package/esm2022/lib/modules/suis-select/classes/suis-select-single.base.mjs +0 -46
- package/esm2022/lib/modules/suis-select/classes/suis-select.base.mjs +0 -105
- package/esm2022/lib/modules/suis-select/components/suis-select/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select/suis-select.component.mjs +0 -43
- package/esm2022/lib/modules/suis-select/components/suis-select-button/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select-button/suis-select-button.component.mjs +0 -15
- package/esm2022/lib/modules/suis-select/components/suis-select-button-multi/suis-select-button-multi.component.mjs +0 -16
- package/esm2022/lib/modules/suis-select/components/suis-select-group/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select-group/suis-select-group.component.mjs +0 -62
- package/esm2022/lib/modules/suis-select/components/suis-select-group-option/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select-group-option/suis-select-group-option.component.mjs +0 -18
- package/esm2022/lib/modules/suis-select/components/suis-select-multi/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select-multi/suis-select-multi.component.mjs +0 -45
- package/esm2022/lib/modules/suis-select/components/suis-select-multi-group/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select-multi-group/suis-select-multi-group.component.mjs +0 -64
- package/esm2022/lib/modules/suis-select/components/suis-select-option/index.mjs +0 -2
- package/esm2022/lib/modules/suis-select/components/suis-select-option/suis-select-option.component.mjs +0 -54
- package/esm2022/lib/modules/suis-select/directives/suis-select-group-option.directive.mjs +0 -20
- package/esm2022/lib/modules/suis-select/directives/suis-select-option.directive.mjs +0 -20
- package/esm2022/lib/modules/suis-select/index.mjs +0 -10
- package/esm2022/lib/modules/suis-select/interfaces/suis-select-group-option.interfaces.mjs +0 -2
- package/esm2022/lib/modules/suis-select/interfaces/suis-select-option.interfaces.mjs +0 -2
- package/esm2022/lib/modules/suis-select/pipes/suis-select-filter-group-options.pipe.mjs +0 -21
- package/esm2022/lib/modules/suis-select/pipes/suis-select-filter-options.pipe.mjs +0 -21
- package/esm2022/lib/modules/suis-select/pipes/suis-select-group-label.pipe.mjs +0 -25
- package/esm2022/lib/modules/suis-select/pipes/suis-select-is-selected.pipe.mjs +0 -17
- package/esm2022/lib/modules/suis-select/pipes/suis-select-label.pipe.mjs +0 -24
- package/esm2022/lib/modules/suis-select/pipes/suis-select-multi-chips.pipe.mjs +0 -24
- package/esm2022/lib/modules/suis-select/pipes/suis-select-multi-group-chips.pipe.mjs +0 -25
- package/esm2022/lib/modules/suis-select/pipes/suis-select-multi-is-selected.pipe.mjs +0 -17
- package/esm2022/lib/modules/suis-select/pipes/suis-select-sort-group-options.pipe.mjs +0 -24
- package/esm2022/lib/modules/suis-select/pipes/suis-select-sort-options.pipe.mjs +0 -24
- package/esm2022/lib/modules/suis-select/suis-select.module.mjs +0 -48
- package/esm2022/lib/pipes/index.mjs +0 -2
- package/esm2022/lib/pipes/suis-ng-class.pipe.mjs +0 -19
- package/esm2022/lib/services/index.mjs +0 -3
- package/esm2022/lib/services/suis-dialog.service.mjs +0 -36
- package/esm2022/lib/services/suis-notification.service.mjs +0 -82
- package/esm2022/lib/shared/classes/index.mjs +0 -4
- package/esm2022/lib/shared/classes/suis-button.base.mjs +0 -52
- package/esm2022/lib/shared/classes/suis-checkbox.base.mjs +0 -34
- package/esm2022/lib/shared/classes/suis-input.base.mjs +0 -63
- package/esm2022/lib/types/index.mjs +0 -4
- package/esm2022/lib/types/suis-color.type.mjs +0 -2
- package/esm2022/lib/types/suis-size.type.mjs +0 -2
- package/esm2022/lib/types/suis-sort.type.mjs +0 -2
- package/esm2022/suis.mjs +0 -5
@@ -1,91 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ElementRef, HostListener, Input, ViewChild, forwardRef, } from '@angular/core';
|
2
|
-
import { NgFor, NgIf } from '@angular/common';
|
3
|
-
import { FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule, } from '@angular/forms';
|
4
|
-
import { SuisChipComponent } from '../suis-chip';
|
5
|
-
import { SuisInputComponent } from '../suis-input';
|
6
|
-
import { SuisInputBase } from '../../shared/classes/suis-input.base';
|
7
|
-
import * as i0 from "@angular/core";
|
8
|
-
import * as i1 from "@angular/forms";
|
9
|
-
export class SuisInputChipsComponent extends SuisInputBase {
|
10
|
-
constructor() {
|
11
|
-
super(...arguments);
|
12
|
-
/**
|
13
|
-
* Placeholder text displayed in input. By default set to empty string.
|
14
|
-
*/
|
15
|
-
this.placeholder = '';
|
16
|
-
/**
|
17
|
-
* Sets the color pallette of the chips. Type of SuisColor. By default set to 'primary'.
|
18
|
-
*/
|
19
|
-
this.chipColor = 'primary';
|
20
|
-
/**
|
21
|
-
* Sets the color of the chips' cross icon. Type of SuisColor. By default set to 'white'.
|
22
|
-
*/
|
23
|
-
this.chipIconColor = 'white';
|
24
|
-
/** @internal */
|
25
|
-
this.value = [];
|
26
|
-
/** @internal */
|
27
|
-
this.inputControl = new FormControl('', { nonNullable: true });
|
28
|
-
}
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
30
|
-
writeValue(obj) {
|
31
|
-
this.value = obj || [];
|
32
|
-
this._onChange(this.value);
|
33
|
-
this.cdRef.markForCheck();
|
34
|
-
}
|
35
|
-
addItem(value) {
|
36
|
-
const values = value.split(',').filter((v) => !!v);
|
37
|
-
this.value = this.value.concat(values);
|
38
|
-
this._onChange(this.value);
|
39
|
-
this.changed.emit(this.value);
|
40
|
-
this.cdRef.markForCheck();
|
41
|
-
}
|
42
|
-
removeItem(value) {
|
43
|
-
this.value = this.value.filter((v) => v !== value);
|
44
|
-
}
|
45
|
-
submitValue() {
|
46
|
-
const inputValue = this.inputControl.value;
|
47
|
-
this.inputControl.reset();
|
48
|
-
this.addItem(inputValue);
|
49
|
-
}
|
50
|
-
onDocumentClick(event) {
|
51
|
-
if (!this.inputEl?.nativeElement.contains(event.target))
|
52
|
-
this.submitValue();
|
53
|
-
}
|
54
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputChipsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
55
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuisInputChipsComponent, isStandalone: true, selector: "suis-input-chips", inputs: { placeholder: "placeholder", chipColor: "chipColor", chipIconColor: "chipIconColor" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, providers: [
|
56
|
-
{
|
57
|
-
provide: NG_VALUE_ACCESSOR,
|
58
|
-
multi: true,
|
59
|
-
useExisting: forwardRef(() => SuisInputChipsComponent),
|
60
|
-
},
|
61
|
-
], viewQueries: [{ propertyName: "inputEl", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"suis-input-chips\">\n <div *ngIf=\"!readonly\" #input class=\"suis-input-chips__input\">\n <suis-input\n [id]=\"id\"\n [name]=\"name\"\n [formControl]=\"inputControl\"\n [readonly]=\"readonly\"\n [invalid]=\"invalid\"\n [placeholder]=\"placeholder\"\n (touched)=\"onTouch()\"\n (enterPressed)=\"submitValue()\"\n ></suis-input>\n </div>\n <div *ngIf=\"value.length\" class=\"suis-input-chips__chips\">\n <suis-chip\n [removable]=\"readonly ? false : true\"\n [color]=\"chipColor\"\n [iconColor]=\"chipIconColor\"\n (remove)=\"removeItem(item)\"\n *ngFor=\"let item of value\"\n >\n {{ item }}\n </suis-chip>\n </div>\n</div>\n", styles: [":host{display:block}.suis-input-chips__chips{margin-top:.375rem;display:flex;flex-wrap:wrap}.suis-input-chips__chips suis-chip:not(:last-child){margin-right:.25rem}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SuisChipComponent, selector: "suis-chip", inputs: ["color", "iconColor", "removable"], outputs: ["remove"] }, { kind: "component", type: SuisInputComponent, selector: "suis-input", inputs: ["type", "placeholder"], outputs: ["enterPressed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
62
|
-
}
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputChipsComponent, decorators: [{
|
64
|
-
type: Component,
|
65
|
-
args: [{ selector: 'suis-input-chips', standalone: true, imports: [
|
66
|
-
NgIf,
|
67
|
-
NgFor,
|
68
|
-
ReactiveFormsModule,
|
69
|
-
SuisChipComponent,
|
70
|
-
SuisInputComponent,
|
71
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
72
|
-
{
|
73
|
-
provide: NG_VALUE_ACCESSOR,
|
74
|
-
multi: true,
|
75
|
-
useExisting: forwardRef(() => SuisInputChipsComponent),
|
76
|
-
},
|
77
|
-
], template: "<div class=\"suis-input-chips\">\n <div *ngIf=\"!readonly\" #input class=\"suis-input-chips__input\">\n <suis-input\n [id]=\"id\"\n [name]=\"name\"\n [formControl]=\"inputControl\"\n [readonly]=\"readonly\"\n [invalid]=\"invalid\"\n [placeholder]=\"placeholder\"\n (touched)=\"onTouch()\"\n (enterPressed)=\"submitValue()\"\n ></suis-input>\n </div>\n <div *ngIf=\"value.length\" class=\"suis-input-chips__chips\">\n <suis-chip\n [removable]=\"readonly ? false : true\"\n [color]=\"chipColor\"\n [iconColor]=\"chipIconColor\"\n (remove)=\"removeItem(item)\"\n *ngFor=\"let item of value\"\n >\n {{ item }}\n </suis-chip>\n </div>\n</div>\n", styles: [":host{display:block}.suis-input-chips__chips{margin-top:.375rem;display:flex;flex-wrap:wrap}.suis-input-chips__chips suis-chip:not(:last-child){margin-right:.25rem}\n"] }]
|
78
|
-
}], propDecorators: { inputEl: [{
|
79
|
-
type: ViewChild,
|
80
|
-
args: ['input']
|
81
|
-
}], placeholder: [{
|
82
|
-
type: Input
|
83
|
-
}], chipColor: [{
|
84
|
-
type: Input
|
85
|
-
}], chipIconColor: [{
|
86
|
-
type: Input
|
87
|
-
}], onDocumentClick: [{
|
88
|
-
type: HostListener,
|
89
|
-
args: ['document:click', ['$event']]
|
90
|
-
}] } });
|
91
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC1jaGlwcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtY2hpcHMvc3Vpcy1pbnB1dC1jaGlwcy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtY2hpcHMvc3Vpcy1pbnB1dC1jaGlwcy5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcH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HVlXCJcbiAgICA+XG4gICAgICB7eyBpdGVtIH19XG4gICAgPC9zdWlzLWNoaXA+XG4gIDwvZGl2PlxuPC9kaXY+XG4iXX0=
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './suis-input-image.component';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtaW1hZ2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw4QkFBOEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3Vpcy1pbnB1dC1pbWFnZS5jb21wb25lbnQnO1xuIl19
|
@@ -1,62 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Output, ViewChild, forwardRef, } from '@angular/core';
|
2
|
-
import { NgIf } from '@angular/common';
|
3
|
-
import { SuisInputBase } from '../../shared/classes/suis-input.base';
|
4
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
5
|
-
import { SuisIconComponent } from '../suis-icon/suis-icon.component';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
export class SuisInputImageComponent extends SuisInputBase {
|
8
|
-
constructor() {
|
9
|
-
super(...arguments);
|
10
|
-
/**
|
11
|
-
* Emits value on FileList upload.
|
12
|
-
*/
|
13
|
-
this.uploaded = new EventEmitter();
|
14
|
-
/** @internal */
|
15
|
-
this.value = null;
|
16
|
-
/** @internal */
|
17
|
-
this.imageUrl = null;
|
18
|
-
}
|
19
|
-
writeValue(obj) {
|
20
|
-
if (typeof obj === 'string')
|
21
|
-
this.imageUrl = obj;
|
22
|
-
this.cdRef.markForCheck();
|
23
|
-
}
|
24
|
-
onChange(event) {
|
25
|
-
const target = event.target;
|
26
|
-
if (target.files)
|
27
|
-
this.uploaded.emit(target.files);
|
28
|
-
this.cdRef.markForCheck();
|
29
|
-
}
|
30
|
-
onRemove() {
|
31
|
-
this.imageUrl = null;
|
32
|
-
this.value = null;
|
33
|
-
(this.fileInput?.nativeElement).value = '';
|
34
|
-
this._onChange(this.value);
|
35
|
-
this.changed.emit(this.value);
|
36
|
-
this.cdRef.markForCheck();
|
37
|
-
}
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputImageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuisInputImageComponent, isStandalone: true, selector: "suis-input-image", outputs: { uploaded: "uploaded" }, providers: [
|
40
|
-
{
|
41
|
-
provide: NG_VALUE_ACCESSOR,
|
42
|
-
multi: true,
|
43
|
-
useExisting: forwardRef(() => SuisInputImageComponent),
|
44
|
-
},
|
45
|
-
], viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"suis-input-image\"\n [class.suis-input-image--invalid]=\"invalid\"\n [class.suis-input-image--readonly]=\"readonly\"\n>\n <figure *ngIf=\"imageUrl\" class=\"suis-input-image__preview\">\n <img [src]=\"imageUrl\" alt=\"Uploaded image\" />\n <button type=\"button\" (click)=\"onRemove()\" [disabled]=\"readonly\">\n <suis-icon\n type=\"times\"\n color=\"danger\"\n size=\"md\"\n [filled]=\"true\"\n ></suis-icon>\n </button>\n </figure>\n <input\n #input\n type=\"file\"\n class=\"suis-input-image__input\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n />\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-input-image{width:100%;background-color:#fff;border-radius:.25rem;padding:.5rem 1rem;border:.0625rem solid #dcdde1;min-height:2.625rem;display:flex;align-items:center}.suis-input-image:focus{border:.0625rem solid #192a56;box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-image--invalid{border:.0625rem solid #ff4757}.suis-input-image--invalid:focus{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-input-image--readonly{background-color:#f5f6fa;cursor:not-allowed}.suis-input-image--readonly:focus{border:.0625rem solid #dcdde1;box-shadow:none;outline:none}.suis-input-image__preview{position:relative;margin-right:1rem}.suis-input-image__preview img{display:block;min-width:6.25rem;min-height:6.25rem;max-width:6.25rem;max-height:6.25rem;border-radius:.25rem;object-fit:contain}.suis-input-image__preview button{position:absolute;top:.1875rem;right:.1875rem;border:0;background-color:transparent;cursor:pointer}.suis-input-image--invalid{color:#ff4757}.suis-input-image__input::file-selector-button{color:#fff;background-color:#273c75;border-radius:.25rem;transition:background-color .25s ease-in-out;padding:.25rem .75rem;border:0;font-size:.75rem}.suis-input-image__input:not(:disabled)::file-selector-button:hover{background-color:#273c75d9;cursor:pointer}.suis-input-image__input:disabled::file-selector-button,.suis-input-image__input:disabled{cursor:not-allowed}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SuisIconComponent, selector: "suis-icon", inputs: ["size", "color", "type", "outlined", "filled", "pointer", "bold"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
46
|
-
}
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputImageComponent, decorators: [{
|
48
|
-
type: Component,
|
49
|
-
args: [{ selector: 'suis-input-image', standalone: true, imports: [NgIf, SuisIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
50
|
-
{
|
51
|
-
provide: NG_VALUE_ACCESSOR,
|
52
|
-
multi: true,
|
53
|
-
useExisting: forwardRef(() => SuisInputImageComponent),
|
54
|
-
},
|
55
|
-
], template: "<div\n class=\"suis-input-image\"\n [class.suis-input-image--invalid]=\"invalid\"\n [class.suis-input-image--readonly]=\"readonly\"\n>\n <figure *ngIf=\"imageUrl\" class=\"suis-input-image__preview\">\n <img [src]=\"imageUrl\" alt=\"Uploaded image\" />\n <button type=\"button\" (click)=\"onRemove()\" [disabled]=\"readonly\">\n <suis-icon\n type=\"times\"\n color=\"danger\"\n size=\"md\"\n [filled]=\"true\"\n ></suis-icon>\n </button>\n </figure>\n <input\n #input\n type=\"file\"\n class=\"suis-input-image__input\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n />\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-input-image{width:100%;background-color:#fff;border-radius:.25rem;padding:.5rem 1rem;border:.0625rem solid #dcdde1;min-height:2.625rem;display:flex;align-items:center}.suis-input-image:focus{border:.0625rem solid #192a56;box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-image--invalid{border:.0625rem solid #ff4757}.suis-input-image--invalid:focus{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-input-image--readonly{background-color:#f5f6fa;cursor:not-allowed}.suis-input-image--readonly:focus{border:.0625rem solid #dcdde1;box-shadow:none;outline:none}.suis-input-image__preview{position:relative;margin-right:1rem}.suis-input-image__preview img{display:block;min-width:6.25rem;min-height:6.25rem;max-width:6.25rem;max-height:6.25rem;border-radius:.25rem;object-fit:contain}.suis-input-image__preview button{position:absolute;top:.1875rem;right:.1875rem;border:0;background-color:transparent;cursor:pointer}.suis-input-image--invalid{color:#ff4757}.suis-input-image__input::file-selector-button{color:#fff;background-color:#273c75;border-radius:.25rem;transition:background-color .25s ease-in-out;padding:.25rem .75rem;border:0;font-size:.75rem}.suis-input-image__input:not(:disabled)::file-selector-button:hover{background-color:#273c75d9;cursor:pointer}.suis-input-image__input:disabled::file-selector-button,.suis-input-image__input:disabled{cursor:not-allowed}\n"] }]
|
56
|
-
}], propDecorators: { fileInput: [{
|
57
|
-
type: ViewChild,
|
58
|
-
args: ['input']
|
59
|
-
}], uploaded: [{
|
60
|
-
type: Output
|
61
|
-
}] } });
|
62
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC1pbWFnZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtaW1hZ2Uvc3Vpcy1pbnB1dC1pbWFnZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtaW1hZ2Uvc3Vpcy1pbnB1dC1pbWFnZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsWUFBWSxFQUNaLE1BQU0sRUFDTixTQUFTLEVBQ1QsVUFBVSxHQUNYLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN2QyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0NBQXNDLENBQUM7QUFDckUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDbkQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7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seV09XCJyZWFkb25seVwiXG4+XG4gIDxmaWd1cmUgKm5nSWY9XCJpbWFnZVVybFwiIGNsYXNzPVwic3Vpcy1pbnB1dC1pbWFnZV9fcHJldmlld1wiPlxuICAgIDxpbWcgW3NyY109XCJpbWFnZVVybFwiIGFsdD1cIlVwbG9hZGVkIGltYWdlXCIgLz5cbiAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIiAoY2xpY2spPVwib25SZW1vdmUoKVwiIFtkaXNhYmxlZF09XCJyZWFkb25seVwiPlxuICAgICAgPHN1aXMtaWNvblxuICAgICAgICB0eXBlPVwidGltZXNcIlxuICAgICAgICBjb2xvcj1cImRhbmdlclwiXG4gICAgICAgIHNpemU9XCJtZFwiXG4gICAgICAgIFtmaWxsZWRdPVwidHJ1ZVwiXG4gICAgICA+PC9zdWlzLWljb24+XG4gICAgPC9idXR0b24+XG4gIDwvZmlndXJlPlxuICA8aW5wdXRcbiAgICAjaW5wdXRcbiAgICB0eXBlPVwiZmlsZVwiXG4gICAgY2xhc3M9XCJzdWlzLWlucHV0LWltYWdlX19pbnB1dFwiXG4gICAgW2F0dHIuaWRdPVwiaWRcIlxuICAgIFthdHRyLm5hbWVdPVwibmFtZVwiXG4gICAgW2Rpc2FibGVkXT1cInJlYWRvbmx5XCJcbiAgICAoaW5wdXQpPVwib25DaGFuZ2UoJGV2ZW50KVwiXG4gICAgKGZvY3VzKT1cIm9uVG91Y2goKVwiXG4gIC8+XG48L2Rpdj5cbiJdfQ==
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './suis-input-number.component';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtbnVtYmVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsK0JBQStCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3N1aXMtaW5wdXQtbnVtYmVyLmNvbXBvbmVudCc7XG4iXX0=
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input, forwardRef, } from '@angular/core';
|
2
|
-
import { SuisInputBase } from '../../shared/classes';
|
3
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export class SuisInputNumberComponent extends SuisInputBase {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
/**
|
9
|
-
* Placeholder text displayed in input. By default set to empty string.
|
10
|
-
*/
|
11
|
-
this.placeholder = '';
|
12
|
-
/** @internal */
|
13
|
-
this.value = null;
|
14
|
-
}
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
16
|
-
writeValue(obj) {
|
17
|
-
this.value = obj;
|
18
|
-
this._onChange(this.value);
|
19
|
-
this.cdRef.markForCheck();
|
20
|
-
}
|
21
|
-
onChange(event) {
|
22
|
-
const target = event.target;
|
23
|
-
this.value = target.value ? Number(target.value) : null;
|
24
|
-
this._onChange(this.value);
|
25
|
-
this.changed.emit(this.value);
|
26
|
-
this.cdRef.markForCheck();
|
27
|
-
}
|
28
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
29
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuisInputNumberComponent, isStandalone: true, selector: "suis-input-number", inputs: { placeholder: "placeholder" }, providers: [
|
30
|
-
{
|
31
|
-
provide: NG_VALUE_ACCESSOR,
|
32
|
-
multi: true,
|
33
|
-
useExisting: forwardRef(() => SuisInputNumberComponent),
|
34
|
-
},
|
35
|
-
], usesInheritance: true, ngImport: i0, template: "<input\n type=\"number\"\n class=\"suis-input-number\"\n [class.suis-input-number--invalid]=\"invalid\"\n [class.suis-input-number--readonly]=\"readonly\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-input-number{width:100%;background-color:#fff;border-radius:.25rem;padding:.5rem 1rem;border:.0625rem solid #dcdde1;min-height:2.625rem;-moz-appearance:textfield}.suis-input-number:focus{border:.0625rem solid #192a56;box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-number--invalid{border:.0625rem solid #ff4757}.suis-input-number--invalid:focus{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-input-number--readonly{background-color:#f5f6fa;cursor:not-allowed}.suis-input-number--readonly:focus{border:.0625rem solid #dcdde1;box-shadow:none;outline:none}.suis-input-number::-webkit-outer-spin-button,.suis-input-number::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
36
|
-
}
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputNumberComponent, decorators: [{
|
38
|
-
type: Component,
|
39
|
-
args: [{ selector: 'suis-input-number', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
40
|
-
{
|
41
|
-
provide: NG_VALUE_ACCESSOR,
|
42
|
-
multi: true,
|
43
|
-
useExisting: forwardRef(() => SuisInputNumberComponent),
|
44
|
-
},
|
45
|
-
], template: "<input\n type=\"number\"\n class=\"suis-input-number\"\n [class.suis-input-number--invalid]=\"invalid\"\n [class.suis-input-number--readonly]=\"readonly\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"readonly\"\n (input)=\"onChange($event)\"\n (focus)=\"onTouch()\"\n/>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-input-number{width:100%;background-color:#fff;border-radius:.25rem;padding:.5rem 1rem;border:.0625rem solid #dcdde1;min-height:2.625rem;-moz-appearance:textfield}.suis-input-number:focus{border:.0625rem solid #192a56;box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-number--invalid{border:.0625rem solid #ff4757}.suis-input-number--invalid:focus{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}.suis-input-number--readonly{background-color:#f5f6fa;cursor:not-allowed}.suis-input-number--readonly:focus{border:.0625rem solid #dcdde1;box-shadow:none;outline:none}.suis-input-number::-webkit-outer-spin-button,.suis-input-number::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
|
46
|
-
}], propDecorators: { placeholder: [{
|
47
|
-
type: Input
|
48
|
-
}] } });
|
49
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC1udW1iZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLWlucHV0LW51bWJlci9zdWlzLWlucHV0LW51bWJlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtbnVtYmVyL3N1aXMtaW5wdXQtbnVtYmVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFD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ldC52YWx1ZSA/IE51bWJlcih0YXJnZXQudmFsdWUpIDogbnVsbDtcbiAgICB0aGlzLl9vbkNoYW5nZSh0aGlzLnZhbHVlKTtcbiAgICB0aGlzLmNoYW5nZWQuZW1pdCh0aGlzLnZhbHVlKTtcbiAgICB0aGlzLmNkUmVmLm1hcmtGb3JDaGVjaygpO1xuICB9XG59XG4iLCI8aW5wdXRcbiAgdHlwZT1cIm51bWJlclwiXG4gIGNsYXNzPVwic3Vpcy1pbnB1dC1udW1iZXJcIlxuICBbY2xhc3Muc3Vpcy1pbnB1dC1udW1iZXItLWludmFsaWRdPVwiaW52YWxpZFwiXG4gIFtjbGFzcy5zdWlzLWlucHV0LW51bWJlci0tcmVhZG9ubHldPVwicmVhZG9ubHlcIlxuICBbYXR0ci5pZF09XCJpZFwiXG4gIFthdHRyLm5hbWVdPVwibmFtZVwiXG4gIFt2YWx1ZV09XCJ2YWx1ZVwiXG4gIFtwbGFjZWhvbGRlcl09XCJwbGFjZWhvbGRlclwiXG4gIFtkaXNhYmxlZF09XCJyZWFkb25seVwiXG4gIChpbnB1dCk9XCJvbkNoYW5nZSgkZXZlbnQpXCJcbiAgKGZvY3VzKT1cIm9uVG91Y2goKVwiXG4vPlxuIl19
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './suis-input-radio.component';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtcmFkaW8vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw4QkFBOEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3Vpcy1pbnB1dC1yYWRpby5jb21wb25lbnQnO1xuIl19
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, forwardRef, } from '@angular/core';
|
2
|
-
import { SuisLabelComponent } from '../suis-label/suis-label.component';
|
3
|
-
import { NG_VALUE_ACCESSOR, RadioControlValueAccessor } from '@angular/forms';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export class SuisInputRadioComponent extends RadioControlValueAccessor {
|
6
|
-
constructor() {
|
7
|
-
super(...arguments);
|
8
|
-
/**
|
9
|
-
* Sets input disabled state. By default set to false.
|
10
|
-
*/
|
11
|
-
this.readonly = false;
|
12
|
-
/**
|
13
|
-
* Adds invalid styling to the input. By default set to false.
|
14
|
-
*/
|
15
|
-
this.invalid = false;
|
16
|
-
/**
|
17
|
-
* Sets input checked state to true. By default set to false.
|
18
|
-
*/
|
19
|
-
this.default = false;
|
20
|
-
}
|
21
|
-
ngAfterViewInit() {
|
22
|
-
if (this.default)
|
23
|
-
(this.radioInput?.nativeElement).checked = true;
|
24
|
-
}
|
25
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputRadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
26
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuisInputRadioComponent, isStandalone: true, selector: "suis-input-radio", inputs: { id: "id", readonly: "readonly", invalid: "invalid", default: "default" }, providers: [
|
27
|
-
{
|
28
|
-
provide: NG_VALUE_ACCESSOR,
|
29
|
-
multi: true,
|
30
|
-
useExisting: forwardRef(() => SuisInputRadioComponent),
|
31
|
-
},
|
32
|
-
], viewQueries: [{ propertyName: "radioInput", first: true, predicate: ["input"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<input\n #input\n type=\"radio\"\n class=\"suis-input-radio\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n/>\n\n<suis-label\n class=\"suis-input-radio__label\"\n [class.suis-input-radio__label--invalid]=\"invalid\"\n [class.suis-input-radio__label--readonly]=\"readonly\"\n [for]=\"id\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-radio__circle\"\n [class.suis-input-radio__circle--invalid]=\"invalid\"\n [class.suis-input-radio__circle--readonly]=\"readonly\"\n >\n <div class=\"suis-input-radio__circle__fill\"></div>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-radio{display:none}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle{border:.0625rem solid #192a56}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle__fill{border-radius:100%;height:.75rem;width:.75rem;background-color:#273c75}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle--readonly{border:.0625rem solid #dcdde1}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle--readonly .suis-input-radio__circle__fill{background-color:#dcdde1}.suis-input-radio__label--invalid{color:#ff4757}.suis-input-radio__label--readonly{cursor:not-allowed}.suis-input-radio__circle{margin-right:.5rem;border:.0625rem solid #dcdde1;border-radius:100%;height:1.25rem;width:1.25rem;display:flex;justify-content:center;align-items:center}.suis-input-radio__circle:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-radio__circle--readonly{border:.0625rem solid #dcdde1;cursor:not-allowed}.suis-input-radio__circle--readonly:focus{box-shadow:none}.suis-input-radio__circle--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"], dependencies: [{ kind: "component", type: SuisLabelComponent, selector: "suis-label", inputs: ["for", "required", "pointer", "readonly"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
33
|
-
}
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisInputRadioComponent, decorators: [{
|
35
|
-
type: Component,
|
36
|
-
args: [{ selector: 'suis-input-radio', standalone: true, imports: [SuisLabelComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
37
|
-
{
|
38
|
-
provide: NG_VALUE_ACCESSOR,
|
39
|
-
multi: true,
|
40
|
-
useExisting: forwardRef(() => SuisInputRadioComponent),
|
41
|
-
},
|
42
|
-
], template: "<input\n #input\n type=\"radio\"\n class=\"suis-input-radio\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [disabled]=\"readonly\"\n/>\n\n<suis-label\n class=\"suis-input-radio__label\"\n [class.suis-input-radio__label--invalid]=\"invalid\"\n [class.suis-input-radio__label--readonly]=\"readonly\"\n [for]=\"id\"\n [pointer]=\"true\"\n [readonly]=\"readonly\"\n>\n <div\n [tabindex]=\"readonly ? -1 : 0\"\n class=\"suis-input-radio__circle\"\n [class.suis-input-radio__circle--invalid]=\"invalid\"\n [class.suis-input-radio__circle--readonly]=\"readonly\"\n >\n <div class=\"suis-input-radio__circle__fill\"></div>\n </div>\n <ng-content></ng-content>\n</suis-label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:flex}.suis-input-radio{display:none}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle{border:.0625rem solid #192a56}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle__fill{border-radius:100%;height:.75rem;width:.75rem;background-color:#273c75}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle--readonly{border:.0625rem solid #dcdde1}.suis-input-radio:checked~suis-label ::ng-deep .suis-input-radio__circle--readonly .suis-input-radio__circle__fill{background-color:#dcdde1}.suis-input-radio__label--invalid{color:#ff4757}.suis-input-radio__label--readonly{cursor:not-allowed}.suis-input-radio__circle{margin-right:.5rem;border:.0625rem solid #dcdde1;border-radius:100%;height:1.25rem;width:1.25rem;display:flex;justify-content:center;align-items:center}.suis-input-radio__circle:focus{box-shadow:0 2px 5px #192a56bf;outline:none}.suis-input-radio__circle--readonly{border:.0625rem solid #dcdde1;cursor:not-allowed}.suis-input-radio__circle--readonly:focus{box-shadow:none}.suis-input-radio__circle--invalid{border:.0625rem solid #ff4757;box-shadow:0 2px 5px #ff4757bf}\n"] }]
|
43
|
-
}], propDecorators: { radioInput: [{
|
44
|
-
type: ViewChild,
|
45
|
-
args: ['input']
|
46
|
-
}], id: [{
|
47
|
-
type: Input,
|
48
|
-
args: [{ required: true }]
|
49
|
-
}], readonly: [{
|
50
|
-
type: Input
|
51
|
-
}], invalid: [{
|
52
|
-
type: Input
|
53
|
-
}], default: [{
|
54
|
-
type: Input
|
55
|
-
}] } });
|
56
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pbnB1dC1yYWRpby5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtcmFkaW8vc3Vpcy1pbnB1dC1yYWRpby5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaW5wdXQtcmFkaW8vc3Vpcy1pbnB1dC1yYWRpby5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBRUwsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsS0FBSyxFQUNMLFNBQVMsRUFDVCxVQUFVLEdBQ1gsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sb0NBQW9DLENBQUM7QUFDeEUsT0F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CJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaXRlbS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLWl0ZW0uY29tcG9uZW50JztcbiJdfQ==
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class SuisItemComponent {
|
4
|
-
constructor() {
|
5
|
-
/**
|
6
|
-
* Adds a padding around the content. By default set to true.
|
7
|
-
*/
|
8
|
-
this.spacing = true;
|
9
|
-
/**
|
10
|
-
* Styles item as a header. By default set to false.
|
11
|
-
*/
|
12
|
-
this.header = false;
|
13
|
-
/**
|
14
|
-
* Displays border bottom below the item. Does not effect header item. By default set to true.
|
15
|
-
*/
|
16
|
-
this.divider = true;
|
17
|
-
}
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuisItemComponent, isStandalone: true, selector: "suis-item", inputs: { spacing: "spacing", header: "header", divider: "divider" }, ngImport: i0, template: "<div\n class=\"suis-item\"\n [class.suis-item--spacing]=\"spacing\"\n [class.suis-item--header]=\"header\"\n [class.suis-item--divider]=\"divider && !header\"\n>\n <ng-content></ng-content>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-item{background-color:#fff;border:0}.suis-item--spacing{padding:1rem}.suis-item--divider{border-bottom:.0625rem solid #dcdde1}.suis-item--header{font-weight:500;display:flex;color:#192a56;justify-content:center;align-items:center;border-bottom:.1875rem solid #192a56}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
20
|
-
}
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisItemComponent, decorators: [{
|
22
|
-
type: Component,
|
23
|
-
args: [{ selector: 'suis-item', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"suis-item\"\n [class.suis-item--spacing]=\"spacing\"\n [class.suis-item--header]=\"header\"\n [class.suis-item--divider]=\"divider && !header\"\n>\n <ng-content></ng-content>\n</div>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-item{background-color:#fff;border:0}.suis-item--spacing{padding:1rem}.suis-item--divider{border-bottom:.0625rem solid #dcdde1}.suis-item--header{font-weight:500;display:flex;color:#192a56;justify-content:center;align-items:center;border-bottom:.1875rem solid #192a56}\n"] }]
|
24
|
-
}], propDecorators: { spacing: [{
|
25
|
-
type: Input
|
26
|
-
}], header: [{
|
27
|
-
type: Input
|
28
|
-
}], divider: [{
|
29
|
-
type: Input
|
30
|
-
}] } });
|
31
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1pdGVtL3N1aXMtaXRlbS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtaXRlbS9zdW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nQge1xuICAvKipcbiAgICogQWRkcyBhIHBhZGRpbmcgYXJvdW5kIHRoZSBjb250ZW50LiBCeSBkZWZhdWx0IHNldCB0byB0cnVlLlxuICAgKi9cbiAgQElucHV0KCkgc3BhY2luZzogYm9vbGVhbiA9IHRydWU7XG5cbiAgLyoqXG4gICAqIFN0eWxlcyBpdGVtIGFzIGEgaGVhZGVyLiBCeSBkZWZhdWx0IHNldCB0byBmYWxzZS5cbiAgICovXG4gIEBJbnB1dCgpIGhlYWRlcjogYm9vbGVhbiA9IGZhbHNlO1xuXG4gIC8qKlxuICAgKiBEaXNwbGF5cyBib3JkZXIgYm90dG9tIGJlbG93IHRoZSBpdGVtLiBEb2VzIG5vdCBlZmZlY3QgaGVhZGVyIGl0ZW0uIEJ5IGRlZmF1bHQgc2V0IHRvIHRydWUuXG4gICAqL1xuICBASW5wdXQoKSBkaXZpZGVyOiBib29sZWFuID0gdHJ1ZTtcbn1cbiIsIjxkaXZcbiAgY2xhc3M9XCJzdWlzLWl0ZW1cIlxuICBbY2xhc3Muc3Vpcy1pdGVtLS1zcGFjaW5nXT1cInNwYWNpbmdcIlxuICBbY2xhc3Muc3Vpcy1pdGVtLS1oZWFkZXJdPVwiaGVhZGVyXCJcbiAgW2NsYXNzLnN1aXMtaXRlbS0tZGl2aWRlcl09XCJkaXZpZGVyICYmICFoZWFkZXJcIlxuPlxuICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48L2Rpdj5cbiJdfQ==
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './suis-label.component';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbGFiZWwvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyx3QkFBd0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3Vpcy1sYWJlbC5jb21wb25lbnQnO1xuIl19
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
2
|
-
import { NgIf } from '@angular/common';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export class SuisLabelComponent {
|
5
|
-
constructor() {
|
6
|
-
/**
|
7
|
-
* Adds a red colored asterisk after the label. By default set to false.
|
8
|
-
*/
|
9
|
-
this.required = false;
|
10
|
-
/**
|
11
|
-
* Shows the pointer cursor when hovered. By default set to false.
|
12
|
-
*/
|
13
|
-
this.pointer = false;
|
14
|
-
/**
|
15
|
-
* Grays out the label content and removes cursor pointer behavior. By default set to false.
|
16
|
-
*/
|
17
|
-
this.readonly = false;
|
18
|
-
}
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SuisLabelComponent, isStandalone: true, selector: "suis-label", inputs: { for: "for", required: "required", pointer: "pointer", readonly: "readonly" }, ngImport: i0, template: "<label\n class=\"suis-label\"\n [class.suis-label--pointer]=\"!readonly && pointer\"\n [class.suis-label--readonly]=\"readonly\"\n [htmlFor]=\"for ? for : undefined\"\n>\n <ng-content></ng-content>\n <span *ngIf=\"required\" class=\"suis-label__asterisk\">*</span>\n <ng-content select=\"[suisLabelAside]\"></ng-content>\n</label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-label{font-size:.875rem;display:flex;align-items:center}.suis-label__asterisk{color:#ff4757;margin-left:.0625rem}.suis-label--pointer{cursor:pointer}.suis-label--readonly{color:#dcdde1}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
21
|
-
}
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisLabelComponent, decorators: [{
|
23
|
-
type: Component,
|
24
|
-
args: [{ selector: 'suis-label', standalone: true, imports: [NgIf], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"suis-label\"\n [class.suis-label--pointer]=\"!readonly && pointer\"\n [class.suis-label--readonly]=\"readonly\"\n [htmlFor]=\"for ? for : undefined\"\n>\n <ng-content></ng-content>\n <span *ngIf=\"required\" class=\"suis-label__asterisk\">*</span>\n <ng-content select=\"[suisLabelAside]\"></ng-content>\n</label>\n", styles: ["*{margin:0;padding:0;box-sizing:border-box}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host{display:block}.suis-label{font-size:.875rem;display:flex;align-items:center}.suis-label__asterisk{color:#ff4757;margin-left:.0625rem}.suis-label--pointer{cursor:pointer}.suis-label--readonly{color:#dcdde1}\n"] }]
|
25
|
-
}], propDecorators: { for: [{
|
26
|
-
type: Input
|
27
|
-
}], required: [{
|
28
|
-
type: Input
|
29
|
-
}], pointer: [{
|
30
|
-
type: Input
|
31
|
-
}], readonly: [{
|
32
|
-
type: Input
|
33
|
-
}] } });
|
34
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1sYWJlbC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbGFiZWwvc3Vpcy1sYWJlbC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N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WJlbC0tcmVhZG9ubHldPVwicmVhZG9ubHlcIlxuICBbaHRtbEZvcl09XCJmb3IgPyBmb3IgOiB1bmRlZmluZWRcIlxuPlxuICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG4gIDxzcGFuICpuZ0lmPVwicmVxdWlyZWRcIiBjbGFzcz1cInN1aXMtbGFiZWxfX2FzdGVyaXNrXCI+Kjwvc3Bhbj5cbiAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiW3N1aXNMYWJlbEFzaWRlXVwiPjwvbmctY29udGVudD5cbjwvbGFiZWw+XG4iXX0=
|
@@ -1,4 +0,0 @@
|
|
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
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, } from '@angular/core';
|
2
|
-
import { NgClass, NgIf } from '@angular/common';
|
3
|
-
import { SuisNgClassPipe } from '../../pipes';
|
4
|
-
import { SuisIconComponent } from '../suis-icon/suis-icon.component';
|
5
|
-
import * as i0 from "@angular/core";
|
6
|
-
export class SuisNotificationComponent {
|
7
|
-
constructor() {
|
8
|
-
/**
|
9
|
-
* Notification item data. Type of SuisNotification.
|
10
|
-
*/
|
11
|
-
this.notification = null;
|
12
|
-
/**
|
13
|
-
* Emits on close button action.
|
14
|
-
*/
|
15
|
-
this.closed = new EventEmitter();
|
16
|
-
}
|
17
|
-
onClose() {
|
18
|
-
this.notification = null;
|
19
|
-
this.closed.emit();
|
20
|
-
}
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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 <div class=\"suis-notification__header\">\n <span>\n {{ notification.header }}\n </span>\n <button\n class=\"suis-notification__header__close\"\n type=\"button\"\n (click)=\"onClose()\"\n >\n <suis-icon type=\"times\" [color]=\"'white'\" [size]=\"'lg'\"></suis-icon>\n </button>\n </div>\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)}}:host{display:block}.suis-notification{min-width:16.25rem;max-width:16.25rem;padding:1rem;border-radius:.25rem;color:#fff;position:relative;font-size:.875rem}.suis-notification--success{background-color:#2ed573}.suis-notification--warning{background-color:#ffa502}.suis-notification--danger{background-color:#ff4757}.suis-notification__header{display:flex;align-items:center;justify-content:space-between;font-size:1rem;font-weight:700;margin-bottom:.75rem}.suis-notification__header__close{background-color:transparent;border:none;cursor:pointer}.suis-notification__header__close:hover{opacity:.75}.suis-notification__message{font-size:.875rem}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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 }); }
|
23
|
-
}
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisNotificationComponent, decorators: [{
|
25
|
-
type: Component,
|
26
|
-
args: [{ selector: 'suis-notification', standalone: true, imports: [NgIf, NgClass, SuisNgClassPipe, SuisIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"notification\"\n class=\"suis-notification\"\n [ngClass]=\"'suis-notification' | suisNgClass : notification.type\"\n>\n <div class=\"suis-notification__header\">\n <span>\n {{ notification.header }}\n </span>\n <button\n class=\"suis-notification__header__close\"\n type=\"button\"\n (click)=\"onClose()\"\n >\n <suis-icon type=\"times\" [color]=\"'white'\" [size]=\"'lg'\"></suis-icon>\n </button>\n </div>\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)}}:host{display:block}.suis-notification{min-width:16.25rem;max-width:16.25rem;padding:1rem;border-radius:.25rem;color:#fff;position:relative;font-size:.875rem}.suis-notification--success{background-color:#2ed573}.suis-notification--warning{background-color:#ffa502}.suis-notification--danger{background-color:#ff4757}.suis-notification__header{display:flex;align-items:center;justify-content:space-between;font-size:1rem;font-weight:700;margin-bottom:.75rem}.suis-notification__header__close{background-color:transparent;border:none;cursor:pointer}.suis-notification__header__close:hover{opacity:.75}.suis-notification__message{font-size:.875rem}\n"] }]
|
27
|
-
}], propDecorators: { notification: [{
|
28
|
-
type: Input,
|
29
|
-
args: [{ required: true }]
|
30
|
-
}], closed: [{
|
31
|
-
type: Output
|
32
|
-
}] } });
|
33
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb24uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9zdWlzL3NyYy9saWIvY29tcG9uZW50cy9zdWlzLW5vdGlmaWNhdGlvbi9zdWlzLW5vdGlmaWNhdGlvbi5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9uL3N1aXMtbm90aWZpY2F0aW9uLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDWixLQUFLLEVBQ0wsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUM5QyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQzs7QUFVckUsTUFBTSxPQUFPLHlCQUF5QjtJQVJ0QztRQVNFOztXQUVHO1FBQ3dCLGlCQUFZLEdBQTZCLElBQUksQ0FBQztRQUV6RTs7V0FFRztRQUNPLFdBQU0sR0FBRyxJQUFJLFlBQVksRUFBUSxDQUFDO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VhZGVyOiBzdHJpbmc7XG4gIG1lc3NhZ2U6IHN0cmluZztcbiAgdHlwZTogU3Vpc05vdGlmaWNhdGlvblR5cGU7XG4gIGRlbGF5OiBudW1iZXI7XG59XG4iXX0=
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export {};
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb24udHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9uL3N1aXMtbm90aWZpY2F0aW9uLnR5cGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBTdWlzTm90aWZpY2F0aW9uVHlwZSA9ICdzdWNjZXNzJyB8ICd3YXJuaW5nJyB8ICdkYW5nZXInO1xuIl19
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './suis-notifications.component';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9ucy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGdDQUFnQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLW5vdGlmaWNhdGlvbnMuY29tcG9uZW50JztcbiJdfQ==
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, inject, } from '@angular/core';
|
2
|
-
import { NgFor } 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
|
-
export class SuisNotificationsComponent {
|
7
|
-
constructor() {
|
8
|
-
this.notificationService = inject(SuisNotificationService);
|
9
|
-
this.notifications = this.notificationService.getNotifications();
|
10
|
-
}
|
11
|
-
remove(id) {
|
12
|
-
this.notificationService.forceRemoveNotification(id);
|
13
|
-
}
|
14
|
-
/** @internal */
|
15
|
-
notificationTrackBy(index, notification) {
|
16
|
-
return notification.id;
|
17
|
-
}
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisNotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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:fixed;bottom:0;right:0;padding:1rem}:host suis-notification{display:block;margin-top:.75rem}\n"], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SuisNotificationComponent, selector: "suis-notification", inputs: ["notification"], outputs: ["closed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
20
|
-
}
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisNotificationsComponent, decorators: [{
|
22
|
-
type: Component,
|
23
|
-
args: [{ selector: 'suis-notifications', standalone: true, imports: [NgFor, 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:fixed;bottom:0;right:0;padding:1rem}:host suis-notification{display:block;margin-top:.75rem}\n"] }]
|
24
|
-
}] });
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1ub3RpZmljYXRpb25zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1ub3RpZmljYXRpb25zL3N1aXMtbm90aWZpY2F0aW9ucy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtbm90aWZpY2F0aW9ucy9zdWlzLW5vdGlmaWNhdGlvbnMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixTQUFTLEVBRVQsTUFBTSxHQUNQLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV4QyxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSxrREFBa0QsQ0FBQztBQUM3RixPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSwwQ0FBMEMsQ0FBQzs7QUFVbkYsTUFBTSxPQUFPLDBCQUEwQjtJQVJ2QztRQVNtQix3QkFBbUIsR0FBRyxNQUFNLENBQUMsdUJBQXV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aW9uXG4gICpuZ0Zvcj1cImxldCBub3RpZmljYXRpb24gb2Ygbm90aWZpY2F0aW9ucygpOyB0cmFja0J5OiBub3RpZmljYXRpb25UcmFja0J5XCJcbiAgW25vdGlmaWNhdGlvbl09XCJub3RpZmljYXRpb25cIlxuICAoY2xvc2VkKT1cInJlbW92ZShub3RpZmljYXRpb24uaWQpXCJcbj48L3N1aXMtbm90aWZpY2F0aW9uPlxuIl19
|
@@ -1,2 +0,0 @@
|
|
1
|
-
export * from './suis-pagination.component';
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtcGFnaW5hdGlvbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDZCQUE2QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdWlzLXBhZ2luYXRpb24uY29tcG9uZW50JztcbiJdfQ==
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { Pipe } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class SuisPaginationItemsPipe {
|
4
|
-
transform(ofLabel, page, perPage, totalItems, itemsLabel) {
|
5
|
-
if (totalItems <= 0)
|
6
|
-
return `0-0 ${ofLabel} 0 ${itemsLabel}`;
|
7
|
-
const minItem = page * perPage - perPage + 1;
|
8
|
-
const maxItem = page * perPage > totalItems ? totalItems : page * perPage;
|
9
|
-
return `${minItem}-${maxItem} ${ofLabel} ${totalItems} ${itemsLabel}`;
|
10
|
-
}
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisPaginationItemsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
12
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SuisPaginationItemsPipe, isStandalone: true, name: "suisPaginationItems" }); }
|
13
|
-
}
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisPaginationItemsPipe, decorators: [{
|
15
|
-
type: Pipe,
|
16
|
-
args: [{
|
17
|
-
standalone: true,
|
18
|
-
name: 'suisPaginationItems',
|
19
|
-
}]
|
20
|
-
}] });
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1wYWdpbmF0aW9uLWl0ZW1zLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3N1aXMvc3JjL2xpYi9jb21wb25lbnRzL3N1aXMtcGFnaW5hdGlvbi9zdWlzLXBhZ2luYXRpb24taXRlbXMucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFpQixNQUFNLGVBQWUsQ0FBQzs7QUFNcEQsTUFBTSxPQUFPLHVCQUF1QjtJQUNsQyxTQUFTLENBQ1AsT0FBZSxFQUNmLElBQVksRUFDWixPQUFlLEVBQ2YsVUFBa0IsRUFDbEIsVUFBa0I7UUFFbEIsSUFBSSxVQUFVLElBQUksQ0FBQztZQUFFLE9BQU8sT0FBTyxPQUFPLE1BQU0sVUFBVSxFQUFFLENBQUM7UUFFN0QsTUFBTSxPQUFPLEdBQUcsSUFBSSxHQUFHLE9BQU8sR0FBRyxPQUFPLEdBQUcsQ0FBQyxDQUFDO1FBQzdDLE1BQU0sT0FBTyxHQUFHLElBQUksR0FBRyxPQUFPLEdBQUcsVUFBVSxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLElB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JHt0b3RhbEl0ZW1zfSAke2l0ZW1zTGFiZWx9YDtcbiAgfVxufVxuIl19
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { Pipe } from '@angular/core';
|
2
|
-
import * as i0 from "@angular/core";
|
3
|
-
export class SuisPaginationPagePipe {
|
4
|
-
transform(ofLabel, page, perPage, totalItems) {
|
5
|
-
if (totalItems <= 0)
|
6
|
-
return `1 ${ofLabel} 1`;
|
7
|
-
const maxPage = Math.ceil(totalItems / perPage);
|
8
|
-
return `${page} ${ofLabel} ${maxPage}`;
|
9
|
-
}
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisPaginationPagePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
11
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: SuisPaginationPagePipe, isStandalone: true, name: "suisPaginationPage" }); }
|
12
|
-
}
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SuisPaginationPagePipe, decorators: [{
|
14
|
-
type: Pipe,
|
15
|
-
args: [{
|
16
|
-
standalone: true,
|
17
|
-
name: 'suisPaginationPage',
|
18
|
-
}]
|
19
|
-
}] });
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Vpcy1wYWdpbmF0aW9uLXBhZ2UucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvc3Vpcy9zcmMvbGliL2NvbXBvbmVudHMvc3Vpcy1wYWdpbmF0aW9uL3N1aXMtcGFnaW5hdGlvbi1wYWdlLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFl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