glib-web 3.4.3 → 3.4.4

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 (102) 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/close.js +0 -0
  22. package/actions/windows/closeAll.js +0 -0
  23. package/actions/windows/open.js +0 -0
  24. package/actions/windows/openWeb.js +0 -0
  25. package/actions/windows/print.js +0 -0
  26. package/actions/windows/reload.js +0 -0
  27. package/components/_message.vue +0 -0
  28. package/components/calendar.vue +0 -0
  29. package/components/fab.vue +0 -0
  30. package/components/fields/_otp.vue +88 -111
  31. package/components/fields/country/countries.js +0 -0
  32. package/components/fields/country/regions.js +0 -0
  33. package/components/fields/creditCard.vue +0 -0
  34. package/components/fields/googlePlace.vue +0 -0
  35. package/components/fields/phone/countries.js +0 -0
  36. package/components/fields/phone/sprite.css +0 -0
  37. package/components/fields/stripeToken.vue +0 -0
  38. package/components/h1.vue +0 -0
  39. package/components/h2.vue +0 -0
  40. package/components/h3.vue +0 -0
  41. package/components/h5.vue +0 -0
  42. package/components/h6.vue +0 -0
  43. package/components/hr.vue +0 -0
  44. package/components/html.vue +0 -0
  45. package/components/icon.vue +0 -0
  46. package/components/mixins/chart/annotation.js +0 -0
  47. package/components/mixins/chart/tooltip.js +0 -0
  48. package/components/mixins/dataset.js +0 -0
  49. package/components/mixins/extension.js +0 -0
  50. package/components/mixins/longClick.js +0 -0
  51. package/components/mixins/scrolling.js +0 -0
  52. package/components/mixins/table/export.js +0 -0
  53. package/components/mixins/table/import.js +0 -0
  54. package/components/mixins/text.js +0 -0
  55. package/components/multimedia/video.vue +0 -0
  56. package/components/panels/carousel.vue +0 -0
  57. package/components/panels/web.vue +0 -0
  58. package/components/spacer.vue +0 -0
  59. package/keys.js +0 -0
  60. package/package.json +1 -1
  61. package/static/plugins/alignment/alignment.js +0 -0
  62. package/static/plugins/alignment/alignment.min.js +0 -0
  63. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  64. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  65. package/static/plugins/blockcode/blockcode.js +0 -0
  66. package/static/plugins/blockcode/blockcode.min.js +0 -0
  67. package/static/plugins/clips/clips.js +0 -0
  68. package/static/plugins/clips/clips.min.js +0 -0
  69. package/static/plugins/counter/counter.js +0 -0
  70. package/static/plugins/counter/counter.min.js +0 -0
  71. package/static/plugins/definedlinks/definedlinks.js +0 -0
  72. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  73. package/static/plugins/handle/handle.js +0 -0
  74. package/static/plugins/handle/handle.min.js +0 -0
  75. package/static/plugins/icons/icons.js +0 -0
  76. package/static/plugins/icons/icons.min.js +0 -0
  77. package/static/plugins/imageposition/imageposition.js +0 -0
  78. package/static/plugins/imageposition/imageposition.min.js +0 -0
  79. package/static/plugins/inlineformat/inlineformat.js +0 -0
  80. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  81. package/static/plugins/removeformat/removeformat.js +0 -0
  82. package/static/plugins/removeformat/removeformat.min.js +0 -0
  83. package/static/plugins/selector/selector.js +0 -0
  84. package/static/plugins/selector/selector.min.js +0 -0
  85. package/static/plugins/specialchars/specialchars.js +0 -0
  86. package/static/plugins/specialchars/specialchars.min.js +0 -0
  87. package/static/plugins/textdirection/textdirection.js +0 -0
  88. package/static/plugins/textdirection/textdirection.min.js +0 -0
  89. package/static/plugins/textexpander/textexpander.js +0 -0
  90. package/static/plugins/textexpander/textexpander.min.js +0 -0
  91. package/static/plugins/underline/underline.js +0 -0
  92. package/static/plugins/underline/underline.min.js +0 -0
  93. package/static/redactorx.css +0 -0
  94. package/static/redactorx.min.css +0 -0
  95. package/static/redactorx.min.js +0 -0
  96. package/static/redactorx.usm.min.js +0 -0
  97. package/styles/test.sass +0 -0
  98. package/styles/test.scss +0 -0
  99. package/templates/unsupported.vue +0 -0
  100. package/utils/dom.js +0 -0
  101. package/utils/helper.js +0 -0
  102. 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
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,161 +1,138 @@
1
1
  <template>
