@appscode/design-system 1.0.43-alpha.22 → 1.0.43-alpha.221

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 (134) 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 +286 -126
  4. package/base/utilities/_derived-variables.scss +6 -1
  5. package/base/utilities/_grid.scss +29 -0
  6. package/base/utilities/_initial-variables.scss +27 -17
  7. package/base/utilities/_mixin.scss +1 -17
  8. package/base/utilities/_typography.scss +18 -14
  9. package/base/utilities/dark-theme.scss +9 -145
  10. package/components/_ac-accordion.scss +14 -5
  11. package/components/_ac-alert-box.scss +41 -7
  12. package/components/_ac-card.scss +48 -10
  13. package/components/_ac-code-highlight.scss +5 -1
  14. package/components/_ac-content-layout.scss +2 -2
  15. package/components/_ac-drag.scss +2 -0
  16. package/components/_ac-input.scss +64 -23
  17. package/components/_ac-modal.scss +1 -1
  18. package/components/_ac-multi-select.scss +247 -9
  19. package/components/_ac-options.scss +24 -9
  20. package/components/_ac-select-box.scss +13 -3
  21. package/components/_ac-table.scss +15 -5
  22. package/components/_ac-tabs.scss +46 -5
  23. package/components/_ac-tags.scss +85 -0
  24. package/components/_ac-terminal.scss +270 -0
  25. package/components/_all.scss +28 -0
  26. package/components/_app-drawer.scss +2 -2
  27. package/components/_breadcumb.scss +2 -0
  28. package/components/_buttons.scss +50 -37
  29. package/components/_card-body-wrapper.scss +2 -2
  30. package/components/_dashboard-header.scss +32 -0
  31. package/components/_direct-deploy.scss +69 -0
  32. package/components/_go-to-top.scss +1 -1
  33. package/components/_graph.scss +45 -0
  34. package/components/_image-upload.scss +5 -3
  35. package/components/_left-sidebar-menu.scss +121 -69
  36. package/components/_monaco-editor.scss +1 -1
  37. package/components/_navbar.scss +170 -10
  38. package/components/_overview-info.scss +3 -3
  39. package/components/_pagination.scss +8 -0
  40. package/components/_payment-card.scss +10 -1
  41. package/components/_preview-modal.scss +18 -5
  42. package/components/_pricing-table.scss +1 -1
  43. package/components/_progress-bar.scss +4 -4
  44. package/components/_subscription-card.scss +11 -4
  45. package/components/_table-of-content.scss +1 -1
  46. package/components/_tfa.scss +69 -0
  47. package/components/_transitions.scss +261 -0
  48. package/components/_wizard.scss +16 -3
  49. package/components/bbum/_all.scss +9 -0
  50. package/components/bbum/_card-team.scss +1 -1
  51. package/components/bbum/_information-center.scss +15 -1
  52. package/components/bbum/_sign-up-notification.scss +1 -1
  53. package/components/bbum/_single-post-preview.scss +2 -2
  54. package/components/bbum/_user-profile.scss +2 -3
  55. package/components/ui-builder/_ui-builder.scss +76 -1
  56. package/components/ui-builder/_vue-open-api.scss +104 -0
  57. package/layouts/_all.scss +2 -0
  58. package/layouts/_code-preview.scss +5 -2
  59. package/main.scss +6 -54
  60. package/package.json +4 -7
  61. package/plugins/caching.ts +243 -0
  62. package/plugins/theme.js +4 -0
  63. package/plugins/time-convert.js +49 -0
  64. package/plugins/vue-toaster.js +3 -0
  65. package/vue-components/v2/banner/Banner.vue +2 -2
  66. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
  67. package/vue-components/v2/button/Button.vue +5 -0
  68. package/vue-components/v2/button/DownloadBtn.vue +45 -0
  69. package/vue-components/v2/card/Card.vue +1 -0
  70. package/vue-components/v2/card/PaymentCards.vue +11 -2
  71. package/vue-components/v2/content/ContentTable.vue +12 -7
  72. package/vue-components/v2/editor/Editor.vue +43 -24
  73. package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
  74. package/vue-components/v2/editor/MonacoEditor.vue +125 -0
  75. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
  76. package/vue-components/v2/form-fields/Input.vue +1 -1
  77. package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
  78. package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
  79. package/vue-components/v2/modal/Modal.vue +38 -4
  80. package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -0
  81. package/vue-components/v2/modals/JsonShowModal.vue +12 -2
  82. package/vue-components/v2/navbar/Appdrawer.vue +10 -9
  83. package/vue-components/v2/navbar/ThemeMode.vue +50 -44
  84. package/vue-components/v2/navbar/User.vue +229 -17
  85. package/vue-components/v2/notification/Notification.vue +101 -0
  86. package/vue-components/v2/notification/NotificationItem.vue +44 -0
  87. package/vue-components/v2/pagination/Pagination.vue +16 -3
  88. package/vue-components/v2/preloader/Preloader.vue +5 -5
  89. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  90. package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
  91. package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
  92. package/vue-components/v2/tab/TabItem.vue +1 -1
  93. package/vue-components/v2/table/Table.vue +44 -8
  94. package/vue-components/v2/table/TableRow.vue +12 -2
  95. package/vue-components/v2/table/table-cell/CellValue.vue +33 -4
  96. package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
  97. package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
  98. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  99. package/vue-components/v3/button/Button.vue +6 -1
  100. package/vue-components/v3/content/ContentHeader.vue +2 -1
  101. package/vue-components/v3/content/ContentTable.vue +20 -2
  102. package/vue-components/v3/editor/Editor.vue +42 -33
  103. package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
  104. package/vue-components/v3/editor/MonacoEditor.vue +131 -0
  105. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
  106. package/vue-components/v3/form/Form.vue +63 -0
  107. package/vue-components/v3/form-fields/Input.vue +11 -10
  108. package/vue-components/v3/header/HeaderItem.vue +5 -0
  109. package/vue-components/v3/header/HeaderItems.vue +5 -0
  110. package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
  111. package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
  112. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
  113. package/vue-components/v3/modal/Modal.vue +38 -6
  114. package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
  115. package/vue-components/v3/modals/JsonShowModal.vue +25 -16
  116. package/vue-components/v3/modals/LongRunningTasksModal.vue +337 -0
  117. package/vue-components/v3/navbar/Appdrawer.vue +12 -7
  118. package/vue-components/v3/navbar/ThemeMode.vue +49 -47
  119. package/vue-components/v3/navbar/User.vue +242 -18
  120. package/vue-components/v3/notification/Notification.vue +98 -0
  121. package/vue-components/v3/notification/NotificationItem.vue +52 -0
  122. package/vue-components/v3/pagination/Pagination.vue +16 -3
  123. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  124. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
  125. package/vue-components/v3/tab/TabItem.vue +1 -1
  126. package/vue-components/v3/table/MultiInfoTable.vue +143 -0
  127. package/vue-components/v3/table/Table.vue +47 -13
  128. package/vue-components/v3/table/TableContainer.vue +34 -0
  129. package/vue-components/v3/table/TableRow.vue +64 -3
  130. package/vue-components/v3/table/table-cell/CellValue.vue +28 -3
  131. package/vue-components/v3/table/table-cell/GenericCell.vue +75 -0
  132. package/vue-components/v3/table/table-cell/ObjectCell.vue +7 -2
  133. package/vue-components/v3/tabs/EditorTabs.vue +1 -1
  134. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
