@appscode/design-system 1.0.43-alpha.20 → 1.0.43-alpha.201

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 (127) hide show
  1. package/base/utilities/_all.scss +6 -0
  2. package/base/utilities/_default.scss +298 -57
  3. package/base/utilities/_derived-variables.scss +0 -1
  4. package/base/utilities/_initial-variables.scss +16 -10
  5. package/base/utilities/_mixin.scss +1 -17
  6. package/base/utilities/_typography.scss +12 -2
  7. package/base/utilities/dark-theme.scss +9 -147
  8. package/components/_ac-accordion.scss +8 -4
  9. package/components/_ac-alert-box.scss +13 -5
  10. package/components/_ac-card.scss +33 -6
  11. package/components/_ac-code-highlight.scss +5 -1
  12. package/components/_ac-content-layout.scss +2 -2
  13. package/components/_ac-input.scss +63 -23
  14. package/components/_ac-modal.scss +1 -1
  15. package/components/_ac-multi-select.scss +187 -5
  16. package/components/_ac-options.scss +24 -9
  17. package/components/_ac-select-box.scss +13 -3
  18. package/components/_ac-table.scss +7 -5
  19. package/components/_ac-tabs.scss +33 -5
  20. package/components/_ac-terminal.scss +270 -0
  21. package/components/_all.scss +35 -0
  22. package/components/_app-drawer.scss +2 -2
  23. package/components/_breadcumb.scss +2 -0
  24. package/components/_buttons.scss +46 -37
  25. package/components/_card-body-wrapper.scss +2 -2
  26. package/components/_dashboard-header.scss +32 -0
  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 +5 -3
  31. package/components/_left-sidebar-menu.scss +115 -64
  32. package/components/_monaco-editor.scss +1 -1
  33. package/components/_navbar.scss +125 -7
  34. package/components/_overview-info.scss +3 -3
  35. package/components/_pagination.scss +8 -0
  36. package/components/_payment-card.scss +10 -1
  37. package/components/_preview-modal.scss +18 -5
  38. package/components/_pricing-table.scss +1 -1
  39. package/components/_progress-bar.scss +4 -4
  40. package/components/_subscription-card.scss +11 -4
  41. package/components/_table-of-content.scss +1 -1
  42. package/components/_tfa.scss +69 -0
  43. package/components/_transitions.scss +261 -0
  44. package/components/_wizard.scss +16 -3
  45. package/components/bbum/_card-team.scss +1 -1
  46. package/components/bbum/_information-center.scss +15 -1
  47. package/components/bbum/_sign-up-notification.scss +1 -1
  48. package/components/bbum/_single-post-preview.scss +1 -1
  49. package/components/bbum/_user-profile.scss +2 -3
  50. package/components/ui-builder/_ui-builder.scss +43 -3
  51. package/components/ui-builder/_vue-open-api.scss +104 -0
  52. package/layouts/_all.scss +2 -0
  53. package/layouts/_code-preview.scss +5 -2
  54. package/main.scss +4 -54
  55. package/package.json +2 -7
  56. package/plugins/theme.js +4 -0
  57. package/plugins/time-convert.js +49 -0
  58. package/plugins/vue-toaster.js +3 -0
  59. package/vue-components/v2/banner/Banner.vue +2 -2
  60. package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
  61. package/vue-components/v2/button/Button.vue +5 -0
  62. package/vue-components/v2/button/DownloadBtn.vue +45 -0
  63. package/vue-components/v2/card/Card.vue +1 -0
  64. package/vue-components/v2/card/PaymentCards.vue +11 -2
  65. package/vue-components/v2/content/ContentTable.vue +12 -7
  66. package/vue-components/v2/editor/Editor.vue +38 -5
  67. package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
  68. package/vue-components/v2/editor/MonacoEditor.vue +125 -0
  69. package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
  70. package/vue-components/v2/form-fields/Input.vue +1 -1
  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 +38 -4
  74. package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -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 +50 -44
  78. package/vue-components/v2/navbar/User.vue +229 -17
  79. package/vue-components/v2/notification/Notification.vue +101 -0
  80. package/vue-components/v2/notification/NotificationItem.vue +44 -0
  81. package/vue-components/v2/pagination/Pagination.vue +16 -3
  82. package/vue-components/v2/preloader/Preloader.vue +5 -5
  83. package/vue-components/v2/sidebar/ClusterSwitcher.vue +126 -0
  84. package/vue-components/v2/sidebar/SidebarItem.vue +23 -1
  85. package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
  86. package/vue-components/v2/tab/TabItem.vue +1 -1
  87. package/vue-components/v2/table/Table.vue +44 -8
  88. package/vue-components/v2/table/TableRow.vue +12 -2
  89. package/vue-components/v2/table/table-cell/CellValue.vue +33 -4
  90. package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
  91. package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
  92. package/vue-components/v2/tabs/EditorTabs.vue +1 -1
  93. package/vue-components/v3/button/Button.vue +5 -0
  94. package/vue-components/v3/content/ContentTable.vue +5 -0
  95. package/vue-components/v3/editor/Editor.vue +36 -13
  96. package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
  97. package/vue-components/v3/editor/MonacoEditor.vue +131 -0
  98. package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
  99. package/vue-components/v3/form/Form.vue +63 -0
  100. package/vue-components/v3/form-fields/Input.vue +11 -10
  101. package/vue-components/v3/header/HeaderItem.vue +5 -0
  102. package/vue-components/v3/header/HeaderItems.vue +5 -0
  103. package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
  104. package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
  105. package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
  106. package/vue-components/v3/modal/Modal.vue +35 -3
  107. package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
  108. package/vue-components/v3/modals/JsonShowModal.vue +25 -16
  109. package/vue-components/v3/modals/LongRunningTasksModal.vue +337 -0
  110. package/vue-components/v3/navbar/Appdrawer.vue +12 -7
  111. package/vue-components/v3/navbar/ThemeMode.vue +49 -47
  112. package/vue-components/v3/navbar/User.vue +242 -18
  113. package/vue-components/v3/notification/Notification.vue +98 -0
  114. package/vue-components/v3/notification/NotificationItem.vue +52 -0
  115. package/vue-components/v3/pagination/Pagination.vue +16 -3
  116. package/vue-components/v3/sidebar/ClusterSwitcher.vue +133 -0
  117. package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
  118. package/vue-components/v3/tab/TabItem.vue +1 -1
  119. package/vue-components/v3/table/MultiInfoTable.vue +143 -0
  120. package/vue-components/v3/table/Table.vue +35 -12
  121. package/vue-components/v3/table/TableContainer.vue +34 -0
  122. package/vue-components/v3/table/TableRow.vue +16 -2
  123. package/vue-components/v3/table/table-cell/CellValue.vue +28 -3
  124. package/vue-components/v3/table/table-cell/GenericCell.vue +62 -0
  125. package/vue-components/v3/table/table-cell/ObjectCell.vue +5 -1
  126. package/vue-components/v3/tabs/EditorTabs.vue +1 -1
  127. package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <div class="form-wrapper">
