glib-web 3.2.0 → 3.3.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/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/alert.js +0 -0
  6. package/actions/dialogs/close.js +0 -0
  7. package/actions/dialogs/notification.js +0 -0
  8. package/actions/dialogs/oauth.js +0 -0
  9. package/actions/dialogs/open.js +0 -0
  10. package/actions/dialogs/options.js +0 -0
  11. package/actions/dialogs/reload.js +0 -0
  12. package/actions/dialogs/show.js +0 -0
  13. package/actions/http/delete.js +0 -0
  14. package/actions/http/patch.js +0 -0
  15. package/actions/http/post.js +0 -0
  16. package/actions/http/put.js +0 -0
  17. package/actions/runMultiple.js +0 -0
  18. package/actions/sheets/select.js +0 -0
  19. package/actions/snackbars/alert.js +0 -0
  20. package/actions/snackbars/select.js +0 -0
  21. package/actions/timeouts/set.js +0 -0
  22. package/actions/windows/close.js +0 -0
  23. package/actions/windows/closeAll.js +0 -0
  24. package/actions/windows/open.js +0 -0
  25. package/actions/windows/openWeb.js +0 -0
  26. package/actions/windows/print.js +0 -0
  27. package/actions/windows/reload.js +0 -0
  28. package/components/_message.vue +0 -0
  29. package/components/calendar.vue +0 -0
  30. package/components/charts/area.vue +4 -2
  31. package/components/charts/column.vue +2 -1
  32. package/components/charts/line.vue +2 -1
  33. package/components/charts/pie.vue +2 -1
  34. package/components/fab.vue +0 -0
  35. package/components/fields/_otp.vue +160 -0
  36. package/components/fields/country/countries.js +0 -0
  37. package/components/fields/country/regions.js +0 -0
  38. package/components/fields/creditCard.vue +0 -0
  39. package/components/fields/googlePlace.vue +0 -0
  40. package/components/fields/location.vue +0 -0
  41. package/components/fields/otpField.vue +10 -116
  42. package/components/fields/phone/countries.js +0 -0
  43. package/components/fields/phone/sprite.css +0 -0
  44. package/components/fields/stripeToken.vue +0 -0
  45. package/components/h1.vue +0 -0
  46. package/components/h2.vue +0 -0
  47. package/components/h3.vue +0 -0
  48. package/components/h5.vue +0 -0
  49. package/components/h6.vue +0 -0
  50. package/components/hr.vue +0 -0
  51. package/components/html.vue +0 -0
  52. package/components/icon.vue +0 -0
  53. package/components/mixins/chart/annotation.js +0 -0
  54. package/components/mixins/chart/tooltip.js +0 -0
  55. package/components/mixins/dataset.js +0 -0
  56. package/components/mixins/extension.js +0 -0
  57. package/components/mixins/longClick.js +0 -0
  58. package/components/mixins/scrolling.js +0 -0
  59. package/components/mixins/table/export.js +0 -0
  60. package/components/mixins/table/import.js +0 -0
  61. package/components/mixins/text.js +0 -0
  62. package/components/multimedia/video.vue +0 -0
  63. package/components/panels/carousel.vue +0 -0
  64. package/components/panels/web.vue +0 -0
  65. package/components/spacer.vue +0 -0
  66. package/keys.js +0 -0
  67. package/package.json +1 -1
  68. package/static/plugins/alignment/alignment.js +0 -0
  69. package/static/plugins/alignment/alignment.min.js +0 -0
  70. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  71. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  72. package/static/plugins/blockcode/blockcode.js +0 -0
  73. package/static/plugins/blockcode/blockcode.min.js +0 -0
  74. package/static/plugins/clips/clips.js +0 -0
  75. package/static/plugins/clips/clips.min.js +0 -0
  76. package/static/plugins/counter/counter.js +0 -0
  77. package/static/plugins/counter/counter.min.js +0 -0
  78. package/static/plugins/definedlinks/definedlinks.js +0 -0
  79. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  80. package/static/plugins/handle/handle.js +0 -0
  81. package/static/plugins/handle/handle.min.js +0 -0
  82. package/static/plugins/icons/icons.js +0 -0
  83. package/static/plugins/icons/icons.min.js +0 -0
  84. package/static/plugins/imageposition/imageposition.js +0 -0
  85. package/static/plugins/imageposition/imageposition.min.js +0 -0
  86. package/static/plugins/inlineformat/inlineformat.js +0 -0
  87. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  88. package/static/plugins/removeformat/removeformat.js +0 -0
  89. package/static/plugins/removeformat/removeformat.min.js +0 -0
  90. package/static/plugins/selector/selector.js +0 -0
  91. package/static/plugins/selector/selector.min.js +0 -0
  92. package/static/plugins/specialchars/specialchars.js +0 -0
  93. package/static/plugins/specialchars/specialchars.min.js +0 -0
  94. package/static/plugins/textdirection/textdirection.js +0 -0
  95. package/static/plugins/textdirection/textdirection.min.js +0 -0
  96. package/static/plugins/textexpander/textexpander.js +0 -0
  97. package/static/plugins/textexpander/textexpander.min.js +0 -0
  98. package/static/plugins/underline/underline.js +0 -0
  99. package/static/plugins/underline/underline.min.js +0 -0
  100. package/static/redactorx.css +0 -0
  101. package/static/redactorx.min.css +0 -0
  102. package/static/redactorx.min.js +0 -0
  103. package/static/redactorx.usm.min.js +0 -0
  104. package/styles/test.sass +0 -0
  105. package/styles/test.scss +0 -0
  106. package/templates/_menu.vue +0 -0
  107. package/templates/unsupported.vue +0 -0
  108. package/utils/dom.js +0 -0
  109. package/utils/helper.js +0 -0
  110. 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,5 +1,7 @@
1
1
  <template>
2
- <area-chart :style="genericStyles()" :class="$classes()" :data="series"></area-chart>
2
+ <div>
3
+ <area-chart :style="genericStyles()" :class="$classes()" :data="series" :colors="color">></area-chart>
4
+ </div>
3
5
  </template>
4
6
 
5
7
  <script setup>
@@ -7,6 +9,6 @@ import { computed } from 'vue';
7
9
  import { singleDataSeries } from './series';
8
10
 
9
11
  const { spec } = defineProps({ spec: Object })
10
-
12
+ const color = spec.colors == null ? '' : [spec.colors]
11
13
  const series = computed(() => singleDataSeries(spec.dataSeries))
12
14
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <column-chart :data="series" :stacked="spec.stacked"></column-chart>
2
+ <column-chart :data="series" :stacked="spec.stacked" :colors="color"></column-chart>
3
3
  </template>
4
4
 
5
5
  <script setup>
@@ -8,6 +8,7 @@ import { computed } from 'vue';
8
8
  import { multipleDataSeries } from './series';
9
9
 
10
10
  const { spec } = defineProps({ spec: Object })
11
+ const color = spec.colors == null ? '' : spec.colors
11
12
  const series = computed(() => multipleDataSeries(spec.dataGroups))
12
13
 
13
14
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <line-chart :style="genericStyles()" :class="$classes()" :data="series"></line-chart>
2
+ <line-chart :style="genericStyles()" :class="$classes()" :data="series" :colors="color"></line-chart>
3
3
  </template>
4
4
 
5
5
  <script setup>
@@ -7,6 +7,7 @@ import { computed } from 'vue';
7
7
  import { multipleDataSeries } from './series';
8
8
 
9
9
  const { spec } = defineProps({ spec: Object })
10
+ const color = spec.colors == null ? '' : spec.colors
10
11
 
11
12
  const series = computed(() => multipleDataSeries(spec.dataSeries))
12
13
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <pie-chart :style="genericStyles()" :class="$classes()" :data="series"></pie-chart>
2
+ <pie-chart :style="genericStyles()" :class="$classes()" :data="series" :colors="color"></pie-chart>
3
3
  </template>
