@onereach/ui-components 10.2.1-beta.4275.0 → 10.2.1-beta.4276.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/components/OrCardCollectionV3/OrCardCollection.js +11 -9
- package/dist/bundled/v2/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +2 -0
- package/dist/bundled/v2/components/OrCardCollectionV3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/OrCardCollectionV3/styles.js +5 -2
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.js +252 -382
- package/dist/bundled/v2/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +68 -21
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.d.ts +0 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/styles.js +4 -5
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +1 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +1 -1
- package/dist/bundled/v2/components/OrRichTextEditorV3/utils/markdown.js +2 -2
- package/dist/bundled/v2/{index-0e9c2b43.js → index-02a897ac.js} +1 -1
- package/dist/bundled/v2/{index-f379c836.js → index-7516cf60.js} +173 -258
- package/dist/bundled/v2/{markdown-2d22cf16.js → markdown-fe3bfb01.js} +113 -66
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.vue.d.ts +1 -0
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/props.js +1 -1
- package/dist/bundled/v3/components/OrCardCollectionV3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/OrCardCollectionV3/styles.js +1 -1
- package/dist/bundled/v3/components/{OrCardCollectionV3-8ddb17cf.js → OrCardCollectionV3-b9d360ef.js} +16 -10
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/OrRichTextEditor.vue.d.ts +18 -14
- package/dist/bundled/v3/components/OrRichTextEditorV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/props.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.d.ts +0 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorNode.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/codemirrorView.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/index.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/codemirror/theme.js +1 -1
- package/dist/bundled/v3/components/OrRichTextEditorV3/utils/markdown.js +1 -1
- package/dist/bundled/v3/components/{OrRichTextEditorV3-45e64a85.js → OrRichTextEditorV3-358d7df2.js} +532 -674
- package/dist/bundled/v3/components/index.js +2 -2
- package/dist/bundled/v3/index.js +2 -2
- package/dist/esm/v2/{OrCardCollection-e14978d3.js → OrCardCollection-2a2c0b31.js} +14 -9
- package/dist/esm/v2/{OrRichTextEditor-fbcc33fd.js → OrRichTextEditor-734b8b27.js} +244 -353
- package/dist/esm/v2/components/index.js +2 -2
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-card-collection-v3/index.js +1 -1
- package/dist/esm/v2/components/or-card-collection-v3/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +68 -21
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +7 -7
- package/dist/esm/v2/components/or-rich-text-editor-v3/styles.d.ts +0 -1
- package/dist/esm/v2/index.js +2 -2
- package/dist/esm/v3/{OrCardCollection-65c9e771.js → OrCardCollection-a39155b7.js} +15 -9
- package/dist/esm/v3/{OrRichTextEditor-cdd9e3e4.js → OrRichTextEditor-b5684aab.js} +242 -325
- package/dist/esm/v3/components/index.js +2 -2
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +1 -0
- package/dist/esm/v3/components/or-card-collection-v3/index.js +1 -1
- package/dist/esm/v3/components/or-card-collection-v3/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/OrRichTextEditor.vue.d.ts +18 -14
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +6 -6
- package/dist/esm/v3/components/or-rich-text-editor-v3/styles.d.ts +0 -1
- package/dist/esm/v3/index.js +2 -2
- package/package.json +18 -18
- package/src/components/or-card-collection-v3/OrCardCollection.vue +25 -14
- package/src/components/or-card-collection-v3/styles.ts +6 -1
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +203 -48
- package/src/components/or-rich-text-editor-v3/styles.ts +10 -13
- package/dist/esm/v2/components/or-rich-text-editor-v3/partials/EditorToolbar.vue.d.ts +0 -160
- package/dist/esm/v3/components/or-rich-text-editor-v3/partials/EditorToolbar.vue.d.ts +0 -89
- package/src/components/or-rich-text-editor-v3/partials/EditorToolbar.vue +0 -238
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as Schema, e as Mark, P as Plugin, a as PluginKey, T as TextSelection, D as DOMParser$1 } from './index-
|
|
1
|
+
import { c as Schema, e as Mark, P as Plugin, a as PluginKey, T as TextSelection, D as DOMParser$1 } from './index-02a897ac.js';
|
|
2
2
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-1789f0cf.js';
|
|
3
|
-
import { N as Node, m as mergeAttributes, M as Mark$1, f as getMarkAttributes, w as wrappingInputRule,
|
|
3
|
+
import { N as Node, m as mergeAttributes, M as Mark$1, f as getMarkAttributes, w as wrappingInputRule, b as markInputRule, c as markPasteRule, t as textblockTypeInputRule, h as combineTransactionSteps, i as getChangedRanges, j as getMarksBetween, l as findChildrenInRange, o as getAttributes } from './index-7516cf60.js';
|
|
4
4
|
|
|
5
5
|
var markdownIt_minExports = {};
|
|
6
6
|
var markdownIt_min = {
|
|
@@ -5102,9 +5102,7 @@ const ListItem$2 = Node.create({
|
|
|
5102
5102
|
name: 'listItem',
|
|
5103
5103
|
addOptions() {
|
|
5104
5104
|
return {
|
|
5105
|
-
HTMLAttributes: {}
|
|
5106
|
-
bulletListTypeName: 'bulletList',
|
|
5107
|
-
orderedListTypeName: 'orderedList'
|
|
5105
|
+
HTMLAttributes: {}
|
|
5108
5106
|
};
|
|
5109
5107
|
},
|
|
5110
5108
|
content: 'paragraph block*',
|
|
@@ -5243,9 +5241,7 @@ const ListItem$1 = Node.create({
|
|
|
5243
5241
|
name: 'listItem',
|
|
5244
5242
|
addOptions() {
|
|
5245
5243
|
return {
|
|
5246
|
-
HTMLAttributes: {}
|
|
5247
|
-
bulletListTypeName: 'bulletList',
|
|
5248
|
-
orderedListTypeName: 'orderedList'
|
|
5244
|
+
HTMLAttributes: {}
|
|
5249
5245
|
};
|
|
5250
5246
|
},
|
|
5251
5247
|
content: 'paragraph block*',
|
|
@@ -5274,9 +5270,7 @@ const ListItem = Node.create({
|
|
|
5274
5270
|
name: 'listItem',
|
|
5275
5271
|
addOptions() {
|
|
5276
5272
|
return {
|
|
5277
|
-
HTMLAttributes: {}
|
|
5278
|
-
bulletListTypeName: 'bulletList',
|
|
5279
|
-
orderedListTypeName: 'orderedList'
|
|
5273
|
+
HTMLAttributes: {}
|
|
5280
5274
|
};
|
|
5281
5275
|
},
|
|
5282
5276
|
content: 'paragraph block*',
|
|
@@ -5482,13 +5476,9 @@ const Strike = Mark$1.create({
|
|
|
5482
5476
|
};
|
|
5483
5477
|
},
|
|
5484
5478
|
addKeyboardShortcuts() {
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
} else {
|
|
5489
|
-
shortcuts['Ctrl-Shift-s'] = () => this.editor.commands.toggleStrike();
|
|
5490
|
-
}
|
|
5491
|
-
return shortcuts;
|
|
5479
|
+
return {
|
|
5480
|
+
'Mod-Shift-x': () => this.editor.commands.toggleStrike()
|
|
5481
|
+
};
|
|
5492
5482
|
},
|
|
5493
5483
|
addInputRules() {
|
|
5494
5484
|
return [markInputRule({
|
|
@@ -7743,6 +7733,30 @@ function find(str, type, opts) {
|
|
|
7743
7733
|
return filtered;
|
|
7744
7734
|
}
|
|
7745
7735
|
|
|
7736
|
+
/**
|
|
7737
|
+
* Is the given string valid linkable text of some sort. Note that this does not
|
|
7738
|
+
* trim the text for you.
|
|
7739
|
+
*
|
|
7740
|
+
* Optionally pass in a second `type` param, which is the type of link to test
|
|
7741
|
+
* for.
|
|
7742
|
+
*
|
|
7743
|
+
* For example,
|
|
7744
|
+
*
|
|
7745
|
+
* linkify.test(str, 'email');
|
|
7746
|
+
*
|
|
7747
|
+
* Returns `true` if str is a valid email.
|
|
7748
|
+
* @param {string} str string to test for links
|
|
7749
|
+
* @param {string} [type] optional specific link type to look for
|
|
7750
|
+
* @returns boolean true/false
|
|
7751
|
+
*/
|
|
7752
|
+
function test(str, type) {
|
|
7753
|
+
if (type === void 0) {
|
|
7754
|
+
type = null;
|
|
7755
|
+
}
|
|
7756
|
+
const tokens = tokenize(str);
|
|
7757
|
+
return tokens.length === 1 && tokens[0].isLink && (!type || tokens[0].t === type);
|
|
7758
|
+
}
|
|
7759
|
+
|
|
7746
7760
|
function autolink(options) {
|
|
7747
7761
|
return new Plugin({
|
|
7748
7762
|
key: new PluginKey('autolink'),
|
|
@@ -7756,21 +7770,44 @@ function autolink(options) {
|
|
|
7756
7770
|
tr
|
|
7757
7771
|
} = newState;
|
|
7758
7772
|
const transform = combineTransactionSteps(oldState.doc, [...transactions]);
|
|
7773
|
+
const {
|
|
7774
|
+
mapping
|
|
7775
|
+
} = transform;
|
|
7759
7776
|
const changes = getChangedRanges(transform);
|
|
7760
7777
|
changes.forEach(_ref => {
|
|
7761
7778
|
let {
|
|
7779
|
+
oldRange,
|
|
7762
7780
|
newRange
|
|
7763
7781
|
} = _ref;
|
|
7764
|
-
//
|
|
7782
|
+
// at first we check if we have to remove links
|
|
7783
|
+
getMarksBetween(oldRange.from, oldRange.to, oldState.doc).filter(item => item.mark.type === options.type).forEach(oldMark => {
|
|
7784
|
+
const newFrom = mapping.map(oldMark.from);
|
|
7785
|
+
const newTo = mapping.map(oldMark.to);
|
|
7786
|
+
const newMarks = getMarksBetween(newFrom, newTo, newState.doc).filter(item => item.mark.type === options.type);
|
|
7787
|
+
if (!newMarks.length) {
|
|
7788
|
+
return;
|
|
7789
|
+
}
|
|
7790
|
+
const newMark = newMarks[0];
|
|
7791
|
+
const oldLinkText = oldState.doc.textBetween(oldMark.from, oldMark.to, undefined, ' ');
|
|
7792
|
+
const newLinkText = newState.doc.textBetween(newMark.from, newMark.to, undefined, ' ');
|
|
7793
|
+
const wasLink = test(oldLinkText);
|
|
7794
|
+
const isLink = test(newLinkText);
|
|
7795
|
+
// remove only the link, if it was a link before too
|
|
7796
|
+
// because we don’t want to remove links that were set manually
|
|
7797
|
+
if (wasLink && !isLink) {
|
|
7798
|
+
tr.removeMark(newMark.from, newMark.to, options.type);
|
|
7799
|
+
}
|
|
7800
|
+
});
|
|
7801
|
+
// now let’s see if we can add new links
|
|
7765
7802
|
const nodesInChangedRanges = findChildrenInRange(newState.doc, newRange, node => node.isTextblock);
|
|
7766
7803
|
let textBlock;
|
|
7767
7804
|
let textBeforeWhitespace;
|
|
7768
7805
|
if (nodesInChangedRanges.length > 1) {
|
|
7769
|
-
// Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter)
|
|
7806
|
+
// Grab the first node within the changed ranges (ex. the first of two paragraphs when hitting enter)
|
|
7770
7807
|
textBlock = nodesInChangedRanges[0];
|
|
7771
7808
|
textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, textBlock.pos + textBlock.node.nodeSize, undefined, ' ');
|
|
7772
7809
|
} else if (nodesInChangedRanges.length
|
|
7773
|
-
// We want to make sure to include the block seperator argument to treat hard breaks like spaces
|
|
7810
|
+
// We want to make sure to include the block seperator argument to treat hard breaks like spaces
|
|
7774
7811
|
&& newState.doc.textBetween(newRange.from, newRange.to, ' ', ' ').endsWith(' ')) {
|
|
7775
7812
|
textBlock = nodesInChangedRanges[0];
|
|
7776
7813
|
textBeforeWhitespace = newState.doc.textBetween(textBlock.pos, newRange.to, undefined, ' ');
|
|
@@ -7785,32 +7822,20 @@ function autolink(options) {
|
|
|
7785
7822
|
if (!lastWordBeforeSpace) {
|
|
7786
7823
|
return false;
|
|
7787
7824
|
}
|
|
7788
|
-
find(lastWordBeforeSpace).filter(link => link.isLink)
|
|
7789
|
-
// Calculate link position.
|
|
7790
|
-
.map(link => ({
|
|
7791
|
-
...link,
|
|
7792
|
-
from: lastWordAndBlockOffset + link.start + 1,
|
|
7793
|
-
to: lastWordAndBlockOffset + link.end + 1
|
|
7794
|
-
}))
|
|
7795
|
-
// ignore link inside code mark
|
|
7796
|
-
.filter(link => {
|
|
7797
|
-
if (!newState.schema.marks.code) {
|
|
7798
|
-
return true;
|
|
7799
|
-
}
|
|
7800
|
-
return !newState.doc.rangeHasMark(link.from, link.to, newState.schema.marks.code);
|
|
7801
|
-
})
|
|
7802
|
-
// validate link
|
|
7803
|
-
.filter(link => {
|
|
7825
|
+
find(lastWordBeforeSpace).filter(link => link.isLink).filter(link => {
|
|
7804
7826
|
if (options.validate) {
|
|
7805
7827
|
return options.validate(link.value);
|
|
7806
7828
|
}
|
|
7807
7829
|
return true;
|
|
7808
7830
|
})
|
|
7809
|
-
//
|
|
7831
|
+
// calculate link position
|
|
7832
|
+
.map(link => ({
|
|
7833
|
+
...link,
|
|
7834
|
+
from: lastWordAndBlockOffset + link.start + 1,
|
|
7835
|
+
to: lastWordAndBlockOffset + link.end + 1
|
|
7836
|
+
}))
|
|
7837
|
+
// add link mark
|
|
7810
7838
|
.forEach(link => {
|
|
7811
|
-
if (getMarksBetween(link.from, link.to, newState.doc).some(item => item.mark.type === options.type)) {
|
|
7812
|
-
return;
|
|
7813
|
-
}
|
|
7814
7839
|
tr.addMark(link.from, link.to, options.type.create({
|
|
7815
7840
|
href: link.href
|
|
7816
7841
|
}));
|
|
@@ -7829,22 +7854,16 @@ function clickHandler(options) {
|
|
|
7829
7854
|
key: new PluginKey('handleClickLink'),
|
|
7830
7855
|
props: {
|
|
7831
7856
|
handleClick: (view, pos, event) => {
|
|
7832
|
-
var _a, _b;
|
|
7857
|
+
var _a, _b, _c;
|
|
7833
7858
|
if (event.button !== 0) {
|
|
7834
7859
|
return false;
|
|
7835
7860
|
}
|
|
7836
|
-
const eventTarget = event.target;
|
|
7837
|
-
if (eventTarget.nodeName !== 'A') {
|
|
7838
|
-
return false;
|
|
7839
|
-
}
|
|
7840
7861
|
const attrs = getAttributes(view.state, options.type.name);
|
|
7841
|
-
const link = event.target;
|
|
7842
|
-
const href = (
|
|
7843
|
-
const target = (
|
|
7862
|
+
const link = (_a = event.target) === null || _a === void 0 ? void 0 : _a.closest('a');
|
|
7863
|
+
const href = (_b = link === null || link === void 0 ? void 0 : link.href) !== null && _b !== void 0 ? _b : attrs.href;
|
|
7864
|
+
const target = (_c = link === null || link === void 0 ? void 0 : link.target) !== null && _c !== void 0 ? _c : attrs.target;
|
|
7844
7865
|
if (link && href) {
|
|
7845
|
-
|
|
7846
|
-
window.open(href, target);
|
|
7847
|
-
}
|
|
7866
|
+
window.open(href, target);
|
|
7848
7867
|
return true;
|
|
7849
7868
|
}
|
|
7850
7869
|
return false;
|
|
@@ -7852,6 +7871,39 @@ function clickHandler(options) {
|
|
|
7852
7871
|
}
|
|
7853
7872
|
});
|
|
7854
7873
|
}
|
|
7874
|
+
function pasteHandler(options) {
|
|
7875
|
+
return new Plugin({
|
|
7876
|
+
key: new PluginKey('handlePasteLink'),
|
|
7877
|
+
props: {
|
|
7878
|
+
handlePaste: (view, event, slice) => {
|
|
7879
|
+
const {
|
|
7880
|
+
state
|
|
7881
|
+
} = view;
|
|
7882
|
+
const {
|
|
7883
|
+
selection
|
|
7884
|
+
} = state;
|
|
7885
|
+
const {
|
|
7886
|
+
empty
|
|
7887
|
+
} = selection;
|
|
7888
|
+
if (empty) {
|
|
7889
|
+
return false;
|
|
7890
|
+
}
|
|
7891
|
+
let textContent = '';
|
|
7892
|
+
slice.content.forEach(node => {
|
|
7893
|
+
textContent += node.textContent;
|
|
7894
|
+
});
|
|
7895
|
+
const link = find(textContent).find(item => item.isLink && item.value === textContent);
|
|
7896
|
+
if (!textContent || !link) {
|
|
7897
|
+
return false;
|
|
7898
|
+
}
|
|
7899
|
+
options.editor.commands.setMark(options.type, {
|
|
7900
|
+
href: link.href
|
|
7901
|
+
});
|
|
7902
|
+
return true;
|
|
7903
|
+
}
|
|
7904
|
+
}
|
|
7905
|
+
});
|
|
7906
|
+
}
|
|
7855
7907
|
const Link = Mark$1.create({
|
|
7856
7908
|
name: 'link',
|
|
7857
7909
|
priority: 1000,
|
|
@@ -7893,9 +7945,6 @@ const Link = Mark$1.create({
|
|
|
7893
7945
|
target: {
|
|
7894
7946
|
default: this.options.HTMLAttributes.target
|
|
7895
7947
|
},
|
|
7896
|
-
rel: {
|
|
7897
|
-
default: this.options.HTMLAttributes.rel
|
|
7898
|
-
},
|
|
7899
7948
|
class: {
|
|
7900
7949
|
default: this.options.HTMLAttributes.class
|
|
7901
7950
|
}
|
|
@@ -7951,18 +8000,10 @@ const Link = Mark$1.create({
|
|
|
7951
8000
|
data: link
|
|
7952
8001
|
})),
|
|
7953
8002
|
type: this.type,
|
|
7954
|
-
getAttributes:
|
|
7955
|
-
var _a
|
|
7956
|
-
const html = (_a = pasteEvent.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text/html');
|
|
7957
|
-
const hrefRegex = /href="([^"]*)"/;
|
|
7958
|
-
const existingLink = html === null || html === void 0 ? void 0 : html.match(hrefRegex);
|
|
7959
|
-
if (existingLink) {
|
|
7960
|
-
return {
|
|
7961
|
-
href: existingLink[1]
|
|
7962
|
-
};
|
|
7963
|
-
}
|
|
8003
|
+
getAttributes: match => {
|
|
8004
|
+
var _a;
|
|
7964
8005
|
return {
|
|
7965
|
-
href: (
|
|
8006
|
+
href: (_a = match.data) === null || _a === void 0 ? void 0 : _a.href
|
|
7966
8007
|
};
|
|
7967
8008
|
}
|
|
7968
8009
|
})];
|
|
@@ -7980,6 +8021,12 @@ const Link = Mark$1.create({
|
|
|
7980
8021
|
type: this.type
|
|
7981
8022
|
}));
|
|
7982
8023
|
}
|
|
8024
|
+
if (this.options.linkOnPaste) {
|
|
8025
|
+
plugins.push(pasteHandler({
|
|
8026
|
+
editor: this.editor,
|
|
8027
|
+
type: this.type
|
|
8028
|
+
}));
|
|
8029
|
+
}
|
|
7983
8030
|
return plugins;
|
|
7984
8031
|
}
|
|
7985
8032
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as default } from '../OrCardCollectionV3-
|
|
1
|
+
export { s as default } from '../OrCardCollectionV3-b9d360ef.js';
|
|
@@ -43,6 +43,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
43
43
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
44
44
|
toolbarStyles: import("vue-demi").ComputedRef<string[]>;
|
|
45
45
|
toolbarPanelStyles: import("vue-demi").ComputedRef<string[]>;
|
|
46
|
+
emptyContainerStyles: import("vue-demi").ComputedRef<string[]>;
|
|
46
47
|
proxyView: import("vue-demi").Ref<string>;
|
|
47
48
|
proxySearch: import("vue-demi").Ref<string>;
|
|
48
49
|
switchView: (view: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-
|
|
1
|
+
export { C as CardCollectionView, s as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-b9d360ef.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CardCollectionView, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-
|
|
1
|
+
export { C as CardCollectionView, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollectionV3-b9d360ef.js';
|
|
@@ -4,3 +4,4 @@ export declare const CardCollectionToolbar: string[];
|
|
|
4
4
|
export declare const CardCollectionToolbarPanel: string[];
|
|
5
5
|
export declare const CardCollectionContent: string[];
|
|
6
6
|
export declare const CardCollectionContentViews: Record<CardCollectionView, string[]>;
|
|
7
|
+
export declare const CardCollectionEmptyContentItem: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as CardCollection, e as CardCollectionContent, f as CardCollectionContentViews, b as CardCollectionToolbar, c as CardCollectionToolbarPanel } from '../OrCardCollectionV3-
|
|
1
|
+
export { a as CardCollection, e as CardCollectionContent, f as CardCollectionContentViews, h as CardCollectionEmptyContentItem, b as CardCollectionToolbar, c as CardCollectionToolbarPanel } from '../OrCardCollectionV3-b9d360ef.js';
|
package/dist/bundled/v3/components/{OrCardCollectionV3-8ddb17cf.js → OrCardCollectionV3-b9d360ef.js}
RENAMED
|
@@ -24,7 +24,7 @@ const CardCollection = [
|
|
|
24
24
|
// Layout
|
|
25
25
|
'layout-column',
|
|
26
26
|
// Box
|
|
27
|
-
'
|
|
27
|
+
'h-full',
|
|
28
28
|
// Spacing
|
|
29
29
|
'gap-md'];
|
|
30
30
|
const CardCollectionToolbar = [
|
|
@@ -54,6 +54,9 @@ const CardCollectionContentViews = {
|
|
|
54
54
|
// Layout
|
|
55
55
|
'grid-cols-1']
|
|
56
56
|
};
|
|
57
|
+
const CardCollectionEmptyContentItem = [
|
|
58
|
+
// Layout
|
|
59
|
+
'layout-column items-center justify-center h-full'];
|
|
57
60
|
|
|
58
61
|
var script$1 = defineComponent({
|
|
59
62
|
name: 'OrCardCollectionView',
|
|
@@ -148,6 +151,7 @@ var script = defineComponent({
|
|
|
148
151
|
const rootStyles = computed(() => ['or-card-collection-v3', ...CardCollection]);
|
|
149
152
|
const toolbarStyles = computed(() => [...CardCollectionToolbar]);
|
|
150
153
|
const toolbarPanelStyles = computed(() => [...CardCollectionToolbarPanel]);
|
|
154
|
+
const emptyContainerStyles = computed(() => [...CardCollectionEmptyContentItem]);
|
|
151
155
|
// State
|
|
152
156
|
const proxyView = ref(props.view);
|
|
153
157
|
const proxySearch = ref(props.search);
|
|
@@ -176,6 +180,7 @@ var script = defineComponent({
|
|
|
176
180
|
rootStyles,
|
|
177
181
|
toolbarStyles,
|
|
178
182
|
toolbarPanelStyles,
|
|
183
|
+
emptyContainerStyles,
|
|
179
184
|
proxyView,
|
|
180
185
|
proxySearch,
|
|
181
186
|
switchView,
|
|
@@ -188,9 +193,6 @@ const _hoisted_1 = {
|
|
|
188
193
|
key: 0,
|
|
189
194
|
class: "layout-row gap-sm"
|
|
190
195
|
};
|
|
191
|
-
const _hoisted_2 = {
|
|
192
|
-
class: "h-full"
|
|
193
|
-
};
|
|
194
196
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
195
197
|
const _component_OrSorting = resolveComponent("OrSorting");
|
|
196
198
|
const _component_OrSearch = resolveComponent("OrSearch");
|
|
@@ -239,16 +241,20 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
239
241
|
item: withCtx(props => [renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(props)))]),
|
|
240
242
|
viewEnd: withCtx(() => [renderSlot(_ctx.$slots, "viewEnd")]),
|
|
241
243
|
_: 3 /* FORWARDED */
|
|
242
|
-
}, 8 /* PROPS */, ["items", "mode"])]) : _ctx.items.length === 0
|
|
243
|
-
key: 1
|
|
244
|
-
|
|
244
|
+
}, 8 /* PROPS */, ["items", "mode"])]) : createCommentVNode("v-if", true), _ctx.items.length === 0 || _ctx.loading ? (openBlock(), createElementBlock("div", {
|
|
245
|
+
key: 1,
|
|
246
|
+
class: normalizeClass(_ctx.emptyContainerStyles)
|
|
247
|
+
}, [_ctx.proxySearch.length > 0 && !_ctx.loading ? renderSlot(_ctx.$slots, "noSearchResults", {
|
|
248
|
+
key: 0,
|
|
245
249
|
search: _ctx.proxySearch
|
|
246
|
-
}
|
|
250
|
+
}, () => [createTextVNode(" No results ")]) : createCommentVNode("v-if", true), _ctx.loading ? renderSlot(_ctx.$slots, "loading", {
|
|
251
|
+
key: 1
|
|
252
|
+
}, () => [createVNode(_component_OrLoader)]) : createCommentVNode("v-if", true), _ctx.items.length === 0 && _ctx.proxySearch.length === 0 && !_ctx.loading ? renderSlot(_ctx.$slots, "empty", {
|
|
247
253
|
key: 2
|
|
248
|
-
}
|
|
254
|
+
}) : createCommentVNode("v-if", true)], 2 /* CLASS */)) : createCommentVNode("v-if", true)], 2 /* CLASS */);
|
|
249
255
|
}
|
|
250
256
|
|
|
251
257
|
script.render = render;
|
|
252
258
|
script.__file = "src/components/or-card-collection-v3/OrCardCollection.vue";
|
|
253
259
|
|
|
254
|
-
export { CardCollectionView as C, CardCollection as a, CardCollectionToolbar as b, CardCollectionToolbarPanel as c, defaultViewModes as d, CardCollectionContent as e, CardCollectionContentViews as f, gridView as g, listView as l, script as s };
|
|
260
|
+
export { CardCollectionView as C, CardCollection as a, CardCollectionToolbar as b, CardCollectionToolbarPanel as c, defaultViewModes as d, CardCollectionContent as e, CardCollectionContentViews as f, gridView as g, CardCollectionEmptyContentItem as h, listView as l, script as s };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as default } from '../OrRichTextEditorV3-
|
|
1
|
+
export { s as default } from '../OrRichTextEditorV3-358d7df2.js';
|
|
@@ -43,36 +43,45 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
43
43
|
type: (BooleanConstructor | StringConstructor)[];
|
|
44
44
|
default: undefined;
|
|
45
45
|
};
|
|
46
|
-
readonly: {
|
|
47
|
-
type: BooleanConstructor;
|
|
48
|
-
default: boolean;
|
|
49
|
-
};
|
|
50
46
|
}, {
|
|
51
47
|
editor: Editor | null;
|
|
52
48
|
editorRef: import("vue-demi").Ref<HTMLDivElement | undefined>;
|
|
53
|
-
|
|
49
|
+
toolbarRef: import("vue-demi").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false, import("vue-demi").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | undefined>;
|
|
54
50
|
containerRef: import("vue-demi").Ref<ComponentPublicInstance<HTMLInputElement, {}, {}, {}, {}, {}, HTMLInputElement, {}, false, import("vue-demi").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | undefined>;
|
|
51
|
+
toolbarButtonRef: import("vue-demi").Ref<any>;
|
|
52
|
+
moreButtonRef: import("vue-demi").Ref<any>;
|
|
55
53
|
textareaRef: import("vue-demi").Ref<HTMLTextAreaElement | undefined>;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
moreRef: import("vue-demi").Ref<any>;
|
|
55
|
+
menuRef: import("vue-demi").Ref<any>;
|
|
56
|
+
iconsEnum: import("vue-demi").Ref<{
|
|
57
|
+
[key: string]: string;
|
|
58
|
+
}>;
|
|
59
|
+
handleToolbarClick: (item: string, level?: number) => void;
|
|
60
60
|
handleEditorClick: () => void;
|
|
61
61
|
isActive: import("vue-demi").Ref<{
|
|
62
62
|
[key: string]: boolean;
|
|
63
63
|
}>;
|
|
64
|
+
iconTooltipsEnum: import("vue-demi").Ref<{
|
|
65
|
+
[key: string]: string;
|
|
66
|
+
}>;
|
|
64
67
|
containerStyles: import("vue-demi").ComputedRef<string[]>;
|
|
68
|
+
toolbarContainerStyles: import("vue-demi").ComputedRef<string[]>;
|
|
69
|
+
toolbarStyles: import("vue-demi").ComputedRef<string[]>;
|
|
65
70
|
rootStyles: import("vue-demi").ComputedRef<string[]>;
|
|
66
71
|
root: import("vue-demi").Ref<HTMLElement | undefined>;
|
|
67
72
|
editorInputStyles: import("vue-demi").ComputedRef<string[]>;
|
|
73
|
+
getIndexOfHeading: import("vue-demi").ComputedRef<number>;
|
|
68
74
|
headingLevels: Level[];
|
|
75
|
+
headingIcon: import("vue-demi").ComputedRef<string>;
|
|
69
76
|
attachLink: () => Promise<void>;
|
|
70
77
|
discardLink: () => void;
|
|
71
78
|
isOpenLinkModal: import("vue-demi").Ref<boolean>;
|
|
72
79
|
text: import("vue-demi").Ref<string>;
|
|
73
80
|
link: import("vue-demi").Ref<string>;
|
|
74
81
|
isFocused: import("vue-demi").Ref<boolean>;
|
|
82
|
+
isVisible: (value: string | Array<string>) => boolean;
|
|
75
83
|
countOfNotVisibleTools: import("vue-demi").Ref<number>;
|
|
84
|
+
notVisibleTools: import("vue-demi").ComputedRef<Set<string>>;
|
|
76
85
|
handleInput: (event: InputEvent) => void;
|
|
77
86
|
proxyModelValue: import("vue-demi").WritableComputedRef<string | undefined>;
|
|
78
87
|
disableMarkdown: import("vue-demi").Ref<boolean>;
|
|
@@ -119,10 +128,6 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
119
128
|
type: (BooleanConstructor | StringConstructor)[];
|
|
120
129
|
default: undefined;
|
|
121
130
|
};
|
|
122
|
-
readonly: {
|
|
123
|
-
type: BooleanConstructor;
|
|
124
|
-
default: boolean;
|
|
125
|
-
};
|
|
126
131
|
}>> & {
|
|
127
132
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
128
133
|
onInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -138,6 +143,5 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
138
143
|
hint: string;
|
|
139
144
|
disabled: boolean;
|
|
140
145
|
error: string | boolean;
|
|
141
|
-
readonly: boolean;
|
|
142
146
|
}>;
|
|
143
147
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditorV3-
|
|
1
|
+
export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditorV3-358d7df2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { F as Formats } from '../OrRichTextEditorV3-
|
|
1
|
+
export { F as Formats } from '../OrRichTextEditorV3-358d7df2.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const OrRichTextEditor: string[];
|
|
2
2
|
export declare const EditorContainer: string[];
|
|
3
|
-
export declare const EditorContainerFocus: string[];
|
|
4
3
|
export declare const ToolbarContainer: string[];
|
|
5
4
|
export declare const Toolbar: string[];
|
|
6
5
|
export declare const ToolbarButton: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { E as EditorContainer,
|
|
1
|
+
export { E as EditorContainer, f as EditorInput, O as OrRichTextEditor, b as Toolbar, c as ToolbarButton, e as ToolbarButtonFocused, T as ToolbarContainer } from '../OrRichTextEditorV3-358d7df2.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { i as default } from '../../../OrRichTextEditorV3-358d7df2.js';
|
|
2
2
|
import '../../../OrCode-d9b43205.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as default } from '../../../OrRichTextEditorV3-
|
|
1
|
+
export { C as default } from '../../../OrRichTextEditorV3-358d7df2.js';
|
|
2
2
|
import '../../../OrCode-d9b43205.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as CodeMirrorView } from '../../../OrRichTextEditorV3-
|
|
1
|
+
export { C as CodeMirrorView } from '../../../OrRichTextEditorV3-358d7df2.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../../../OrCode-d9b43205.js';
|
|
2
2
|
import '../../../../hooks/useTheme.js';
|
|
3
|
-
export {
|
|
3
|
+
export { g as color, t as default, h as orCodeHighlightStyle, o as orCodeTheme } from '../../../OrRichTextEditorV3-358d7df2.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as deserialize, a as serialize } from '../../OrRichTextEditorV3-
|
|
1
|
+
export { d as deserialize, a as serialize } from '../../OrRichTextEditorV3-358d7df2.js';
|