@onereach/ui-components-vue2 21.4.2 → 21.5.0-beta.5380.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.
|
@@ -13,13 +13,13 @@ import { useResizeObserver, useDebounceFn, onClickOutside } from '@vueuse/core';
|
|
|
13
13
|
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap';
|
|
14
14
|
import { defineComponent, shallowRef, ref, onMounted, onBeforeUnmount, computed, watch, nextTick } from 'vue-demi';
|
|
15
15
|
import { aa as c } from '../../utils-72d9c2bb.js';
|
|
16
|
-
import { u as ue, n as ne } from '../../useValidationAttributes-BpeWsfb0-24439d6f.js';
|
|
17
16
|
import { TextSelection, Selection } from 'prosemirror-state';
|
|
18
17
|
import { exitCode } from 'prosemirror-commands';
|
|
19
18
|
import { EditorState } from '@codemirror/state';
|
|
20
19
|
import { EditorView, highlightActiveLine, highlightActiveLineGutter, lineNumbers, keymap } from '@codemirror/view';
|
|
21
20
|
import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
|
|
22
21
|
import { tags } from '@lezer/highlight';
|
|
22
|
+
import { u as ue } from '../../useValidationAttributes-BpeWsfb0-24439d6f.js';
|
|
23
23
|
import { minimalSetup } from 'codemirror';
|
|
24
24
|
import { javascript } from '@codemirror/lang-javascript';
|
|
25
25
|
import { defaultMarkdownSerializer, MarkdownSerializer } from 'prosemirror-markdown';
|
|
@@ -110,8 +110,6 @@ const RichTextEditor = [
|
|
|
110
110
|
const RichTextEditorToolbar = [
|
|
111
111
|
// Layout
|
|
112
112
|
'layout-row',
|
|
113
|
-
// Overflow
|
|
114
|
-
'overflow-x-scroll md:overflow-x-hidden', 'scrollbar-hidden',
|
|
115
113
|
// Spacing
|
|
116
114
|
'px-0', 'py-sm',
|
|
117
115
|
// Theme
|
|
@@ -659,7 +657,7 @@ var script = defineComponent({
|
|
|
659
657
|
const textareaRef = ref();
|
|
660
658
|
const containerRef = ref();
|
|
661
659
|
const moreButtonRef = ref();
|
|
662
|
-
const
|
|
660
|
+
const moreRef = ref();
|
|
663
661
|
const toolbarButtonRef = ref();
|
|
664
662
|
const menuRef = ref();
|
|
665
663
|
// isActive should be set with default values for all toolbar buttons, otherwise it will not work in vue2
|
|
@@ -689,9 +687,6 @@ var script = defineComponent({
|
|
|
689
687
|
const link = ref('');
|
|
690
688
|
const countOfNotVisibleTools = ref(0);
|
|
691
689
|
const sourceValue = ref('');
|
|
692
|
-
const {
|
|
693
|
-
isMobile
|
|
694
|
-
} = ne();
|
|
695
690
|
let trap = useFocusTrap(controlRef, {
|
|
696
691
|
fallbackFocus: '.container',
|
|
697
692
|
allowOutsideClick: true
|
|
@@ -860,10 +855,9 @@ var script = defineComponent({
|
|
|
860
855
|
activeHeadingLevel.value = ((_c = (_b = editor.value) === null || _b === void 0 ? void 0 : _b.getAttributes('heading')) === null || _c === void 0 ? void 0 : _c.level) || 0;
|
|
861
856
|
};
|
|
862
857
|
const isVisible = value => {
|
|
863
|
-
if (isMobile.value) return true;
|
|
864
858
|
if (c(value)) {
|
|
865
859
|
const isHaveNotVisibleTools = value.some(item => notVisibleTools.value.has(item));
|
|
866
|
-
return
|
|
860
|
+
return isHaveNotVisibleTools;
|
|
867
861
|
}
|
|
868
862
|
return !notVisibleTools.value.has(value);
|
|
869
863
|
};
|
|
@@ -1020,7 +1014,7 @@ var script = defineComponent({
|
|
|
1020
1014
|
toolbarButtonRef,
|
|
1021
1015
|
moreButtonRef,
|
|
1022
1016
|
textareaRef,
|
|
1023
|
-
|
|
1017
|
+
moreRef,
|
|
1024
1018
|
menuRef,
|
|
1025
1019
|
handleToolbarClick,
|
|
1026
1020
|
handleEditorClick,
|
|
@@ -1037,7 +1031,6 @@ var script = defineComponent({
|
|
|
1037
1031
|
link,
|
|
1038
1032
|
isFocused,
|
|
1039
1033
|
isVisible,
|
|
1040
|
-
isMobile,
|
|
1041
1034
|
countOfNotVisibleTools,
|
|
1042
1035
|
notVisibleTools,
|
|
1043
1036
|
handleInput,
|
|
@@ -1100,7 +1093,7 @@ var __vue_render__ = function () {
|
|
|
1100
1093
|
return _c('div', {
|
|
1101
1094
|
key: index,
|
|
1102
1095
|
class: _vm.toolbarGroupStyles.concat([{
|
|
1103
|
-
'hidden':
|
|
1096
|
+
'hidden': _vm.isVisible(tools)
|
|
1104
1097
|
}]),
|
|
1105
1098
|
attrs: {
|
|
1106
1099
|
"disabled": _vm.disabled || !_vm.isFocused
|
|
@@ -1151,20 +1144,19 @@ var __vue_render__ = function () {
|
|
|
1151
1144
|
}
|
|
1152
1145
|
}) : _vm._e()], 1);
|
|
1153
1146
|
}), 0);
|
|
1154
|
-
}), _vm._v(" "), _vm.countOfNotVisibleTools > 0
|
|
1147
|
+
}), _vm._v(" "), _vm.countOfNotVisibleTools > 0 ? _c('OrIconButton', {
|
|
1155
1148
|
ref: 'moreButtonRef',
|
|
1156
|
-
class: ['
|
|
1149
|
+
class: ['px-sm'],
|
|
1157
1150
|
attrs: {
|
|
1158
1151
|
"icon": {
|
|
1159
1152
|
icon: 'more_horiz',
|
|
1160
1153
|
variant: 'inherit'
|
|
1161
1154
|
},
|
|
1162
|
-
"disabled": _vm.disabled || !_vm.isFocused
|
|
1163
|
-
"force-state": _vm.morePopoverRef && _vm.morePopoverRef.state === 'open' ? 'hover' : undefined
|
|
1155
|
+
"disabled": _vm.disabled || !_vm.isFocused
|
|
1164
1156
|
},
|
|
1165
1157
|
on: {
|
|
1166
1158
|
"click": function ($event) {
|
|
1167
|
-
_vm.
|
|
1159
|
+
_vm.moreRef && _vm.moreRef.open();
|
|
1168
1160
|
}
|
|
1169
1161
|
}
|
|
1170
1162
|
}) : _vm._e()], 2), _vm._v(" "), _c('div', {
|
|
@@ -1229,7 +1221,7 @@ var __vue_render__ = function () {
|
|
|
1229
1221
|
"disabled": _vm.disabled
|
|
1230
1222
|
}
|
|
1231
1223
|
}, [_vm._v("\n " + _vm._s(_vm.error) + "\n ")]), _vm._v(" "), _vm.moreButtonRef ? _c('OrPopover', {
|
|
1232
|
-
ref: '
|
|
1224
|
+
ref: 'moreRef',
|
|
1233
1225
|
attrs: {
|
|
1234
1226
|
"trigger": _vm.moreButtonRef && _vm.moreButtonRef.root,
|
|
1235
1227
|
"placement": 'top-end'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, toRefs, computed, watch, getCurrentInstance
|
|
1
|
+
import { defineComponent, ref, toRefs, computed, watch, getCurrentInstance } from 'vue-demi';
|
|
2
2
|
import { s, c } from '../../dropdown-open-k6cFnrqA-5245a281.js';
|
|
3
3
|
import { l } from '../../helpers-368c7a99.js';
|
|
4
4
|
import { a as re, n as ne } from '../../useValidationAttributes-BpeWsfb0-24439d6f.js';
|
|
@@ -837,7 +837,6 @@ var script = defineComponent({
|
|
|
837
837
|
var _a;
|
|
838
838
|
return (_a = popover.value) === null || _a === void 0 ? void 0 : _a.state;
|
|
839
839
|
});
|
|
840
|
-
const isOpen = computed(() => popoverState.value === 'open');
|
|
841
840
|
// Props
|
|
842
841
|
const {
|
|
843
842
|
enableClear,
|
|
@@ -881,11 +880,6 @@ var script = defineComponent({
|
|
|
881
880
|
}, {
|
|
882
881
|
deep: true
|
|
883
882
|
});
|
|
884
|
-
watch(isOpen, value => {
|
|
885
|
-
if (!value) {
|
|
886
|
-
resetSearch();
|
|
887
|
-
}
|
|
888
|
-
});
|
|
889
883
|
const groupedOptions = computed(() => {
|
|
890
884
|
const groupBy = props.groupByFunction;
|
|
891
885
|
if (groupBy) {
|
|
@@ -979,9 +973,7 @@ var script = defineComponent({
|
|
|
979
973
|
resetSearch();
|
|
980
974
|
}
|
|
981
975
|
function resetSearch() {
|
|
982
|
-
|
|
983
|
-
setTimeout(() => searchText.value = '');
|
|
984
|
-
});
|
|
976
|
+
searchText.value = '';
|
|
985
977
|
}
|
|
986
978
|
// Utils
|
|
987
979
|
const {
|
|
@@ -1011,7 +1003,6 @@ var script = defineComponent({
|
|
|
1011
1003
|
proxyModelValue,
|
|
1012
1004
|
readonly,
|
|
1013
1005
|
isEmptyModelValue,
|
|
1014
|
-
isOpen,
|
|
1015
1006
|
showClear,
|
|
1016
1007
|
searchText,
|
|
1017
1008
|
internalSearchOptions,
|
|
@@ -1079,7 +1070,6 @@ var __vue_render__ = function () {
|
|
|
1079
1070
|
"invalid": !!_vm.error,
|
|
1080
1071
|
"readonly": _vm.readonly,
|
|
1081
1072
|
"disabled": _vm.disabled,
|
|
1082
|
-
"force-state": _vm.isOpen ? 'focus-within' : undefined,
|
|
1083
1073
|
"tabindex": !_vm.disabled ? 0 : null
|
|
1084
1074
|
}
|
|
1085
1075
|
}, [_c('div', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.5.0-beta.5380.0",
|
|
4
4
|
"description": "Vue components library for v2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@codemirror/view": "^6",
|
|
41
41
|
"@floating-ui/dom": "1.5.3",
|
|
42
42
|
"@lezer/highlight": "*",
|
|
43
|
-
"@onereach/styles": "^21.
|
|
44
|
-
"@onereach/ui-components-common": "^21.
|
|
43
|
+
"@onereach/styles": "^21.5.0-beta.5380.0",
|
|
44
|
+
"@onereach/ui-components-common": "^21.5.0-beta.5380.0",
|
|
45
45
|
"@splidejs/splide": "4.0.6",
|
|
46
46
|
"@tiptap/core": "2.0.3",
|
|
47
47
|
"@tiptap/extension-blockquote": "2.0.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"prosemirror-state": "*",
|
|
77
77
|
"prosemirror-view": "*",
|
|
78
78
|
"sortablejs": "1.14.0",
|
|
79
|
-
"tailwindcss": "3.
|
|
79
|
+
"tailwindcss": "3.4.3",
|
|
80
80
|
"uuid": "8.3.2",
|
|
81
81
|
"vue-demi": "0.14.6"
|
|
82
82
|
},
|
|
@@ -104,6 +104,5 @@
|
|
|
104
104
|
"publishConfig": {
|
|
105
105
|
"access": "public"
|
|
106
106
|
},
|
|
107
|
-
"npmUnpacked": "4.15.2"
|
|
108
|
-
"gitHead": "c1aa388b69aafd6d5d23479c8be7b0dfd38a0ff5"
|
|
107
|
+
"npmUnpacked": "4.15.2"
|
|
109
108
|
}
|