@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.
Files changed (215) hide show
  1. package/base/_video-player.scss +65 -0
  2. package/base/utilities/_all.scss +7 -5
  3. package/base/utilities/_colors.scss +377 -0
  4. package/base/utilities/_customize-bulma.scss +23 -27
  5. package/base/utilities/_extended.scss +39 -0
  6. package/base/utilities/{_default.scss → _global.scss} +192 -333
  7. package/base/utilities/_layouts.scss +19 -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/components/_ac-alert-box.scss +205 -263
  12. package/components/_ac-calendar.scss +4 -4
  13. package/components/_ac-code-highlight.scss +13 -16
  14. package/components/_ac-content-layout.scss +165 -165
  15. package/components/_ac-drag.scss +13 -13
  16. package/components/_ac-modal.scss +212 -212
  17. package/components/_ac-options.scss +122 -123
  18. package/components/_ac-select-box.scss +10 -10
  19. package/components/_ac-table.scss +503 -502
  20. package/components/_ac-tabs.scss +65 -61
  21. package/components/_ac-tags.scss +116 -116
  22. package/components/_accordion.scss +117 -0
  23. package/components/_add-card.scss +3 -3
  24. package/components/_all.scss +35 -28
  25. package/components/_app-drawer.scss +0 -134
  26. package/components/_breadcumb.scss +0 -71
  27. package/components/_buttons.scss +779 -779
  28. package/components/_card-body-wrapper.scss +5 -5
  29. package/components/_dashboard-header.scss +0 -115
  30. package/components/_direct-deploy.scss +8 -8
  31. package/components/_getkeeper.scss +110 -0
  32. package/components/_go-to-top.scss +1 -1
  33. package/components/_graph.scss +10 -10
  34. package/components/_image-upload.scss +9 -9
  35. package/components/_input-card.scss +232 -0
  36. package/components/_input.scss +573 -0
  37. package/components/_left-sidebar-menu.scss +452 -587
  38. package/components/_monaco-editor.scss +2 -2
  39. package/components/{_ac-multi-select.scss → _multi-select.scss} +89 -251
  40. package/components/_navbar.scss +786 -752
  41. package/components/_nested-list.scss +3 -3
  42. package/components/_overview-info.scss +10 -10
  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 +14 -14
  49. package/components/_progress-bar.scss +73 -86
  50. package/components/_subscription-card.scss +22 -24
  51. package/components/_table-of-content.scss +8 -8
  52. package/components/{_ac-terminal.scss → _terminal.scss} +114 -81
  53. package/components/_tfa.scss +9 -9
  54. package/components/_transitions.scss +35 -0
  55. package/components/_widget-menu.scss +252 -257
  56. package/components/_wizard.scss +518 -793
  57. package/components/ac-toaster/_ac-toasted.scss +11 -16
  58. package/components/bbum/_activities-header.scss +1 -1
  59. package/components/bbum/_card-team.scss +12 -12
  60. package/components/bbum/_information-center.scss +21 -23
  61. package/components/bbum/_left-sidebar.scss +8 -8
  62. package/components/bbum/_mobile-desktop.scss +16 -21
  63. package/components/bbum/_post.scss +5 -5
  64. package/components/bbum/_sign-up-notification.scss +10 -10
  65. package/components/bbum/_single-post-preview.scss +29 -29
  66. package/components/bbum/_user-profile.scss +10 -10
  67. package/components/ui-builder/_ui-builder.scss +221 -31
  68. package/components/ui-builder/_vue-open-api.scss +565 -7
  69. package/icons/close-icon.svg +3 -0
  70. package/layouts/_code-preview.scss +17 -18
  71. package/main.scss +26 -10
  72. package/package.json +1 -1
  73. package/plugins/theme.js +11 -9
  74. package/plugins/vue-toaster.js +1 -1
  75. package/vue-components/images/icons/cluster-icon.svg +10 -0
  76. package/vue-components/images/icons/org-icon.svg +10 -0
  77. package/vue-components/plugins/time-convert.js +49 -0
  78. package/vue-components/types/cluster.ts +6 -0
  79. package/vue-components/types/importFlow.ts +16 -0
  80. package/vue-components/types/notification.ts +6 -0
  81. package/vue-components/types/previewYaml.ts +8 -0
  82. package/vue-components/types/table.ts +55 -0
  83. package/vue-components/types/theme.ts +10 -0
  84. package/vue-components/types/user.ts +22 -0
  85. package/vue-components/v2/banner/Banner.vue +1 -1
  86. package/vue-components/v2/button/Buttons.vue +1 -1
  87. package/vue-components/v2/card/Card.vue +1 -1
  88. package/vue-components/v2/card/OverviewCards.vue +17 -2
  89. package/vue-components/v2/content/ContentTable.vue +14 -9
  90. package/vue-components/v2/editor/FilteredFileEditor.vue +2 -2
  91. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +21 -21
  92. package/vue-components/v2/icons/Ellipsis.vue +2 -1
  93. package/vue-components/v2/modal/Modal.vue +2 -6
  94. package/vue-components/v2/navbar/Appdrawer.vue +37 -12
  95. package/vue-components/v2/navbar/Navbar.vue +3 -3
  96. package/vue-components/v2/navbar/NavbarItem.vue +3 -1
  97. package/vue-components/v2/navbar/NavbarItemContent.vue +1 -1
  98. package/vue-components/v2/navbar/User.vue +5 -22
  99. package/vue-components/v2/pagination/Pagination.vue +66 -0
  100. package/vue-components/v2/sidebar/SidebarItem.vue +10 -7
  101. package/{components/_ac-accordion.scss → vue-components/v3/accordion/Accordion.vue} +40 -6
  102. package/vue-components/v3/alert/Alert.vue +238 -0
  103. package/vue-components/v3/alert/Toast.vue +79 -0
  104. package/vue-components/v3/banner/Banner.vue +10 -0
  105. package/vue-components/v3/breadcrumbs/Breadcrumb.vue +166 -0
  106. package/vue-components/v3/button/Button.vue +110 -57
  107. package/vue-components/v3/button/Buttons.vue +22 -0
  108. package/vue-components/v3/button/DownloadBtn.vue +31 -0
  109. package/vue-components/v3/cards/Card.vue +32 -0
  110. package/vue-components/v3/cards/CardContent.vue +7 -0
  111. package/vue-components/v3/cards/CardHeader.vue +14 -0
  112. package/vue-components/v3/cards/Cards.vue +7 -0
  113. package/vue-components/v3/cards/Cluster.vue +159 -0
  114. package/vue-components/v3/cards/Counter.vue +39 -0
  115. package/vue-components/v3/cards/FeatureCard.vue +67 -0
  116. package/vue-components/v3/cards/FeatureCards.vue +6 -0
  117. package/vue-components/v3/cards/InfoCard.vue +242 -0
  118. package/vue-components/v3/cards/Monitoring.vue +90 -0
  119. package/vue-components/v3/cards/OrgClusterCard.vue +86 -0
  120. package/vue-components/v3/cards/OverviewCard.vue +28 -0
  121. package/vue-components/v3/cards/OverviewCards.vue +39 -0
  122. package/vue-components/v3/cards/Payment.vue +62 -0
  123. package/vue-components/v3/cards/Vendor.vue +89 -0
  124. package/vue-components/v3/content/ContentHeader.vue +39 -30
  125. package/vue-components/v3/content/ContentLayout.vue +20 -0
  126. package/vue-components/v3/content/ContentTable.vue +44 -58
  127. package/vue-components/v3/dropdown/DropdownAction.vue +95 -0
  128. package/vue-components/v3/dropdown/DropdownDivider.vue +2 -0
  129. package/vue-components/v3/dropdown/DropdownItem.vue +2 -0
  130. package/vue-components/v3/dropdown/DropdownMenu.vue +85 -91
  131. package/vue-components/v3/editor/Editor.vue +117 -115
  132. package/vue-components/v3/editor/FilteredFileEditor.vue +325 -128
  133. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +73 -94
  134. package/vue-components/v3/footer/FooterArea.vue +40 -0
  135. package/vue-components/v3/footer/FooterItem.vue +32 -0
  136. package/vue-components/v3/footer/FooterItems.vue +15 -0
  137. package/vue-components/v3/footer/Info.vue +25 -0
  138. package/vue-components/v3/footer/Status.vue +43 -0
  139. package/vue-components/v3/footer/Usage.vue +34 -0
  140. package/vue-components/v3/form/Form.vue +24 -36
  141. package/vue-components/v3/form/FormFooter.vue +24 -0
  142. package/vue-components/v3/form/FormFooterControl.vue +7 -0
  143. package/vue-components/v3/form/FormFooterControls.vue +7 -0
  144. package/vue-components/v3/form-fields/AcSingleInput.vue +21 -0
  145. package/vue-components/v3/form-fields/FileUpload.vue +89 -0
  146. package/vue-components/v3/form-fields/Input.vue +19 -15
  147. package/vue-components/v3/header/Header.vue +120 -26
  148. package/vue-components/v3/header/HeaderItem.vue +18 -0
  149. package/vue-components/v3/header/HeaderItems.vue +4 -0
  150. package/vue-components/v3/icons/Ellipsis.vue +2 -0
  151. package/vue-components/v3/loaders/ClusterSwitcherLoader.vue +13 -0
  152. package/vue-components/v3/loaders/InfoCardLoader.vue +19 -0
  153. package/vue-components/v3/loaders/ResourceLoader.vue +4 -12
  154. package/vue-components/v3/loaders/SidebarLoader.vue +4 -12
  155. package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
  156. package/vue-components/v3/modal/Modal.vue +294 -95
  157. package/vue-components/v3/modals/DeleteConfirmationModal.vue +37 -50
  158. package/vue-components/v3/modals/JsonShowModal.vue +63 -68
  159. package/vue-components/v3/navbar/Appdrawer.vue +198 -51
  160. package/vue-components/v3/navbar/Navbar.vue +139 -0
  161. package/vue-components/v3/navbar/NavbarItem.vue +103 -0
  162. package/vue-components/v3/navbar/NavbarItemContent.vue +282 -0
  163. package/vue-components/v3/navbar/Notification.vue +207 -0
  164. package/vue-components/v3/navbar/ThemeMode.vue +128 -112
  165. package/vue-components/v3/navbar/User.vue +394 -267
  166. package/vue-components/v3/notification/AlertBox.vue +266 -39
  167. package/vue-components/v3/notification/Notification.vue +50 -44
  168. package/vue-components/v3/notification/NotificationItem.vue +51 -19
  169. package/vue-components/v3/option-dots/Options.vue +197 -0
  170. package/vue-components/v3/pagination/Pagination.vue +216 -102
  171. package/vue-components/v3/preloader/Preloader.vue +23 -0
  172. package/vue-components/v3/searchbars/SearchBar.vue +50 -34
  173. package/vue-components/v3/sidebar/AccentColorPicker.vue +97 -0
  174. package/vue-components/v3/sidebar/ClusterSwitcher.vue +71 -86
  175. package/vue-components/v3/sidebar/Sidebar.vue +239 -0
  176. package/vue-components/v3/sidebar/SidebarBody.vue +14 -0
  177. package/vue-components/v3/sidebar/SidebarFooter.vue +89 -0
  178. package/vue-components/v3/sidebar/SidebarHeader.vue +131 -0
  179. package/vue-components/v3/sidebar/SidebarItem.vue +62 -0
  180. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +101 -104
  181. package/vue-components/v3/sidebar/SidebarMenuList.vue +9 -0
  182. package/vue-components/v3/sidebar/Steps.vue +152 -0
  183. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +204 -0
  184. package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +44 -0
  185. package/vue-components/v3/sidebar/sidebar-tabs/TabsContent.vue +99 -0
  186. package/vue-components/v3/tab/TabItem.vue +10 -12
  187. package/vue-components/v3/tab/Tabs.vue +36 -0
  188. package/vue-components/v3/tab/TabsBody.vue +7 -0
  189. package/vue-components/v3/table/EmptyTableInfo.vue +8 -0
  190. package/vue-components/v3/table/FakeTableCell.vue +22 -31
  191. package/vue-components/v3/table/InfoTable.vue +89 -61
  192. package/vue-components/v3/table/MultiInfoTable.vue +72 -95
  193. package/vue-components/v3/table/Table.vue +596 -157
  194. package/vue-components/v3/table/TableCell.vue +13 -24
  195. package/vue-components/v3/table/TableContainer.vue +50 -28
  196. package/vue-components/v3/table/TableRow.vue +65 -87
  197. package/vue-components/v3/table/table-cell/ArrayCell.vue +94 -103
  198. package/vue-components/v3/table/table-cell/CellValue.vue +74 -106
  199. package/vue-components/v3/table/table-cell/GenericCell.vue +43 -42
  200. package/vue-components/v3/table/table-cell/ObjectCell.vue +91 -101
  201. package/vue-components/v3/table/table-cell/ValueWithModal.vue +22 -31
  202. package/vue-components/v3/tabs/EditorTabs.vue +18 -24
  203. package/vue-components/v3/tag/Tag.vue +16 -12
  204. package/vue-components/v3/tag/Tags.vue +7 -0
  205. package/base/utilities/_derived-variables.scss +0 -25
  206. package/base/utilities/_initial-variables.scss +0 -215
  207. package/base/utilities/dark-theme.scss +0 -26
  208. package/components/_ac-card.scss +0 -597
  209. package/components/_ac-input.scss +0 -876
  210. package/mixins/stickyContent.js +0 -141
  211. package/plugins/caching.ts +0 -243
  212. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -92
  213. package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -400
  214. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -148
  215. /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 is-active is-not-fixed">
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 pt-20"
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.format"
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
- <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);
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
- 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();
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
- toggleHideValue(n) {
182
- this.hideValue = n;
183
- },
184
- },
185
- });
186
- </script>
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>