glib-web 4.0.0 → 4.1.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.
Files changed (108) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +1 -0
  3. package/action.js +1 -1
  4. package/actions/auth/restart.js +0 -0
  5. package/actions/commands/copy.js +0 -0
  6. package/actions/components/replace.js +1 -1
  7. package/actions/components/set.js +4 -4
  8. package/actions/dialogs/close.js +0 -0
  9. package/actions/dialogs/notification.js +0 -0
  10. package/actions/dialogs/oauth.js +0 -0
  11. package/actions/dialogs/open.js +1 -1
  12. package/actions/dialogs/reload.js +0 -0
  13. package/actions/dialogs/show.js +1 -1
  14. package/actions/http/delete.js +0 -0
  15. package/actions/http/patch.js +0 -0
  16. package/actions/http/post.js +0 -0
  17. package/actions/http/put.js +0 -0
  18. package/actions/runMultiple.js +0 -0
  19. package/actions/sheets/select.js +0 -0
  20. package/actions/snackbars/select.js +0 -0
  21. package/actions/windows/openWeb.js +0 -0
  22. package/actions/windows/print.js +0 -0
  23. package/app.vue +5 -4
  24. package/components/_message.vue +0 -0
  25. package/components/composable/upload.js +2 -1
  26. package/components/fields/_select.vue +1 -1
  27. package/components/fields/check.vue +5 -41
  28. package/components/fields/checkGroup.vue +41 -88
  29. package/components/fields/chipGroup.vue +0 -1
  30. package/components/fields/dynamicGroup.vue +5 -3
  31. package/components/fields/phone/countries.js +0 -0
  32. package/components/fields/phone/sprite.css +0 -0
  33. package/components/fields/phone.vue +25 -9
  34. package/components/fields/radio.vue +110 -3
  35. package/components/fields/radioGroup.vue +2 -8
  36. package/components/fields/submit.vue +8 -1
  37. package/components/h1.vue +0 -0
  38. package/components/h2.vue +0 -0
  39. package/components/h3.vue +0 -0
  40. package/components/h5.vue +0 -0
  41. package/components/h6.vue +0 -0
  42. package/components/hr.vue +0 -0
  43. package/components/html.vue +0 -0
  44. package/components/icon.vue +0 -0
  45. package/components/mixins/extension.js +0 -0
  46. package/components/mixins/longClick.js +0 -0
  47. package/components/mixins/scrolling.js +0 -0
  48. package/components/mixins/styles.js +7 -5
  49. package/components/mixins/table/export.js +0 -0
  50. package/components/mixins/table/import.js +0 -0
  51. package/components/mixins/text.js +0 -0
  52. package/components/multimedia/video.vue +0 -0
  53. package/components/panels/form.vue +17 -2
  54. package/cypress/e2e/glib-web/test_page.cy.ts +53 -0
  55. package/cypress/fixtures/example.json +5 -0
  56. package/cypress/support/commands.ts +37 -0
  57. package/cypress/support/e2e.ts +20 -0
  58. package/cypress.config.ts +9 -0
  59. package/keys.js +0 -0
  60. package/nav/dialog.vue +8 -9
  61. package/nav/layout.vue +2 -0
  62. package/package.json +5 -3
  63. package/static/plugins/alignment/alignment.js +0 -0
  64. package/static/plugins/alignment/alignment.min.js +0 -0
  65. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  66. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  67. package/static/plugins/blockcode/blockcode.js +0 -0
  68. package/static/plugins/blockcode/blockcode.min.js +0 -0
  69. package/static/plugins/clips/clips.js +0 -0
  70. package/static/plugins/clips/clips.min.js +0 -0
  71. package/static/plugins/counter/counter.js +0 -0
  72. package/static/plugins/counter/counter.min.js +0 -0
  73. package/static/plugins/definedlinks/definedlinks.js +0 -0
  74. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  75. package/static/plugins/handle/handle.js +0 -0
  76. package/static/plugins/handle/handle.min.js +0 -0
  77. package/static/plugins/icons/icons.js +0 -0
  78. package/static/plugins/icons/icons.min.js +0 -0
  79. package/static/plugins/imageposition/imageposition.js +0 -0
  80. package/static/plugins/imageposition/imageposition.min.js +0 -0
  81. package/static/plugins/inlineformat/inlineformat.js +0 -0
  82. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  83. package/static/plugins/removeformat/removeformat.js +0 -0
  84. package/static/plugins/removeformat/removeformat.min.js +0 -0
  85. package/static/plugins/selector/selector.js +0 -0
  86. package/static/plugins/selector/selector.min.js +0 -0
  87. package/static/plugins/specialchars/specialchars.js +0 -0
  88. package/static/plugins/specialchars/specialchars.min.js +0 -0
  89. package/static/plugins/textdirection/textdirection.js +0 -0
  90. package/static/plugins/textdirection/textdirection.min.js +0 -0
  91. package/static/plugins/textexpander/textexpander.js +0 -0
  92. package/static/plugins/textexpander/textexpander.min.js +0 -0
  93. package/static/plugins/underline/underline.js +0 -0
  94. package/static/plugins/underline/underline.min.js +0 -0
  95. package/static/redactorx.css +0 -0
  96. package/static/redactorx.min.css +0 -0
  97. package/static/redactorx.min.js +0 -0
  98. package/static/redactorx.usm.min.js +0 -0
  99. package/store.js +15 -5
  100. package/styles/test.sass +0 -0
  101. package/styles/test.scss +0 -0
  102. package/templates/unsupported.vue +0 -0
  103. package/utils/dom.js +0 -0
  104. package/utils/glibDirectUpload.js +7 -6
  105. package/utils/helper.js +0 -0
  106. package/utils/http.js +1 -1
  107. package/utils/launch.js +3 -3
  108. package/utils/type.js +0 -0
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -61,6 +61,7 @@ view.chipGroup styleClasses: ['custom']
61
61
  ## Prepare for publishing
