@avakhula/ui 0.0.344 → 0.0.346

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avakhula/ui",
3
- "version": "0.0.344",
3
+ "version": "0.0.346",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -5,6 +5,8 @@
5
5
  </template>
6
6
  </ib-select>
7
7
 
8
+ <ib-text-editor :character-limit="40" name="test-name" character-limit-error-message="limit error"></ib-text-editor>
9
+
8
10
 
9
11
  </template>
10
12
 
@@ -12,7 +14,7 @@
12
14
  import IbSelect from "./components/TreeSelect/Select.vue";
13
15
  import label from "@/components/Form/Label/Label.vue";
14
16
  import {IbCheckboxGroup} from "./index.js";
15
- import {IbRadio} from "./index.js";
17
+ import {IbRadio, IbTextEditor} from "./index.js";
16
18
  const testData1 = [
17
19
  {
18
20
  id: "1",
@@ -20,9 +22,9 @@ const testData1 = [
20
22
  is_category: true,
21
23
  initiallyVisible: true,
22
24
  visible: true,
23
- isDisabled: false,
24
- checked: true,
25
- isChildrenVisible: true,
25
+ isDisabled: true,
26
+ checked: false,
27
+ isChildrenVisible: false,
26
28
  },
27
29
  {
28
30
  id: "2",
@@ -30,7 +32,7 @@ const testData1 = [
30
32
  is_category: true,
31
33
  initiallyVisible: true,
32
34
  visible: true,
33
- isDisabled: false,
35
+ isDisabled: true,
34
36
  checked: false,
35
37
  isChildrenVisible: true,
36
38
  },
@@ -60,7 +62,7 @@ const testData1 = [
60
62
  is_category: true,
61
63
  initiallyVisible: true,
62
64
  visible: true,
63
- isDisabled: false,
65
+ isDisabled: true,
64
66
  checked: false,
65
67
  isChildrenVisible: true,
66
68
  },
@@ -123,7 +125,7 @@ const testData1 = [
123
125
  is_category: true,
124
126
  initiallyVisible: true,
125
127
  visible: true,
126
- isDisabled: false,
128
+ isDisabled: true,
127
129
  checked: false,
128
130
  isChildrenVisible: true,
129
131
  },
@@ -140,6 +142,6 @@ export default {
140
142
  checked: '1'
141
143
  }
142
144
  },
143
- components: {IbSelect, IbCheckboxGroup, IbRadio}
145
+ components: {IbTextEditor, IbSelect, IbCheckboxGroup, IbRadio}
144
146
  }
145
147
  </script>
@@ -23,6 +23,8 @@
23
23
  {{ characterLimitErrorMessage }}
24
24
  </ib-alert>
25
25
 
26
+ <input :name="name" type="hidden" :disabled="disable" :value="data">
27
+
26
28
  <div class="ib-text-editor-wrapper" :class="{ disable: disable }">
27
29
  <div
28
30
  class="ib-text-editor"
@@ -134,27 +136,27 @@
134
136
  </template>
135
137
 
136
138
  <script>
137
- import { QuillEditor, Quill } from "@vueup/vue-quill";
139
+ import {Quill, QuillEditor} from "@vueup/vue-quill";
138
140
  import IbIconButton from "../../IconButton/IconButton.vue";
139
141
  import IbAlert from "../../Alert/Alert.vue";
140
142
  import IbCharacterCount from "../CharactersCount.vue";
141
- import { AlphabetList, AlphabetListItem } from "./plugins/alphabetList";
143
+ import {AlphabetList, AlphabetListItem} from "./plugins/alphabetList";
142
144
  import "@vueup/vue-quill/dist/vue-quill.snow.css";
143
145
 
144
146
  import {
147
+ ALIGN_CENTER,
148
+ ALIGN_JUSTIFY,
149
+ ALIGN_LEFT,
150
+ ALIGN_RIGHT,
145
151
  BOLD,
146
- ITALIC,
147
- UNDERLINE,
148
- STRIKE,
149
152
  CODE,
153
+ ITALIC,
150
154
  LINK,
151
- ALIGN_LEFT,
152
- ALIGN_CENTER,
153
- ALIGN_RIGHT,
154
- ALIGN_JUSTIFY,
155
- LIST_ORDERED,
156
- LIST_BULLET,
157
155
  LIST_ALPHABET,
156
+ LIST_BULLET,
157
+ LIST_ORDERED,
158
+ STRIKE,
159
+ UNDERLINE,
158
160
  } from "./icons/toolbarIcons";
159
161
 
160
162
  const icons = Quill.import("ui/icons");
@@ -183,6 +185,10 @@ Quill.debug("error");
183
185
  export default {
184
186
  name: "IbTextEditor",
185
187
  props: {
188
+ name: {
189
+ type: String,
190
+ required: true
191
+ },
186
192
  placeholder: {
187
193
  type: String,
188
194
  default: "",
@@ -234,6 +240,7 @@ export default {
234
240
  type: String,
235
241
  },
236
242
  },
243
+ emits: ['onOverLimitHandler'],
237
244
  mounted() {
238
245
  // Reset default styles for toolbar
239
246
  this.$refs.toolbar.classList.remove("ql-toolbar");
@@ -258,6 +265,9 @@ export default {
258
265
  data(val) {
259
266
  this.$emit("update:modelValue", val);
260
267
  },
268
+ characterOverLimit(value) {
269
+ this.$emit('onOverLimitHandler', value);
270
+ }
261
271
  },
262
272
  methods: {
263
273
  onChange() {
@@ -4,6 +4,7 @@
4
4
  <ib-select
5
5
  classList="report-limit-selector-select"
6
6
  :value="value"
7
+ :vertical="vertical"
7
8
  :options="prepareOptions"
8
9
  :is-multiple="false"
9
10
  :show-clear-button="false"
@@ -25,6 +26,9 @@ export default {
25
26
  value: {
26
27
  type: Number,
27
28
  },
29
+ vertical: {
30
+ type: String
31
+ },
28
32
  options: {
29
33
  type: Array,
30
34
  default: () => [10, 25, 50, 100],
@@ -3,6 +3,7 @@
3
3
  <ib-limit-selector
4
4
  @select="changeLimit"
5
5
  :value="limitValue"
6
+ :vertical="vertical"
6
7
  :label-select="labelSelect"
7
8
  ></ib-limit-selector>
8
9
 
@@ -104,6 +105,9 @@ export default {
104
105
  type: Boolean,
105
106
  default: true,
106
107
  },
108
+ vertical: {
109
+ type: String
110
+ }
107
111
  },
108
112
  data() {
109
113
  return {
@@ -13,7 +13,9 @@
13
13
  :disabled="isLoading || disable"
14
14
  :is-resizable="isResizable"
15
15
  :vertical="verticalVal"
16
- :class="disable ? 'disable' : ''"
16
+ :class="{
17
+ disable: disable
18
+ }"
17
19
  ref="dropdown"
18
20
  @close="onClose"
19
21
  @open="onOpen"
@@ -424,7 +426,7 @@ export default {
424
426
  },
425
427
  disable: {
426
428
  type: Boolean,
427
- default: true
429
+ default: false
428
430
  }
429
431
  },
430
432
  emits: [
@@ -742,7 +744,6 @@ export default {
742
744
  typeof option.visible === "undefined" ? true : option.visible;
743
745
  option.visible = option.initiallyVisible;
744
746
  option.readonly = option.readonly ? true : false;
745
- option.isDisabled = false;
746
747
 
747
748
  option.checked = this.isMultiple
748
749
  ? this.val !== null &&
@@ -205,4 +205,8 @@ $option-checked-hover-bg: $blue-50;
205
205
  }
206
206
  }
207
207
  }
208
+
209
+ .disabled {
210
+ color: $neutral-500 !important;
211
+ }
208
212
  }