glib-web 3.8.0 → 3.8.2

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 (99) hide show
  1. package/LICENSE +0 -0
  2. package/actions/auth/creditCard.js +0 -0
  3. package/actions/auth/restart.js +0 -0
  4. package/actions/commands/copy.js +0 -0
  5. package/actions/dialogs/close.js +0 -0
  6. package/actions/dialogs/notification.js +0 -0
  7. package/actions/dialogs/oauth.js +0 -0
  8. package/actions/dialogs/open.js +0 -0
  9. package/actions/dialogs/options.js +0 -0
  10. package/actions/dialogs/reload.js +0 -0
  11. package/actions/dialogs/show.js +0 -0
  12. package/actions/http/delete.js +0 -0
  13. package/actions/http/patch.js +0 -0
  14. package/actions/http/post.js +0 -0
  15. package/actions/http/put.js +0 -0
  16. package/actions/runMultiple.js +0 -0
  17. package/actions/sheets/select.js +0 -0
  18. package/actions/snackbars/alert.js +0 -0
  19. package/actions/snackbars/select.js +0 -0
  20. package/actions/timeouts/set.js +0 -0
  21. package/actions/windows/openWeb.js +0 -0
  22. package/actions/windows/print.js +0 -0
  23. package/components/_message.vue +0 -0
  24. package/components/calendar.vue +0 -0
  25. package/components/fields/_otp.vue +15 -37
  26. package/components/fields/country/countries.js +0 -0
  27. package/components/fields/country/regions.js +0 -0
  28. package/components/fields/creditCard.vue +0 -0
  29. package/components/fields/googlePlace.vue +0 -0
  30. package/components/fields/phone/countries.js +0 -0
  31. package/components/fields/phone/sprite.css +0 -0
  32. package/components/fields/stripeToken.vue +0 -0
  33. package/components/h1.vue +0 -0
  34. package/components/h2.vue +0 -0
  35. package/components/h3.vue +0 -0
  36. package/components/h5.vue +0 -0
  37. package/components/h6.vue +0 -0
  38. package/components/hr.vue +0 -0
  39. package/components/html.vue +0 -0
  40. package/components/icon.vue +0 -0
  41. package/components/mixins/chart/annotation.js +0 -0
  42. package/components/mixins/chart/tooltip.js +0 -0
  43. package/components/mixins/dataset.js +0 -0
  44. package/components/mixins/extension.js +0 -0
  45. package/components/mixins/longClick.js +0 -0
  46. package/components/mixins/scrolling.js +0 -0
  47. package/components/mixins/styles.js +42 -16
  48. package/components/mixins/table/export.js +0 -0
  49. package/components/mixins/table/import.js +0 -0
  50. package/components/mixins/text.js +0 -0
  51. package/components/multimedia/video.vue +0 -0
  52. package/components/panels/carousel.vue +0 -0
  53. package/components/panels/web.vue +0 -0
  54. package/components/spacer.vue +0 -0
  55. package/keys.js +0 -0
  56. package/nav/drawer.vue +11 -2
  57. package/package.json +2 -2
  58. package/static/plugins/alignment/alignment.js +0 -0
  59. package/static/plugins/alignment/alignment.min.js +0 -0
  60. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  61. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  62. package/static/plugins/blockcode/blockcode.js +0 -0
  63. package/static/plugins/blockcode/blockcode.min.js +0 -0
  64. package/static/plugins/clips/clips.js +0 -0
  65. package/static/plugins/clips/clips.min.js +0 -0
  66. package/static/plugins/counter/counter.js +0 -0
  67. package/static/plugins/counter/counter.min.js +0 -0
  68. package/static/plugins/definedlinks/definedlinks.js +0 -0
  69. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  70. package/static/plugins/handle/handle.js +0 -0
  71. package/static/plugins/handle/handle.min.js +0 -0
  72. package/static/plugins/icons/icons.js +0 -0
  73. package/static/plugins/icons/icons.min.js +0 -0
  74. package/static/plugins/imageposition/imageposition.js +0 -0
  75. package/static/plugins/imageposition/imageposition.min.js +0 -0
  76. package/static/plugins/inlineformat/inlineformat.js +0 -0
  77. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  78. package/static/plugins/removeformat/removeformat.js +0 -0
  79. package/static/plugins/removeformat/removeformat.min.js +0 -0
  80. package/static/plugins/selector/selector.js +0 -0
  81. package/static/plugins/selector/selector.min.js +0 -0
  82. package/static/plugins/specialchars/specialchars.js +0 -0
  83. package/static/plugins/specialchars/specialchars.min.js +0 -0
  84. package/static/plugins/textdirection/textdirection.js +0 -0
  85. package/static/plugins/textdirection/textdirection.min.js +0 -0
  86. package/static/plugins/textexpander/textexpander.js +0 -0
  87. package/static/plugins/textexpander/textexpander.min.js +0 -0
  88. package/static/plugins/underline/underline.js +0 -0
  89. package/static/plugins/underline/underline.min.js +0 -0
  90. package/static/redactorx.css +0 -0
  91. package/static/redactorx.min.css +0 -0
  92. package/static/redactorx.min.js +0 -0
  93. package/static/redactorx.usm.min.js +0 -0
  94. package/styles/test.sass +0 -0
  95. package/styles/test.scss +0 -0
  96. package/templates/unsupported.vue +0 -0
  97. package/utils/dom.js +0 -0
  98. package/utils/helper.js +0 -0
  99. package/utils/type.js +0 -0
