@appscode/design-system 1.0.43-alpha.14 → 1.0.43-alpha.142

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 (112) hide show
  1. package/base/utilities/_default.scss +283 -21
  2. package/base/utilities/_derived-variables.scss +0 -13
  3. package/base/utilities/_initial-variables.scss +78 -56
  4. package/base/utilities/_mixin.scss +10 -17
  5. package/base/utilities/_typography.scss +23 -7
  6. package/base/utilities/dark-theme.scss +25 -0
  7. package/components/_ac-accordion.scss +1 -0
  8. package/components/_ac-alert-box.scss +18 -10
  9. package/components/_ac-card.scss +55 -20
  10. package/components/_ac-code-highlight.scss +7 -1
  11. package/components/_ac-content-layout.scss +4 -4
  12. package/components/_ac-drag.scss +6 -6
  13. package/components/_ac-input.scss +74 -40
  14. package/components/_ac-modal.scss +5 -4
  15. package/components/_ac-multi-select.scss +195 -13
  16. package/components/_ac-options.scss +31 -16
  17. package/components/_ac-select-box.scss +15 -5
  18. package/components/_ac-table.scss +42 -36
  19. package/components/_ac-tabs.scss +72 -23
  20. package/components/_ac-tags.scss +2 -2
  21. package/components/_ac-terminal.scss +272 -0
  22. package/components/_app-drawer.scss +6 -6
  23. package/components/_breadcumb.scss +7 -2
  24. package/components/_buttons.scss +60 -27
  25. package/components/_card-body-wrapper.scss +3 -3
  26. package/components/_dashboard-header.scss +33 -1
  27. package/components/_direct-deploy.scss +69 -0
  28. package/components/_go-to-top.scss +1 -1
  29. package/components/_graph.scss +45 -0
  30. package/components/_image-upload.scss +6 -4
  31. package/components/_left-sidebar-menu.scss +200 -46
  32. package/components/_monaco-editor.scss +1 -1
  33. package/components/_navbar.scss +129 -26
  34. package/components/_overview-info.scss +4 -4
  35. package/components/_overview-page.scss +1 -2
  36. package/components/_pagination.scss +10 -2
  37. package/components/_payment-card.scss +28 -12
  38. package/components/_preview-modal.scss +19 -8
  39. package/components/_pricing-table.scss +1 -1
  40. package/components/_progress-bar.scss +5 -5
  41. package/components/_subscription-card.scss +15 -8
  42. package/components/_table-of-content.scss +1 -1
  43. package/components/_tfa.scss +69 -0
  44. package/components/_transitions.scss +261 -0
  45. package/components/_widget-menu.scss +9 -9
  46. package/components/_wizard.scss +31 -19
  47. package/components/ac-toaster/_ac-toasted.scss +5 -5
  48. package/components/bbum/_card-team.scss +18 -10
  49. package/components/bbum/_information-center.scss +17 -3
  50. package/components/bbum/_mobile-desktop.scss +6 -6
  51. package/components/bbum/_post.scss +5 -4
  52. package/components/bbum/_sign-up-notification.scss +6 -6
  53. package/components/bbum/_single-post-preview.scss +9 -9
  54. package/components/bbum/_user-profile.scss +97 -90
  55. package/components/ui-builder/_ui-builder.scss +29 -10
  56. package/components/ui-builder/_vue-open-api.scss +98 -0
  57. package/layouts/_404.scss +2 -1
  58. package/layouts/_code-preview.scss +14 -7
  59. package/main.scss +4 -0
  60. package/package.json +2 -7
  61. package/plugins/theme.js +4 -0
  62. package/vue-components/v2/banner/Banner.vue +2 -2
  63. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
  64. package/vue-components/v2/button/Button.vue +5 -0
  65. package/vue-components/v2/button/DownloadBtn.vue +45 -0
  66. package/vue-components/v2/card/PaymentCards.vue +11 -2
  67. package/vue-components/v2/content/ContentTable.vue +12 -7
  68. package/vue-components/v2/editor/Editor.vue +29 -1
  69. package/vue-components/v2/editor/FilteredFileEditor.vue +188 -0
  70. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
  71. package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
  72. package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
  73. package/vue-components/v2/modal/Modal.vue +33 -12
  74. package/vue-components/v2/modals/DeleteConfirmationModal.vue +77 -0
  75. package/vue-components/v2/modals/JsonShowModal.vue +12 -2
  76. package/vue-components/v2/navbar/Appdrawer.vue +10 -9
  77. package/vue-components/v2/navbar/ThemeMode.vue +120 -0
  78. package/vue-components/v2/navbar/User.vue +166 -15
  79. package/vue-components/v2/preloader/Preloader.vue +5 -5
  80. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  81. package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
  82. package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
  83. package/vue-components/v2/table/Table.vue +44 -8
  84. package/vue-components/v2/table/TableRow.vue +17 -8
  85. package/vue-components/v2/table/table-cell/CellValue.vue +31 -4
  86. package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
  87. package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
  88. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  89. package/vue-components/v3/button/Button.vue +5 -0
  90. package/vue-components/v3/content/ContentTable.vue +5 -0
  91. package/vue-components/v3/dropdown/DropdownMenu.vue +1 -1
  92. package/vue-components/v3/editor/Editor.vue +50 -30
  93. package/vue-components/v3/editor/FilteredFileEditor.vue +166 -0
  94. package/vue-components/v3/editor/MonacoEditor.vue +124 -0
  95. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +124 -0
  96. package/vue-components/v3/header/HeaderItem.vue +5 -0
  97. package/vue-components/v3/header/HeaderItems.vue +5 -0
  98. package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
  99. package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
  100. package/vue-components/v3/modal/Modal.vue +10 -1
  101. package/vue-components/v3/modals/JsonShowModal.vue +25 -16
  102. package/vue-components/v3/navbar/Appdrawer.vue +12 -7
  103. package/vue-components/v3/navbar/ThemeMode.vue +128 -0
  104. package/vue-components/v3/navbar/User.vue +166 -15
  105. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  106. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
  107. package/vue-components/v3/table/Table.vue +28 -5
  108. package/vue-components/v3/table/TableRow.vue +1 -1
  109. package/vue-components/v3/table/table-cell/CellValue.vue +26 -3
  110. package/vue-components/v3/table/table-cell/GenericCell.vue +62 -0
  111. package/vue-components/v3/table/table-cell/ObjectCell.vue +5 -1
  112. package/vue-components/v3/tabs/EditorTabs.vue +1 -1
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <ac-button
3
+ modifier-classes="is-primary is-square"
4
+ icon-class="download"
5
+ :is-loader-active="isFetching"
6
+ @click="download()"
7
+ />
8
+ </template>
9
+
10
+ <script>
11
+ import downloadFunc from "downloadjs";
12
+
13
+ export default {
14
+ components: {
15
+ AcButton: () => import("./../button/Button.vue")
16
+ },
17
+ props: {
18
+ fileData: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ fileName: {
23
+ type: String,
24
+ default: ""
25
+ },
26
+ isFetching: {
27
+ type: Boolean,
28
+ default: false
29
+ }
30
+ },
31
+ data() {
32
+ return {
33
+ downloadIcon: "fa fa-cloud-download"
34
+ };
35
+ },
36
+ component: {
37
+ downloadFunc
38
+ },
39
+ methods: {
40
+ download() {
41
+ downloadFunc(this.fileData, this.fileName);
42
+ }
43
+ }
44
+ };
45
+ </script>
@@ -5,8 +5,8 @@
5
5
  <content-loader
6
6
  :height="235"
7
7
  :speed="2"
8
- :primary-color="'#f3f3fa'"
9
- :secondary-color="'#ffffff'"
8
+ :primaryColor="primaryColor"
9
+ :secondaryColor="secondaryColor"
10
10
  />
11
11
  </div>
12
12
  <!-- loader end -->
@@ -20,6 +20,7 @@
20
20
  </template>
21
21
  <script>
22
22
  import { ContentLoader } from "vue-content-loader";
23
+ import {loaderLightThemePrimaryColor, loaderDarkThemePrimaryColor, loaderLightThemeSecondaryColor, loaderDarkThemeSecondaryColor} from "@appscode/design-system/plugins/theme";
23
24
 
24
25
  export default {
25
26
  components: {
@@ -31,5 +32,13 @@ export default {
31
32
  default: false,
32
33
  },
33
34
  },
35
+ computed: {
36
+ primaryColor() {
37
+ return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemePrimaryColor : loaderLightThemePrimaryColor;
38
+ },
39
+ secondaryColor() {
40
+ return document.documentElement.classList.contains("is-dark-theme") ? loaderDarkThemeSecondaryColor : loaderLightThemeSecondaryColor;
41
+ }
42
+ }
34
43
  };
35
44
  </script>
@@ -2,6 +2,7 @@
2
2
  <content-layout>
3
3
  <template #content-header>
4
4
  <content-header
5
+ v-if="!hideHeader"
5
6
  :header-title="tableTitle"
6
7
  :header-sub-title="tableSubTitle"
