@skyux/avatar 5.9.4 → 6.0.0-beta.10
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/index.mjs +7 -0
- package/esm2020/lib/modules/avatar/avatar-adapter.service.mjs +51 -0
- package/esm2020/lib/modules/avatar/avatar-size.mjs +2 -0
- package/esm2020/lib/modules/avatar/avatar-src.mjs +2 -0
- package/esm2020/lib/modules/avatar/avatar.component.mjs +125 -0
- package/esm2020/lib/modules/avatar/avatar.inner.component.mjs +82 -0
- package/esm2020/lib/modules/avatar/avatar.module.mjs +44 -0
- package/esm2020/lib/modules/shared/sky-avatar-resources.module.mjs +62 -0
- package/esm2020/skyux-avatar.mjs +5 -0
- package/esm2020/testing/avatar-fixture.mjs +31 -0
- package/esm2020/testing/public-api.mjs +2 -0
- package/esm2020/testing/skyux-avatar-testing.mjs +5 -0
- package/fesm2015/{skyux-avatar-testing.js → skyux-avatar-testing.mjs} +1 -1
- package/fesm2015/skyux-avatar-testing.mjs.map +1 -0
- package/fesm2015/skyux-avatar.mjs +351 -0
- package/fesm2015/skyux-avatar.mjs.map +1 -0
- package/{esm2015/testing/avatar-fixture.js → fesm2020/skyux-avatar-testing.mjs} +9 -2
- package/fesm2020/skyux-avatar-testing.mjs.map +1 -0
- package/fesm2020/skyux-avatar.mjs +351 -0
- package/fesm2020/skyux-avatar.mjs.map +1 -0
- package/package.json +38 -14
- package/testing/package.json +5 -5
- package/bundles/skyux-avatar-testing.umd.js +0 -54
- package/bundles/skyux-avatar.umd.js +0 -750
- package/esm2015/index.js +0 -7
- package/esm2015/index.js.map +0 -1
- package/esm2015/lib/modules/avatar/avatar-adapter.service.js +0 -51
- package/esm2015/lib/modules/avatar/avatar-adapter.service.js.map +0 -1
- package/esm2015/lib/modules/avatar/avatar-size.js +0 -2
- package/esm2015/lib/modules/avatar/avatar-size.js.map +0 -1
- package/esm2015/lib/modules/avatar/avatar-src.js +0 -2
- package/esm2015/lib/modules/avatar/avatar-src.js.map +0 -1
- package/esm2015/lib/modules/avatar/avatar.component.js +0 -130
- package/esm2015/lib/modules/avatar/avatar.component.js.map +0 -1
- package/esm2015/lib/modules/avatar/avatar.inner.component.js +0 -88
- package/esm2015/lib/modules/avatar/avatar.inner.component.js.map +0 -1
- package/esm2015/lib/modules/avatar/avatar.module.js +0 -44
- package/esm2015/lib/modules/avatar/avatar.module.js.map +0 -1
- package/esm2015/lib/modules/shared/sky-avatar-resources.module.js +0 -62
- package/esm2015/lib/modules/shared/sky-avatar-resources.module.js.map +0 -1
- package/esm2015/skyux-avatar.js +0 -5
- package/esm2015/skyux-avatar.js.map +0 -1
- package/esm2015/testing/avatar-fixture.js.map +0 -1
- package/esm2015/testing/public-api.js +0 -2
- package/esm2015/testing/public-api.js.map +0 -1
- package/esm2015/testing/skyux-avatar-testing.js +0 -5
- package/esm2015/testing/skyux-avatar-testing.js.map +0 -1
- package/fesm2015/skyux-avatar-testing.js.map +0 -1
- package/fesm2015/skyux-avatar.js +0 -362
- package/fesm2015/skyux-avatar.js.map +0 -1
package/fesm2015/skyux-avatar.js
DELETED
|
@@ -1,362 +0,0 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
|
-
import { CommonModule } from '@angular/common';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { NgModule, Injectable, Component, ViewEncapsulation, Input, EventEmitter, Output } from '@angular/core';
|
|
5
|
-
import * as i1 from '@skyux/errors';
|
|
6
|
-
import { SkyErrorModule } from '@skyux/errors';
|
|
7
|
-
import * as i2$1 from '@skyux/forms';
|
|
8
|
-
import { SkyFileAttachmentsModule, SkyFileSizePipe } from '@skyux/forms';
|
|
9
|
-
import * as i3$1 from '@skyux/i18n';
|
|
10
|
-
import { getLibStringForLocale, SkyI18nModule, SKY_LIB_RESOURCES_PROVIDERS } from '@skyux/i18n';
|
|
11
|
-
import * as i3 from '@skyux/theme';
|
|
12
|
-
import { SkyThemeModule } from '@skyux/theme';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* NOTICE: DO NOT MODIFY THIS FILE!
|
|
16
|
-
* The contents of this file were automatically generated by
|
|
17
|
-
* the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-avatar' schematic.
|
|
18
|
-
* To update this file, simply rerun the command.
|
|
19
|
-
*/
|
|
20
|
-
const RESOURCES = {
|
|
21
|
-
'EN-US': {
|
|
22
|
-
skyux_avatar_error_not_image_description: {
|
|
23
|
-
message: 'Please choose a file that is a valid image.',
|
|
24
|
-
},
|
|
25
|
-
skyux_avatar_error_not_image_title: { message: 'File is not an image.' },
|
|
26
|
-
skyux_avatar_error_too_large_description: {
|
|
27
|
-
message: 'Please choose an image that is less than {0}.',
|
|
28
|
-
},
|
|
29
|
-
skyux_avatar_error_too_large_title: { message: 'File is too large.' },
|
|
30
|
-
skyux_avatar_errormodal_ok: { message: 'OK' },
|
|
31
|
-
skyux_avatar_inner_description: { message: 'Profile picture of {0}' },
|
|
32
|
-
skyux_avatar_upload_change_aria_label: {
|
|
33
|
-
message: 'Change profile photo of {0}. Drag a file here or click to browse.',
|
|
34
|
-
},
|
|
35
|
-
skyux_avatar_upload_new_aria_label: {
|
|
36
|
-
message: 'Add profile photo of {0}. Drag a file here or click to browse.',
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
class SkyAvatarResourcesProvider {
|
|
41
|
-
getString(localeInfo, name) {
|
|
42
|
-
return getLibStringForLocale(RESOURCES, localeInfo.locale, name);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Import into any component library module that needs to use resource strings.
|
|
47
|
-
*/
|
|
48
|
-
class SkyAvatarResourcesModule {
|
|
49
|
-
}
|
|
50
|
-
SkyAvatarResourcesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarResourcesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
51
|
-
SkyAvatarResourcesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarResourcesModule, exports: [SkyI18nModule] });
|
|
52
|
-
SkyAvatarResourcesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarResourcesModule, providers: [
|
|
53
|
-
{
|
|
54
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
55
|
-
useClass: SkyAvatarResourcesProvider,
|
|
56
|
-
multi: true,
|
|
57
|
-
},
|
|
58
|
-
], imports: [SkyI18nModule] });
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarResourcesModule, decorators: [{
|
|
60
|
-
type: NgModule,
|
|
61
|
-
args: [{
|
|
62
|
-
exports: [SkyI18nModule],
|
|
63
|
-
providers: [
|
|
64
|
-
{
|
|
65
|
-
provide: SKY_LIB_RESOURCES_PROVIDERS,
|
|
66
|
-
useClass: SkyAvatarResourcesProvider,
|
|
67
|
-
multi: true,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
}]
|
|
71
|
-
}] });
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
class SkyAvatarAdapterService {
|
|
77
|
-
updateImage(elementRef, src) {
|
|
78
|
-
this.revokeBlobUrl();
|
|
79
|
-
const el = elementRef.nativeElement;
|
|
80
|
-
/*istanbul ignore else */
|
|
81
|
-
if (el) {
|
|
82
|
-
const imageEl = el.querySelector('.sky-avatar-image');
|
|
83
|
-
/*istanbul ignore else */
|
|
84
|
-
if (imageEl) {
|
|
85
|
-
let url;
|
|
86
|
-
if (src) {
|
|
87
|
-
if (src instanceof File || src instanceof Blob) {
|
|
88
|
-
url = this.createBlobUrl(src);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
url = src;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// Notice the quotes inside the `url` function. This ensures proper url escaping.
|
|
95
|
-
imageEl.style.backgroundImage = url ? 'url("' + url + '")' : '';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
destroy() {
|
|
100
|
-
this.revokeBlobUrl();
|
|
101
|
-
}
|
|
102
|
-
createBlobUrl(src) {
|
|
103
|
-
const url = URL.createObjectURL(src);
|
|
104
|
-
// Keep the last blob URL around so we can revoke it later.
|
|
105
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
106
|
-
this.blobUrl = url;
|
|
107
|
-
return url;
|
|
108
|
-
}
|
|
109
|
-
revokeBlobUrl() {
|
|
110
|
-
if (this.blobUrl) {
|
|
111
|
-
URL.revokeObjectURL(this.blobUrl);
|
|
112
|
-
this.blobUrl = undefined;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
SkyAvatarAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
117
|
-
SkyAvatarAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarAdapterService });
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarAdapterService, decorators: [{
|
|
119
|
-
type: Injectable
|
|
120
|
-
}] });
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @internal
|
|
124
|
-
*/
|
|
125
|
-
class SkyAvatarInnerComponent {
|
|
126
|
-
constructor(elementRef, adapter) {
|
|
127
|
-
this.elementRef = elementRef;
|
|
128
|
-
this.adapter = adapter;
|
|
129
|
-
}
|
|
130
|
-
get src() {
|
|
131
|
-
return this._src;
|
|
132
|
-
}
|
|
133
|
-
set src(value) {
|
|
134
|
-
this._src = value;
|
|
135
|
-
this.updateImage();
|
|
136
|
-
}
|
|
137
|
-
get name() {
|
|
138
|
-
return this._name;
|
|
139
|
-
}
|
|
140
|
-
set name(value) {
|
|
141
|
-
this._name = value;
|
|
142
|
-
}
|
|
143
|
-
get initials() {
|
|
144
|
-
let initials;
|
|
145
|
-
if (this.name) {
|
|
146
|
-
const nameSplit = this.name.split(' ');
|
|
147
|
-
initials = getInitial(nameSplit[0]);
|
|
148
|
-
if (nameSplit.length > 1) {
|
|
149
|
-
initials += getInitial(nameSplit[nameSplit.length - 1]);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
return initials;
|
|
153
|
-
}
|
|
154
|
-
get colorIndex() {
|
|
155
|
-
const name = this.name;
|
|
156
|
-
let colorIndex;
|
|
157
|
-
if (name) {
|
|
158
|
-
// Generate a unique-ish color based on the record name. This is deterministic
|
|
159
|
-
// so that a given name will always generate the same color.
|
|
160
|
-
const seed = name.charCodeAt(0) + name.charCodeAt(name.length - 1) + name.length;
|
|
161
|
-
colorIndex = Math.abs(seed % 6);
|
|
162
|
-
}
|
|
163
|
-
else {
|
|
164
|
-
colorIndex = 0;
|
|
165
|
-
}
|
|
166
|
-
return colorIndex;
|
|
167
|
-
}
|
|
168
|
-
ngAfterViewInit() {
|
|
169
|
-
this.viewInitialized = true;
|
|
170
|
-
this.updateImage();
|
|
171
|
-
}
|
|
172
|
-
ngOnDestroy() {
|
|
173
|
-
this.adapter.destroy();
|
|
174
|
-
}
|
|
175
|
-
updateImage() {
|
|
176
|
-
if (this.viewInitialized) {
|
|
177
|
-
this.adapter.updateImage(this.elementRef, this.src);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
SkyAvatarInnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarInnerComponent, deps: [{ token: i0.ElementRef }, { token: SkyAvatarAdapterService }], target: i0.ɵɵFactoryTarget.Component });
|
|
182
|
-
SkyAvatarInnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAvatarInnerComponent, selector: "sky-avatar-inner", inputs: { src: "src", name: "name", size: "size" }, providers: [SkyAvatarAdapterService], ngImport: i0, template: "<div\n class=\"sky-elevation-1 sky-avatar-wrapper\"\n [ngClass]=\"'sky-avatar-wrapper-size-' + (size || 'large')\"\n>\n <div class=\"sky-avatar-image\" [hidden]=\"!src\"></div>\n <div *ngIf=\"src\" class=\"sky-screen-reader-only\">\n {{ 'skyux_avatar_inner_description' | skyLibResources: name }}\n </div>\n <div\n class=\"sky-avatar-initials\"\n [hidden]=\"src || !name\"\n [ngClass]=\"'sky-palette-multi-' + (colorIndex + 1)\"\n >\n <div\n *ngIf=\"size === 'small'\"\n class=\"sky-avatar-initials-inner\"\n [skyThemeClass]=\"{\n 'sky-font-body-sm': 'modern'\n }\"\n >\n {{ initials }}\n </div>\n <div\n *ngIf=\"size === 'medium'\"\n class=\"sky-avatar-initials-inner\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern'\n }\"\n >\n {{ initials }}\n </div>\n <div\n *ngIf=\"size !== 'small' && size !== 'medium'\"\n class=\"sky-avatar-initials-inner\"\n [skyThemeClass]=\"{\n 'sky-font-display-2': 'modern'\n }\"\n >\n {{ initials }}\n </div>\n </div>\n</div>\n", styles: [".sky-avatar-wrapper{height:104px;width:104px;border:solid 2px transparent;border-radius:50%;overflow:hidden;position:relative;top:-2px;left:-2px}.sky-avatar-image,.sky-avatar-initials{height:100px;width:100px;background-position:50%;background-size:cover;display:flex;align-items:center;justify-content:center}.sky-avatar-initials{font-size:50px}.sky-avatar-initials-inner{color:#fff;cursor:default;-webkit-user-select:none;user-select:none}.sky-avatar-wrapper-size-medium{height:69px;width:69px}.sky-avatar-wrapper-size-medium .sky-avatar-image,.sky-avatar-wrapper-size-medium .sky-avatar-initials{height:65px;width:65px}.sky-avatar-wrapper-size-medium .sky-avatar-initials{font-size:32.5px}.sky-avatar-wrapper-size-small{height:36px;width:36px}.sky-avatar-wrapper-size-small .sky-avatar-image,.sky-avatar-wrapper-size-small .sky-avatar-initials{height:32px;width:32px}.sky-avatar-wrapper-size-small .sky-avatar-initials{font-size:16px}.sky-file-drop .sky-avatar-wrapper{cursor:pointer}.sky-file-drop-accept .sky-avatar-wrapper{border-color:#72bf44;border-style:dashed}.sky-file-drop-reject .sky-avatar-wrapper{border-color:#ef4044;border-style:dashed}.sky-theme-modern .sky-avatar-wrapper{height:100px;width:100px;background-color:#fff;border-width:0;padding:5px;top:0;left:0}.sky-theme-modern .sky-avatar-image,.sky-theme-modern .sky-avatar-initials{border-radius:50%;height:90px;width:90px}.sky-theme-modern .sky-avatar-initials-inner{color:#212327}.sky-theme-modern .sky-file-drop-accept .sky-avatar-wrapper,.sky-theme-modern .sky-file-drop-reject .sky-avatar-wrapper{border-width:2px;padding:3px}.sky-theme-modern .sky-file-drop-accept .sky-avatar-wrapper-size-medium,.sky-theme-modern .sky-file-drop-reject .sky-avatar-wrapper-size-medium{padding:1px}.sky-theme-modern .sky-file-drop-accept .sky-avatar-wrapper-size-small,.sky-theme-modern .sky-file-drop-reject .sky-avatar-wrapper-size-small{padding:0}.sky-theme-modern .sky-avatar-wrapper-size-medium{padding:3px;height:65px;width:65px}.sky-theme-modern .sky-avatar-wrapper-size-medium .sky-avatar-image,.sky-theme-modern .sky-avatar-wrapper-size-medium .sky-avatar-initials{height:59px;width:59px}.sky-theme-modern .sky-avatar-wrapper-size-small{padding:2px;height:32px;width:32px}.sky-theme-modern .sky-avatar-wrapper-size-small .sky-avatar-image,.sky-theme-modern .sky-avatar-wrapper-size-small .sky-avatar-initials{height:28px;width:28px}.sky-theme-modern sky-file-drop:hover .sky-avatar-wrapper{border:solid 1px #1870B8;padding:4px}.sky-theme-modern sky-file-drop:hover .sky-avatar-wrapper.sky-avatar-wrapper-size-medium{padding:2px}.sky-theme-modern sky-file-drop:hover .sky-avatar-wrapper.sky-avatar-wrapper-size-small{padding:1px}.sky-theme-modern sky-file-drop:active .sky-avatar-wrapper,.sky-theme-modern sky-file-drop:focus-within .sky-avatar-wrapper{border:solid 2px #1870B8;padding:3px}.sky-theme-modern sky-file-drop:active .sky-avatar-wrapper.sky-avatar-wrapper-size-medium,.sky-theme-modern sky-file-drop:focus-within .sky-avatar-wrapper.sky-avatar-wrapper-size-medium{padding:1px}.sky-theme-modern sky-file-drop:active .sky-avatar-wrapper.sky-avatar-wrapper-size-small,.sky-theme-modern sky-file-drop:focus-within .sky-avatar-wrapper.sky-avatar-wrapper-size-small{padding:0}.sky-theme-modern sky-file-drop:focus-within:not(:active) .sky-avatar-wrapper{box-shadow:0 1px 8px #0000004d}.sky-theme-modern.sky-theme-mode-dark .sky-avatar-wrapper{background-color:transparent}.sky-theme-modern.sky-theme-mode-dark .sky-avatar-initials-inner{color:#212327}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarInnerComponent, decorators: [{
|
|
184
|
-
type: Component,
|
|
185
|
-
args: [{
|
|
186
|
-
selector: 'sky-avatar-inner',
|
|
187
|
-
templateUrl: './avatar.inner.component.html',
|
|
188
|
-
styleUrls: ['./avatar.inner.component.scss'],
|
|
189
|
-
providers: [SkyAvatarAdapterService],
|
|
190
|
-
encapsulation: ViewEncapsulation.None,
|
|
191
|
-
}]
|
|
192
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: SkyAvatarAdapterService }]; }, propDecorators: { src: [{
|
|
193
|
-
type: Input
|
|
194
|
-
}], name: [{
|
|
195
|
-
type: Input
|
|
196
|
-
}], size: [{
|
|
197
|
-
type: Input
|
|
198
|
-
}] } });
|
|
199
|
-
function getInitial(name) {
|
|
200
|
-
return name.charAt(0).toUpperCase();
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
class SkyAvatarComponent {
|
|
204
|
-
constructor(errorService, fileSizePipe, resourcesService) {
|
|
205
|
-
this.errorService = errorService;
|
|
206
|
-
this.fileSizePipe = fileSizePipe;
|
|
207
|
-
this.resourcesService = resourcesService;
|
|
208
|
-
/**
|
|
209
|
-
* Specifies the maximum file size for the image in bytes.
|
|
210
|
-
*/
|
|
211
|
-
this.maxFileSize = 500000;
|
|
212
|
-
/**
|
|
213
|
-
* Specifies the size of the avatar.
|
|
214
|
-
* Acceptable values are: `"small"`, `"medium"`, and `"large"`.
|
|
215
|
-
* @default "large"
|
|
216
|
-
*/
|
|
217
|
-
this.size = 'large';
|
|
218
|
-
/**
|
|
219
|
-
* Emits a `SkyFileItem` object when the image is updated.
|
|
220
|
-
*/
|
|
221
|
-
this.avatarChanged = new EventEmitter();
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Indicates whether users can change the image. To select a different image,
|
|
225
|
-
* users click the image or drag another image on top of it,
|
|
226
|
-
* much like the `sky-file-drop` component in the
|
|
227
|
-
* [file attachment module](https://developer.blackbaud.com/skyux/components/file-attachments/file-attachment).
|
|
228
|
-
* @default false
|
|
229
|
-
*/
|
|
230
|
-
set canChange(value) {
|
|
231
|
-
this._canChange = value;
|
|
232
|
-
}
|
|
233
|
-
get canChange() {
|
|
234
|
-
return this._canChange;
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Specifies the name of the record that the avatar represents.
|
|
238
|
-
* If the `src` property does not specify an image, the component displays
|
|
239
|
-
* initials from the first and last words in the name. To ensure
|
|
240
|
-
* that the component extracts the correct initials, specify a name with no prefix
|
|
241
|
-
* or suffix, or just specify initials with a space between them. This property is
|
|
242
|
-
* not required, but the component requires either the `name` or `src` property.
|
|
243
|
-
*/
|
|
244
|
-
set name(value) {
|
|
245
|
-
this._name = value;
|
|
246
|
-
}
|
|
247
|
-
get name() {
|
|
248
|
-
return this._name;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Specifies an image to display to identify a record. This property is
|
|
252
|
-
* not required, but the component requires either the `name` or `src` property.
|
|
253
|
-
*/
|
|
254
|
-
set src(value) {
|
|
255
|
-
this._src = value;
|
|
256
|
-
}
|
|
257
|
-
get src() {
|
|
258
|
-
return this._src;
|
|
259
|
-
}
|
|
260
|
-
photoDrop(result) {
|
|
261
|
-
/* sanity check */
|
|
262
|
-
/* istanbul ignore else */
|
|
263
|
-
if (result.files && result.files.length > 0) {
|
|
264
|
-
this.avatarChanged.emit(result.files[0]);
|
|
265
|
-
}
|
|
266
|
-
else if (result.rejectedFiles && result.rejectedFiles.length > 0) {
|
|
267
|
-
this.handleError(result.rejectedFiles);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
handleError(rejectedFiles) {
|
|
271
|
-
const rejectedFile = rejectedFiles[0];
|
|
272
|
-
if (rejectedFile.errorType === 'maxFileSize') {
|
|
273
|
-
const title = this.getString('skyux_avatar_error_too_large_title');
|
|
274
|
-
const description = this.getString('skyux_avatar_error_too_large_description', this.maxFileSizeText());
|
|
275
|
-
this.openErrorModal(title, description);
|
|
276
|
-
}
|
|
277
|
-
else if (rejectedFile.errorType === 'fileType') {
|
|
278
|
-
const title = this.getString('skyux_avatar_error_not_image_title');
|
|
279
|
-
const description = this.getString('skyux_avatar_error_not_image_description');
|
|
280
|
-
this.openErrorModal(title, description);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
maxFileSizeText() {
|
|
284
|
-
return this.fileSizePipe.transform(this.maxFileSize);
|
|
285
|
-
}
|
|
286
|
-
openErrorModal(title, description) {
|
|
287
|
-
const config = {
|
|
288
|
-
errorTitle: title,
|
|
289
|
-
errorDescription: description,
|
|
290
|
-
errorCloseText: this.getString('skyux_avatar_errormodal_ok'),
|
|
291
|
-
};
|
|
292
|
-
this.errorService.open(config);
|
|
293
|
-
}
|
|
294
|
-
getString(key, ...args) {
|
|
295
|
-
// TODO: Need to implement the async `getString` method in a breaking change.
|
|
296
|
-
return this.resourcesService.getStringForLocale({ locale: 'en-US' }, key, ...args);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
SkyAvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarComponent, deps: [{ token: i1.SkyErrorModalService }, { token: i2$1.SkyFileSizePipe }, { token: i3$1.SkyLibResourcesService }], target: i0.ɵɵFactoryTarget.Component });
|
|
300
|
-
SkyAvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyAvatarComponent, selector: "sky-avatar", inputs: { canChange: "canChange", name: "name", src: "src", maxFileSize: "maxFileSize", size: "size" }, outputs: { avatarChanged: "avatarChanged" }, ngImport: i0, template: "<div class=\"sky-avatar\">\n <div *ngIf=\"canChange\">\n <div class=\"sky-avatar-file-drop\">\n <sky-file-drop\n [acceptedTypes]=\"'image/*'\"\n [fileUploadAriaLabel]=\"\n src\n ? ('skyux_avatar_upload_change_aria_label' | skyLibResources: name)\n : ('skyux_avatar_upload_new_aria_label' | skyLibResources: name)\n \"\n [multiple]=\"false\"\n [maxFileSize]=\"maxFileSize\"\n [multiple]=\"false\"\n (filesChanged)=\"photoDrop($event)\"\n >\n <ng-container *ngTemplateOutlet=\"innerTemplate\"></ng-container>\n </sky-file-drop>\n </div>\n </div>\n <div *ngIf=\"!canChange\">\n <ng-container *ngTemplateOutlet=\"innerTemplate\"></ng-container>\n </div>\n</div>\n\n<ng-template #innerTemplate>\n <sky-avatar-inner [name]=\"name\" [size]=\"size\" [src]=\"src\"></sky-avatar-inner>\n</ng-template>\n", styles: [".sky-avatar .sky-file-drop-col{flex-basis:initial}.sky-theme-modern .sky-file-drop:focus{outline:none}\n"], components: [{ type: i2$1.λ8, selector: "sky-file-drop", inputs: ["fileUploadAriaLabel", "linkUploadAriaLabel", "minFileSize", "maxFileSize", "multiple", "validateFn", "acceptedTypes", "noClick", "allowLinks"], outputs: ["filesChanged", "linkInputBlur", "linkChanged"] }, { type: SkyAvatarInnerComponent, selector: "sky-avatar-inner", inputs: ["src", "name", "size"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "skyLibResources": i3$1.SkyLibResourcesPipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarComponent, decorators: [{
|
|
302
|
-
type: Component,
|
|
303
|
-
args: [{
|
|
304
|
-
selector: 'sky-avatar',
|
|
305
|
-
templateUrl: './avatar.component.html',
|
|
306
|
-
styleUrls: ['./avatar.component.scss'],
|
|
307
|
-
encapsulation: ViewEncapsulation.None,
|
|
308
|
-
}]
|
|
309
|
-
}], ctorParameters: function () { return [{ type: i1.SkyErrorModalService }, { type: i2$1.SkyFileSizePipe }, { type: i3$1.SkyLibResourcesService }]; }, propDecorators: { canChange: [{
|
|
310
|
-
type: Input
|
|
311
|
-
}], name: [{
|
|
312
|
-
type: Input
|
|
313
|
-
}], src: [{
|
|
314
|
-
type: Input
|
|
315
|
-
}], maxFileSize: [{
|
|
316
|
-
type: Input
|
|
317
|
-
}], size: [{
|
|
318
|
-
type: Input
|
|
319
|
-
}], avatarChanged: [{
|
|
320
|
-
type: Output
|
|
321
|
-
}] } });
|
|
322
|
-
|
|
323
|
-
class SkyAvatarModule {
|
|
324
|
-
}
|
|
325
|
-
SkyAvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
326
|
-
SkyAvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarModule, declarations: [SkyAvatarInnerComponent, SkyAvatarComponent], imports: [CommonModule,
|
|
327
|
-
SkyAvatarResourcesModule,
|
|
328
|
-
SkyErrorModule,
|
|
329
|
-
SkyFileAttachmentsModule,
|
|
330
|
-
SkyI18nModule,
|
|
331
|
-
SkyThemeModule], exports: [SkyAvatarComponent] });
|
|
332
|
-
SkyAvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarModule, providers: [SkyFileSizePipe], imports: [[
|
|
333
|
-
CommonModule,
|
|
334
|
-
SkyAvatarResourcesModule,
|
|
335
|
-
SkyErrorModule,
|
|
336
|
-
SkyFileAttachmentsModule,
|
|
337
|
-
SkyI18nModule,
|
|
338
|
-
SkyThemeModule,
|
|
339
|
-
]] });
|
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyAvatarModule, decorators: [{
|
|
341
|
-
type: NgModule,
|
|
342
|
-
args: [{
|
|
343
|
-
declarations: [SkyAvatarInnerComponent, SkyAvatarComponent],
|
|
344
|
-
imports: [
|
|
345
|
-
CommonModule,
|
|
346
|
-
SkyAvatarResourcesModule,
|
|
347
|
-
SkyErrorModule,
|
|
348
|
-
SkyFileAttachmentsModule,
|
|
349
|
-
SkyI18nModule,
|
|
350
|
-
SkyThemeModule,
|
|
351
|
-
],
|
|
352
|
-
providers: [SkyFileSizePipe],
|
|
353
|
-
exports: [SkyAvatarComponent],
|
|
354
|
-
}]
|
|
355
|
-
}] });
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Generated bundle index. Do not edit.
|
|
359
|
-
*/
|
|
360
|
-
|
|
361
|
-
export { SkyAvatarModule, SkyAvatarComponent as λ1 };
|
|
362
|
-
//# sourceMappingURL=skyux-avatar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-avatar.js","sources":["../../../../../libs/components/avatar/src/lib/modules/shared/sky-avatar-resources.module.ts","../../../../../libs/components/avatar/src/lib/modules/avatar/avatar-adapter.service.ts","../../../../../libs/components/avatar/src/lib/modules/avatar/avatar.inner.component.ts","../../../../../libs/components/avatar/src/lib/modules/avatar/avatar.inner.component.html","../../../../../libs/components/avatar/src/lib/modules/avatar/avatar.component.ts","../../../../../libs/components/avatar/src/lib/modules/avatar/avatar.component.html","../../../../../libs/components/avatar/src/lib/modules/avatar/avatar.module.ts","../../../../../libs/components/avatar/src/skyux-avatar.ts"],"sourcesContent":["/**\n * NOTICE: DO NOT MODIFY THIS FILE!\n * The contents of this file were automatically generated by\n * the 'ng generate @skyux/i18n:lib-resources-module lib/modules/shared/sky-avatar' schematic.\n * To update this file, simply rerun the command.\n */\nimport { NgModule } from '@angular/core';\nimport {\n SKY_LIB_RESOURCES_PROVIDERS,\n SkyAppLocaleInfo,\n SkyI18nModule,\n SkyLibResources,\n SkyLibResourcesProvider,\n getLibStringForLocale,\n} from '@skyux/i18n';\n\nconst RESOURCES: { [locale: string]: SkyLibResources } = {\n 'EN-US': {\n skyux_avatar_error_not_image_description: {\n message: 'Please choose a file that is a valid image.',\n },\n skyux_avatar_error_not_image_title: { message: 'File is not an image.' },\n skyux_avatar_error_too_large_description: {\n message: 'Please choose an image that is less than {0}.',\n },\n skyux_avatar_error_too_large_title: { message: 'File is too large.' },\n skyux_avatar_errormodal_ok: { message: 'OK' },\n skyux_avatar_inner_description: { message: 'Profile picture of {0}' },\n skyux_avatar_upload_change_aria_label: {\n message:\n 'Change profile photo of {0}. Drag a file here or click to browse.',\n },\n skyux_avatar_upload_new_aria_label: {\n message: 'Add profile photo of {0}. Drag a file here or click to browse.',\n },\n },\n};\n\nexport class SkyAvatarResourcesProvider implements SkyLibResourcesProvider {\n public getString(\n localeInfo: SkyAppLocaleInfo,\n name: string\n ): string | undefined {\n return getLibStringForLocale(RESOURCES, localeInfo.locale, name);\n }\n}\n\n/**\n * Import into any component library module that needs to use resource strings.\n */\n@NgModule({\n exports: [SkyI18nModule],\n providers: [\n {\n provide: SKY_LIB_RESOURCES_PROVIDERS,\n useClass: SkyAvatarResourcesProvider,\n multi: true,\n },\n ],\n})\nexport class SkyAvatarResourcesModule {}\n","import { ElementRef, Injectable } from '@angular/core';\n\nimport { SkyAvatarSrc } from './avatar-src';\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyAvatarAdapterService {\n private blobUrl: string;\n\n public updateImage(elementRef: ElementRef, src: SkyAvatarSrc) {\n this.revokeBlobUrl();\n\n const el = elementRef.nativeElement;\n\n /*istanbul ignore else */\n if (el) {\n const imageEl = el.querySelector('.sky-avatar-image');\n\n /*istanbul ignore else */\n if (imageEl) {\n let url: string;\n\n if (src) {\n if (src instanceof File || src instanceof Blob) {\n url = this.createBlobUrl(src);\n } else {\n url = src;\n }\n }\n\n // Notice the quotes inside the `url` function. This ensures proper url escaping.\n imageEl.style.backgroundImage = url ? 'url(\"' + url + '\")' : '';\n }\n }\n }\n\n public destroy() {\n this.revokeBlobUrl();\n }\n\n private createBlobUrl(src: Blob | File) {\n const url = URL.createObjectURL(src);\n\n // Keep the last blob URL around so we can revoke it later.\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n this.blobUrl = url;\n return url;\n }\n\n private revokeBlobUrl() {\n if (this.blobUrl) {\n URL.revokeObjectURL(this.blobUrl);\n this.blobUrl = undefined;\n }\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { SkyAvatarAdapterService } from './avatar-adapter.service';\nimport { SkyAvatarSize } from './avatar-size';\nimport { SkyAvatarSrc } from './avatar-src';\n\n/**\n * @internal\n */\n@Component({\n selector: 'sky-avatar-inner',\n templateUrl: './avatar.inner.component.html',\n styleUrls: ['./avatar.inner.component.scss'],\n providers: [SkyAvatarAdapterService],\n encapsulation: ViewEncapsulation.None,\n})\nexport class SkyAvatarInnerComponent implements AfterViewInit, OnDestroy {\n public get src(): SkyAvatarSrc {\n return this._src;\n }\n\n @Input()\n public set src(value: SkyAvatarSrc) {\n this._src = value;\n this.updateImage();\n }\n\n public get name(): string {\n return this._name;\n }\n\n @Input()\n public set name(value: string) {\n this._name = value;\n }\n\n @Input()\n public size: SkyAvatarSize;\n\n private viewInitialized: boolean;\n\n private _src: SkyAvatarSrc;\n\n private _name: string;\n\n constructor(\n private elementRef: ElementRef,\n private adapter: SkyAvatarAdapterService\n ) {}\n\n public get initials(): string {\n let initials: string;\n\n if (this.name) {\n const nameSplit = this.name.split(' ');\n initials = getInitial(nameSplit[0]);\n\n if (nameSplit.length > 1) {\n initials += getInitial(nameSplit[nameSplit.length - 1]);\n }\n }\n\n return initials;\n }\n\n public get colorIndex(): number {\n const name = this.name;\n let colorIndex: number;\n\n if (name) {\n // Generate a unique-ish color based on the record name. This is deterministic\n // so that a given name will always generate the same color.\n const seed =\n name.charCodeAt(0) + name.charCodeAt(name.length - 1) + name.length;\n colorIndex = Math.abs(seed % 6);\n } else {\n colorIndex = 0;\n }\n\n return colorIndex;\n }\n\n public ngAfterViewInit() {\n this.viewInitialized = true;\n this.updateImage();\n }\n\n public ngOnDestroy() {\n this.adapter.destroy();\n }\n\n private updateImage() {\n if (this.viewInitialized) {\n this.adapter.updateImage(this.elementRef, this.src);\n }\n }\n}\n\nfunction getInitial(name: string): string {\n return name.charAt(0).toUpperCase();\n}\n","<div\n class=\"sky-elevation-1 sky-avatar-wrapper\"\n [ngClass]=\"'sky-avatar-wrapper-size-' + (size || 'large')\"\n>\n <div class=\"sky-avatar-image\" [hidden]=\"!src\"></div>\n <div *ngIf=\"src\" class=\"sky-screen-reader-only\">\n {{ 'skyux_avatar_inner_description' | skyLibResources: name }}\n </div>\n <div\n class=\"sky-avatar-initials\"\n [hidden]=\"src || !name\"\n [ngClass]=\"'sky-palette-multi-' + (colorIndex + 1)\"\n >\n <div\n *ngIf=\"size === 'small'\"\n class=\"sky-avatar-initials-inner\"\n [skyThemeClass]=\"{\n 'sky-font-body-sm': 'modern'\n }\"\n >\n {{ initials }}\n </div>\n <div\n *ngIf=\"size === 'medium'\"\n class=\"sky-avatar-initials-inner\"\n [skyThemeClass]=\"{\n 'sky-font-display-3': 'modern'\n }\"\n >\n {{ initials }}\n </div>\n <div\n *ngIf=\"size !== 'small' && size !== 'medium'\"\n class=\"sky-avatar-initials-inner\"\n [skyThemeClass]=\"{\n 'sky-font-display-2': 'modern'\n }\"\n >\n {{ initials }}\n </div>\n </div>\n</div>\n","import {\n Component,\n EventEmitter,\n Input,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ErrorModalConfig, SkyErrorModalService } from '@skyux/errors';\nimport { SkyFileDropChange, SkyFileItem, SkyFileSizePipe } from '@skyux/forms';\nimport { SkyLibResourcesService } from '@skyux/i18n';\n\nimport { SkyAvatarSize } from './avatar-size';\nimport { SkyAvatarSrc } from './avatar-src';\n\n@Component({\n selector: 'sky-avatar',\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class SkyAvatarComponent {\n /**\n * Indicates whether users can change the image. To select a different image,\n * users click the image or drag another image on top of it,\n * much like the `sky-file-drop` component in the\n * [file attachment module](https://developer.blackbaud.com/skyux/components/file-attachments/file-attachment).\n * @default false\n */\n @Input()\n public set canChange(value: boolean) {\n this._canChange = value;\n }\n\n public get canChange(): boolean {\n return this._canChange;\n }\n\n /**\n * Specifies the name of the record that the avatar represents.\n * If the `src` property does not specify an image, the component displays\n * initials from the first and last words in the name. To ensure\n * that the component extracts the correct initials, specify a name with no prefix\n * or suffix, or just specify initials with a space between them. This property is\n * not required, but the component requires either the `name` or `src` property.\n */\n @Input()\n public set name(value: string) {\n this._name = value;\n }\n\n public get name(): string {\n return this._name;\n }\n\n /**\n * Specifies an image to display to identify a record. This property is\n * not required, but the component requires either the `name` or `src` property.\n */\n @Input()\n public set src(value: SkyAvatarSrc) {\n this._src = value;\n }\n\n public get src(): SkyAvatarSrc {\n return this._src;\n }\n\n /**\n * Specifies the maximum file size for the image in bytes.\n */\n @Input()\n public maxFileSize = 500000;\n\n /**\n * Specifies the size of the avatar.\n * Acceptable values are: `\"small\"`, `\"medium\"`, and `\"large\"`.\n * @default \"large\"\n */\n @Input()\n public size: SkyAvatarSize = 'large';\n\n /**\n * Emits a `SkyFileItem` object when the image is updated.\n */\n @Output()\n public avatarChanged = new EventEmitter<SkyFileItem>();\n\n private _canChange: boolean;\n\n private _name: string;\n\n private _src: SkyAvatarSrc;\n\n constructor(\n private errorService: SkyErrorModalService,\n private fileSizePipe: SkyFileSizePipe,\n private resourcesService: SkyLibResourcesService\n ) {}\n\n public photoDrop(result: SkyFileDropChange): void {\n /* sanity check */\n /* istanbul ignore else */\n if (result.files && result.files.length > 0) {\n this.avatarChanged.emit(result.files[0]);\n } else if (result.rejectedFiles && result.rejectedFiles.length > 0) {\n this.handleError(result.rejectedFiles);\n }\n }\n\n private handleError(rejectedFiles: Array<SkyFileItem>): void {\n const rejectedFile = rejectedFiles[0];\n\n if (rejectedFile.errorType === 'maxFileSize') {\n const title = this.getString('skyux_avatar_error_too_large_title');\n const description = this.getString(\n 'skyux_avatar_error_too_large_description',\n this.maxFileSizeText()\n );\n\n this.openErrorModal(title, description);\n } else if (rejectedFile.errorType === 'fileType') {\n const title = this.getString('skyux_avatar_error_not_image_title');\n const description = this.getString(\n 'skyux_avatar_error_not_image_description'\n );\n\n this.openErrorModal(title, description);\n }\n }\n\n private maxFileSizeText(): string {\n return this.fileSizePipe.transform(this.maxFileSize);\n }\n\n private openErrorModal(title: string, description: string): void {\n const config: ErrorModalConfig = {\n errorTitle: title,\n errorDescription: description,\n errorCloseText: this.getString('skyux_avatar_errormodal_ok'),\n };\n\n this.errorService.open(config);\n }\n\n private getString(key: string, ...args: any[]): string {\n // TODO: Need to implement the async `getString` method in a breaking change.\n return this.resourcesService.getStringForLocale(\n { locale: 'en-US' },\n key,\n ...args\n );\n }\n}\n","<div class=\"sky-avatar\">\n <div *ngIf=\"canChange\">\n <div class=\"sky-avatar-file-drop\">\n <sky-file-drop\n [acceptedTypes]=\"'image/*'\"\n [fileUploadAriaLabel]=\"\n src\n ? ('skyux_avatar_upload_change_aria_label' | skyLibResources: name)\n : ('skyux_avatar_upload_new_aria_label' | skyLibResources: name)\n \"\n [multiple]=\"false\"\n [maxFileSize]=\"maxFileSize\"\n [multiple]=\"false\"\n (filesChanged)=\"photoDrop($event)\"\n >\n <ng-container *ngTemplateOutlet=\"innerTemplate\"></ng-container>\n </sky-file-drop>\n </div>\n </div>\n <div *ngIf=\"!canChange\">\n <ng-container *ngTemplateOutlet=\"innerTemplate\"></ng-container>\n </div>\n</div>\n\n<ng-template #innerTemplate>\n <sky-avatar-inner [name]=\"name\" [size]=\"size\" [src]=\"src\"></sky-avatar-inner>\n</ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SkyErrorModule } from '@skyux/errors';\nimport { SkyFileAttachmentsModule, SkyFileSizePipe } from '@skyux/forms';\nimport { SkyI18nModule } from '@skyux/i18n';\nimport { SkyThemeModule } from '@skyux/theme';\n\nimport { SkyAvatarResourcesModule } from '../shared/sky-avatar-resources.module';\n\nimport { SkyAvatarComponent } from './avatar.component';\nimport { SkyAvatarInnerComponent } from './avatar.inner.component';\n\n@NgModule({\n declarations: [SkyAvatarInnerComponent, SkyAvatarComponent],\n imports: [\n CommonModule,\n SkyAvatarResourcesModule,\n SkyErrorModule,\n SkyFileAttachmentsModule,\n SkyI18nModule,\n SkyThemeModule,\n ],\n providers: [SkyFileSizePipe],\n exports: [SkyAvatarComponent],\n})\nexport class SkyAvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */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