@@ -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,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>
@@ -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>
@@ -0,0 +1,43 @@
1
+ <template>
2
+ <div>
3
+ <content-loader
4
+ :width="100"
5
+ :height="175"
6
+ :speed="2"
7
+ :primaryColor="primaryLoaderColor"
8
+ :secondaryColor="secondaryLoaderColor"
9
+ >
10
+ <rect x="2" y="1" rx="3" ry="3" width="96" height="20" />
11
+ <rect x="15" y="23" rx="3" ry="3" width="83" height="15" />
12
+ <rect x="15" y="40" rx="3" ry="3" width="83" height="15" />
13
+ <rect x="15" y="57" rx="3" ry="3" width="83" height="15" />
14
+
15
+ <rect x="2" y="78" rx="3" ry="3" width="96" height="20" />
16
+ <rect x="15" y="100" rx="3" ry="3" width="83" height="15" />
17
+ <rect x="15" y="117" rx="3" ry="3" width="83" height="15" />
18
+ <rect x="15" y="134" rx="3" ry="3" width="83" height="15" />
19
+
20
+ <rect x="2" y="155" rx="3" ry="3" width="96" height="20" />
21
+ </content-loader>
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import { ContentLoader } from "vue-content-loader";
27
+
28
+ export default {
29
+ components: {
30
+ ContentLoader
31
+ },
32
+ props: {
33
+ primaryLoaderColor: {
34
+ type: String,
35
+ default: "#f5f7f9"
36
+ },
37
+ secondaryLoaderColor: {
38
+ type: String,
39
+ default: "#ecebeb"
40
+ }
41
+ }
42
+ };
43
+ </script>
@@ -6,7 +6,7 @@
6
6
  v-if="showModal"