2
2
  <div :style="$styles()" :class="$classes()">
3
- <div v-if="spec.type === 'text'">
4
- <input v-for="(digit, index) in digits" ref="input" :key="index" v-model="val[index]" type="text" maxlength="1"
5
- class="otp-input" @input="handleInput($event, index)" @keydown="handleKeydown($event, index)"
6
- @paste="handlePaste($event, index)" @focus="handleFocus($event, index)" @blur="handleBlur($event, index)"
7
- @click="handleClick($event)" />
8
- <label class="hint">{{ spec.hint }}</label>
3
+ <div>
4
+ <div v-for="i in otpLength" :key="i" class="otp-input">
5
+ <input v-model="otp[i - 1]" :id="'otp-' + i" :maxlength="1" @input="onInput(i)" @keydown="onKeyDown(i, $event)"
6
+ @focus="onFocus(i)" @paste="onPaste(i, $event)" ref="otpInput" type="text" />
7
+ </div>
8
+ <input type="hidden" :name="fieldName" v-model="fieldModel" />
9
9
  </div>
10
- <div v-else>
11
- <input v-for="(digit, index) in digits" :key="index" ref="input" :value="val[index]" type="number"
12
- oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
13
- maxlength="1" class="otp-input" @input="handleInput($event, index)" @keydown="handleKeydown($event, index)"
14
- @paste="handlePaste($event, index)" @focus="handleFocus($event, index)" @blur="handleBlur($event, index)"
15
- @click="handleClick($event)" />
16
- <label class="hint">{{ spec.hint }}</label>
17
- </div>
18
- <input type="hidden" :name="fieldName" v-model="fieldModel" />
10
+ <label class="hint" v-if="hint == true">{{ spec.hint }}</label>
19
11
  </div>
20
12
  </template>
21
13
 
22
14
  <script>
23
- import bus from '../../utils/eventBus'
24
-
25
15
  export default {
26
16
  props: {
27
17
  spec: { type: Object, required: true }
28
18
  },
29
19
  data() {
30
20
  return {
31
- otp: (this.spec.value || '').toString().split(""),
32
- alignment: this.spec.align === null ? 'left' : this.spec.align
33
- }
21
+ otpLength: this.spec.length,
22
+ otp: new Array(6).fill(''),
23
+ hint: false
24
+ };
34
25
  },
35
- computed: {
36
- otpValue() {
37
- if (!this.otp) return ''
26
+ // created() {
27
+ // if (this.spec.value) {
28
+ // const valueString = this.spec.value.toString();
38
29
 
39
- // concatenate the digits into a single string
40
- return this.otp.join("");
41
- },
42
- digits() {
43
- return this.spec.length
44
- },
45
- val() {
46
- const field = this.fieldModel == null ? [] : this.fieldModel.toString().split("")
30
+ // for (let i = 0; i < this.otpLength && i < valueString.length; i++) {
31
+ // this.otp[i] = valueString[i];
32
+ // }
47
33
 
48
- if (this.alignment === 'right') {
49
- if (this.spec.valueIf == null) {
50
- if (this.digits > this.otp.length && this.otp.length != 0) {
51
- const results = []
52
- for (let i = 0; i < (this.digits - this.otp.length); i++) {
53
- results.push('')
54
- }
55
- return Reflect.apply(Array.prototype.concat, results, this.otp)
56
- } else {
57
- return field
58
- }
59
- } else {
60
- return field
61
- }
62
- } else {
63
- if (this.spec.valueIf == null) {
64
- return this.otp
65
- } else {
66
- return field
67
- }
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];
68
43
  }
69
- },
44
+ }
70
45
  },
