@appscode/design-system 1.1.0 → 2.0.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/base/_video-player.scss +65 -0
- package/base/utilities/_all.scss +7 -5
- package/base/utilities/_colors.scss +377 -0
- package/base/utilities/_customize-bulma.scss +23 -27
- package/base/utilities/_extended.scss +39 -0
- package/base/utilities/{_default.scss → _global.scss} +192 -333
- package/base/utilities/_layouts.scss +19 -0
- package/base/utilities/_mixin.scss +11 -11
- package/base/utilities/_spacing.scss +96 -0
- package/base/utilities/_typography.scss +56 -24
- package/components/_ac-alert-box.scss +205 -263
- package/components/_ac-calendar.scss +4 -4
- package/components/_ac-code-highlight.scss +13 -16
- package/components/_ac-content-layout.scss +165 -165
- package/components/_ac-drag.scss +13 -13
- package/components/_ac-modal.scss +212 -212
- package/components/_ac-options.scss +122 -123
- package/components/_ac-select-box.scss +10 -10
- package/components/_ac-table.scss +503 -502
- package/components/_ac-tabs.scss +65 -61
- package/components/_ac-tags.scss +116 -116
- package/components/_accordion.scss +117 -0
- package/components/_add-card.scss +3 -3
- package/components/_all.scss +35 -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/_getkeeper.scss +110 -0
- package/components/_go-to-top.scss +1 -1
- package/components/_graph.scss +10 -10
- package/components/_image-upload.scss +9 -9
- package/components/_input-card.scss +232 -0
- package/components/_input.scss +573 -0
- package/components/_left-sidebar-menu.scss +452 -587
- package/components/_monaco-editor.scss +2 -2
- package/components/{_ac-multi-select.scss → _multi-select.scss} +89 -251
- package/components/_navbar.scss +786 -752
- package/components/_nested-list.scss +3 -3
- package/components/_overview-info.scss +10 -10
- 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 +14 -14
- package/components/_progress-bar.scss +73 -86
- package/components/_subscription-card.scss +22 -24
- package/components/_table-of-content.scss +8 -8
- package/components/{_ac-terminal.scss → _terminal.scss} +114 -81
- package/components/_tfa.scss +9 -9
- package/components/_transitions.scss +35 -0
- package/components/_widget-menu.scss +252 -257
- package/components/_wizard.scss +518 -793
- package/components/ac-toaster/_ac-toasted.scss +11 -16
- package/components/bbum/_activities-header.scss +1 -1
- package/components/bbum/_card-team.scss +12 -12
- package/components/bbum/_information-center.scss +21 -23
- package/components/bbum/_left-sidebar.scss +8 -8
- package/components/bbum/_mobile-desktop.scss +16 -21
- package/components/bbum/_post.scss +5 -5
- package/components/bbum/_sign-up-notification.scss +10 -10
- package/components/bbum/_single-post-preview.scss +29 -29
- package/components/bbum/_user-profile.scss +10 -10
- package/components/ui-builder/_ui-builder.scss +221 -31
- package/components/ui-builder/_vue-open-api.scss +565 -7
- package/icons/close-icon.svg +3 -0
- package/layouts/_code-preview.scss +17 -18
- package/main.scss +26 -10
- package/package.json +1 -1
- package/plugins/theme.js +11 -9
- package/plugins/vue-toaster.js +1 -1
- package/vue-components/images/icons/cluster-icon.svg +10 -0
- package/vue-components/images/icons/org-icon.svg +10 -0
- package/vue-components/plugins/time-convert.js +49 -0
- package/vue-components/types/cluster.ts +6 -0
- package/vue-components/types/importFlow.ts +16 -0
- package/vue-components/types/notification.ts +6 -0
- package/vue-components/types/previewYaml.ts +8 -0
- package/vue-components/types/table.ts +55 -0
- package/vue-components/types/theme.ts +10 -0
- package/vue-components/types/user.ts +22 -0
- package/vue-components/v2/banner/Banner.vue +1 -1
- package/vue-components/v2/button/Buttons.vue +1 -1
- package/vue-components/v2/card/Card.vue +1 -1
- package/vue-components/v2/card/OverviewCards.vue +17 -2
- package/vue-components/v2/content/ContentTable.vue +14 -9
- package/vue-components/v2/editor/FilteredFileEditor.vue +2 -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 +2 -6
- 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 +66 -0
- package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
- package/{components/_ac-accordion.scss → vue-components/v3/accordion/Accordion.vue} +40 -6
- 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 +166 -0
- package/vue-components/v3/button/Button.vue +110 -57
- package/vue-components/v3/button/Buttons.vue +22 -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 +159 -0
- package/vue-components/v3/cards/Counter.vue +39 -0
- package/vue-components/v3/cards/FeatureCard.vue +67 -0
- package/vue-components/v3/cards/FeatureCards.vue +6 -0
- package/vue-components/v3/cards/InfoCard.vue +242 -0
- package/vue-components/v3/cards/Monitoring.vue +90 -0
- package/vue-components/v3/cards/OrgClusterCard.vue +86 -0
- package/vue-components/v3/cards/OverviewCard.vue +28 -0
- package/vue-components/v3/cards/OverviewCards.vue +39 -0
- package/vue-components/v3/cards/Payment.vue +62 -0
- package/vue-components/v3/cards/Vendor.vue +89 -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 +44 -58
- package/vue-components/v3/dropdown/DropdownAction.vue +95 -0
- 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 +117 -115
- package/vue-components/v3/editor/FilteredFileEditor.vue +325 -128
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +73 -94
- package/vue-components/v3/footer/FooterArea.vue +40 -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 +25 -0
- package/vue-components/v3/footer/Status.vue +43 -0
- package/vue-components/v3/footer/Usage.vue +34 -0
- package/vue-components/v3/form/Form.vue +24 -36
- package/vue-components/v3/form/FormFooter.vue +24 -0
- 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 +21 -0
- package/vue-components/v3/form-fields/FileUpload.vue +89 -0
- package/vue-components/v3/form-fields/Input.vue +19 -15
- package/vue-components/v3/header/Header.vue +120 -26
- 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/ClusterSwitcherLoader.vue +13 -0
- package/vue-components/v3/loaders/InfoCardLoader.vue +19 -0
- package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
- package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
- package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
- package/vue-components/v3/modal/Modal.vue +294 -95
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
- package/vue-components/v3/modals/JsonShowModal.vue +63 -68
- package/vue-components/v3/navbar/Appdrawer.vue +198 -51
- package/vue-components/v3/navbar/Navbar.vue +139 -0
- package/vue-components/v3/navbar/NavbarItem.vue +103 -0
- package/vue-components/v3/navbar/NavbarItemContent.vue +282 -0
- package/vue-components/v3/navbar/Notification.vue +207 -0
- package/vue-components/v3/navbar/ThemeMode.vue +128 -112
- package/vue-components/v3/navbar/User.vue +394 -267
- package/vue-components/v3/notification/AlertBox.vue +266 -39
- package/vue-components/v3/notification/Notification.vue +50 -44
- package/vue-components/v3/notification/NotificationItem.vue +51 -19
- package/vue-components/v3/option-dots/Options.vue +197 -0
- package/vue-components/v3/pagination/Pagination.vue +216 -102
- package/vue-components/v3/preloader/Preloader.vue +23 -0
- package/vue-components/v3/searchbars/SearchBar.vue +50 -34
- package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +71 -86
- package/vue-components/v3/sidebar/Sidebar.vue +239 -0
- package/vue-components/v3/sidebar/SidebarBody.vue +14 -0
- package/vue-components/v3/sidebar/SidebarFooter.vue +89 -0
- package/vue-components/v3/sidebar/SidebarHeader.vue +131 -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/Steps.vue +152 -0
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +204 -0
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +44 -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 +36 -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 +89 -61
- package/vue-components/v3/table/MultiInfoTable.vue +72 -95
- package/vue-components/v3/table/Table.vue +596 -157
- package/vue-components/v3/table/TableCell.vue +13 -24
- package/vue-components/v3/table/TableContainer.vue +50 -28
- package/vue-components/v3/table/TableRow.vue +65 -87
- package/vue-components/v3/table/table-cell/ArrayCell.vue +94 -103
- package/vue-components/v3/table/table-cell/CellValue.vue +74 -106
- package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
- package/vue-components/v3/table/table-cell/ObjectCell.vue +91 -101
- 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 +16 -12
- package/vue-components/v3/tag/Tags.vue +7 -0
- package/base/utilities/_derived-variables.scss +0 -25
- package/base/utilities/_initial-variables.scss +0 -215
- package/base/utilities/dark-theme.scss +0 -26
- package/components/_ac-card.scss +0 -597
- package/components/_ac-input.scss +0 -876
- package/mixins/stickyContent.js +0 -141
- package/plugins/caching.ts +0 -243
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -92
- package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -400
- package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -148
- /package/components/{_ac-report.scss → _report.scss} +0 -0
|
@@ -1,9 +1,134 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, defineAsyncComponent, ref, watch } 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 | string;
|
|
13
|
+
wordWrap?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
17
|
+
searchText: "",
|
|
18
|
+
toggleHideValue: true,
|
|
19
|
+
isPreviewLoading: false,
|
|
20
|
+
isEditorReadOnly: false,
|
|
21
|
+
previewYamls: () => [],
|
|
22
|
+
showMinimap: false,
|
|
23
|
+
editorHeight: 60,
|
|
24
|
+
wordWrap: "on",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits(["setActiveKey"]);
|
|
28
|
+
|
|
29
|
+
const Banner = defineAsyncComponent(() => import("../banner/Banner.vue"));
|
|
30
|
+
const Preloader = defineAsyncComponent(
|
|
31
|
+
() => import("../preloader/Preloader.vue")
|
|
32
|
+
);
|
|
33
|
+
const Editor = defineAsyncComponent({
|
|
34
|
+
loader: () => import("../editor/Editor.vue"),
|
|
35
|
+
loadingComponent: Preloader,
|
|
36
|
+
delay: 200,
|
|
37
|
+
errorComponent: Banner,
|
|
38
|
+
timeout: 100000,
|
|
39
|
+
});
|
|
40
|
+
const ResourceLoader = defineAsyncComponent(
|
|
41
|
+
() => import("../loaders/ResourceLoader.vue")
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const SidebarLoader = defineAsyncComponent(
|
|
45
|
+
() => import("../loaders/SidebarLoader.vue")
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const activeKey = ref("");
|
|
49
|
+
const hideValue = ref(false);
|
|
50
|
+
|
|
51
|
+
const filteredYamls = computed(() => {
|
|
52
|
+
if (props.searchText) {
|
|
53
|
+
return props.previewYamls.filter(
|
|
54
|
+
(element) => JSON.stringify(element).search(props.searchText) > -1
|
|
55
|
+
);
|
|
56
|
+
} else return props.previewYamls;
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const activeFile = computed(() => {
|
|
60
|
+
const activeFile = filteredYamls.value.find(
|
|
61
|
+
(element) => element.uid === activeKey.value
|
|
62
|
+
);
|
|
63
|
+
return activeFile || { content: "", type: "yaml", isSecret: false };
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const originalValue = computed(() => {
|
|
67
|
+
const activeFile = filteredYamls.value.find(
|
|
68
|
+
(element) => element.uid === activeKey.value
|
|
69
|
+
);
|
|
70
|
+
return (activeFile && activeFile.initContent) || "";
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const isKeyAvailable = computed(() => {
|
|
74
|
+
const val = props.previewYamls.find((element) => {
|
|
75
|
+
return element.uid === activeKey.value;
|
|
76
|
+
});
|
|
77
|
+
return val === undefined ? false : true;
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const isYamlsEmpty = computed(() => {
|
|
81
|
+
return filteredYamls.value.length === 0;
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const isYamlsNotSelected = computed(() => {
|
|
85
|
+
const val = filteredYamls.value.find((element) => {
|
|
86
|
+
return element.uid === activeKey.value;
|
|
87
|
+
});
|
|
88
|
+
return val === undefined;
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const initActivePreview = () => {
|
|
92
|
+
if (!isKeyAvailable.value) {
|
|
93
|
+
activeKey.value = props.previewYamls[0].uid;
|
|
94
|
+
hideValue.value = activeFile.value.isSecret;
|
|
95
|
+
emit("setActiveKey", activeKey.value);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const setActivePreview = (uid: string) => {
|
|
100
|
+
activeKey.value = uid;
|
|
101
|
+
hideValue.value = activeFile.value.isSecret;
|
|
102
|
+
emit("setActiveKey", activeKey.value);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
watch(
|
|
106
|
+
() => props.previewYamls,
|
|
107
|
+
(n) => {
|
|
108
|
+
if (n.length) {
|
|
109
|
+
initActivePreview();
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
immediate: true,
|
|
114
|
+
deep: true,
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
watch(
|
|
119
|
+
() => props.toggleHideValue,
|
|
120
|
+
(n) => {
|
|
121
|
+
hideValue.value = n;
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
</script>
|
|
125
|
+
|
|
1
126
|
<template>
|
|
2
|
-
<div class="ac-preview
|
|
127
|
+
<div class="ac-preview">
|
|
3
128
|
<div class="ac-preview-inner">
|
|
4
129
|
<!-- preview body start -->
|
|
5
130
|
<div
|
|
6
|
-
class="ac-preview-body mt-0
|
|
131
|
+
class="ac-preview-body mt-0"
|
|
7
132
|
:class="{
|
|
8
133
|
'is-justify-content-center': isYamlsEmpty && !isPreviewLoading,
|
|
9
134
|
}"
|
|
@@ -14,7 +139,7 @@
|
|
|
14
139
|
</strong>
|
|
15
140
|
<template v-else>
|
|
16
141
|
<div v-if="!isPreviewLoading && previewYamls" class="left-content">
|
|
17
|
-
<div class="ac-files ac-hscrollbar pt-0">
|
|
142
|
+
<div class="ac-files ac-hscrollbar ac-vscrollbar pt-0">
|
|
18
143
|
<ul v-if="!isPreviewLoading">
|
|
19
144
|
<li
|
|
20
145
|
v-for="(previewYaml, idx) in filteredYamls"
|
|
@@ -47,10 +172,11 @@
|
|
|
47
172
|
v-else
|
|
48
173
|
v-model="activeFile.content"
|
|
49
174
|
:original-value="originalValue"
|
|
50
|
-
:language="activeFile.
|
|
175
|
+
:language="activeFile.type"
|
|
51
176
|
:read-only="isEditorReadOnly"
|
|
52
177
|
:editor-height="editorHeight"
|
|
53
178
|
:show-minimap="showMinimap"
|
|
179
|
+
:word-wrap="wordWrap"
|
|
54
180
|
/>
|
|
55
181
|
</div>
|
|
56
182
|
</template>
|
|
@@ -58,129 +184,200 @@
|
|
|
58
184
|
</div>
|
|
59
185
|
</div>
|
|
60
186
|
</template>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
187
|
+
<style lang="scss" scoped>
|
|
188
|
+
// .preview-icon {
|
|
189
|
+
// width: 60px;
|
|
190
|
+
// height: 60px;
|
|
191
|
+
// background-color: rgba(25, 113, 189, 0.4);
|
|
192
|
+
// box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.16);
|
|
193
|
+
// border-radius: 4px 0px 0px 4px;
|
|
194
|
+
// position: fixed;
|
|
195
|
+
// right: 0;
|
|
196
|
+
// top: 400px;
|
|
197
|
+
// border: none;
|
|
198
|
+
// cursor: pointer;
|
|
199
|
+
// color: $white-100;
|
|
200
|
+
// z-index: 9999;
|
|
201
|
+
// transition: 0.3s ease-in-out;
|
|
202
|
+
|
|
203
|
+
// img {
|
|
204
|
+
// margin-bottom: 4px;
|
|
205
|
+
// }
|
|
206
|
+
|
|
207
|
+
// &:hover {
|
|
208
|
+
// background-color: $primary;
|
|
209
|
+
// }
|
|
210
|
+
// }
|
|
211
|
+
|
|
212
|
+
.ac-preview {
|
|
213
|
+
padding-inline: 20px;
|
|
214
|
+
// position: fixed;
|
|
215
|
+
// width: calc(100% - 90px);
|
|
216
|
+
// height: 100%;
|
|
217
|
+
// top: 50px;
|
|
218
|
+
// right: -100%;
|
|
219
|
+
// z-index: 99999;
|
|
220
|
+
// transition: 0.3s;
|
|
221
|
+
|
|
222
|
+
// &.is-active {
|
|
223
|
+
// right: 0;
|
|
224
|
+
|
|
225
|
+
// &.is-not-fixed {
|
|
226
|
+
// width: 100%;
|
|
227
|
+
|
|
228
|
+
// .ac-preview-body {
|
|
229
|
+
// padding: 20px 0 0;
|
|
230
|
+
// }
|
|
231
|
+
// }
|
|
232
|
+
// }
|
|
233
|
+
|
|
234
|
+
.ac-preview-inner {
|
|
235
|
+
// background-color: $white-100;
|
|
236
|
+
// border-radius: 10px 0px 0px 10px;
|
|
237
|
+
// height: calc(100% - 90px);
|
|
238
|
+
|
|
239
|
+
&:after {
|
|
240
|
+
// position: absolute;
|
|
241
|
+
// content: "";
|
|
242
|
+
// left: -90px;
|
|
243
|
+
// top: -50px;
|
|
244
|
+
// width: calc(100% + 90px);
|
|
245
|
+
// height: 100%;
|
|
246
|
+
// background-color: $white-100;
|
|
247
|
+
|
|
248
|
+
// remove opacity for fix cluster ui project
|
|
249
|
+
// opacity: 0.8;
|
|
250
|
+
// z-index: -1;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// .ac-preview-header {
|
|
254
|
+
// padding: 20px;
|
|
255
|
+
// border-bottom: 1px solid $black-60;
|
|
256
|
+
|
|
257
|
+
// h5 {
|
|
258
|
+
// font-style: normal;
|
|
259
|
+
// font-weight: 500;
|
|
260
|
+
// font-size: 24px;
|
|
261
|
+
// line-height: 28px;
|
|
262
|
+
|
|
263
|
+
// color: $primary-10;
|
|
264
|
+
// }
|
|
265
|
+
|
|
266
|
+
// .ms-back-button {
|
|
267
|
+
// .is-transparent {
|
|
268
|
+
// font-style: normal;
|
|
269
|
+
// font-weight: normal;
|
|
270
|
+
// font-size: 16px;
|
|
271
|
+
// line-height: 100%;
|
|
272
|
+
// color: $black-80;
|
|
273
|
+
// cursor: pointer;
|
|
274
|
+
|
|
275
|
+
// i.fa {
|
|
276
|
+
// color: $black-80;
|
|
277
|
+
// padding-left: 5px;
|
|
278
|
+
// }
|
|
279
|
+
// }
|
|
280
|
+
// }
|
|
281
|
+
// }
|
|
282
|
+
|
|
283
|
+
.ac-preview-body {
|
|
284
|
+
display: flex;
|
|
285
|
+
// margin-top: 10px;
|
|
286
|
+
// padding: 20px;
|
|
287
|
+
|
|
288
|
+
.left-content {
|
|
289
|
+
width: 250px;
|
|
290
|
+
margin-right: 15px;
|
|
291
|
+
|
|
292
|
+
.ac-files {
|
|
293
|
+
ul {
|
|
294
|
+
margin: 0;
|
|
295
|
+
padding: 0;
|
|
296
|
+
list-style: none;
|
|
297
|
+
|
|
298
|
+
li {
|
|
299
|
+
&.is-active {
|
|
300
|
+
a {
|
|
301
|
+
background-color: $primary;
|
|
302
|
+
border-radius: 5px;
|
|
303
|
+
color: $white-100;
|
|
304
|
+
padding: 10px 10px;
|
|
305
|
+
margin-left: -10px;
|
|
306
|
+
border-top: 1px solid transparent;
|
|
307
|
+
|
|
308
|
+
span {
|
|
309
|
+
img {
|
|
310
|
+
filter: brightness(100);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
&:last-child {
|
|
316
|
+
&.is-active {
|
|
317
|
+
a {
|
|
318
|
+
border-top: 1px solid transparent;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
a {
|
|
325
|
+
padding: 10px 0px;
|
|
326
|
+
display: flex;
|
|
327
|
+
font-style: normal;
|
|
328
|
+
font-weight: 500;
|
|
329
|
+
font-size: 14px;
|
|
330
|
+
line-height: 100%;
|
|
331
|
+
color: $primary-10;
|
|
332
|
+
border-top: 1px solid $primary-90;
|
|
333
|
+
|
|
334
|
+
span {
|
|
335
|
+
img {
|
|
336
|
+
margin-right: 5px;
|
|
337
|
+
height: 13px;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&:last-child {
|
|
343
|
+
a {
|
|
344
|
+
border-bottom: 1px solid $primary-90;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
163
350
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
351
|
+
|
|
352
|
+
.right-content {
|
|
353
|
+
width: calc(100% - 265px);
|
|
354
|
+
|
|
355
|
+
.code-preview {
|
|
356
|
+
background-color: $primary-90;
|
|
357
|
+
border-radius: 4px;
|
|
358
|
+
display: flex;
|
|
359
|
+
|
|
360
|
+
.code-left {
|
|
361
|
+
width: 50%;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.code-right {
|
|
365
|
+
width: 50%;
|
|
366
|
+
}
|
|
178
367
|
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
.left-content {
|
|
373
|
+
.ac-files {
|
|
374
|
+
max-height: 350px;
|
|
375
|
+
overflow-y: auto;
|
|
376
|
+
padding: 10px;
|
|
377
|
+
span {
|
|
378
|
+
width: 20px;
|
|
379
|
+
white-space: nowrap;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
</style>
|
|
@@ -1,3 +1,75 @@
|
|
|
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 | string;
|
|
16
|
+
hideHeader?: boolean;
|
|
17
|
+
editorWordWrap?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
+
title: "Title",
|
|
22
|
+
isSearchable: false,
|
|
23
|
+
isPreviewLoading: false,
|
|
24
|
+
isEditorReadOnly: false,
|
|
25
|
+
previewYamls: () => [],
|
|
26
|
+
showHideBtn: false,
|
|
27
|
+
showMinimap: false,
|
|
28
|
+
isUpdateActive: false,
|
|
29
|
+
deleteModalStatus: "closed",
|
|
30
|
+
editorHeight: 60,
|
|
31
|
+
hideHeader: false,
|
|
32
|
+
editorWordWrap: "on",
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const emit = defineEmits(["activeKey"]);
|
|
36
|
+
|
|
37
|
+
const AcButton = defineAsyncComponent(() => import("../button/Button.vue"));
|
|
38
|
+
const ContentTable = defineAsyncComponent(
|
|
39
|
+
() => import("../content/ContentTable.vue")
|
|
40
|
+
);
|
|
41
|
+
const HeaderItem = defineAsyncComponent(
|
|
42
|
+
() => import("../header/HeaderItem.vue")
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const FilteredFileEditor = defineAsyncComponent(
|
|
46
|
+
() => import("../editor/FilteredFileEditor.vue")
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
const activeKey = ref("");
|
|
50
|
+
const toggleHideValue = ref(false);
|
|
51
|
+
|
|
52
|
+
const activeFile = computed(() => {
|
|
53
|
+
const activeFile = props.previewYamls.find(
|
|
54
|
+
(element) => element.uid === activeKey.value
|
|
55
|
+
);
|
|
56
|
+
return activeFile || { content: "", type: "yaml", isSecret: false };
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const setActiveKey = (key: string) => {
|
|
60
|
+
activeKey.value = key;
|
|
61
|
+
toggleHideValue.value = activeFile.value.isSecret;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
watch(
|
|
65
|
+
activeKey,
|
|
66
|
+
(n) => {
|
|
67
|
+
emit("activeKey", n);
|
|
68
|
+
},
|
|
69
|
+
{ immediate: true }
|
|
70
|
+
);
|
|
71
|
+
</script>
|
|
72
|
+
|
|
1
73
|
<template>
|
|
2
74
|
<content-table
|
|
3
75
|
:table-title="title"
|
|
@@ -25,101 +97,8 @@
|
|
|
25
97
|
:show-minimap="showMinimap"
|
|
26
98
|
:editor-height="editorHeight"
|
|
27
99
|
@setActiveKey="setActiveKey"
|
|
100
|
+
:word-wrap="editorWordWrap"
|
|
28
101
|
/>
|
|
29
102
|
</template>
|
|
30
103
|
</content-table>
|
|
31
104
|
</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,40 @@
|
|
|
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 #3d5e7c;
|
|
25
|
+
z-index: 9999;
|
|
26
|
+
transition: 0.3s ease-in-out;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.footer-left,
|
|
30
|
+
.footer-right {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 32px;
|
|
34
|
+
}
|
|
35
|
+
.sidebar-collapsed {
|
|
36
|
+
.footer-area {
|
|
37
|
+
width: calc(100% - 60px);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</style>
|