7
8
  :class="{ 'pl-0 pr-0': removeTableHeaderPadding }"
@@ -21,32 +22,36 @@ export default {
21
22
  props: {
22
23
  removeTableHeaderPadding: {
23
24
  type: Boolean,
24
- default: false,
25
+ default: false
25
26
  },
26
27
  tableTitle: {
27
28
  type: String,
28
- default: "Table",
29
+ default: "Table"
29
30
  },
30
31
  tableSubTitle: {
31
32
  type: String,
32
- default: "",
33
+ default: ""
33
34
  },
34
35
  searchable: {
35
36
  type: Boolean,
36
- default: true,
37
+ default: true
37
38
  },
39
+ hideHeader: {
40
+ type: Boolean,
41
+ default: false
42
+ }
38
43
  },
39
44
  components: {
40
45
  ContentLayout: () => import("./ContentLayout.vue"),
41
46
  ContentHeader: () => import("./ContentHeader.vue"),
42
47
  HeaderItem: () => import("../header/HeaderItem.vue"),
43
- SearchBar: () => import("../searchbars/SearchBar.vue"),
48
+ SearchBar: () => import("../searchbars/SearchBar.vue")
44
49
  },
45
50
 
46
51
  data() {
47
52
  return {
48
- searchText: "",
53
+ searchText: ""
49
54
  };
50
- },
55
+ }
51
56
  };
52
57
  </script>
@@ -17,7 +17,9 @@
17
17
  minimap: {
18
18
  enabled: calcShowMinimap,
19
19
  },
20
+ theme: theme,
20
21
  readOnly: readOnly,
22
+ wordWrap: wordWrap,
21
23
  scrollBeyondLastLine: false,
22
24
  }"
23
25
  />
@@ -31,7 +33,9 @@
31
33
  minimap: {
32
34
  enabled: calcShowMinimap,
33
35
  },
36
+ theme: theme,
34
37
  readOnly: true,
38
+ wordWrap: wordWrap,
35
39
  scrollBeyondLastLine: false,
36
40
  }"
37
41
  :original="originalEditorContent"
@@ -41,6 +45,8 @@
41
45
  </template>
42
46
 
43
47
  <script>