71
- methods: {
72
- created() {
73
- this.fieldModel = this.otpValue;
74
- },
75
- handleInput(event, index) {
76
- if (event.target.value.length === 1) {
77
- this.focusNext(index);
46
+ watch: {
47
+ fieldModel(newFieldModel) {
48
+ let valueString = '';
49
+
50
+ if (newFieldModel !== '') {
51
+ valueString = isNaN(newFieldModel) ? '' : parseInt(newFieldModel).toString();
78
52
  }
79
- this.val[index] = event.target.value;
80
- this.fieldModel = this.otp.join("");
81
- },
82
- handleKeydown(event, index) {
83
- if (event.key === "Backspace") {
84
- event.preventDefault();
85
- if (this.otp[index] !== "") {
86
- this.otp[index] = ""
87
- } else {
88
- this.focusPrevious(index);
89
- this.otp[index - 1] = ""
53
+ this.otp = []
54
+ for (let i = 0; i < valueString.length; i++) {
55
+ this.otp[i] = valueString[i];
56
+ }
57
+
58
+ }
59
+ },
60
+ methods: {
61
+ $ready() {
62
+ if (this.spec.value) {
63
+ const valueString = this.spec.value.toString();
64
+
65
+ for (let i = 0; i < this.otpLength && i < valueString.length; i++) {
66
+ this.otp[i] = valueString[i];
90
67
  }
91
68
  }
92
69
  },
93
- handlePaste(event, index) {
94
- event.preventDefault();
95
- const pasted = event.clipboardData
96
- .getData("text")
97
- .slice(0, this.digits - index);
98
- for (let i = 0; i < pasted.length; i++) {
99
- this.$set(this.otp, index + i, pasted[i]);
70
+ onInput(index) {
71
+ if (this.otp[index - 1] && index < this.otpLength) {
72
+ this.$refs['otpInput'][index].focus();
100
73
  }
101
- this.focusNext(index + pasted.length - 1);
102
- },
103
- handleFocus(event, index) {
104
- if (index > 0 && this.otp[index - 1] === "") {
105
- this.focusPrevious(index);
74
+ this.fieldModel = this.otp.join("");
75
+ if (this.spec.hint) {
76
+ this.hint = true
106
77
  }
107
78
  },
108
- handleBlur(event, index) {
109
- if (this.otp.filter(digit => digit === "").length === 0) {
110
- bus.$emit("complete", this.otp.join(""));
79
+ onKeyDown(index, event) {
80
+ if (event.key === 'Backspace' && !this.otp[index - 1] && index > 1) {
81
+ this.$refs['otpInput'][index - 2].focus();
111
82
  }
112
83
  },
113
- focusNext(index) {
114
- if (index < this.digits - 1) {
115
- this.$refs.input[index + 1].focus();
84
+ onFocus(index) {
85
+ if (this.otp[index - 1]) {
86
+ this.$refs['otpInput'][index - 1].select();
116
87
  }
117
88
  },
118
- focusPrevious(index) {
119
- if (index > 0) {
120
- this.$refs.input[index - 1].focus();
89
+ onPaste(index, event) {
90
+ event.preventDefault();
91
+ const clipboardData = event.clipboardData.getData('text');
92
+ const clipboardDigits = clipboardData.replace(/\D/g, '');
93
+ const remainingLength = this.otpLength - index + 1;
94
+ const pasteDigits = clipboardDigits.slice(0, remainingLength);
95
+
96
+ for (let i = 0; i < pasteDigits.length; i++) {
97
+ this.otp[index - 1 + i] = pasteDigits[i];
121
98
  }
122
- },
123
- handleClick(event) {
124
- event.target.select();
99
+
100
+ this.$refs['otpInput'][this.otpLength - 1].focus();
125
101
  }
126
- }
102
+ },
127
103
  };
128
104
  </script>
105
+
129
106
  <style scoped>
130
107
  .otp-input {
108
+ display: inline-block;
109
+ width: 2rem;
110
+ text-align: center;
111
+ margin-right: 8px;
112
+ margin-bottom: 8px;
113
+ }
114
+
115
+ input {
131
116
  border: 1px solid #47495f;
132
117
  text-align: center;
133
118
  width: 50px;
134
119
  height: 50px;
135
120
  border-radius: 4px;
136
121
  font-size: 24px;
137
- margin: 8px;
138
122
  }
139
123
 
140
- /* Chrome, Safari, Edge, Opera */
141
- input::-webkit-outer-spin-button,
142
- input::-webkit-inner-spin-button {
124
+ input[type="number"]::-webkit-inner-spin-button,
125
+ input[type="number"]::-webkit-outer-spin-button {
143
126
  -webkit-appearance: none;
144
127
  margin: 0;
145
128
  }
146
129
 
147
- /* Firefox */
148
- input[type="number"] {
149
- -moz-appearance: textfield;
150
- }
151
-
152
- .hint {
153
- display: none;
154
- }
130
+ @media (max-width: 768px) {
131
+ .otp-input {
132
+ width: 1rem;
133
+ margin-right: 24px;
134
+ margin-bottom: 24px;
135
+ }
155
136
 
156
- input:focus~.hint,
157
- input:focus-visible~.hint {
158
- display: block;
159
- padding: 8px 16px;
160
137
  }
161
138
  </style>
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
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "3.4.3",
3
+ "version": "3.4.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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