@ucd-lib/theme-elements 1.0.1 → 1.0.2
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.
|
@@ -8,7 +8,7 @@ import {TaskController} from '../../utils/controllers/task.js';
|
|
|
8
8
|
* @property {String} email - Email to reference person
|
|
9
9
|
* @property {String} domain - Specify the domain to choose from
|
|
10
10
|
*
|
|
11
|
-
* <ucdlib-author-profile domain="sandbox" email='sabaggett@ucdavis.edu></ucdlib-author-profile>
|
|
11
|
+
* <ucdlib-theme-author-profile domain="sandbox" email='sabaggett@ucdavis.edu></ucdlib-theme-author-profile>
|
|
12
12
|
*/
|
|
13
13
|
export default class UcdlibAuthorProfile extends LitElement {
|
|
14
14
|
static get properties() {
|
|
@@ -73,21 +73,19 @@ export default class UcdlibAuthorProfile extends LitElement {
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
-
* @method
|
|
76
|
+
* @method updated
|
|
77
77
|
*
|
|
78
|
-
* @description
|
|
78
|
+
* @description request user data when email or domain changes
|
|
79
79
|
*
|
|
80
|
-
* @param {Object}
|
|
80
|
+
* @param {Object} props
|
|
81
81
|
*
|
|
82
82
|
*/
|
|
83
|
-
|
|
84
|
-
if(
|
|
83
|
+
updated(props){
|
|
84
|
+
if( props.has('email') || props.has('domain') ){
|
|
85
|
+
if( !this.email ) return;
|
|
85
86
|
this.eController = new TaskController(this, this._requestUrl());
|
|
86
|
-
|
|
87
|
-
this.requestUpdate();
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
|
-
|
|
91
89
|
|
|
92
90
|
/**
|
|
93
91
|
* @method validationLink
|
|
@@ -219,4 +217,4 @@ export default class UcdlibAuthorProfile extends LitElement {
|
|
|
219
217
|
|
|
220
218
|
}
|
|
221
219
|
|
|
222
|
-
customElements.define('ucdlib-author-profile', UcdlibAuthorProfile);
|
|
220
|
+
customElements.define('ucdlib-theme-author-profile', UcdlibAuthorProfile);
|