glib-web 2.6.7 → 3.0.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.
Files changed (110) hide show
  1. package/action.js +39 -17
  2. package/actions/analytics/logEvent.js +2 -2
  3. package/actions/auth/saveCsrfToken.js +6 -0
  4. package/actions/cables/push.js +4 -4
  5. package/actions/commands/enqueue.js +17 -0
  6. package/actions/fields/reset.js +2 -2
  7. package/actions/http/get.js +15 -27
  8. package/actions/panels/scrollTo.js +1 -1
  9. package/actions/panels/scrollToBottom.js +1 -1
  10. package/actions/popovers/close.js +5 -0
  11. package/actions/popovers/open.js +9 -0
  12. package/actions/windows/closeWithReload.js +1 -1
  13. package/actions/windows/refreshState.js +3 -1
  14. package/actions/ws/push.js +5 -3
  15. package/app.vue +59 -27
  16. package/components/_badge.vue +1 -6
  17. package/components/_button.vue +30 -30
  18. package/components/_chip.vue +27 -29
  19. package/components/_dropdownMenu.vue +10 -23
  20. package/components/_icon.vue +5 -5
  21. package/components/_responsive.vue +7 -21
  22. package/components/avatar.vue +11 -15
  23. package/components/banners/alert.vue +2 -7
  24. package/components/banners/select.vue +18 -30
  25. package/components/button.vue +4 -5
  26. package/components/component.vue +112 -133
  27. package/components/datetime.vue +2 -0
  28. package/components/fields/_patternText.vue +8 -19
  29. package/components/fields/_select.vue +9 -27
  30. package/components/fields/autocomplete.vue +8 -21
  31. package/components/fields/check.vue +5 -12
  32. package/components/fields/checkGroup.vue +3 -13
  33. package/components/fields/country/field.vue +9 -27
  34. package/components/fields/date.vue +5 -5
  35. package/components/fields/datetime.vue +6 -11
  36. package/components/fields/dynamicSelect.vue +8 -29
  37. package/components/fields/file.vue +10 -29
  38. package/components/fields/newRichText.vue +67 -54
  39. package/components/fields/otpField.vue +11 -31
  40. package/components/fields/phone/field.vue +60 -78
  41. package/components/fields/radio.vue +8 -44
  42. package/components/fields/radioGroup.vue +17 -19
  43. package/components/fields/rating.vue +9 -16
  44. package/components/fields/richText.vue +27 -45
  45. package/components/fields/select.vue +10 -7
  46. package/components/fields/stripe/stripeFields.vue +9 -2
  47. package/components/fields/stripe/stripeIndividualFields.vue +9 -7
  48. package/components/fields/stripeExternalAccount.vue +10 -24
  49. package/components/fields/text.vue +26 -50
  50. package/components/fields/textarea.vue +14 -27
  51. package/components/fields/timeZone.vue +9 -6
  52. package/components/fields/timer.vue +5 -11
  53. package/components/image.vue +12 -23
  54. package/components/label.vue +10 -18
  55. package/components/markdown.vue +45 -23
  56. package/components/mixins/events.js +24 -25
  57. package/components/mixins/generic.js +7 -4
  58. package/components/mixins/inputVariant.js +16 -0
  59. package/components/mixins/list/autoload.js +7 -5
  60. package/components/mixins/styles.js +16 -16
  61. package/components/mixins/table/autoload.js +6 -4
  62. package/components/mixins/ws/actionCable.js +6 -5
  63. package/components/mixins/ws/phoenixSocket.js +11 -9
  64. package/components/p.vue +10 -0
  65. package/components/panels/column.vue +8 -19
  66. package/components/panels/custom.vue +9 -13
  67. package/components/panels/flow.vue +19 -13
  68. package/components/panels/form.vue +26 -34
  69. package/components/panels/grid.vue +15 -9
  70. package/components/panels/horizontal.vue +58 -54
  71. package/components/panels/list.vue +37 -72
  72. package/components/panels/responsive.vue +2 -33
  73. package/components/panels/scroll.vue +3 -0
  74. package/components/panels/split.vue +2 -2
  75. package/components/panels/table.vue +32 -63
  76. package/components/panels/timeline.vue +20 -30
  77. package/components/panels/vertical.vue +8 -13
  78. package/components/popover.vue +39 -0
  79. package/components/progressCircle.vue +2 -8
  80. package/components/progressbar.vue +4 -14
  81. package/components/shareButton.vue +24 -30
  82. package/components/tabBar.vue +29 -28
  83. package/index.js +60 -94
  84. package/nav/appbar.vue +8 -6
  85. package/nav/dialog.vue +30 -49
  86. package/nav/drawer.vue +39 -51
  87. package/nav/drawerButton.vue +5 -7
  88. package/nav/drawerLabel.vue +2 -3
  89. package/nav/sheet.vue +21 -22
  90. package/nav/snackbar.vue +19 -30
  91. package/package.json +13 -16
  92. package/plugins/driverCustomBehavior.js +1 -1
  93. package/plugins/updatableComponent.js +2 -2
  94. package/plugins/vuetify.js +26 -0
  95. package/store.js +16 -0
  96. package/templates/comment.vue +42 -19
  97. package/templates/featured.vue +8 -9
  98. package/templates/thumbnail-old.vue +188 -0
  99. package/templates/thumbnail.vue +3 -208
  100. package/tsconfig.json +1 -1
  101. package/utils/component.js +18 -18
  102. package/utils/constant.js +4 -0
  103. package/utils/eventBus.js +9 -2
  104. package/utils/history.js +12 -8
  105. package/utils/http.js +29 -71
  106. package/utils/launch.js +89 -52
  107. package/utils/private/ws.js +5 -3
  108. package/utils/public.js +6 -0
  109. package/utils/queue.js +102 -0
  110. package/utils/settings.js +3 -9
