@onereach/ui-components 2.70.0-beta.2131.0 → 2.70.0-beta.2159.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/{OrAvatar-2fa559e1.js → OrAvatar-ae61bfb9.js} +41 -15
- package/dist/bundled/v2/{OrButton-0e91a808.js → OrButton-4b99c680.js} +5 -1
- package/dist/bundled/v2/{OrCard-58a1ba3e.js → OrCard-29116e1f.js} +2 -2
- package/dist/bundled/v2/OrCardCollection-c4209a92.js +350 -0
- package/dist/bundled/v2/OrCode-be1bd373.js +4255 -0
- package/dist/bundled/v2/{OrConfirm-18c534df.js → OrConfirm-cab6535b.js} +1 -1
- package/dist/bundled/v2/OrEmptyState-9fb413f9.js +160 -0
- package/dist/bundled/v2/{OrRichTextEditor-63ef1357.js → OrRichTextEditor-5843ecda.js} +13803 -20711
- package/dist/bundled/v2/{OrSearch-9d402f56.js → OrSearch-76b002cf.js} +10 -4
- package/dist/bundled/v2/{OrSortHeader-396e6a7c.js → OrSortHeader-9932d28f.js} +2 -2
- package/dist/bundled/v2/codemirrorView-14f6685c.js +7136 -0
- package/dist/bundled/v2/components/index.d.ts +1 -0
- package/dist/bundled/v2/components/index.js +13 -10
- package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/bundled/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/bundled/v2/components/or-avatar-v3/index.js +2 -1
- package/dist/bundled/v2/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/bundled/v2/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +10 -0
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +87 -40
- package/dist/bundled/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +7 -4
- package/dist/bundled/v2/components/or-card-collection-v3/props.d.ts +5 -1
- package/dist/bundled/v2/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/bundled/v2/components/or-card-collection-v3/types.d.ts +8 -3
- package/dist/bundled/v2/components/or-card-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-code/index.js +3 -2
- package/dist/bundled/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/bundled/v2/components/or-empty-state-v3/index.js +3 -159
- package/dist/bundled/v2/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/bundled/v2/components/or-rich-text-editor-v3/index.js +4 -2
- package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +45 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +2 -0
- package/dist/bundled/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
- package/dist/bundled/v2/components/or-search-v3/OrSearch.vue.d.ts +15 -2
- package/dist/bundled/v2/components/or-search-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-sort-header-v3/index.js +1 -1
- package/dist/bundled/v2/index-46cc379c.js +12186 -0
- package/dist/bundled/v2/index-780d00b0.js +13307 -0
- package/dist/bundled/v2/index.js +14 -11
- package/dist/bundled/v3/{OrAvatar.vue_vue_type_script_lang-22e46ce1.js → OrAvatar.vue_vue_type_script_lang-0426862b.js} +35 -13
- package/dist/bundled/v3/OrButton-a671b8a1.js +33 -0
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-3718b300.js → OrButton.vue_vue_type_script_lang-b0dc31ca.js} +5 -1
- package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-9a2ae9a3.js +236 -0
- package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-0f668150.js +4133 -0
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-289b5600.js → OrConfirm.vue_vue_type_script_lang-f57ffa1a.js} +6 -36
- package/dist/bundled/v3/OrEmptyState.vue_vue_type_script_lang-da7d6c42.js +111 -0
- package/dist/bundled/v3/{OrIconButton-4bd33e3c.js → OrIconButton-1581013c.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-641f6e06.js → OrIconButton.vue_vue_type_script_lang-f6f801ff.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-3a8189f4.js → OrInlineInput.vue_vue_type_script_lang-f29483f4.js} +2 -2
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-890b97ab.js → OrInlineTextarea.vue_vue_type_script_lang-cc40af48.js} +2 -2
- package/dist/bundled/v3/OrInput.vue_vue_type_script_lang-f6d793d3.js +2 -2
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-00a477f0.js → OrModal.vue_vue_type_script_lang-80a7b906.js} +2 -2
- package/dist/bundled/v3/OrNotification.vue_vue_type_script_lang-fbb35355.js +2 -2
- package/dist/bundled/v3/{OrRichTextEditor.vue_vue_type_script_lang-47fffbd6.js → OrRichTextEditor.vue_vue_type_script_lang-e0dfd695.js} +13803 -20711
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-ed78b21f.js → OrSearch.vue_vue_type_script_lang-014ad470.js} +9 -3
- package/dist/bundled/v3/OrSelect.vue_vue_type_script_lang-15285ce4.js +1 -1
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-92d9fb12.js → OrTag.vue_vue_type_script_lang-dc6a4011.js} +2 -2
- package/dist/bundled/v3/{OrToastContainer-afb51e5d.js → OrToastContainer-7c3c0b12.js} +1 -1
- package/dist/bundled/v3/codemirrorView-14f6685c.js +7136 -0
- package/dist/bundled/v3/components/index.d.ts +1 -0
- package/dist/bundled/v3/components/index.js +23 -19
- package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/bundled/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/bundled/v3/components/or-avatar-v3/index.js +3 -1
- package/dist/bundled/v3/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/bundled/v3/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +10 -0
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +87 -40
- package/dist/bundled/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +13 -6
- package/dist/bundled/v3/components/or-card-collection-v3/props.d.ts +5 -1
- package/dist/bundled/v3/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/bundled/v3/components/or-card-collection-v3/types.d.ts +8 -3
- package/dist/bundled/v3/components/or-code/index.js +3 -2
- package/dist/bundled/v3/components/or-confirm-v3/index.js +5 -4
- package/dist/bundled/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/bundled/v3/components/or-empty-state-v3/index.js +2 -134
- package/dist/bundled/v3/components/or-icon-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/bundled/v3/components/or-input-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-modal-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-notification-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-rich-text-editor-v3/index.js +6 -4
- package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +45 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +2 -0
- package/dist/bundled/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
- package/dist/bundled/v3/components/or-search-v3/OrSearch.vue.d.ts +15 -2
- package/dist/bundled/v3/components/or-search-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-select-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tag-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-toast-v3/index.js +4 -4
- package/dist/bundled/v3/index-44faad6a.js +12186 -0
- package/dist/bundled/v3/index-780d00b0.js +13307 -0
- package/dist/bundled/v3/index.js +415 -351
- package/dist/bundled/v3/{types-6c5eee23.js → types-dcc78caa.js} +2 -2
- package/dist/esm/v2/{OrAvatar-0afdef36.js → OrAvatar-3d155af3.js} +41 -15
- package/dist/esm/v2/{OrButton-357a5756.js → OrButton-357e1e2c.js} +5 -1
- package/dist/esm/v2/OrCardCollection-57d11adf.js +350 -0
- package/dist/esm/v2/{OrCode-41dd5f9b.js → OrCode-d4400b42.js} +6 -4
- package/dist/esm/v2/{OrConfirm-b0b2e43c.js → OrConfirm-ec7aef0e.js} +1 -1
- package/dist/esm/v2/OrEmptyState-2481f13f.js +158 -0
- package/dist/esm/v2/{OrRichTextEditor-c3dee275.js → OrRichTextEditor-2d152db0.js} +59 -11
- package/dist/esm/v2/{OrSearch-ddb7c1fe.js → OrSearch-2f260b09.js} +8 -2
- package/dist/esm/v2/codemirrorView-8ea431d2.js +184 -0
- package/dist/esm/v2/components/index.d.ts +1 -0
- package/dist/esm/v2/components/index.js +13 -7
- package/dist/esm/v2/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/esm/v2/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/esm/v2/components/or-avatar-v3/index.js +2 -1
- package/dist/esm/v2/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/esm/v2/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-button-v3/index.js +1 -1
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +10 -0
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollection.vue.d.ts +87 -40
- package/dist/esm/v2/components/or-card-collection-v3/OrCardCollectionView.vue2.vue.d.ts +35 -0
- package/dist/esm/v2/components/or-card-collection-v3/index.js +7 -4
- package/dist/esm/v2/components/or-card-collection-v3/props.d.ts +5 -1
- package/dist/esm/v2/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/esm/v2/components/or-card-collection-v3/types.d.ts +8 -3
- package/dist/esm/v2/components/or-code/index.js +3 -1
- package/dist/esm/v2/components/or-confirm-v3/index.js +2 -2
- package/dist/esm/v2/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/esm/v2/components/or-empty-state-v3/index.js +3 -158
- package/dist/esm/v2/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/esm/v2/components/or-rich-text-editor-v3/index.js +8 -1
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +45 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/index.js +5 -0
- package/dist/esm/v2/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
- package/dist/esm/v2/components/or-search-v3/OrSearch.vue.d.ts +15 -2
- package/dist/esm/v2/components/or-search-v3/index.js +1 -1
- package/dist/esm/v2/index.js +13 -7
- package/dist/esm/v3/{OrAvatar-ef88d31c.js → OrAvatar-53a4429d.js} +43 -16
- package/dist/esm/v3/{OrButton-f4b9ee51.js → OrButton-bb6bf8a9.js} +5 -1
- package/dist/esm/v3/OrCardCollection-2a6514f3.js +298 -0
- package/dist/esm/v3/{OrCode-ee19a5e6.js → OrCode-5ed69c23.js} +3 -1
- package/dist/esm/v3/{OrConfirm-906427ef.js → OrConfirm-5d56cbd3.js} +1 -1
- package/dist/esm/v3/OrEmptyState-bb8e3145.js +135 -0
- package/dist/esm/v3/OrInput-41691fb3.js +1 -1
- package/dist/esm/v3/{OrInputBox-5247ab25.js → OrInputBox-6d1b6059.js} +1 -1
- package/dist/esm/v3/{OrRichTextEditor-b2e87342.js → OrRichTextEditor-f1271eb6.js} +58 -10
- package/dist/esm/v3/{OrSearch-cdde55ce.js → OrSearch-e5a2e93e.js} +9 -3
- package/dist/esm/v3/OrSelect-7e813982.js +1 -1
- package/dist/esm/v3/OrTextarea-bb9ef3f2.js +1 -1
- package/dist/esm/v3/codemirrorView-8ea431d2.js +184 -0
- package/dist/esm/v3/components/index.d.ts +1 -0
- package/dist/esm/v3/components/index.js +14 -8
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.stories3.d.ts +1 -1
- package/dist/esm/v3/components/or-avatar-v3/OrAvatar.vue.d.ts +11 -0
- package/dist/esm/v3/components/or-avatar-v3/index.js +2 -1
- package/dist/esm/v3/components/or-avatar-v3/props.d.ts +2 -1
- package/dist/esm/v3/components/or-avatar-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-button-v3/index.js +1 -1
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.stories3.d.ts +10 -0
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollection.vue.d.ts +87 -40
- package/dist/esm/v3/components/or-card-collection-v3/OrCardCollectionView.vue3.vue.d.ts +35 -0
- package/dist/esm/v3/components/or-card-collection-v3/index.js +8 -5
- package/dist/esm/v3/components/or-card-collection-v3/props.d.ts +5 -1
- package/dist/esm/v3/components/or-card-collection-v3/styles.d.ts +2 -2
- package/dist/esm/v3/components/or-card-collection-v3/types.d.ts +8 -3
- package/dist/esm/v3/components/or-code/index.js +3 -1
- package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v3/components/or-empty-state-v3/OrEmptyState.vue.d.ts +1 -1
- package/dist/esm/v3/components/or-empty-state-v3/index.js +3 -135
- package/dist/esm/v3/components/or-input-box-v3/OrInputBox.vue.d.ts +1 -2
- package/dist/esm/v3/components/or-input-box-v3/index.js +2 -2
- package/dist/esm/v3/components/or-input-v3/index.js +1 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/index.js +8 -1
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.d.ts +3 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.d.ts +45 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.d.ts +1 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/index.js +5 -0
- package/dist/esm/v3/components/or-rich-text-editor-v3/utils/codemirror/types.d.ts +19 -0
- package/dist/esm/v3/components/or-search-v3/OrSearch.vue.d.ts +15 -2
- package/dist/esm/v3/components/or-search-v3/index.js +2 -2
- package/dist/esm/v3/components/or-select-v3/index.js +1 -1
- package/dist/esm/v3/components/or-textarea-v3/index.js +1 -1
- package/dist/esm/v3/index.js +14 -8
- package/package.json +2 -1
- package/src/components/index.ts +1 -0
- package/src/components/or-avatar-v3/OrAvatar.stories3.ts +9 -7
- package/src/components/or-avatar-v3/OrAvatar.vue +22 -2
- package/src/components/or-avatar-v3/props.ts +1 -0
- package/src/components/or-avatar-v3/styles.ts +49 -11
- package/src/components/or-button-v3/styles.ts +6 -0
- package/src/components/or-card/OrCard.stories.ts +1 -1
- package/src/components/or-card-collection/OrCardCollection.stories.ts +1 -1
- package/src/components/or-card-collection-v3/OrCardCollection.docs.mdx +4 -0
- package/src/components/or-card-collection-v3/OrCardCollection.stories3.ts +246 -30
- package/src/components/or-card-collection-v3/OrCardCollection.vue +132 -77
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue2.vue +41 -0
- package/src/components/or-card-collection-v3/OrCardCollectionView.vue3.vue +42 -0
- package/src/components/or-card-collection-v3/props.ts +14 -1
- package/src/components/or-card-collection-v3/styles.ts +6 -4
- package/src/components/or-card-collection-v3/types.ts +9 -3
- package/src/components/or-code/OrCode.vue +3 -1
- package/src/components/or-empty-state-v3/OrEmptyState.vue +16 -10
- package/src/components/or-input-box-v3/OrInputBox.vue +1 -2
- package/src/components/or-menu-v3/OrMenu.stories3.ts +1 -1
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.stories3.ts +2 -0
- package/src/components/or-rich-text-editor-v3/OrRichTextEditor.vue +32 -6
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorNode.ts +40 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/codemirrorView.ts +257 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/index.ts +1 -0
- package/src/components/or-rich-text-editor-v3/utils/codemirror/types.ts +22 -0
- package/src/components/or-rich-text-editor-v3/utils/markdown.ts +2 -0
- package/src/components/or-search-v3/OrSearch.stories3.ts +1 -1
- package/src/components/or-search-v3/OrSearch.vue +8 -2
- package/src/components/or-teleport-v3/OrTeleport.stories3.ts +1 -1
- package/dist/bundled/v2/OrCardCollection-a9a779ea.js +0 -228
- package/dist/bundled/v2/OrCode-0cd991a1.js +0 -29579
- package/dist/bundled/v2/index.es-3f39f316.js +0 -115
- package/dist/bundled/v3/OrCardCollection.vue_vue_type_script_lang-3993a015.js +0 -164
- package/dist/bundled/v3/OrCode.vue_vue_type_script_lang-6c5f94a6.js +0 -29457
- package/dist/bundled/v3/index.es-3f39f316.js +0 -115
- package/dist/esm/v2/OrCardCollection-4f001551.js +0 -227
- package/dist/esm/v3/OrCardCollection-5a0febaf.js +0 -198
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { defineComponent, ref, computed } from 'vue-demi';
|
|
2
|
+
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
3
|
+
|
|
4
|
+
var EmptyStateSize;
|
|
5
|
+
(function (EmptyStateSize) {
|
|
6
|
+
EmptyStateSize["L"] = "l";
|
|
7
|
+
EmptyStateSize["M"] = "m";
|
|
8
|
+
})(EmptyStateSize || (EmptyStateSize = {}));
|
|
9
|
+
|
|
10
|
+
const EmptyStateRoot = [
|
|
11
|
+
// Layout
|
|
12
|
+
'grow', 'flex', 'flex-col', 'justify-center', 'items-center',
|
|
13
|
+
// Box
|
|
14
|
+
'w-full',
|
|
15
|
+
// Sizing
|
|
16
|
+
'gap-sm'];
|
|
17
|
+
const EmptyStateImage = [
|
|
18
|
+
// Sizing
|
|
19
|
+
'mb-sm'];
|
|
20
|
+
const EmptyStateImageSizes = {
|
|
21
|
+
[EmptyStateSize.L]: [
|
|
22
|
+
// Box
|
|
23
|
+
'h-3xl'],
|
|
24
|
+
[EmptyStateSize.M]: [
|
|
25
|
+
// Box
|
|
26
|
+
'h-2xl']
|
|
27
|
+
};
|
|
28
|
+
const EmptyStateHeading = [
|
|
29
|
+
// Theme
|
|
30
|
+
'theme-foreground-default', 'dark:theme-foreground-default-dark'];
|
|
31
|
+
const EmptyStateHeadingSizes = {
|
|
32
|
+
[EmptyStateSize.L]: [
|
|
33
|
+
// Typography
|
|
34
|
+
'typography-headline-2'],
|
|
35
|
+
[EmptyStateSize.M]: [
|
|
36
|
+
// Typography
|
|
37
|
+
'typography-headline-4']
|
|
38
|
+
};
|
|
39
|
+
const EmptyStateText = ['text-center',
|
|
40
|
+
// Theme
|
|
41
|
+
'text-outline', 'dark:text-outline-dark'];
|
|
42
|
+
const EmptyStateContent = EmptyStateText;
|
|
43
|
+
const EmptyStateTextSizes = {
|
|
44
|
+
[EmptyStateSize.L]: [
|
|
45
|
+
// Typography
|
|
46
|
+
'typography-body-2-regular'],
|
|
47
|
+
[EmptyStateSize.M]: [
|
|
48
|
+
// Typography
|
|
49
|
+
'typography-caption-regular']
|
|
50
|
+
};
|
|
51
|
+
const EmptyStateContentSizes = EmptyStateTextSizes;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The component to display when there is no content on a page,
|
|
55
|
+
* no records found or selected, or while the data is being loaded.
|
|
56
|
+
* Provides a hint to the user on what to do.
|
|
57
|
+
* Consists of text message, optional icon and optional loader.
|
|
58
|
+
*/
|
|
59
|
+
var script = defineComponent({
|
|
60
|
+
name: 'OrEmptyState',
|
|
61
|
+
props: {
|
|
62
|
+
/**
|
|
63
|
+
* Size of the component, affects font and icon size.
|
|
64
|
+
* Use Large if the component takes all screen space,
|
|
65
|
+
* and Medium if it is a part of the complex layout.
|
|
66
|
+
*/
|
|
67
|
+
size: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: EmptyStateSize.M
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* The heading of the empty state block.
|
|
73
|
+
*/
|
|
74
|
+
heading: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: ''
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Additional text such as a hint for a user with proposed next steps.
|
|
80
|
+
*/
|
|
81
|
+
text: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: ''
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* Path to the image to display above the heading.
|
|
87
|
+
* Image height is fixed depending on `size` prop, width is undefined to preserve aspect ratio.
|
|
88
|
+
*/
|
|
89
|
+
imageSrc: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: undefined
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
setup(props) {
|
|
95
|
+
const root = ref();
|
|
96
|
+
const rootClasses = computed(() => ['or-empty-state', ...EmptyStateRoot]);
|
|
97
|
+
const imageClasses = computed(() => ['or-empty-state_image', ...EmptyStateImage, ...EmptyStateImageSizes[props.size]]);
|
|
98
|
+
const headingClasses = computed(() => ['or-empty-state_heading', ...EmptyStateHeading, ...EmptyStateHeadingSizes[props.size]]);
|
|
99
|
+
const textClasses = computed(() => ['or-empty-state_text', ...EmptyStateText, ...EmptyStateTextSizes[props.size]]);
|
|
100
|
+
const slotClasses = computed(() => ['or-empty-state_content', ...EmptyStateContent, ...EmptyStateContentSizes[props.size]]);
|
|
101
|
+
return {
|
|
102
|
+
root,
|
|
103
|
+
rootClasses,
|
|
104
|
+
imageClasses,
|
|
105
|
+
headingClasses,
|
|
106
|
+
textClasses,
|
|
107
|
+
slotClasses
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
/* script */
|
|
113
|
+
const __vue_script__ = script;
|
|
114
|
+
|
|
115
|
+
/* template */
|
|
116
|
+
var __vue_render__ = function () {
|
|
117
|
+
var _vm = this;
|
|
118
|
+
var _h = _vm.$createElement;
|
|
119
|
+
var _c = _vm._self._c || _h;
|
|
120
|
+
return _c('div', {
|
|
121
|
+
ref: "root",
|
|
122
|
+
class: _vm.rootClasses
|
|
123
|
+
}, [_vm.imageSrc ? _c('img', {
|
|
124
|
+
class: _vm.imageClasses,
|
|
125
|
+
attrs: {
|
|
126
|
+
"src": _vm.imageSrc,
|
|
127
|
+
"alt": ""
|
|
128
|
+
}
|
|
129
|
+
}) : _vm._e(), _vm._v(" "), _c('div', {
|
|
130
|
+
class: _vm.headingClasses
|
|
131
|
+
}, [_vm._v("\n " + _vm._s(_vm.heading) + "\n ")]), _vm._v(" "), _vm.$slots.default ? _c('div', {
|
|
132
|
+
class: _vm.slotClasses
|
|
133
|
+
}, [_vm._t("default")], 2) : _vm._e(), _vm._v(" "), _c('div', {
|
|
134
|
+
class: _vm.textClasses
|
|
135
|
+
}, [_vm._v("\n " + _vm._s(_vm.text) + "\n ")])]);
|
|
136
|
+
};
|
|
137
|
+
var __vue_staticRenderFns__ = [];
|
|
138
|
+
|
|
139
|
+
/* style */
|
|
140
|
+
const __vue_inject_styles__ = undefined;
|
|
141
|
+
/* scoped */
|
|
142
|
+
const __vue_scope_id__ = undefined;
|
|
143
|
+
/* module identifier */
|
|
144
|
+
const __vue_module_identifier__ = undefined;
|
|
145
|
+
/* functional template */
|
|
146
|
+
const __vue_is_functional_template__ = false;
|
|
147
|
+
/* style inject */
|
|
148
|
+
|
|
149
|
+
/* style inject SSR */
|
|
150
|
+
|
|
151
|
+
/* style inject shadow dom */
|
|
152
|
+
|
|
153
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
154
|
+
render: __vue_render__,
|
|
155
|
+
staticRenderFns: __vue_staticRenderFns__
|
|
156
|
+
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
157
|
+
|
|
158
|
+
export { EmptyStateSize as E, __vue_component__ as _ };
|
|
@@ -21,11 +21,14 @@ import { _ as __vue_component__$2 } from './OrLabel-2a9f1477.js';
|
|
|
21
21
|
import { _ as __vue_component__$4 } from './OrMenu-df27d0ef.js';
|
|
22
22
|
import './OrPopover-9bafbdb4.js';
|
|
23
23
|
import { _ as __vue_component__$3 } from './OrMenuItem-c7f28480.js';
|
|
24
|
-
import { Editor, mergeAttributes } from '@tiptap/core';
|
|
24
|
+
import { Node, Editor, mergeAttributes } from '@tiptap/core';
|
|
25
25
|
import StarterKit from '@tiptap/starter-kit';
|
|
26
26
|
import Underline from '@tiptap/extension-underline';
|
|
27
27
|
import Heading from '@tiptap/extension-heading';
|
|
28
28
|
import Placeholder from '@tiptap/extension-placeholder';
|
|
29
|
+
import { C as CodeMirrorView } from './codemirrorView-8ea431d2.js';
|
|
30
|
+
import { minimalSetup } from 'codemirror';
|
|
31
|
+
import { javascript } from '@codemirror/lang-javascript';
|
|
29
32
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
30
33
|
import { c as createInjector } from './browser-82dea9ed.js';
|
|
31
34
|
|
|
@@ -84,6 +87,7 @@ const serialize = (schema, content) => {
|
|
|
84
87
|
return serializer.serialize(proseMirrorDocument);
|
|
85
88
|
};
|
|
86
89
|
const deserialize = (schema, content) => {
|
|
90
|
+
if (!content) return null;
|
|
87
91
|
const html = marked.parse(content);
|
|
88
92
|
if (!html) return null;
|
|
89
93
|
const parser = new DOMParser();
|
|
@@ -135,6 +139,41 @@ const EditorInput = [
|
|
|
135
139
|
// Sizing
|
|
136
140
|
'min-h-[88px]'];
|
|
137
141
|
|
|
142
|
+
var codemirrorNode = Node.create({
|
|
143
|
+
name: 'code_block',
|
|
144
|
+
content: 'text*',
|
|
145
|
+
marks: '',
|
|
146
|
+
group: 'block',
|
|
147
|
+
code: true,
|
|
148
|
+
defining: true,
|
|
149
|
+
isolating: true,
|
|
150
|
+
parseHTML() {
|
|
151
|
+
return [{
|
|
152
|
+
tag: 'pre',
|
|
153
|
+
preserveWhitespace: 'full'
|
|
154
|
+
}];
|
|
155
|
+
},
|
|
156
|
+
renderHTML() {
|
|
157
|
+
return ['pre', ['code', 0]];
|
|
158
|
+
},
|
|
159
|
+
addNodeView() {
|
|
160
|
+
return ({
|
|
161
|
+
node,
|
|
162
|
+
editor,
|
|
163
|
+
getPos
|
|
164
|
+
}) => {
|
|
165
|
+
return new CodeMirrorView({
|
|
166
|
+
node,
|
|
167
|
+
view: editor.view,
|
|
168
|
+
getPos: getPos,
|
|
169
|
+
cmOptions: {
|
|
170
|
+
extensions: [minimalSetup, javascript()]
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
138
177
|
var script = defineComponent({
|
|
139
178
|
name: 'OrRichTextEditor',
|
|
140
179
|
components: {
|
|
@@ -245,7 +284,6 @@ var script = defineComponent({
|
|
|
245
284
|
editor
|
|
246
285
|
}) => {
|
|
247
286
|
if (props.markdownFormat) {
|
|
248
|
-
console.log(proxyModelValue.value, 'on crete');
|
|
249
287
|
const deserialized = deserialize(editor.schema, proxyModelValue.value);
|
|
250
288
|
editor.commands.setContent(deserialized);
|
|
251
289
|
} else {
|
|
@@ -254,8 +292,9 @@ var script = defineComponent({
|
|
|
254
292
|
},
|
|
255
293
|
element: editorRef.value,
|
|
256
294
|
autofocus: props.autofocus,
|
|
257
|
-
extensions: [StarterKit.configure({
|
|
258
|
-
heading: false
|
|
295
|
+
extensions: [codemirrorNode, StarterKit.configure({
|
|
296
|
+
heading: false,
|
|
297
|
+
codeBlock: false
|
|
259
298
|
}), Heading.configure({
|
|
260
299
|
levels: headingLevels
|
|
261
300
|
}).extend({
|
|
@@ -297,12 +336,10 @@ var script = defineComponent({
|
|
|
297
336
|
const proxyModelValue = computed({
|
|
298
337
|
get: () => {
|
|
299
338
|
var _a;
|
|
300
|
-
console.log('modelV: ', props.modelValue, 'v: ', props.value);
|
|
301
339
|
return (_a = props.modelValue) !== null && _a !== void 0 ? _a : props.value; // TODO: Remove Vue 2 fallback
|
|
302
340
|
},
|
|
303
341
|
|
|
304
342
|
set: value => {
|
|
305
|
-
console.log(value, 'set');
|
|
306
343
|
context.emit('input', value);
|
|
307
344
|
context.emit('update:modelValue', value);
|
|
308
345
|
}
|
|
@@ -329,7 +366,15 @@ var script = defineComponent({
|
|
|
329
366
|
} else if (item === 'blockquote') {
|
|
330
367
|
editor === null || editor === void 0 ? void 0 : editor.chain().focus().toggleBlockquote().run();
|
|
331
368
|
} else if (item === 'codeBlock') {
|
|
332
|
-
|
|
369
|
+
if (!isActive.value['codeBlock']) {
|
|
370
|
+
// isActive.value['codeBlock'] = true;
|
|
371
|
+
editor === null || editor === void 0 ? void 0 : editor.commands.setNode('code_block', {
|
|
372
|
+
language: 'javascript'
|
|
373
|
+
});
|
|
374
|
+
} else {
|
|
375
|
+
// isActive.value['codeBlock'] = false;
|
|
376
|
+
editor === null || editor === void 0 ? void 0 : editor.commands.setNode('paragraph');
|
|
377
|
+
}
|
|
333
378
|
} else if (item === 'heading') {
|
|
334
379
|
if (!level) {
|
|
335
380
|
editor === null || editor === void 0 ? void 0 : editor.commands.toggleHeading({
|
|
@@ -370,7 +415,11 @@ var script = defineComponent({
|
|
|
370
415
|
const setActiveFormats = () => {
|
|
371
416
|
const toolbarList = props.toolbar.flat();
|
|
372
417
|
toolbarList.forEach(item => {
|
|
373
|
-
|
|
418
|
+
if (item === 'codeBlock') {
|
|
419
|
+
isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive('code_block')) || false;
|
|
420
|
+
} else {
|
|
421
|
+
isActive.value[item] = (editor === null || editor === void 0 ? void 0 : editor.isActive(item)) || false;
|
|
422
|
+
}
|
|
374
423
|
});
|
|
375
424
|
};
|
|
376
425
|
// Styles
|
|
@@ -399,7 +448,6 @@ var script = defineComponent({
|
|
|
399
448
|
};
|
|
400
449
|
//Effects
|
|
401
450
|
watch(proxyModelValue, value => {
|
|
402
|
-
console.log(value, 'watch');
|
|
403
451
|
if (value !== (editor === null || editor === void 0 ? void 0 : editor.getHTML()) && !props.markdownFormat) {
|
|
404
452
|
editor === null || editor === void 0 ? void 0 : editor.commands.setContent(value);
|
|
405
453
|
}
|
|
@@ -532,8 +580,8 @@ var __vue_staticRenderFns__ = [];
|
|
|
532
580
|
/* style */
|
|
533
581
|
const __vue_inject_styles__ = function (inject) {
|
|
534
582
|
if (!inject) return;
|
|
535
|
-
inject("data-v-
|
|
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}",
|
|
583
|
+
inject("data-v-c32ab588_0", {
|
|
584
|
+
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}.tiptap-editor .cm-editor{border:solid 1px #838990;border-radius:4px}.tiptap-editor .cm-editor.cm-focused{outline:0}.tiptap-editor .cm-editor .cm-line:hover{background-color:rgba(0,95,177,.08)}",
|
|
537
585
|
map: undefined,
|
|
538
586
|
media: undefined
|
|
539
587
|
});
|
|
@@ -12,13 +12,18 @@ var script = defineComponent({
|
|
|
12
12
|
},
|
|
13
13
|
inheritAttrs: false,
|
|
14
14
|
props: {
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: '',
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
15
20
|
size: {
|
|
16
21
|
type: String,
|
|
17
22
|
default: InputBoxSize.M
|
|
18
23
|
},
|
|
19
24
|
placeholder: {
|
|
20
25
|
type: String,
|
|
21
|
-
default:
|
|
26
|
+
default: 'Search'
|
|
22
27
|
},
|
|
23
28
|
debounce: {
|
|
24
29
|
type: Number,
|
|
@@ -36,13 +41,14 @@ var script = defineComponent({
|
|
|
36
41
|
emits: ['search', 'input', 'keydown', 'keyup', 'focus', 'blur', 'clear'],
|
|
37
42
|
expose: ['root', 'focus', 'clear'],
|
|
38
43
|
setup(props, context) {
|
|
44
|
+
var _a;
|
|
39
45
|
// Refs
|
|
40
46
|
const root = ref();
|
|
41
47
|
// Styles
|
|
42
48
|
const classAttribute = useClassAttribute();
|
|
43
49
|
const rootStyles = computed(() => ['or-search', classAttribute.value]);
|
|
44
50
|
// State
|
|
45
|
-
const localModelValue = ref('');
|
|
51
|
+
const localModelValue = ref((_a = props.modelValue) !== null && _a !== void 0 ? _a : '');
|
|
46
52
|
// Events
|
|
47
53
|
debouncedWatch(localModelValue, () => context.emit('search', localModelValue.value), {
|
|
48
54
|
debounce: props.debounce
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import { TextSelection, Selection } from 'prosemirror-state';
|
|
2
|
+
import { exitCode } from 'prosemirror-commands';
|
|
3
|
+
import { EditorState } from '@codemirror/state';
|
|
4
|
+
import { EditorView, keymap } from '@codemirror/view';
|
|
5
|
+
|
|
6
|
+
const computeChange = (oldVal, newVal) => {
|
|
7
|
+
if (oldVal === newVal) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
let start = 0;
|
|
11
|
+
let oldEnd = oldVal.length;
|
|
12
|
+
let newEnd = newVal.length;
|
|
13
|
+
while (start < oldEnd && oldVal.charCodeAt(start) === newVal.charCodeAt(start)) {
|
|
14
|
+
start += 1;
|
|
15
|
+
}
|
|
16
|
+
while (oldEnd > start && newEnd > start && oldVal.charCodeAt(oldEnd - 1) === newVal.charCodeAt(newEnd - 1)) {
|
|
17
|
+
oldEnd -= 1;
|
|
18
|
+
newEnd -= 1;
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
from: start,
|
|
22
|
+
to: oldEnd,
|
|
23
|
+
text: newVal.slice(start, newEnd)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
class CodeMirrorView {
|
|
27
|
+
constructor(options) {
|
|
28
|
+
var _a;
|
|
29
|
+
this.updating = false;
|
|
30
|
+
// Store for later
|
|
31
|
+
this.node = options.node;
|
|
32
|
+
this.view = options.view;
|
|
33
|
+
const cmExtensions = ((_a = options.cmOptions) === null || _a === void 0 ? void 0 : _a.extensions) || [];
|
|
34
|
+
this.name = 'codeBlock', this.getPos = options.getPos;
|
|
35
|
+
const changeFilter = EditorState.changeFilter.of(tr => {
|
|
36
|
+
if (!tr.docChanged && !this.updating) {
|
|
37
|
+
this.forwardSelection();
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
});
|
|
41
|
+
// Create a CodeMirror instancew
|
|
42
|
+
this.cm = new EditorView({
|
|
43
|
+
dispatch: this.dispatch.bind(this)
|
|
44
|
+
});
|
|
45
|
+
// The editor's outer node is our DOM representation
|
|
46
|
+
this.dom = this.cm.dom;
|
|
47
|
+
const cmState = EditorState.create({
|
|
48
|
+
doc: this.node.textContent,
|
|
49
|
+
extensions: [changeFilter, keymap.of([{
|
|
50
|
+
key: 'ArrowUp',
|
|
51
|
+
run: this.mayBeEscape('line', -1)
|
|
52
|
+
}, {
|
|
53
|
+
key: 'ArrowLeft',
|
|
54
|
+
run: this.mayBeEscape('char', -1)
|
|
55
|
+
}, {
|
|
56
|
+
key: 'ArrowDown',
|
|
57
|
+
run: this.mayBeEscape('line', 1)
|
|
58
|
+
}, {
|
|
59
|
+
key: 'ArrowRight',
|
|
60
|
+
run: this.mayBeEscape('char', 1)
|
|
61
|
+
}, {
|
|
62
|
+
key: 'Ctrl-Enter',
|
|
63
|
+
run: () => {
|
|
64
|
+
if (exitCode(this.view.state, this.view.dispatch)) {
|
|
65
|
+
this.view.focus();
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}]), cmExtensions]
|
|
71
|
+
});
|
|
72
|
+
this.cm.setState(cmState);
|
|
73
|
+
}
|
|
74
|
+
forwardSelection() {
|
|
75
|
+
if (!this.cm.hasFocus) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const {
|
|
79
|
+
state
|
|
80
|
+
} = this.view;
|
|
81
|
+
const selection = this.asProseMirrorSelection(state.doc);
|
|
82
|
+
if (!selection.eq(state.selection)) {
|
|
83
|
+
this.view.dispatch(state.tr.setSelection(selection));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
asProseMirrorSelection(doc) {
|
|
87
|
+
const offset = this.getPos() + 1;
|
|
88
|
+
const {
|
|
89
|
+
anchor,
|
|
90
|
+
head
|
|
91
|
+
} = this.cm.state.selection.main;
|
|
92
|
+
return TextSelection.create(doc, anchor + offset, head + offset);
|
|
93
|
+
}
|
|
94
|
+
dispatch(cmTr) {
|
|
95
|
+
this.cm.setState(cmTr.state);
|
|
96
|
+
if (cmTr.docChanged && !this.updating) {
|
|
97
|
+
const start = this.getPos() + 1;
|
|
98
|
+
const cmValue = cmTr.state.doc.toString();
|
|
99
|
+
const change = computeChange(this.node.textContent, cmValue);
|
|
100
|
+
if (!change) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const content = change.text ? this.view.state.schema.text(change.text) : null;
|
|
104
|
+
const tr = this.view.state.tr.replaceWith(change.from + start, change.to + start, content);
|
|
105
|
+
this.view.dispatch(tr);
|
|
106
|
+
this.forwardSelection();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
mayBeEscape(unit, dir) {
|
|
110
|
+
return view => {
|
|
111
|
+
const {
|
|
112
|
+
state
|
|
113
|
+
} = view;
|
|
114
|
+
const {
|
|
115
|
+
selection
|
|
116
|
+
} = state;
|
|
117
|
+
const offsetToPos = () => {
|
|
118
|
+
const offset = selection.main.from;
|
|
119
|
+
const line = state.doc.lineAt(offset);
|
|
120
|
+
return {
|
|
121
|
+
line: line.number,
|
|
122
|
+
ch: offset - line.from
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
const pos = offsetToPos();
|
|
126
|
+
const hasSelection = state.selection.ranges.some(r => !r.empty);
|
|
127
|
+
const firstLine = 1;
|
|
128
|
+
const lastLine = state.doc.lineAt(state.doc.length).number;
|
|
129
|
+
if (hasSelection || pos.line !== (dir < 0 ? firstLine : lastLine) || unit === 'char' && pos.ch !== (dir < 0 ? 0 : state.doc.line(pos.line).length)) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
const targetPos = this.getPos() + (dir < 0 ? 0 : this.node.nodeSize);
|
|
133
|
+
const pmSelection = Selection.near(this.view.state.doc.resolve(targetPos), dir);
|
|
134
|
+
this.view.dispatch(this.view.state.tr.setSelection(pmSelection).scrollIntoView());
|
|
135
|
+
this.view.focus();
|
|
136
|
+
return true;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
update(node) {
|
|
140
|
+
if (node.type !== this.node.type) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
this.node = node;
|
|
144
|
+
const change = computeChange(this.cm.state.doc.toString(), node.textContent);
|
|
145
|
+
if (change) {
|
|
146
|
+
this.updating = true;
|
|
147
|
+
this.cm.dispatch({
|
|
148
|
+
changes: {
|
|
149
|
+
from: change.from,
|
|
150
|
+
to: change.to,
|
|
151
|
+
insert: change.text
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
this.updating = false;
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
setSelection(anchor, head) {
|
|
159
|
+
this.focus();
|
|
160
|
+
this.updating = true;
|
|
161
|
+
this.cm.dispatch({
|
|
162
|
+
selection: {
|
|
163
|
+
anchor,
|
|
164
|
+
head
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
this.updating = false;
|
|
168
|
+
}
|
|
169
|
+
focus() {
|
|
170
|
+
this.cm.focus();
|
|
171
|
+
this.forwardSelection();
|
|
172
|
+
}
|
|
173
|
+
selectNode() {
|
|
174
|
+
this.focus();
|
|
175
|
+
}
|
|
176
|
+
stopEvent() {
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
destroy() {
|
|
180
|
+
this.cm.destroy();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export { CodeMirrorView as C };
|
|
@@ -21,6 +21,7 @@ export * from './or-date-time-picker';
|
|
|
21
21
|
export * from './or-error';
|
|
22
22
|
export * from './or-error-tag-v3';
|
|
23
23
|
export * from './or-error-v3';
|
|
24
|
+
export * from './or-empty-state-v3';
|
|
24
25
|
export * from './or-expansion-panel-v3';
|
|
25
26
|
export * from './or-fab-v3';
|
|
26
27
|
export * from './or-floating';
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
export { O as OR_AVATAR_SIZE, _ as OrAvatar } from '../OrAvatar-4824c57f.js';
|
|
2
|
-
export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../OrAvatar-
|
|
2
|
+
export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../OrAvatar-3d155af3.js';
|
|
3
3
|
export { _ as OrBottomSheetV3 } from '../OrBottomSheet-16c2e610.js';
|
|
4
4
|
export { _ as OrButton, a as OrButtonColors, b as OrButtonSizes, O as OrButtonViews } from '../OrButton-2ca1c3d6.js';
|
|
5
5
|
export { _ as OrButtonV2 } from '../OrButton-c4f9955b.js';
|
|
6
6
|
export { _ as OrIconButton } from '../OrIconButton-014e86a7.js';
|
|
7
7
|
export { a as BUTTON_COLOR, c as BUTTON_LOADER_TYPE, b as BUTTON_SIZE, B as BUTTON_TYPE, I as ICON_BUTTON_TYPE } from '../OrIconButton.vue_rollup-plugin-vue_script-9fb7b7ab.js';
|
|
8
|
-
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, _ as OrButtonV3 } from '../OrButton-
|
|
8
|
+
export { a as ButtonColor, b as ButtonType, B as ButtonVariant, _ as OrButtonV3 } from '../OrButton-357e1e2c.js';
|
|
9
9
|
export { _ as OrCard } from '../OrCard-b7268256.js';
|
|
10
10
|
export { C as CARD_COLLECTION_LAYOUT, _ as OrCardCollection } from '../OrCardCollection-f6b07557.js';
|
|
11
|
-
export {
|
|
11
|
+
export { D as DefaultCardCollectionViews, _ as OrCardCollectionV3, d as defaultViewModes, g as gridView, l as listView } from '../OrCardCollection-57d11adf.js';
|
|
12
12
|
export { _ as OrCardV3 } from '../OrCard-de799db0.js';
|
|
13
13
|
export { a as OrCarousel, _ as OrCarouselItem } from '../OrCarouselItem-4e2cf3d8.js';
|
|
14
14
|
export { _ as OrCheckbox } from '../OrCheckbox-915f1f0a.js';
|
|
15
15
|
export { _ as OrCheckboxV3 } from '../OrCheckbox-567e387c.js';
|
|
16
16
|
export { _ as OrChip } from '../OrChips.vue_rollup-plugin-vue_script-aa8fedaa.js';
|
|
17
17
|
export { _ as OrChips } from '../OrChips-5e0063be.js';
|
|
18
|
-
export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-
|
|
18
|
+
export { _ as OrCode, O as OrCodeLanguages } from '../OrCode-d4400b42.js';
|
|
19
19
|
export { _ as OrCollapse } from '../OrCollapse-4d892ca3.js';
|
|
20
20
|
export { _ as OrColorPicker, h as amber, n as black, b as blue, m as blueGrey, k as brown, c as cyan, j as deepOrange, d as deepPurple, g as green, i as indigo, l as lightBlue, e as lightGreen, f as lime, o as orange, p as pink, a as purple, r as red, t as teal, w as white, y as yellow } from '../OrColorPicker-75abefdd.js';
|
|
21
21
|
export { _ as OrConfirm } from '../OrConfirm-d7112dd3.js';
|
|
22
|
-
export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-
|
|
22
|
+
export { C as ConfirmType, _ as OrConfirmV3 } from '../OrConfirm-ec7aef0e.js';
|
|
23
23
|
export { D as DEFAULT_TEXT, _ as OrDateTimePicker, a as OrDateTimePickerItemTypes, O as OrDateTimePickerTypes } from '../OrDateTimePicker-349df9b2.js';
|
|
24
24
|
export { _ as OrError } from '../OrError-081130bb.js';
|
|
25
25
|
export { _ as OrErrorTagV3 } from '../OrErrorTag-782dd714.js';
|
|
26
26
|
export { _ as OrErrorV3 } from '../OrError-d267ee9a.js';
|
|
27
|
+
export { E as EmptyStateSize, _ as OrEmptyStateV3 } from '../OrEmptyState-2481f13f.js';
|
|
27
28
|
export { a as ExpansionPanelColor, E as ExpansionPanelVariant, _ as OrExpansionPanelV3 } from '../OrExpansionPanel-968ddc61.js';
|
|
28
29
|
export { F as FabColor, _ as OrFabV3 } from '../OrFab-26106618.js';
|
|
29
30
|
export { _ as OrFloating, a as OrFloatingHideStrategy, O as OrFloatingPlacements } from '../OrFloating-89d6582a.js';
|
|
@@ -63,7 +64,7 @@ export { _ as OrProgressV3, P as ProgressColor, a as ProgressType } from '../OrP
|
|
|
63
64
|
export { _ as OrRadio } from '../OrRadio-e4198532.js';
|
|
64
65
|
export { _ as OrRadioGroup } from '../OrRadioGroup-d9d32cba.js';
|
|
65
66
|
export { _ as OrRadioV3 } from '../OrRadio-848ce55d.js';
|
|
66
|
-
export { _ as OrSearchV3 } from '../OrSearch-
|
|
67
|
+
export { _ as OrSearchV3 } from '../OrSearch-2f260b09.js';
|
|
67
68
|
export { _ as OrSegmentedControlV3, S as SegmentedControlSize } from '../OrSegmentedControl-e8dce8f9.js';
|
|
68
69
|
export { _ as OrSelect } from '../OrSelect-dae2b069.js';
|
|
69
70
|
export { _ as OrSelectV3 } from '../OrSelect-f0ff5a85.js';
|
|
@@ -95,7 +96,7 @@ export { p as PropsV3, a as useQueueV3, u as useToastV3 } from '../useToast-0665
|
|
|
95
96
|
export { _ as OrTooltip } from '../OrTooltip-614b016d.js';
|
|
96
97
|
export { _ as OrTooltipContent } from '../OrTooltip.vue_rollup-plugin-vue_script-63559536.js';
|
|
97
98
|
export { _ as OrTooltipV3 } from '../OrTooltip-513bee30.js';
|
|
98
|
-
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-
|
|
99
|
+
export { _ as OrRichTextEditorV3 } from '../OrRichTextEditor-2d152db0.js';
|
|
99
100
|
import 'vue-demi';
|
|
100
101
|
import 'lodash';
|
|
101
102
|
import '../normalize-component-6e8e3d80.js';
|
|
@@ -105,6 +106,8 @@ import '@vueuse/core';
|
|
|
105
106
|
import '../color-1f348774.js';
|
|
106
107
|
import '@splidejs/splide';
|
|
107
108
|
import '@codemirror/state';
|
|
109
|
+
import '@codemirror/view';
|
|
110
|
+
import '@codemirror/commands';
|
|
108
111
|
import 'codemirror';
|
|
109
112
|
import '@codemirror/lang-html';
|
|
110
113
|
import '@codemirror/lang-css';
|
|
@@ -145,3 +148,6 @@ import '@tiptap/starter-kit';
|
|
|
145
148
|
import '@tiptap/extension-underline';
|
|
146
149
|
import '@tiptap/extension-heading';
|
|
147
150
|
import '@tiptap/extension-placeholder';
|
|
151
|
+
import '../codemirrorView-8ea431d2.js';
|
|
152
|
+
import 'prosemirror-state';
|
|
153
|
+
import 'prosemirror-commands';
|
|
@@ -20,7 +20,7 @@ export declare const WithTextInSlot: StoryFn<import("vue").ComponentOptions<impo
|
|
|
20
20
|
} | string[], {} & {}, {
|
|
21
21
|
[x: number]: string;
|
|
22
22
|
} | {}, true>)>;
|
|
23
|
-
export declare const
|
|
23
|
+
export declare const WithIcon: StoryFn<import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<unknown>, import("@vue/composition-api").MethodOptions, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>, import("@vue/composition-api").ExtractPropTypes<import("@vue/composition-api").ComponentPropsOptions<import("@vue/composition-api").Data>>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{} & {}, import("@vue/composition-api").ShallowUnwrapRef<unknown>, unknown, import("@vue/composition-api").ComputedOptions, import("@vue/composition-api").MethodOptions, unknown, unknown, {
|
|
24
24
|
[x: string]: ((...args: any[]) => any) | null;
|
|
25
25
|
} | string[], {} & {}, {
|
|
26
26
|
[x: number]: string;
|
|
@@ -13,6 +13,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
13
13
|
type: PropType<AvatarSize>;
|
|
14
14
|
default: AvatarSize;
|
|
15
15
|
};
|
|
16
|
+
icon: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
16
20
|
color: {
|
|
17
21
|
type: PropType<AvatarColor>;
|
|
18
22
|
default: AvatarColor;
|
|
@@ -32,6 +36,10 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
32
36
|
type: PropType<AvatarSize>;
|
|
33
37
|
default: AvatarSize;
|
|
34
38
|
};
|
|
39
|
+
icon: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: undefined;
|
|
42
|
+
};
|
|
35
43
|
color: {
|
|
36
44
|
type: PropType<AvatarColor>;
|
|
37
45
|
default: AvatarColor;
|
|
@@ -45,6 +53,7 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
45
53
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
46
54
|
src: string;
|
|
47
55
|
size: AvatarSize;
|
|
56
|
+
icon: string;
|
|
48
57
|
color: AvatarColor;
|
|
49
58
|
colorSalt: string;
|
|
50
59
|
} & {}, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
@@ -54,11 +63,13 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
54
63
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
|
|
55
64
|
src: string;
|
|
56
65
|
size: AvatarSize;
|
|
66
|
+
icon: string;
|
|
57
67
|
color: AvatarColor;
|
|
58
68
|
colorSalt: string;
|
|
59
69
|
} & {}, {
|
|
60
70
|
src: string;
|
|
61
71
|
size: AvatarSize;
|
|
72
|
+
icon: string;
|
|
62
73
|
color: AvatarColor;
|
|
63
74
|
colorSalt: string;
|
|
64
75
|
}, true>);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../../OrAvatar-
|
|
1
|
+
export { a as AvatarColor, A as AvatarSize, _ as OrAvatarV3 } from '../../OrAvatar-3d155af3.js';
|
|
2
2
|
import 'vue-demi';
|
|
3
3
|
import '../../useClassAttribute-47fdb016.js';
|
|
4
4
|
import '@vueuse/core';
|
|
5
5
|
import '../../color-1f348774.js';
|
|
6
|
+
import '../../OrIcon-5e394c62.js';
|
|
6
7
|
import '../../normalize-component-6e8e3d80.js';
|