@appscode/design-system 1.1.0-alpha.8 → 1.1.0-beta.10

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.
Files changed (200) hide show
  1. package/base/_video-player.scss +65 -0
  2. package/base/utilities/_all.scss +6 -5
  3. package/base/utilities/_colors.scss +408 -0
  4. package/base/utilities/_customize-bulma.scss +23 -27
  5. package/base/utilities/_extended.scss +9 -4
  6. package/base/utilities/{_default.scss → _global.scss} +185 -331
  7. package/base/utilities/_layouts.scss +157 -0
  8. package/base/utilities/_mixin.scss +11 -11
  9. package/base/utilities/_spacing.scss +96 -0
  10. package/base/utilities/_typography.scss +56 -24
  11. package/base/utilities/dark-theme.scss +1 -1
  12. package/components/_ac-accordion.scss +117 -117
  13. package/components/_ac-alert-box.scss +205 -263
  14. package/components/_ac-calendar.scss +4 -4
  15. package/components/_ac-card.scss +0 -597
  16. package/components/_ac-code-highlight.scss +6 -6
  17. package/components/_ac-content-layout.scss +165 -165
  18. package/components/_ac-drag.scss +11 -11
  19. package/components/_ac-input.scss +477 -452
  20. package/components/_ac-modal.scss +212 -212
  21. package/components/_ac-multi-select.scss +780 -751
  22. package/components/_ac-options.scss +122 -123
  23. package/components/_ac-select-box.scss +5 -5
  24. package/components/_ac-table.scss +503 -502
  25. package/components/_ac-tabs.scss +39 -38
  26. package/components/_ac-tags.scss +116 -116
  27. package/components/_ac-terminal.scss +95 -51
  28. package/components/_add-card.scss +3 -3
  29. package/components/_all.scss +29 -26
  30. package/components/_app-drawer.scss +0 -134
  31. package/components/_breadcumb.scss +0 -71
  32. package/components/_buttons.scss +779 -779
  33. package/components/_card-body-wrapper.scss +5 -5
  34. package/components/_dashboard-header.scss +0 -115
  35. package/components/_direct-deploy.scss +8 -8
  36. package/components/_go-to-top.scss +1 -1
  37. package/components/_image-upload.scss +5 -5
  38. package/components/_left-sidebar-menu.scss +448 -579
  39. package/components/_monaco-editor.scss +1 -1
  40. package/components/_navbar.scss +786 -752
  41. package/components/_nested-list.scss +1 -1
  42. package/components/_overview-info.scss +7 -7
  43. package/components/_overview-page.scss +4 -4
  44. package/components/_pagination.scss +106 -124
  45. package/components/_payment-card.scss +21 -21
  46. package/components/_preloader.scss +1 -1
  47. package/components/_preview-modal.scss +18 -18
  48. package/components/_pricing-table.scss +10 -10
  49. package/components/_progress-bar.scss +12 -12
  50. package/components/_subscription-card.scss +14 -14
  51. package/components/_table-of-content.scss +4 -4
  52. package/components/_tfa.scss +9 -9
  53. package/components/_widget-menu.scss +247 -247
  54. package/components/_wizard.scss +557 -559
  55. package/components/ac-toaster/_ac-toasted.scss +7 -12
  56. package/components/bbum/_activities-header.scss +1 -1
  57. package/components/bbum/_card-team.scss +12 -12
  58. package/components/bbum/_information-center.scss +13 -13
  59. package/components/bbum/_left-sidebar.scss +8 -8
  60. package/components/bbum/_mobile-desktop.scss +7 -7
  61. package/components/bbum/_post.scss +5 -5
  62. package/components/bbum/_sign-up-notification.scss +10 -10
  63. package/components/bbum/_single-post-preview.scss +21 -21
  64. package/components/bbum/_user-profile.scss +10 -10
  65. package/components/ui-builder/_ui-builder.scss +15 -15
  66. package/components/ui-builder/_vue-open-api.scss +515 -2
  67. package/layouts/_code-preview.scss +11 -11
  68. package/main.scss +26 -10
  69. package/package.json +1 -1
  70. package/plugins/theme.js +11 -9
  71. package/plugins/vue-toaster.js +1 -1
  72. package/vue-components/plugins/time-convert.js +49 -0
  73. package/vue-components/text.vue +1 -0
  74. package/vue-components/types/cluster.ts +6 -0
  75. package/vue-components/types/importFlow.ts +16 -0
  76. package/vue-components/types/longRunningTasks.ts +20 -0
  77. package/vue-components/types/notification.ts +6 -0
  78. package/vue-components/types/previewYaml.ts +8 -0
  79. package/vue-components/types/table.ts +54 -0
  80. package/vue-components/types/theme.ts +10 -0
  81. package/vue-components/types/user.ts +22 -0
  82. package/vue-components/v2/card/Card.vue +1 -1
  83. package/vue-components/v2/card/OverviewCards.vue +17 -2
  84. package/vue-components/v2/editor/FilteredFileEditor.vue +2 -2
  85. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
  86. package/vue-components/v2/icons/Ellipsis.vue +2 -1
  87. package/vue-components/v2/modal/Modal.vue +0 -5
  88. package/vue-components/v2/navbar/Appdrawer.vue +37 -12
  89. package/vue-components/v2/navbar/Navbar.vue +3 -3
  90. package/vue-components/v2/navbar/NavbarItem.vue +3 -1
  91. package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
  92. package/vue-components/v2/navbar/User.vue +5 -22
  93. package/vue-components/v2/pagination/Pagination.vue +66 -0
  94. package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
  95. package/vue-components/v3/accordion/Accordion.vue +151 -0
  96. package/vue-components/v3/alert/Alert.vue +238 -0
  97. package/vue-components/v3/alert/Toast.vue +79 -0
  98. package/vue-components/v3/banner/Banner.vue +10 -0
  99. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +104 -0
  100. package/vue-components/v3/button/Button.vue +839 -58
  101. package/vue-components/v3/button/Buttons.vue +6 -0
  102. package/vue-components/v3/button/DownloadBtn.vue +31 -0
  103. package/vue-components/v3/cards/Card.vue +32 -0
  104. package/vue-components/v3/cards/CardContent.vue +7 -0
  105. package/vue-components/v3/cards/CardHeader.vue +14 -0
  106. package/vue-components/v3/cards/Cards.vue +7 -0
  107. package/vue-components/v3/cards/Cluster.vue +149 -0
  108. package/vue-components/v3/cards/Counter.vue +39 -0
  109. package/vue-components/v3/cards/FeatureCard.vue +71 -0
  110. package/vue-components/v3/cards/FeatureCards.vue +6 -0
  111. package/vue-components/v3/cards/InfoCard.vue +243 -0
  112. package/vue-components/v3/cards/Monitoring.vue +94 -0
  113. package/vue-components/v3/cards/OverviewCard.vue +24 -0
  114. package/vue-components/v3/cards/OverviewCards.vue +31 -0
  115. package/vue-components/v3/cards/Payment.vue +62 -0
  116. package/vue-components/v3/cards/Vendor.vue +85 -0
  117. package/vue-components/v3/content/ContentHeader.vue +39 -30
  118. package/vue-components/v3/content/ContentLayout.vue +20 -0
  119. package/vue-components/v3/content/ContentTable.vue +43 -62
  120. package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
  121. package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
  122. package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
  123. package/vue-components/v3/editor/Editor.vue +100 -113
  124. package/vue-components/v3/editor/FilteredFileEditor.vue +317 -127
  125. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +70 -94
  126. package/vue-components/v3/footer/FooterArea.vue +34 -0
  127. package/vue-components/v3/footer/FooterItem.vue +32 -0
  128. package/vue-components/v3/footer/FooterItems.vue +15 -0
  129. package/vue-components/v3/footer/Info.vue +23 -0
  130. package/vue-components/v3/footer/Status.vue +42 -0
  131. package/vue-components/v3/footer/Usage.vue +44 -0
  132. package/vue-components/v3/form/Form.vue +24 -33
  133. package/vue-components/v3/form/FormFooterControl.vue +7 -0
  134. package/vue-components/v3/form/FormFooterControls.vue +7 -0
  135. package/vue-components/v3/form-fields/AcSingleInput.vue +528 -0
  136. package/vue-components/v3/form-fields/Input.vue +19 -14
  137. package/vue-components/v3/header/Header.vue +119 -25
  138. package/vue-components/v3/header/HeaderItem.vue +18 -0
  139. package/vue-components/v3/header/HeaderItems.vue +4 -0
  140. package/vue-components/v3/icons/Ellipsis.vue +2 -0
  141. package/vue-components/v3/loaders/InfoCardLoader.vue +65 -0
  142. package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
  143. package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
  144. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +17 -15
  145. package/vue-components/v3/modal/Modal.vue +292 -96
  146. package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
  147. package/vue-components/v3/modals/JsonShowModal.vue +62 -68
  148. package/vue-components/v3/modals/LongRunningTasksModal.vue +145 -143
  149. package/vue-components/v3/navbar/Appdrawer.vue +196 -51
  150. package/vue-components/v3/navbar/Navbar.vue +298 -0
  151. package/vue-components/v3/navbar/NavbarItem.vue +81 -0
  152. package/vue-components/v3/navbar/NavbarItemContent.vue +284 -0
  153. package/vue-components/v3/navbar/Notification.vue +179 -0
  154. package/vue-components/v3/navbar/ThemeMode.vue +128 -112
  155. package/vue-components/v3/navbar/User.vue +383 -268
  156. package/vue-components/v3/notification/AlertBox.vue +41 -44
  157. package/vue-components/v3/notification/Notification.vue +49 -43
  158. package/vue-components/v3/notification/NotificationItem.vue +51 -19
  159. package/vue-components/v3/option-dots/Options.vue +188 -0
  160. package/vue-components/v3/pagination/Pagination.vue +203 -99
  161. package/vue-components/v3/preloader/Preloader.vue +23 -0
  162. package/vue-components/v3/searchbars/SearchBar.vue +59 -34
  163. package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
  164. package/vue-components/v3/sidebar/ClusterSwitcher.vue +835 -81
  165. package/vue-components/v3/sidebar/Sidebar.vue +267 -0
  166. package/vue-components/v3/sidebar/SidebarBody.vue +7 -0
  167. package/vue-components/v3/sidebar/SidebarFooter.vue +80 -0
  168. package/vue-components/v3/sidebar/SidebarHeader.vue +124 -0
  169. package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
  170. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
  171. package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
  172. package/vue-components/v3/sidebar/Steps.vue +152 -0
  173. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +128 -0
  174. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +29 -0
  175. package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
  176. package/vue-components/v3/tab/TabItem.vue +10 -12
  177. package/vue-components/v3/tab/Tabs.vue +9 -0
  178. package/vue-components/v3/tab/TabsBody.vue +7 -0
  179. package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
  180. package/vue-components/v3/table/FakeTableCell.vue +22 -31
  181. package/vue-components/v3/table/InfoTable.vue +89 -61
  182. package/vue-components/v3/table/MultiInfoTable.vue +72 -95
  183. package/vue-components/v3/table/Table.vue +589 -151
  184. package/vue-components/v3/table/TableCell.vue +20 -23
  185. package/vue-components/v3/table/TableContainer.vue +50 -28
  186. package/vue-components/v3/table/TableRow.vue +63 -85
  187. package/vue-components/v3/table/table-cell/ArrayCell.vue +67 -79
  188. package/vue-components/v3/table/table-cell/CellValue.vue +97 -103
  189. package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
  190. package/vue-components/v3/table/table-cell/ObjectCell.vue +67 -79
  191. package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
  192. package/vue-components/v3/tabs/EditorTabs.vue +18 -24
  193. package/vue-components/v3/tag/Tag.vue +15 -12
  194. package/vue-components/v3/tag/Tags.vue +7 -0
  195. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +26 -23
  196. package/base/utilities/_derived-variables.scss +0 -25
  197. package/base/utilities/_initial-variables.scss +0 -215
  198. package/components/_basic-card.scss +0 -124
  199. package/mixins/stickyContent.js +0 -141
  200. package/plugins/caching.ts +0 -243