3
+ <div
4
+ :class="{
5
+ 'pt-20': !reducePaddingTop,
6
+ 'pt-10': reducePaddingTop,
7
+ 'pl-20': !isContainer,
8
+ 'form-content': !isContainer,
9
+ container: isContainer,
10
+ }"
11
+ >
12
+ <slot />
13
+ </div>
14
+ <div
15
+ class="form-footer b-t-1 pt-10 pb-10 pl-20 pr-20 mt-15"
16
+ v-if="hasFooter"
17
+ >
18
+ <div
19
+ class="ac-vcentered"
20
+ :class="{
21
+ 'form-content': !isContainer,
22
+ container: isContainer,
23
+ }"
24
+ >
25
+ <form-footer-controls>
26
+ <slot name="form-left-controls" />
27
+ </form-footer-controls>
28
+ <form-footer-controls>
29
+ <slot name="form-right-controls" />
30
+ </form-footer-controls>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+ import { defineComponent, defineAsyncComponent, h } from "vue";
38
+
39
+ export default defineComponent({
40
+ props: {
41
+ isContainer: {
42
+ type: Boolean,
43
+ default: false,
44
+ },
45
+ hasFooter: {
46
+ type: Boolean,
47
+ default: true,
48
+ },
49
+ reducePaddingTop: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ },
54
+
55
+ components: {
56
+ FormFooterControls: defineAsyncComponent(() =>
57
+ import("../../v2/form/FormFooterControl.vue").then(
58
+ (module) => module.default
59
+ )
60
+ ),
61
+ },
62
+ });
63
+ </script>
@@ -1,21 +1,22 @@
1
1
  <template>