48
+ import Preloader from "../preloader/Preloader.vue";
49
+ import Banner from "../banner/Banner.vue";
44
50
  export default {
45
51
  props: {
46
52
  value: {
@@ -67,10 +73,24 @@ export default {
67
73
  type: Number,
68
74
  default: 40,
69
75
  },
76
+ editorTheme: {
77
+ type: String,
78
+ default: "",
79
+ },
80
+ wordWrap: {
81
+ type: String,
82
+ default: "off",
83
+ },
70
84
  },
71
85
  components: {
72
86
  EditorTabs: () => import("../tabs/EditorTabs.vue"),
73
- MonacoEditor: () => import("vue-monaco"),
87
+ MonacoEditor: () => ({
88
+ component: import("vue-monaco"),
89
+ loading: Preloader,
90
+ delay: 200,
91
+ error: Banner,
92
+ timeout: 20000,
93
+ }),
74
94
  },
75
95
 
76
96
  data() {
@@ -86,6 +106,14 @@ export default {
86
106
  const noOfLines = this.editorContent.split("\n").length;
87
107
  return this.showMinimap && noOfLines * 2 > this.editorHeight;
88
108
  },
109
+ theme() {
110
+ return (
111
+ this.editorTheme ||
112
+ (document.documentElement.classList.contains("is-dark-theme")
113
+ ? "vs-dark"
114
+ : "vs")
115
+ );
116
+ },
89
117
  },
90
118
 
91
119
  watch: {
@@ -0,0 +1,188 @@
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 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
+ >
17
+ <a @click.prevent="setActivePreview(previewYaml.uid)">
18
+ <span>
19
+ <img
20
+ src="~@appscode/design-system-images/icons/file-icon.svg"
21
+ alt=""
22
+ />
23
+ </span>
24
+ <span>{{ previewYaml.name }}</span>
25
+ </a>
26
+ </li>
27
+ </ul>
28
+ <sidebar-loader
29
+ v-else
30
+ :primaryLoaderColor="primaryLoaderColor"
31
+ :secondaryLoaderColor="secondaryLoaderColor"
32
+ />
33
+ </div>
34
+ </div>
35
+ <div class="right-content">
36
+ <div class="right-content">
37
+ <resource-loader
38
+ v-if="isPreviewLoading"
39
+ :primaryLoaderColor="primaryLoaderColor"
40
+ :secondaryLoaderColor="secondaryLoaderColor"
41
+ />
42
+ <editor
43
+ v-else-if="!isPreviewLoading && !hideValue"
44
+ v-model="activeFile.content"
45
+ :original-value="originalValue"
46
+ :language="activeFile.format"
47
+ :read-only="isEditorReadOnly"
48
+ :editor-height="editorHeight"
49
+ :show-minimap="showMinimap"
50
+ :editor-theme="editorTheme"
51
+ :key="editorTheme"
52
+ />
53
+ <span v-else> *************** </span>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </template>
60
+ <script>
61
+ import Preloader from "../preloader/Preloader.vue";
62
+ import Banner from "../banner/Banner.vue";
63
+ export default {
64
+ components: {
65
+ Editor: () => ({
66
+ component: import("./Editor.vue"),
67
+ loading: Preloader,
68
+ delay: 200,
69
+ error: Banner,
70
+ timeout: 20000
71
+ }),
72
+ ResourceLoader: () => import("./../loaders/ResourceLoader.vue"),
73
+ SidebarLoader: () => import("./../loaders/SidebarLoader.vue")
74
+ },
75
+ props: {
76
+ searchText: {
77
+ type: String,
78
+ default: ""
79
+ },
80
+ toggleHideValue: {
81
+ type: Boolean,
82
+ default: true
83
+ },
84
+ isPreviewLoading: {
85
+ type: Boolean,
86
+ default: false
87
+ },
88
+ isEditorReadOnly: {
89
+ type: Boolean,
90
+ default: false
91
+ },
92
+ previewYamls: {
93
+ type: Array,
94
+ default: () => {
95
+ [];
96
+ }
97
+ },
98
+ showMinimap: {
99
+ type: Boolean,
100
+ default: false
101
+ },
102
+ editorHeight: {
103
+ type: Number,
104
+ default: 60
105
+ },
106
+ loaderColor: {
107
+ type: Object,
108
+ default: () => {
109
+ return {};
110
+ }
111
+ },
112
+ theme: {
113
+ type: String,
114
+ default: "light"
115
+ }
116
+ },
117
+ data() {
118
+ return {
119
+ activeKey: "",
120
+ hideValue: ""
121
+ };
122
+ },
123
+ computed: {
124
+ activeFile() {
125
+ const activeFile = this.filteredYamls.find(
126
+ element => element.uid === this.activeKey
127
+ );
128
+ return activeFile || { content: "", format: "yaml" };
129
+ },
130
+ originalValue() {
131
+ const activeFile = this.filteredYamls.find(
132
+ element => element.uid === this.activeKey
133
+ );
134
+ return (activeFile && activeFile.initContent) || "";
135
+ },
136
+ editorTheme() {
137
+ return this.theme === "dark" ? "vs-dark" : "vs";
138
+ },
139
+ primaryLoaderColor() {
140
+ return this.loaderColor.primaryLoaderColor;
141
+ },
142
+ secondaryLoaderColor() {
143
+ return this.loaderColor.secondaryLoaderColor;
144
+ },
145
+ filteredYamls() {
146
+ if (this.searchText) {
147
+ return this.previewYamls.filter(
148
+ element => JSON.stringify(element).search(this.searchText) > -1
149
+ );
150
+ } else return this.previewYamls;
151
+ },
152
+ isKeyAvailable() {
153
+ const val = this.previewYamls.find(element => {
154
+ return element.uid === this.activeKey;
155
+ });
156
+ return val === undefined ? false : true;
157
+ }
158
+ },
159
+ methods: {
160
+ initActivePreview() {
161
+ if (!this.isKeyAvailable) {
162
+ this.activeKey = this.previewYamls[0].uid;
163
+ this.hideValue = this.activeFile.isSecret;
164
+ this.$emit("setActiveKey", this.activeKey);
165
+ }
166
+ },
167
+ setActivePreview(uid) {
168
+ this.activeKey = uid;
169
+ this.hideValue = this.activeFile.isSecret;
170
+ this.$emit("setActiveKey", this.activeKey);
171
+ }
172
+ },
173
+ watch: {
174
+ previewYamls: {
175
+ deep: true,
176
+ immediate: true,
177
+ handler(n) {
178
+ if (n.length) {
179
+ this.initActivePreview();
180
+ }
181
+ }
182
+ },
183
+ toggleHideValue(n) {
184
+ this.hideValue = n;
185
+ }
186
+ }
187
+ };
188
+ </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="pencil-square-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 && this.toggleHideValue === false) return str.content;
189
+ else return "";
190
+ },
191
+ encode(str) {
192
+ if (str && this.toggleHideValue === false) 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>
@@ -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>