@spicainternational/ngx-sds-components 2.9.4 → 2.10.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/public-api.mjs +2 -1
- package/esm2020/src/lib/avatar/avatar.component.mjs +4 -2
- package/esm2020/src/lib/page-header/page-header.component.mjs +22 -0
- package/esm2020/src/lib/page-header/page-header.module.mjs +19 -0
- package/esm2020/src/lib/page-header/public-api.mjs +3 -0
- package/esm2020/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.mjs +5 -0
- package/esm2020/src/lib/quick-info/quick-info.component.mjs +43 -8
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs +3 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs +45 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs.map +1 -0
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +44 -7
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
- package/fesm2015/spicainternational-ngx-sds-components.mjs +1 -0
- package/fesm2015/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs +3 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs +45 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs.map +1 -0
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +42 -7
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -1
- package/fesm2020/spicainternational-ngx-sds-components.mjs +1 -0
- package/fesm2020/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/package.json +9 -1
- package/public-api.d.ts +1 -0
- package/src/lib/page-header/package.json +10 -0
- package/src/lib/page-header/page-header.component.d.ts +10 -0
- package/src/lib/page-header/page-header.module.d.ts +8 -0
- package/src/lib/page-header/public-api.d.ts +2 -0
- package/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.d.ts +5 -0
- package/src/lib/quick-info/quick-info.component.d.ts +19 -4
package/esm2020/public-api.mjs
CHANGED
|
@@ -9,9 +9,10 @@ export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
|
9
9
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
10
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/modal';
|
|
11
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
|
|
12
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/page-header';
|
|
12
13
|
export * from '@spicainternational/ngx-sds-components/src/lib/pane';
|
|
13
14
|
export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
|
|
14
15
|
export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
|
|
15
16
|
export * from '@spicainternational/ngx-sds-components/src/lib/side-bar';
|
|
16
17
|
export * from '@spicainternational/ngx-sds-components/src/lib/tooltip';
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsNkRBQTZELENBQUM7QUFDNUUsY0FBYyx1REFBdUQsQ0FBQztBQUN0RSxjQUFjLHdEQUF3RCxDQUFDO0FBQ3ZFLGNBQWMsNkRBQTZELENBQUM7QUFDNUUsY0FBYyw0REFBNEQsQ0FBQztBQUMzRSxjQUFjLD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HJcbmV4cG9ydCAqIGZyb20gJ0BzcGljYWludGVybmF0aW9uYWwvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvbmF2aWdhdGlvbic7XHJcbmV4cG9ydCAqIGZyb20gJ0BzcGljYWludGVybmF0aW9uYWwvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcGFnZS1oZWFkZXInO1xyXG5leHBvcnQgKiBmcm9tICdAc3BpY2FpbnRlcm5hdGlvbmFsL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL3BhbmUnO1xyXG5leHBvcnQgKiBmcm9tICdAc3BpY2FpbnRlcm5hdGlvbmFsL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL3F1aWNrLWluZm8nO1xyXG5leHBvcnQgKiBmcm9tICdAc3BpY2FpbnRlcm5hdGlvbmFsL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL3NlZ21lbnRlZC1jb250cm9sJztcclxuZXhwb3J0ICogZnJvbSAnQHNwaWNhaW50ZXJuYXRpb25hbC9uZ3gtc2RzLWNvbXBvbmVudHMvc3JjL2xpYi9zaWRlLWJhcic7XHJcbmV4cG9ydCAqIGZyb20gJ0BzcGljYWludGVybmF0aW9uYWwvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvdG9vbHRpcCc7XHJcbiJdfQ==
|
|
@@ -39,9 +39,11 @@ export class SdsAvatarComponent {
|
|
|
39
39
|
this.initials = '';
|
|
40
40
|
if (this.text) {
|
|
41
41
|
const initialsFromText = this.text
|
|
42
|
+
.trim()
|
|
42
43
|
.toUpperCase()
|
|
43
44
|
.split(' ')
|
|
44
|
-
.map((n) => n[0])
|
|
45
|
+
.map((n) => n[0])
|
|
46
|
+
.filter(x => !!x);
|
|
45
47
|
if (initialsFromText.length > 0) {
|
|
46
48
|
this.initials = initialsFromText[0];
|
|
47
49
|
if (initialsFromText.length > 1) {
|
|
@@ -92,4 +94,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImpor
|
|
|
92
94
|
}], cursor: [{
|
|
93
95
|
type: Input
|
|
94
96
|
}] } });
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
97
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXZhdGFyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL2F2YXRhci9hdmF0YXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvYXZhdGFyL2F2YXRhci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBRUgsU0FBUyxFQUNULEtBQUssR0FJUixNQUFNLGVBQWUsQ0FBQzs7O0FBT3ZCLE1BQU0sT0FBTyxrQkFBa0I7SUFhM0I7UUFaUyxTQUFJLEdBQVcsRUFBRSxDQUFDO1FBQ2xCLGFBQVEsR0FBVyxFQUFFLENBQUM7UUFDdEIsZUFBVSxHQUFXLEVBQUUsQ0FBQztRQUN4QixhQUFRLEdBQVksS0FBSyxDQUFDO1FBQzFCLGdCQUFXLEdBQTJDLE1BQU0sQ0FBQztRQUsvRCxtQkFBYyxHQUFZLEtBQUssQ0FBQztRQUNoQyxhQUFRLEdBQVcsRUFBRSxDQUFDO0lBRWQsQ0FBQztJQUVoQixlQUFlO1FBQ1gsSUFBSSxDQUFDLGVBQWUsRUFBRSxDQUFDO0lBQzNCLENBQUM7SUFFRCxXQUFXLENBQUMsT0FBc0I7UUFDOUIsSUFDSSxPQUFPLENBQUMsTUFBTSxDQUFDO1lBQ2YsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDLFlBQVksSUFBSSxPQUFPLENBQUMsTUFB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uZ2VzWydwaWN0dXJlVXJpJ10ucHJldmlvdXNWYWx1ZVxyXG4gICAgICAgICkge1xyXG4gICAgICAgICAgICB0aGlzLmxvYWRVc2VyUGljdHVyZSgpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgaWYgKGNoYW5nZXNbJ2luaXRpYWxzVGV4dCddICYmIHRoaXMuaW5pdGlhbHNUZXh0KSB7XHJcbiAgICAgICAgICAgIHRoaXMuaW5pdGlhbHMgPSB0aGlzLmluaXRpYWxzVGV4dDtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcHVibGljIHNldENvbG9yQ2xhc3MoKTogc3RyaW5nIHtcclxuICAgICAgICBpZiAodGhpcy5jb2xvcktleSkge1xyXG4gICAgICAgICAgICByZXR1cm4gJ2NvbG9yJyArIHRoaXMuZ2V0Q29sb3JJbmRleCh0aGlzLmNvbG9yS2V5KTtcclxuICAgICAgICB9XHJcbiAgICAgICAgcmV0dXJuICdjb2xvcjE4JztcclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGV4dHJhY3RJbml0aWFscygpOiB2b2lkIHtcclxuICAgICAgICB0aGlzLmluaXRpYWxzID0gJyc7XHJcbiAgICAgICAgaWYgKHRoaXMudGV4dCkge1xyXG4gICAgICAgICAgICBjb25zdCBpbml0aWFsc0Zyb21UZXh0ID0gdGhpcy50ZXh0XHJcbiAgICAgICAgICAgICAgICAudHJpbSgpXHJcbiAgICAgICAgICAgICAgICAudG9VcHBlckNhc2UoKVxyXG4gICAgICAgICAgICAgICAgLnNwbGl0KCcgJylcclxuICAgICAgICAgICAgICAgIC5tYXAoKG4pID0+IG5bMF0pXHJcbiAgICAgICAgICAgICAgICAuZmlsdGVyKHggPT4gISF4KTtcclxuXHJcbiAgICAgICAgICAgIGlmIChpbml0aWFsc0Zyb21UZXh0Lmxlbmd0aCA+IDApIHtcclxuICAgICAgICAgICAgICAgIHRoaXMuaW5pdGlhbHMgPSBpbml0aWFsc0Zyb21UZXh0WzBdO1xyXG4gICAgICAgICAgICAgICAgaWYgKGluaXRpYWxzRnJvbVRleHQubGVuZ3RoID4gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaW5pdGlhbHMgPSBgJHt0aGlzLmluaXRpYWxzfSR7aW5pdGlhbHNGcm9tVGV4dFtpbml0aWFsc0Zyb21UZXh0Lmxlbmd0aCAtIDFdfWBcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBwcml2YXRlIGdldENvbG9ySW5kZXgoczogc3RyaW5nKTogbnVtYmVyIHtcclxuICAgICAgICBjb25zdCBsZW5ndGggPSAxMDtcclxuICAgICAgICBpZiAoIXMpIHtcclxuICAgICAgICAgICAgcmV0dXJuIDA7XHJcbiAgICAgICAgfVxyXG4gICAgICAgIGxldCBzdW1PZkNoYXJzID0gc1xyXG4gICAgICAgICAgICAuc3BsaXQoJycpXHJcbiAgICAgICAgICAgIC5tYXAoKHgpID0+IHguY2hhckNvZGVBdCgwKSlcclxuICAgICAgICAgICAgLnJlZHVjZSgoYSwgYikgPT4gYSArIGIsIDApO1xyXG4gICAgICAgIHJldHVybiBzdW1PZkNoYXJzICUgbGVuZ3RoO1xyXG4gICAgfVxyXG5cclxuICAgIHB1YmxpYyBsb2FkVXNlclBpY3R1cmUoKSB7XHJcbiAgICAgICAgaWYgKHRoaXMucGljdHVyZVVyaSAmJiB0aGlzLnBpY3R1cmVVcmkgIT09ICcnKSB7XHJcbiAgICAgICAgICAgIHRoaXMuaXNQaWN0dXJlUmVhZHkgPSB0cnVlO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIHRoaXMuaXNQaWN0dXJlUmVhZHkgPSBmYWxzZTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIiwiPGRpdlxyXG4gICAgY2xhc3M9XCJhdmF0YXIgY2lyY2xlIGQtZmxleCBqdXN0aWZ5LWNvbnRlbnQtY2VudGVyIGFsaWduLWl0ZW1zLWNlbnRlclwiXHJcbiAgICBbY2xhc3MuaGFzUGljdHVyZV09XCJpc1BpY3R1cmVSZWFkeVwiXHJcbiAgICBbbmdDbGFzc109XCJzZXRDb2xvckNsYXNzKClcIlxyXG4gICAgW3RpdGxlXT1cInNob3dIaW50ID8gdGV4dCA6ICcnXCJcclxuICAgIFtzdHlsZS5ib3JkZXItc3R5bGVdPVwiYm9yZGVyU3R5bGUudG9TdHJpbmcoKVwiXHJcbiAgICBbc3R5bGUuYm9yZGVyLWNvbG9yXT1cImJvcmRlckNvbG9yXCJcclxuICAgIFtzdHlsZS5jdXJzb3JdPVwiY3Vyc29yID8gY3Vyc29yIDogJ2RlZmF1bHQnXCJcclxuPlxyXG4gICAgPHNwYW4gXHJcbiAgICAgICAgKm5nSWY9XCIhaXNQaWN0dXJlUmVhZHlcIiBcclxuICAgICAgICBjbGFzcz1cImluaXRpYWxzXCJcclxuICAgICAgICA+XHJcbiAgICAgICAge3sgaW5pdGlhbHMgfX1cclxuICAgIDwvc3Bhbj5cclxuXHJcbiAgICA8aW1nIFxyXG4gICAgICAgICpuZ0lmPVwiaXNQaWN0dXJlUmVhZHlcIiBcclxuICAgICAgICBbc3JjXT1cInBpY3R1cmVVcmlcIlxyXG4gICAgICAgIGFsdD1cIlwiIC8+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Component, ContentChild, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
export class SdsPageHeaderComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.titleContent = { nativeElement: undefined };
|
|
7
|
+
this.title = '';
|
|
8
|
+
}
|
|
9
|
+
ngOnInit() { }
|
|
10
|
+
}
|
|
11
|
+
SdsPageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12
|
+
SdsPageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPageHeaderComponent, selector: "sds-page-header", inputs: { title: "title" }, queries: [{ propertyName: "titleContent", first: true, predicate: ["title"], descendants: true }], ngImport: i0, template: "<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderComponent, decorators: [{
|
|
14
|
+
type: Component,
|
|
15
|
+
args: [{ selector: 'sds-page-header', template: "<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [""] }]
|
|
16
|
+
}], ctorParameters: function () { return []; }, propDecorators: { titleContent: [{
|
|
17
|
+
type: ContentChild,
|
|
18
|
+
args: ['title']
|
|
19
|
+
}], title: [{
|
|
20
|
+
type: Input
|
|
21
|
+
}] } });
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIj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Rlci5jb21wb25lbnQuaHRtbCcsXHJcbiAgICBzdHlsZVVybHM6IFsnLi9wYWdlLWhlYWRlci5jb21wb25lbnQuc2NzcyddLFxyXG59KVxyXG5leHBvcnQgY2xhc3MgU2RzUGFnZUhlYWRlckNvbXBvbmVudCBpbXBsZW1lbnRzIE9uSW5pdCB7XHJcbiAgICBAQ29udGVudENoaWxkKCd0aXRsZScpIHRpdGxlQ29udGVudDogRWxlbWVudFJlZiA9IHsgbmF0aXZlRWxlbWVudDogdW5kZWZpbmVkIH07XHJcbiAgICBASW5wdXQoKSB0aXRsZTogc3RyaW5nO1xyXG5cclxuICAgIGNvbnN0cnVjdG9yKCkge1xyXG4gICAgICAgIHRoaXMudGl0bGUgPSAnJztcclxuICAgIH1cclxuXHJcbiAgICBuZ09uSW5pdCgpOiB2b2lkIHt9XHJcbn1cclxuIiwiPGRpdiBjbGFzcz1cImQtZmxleCBmbGV4LXdyYXAgYWxpZ24taXRlbXMtY2VudGVyXCI+XHJcbiAgICA8aDEgKm5nSWY9XCIhdGl0bGVDb250ZW50XCIgY2xhc3M9XCJtci00XCI+XHJcbiAgICAgICAge3sgdGl0bGUgfX1cclxuICAgIDwvaDE+XHJcblxyXG4gICAgPG5nLWNvbnRhaW5lciAqbmdJZj1cInRpdGxlQ29udGVudFwiPlxyXG4gICAgICAgIDxuZy1jb250ZW50IHNlbGVjdD1cInRpdGxlXCI+PC9uZy1jb250ZW50PlxyXG4gICAgPC9uZy1jb250YWluZXI+XHJcblxyXG4gICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwidGl0bGVBcHBlbmRpeFwiPjwvbmctY29udGVudD5cclxuXHJcbiAgICA8ZGl2IGNsYXNzPVwibWwtYXV0b1wiPlxyXG4gICAgICAgIDxuZy1jb250ZW50PjwvbmctY29udGVudD5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj5cclxuIl19
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { SdsPageHeaderComponent } from './page-header.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
const components = [SdsPageHeaderComponent];
|
|
6
|
+
export class SdsPageHeaderModule {
|
|
7
|
+
}
|
|
8
|
+
SdsPageHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
+
SdsPageHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, declarations: [SdsPageHeaderComponent], imports: [CommonModule], exports: [SdsPageHeaderComponent] });
|
|
10
|
+
SdsPageHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, imports: [[CommonModule]] });
|
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, decorators: [{
|
|
12
|
+
type: NgModule,
|
|
13
|
+
args: [{
|
|
14
|
+
declarations: [SdsPageHeaderComponent],
|
|
15
|
+
imports: [CommonModule],
|
|
16
|
+
exports: [...components],
|
|
17
|
+
}]
|
|
18
|
+
}] });
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZS1oZWFkZXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcGFnZS1oZWFkZXIvcGFnZS1oZWFkZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7Q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lIHt9XHJcbiJdfQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from './page-header.module';
|
|
2
|
+
export * from './page-header.component';
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zZHMtY29tcG9uZW50cy9zcmMvbGliL3BhZ2UtaGVhZGVyL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9wYWdlLWhlYWRlci5tb2R1bGUnO1xyXG5leHBvcnQgKiBmcm9tICcuL3BhZ2UtaGVhZGVyLmNvbXBvbmVudCc7Il19
|
package/esm2020/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BpY2FpbnRlcm5hdGlvbmFsLW5neC1zZHMtY29tcG9uZW50cy1zcmMtbGliLXBhZ2UtaGVhZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcGFnZS1oZWFkZXIvc3BpY2FpbnRlcm5hdGlvbmFsLW5neC1zZHMtY29tcG9uZW50cy1zcmMtbGliLXBhZ2UtaGVhZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
|
|
@@ -1,34 +1,69 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, Input, ViewChild, } from '@angular/core';
|
|
2
2
|
import { faInfoCircle, } from '@fortawesome/pro-regular-svg-icons';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@fortawesome/angular-fontawesome";
|
|
5
5
|
import * as i2 from "devextreme-angular/ui/popover";
|
|
6
6
|
import * as i3 from "devextreme-angular/ui/nested";
|
|
7
|
+
import * as i4 from "@angular/common";
|
|
7
8
|
export class SdsQuickInfoComponent {
|
|
8
9
|
constructor() {
|
|
9
10
|
this.icon = faInfoCircle;
|
|
10
|
-
this.popoverMaxWidth =
|
|
11
|
+
this.popoverMaxWidth = '20rem';
|
|
12
|
+
this.hideOnMouseLeave = true;
|
|
13
|
+
this.customContent = { nativeElement: undefined };
|
|
14
|
+
this.hideEvent = { name: 'dxhoverend', delay: 200 };
|
|
15
|
+
this.showEvent = { name: 'dxhoverstart', delay: 200 };
|
|
16
|
+
}
|
|
17
|
+
ngOnChanges(changes) {
|
|
18
|
+
if (changes['showDelay']) {
|
|
19
|
+
this.setShowEvent();
|
|
20
|
+
}
|
|
21
|
+
if (changes['hideDelay'] || changes['hideOnMouseLeave']) {
|
|
22
|
+
this.setHideEvent();
|
|
23
|
+
}
|
|
11
24
|
}
|
|
12
25
|
onHiding(e) {
|
|
13
26
|
const popoverContent = e.component.content().parentNode;
|
|
14
27
|
const isMouseInsidePopover = popoverContent.matches(':hover');
|
|
15
28
|
e.cancel = isMouseInsidePopover;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
29
|
+
if (this.hideOnMouseLeave) {
|
|
30
|
+
popoverContent.addEventListener('mouseleave', () => {
|
|
31
|
+
e.component.hide();
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
setShowEvent() {
|
|
36
|
+
this.showEvent = { name: 'dxhoverstart', delay: this.showDelay ?? 200 };
|
|
37
|
+
}
|
|
38
|
+
setHideEvent() {
|
|
39
|
+
if (this.hideOnMouseLeave) {
|
|
40
|
+
this.hideEvent = { name: 'dxhoverend', delay: this.hideDelay ?? 200 };
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.hideEvent = {};
|
|
44
|
+
}
|
|
19
45
|
}
|
|
20
46
|
}
|
|
21
47
|
SdsQuickInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth" }, viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<
|
|
48
|
+
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", showDelay: "showDelay", hideDelay: "hideDelay", hideOnMouseLeave: "hideOnMouseLeave" }, 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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: [""], 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", "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", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { type: i3.DxoAnimationComponent, selector: "dxo-animation", inputs: ["hide", "show", "duration", "easing", "enabled", "maxPointCountSupported", "complete", "delay", "direction", "from", "staggerDelay", "start", "to", "type"] }, { type: i3.DxoShowComponent, selector: "dxo-show", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { type: i3.DxoHideComponent, selector: "dxo-hide", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23
49
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, decorators: [{
|
|
24
50
|
type: Component,
|
|
25
|
-
args: [{ selector: 'sds-quick-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
51
|
+
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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: [""] }]
|
|
26
52
|
}], ctorParameters: function () { return []; }, propDecorators: { icon: [{
|
|
27
53
|
type: Input
|
|
28
54
|
}], popoverMaxWidth: [{
|
|
29
55
|
type: Input
|
|
56
|
+
}], showDelay: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], hideDelay: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], hideOnMouseLeave: [{
|
|
61
|
+
type: Input
|
|
30
62
|
}], buttonElementRef: [{
|
|
31
63
|
type: ViewChild,
|
|
32
64
|
args: ['popoverTarget', { read: ElementRef, static: true }]
|
|
65
|
+
}], customContent: [{
|
|
66
|
+
type: ContentChild,
|
|
67
|
+
args: ['customContent']
|
|
33
68
|
}] } });
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
69
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVpY2staW5mby5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtc2RzLWNvbXBvbmVudHMvc3JjL2xpYi9xdWljay1pbmZvL3F1aWNrLWluZm8uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXNkcy1jb21wb25lbnRzL3NyYy9saWIvcXVpY2staW5mby9xdWljay1pbmZvLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDSCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULFlBQVksRUFDWixVQUFVLEVBQ1YsS0FBSyxFQUdMLFNBQVMsR0FDWixNQUFNL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GlkZT5cclxuPC9keG8tYW5pbWF0aW9uPlxyXG4gICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxyXG48L2R4LXBvcG92ZXI+Il19
|
|
@@ -45,9 +45,11 @@ class SdsAvatarComponent {
|
|
|
45
45
|
this.initials = '';
|
|
46
46
|
if (this.text) {
|
|
47
47
|
const initialsFromText = this.text
|
|
48
|
+
.trim()
|
|
48
49
|
.toUpperCase()
|
|
49
50
|
.split(' ')
|
|
50
|
-
.map((n) => n[0])
|
|
51
|
+
.map((n) => n[0])
|
|
52
|
+
.filter(x => !!x);
|
|
51
53
|
if (initialsFromText.length > 0) {
|
|
52
54
|
this.initials = initialsFromText[0];
|
|
53
55
|
if (initialsFromText.length > 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-avatar.mjs","sources":["../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar.module.ts","../../../projects/ngx-sds-components/src/lib/avatar/spicainternational-ngx-sds-components-src-lib-avatar.ts"],"sourcesContent":["import {\r\n AfterViewInit,\r\n Component,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-avatar',\r\n templateUrl: './avatar.component.html',\r\n styleUrls: ['./avatar.component.scss'],\r\n})\r\nexport class SdsAvatarComponent implements AfterViewInit, OnChanges {\r\n @Input() text: string = '';\r\n @Input() colorKey: string = '';\r\n @Input() pictureUri: string = '';\r\n @Input() showHint: boolean = false;\r\n @Input() borderStyle: 'solid' | 'dashed' | 'dotted' | 'none' = 'none';\r\n @Input() borderColor?: string;\r\n @Input() initialsText?: string;\r\n @Input() cursor?: string;\r\n\r\n public isPictureReady: boolean = false;\r\n public initials: string = '';\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit() {\r\n this.loadUserPicture();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (\r\n changes['text'] &&\r\n changes['text'].currentValue != changes['text'].previousValue &&\r\n this.initialsText == undefined\r\n ) {\r\n this.extractInitials();\r\n }\r\n\r\n if (\r\n changes['pictureUri'] &&\r\n changes['pictureUri'].currentValue !=\r\n changes['pictureUri'].previousValue\r\n ) {\r\n this.loadUserPicture();\r\n }\r\n\r\n if (changes['initialsText'] && this.initialsText) {\r\n this.initials = this.initialsText;\r\n }\r\n }\r\n\r\n public setColorClass(): string {\r\n if (this.colorKey) {\r\n return 'color' + this.getColorIndex(this.colorKey);\r\n }\r\n return 'color18';\r\n }\r\n\r\n private extractInitials(): void {\r\n this.initials = '';\r\n if (this.text) {\r\n const initialsFromText = this.text\r\n .toUpperCase()\r\n .split(' ')\r\n .map((n) => n[0]);\r\n\r\n if (initialsFromText.length > 0) {\r\n this.initials = initialsFromText[0];\r\n if (initialsFromText.length > 1) {\r\n this.initials = `${this.initials}${initialsFromText[initialsFromText.length - 1]}`\r\n }\r\n }\r\n }\r\n }\r\n\r\n private getColorIndex(s: string): number {\r\n const length = 10;\r\n if (!s) {\r\n return 0;\r\n }\r\n let sumOfChars = s\r\n .split('')\r\n .map((x) => x.charCodeAt(0))\r\n .reduce((a, b) => a + b, 0);\r\n return sumOfChars % length;\r\n }\r\n\r\n public loadUserPicture() {\r\n if (this.pictureUri && this.pictureUri !== '') {\r\n this.isPictureReady = true;\r\n } else {\r\n this.isPictureReady = false;\r\n }\r\n }\r\n}\r\n","<div\r\n class=\"avatar circle d-flex justify-content-center align-items-center\"\r\n [class.hasPicture]=\"isPictureReady\"\r\n [ngClass]=\"setColorClass()\"\r\n [title]=\"showHint ? text : ''\"\r\n [style.border-style]=\"borderStyle.toString()\"\r\n [style.border-color]=\"borderColor\"\r\n [style.cursor]=\"cursor ? cursor : 'default'\"\r\n>\r\n <span \r\n *ngIf=\"!isPictureReady\" \r\n class=\"initials\"\r\n >\r\n {{ initials }}\r\n </span>\r\n\r\n <img \r\n *ngIf=\"isPictureReady\" \r\n [src]=\"pictureUri\"\r\n alt=\"\" />\r\n</div>\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AvatarModel } from './avatar-group.model';\r\n\r\n@Component({\r\n selector: 'sds-avatar-group',\r\n templateUrl: './avatar-group.component.html',\r\n styleUrls: ['./avatar-group.component.scss'],\r\n})\r\nexport class SdsAvatarGroupComponent implements OnInit, OnChanges {\r\n\r\n @Input() public stacked: boolean = false;\r\n @Input() public maxCount?: number;\r\n @Input() public fontSize: number = 2;\r\n @Input() public borderColor?: string;\r\n @Input() public data: Array<AvatarModel> = [];\r\n @Input() public dropdownContents: 'all' | 'overflow' = 'all';\r\n\r\n public overflow: Array<AvatarModel> = [];\r\n public inflow: Array<AvatarModel> = [];\r\n\r\n public overflowCountDisplay: string = '';\r\n public overFlowBorderStyle: 'solid' | 'none' = 'none';\r\n\r\n public overflowElementUUID = 'sds-ag-' + crypto.randomUUID();\r\n public showDropdown = false;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['data'] || changes['maxCount']){\r\n if (this.maxCount && this.data) {\r\n this.overflow = [...this.data];\r\n this.inflow = this.overflow.splice(0, this.maxCount);\r\n console.log(this.overflow.length);\r\n this.overflowCountDisplay = `+${Math.min(99, this.overflow.length)}`;\r\n this.overFlowBorderStyle = this.data.filter(x => x.borderStyle).length > 0 ? 'solid' : 'none';\r\n } else {\r\n this.inflow = [...this.data];\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public onOverflowClicked() {\r\n this.showDropdown = true;\r\n }\r\n\r\n}\r\n","<div class=\"d-flex avatar-group-container\">\r\n <sds-avatar *ngFor=\"let avatar of inflow\"\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n [showHint]=\"true\"\r\n [style.font-size.rem]=\"fontSize\"\r\n [style.margin-right.rem]=\"stacked ? fontSize/-3 : fontSize/15\"\r\n >\r\n </sds-avatar>\r\n\r\n <sds-avatar\r\n *ngIf=\"overflow.length > 0\"\r\n [id]=\"overflowElementUUID\"\r\n class=\"overflow\"\r\n [initialsText]=\"overflowCountDisplay\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"overFlowBorderStyle\"\r\n cursor=\"pointer\"\r\n [style.font-size.rem]=\"fontSize\"\r\n\r\n placement=\"bottom\"\r\n container=\"body\"\r\n triggers=\"\"\r\n (click)=\"onOverflowClicked()\"\r\n >\r\n </sds-avatar>\r\n\r\n <dx-popover\r\n target=\"#{{overflowElementUUID}}\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <dx-scroll-view\r\n showScrollbar=\"always\">\r\n <div class=\"overflow-avatars-container rounded\">\r\n <div *ngFor=\"let avatar of (dropdownContents === 'all' ? data : overflow)\"\r\n class=\"d-flex align-items-center pl-3 py-2 pr-5 my-2 overflow-avatar-container\" >\r\n <sds-avatar\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n borderColor=\"transparent\"\r\n [style.font-size.rem]=\"1.8\"\r\n >\r\n </sds-avatar>\r\n <div class=\"ml-3\">{{avatar.text}}</div>\r\n </div>\r\n </div>\r\n </dx-scroll-view>\r\n </dx-popover>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\nimport { DxScrollViewModule } from 'devextreme-angular/ui/scroll-view';\r\n\r\nimport { SdsAvatarComponent } from './avatar.component';\r\nimport { SdsAvatarGroupComponent } from './avatar-group.component';\r\n\r\n\r\nconst components = [\r\n SdsAvatarComponent,\r\n SdsAvatarGroupComponent\r\n];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n DxPopoverModule,\r\n DxScrollViewModule\r\n\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsAvatarModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsAvatarComponent","i4"],"mappings":";;;;;;;;;MAca,kBAAkB,CAAA;AAa3B,IAAA,WAAA,GAAA;AAZS,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;AAClB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;AACtB,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE,CAAC;AACxB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAC1B,QAAA,IAAW,CAAA,WAAA,GAA2C,MAAM,CAAC;AAK/D,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;AAChC,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;KAEb;IAEhB,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;KAC1B;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IACI,OAAO,CAAC,MAAM,CAAC;YACf,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa;AAC7D,YAAA,IAAI,CAAC,YAAY,IAAI,SAAS,EAChC;YACE,IAAI,CAAC,eAAe,EAAE,CAAC;AAC1B,SAAA;QAED,IACI,OAAO,CAAC,YAAY,CAAC;AACrB,YAAA,OAAO,CAAC,YAAY,CAAC,CAAC,YAAY;AAC9B,gBAAA,OAAO,CAAC,YAAY,CAAC,CAAC,aAAa,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A,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAjBxB,kBAAkB;AAClB,QAAA,uBAAuB,aAOvB,YAAY;QACZ,eAAe;AACf,QAAA,kBAAkB,aAVlB,kBAAkB;QAClB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAgBd,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVjB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;YACf,kBAAkB;SAEnB,CAAA,EAAA,CAAA,CAAA;2FAKU,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,kBAAkB;AAEnB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AAChB,qBAAA;iBACF,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-avatar.mjs","sources":["../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar.module.ts","../../../projects/ngx-sds-components/src/lib/avatar/spicainternational-ngx-sds-components-src-lib-avatar.ts"],"sourcesContent":["import {\r\n AfterViewInit,\r\n Component,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-avatar',\r\n templateUrl: './avatar.component.html',\r\n styleUrls: ['./avatar.component.scss'],\r\n})\r\nexport class SdsAvatarComponent implements AfterViewInit, OnChanges {\r\n @Input() text: string = '';\r\n @Input() colorKey: string = '';\r\n @Input() pictureUri: string = '';\r\n @Input() showHint: boolean = false;\r\n @Input() borderStyle: 'solid' | 'dashed' | 'dotted' | 'none' = 'none';\r\n @Input() borderColor?: string;\r\n @Input() initialsText?: string;\r\n @Input() cursor?: string;\r\n\r\n public isPictureReady: boolean = false;\r\n public initials: string = '';\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit() {\r\n this.loadUserPicture();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (\r\n changes['text'] &&\r\n changes['text'].currentValue != changes['text'].previousValue &&\r\n this.initialsText == undefined\r\n ) {\r\n this.extractInitials();\r\n }\r\n\r\n if (\r\n changes['pictureUri'] &&\r\n changes['pictureUri'].currentValue !=\r\n changes['pictureUri'].previousValue\r\n ) {\r\n this.loadUserPicture();\r\n }\r\n\r\n if (changes['initialsText'] && this.initialsText) {\r\n this.initials = this.initialsText;\r\n }\r\n }\r\n\r\n public setColorClass(): string {\r\n if (this.colorKey) {\r\n return 'color' + this.getColorIndex(this.colorKey);\r\n }\r\n return 'color18';\r\n }\r\n\r\n private extractInitials(): void {\r\n this.initials = '';\r\n if (this.text) {\r\n const initialsFromText = this.text\r\n .trim()\r\n .toUpperCase()\r\n .split(' ')\r\n .map((n) => n[0])\r\n .filter(x => !!x);\r\n\r\n if (initialsFromText.length > 0) {\r\n this.initials = initialsFromText[0];\r\n if (initialsFromText.length > 1) {\r\n this.initials = `${this.initials}${initialsFromText[initialsFromText.length - 1]}`\r\n }\r\n }\r\n }\r\n }\r\n\r\n private getColorIndex(s: string): number {\r\n const length = 10;\r\n if (!s) {\r\n return 0;\r\n }\r\n let sumOfChars = s\r\n .split('')\r\n .map((x) => x.charCodeAt(0))\r\n .reduce((a, b) => a + b, 0);\r\n return sumOfChars % length;\r\n }\r\n\r\n public loadUserPicture() {\r\n if (this.pictureUri && this.pictureUri !== '') {\r\n this.isPictureReady = true;\r\n } else {\r\n this.isPictureReady = false;\r\n }\r\n }\r\n}\r\n","<div\r\n class=\"avatar circle d-flex justify-content-center align-items-center\"\r\n [class.hasPicture]=\"isPictureReady\"\r\n [ngClass]=\"setColorClass()\"\r\n [title]=\"showHint ? text : ''\"\r\n [style.border-style]=\"borderStyle.toString()\"\r\n [style.border-color]=\"borderColor\"\r\n [style.cursor]=\"cursor ? cursor : 'default'\"\r\n>\r\n <span \r\n *ngIf=\"!isPictureReady\" \r\n class=\"initials\"\r\n >\r\n {{ initials }}\r\n </span>\r\n\r\n <img \r\n *ngIf=\"isPictureReady\" \r\n [src]=\"pictureUri\"\r\n alt=\"\" />\r\n</div>\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AvatarModel } from './avatar-group.model';\r\n\r\n@Component({\r\n selector: 'sds-avatar-group',\r\n templateUrl: './avatar-group.component.html',\r\n styleUrls: ['./avatar-group.component.scss'],\r\n})\r\nexport class SdsAvatarGroupComponent implements OnInit, OnChanges {\r\n\r\n @Input() public stacked: boolean = false;\r\n @Input() public maxCount?: number;\r\n @Input() public fontSize: number = 2;\r\n @Input() public borderColor?: string;\r\n @Input() public data: Array<AvatarModel> = [];\r\n @Input() public dropdownContents: 'all' | 'overflow' = 'all';\r\n\r\n public overflow: Array<AvatarModel> = [];\r\n public inflow: Array<AvatarModel> = [];\r\n\r\n public overflowCountDisplay: string = '';\r\n public overFlowBorderStyle: 'solid' | 'none' = 'none';\r\n\r\n public overflowElementUUID = 'sds-ag-' + crypto.randomUUID();\r\n public showDropdown = false;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['data'] || changes['maxCount']){\r\n if (this.maxCount && this.data) {\r\n this.overflow = [...this.data];\r\n this.inflow = this.overflow.splice(0, this.maxCount);\r\n console.log(this.overflow.length);\r\n this.overflowCountDisplay = `+${Math.min(99, this.overflow.length)}`;\r\n this.overFlowBorderStyle = this.data.filter(x => x.borderStyle).length > 0 ? 'solid' : 'none';\r\n } else {\r\n this.inflow = [...this.data];\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public onOverflowClicked() {\r\n this.showDropdown = true;\r\n }\r\n\r\n}\r\n","<div class=\"d-flex avatar-group-container\">\r\n <sds-avatar *ngFor=\"let avatar of inflow\"\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n [showHint]=\"true\"\r\n [style.font-size.rem]=\"fontSize\"\r\n [style.margin-right.rem]=\"stacked ? fontSize/-3 : fontSize/15\"\r\n >\r\n </sds-avatar>\r\n\r\n <sds-avatar\r\n *ngIf=\"overflow.length > 0\"\r\n [id]=\"overflowElementUUID\"\r\n class=\"overflow\"\r\n [initialsText]=\"overflowCountDisplay\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"overFlowBorderStyle\"\r\n cursor=\"pointer\"\r\n [style.font-size.rem]=\"fontSize\"\r\n\r\n placement=\"bottom\"\r\n container=\"body\"\r\n triggers=\"\"\r\n (click)=\"onOverflowClicked()\"\r\n >\r\n </sds-avatar>\r\n\r\n <dx-popover\r\n target=\"#{{overflowElementUUID}}\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <dx-scroll-view\r\n showScrollbar=\"always\">\r\n <div class=\"overflow-avatars-container rounded\">\r\n <div *ngFor=\"let avatar of (dropdownContents === 'all' ? data : overflow)\"\r\n class=\"d-flex align-items-center pl-3 py-2 pr-5 my-2 overflow-avatar-container\" >\r\n <sds-avatar\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n borderColor=\"transparent\"\r\n [style.font-size.rem]=\"1.8\"\r\n >\r\n </sds-avatar>\r\n <div class=\"ml-3\">{{avatar.text}}</div>\r\n </div>\r\n </div>\r\n </dx-scroll-view>\r\n </dx-popover>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\nimport { DxScrollViewModule } from 'devextreme-angular/ui/scroll-view';\r\n\r\nimport { SdsAvatarComponent } from './avatar.component';\r\nimport { SdsAvatarGroupComponent } from './avatar-group.component';\r\n\r\n\r\nconst components = [\r\n SdsAvatarComponent,\r\n SdsAvatarGroupComponent\r\n];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n DxPopoverModule,\r\n DxScrollViewModule\r\n\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsAvatarModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsAvatarComponent","i4"],"mappings":";;;;;;;;;MAca,kBAAkB,CAAA;AAa3B,IAAA,WAAA,GAAA;AAZS,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;AAClB,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;AACtB,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE,CAAC;AACxB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;AAC1B,QAAA,IAAW,CAAA,WAAA,GAA2C,MAAM,CAAC;AAK/D,QAAA,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;AAChC,QAAA,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;KAEb;IAEhB,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;KAC1B;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IACI,OAAO,CAAC,MAAM,CAA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
import { Component, ContentChild, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
class SdsPageHeaderComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.titleContent = { nativeElement: undefined };
|
|
9
|
+
this.title = '';
|
|
10
|
+
}
|
|
11
|
+
ngOnInit() { }
|
|
12
|
+
}
|
|
13
|
+
SdsPageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
SdsPageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPageHeaderComponent, selector: "sds-page-header", inputs: { title: "title" }, queries: [{ propertyName: "titleContent", first: true, predicate: ["title"], descendants: true }], ngImport: i0, template: "<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'sds-page-header', template: "<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [""] }]
|
|
18
|
+
}], ctorParameters: function () { return []; }, propDecorators: { titleContent: [{
|
|
19
|
+
type: ContentChild,
|
|
20
|
+
args: ['title']
|
|
21
|
+
}], title: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}] } });
|
|
24
|
+
|
|
25
|
+
const components = [SdsPageHeaderComponent];
|
|
26
|
+
class SdsPageHeaderModule {
|
|
27
|
+
}
|
|
28
|
+
SdsPageHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
29
|
+
SdsPageHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, declarations: [SdsPageHeaderComponent], imports: [CommonModule], exports: [SdsPageHeaderComponent] });
|
|
30
|
+
SdsPageHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, imports: [[CommonModule]] });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, decorators: [{
|
|
32
|
+
type: NgModule,
|
|
33
|
+
args: [{
|
|
34
|
+
declarations: [SdsPageHeaderComponent],
|
|
35
|
+
imports: [CommonModule],
|
|
36
|
+
exports: [...components],
|
|
37
|
+
}]
|
|
38
|
+
}] });
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Generated bundle index. Do not edit.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
export { SdsPageHeaderComponent, SdsPageHeaderModule };
|
|
45
|
+
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-page-header.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-page-header.mjs","sources":["../../../projects/ngx-sds-components/src/lib/page-header/page-header.component.ts","../../../projects/ngx-sds-components/src/lib/page-header/page-header.component.html","../../../projects/ngx-sds-components/src/lib/page-header/page-header.module.ts","../../../projects/ngx-sds-components/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.ts"],"sourcesContent":["import { Component, ContentChild, ElementRef, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-page-header',\r\n templateUrl: './page-header.component.html',\r\n styleUrls: ['./page-header.component.scss'],\r\n})\r\nexport class SdsPageHeaderComponent implements OnInit {\r\n @ContentChild('title') titleContent: ElementRef = { nativeElement: undefined };\r\n @Input() title: string;\r\n\r\n constructor() {\r\n this.title = '';\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsPageHeaderComponent } from './page-header.component';\r\n\r\nconst components = [SdsPageHeaderComponent];\r\n\r\n@NgModule({\r\n declarations: [SdsPageHeaderComponent],\r\n imports: [CommonModule],\r\n exports: [...components],\r\n})\r\nexport class SdsPageHeaderModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,sBAAsB,CAAA;AAI/B,IAAA,WAAA,GAAA;QAHuB,IAAA,CAAA,YAAY,GAAe,EAAE,aAAa,EAAE,SAAS,EAA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CAAA;iHAO7B,mBAAmB,EAAA,OAAA,EAAA,CAHnB,CAAC,YAAY,CAAC,CAAA,EAAA,CAAA,CAAA;2FAGd,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;iBAC3B,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
3
4
|
import { CommonModule } from '@angular/common';
|
|
4
5
|
import { faInfoCircle } from '@fortawesome/pro-regular-svg-icons';
|
|
5
6
|
import * as i1 from '@fortawesome/angular-fontawesome';
|
|
@@ -11,29 +12,65 @@ import * as i3 from 'devextreme-angular/ui/nested';
|
|
|
11
12
|
class SdsQuickInfoComponent {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.icon = faInfoCircle;
|
|
14
|
-
this.popoverMaxWidth =
|
|
15
|
+
this.popoverMaxWidth = '20rem';
|
|
16
|
+
this.hideOnMouseLeave = true;
|
|
17
|
+
this.customContent = { nativeElement: undefined };
|
|
18
|
+
this.hideEvent = { name: 'dxhoverend', delay: 200 };
|
|
19
|
+
this.showEvent = { name: 'dxhoverstart', delay: 200 };
|
|
20
|
+
}
|
|
21
|
+
ngOnChanges(changes) {
|
|
22
|
+
if (changes['showDelay']) {
|
|
23
|
+
this.setShowEvent();
|
|
24
|
+
}
|
|
25
|
+
if (changes['hideDelay'] || changes['hideOnMouseLeave']) {
|
|
26
|
+
this.setHideEvent();
|
|
27
|
+
}
|
|
15
28
|
}
|
|
16
29
|
onHiding(e) {
|
|
17
30
|
const popoverContent = e.component.content().parentNode;
|
|
18
31
|
const isMouseInsidePopover = popoverContent.matches(':hover');
|
|
19
32
|
e.cancel = isMouseInsidePopover;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
if (this.hideOnMouseLeave) {
|
|
34
|
+
popoverContent.addEventListener('mouseleave', () => {
|
|
35
|
+
e.component.hide();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
setShowEvent() {
|
|
40
|
+
var _a;
|
|
41
|
+
this.showEvent = { name: 'dxhoverstart', delay: (_a = this.showDelay) !== null && _a !== void 0 ? _a : 200 };
|
|
42
|
+
}
|
|
43
|
+
setHideEvent() {
|
|
44
|
+
var _a;
|
|
45
|
+
if (this.hideOnMouseLeave) {
|
|
46
|
+
this.hideEvent = { name: 'dxhoverend', delay: (_a = this.hideDelay) !== null && _a !== void 0 ? _a : 200 };
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.hideEvent = {};
|
|
50
|
+
}
|
|
23
51
|
}
|
|
24
52
|
}
|
|
25
53
|
SdsQuickInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth" }, viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<
|
|
54
|
+
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", showDelay: "showDelay", hideDelay: "hideDelay", hideOnMouseLeave: "hideOnMouseLeave" }, 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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: [""], 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", "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", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { type: i3.DxoAnimationComponent, selector: "dxo-animation", inputs: ["hide", "show", "duration", "easing", "enabled", "maxPointCountSupported", "complete", "delay", "direction", "from", "staggerDelay", "start", "to", "type"] }, { type: i3.DxoShowComponent, selector: "dxo-show", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { type: i3.DxoHideComponent, selector: "dxo-hide", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, decorators: [{
|
|
28
56
|
type: Component,
|
|
29
|
-
args: [{ selector: 'sds-quick-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
57
|
+
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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: [""] }]
|
|
30
58
|
}], ctorParameters: function () { return []; }, propDecorators: { icon: [{
|
|
31
59
|
type: Input
|
|
32
60
|
}], popoverMaxWidth: [{
|
|
33
61
|
type: Input
|
|
62
|
+
}], showDelay: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], hideDelay: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], hideOnMouseLeave: [{
|
|
67
|
+
type: Input
|
|
34
68
|
}], buttonElementRef: [{
|
|
35
69
|
type: ViewChild,
|
|
36
70
|
args: ['popoverTarget', { read: ElementRef, static: true }]
|
|
71
|
+
}], customContent: [{
|
|
72
|
+
type: ContentChild,
|
|
73
|
+
args: ['customContent']
|
|
37
74
|
}] } });
|
|
38
75
|
|
|
39
76
|
const components = [SdsQuickInfoComponent];
|
|
@@ -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 ElementRef,\r\n Input,\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 {\r\n @Input() icon: IconDefinition = faInfoCircle;\r\n @Input() popoverMaxWidth: number =
|
|
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() showDelay?: number;\r\n @Input() hideDelay?: number;\r\n @Input() hideOnMouseLeave: boolean = true;\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: 'dxhoverend', delay: 200 };\r\n this.showEvent = { name: 'dxhoverstart', delay: 200 };\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['showDelay']) {\r\n this.setShowEvent();\r\n }\r\n\r\n if (changes['hideDelay'] || changes['hideOnMouseLeave']) {\r\n this.setHideEvent();\r\n }\r\n }\r\n\r\n onHiding(e: any) {\r\n const popoverContent = e.component.content().parentNode;\r\n const isMouseInsidePopover = popoverContent.matches(':hover');\r\n e.cancel = isMouseInsidePopover;\r\n\r\n if (this.hideOnMouseLeave) {\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 = { name: 'dxhoverstart', delay: this.showDelay ?? 200 };\r\n }\r\n\r\n private setHideEvent(): void {\r\n if (this.hideOnMouseLeave) {\r\n this.hideEvent = { name: 'dxhoverend', delay: this.hideDelay ?? 200 };\r\n } else {\r\n this.hideEvent = { };\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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\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;AAoB9B,IAAA,WAAA,GAAA;AAnBS,QAAA,IAAI,CAAA,IAAA,GAAmB,YAAY,CAAC;AACpC,QAAA,IAAe,CAAA,eAAA,GAA+B,OAAO,CAAC;AAGtD,QAAA,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;QAGX,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAapF,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AACpD,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;KACzD;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;AAC9B,QAAA,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;YACtB,IAAI,CAAC,YAAY,EAAE,CAAC;AACvB,SAAA;QAED,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,kBAAkB,CAAC,EAAE;YACrD,IAAI,CAAC,YAAY,EAAE,CAAC;AACvB,SAAA;KACJ;AAED,IAAA,QAAQ,CAAC,CAAM,EAAA;QACX,MAAM,cAAc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AA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EATpB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,iBAAiB;YACjB,eAAe;SAChB,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;iBACF,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -6,6 +6,7 @@ export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
|
6
6
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
7
|
export * from '@spicainternational/ngx-sds-components/src/lib/modal';
|
|
8
8
|
export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
|
|
9
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/page-header';
|
|
9
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/pane';
|
|
10
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
|
|
11
12
|
export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|
|
@@ -45,9 +45,11 @@ class SdsAvatarComponent {
|
|
|
45
45
|
this.initials = '';
|
|
46
46
|
if (this.text) {
|
|
47
47
|
const initialsFromText = this.text
|
|
48
|
+
.trim()
|
|
48
49
|
.toUpperCase()
|
|
49
50
|
.split(' ')
|
|
50
|
-
.map((n) => n[0])
|
|
51
|
+
.map((n) => n[0])
|
|
52
|
+
.filter(x => !!x);
|
|
51
53
|
if (initialsFromText.length > 0) {
|
|
52
54
|
this.initials = initialsFromText[0];
|
|
53
55
|
if (initialsFromText.length > 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-avatar.mjs","sources":["../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar.module.ts","../../../projects/ngx-sds-components/src/lib/avatar/spicainternational-ngx-sds-components-src-lib-avatar.ts"],"sourcesContent":["import {\r\n AfterViewInit,\r\n Component,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-avatar',\r\n templateUrl: './avatar.component.html',\r\n styleUrls: ['./avatar.component.scss'],\r\n})\r\nexport class SdsAvatarComponent implements AfterViewInit, OnChanges {\r\n @Input() text: string = '';\r\n @Input() colorKey: string = '';\r\n @Input() pictureUri: string = '';\r\n @Input() showHint: boolean = false;\r\n @Input() borderStyle: 'solid' | 'dashed' | 'dotted' | 'none' = 'none';\r\n @Input() borderColor?: string;\r\n @Input() initialsText?: string;\r\n @Input() cursor?: string;\r\n\r\n public isPictureReady: boolean = false;\r\n public initials: string = '';\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit() {\r\n this.loadUserPicture();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (\r\n changes['text'] &&\r\n changes['text'].currentValue != changes['text'].previousValue &&\r\n this.initialsText == undefined\r\n ) {\r\n this.extractInitials();\r\n }\r\n\r\n if (\r\n changes['pictureUri'] &&\r\n changes['pictureUri'].currentValue !=\r\n changes['pictureUri'].previousValue\r\n ) {\r\n this.loadUserPicture();\r\n }\r\n\r\n if (changes['initialsText'] && this.initialsText) {\r\n this.initials = this.initialsText;\r\n }\r\n }\r\n\r\n public setColorClass(): string {\r\n if (this.colorKey) {\r\n return 'color' + this.getColorIndex(this.colorKey);\r\n }\r\n return 'color18';\r\n }\r\n\r\n private extractInitials(): void {\r\n this.initials = '';\r\n if (this.text) {\r\n const initialsFromText = this.text\r\n .toUpperCase()\r\n .split(' ')\r\n .map((n) => n[0]);\r\n\r\n if (initialsFromText.length > 0) {\r\n this.initials = initialsFromText[0];\r\n if (initialsFromText.length > 1) {\r\n this.initials = `${this.initials}${initialsFromText[initialsFromText.length - 1]}`\r\n }\r\n }\r\n }\r\n }\r\n\r\n private getColorIndex(s: string): number {\r\n const length = 10;\r\n if (!s) {\r\n return 0;\r\n }\r\n let sumOfChars = s\r\n .split('')\r\n .map((x) => x.charCodeAt(0))\r\n .reduce((a, b) => a + b, 0);\r\n return sumOfChars % length;\r\n }\r\n\r\n public loadUserPicture() {\r\n if (this.pictureUri && this.pictureUri !== '') {\r\n this.isPictureReady = true;\r\n } else {\r\n this.isPictureReady = false;\r\n }\r\n }\r\n}\r\n","<div\r\n class=\"avatar circle d-flex justify-content-center align-items-center\"\r\n [class.hasPicture]=\"isPictureReady\"\r\n [ngClass]=\"setColorClass()\"\r\n [title]=\"showHint ? text : ''\"\r\n [style.border-style]=\"borderStyle.toString()\"\r\n [style.border-color]=\"borderColor\"\r\n [style.cursor]=\"cursor ? cursor : 'default'\"\r\n>\r\n <span \r\n *ngIf=\"!isPictureReady\" \r\n class=\"initials\"\r\n >\r\n {{ initials }}\r\n </span>\r\n\r\n <img \r\n *ngIf=\"isPictureReady\" \r\n [src]=\"pictureUri\"\r\n alt=\"\" />\r\n</div>\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AvatarModel } from './avatar-group.model';\r\n\r\n@Component({\r\n selector: 'sds-avatar-group',\r\n templateUrl: './avatar-group.component.html',\r\n styleUrls: ['./avatar-group.component.scss'],\r\n})\r\nexport class SdsAvatarGroupComponent implements OnInit, OnChanges {\r\n\r\n @Input() public stacked: boolean = false;\r\n @Input() public maxCount?: number;\r\n @Input() public fontSize: number = 2;\r\n @Input() public borderColor?: string;\r\n @Input() public data: Array<AvatarModel> = [];\r\n @Input() public dropdownContents: 'all' | 'overflow' = 'all';\r\n\r\n public overflow: Array<AvatarModel> = [];\r\n public inflow: Array<AvatarModel> = [];\r\n\r\n public overflowCountDisplay: string = '';\r\n public overFlowBorderStyle: 'solid' | 'none' = 'none';\r\n\r\n public overflowElementUUID = 'sds-ag-' + crypto.randomUUID();\r\n public showDropdown = false;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['data'] || changes['maxCount']){\r\n if (this.maxCount && this.data) {\r\n this.overflow = [...this.data];\r\n this.inflow = this.overflow.splice(0, this.maxCount);\r\n console.log(this.overflow.length);\r\n this.overflowCountDisplay = `+${Math.min(99, this.overflow.length)}`;\r\n this.overFlowBorderStyle = this.data.filter(x => x.borderStyle).length > 0 ? 'solid' : 'none';\r\n } else {\r\n this.inflow = [...this.data];\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public onOverflowClicked() {\r\n this.showDropdown = true;\r\n }\r\n\r\n}\r\n","<div class=\"d-flex avatar-group-container\">\r\n <sds-avatar *ngFor=\"let avatar of inflow\"\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n [showHint]=\"true\"\r\n [style.font-size.rem]=\"fontSize\"\r\n [style.margin-right.rem]=\"stacked ? fontSize/-3 : fontSize/15\"\r\n >\r\n </sds-avatar>\r\n\r\n <sds-avatar\r\n *ngIf=\"overflow.length > 0\"\r\n [id]=\"overflowElementUUID\"\r\n class=\"overflow\"\r\n [initialsText]=\"overflowCountDisplay\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"overFlowBorderStyle\"\r\n cursor=\"pointer\"\r\n [style.font-size.rem]=\"fontSize\"\r\n\r\n placement=\"bottom\"\r\n container=\"body\"\r\n triggers=\"\"\r\n (click)=\"onOverflowClicked()\"\r\n >\r\n </sds-avatar>\r\n\r\n <dx-popover\r\n target=\"#{{overflowElementUUID}}\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <dx-scroll-view\r\n showScrollbar=\"always\">\r\n <div class=\"overflow-avatars-container rounded\">\r\n <div *ngFor=\"let avatar of (dropdownContents === 'all' ? data : overflow)\"\r\n class=\"d-flex align-items-center pl-3 py-2 pr-5 my-2 overflow-avatar-container\" >\r\n <sds-avatar\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n borderColor=\"transparent\"\r\n [style.font-size.rem]=\"1.8\"\r\n >\r\n </sds-avatar>\r\n <div class=\"ml-3\">{{avatar.text}}</div>\r\n </div>\r\n </div>\r\n </dx-scroll-view>\r\n </dx-popover>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\nimport { DxScrollViewModule } from 'devextreme-angular/ui/scroll-view';\r\n\r\nimport { SdsAvatarComponent } from './avatar.component';\r\nimport { SdsAvatarGroupComponent } from './avatar-group.component';\r\n\r\n\r\nconst components = [\r\n SdsAvatarComponent,\r\n SdsAvatarGroupComponent\r\n];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n DxPopoverModule,\r\n DxScrollViewModule\r\n\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsAvatarModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsAvatarComponent","i4"],"mappings":";;;;;;;;;MAca,kBAAkB,CAAA;AAa3B,IAAA,WAAA,GAAA;QAZS,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAClB,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;QACtB,IAAU,CAAA,UAAA,GAAW,EAAE,CAAC;QACxB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAC1B,IAAW,CAAA,WAAA,GAA2C,MAAM,CAAC;QAK/D,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;QAChC,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;KAEb;IAEhB,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;KAC1B;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IACI,OAAO,CAAC,MAAM,CAAC;YACf,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa;AAC7D,YAAA,IAAI,CAAC,YAAY,IAAI,SAAS,EAChC;YACE,IAAI,CAAC,eAAe,EAAE,CAAC;AAC1B,SAAA;QAED,IACI,OAAO,CAAC,YAAY,CAAC;AACrB,YAAA,OAAO,CAAC,YAAY,CAAC,CAAC,YAAY;AAC9B,gBAAA,OAAO,CAAC,YAAY,CAAC,CAAC,aAAa,EACzC;YACE,IAAI,CAAC,eAAe,EAAE,CAAC;AAC1B,SAAA;QAED,IAAI,OAAO,CAAC,cAAc,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;AACf,QAAA,kBAAkB,aAVlB,kBAAkB;QAClB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAgBd,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVjB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;YACf,kBAAkB;AAEnB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,kBAAkB;AAEnB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-avatar.mjs","sources":["../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.ts","../../../projects/ngx-sds-components/src/lib/avatar/avatar-group.component.html","../../../projects/ngx-sds-components/src/lib/avatar/avatar.module.ts","../../../projects/ngx-sds-components/src/lib/avatar/spicainternational-ngx-sds-components-src-lib-avatar.ts"],"sourcesContent":["import {\r\n AfterViewInit,\r\n Component,\r\n Input,\r\n OnChanges,\r\n OnInit,\r\n SimpleChanges,\r\n} from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-avatar',\r\n templateUrl: './avatar.component.html',\r\n styleUrls: ['./avatar.component.scss'],\r\n})\r\nexport class SdsAvatarComponent implements AfterViewInit, OnChanges {\r\n @Input() text: string = '';\r\n @Input() colorKey: string = '';\r\n @Input() pictureUri: string = '';\r\n @Input() showHint: boolean = false;\r\n @Input() borderStyle: 'solid' | 'dashed' | 'dotted' | 'none' = 'none';\r\n @Input() borderColor?: string;\r\n @Input() initialsText?: string;\r\n @Input() cursor?: string;\r\n\r\n public isPictureReady: boolean = false;\r\n public initials: string = '';\r\n\r\n constructor() {}\r\n\r\n ngAfterViewInit() {\r\n this.loadUserPicture();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (\r\n changes['text'] &&\r\n changes['text'].currentValue != changes['text'].previousValue &&\r\n this.initialsText == undefined\r\n ) {\r\n this.extractInitials();\r\n }\r\n\r\n if (\r\n changes['pictureUri'] &&\r\n changes['pictureUri'].currentValue !=\r\n changes['pictureUri'].previousValue\r\n ) {\r\n this.loadUserPicture();\r\n }\r\n\r\n if (changes['initialsText'] && this.initialsText) {\r\n this.initials = this.initialsText;\r\n }\r\n }\r\n\r\n public setColorClass(): string {\r\n if (this.colorKey) {\r\n return 'color' + this.getColorIndex(this.colorKey);\r\n }\r\n return 'color18';\r\n }\r\n\r\n private extractInitials(): void {\r\n this.initials = '';\r\n if (this.text) {\r\n const initialsFromText = this.text\r\n .trim()\r\n .toUpperCase()\r\n .split(' ')\r\n .map((n) => n[0])\r\n .filter(x => !!x);\r\n\r\n if (initialsFromText.length > 0) {\r\n this.initials = initialsFromText[0];\r\n if (initialsFromText.length > 1) {\r\n this.initials = `${this.initials}${initialsFromText[initialsFromText.length - 1]}`\r\n }\r\n }\r\n }\r\n }\r\n\r\n private getColorIndex(s: string): number {\r\n const length = 10;\r\n if (!s) {\r\n return 0;\r\n }\r\n let sumOfChars = s\r\n .split('')\r\n .map((x) => x.charCodeAt(0))\r\n .reduce((a, b) => a + b, 0);\r\n return sumOfChars % length;\r\n }\r\n\r\n public loadUserPicture() {\r\n if (this.pictureUri && this.pictureUri !== '') {\r\n this.isPictureReady = true;\r\n } else {\r\n this.isPictureReady = false;\r\n }\r\n }\r\n}\r\n","<div\r\n class=\"avatar circle d-flex justify-content-center align-items-center\"\r\n [class.hasPicture]=\"isPictureReady\"\r\n [ngClass]=\"setColorClass()\"\r\n [title]=\"showHint ? text : ''\"\r\n [style.border-style]=\"borderStyle.toString()\"\r\n [style.border-color]=\"borderColor\"\r\n [style.cursor]=\"cursor ? cursor : 'default'\"\r\n>\r\n <span \r\n *ngIf=\"!isPictureReady\" \r\n class=\"initials\"\r\n >\r\n {{ initials }}\r\n </span>\r\n\r\n <img \r\n *ngIf=\"isPictureReady\" \r\n [src]=\"pictureUri\"\r\n alt=\"\" />\r\n</div>\r\n","import { Component, Input, OnChanges, OnInit, SimpleChanges, ViewChild } from '@angular/core';\r\nimport { AvatarModel } from './avatar-group.model';\r\n\r\n@Component({\r\n selector: 'sds-avatar-group',\r\n templateUrl: './avatar-group.component.html',\r\n styleUrls: ['./avatar-group.component.scss'],\r\n})\r\nexport class SdsAvatarGroupComponent implements OnInit, OnChanges {\r\n\r\n @Input() public stacked: boolean = false;\r\n @Input() public maxCount?: number;\r\n @Input() public fontSize: number = 2;\r\n @Input() public borderColor?: string;\r\n @Input() public data: Array<AvatarModel> = [];\r\n @Input() public dropdownContents: 'all' | 'overflow' = 'all';\r\n\r\n public overflow: Array<AvatarModel> = [];\r\n public inflow: Array<AvatarModel> = [];\r\n\r\n public overflowCountDisplay: string = '';\r\n public overFlowBorderStyle: 'solid' | 'none' = 'none';\r\n\r\n public overflowElementUUID = 'sds-ag-' + crypto.randomUUID();\r\n public showDropdown = false;\r\n\r\n constructor() {}\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['data'] || changes['maxCount']){\r\n if (this.maxCount && this.data) {\r\n this.overflow = [...this.data];\r\n this.inflow = this.overflow.splice(0, this.maxCount);\r\n console.log(this.overflow.length);\r\n this.overflowCountDisplay = `+${Math.min(99, this.overflow.length)}`;\r\n this.overFlowBorderStyle = this.data.filter(x => x.borderStyle).length > 0 ? 'solid' : 'none';\r\n } else {\r\n this.inflow = [...this.data];\r\n }\r\n }\r\n }\r\n\r\n ngOnInit(): void {}\r\n\r\n public onOverflowClicked() {\r\n this.showDropdown = true;\r\n }\r\n\r\n}\r\n","<div class=\"d-flex avatar-group-container\">\r\n <sds-avatar *ngFor=\"let avatar of inflow\"\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n [showHint]=\"true\"\r\n [style.font-size.rem]=\"fontSize\"\r\n [style.margin-right.rem]=\"stacked ? fontSize/-3 : fontSize/15\"\r\n >\r\n </sds-avatar>\r\n\r\n <sds-avatar\r\n *ngIf=\"overflow.length > 0\"\r\n [id]=\"overflowElementUUID\"\r\n class=\"overflow\"\r\n [initialsText]=\"overflowCountDisplay\"\r\n [borderColor]=\"borderColor\"\r\n [borderStyle]=\"overFlowBorderStyle\"\r\n cursor=\"pointer\"\r\n [style.font-size.rem]=\"fontSize\"\r\n\r\n placement=\"bottom\"\r\n container=\"body\"\r\n triggers=\"\"\r\n (click)=\"onOverflowClicked()\"\r\n >\r\n </sds-avatar>\r\n\r\n <dx-popover\r\n target=\"#{{overflowElementUUID}}\"\r\n [(visible)]=\"showDropdown\"\r\n >\r\n <dx-scroll-view\r\n showScrollbar=\"always\">\r\n <div class=\"overflow-avatars-container rounded\">\r\n <div *ngFor=\"let avatar of (dropdownContents === 'all' ? data : overflow)\"\r\n class=\"d-flex align-items-center pl-3 py-2 pr-5 my-2 overflow-avatar-container\" >\r\n <sds-avatar\r\n [text]=\"avatar.text\"\r\n [colorKey]=\"avatar.colorKey\"\r\n [borderStyle]=\"avatar.borderStyle ? avatar.borderStyle : 'none'\"\r\n [pictureUri]=\"avatar.pictureUri ?? ''\"\r\n borderColor=\"transparent\"\r\n [style.font-size.rem]=\"1.8\"\r\n >\r\n </sds-avatar>\r\n <div class=\"ml-3\">{{avatar.text}}</div>\r\n </div>\r\n </div>\r\n </dx-scroll-view>\r\n </dx-popover>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { DxPopoverModule } from 'devextreme-angular/ui/popover';\r\nimport { DxScrollViewModule } from 'devextreme-angular/ui/scroll-view';\r\n\r\nimport { SdsAvatarComponent } from './avatar.component';\r\nimport { SdsAvatarGroupComponent } from './avatar-group.component';\r\n\r\n\r\nconst components = [\r\n SdsAvatarComponent,\r\n SdsAvatarGroupComponent\r\n];\r\n@NgModule({\r\n declarations: [\r\n ...components\r\n ],\r\n imports: [\r\n CommonModule,\r\n DxPopoverModule,\r\n DxScrollViewModule\r\n\r\n ],\r\n exports: [\r\n ...components\r\n ]\r\n})\r\nexport class SdsAvatarModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SdsAvatarComponent","i4"],"mappings":";;;;;;;;;MAca,kBAAkB,CAAA;AAa3B,IAAA,WAAA,GAAA;QAZS,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAClB,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;QACtB,IAAU,CAAA,UAAA,GAAW,EAAE,CAAC;QACxB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAC1B,IAAW,CAAA,WAAA,GAA2C,MAAM,CAAC;QAK/D,IAAc,CAAA,cAAA,GAAY,KAAK,CAAC;QAChC,IAAQ,CAAA,QAAA,GAAW,EAAE,CAAC;KAEb;IAEhB,eAAe,GAAA;QACX,IAAI,CAAC,eAAe,EAAE,CAAC;KAC1B;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IACI,OAAO,CAAC,MAAM,CAAC;YACf,OAAO,CAAC,MAAM,CAAC,CAAC,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,aAAa;AAC7D,YAAA,IAAI,CAAC,YAAY,IAAI,SAAS,EAChC;YACE,IAAI,CAAC,eAAe,EAA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AAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,iBAjBxB,kBAAkB;AAClB,QAAA,uBAAuB,aAOvB,YAAY;QACZ,eAAe;AACf,QAAA,kBAAkB,aAVlB,kBAAkB;QAClB,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAgBd,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAVjB,OAAA,EAAA,CAAA;YACP,YAAY;YACZ,eAAe;YACf,kBAAkB;AAEnB,SAAA,CAAA,EAAA,CAAA,CAAA;2FAKU,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;AACZ,wBAAA,GAAG,UAAU;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,kBAAkB;AAEnB,qBAAA;AACD,oBAAA,OAAO,EAAE;AACL,wBAAA,GAAG,UAAU;AAChB,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ContentChild, Input, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
|
|
6
|
+
class SdsPageHeaderComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.titleContent = { nativeElement: undefined };
|
|
9
|
+
this.title = '';
|
|
10
|
+
}
|
|
11
|
+
ngOnInit() { }
|
|
12
|
+
}
|
|
13
|
+
SdsPageHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14
|
+
SdsPageHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsPageHeaderComponent, selector: "sds-page-header", inputs: { title: "title" }, queries: [{ propertyName: "titleContent", first: true, predicate: ["title"], descendants: true }], ngImport: i0, template: "<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [""], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderComponent, decorators: [{
|
|
16
|
+
type: Component,
|
|
17
|
+
args: [{ selector: 'sds-page-header', template: "<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [""] }]
|
|
18
|
+
}], ctorParameters: function () { return []; }, propDecorators: { titleContent: [{
|
|
19
|
+
type: ContentChild,
|
|
20
|
+
args: ['title']
|
|
21
|
+
}], title: [{
|
|
22
|
+
type: Input
|
|
23
|
+
}] } });
|
|
24
|
+
|
|
25
|
+
const components = [SdsPageHeaderComponent];
|
|
26
|
+
class SdsPageHeaderModule {
|
|
27
|
+
}
|
|
28
|
+
SdsPageHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
29
|
+
SdsPageHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, declarations: [SdsPageHeaderComponent], imports: [CommonModule], exports: [SdsPageHeaderComponent] });
|
|
30
|
+
SdsPageHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, imports: [[CommonModule]] });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsPageHeaderModule, decorators: [{
|
|
32
|
+
type: NgModule,
|
|
33
|
+
args: [{
|
|
34
|
+
declarations: [SdsPageHeaderComponent],
|
|
35
|
+
imports: [CommonModule],
|
|
36
|
+
exports: [...components],
|
|
37
|
+
}]
|
|
38
|
+
}] });
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Generated bundle index. Do not edit.
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
export { SdsPageHeaderComponent, SdsPageHeaderModule };
|
|
45
|
+
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-page-header.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-page-header.mjs","sources":["../../../projects/ngx-sds-components/src/lib/page-header/page-header.component.ts","../../../projects/ngx-sds-components/src/lib/page-header/page-header.component.html","../../../projects/ngx-sds-components/src/lib/page-header/page-header.module.ts","../../../projects/ngx-sds-components/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.ts"],"sourcesContent":["import { Component, ContentChild, ElementRef, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'sds-page-header',\r\n templateUrl: './page-header.component.html',\r\n styleUrls: ['./page-header.component.scss'],\r\n})\r\nexport class SdsPageHeaderComponent implements OnInit {\r\n @ContentChild('title') titleContent: ElementRef = { nativeElement: undefined };\r\n @Input() title: string;\r\n\r\n constructor() {\r\n this.title = '';\r\n }\r\n\r\n ngOnInit(): void {}\r\n}\r\n","<div class=\"d-flex flex-wrap align-items-center\">\r\n <h1 *ngIf=\"!titleContent\" class=\"mr-4\">\r\n {{ title }}\r\n </h1>\r\n\r\n <ng-container *ngIf=\"titleContent\">\r\n <ng-content select=\"title\"></ng-content>\r\n </ng-container>\r\n\r\n <ng-content select=\"titleAppendix\"></ng-content>\r\n\r\n <div class=\"ml-auto\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SdsPageHeaderComponent } from './page-header.component';\r\n\r\nconst components = [SdsPageHeaderComponent];\r\n\r\n@NgModule({\r\n declarations: [SdsPageHeaderComponent],\r\n imports: [CommonModule],\r\n exports: [...components],\r\n})\r\nexport class SdsPageHeaderModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,sBAAsB,CAAA;AAI/B,IAAA,WAAA,GAAA;AAHuB,QAAA,IAAA,CAAA,YAAY,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAI3E,QAAA,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;KACnB;AAED,IAAA,QAAQ,MAAW;;mHARV,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAA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E,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAC3B,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { ElementRef, Component, ChangeDetectionStrategy, Input, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i4 from '@angular/common';
|
|
3
4
|
import { CommonModule } from '@angular/common';
|
|
4
5
|
import { faInfoCircle } from '@fortawesome/pro-regular-svg-icons';
|
|
5
6
|
import * as i1 from '@fortawesome/angular-fontawesome';
|
|
@@ -11,29 +12,63 @@ import * as i3 from 'devextreme-angular/ui/nested';
|
|
|
11
12
|
class SdsQuickInfoComponent {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.icon = faInfoCircle;
|
|
14
|
-
this.popoverMaxWidth =
|
|
15
|
+
this.popoverMaxWidth = '20rem';
|
|
16
|
+
this.hideOnMouseLeave = true;
|
|
17
|
+
this.customContent = { nativeElement: undefined };
|
|
18
|
+
this.hideEvent = { name: 'dxhoverend', delay: 200 };
|
|
19
|
+
this.showEvent = { name: 'dxhoverstart', delay: 200 };
|
|
20
|
+
}
|
|
21
|
+
ngOnChanges(changes) {
|
|
22
|
+
if (changes['showDelay']) {
|
|
23
|
+
this.setShowEvent();
|
|
24
|
+
}
|
|
25
|
+
if (changes['hideDelay'] || changes['hideOnMouseLeave']) {
|
|
26
|
+
this.setHideEvent();
|
|
27
|
+
}
|
|
15
28
|
}
|
|
16
29
|
onHiding(e) {
|
|
17
30
|
const popoverContent = e.component.content().parentNode;
|
|
18
31
|
const isMouseInsidePopover = popoverContent.matches(':hover');
|
|
19
32
|
e.cancel = isMouseInsidePopover;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
if (this.hideOnMouseLeave) {
|
|
34
|
+
popoverContent.addEventListener('mouseleave', () => {
|
|
35
|
+
e.component.hide();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
setShowEvent() {
|
|
40
|
+
this.showEvent = { name: 'dxhoverstart', delay: this.showDelay ?? 200 };
|
|
41
|
+
}
|
|
42
|
+
setHideEvent() {
|
|
43
|
+
if (this.hideOnMouseLeave) {
|
|
44
|
+
this.hideEvent = { name: 'dxhoverend', delay: this.hideDelay ?? 200 };
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
this.hideEvent = {};
|
|
48
|
+
}
|
|
23
49
|
}
|
|
24
50
|
}
|
|
25
51
|
SdsQuickInfoComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth" }, viewQueries: [{ propertyName: "buttonElementRef", first: true, predicate: ["popoverTarget"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<
|
|
52
|
+
SdsQuickInfoComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.1", type: SdsQuickInfoComponent, selector: "sds-quick-info", inputs: { icon: "icon", popoverMaxWidth: "popoverMaxWidth", showDelay: "showDelay", hideDelay: "hideDelay", hideOnMouseLeave: "hideOnMouseLeave" }, 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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: [""], 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", "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", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showEventChange", "showTitleChange", "targetChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { type: i3.DxoAnimationComponent, selector: "dxo-animation", inputs: ["hide", "show", "duration", "easing", "enabled", "maxPointCountSupported", "complete", "delay", "direction", "from", "staggerDelay", "start", "to", "type"] }, { type: i3.DxoShowComponent, selector: "dxo-show", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }, { type: i3.DxoHideComponent, selector: "dxo-hide", inputs: ["complete", "delay", "direction", "duration", "easing", "from", "staggerDelay", "start", "to", "type"] }], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
27
53
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: SdsQuickInfoComponent, decorators: [{
|
|
28
54
|
type: Component,
|
|
29
|
-
args: [{ selector: 'sds-quick-info', changeDetection: ChangeDetectionStrategy.OnPush, template: "<
|
|
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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\r\n <ng-content></ng-content>\r\n</dx-popover>", styles: [""] }]
|
|
30
56
|
}], ctorParameters: function () { return []; }, propDecorators: { icon: [{
|
|
31
57
|
type: Input
|
|
32
58
|
}], popoverMaxWidth: [{
|
|
33
59
|
type: Input
|
|
60
|
+
}], showDelay: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], hideDelay: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], hideOnMouseLeave: [{
|
|
65
|
+
type: Input
|
|
34
66
|
}], buttonElementRef: [{
|
|
35
67
|
type: ViewChild,
|
|
36
68
|
args: ['popoverTarget', { read: ElementRef, static: true }]
|
|
69
|
+
}], customContent: [{
|
|
70
|
+
type: ContentChild,
|
|
71
|
+
args: ['customContent']
|
|
37
72
|
}] } });
|
|
38
73
|
|
|
39
74
|
const components = [SdsQuickInfoComponent];
|
|
@@ -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 ElementRef,\r\n Input,\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 {\r\n @Input() icon: IconDefinition = faInfoCircle;\r\n @Input() popoverMaxWidth: number =
|
|
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() showDelay?: number;\r\n @Input() hideDelay?: number;\r\n @Input() hideOnMouseLeave: boolean = true;\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: 'dxhoverend', delay: 200 };\r\n this.showEvent = { name: 'dxhoverstart', delay: 200 };\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['showDelay']) {\r\n this.setShowEvent();\r\n }\r\n\r\n if (changes['hideDelay'] || changes['hideOnMouseLeave']) {\r\n this.setHideEvent();\r\n }\r\n }\r\n\r\n onHiding(e: any) {\r\n const popoverContent = e.component.content().parentNode;\r\n const isMouseInsidePopover = popoverContent.matches(':hover');\r\n e.cancel = isMouseInsidePopover;\r\n\r\n if (this.hideOnMouseLeave) {\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 = { name: 'dxhoverstart', delay: this.showDelay ?? 200 };\r\n }\r\n\r\n private setHideEvent(): void {\r\n if (this.hideOnMouseLeave) {\r\n this.hideEvent = { name: 'dxhoverend', delay: this.hideDelay ?? 200 };\r\n } else {\r\n this.hideEvent = { };\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 [showEvent]=\"showEvent\"\r\n [hideEvent]=\"hideEvent\"\r\n (onHiding)=\"onHiding($event)\"\r\n>\r\n<dxo-animation>\r\n <dxo-show\r\n type=\"fade\"\r\n duration=\"200\"\r\n [from]=\"0\"\r\n [to]=\"1\"\r\n ></dxo-show>\r\n <dxo-hide\r\n type=\"fade\"\r\n duration=\"100\"\r\n [from]=\"1\"\r\n [to]=\"0\"\r\n ></dxo-hide>\r\n</dxo-animation>\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;AAoB9B,IAAA,WAAA,GAAA;QAnBS,IAAI,CAAA,IAAA,GAAmB,YAAY,CAAC;QACpC,IAAe,CAAA,eAAA,GAA+B,OAAO,CAAC;QAGtD,IAAgB,CAAA,gBAAA,GAAY,IAAI,CAAC;AAGX,QAAA,IAAA,CAAA,aAAa,GAAe,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC;AAapF,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AACpD,QAAA,IAAI,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;KACzD;AAED,IAAA,WAAW,CAAC,OAAsB,EAAA;AAC9B,QAAA,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE;YACtB,IAAI,CAAC,YAAY,EAAE,CAAC;AACvB,SAAA;QAED,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,OAAO,CAAC,kBAAkB,CAAC,EAAE;YACrD,IAAI,CAAC,YAAY,EAAE,CAAC;AACvB,SAAA;KACJ;AAED,IAAA,QAAQ,CAAC,CAAM,EAAA;QACX,MAAM,cAAc,GAAG,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC;QACxD,MAAM,oBAAoB,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC9D,QAAA,CAAC,CAAC,MAAM,GAAG,oBAAoB,CAAC;QAEhC,IAAI,IAAI,CAAC,gBAAgB,EAAE;AACvB,YAAA,cAAc,CAAC,gBAAgB,CAAC,YAAY,EAAE,MAAK;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AAE;AACP,wBAAA,GAAG,UAAU;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -6,6 +6,7 @@ export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
|
6
6
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
7
|
export * from '@spicainternational/ngx-sds-components/src/lib/modal';
|
|
8
8
|
export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
|
|
9
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/page-header';
|
|
9
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/pane';
|
|
10
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
|
|
11
12
|
export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spicainternational-ngx-sds-components.mjs","sources":["../../../projects/ngx-sds-components/src/public-api.ts","../../../projects/ngx-sds-components/src/spicainternational-ngx-sds-components.ts"],"sourcesContent":["/*\r\n * Public API Surface of ngx-sds-components\r\n */\r\n\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/app-switcher';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/avatar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/callout';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/color-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-picker';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/modal';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/navigation';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/page-header';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/pane';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/quick-info';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/side-bar';\r\nexport * from '@spicainternational/ngx-sds-components/src/lib/tooltip';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spicainternational/ngx-sds-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Spica design system angular components.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=10.0.0",
|
|
@@ -100,6 +100,14 @@
|
|
|
100
100
|
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs",
|
|
101
101
|
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs"
|
|
102
102
|
},
|
|
103
|
+
"./src/lib/page-header": {
|
|
104
|
+
"types": "./src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.d.ts",
|
|
105
|
+
"esm2020": "./esm2020/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
106
|
+
"es2020": "./fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
107
|
+
"es2015": "./fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
108
|
+
"node": "./fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
109
|
+
"default": "./fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs"
|
|
110
|
+
},
|
|
103
111
|
"./src/lib/pane": {
|
|
104
112
|
"types": "./src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.d.ts",
|
|
105
113
|
"esm2020": "./esm2020/src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.mjs",
|
package/public-api.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from '@spicainternational/ngx-sds-components/src/lib/date-picker';
|
|
|
6
6
|
export * from '@spicainternational/ngx-sds-components/src/lib/date-pipes';
|
|
7
7
|
export * from '@spicainternational/ngx-sds-components/src/lib/modal';
|
|
8
8
|
export * from '@spicainternational/ngx-sds-components/src/lib/navigation';
|
|
9
|
+
export * from '@spicainternational/ngx-sds-components/src/lib/page-header';
|
|
9
10
|
export * from '@spicainternational/ngx-sds-components/src/lib/pane';
|
|
10
11
|
export * from '@spicainternational/ngx-sds-components/src/lib/quick-info';
|
|
11
12
|
export * from '@spicainternational/ngx-sds-components/src/lib/segmented-control';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
3
|
+
"es2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
4
|
+
"esm2020": "../../../esm2020/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
5
|
+
"fesm2020": "../../../fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
6
|
+
"fesm2015": "../../../fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs",
|
|
7
|
+
"typings": "spicainternational-ngx-sds-components-src-lib-page-header.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"name": "@spicainternational/ngx-sds-components/src/lib/page-header"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementRef, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SdsPageHeaderComponent implements OnInit {
|
|
4
|
+
titleContent: ElementRef;
|
|
5
|
+
title: string;
|
|
6
|
+
constructor();
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsPageHeaderComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsPageHeaderComponent, "sds-page-header", never, { "title": "title"; }, {}, ["titleContent"], ["title", "titleAppendix", "*"]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./page-header.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
export declare class SdsPageHeaderModule {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdsPageHeaderModule, never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SdsPageHeaderModule, [typeof i1.SdsPageHeaderComponent], [typeof i2.CommonModule], [typeof i1.SdsPageHeaderComponent]>;
|
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SdsPageHeaderModule>;
|
|
8
|
+
}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { IconDefinition } from '@fortawesome/pro-regular-svg-icons';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class SdsQuickInfoComponent {
|
|
4
|
+
export declare class SdsQuickInfoComponent implements OnChanges {
|
|
5
5
|
icon: IconDefinition;
|
|
6
|
-
popoverMaxWidth: number;
|
|
6
|
+
popoverMaxWidth: number | Function | string;
|
|
7
|
+
showDelay?: number;
|
|
8
|
+
hideDelay?: number;
|
|
9
|
+
hideOnMouseLeave: boolean;
|
|
7
10
|
buttonElementRef?: ElementRef;
|
|
11
|
+
customContent: ElementRef;
|
|
12
|
+
hideEvent: string | {
|
|
13
|
+
delay?: number;
|
|
14
|
+
name?: string;
|
|
15
|
+
};
|
|
16
|
+
showEvent: string | {
|
|
17
|
+
delay?: number;
|
|
18
|
+
name?: string;
|
|
19
|
+
};
|
|
8
20
|
constructor();
|
|
21
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
9
22
|
onHiding(e: any): void;
|
|
23
|
+
private setShowEvent;
|
|
24
|
+
private setHideEvent;
|
|
10
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdsQuickInfoComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdsQuickInfoComponent, "sds-quick-info", never, { "icon": "icon"; "popoverMaxWidth": "popoverMaxWidth"; }, {},
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdsQuickInfoComponent, "sds-quick-info", never, { "icon": "icon"; "popoverMaxWidth": "popoverMaxWidth"; "showDelay": "showDelay"; "hideDelay": "hideDelay"; "hideOnMouseLeave": "hideOnMouseLeave"; }, {}, ["customContent"], ["customContent", "*"]>;
|
|
12
27
|
}
|