@@ -1,25 +1,39 @@
1
1
  <template>
2
- <div v-longclick="$onLongPress" class="outer-container">
2
+ <div
3
+ v-longclick="$onLongPress"
4
+ class="outer-container"
5
+ >
3
6
  <div :class="[spec.editButtons ? 'container-edit' : 'container']">
4
- <v-card flat :class="mode" class="py-1">
5
- <v-card-title v-if="mode === 'system'" class="caption">{{
7
+ <v-card
8
+ flat
9
+ :class="mode"
10
+ class="py-1"
11
+ >
12
+ <v-card-title
13
+ v-if="mode === 'system'"
14
+ class="caption"
15
+ >{{
6
16
  spec.subtitle
7
17
  }}</v-card-title>
8
- <v-avatar v-if="spec.imageUrl" size="30px">
9
- <img :src="spec.imageUrl" alt="avatar" />
18
+ <v-avatar
19
+ v-if="spec.imageUrl"
20
+ size="30px"
21
+ >
22
+ <img
23
+ :src="spec.imageUrl"
24
+ alt="avatar"
25
+ />
10
26
  </v-avatar>
11
27
  <v-card-title
12
28
  v-if="spec.title"
13
29
  class="font-weight-bold body-2 subtitle"
14
- >{{ spec.title }}</v-card-title
15
- >
30
+ >{{ spec.title }}</v-card-title>
16
31
  <!-- eslint-disable vue/no-v-html -->
17
32
  <div
18
33
  v-if="mode !== 'system'"
19
34
  class="comment-bubble pa-2"
20
35
  v-html="compiledText"
21
36
  >
22
- {{ spec.subtitle }}
23
37
  </div>
24
38
  <!--eslint-enable-->
25
39
  <img
@@ -29,13 +43,22 @@
29
43
  :href="taHref(spec)"
30
44
  @click="taClick($event, spec)"
31
45
  />
32
- <v-card-title v-if="spec.subsubtitle" class="subsubtitle caption">{{
46
+ <v-card-title
47
+ v-if="spec.subsubtitle"
48
+ class="subsubtitle caption"
49
+ >{{
33
50
  spec.subsubtitle
34
51
  }}</v-card-title>
35
52
 
36
53
  <div class="mt-1 chips">
37
- <template v-for="(spec, index) in chips">
38
- <v-chip :key="index" class="ma-1" :color="spec.color">
54
+ <template
55
+ v-for="(spec, index) in chips"
56
+ :key="index"
57
+ >
58
+ <v-chip
59
+ class="ma-1"
60
+ :color="spec.color"
61
+ >
39
62
  {{ spec.text }}
40
63
  </v-chip>
41
64
  </template>
@@ -48,28 +71,28 @@
48
71
  <script>
49
72
  export default {
50
73
  props: {
51
- spec: { type: Object, required: true }
74
+ spec: { type: Object, required: true },
52
75
  },
53
- data: function() {
76
+ data: function () {
54
77
  return {
55
78
  position: null,
56
79
  mode: null,
57
- chips: []
80
+ chips: [],
58
81
  };
59
82
  },
60
83
  computed: {
61
84
  compiledText() {
62
85
  return Utils.format.markdown(this.spec.subtitle);
63
- }
86
+ },
64
87
  },
65
88
  methods: {
66
89
  $ready() {
67
90
  const template = this.spec.template;
68
91
  this.mode = this.determineMode(template);
69
92
 
70
- this.chips = (this.spec.chips || []).map(spec => {
93
+ this.chips = (this.spec.chips || []).map((spec) => {
71
94
  var color = null;
72
- this.$type.ifArray(spec.styleClasses, classes => {
95
+ this.$type.ifArray(spec.styleClasses, (classes) => {
73
96
  for (const val of ["success", "info", "warning", "error"]) {
74
97
  if (classes.includes(val)) {
75
98
  color = val;
@@ -92,8 +115,8 @@ export default {
92
115
  case "systemComment":
93
116
  return "system";
94
117
  }
95
- }
96
- }
118
+ },
119
+ },
97
120
  };
98
121
  </script>
99
122
 
@@ -3,15 +3,14 @@
3
3
  <v-img :src="spec.imageUrl" height="200" :style="genericStyles()" />
4
4
 
5
5
  <v-list-item v-if="spec.template != 'spacer'">
6
- <v-list-item-content>
7
- <v-list-item-title>{{ spec.title }}</v-list-item-title>
8
- <v-list-item-subtitle v-if="spec.subtitle">{{
9
- spec.subtitle
10
- }}</v-list-item-subtitle>
11
- <v-list-item-subtitle v-if="spec.subsubtitle">{{
12
- spec.subsubtitle
13
- }}</v-list-item-subtitle>
14
- </v-list-item-content>
6
+
7
+ <v-list-item-title>{{ spec.title }}</v-list-item-title>
8
+ <v-list-item-subtitle v-if="spec.subtitle">{{
9
+ spec.subtitle
10
+ }}</v-list-item-subtitle>
11
+ <v-list-item-subtitle v-if="spec.subsubtitle">{{
12
+ spec.subsubtitle
13
+ }}</v-list-item-subtitle>
15
14
 
16
15
  <templates-menu :edit-buttons="editButtons" />
17
16
  </v-list-item>
@@ -0,0 +1,188 @@
1
+ <template>
2
+ <div style="display:flex;" class="thumbnail" :class="cssClasses">
3
+ <div v-if="spec.leftOuterButtons" class="left-universal" style="display:flex; margin-top:10px;">
4
+ <template v-for="(item, index) in spec.leftOuterButtons" :key="index">
5
+ <common-button :spec="buttonSpec(item)" :disabled="$isBusy" />
6
+ </template>
7
+ </div>
8
+
9
+ <v-list-item v-longclick="$onLongPress" :href="$href()" class="item-content" :style="columnStyles()"
10
+ @[clickCondition]="$onClick()">
11
+ <!-- <v-icon v-if="spec.onReorder" class="handle">drag_indicator</v-icon> -->
12
+
13
+ <!-- Specify a key to prevent reuse which causes an issue where the checkbox would use the previous name. -->
14
+ <fields-check v-if="checkSpec" :key="checkSpec.name" :spec="checkSpec" />
15
+
16
+ <div v-if="spec.leftButtons" class="left-universal">
17
+ <template v-for="(item, index) in spec.leftButtons" :key="index">
18
+ <rich-button :spec="buttonSpec(item)" :disabled="$isBusy" />
19
+ </template>
20
+ </div>
21
+
22
+ <!-- <v-list-item-avatar v-if="$type.isString(spec.imageUrl)" :tile="!spec.avatar || null" style="display:flex;"
23
+ class="left-thumbnail" :size="spec.imageSize">
24
+ <img :src="spec.imageUrl" />
25
+ </v-list-item-avatar> -->
26
+ <!-- <v-list-item-avatar v-else-if="$type.isObject(spec.icon)">
27
+ <common-icon :spec="spec.icon" />
28
+ </v-list-item-avatar> -->
29
+ <div v-else class="left-icon" v-if="$type.isObject(spec.icon)">
30
+ <common-icon :spec="spec.icon" />
31
+ </div>
32
+
33
+ <div style="display:flex;width: 100%">
34
+ <v-text-field v-if="spec.fieldTitleName" :name="spec.fieldTitleName" :value="spec.title" />
35
+ <v-list-item-title v-else>{{ spec.title }}</v-list-item-title>
36
+
37
+ <v-list-item-subtitle v-if="spec.subtitle">{{
38
+ spec.subtitle
39
+ }}</v-list-item-subtitle>
40
+ <v-list-item-subtitle v-if="spec.subsubtitle">{{
41
+ spec.subsubtitle
42
+ }}</v-list-item-subtitle>
43
+
44
+ <div class="chips">
45
+ <template v-for="(item, index) in chips" :key="index">
46
+ <common-chip :spec="item" />
47
+ </template>
48
+ </div>
49
+
50
+ <!-- NOTE: Experimental -->
51
+ <panels-responsive :spec="spec.accessory" />
52
+ </div>
53
+
54
+ <template v-for="(item, index) in spec.rightButtons" :key="index">
55
+ <rich-button :spec="buttonSpec(item)" :disabled="$isBusy" />
56
+ </template>
57
+
58
+ <templates-menu :edit-buttons="editButtons" />
59
+ </v-list-item>
60
+ </div>
61
+ </template>
62
+
63
+ <script>
64
+ import CheckField from "../components/fields/check.vue";
65
+
66
+ export default {
67
+ components: {
68
+ "fields-check": CheckField,
69
+ },
70
+ props: {
71
+ spec: { type: Object, required: true },
72
+ responsiveCols: { type: Number, default: () => 0 },
73
+ },
74
+ data() {
75
+ return {
76
+ // accessory: {},
77
+ editButtons: []
78
+ // checkSpec: null
79
+ };
80
+ },
81
+ computed: {
82
+ cssClasses() {
83
+ return this.$classes(this.spec, "templates/thumbnail");
84
+ },
85
+ clickCondition() {
86
+ if (this.spec.onClick || this.spec.onLongPress) {
87
+ // This will show the clickable indication
88
+ return "click";
89
+ }
90
+ return null;
91
+ },
92
+ // Implemented as computed so that it gets reflected when reordering
93
+ chips() {
94
+ return (this.spec.chips || []).map((item) => {
95
+ var color = null;
96
+ this.$type.ifArray(item.styleClasses, (classes) => {
97
+ for (const val of ["success", "info", "warning", "error"]) {
98
+ if (classes.includes(val)) {
99
+ color = val;
100
+ }
101
+ }
102
+ });
103
+ return Object.assign({}, item, { color: color, view: "chip" });
104
+ });
105
+ },
106
+ // Implemented as computed so that it gets reflected when navigating to another list containing check fields.
107
+ checkSpec() {
108
+ if (this.spec.fieldCheckName) {
109
+ return {
110
+ view: "fields/checkGroup",
111
+ name: this.spec.fieldCheckName,
112
+ checkValue: true,
113
+ valueIf: this.spec.fieldCheckValueIf,
114
+ padding: { left: 16 },
115
+ };
116
+ }
117
+ return null;
118
+ }
119
+ // cssStyles() {
120
+ // const styles = this.$styles();
121
+ // // switch(this.spec.align) {
122
+ // // case 'middle':
123
+ // // styles['align-items'] = 'center'
124
+ // // break
125
+ // // case 'bottom':
126
+ // // styles['align-items'] = 'flex-end'
127
+ // // break
128
+ // // default:
129
+ // // styles['align-items'] = 'flex-start'
130
+ // // }
131
+ // return styles;
132
+ // },
133
+ },
134
+ methods: {
135
+ $ready() {
136
+ // this.accessory = { childViews: this.spec.accessoryViews };
137
+ this.editButtons = this.spec.editButtons || [];
138
+ },
139
+ buttonSpec(item) {
140
+ return Object.assign({}, item, {
141
+ view: "button-v1",
142
+ styleClasses: item.text ? ["text"] : ["icon"],
143
+ });
144
+ },
145
+ columnStyles() {
146
+ if (this.responsiveCols) {
147
+ return `width: ${100 / this.responsiveCols}%; float: left;`;
148
+ }
149
+ },
150
+ },
151
+ };
152
+ </script>
153
+
154
+ <style lang="scss">
155
+ .chips>* {
156
+ margin-right: 10px;
157
+ }
158
+ </style>
159
+
160
+ <style lang="scss" scoped>
161
+ .item-content {
162
+ padding-left: 0;
163
+ padding-right: 0;
164
+ display: flex;
165
+ }
166
+
167
+ @media (min-width: 600px) {
168
+ .left-thumbnail.v-avatar.v-list-item__avatar {
169
+ margin: 6px 6px 6px 6px;
170
+ width: 60px;
171
+ height: 60px;
172
+ }
173
+
174
+ .left-icon {
175
+ // margin-left: 16px;
176
+ margin-left: 4px;
177
+ }
178
+
179
+ .left-universal {
180
+ padding-left: 16px;
181
+ }
182
+
183
+ // .handle {
184
+ // // margin-left: 10px;
185
+ // cursor: move;
186
+ // }
187
+ }
188
+ </style>
@@ -1,220 +1,15 @@
1
1
  <template>
2
- <div class="thumbnail" :class="cssClasses" @[clickCondition]="$onClick()">
3
- <panels-responsive :spec="spec.header" />
4
- <div style="display:flex;">
5
- <div v-if="spec.leftOuterButtons" style="display:flex; margin-top:10px;">
6
- <template v-for="(item, index) in spec.leftOuterButtons">
7
- <common-button
8
- :key="index"
9
- :spec="buttonSpec(item)"
10
- :disabled="$isBusy"
11
- />
12
- </template>
13
- </div>
14
-
15
- <v-list-item
16
- v-longclick="$onLongPress"
17
- :href="$href()"
18
- class="item-content"
19
- :style="columnStyles()"
20
- >
21
- <!-- <v-icon v-if="spec.onReorder" class="handle">drag_indicator</v-icon> -->
22
-
23
- <!-- Specify a key to prevent reuse which causes an issue where the checkbox would use the previous name. -->
24
- <fields-check
25
- v-if="checkSpec"
26
- :key="checkSpec.name"
27
- :spec="checkSpec"
28
- />
29
-
30
- <div v-if="spec.leftButtons">
31
- <template v-for="(item, index) in spec.leftButtons">
32
- <rich-button
33
- :key="index"
34
- :spec="buttonSpec(item)"
35
- :disabled="$isBusy"
36
- />
37
- </template>
38
- </div>
39
-
40
- <v-list-item-avatar
41
- v-if="$type.isString(spec.imageUrl)"
42
- :tile="!spec.avatar"
43
- style="display:flex;"
44
- class="left-thumbnail"
45
- :size="spec.imageSize"
46
- >
47
- <img :src="spec.imageUrl" />
48
- </v-list-item-avatar>
49
-
50
- <div v-else class="left-icon">
51
- <v-list-item-avatar v-if="$type.isObject(spec.icon)">
52
- <common-icon :spec="spec.icon" />
53
- </v-list-item-avatar>
54
- </div>
55
-
56
- <v-list-item-content style="display:flex;">
57
- <v-text-field
58
- v-if="spec.fieldTitleName"
59
- :name="spec.fieldTitleName"
60
- :value="spec.title"
61
- />
62
- <v-list-item-title v-else>{{ spec.title }}</v-list-item-title>
63
-
64
- <v-list-item-subtitle v-if="spec.subtitle">{{
65
- spec.subtitle
66
- }}</v-list-item-subtitle>
67
- <v-list-item-subtitle v-if="spec.subsubtitle">{{
68
- spec.subsubtitle
69
- }}</v-list-item-subtitle>
70
-
71
- <div class="chips">
72
- <template v-for="(item, index) in chips">
73
- <common-chip :key="index" :spec="item" />
74
- </template>
75
- </div>
76
-
77
- <panels-responsive :spec="spec.body" />
78
- </v-list-item-content>
79
-
80
- <template v-for="(item, index) in spec.rightButtons">
81
- <rich-button
82
- :key="index"
83
- :spec="buttonSpec(item)"
84
- :disabled="$isBusy"
85
- />
86
- </template>
87
-
88
- <templates-menu :edit-buttons="editButtons" />
89
- </v-list-item>
90
- </div>
91
- <panels-responsive :spec="spec.footer" />
92
- </div>
2
+ <v-list-item :key="spec.title" :title="spec.title" :subtitle="spec.subtitle" :prepend-avatar="spec.imageUrl"
3
+ :prepend-icon="spec.icon?.material?.name" @click="$event => spec.onClick ? $onClick() : null"></v-list-item>
93
4
  </template>
94
-
95
5
  <script>
96
- import CheckField from "../components/fields/check";
97
-
98
6
  export default {
99
- components: {
100
- "fields-check": CheckField
101
- },
102
7
  props: {
103
8
  spec: { type: Object, required: true },
104
- responsiveCols: { type: Number, default: () => 0 }
105
- },
106
- data() {
107
- return {
108
- // accessory: {},
109
- editButtons: []
110
- // checkSpec: null
111
- };
112
- },
113
- computed: {
114
- cssClasses() {
115
- return this.$classes(this.spec, "templates/thumbnail");
116
- },
117
- clickCondition() {
118
- if (this.spec.onClick || this.spec.onLongPress) {
119
- // This will show the clickable indication
120
- return "click";
121
- }
122
- return null;
123
- },
124
- // Implemented as computed so that it gets reflected when reordering
125
- chips() {
126
- return (this.spec.chips || []).map(item => {
127
- var color = null;
128
- this.$type.ifArray(item.styleClasses, classes => {
129
- for (const val of ["success", "info", "warning", "error"]) {
130
- if (classes.includes(val)) {
131
- color = val;
132
- }
133
- }
134
- });
135
- return Object.assign({}, item, { color: color, view: "chip" });
136
- });
137
- },
138
- // Implemented as computed so that it gets reflected when navigating to another list containing check fields.
139
- checkSpec() {
140
- if (this.spec.fieldCheckName) {
141
- return {
142
- view: "fields/checkGroup",
143
- name: this.spec.fieldCheckName,
144
- checkValue: true,
145
- valueIf: this.spec.fieldCheckValueIf,
146
- padding: { left: 16 }
147
- };
148
- }
149
- return null;
150
- }
151
- // cssStyles() {
152
- // const styles = this.$styles();
153
- // // switch(this.spec.align) {
154
- // // case 'middle':
155
- // // styles['align-items'] = 'center'
156
- // // break
157
- // // case 'bottom':
158
- // // styles['align-items'] = 'flex-end'
159
- // // break
160
- // // default:
161
- // // styles['align-items'] = 'flex-start'
162
- // // }
163
- // return styles;
164
- // },
165
9
  },
166
10
  methods: {
167
11
  $ready() {
168
- // this.accessory = { childViews: this.spec.accessoryViews };
169
- this.editButtons = this.spec.editButtons || [];
170
- },
171
- buttonSpec(item) {
172
- // return Object.assign({}, item, {
173
- // view: "button-v1",
174
- // styleClasses: item.text ? ["text"] : ["icon"]
175
- // });
176
- return Object.assign({}, item, {
177
- view: "button-v1"
178
- });
179
- },
180
- columnStyles() {
181
- if (this.responsiveCols) {
182
- return `width: ${100 / this.responsiveCols}%; float: left;`;
183
- }
184
12
  }
185
13
  }
186
- };
187
- </script>
188
-
189
- <style lang="scss">
190
- .chips > * {
191
- margin-right: 10px;
192
- }
193
- </style>
194
-
195
- <style lang="scss" scoped>
196
- .item-content {
197
- padding-left: 0;
198
- padding-right: 0;
199
- display: flex;
200
- }
201
-
202
- @media (min-width: 600px) {
203
- .left-thumbnail.v-avatar.v-list-item__avatar {
204
- margin: 6px 6px 6px 6px;
205
- width: 60px;
206
- height: 60px;
207
- }
208
- .left-icon {
209
- // margin-left: 16px;
210
- margin-left: 4px;
211
- }
212
- // .left-universal {
213
- // padding-left: 16px;
214
- // }
215
- // .handle {
216
- // // margin-left: 10px;
217
- // cursor: move;
218
- // }
219
14
  }
220
- </style>
15
+ </script>
package/tsconfig.json CHANGED
@@ -39,7 +39,7 @@
39
39
  // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
40
40
 
41
41
  /* JavaScript Support */
42
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
42
+ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
43
43
  // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
44
44
  // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
45
45
 
@@ -1,25 +1,14 @@
1
- import Vue from "vue";
1
+ import { nextTick } from "vue";
2
+ import { vueApp } from "../store";
2
3
 
3
- export default class {
4
- static get _registry() {
5
- return window.vueApp.registeredComponents;
6
- }
7
4
 
5
+ export default class {
8
6
  static findById(id) {
9
- return this._registry[id];
10
- // const component = this._registry[id];
11
- // if (component) {
12
- // return component;
13
- // }
14
- // console.error("Component not found: " + id);
7
+ return vueApp.registeredComponents[id];
15
8
  }
16
9
 
17
- // static clearRegistry() {
18
- // window.vueApp.registeredComponents = {};
19
- // }
20
-
21
10
  static register(id, component) {
22
- if (this._registry[id]) {
11
+ if (this._registry[id];) {
23
12
  console.warn(
24
13
  "Duplicate component ID:",
25
14
  id,
@@ -38,7 +27,18 @@ export default class {
38
27
  }
39
28
 
40
29
  static vueName(component) {
41
- return component.$options._componentTag;
30
+ // _componentTag not found
31
+ // return component.$options._componentTag;
32
+ if (!component.name && component.spec) {
33
+ if (component.spec.view == 'panels/fullPageForm') {
34
+ component.name = 'panels-form'
35
+ } else {
36
+ component.name = (component.spec.view || '').replace('/', '-').replace('-v1', '')
37
+ }
38
+ }
39
+
40
+
41
+ return component.name
42
42
  }
43
43
 
44
44
  static async preserveScroll(promise) {
@@ -48,7 +48,7 @@ export default class {
48
48
 
49
49
  await promise;
50
50
 
51
- Vue.nextTick(() => {
51
+ nextTick(() => {
52
52
  pageBody.scrollTop = originalTop;
53
53
  pageBody.scrollLeft = originalLeft;
54
54
  });
@@ -0,0 +1,4 @@
1
+ const colors = ['primary', 'secondary', 'success', 'warning', 'info', 'error']
2
+ const variants = ['text', 'flat', 'elevated', 'outlined', 'plain', 'tonal']
3
+
4
+ export { colors, variants }
package/utils/eventBus.js CHANGED
@@ -1,2 +1,9 @@
1
- import Vue from "vue";
2
- export default new Vue();
1
+ // eventBus.js
2
+ import emitter from 'tiny-emitter/instance'
3
+
4
+ export default {
5
+ $on: (...args) => emitter.on(...args),
6
+ $once: (...args) => emitter.once(...args),
7
+ $off: (...args) => emitter.off(...args),
8
+ $emit: (...args) => emitter.emit(...args)
9
+ }