2
- <input class="ac-input" v-bind="inputListeners" />
2
+ <input
3
+ class="ac-input"
4
+ data-testid="ac-input"
5
+ :value="modelValue"
6
+ @input="$emit('update:modelValue', $event.target.value)"
7
+ />
3
8
  </template>
4
9
 
5
10
  <script>
6
11
  import { defineComponent } from "vue";
7
12
 
8
13
  export default defineComponent({
9
- inheritAttrs: false,
10
- emits: ["update:modelValue"],
11
- computed: {
12
- inputListeners() {
13
- return Object.assign({}, this.$attrs, {
14
- onInput: (event) => {
15
- this.$emit("update:modelValue", event.target.value);
16
- },
17
- });
14
+ props: {
15
+ modelValue: {
16
+ type: null,
17
+ default: "",
18
18
  },
19
19
  },
20
+ emits: ["update:modelValue"],
20
21
  });
21
22
  </script>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="header-item">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="header-items is-flex is-align-items-center">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div>
3
+ <content-loader>
4
+ <rect x="21" y="6" rx="3" ry="3" width="42" height="3" />
5
+ <rect x="69" y="6" rx="3" ry="3" width="39" height="3" />
6
+ <rect x="114" y="6" rx="3" ry="3" width="24" height="3" />
7
+
8
+ <rect x="39" y="12" rx="3" ry="3" width="24" height="3" />
9
+ <rect x="69" y="12" rx="3" ry="3" width="45" height="3" />
10
+ <rect x="120" y="12" rx="3" ry="3" width="12" height="3" />
11
+
12
+ <rect x="39" y="18" rx="3" ry="3" width="30" height="3" />
13
+ <rect x="75" y="18" rx="3" ry="3" width="60" height="3" />
14
+
15
+ <rect x="21" y="27" rx="3" ry="3" width="42" height="3" />
16
+ <rect x="69" y="27" rx="3" ry="3" width="39" height="3" />
17
+ <rect x="114" y="27" rx="3" ry="3" width="24" height="3" />
18
+
19
+ <rect x="39" y="33" rx="3" ry="3" width="24" height="3" />
20
+ <rect x="69" y="33" rx="3" ry="3" width="45" height="3" />
21
+ <rect x="120" y="33" rx="3" ry="3" width="12" height="3" />
22
+
23
+ <rect x="39" y="39" rx="3" ry="3" width="30" height="3" />
24
+ <rect x="75" y="39" rx="3" ry="3" width="60" height="3" />
25
+
26
+ <rect x="21" y="48" rx="3" ry="3" width="42" height="3" />
27
+ <rect x="69" y="48" rx="3" ry="3" width="39" height="3" />
28
+ <rect x="114" y="48" rx="3" ry="3" width="24" height="3" />
29
+
30
+ <rect x="39" y="54" rx="3" ry="3" width="24" height="3" />
31
+ <rect x="69" y="54" rx="3" ry="3" width="45" height="3" />
32
+ <rect x="120" y="54" rx="3" ry="3" width="12" height="3" />
33
+
34
+ <rect x="39" y="60" rx="3" ry="3" width="30" height="3" />
35
+ <rect x="75" y="60" rx="3" ry="3" width="60" height="3" />
36
+
37
+ <rect x="21" y="69" rx="3" ry="3" width="42" height="3" />
38
+ <rect x="69" y="69" rx="3" ry="3" width="39" height="3" />
39
+ <rect x="114" y="69" rx="3" ry="3" width="24" height="3" />
40
+
41
+ <rect x="39" y="75" rx="3" ry="3" width="24" height="3" />
42
+ <rect x="69" y="75" rx="3" ry="3" width="45" height="3" />
43
+ <rect x="120" y="75" rx="3" ry="3" width="12" height="3" />
44
+
45
+ <rect x="39" y="81" rx="3" ry="3" width="30" height="3" />
46
+ <rect x="75" y="81" rx="3" ry="3" width="60" height="3" />
47
+
48
+ <rect x="21" y="90" rx="3" ry="3" width="42" height="3" />
49
+ <rect x="69" y="90" rx="3" ry="3" width="39" height="3" />
50
+ <rect x="114" y="90" rx="3" ry="3" width="24" height="3" />
51
+
52
+ <rect x="39" y="96" rx="3" ry="3" width="24" height="3" />
53
+ <rect x="69" y="96" rx="3" ry="3" width="45" height="3" />
54
+ <rect x="120" y="96" rx="3" ry="3" width="12" height="3" />
55
+
56
+ <rect x="39" y="102" rx="3" ry="3" width="30" height="3" />
57
+ <rect x="75" y="102" rx="3" ry="3" width="60" height="3" />
58
+
59
+ <rect x="21" y="111" rx="3" ry="3" width="42" height="3" />
60
+ <rect x="69" y="111" rx="3" ry="3" width="39" height="3" />
61
+ <rect x="114" y="111" rx="3" ry="3" width="24" height="3" />
62
+
63
+ <rect x="39" y="117" rx="3" ry="3" width="24" height="3" />
64
+ <rect x="69" y="117" rx="3" ry="3" width="45" height="3" />
65
+ <rect x="120" y="117" rx="3" ry="3" width="12" height="3" />
66
+
67
+ <rect x="39" y="123" rx="3" ry="3" width="30" height="3" />
68
+ <rect x="75" y="123" rx="3" ry="3" width="60" height="3" />
69
+ </content-loader>
70
+ </div>
71
+ </template>
72
+
73
+ <script>
74
+ import { defineAsyncComponent, defineComponent } from 'vue'
75
+ export default defineComponent({
76
+ name: 'LoaderElement',
77
+ components: {
78
+ ContentLoader: defineAsyncComponent(() =>
79
+ import('vue-content-loader').then((module) => module.ContentLoader)
80
+ ),
81
+ },
82
+ })
83
+ </script>
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <div>
3
+ <content-loader :width="200" :height="350" :speed="2">
4
+ <rect x="0" y="24" rx="3" ry="3" width="200" height="20" />
5
+ <rect x="20" y="49" rx="3" ry="3" width="200" height="20" />
6
+ <rect x="20" y="74" rx="3" ry="3" width="200" height="20" />
7
+ <rect x="20" y="124" rx="3" ry="3" width="200" height="20" />
8
+
9
+ <rect x="0" y="149" rx="3" ry="3" width="200" height="20" />
10
+ <rect x="20" y="174" rx="3" ry="3" width="200" height="20" />
11
+ <rect x="20" y="199" rx="3" ry="3" width="200" height="20" />
12
+ <rect x="20" y="249" rx="3" ry="3" width="200" height="20" />
13
+
14
+ <rect x="0" y="274" rx="3" ry="3" width="200" height="20" />
15
+ <rect x="20" y="299" rx="3" ry="3" width="200" height="20" />
16
+ <rect x="20" y="324" rx="3" ry="3" width="200" height="20" />
17
+ <rect x="20" y="349" rx="3" ry="3" width="200" height="20" />
18
+
19
+ <rect x="0" y="374" rx="3" ry="3" width="200" height="20" />
20
+ </content-loader>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import { defineAsyncComponent, defineComponent } from 'vue'
26
+ export default defineComponent({
27
+ name: 'LoaderElement',
28
+ components: {
29
+ ContentLoader: defineAsyncComponent(() =>
30
+ import('vue-content-loader').then((module) => module.ContentLoader)
31
+ ),
32
+ },
33
+ })
34
+ </script>
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <span href="" class="task-item" :class="[statusClass]">
3
+ <i class="fa" :class="`fa-${statusIcon}`" />
4
+ {{ title }}
5
+ </span>
6
+ </template>
7
+
8
+ <script setup lang="ts">
9
+ import { computed, toRefs } from "vue";
10
+ import { TaskStatus } from "../../../typings/long-running-tasks.ts";
11
+
12
+ const props = withDefaults(
13
+ defineProps<{ title: string; status: TaskStatus }>(),
14
+ {
15
+ title: "",
16
+ status: "Pending",
17
+ }
18
+ );
19
+
20
+ const { status } = toRefs(props);
21
+ const statusClass = computed(() => `is-${status.value.toLowerCase()}`);
22
+ const statusIcon = computed(() => {
23
+ if (status.value === "Running" || status.value === "Started")
24
+ return "circle-o-notch";
25
+ else if (status.value === "Success") return "check-circle";
26
+ else if (status.value === "Failed") return "times-circle";
27
+ else return "spinner";
28
+ });
29
+ </script>
30
+
31
+ <style scoped lang="scss">
32
+ .task-item {
33
+ font-size: 14px;
34
+ display: block;
35
+ padding: 5px;
36
+ border-radius: 5px;
37
+ transition: all 0.3s ease-in-out;
38
+ &:hover {
39
+ background-color: var(--ac-white-light);
40
+ cursor: pointer;
41
+ }
42
+ &.is-active {
43
+ background-color: var(--ac-white-light);
44
+ }
45
+ &.is-pending {
46
+ color: var(--ac-gray-light);
47
+ i {
48
+ visibility: hidden;
49
+ }
50
+ &:hover {
51
+ background-color: transparent;
52
+ cursor: not-allowed;
53
+ }
54
+ }
55
+ &.is-aborted {
56
+ color: var(--ac-gray-light);
57
+ &:hover {
58
+ background-color: transparent;
59
+ cursor: not-allowed;
60
+ }
61
+ }
62
+ &.is-running,
63
+ &.is-started {
64
+ i {
65
+ color: var(--ac-primary);
66
+ animation-name: spin;
67
+ animation-duration: 1000ms;
68
+ animation-iteration-count: infinite;
69
+ animation-timing-function: linear;
70
+ }
71
+
72
+ @keyframes spin {
73
+ from {
74
+ transform: rotate(0deg);
75
+ }
76
+ to {
77
+ transform: rotate(360deg);
78
+ }
79
+ }
80
+ }
81
+ &.is-success {
82
+ i {
83
+ color: #158748;
84
+ }
85
+ }
86
+ &.is-failed {
87
+ i {
88
+ color: #ff3729;
89
+ }
90
+ }
91
+ }
92
+ </style>
@@ -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,8 +17,10 @@
17
17
  <header-item>
18
18
  <ac-button
19
19
  modifier-classes="is-square is-transparent"
20
+ :disabled="isCloseOptionDisabled"
20
21
  :icon-image="crossIcon"
21
22
  @click.stop="destroyModal"
23
+ data-testid="modal-generic-close-icon"
22
24
  />
23
25
  </header-item>
24
26
  </header-items>
@@ -26,7 +28,10 @@
26
28
  <!-- modal header end -->
27
29
 
28
30
  <!-- modal body start -->
29
- <div class="ac-modal-body">
31
+ <div
32
+ class="ac-modal-body ac-vscrollbar"
33
+ data-testid="ac-modal-content-with-scroll"
34
+ >
30
35
  <div class="ac-modal-content">
31
36
  <!-- freedom content start -->
32
37
  <slot />
@@ -36,7 +41,17 @@
36
41
  <!-- modal body end -->
37
42
 
38
43
  <!-- modal footer start -->
39
- <div class="ac-modal-footer action-footer">
44
+ <div
45
+ v-if="!hideActionFooter"
46
+ class="
47
+ ac-modal-footer
48
+ action-footer
49
+ is-flex is-align-items-center is-justify-content-space-between
50
+ "
51
+ >
52
+ <div>
53
+ <slot name="modal-footer-left" />
54
+ </div>
40
55
  <buttons class="has-text-right is-block">
41
56
  <slot name="modal-footer-controls" />
42
57
  </buttons>
@@ -64,6 +79,18 @@ export default defineComponent({
64
79
  type: String,
65
80
  default: "",
66
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
+ },
67
94
  },
68
95
  emits: ["closemodal"],
69
96
 
@@ -115,7 +142,12 @@ export default defineComponent({
115
142
  this.showModal = true;
116
143
  document.addEventListener("keydown", this.onKeyDown);
117
144
  },
145
+ onModalOutsideClick() {
146
+ if (this.ignoreOutsideClick) return;
147
+ this.destroyModal();
148
+ },
118
149
  destroyModal() {
150
+ if (this.isCloseOptionDisabled) return;
119
151
  this.showModal = false;
120
152
  document.removeEventListener("keydown", this.onKeyDown);
121
153
 
@@ -0,0 +1,85 @@
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
+ @click.stop="confirm(true)"
30
+ data-testid="delete-confirmation-modal-confirm-button"
31
+ />
32
+ </template>
33
+ </modal>
34
+ <!-- modal end -->
35
+ </template>
36
+
37
+ <script>
38
+ import { defineComponent, defineAsyncComponent } from "vue";
39
+ export default defineComponent({
40
+ components: {
41
+ Modal: defineAsyncComponent(() =>
42
+ import("../modal/Modal.vue").then((module) => module.default)
43
+ ),
44
+ AcButton: defineAsyncComponent(() =>
45
+ import("../button/Button.vue").then((module) => module.default)
46
+ ),
47
+ },
48
+ props: {
49
+ open: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ title: {
54
+ type: String,
55
+ default: "",
56
+ },
57
+ message: {
58
+ type: String,
59
+ default: "",
60
+ },
61
+ itemName: {
62
+ type: String,
63
+ default: "",
64
+ },
65
+ isLoading: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ isDeleteActive: {
70
+ type: Boolean,
71
+ default: false,
72
+ },
73
+ },
74
+ emits: ["closemodal", "delete-confirmation-modal$confirm"],
75
+ methods: {
76
+ confirm(response) {
77
+ this.$emit("delete-confirmation-modal$confirm", response);
78
+ },
79
+ closeModal() {
80
+ this.confirm(false);
81
+ this.$emit("closemodal", true);
82
+ },
83
+ },
84
+ });
85
+ </script>
@@ -10,14 +10,16 @@
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
  />
17
19
  </header-item>
18
20
  </template>
19
21
  <editor
20
- :value="JSON.stringify(parsedContent, null, 4)"
22
+ :model-value="JSON.stringify(parsedContent, null, 4)"
21
23
  :read-only="true"
22
24
  language="json"
23
25
  :show-minimap="false"
@@ -28,36 +30,43 @@
28
30
  <script>
29
31
  import { defineComponent, defineAsyncComponent } from "vue";
30
32
  import { useToast } from "vue-toastification";
33
+ import Preloader from "../../v2/preloader/Preloader.vue";
34
+ import Banner from "../../v2/banner/Banner.vue";
31
35
 
32
36
  export default defineComponent({
33
37
  props: {
34
38
  open: {
35
39
  type: Boolean,
36
- default: false,
40
+ default: false
37
41
  },
38
42
  editorTitle: {
39
43
  type: String,
40
- default: "",
44
+ default: ""
41
45
  },
42
46
  editorContent: {
43
47
  type: null,
44
- default: () => ({}),
45
- },
48
+ default: () => ({})
49
+ }
46
50
  },
47
51
  emits: ["closemodal"],
48
52
  components: {
49
53
  Modal: defineAsyncComponent(() =>
50
- import("../modal/Modal.vue").then((module) => module.default)
51
- ),
52
- Editor: defineAsyncComponent(() =>
53
- import("../editor/Editor.vue").then((module) => module.default)
54
+ import("../modal/Modal.vue").then(module => module.default)
54
55
  ),
56
+ Editor: defineAsyncComponent({
57
+ loader: () =>
58
+ import("../editor/Editor.vue").then(module => module.default),
59
+ loadingComponent: Preloader,
60
+ delay: 200,
61
+ errorComponent: Banner,
62
+ timeout: 100000,
63
+ }),
55
64
  AcButton: defineAsyncComponent(() =>
56
- import("../button/Button.vue").then((module) => module.default)
65
+ import("../button/Button.vue").then(module => module.default)
57
66
  ),
58
67
  HeaderItem: defineAsyncComponent(() =>
59
- import("../../v2/header/HeaderItem.vue").then((module) => module.default)
60
- ),
68
+ import("../../v2/header/HeaderItem.vue").then(module => module.default)
69
+ )
61
70
  },
62
71
  computed: {
63
72
  parsedContent() {
@@ -66,7 +75,7 @@ export default defineComponent({
66
75
  } catch (e) {
67
76
  return this.editorContent;
68
77
  }
69
- },
78
+ }
70
79
  },
71
80
  setup() {
72
81
  const toast = useToast();
@@ -81,7 +90,7 @@ export default defineComponent({
81
90
  },
82
91
  closeModal() {
83
92
  this.$emit("closemodal", true);
84
- },
85
- },
93
+ }
94
+ }
86
95
  });
87
96
  </script>