@tugitark/vue-widget 1.1.1 → 1.2.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/index.js +7 -8
- package/index.md +3 -2
- package/package.json +5 -2
package/index.js
CHANGED
|
@@ -49,23 +49,22 @@ export default {
|
|
|
49
49
|
methods: {
|
|
50
50
|
onNotification_(hasNotification) {
|
|
51
51
|
if (this.jwtFn == null && this.user == null) {
|
|
52
|
-
if (this.firstTime_) {
|
|
52
|
+
if (!this.firstTime_) {
|
|
53
53
|
// Replicate FAQ internal behaviour at a per-component level.
|
|
54
|
-
|
|
54
|
+
return;
|
|
55
55
|
}
|
|
56
|
-
} else {
|
|
57
|
-
this.onNotification?.(hasNotification);
|
|
58
56
|
}
|
|
57
|
+
this.onNotification && this.onNotification(hasNotification);
|
|
59
58
|
},
|
|
60
59
|
onReady_() {
|
|
61
60
|
if (this.firstTime_) {
|
|
62
61
|
this.firstTime_ = false;
|
|
63
|
-
this.onReady
|
|
62
|
+
this.onReady && this.onReady();
|
|
64
63
|
}
|
|
65
64
|
},
|
|
66
|
-
onOpened_() {
|
|
67
|
-
onClosed_() {
|
|
68
|
-
onError_(e) {
|
|
65
|
+
onOpened_() { this.onOpened && this.onOpened(); },
|
|
66
|
+
onClosed_() { this.onClosed && this.onClosed(); },
|
|
67
|
+
onError_(e) { this.onError && this.onError(e); },
|
|
69
68
|
},
|
|
70
69
|
watc() {
|
|
71
70
|
return render(this.props_);
|
package/index.md
CHANGED
|
@@ -158,7 +158,7 @@ The following optional properties are shared with the full version:
|
|
|
158
158
|
Notes
|
|
159
159
|
-------
|
|
160
160
|
|
|
161
|
-
While there can be only one widget on the page there can be multiple `<TugiWidget>` components at once. Which one will be used is non-deterministic - even if you have one `<TugiWidget>` with
|
|
161
|
+
While there can be only one widget on the page there can be multiple `<TugiWidget>` components at once. Which one will be used is non-deterministic - even if you have one `<TugiWidget>` with `:visible="true"` and another one with `:visible="false"` this will not guarantee that the visible one is the one that gets shown, the invisible one may be "shown", resulting in neither being seen. The one selected is based on internal render and update orders. Further, having two at once may result in the widget being constantly unloaded and reloaded even when nothing has changed as the underlying code flips repeatedly between them. If you have two versions of the widget shown in different circumstances then make sure that the whole component is conditional:
|
|
162
162
|
|
|
163
163
|
|
|
164
164
|
```javascript
|
|
@@ -190,6 +190,7 @@ While there can be only one widget on the page there can be multiple `<TugiWidge
|
|
|
190
190
|
homePageBackgroundColor: 'hsla(36, 100%, 37%, 0.2)',
|
|
191
191
|
homePageTextColor: '#2c3e50',
|
|
192
192
|
}"
|
|
193
|
-
|
|
193
|
+
/>
|
|
194
|
+
</template>
|
|
194
195
|
```
|
|
195
196
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tugitark/vue-widget",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Wraps the tugitark widget in a Vue component.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"release": "npm publish --access public"
|
|
7
|
+
},
|
|
5
8
|
"files": [
|
|
6
9
|
"index.js",
|
|
7
10
|
"index.md"
|
|
8
11
|
],
|
|
9
12
|
"dependencies": {
|
|
10
|
-
"@tugitark/declarative-widget": "^1.0.
|
|
13
|
+
"@tugitark/declarative-widget": "^1.0.2"
|
|
11
14
|
},
|
|
12
15
|
"peerDependencies": {
|
|
13
16
|
"vue": ">=0.0.0"
|