@appscode/design-system 0.0.21-alpha.2 → 0.4.27

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 (165) hide show
  1. package/base/utilities/_all.scss +7 -0
  2. package/base/utilities/_customize-bulma.scss +191 -0
  3. package/base/utilities/_default.scss +319 -110
  4. package/base/utilities/_derived-variables.scss +8 -15
  5. package/base/utilities/_grid.scss +29 -0
  6. package/base/utilities/_initial-variables.scss +111 -72
  7. package/base/utilities/_mixin.scss +90 -10
  8. package/base/utilities/_typography.scss +29 -19
  9. package/base/utilities/dark-theme.scss +26 -0
  10. package/components/_ac-accordion.scss +15 -5
  11. package/components/_ac-alert-box.scss +109 -26
  12. package/components/_ac-card.scss +71 -24
  13. package/components/_ac-code-highlight.scss +7 -1
  14. package/components/_ac-content-layout.scss +5 -5
  15. package/components/_ac-drag.scss +8 -6
  16. package/components/_ac-input.scss +196 -38
  17. package/components/_ac-modal.scss +6 -5
  18. package/components/_ac-multi-select.scss +281 -23
  19. package/components/_ac-options.scss +31 -16
  20. package/components/_ac-report.scss +53 -0
  21. package/components/_ac-select-box.scss +15 -5
  22. package/components/_ac-table.scss +160 -39
  23. package/components/_ac-tabs.scss +86 -23
  24. package/components/_ac-tags.scss +87 -2
  25. package/components/_ac-terminal.scss +270 -0
  26. package/components/_all.scss +28 -0
  27. package/components/_app-drawer.scss +134 -0
  28. package/components/_breadcumb.scss +8 -3
  29. package/components/_buttons.scss +96 -62
  30. package/components/_card-body-wrapper.scss +3 -3
  31. package/components/_dashboard-header.scss +33 -1
  32. package/components/_direct-deploy.scss +69 -0
  33. package/components/_go-to-top.scss +1 -1
  34. package/components/_graph.scss +45 -0
  35. package/components/_image-upload.scss +6 -4
  36. package/components/_left-sidebar-menu.scss +212 -52
  37. package/components/_monaco-editor.scss +1 -1
  38. package/components/_navbar.scss +193 -31
  39. package/components/_overview-info.scss +4 -4
  40. package/components/_overview-page.scss +1 -2
  41. package/components/_pagination.scss +45 -7
  42. package/components/_payment-card.scss +28 -12
  43. package/components/_preloader.scss +1 -1
  44. package/components/_preview-modal.scss +22 -9
  45. package/components/_pricing-table.scss +1 -1
  46. package/components/_progress-bar.scss +5 -5
  47. package/components/_subscription-card.scss +15 -8
  48. package/components/_table-of-content.scss +1 -1
  49. package/components/_tfa.scss +69 -0
  50. package/components/_transitions.scss +261 -0
  51. package/components/_widget-menu.scss +9 -9
  52. package/components/_wizard.scss +33 -20
  53. package/components/ac-toaster/_ac-toasted.scss +40 -8
  54. package/components/bbum/_all.scss +9 -0
  55. package/components/bbum/_card-team.scss +18 -10
  56. package/components/bbum/_information-center.scss +19 -5
  57. package/components/bbum/_mobile-desktop.scss +6 -6
  58. package/components/bbum/_post.scss +5 -4
  59. package/components/bbum/_sign-up-notification.scss +6 -6
  60. package/components/bbum/_single-post-preview.scss +10 -10
  61. package/components/bbum/_user-profile.scss +97 -90
  62. package/components/ui-builder/_ui-builder.scss +98 -21
  63. package/components/ui-builder/_vue-open-api.scss +104 -0
  64. package/layouts/_404.scss +159 -0
  65. package/layouts/_all.scss +2 -0
  66. package/layouts/_code-preview.scss +19 -8
  67. package/main.scss +6 -53
  68. package/package.json +4 -7
  69. package/plugins/caching.ts +243 -0
  70. package/plugins/theme.js +142 -0
  71. package/plugins/time-convert.js +49 -0
  72. package/plugins/vue-toaster.js +10 -6
  73. package/vue-components/v2/banner/Banner.vue +2 -2
  74. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
  75. package/vue-components/v2/button/Button.vue +10 -1
  76. package/vue-components/v2/button/DownloadBtn.vue +45 -0
  77. package/vue-components/v2/card/Card.vue +1 -0
  78. package/vue-components/v2/card/CardContent.vue +5 -0
  79. package/vue-components/v2/card/CardHeader.vue +12 -0
  80. package/vue-components/v2/card/OverviewCard.vue +10 -0
  81. package/vue-components/v2/card/OverviewCards.vue +5 -0
  82. package/vue-components/v2/card/PaymentCard.vue +69 -0
  83. package/vue-components/v2/card/PaymentCardOptionButtons.vue +35 -0
  84. package/vue-components/v2/card/PaymentCards.vue +44 -0
  85. package/vue-components/v2/content/ContentHeader.vue +9 -5
  86. package/vue-components/v2/content/ContentTable.vue +12 -7
  87. package/vue-components/v2/editor/Editor.vue +38 -5
  88. package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
  89. package/vue-components/v2/editor/MonacoEditor.vue +125 -0
  90. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
  91. package/vue-components/v2/form/Form.vue +12 -7
  92. package/vue-components/v2/form-fields/Input.vue +1 -1
  93. package/vue-components/v2/header/Header.vue +0 -1
  94. package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
  95. package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
  96. package/vue-components/v2/modal/Modal.vue +40 -7
  97. package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -0
  98. package/vue-components/v2/modals/JsonShowModal.vue +12 -3
  99. package/vue-components/v2/navbar/Appdrawer.vue +10 -9
  100. package/vue-components/v2/navbar/ThemeMode.vue +120 -0
  101. package/vue-components/v2/navbar/User.vue +229 -17
  102. package/vue-components/v2/notification/Notification.vue +101 -0
  103. package/vue-components/v2/notification/NotificationItem.vue +44 -0
  104. package/vue-components/v2/pagination/Pagination.vue +24 -4
  105. package/vue-components/v2/preloader/Preloader.vue +5 -5
  106. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  107. package/vue-components/v2/sidebar/SidebarItem.vue +24 -2
  108. package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
  109. package/vue-components/v2/tab/TabItem.vue +1 -1
  110. package/vue-components/v2/table/FakeTableCell.vue +36 -0
  111. package/vue-components/v2/table/InfoTable.vue +13 -3
  112. package/vue-components/v2/table/NarrowTable.vue +0 -2
  113. package/vue-components/v2/table/Table.vue +170 -10
  114. package/vue-components/v2/table/TableRow.vue +29 -2
  115. package/vue-components/v2/table/table-cell/CellValue.vue +33 -4
  116. package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
  117. package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
  118. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  119. package/vue-components/v3/button/Button.vue +78 -0
  120. package/vue-components/v3/content/ContentHeader.vue +55 -0
  121. package/vue-components/v3/content/ContentTable.vue +83 -0
  122. package/vue-components/v3/dropdown/DropdownDivider.vue +3 -0
  123. package/vue-components/v3/dropdown/DropdownItem.vue +5 -0
  124. package/vue-components/v3/dropdown/DropdownMenu.vue +111 -0
  125. package/vue-components/v3/editor/Editor.vue +160 -0
  126. package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
  127. package/vue-components/v3/editor/MonacoEditor.vue +131 -0
  128. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
  129. package/vue-components/v3/form/Form.vue +63 -0
  130. package/vue-components/v3/form-fields/Input.vue +22 -0
  131. package/vue-components/v3/header/Header.vue +45 -0
  132. package/vue-components/v3/header/HeaderItem.vue +5 -0
  133. package/vue-components/v3/header/HeaderItems.vue +5 -0
  134. package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
  135. package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
  136. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
  137. package/vue-components/v3/modal/Modal.vue +158 -0
  138. package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
  139. package/vue-components/v3/modals/JsonShowModal.vue +96 -0
  140. package/vue-components/v3/modals/LongRunningTasksModal.vue +373 -0
  141. package/vue-components/v3/navbar/Appdrawer.vue +63 -0
  142. package/vue-components/v3/navbar/ThemeMode.vue +120 -0
  143. package/vue-components/v3/navbar/User.vue +288 -0
  144. package/vue-components/v3/notification/Notification.vue +98 -0
  145. package/vue-components/v3/notification/NotificationItem.vue +52 -0
  146. package/vue-components/v3/pagination/Pagination.vue +172 -0
  147. package/vue-components/v3/searchbars/SearchBar.vue +47 -0
  148. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  149. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
  150. package/vue-components/v3/tab/TabItem.vue +17 -0
  151. package/vue-components/v3/table/FakeTableCell.vue +39 -0
  152. package/vue-components/v3/table/InfoTable.vue +105 -0
  153. package/vue-components/v3/table/MultiInfoTable.vue +143 -0
  154. package/vue-components/v3/table/Table.vue +272 -0
  155. package/vue-components/v3/table/TableCell.vue +28 -0
  156. package/vue-components/v3/table/TableContainer.vue +34 -0
  157. package/vue-components/v3/table/TableRow.vue +147 -0
  158. package/vue-components/v3/table/table-cell/ArrayCell.vue +111 -0
  159. package/vue-components/v3/table/table-cell/CellValue.vue +133 -0
  160. package/vue-components/v3/table/table-cell/GenericCell.vue +75 -0
  161. package/vue-components/v3/table/table-cell/ObjectCell.vue +110 -0
  162. package/vue-components/v3/table/table-cell/ValueWithModal.vue +43 -0
  163. package/vue-components/v3/tabs/EditorTabs.vue +36 -0
  164. package/vue-components/v3/tag/Tag.vue +17 -0
  165. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