62
62
 
63
63
  - Create a PR to the `master` branch
64
+ - Make sure test pass `yarn run test`
64
65
  - After approval, merge the PR.
65
66
 
66
67
  ## Publish package to npm
package/action.js CHANGED
@@ -228,7 +228,7 @@ export default class Action {
228
228
 
229
229
  if (response.header || response.body || response.footer) {
230
230
  Utils.http.forceComponentUpdate(() => {
231
- const dialog = dialogs.last();
231
+ const dialog = dialogs.value.last();
232
232
  const updateDialog = windowMode ? false : Utils.type.isObject(dialog);
233
233
  if (updateDialog) {
234
234
  dialog.updateContent(response);
File without changes
File without changes
@@ -5,7 +5,7 @@ export default class {
5
5
  execute(spec, component) {
6
6
  const target = GLib.component.findById(spec.targetId) || component;
7
7
  if (target) {
8
- Object.assign(target.spec, spec.newView);
8
+ target.action_merge(spec.newView);
9
9
  }
10
10
 
11
11
  Action.execute(spec.onReplace, target);
@@ -1,6 +1,6 @@
1
- const setFileModel = (component, value) => {
2
- component.fieldModel = component.$sanitizeValue(component.$externalizeValue(value));
3
- };
1
+ // const setFileModel = (component, value) => {
2
+ // component.fieldModel = component.$sanitizeValue(component.$externalizeValue(value));
3
+ // };
4
4
 
5
5
 
6
6
  export default class {
@@ -13,7 +13,7 @@ export default class {
13
13
 
14
14
  Utils.type.ifObject(spec.data, (data) => {
15
15
  targetComponent.action_merge(data);
16
- if (data.value) setFileModel(targetComponent, data.value);
16
+ // if (data.value) setFileModel(targetComponent, data.value);
17
17
  });
18
18
 
19
19
  GLib.action.execute(spec.onSet, targetComponent);
File without changes
File without changes
File without changes
@@ -2,7 +2,7 @@ import { dialogs } from "../../store";
2
2
 
3
3
  export default class {
4
4
  execute(spec, component) {
5
- const dialog = dialogs.last();
5
+ const dialog = dialogs.value.last();
6
6
  if (spec.updateExisting && dialog) {
7
7
  dialog.reload(spec);
8
8
 
File without changes
@@ -2,7 +2,7 @@ import { dialogs } from "../../store";
2
2
 
3
3
  export default class {
4
4
  execute(spec, component) {
5
- const dialog = dialogs.last();
5
+ const dialog = dialogs.value.last();
6
6
  if (spec.updateExisting && dialog) {
7
7
  dialog.updateContent(spec);
8
8
  return;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/app.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <v-app :class="page.styleClasses">
3
3
  <component :is="containerComponent" :spec="formSpec" :style="'height: 100%;'">
4
- <nav-layout ref="navBar" :page="page" />
4
+ <nav-layout ref="navBar" @mounted="updateMainHeight()" :page="page" />
5
5
 
6
6
  <v-progress-linear color="primary" v-if="vueApp.indicator" :indeterminate="true" height="5"
7
7
  style="position: fixed; z-index: 4">
@@ -50,6 +50,7 @@ import { watchGlibEvent } from "./store";
50
50
 
51
51
 
52
52
  export default {
53
+ expose: ['updateMainHeight'],
53
54
  setup(props) {
54
55
  const filePaster = computed(() => props.page.filePaster);
55
56
  usePasteable(filePaster);
@@ -183,9 +184,9 @@ export default {
183
184
  }
184
185
 
185
186
  // Use nextTick() to allow time for the navBar to complete initialization.
186
- this.$nextTick(() => {
187
- this.updateMainHeight();
188
- });
187
+ // this.$nextTick(() => {
188
+ // this.updateMainHeight();
189
+ // });
189
190
 
190
191
  const hash = window.location.hash.substring(1);
191
192
  if (hash) {
File without changes
@@ -54,7 +54,8 @@ function uploadOneFile({ files, key, spec, container, onAfterUploaded }) {
54
54
  directUploadUrl,
55
55
  files.value[key].progress,
56
56
  spec.storagePrefix,
57
- spec.metadata
57
+ spec.metadata,
58
+ spec.tagging
58
59
  );
59
60
 
60
61
  // track progress
@@ -49,7 +49,7 @@ export default {
49
49
  return {
50
50
  options: null,
51
51
  append: {},
52
- rules: [],
52
+ rules: this.$validation(),
53
53
  focused: false
54
54
  };
55
55
  },
@@ -6,63 +6,27 @@
6
6
  <v-checkbox :color="gcolor" v-model="fieldModel" :name="fieldName" :readonly="spec.readOnly"
7
7
  :disabled="inputDisabled" :label="fieldModel ? spec.onLabel || spec.label : spec.label" :true-icon="spec.onIcon"
8
8
  :false-icon="spec.offIcon" :value="spec.value" :true-value="spec.checkValue" :false-value="uncheckValue"
9
- hide-details @change="changed"></v-checkbox>
9
+ hide-details @change="onChange()" :rules="$validation()" :multiple="false"></v-checkbox>
10
10
  </div>
11
11
  </template>
12
12
 
13
13
  <script>
14
14
  export default {
15
+ emits: ['oncheck'],
15
16
  props: {
16
17
  spec: { type: Object, required: true }
17
18
  },
18
19
  data() {
19
20
  return {
20
- groupName: null,
21
- fieldType: null,
22
21
  uncheckValue: this.spec.uncheckValue
23
22
  };
24
23
  },
25
- computed: {
26
- fieldName() {
27
- return this.spec.name || this.spec.parentName;
28
- }
29
- },
30
24
  methods: {
31
- $ready() {
32
- this.updateData();
33
- },
34
- changed(event) {
35
- // Execute later to ensure the checkbox's checked state has been updated.
36
- setTimeout(() => {
37
- this.$type.ifObject(this.groupElement, val =>
38
- val.dispatchEvent(new Event("change"))
39
- );
40
- }, 100);
41
-
42
- // setTimeout(() => {
25
+ onChange() {
26
+ const checked = this.spec.checkValue == this.fieldModel ? true : false;
27
+ this.$emit("oncheck", { checked, value: this.spec.checkValue });
43
28
  this.$executeOnChange();
44
- // }, 500);
45
- },
46
- updateData() {
47
- this.groupElement = this.$el.closest("[data-component=checkGroup]");
48
-
49
- // this.fieldModel = this.spec.checked
50
- // ? this.spec.checkValue
51
- // : this.spec.value;
52
-
53
- Utils.type.ifArray(this.spec.styleClasses, classes => {
54
- if (classes.remove("switch")) {
55
- this.fieldType = "switch";
56
- }
57
- });
58
- // this.fieldModel = this.spec.value;
59
29
  }
60
30
  }
61
31
  };
62
32
  </script>
63
-
64
- <style scoped>
65
- .v-input--selection-controls {
66
- margin-top: 0;
67
- }
68
- </style>
@@ -1,101 +1,54 @@
1
1
  <template>
2
- <div ref="checkGroup" class="checkgroup" data-component="checkGroup" :name="spec.name">
3
- <!-- <fields-hidden v-if="!anyChecked" :spec="uncheckSpec" /> -->
4
-
5
- <div v-for="(item, index) in spec.childViews" :key="index">
6
- <glib-component :spec="childSpec(item)" />
7
- </div>
8
-
9
- <v-text-field class="checkgroup__uncheckvalue" :disabled="anyChecked" :name="spec.name" :value="spec.uncheckValue"
10
- :rules="rules" />
2
+ <div :style="$styles()" :class="$classes()">
3
+ <fields-check v-for="(childView, index) in childViews" :spec="childView" :key="index"
4
+ @oncheck="updateFieldModel"></fields-check>
5
+ <v-input ref="validator" :model-value="fieldModel" :rules="$validation()" :name="fieldName" validate-on="input"
6
+ :disabled="inputDisabled"></v-input>
7
+
8
+ <template v-if="values.length > 0">
9
+ <input type="hidden" v-for="(value, index) in values" :value="value" :key="index" :name="fieldName" />
10
+ </template>
11
+ <input v-else type="hidden" :name="fieldName" :value="null" />
11
12
  </div>
12
13
  </template>
13
14
 
14
15
  <script>
15
- // import HiddenField from "./hidden";
16
+ import { defineComponent } from "vue";
17
+ import FieldCheck from './check.vue';
16
18
 
17
- export default {
18
- // components: {
19
- // "fields-hidden": HiddenField
20
- // },
19
+ export default defineComponent({
20
+ components: {
21
+ 'fields-check': FieldCheck
22
+ },
21
23
  props: {
22
- spec: { type: Object, required: true },
24
+ spec: { type: Object, required: true }
23
25
  },
24
- data() {
25
- return {
26
- anyChecked: false,
27
- errorMessage: null,
28
- rules: [
29
- (_v) => {
30
- return this.anyChecked || this.errorMessage || true;
31
- },
32
- ],
33
- };
26
+ computed: {
27
+ values() {
28
+ return this.fieldModel || [];
29
+ },
30
+ childViews() {
31
+ return this.spec.childViews.map((childView) => {
32
+ const { readOnly, disabled } = this.spec;
33
+ const parentName = this.spec.name;
34
+ return Object.assign({}, { readOnly, disabled, parentName }, childView);
35
+ });
36
+ }
34
37
  },
35
- // computed: {
36
- // uncheckSpec() {
37
- // return { name: this.spec.name, value: this.spec.uncheckValue };
38
- // }
39
- // },
40
38
  methods: {
41
- $ready() {
42
- const validation = this.spec.validation || {};
43
-
44
- Utils.type.ifObject(validation.required, (required) => {
45
- this.errorMessage = required.message;
46
- });
47
-
48
- this.detectChecked();
49
- const vm = this;
50
- this.$el.addEventListener(
51
- "change",
52
- function (e) {
53
- vm.detectChecked();
54
- },
55
- false
56
- );
57
- },
58
- detectChecked() {
59
- this.anyChecked = false;
60
- const vm = this;
61
- this.$el
62
- .querySelectorAll("input[type=checkbox]")
63
- .forEach(function (checkbox) {
64
- if (checkbox.checked) {
65
- vm.anyChecked = true;
66
- return;
67
- }
68
- });
69
- },
70
- childSpec(item) {
71
- if (this.spec.readOnly) {
72
- return Object.assign(item, {
73
- parentName: this.spec.name,
74
- readOnly: this.spec.readOnly,
75
- onChange: this.spec.onChange,
76
- });
39
+ updateFieldModel(obj) {
40
+ let newValue = this.fieldModel || [];
41
+ const { checked, value } = obj;
42
+ if (checked) {
43
+ newValue.push(value);
44
+ } else {
45
+ newValue = newValue.filter((v) => v != value);
77
46
  }
78
47
 
79
- return Object.assign(item, { onChange: this.spec.onChange, parentName: this.spec.name });
80
- },
81
- },
82
- };
83
- </script>
84
-
85
- <style lang="scss">
86
- // Hide the uncheck field, but continue to show the validation div.
87
- .checkgroup__uncheckvalue {
88
- padding-top: 0px;
89
-
90
- .v-input__slot {
91
- display: none;
48
+ // empty array still count as has value
49
+ this.fieldModel = newValue.length <= 0 ? null : newValue;
50
+ this.$executeOnChange();
51
+ }
92
52
  }
93
-
94
- // Hide the entire component unless there is a validation message.
95
- display: none;
96
-
97
- &.error--text {
98
- display: block;
99
- }
100
- }
101
- </style>
53
+ });
54
+ </script>
@@ -13,7 +13,6 @@
13
13
  import { defineComponent } from "vue";
14
14
  import inputVariant from "../mixins/inputVariant";
15
15
  import { triggerOnInput } from "../composable/form";
16
- import { fieldModels } from "../composable/conditional";
17
16
 
18
17
  export default defineComponent({
19
18
  mixins: [inputVariant],
@@ -3,9 +3,11 @@
3
3
  <div v-for="(group, groupIndex) in groupSpecs" :key="`group${groupIndex}`">
4
4
  <input v-if="isDeleted(groupIndex)" type="hidden" :name="`${spec.name}[${groupIndex}][_destroy]`" value="1" />
5
5
  <div :style="{ display: isDeleted(groupIndex) ? 'none' : 'block' }">
6
- <v-icon class="float-left mr-2" color="error" @click="removeGroup(groupIndex)">remove_circle</v-icon>
7
- <h4 v-if="spec.titlePrefix">{{ spec.titlePrefix }}{{ group.actualIndex }}</h4>
8
- <panels-responsive :spec="group" />
6
+ <div class="group-wrapper">
7
+ <v-icon class="float-left mr-2" color="error" @click="removeGroup(groupIndex)">remove_circle</v-icon>
8
+ <h4 v-if="spec.titlePrefix">{{ spec.titlePrefix }}{{ group.actualIndex }}</h4>
9
+ <panels-responsive :spec="group" />
10
+ </div>
9
11
  </div>
10
12
  </div>
11
13
 
File without changes
File without changes
@@ -1,31 +1,47 @@
1
1
  <template>
2
2
  <div :style="$styles()" :class="$classes()">
3
- <v-phone-input :guessCountry="guessCountry" displayFormat="e164" :defaultCountry="spec.defaultCountry"
4
- :color="gcolor" v-model="fieldModel" :label="spec.label" :name="fieldName" :hint="spec.hint"
5
- :placeholder="spec.placeholder" :maxlength="spec.maxLength || 255" :readonly="spec.readOnly"
6
- :rules="$validation()" :outlined="$classes().includes('outlined')" :disabled="inputDisabled" validate-on="blur"
7
- :variant="variant" @update:modelValue="onChange()" persistent-placeholder></v-phone-input>
3
+ <v-phone-input :guessCountry="guessCountry" displayFormat="e164" :defaultCountry="defaultCountry" :color="gcolor"
4
+ v-model="fieldModel" :label="spec.label" :name="fieldName" :hint="spec.hint" :placeholder="spec.placeholder"
5
+ :maxlength="spec.maxLength || 255" :readonly="spec.readOnly" :rules="$validation()"
6
+ :outlined="$classes().includes('outlined')" :disabled="inputDisabled" validate-on="blur" :variant="variant"
7
+ @update:modelValue="onChange()" persistent-placeholder></v-phone-input>
8
8
  </div>
9
9
  </template>
10
10
 
11
11
  <script>
12
12
  import eventFiltering from "../../utils/eventFiltering";
13
13
  import inputVariant from "../mixins/inputVariant";
14
+ import countries from "moment-timezone/data/meta/latest.json";
14
15
 
15
16
  export default {
16
17
  mixins: [inputVariant],
17
18
  props: {
18
- spec: { type: Object, required: true },
19
+ spec: {
20
+ type: Object,
21
+ required: true,
22
+ },
19
23
  },
24
+
20
25
  methods: {
21
26
  onChange: eventFiltering.debounce(function () {
22
27
  this.$executeOnChange();
23
28
  }, 300),
24
29
  },
30
+
25
31
  computed: {
26
32
  guessCountry() {
27
- return !this.spec.disableAutoDetect && !this.spec.defaultCountry;
28
- }
29
- }
33
+ return !this.spec.disableAutoDetect && !this.defaultCountry;
34
+ },
35
+
36
+ defaultCountry() {
37
+ return this.spec.defaultCountry || this.getCountry;
38
+ },
39
+
40
+ getCountry() {
41
+ const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
42
+ const countriesWithTimeZone = Object.values(countries.countries).filter((country) => country.zones.includes(timeZone));
43
+ return countriesWithTimeZone.length === 1 ? countriesWithTimeZone[0].abbr : null;
44
+ },
45
+ },
30
46
  };
31
47
  </script>
@@ -1,9 +1,20 @@
1
1
  <template>
2
2
  <div :class="$classes()" :style="$styles()">
3
- <v-radio :label="spec.label" :value="spec.value.presence() || vuetifyEmptyString" :readonly="spec.readOnly"
4
- :on-icon="spec.onIcon" :off-icon="spec.offIcon" @click="$onClick()" :color="gcolor" />
3
+ <v-radio :label="spec.label" :value="(spec.value || '').presence() || vuetifyEmptyString" :readonly="spec.readOnly"
4
+ :on-icon="spec.onIcon" :off-icon="spec.offIcon" @click="$onClick()" :color="gcolor"
5
+ :class="spec.imageUrl || spec.icon ? 'custom-radio' : ''">
6
+ <template v-slot:label v-if="spec.imageUrl || spec.icon">
7
+ <div class="custom-radio-content">
8
+ <img v-if="spec.imageUrl" :src="spec.imageUrl" alt="icon" class="custom-radio-icon" />
9
+ <v-icon v-if="spec.icon" class="aligner" :color="spec.iconColor" :size="spec.iconSize">
10
+ {{ spec.icon }}
11
+ </v-icon>
12
+ <div class="custom-radio-label">{{ spec.label }}</div>
13
+ </div>
14
+ </template>
15
+ </v-radio>
5
16
  <div v-if="spec.childViews" class="radio-childviews">
6
- <div v-for="(item, i) in spec.childViews" :key="i">
17
+ <div v-for="( item, i ) in spec.childViews " :key="i">
7
18
  <glib-component :spec="item" />
8
19
  </div>
9
20
  </div>
@@ -18,3 +29,99 @@ export default {
18
29
  }
19
30
  };
20
31
  </script>
32
+
33
+ <style scoped>
34
+ .custom-radio {
35
+ /* styles for custom-radio class */
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ width: 240px;
40
+ height: 254px;
41
+ transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
42
+ text-align: center;
43
+ cursor: pointer;
44
+ padding: 16px;
45
+ position: relative;
46
+ border: 1px solid #E6E6E6;
47
+ border-radius: 24px;
48
+ }
49
+
50
+ .custom-radio:hover {
51
+ border: 2px solid;
52
+ border-radius: 24px;
53
+ border-color: #0A2A9E;
54
+ }
55
+
56
+ .custom-radio:hover .custom-radio-label {
57
+ font-size: 22px;
58
+ color: #0A2A9E;
59
+ }
60
+
61
+ .custom-radio .custom-radio-content {
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ justify-content: center;
66
+ width: 100%;
67
+ height: 100%;
68
+ margin-right: 30px;
69
+ }
70
+
71
+ .custom-radio .custom-radio-icon {
72
+ width: 80px;
73
+ height: 80px;
74
+ margin-bottom: 8px;
75
+ }
76
+
77
+ .custom-radio .custom-radio-label {
78
+ font-size: 22px;
79
+ color: inherit;
80
+ margin-top: 16px;
81
+ }
82
+
83
+ .custom-radio ::v-deep .v-selection-control__input {
84
+ width: 240px;
85
+ height: 254px;
86
+ background-color: transparent;
87
+ left: 50%;
88
+
89
+ >.v-icon {
90
+ opacity: 0;
91
+ }
92
+
93
+ }
94
+
95
+ .custom-radio ::v-deep .v-selection-control__input::before {
96
+ background-color: transparent
97
+ }
98
+
99
+ .custom-radio ::v-deep .v-ripple__container {
100
+ display: none;
101
+ }
102
+
103
+
104
+ .custom-radio .v-ripple__container {
105
+ display: none;
106
+ }
107
+
108
+ .radio--active .custom-radio {
109
+ border: 2px solid;
110
+ border-radius: 24px;
111
+ border-color: #0A2A9E;
112
+ }
113
+
114
+ .radio--active .custom-radio-label {
115
+ color: #0A2A9E;
116
+ font-weight: 700;
117
+ font-size: 22px;
118
+ }
119
+
120
+ .radio--active .v-icon {
121
+ color: #0A2A9E;
122
+ }
123
+
124
+ .radio-childviews {
125
+ margin-top: 16px;
126
+ }
127
+ </style>
@@ -4,12 +4,11 @@
4
4
  validation error on page load.
5
5
  -->
6
6
  <v-radio-group v-model="fieldModel" :name="fieldName" :readonly="spec.readOnly" :disabled="inputDisabled"
7
- :rules="$validation()" :row="spec.row" validate-on="blur" @change="onChange" :class="$classes()" :style="$styles()">
7
+ :rules="$validation()" :inline="spec.row" validate-on="blur" @change="$executeOnChange()" :class="$classes()"
8
+ :style="$styles()">
8
9
  <div v-for="(childView, index) in spec.childViews" :key="index" style="width: 100%;">
9
10
  <glib-component :spec="childSpec(childView)" />
10
11
  </div>
11
-
12
- <!-- <input v-if="spec.readOnly" type="hidden" :name="fieldName" :value="fieldModel" /> -->
13
12
  </v-radio-group>
14
13
  </template>
15
14
 
@@ -19,11 +18,6 @@ export default {
19
18
  spec: { type: Object, required: true },
20
19
  },
21
20
  methods: {
22
- onChange() {
23
- setTimeout(() => {
24
- this.$executeOnChange();
25
- }, 500);
26
- },
27
21
  updateValue(variable) {
28
22
  if (variable.value) {
29
23
  this.fieldModel = variable.value;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <common-button :spec="spec" type="submit" :disabled="spec.disabled || $isBusy" />
2
+ <common-button :spec="spec" type="submit" :disabled="disabled" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -9,11 +9,18 @@ export default {
9
9
  props: {
10
10
  spec: { type: Object, required: true }
11
11
  },
12
+ inject: ['formCtx'],
12
13
  data: function () {
13
14
  return {
14
15
  data: this.$data
15
16
  };
16
17
  },
18
+ computed: {
19
+ disabled() {
20
+ const disableIfFormInvalid = this.spec.disableIfFormInvalid && this.formCtx.form && !this.formCtx.form.isValid;
21
+ return disableIfFormInvalid || this.spec.disabled || this.$isBusy;
22
+ }
23
+ },
17
24
  methods: {
18
25
  $mounted() {
19
26
  nextTick(() => this.$dispatchEvent("forms/addSubmit", this.$data));
package/components/h1.vue CHANGED
File without changes
package/components/h2.vue CHANGED
File without changes
package/components/h3.vue CHANGED
File without changes
package/components/h5.vue CHANGED
File without changes
package/components/h6.vue CHANGED
File without changes
package/components/hr.vue CHANGED
File without changes
File without changes
File without changes