glib-web 4.13.0 → 4.13.1

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/action.js CHANGED
@@ -214,6 +214,7 @@ export default class Action {
214
214
  }
215
215
  if (spec.debug) {
216
216
  console.debug("fieldValue:", fieldValue);
217
+ console.debug("fieldType:", typeof fieldValue);
217
218
  }
218
219
  return fieldValue;
219
220
  }
@@ -231,6 +232,7 @@ export default class Action {
231
232
  console.debug("formData:", spec.formData);
232
233
  console.debug("fieldName:", fieldName);
233
234
  console.debug("fieldValue:", fieldValue);
235
+ console.debug("fieldType:", typeof fieldValue);
234
236
  }
235
237
 
236
238
  if (Utils.type.isNotNull(fieldName)) {
@@ -67,6 +67,7 @@ jsonLogic.add_operation("printf", printf);
67
67
 
68
68
  const log = function (value) {
69
69
  console.log("JsonLogic value", value);
70
+ console.log("JsonLogic type", typeof value);
70
71
  };
71
72
  jsonLogic.add_operation("log", log);
72
73
 
@@ -48,7 +48,7 @@ export default {
48
48
  return this.$parent.isDeleted(this.entryIndex);
49
49
  },
50
50
  removeEntry() {
51
- return this.$parent.removeGroup(this.entryIndex);
51
+ return this.$parent.removeGroupEntry(this.entryIndex);
52
52
  },
53
53
  $registryEnabled() {
54
54
  // Just so it works with `$closest()`. See `fieldName()`
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div :style="$styles()" :class="$classes()" v-if="loadIf">
3
- <div v-for="(group, groupIndex) in groupSpecs" :key="`group${groupIndex}`">
3
+ <div v-for="(group, groupIndex) in groupSpecs" :key="`group${groupIndex}`" class="fields-dynamicGroup-entry">
4
4
  <fields-internalDynamicGroupEntry :spec="entrySpec(group, groupIndex)" />
5
5
  </div>
6
6
 
@@ -138,10 +138,13 @@ export default {
138
138
 
139
139
  // Note that `properties` might contain any properties such as fileTitle/fileUrl which
140
140
  // are needed by file components.
141
- Object.assign(viewSpec, properties[name], {
142
- name: name,
143
- value: this.localFieldModels[indexedName]
144
- });
141
+ const value = this.localFieldModels[indexedName];
142
+ if (value) { // If no preexisting value, use the field's default value.
143
+ Object.assign(viewSpec, properties[name], {
144
+ name: name,
145
+ value: value
146
+ });
147
+ }
145
148
  return viewSpec;
146
149
  },
147
150
  processViews(viewSpecs, properties, groupIndex) {
@@ -163,7 +166,7 @@ export default {
163
166
  return viewSpec;
164
167
  });
165
168
  },
166
- removeGroup(index) {
169
+ removeGroupEntry(index) {
167
170
  Utils.launch.sheet.confirm(
168
171
  {},
169
172
  () => {
@@ -177,7 +180,7 @@ export default {
177
180
  return this.groupValues[index]._destroy;
178
181
  },
179
182
  // Public methods accessible via components_invoke
180
- addGroup() {
183
+ addGroupEntry() {
181
184
  this.groupValues.push([{}]);
182
185
  }
183
186
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "4.13.0",
3
+ "version": "4.13.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {