glib-web 0.14.4 → 0.15.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/LICENSE CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/app.vue CHANGED
@@ -1,38 +1,40 @@
1
1
  <template>
2
2
  <v-app :class="page.styleClasses">
3
- <nav-appbar :page="page" />
4
-
5
- <v-progress-linear
6
- v-if="$root.vueApp.indicator"
7
- :indeterminate="true"
8
- height="5"
9
- style="position: fixed; z-index: 4;"
10
- >
11
- </v-progress-linear>
12
-
13
- <div class="pages-header">
14
- <layouts-content
15
- :template="page.template"
16
- :spec="header"
17
- :full-height="false"
18
- />
19
- </div>
20
-
21
- <div id="page_body" class="pages-body body-wrapper">
22
- <layouts-content
23
- :template="page.template"
24
- :spec="body"
25
- :full-height="true"
26
- />
27
- </div>
28
-
29
- <div class="pages-footer">
30
- <layouts-content
31
- :template="page.template"
32
- :spec="footer"
33
- :full-height="false"
34
- />
35
- </div>
3
+ <component :is="containerComponent" :spec="formSpec">
4
+ <nav-appbar :page="page" />
5
+
6
+ <v-progress-linear
7
+ v-if="$root.vueApp.indicator"
8
+ :indeterminate="true"
9
+ height="5"
10
+ style="position: fixed; z-index: 4;"
11
+ >
12
+ </v-progress-linear>
13
+
14
+ <div class="pages-header">
15
+ <layouts-content
16
+ :template="page.template"
17
+ :spec="header"
18
+ :full-height="false"
19
+ />
20
+ </div>
21
+
22
+ <div id="page_body" class="pages-body body-wrapper">
23
+ <layouts-content
24
+ :template="page.template"
25
+ :spec="body"
26
+ :full-height="true"
27
+ />
28
+ </div>
29
+
30
+ <div class="pages-footer">
31
+ <layouts-content
32
+ :template="page.template"
33
+ :spec="footer"
34
+ :full-height="false"
35
+ />
36
+ </div>
37
+ </component>
36
38
  </v-app>
37
39
  </template>
38
40
 
@@ -42,11 +44,13 @@ import Utils from "./utils/helper";
42
44
  import ContentLayout from "./nav/content";
43
45
  import phoenixSocketMixin from "./components/mixins/ws/phoenixSocket.js";
44
46
  import actionCableMixin from "./components/mixins/ws/actionCable.js";
47
+ import FormPanel from "./components/panels/form";
45
48
 
