@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,5 +1,128 @@
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;
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
- <div class="ac-preview is-active is-not-fixed">
125
+ <div class="ac-preview">
3
126
  <div class="ac-preview-inner">
4
127
  <!-- preview body start -->
5
128
  <div
@@ -14,7 +137,7 @@
14
137
  </strong>
15
138
  <template v-else>
16
139
  <div v-if="!isPreviewLoading && previewYamls" class="left-content">
17
- <div class="ac-files ac-hscrollbar pt-0">
140
+ <div class="ac-files ac-hscrollbar ac-vscrollbar pt-0">
18
141
  <ul v-if="!isPreviewLoading">
19
142
  <li
20
143
  v-for="(previewYaml, idx) in filteredYamls"
@@ -47,7 +170,7 @@
47
170
  v-else
48
171
  v-model="activeFile.content"
49
172
  :original-value="originalValue"
50
- :language="activeFile.format"
173
+ :language="activeFile.type"
51
174
  :read-only="isEditorReadOnly"
52
175
  :editor-height="editorHeight"
53
176
  :show-minimap="showMinimap"
@@ -58,129 +181,196 @@
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);
184
+ <style lang="scss" scoped>
185
+ // .preview-icon {
186
+ // width: 60px;
187
+ // height: 60px;
188
+ // background-color: rgba(25, 113, 189, 0.4);
189
+ // box-shadow: 0px 2px 20px rgba(0, 0, 0, 0.16);
190
+ // border-radius: 4px 0px 0px 4px;
191
+ // position: fixed;
192
+ // right: 0;
193
+ // top: 400px;
194
+ // border: none;
195
+ // cursor: pointer;
196
+ // color: $white-100;
197
+ // z-index: 9999;
198
+ // transition: 0.3s ease-in-out;
199
+
200
+ // img {
201
+ // margin-bottom: 4px;
202
+ // }
203
+
204
+ // &:hover {
205
+ // background-color: $primary;
206
+ // }
207
+ // }
208
+
209
+ .ac-preview {
210
+ padding-inline: 20px;
211
+ // position: fixed;
212
+ // width: calc(100% - 90px);
213
+ // height: 100%;
214
+ // top: 50px;
215
+ // right: -100%;
216
+ // z-index: 99999;
217
+ // transition: 0.3s;
218
+
219
+ // &.is-active {
220
+ // right: 0;
221
+
222
+ // &.is-not-fixed {
223
+ // width: 100%;
224
+
225
+ // .ac-preview-body {
226
+ // padding: 20px 0 0;
227
+ // }
228
+ // }
229
+ // }
230
+
231
+ .ac-preview-inner {
232
+ // background-color: $white-100;
233
+ // border-radius: 10px 0px 0px 10px;
234
+ // height: calc(100% - 90px);
235
+
236
+ &:after {
237
+ // position: absolute;
238
+ // content: "";
239
+ // left: -90px;
240
+ // top: -50px;
241
+ // width: calc(100% + 90px);
242
+ // height: 100%;
243
+ // background-color: $white-100;
244
+
245
+ // remove opacity for fix cluster ui project
246
+ // opacity: 0.8;
247
+ // z-index: -1;
248
+ }
249
+
250
+ // .ac-preview-header {
251
+ // padding: 20px;
252
+ // border-bottom: 1px solid $black-60;
253
+
254
+ // h5 {
255
+ // font-style: normal;
256
+ // font-weight: 500;
257
+ // font-size: 24px;
258
+ // line-height: 28px;
259
+
260
+ // color: $primary-10;
261
+ // }
262
+
263
+ // .ms-back-button {
264
+ // .is-transparent {
265
+ // font-style: normal;
266
+ // font-weight: normal;
267
+ // font-size: 16px;
268
+ // line-height: 100%;
269
+ // color: $black-80;
270
+ // cursor: pointer;
271
+
272
+ // i.fa {
273
+ // color: $black-80;
274
+ // padding-left: 5px;
275
+ // }
276
+ // }
277
+ // }
278
+ // }
279
+
280
+ .ac-preview-body {
281
+ display: flex;
282
+ // margin-top: 10px;
283
+ // padding: 20px;
284
+
285
+ .left-content {
286
+ width: 250px;
287
+ margin-right: 15px;
288
+
289
+ .ac-files {
290
+ ul {
291
+ li {
292
+ &.is-active {
293
+ a {
294
+ background-color: $primary;
295
+ border-radius: 5px;
296
+ color: $white-100;
297
+ padding: 10px 10px;
298
+ margin-left: -10px;
299
+ border-top: 1px solid transparent;
300
+
301
+ span {
302
+ img {
303
+ filter: brightness(100);
304
+ }
305
+ }
306
+ }
307
+
308
+ &:last-child {
309
+ &.is-active {
310
+ a {
311
+ border-top: 1px solid transparent;
312
+ }
313
+ }
314
+ }
315
+ }
316
+
317
+ a {
318
+ padding: 10px 0px;
319
+ display: flex;
320
+ font-style: normal;
321
+ font-weight: 500;
322
+ font-size: 14px;
323
+ line-height: 100%;
324
+ color: $primary-10;
325
+ border-top: 1px solid $primary-90;
326
+
327
+ span {
328
+ img {
329
+ margin-right: 5px;
330
+ height: 13px;
331
+ }
332
+ }
333
+ }
334
+
335
+ &:last-child {
336
+ a {
337
+ border-bottom: 1px solid $primary-90;
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
163
343
  }
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();
344
+
345
+ .right-content {
346
+ width: calc(100% - 265px);
347
+
348
+ .code-preview {
349
+ background-color: $primary-90;
350
+ border-radius: 4px;
351
+ display: flex;
352
+
353
+ .code-left {
354
+ width: 50%;
355
+ }
356
+
357
+ .code-right {
358
+ width: 50%;
359
+ }
178
360
  }
179
- },
180
- },
181
- toggleHideValue(n) {
182
- this.hideValue = n;
183
- },
184
- },
185
- });
186
- </script>
361
+ }
362
+ }
363
+ }
364
+ }
365
+ .left-content {
366
+ .ac-files {
367
+ max-height: 350px;
368
+ overflow-y: auto;
369
+ padding: 10px;
370
+ span {
371
+ width: 20px;
372
+ white-space: nowrap;
373
+ }
374
+ }
375
+ }
376
+ </style>
@@ -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>