@avakhula/ui 0.0.345 → 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.345",
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",
@@ -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() {