package/LICENSE CHANGED
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
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
File without changes
File without changes
File without changes
File without changes
@@ -20,51 +20,29 @@ export default {
20
20
  return {
21
21
  otpLength: this.spec.length,
22
22
  otp: new Array(6).fill(''),
23
- hint: false
23
+ hint: false,
24
+ isValueChanged: false
24
25
  };
25
26
  },
26
- created() {
27
- if (this.spec.value) {
28
- const valueString = this.spec.value.toString();
29
-
30
- for (let i = 0; i < this.otpLength && i < valueString.length; i++) {
31
- this.otp[i] = valueString[i];
32
- }
33
-
34
- }
35
-
36
- },
37
- mounted() {
38
- if (this.spec.valueIf) {
39
- const valueString = this.fieldModel.toString();
40
-
41
- for (let i = 0; i < this.otpLength && i < valueString.length; i++) {
42
- this.otp[i] = valueString[i];
43
- }
44
- }
45
- },
46
27
  watch: {
47
- fieldModel(newFieldModel) {
48
- let valueString = '';
49
-
50
- if (newFieldModel !== '') {
51
- valueString = isNaN(newFieldModel) ? '' : parseInt(newFieldModel).toString();
52
- }
53
- this.otp = [];
54
- for (let i = 0; i < valueString.length; i++) {
55
- this.otp[i] = valueString[i];
56
- }
57
-
28
+ fieldModel: {
29
+ handler(val) {
30
+ this.updateOtp(val)
31
+ },
32
+ immediate: true
58
33
  }
59
34
  },
60
35
  methods: {
61
36
  $ready() {
62
- if (this.spec.value) {
63
- const valueString = this.spec.value.toString();
37
+ this.updateOtp(this.fieldModel)
38
+ },
39
+ updateOtp(val) {
40
+ if (!val) return;
64
41
 
65
- for (let i = 0; i < this.otpLength && i < valueString.length; i++) {
66
- this.otp[i] = valueString[i];
67
- }
42
+ const valueString = isNaN(val) ? '' : parseInt(val).toString();
43
+ this.otp = [];
44
+ for (let i = 0; i < this.otpLength && i < valueString.length; i++) {
45
+ this.otp[i] = valueString[i];
68
46
  }
69
47
  },
70
48
  onInput(index) {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -9,6 +9,8 @@ export default {
9
9
  fieldName: null,
10
10
  fieldModel: null,
11
11
  _show: true,
12
+ _watchers: [],
13
+ _isValueChanged: false,
12
14
  // Some components do not support null or empty string value, so we need to use an intermediary value.
13
15
  // See https://github.com/vuetifyjs/vuetify/issues/8876
14
16
  vuetifyEmptyString: "<EMPTY_STRING>"
@@ -57,33 +59,57 @@ export default {
57
59
  valueChanged = false;
58
60
  }
59
61
  this._linkFieldModels(valueChanged);
62
+ this._initConditional(oldSpec);
60
63
  }
61
64
  },
62
65
  immediate: true
63
66
  }
64
67
  },
65
- // watch showIf and valueIf
66
- mounted() {
67
- if (this.spec && this.spec.valueIf) {
68
- watchFieldModels(this.spec.valueIf, (value) => this.fieldModel = this.$sanitizeValue(this.$externalizeValue(value)));
69
- }
70
-
71
- if (this.spec && (this.spec.showIf || this.spec.loadIf)) {
72
- watchFieldModels(this.spec.showIf || this.spec.loadIf, (value) => {
73
- if (value) {
74
- this._show = true;
75
- } else {
76
- this._show = false;
77
- }
78
- });
79
- }
80
- },
81
68
  unmounted() {
82
69
  if (fieldModels[this.fieldName]) {
83
70
  delete fieldModels[this.fieldName];
84
71
  }
85
72
  },
86
73
  methods: {
74
+ _initConditional(oldSpec) {
75
+ // unreg old fieldName
76
+ if (oldSpec && fieldModels[oldSpec.name]) {
77
+ delete fieldModels[oldSpec.name];
78
+ }
79
+ // unreg watchers if there is
80
+ this._watchers.forEach(watcher => {
81
+ if (typeof watcher == Function) {
82
+ watcher();
83
+ }
84
+ });
85
+
86
+ let watcher1, watcher2;
87
+
88
+ // watch showIf & loadIf
89
+ if (this.spec && this.spec.valueIf) {
90
+ watcher1 = watchFieldModels(this.spec.valueIf, (value) => {
91
+ // prevent override spec.value
92
+ if (!this._isValueChanged && this.spec.value) {
93
+ this._isValueChanged = true;
94
+ return;
95
+ }
96
+
97
+ this.fieldModel = this.$sanitizeValue(this.$externalizeValue(value));
98
+ });
99
+ this._watchers.push(watcher1);
100
+ }
101
+
102
+ if (this.spec && (this.spec.showIf || this.spec.loadIf)) {
103
+ watcher2 = watchFieldModels(this.spec.showIf || this.spec.loadIf, (value) => {
104
+ if (value) {
105
+ this._show = true;
106
+ } else {
107
+ this._show = false;
108
+ }
109
+ });
110
+ this._watchers.push(watcher2);
111
+ }
112
+ },
87
113
  // TODO: Deprecated
88
114
  genericStyles(spec) {
89
115
  return this.$styles(spec);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/keys.js CHANGED
File without changes
package/nav/drawer.vue CHANGED
@@ -5,14 +5,15 @@
5
5
  <div :class="cssClasses" :style="style">
6
6
  <v-navigation-drawer v-model="state" app :dark="cssClasses.includes('dark') || null"
7
7
  :permanent="mdAndUp || cssClasses.includes('permanent')" :expand-on-hover="expandOnHover()"
8
- v-model:mini-variant="shrunk" @input="updateState">
8
+ v-model:mini-variant="shrunk" @input="updateState" @mouseenter="handleDrawerEnter" @mouseleave="handleDrawerLeave"
9
+ :class="isExpand ? 'left-menu-expand' : 'left-menu-shrink'">
9
10
 
10
11
  <template v-if="spec.header">
11
12
  <panels-responsive :spec="spec.header" />
12
13
  </template>
13
-
14
14
  <glib-component v-if="spec.body" :spec="spec.body" />
15
15
 
16
+
16
17
  <v-list :dense="true">
17
18
  <div v-for="(item, index) in spec.rows" :key="index" class="nav-item">
18
19
  <div v-if="item.type == 'button'" class="indicator"></div>
@@ -64,6 +65,7 @@ export default {
64
65
  state: null,
65
66
  mini: true,
66
67
  shrunk: true,
68
+ isExpand: false,
67
69
  };
68
70
  },
69
71
  computed: {
@@ -110,6 +112,13 @@ export default {
110
112
  expandOnHover() {
111
113
  return this.mini;
112
114
  },
115
+ handleDrawerEnter() {
116
+ this.isExpand = true;
117
+ },
118
+
119
+ handleDrawerLeave() {
120
+ this.isExpand = false;
121
+ },
113
122
  },
114
123
  };
115
124
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -41,4 +41,4 @@
41
41
  "prettier": "^1.18.2",
42
42
  "typescript": "^4.9.5"
43
43
  }
44
- }
44
+ }
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
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
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
File without changes
File without changes
File without changes
File without changes
File without changes
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/helper.js CHANGED
File without changes
package/utils/type.js CHANGED
File without changes