@spicainternational/ngx-sds-components 2.25.3 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/src/lib/color-picker/color-picker.component.mjs +7 -3
- package/esm2020/src/lib/quick-info/quick-info.component.mjs +20 -8
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +6 -2
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +19 -7
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +6 -2
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +19 -7
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/color-picker/color-picker.component.d.ts +2 -1
- package/src/lib/quick-info/quick-info.component.d.ts +3 -1
|
@@ -9,6 +9,7 @@ export class SdsColorPickerComponent {
|
|
|
9
9
|
this.colors = [];
|
|
10
10
|
this.disabled = false;
|
|
11
11
|
this.style = 'inline';
|
|
12
|
+
this.showCaret = true;
|
|
12
13
|
this.checkIcon = faCheck;
|
|
13
14
|
this.showDropdown = false;
|
|
14
15
|
this.elementUUID = 'sds-cp-' + crypto.randomUUID();
|
|
@@ -25,14 +26,15 @@ export class SdsColorPickerComponent {
|
|
|
25
26
|
if (!this.disabled) {
|
|
26
27
|
this.selectedColor = color;
|
|
27
28
|
this.selectedColorChange.emit(color);
|
|
29
|
+
this.showDropdown = false;
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
}
|
|
31
33
|
SdsColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
32
|
-
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
34
|
+
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style", showCaret: "showCaret" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n", styles: [".color-tiles-container-inline{display:flex;gap:.25rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:.5rem;gap:.5rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
33
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, decorators: [{
|
|
34
36
|
type: Component,
|
|
35
|
-
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
37
|
+
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n", styles: [".color-tiles-container-inline{display:flex;gap:.25rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:.5rem;gap:.5rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}\n"] }]
|
|
36
38
|
}], ctorParameters: function () { return []; }, propDecorators: { colors: [{
|
|
37
39
|
type: Input
|
|
38
40
|
}], disabled: [{
|
|
@@ -45,5 +47,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
45
47
|
type: Output
|
|
46
48
|
}], style: [{
|
|
47
49
|
type: Input
|
|
50
|
+
}], showCaret: [{
|
|
51
|
+
type: Input
|
|
48
52
|
}] } });
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sb3ItcGlja2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL2NvbG9yLXBpY2tlci9jb2xvci1waWNrZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvY29sb3ItcGlja2VyL2NvbG9yLXBpY2tlci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQXFCLE1BQU0sRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDekcsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGtDQUFrQyxDQUFDOzs7OztBQVEzRCxNQUFNLE9BQU8sdUJBQXVCO0lBY2hDO1FBYlMsV0FBTSxHQUFrQixFQUFFLENBQUM7UUFDM0IsYUFBUSxHQUFZLEtBQUssQ0FBQztRQUkxQixVQUFLLEdBQTBCLFFBQVEsQ0FBQTtRQUN2QyxjQUFTLEdBQVksSUFBSSxDQUFDO1FBRTVCLGNBQVMsR0FBRyxPQUFPLENBQUM7UUFFcEIsaUJBQVksR0FBRyxLQUFLLENBQUM7UUFDckIsZ0JBQVcsR0FBRyxTQUFTLEdBQUcsTUFBTSxDQUFDLFVBQVUsRUFBRSxDQUFDO1FBR2pELElBQUksQ0FBQyxtQkFBbUIsR0FBR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CJsZXQgY29sb3Igb2YgY29sb3JzXCJcclxuICAgICAgICBbc3R5bGUuYmFja2dyb3VuZC1jb2xvcl09XCJjb2xvclwiXHJcbiAgICAgICAgY2xhc3M9XCJjb2xvci10aWxlXCJcclxuICAgICAgICAoY2xpY2spPVwic2VsZWN0Q29sb3IoY29sb3IpXCJcclxuICAgID5cclxuICAgICAgICA8ZmEtaWNvblxyXG4gICAgICAgICAgICAqbmdJZj1cInNlbGVjdGVkQ29sb3IgPT09IGNvbG9yXCJcclxuICAgICAgICAgICAgW2ljb25dPVwiY2hlY2tJY29uXCJcclxuICAgICAgICA+XHJcbiAgICAgICAgPC9mYS1pY29uPlxyXG4gICAgPC9kaXY+XHJcbjwvZGl2PlxyXG5cclxuPG5nLWNvbnRhaW5lciBcclxuICAgICpuZ0lmPVwic3R5bGUgPT09ICdkcm9wZG93bidcIj5cclxuICAgIDxkaXZcclxuICAgICAgICBbaWRdPVwiZWxlbWVudFVVSURcIlxyXG4gICAgICAgIGNsYXNzPVwiYnRuLWdyb3VwXCJcclxuICAgID5cclxuICAgICAgICA8YnV0dG9uXHJcbiAgICAgICAgICAgIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICBjbGFzcz1cImJ0biBkLWZsZXggYWxpZ24taXRlbXMtY2VudGVyXCJcclxuICAgICAgICAgICAgW2NsYXNzLmRyb3Bkb3duLXRvZ2dsZV09XCJzaG93Q2FyZXRcIlxyXG4gICAgICAgICAgICBhcmlhLWNvbnRyb2xzPVwiZHJvcGRvd24tYmFzaWNcIlxyXG4gICAgICAgICAgICAoY2xpY2spPVwic2hvd0Ryb3Bkb3duID0gdHJ1ZVwiXHJcbiAgICAgICAgPlxyXG4gICAgICAgICAgICA8ZGl2XHJcbiAgICAgICAgICAgICAgICBjbGFzcz1cImNvbG9yLXRpbGVcIlxyXG4gICAgICAgICAgICAgICAgW3N0eWxlLmJhY2tncm91bmQtY29sb3JdPVwic2VsZWN0ZWRDb2xvciB8fCBkZWZhdWx0Q29sb3JcIlxyXG4gICAgICAgICAgICAgICAgW2NsYXNzLnVuZGVmaW5lZC1jb2xvcl09XCIhKHNlbGVjdGVkQ29sb3IgfHwgZGVmYXVsdENvbG9yKVwiXHJcbiAgICAgICAgICAgID5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgPC9idXR0b24+XHJcbiAgICA8L2Rpdj5cclxuXHJcbiAgICA8ZHgtcG9wb3ZlclxyXG4gICAgICAgIHRhcmdldD1cIiN7e2VsZW1lbnRVVUlEfX1cIlxyXG4gICAgICAgIHBvc2l0aW9uPVwiYm90dG9tXCJcclxuICAgICAgICBbKHZpc2libGUpXT1cInNob3dEcm9wZG93blwiXHJcbiAgICA+XHJcbiAgICAgICAgPGRpdlxyXG4gICAgICAgICAgICBjbGFzcz1cImNvbG9yLXRpbGVzLWNvbnRhaW5lci1zcXVhcmVcIlxyXG4gICAgICAgICAgICBbbmdTdHlsZV09XCJ7ICdncmlkLXRlbXBsYXRlLWNvbHVtbnMnOiBkcm9wZG93bkdyaWRUZW1wbGF0ZUNvbHVtbnN9XCJcclxuICAgICAgICA+XHJcbiAgICAgICAgICAgIDxkaXZcclxuICAgICAgICAgICAgICAgICpuZ0Zvcj1cImxldCBjb2xvciBvZiBjb2xvcnNcIlxyXG4gICAgICAgICAgICAgICAgW3N0eWxlLmJhY2tncm91bmQtY29sb3JdPVwiY29sb3JcIlxyXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJjb2xvci10aWxlIHJvdW5kZWQtY2lyY2xlXCJcclxuICAgICAgICAgICAgICAgIChjbGljayk9XCJzZWxlY3RDb2xvcihjb2xvcilcIlxyXG4gICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICA8ZmEtaWNvblxyXG4gICAgICAgICAgICAgICAgICAgICpuZ0lmPVwic2VsZWN0ZWRDb2xvciA9PT0gY29sb3JcIlxyXG4gICAgICAgICAgICAgICAgICAgIFtpY29uXT1cImNoZWNrSWNvblwiXHJcbiAgICAgICAgICAgICAgICA+XHJcbiAgICAgICAgICAgICAgICA8L2ZhLWljb24+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgIDwvZGl2PlxyXG4gICAgPC9keC1wb3BvdmVyPlxyXG5cclxuPC9uZy1jb250YWluZXI+XHJcbiJdfQ==
|
|
@@ -10,16 +10,18 @@ export class SdsQuickInfoComponent {
|
|
|
10
10
|
this.popoverMaxWidth = '20rem';
|
|
11
11
|
this.popoverMinWidth = '';
|
|
12
12
|
this.popoverWidth = '';
|
|
13
|
+
this.showEventName = 'dxhoverend';
|
|
14
|
+
this.hideEventName = 'dxhoverstart';
|
|
13
15
|
this.mode = 'default';
|
|
14
16
|
this.customContent = { nativeElement: undefined };
|
|
15
|
-
this.hideEvent = { name:
|
|
16
|
-
this.showEvent = { name:
|
|
17
|
+
this.hideEvent = { name: this.showEventName, delay: 200 };
|
|
18
|
+
this.showEvent = { name: this.hideEventName, delay: 200 };
|
|
17
19
|
}
|
|
18
20
|
ngOnChanges(changes) {
|
|
19
|
-
if (changes['showDelay']) {
|
|
21
|
+
if (changes['showDelay'] || changes['showEventName']) {
|
|
20
22
|
this.setShowEvent();
|
|
21
23
|
}
|
|
22
|
-
else if (changes['hideDelay']) {
|
|
24
|
+
else if (changes['hideDelay'] || changes['hideEventName']) {
|
|
23
25
|
this.setHideEvent();
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -34,14 +36,20 @@ export class SdsQuickInfoComponent {
|
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
38
|
setShowEvent() {
|
|
37
|
-
this.showEvent = {
|
|
39
|
+
this.showEvent = {
|
|
40
|
+
name: this.showEventName,
|
|
41
|
+
delay: this.showDelay ?? 200
|
|
42
|
+
};
|
|
38
43
|
}
|
|
39
44
|
setHideEvent() {
|
|
40
|
-
this.hideEvent = {
|
|
45
|
+
this.hideEvent = {
|
|
46
|
+
name: this.hideEventName,
|
|
47
|
+
delay: this.hideDelay ?? 200
|
|
48
|
+
};
|
|
41
49
|
}
|
|
42
50
|
}
|
|
43
51
|
SdsQuickInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
44
|
-
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", popoverMinWidth: "popoverMinWidth", popoverWidth: "popoverWidth", showDelay: "showDelay", hideDelay: "hideDelay", mode: "mode" }, queries: [{ propertyName: "customContent", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
52
|
+
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", popoverMinWidth: "popoverMinWidth", popoverWidth: "popoverWidth", showDelay: "showDelay", showEventName: "showEventName", hideDelay: "hideDelay", hideEventName: "hideEventName", mode: "mode" }, queries: [{ propertyName: "customContent", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
45
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, decorators: [{
|
|
46
54
|
type: Component,
|
|
47
55
|
args: [{ selector: 'sds-quick-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"] }]
|
|
@@ -55,8 +63,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
55
63
|
type: Input
|
|
56
64
|
}], showDelay: [{
|
|
57
65
|
type: Input
|
|
66
|
+
}], showEventName: [{
|
|
67
|
+
type: Input
|
|
58
68
|
}], hideDelay: [{
|
|
59
69
|
type: Input
|
|
70
|
+
}], hideEventName: [{
|
|
71
|
+
type: Input
|
|
60
72
|
}], mode: [{
|
|
61
73
|
type: Input
|
|
62
74
|
}], buttonElementRef: [{
|
|
@@ -66,4 +78,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
66
78
|
type: ContentChild,
|
|
67
79
|
args: ['customContent']
|
|
68
80
|
}] } });
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVpY2staW5mby5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2RzLWNvbXBvbmVudHMvc3JjL2xpYi9xdWljay1pbmZvL3F1aWNrLWluZm8uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcXVpY2staW5mby9xdWljay1pbmZvLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDSCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDWixVQUFVLEVBQ1YsS0FBSyxFQUdMLFNBQVMsR0FDWixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQ0gsWUFBWSxHQUVmLE1BQU0sb0NBQW9DLENBQUM7Ozs7O0FBUTVDLE1BQU0sT0FBTyxxQkFBcUI7SUF3QjlCO1FBdkJTLFNBQUksR0FBbUIsWUFBWSxDQUFDO1FBQ3BDLG9CQUFlLEdBQStCLE9BQU8sQ0FBQztRQUN0RCxvQkFBZSxHQUErQixFQUFFLENBQUM7UUFDakQsaUJBQVksR0FBK0IsRUFBRSxDQUFDO1FBRTlDLGtCQUFhLEdBQVcsWUFBWSxDQUFDO1FBRXJDLGtCQUFhLEdBQVcsY0FBYyxDQUFDO1FBQ3ZDLFNBQUksR0FBdUIsU0FBUyxDQUFBO1FBR2Qsa0JBQWEsR0FBZSxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUUsQ0FBQztRQWFwRixJQUF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SB8fCBjaGFuZ2VzWydzaG93RXZlbnROYW1lJ10pIHtcclxuICAgICAgICAgICAgdGhpcy5zZXRTaG93RXZlbnQoKTtcclxuICAgICAgICB9IGVsc2UgaWYgKGNoYW5nZXNbJ2hpZGVEZWxheSddIHx8IGNoYW5nZXNbJ2hpZGVFdmVudE5hbWUnXSkge1xyXG4gICAgICAgICAgICB0aGlzLnNldEhpZGVFdmVudCgpO1xyXG4gICAgICAgIH0gICAgICAgIFxyXG4gICAgfVxyXG5cclxuICAgIG9uSGlkaW5nKGU6IGFueSkge1xyXG4gICAgICAgIGlmICh0aGlzLm1vZGUgPT09ICdkZWZhdWx0Jykge1xyXG4gICAgICAgICAgICBjb25zdCBwb3BvdmVyQ29udGVudCA9IGUuY29tcG9uZW50LmNvbnRlbnQoKS5wYXJlbnROb2RlO1xyXG4gICAgICAgICAgICBjb25zdCBpc01vdXNlSW5zaWRlUG9wb3ZlciA9IHBvcG92ZXJDb250ZW50Lm1hdGNoZXMoJzpob3ZlcicpO1xyXG4gICAgICAgICAgICBlLmNhbmNlbCA9IGlzTW91c2VJbnNpZGVQb3BvdmVyO1xyXG5cclxuICAgICAgICAgICAgcG9wb3ZlckNvbnRlbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2VsZWF2ZScsICgpID0+IHtcclxuICAgICAgICAgICAgICAgIGUuY29tcG9uZW50LmhpZGUoKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgc2V0U2hvd0V2ZW50KCk6IHZvaWQge1xyXG4gICAgICAgIHRoaXMuc2hvd0V2ZW50ID0geyBcclxuICAgICAgICAgICAgbmFtZTogdGhpcy5zaG93RXZlbnROYW1lLCBcclxuICAgICAgICAgICAgZGVsYXk6IHRoaXMuc2hvd0RlbGF5ID8/IDIwMCBcclxuICAgICAgICB9O1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgc2V0SGlkZUV2ZW50KCk6IHZ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2R4LXBvcG92ZXI+Il19
|
|
@@ -13,6 +13,7 @@ class SdsColorPickerComponent {
|
|
|
13
13
|
this.colors = [];
|
|
14
14
|
this.disabled = false;
|
|
15
15
|
this.style = 'inline';
|
|
16
|
+
this.showCaret = true;
|
|
16
17
|
this.checkIcon = faCheck;
|
|
17
18
|
this.showDropdown = false;
|
|
18
19
|
this.elementUUID = 'sds-cp-' + crypto.randomUUID();
|
|
@@ -29,14 +30,15 @@ class SdsColorPickerComponent {
|
|
|
29
30
|
if (!this.disabled) {
|
|
30
31
|
this.selectedColor = color;
|
|
31
32
|
this.selectedColorChange.emit(color);
|
|
33
|
+
this.showDropdown = false;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
SdsColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
38
|
+
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style", showCaret: "showCaret" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n", styles: [".color-tiles-container-inline{display:flex;gap:.25rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:.5rem;gap:.5rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
37
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, decorators: [{
|
|
38
40
|
type: Component,
|
|
39
|
-
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
41
|
+
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n", styles: [".color-tiles-container-inline{display:flex;gap:.25rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:.5rem;gap:.5rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}\n"] }]
|
|
40
42
|
}], ctorParameters: function () { return []; }, propDecorators: { colors: [{
|
|
41
43
|
type: Input
|
|
42
44
|
}], disabled: [{
|
|
@@ -49,6 +51,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
49
51
|
type: Output
|
|
50
52
|
}], style: [{
|
|
51
53
|
type: Input
|
|
54
|
+
}], showCaret: [{
|
|
55
|
+
type: Input
|
|
52
56
|
}] } });
|
|
53
57
|
|
|
54
58
|
const components = [SdsColorPickerComponent];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-color-picker.mjs","sources":["../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.ts","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.html","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.module.ts","../../../projects/ngx-sds-components/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\n\r\n@Component({\r\n selector: 'sds-color-picker',\r\n templateUrl: './color-picker.component.html',\r\n styleUrls: ['./color-picker.component.scss'],\r\n})\r\nexport class SdsColorPickerComponent implements OnInit, OnChanges {\r\n @Input() colors: Array<string> = [];\r\n @Input() disabled: boolean = false;\r\n @Input() selectedColor?: string;\r\n @Input() defaultColor?: string;\r\n @Output() selectedColorChange: EventEmitter<string>;\r\n @Input() style: 'inline' | 'dropdown' = 'inline'\r\n\r\n public checkIcon = faCheck;\r\n public dropdownGridTemplateColumns?: string;\r\n public showDropdown = false;\r\n public elementUUID = 'sds-cp-' + crypto.randomUUID();\r\n\r\n constructor() {\r\n this.selectedColorChange = new EventEmitter<string>();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['colors']) {\r\n const gridSize = Math.ceil(Math.sqrt(this.colors.length));\r\n this.dropdownGridTemplateColumns = `repeat(${gridSize}, 1fr)`;\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public selectColor(color: string): void {\r\n if (!this.disabled) {\r\n this.selectedColor = color;\r\n this.selectedColorChange.emit(color);\r\n }\r\n }\r\n}\r\n","<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-color-picker.mjs","sources":["../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.ts","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.html","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.module.ts","../../../projects/ngx-sds-components/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\n\r\n@Component({\r\n selector: 'sds-color-picker',\r\n templateUrl: './color-picker.component.html',\r\n styleUrls: ['./color-picker.component.scss'],\r\n})\r\nexport class SdsColorPickerComponent implements OnInit, OnChanges {\r\n @Input() colors: Array<string> = [];\r\n @Input() disabled: boolean = false;\r\n @Input() selectedColor?: string;\r\n @Input() defaultColor?: string;\r\n @Output() selectedColorChange: EventEmitter<string>;\r\n @Input() style: 'inline' | 'dropdown' = 'inline'\r\n @Input() showCaret: boolean = true;\r\n\r\n public checkIcon = faCheck;\r\n public dropdownGridTemplateColumns?: string;\r\n public showDropdown = false;\r\n public elementUUID = 'sds-cp-' + crypto.randomUUID();\r\n\r\n constructor() {\r\n this.selectedColorChange = new EventEmitter<string>();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['colors']) {\r\n const gridSize = Math.ceil(Math.sqrt(this.colors.length));\r\n this.dropdownGridTemplateColumns = `repeat(${gridSize}, 1fr)`;\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public selectColor(color: string): void {\r\n if (!this.disabled) {\r\n this.selectedColor = color;\r\n this.selectedColorChange.emit(color);\r\n this.showDropdown = false;\r\n }\r\n }\r\n}\r\n","<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsColorPickerComponent } from './color-picker.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\n\r\n\r\nconst components = [SdsColorPickerComponent];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule,\r\n DxPopoverModule,\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsColorPickerModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MASa,uBAAuB,CAAA;AAchC,IAAA,WAAA,GAAA;AAbS,QAAA,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;AAC3B,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAI1B,QAAA,IAAK,CAAA,KAAA,GAA0B,QAAQ,CAAA;AACvC,QAAA,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;AAE5B,QAAA,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;AAEpB,QAAA,IAAY,CAAA,YA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QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EATtB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;YACjB,eAAe;SAChB,CAAA,EAAA,CAAA,CAAA;2FAKU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AAChB,qBAAA;iBACF,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -14,16 +14,18 @@ class SdsQuickInfoComponent {
|
|
|
14
14
|
this.popoverMaxWidth = '20rem';
|
|
15
15
|
this.popoverMinWidth = '';
|
|
16
16
|
this.popoverWidth = '';
|
|
17
|
+
this.showEventName = 'dxhoverend';
|
|
18
|
+
this.hideEventName = 'dxhoverstart';
|
|
17
19
|
this.mode = 'default';
|
|
18
20
|
this.customContent = { nativeElement: undefined };
|
|
19
|
-
this.hideEvent = { name:
|
|
20
|
-
this.showEvent = { name:
|
|
21
|
+
this.hideEvent = { name: this.showEventName, delay: 200 };
|
|
22
|
+
this.showEvent = { name: this.hideEventName, delay: 200 };
|
|
21
23
|
}
|
|
22
24
|
ngOnChanges(changes) {
|
|
23
|
-
if (changes['showDelay']) {
|
|
25
|
+
if (changes['showDelay'] || changes['showEventName']) {
|
|
24
26
|
this.setShowEvent();
|
|
25
27
|
}
|
|
26
|
-
else if (changes['hideDelay']) {
|
|
28
|
+
else if (changes['hideDelay'] || changes['hideEventName']) {
|
|
27
29
|
this.setHideEvent();
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -39,15 +41,21 @@ class SdsQuickInfoComponent {
|
|
|
39
41
|
}
|
|
40
42
|
setShowEvent() {
|
|
41
43
|
var _a;
|
|
42
|
-
this.showEvent = {
|
|
44
|
+
this.showEvent = {
|
|
45
|
+
name: this.showEventName,
|
|
46
|
+
delay: (_a = this.showDelay) !== null && _a !== void 0 ? _a : 200
|
|
47
|
+
};
|
|
43
48
|
}
|
|
44
49
|
setHideEvent() {
|
|
45
50
|
var _a;
|
|
46
|
-
this.hideEvent = {
|
|
51
|
+
this.hideEvent = {
|
|
52
|
+
name: this.hideEventName,
|
|
53
|
+
delay: (_a = this.hideDelay) !== null && _a !== void 0 ? _a : 200
|
|
54
|
+
};
|
|
47
55
|
}
|
|
48
56
|
}
|
|
49
57
|
SdsQuickInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
-
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", popoverMinWidth: "popoverMinWidth", popoverWidth: "popoverWidth", showDelay: "showDelay", hideDelay: "hideDelay", mode: "mode" }, queries: [{ propertyName: "customContent", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
58
|
+
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", popoverMinWidth: "popoverMinWidth", popoverWidth: "popoverWidth", showDelay: "showDelay", showEventName: "showEventName", hideDelay: "hideDelay", hideEventName: "hideEventName", mode: "mode" }, queries: [{ propertyName: "customContent", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, decorators: [{
|
|
52
60
|
type: Component,
|
|
53
61
|
args: [{ selector: 'sds-quick-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"] }]
|
|
@@ -61,8 +69,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
61
69
|
type: Input
|
|
62
70
|
}], showDelay: [{
|
|
63
71
|
type: Input
|
|
72
|
+
}], showEventName: [{
|
|
73
|
+
type: Input
|
|
64
74
|
}], hideDelay: [{
|
|
65
75
|
type: Input
|
|
76
|
+
}], hideEventName: [{
|
|
77
|
+
type: Input
|
|
66
78
|
}], mode: [{
|
|
67
79
|
type: Input
|
|
68
80
|
}], buttonElementRef: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-quick-info.mjs","sources":["../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.ts","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.html","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.module.ts","../../../projects/ngx-sds-components/src/lib/quick-info/spicainternational-ngx-sds-components-src-lib-quick-info.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {\r\n faInfoCircle,\r\n IconDefinition,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-quick-info',\r\n templateUrl: './quick-info.component.html',\r\n styleUrls: ['./quick-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SdsQuickInfoComponent implements OnChanges {\r\n @Input() icon: IconDefinition = faInfoCircle;\r\n @Input() popoverMaxWidth: number | Function | string = '20rem';\r\n @Input() popoverMinWidth: number | Function | string = '';\r\n @Input() popoverWidth: number | Function | string = '';\r\n @Input() showDelay?: number;\r\n @Input() hideDelay?: number;\r\n @Input() mode: 'default' | 'hint' = 'default'\r\n\r\n @ViewChild('popoverTarget', { read: ElementRef, static: true }) public buttonElementRef?: ElementRef;\r\n @ContentChild('customContent') customContent: ElementRef = { nativeElement: undefined };\r\n\r\n public hideEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n };\r\n\r\n public showEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n }; \r\n\r\n constructor() {\r\n this.hideEvent = { name:
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-quick-info.mjs","sources":["../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.ts","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.html","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.module.ts","../../../projects/ngx-sds-components/src/lib/quick-info/spicainternational-ngx-sds-components-src-lib-quick-info.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {\r\n faInfoCircle,\r\n IconDefinition,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-quick-info',\r\n templateUrl: './quick-info.component.html',\r\n styleUrls: ['./quick-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SdsQuickInfoComponent implements OnChanges {\r\n @Input() icon: IconDefinition = faInfoCircle;\r\n @Input() popoverMaxWidth: number | Function | string = '20rem';\r\n @Input() popoverMinWidth: number | Function | string = '';\r\n @Input() popoverWidth: number | Function | string = '';\r\n @Input() showDelay?: number;\r\n @Input() showEventName: string = 'dxhoverend';\r\n @Input() hideDelay?: number;\r\n @Input() hideEventName: string = 'dxhoverstart';\r\n @Input() mode: 'default' | 'hint' = 'default'\r\n\r\n @ViewChild('popoverTarget', { read: ElementRef, static: true }) public buttonElementRef?: ElementRef;\r\n @ContentChild('customContent') customContent: ElementRef = { nativeElement: undefined };\r\n\r\n public hideEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n };\r\n\r\n public showEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n }; \r\n\r\n constructor() {\r\n this.hideEvent = { name: this.showEventName, delay: 200 };\r\n this.showEvent = { name: this.hideEventName, delay: 200 };\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['showDelay'] || changes['showEventName']) {\r\n this.setShowEvent();\r\n } else if (changes['hideDelay'] || changes['hideEventName']) {\r\n this.setHideEvent();\r\n } \r\n }\r\n\r\n onHiding(e: any) {\r\n if (this.mode === 'default') {\r\n const popoverContent = e.component.content().parentNode;\r\n const isMouseInsidePopover = popoverContent.matches(':hover');\r\n e.cancel = isMouseInsidePopover;\r\n\r\n popoverContent.addEventListener('mouseleave', () => {\r\n e.component.hide();\r\n });\r\n }\r\n }\r\n\r\n private setShowEvent(): void {\r\n this.showEvent = { \r\n name: this.showEventName, \r\n delay: this.showDelay ?? 200 \r\n };\r\n }\r\n\r\n private setHideEvent(): void {\r\n this.hideEvent = { \r\n name: this.hideEventName, \r\n delay: this.hideDelay ?? 200 \r\n };\r\n }\r\n\r\n}\r\n","<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsQuickInfoComponent } from './quick-info.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\n\r\n\r\nconst components = [SdsQuickInfoComponent];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule,\r\n DxPopoverModule,\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsQuickInfoModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAqBa,qBAAqB,CAAA;AAwB9B,IAAA,WAAA,GAAA;AAvBS,QAAA,IAAI,CAAA,IAAA,GAAmB,YAAY,CAAC;AACpC,QAAA,IAAe,CAAA,eAAA,GAA+B,OAAO,CAAC;AACtD,QAAA,IAAe,CAAA,eAAA,GAA+B,EAAE,CAAC;AACjD,QAAA,IAAY,CAAA,YAAA,GAA+B,EAAE,CAAC;AAE9C,QAAA,IAAa,CAAA,aAAA,GAAW,YAAY,CAAC;AAErC,QAAA,IAAa,CAAA,aAAA,GAAW,cAAc,CAAC;AACvC,QAAA,IAAI,CAAA,IAAA,GAAuB,SAAS,CAAA;QAGd,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAapF,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AAC1D,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;KAC7D;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,EAAE;YAClD,IAAI,CAAC,YAAY,EAAE,CAAC;AACvB,SAAA;aAAM,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,EAAE;YACzD,IAAI,CAAC,YAAY,EAAE,CAAC;AACvB,SAAA;KACJ;AAED,IAAA,QAA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
|
this.style = 'inline';
|
|
16
|
+
this.showCaret = true;
|
|
16
17
|
this.checkIcon = faCheck;
|
|
17
18
|
this.showDropdown = false;
|
|
18
19
|
this.elementUUID = 'sds-cp-' + crypto.randomUUID();
|
|
@@ -29,14 +30,15 @@ class SdsColorPickerComponent {
|
|
|
29
30
|
if (!this.disabled) {
|
|
30
31
|
this.selectedColor = color;
|
|
31
32
|
this.selectedColorChange.emit(color);
|
|
33
|
+
this.showDropdown = false;
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
SdsColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
-
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
38
|
+
SdsColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsColorPickerComponent, selector: "sds-color-picker", inputs: { colors: "colors", disabled: "disabled", selectedColor: "selectedColor", defaultColor: "defaultColor", style: "style", showCaret: "showCaret" }, outputs: { selectedColorChange: "selectedColorChange" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n", styles: [".color-tiles-container-inline{display:flex;gap:.25rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:.5rem;gap:.5rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
37
39
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsColorPickerComponent, decorators: [{
|
|
38
40
|
type: Component,
|
|
39
|
-
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
41
|
+
args: [{ selector: 'sds-color-picker', template: "<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n", styles: [".color-tiles-container-inline{display:flex;gap:.25rem;color:#fff}.color-tiles-container-square{display:grid;grid-gap:.5rem;gap:.5rem;color:#fff}.color-tile{height:2rem;width:2rem;display:flex;align-items:center;justify-content:center;border-radius:100%;cursor:pointer}.color-tile fa-icon{line-height:1rem}.color-tile.undefined-color{border-color:gray;border-style:solid;border-width:1px}\n"] }]
|
|
40
42
|
}], ctorParameters: function () { return []; }, propDecorators: { colors: [{
|
|
41
43
|
type: Input
|
|
42
44
|
}], disabled: [{
|
|
@@ -49,6 +51,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
49
51
|
type: Output
|
|
50
52
|
}], style: [{
|
|
51
53
|
type: Input
|
|
54
|
+
}], showCaret: [{
|
|
55
|
+
type: Input
|
|
52
56
|
}] } });
|
|
53
57
|
|
|
54
58
|
const components = [SdsColorPickerComponent];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-color-picker.mjs","sources":["../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.ts","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.html","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.module.ts","../../../projects/ngx-sds-components/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\n\r\n@Component({\r\n selector: 'sds-color-picker',\r\n templateUrl: './color-picker.component.html',\r\n styleUrls: ['./color-picker.component.scss'],\r\n})\r\nexport class SdsColorPickerComponent implements OnInit, OnChanges {\r\n @Input() colors: Array<string> = [];\r\n @Input() disabled: boolean = false;\r\n @Input() selectedColor?: string;\r\n @Input() defaultColor?: string;\r\n @Output() selectedColorChange: EventEmitter<string>;\r\n @Input() style: 'inline' | 'dropdown' = 'inline'\r\n\r\n public checkIcon = faCheck;\r\n public dropdownGridTemplateColumns?: string;\r\n public showDropdown = false;\r\n public elementUUID = 'sds-cp-' + crypto.randomUUID();\r\n\r\n constructor() {\r\n this.selectedColorChange = new EventEmitter<string>();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['colors']) {\r\n const gridSize = Math.ceil(Math.sqrt(this.colors.length));\r\n this.dropdownGridTemplateColumns = `repeat(${gridSize}, 1fr)`;\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public selectColor(color: string): void {\r\n if (!this.disabled) {\r\n this.selectedColor = color;\r\n this.selectedColorChange.emit(color);\r\n }\r\n }\r\n}\r\n","<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-color-picker.mjs","sources":["../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.ts","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.component.html","../../../projects/ngx-sds-components/src/lib/color-picker/color-picker.module.ts","../../../projects/ngx-sds-components/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core';\r\nimport { faCheck } from '@fortawesome/pro-solid-svg-icons';\r\n\r\n\r\n@Component({\r\n selector: 'sds-color-picker',\r\n templateUrl: './color-picker.component.html',\r\n styleUrls: ['./color-picker.component.scss'],\r\n})\r\nexport class SdsColorPickerComponent implements OnInit, OnChanges {\r\n @Input() colors: Array<string> = [];\r\n @Input() disabled: boolean = false;\r\n @Input() selectedColor?: string;\r\n @Input() defaultColor?: string;\r\n @Output() selectedColorChange: EventEmitter<string>;\r\n @Input() style: 'inline' | 'dropdown' = 'inline'\r\n @Input() showCaret: boolean = true;\r\n\r\n public checkIcon = faCheck;\r\n public dropdownGridTemplateColumns?: string;\r\n public showDropdown = false;\r\n public elementUUID = 'sds-cp-' + crypto.randomUUID();\r\n\r\n constructor() {\r\n this.selectedColorChange = new EventEmitter<string>();\r\n }\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['colors']) {\r\n const gridSize = Math.ceil(Math.sqrt(this.colors.length));\r\n this.dropdownGridTemplateColumns = `repeat(${gridSize}, 1fr)`;\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public selectColor(color: string): void {\r\n if (!this.disabled) {\r\n this.selectedColor = color;\r\n this.selectedColorChange.emit(color);\r\n this.showDropdown = false;\r\n }\r\n }\r\n}\r\n","<div\r\n *ngIf=\"style === 'inline'\"\r\n class=\"color-tiles-container-inline\"\r\n>\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n</div>\r\n\r\n<ng-container \r\n *ngIf=\"style === 'dropdown'\">\r\n <div\r\n [id]=\"elementUUID\"\r\n class=\"btn-group\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn d-flex align-items-center\"\r\n [class.dropdown-toggle]=\"showCaret\"\r\n aria-controls=\"dropdown-basic\"\r\n (click)=\"showDropdown = true\"\r\n >\r\n <div\r\n class=\"color-tile\"\r\n [style.background-color]=\"selectedColor || defaultColor\"\r\n [class.undefined-color]=\"!(selectedColor || defaultColor)\"\r\n >\r\n </div>\r\n </button>\r\n </div>\r\n\r\n <dx-popover\r\n target=\"#{{elementUUID}}\"\r\n position=\"bottom\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <div\r\n class=\"color-tiles-container-square\"\r\n [ngStyle]=\"{ 'grid-template-columns': dropdownGridTemplateColumns}\"\r\n >\r\n <div\r\n *ngFor=\"let color of colors\"\r\n [style.background-color]=\"color\"\r\n class=\"color-tile rounded-circle\"\r\n (click)=\"selectColor(color)\"\r\n >\r\n <fa-icon\r\n *ngIf=\"selectedColor === color\"\r\n [icon]=\"checkIcon\"\r\n >\r\n </fa-icon>\r\n </div>\r\n </div>\r\n </dx-popover>\r\n\r\n</ng-container>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsColorPickerComponent } from './color-picker.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\n\r\n\r\nconst components = [SdsColorPickerComponent];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule,\r\n DxPopoverModule,\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsColorPickerModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MASa,uBAAuB,CAAA;AAchC,IAAA,WAAA,GAAA;QAbS,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;QAC3B,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAA0B,QAAQ,CAAA;QACvC,IAAS,CAAA,SAAA,GAAY,IAAI,CAAC;QAE5B,IAAS,CAAA,SAAA,GAAG,OAAO,CAAC;QAEpB,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AACrB,QAAA,IAAA,CAAA,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;AAGjD,QAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,YAAY,EAA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AAA,CAAA;2FAKU,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -14,16 +14,18 @@ class SdsQuickInfoComponent {
|
|
|
14
14
|
this.popoverMaxWidth = '20rem';
|
|
15
15
|
this.popoverMinWidth = '';
|
|
16
16
|
this.popoverWidth = '';
|
|
17
|
+
this.showEventName = 'dxhoverend';
|
|
18
|
+
this.hideEventName = 'dxhoverstart';
|
|
17
19
|
this.mode = 'default';
|
|
18
20
|
this.customContent = { nativeElement: undefined };
|
|
19
|
-
this.hideEvent = { name:
|
|
20
|
-
this.showEvent = { name:
|
|
21
|
+
this.hideEvent = { name: this.showEventName, delay: 200 };
|
|
22
|
+
this.showEvent = { name: this.hideEventName, delay: 200 };
|
|
21
23
|
}
|
|
22
24
|
ngOnChanges(changes) {
|
|
23
|
-
if (changes['showDelay']) {
|
|
25
|
+
if (changes['showDelay'] || changes['showEventName']) {
|
|
24
26
|
this.setShowEvent();
|
|
25
27
|
}
|
|
26
|
-
else if (changes['hideDelay']) {
|
|
28
|
+
else if (changes['hideDelay'] || changes['hideEventName']) {
|
|
27
29
|
this.setHideEvent();
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -38,14 +40,20 @@ class SdsQuickInfoComponent {
|
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
setShowEvent() {
|
|
41
|
-
this.showEvent = {
|
|
43
|
+
this.showEvent = {
|
|
44
|
+
name: this.showEventName,
|
|
45
|
+
delay: this.showDelay ?? 200
|
|
46
|
+
};
|
|
42
47
|
}
|
|
43
48
|
setHideEvent() {
|
|
44
|
-
this.hideEvent = {
|
|
49
|
+
this.hideEvent = {
|
|
50
|
+
name: this.hideEventName,
|
|
51
|
+
delay: this.hideDelay ?? 200
|
|
52
|
+
};
|
|
45
53
|
}
|
|
46
54
|
}
|
|
47
55
|
SdsQuickInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", popoverMinWidth: "popoverMinWidth", popoverWidth: "popoverWidth", showDelay: "showDelay", hideDelay: "hideDelay", mode: "mode" }, queries: [{ propertyName: "customContent", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
56
|
+
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", popoverMinWidth: "popoverMinWidth", popoverWidth: "popoverWidth", showDelay: "showDelay", showEventName: "showEventName", hideDelay: "hideDelay", hideEventName: "hideEventName", mode: "mode" }, queries: [{ propertyName: "customContent", first: true, predicate: ["customContent"], descendants: true }], viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"], components: [{ type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }, { type: i2.DxPopoverComponent, selector: "dx-popover", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showEvent", "showTitle", "target", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "onTitleRendered", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
49
57
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, decorators: [{
|
|
50
58
|
type: Component,
|
|
51
59
|
args: [{ selector: 'sds-quick-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: ["dx-popover{display:inline}\n"] }]
|
|
@@ -59,8 +67,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
59
67
|
type: Input
|
|
60
68
|
}], showDelay: [{
|
|
61
69
|
type: Input
|
|
70
|
+
}], showEventName: [{
|
|
71
|
+
type: Input
|
|
62
72
|
}], hideDelay: [{
|
|
63
73
|
type: Input
|
|
74
|
+
}], hideEventName: [{
|
|
75
|
+
type: Input
|
|
64
76
|
}], mode: [{
|
|
65
77
|
type: Input
|
|
66
78
|
}], buttonElementRef: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-quick-info.mjs","sources":["../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.ts","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.html","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.module.ts","../../../projects/ngx-sds-components/src/lib/quick-info/spicainternational-ngx-sds-components-src-lib-quick-info.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {\r\n faInfoCircle,\r\n IconDefinition,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-quick-info',\r\n templateUrl: './quick-info.component.html',\r\n styleUrls: ['./quick-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SdsQuickInfoComponent implements OnChanges {\r\n @Input() icon: IconDefinition = faInfoCircle;\r\n @Input() popoverMaxWidth: number | Function | string = '20rem';\r\n @Input() popoverMinWidth: number | Function | string = '';\r\n @Input() popoverWidth: number | Function | string = '';\r\n @Input() showDelay?: number;\r\n @Input() hideDelay?: number;\r\n @Input() mode: 'default' | 'hint' = 'default'\r\n\r\n @ViewChild('popoverTarget', { read: ElementRef, static: true }) public buttonElementRef?: ElementRef;\r\n @ContentChild('customContent') customContent: ElementRef = { nativeElement: undefined };\r\n\r\n public hideEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n };\r\n\r\n public showEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n }; \r\n\r\n constructor() {\r\n this.hideEvent = { name:
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-quick-info.mjs","sources":["../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.ts","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.component.html","../../../projects/ngx-sds-components/src/lib/quick-info/quick-info.module.ts","../../../projects/ngx-sds-components/src/lib/quick-info/spicainternational-ngx-sds-components-src-lib-quick-info.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ContentChild,\r\n ElementRef,\r\n Input,\r\n OnChanges,\r\n SimpleChanges,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {\r\n faInfoCircle,\r\n IconDefinition,\r\n} from '@fortawesome/pro-regular-svg-icons';\r\n\r\n@Component({\r\n selector: 'sds-quick-info',\r\n templateUrl: './quick-info.component.html',\r\n styleUrls: ['./quick-info.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SdsQuickInfoComponent implements OnChanges {\r\n @Input() icon: IconDefinition = faInfoCircle;\r\n @Input() popoverMaxWidth: number | Function | string = '20rem';\r\n @Input() popoverMinWidth: number | Function | string = '';\r\n @Input() popoverWidth: number | Function | string = '';\r\n @Input() showDelay?: number;\r\n @Input() showEventName: string = 'dxhoverend';\r\n @Input() hideDelay?: number;\r\n @Input() hideEventName: string = 'dxhoverstart';\r\n @Input() mode: 'default' | 'hint' = 'default'\r\n\r\n @ViewChild('popoverTarget', { read: ElementRef, static: true }) public buttonElementRef?: ElementRef;\r\n @ContentChild('customContent') customContent: ElementRef = { nativeElement: undefined };\r\n\r\n public hideEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n };\r\n\r\n public showEvent: string | {\r\n delay?: number;\r\n name?: string;\r\n }; \r\n\r\n constructor() {\r\n this.hideEvent = { name: this.showEventName, delay: 200 };\r\n this.showEvent = { name: this.hideEventName, delay: 200 };\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['showDelay'] || changes['showEventName']) {\r\n this.setShowEvent();\r\n } else if (changes['hideDelay'] || changes['hideEventName']) {\r\n this.setHideEvent();\r\n } \r\n }\r\n\r\n onHiding(e: any) {\r\n if (this.mode === 'default') {\r\n const popoverContent = e.component.content().parentNode;\r\n const isMouseInsidePopover = popoverContent.matches(':hover');\r\n e.cancel = isMouseInsidePopover;\r\n\r\n popoverContent.addEventListener('mouseleave', () => {\r\n e.component.hide();\r\n });\r\n }\r\n }\r\n\r\n private setShowEvent(): void {\r\n this.showEvent = { \r\n name: this.showEventName, \r\n delay: this.showDelay ?? 200 \r\n };\r\n }\r\n\r\n private setHideEvent(): void {\r\n this.hideEvent = { \r\n name: this.hideEventName, \r\n delay: this.hideDelay ?? 200 \r\n };\r\n }\r\n\r\n}\r\n","<div #popoverTarget\r\n class=\"d-inline\">\r\n\r\n <fa-icon *ngIf=\"!customContent\"\r\n [icon]=\"icon\"\r\n > </fa-icon>\r\n\r\n <ng-container *ngIf=\"customContent\" >\r\n <ng-content select=\"customContent\"></ng-content>\r\n </ng-container> \r\n</div>\r\n\r\n<dx-popover\r\n [target]=\"buttonElementRef?.nativeElement\"\r\n [maxWidth]=\"popoverMaxWidth\"\r\n [minWidth]=\"popoverMinWidth\"\r\n [width]=\"popoverWidth\"\r\n [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n [wrapperAttr]=\"{ class: 'sds-quick-info-popover' }\"\r\n>\r\n <ng-content></ng-content>\r\n</dx-popover>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsQuickInfoComponent } from './quick-info.component';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\n\r\n\r\nconst components = [SdsQuickInfoComponent];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n FontAwesomeModule,\r\n DxPopoverModule,\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsQuickInfoModule { }\r\n","/**\n * Generated bundle index. Do not ed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AAC,CAAC;MAc9B,kBAAkB,CAAA;;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAdX,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAMrC,YAAY;QACZ,iBAAiB;AACjB,QAAA,eAAe,aARC,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAc5B,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EATpB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;YACjB,eAAe;AAChB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,UAAU;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ export declare class SdsColorPickerComponent implements OnInit, OnChanges {
|
|
|
7
7
|
defaultColor?: string;
|
|
8
8
|
selectedColorChange: EventEmitter<string>;
|
|
9
9
|
style: 'inline' | 'dropdown';
|
|
10
|
+
showCaret: boolean;
|
|
10
11
|
checkIcon: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
11
12
|
dropdownGridTemplateColumns?: string;
|
|
12
13
|
showDropdown: boolean;
|
|
@@ -16,5 +17,5 @@ export declare class SdsColorPickerComponent implements OnInit, OnChanges {
|
|
|
16
17
|
ngOnInit(): void;
|
|
17
18
|
selectColor(color: string): void;
|
|
18
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsColorPickerComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsColorPickerComponent, "sds-color-picker", never, { "colors": "colors"; "disabled": "disabled"; "selectedColor": "selectedColor"; "defaultColor": "defaultColor"; "style": "style"; }, { "selectedColorChange": "selectedColorChange"; }, never, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsColorPickerComponent, "sds-color-picker", never, { "colors": "colors"; "disabled": "disabled"; "selectedColor": "selectedColor"; "defaultColor": "defaultColor"; "style": "style"; "showCaret": "showCaret"; }, { "selectedColorChange": "selectedColorChange"; }, never, never>;
|
|
20
21
|
}
|
|
@@ -7,7 +7,9 @@ export declare class SdsQuickInfoComponent implements OnChanges {
|
|
|
7
7
|
popoverMinWidth: number | Function | string;
|
|
8
8
|
popoverWidth: number | Function | string;
|
|
9
9
|
showDelay?: number;
|
|
10
|
+
showEventName: string;
|
|
10
11
|
hideDelay?: number;
|
|
12
|
+
hideEventName: string;
|
|
11
13
|
mode: 'default' | 'hint';
|
|
12
14
|
buttonElementRef?: ElementRef;
|
|
13
15
|
customContent: ElementRef;
|
|
@@ -25,5 +27,5 @@ export declare class SdsQuickInfoComponent implements OnChanges {
|
|
|
25
27
|
private setShowEvent;
|
|
26
28
|
private setHideEvent;
|
|
27
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsQuickInfoComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsQuickInfoComponent, "sds-quick-info", never, { "icon": "icon"; "popoverMaxWidth": "popoverMaxWidth"; "popoverMinWidth": "popoverMinWidth"; "popoverWidth": "popoverWidth"; "showDelay": "showDelay"; "hideDelay": "hideDelay"; "mode": "mode"; }, {}, ["customContent"], ["customContent", "*"]>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsQuickInfoComponent, "sds-quick-info", never, { "icon": "icon"; "popoverMaxWidth": "popoverMaxWidth"; "popoverMinWidth": "popoverMinWidth"; "popoverWidth": "popoverWidth"; "showDelay": "showDelay"; "showEventName": "showEventName"; "hideDelay": "hideDelay"; "hideEventName": "hideEventName"; "mode": "mode"; }, {}, ["customContent"], ["customContent", "*"]>;
|
|
29
31
|
}
|