@@ -1,3 +1,88 @@
1
+ <script setup lang="ts">
2
+ import { onUnmounted, ref, watch } from "vue";
3
+ import type { Ref } from "vue";
4
+
5
+ interface Props {
6
+ isActive?: boolean;
7
+ }
8
+
9
+ const props = withDefaults(defineProps<Props>(), {
10
+ isActive: false,
11
+ });
12
+
13
+ const emit = defineEmits(["update:is-active"]);
14
+
15
+ const dropdown: Ref<HTMLElement | null> = ref(null);
16
+ const isDropdownActive = ref(props.isActive);
17
+
18
+ // attach click event listener on window, and close the dropdown
19
+ function deactivateDropdown(e: Event) {
20
+ const { target } = e;
21
+ if (
22
+ isDropdownActive.value &&
23
+ dropdown.value &&
24
+ dropdown.value !== target &&
25
+ !dropdown.value.contains(target as Node)
26
+ ) {
27
+ if (!ignoreClick.value) {
28
+ animateDropdown("hide");
29
+ setTimeout(() => {
30
+ isDropdownActive.value = false;
31
+ emit("update:is-active", false);
32
+ }, 200);
33
+ }
34
+ }
35
+ }
36
+ window.addEventListener("click", deactivateDropdown);
37
+ onUnmounted(() => {
38
+ window.removeEventListener("click", deactivateDropdown);
39
+ });
40
+
41
+ // for animation
42
+ const dropdownShowAnimation = ref(false);
43
+ const dropdownHideAnimation = ref(false);
44
+ const ignoreClick = ref(false);
45
+
46
+ function animateDropdown(type: string) {
47
+ ignoreClick.value = true;
48
+ if (type === "show") {
49
+ dropdownShowAnimation.value = true;
50
+ // remove class after 200 miliseconds
51
+ setTimeout(() => {
52
+ dropdownShowAnimation.value = false;
53
+ ignoreClick.value = false;
54
+ }, 200);
55
+ } else {
56
+ dropdownHideAnimation.value = true;
57
+ setTimeout(() => {
58
+ dropdownHideAnimation.value = false;
59
+ ignoreClick.value = false;
60
+ }, 200);
61
+ }
62
+ }
63
+
64
+ watch(
65
+ () => props.isActive,
66
+ (n) => {
67
+ if (ignoreClick.value) {
68
+ // ignore new value
69
+ // emit old value
70
+ emit("update:is-active", isDropdownActive.value);
71
+ } else {
72
+ if (n) {
73
+ animateDropdown("show");
74
+ isDropdownActive.value = true;
75
+ } else {
76
+ animateDropdown("hide");
77
+ setTimeout(() => {
78
+ isDropdownActive.value = false;
79
+ }, 200);
80
+ }
81
+ }
82
+ }
83
+ );
84
+ </script>
85
+
1
86
  <template>
