glib-web 2.6.8 → 2.6.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.
@@ -11,7 +11,10 @@
11
11
  @click="$onClick()"
12
12
  v-on="on"
13
13
  >
14
- {{ spec.text }}
14
+ <div v-if="spec.icon" class="icon-wrapper">
15
+ <common-icon :spec="spec.icon" />
16
+ </div>
17
+ <div>{{ spec.text }}</div>
15
18
  </v-chip>
16
19
  <v-chip
17
20
  v-else
@@ -20,7 +23,13 @@
20
23
  :small="$classes().includes('small')"
21
24
  v-on="on"
22
25
  >
23
- {{ spec.text }}
26
+ <!-- <span v-if="spec.icon" class="icon-wrapper"
27
+ ><common-icon :spec="spec.icon"
28
+ /></span> -->
29
+ <div v-if="spec.icon" class="icon-wrapper">
30
+ <common-icon :spec="spec.icon" />
31
+ </div>
32
+ <div>{{ spec.text }}</div>
24
33
  </v-chip>
25
34
  </common-badge>
26
35
  </template>
@@ -53,4 +62,8 @@ export default {
53
62
  .v-chip:not(.v-chip--clickable).theme--light:hover:before {
54
63
  opacity: 0;
55
64
  }
65
+ .icon-wrapper {
66
+ display: flex;
67
+ padding-right: 2px;
68
+ }
56
69
  </style>
@@ -30,6 +30,31 @@ export default {
30
30
  },
31
31
  methods: {
32
32
  $ready() {
33
+ this.updateData()
34
+ },
35
+ changed(event) {
36
+ // Execute later to ensure the checkbox's checked state has been updated.
37
+ setTimeout(() => {
38
+ this.$type.ifObject(this.groupElement, val =>
39
+ val.dispatchEvent(new Event("change"))
40
+ );
41
+ }, 100);
42
+
43
+ // setTimeout(() => {
44
+ this.$executeOnChange();
45
+ // }, 500);
46
+ },
47
+ $internalizeValue(val) {
48
+ if (val == this.spec.checkValue) {
49
+ return val;
50
+ }
51
+ return this.spec.uncheckValue;
52
+ },
53
+ action_merge(mergedSpec) {
54
+ Object.assign(this.spec, mergedSpec);
55
+ this.updateData()
56
+ },
57
+ updateData() {
33
58
  this.groupElement = this.$el.closest("[data-component=checkGroup]");
34
59
 
35
60
  let groupName = null;
@@ -49,24 +74,7 @@ export default {
49
74
  this.fieldType = "switch";
50
75
  }
51
76
  });
52
- },
53
- changed(event) {
54
- // Execute later to ensure the checkbox's checked state has been updated.
55
- setTimeout(() => {
56
- this.$type.ifObject(this.groupElement, val =>
57
- val.dispatchEvent(new Event("change"))
58
- );
59
- }, 100);
60
-
61
- // setTimeout(() => {
62
- this.$executeOnChange();
63
- // }, 500);
64
- },
65
- $internalizeValue(val) {
66
- if (val == this.spec.checkValue) {
67
- return val;
68
- }
69
- return this.spec.uncheckValue;
77
+ // this.fieldModel = this.spec.value;
70
78
  }
71
79
  }
72
80
  };
@@ -10,8 +10,13 @@
10
10
  <script>
11
11
  export default {
12
12
  props: {
13
- spec: { type: Object, required: true }
14
- }
13
+ spec: { type: Object, required: true },
14
+ },
15
+ methods: {
16
+ $ready() {
17
+ this.fieldModel = this.spec.value;
18
+ },
19
+ },
15
20
  };
16
21
  </script>
17
22
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <common-button :spec="spec" type="submit" :disabled="$isBusy" />
2
+ <common-button :spec="spec" type="submit" :disabled="spec.disabled || $isBusy" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -15,7 +15,10 @@ export default {
15
15
  methods: {
16
16
  $ready() {
17
17
  this.$dispatchEvent("forms/addSubmit", this.$data);
18
- }
18
+ },
19
+ action_merge(mergedSpec) {
20
+ Object.assign(this.spec, mergedSpec);
21
+ },
19
22
  }
20
23
  };
21
24
  </script>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <!-- Use `display: contents` so this div doesn't intefere with the child's sizing behaviour. -->
3
- <div style="display: contents;">
3
+ <div style="display: contents">
4
4
  <!-- <common-responsive v-if="!hoverViewsSpec" :spec="spec" /> -->
5
5
  <v-menu
6
6
  v-if="hoverViewsSpec"
@@ -19,9 +19,12 @@
19
19
  <common-responsive :spec="hoverViewsSpec" />
20
20
  </v-card>
21
21
  </v-menu>
22
- <common-tooltip v-else :spec="spec">
22
+ <common-tooltip v-else :spec="Object.assign({}, spec, { id: undefined })">
23
23
  <template v-slot:activator="{ on }">
24
- <common-responsive :spec="spec" :event-handlers="on" />
24
+ <common-responsive
25
+ :spec="Object.assign({}, spec, { id: undefined })"
26
+ :event-handlers="on"
27
+ />
25
28
  </template>
26
29
  </common-tooltip>
27
30
  </div>
@@ -33,14 +36,14 @@ export default {
33
36
  spec: {
34
37
  type: Object,
35
38
  required: true,
36
- default: function() {
39
+ default: function () {
37
40
  return {};
38
- }
39
- }
41
+ },
42
+ },
40
43
  },
41
44
  data() {
42
45
  return {
43
- hoverViewsSpec: null
46
+ hoverViewsSpec: null,
44
47
  };
45
48
  },
46
49
  methods: {
@@ -48,11 +51,11 @@ export default {
48
51
  this.hoverViewsSpec = this.spec.hoverViews
49
52
  ? {
50
53
  childViews: this.spec.hoverViews,
51
- align: this.spec.align
54
+ align: this.spec.align,
52
55
  }
53
56
  : null;
54
- }
55
- }
57
+ },
58
+ },
56
59
  };
57
60
  </script>
58
61
 
package/nav/dialog.vue CHANGED
@@ -178,6 +178,8 @@ export default {
178
178
  this.body = response.body;
179
179
  this.footer = response.footer;
180
180
  this.showClose = this.spec.showClose || false;
181
+
182
+ Action.execute(response.onLoad, this);
181
183
  });
182
184
  });
183
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "2.6.8",
3
+ "version": "2.6.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/utils/settings.js CHANGED
File without changes