glib-web 0.5.77

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 (204) hide show
  1. package/.eslintrc.js +37 -0
  2. package/LICENSE +201 -0
  3. package/README.md +33 -0
  4. package/action.js +167 -0
  5. package/actions/analytics/logEvent.js +26 -0
  6. package/actions/auth/creditCard.js +29 -0
  7. package/actions/auth/restart.js +5 -0
  8. package/actions/auth/saveCsrfToken.js +12 -0
  9. package/actions/cables/push.js +38 -0
  10. package/actions/dialogs/alert.js +15 -0
  11. package/actions/dialogs/close.js +7 -0
  12. package/actions/dialogs/notification.js +14 -0
  13. package/actions/dialogs/oauth.js +6 -0
  14. package/actions/dialogs/open.js +7 -0
  15. package/actions/dialogs/options.js +5 -0
  16. package/actions/dialogs/show.js +5 -0
  17. package/actions/forms/submit.js +15 -0
  18. package/actions/http/delete.js +7 -0
  19. package/actions/http/patch.js +7 -0
  20. package/actions/http/post.js +7 -0
  21. package/actions/http/put.js +7 -0
  22. package/actions/panels/scrollTo.js +18 -0
  23. package/actions/panels/scrollToBottom.js +11 -0
  24. package/actions/runMultiple.js +11 -0
  25. package/actions/sheets/select.js +5 -0
  26. package/actions/snackbars/alert.js +15 -0
  27. package/actions/snackbars/select.js +5 -0
  28. package/actions/timeouts/set.js +20 -0
  29. package/actions/windows/close.js +13 -0
  30. package/actions/windows/closeAll.js +16 -0
  31. package/actions/windows/closeWithReload.js +18 -0
  32. package/actions/windows/open.js +5 -0
  33. package/actions/windows/openWeb.js +5 -0
  34. package/actions/windows/refreshState.js +5 -0
  35. package/actions/windows/reload.js +24 -0
  36. package/actions/ws/push.js +35 -0
  37. package/app.vue +180 -0
  38. package/components/_button.vue +101 -0
  39. package/components/_dropdownMenu.vue +76 -0
  40. package/components/_icon.vue +50 -0
  41. package/components/_message.vue +25 -0
  42. package/components/avatar.vue +16 -0
  43. package/components/banners/alert.vue +49 -0
  44. package/components/banners/select.vue +82 -0
  45. package/components/button.vue +13 -0
  46. package/components/calendar.vue +105 -0
  47. package/components/charts/column.vue +26 -0
  48. package/components/charts/line.vue +61 -0
  49. package/components/chip.vue +24 -0
  50. package/components/component.vue +222 -0
  51. package/components/datetime.vue +54 -0
  52. package/components/fab.vue +33 -0
  53. package/components/fields/_patternText.vue +61 -0
  54. package/components/fields/_select.vue +86 -0
  55. package/components/fields/autocomplete.vue +73 -0
  56. package/components/fields/check.vue +104 -0
  57. package/components/fields/checkGroup.vue +51 -0
  58. package/components/fields/country/countries.js +251 -0
  59. package/components/fields/country/field.vue +81 -0
  60. package/components/fields/country/regions.js +12 -0
  61. package/components/fields/creditCard.vue +105 -0
  62. package/components/fields/date.vue +24 -0
  63. package/components/fields/datetime.vue +49 -0
  64. package/components/fields/dynamicGroup.vue +106 -0
  65. package/components/fields/dynamicSelect.vue +173 -0
  66. package/components/fields/file.vue +166 -0
  67. package/components/fields/googlePlace.vue +158 -0
  68. package/components/fields/hidden.vue +18 -0
  69. package/components/fields/location.vue +223 -0
  70. package/components/fields/newRichText.vue +191 -0
  71. package/components/fields/phone/countries.js +315 -0
  72. package/components/fields/phone/field.vue +348 -0
  73. package/components/fields/phone/sprite.css +1071 -0
  74. package/components/fields/radio.vue +64 -0
  75. package/components/fields/radioGroup.vue +93 -0
  76. package/components/fields/rating.vue +26 -0
  77. package/components/fields/richText.vue +172 -0
  78. package/components/fields/select.vue +17 -0
  79. package/components/fields/stripe/stripeFields.vue +93 -0
  80. package/components/fields/stripe/stripeIndividualFields.vue +207 -0
  81. package/components/fields/stripeExternalAccount.vue +135 -0
  82. package/components/fields/stripeToken.vue +59 -0
  83. package/components/fields/submit.vue +23 -0
  84. package/components/fields/text.vue +144 -0
  85. package/components/fields/textarea.vue +59 -0
  86. package/components/fields/timeZone.vue +22 -0
  87. package/components/fields/timer.vue +83 -0
  88. package/components/h1.vue +28 -0
  89. package/components/h2.vue +20 -0
  90. package/components/h3.vue +22 -0
  91. package/components/h4.vue +20 -0
  92. package/components/h5.vue +20 -0
  93. package/components/h6.vue +20 -0
  94. package/components/hr.vue +13 -0
  95. package/components/html.vue +13 -0
  96. package/components/icon.vue +25 -0
  97. package/components/image.vue +87 -0
  98. package/components/label.vue +62 -0
  99. package/components/map.vue +206 -0
  100. package/components/markdown.vue +52 -0
  101. package/components/mixins/events.js +178 -0
  102. package/components/mixins/generic.js +58 -0
  103. package/components/mixins/list/autoload.js +144 -0
  104. package/components/mixins/longClick.js +56 -0
  105. package/components/mixins/scrolling.js +35 -0
  106. package/components/mixins/styles.js +221 -0
  107. package/components/mixins/table/autoload.js +131 -0
  108. package/components/mixins/table/export.js +52 -0
  109. package/components/mixins/table/import.js +106 -0
  110. package/components/mixins/text.js +20 -0
  111. package/components/mixins/ws/actionCable.js +48 -0
  112. package/components/mixins/ws/phoenixSocket.js +117 -0
  113. package/components/p.vue +36 -0
  114. package/components/panels/carousel.vue +55 -0
  115. package/components/panels/column.vue +117 -0
  116. package/components/panels/custom.vue +52 -0
  117. package/components/panels/flow.vue +81 -0
  118. package/components/panels/form.vue +126 -0
  119. package/components/panels/horizontal.vue +73 -0
  120. package/components/panels/list.vue +241 -0
  121. package/components/panels/responsive.vue +88 -0
  122. package/components/panels/scroll.vue +68 -0
  123. package/components/panels/split.vue +52 -0
  124. package/components/panels/table.vue +234 -0
  125. package/components/panels/ul.vue +34 -0
  126. package/components/panels/vertical.vue +71 -0
  127. package/components/panels/web.vue +11 -0
  128. package/components/spacer.vue +11 -0
  129. package/components/switch.vue +42 -0
  130. package/components/tabBar.vue +44 -0
  131. package/extensions/array.js +20 -0
  132. package/extensions/string.js +21 -0
  133. package/index.js +195 -0
  134. package/keys.js +12 -0
  135. package/nav/appbar.vue +117 -0
  136. package/nav/content.vue +40 -0
  137. package/nav/dialog.vue +127 -0
  138. package/nav/drawer.vue +88 -0
  139. package/nav/drawerButton.vue +28 -0
  140. package/nav/drawerLabel.vue +21 -0
  141. package/nav/sheet.vue +57 -0
  142. package/nav/snackbar.vue +72 -0
  143. package/package.json +42 -0
  144. package/settings.json.example +21 -0
  145. package/static/plugins/alignment/alignment.js +76 -0
  146. package/static/plugins/alignment/alignment.min.js +1 -0
  147. package/static/plugins/beyondgrammar/beyondgrammar.js +46 -0
  148. package/static/plugins/beyondgrammar/beyondgrammar.min.js +1 -0
  149. package/static/plugins/blockcode/blockcode.js +110 -0
  150. package/static/plugins/blockcode/blockcode.min.js +1 -0
  151. package/static/plugins/clips/clips.js +44 -0
  152. package/static/plugins/clips/clips.min.js +1 -0
  153. package/static/plugins/counter/counter.js +60 -0
  154. package/static/plugins/counter/counter.min.js +1 -0
  155. package/static/plugins/definedlinks/definedlinks.js +64 -0
  156. package/static/plugins/definedlinks/definedlinks.min.js +1 -0
  157. package/static/plugins/handle/handle.js +173 -0
  158. package/static/plugins/handle/handle.min.js +1 -0
  159. package/static/plugins/icons/icons.js +72 -0
  160. package/static/plugins/icons/icons.min.js +1 -0
  161. package/static/plugins/imageposition/imageposition.js +85 -0
  162. package/static/plugins/imageposition/imageposition.min.js +1 -0
  163. package/static/plugins/inlineformat/inlineformat.js +85 -0
  164. package/static/plugins/inlineformat/inlineformat.min.js +1 -0
  165. package/static/plugins/removeformat/removeformat.js +28 -0
  166. package/static/plugins/removeformat/removeformat.min.js +1 -0
  167. package/static/plugins/selector/selector.js +96 -0
  168. package/static/plugins/selector/selector.min.js +1 -0
  169. package/static/plugins/specialchars/specialchars.js +63 -0
  170. package/static/plugins/specialchars/specialchars.min.js +1 -0
  171. package/static/plugins/textdirection/textdirection.js +55 -0
  172. package/static/plugins/textdirection/textdirection.min.js +1 -0
  173. package/static/plugins/textexpander/textexpander.js +46 -0
  174. package/static/plugins/textexpander/textexpander.min.js +1 -0
  175. package/static/plugins/underline/underline.js +27 -0
  176. package/static/plugins/underline/underline.min.js +1 -0
  177. package/static/redactorx.css +1344 -0
  178. package/static/redactorx.js +14254 -0
  179. package/static/redactorx.min.css +1 -0
  180. package/static/redactorx.min.js +1 -0
  181. package/static/redactorx.usm.min.js +2 -0
  182. package/styles/test.sass +3 -0
  183. package/styles/test.scss +5 -0
  184. package/templates/_menu.vue +38 -0
  185. package/templates/comment.vue +202 -0
  186. package/templates/featured.vue +32 -0
  187. package/templates/thumbnail.vue +138 -0
  188. package/templates/unsupported.vue +12 -0
  189. package/utils/app.js +14 -0
  190. package/utils/dom.js +13 -0
  191. package/utils/form.js +34 -0
  192. package/utils/format.js +14 -0
  193. package/utils/hash.js +29 -0
  194. package/utils/helper.js +44 -0
  195. package/utils/history.js +70 -0
  196. package/utils/http.js +209 -0
  197. package/utils/launch.js +135 -0
  198. package/utils/private/ws.js +22 -0
  199. package/utils/public.js +23 -0
  200. package/utils/settings.js +48 -0
  201. package/utils/storage.js +9 -0
  202. package/utils/type.js +69 -0
  203. package/utils/uploader.js +121 -0
  204. package/utils/url.js +132 -0