46
49
  export default {
47
50
  components: {
48
51
  "nav-appbar": NavAppBar,
49
- "layouts-content": ContentLayout
52
+ "layouts-content": ContentLayout,
53
+ "panels-form": FormPanel
50
54
  },
51
55
  mixins: [phoenixSocketMixin, actionCableMixin],
52
56
  props: {
@@ -54,7 +58,8 @@ export default {
54
58
  },
55
59
  data() {
56
60
  return {
57
- title: "..."
61
+ title: "...",
62
+ formSpec: null
58
63
  };
59
64
  },
60
65
  computed: {
@@ -66,6 +71,12 @@ export default {
66
71
  },
67
72
  footer() {
68
73
  return this.page.footer || {};
74
+ },
75
+ containerComponent() {
76
+ if (this.formSpec) {
77
+ return "panels-form";
78
+ }
79
+ return "div";
69
80
  }
70
81
  },
71
82
  watch: {
@@ -84,6 +95,7 @@ export default {
84
95
  methods: {
85
96
  $ready: function() {
86
97
  document.title = this.page.title;
98
+ this.formSpec = this.page.fullPageForm;
87
99
 
88
100
  this.$wsInitPhoenixSocket(this.page.phoenixSocket);
89
101
  this.$wsInitActionCable(this.page.actionCable);
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
File without changes
package/components/hr.vue CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/components/p.vue CHANGED
File without changes
@@ -1,11 +1,25 @@
1
1
  <template>
2
- <v-form ref="form" :style="parentStyles" :action="url" :method="spec.method" :data-local="spec.local"
3
- @submit="onSubmit">
2
+ <v-form
3
+ ref="form"
4
+ :style="parentStyles"
5
+ :action="url"
6
+ :method="spec.method"
7
+ :data-local="spec.local"
8
+ @submit="onSubmit"
9
+ >
4
10
  <template v-for="(value, key, index) in params">
5
- <input :key="`hidden_${index}`" type="hidden" :name="key" :value="value" />
11
+ <input
12
+ :key="`hidden_${index}`"
13
+ type="hidden"
14
+ :name="key"
15
+ :value="value"
16
+ />
6
17
  </template>
7
18
 
8
19
  <panels-responsive :spec="modifiedSpec" />
20
+
21
+ <!-- Used by app.vue -->
22
+ <slot />
9
23
  </v-form>
10
24
  </template>
11
25
 
@@ -25,19 +39,20 @@ export default {
25
39
  modifiedSpec: {}
26
40
  }),
27
41
  watch: {
28
- $isBusy: function (val, oldVal) {
42
+ $isBusy: function(val, oldVal) {
29
43
  for (const button of this.submitButtons) {
30
44
  button._isBusy = val;
31
45
  }
32
46
  }
33
47
  },
48
+ // TODO: Move back to ready after implementing panels_logic
34
49
  mounted() {
35
50
  this.$onEvent("forms/directSubmit", e => {
36
51
  this.directSubmit();
37
52
  });
38
53
  },
39
54
  methods: {
40
- $ready: function () {
55
+ $ready: function() {
41
56
  this.$onEvent("forms/addSubmit", e => {
42
57
  this.submitButtons.push(e.data);
43
58
  });
package/keys.js CHANGED
File without changes
package/nav/dialog.vue CHANGED
@@ -14,12 +14,12 @@
14
14
  </v-btn>
15
15
  </v-card-title>
16
16
 
17
- <div>
17
+ <component :is="containerComponent" :spec="formSpec">
18
18
  <div v-if="message" class="dialog-message">
19
19
  <common-message :spec="{ message: message }" />
20
20
  </div>
21
21
  <panels-responsive v-if="body" :spec="body" />
22
- </div>
22
+ </component>
23
23
 
24
24
  <v-divider></v-divider>
25
25
 
@@ -45,8 +45,12 @@
45
45
  <script>
46
46
  import Http from "../utils/http";
47
47
  import Action from "../action";
48
+ import FormPanel from "../components/panels/form";
48
49
 
49
50
  export default {
51
+ components: {
52
+ "panels-form": FormPanel
53
+ },
50
54
  props: {
51
55
  spec: { type: Object, required: true }, // Original spec. It might be different from the latest spec (after reloading).
52
56
  stack: { type: Array, required: true },
@@ -63,9 +67,18 @@ export default {
63
67
  urlLoaded: false,
64
68
  showClose: false,
65
69
  isFormDirty: false,
66
- isFormSubmitted: false
70
+ isFormSubmitted: false,
71
+ formSpec: null
67
72
  };
68
73
  },
74
+ computed: {
75
+ containerComponent() {
76
+ if (this.formSpec) {
77
+ return "panels-form";
78
+ }
79
+ return "div";
80
+ }
81
+ },
69
82
  watch: {
70
83
  model: function(val, oldVal) {
71
84
  if (!val) {
@@ -117,6 +130,7 @@ export default {
117
130
  this.urlLoaded = true;
118
131
  this.title = response.title;
119
132
  this.message = "";
133
+ this.formSpec = response.fullPageForm;
120
134
  this.body = response.body;
121
135
  this.footer = response.footer;
122
136
  this.showClose = this.spec.showClose || false;
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "0.14.4",
3
+ "version": "0.15.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
File without changes
package/styles/test.sass CHANGED
File without changes
package/styles/test.scss CHANGED
File without changes
File without changes
package/utils/dom.js CHANGED
File without changes
package/utils/public.js CHANGED
File without changes
package/utils/settings.js CHANGED
File without changes
package/utils/storage.js CHANGED
File without changes
package/utils/url.js CHANGED
File without changes