@@ -0,0 +1,189 @@
1
+ <template>
2
+ <div class="ac-preview is-active is-not-fixed">
3
+ <div class="ac-preview-inner">
4
+ <!-- preview body start -->
5
+ <div class="ac-preview-body mt-0 pt-15 pl-20">
6
+ <div
7
+ v-if="isPreviewLoading || (!isPreviewLoading && previewYamls)"
8
+ class="left-content"
9
+ >
10
+ <div class="ac-files ac-hscrollbar pt-0">
11
+ <ul v-if="!isPreviewLoading">
12
+ <li
13
+ v-for="(previewYaml, idx) in filteredYamls"
14
+ :key="previewYaml.name + idx"
15
+ :class="{ 'is-active': activeKey === previewYaml.uid }"
16
+ data-testid="filtered-file-editor-file-name"
17
+ >
18
+ <a @click.prevent="setActivePreview(previewYaml.uid)">
19
+ <span>
20
+ <img
21
+ src="~@appscode/design-system-images/icons/file-icon.svg"
22
+ alt=""
23
+ />
24
+ </span>
25
+ <span>{{ previewYaml.name }}</span>
26
+ </a>
27
+ </li>
28
+ </ul>
29
+ <sidebar-loader
30
+ v-else
31
+ :primaryLoaderColor="primaryLoaderColor"
32
+ :secondaryLoaderColor="secondaryLoaderColor"
33
+ />
34
+ </div>
35
+ </div>
36
+ <div class="right-content" data-testid="filtered-file-editor-content">
37
+ <div class="right-content">
38
+ <resource-loader
39
+ v-if="isPreviewLoading"
40
+ :primaryLoaderColor="primaryLoaderColor"
41
+ :secondaryLoaderColor="secondaryLoaderColor"
42
+ />
43
+ <editor
44
+ v-else-if="!isPreviewLoading && !hideValue"
45
+ v-model="activeFile.content"
46
+ :original-value="originalValue"
47
+ :language="activeFile.format"
48
+ :read-only="isEditorReadOnly"
49
+ :editor-height="editorHeight"
50
+ :show-minimap="showMinimap"
51
+ :editor-theme="editorTheme"
52
+ :key="editorTheme"
53
+ />
54
+ <span v-else> *************** </span>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </template>
61
+ <script>
62
+ import Preloader from "../preloader/Preloader.vue";
63
+ import Banner from "../banner/Banner.vue";
64
+ export default {
65
+ components: {
66
+ Editor: () => ({
67
+ component: import("./Editor.vue"),
68
+ loading: Preloader,
69
+ delay: 200,
70
+ error: Banner,
71
+ timeout: 100000,
72
+ }),
73
+ ResourceLoader: () => import("./../loaders/ResourceLoader.vue"),
74
+ SidebarLoader: () => import("./../loaders/SidebarLoader.vue"),
75
+ },
76
+ props: {
77
+ searchText: {
78
+ type: String,
79
+ default: "",
80
+ },
81
+ toggleHideValue: {
82
+ type: Boolean,
83
+ default: true,
84
+ },
85
+ isPreviewLoading: {
86
+ type: Boolean,
87
+ default: false,
88
+ },
89
+ isEditorReadOnly: {
90
+ type: Boolean,
91
+ default: false,
92
+ },
93
+ previewYamls: {
94
+ type: Array,
95
+ default: () => {
96
+ [];
97
+ },
98
+ },
99
+ showMinimap: {
100
+ type: Boolean,
101
+ default: false,
102
+ },
103
+ editorHeight: {
104
+ type: Number,
105
+ default: 60,
106
+ },
107
+ loaderColor: {
108
+ type: Object,
109
+ default: () => {
110
+ return {};
111
+ },
112
+ },
113
+ theme: {
114
+ type: String,
115
+ default: "light",
116
+ },
117
+ },
118
+ data() {
119
+ return {
120
+ activeKey: "",
121
+ hideValue: "",
122
+ };
123
+ },
124
+ computed: {
125
+ activeFile() {
126
+ const activeFile = this.filteredYamls.find(
127
+ (element) => element.uid === this.activeKey
128
+ );
129
+ return activeFile || { content: "", format: "yaml" };
130
+ },
131
+ originalValue() {
132
+ const activeFile = this.filteredYamls.find(
133
+ (element) => element.uid === this.activeKey
134
+ );
135
+ return (activeFile && activeFile.initContent) || "";
136
+ },
137
+ editorTheme() {
138
+ return this.theme === "dark" ? "vs-dark" : "vs";
139
+ },
140
+ primaryLoaderColor() {
141
+ return this.loaderColor.primaryLoaderColor;
142
+ },
143
+ secondaryLoaderColor() {
144
+ return this.loaderColor.secondaryLoaderColor;
145
+ },
146
+ filteredYamls() {
147
+ if (this.searchText) {
148
+ return this.previewYamls.filter(
149
+ (element) => JSON.stringify(element).search(this.searchText) > -1
150
+ );
151
+ } else return this.previewYamls;
152
+ },
153
+ isKeyAvailable() {
154
+ const val = this.previewYamls.find((element) => {
155
+ return element.uid === this.activeKey;
156
+ });
157
+ return val === undefined ? false : true;
158
+ },
159
+ },
160
+ methods: {
161
+ initActivePreview() {
162
+ if (!this.isKeyAvailable) {
163
+ this.activeKey = this.previewYamls[0].uid;
164
+ this.hideValue = this.activeFile.isSecret;
165
+ this.$emit("setActiveKey", this.activeKey);
166
+ }
167
+ },
168
+ setActivePreview(uid) {
169
+ this.activeKey = uid;
170
+ this.hideValue = this.activeFile.isSecret;
171
+ this.$emit("setActiveKey", this.activeKey);
172
+ },
173
+ },
174
+ watch: {
175
+ previewYamls: {
176
+ deep: true,
177
+ immediate: true,
178
+ handler(n) {
179
+ if (n.length) {
180
+ this.initActivePreview();
181
+ }
182
+ },
183
+ },
184
+ toggleHideValue(n) {
185
+ this.hideValue = n;
186
+ },
187
+ },
188
+ };
189
+ </script>
@@ -0,0 +1,125 @@
1
+ <template>
2
+ <div class="monaco-editor-vue2" :style="style"></div>
3
+ </template>
4
+
5
+ <script>
6
+ import * as monaco from "monaco-editor";
7
+
8
+ export default {
9
+ name: "MonacoEditor",
10
+ props: {
11
+ diffEditor: { type: Boolean, default: false },
12
+ width: { type: [String, Number], default: "100%" },
13
+ height: { type: [String, Number], default: "100%" },
14
+ original: String,
15
+ value: String,
16
+ language: { type: String, default: "javascript" },
17
+ theme: { type: String, default: "vs" },
18
+ options: {
19
+ type: Object,
20
+ default() {
21
+ return {};
22
+ },
23
+ },
24
+ },
25
+ computed: {
26
+ style() {
27
+ const fixedWidth = this.width.toString().includes("%")
28
+ ? this.width
29
+ : `${this.width}px`;
30
+ const fixedHeight = this.height.toString().includes("%")
31
+ ? this.height
32
+ : `${this.height}px`;
33
+ return {
34
+ width: fixedWidth,
35
+ height: fixedHeight,
36
+ "text-align": "left",
37
+ };
38
+ },
39
+ },
40
+ mounted() {
41
+ this.initMonaco();
42
+ },
43
+ beforeDestroy() {
44
+ this.editor && this.editor.dispose();
45
+ },
46
+ methods: {
47
+ initMonaco() {
48
+ this.$emit("editorWillMount", this.monaco);
49
+ const { value, language, theme, options } = this;
50
+ this.editor = monaco.editor[
51
+ this.diffEditor ? "createDiffEditor" : "create"
52
+ ](this.$el, {
53
+ value: value,
54
+ language: language,
55
+ theme: theme,
56
+ ...options,
57
+ });
58
+ this.diffEditor && this._setModel(this.value, this.original);
59
+
60
+ // @event `change`
61
+ const editor = this._getEditor();
62
+ editor.onDidChangeModelContent((event) => {
63
+ const value = editor.getValue();
64
+ if (this.value !== value) {
65
+ this.$emit("change", value, event);
66
+ }
67
+ });
68
+
69
+ this.$emit("editorDidMount", this.editor);
70
+ },
71
+ _setModel(value, original) {
72
+ const { language } = this;
73
+ const originalModel = monaco.editor.createModel(original, language);
74
+ const modifiedModel = monaco.editor.createModel(value, language);
75
+ this.editor.setModel({
76
+ original: originalModel,
77
+ modified: modifiedModel,
78
+ });
79
+ },
80
+ _setValue(value) {
81
+ let editor = this._getEditor();
82
+ if (editor) return editor.setValue(value);
83
+ },
84
+ _getValue() {
85
+ let editor = this._getEditor();
86
+ if (!editor) return "";
87
+ return editor.getValue();
88
+ },
89
+ _getEditor() {
90
+ if (!this.editor) return null;
91
+ return this.diffEditor ? this.editor.getModifiedEditor() : this.editor;
92
+ },
93
+ _setOriginal() {
94
+ const { original } = this.editor.getModel();
95
+ original.setValue(this.original);
96
+ },
97
+ },
98
+ watch: {
99
+ options: {
100
+ deep: true,
101
+ handler(options) {
102
+ this.editor.updateOptions(options);
103
+ },
104
+ },
105
+ value() {
106
+ this.value !== this._getValue() && this._setValue(this.value);
107
+ },
108
+ original() {
109
+ this._setOriginal();
110
+ },
111
+ language() {
112
+ if (!this.editor) return;
113
+ if (this.diffEditor) {
114
+ const { original, modified } = this.editor.getModel();
115
+ monaco.editor.setModelLanguage(original, this.language);
116
+ monaco.editor.setModelLanguage(modified, this.language);
117
+ } else
118
+ monaco.editor.setModelLanguage(this.editor.getModel(), this.language);
119
+ },
120
+ theme() {
121
+ monaco.editor.setTheme(this.theme);
122
+ },
123
+ },
124
+ };
125
+ </script>
@@ -0,0 +1,209 @@
1
+ <template>
2
+ <content-table
3
+ :table-title="title"
4
+ :searchable="isSearchable"
5
+ :hide-header="hideHeader"
6
+ >
7
+ <template #content-controls>
8
+ <header-item v-if="showHideBtn">
9
+ <ac-button
10
+ modifier-classes="is-square is-primary"
11
+ :icon-class="toggleHideValue ? 'eye-slash' : 'eye'"
12
+ @click.prevent="toggleHideValue = !toggleHideValue"
13
+ />
14
+ </header-item>
15
+ <header-item v-if="showCopyBtn">
16
+ <ac-button
17
+ modifier-classes="is-square is-primary"
18
+ icon-class="copy"
19
+ v-clipboard:copy="decode(activeFile)"
20
+ v-clipboard:success="onCopy"
21
+ v-clipboard:error="onError"
22
+ />
23
+ </header-item>
24
+ <header-item v-if="showDownloadBtn">
25
+ <download-btn
26
+ :file-data="decode(activeFile)"
27
+ :file-name="activeFile.name"
28
+ />
29
+ </header-item>
30
+ <header-item v-if="showUpdateBtn && !isEditorReadOnly">
31
+ <ac-button
32
+ modifier-classes="is-square is-primary"
33
+ icon-class="floppy-o"
34
+ :class="{ 'is-loading': isUpdateActive }"
35
+ @click.prevent="$emit('updateData', activeKey, activeFile)"
36
+ />
37
+ </header-item>
38
+ <header-item v-if="showDeleteBtn">
39
+ <ac-button
40
+ modifier-classes="is-square is-danger"
41
+ icon-class="trash"
42
+ @click.prevent="showDeleteDataModal = true"
43
+ />
44
+ <delete-confirmation-modal
45
+ title="Delete Resource"
46
+ message="Do you want to delete "
47
+ :item-name="activeFile.name"
48
+ :open="showDeleteDataModal"
49
+ :is-delete-active="deleteModalStatus === 'loading'"
50
+ @delete-confirmation-modal$confirm="confirmDelete"
51
+ @closemodal="showDeleteDataModal = false"
52
+ />
53
+ </header-item>
54
+ <slot name="content-action" />
55
+ </template>
56
+ <template #content="{ searchText }">
57
+ <filtered-file-editor
58
+ :search-text="searchText"
59
+ :toggle-hide-value="toggleHideValue"
60
+ :is-preview-loading="isPreviewLoading"
61
+ :is-editor-read-only="isEditorReadOnly"
62
+ :preview-yamls="previewYamls"
63
+ :show-minimap="showMinimap"
64
+ :editor-height="editorHeight"
65
+ :loader-color="loaderColor"
66
+ :theme="theme"
67
+ :key="theme"
68
+ @setActiveKey="setActiveKey"
69
+ />
70
+ </template>
71
+ </content-table>
72
+ </template>
73
+ <script>
74
+ export default {
75
+ components: {
76
+ AcButton: () => import("./../button/Button.vue"),
77
+ Editor: () => import("./../editor/Editor.vue"),
78
+ ContentTable: () => import("./../content/ContentTable.vue"),
79
+ HeaderItem: () => import("./../header/HeaderItem.vue"),
80
+ DownloadBtn: () => import("./../button/DownloadBtn.vue"),
81
+ DeleteConfirmationModal: () =>
82
+ import("./../modals/DeleteConfirmationModal.vue"),
83
+ FilteredFileEditor: () => import("./FilteredFileEditor.vue")
84
+ },
85
+ props: {
86
+ title: {
87
+ type: String,
88
+ default: "Title"
89
+ },
90
+ isSearchable: {
91
+ type: Boolean,
92
+ default: false
93
+ },
94
+ isPreviewLoading: {
95
+ type: Boolean,
96
+ default: false
97
+ },
98
+ isEditorReadOnly: {
99
+ type: Boolean,
100
+ default: false
101
+ },
102
+ previewYamls: {
103
+ type: Array,
104
+ default: () => {
105
+ [];
106
+ }
107
+ },
108
+ visibleBtn: {
109
+ type: Object,
110
+ default: () => {
111
+ return {};
112
+ }
113
+ },
114
+ showMinimap: {
115
+ type: Boolean,
116
+ default: false
117
+ },
118
+ isUpdateActive: {
119
+ type: Boolean,
120
+ default: false
121
+ },
122
+ deleteModalStatus: {
123
+ type: String,
124
+ default: "closed"
125
+ },
126
+ editorHeight: {
127
+ type: Number,
128
+ default: 60
129
+ },
130
+ hideHeader: {
131
+ type: Boolean,
132
+ default: false
133
+ },
134
+ loaderColor: {
135
+ type: Object,
136
+ default: () => {
137
+ return {};
138
+ }
139
+ },
140
+ theme: {
141
+ type: String,
142
+ default: "light"
143
+ }
144
+ },
145
+ data() {
146
+ return {
147
+ activeKey: 0,
148
+ toggleHideValue: "",
149
+ showDeleteDataModal: false
150
+ };
151
+ },
152
+ computed: {
153
+ activeFile() {
154
+ const activeFile = this.previewYamls.find(
155
+ element => element.uid === this.activeKey
156
+ );
157
+ return activeFile || { content: "", format: "yaml" };
158
+ },
159
+ showCopyBtn() {
160
+ if (this.visibleBtn.showCopyBtn) return true;
161
+ else return false;
162
+ },
163
+ showHideBtn() {
164
+ if (this.visibleBtn.showHideBtn) return true;
165
+ else return false;
166
+ },
167
+ showUpdateBtn() {
168
+ if (this.visibleBtn.showUpdateBtn) return true;
169
+ else return false;
170
+ },
171
+ showDownloadBtn() {
172
+ if (this.visibleBtn.showDownloadBtn) return true;
173
+ else return false;
174
+ },
175
+ showDeleteBtn() {
176
+ if (this.visibleBtn.showDeleteBtn) return true;
177
+ else return false;
178
+ }
179
+ },
180
+ methods: {
181
+ onCopy() {
182
+ this.$toasted.global.success("Value copied successfully").goAway(1000);
183
+ },
184
+ onError() {
185
+ this.$toasted.global.error("Copying failed").goAway(1000);
186
+ },
187
+ decode(str) {
188
+ if (str) return str.content;
189
+ else return "";
190
+ },
191
+ encode(str) {
192
+ if (str) return str.content;
193
+ else return "";
194
+ },
195
+ confirmDelete(flag) {
196
+ if (flag) this.$emit("deleteResource", this.activeKey);
197
+ },
198
+ setActiveKey(key) {
199
+ this.activeKey = key;
200
+ this.toggleHideValue = this.activeFile.isSecret;
201
+ }
202
+ },
203
+ watch: {
204
+ deleteModalStatus(n) {
205
+ if (n === "closed") this.showDeleteDataModal = false;
206
+ }
207
+ }
208
+ };
209
+ </script>
@@ -1,11 +1,12 @@
1
1
  <template>