@@ -0,0 +1,49 @@
1
+ <template>
2
+ <v-alert
3
+ :style="genericStyles()"
4
+ :class="$classes()"
5
+ :value="true"
6
+ :color="color"
7
+ :outlined="!$classes().includes('frameless')"
8
+ >
9
+ <!-- <span class="padder" v-if="spec.icon"><common-icon :spec="spec.icon || {}" /></span> -->
10
+ <!-- <common-icon :spec="spec.icon || {}" /> -->
11
+ <common-message :spec="spec" />
12
+ </v-alert>
13
+ </template>
14
+
15
+ <script>
16
+ export default {
17
+ props: {
18
+ spec: { type: Object, required: true }
19
+ },
20
+ data() {
21
+ return {
22
+ parentStyles: {},
23
+ color: null
24
+ };
25
+ },
26
+ methods: {
27
+ $ready() {
28
+ const vm = this;
29
+
30
+ this.$type.ifArray(this.spec.styleClasses, val => {
31
+ ["success", "info", "warning", "error"].forEach(color => {
32
+ if (val.remove(color)) {
33
+ vm.color = color;
34
+ }
35
+ // if (val.includes(color)) {
36
+ // vm.color = color
37
+ // }
38
+ });
39
+ });
40
+ }
41
+ }
42
+ };
43
+ </script>
44
+
45
+ <style scoped>
46
+ .frameless {
47
+ padding: 0;
48
+ }
49
+ </style>
@@ -0,0 +1,82 @@
1
+ <template>
2
+ <v-banner
3
+ :id="spec.id"
4
+ :style="genericStyles()"
5
+ :class="$classes()"
6
+ :color="spec.color || color"
7
+ :dark="dark"
8
+ single-line
9
+ :outlined="!$classes().includes('frameless')"
10
+ >
11
+ <common-icon v-if="spec.icon" slot="icon" :spec="spec.icon" />
12
+
13
+ <common-message :spec="spec" />
14
+
15
+ <template v-slot:actions>
16
+ <template v-for="(item, index) in spec.buttons">
17
+ <common-dropdownMenu
18
+ v-if="item.childButtons"
19
+ :key="index"
20
+ :spec="item"
21
+ :disabled="$isBusy"
22
+ />
23
+ <common-button
24
+ v-else
25
+ :key="index"
26
+ :spec="buttonSpec(item)"
27
+ :disabled="$isBusy"
28
+ :hide-text-on-xs="true"
29
+ />
30
+ </template>
31
+ </template>
32
+ </v-banner>
33
+ </template>
34
+
35
+ <script>
36
+ export default {
37
+ props: {
38
+ spec: { type: Object, required: true }
39
+ },
40
+ data() {
41
+ return {
42
+ color: null,
43
+ dark: false
44
+ };
45
+ },
46
+ methods: {
47
+ $ready() {
48
+ // const vm = this;
49
+ // this.$type.ifArray(this.spec.styleClasses, val => {
50
+ // ["success", "info", "warning", "error"].forEach(color => {
51
+ // if (val.remove(color)) {
52
+ // vm.color = color;
53
+ // vm.dark = true;
54
+ // }
55
+ // });
56
+ // });
57
+ },
58
+ buttonSpec(item) {
59
+ return Object.assign({}, item, {
60
+ view: "button-v1",
61
+ styleClasses: ["text"]
62
+ });
63
+ }
64
+ }
65
+ };
66
+ </script>
67
+
68
+ <style lang="scss" scoped>
69
+ .frameless {
70
+ padding: 0;
71
+ }
72
+ .v-list-item {
73
+ padding: 0 8px 0 8px;
74
+
75
+ > a,
76
+ > button {
77
+ width: 100%;
78
+ min-height: 48px;
79
+ justify-content: flex-start;
80
+ }
81
+ }
82
+ </style>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <common-button :spec="spec" :disabled="$isBusy" />
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ props: {
8
+ spec: { type: Object, required: true }
9
+ }
10
+ };
11
+ </script>
12
+
13
+ <style scoped></style>
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <v-container fluid class="pa-0">
3
+ <div>
4
+ <div class="d-flex justify-space-between align-center mb-4">
5
+ <div>
6
+ <v-btn fab outlined small left color="primary" @click="prev()">
7
+ <v-icon dark>mdi-chevron-left</v-icon>
8
+ </v-btn>
9
+ </div>
10
+ <div>
11
+ <strong>{{ title }}</strong>
12
+ </div>
13
+ <div>
14
+ <v-btn fab outlined small left color="primary" @click="next()">
15
+ <v-icon dark>mdi-chevron-right</v-icon>
16
+ </v-btn>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ <v-sheet :style="genericStyles()">
21
+ <v-calendar
22
+ ref="calendar"
23
+ v-model="currentDate"
24
+ type="month"
25
+ :today="currentDate"
26
+ :events="events"
27
+ @click:event="showEvent"
28
+ ></v-calendar>
29
+ </v-sheet>
30
+ </v-container>
31
+ </template>
32
+
33
+ <script>
34
+ import Http from "../utils/http";
35
+ import Action from "../action";
36
+
37
+ export default {
38
+ props: {
39
+ spec: { type: Object, required: true }
40
+ },
41
+ data() {
42
+ return {
43
+ events: [],
44
+ currentDate: new Date().toISOString().slice(0, 10)
45
+ };
46
+ },
47
+ computed: {
48
+ title() {
49
+ const months = [
50
+ "JAN",
51
+ "FEB",
52
+ "MAR",
53
+ "APR",
54
+ "MAY",
55
+ "JUN",
56
+ "JUL",
57
+ "AUG",
58
+ "SEP",
59
+ "OCT",
60
+ "NOV",
61
+ "DEC"
62
+ ];
63
+ const current = new Date(this.currentDate);
64
+ return `${months[current.getMonth()]} ${current.getFullYear()}`;
65
+ }
66
+ },
67
+ methods: {
68
+ next() {
69
+ this.$refs.calendar.next();
70
+ },
71
+ prev() {
72
+ this.$refs.calendar.prev();
73
+ },
74
+ $ready() {
75
+ this.fetchData();
76
+ },
77
+ fetchData() {
78
+ const url = new URL(this.spec.dataUrl);
79
+
80
+ Http.execute({ url: url.toString() }, "GET", this, response => {
81
+ const events = response.rows;
82
+ // this.currentDate = events[0].start;
83
+
84
+ let beginningDate = true;
85
+ this.events = events.map(item => {
86
+ item.name = item.title;
87
+
88
+ const extra = item.extra;
89
+ item.start = extra.start;
90
+ item.end = extra.end;
91
+
92
+ if (beginningDate) {
93
+ beginningDate = false;
94
+ this.currentDate = item.start;
95
+ }
96
+ return item;
97
+ });
98
+ });
99
+ },
100
+ showEvent({ event, target }) {
101
+ Action.execute(event.onClick, target, this);
102
+ }
103
+ }
104
+ };
105
+ </script>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <column-chart :data="groups" :stacked="spec.stacked"></column-chart>
3
+ </template>
4
+
5
+ <script>
6
+ // https://chartkick.com/vue
7
+ export default {
8
+ props: {
9
+ spec: { type: Object, required: true }
10
+ },
11
+ data: function() {
12
+ return {
13
+ groups: []
14
+ };
15
+ },
16
+ methods: {
17
+ $ready() {
18
+ this.groups = this.spec.dataGroups.map(element => {
19
+ return { name: element.title, data: element.points };
20
+ });
21
+ }
22
+ }
23
+ };
24
+ </script>
25
+
26
+ <style scoped></style>
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <line-chart
3
+ :style="genericStyles()"
4
+ :class="$classes()"
5
+ :data="series"
6
+ ></line-chart>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ props: {
12
+ spec: { type: Object, required: true }
13
+ },
14
+ data: function() {
15
+ return {
16
+ series: []
17
+ };
18
+ },
19
+ methods: {
20
+ $ready() {
21
+ this.series.clear();
22
+ this.renderData(this.spec.dataSeries);
23
+ this.fetchNext(this.spec.nextPage);
24
+ },
25
+ fetchData(url) {
26
+ const vm = this;
27
+ Utils.type.ifString(url, val => {
28
+ Utils.http.execute({ url: val }, "GET", this, response => {
29
+ vm.renderData(response.dataSeries);
30
+ vm.fetchNext(response.nextPage);
31
+ });
32
+ });
33
+ },
34
+ fetchNext(nextPage) {
35
+ if (!Utils.type.isObject(nextPage)) {
36
+ return;
37
+ }
38
+ if (nextPage.autoload != "all") {
39
+ return;
40
+ }
41
+ this.fetchData(nextPage.url);
42
+ },
43
+ renderData(series) {
44
+ if (!Utils.type.isArray(series)) {
45
+ return;
46
+ }
47
+
48
+ const data = series.map(element => {
49
+ const dataPoints = {};
50
+ element.points.forEach(point => {
51
+ dataPoints[point.x] = point.y;
52
+ });
53
+ return { name: element.title, data: dataPoints };
54
+ });
55
+ this.series = this.series.concat(data);
56
+ }
57
+ }
58
+ };
59
+ </script>
60
+
61
+ <style scoped></style>
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <v-chip
3
+ v-if="spec.onClick"
4
+ :style="genericStyles()"
5
+ :class="$classes()"
6
+ :href="$href()"
7
+ @click="$onClick()"
8
+ >
9
+ {{ spec.text }}
10
+ </v-chip>
11
+ <v-chip v-else :style="genericStyles()" :class="$classes()">
12
+ {{ spec.text }}
13
+ </v-chip>
14
+ </template>
15
+
16
+ <script>
17
+ export default {
18
+ props: {
19
+ spec: { type: Object, required: true }
20
+ }
21
+ };
22
+ </script>
23
+
24
+ <style scoped></style>
@@ -0,0 +1,222 @@
1
+ <template>
2
+ <fields-text v-if="name == 'fields-text'" :spec="spec" type="text" />
3
+ <fields-text v-else-if="name == 'fields-number'" :spec="spec" type="number" />
4
+ <fields-text v-else-if="name == 'fields-email'" :spec="spec" type="email" />
5
+ <fields-text v-else-if="name == 'fields-url'" :spec="spec" type="url" />
6
+ <fields-text
7
+ v-else-if="name == 'fields-password'"
8
+ :spec="spec"
9
+ type="password"
10
+ />
11
+ <!-- <fields-textarea v-else-if="spec.view == 'fields/textarea-v1'" :spec="spec" />
12
+ <fields-richText v-else-if="spec.view == 'fields/richText-v1'" :spec="spec" /> -->
13
+ <!-- <fields-file v-else-if="spec.view == 'fields/file-v1'" :spec="spec" />
14
+ <fields-select v-else-if="spec.view == 'fields/select-v1'" :spec="spec" />
15
+ <fields-dynamicSelect
16
+ v-else-if="spec.view == 'fields/dynamicSelect-v1'"
17
+ :spec="spec"
18
+ /> -->
19
+ <!-- <fields-country v-else-if="spec.view == 'fields/country-v1'" :spec="spec" /> -->
20
+
21
+ <!-- <fields-latLong v-else-if="spec.view == 'fields/latLong-v1'" :spec="spec" /> -->
22
+ <fields-googlePlace
23
+ v-else-if="spec.view == 'fields/googlePlace-v1'"
24
+ :spec="spec"
25
+ />
26
+
27
+ <!-- <panels-responsive v-else-if="spec.view == 'panels/scroll-v1'" :spec="spec" /> -->
28
+
29
+ <component :is="name" v-else-if="name" :spec="spec" />
30
+
31
+ <div v-else>Unsupported view: {{ spec.view }}</div>
32
+ </template>
33
+
34
+ <script>
35
+ import H1 from "./h1";
36
+ import H2 from "./h2";
37
+ import H3 from "./h3";
38
+ import H4 from "./h4";
39
+ import H5 from "./h5";
40
+ import H6 from "./h6";
41
+ import Label from "./label";
42
+ import P from "./p";
43
+ import Markdown from "./markdown";
44
+ import Html from "./html";
45
+ import Chip from "./chip";
46
+ import Datetime from "./datetime";
47
+
48
+ import Image from "./image";
49
+ import Avatar from "./avatar";
50
+ import Icon from "./icon";
51
+
52
+ import Button from "./button";
53
+ import Fab from "./fab";
54
+ import Switch from "./switch";
55
+
56
+ import Hr from "./hr";
57
+ import Spacer from "./spacer";
58
+
59
+ import Map from "./map";
60
+ import TabBar from "./tabBar";
61
+ import Calendar from "./calendar";
62
+
63
+ import HiddenField from "./fields/hidden";
64
+ import TextField from "./fields/text";
65
+ import SubmitField from "./fields/submit";
66
+ import TextAreaField from "./fields/textarea";
67
+ import RichTextField from "./fields/richText";
68
+ import NewRichTextField from "./fields/newRichText";
69
+ import FileField from "./fields/file";
70
+ import AutocompleteField from "./fields/autocomplete";
71
+ import SelectField from "./fields/select";
72
+ import TimeZoneField from "./fields/timeZone";
73
+ import DynamicSelectField from "./fields/dynamicSelect";
74
+ import CountryField from "./fields/country/field";
75
+ import RadioGroupField from "./fields/radioGroup";
76
+ import RadioField from "./fields/radio";
77
+ import CheckGroupField from "./fields/checkGroup";
78
+ import CheckField from "./fields/check";
79
+ import DateField from "./fields/date";
80
+ import DateTimeField from "./fields/datetime";
81
+ import LocationField from "./fields/location";
82
+ import GooglePlaceField from "./fields/googlePlace";
83
+ import DynamicGroupField from "./fields/dynamicGroup";
84
+ import StripeTokenField from "./fields/stripeToken";
85
+ import StripeExternalAccount from "./fields/stripeExternalAccount";
86
+ import CreditCardField from "./fields/creditCard";
87
+ import RatingField from "./fields/rating";
88
+ import PhoneField from "./fields/phone/field";
89
+ import TimerField from "./fields/timer";
90
+
91
+ import ScrollPanel from "./panels/scroll";
92
+ import VerticalPanel from "./panels/vertical";
93
+ import HorizontalPanel from "./panels/horizontal";
94
+ import FlowPanel from "./panels/flow";
95
+ import SplitPanel from "./panels/split";
96
+ import FormPanel from "./panels/form";
97
+ import ListPanel from "./panels/list";
98
+ import CarouselPanel from "./panels/carousel";
99
+ import TablePanel from "./panels/table";
100
+ import CustomPanel from "./panels/custom";
101
+ import ColumnPanel from "./panels/column";
102
+ import ResponsivePanel from "./panels/responsive";
103
+ import UlPanel from "./panels/ul";
104
+ import WebPanel from "./panels/web";
105
+
106
+ import AlertBanner from "./banners/alert";
107
+ import SelectBanner from "./banners/select";
108
+
109
+ import LineChart from "./charts/line";
110
+ import ColumnChart from "./charts/column";
111
+
112
+ export default {
113
+ components: {
114
+ "views-h1": H1,
115
+ "views-h2": H2,
116
+ "views-h3": H3,
117
+ "views-h4": H4,
118
+ "views-h5": H5,
119
+ "views-h6": H6,
120
+ "views-label": Label,
121
+ "views-p": P,
122
+ "views-markdown": Markdown,
123
+ "views-html": Html,
124
+ "views-chip": Chip,
125
+ "views-datetime": Datetime,
126
+
127
+ "views-image": Image,
128
+ "views-avatar": Avatar,
129
+ "views-icon": Icon,
130
+
131
+ "views-button": Button,
132
+ "views-fab": Fab,
133
+ "views-switch": Switch,
134
+
135
+ "views-hr": Hr,
136
+ "views-spacer": Spacer,
137
+
138
+ "views-map": Map,
139
+ "views-tabBar": TabBar,
140
+ "views-calendar": Calendar,
141
+
142
+ "fields-hidden": HiddenField,
143
+ "fields-text": TextField,
144
+ "fields-submit": SubmitField,
145
+ "fields-textarea": TextAreaField,
146
+ "fields-richText": RichTextField,
147
+ "fields-newRichText": NewRichTextField,
148
+ "fields-file": FileField,
149
+ "fields-autocomplete": AutocompleteField,
150
+ "fields-select": SelectField,
151
+ "fields-timeZone": TimeZoneField,
152
+ "fields-dynamicSelect": DynamicSelectField,
153
+ "fields-country": CountryField,
154
+ "fields-radioGroup": RadioGroupField,
155
+ "fields-radio": RadioField,
156
+ "fields-checkGroup": CheckGroupField,
157
+ "fields-check": CheckField,
158
+ "fields-date": DateField,
159
+ "fields-datetime": DateTimeField,
160
+ "fields-location": LocationField,
161
+ "fields-googlePlace": GooglePlaceField,
162
+ "fields-dynamicGroup": DynamicGroupField,
163
+ "fields-stripeToken": StripeTokenField,
164
+ "fields-stripeExternalAccount": StripeExternalAccount,
165
+ "fields-creditCard": CreditCardField,
166
+ "fields-rating": RatingField,
167
+ "fields-phone": PhoneField,
168
+ "fields-timer": TimerField,
169
+
170
+ "panels-scroll": ScrollPanel,
171
+ "panels-vertical": VerticalPanel,
172
+ "panels-horizontal": HorizontalPanel,
173
+ "panels-flow": FlowPanel,
174
+ "panels-split": SplitPanel,
175
+ "panels-form": FormPanel,
176
+ "panels-list": ListPanel,
177
+ "panels-carousel": CarouselPanel,
178
+ "panels-table": TablePanel,
179
+ "panels-custom": CustomPanel,
180
+ "panels-responsive": ResponsivePanel,
181
+ "panels-column": ColumnPanel,
182
+ "panels-ul": UlPanel,
183
+ "panels-web": WebPanel,
184
+
185
+ "banners-alert": AlertBanner,
186
+ "banners-select": SelectBanner,
187
+
188
+ "charts-line": LineChart,
189
+ "charts-column": ColumnChart
190
+ },
191
+ props: {
192
+ spec: { type: Object, required: true }
193
+ },
194
+ data() {
195
+ return {
196
+ name: null
197
+ };
198
+ },
199
+ beforeUpdate() {
200
+ // NOTE: Not sure what this is for
201
+ // Make sure vuejs will not attempt to render old data.
202
+ // if (this._mountedUrl !== window.location.href) {
203
+ // this.name = null;
204
+ // }
205
+ },
206
+ methods: {
207
+ $ready() {
208
+ const name = Utils.app.componentName(this.spec.view);
209
+ const strict = true;
210
+ if (strict) {
211
+ this.name = name;
212
+ } else {
213
+ if (this.$options.components[name]) {
214
+ this.name = name;
215
+ }
216
+ }
217
+ }
218
+ }
219
+ };
220
+ </script>
221
+
222
+ <style scoped></style>
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <div>{{ formattedTime }}</div>
3
+ </template>
4
+
5
+ <script>
6
+ import moment from "moment";
7
+
8
+ export default {
9
+ props: {
10
+ spec: { type: Object, required: true }
11
+ },
12
+ data() {
13
+ return {
14
+ initialTimestamp: null,
15
+ displayTimestamp: null,
16
+ distance: null,
17
+ timer: null
18
+ };
19
+ },
20
+ computed: {
21
+ formattedTime() {
22
+ return moment(new Date(this.initialTimestamp + this.distance)).format(
23
+ this.spec.format || "YYYY-MM-DD hh:mm:ss"
24
+ );
25
+ }
26
+ },
27
+ methods: {
28
+ $ready() {
29
+ this.displayTimestamp = Date.parse(this.spec.value);
30
+ this.initialTimestamp = new Date().getTime();
31
+
32
+ if (this.spec.tick === true) {
33
+ this.timer = setInterval(this.tick, 100);
34
+ }
35
+ },
36
+ $tearDown() {
37
+ console.log("TimeTicker destroyed");
38
+ if (this.timer != null) {
39
+ clearInterval(this.timer);
40
+ console.log(`Timer stopped: ${this.timer}`);
41
+ }
42
+ },
43
+ tick() {
44
+ this.distance = new Date().getTime() - this.initialTimestamp;
45
+ }
46
+ }
47
+ };
48
+ </script>
49
+
50
+ <style scoped>
51
+ /* h4 {
52
+ line-height: 1.5;
53
+ } */
54
+ </style>
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <v-btn
3
+ color="indigo"
4
+ @click="$onClick()"
5
+ :disabled="$isBusy"
6
+ :style="genericStyles()"
7
+ :class="$classes()"
8
+ :href="$href()"
9
+ :rel="$rel()"
10
+ fab
11
+ fixed
12
+ bottom
13
+ right
14
+ >
15
+ <!-- Using `white--text` as recommended in https://github.com/vuetifyjs/vuetify/issues/1030 -->
16
+ <common-icon v-if="spec.icon" :spec="spec.icon" class="white--text" />
17
+ </v-btn>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ props: ['spec']
23
+ }
24
+ </script>
25
+
26
+ <style scoped>
27
+
28
+ /* Attempts to fix icon alignment issue on production */
29
+ .v-btn--floating .v-icon {
30
+ display: inline-flex
31
+ }
32
+
33
+ </style>