@onereach/ui-components 2.70.0-beta.2127.0 → 2.70.0-beta.2131.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.
- package/dist/bundled/v2/{OrRichTextEditor-b8952e7d.js → OrRichTextEditor-63ef1357.js} +9 -6
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +4 -4
- package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +1 -1
- package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-570b84ee.js → OrRichTextEditor.vue_vue_type_script_lang-47fffbd6.js} +6 -3
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +4 -4
- package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +4 -4
- package/dist/esm/v2/{OrRichTextEditor-d65f9735.js → OrRichTextEditor-c3dee275.js} +9 -6
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +4 -4
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +1 -1
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrRichTextEditor-b9bdc0a2.js → OrRichTextEditor-b2e87342.js} +8 -5
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +4 -4
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +1 -1
- package/dist/esm/v3/index.js +1 -1
- package/package.json +1 -1
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +1 -2
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +8 -5
|
@@ -36472,11 +36472,11 @@ var script = defineComponent({
|
|
|
36472
36472
|
props: {
|
|
36473
36473
|
modelValue: {
|
|
36474
36474
|
type: String,
|
|
36475
|
-
default:
|
|
36475
|
+
default: undefined
|
|
36476
36476
|
},
|
|
36477
36477
|
value: {
|
|
36478
36478
|
type: String,
|
|
36479
|
-
default:
|
|
36479
|
+
default: undefined
|
|
36480
36480
|
},
|
|
36481
36481
|
toolbar: {
|
|
36482
36482
|
type: Array,
|
|
@@ -36570,6 +36570,7 @@ var script = defineComponent({
|
|
|
36570
36570
|
editor
|
|
36571
36571
|
}) => {
|
|
36572
36572
|
if (props.markdownFormat) {
|
|
36573
|
+
console.log(proxyModelValue.value, 'on crete');
|
|
36573
36574
|
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
36574
36575
|
editor.commands.setContent(deserialized);
|
|
36575
36576
|
} else {
|
|
@@ -36621,10 +36622,12 @@ var script = defineComponent({
|
|
|
36621
36622
|
const proxyModelValue = computed({
|
|
36622
36623
|
get: () => {
|
|
36623
36624
|
var _a;
|
|
36625
|
+
console.log('modelV: ', props.modelValue, 'v: ', props.value);
|
|
36624
36626
|
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
36625
36627
|
},
|
|
36626
36628
|
|
|
36627
36629
|
set: value => {
|
|
36630
|
+
console.log(value, 'set');
|
|
36628
36631
|
context.emit('input', value);
|
|
36629
36632
|
context.emit('update:modelValue', value);
|
|
36630
36633
|
}
|
|
@@ -36721,12 +36724,12 @@ var script = defineComponent({
|
|
|
36721
36724
|
};
|
|
36722
36725
|
//Effects
|
|
36723
36726
|
watch(proxyModelValue, value => {
|
|
36727
|
+
console.log(value, 'watch');
|
|
36724
36728
|
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
36725
36729
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
36726
36730
|
}
|
|
36727
36731
|
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
36728
36732
|
const deserialized = deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value);
|
|
36729
|
-
console.log(deserialized);
|
|
36730
36733
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialized);
|
|
36731
36734
|
}
|
|
36732
36735
|
});
|
|
@@ -36776,9 +36779,9 @@ var __vue_render__ = function () {
|
|
|
36776
36779
|
}
|
|
36777
36780
|
}, [_c('div', {
|
|
36778
36781
|
class: _vm.toolbarContainerStyles
|
|
36779
|
-
}, _vm._l(_vm.toolbar, function (tool) {
|
|
36782
|
+
}, _vm._l(_vm.toolbar, function (tool, index) {
|
|
36780
36783
|
return _c('div', {
|
|
36781
|
-
key:
|
|
36784
|
+
key: index,
|
|
36782
36785
|
class: _vm.toolbarStyles
|
|
36783
36786
|
}, _vm._l(tool, function (item) {
|
|
36784
36787
|
return _c('div', {
|
|
@@ -36854,7 +36857,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
36854
36857
|
/* style */
|
|
36855
36858
|
const __vue_inject_styles__ = function (inject) {
|
|
36856
36859
|
if (!inject) return;
|
|
36857
|
-
inject("data-v-
|
|
36860
|
+
inject("data-v-3478af94_0", {
|
|
36858
36861
|
source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}",
|
|
36859
36862
|
map: undefined,
|
|
36860
36863
|
media: undefined
|
|
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-3a3d
|
|
|
95
95
|
export { O as OrTooltip } from '../OrTooltip-dfea7af2.js';
|
|
96
96
|
export { O as OrTooltipContent } from '../OrTooltipContent-f0fd5f75.js';
|
|
97
97
|
export { O as OrTooltipV3 } from '../OrTooltip-fbfa05fd.js';
|
|
98
|
-
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-
|
|
98
|
+
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-63ef1357.js';
|
|
99
99
|
import '../index-fa6eb4ca.js';
|
|
100
100
|
import 'vue';
|
|
101
101
|
import '@vue/composition-api/dist/vue-composition-api.mjs';
|
|
@@ -38,11 +38,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
38
38
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
39
39
|
modelValue: {
|
|
40
40
|
type: StringConstructor;
|
|
41
|
-
default:
|
|
41
|
+
default: undefined;
|
|
42
42
|
};
|
|
43
43
|
value: {
|
|
44
44
|
type: StringConstructor;
|
|
45
|
-
default:
|
|
45
|
+
default: undefined;
|
|
46
46
|
};
|
|
47
47
|
toolbar: {
|
|
48
48
|
type: ArrayConstructor;
|
|
@@ -71,11 +71,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
71
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
72
72
|
modelValue: {
|
|
73
73
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
74
|
+
default: undefined;
|
|
75
75
|
};
|
|
76
76
|
value: {
|
|
77
77
|
type: StringConstructor;
|
|
78
|
-
default:
|
|
78
|
+
default: undefined;
|
|
79
79
|
};
|
|
80
80
|
toolbar: {
|
|
81
81
|
type: ArrayConstructor;
|
package/dist/bundled/v2/index.js
CHANGED
|
@@ -98,7 +98,7 @@ export { _ as OrToastContainerV3, O as OrToastV3, t as TypesV3 } from './types-f
|
|
|
98
98
|
export { O as OrTooltip } from './OrTooltip-dfea7af2.js';
|
|
99
99
|
export { O as OrTooltipContent } from './OrTooltipContent-f0fd5f75.js';
|
|
100
100
|
export { O as OrTooltipV3 } from './OrTooltip-fbfa05fd.js';
|
|
101
|
-
export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-
|
|
101
|
+
export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-63ef1357.js';
|
|
102
102
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-e2a93aaf.js';
|
|
103
103
|
export { u as useClassAttribute } from './useClassAttribute-9bf33346.js';
|
|
104
104
|
export { u as useElevation } from './useElevation-aac032f4.js';
|
|
@@ -36473,11 +36473,11 @@ var script = defineComponent({
|
|
|
36473
36473
|
props: {
|
|
36474
36474
|
modelValue: {
|
|
36475
36475
|
type: String,
|
|
36476
|
-
default:
|
|
36476
|
+
default: undefined
|
|
36477
36477
|
},
|
|
36478
36478
|
value: {
|
|
36479
36479
|
type: String,
|
|
36480
|
-
default:
|
|
36480
|
+
default: undefined
|
|
36481
36481
|
},
|
|
36482
36482
|
toolbar: {
|
|
36483
36483
|
type: Array,
|
|
@@ -36571,6 +36571,7 @@ var script = defineComponent({
|
|
|
36571
36571
|
editor
|
|
36572
36572
|
}) => {
|
|
36573
36573
|
if (props.markdownFormat) {
|
|
36574
|
+
console.log(proxyModelValue.value, 'on crete');
|
|
36574
36575
|
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
36575
36576
|
editor.commands.setContent(deserialized);
|
|
36576
36577
|
} else {
|
|
@@ -36622,10 +36623,12 @@ var script = defineComponent({
|
|
|
36622
36623
|
const proxyModelValue = computed({
|
|
36623
36624
|
get: () => {
|
|
36624
36625
|
var _a;
|
|
36626
|
+
console.log('modelV: ', props.modelValue, 'v: ', props.value);
|
|
36625
36627
|
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
36626
36628
|
},
|
|
36627
36629
|
|
|
36628
36630
|
set: value => {
|
|
36631
|
+
console.log(value, 'set');
|
|
36629
36632
|
context.emit('input', value);
|
|
36630
36633
|
context.emit('update:modelValue', value);
|
|
36631
36634
|
}
|
|
@@ -36722,12 +36725,12 @@ var script = defineComponent({
|
|
|
36722
36725
|
};
|
|
36723
36726
|
//Effects
|
|
36724
36727
|
watch(proxyModelValue, value => {
|
|
36728
|
+
console.log(value, 'watch');
|
|
36725
36729
|
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
36726
36730
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
36727
36731
|
}
|
|
36728
36732
|
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
36729
36733
|
const deserialized = deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value);
|
|
36730
|
-
console.log(deserialized);
|
|
36731
36734
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialized);
|
|
36732
36735
|
}
|
|
36733
36736
|
});
|
|
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-4d43
|
|
|
95
95
|
export { s as OrTooltip } from '../OrTooltip.vue_vue_type_script_lang-fa52d391.js';
|
|
96
96
|
export { s as OrTooltipContent } from '../OrTooltipContent-b0dcb862.js';
|
|
97
97
|
export { s as OrTooltipV3 } from '../OrTooltip.vue_vue_type_script_lang-67cc86ed.js';
|
|
98
|
-
export { s as OrRichTextEditorV3 } from '../OrRichTextEditor.vue_vue_type_script_lang-
|
|
98
|
+
export { s as OrRichTextEditorV3 } from '../OrRichTextEditor.vue_vue_type_script_lang-47fffbd6.js';
|
|
99
99
|
import 'vue';
|
|
100
100
|
import 'lodash';
|
|
101
101
|
import '../OrIcon-1cae8a64.js';
|
|
@@ -38,11 +38,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
38
38
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
39
39
|
modelValue: {
|
|
40
40
|
type: StringConstructor;
|
|
41
|
-
default:
|
|
41
|
+
default: undefined;
|
|
42
42
|
};
|
|
43
43
|
value: {
|
|
44
44
|
type: StringConstructor;
|
|
45
|
-
default:
|
|
45
|
+
default: undefined;
|
|
46
46
|
};
|
|
47
47
|
toolbar: {
|
|
48
48
|
type: ArrayConstructor;
|
|
@@ -71,11 +71,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
71
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
72
72
|
modelValue: {
|
|
73
73
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
74
|
+
default: undefined;
|
|
75
75
|
};
|
|
76
76
|
value: {
|
|
77
77
|
type: StringConstructor;
|
|
78
|
-
default:
|
|
78
|
+
default: undefined;
|
|
79
79
|
};
|
|
80
80
|
toolbar: {
|
|
81
81
|
type: ArrayConstructor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor.vue_vue_type_script_lang-
|
|
1
|
+
export { s as OrRichTextEditorV3 } from '../../OrRichTextEditor.vue_vue_type_script_lang-47fffbd6.js';
|
|
2
2
|
import 'vue';
|
|
3
3
|
import 'node:punycode';
|
|
4
4
|
import '../../index.es-3f39f316.js';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -123,8 +123,8 @@ import './OrToastContainer-f5525225.js';
|
|
|
123
123
|
export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-4d4329cd.js';
|
|
124
124
|
export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-6c5eee23.js';
|
|
125
125
|
import './OrToastContainer-afb51e5d.js';
|
|
126
|
-
import { s as script$Q } from './OrRichTextEditor.vue_vue_type_script_lang-
|
|
127
|
-
export { s as OrRichTextEditorV3 } from './OrRichTextEditor.vue_vue_type_script_lang-
|
|
126
|
+
import { s as script$Q } from './OrRichTextEditor.vue_vue_type_script_lang-47fffbd6.js';
|
|
127
|
+
export { s as OrRichTextEditorV3 } from './OrRichTextEditor.vue_vue_type_script_lang-47fffbd6.js';
|
|
128
128
|
export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE } from './constants-c5d1139f.js';
|
|
129
129
|
export { s as OrCardV3 } from './OrCard.vue_vue_type_script_lang-165de137.js';
|
|
130
130
|
export { s as OrCollapse } from './OrCollapse.vue_vue_type_script_lang-65cbb754.js';
|
|
@@ -2921,9 +2921,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
2921
2921
|
onClick: _cache[1] || (_cache[1] = $event => _ctx.handleEditorClick())
|
|
2922
2922
|
}, [createElementVNode("div", {
|
|
2923
2923
|
class: normalizeClass(_ctx.toolbarContainerStyles)
|
|
2924
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.toolbar, tool => {
|
|
2924
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.toolbar, (tool, index) => {
|
|
2925
2925
|
return openBlock(), createElementBlock("div", {
|
|
2926
|
-
key:
|
|
2926
|
+
key: index,
|
|
2927
2927
|
class: normalizeClass(_ctx.toolbarStyles)
|
|
2928
2928
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tool, item => {
|
|
2929
2929
|
return openBlock(), createElementBlock("div", {
|
|
@@ -147,11 +147,11 @@ var script = defineComponent({
|
|
|
147
147
|
props: {
|
|
148
148
|
modelValue: {
|
|
149
149
|
type: String,
|
|
150
|
-
default:
|
|
150
|
+
default: undefined
|
|
151
151
|
},
|
|
152
152
|
value: {
|
|
153
153
|
type: String,
|
|
154
|
-
default:
|
|
154
|
+
default: undefined
|
|
155
155
|
},
|
|
156
156
|
toolbar: {
|
|
157
157
|
type: Array,
|
|
@@ -245,6 +245,7 @@ var script = defineComponent({
|
|
|
245
245
|
editor
|
|
246
246
|
}) => {
|
|
247
247
|
if (props.markdownFormat) {
|
|
248
|
+
console.log(proxyModelValue.value, 'on crete');
|
|
248
249
|
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
249
250
|
editor.commands.setContent(deserialized);
|
|
250
251
|
} else {
|
|
@@ -296,10 +297,12 @@ var script = defineComponent({
|
|
|
296
297
|
const proxyModelValue = computed({
|
|
297
298
|
get: () => {
|
|
298
299
|
var _a;
|
|
300
|
+
console.log('modelV: ', props.modelValue, 'v: ', props.value);
|
|
299
301
|
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
300
302
|
},
|
|
301
303
|
|
|
302
304
|
set: value => {
|
|
305
|
+
console.log(value, 'set');
|
|
303
306
|
context.emit('input', value);
|
|
304
307
|
context.emit('update:modelValue', value);
|
|
305
308
|
}
|
|
@@ -396,12 +399,12 @@ var script = defineComponent({
|
|
|
396
399
|
};
|
|
397
400
|
//Effects
|
|
398
401
|
watch(proxyModelValue, value => {
|
|
402
|
+
console.log(value, 'watch');
|
|
399
403
|
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
400
404
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
401
405
|
}
|
|
402
406
|
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
403
407
|
const deserialized = deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value);
|
|
404
|
-
console.log(deserialized);
|
|
405
408
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialized);
|
|
406
409
|
}
|
|
407
410
|
});
|
|
@@ -451,9 +454,9 @@ var __vue_render__ = function () {
|
|
|
451
454
|
}
|
|
452
455
|
}, [_c('div', {
|
|
453
456
|
class: _vm.toolbarContainerStyles
|
|
454
|
-
}, _vm._l(_vm.toolbar, function (tool) {
|
|
457
|
+
}, _vm._l(_vm.toolbar, function (tool, index) {
|
|
455
458
|
return _c('div', {
|
|
456
|
-
key:
|
|
459
|
+
key: index,
|
|
457
460
|
class: _vm.toolbarStyles
|
|
458
461
|
}, _vm._l(tool, function (item) {
|
|
459
462
|
return _c('div', {
|
|
@@ -529,7 +532,7 @@ var __vue_staticRenderFns__ = [];
|
|
|
529
532
|
/* style */
|
|
530
533
|
const __vue_inject_styles__ = function (inject) {
|
|
531
534
|
if (!inject) return;
|
|
532
|
-
inject("data-v-
|
|
535
|
+
inject("data-v-3478af94_0", {
|
|
533
536
|
source: ".tiptap-editor ol{margin:0 24px;list-style:decimal}.tiptap-editor ul{margin:0 24px;list-style:initial}.tiptap-editor pre{background-color:rgba(186,209,236,.3);padding:4px 8px;margin:4px 0;width:100%;border-radius:4px}.tiptap-editor blockquote{margin:8px 24px;padding:0 24px;border-left:4px solid #bad1ec}.tiptap-editor .is-editor-empty::before{content:attr(data-placeholder);height:0;pointer-events:none;float:left}",
|
|
534
537
|
map: undefined,
|
|
535
538
|
media: undefined
|
|
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-0665
|
|
|
95
95
|
export { _ as OrTooltip } from '../OrTooltip-614b016d.js';
|
|
96
96
|
export { _ as OrTooltipContent } from '../OrTooltip.vue_rollup-plugin-vue_script-63559536.js';
|
|
97
97
|
export { _ as OrTooltipV3 } from '../OrTooltip-513bee30.js';
|
|
98
|
-
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-
|
|
98
|
+
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-c3dee275.js';
|
|
99
99
|
import 'vue-demi';
|
|
100
100
|
import 'lodash';
|
|
101
101
|
import '../normalize-component-6e8e3d80.js';
|
|
@@ -38,11 +38,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
38
38
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
39
39
|
modelValue: {
|
|
40
40
|
type: StringConstructor;
|
|
41
|
-
default:
|
|
41
|
+
default: undefined;
|
|
42
42
|
};
|
|
43
43
|
value: {
|
|
44
44
|
type: StringConstructor;
|
|
45
|
-
default:
|
|
45
|
+
default: undefined;
|
|
46
46
|
};
|
|
47
47
|
toolbar: {
|
|
48
48
|
type: ArrayConstructor;
|
|
@@ -71,11 +71,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
71
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
72
72
|
modelValue: {
|
|
73
73
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
74
|
+
default: undefined;
|
|
75
75
|
};
|
|
76
76
|
value: {
|
|
77
77
|
type: StringConstructor;
|
|
78
|
-
default:
|
|
78
|
+
default: undefined;
|
|
79
79
|
};
|
|
80
80
|
toolbar: {
|
|
81
81
|
type: ArrayConstructor;
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -95,7 +95,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-06654
|
|
|
95
95
|
export { _ as OrTooltip } from './OrTooltip-614b016d.js';
|
|
96
96
|
export { _ as OrTooltipContent } from './OrTooltip.vue_rollup-plugin-vue_script-63559536.js';
|
|
97
97
|
export { _ as OrTooltipV3 } from './OrTooltip-513bee30.js';
|
|
98
|
-
export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-
|
|
98
|
+
export { _ as OrRichTextEditorV3 } from './OrRichTextEditor-c3dee275.js';
|
|
99
99
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
100
100
|
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
101
101
|
export { u as useElevation } from './useElevation-31bfe1f6.js';
|
|
@@ -147,11 +147,11 @@ var script = defineComponent({
|
|
|
147
147
|
props: {
|
|
148
148
|
modelValue: {
|
|
149
149
|
type: String,
|
|
150
|
-
default:
|
|
150
|
+
default: undefined
|
|
151
151
|
},
|
|
152
152
|
value: {
|
|
153
153
|
type: String,
|
|
154
|
-
default:
|
|
154
|
+
default: undefined
|
|
155
155
|
},
|
|
156
156
|
toolbar: {
|
|
157
157
|
type: Array,
|
|
@@ -245,6 +245,7 @@ var script = defineComponent({
|
|
|
245
245
|
editor
|
|
246
246
|
}) => {
|
|
247
247
|
if (props.markdownFormat) {
|
|
248
|
+
console.log(proxyModelValue.value, 'on crete');
|
|
248
249
|
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
249
250
|
editor.commands.setContent(deserialized);
|
|
250
251
|
} else {
|
|
@@ -296,10 +297,12 @@ var script = defineComponent({
|
|
|
296
297
|
const proxyModelValue = computed({
|
|
297
298
|
get: () => {
|
|
298
299
|
var _a;
|
|
300
|
+
console.log('modelV: ', props.modelValue, 'v: ', props.value);
|
|
299
301
|
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
300
302
|
},
|
|
301
303
|
|
|
302
304
|
set: value => {
|
|
305
|
+
console.log(value, 'set');
|
|
303
306
|
context.emit('input', value);
|
|
304
307
|
context.emit('update:modelValue', value);
|
|
305
308
|
}
|
|
@@ -396,12 +399,12 @@ var script = defineComponent({
|
|
|
396
399
|
};
|
|
397
400
|
//Effects
|
|
398
401
|
watch(proxyModelValue, value => {
|
|
402
|
+
console.log(value, 'watch');
|
|
399
403
|
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
400
404
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
401
405
|
}
|
|
402
406
|
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
403
407
|
const deserialized = deserialize(editor === null || editor === void 0 ? void 0 : editor.schema, value);
|
|
404
|
-
console.log(deserialized);
|
|
405
408
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(deserialized);
|
|
406
409
|
}
|
|
407
410
|
});
|
|
@@ -448,9 +451,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
448
451
|
onClick: _cache[1] || (_cache[1] = $event => _ctx.handleEditorClick())
|
|
449
452
|
}, [createElementVNode("div", {
|
|
450
453
|
class: normalizeClass(_ctx.toolbarContainerStyles)
|
|
451
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.toolbar, tool => {
|
|
454
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.toolbar, (tool, index) => {
|
|
452
455
|
return openBlock(), createElementBlock("div", {
|
|
453
|
-
key:
|
|
456
|
+
key: index,
|
|
454
457
|
class: normalizeClass(_ctx.toolbarStyles)
|
|
455
458
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(tool, item => {
|
|
456
459
|
return openBlock(), createElementBlock("div", {
|
|
@@ -89,7 +89,7 @@ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from '../types-
|
|
|
89
89
|
export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-0665462d.js';
|
|
90
90
|
export { s as OrTooltip, a as OrTooltipContent } from '../OrTooltip-78cd7f6b.js';
|
|
91
91
|
export { s as OrTooltipV3 } from '../OrTooltip-50d27b4f.js';
|
|
92
|
-
export { s as OrRichTextEditorV3 } from '../OrRichTextEditor-
|
|
92
|
+
export { s as OrRichTextEditorV3 } from '../OrRichTextEditor-b2e87342.js';
|
|
93
93
|
import 'vue-demi';
|
|
94
94
|
import 'lodash';
|
|
95
95
|
import 'vue';
|
|
@@ -38,11 +38,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
38
38
|
}> & import("@vue/composition-api").Data, {}, {}, {
|
|
39
39
|
modelValue: {
|
|
40
40
|
type: StringConstructor;
|
|
41
|
-
default:
|
|
41
|
+
default: undefined;
|
|
42
42
|
};
|
|
43
43
|
value: {
|
|
44
44
|
type: StringConstructor;
|
|
45
|
-
default:
|
|
45
|
+
default: undefined;
|
|
46
46
|
};
|
|
47
47
|
toolbar: {
|
|
48
48
|
type: ArrayConstructor;
|
|
@@ -71,11 +71,11 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
71
71
|
}, import("@vue/composition-api").ExtractPropTypes<{
|
|
72
72
|
modelValue: {
|
|
73
73
|
type: StringConstructor;
|
|
74
|
-
default:
|
|
74
|
+
default: undefined;
|
|
75
75
|
};
|
|
76
76
|
value: {
|
|
77
77
|
type: StringConstructor;
|
|
78
|
-
default:
|
|
78
|
+
default: undefined;
|
|
79
79
|
};
|
|
80
80
|
toolbar: {
|
|
81
81
|
type: ArrayConstructor;
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -89,7 +89,7 @@ export { a as OrToastContainerV3, s as OrToastV3, t as TypesV3 } from './types-8
|
|
|
89
89
|
export { p as PropsV3, a as useQueueV3, u as useToastV3 } from './useToast-0665462d.js';
|
|
90
90
|
export { s as OrTooltip, a as OrTooltipContent } from './OrTooltip-78cd7f6b.js';
|
|
91
91
|
export { s as OrTooltipV3 } from './OrTooltip-50d27b4f.js';
|
|
92
|
-
export { s as OrRichTextEditorV3 } from './OrRichTextEditor-
|
|
92
|
+
export { s as OrRichTextEditorV3 } from './OrRichTextEditor-b2e87342.js';
|
|
93
93
|
export { D as DropdownClose, a as DropdownOpen } from './dropdown-open-0d314aa4.js';
|
|
94
94
|
export { u as useClassAttribute } from './useClassAttribute-47fdb016.js';
|
|
95
95
|
export { u as useElevation } from './useElevation-31bfe1f6.js';
|
package/package.json
CHANGED
|
@@ -13,7 +13,6 @@ export default {
|
|
|
13
13
|
modelValue: {
|
|
14
14
|
control: { type: 'text' },
|
|
15
15
|
},
|
|
16
|
-
|
|
17
16
|
value: { // TODO: Remove Vue 2 fallback
|
|
18
17
|
table: { disable: true },
|
|
19
18
|
},
|
|
@@ -23,7 +22,7 @@ export default {
|
|
|
23
22
|
placeholder: {
|
|
24
23
|
control: { type: 'text' },
|
|
25
24
|
},
|
|
26
|
-
|
|
25
|
+
markdownFormat: {
|
|
27
26
|
control: { type: 'boolean' },
|
|
28
27
|
},
|
|
29
28
|
fullHeight: {
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
>
|
|
14
14
|
<div :class="toolbarContainerStyles">
|
|
15
15
|
<div
|
|
16
|
-
v-for="tool in toolbar"
|
|
17
|
-
:key="
|
|
16
|
+
v-for="(tool, index) in toolbar"
|
|
17
|
+
:key="index"
|
|
18
18
|
:class="toolbarStyles"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
@@ -109,11 +109,11 @@ export default defineComponent({
|
|
|
109
109
|
props: {
|
|
110
110
|
modelValue: {
|
|
111
111
|
type: String,
|
|
112
|
-
default:
|
|
112
|
+
default: undefined,
|
|
113
113
|
},
|
|
114
114
|
value: { // TODO: Remove Vue 2 fallback
|
|
115
115
|
type: String,
|
|
116
|
-
default:
|
|
116
|
+
default: undefined,
|
|
117
117
|
},
|
|
118
118
|
toolbar: {
|
|
119
119
|
type: Array,
|
|
@@ -213,6 +213,7 @@ export default defineComponent({
|
|
|
213
213
|
},
|
|
214
214
|
onCreate: ({ editor }) => {
|
|
215
215
|
if (props.markdownFormat) {
|
|
216
|
+
console.log(proxyModelValue.value, 'on crete');
|
|
216
217
|
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
217
218
|
editor.commands.setContent(deserialized);
|
|
218
219
|
} else {
|
|
@@ -273,10 +274,12 @@ export default defineComponent({
|
|
|
273
274
|
// Computed
|
|
274
275
|
const proxyModelValue = computed({
|
|
275
276
|
get: () => {
|
|
277
|
+
console.log('modelV: ', props.modelValue, 'v: ', props.value);
|
|
276
278
|
return props.modelValue ?? props.value; // TODO: Remove Vue 2 fallback
|
|
277
279
|
},
|
|
278
280
|
|
|
279
281
|
set: (value) => {
|
|
282
|
+
console.log(value, 'set');
|
|
280
283
|
context.emit('input', value);
|
|
281
284
|
context.emit('update:modelValue', value);
|
|
282
285
|
},
|
|
@@ -411,12 +414,12 @@ export default defineComponent({
|
|
|
411
414
|
|
|
412
415
|
//Effects
|
|
413
416
|
watch(proxyModelValue, (value) => {
|
|
417
|
+
console.log(value, 'watch');
|
|
414
418
|
if (value !== editor?.getHTML() && !props.markdownFormat) {
|
|
415
419
|
editor?.commands.setContent(value as string);
|
|
416
420
|
}
|
|
417
421
|
if (props.markdownFormat && value !== markdownOutput.value) {
|
|
418
422
|
const deserialized = deserialize(editor?.schema, value);
|
|
419
|
-
console.log(deserialized);
|
|
420
423
|
editor?.commands.setContent(deserialized);
|
|
421
424
|
}
|
|
422
425
|
});
|