2
2
  <div class="form-wrapper">
3
3
  <div
4
- class="pt-20"
5
4
  :class="{
5
+ 'pt-20': !reducePaddingTop,
6
+ 'pt-10': reducePaddingTop,
6
7
  'pl-20': !isContainer,
7
8
  'form-content': !isContainer,
8
- container: isContainer,
9
+ container: isContainer
9
10
  }"
10
11
  >
11
12
  <slot />
@@ -18,7 +19,7 @@
18
19
  class="ac-vcentered"
19
20
  :class="{
20
21
  'form-content': !isContainer,
21
- container: isContainer,
22
+ container: isContainer
22
23
  }"
23
24
  >
24
25
  <form-footer-controls>
@@ -37,16 +38,20 @@ export default {
37
38
  props: {
38
39
  isContainer: {
39
40
  type: Boolean,
40
- default: false,
41
+ default: false
41
42
  },
42
43
  hasFooter: {
43
44
  type: Boolean,
44
- default: true,
45
+ default: true
45
46
  },
47
+ reducePaddingTop: {
48
+ type: Boolean,
49
+ default: false
50
+ }
46
51
  },
47
52
 
48
53
  components: {
49
- FormFooterControls: () => import("./FormFooterControls.vue"),
50
- },
54
+ FormFooterControls: () => import("./FormFooterControls.vue")
55
+ }
51
56
  };
