@appscode/design-system 1.1.0-alpha.9 → 1.1.0-beta.3
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/base/_video-player.scss +65 -0
- package/base/utilities/_all.scss +6 -5
- package/base/utilities/_colors.scss +446 -0
- package/base/utilities/_customize-bulma.scss +23 -27
- package/base/utilities/_extended.scss +3 -2
- package/base/utilities/{_default.scss → _global.scss} +171 -323
- package/base/utilities/_layouts.scss +157 -0
- package/base/utilities/_mixin.scss +11 -11
- package/base/utilities/_spacing.scss +96 -0
- package/base/utilities/_typography.scss +56 -24
- package/base/utilities/dark-theme.scss +1 -1
- package/components/_ac-accordion.scss +117 -117
- package/components/_ac-alert-box.scss +205 -263
- package/components/_ac-calendar.scss +4 -4
- package/components/_ac-card.scss +122 -130
- package/components/_ac-code-highlight.scss +6 -6
- package/components/_ac-content-layout.scss +165 -165
- package/components/_ac-drag.scss +11 -11
- package/components/_ac-input.scss +38 -520
- package/components/_ac-modal.scss +212 -212
- package/components/_ac-multi-select.scss +780 -751
- package/components/_ac-options.scss +122 -123
- package/components/_ac-select-box.scss +5 -5
- package/components/_ac-table.scss +503 -502
- package/components/_ac-tabs.scss +39 -38
- package/components/_ac-tags.scss +116 -116
- package/components/_ac-terminal.scss +95 -51
- package/components/_add-card.scss +3 -3
- package/components/_all.scss +31 -28
- package/components/_app-drawer.scss +0 -134
- package/components/_breadcumb.scss +0 -71
- package/components/_buttons.scss +779 -779
- package/components/_card-body-wrapper.scss +5 -5
- package/components/_dashboard-header.scss +0 -115
- package/components/_direct-deploy.scss +8 -8
- package/components/_go-to-top.scss +1 -1
- package/components/_image-upload.scss +3 -3
- package/components/_left-sidebar-menu.scss +448 -579
- package/components/_monaco-editor.scss +1 -1
- package/components/_navbar.scss +786 -752
- package/components/_nested-list.scss +1 -1
- package/components/_overview-info.scss +7 -7
- package/components/_overview-page.scss +4 -4
- package/components/_pagination.scss +106 -124
- package/components/_payment-card.scss +21 -21
- package/components/_preloader.scss +1 -1
- package/components/_preview-modal.scss +18 -18
- package/components/_pricing-table.scss +10 -10
- package/components/_progress-bar.scss +12 -12
- package/components/_subscription-card.scss +14 -14
- package/components/_table-of-content.scss +4 -4
- package/components/_tfa.scss +9 -9
- package/components/_widget-menu.scss +247 -247
- package/components/_wizard.scss +82 -82
- package/components/ac-toaster/_ac-toasted.scss +1 -1
- package/components/bbum/_activities-header.scss +1 -1
- package/components/bbum/_card-team.scss +12 -12
- package/components/bbum/_information-center.scss +13 -13
- package/components/bbum/_left-sidebar.scss +8 -8
- package/components/bbum/_mobile-desktop.scss +7 -7
- package/components/bbum/_post.scss +5 -5
- package/components/bbum/_sign-up-notification.scss +10 -10
- package/components/bbum/_single-post-preview.scss +21 -21
- package/components/bbum/_user-profile.scss +10 -10
- package/components/ui-builder/_ui-builder.scss +15 -15
- package/components/ui-builder/_vue-open-api.scss +514 -2
- package/layouts/_code-preview.scss +11 -11
- package/main.scss +26 -10
- package/package.json +1 -1
- package/vue-components/plugins/time-convert.js +49 -0
- package/vue-components/text.vue +1 -0
- package/vue-components/types/cluster.ts +6 -0
- package/vue-components/types/longRunningTasks.ts +20 -0
- package/vue-components/types/notification.ts +6 -0
- package/vue-components/types/previewYaml.ts +8 -0
- package/vue-components/types/table.ts +54 -0
- package/vue-components/types/theme.ts +10 -0
- package/vue-components/types/user.ts +22 -0
- package/vue-components/v2/card/Card.vue +1 -1
- package/vue-components/v2/card/OverviewCards.vue +17 -2
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
- package/vue-components/v2/icons/Ellipsis.vue +2 -1
- package/vue-components/v2/modal/Modal.vue +0 -5
- package/vue-components/v2/navbar/Appdrawer.vue +37 -12
- package/vue-components/v2/navbar/Navbar.vue +3 -3
- package/vue-components/v2/navbar/NavbarItem.vue +3 -1
- package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
- package/vue-components/v2/navbar/User.vue +5 -22
- package/vue-components/v2/pagination/Pagination.vue +65 -0
- package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
- package/vue-components/v3/accordion/Accordion.vue +151 -0
- package/vue-components/v3/alert/Alert.vue +238 -0
- package/vue-components/v3/alert/Toast.vue +79 -0
- package/vue-components/v3/banner/Banner.vue +10 -0
- package/vue-components/v3/breadcrumbs/Breadcrumb.vue +104 -0
- package/vue-components/v3/button/Button.vue +831 -58
- package/vue-components/v3/button/Buttons.vue +6 -0
- package/vue-components/v3/button/DownloadBtn.vue +31 -0
- package/vue-components/v3/cards/Card.vue +32 -0
- package/vue-components/v3/cards/CardContent.vue +7 -0
- package/vue-components/v3/cards/CardHeader.vue +14 -0
- package/vue-components/v3/cards/Cards.vue +7 -0
- package/vue-components/v3/cards/Cluster.vue +150 -0
- package/vue-components/v3/cards/Counter.vue +27 -0
- package/vue-components/v3/cards/FeatureCard.vue +40 -0
- package/vue-components/v3/cards/FeatureCards.vue +6 -0
- package/vue-components/v3/cards/InfoCard.vue +248 -0
- package/vue-components/v3/cards/Monitoring.vue +94 -0
- package/vue-components/v3/cards/OverviewCard.vue +24 -0
- package/vue-components/v3/cards/OverviewCards.vue +31 -0
- package/vue-components/v3/cards/Payment.vue +62 -0
- package/vue-components/v3/cards/Vendor.vue +23 -0
- package/vue-components/v3/content/ContentHeader.vue +39 -30
- package/vue-components/v3/content/ContentLayout.vue +20 -0
- package/vue-components/v3/content/ContentTable.vue +37 -61
- package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
- package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
- package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
- package/vue-components/v3/editor/Editor.vue +100 -113
- package/vue-components/v3/editor/FilteredFileEditor.vue +124 -127
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +70 -94
- package/vue-components/v3/footer/FooterArea.vue +34 -0
- package/vue-components/v3/footer/FooterItem.vue +32 -0
- package/vue-components/v3/footer/FooterItems.vue +15 -0
- package/vue-components/v3/footer/Info.vue +23 -0
- package/vue-components/v3/footer/Status.vue +42 -0
- package/vue-components/v3/footer/Usage.vue +44 -0
- package/vue-components/v3/form/Form.vue +24 -33
- package/vue-components/v3/form/FormFooterControl.vue +7 -0
- package/vue-components/v3/form/FormFooterControls.vue +7 -0
- package/vue-components/v3/form-fields/AcSingleInput.vue +520 -0
- package/vue-components/v3/form-fields/Input.vue +19 -14
- package/vue-components/v3/header/Header.vue +117 -24
- package/vue-components/v3/header/HeaderItem.vue +18 -0
- package/vue-components/v3/header/HeaderItems.vue +4 -0
- package/vue-components/v3/icons/Ellipsis.vue +2 -0
- package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
- package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +17 -15
- package/vue-components/v3/modal/Modal.vue +292 -96
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
- package/vue-components/v3/modals/JsonShowModal.vue +62 -68
- package/vue-components/v3/modals/LongRunningTasksModal.vue +145 -143
- package/vue-components/v3/navbar/Appdrawer.vue +196 -51
- package/vue-components/v3/navbar/Navbar.vue +296 -0
- package/vue-components/v3/navbar/NavbarItem.vue +81 -0
- package/vue-components/v3/navbar/NavbarItemContent.vue +284 -0
- package/vue-components/v3/navbar/Notification.vue +179 -0
- package/vue-components/v3/navbar/ThemeMode.vue +128 -112
- package/vue-components/v3/navbar/User.vue +383 -268
- package/vue-components/v3/notification/AlertBox.vue +39 -42
- package/vue-components/v3/notification/Notification.vue +49 -43
- package/vue-components/v3/notification/NotificationItem.vue +51 -19
- package/vue-components/v3/option-dots/Options.vue +188 -0
- package/vue-components/v3/pagination/Pagination.vue +203 -99
- package/vue-components/v3/preloader/Preloader.vue +23 -0
- package/vue-components/v3/searchbars/SearchBar.vue +51 -34
- package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +834 -81
- package/vue-components/v3/sidebar/Sidebar.vue +271 -0
- package/vue-components/v3/sidebar/SidebarBody.vue +7 -0
- package/vue-components/v3/sidebar/SidebarFooter.vue +80 -0
- package/vue-components/v3/sidebar/SidebarHeader.vue +124 -0
- package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
- package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +128 -0
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +29 -0
- package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
- package/vue-components/v3/tab/TabItem.vue +10 -12
- package/vue-components/v3/tab/Tabs.vue +9 -0
- package/vue-components/v3/tab/TabsBody.vue +7 -0
- package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
- package/vue-components/v3/table/FakeTableCell.vue +22 -31
- package/vue-components/v3/table/InfoTable.vue +85 -59
- package/vue-components/v3/table/MultiInfoTable.vue +72 -95
- package/vue-components/v3/table/Table.vue +582 -151
- package/vue-components/v3/table/TableCell.vue +20 -23
- package/vue-components/v3/table/TableContainer.vue +50 -28
- package/vue-components/v3/table/TableRow.vue +63 -85
- package/vue-components/v3/table/table-cell/ArrayCell.vue +67 -79
- package/vue-components/v3/table/table-cell/CellValue.vue +97 -103
- package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
- package/vue-components/v3/table/table-cell/ObjectCell.vue +67 -79
- package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
- package/vue-components/v3/tabs/EditorTabs.vue +18 -24
- package/vue-components/v3/tag/Tag.vue +15 -12
- package/vue-components/v3/tag/Tags.vue +7 -0
- package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +26 -23
- package/base/utilities/_derived-variables.scss +0 -25
- package/base/utilities/_initial-variables.scss +0 -215
- package/components/_basic-card.scss +0 -128
- package/mixins/stickyContent.js +0 -141
- package/plugins/caching.ts +0 -243
|
@@ -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>
|
|
@@ -1,3 +1,126 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref, watch, computed } from "vue";
|
|
3
|
+
import type { PreviewYamlType } from "../../types/previewYaml";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
searchText?: string;
|
|
7
|
+
toggleHideValue?: boolean;
|
|
8
|
+
isPreviewLoading?: boolean;
|
|
9
|
+
isEditorReadOnly?: boolean;
|
|
10
|
+
previewYamls?: Array<PreviewYamlType>;
|
|
11
|
+
showMinimap?: boolean;
|
|
12
|
+
editorHeight?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
searchText: "",
|
|
17
|
+
toggleHideValue: true,
|
|
18
|
+
isPreviewLoading: false,
|
|
19
|
+
isEditorReadOnly: false,
|
|
20
|
+
previewYamls: () => [],
|
|
21
|
+
showMinimap: false,
|
|
22
|
+
editorHeight: 60,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const emit = defineEmits(["setActiveKey"]);
|
|
26
|
+
|
|
27
|
+
const Banner = defineAsyncComponent(() => import("../banner/Banner.vue"));
|
|
28
|
+
const Preloader = defineAsyncComponent(
|
|
29
|
+
() => import("../preloader/Preloader.vue")
|
|
30
|
+
);
|
|
31
|
+
const Editor = defineAsyncComponent({
|
|
32
|
+
loader: () => import("../editor/Editor.vue"),
|
|
33
|
+
loadingComponent: Preloader,
|
|
34
|
+
delay: 200,
|
|
35
|
+
errorComponent: Banner,
|
|
36
|
+
timeout: 100000,
|
|
37
|
+
});
|
|
38
|
+
const ResourceLoader = defineAsyncComponent(
|
|
39
|
+
() => import("../loaders/ResourceLoader.vue")
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const SidebarLoader = defineAsyncComponent(
|
|
43
|
+
() => import("../loaders/SidebarLoader.vue")
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const activeKey = ref("");
|
|
47
|
+
const hideValue = ref(false);
|
|
48
|
+
|
|
49
|
+
const filteredYamls = computed(() => {
|
|
50
|
+
if (props.searchText) {
|
|
51
|
+
return props.previewYamls.filter(
|
|
52
|
+
(element) => JSON.stringify(element).search(props.searchText) > -1
|
|
53
|
+
);
|
|
54
|
+
} else return props.previewYamls;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const activeFile = computed(() => {
|
|
58
|
+
const activeFile = filteredYamls.value.find(
|
|
59
|
+
(element) => element.uid === activeKey.value
|
|
60
|
+
);
|
|
61
|
+
return activeFile || { content: "", type: "yaml", isSecret: false };
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const originalValue = computed(() => {
|
|
65
|
+
const activeFile = filteredYamls.value.find(
|
|
66
|
+
(element) => element.uid === activeKey.value
|
|
67
|
+
);
|
|
68
|
+
return (activeFile && activeFile.initContent) || "";
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const isKeyAvailable = computed(() => {
|
|
72
|
+
const val = props.previewYamls.find((element) => {
|
|
73
|
+
return element.uid === activeKey.value;
|
|
74
|
+
});
|
|
75
|
+
return val === undefined ? false : true;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const isYamlsEmpty = computed(() => {
|
|
79
|
+
return filteredYamls.value.length === 0;
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const isYamlsNotSelected = computed(() => {
|
|
83
|
+
const val = filteredYamls.value.find((element) => {
|
|
84
|
+
return element.uid === activeKey.value;
|
|
85
|
+
});
|
|
86
|
+
return val === undefined;
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const initActivePreview = () => {
|
|
90
|
+
if (!isKeyAvailable.value) {
|
|
91
|
+
activeKey.value = props.previewYamls[0].uid;
|
|
92
|
+
hideValue.value = activeFile.value.isSecret;
|
|
93
|
+
emit("setActiveKey", activeKey.value);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const setActivePreview = (uid: string) => {
|
|
98
|
+
activeKey.value = uid;
|
|
99
|
+
hideValue.value = activeFile.value.isSecret;
|
|
100
|
+
emit("setActiveKey", activeKey.value);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
watch(
|
|
104
|
+
() => props.previewYamls,
|
|
105
|
+
(n) => {
|
|
106
|
+
if (n.length) {
|
|
107
|
+
initActivePreview();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
immediate: true,
|
|
112
|
+
deep: true,
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
watch(
|
|
117
|
+
() => props.toggleHideValue,
|
|
118
|
+
(n) => {
|
|
119
|
+
hideValue.value = n;
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
</script>
|
|
123
|
+
|
|
1
124
|
<template>
|
|
2
125
|
<div class="ac-preview is-active is-not-fixed">
|
|
3
126
|
<div class="ac-preview-inner">
|
|
@@ -47,7 +170,7 @@
|
|
|
47
170
|
v-else
|
|
48
171
|
v-model="activeFile.content"
|
|
49
172
|
:original-value="originalValue"
|
|
50
|
-
:language="activeFile.
|
|
173
|
+
:language="activeFile.type"
|
|
51
174
|
:read-only="isEditorReadOnly"
|
|
52
175
|
:editor-height="editorHeight"
|
|
53
176
|
:show-minimap="showMinimap"
|
|
@@ -58,129 +181,3 @@
|
|
|
58
181
|
</div>
|
|
59
182
|
</div>
|
|
60
183
|
</template>
|
|
61
|
-
<script>
|
|
62
|
-
import { defineComponent, defineAsyncComponent } from "vue";
|
|
63
|
-
import Preloader from "../../v2/preloader/Preloader.vue";
|
|
64
|
-
import Banner from "../../v2/banner/Banner.vue";
|
|
65
|
-
export default defineComponent({
|
|
66
|
-
components: {
|
|
67
|
-
Editor: defineAsyncComponent({
|
|
68
|
-
loader: () =>
|
|
69
|
-
import("../editor/Editor.vue").then((module) => module.default),
|
|
70
|
-
loadingComponent: Preloader,
|
|
71
|
-
delay: 200,
|
|
72
|
-
errorComponent: Banner,
|
|
73
|
-
timeout: 100000,
|
|
74
|
-
}),
|
|
75
|
-
ResourceLoader: defineAsyncComponent(() =>
|
|
76
|
-
import("../loaders/ResourceLoader.vue")
|
|
77
|
-
),
|
|
78
|
-
SidebarLoader: defineAsyncComponent(() =>
|
|
79
|
-
import("../loaders/SidebarLoader.vue")
|
|
80
|
-
),
|
|
81
|
-
},
|
|
82
|
-
props: {
|
|
83
|
-
searchText: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: "",
|
|
86
|
-
},
|
|
87
|
-
toggleHideValue: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
default: true,
|
|
90
|
-
},
|
|
91
|
-
isPreviewLoading: {
|
|
92
|
-
type: Boolean,
|
|
93
|
-
default: false,
|
|
94
|
-
},
|
|
95
|
-
isEditorReadOnly: {
|
|
96
|
-
type: Boolean,
|
|
97
|
-
default: false,
|
|
98
|
-
},
|
|
99
|
-
previewYamls: {
|
|
100
|
-
type: Array,
|
|
101
|
-
default: () => {
|
|
102
|
-
[];
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
showMinimap: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
default: false,
|
|
108
|
-
},
|
|
109
|
-
editorHeight: {
|
|
110
|
-
type: Number,
|
|
111
|
-
default: 60,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
emits: ["setActiveKey"],
|
|
115
|
-
data() {
|
|
116
|
-
return {
|
|
117
|
-
activeKey: "",
|
|
118
|
-
hideValue: "",
|
|
119
|
-
};
|
|
120
|
-
},
|
|
121
|
-
computed: {
|
|
122
|
-
activeFile() {
|
|
123
|
-
const activeFile = this.filteredYamls.find(
|
|
124
|
-
(element) => element.uid === this.activeKey
|
|
125
|
-
);
|
|
126
|
-
return activeFile || { content: "", format: "yaml" };
|
|
127
|
-
},
|
|
128
|
-
originalValue() {
|
|
129
|
-
const activeFile = this.filteredYamls.find(
|
|
130
|
-
(element) => element.uid === this.activeKey
|
|
131
|
-
);
|
|
132
|
-
return (activeFile && activeFile.initContent) || "";
|
|
133
|
-
},
|
|
134
|
-
filteredYamls() {
|
|
135
|
-
if (this.searchText) {
|
|
136
|
-
return this.previewYamls.filter(
|
|
137
|
-
(element) => JSON.stringify(element).search(this.searchText) > -1
|
|
138
|
-
);
|
|
139
|
-
} else return this.previewYamls;
|
|
140
|
-
},
|
|
141
|
-
isKeyAvailable() {
|
|
142
|
-
const val = this.previewYamls.find((element) => {
|
|
143
|
-
return element.uid === this.activeKey;
|
|
144
|
-
});
|
|
145
|
-
return val === undefined ? false : true;
|
|
146
|
-
},
|
|
147
|
-
isYamlsEmpty() {
|
|
148
|
-
return this.filteredYamls.length === 0;
|
|
149
|
-
},
|
|
150
|
-
isYamlsNotSelected() {
|
|
151
|
-
const val = this.filteredYamls.find((element) => {
|
|
152
|
-
return element.uid === this.activeKey;
|
|
153
|
-
});
|
|
154
|
-
return val === undefined;
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
methods: {
|
|
158
|
-
initActivePreview() {
|
|
159
|
-
if (!this.isKeyAvailable) {
|
|
160
|
-
this.activeKey = this.previewYamls[0].uid;
|
|
161
|
-
this.hideValue = this.activeFile.isSecret;
|
|
162
|
-
this.$emit("setActiveKey", this.activeKey);
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
setActivePreview(uid) {
|
|
166
|
-
this.activeKey = uid;
|
|
167
|
-
this.hideValue = this.activeFile.isSecret;
|
|
168
|
-
this.$emit("setActiveKey", this.activeKey);
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
watch: {
|
|
172
|
-
previewYamls: {
|
|
173
|
-
deep: true,
|
|
174
|
-
immediate: true,
|
|
175
|
-
handler(n) {
|
|
176
|
-
if (n.length) {
|
|
177
|
-
this.initActivePreview();
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
toggleHideValue(n) {
|
|
182
|
-
this.hideValue = n;
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
});
|
|
186
|
-
</script>
|
|
@@ -1,3 +1,73 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { defineAsyncComponent, ref, watch, computed } from "vue";
|
|
3
|
+
import type { PreviewYamlType } from "../../types/previewYaml";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
title?: string;
|
|
7
|
+
isSearchable?: boolean;
|
|
8
|
+
isPreviewLoading?: boolean;
|
|
9
|
+
isEditorReadOnly?: boolean;
|
|
10
|
+
previewYamls?: Array<PreviewYamlType>;
|
|
11
|
+
showHideBtn?: boolean;
|
|
12
|
+
showMinimap?: boolean;
|
|
13
|
+
isUpdateActive?: boolean;
|
|
14
|
+
deleteModalStatus?: string;
|
|
15
|
+
editorHeight?: number;
|
|
16
|
+
hideHeader?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
20
|
+
title: "Title",
|
|
21
|
+
isSearchable: false,
|
|
22
|
+
isPreviewLoading: false,
|
|
23
|
+
isEditorReadOnly: false,
|
|
24
|
+
previewYamls: () => [],
|
|
25
|
+
showHideBtn: false,
|
|
26
|
+
showMinimap: false,
|
|
27
|
+
isUpdateActive: false,
|
|
28
|
+
deleteModalStatus: "closed",
|
|
29
|
+
editorHeight: 60,
|
|
30
|
+
hideHeader: false,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const emit = defineEmits(["activeKey"]);
|
|
34
|
+
|
|
35
|
+
const AcButton = defineAsyncComponent(() => import("../button/Button.vue"));
|
|
36
|
+
const ContentTable = defineAsyncComponent(
|
|
37
|
+
() => import("../content/ContentTable.vue")
|
|
38
|
+
);
|
|
39
|
+
const HeaderItem = defineAsyncComponent(
|
|
40
|
+
() => import("../header/HeaderItem.vue")
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const FilteredFileEditor = defineAsyncComponent(
|
|
44
|
+
() => import("../editor/FilteredFileEditor.vue")
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const activeKey = ref("");
|
|
48
|
+
const toggleHideValue = ref(false);
|
|
49
|
+
|
|
50
|
+
const activeFile = computed(() => {
|
|
51
|
+
const activeFile = props.previewYamls.find(
|
|
52
|
+
(element) => element.uid === activeKey.value
|
|
53
|
+
);
|
|
54
|
+
return activeFile || { content: "", type: "yaml", isSecret: false };
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const setActiveKey = (key: string) => {
|
|
58
|
+
activeKey.value = key;
|
|
59
|
+
toggleHideValue.value = activeFile.value.isSecret;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
watch(
|
|
63
|
+
activeKey,
|
|
64
|
+
(n) => {
|
|
65
|
+
emit("activeKey", n);
|
|
66
|
+
},
|
|
67
|
+
{ immediate: true }
|
|
68
|
+
);
|
|
69
|
+
</script>
|
|
70
|
+
|
|
1
71
|
<template>
|
|
2
72
|
<content-table
|
|
3
73
|
:table-title="title"
|
|
@@ -29,97 +99,3 @@
|
|
|
29
99
|
</template>
|
|
30
100
|
</content-table>
|
|
31
101
|
</template>
|
|
32
|
-
<script>
|
|
33
|
-
import { defineComponent, defineAsyncComponent } from "vue";
|
|
34
|
-
export default defineComponent({
|
|
35
|
-
components: {
|
|
36
|
-
AcButton: defineAsyncComponent(() => import("../button/Button.vue")),
|
|
37
|
-
ContentTable: defineAsyncComponent(() =>
|
|
38
|
-
import("../content/ContentTable.vue")
|
|
39
|
-
),
|
|
40
|
-
HeaderItem: defineAsyncComponent(() => import("../header/HeaderItem.vue")),
|
|
41
|
-
FilteredFileEditor: defineAsyncComponent(() =>
|
|
42
|
-
import("./FilteredFileEditor.vue")
|
|
43
|
-
)
|
|
44
|
-
},
|
|
45
|
-
props: {
|
|
46
|
-
title: {
|
|
47
|
-
type: String,
|
|
48
|
-
default: "Title"
|
|
49
|
-
},
|
|
50
|
-
isSearchable: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false
|
|
53
|
-
},
|
|
54
|
-
isPreviewLoading: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
isEditorReadOnly: {
|
|
59
|
-
type: Boolean,
|
|
60
|
-
default: false
|
|
61
|
-
},
|
|
62
|
-
previewYamls: {
|
|
63
|
-
type: Array,
|
|
64
|
-
default: () => {
|
|
65
|
-
[];
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
showHideBtn: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: false,
|
|
71
|
-
},
|
|
72
|
-
showMinimap: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: false
|
|
75
|
-
},
|
|
76
|
-
isUpdateActive: {
|
|
77
|
-
type: Boolean,
|
|
78
|
-
default: false
|
|
79
|
-
},
|
|
80
|
-
deleteModalStatus: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: "closed"
|
|
83
|
-
},
|
|
84
|
-
editorHeight: {
|
|
85
|
-
type: Number,
|
|
86
|
-
default: 60
|
|
87
|
-
},
|
|
88
|
-
hideHeader: {
|
|
89
|
-
type: Boolean,
|
|
90
|
-
default: false
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
emits: ["activeKey"],
|
|
94
|
-
data() {
|
|
95
|
-
return {
|
|
96
|
-
activeKey: "",
|
|
97
|
-
toggleHideValue: "",
|
|
98
|
-
showDeleteDataModal: false
|
|
99
|
-
};
|
|
100
|
-
},
|
|
101
|
-
computed: {
|
|
102
|
-
activeFile() {
|
|
103
|
-
const activeFile = this.previewYamls.find(
|
|
104
|
-
element => element.uid === this.activeKey
|
|
105
|
-
);
|
|
106
|
-
return activeFile || { content: "", format: "yaml" };
|
|
107
|
-
},
|
|
108
|
-
},
|
|
109
|
-
methods: {
|
|
110
|
-
setActiveKey(key) {
|
|
111
|
-
this.activeKey = key;
|
|
112
|
-
this.toggleHideValue = this.activeFile.isSecret;
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
watch: {
|
|
116
|
-
activeKey:{
|
|
117
|
-
immediate: true,
|
|
118
|
-
handler(n){
|
|
119
|
-
this.$emit("activeKey",this.activeKey);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts" setup></script>
|
|
2
|
+
<template>
|
|
3
|
+
<div class="footer-area">
|
|
4
|
+
<div class="footer-left">
|
|
5
|
+
<slot name="footer-left" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="footer-right">
|
|
8
|
+
<slot name="footer-right" />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style lang="scss" scoped>
|
|
14
|
+
.footer-area {
|
|
15
|
+
position: fixed;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
width: calc(100% - 250px);
|
|
21
|
+
min-height: 30px;
|
|
22
|
+
padding: 0 20px;
|
|
23
|
+
background: $primary-20;
|
|
24
|
+
border-top: 1px solid $primary-90;
|
|
25
|
+
z-index: 99;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.footer-left,
|
|
29
|
+
.footer-right {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 32px;
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
interface Props {
|
|
3
|
+
modifierClasses?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
withDefaults(defineProps<Props>(), {
|
|
7
|
+
modifierClasses: "",
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<div class="footer-item" :class="modifierClasses">
|
|
13
|
+
<slot />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style lang="scss">
|
|
18
|
+
.footer-item {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: 4px;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
color: $primary-90;
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
&.has-text-danger {
|
|
26
|
+
color: $red-80 !important;
|
|
27
|
+
}
|
|
28
|
+
&.has-text-success {
|
|
29
|
+
color: $green-50 !important;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</style>
|