2
87
  <div
3
88
  ref="dropdown"
@@ -18,94 +103,3 @@
18
103
  </div>
19
104
  </div>
20
105
  </template>
21
-
22
- <script lang="ts">
23
- //@ts-ignore
24
- import { defineComponent, onUnmounted, Ref, ref, toRefs, watch } from "vue";
25
-
26
- export default defineComponent({
27
- props: {
28
- isActive: {
29
- type: Boolean,
30
- default: false,
31
- },
32
- },
33
- emits: ["update:is-active"],
34
-
35
- setup(props, { emit }) {
36
- const { isActive } = toRefs(props);
37
- watch(isActive, (n) => {
38
- if (ignoreClick.value) {
39
- // ignore new value
40
- // emit old value
41
- emit("update:is-active", isDropdownActive.value);
42
- } else {
43
- if (n) {
44
- animateDropdown("show");
45
- isDropdownActive.value = true;
46
- } else {
47
- animateDropdown("hide");
48
- setTimeout(() => {
49
- isDropdownActive.value = false;
50
- }, 200);
51
- }
52
- }
53
- });
54
-
55
- const dropdown: Ref<HTMLElement | null> = ref(null);
56
- const isDropdownActive = ref(isActive.value);
57
-
58
- // attach click event listener on window, and close the dropdown
59
- function deactivateDropdown(e: Event) {
60
- const { target } = e;
61
- if (
62
- isDropdownActive.value &&
63
- dropdown.value &&
64
- dropdown.value !== target &&
65
- !dropdown.value.contains(target as Node)
66
- ) {
67
- if (!ignoreClick.value) {
68
- animateDropdown("hide");
69
- setTimeout(() => {
70
- isDropdownActive.value = false;
71
- emit("update:is-active", false);
72
- }, 200);
73
- }
74
- }
75
- }
76
- window.addEventListener("click", deactivateDropdown);
77
- onUnmounted(() => {
78
- window.removeEventListener("click", deactivateDropdown);
79
- });
80
-
81
- // for animation
82
- const dropdownShowAnimation = ref(false);
83
- const dropdownHideAnimation = ref(false);
84
- const ignoreClick = ref(false);
85
- function animateDropdown(type: string) {
86
- ignoreClick.value = true;
87
- if (type === "show") {
88
- dropdownShowAnimation.value = true;
89
- // remove class after 200 miliseconds
90
- setTimeout(() => {
91
- dropdownShowAnimation.value = false;
92
- ignoreClick.value = false;
93
- }, 200);
94
- } else {
95
- dropdownHideAnimation.value = true;
96
- setTimeout(() => {
97
- dropdownHideAnimation.value = false;
98
- ignoreClick.value = false;
99
- }, 200);
100
- }
101
- }
102
-
103
- return {
104
- dropdown,
105
- isDropdownActive,
106
- dropdownShowAnimation,
107
- dropdownHideAnimation,
108
- };
109
- },
110
- });
111
- </script>
@@ -1,3 +1,103 @@
1
+ <script setup lang="ts">
2
+ import { defineAsyncComponent, ref, computed, watch } from "vue";
3
+
4
+ interface Props {
5
+ modelValue?: string;
6
+ originalValue?: string;
7
+ readOnly?: boolean;
8
+ language?: string;
9
+ showMinimap?: boolean;
10
+ editorHeight?: number;
11
+ editorTheme?: string;
12
+ wordWrap?: string;
13
+ }
14
+
15
+ const props = withDefaults(defineProps<Props>(), {
16
+ modelValue: "",
17
+ originalValue: "",
18
+ readOnly: false,
19
+ language: "",
20
+ showMinimap: false,
21
+ editorHeight: 40,
22
+ editorTheme: "",
23
+ wordWrap: "off",
24
+ });
25
+
26
+ const emit = defineEmits(["update:modelValue"]);
27
+
28
+ const EditorTabs = defineAsyncComponent(() => import("../tabs/EditorTabs.vue"));
29
+
30
+ const Preloader = defineAsyncComponent(
31
+ () => import("../preloader/Preloader.vue")
32
+ );
33
+
34
+ const Banner = defineAsyncComponent(() => import("../banner/Banner.vue"));
35
+
36
+ const MonacoEditor = defineAsyncComponent({
37
+ loader: () => import("./MonacoEditor.vue"),
38
+
39
+ loadingComponent: Preloader,
40
+ delay: 200,
41
+ errorComponent: Banner,
42
+ timeout: 100000,
43
+ });
44
+
45
+ const activeTab = ref("edit");
46
+ const editorContent = ref("");
47
+ const originalEditorContent = ref("");
48
+
49
+ const calcShowMinimap = computed(() => {
50
+ const noOfLines = editorContent.value.split("\n").length;
51
+ return props.showMinimap && noOfLines * 2 > props.editorHeight;
52
+ });
53
+
54
+ const theme = computed(() => {
55
+ return (
56
+ props.editorTheme ||
57
+ (document.documentElement.classList.contains("is-dark-theme")
58
+ ? "vs-dark"
59
+ : "vs")
60
+ );
61
+ });
62
+
63
+ const onChange = (e: Event) => {
64
+ if (typeof e === "string") editorContent.value = e;
65
+ };
66
+
67
+ const onEditorMount = (editor: Record<string, unknown>) => {
68
+ // add event listeners
69
+ if (editor.onDidBlurEditorText instanceof Function) {
70
+ editor.onDidBlurEditorText(() => {
71
+ emit("update:modelValue", editorContent.value);
72
+ });
73
+ }
74
+ };
75
+
76
+ watch(
77
+ () => props.modelValue,
78
+ (n) => {
79
+ if (editorContent.value !== n) {
80
+ editorContent.value = n;
81
+ }
82
+ },
83
+ {
84
+ immediate: true,
85
+ }
86
+ );
87
+
88
+ watch(
89
+ () => props.originalValue,
90
+ (n) => {
91
+ if (originalEditorContent.value !== n) {
92
+ originalEditorContent.value = n;
93
+ }
94
+ },
95
+ {
96
+ immediate: true,
97
+ }
98
+ );
99
+ </script>
100
+
1
101
  <template>