4
4
 
5
5
  <script setup>
@@ -7,6 +7,7 @@ import { computed } from 'vue';
7
7
  import { singleDataSeries } from './series';
8
8
 
9
9
  const { spec } = defineProps({ spec: Object })
10
+ const color = spec.colors == null ? '' : spec.colors
10
11
  const series = computed(() => singleDataSeries(spec.dataSeries))
11
12
 
12
13
  </script>
File without changes
@@ -0,0 +1,160 @@
1
+ <template>
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>
9
+ </div>
10
+ <div v-else>
11
+ <input v-for="(digit, index) in digits" ref="input" :key="index" v-model="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" />
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+ import bus from '../../utils/eventBus'
24
+
25
+ export default {
26
+ props: {
27
+ spec: { type: Object, required: true }
28
+ },
29
+ data() {
30
+ return {
31
+ otp: (this.spec.value || '').toString().split(""),
32
+ alignment: this.spec.align === null ? 'left' : this.spec.align
33
+ }
34
+ },
35
+ computed: {
36
+ otpValue() {
37
+ if (!this.otp) return ''
38
+
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("")
47
+
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
+ }
68
+ }
69
+ },
70
+ },
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);
78
+ }
79
+ this.fieldModel = this.otp.join("");
80
+ },
81
+ handleKeydown(event, index) {
82
+ if (event.key === "Backspace") {
83
+ event.preventDefault();
84
+ if (this.otp[index] !== "") {
85
+ this.otp[index] = ""
86
+ } else {
87
+ this.focusPrevious(index);
88
+ this.otp[index - 1] = ""
89
+ }
90
+ }
91
+ },
92
+ handlePaste(event, index) {
93
+ event.preventDefault();
94
+ const pasted = event.clipboardData
95
+ .getData("text")
96
+ .slice(0, this.digits - index);
97
+ for (let i = 0; i < pasted.length; i++) {
98
+ this.$set(this.otp, index + i, pasted[i]);
99
+ }
100
+ this.focusNext(index + pasted.length - 1);
101
+ },
102
+ handleFocus(event, index) {
103
+ if (index > 0 && this.otp[index - 1] === "") {
104
+ this.focusPrevious(index);
105
+ }
106
+ },
107
+ handleBlur(event, index) {
108
+ if (this.otp.filter(digit => digit === "").length === 0) {
109
+ bus.$emit("complete", this.otp.join(""));
110
+ }
111
+ },
112
+ focusNext(index) {
113
+ if (index < this.digits - 1) {
114
+ this.$refs.input[index + 1].focus();
115
+ }
116
+ },
117
+ focusPrevious(index) {
118
+ if (index > 0) {
119
+ this.$refs.input[index - 1].focus();
120
+ }
121
+ },
122
+ handleClick(event) {
123
+ event.target.select();
124
+ }
125
+ }
126
+ };
127
+ </script>
128
+ <style scoped>
129
+ .otp-input {
130
+ border: 1px solid #47495f;
131
+ text-align: center;
132
+ width: 50px;
133
+ height: 50px;
134
+ border-radius: 4px;
135
+ font-size: 24px;
136
+ margin: 8px;
137
+ }
138
+
139
+ /* Chrome, Safari, Edge, Opera */
140
+ input::-webkit-outer-spin-button,
141
+ input::-webkit-inner-spin-button {
142
+ -webkit-appearance: none;
143
+ margin: 0;
144
+ }
145
+
146
+ /* Firefox */
147
+ input[type="number"] {
148
+ -moz-appearance: textfield;
149
+ }
150
+
151
+ .hint {
152
+ display: none;
153
+ }
154
+
155
+ input:focus~.hint,
156
+ input:focus-visible~.hint {
157
+ display: block;
158
+ padding: 8px 16px;
159
+ }
160
+ </style>
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,130 +1,24 @@
1
1
  <template>