7
7
  class="ac-modal is-middle-alignment"
8
8
  :class="modifierClasses"
9
- @click.self="destroyModal"
9
+ @click.self="onModalOutsideClick"
10
10
  >
11
11
  <div class="ac-modal-inner">
12
12
  <!-- modal header start -->
@@ -17,7 +17,11 @@
17
17
  <header-item>
18
18
  <ac-button
19
19
  modifier-classes="is-square is-transparent"
20
- :icon-image="require('@/assets/images/icons/close-icon.svg')"
20
+ :disabled="isCloseOptionDisabled"
21
+ :icon-image="
22
+ require('@appscode/design-system-images/icons/close-icon.svg')
23
+ "
24
+ data-testid="delete-confirmation-modal-close-icon"
21
25
  @click.stop="destroyModal"
22
26
  />
23
27
  </header-item>
@@ -26,7 +30,10 @@
26
30
  <!-- modal header end -->
27
31
 
28
32
  <!-- modal body start -->
29
- <div class="ac-modal-body">
33
+ <div
34
+ class="ac-modal-body ac-vscrollbar"
35
+ data-testid="ac-modal-content-with-scroll"
36
+ >
30
37
  <div class="ac-modal-content">
31
38
  <!-- freedom content start -->
32
39
  <slot />
@@ -36,7 +43,17 @@
36
43
  <!-- modal body end -->
37
44
 
38
45
  <!-- modal footer start -->
39
- <div class="ac-modal-footer action-footer">
46
+ <div
47
+ v-if="!hideActionFooter"
48
+ class="
49
+ ac-modal-footer
50
+ action-footer
51
+ is-flex is-align-items-center is-justify-content-space-between
52
+ "
53
+ >
54
+ <div>
55
+ <slot name="modal-footer-left" />
56
+ </div>
40
57
  <buttons class="has-text-right is-block">
41
58
  <slot name="modal-footer-controls" />
42
59
  </buttons>
@@ -62,6 +79,18 @@ export default {
62
79
  type: String,
63
80
  default: "",
64
81
  },
82
+ isCloseOptionDisabled: {
83
+ type: Boolean,
84
+ default: false,
85
+ },
86
+ ignoreOutsideClick: {
87
+ type: Boolean,
88
+ default: false,
89
+ },
90
+ hideActionFooter: {
91
+ type: Boolean,
92
+ default: false,
93
+ },
65
94
  },
66
95
 
67
96
  components: {
@@ -97,11 +126,16 @@ export default {
97
126
  this.destroyModal();
98
127
  }
99
128
  },
129
+ onModalOutsideClick() {
130
+ if (this.ignoreOutsideClick) return;
131
+ this.destroyModal();
132
+ },
100
133
  initializeModal() {
101
134
  this.showModal = true;
102
135
  document.addEventListener("keydown", this.onKeyDown);
103
136
  },