2
102
  <div>
3
103
  <editor-tabs
@@ -45,116 +145,3 @@
45
145
  />
46
146
  </div>
47
147
  </template>
48
-
49
- <script>
50
- import { defineComponent, defineAsyncComponent, h } from "vue";
51
- import Preloader from "../../v2/preloader/Preloader.vue";
52
- import Banner from "../../v2/banner/Banner.vue";
53
- export default defineComponent({
54
- props: {
55
- modelValue: {
56
- type: String,
57
- default: "",
58
- },
59
- originalValue: {
60
- type: String,
61
- default: "",
62
- },
63
- readOnly: {
64
- type: Boolean,
65
- default: false,
66
- },
67
- language: {
68
- type: String,
69
- default: "yaml",
70
- },
71
- showMinimap: {
72
- type: Boolean,
73
- default: true,
74
- },
75
- editorHeight: {
76
- type: Number,
77
- default: 40,
78
- },
79
- editorTheme: {
80
- type: String,
81
- default: "",
82
- },
83
- wordWrap: {
84
- type: String,
85
- default: "off",
86
- },
87
- },
88
-
89
- emits: ["update:modelValue"],
90
-
91
- components: {
92
- EditorTabs: defineAsyncComponent(() =>
93
- import("../tabs/EditorTabs.vue").then((module) => module.default)
94
- ),
95
- MonacoEditor: defineAsyncComponent({
96
- loader: () =>
97
- import("./MonacoEditor.vue").then((module) => module.default),
98
-
99
- loadingComponent: Preloader,
100
- delay: 200,
101
- errorComponent: Banner,
102
- timeout: 100000,
103
- }),
104
- },
105
-
106
- data() {
107
- return {
108
- activeTab: "edit",
109
- editorContent: "",
110
- originalEditorContent: "",
111
- };
112
- },
113
-
114
- computed: {
115
- calcShowMinimap() {
116
- const noOfLines = this.editorContent.split("\n").length;
117
- return this.showMinimap && noOfLines * 2 > this.editorHeight;
118
- },
119
- theme() {
120
- return (
121
- this.editorTheme ||
122
- (document.documentElement.classList.contains("is-dark-theme")
123
- ? "vs-dark"
124
- : "vs")
125
- );
126
- },
127
- },
128
-
129
- watch: {
130
- modelValue: {
131
- immediate: true,
132
- handler(n) {
133
- if (this.editorContent !== n) {
134
- this.editorContent = n;
135
- }
136
- },
137
- },
138
- originalValue: {
139
- immediate: true,
140
- handler(n) {
141
- if (this.originalEditorContent !== n) {
142
- this.originalEditorContent = n;
143
- }
144
- },
145
- },
146
- },
147
-
148
- methods: {
149
- onChange(e) {
150
- if (typeof e === "string") this.editorContent = e;
151
- },
152
- onEditorMount(editor) {
153
- // add event listeners
154
- editor.onDidBlurEditorText(() => {
155
- this.$emit("update:modelValue", this.editorContent);
156
- });
157
- },
158
- },
159
- });
160
- </script>