2
- <div>
3
- <div v-if="spec.type === 'text'">
4
- <input v-for="(digit, index) in digits" ref="input" :key="index" v-model="otp[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>
9
- </div>
10
- <div v-else>
11
- <input v-for="(digit, index) in digits" ref="input" :key="index" v-model="otp[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="spec.name" :value="otpValue" />
19
- </div>
2
+ <fields-otp :spec="spec" />
20
3
  </template>
21
4
 
22
5
  <script>
23
- import bus from '../../utils/eventBus'
6
+ import OtpField from "./_otp.vue";
24
7
 
25
8
  export default {
9
+ components: {
10
+ // Need to start with `fields-` to enable jsonlogic in `styles.js#_linkFieldModels`
11
+ "fields-otp": OtpField,
12
+ },
26
13
  props: {
27
- spec: { type: Object, required: true }
14
+ spec: { type: Object, required: true },
28
15
  },
29
16
  data() {
30
17
  return {
31
- otp: (this.spec.value || '').toString().split("")
32
- }
33
- },
34
- computed: {
35
- otpValue() {
36
- if (!this.otp) return ''
37
-
38
- // concatenate the digits into a single string
39
- return this.otp.join("");
40
- },
41
- digits() {
42
- return this.spec.length
43
- },
18
+ value: null,
19
+ };
44
20
  },
45
- methods: {
46
- handleInput(event, index) {
47
- if (event.target.value.length === 1) {
48
- this.focusNext(index);
49
- }
50
- },
51
- handleKeydown(event, index) {
52
- if (event.key === "Backspace") {
53
- event.preventDefault();
54
- if (this.otp[index] !== "") {
55
- this.otp[index] = ""
56
- } else {
57
- this.focusPrevious(index);
58
- this.otp[index - 1] = ""
59
- }
60
- }
61
- },
62
- handlePaste(event, index) {
63
- event.preventDefault();
64
- const pasted = event.clipboardData
65
- .getData("text")
66
- .slice(0, this.digits - index);
67
- for (let i = 0; i < pasted.length; i++) {
68
- this.$set(this.otp, index + i, pasted[i]);
69
- }
70
- this.focusNext(index + pasted.length - 1);
71
- },
72
- handleFocus(event, index) {
73
- if (index > 0 && this.otp[index - 1] === "") {
74
- this.focusPrevious(index);
75
- }
76
- },
77
- handleBlur(event, index) {
78
- if (this.otp.filter(digit => digit === "").length === 0) {
79
- bus.$emit("complete", this.otp.join(""));
80
- }
81
- },
82
- focusNext(index) {
83
- if (index < this.digits - 1) {
84
- this.$refs.input[index + 1].focus();
85
- }
86
- },
87
- focusPrevious(index) {
88
- if (index > 0) {
89
- this.$refs.input[index - 1].focus();
90
- }
91
- },
92
- handleClick(event) {
93
- event.target.select();
94
- }
95
- }
96
21
  };
97
22
  </script>
98
- <style scoped>
99
- .otp-input {
100
- border: 1px solid #47495f;
101
- text-align: center;
102
- width: 50px;
103
- height: 50px;
104
- border-radius: 4px;
105
- font-size: 24px;
106
- margin: 8px;
107
- }
108
-
109
- /* Chrome, Safari, Edge, Opera */
110
- input::-webkit-outer-spin-button,
111
- input::-webkit-inner-spin-button {
112
- -webkit-appearance: none;
113
- margin: 0;
114
- }
115
-
116
- /* Firefox */
117
- input[type="number"] {
118
- -moz-appearance: textfield;
119
- }
120
-
121
- .hint {
122
- display: none;
123
- }
124
23
 
125
- input:focus~.hint,
126
- input:focus-visible~.hint {
127
- display: block;
128
- padding: 8px 16px;
129
- }
130
- </style>
24
+ <style scoped></style>
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.2.0",
3
+ "version": "3.3.0",
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
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