@leavittsoftware/web 4.23.0 → 4.24.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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon';
|
|
1
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
3
|
/**
|
|
3
4
|
* Displays a Leavitt Group users profile picture
|
|
@@ -19,6 +20,10 @@ export declare class ProfilePicture extends LitElement {
|
|
|
19
20
|
* Shows a colored ring around the picture
|
|
20
21
|
*/
|
|
21
22
|
accessor showRing: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Shows a test user indicator at the bottom of the picture
|
|
25
|
+
*/
|
|
26
|
+
accessor showTestUserIndicator: boolean;
|
|
22
27
|
/**
|
|
23
28
|
* Makes the image a link to the respective profile page
|
|
24
29
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon';
|
|
2
3
|
import { isDevelopment } from '../../titanium/helpers/helpers';
|
|
3
|
-
import { css, html, LitElement } from 'lit';
|
|
4
|
+
import { css, html, LitElement, nothing } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
6
|
/**
|
|
6
7
|
* Displays a Leavitt Group users profile picture
|
|
@@ -27,6 +28,12 @@ let ProfilePicture = class ProfilePicture extends LitElement {
|
|
|
27
28
|
*/
|
|
28
29
|
get showRing() { return this.#showRing_accessor_storage; }
|
|
29
30
|
set showRing(value) { this.#showRing_accessor_storage = value; }
|
|
31
|
+
#showTestUserIndicator_accessor_storage;
|
|
32
|
+
/**
|
|
33
|
+
* Shows a test user indicator at the bottom of the picture
|
|
34
|
+
*/
|
|
35
|
+
get showTestUserIndicator() { return this.#showTestUserIndicator_accessor_storage; }
|
|
36
|
+
set showTestUserIndicator(value) { this.#showTestUserIndicator_accessor_storage = value; }
|
|
30
37
|
#profilePictureLinkPersonId_accessor_storage;
|
|
31
38
|
/**
|
|
32
39
|
* Makes the image a link to the respective profile page
|
|
@@ -87,6 +94,15 @@ let ProfilePicture = class ProfilePicture extends LitElement {
|
|
|
87
94
|
image-rendering: -webkit-optimize-contrast;
|
|
88
95
|
}
|
|
89
96
|
|
|
97
|
+
md-icon {
|
|
98
|
+
position: absolute;
|
|
99
|
+
bottom: -2px;
|
|
100
|
+
right: -2px;
|
|
101
|
+
color: var(--md-sys-color-on-primary);
|
|
102
|
+
background-color: var(--md-sys-color-primary);
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
}
|
|
105
|
+
|
|
90
106
|
:host([shape='circle']) a:after,
|
|
91
107
|
:host([shape='circle']) img {
|
|
92
108
|
border-radius: 50%;
|
|
@@ -148,6 +164,11 @@ let ProfilePicture = class ProfilePicture extends LitElement {
|
|
|
148
164
|
}
|
|
149
165
|
}}
|
|
150
166
|
/>
|
|
167
|
+
${this.showTestUserIndicator
|
|
168
|
+
? html `<md-icon part="test-user-indicator" style="--md-icon-size: calc(${this.size}px * 0.35);padding: calc(${this.size}px * 0.05)" title="Test user"
|
|
169
|
+
>bug_report</md-icon
|
|
170
|
+
>`
|
|
171
|
+
: nothing}
|
|
151
172
|
`;
|
|
152
173
|
}
|
|
153
174
|
render() {
|
|
@@ -168,6 +189,9 @@ __decorate([
|
|
|
168
189
|
__decorate([
|
|
169
190
|
property({ reflect: true, type: Boolean, attribute: 'show-ring' })
|
|
170
191
|
], ProfilePicture.prototype, "showRing", null);
|
|
192
|
+
__decorate([
|
|
193
|
+
property({ reflect: true, type: Boolean, attribute: 'show-test-user-indicator' })
|
|
194
|
+
], ProfilePicture.prototype, "showTestUserIndicator", null);
|
|
171
195
|
__decorate([
|
|
172
196
|
property({ reflect: true, type: Number, attribute: 'profile-picture-link-person-id' })
|
|
173
197
|
], ProfilePicture.prototype, "profilePictureLinkPersonId", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-picture.js","sourceRoot":"","sources":["profile-picture.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AAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gCAAgC,EAAE,CAAC;gEAAoD;AAKtG;IAApC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAA6B;AAKlB;IAArC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2DAAiD;AAlClE,cAAc;IAD1B,aAAa,CAAC,iBAAiB,CAAC;GACpB,cAAc,CAyK1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0861464466f377dada07fd14fc6a1a9e7a8a33f5"
|
|
44
44
|
}
|