glib-web 2.6.9 → 2.6.11

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>
@@ -1,25 +1,10 @@
1
1
  <template>
2
- <component
3
- :is="componentName"
4
- :class="cssClasses"
5
- :style="$styles()"
6
- :href="$href()"
7
- @click="$onClick()"
8
- v-on="eventHandlers"
9
- >
10
- <v-row no-gutters class="full-height">
2
+ <component :is="componentName" :class="cssClasses" :style="$styles()" :href="$href()" @click="$onClick()"
3
+ v-on="eventHandlers">
4
+ <v-row no-gutters>
11
5
  <template v-for="(item, index) in spec.childViews">
12
- <glib-component
13
- v-if="isColumn(item)"
14
- :key="viewKey(item, index)"
15
- :spec="item"
16
- />
17
- <div
18
- v-else
19
- :key="viewKey(item, index)"
20
- class="full-width"
21
- :style="innerStyles"
22
- >
6
+ <glib-component v-if="isColumn(item)" :key="viewKey(item, index)" :spec="item" />
7
+ <div v-else :key="viewKey(item, index)" class="full-width" :style="innerStyles">
23
8
  <glib-component :spec="item" />
24
9
  </div>
25
10
  </template>
@@ -80,16 +65,19 @@ export default {
80
65
  margin-left: 0;
81
66
  margin-right: 0;
82
67
  }
68
+
83
69
  .full-width {
84
70
  width: 100%;
85
71
  flex: 0 0 100%;
86
72
  display: flex;
87
73
  flex-direction: column;
88
74
  }
75
+
89
76
  // Needed to ensure that split's sub panels have the same height
90
77
  .full-height {
91
78
  height: 100%;
92
79
  }
80
+
93
81
  a.panels-responsive {
94
82
  color: inherit;
95
83
  text-decoration: inherit;
@@ -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
  };
@@ -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>
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.9",
3
+ "version": "2.6.11",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {