@avakhula/ui 0.1.19 → 0.1.21
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/dist/index.css +1 -0
- package/dist/index.js +13657 -12664
- package/dist/index.umd.cjs +92 -84
- package/package.json +6 -5
- package/src/App.vue +6 -2
- package/src/assets/scss/mixins/dropdown-list-item.scss +3 -3
- package/src/assets/scss/mixins/tooltip-position.scss +7 -0
- package/src/assets/scss/mixins.scss +2 -2
- package/src/assets/scss/style.scss +4 -4
- package/src/assets/scss/typography.scss +3 -3
- package/src/components/Accordion/Accordion.scss +3 -3
- package/src/components/Accordion/Accordion.vue +2 -2
- package/src/components/Alert/Alert.vue +1 -1
- package/src/components/Alert/alert.scss +2 -2
- package/src/components/Avatar/Avatar.vue +2 -2
- package/src/components/Badge/Badge.vue +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.vue +7 -2
- package/src/components/Breadcrumbs/breadcrumbs.scss +5 -5
- package/src/components/Button/Button.vue +2 -2
- package/src/components/Button/button.scss +3 -3
- package/src/components/Chips/Chips.vue +3 -3
- package/src/components/Dropdown/Dropdown.spec.js +0 -0
- package/src/components/Dropdown/Dropdown.vue +104 -27
- package/src/components/Dropdown/DropdownDivider.vue +1 -1
- package/src/components/Dropdown/DropdownItem.vue +1 -1
- package/src/components/Dropdown/DropdownList.vue +16 -2
- package/src/components/Form/CharactersCount.vue +2 -2
- package/src/components/Form/Checkbox/Checkbox.scss +4 -4
- package/src/components/Form/Checkbox/Checkbox.vue +1 -1
- package/src/components/Form/DatePicker/DatePicker.scss +4 -4
- package/src/components/Form/DatePicker/DatePicker.vue +1 -1
- package/src/components/Form/FormGroup/FormGroup.vue +2 -2
- package/src/components/Form/FormGroup/FormGroupSet.vue +1 -1
- package/src/components/Form/Input/Input.vue +7 -4
- package/src/components/Form/Input/input.scss +3 -3
- package/src/components/Form/Label/Label.vue +2 -2
- package/src/components/Form/PhoneInput/PhoneInput.vue +56 -21
- package/src/components/Form/PhoneInput/phoneInput.scss +4 -4
- package/src/components/Form/Radio/Radio.vue +1 -1
- package/src/components/Form/Radio/radio.scss +3 -3
- package/src/components/Form/TextEditor/TextEditor.vue +27 -168
- package/src/components/Form/TextEditor/Toolbar.vue +723 -0
- package/src/components/Form/TextEditor/icons/toolbarIcons.js +8 -0
- package/src/components/Form/TextEditor/plugins/imageBlot.js +23 -0
- package/src/components/Form/TextEditor/setupTextEditor.js +71 -0
- package/src/components/Form/TextEditor/textEditor.scss +9 -357
- package/src/components/Form/Textarea/Textarea.spec.js +0 -0
- package/src/components/Form/Textarea/Textarea.vue +2 -1
- package/src/components/Form/Textarea/textarea.scss +3 -3
- package/src/components/Form/Toggle/Toggle.vue +1 -1
- package/src/components/Form/Toggle/toggle.scss +3 -3
- package/src/components/IconButton/IconButton.scss +2 -2
- package/src/components/IconButton/IconButton.vue +6 -4
- package/src/components/List.vue +1 -1
- package/src/components/Modal/Modal.vue +85 -49
- package/src/components/Pagination/Pagination.vue +28 -3
- package/src/components/Pagination/pagination.scss +20 -4
- package/src/components/Panel/Panel.vue +4 -4
- package/src/components/Popover/Popover.vue +7 -2
- package/src/components/Popover/popover.scss +3 -3
- package/src/components/ProgressBar/ProgressBar.vue +1 -1
- package/src/components/ProgressBar/progressBar.scss +1 -1
- package/src/components/Sorting/Sorting.vue +1 -1
- package/src/components/Sorting/sorting.scss +5 -5
- package/src/components/SplitButton/SplitButton.vue +1 -1
- package/src/components/SplitButton/SplitButtonItem.vue +1 -1
- package/src/components/SplitButton/splitButton.scss +3 -3
- package/src/components/StatusIndicator/StatusIndicator.vue +2 -2
- package/src/components/Table/Cells/Cell.vue +2 -2
- package/src/components/Table/Cells/CheckboxCell.vue +0 -0
- package/src/components/Table/Row.vue +1 -1
- package/src/components/Table/Table.stories.js +0 -0
- package/src/components/Table/Table.vue +0 -0
- package/src/components/Tabs/Tab.vue +0 -0
- package/src/components/Tabs/TabDropdown.vue +1 -1
- package/src/components/Tabs/Tabs.vue +9 -5
- package/src/components/Tabs/tabs.scss +4 -4
- package/src/components/TagPill/TagPill.vue +2 -2
- package/src/components/ToggleTip/ToggleTip.vue +1 -1
- package/src/components/ToggleTip/toggleTip.scss +5 -5
- package/src/components/Tooltip/Tooltip.vue +3 -3
- package/src/components/TreeSelect/Option.vue +16 -14
- package/src/components/TreeSelect/Select.vue +200 -132
- package/src/components/TreeSelect/scss/option.scss +6 -6
- package/src/components/TreeSelect/scss/select.scss +53 -4
- package/src/directives/tooltip/tooltip.js +46 -0
- package/src/index.js +6 -1
- package/vite.config.js +0 -0
- package/dist/style.css +0 -1
|
@@ -242,6 +242,10 @@ export default {
|
|
|
242
242
|
type: Number,
|
|
243
243
|
default: Infinity,
|
|
244
244
|
},
|
|
245
|
+
toFixed: {
|
|
246
|
+
type: Number,
|
|
247
|
+
default: 0,
|
|
248
|
+
}
|
|
245
249
|
},
|
|
246
250
|
data() {
|
|
247
251
|
return {
|
|
@@ -280,7 +284,7 @@ export default {
|
|
|
280
284
|
},
|
|
281
285
|
decrement() {
|
|
282
286
|
if (this.actualValue > this.min) {
|
|
283
|
-
this.actualValue =
|
|
287
|
+
this.actualValue = (+this.actualValue - +this.step).toFixed(this.toFixed);
|
|
284
288
|
}
|
|
285
289
|
|
|
286
290
|
this.$emit("update:modelValue", this.actualValue);
|
|
@@ -289,8 +293,7 @@ export default {
|
|
|
289
293
|
},
|
|
290
294
|
increment() {
|
|
291
295
|
if (this.actualValue < this.max) {
|
|
292
|
-
|
|
293
|
-
this.actualValue = +this.actualValue + this.step;
|
|
296
|
+
this.actualValue = (+this.actualValue + +this.step).toFixed(this.toFixed);
|
|
294
297
|
}
|
|
295
298
|
|
|
296
299
|
this.$emit("update:modelValue", this.actualValue);
|
|
@@ -380,5 +383,5 @@ export default {
|
|
|
380
383
|
</script>
|
|
381
384
|
|
|
382
385
|
<style lang="scss" scoped>
|
|
383
|
-
@
|
|
386
|
+
@use "./input.scss" as *;
|
|
384
387
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
3
|
+
@use "../../../assets/scss/mixins.scss" as *;
|
|
4
4
|
|
|
5
5
|
$input-bg: $gray-100;
|
|
6
6
|
$input-color: $neutral-900;
|
|
@@ -84,8 +84,8 @@ export default {
|
|
|
84
84
|
</script>
|
|
85
85
|
|
|
86
86
|
<style lang="scss" scoped>
|
|
87
|
-
@
|
|
88
|
-
@
|
|
87
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
88
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
89
89
|
|
|
90
90
|
.ib-label {
|
|
91
91
|
@include Ib-H4-regular;
|
|
@@ -3,29 +3,44 @@
|
|
|
3
3
|
{{ errorMessage }}
|
|
4
4
|
</ib-alert>
|
|
5
5
|
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
6
|
+
<div class="ib-phone-wrapper">
|
|
7
|
+
<vue-tel-input
|
|
8
|
+
v-outside="clickOutside"
|
|
9
|
+
v-model="phone"
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
@country-changed="countryChanged"
|
|
12
|
+
:input-options="{ name: inputName, id: inputName, autocomplete: 'tel' }"
|
|
13
|
+
:auto-default-country="autoDefaultCountry"
|
|
14
|
+
:dropdown-options="{ showSearchBox: true, showFlags: true, tabindex: 0 }"
|
|
15
|
+
:defaultCountry="defaultCountry"
|
|
16
|
+
:ignoredCountries="ignoredCountries"
|
|
17
|
+
:class="{ error: error || errorMessage.length, disabled }"
|
|
18
|
+
:disabled="disabled"
|
|
19
|
+
style-classes="ib-phone-input"
|
|
20
|
+
ref="vueTel"
|
|
21
|
+
>
|
|
22
|
+
<template #arrow-icon>
|
|
23
|
+
<ib-icon name="chevron-down-outline"></ib-icon>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<template #icon-right>
|
|
27
|
+
<ib-icon-button
|
|
28
|
+
v-if="showClearButton"
|
|
29
|
+
v-show="phone.length"
|
|
30
|
+
kind="ghost"
|
|
31
|
+
class="ib-phone-clear-button"
|
|
32
|
+
@click="clearPhone"
|
|
33
|
+
>
|
|
34
|
+
<ib-icon name="close-outline" />
|
|
35
|
+
</ib-icon-button>
|
|
36
|
+
</template>
|
|
37
|
+
</vue-tel-input>
|
|
38
|
+
</div>
|
|
25
39
|
</template>
|
|
26
40
|
|
|
27
41
|
<script>
|
|
28
42
|
import IbIcon from "../../Icon.vue";
|
|
43
|
+
import IbIconButton from "../../IconButton/IconButton.vue";
|
|
29
44
|
import IbAlert from "../../Alert/Alert.vue";
|
|
30
45
|
import { OutsideDirective as Outside } from "../../../directives/outside/outside";
|
|
31
46
|
import { VueTelInput } from 'vue-tel-input';
|
|
@@ -61,11 +76,16 @@ export default {
|
|
|
61
76
|
disabled: {
|
|
62
77
|
type: Boolean,
|
|
63
78
|
default: false,
|
|
64
|
-
}
|
|
79
|
+
},
|
|
80
|
+
showClearButton: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true,
|
|
83
|
+
},
|
|
65
84
|
},
|
|
66
85
|
emits: ['update:modelValue', 'onReady'],
|
|
67
86
|
components: {
|
|
68
87
|
VueTelInput,
|
|
88
|
+
IbIconButton,
|
|
69
89
|
IbAlert,
|
|
70
90
|
IbIcon,
|
|
71
91
|
},
|
|
@@ -110,10 +130,25 @@ export default {
|
|
|
110
130
|
this.vueTel.clickedOutside();
|
|
111
131
|
}
|
|
112
132
|
},
|
|
133
|
+
clearPhone() {
|
|
134
|
+
this.phone = "";
|
|
135
|
+
}
|
|
113
136
|
},
|
|
114
137
|
};
|
|
115
138
|
</script>
|
|
116
139
|
|
|
117
140
|
<style lang="scss">
|
|
118
|
-
@
|
|
141
|
+
@use "./phoneInput.scss" as *;
|
|
142
|
+
|
|
143
|
+
.ib-phone-wrapper {
|
|
144
|
+
position: relative;
|
|
145
|
+
|
|
146
|
+
.ib-phone-clear-button {
|
|
147
|
+
position: absolute;
|
|
148
|
+
right: 5px;
|
|
149
|
+
top: 50%;
|
|
150
|
+
transform: translateY(-50%);
|
|
151
|
+
|
|
152
|
+
}
|
|
153
|
+
}
|
|
119
154
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
1
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../../assets/scss/variables/shadows.scss" as *;
|
|
3
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
4
|
+
@use "../../../assets/scss/mixins.scss" as *;
|
|
5
5
|
|
|
6
6
|
$input-bg: $gray-100;
|
|
7
7
|
$input-color: $neutral-900;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use "../../../assets/scss/variables/colors.scss" as *;
|
|
2
|
+
@use "../../../assets/scss/typography.scss" as *;
|
|
3
|
+
@use "../../../assets/scss/mixins.scss" as *;
|
|
4
4
|
|
|
5
5
|
//checkbox
|
|
6
6
|
$radio-text: $neutral-900;
|
|
@@ -43,187 +43,37 @@
|
|
|
43
43
|
:modules="modules"
|
|
44
44
|
></QuillEditor>
|
|
45
45
|
</div>
|
|
46
|
-
<div id="toolbar" class="toolbar" ref="toolbar">
|
|
47
|
-
<div class="toolbar-group header-toolbar-group" v-show="placeholders.length">
|
|
48
|
-
<label class="toolbar-group__label" for="placeholders">Placeholder Selector</label>
|
|
49
|
-
<select id="placeholders" class="ql-placeholder">
|
|
50
|
-
<option selected value="default" class="disabled"></option>
|
|
51
|
-
<option v-for="placeholder in placeholders" :key="placeholder.id" :value="placeholder.id">{{ placeholder.label }}</option>
|
|
52
|
-
</select>
|
|
53
|
-
</div>
|
|
54
46
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<option value="6"></option>
|
|
64
|
-
<option selected></option>
|
|
65
|
-
</select>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<div class="toolbar-group">
|
|
69
|
-
<ib-icon-button
|
|
70
|
-
aria-label="button-bold"
|
|
71
|
-
class="toolbar-item ql-bold"
|
|
72
|
-
kind="ghost"
|
|
73
|
-
></ib-icon-button>
|
|
74
|
-
<ib-icon-button
|
|
75
|
-
aria-label="button-italic"
|
|
76
|
-
class="toolbar-item ql-italic"
|
|
77
|
-
kind="ghost"
|
|
78
|
-
></ib-icon-button>
|
|
79
|
-
<ib-icon-button
|
|
80
|
-
aria-label="button-underline"
|
|
81
|
-
class="toolbar-item ql-underline"
|
|
82
|
-
kind="ghost"
|
|
83
|
-
></ib-icon-button>
|
|
84
|
-
<ib-icon-button
|
|
85
|
-
aria-label="button-strike"
|
|
86
|
-
class="toolbar-item ql-strike"
|
|
87
|
-
kind="ghost"
|
|
88
|
-
></ib-icon-button>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<div class="toolbar-group">
|
|
92
|
-
<label class="toolbar-group__label" for="background-selector">Background Selector</label>
|
|
93
|
-
<select id="background-selector" class="ql-background"></select>
|
|
94
|
-
<label class="toolbar-group__label" for="color-selector">Background Color Selector</label>
|
|
95
|
-
<select id="color-selector" class="ql-color"></select>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<div class="toolbar-group">
|
|
99
|
-
<ib-icon-button
|
|
100
|
-
aria-label="button-code-block"
|
|
101
|
-
class="toolbar-item ql-code-block"
|
|
102
|
-
kind="ghost"
|
|
103
|
-
></ib-icon-button>
|
|
104
|
-
<ib-icon-button
|
|
105
|
-
aria-label="button-link"
|
|
106
|
-
class="toolbar-item ql-link"
|
|
107
|
-
kind="ghost"
|
|
108
|
-
></ib-icon-button>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
<div class="toolbar-group">
|
|
112
|
-
<ib-icon-button
|
|
113
|
-
aria-label="button-align"
|
|
114
|
-
class="toolbar-item ql-align"
|
|
115
|
-
kind="ghost"
|
|
116
|
-
></ib-icon-button>
|
|
117
|
-
<ib-icon-button
|
|
118
|
-
aria-label="button-align-center"
|
|
119
|
-
class="ql-align toolbar-item"
|
|
120
|
-
value="center"
|
|
121
|
-
kind="ghost"
|
|
122
|
-
></ib-icon-button>
|
|
123
|
-
<ib-icon-button
|
|
124
|
-
aria-label="button-align-right"
|
|
125
|
-
class="ql-align toolbar-item"
|
|
126
|
-
value="right"
|
|
127
|
-
kind="ghost"
|
|
128
|
-
></ib-icon-button>
|
|
129
|
-
<ib-icon-button
|
|
130
|
-
aria-label="button-align-justify"
|
|
131
|
-
class="ql-align toolbar-item"
|
|
132
|
-
value="justify"
|
|
133
|
-
kind="ghost"
|
|
134
|
-
></ib-icon-button>
|
|
135
|
-
</div>
|
|
136
|
-
|
|
137
|
-
<div class="toolbar-group">
|
|
138
|
-
<ib-icon-button
|
|
139
|
-
aria-label="button-ordered-list"
|
|
140
|
-
class="ql-list toolbar-item"
|
|
141
|
-
value="ordered"
|
|
142
|
-
kind="ghost"
|
|
143
|
-
></ib-icon-button>
|
|
144
|
-
<ib-icon-button
|
|
145
|
-
aria-label="button-bullet-list"
|
|
146
|
-
class="ql-list toolbar-item"
|
|
147
|
-
value="bullet"
|
|
148
|
-
kind="ghost"
|
|
149
|
-
></ib-icon-button>
|
|
150
|
-
|
|
151
|
-
<ib-icon-button
|
|
152
|
-
aria-label="button-alphabet-list"
|
|
153
|
-
class="ql-alphabet-list alphabet-list toolbar-item"
|
|
154
|
-
kind="ghost"
|
|
155
|
-
></ib-icon-button>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
47
|
+
<Toolbar
|
|
48
|
+
id="toolbar"
|
|
49
|
+
class="toolbar"
|
|
50
|
+
ref="toolbar"
|
|
51
|
+
:placeholders="placeholders"
|
|
52
|
+
:uid="uid"
|
|
53
|
+
:hidden-elements="hiddenElements"
|
|
54
|
+
/>
|
|
158
55
|
</div>
|
|
159
56
|
</div>
|
|
160
57
|
</template>
|
|
161
58
|
|
|
162
59
|
<script>
|
|
60
|
+
|
|
163
61
|
import {Quill, QuillEditor} from "@vueup/vue-quill";
|
|
164
62
|
import IbIconButton from "../../IconButton/IconButton.vue";
|
|
165
63
|
import IbAlert from "../../Alert/Alert.vue";
|
|
166
64
|
import IbCharacterCount from "../CharactersCount.vue";
|
|
167
|
-
import
|
|
65
|
+
import Toolbar from "./Toolbar.vue";
|
|
168
66
|
import { stripHtml } from "../../../helpers/stripHtml";
|
|
169
67
|
import getPlaceholderModule from 'quill-placeholder-module';
|
|
170
68
|
import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|
171
|
-
|
|
172
|
-
import {
|
|
173
|
-
ALIGN_CENTER,
|
|
174
|
-
ALIGN_JUSTIFY,
|
|
175
|
-
ALIGN_LEFT,
|
|
176
|
-
ALIGN_RIGHT,
|
|
177
|
-
BOLD,
|
|
178
|
-
CODE,
|
|
179
|
-
ITALIC,
|
|
180
|
-
LINK,
|
|
181
|
-
LIST_ALPHABET,
|
|
182
|
-
LIST_BULLET,
|
|
183
|
-
LIST_ORDERED,
|
|
184
|
-
STRIKE,
|
|
185
|
-
UNDERLINE,
|
|
186
|
-
} from "./icons/toolbarIcons";
|
|
187
|
-
|
|
188
|
-
Quill.register(Quill.import('attributors/attribute/direction'), true);
|
|
189
|
-
Quill.register(Quill.import('attributors/class/align'), true);
|
|
190
|
-
Quill.register(Quill.import('attributors/class/direction'), true);
|
|
191
|
-
Quill.register(Quill.import('attributors/class/font'), true);
|
|
192
|
-
Quill.register(Quill.import('attributors/class/size'), true);
|
|
193
|
-
Quill.register(Quill.import('attributors/style/align'), true);
|
|
194
|
-
Quill.register(Quill.import('attributors/style/background'), true);
|
|
195
|
-
Quill.register(Quill.import('attributors/style/color'), true);
|
|
196
|
-
Quill.register(Quill.import('attributors/style/direction'), true);
|
|
197
|
-
Quill.register(Quill.import('attributors/style/font'), true);
|
|
198
|
-
Quill.register(Quill.import('attributors/style/size'), true);
|
|
199
|
-
|
|
200
|
-
const icons = Quill.import("ui/icons");
|
|
201
|
-
icons.bold = BOLD;
|
|
202
|
-
icons.italic = ITALIC;
|
|
203
|
-
icons.underline = UNDERLINE;
|
|
204
|
-
icons.strike = STRIKE;
|
|
205
|
-
icons["code-block"] = CODE;
|
|
206
|
-
icons.link = LINK;
|
|
207
|
-
icons.align[""] = ALIGN_LEFT;
|
|
208
|
-
icons.align.center = ALIGN_CENTER;
|
|
209
|
-
icons.align.right = ALIGN_RIGHT;
|
|
210
|
-
icons.align.justify = ALIGN_JUSTIFY;
|
|
211
|
-
icons.list.ordered = LIST_ORDERED;
|
|
212
|
-
icons.list.bullet = LIST_BULLET;
|
|
213
|
-
icons["alphabet-list"] = LIST_ALPHABET;
|
|
214
|
-
|
|
215
|
-
Quill.register({
|
|
216
|
-
"formats/alphabet-list": AlphabetList,
|
|
217
|
-
"formats/alphabet-list/item": AlphabetListItem,
|
|
218
|
-
});
|
|
69
|
+
import { setupTextEditor } from "./setupTextEditor";
|
|
219
70
|
|
|
220
71
|
Quill.register('modules/placeholder', getPlaceholderModule(Quill, {
|
|
221
72
|
className: 'ql-placeholder-content'
|
|
222
73
|
}))
|
|
223
74
|
|
|
224
|
-
|
|
225
|
-
Quill.register(icons);
|
|
226
75
|
Quill.debug("error");
|
|
76
|
+
setupTextEditor();
|
|
227
77
|
|
|
228
78
|
export default {
|
|
229
79
|
name: "IbTextEditor",
|
|
@@ -283,12 +133,13 @@ export default {
|
|
|
283
133
|
type: String,
|
|
284
134
|
default: "",
|
|
285
135
|
},
|
|
136
|
+
hiddenElements: {
|
|
137
|
+
type: Array,
|
|
138
|
+
default: () => ['font-size', 'image']
|
|
139
|
+
}
|
|
286
140
|
},
|
|
287
141
|
emits: ['onOverLimitHandler', 'update:modelValue', 'change', 'blur'],
|
|
288
142
|
mounted() {
|
|
289
|
-
// Reset default styles for toolbar
|
|
290
|
-
this.$refs.toolbar.classList.remove("ql-toolbar");
|
|
291
|
-
|
|
292
143
|
// Change default placeholder for link input
|
|
293
144
|
const input = this.$refs.wrapper.querySelector("input[data-link]");
|
|
294
145
|
input.dataset.link = "Enter Link";
|
|
@@ -370,12 +221,16 @@ export default {
|
|
|
370
221
|
readOnly: this.readOnly ? this.readOnly : this.disable,
|
|
371
222
|
enable: this.enable,
|
|
372
223
|
modules: {
|
|
373
|
-
toolbar: {
|
|
224
|
+
toolbar: {
|
|
225
|
+
container: '#toolbar',
|
|
226
|
+
handlers: { 'image': this.imageButtonClickHandler }
|
|
227
|
+
},
|
|
374
228
|
placeholder: {
|
|
375
229
|
delimiters: ['{{', '}}'],
|
|
376
230
|
placeholders: this.placeholders
|
|
377
231
|
}
|
|
378
232
|
},
|
|
233
|
+
|
|
379
234
|
};
|
|
380
235
|
|
|
381
236
|
return Object.assign(config, this.options);
|
|
@@ -385,16 +240,20 @@ export default {
|
|
|
385
240
|
!!this.characterLimit && this.characterLength > this.characterLimit
|
|
386
241
|
);
|
|
387
242
|
},
|
|
243
|
+
uid() {
|
|
244
|
+
return Math.random().toString(36).substr(2, 9);
|
|
245
|
+
},
|
|
388
246
|
},
|
|
389
247
|
components: {
|
|
390
248
|
QuillEditor,
|
|
391
249
|
IbIconButton,
|
|
392
250
|
IbAlert,
|
|
393
251
|
IbCharacterCount,
|
|
252
|
+
Toolbar,
|
|
394
253
|
},
|
|
395
254
|
};
|
|
396
255
|
</script>
|
|
397
256
|
|
|
398
|
-
<style lang="scss">
|
|
399
|
-
@
|
|
257
|
+
<style lang="scss" scoped>
|
|
258
|
+
@use "./textEditor.scss" as *;
|
|
400
259
|
</style>
|