52
57
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <input class="ac-input" v-on="inputListeners" />
2
+ <input data-testid="ac-input" class="ac-input" v-on="inputListeners" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -1,5 +1,4 @@
1
1
  <template>
2
- <!-- body header start -->
3
2
  <div class="inner-header">
4
3
  <div
5
4
  class="is-flex is-justify-content-space-between"
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <div>
3
+ <content-loader
4
+ :width="100"
5
+ :height="40"
6
+ :speed="2"
7
+ :primaryColor="primaryLoaderColor"
8
+ :secondaryColor="secondaryLoaderColor"
9
+ >
10
+ <rect x="1" y="1" rx="1" ry="1" width="14" height="1" />
11
+ <rect x="17" y="1" rx="1" ry="1" width="13" height="1" />
12
+ <rect x="32" y="1" rx="1" ry="1" width="8" height="1" />
13
+
14
+ <rect x="7" y="3" rx="1" ry="1" width="14" height="1" />
15
+ <rect x="23" y="3" rx="1" ry="1" width="13" height="1" />
16
+ <rect x="38" y="3" rx="1" ry="1" width="8" height="1" />
17
+
18
+ <rect x="13" y="5" rx="1" ry="1" width="8" height="1" />
19
+ <rect x="23" y="5" rx="1" ry="1" width="15" height="1" />
20
+ <rect x="40" y="5" rx="1" ry="1" width="4" height="1" />
21
+
22
+ <rect x="13" y="7" rx="1" ry="1" width="10" height="1" />
23
+ <rect x="25" y="7" rx="1" ry="1" width="20" height="1" />
24
+
25
+ <rect x="7" y="10" rx="1" ry="1" width="14" height="1" />
26
+ <rect x="23" y="10" rx="1" ry="1" width="13" height="1" />
27
+ <rect x="38" y="10" rx="1" ry="1" width="8" height="1" />
28
+
29
+ <rect x="13" y="12" rx="1" ry="1" width="8" height="1" />
30
+ <rect x="23" y="12" rx="1" ry="1" width="15" height="1" />
31
+ <rect x="40" y="12" rx="1" ry="1" width="4" height="1" />
32
+
33
+ <rect x="13" y="14" rx="1" ry="1" width="10" height="1" />
34
+ <rect x="25" y="14" rx="1" ry="1" width="20" height="1" />
35
+
36
+ <rect x="7" y="17" rx="1" ry="1" width="14" height="1" />
37
+ <rect x="23" y="17" rx="1" ry="1" width="13" height="1" />
38
+ <rect x="38" y="17" rx="1" ry="1" width="8" height="1" />
39
+
40
+ <rect x="13" y="19" rx="1" ry="1" width="8" height="1" />
41
+ <rect x="23" y="19" rx="1" ry="1" width="15" height="1" />
42
+ <rect x="40" y="19" rx="1" ry="1" width="4" height="1" />
43
+
44
+ <rect x="7" y="22" rx="1" ry="1" width="14" height="1" />
45
+ <rect x="23" y="22" rx="1" ry="1" width="13" height="1" />
46
+ <rect x="38" y="22" rx="1" ry="1" width="8" height="1" />
47
+
48
+ <rect x="13" y="24" rx="1" ry="1" width="8" height="1" />
49
+ <rect x="23" y="24" rx="1" ry="1" width="15" height="1" />
50
+ <rect x="40" y="24" rx="1" ry="1" width="4" height="1" />
51
+
52
+ <rect x="1" y="26" rx="1" ry="1" width="14" height="1" />
53
+ <rect x="17" y="26" rx="1" ry="1" width="13" height="1" />
54
+ <rect x="32" y="26" rx="1" ry="1" width="8" height="1" />
55
+
56
+ <rect x="7" y="29" rx="1" ry="1" width="14" height="1" />
57
+ <rect x="23" y="29" rx="1" ry="1" width="13" height="1" />
58
+ <rect x="38" y="29" rx="1" ry="1" width="8" height="1" />
59
+
60
+ <rect x="13" y="31" rx="1" ry="1" width="8" height="1" />
61
+ <rect x="23" y="31" rx="1" ry="1" width="15" height="1" />
62
+ <rect x="40" y="31" rx="1" ry="1" width="4" height="1" />
63
+
64
+ <rect x="7" y="33" rx="1" ry="1" width="14" height="1" />
65
+ <rect x="23" y="33" rx="1" ry="1" width="13" height="1" />
66
+ <rect x="38" y="33" rx="1" ry="1" width="8" height="1" />
67
+
68
+ <rect x="13" y="35" rx="1" ry="1" width="8" height="1" />
69
+ <rect x="23" y="35" rx="1" ry="1" width="15" height="1" />
70
+ <rect x="40" y="35" rx="1" ry="1" width="4" height="1" />
71
+
72
+ <rect x="13" y="37" rx="1" ry="1" width="8" height="1" />
73
+ <rect x="23" y="37" rx="1" ry="1" width="15" height="1" />
74
+ <rect x="40" y="37" rx="1" ry="1" width="4" height="1" />
75
+
76
+ <rect x="1" y="39" rx="1" ry="1" width="14" height="1" />
77
+ <rect x="17" y="39" rx="1" ry="1" width="13" height="1" />
78
+ <rect x="32" y="39" rx="1" ry="1" width="8" height="1" />
79
+ </content-loader>
80
+ </div>
81
+ </template>
82
+
83
+ <script>
84
+ import { ContentLoader } from "vue-content-loader";
85
+
86
+ export default {
87
+ components: {
88
+ ContentLoader
89
+ },
90
+ props: {
91
+ primaryLoaderColor: {
92
+ type: String,
93
+ default: "#f5f7f9"
94
+ },
95
+ secondaryLoaderColor: {
96
+ type: String,
97
+ default: "#ecebeb"
98
+ }
99
+ }
100
+ };
101
+ </script>