104
137
  destroyModal() {
138
+ if (this.isCloseOptionDisabled) return;
105
139
  this.showModal = false;
106
140
  document.removeEventListener("keydown", this.onKeyDown);
107
141
 
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <!-- modal start -->
3
+ <modal
4
+ :title="title"
5
+ modifier-classes="is-normal"
6
+ :open="open"
7
+ @closemodal="closeModal"
8
+ >
9
+ <!-- freedom content start -->
10
+ <div class="action-message pt-35 pb-35 has-text-centered">
11
+ <h5 class="is-message">{{ message }} {{ itemName ? "" : "?" }}</h5>
12
+ <p class="is-description">{{ itemName }} {{ itemName ? "?" : "" }}</p>
13
+ </div>
14
+
15
+ <!-- freedom content end -->
16
+
17
+ <!-- modal footer start -->
18
+ <template #modal-footer-controls>
19
+ <ac-button
20
+ @click.stop="closeModal"
21
+ title="Cancel"
22
+ modifier-classes="is-outlined"
23
+ data-testid="delete-confirmation-modal-close-button"
24
+ />
25
+ <ac-button
26
+ modifier-classes="is-danger"
27
+ :is-loader-active="isDeleteActive"
28
+ title="Yes"
29
+ data-testid="delete-confirmation-modal-confirm-button"
30
+ @click.stop="confirm(true)"
31
+ />
32
+ </template>
33
+ </modal>
34
+ <!-- modal end -->
35
+ </template>
36
+
37
+ <script>
38
+ export default {
39
+ components: {
40
+ Modal: () => import("./../modal/Modal.vue"),
41
+ AcButton: () => import("./../button/Button.vue"),
42
+ },
43
+ props: {
44
+ open: {
45
+ type: Boolean,
46
+ default: false,
47
+ },
48
+ title: {
49
+ type: String,
50
+ default: "",
51
+ },
52
+ message: {
53
+ type: String,
54
+ default: "",
55
+ },
56
+ itemName: {
57
+ type: String,
58
+ default: "",
59
+ },
60
+ isLoading: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ isDeleteActive: {
65
+ type: Boolean,
66
+ default: false,
67
+ },
68
+ },
69
+ methods: {
70
+ confirm(response) {
71
+ this.$emit("delete-confirmation-modal$confirm", response);
72
+ },
73
+ closeModal() {
74
+ this.confirm(false);
75
+ this.$emit("closemodal", true);
76
+ },
77
+ },
78
+ };
79
+ </script>
@@ -10,7 +10,9 @@
10
10
  <ac-button
11
11
  modifier-classes="is-square is-primary"
12
12
  icon-class="copy"
13
- v-clipboard:copy="`${editorTitle}: &quot;${editorContent}&quot;`"
13
+ v-clipboard:copy="
14
+ `${editorTitle}: ${JSON.stringify(parsedContent, null, 4)}`
15
+ "
14
16
  v-clipboard:success="onCopy"
15
17
  v-clipboard:error="onError"
16
18
  />
@@ -26,6 +28,8 @@
26
28
  </template>
27
29
 
28
30
  <script>
31
+ import Preloader from "../preloader/Preloader.vue";
32
+ import Banner from "../banner/Banner.vue";
29
33
  export default {
30
34
  props: {
31
35
  open: {
@@ -43,7 +47,13 @@ export default {
43
47
  },
44
48
  components: {
45
49
  Modal: () => import("../modal/Modal.vue"),
46
- Editor: () => import("../editor/Editor.vue"),
50
+ Editor: () => ({
51
+ component: import("../editor/Editor.vue"),
52
+ loading: Preloader,
53
+ delay: 200,
54
+ error: Banner,
55
+ timeout: 100000,
56
+ }),
47
57
  AcButton: () => import("../button/Button.vue"),
48
58
  HeaderItem: () => import("../header/HeaderItem.vue"),
49
59
  },