@appscode/design-system 1.0.43-alpha.99 → 1.1.0-alpha.10
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.
- package/base/utilities/_all.scss +8 -0
- package/base/utilities/_customize-bulma.scss +191 -0
- package/base/utilities/_default.scss +58 -124
- package/base/utilities/_derived-variables.scss +6 -0
- package/base/utilities/_extended.scss +38 -0
- package/base/utilities/_grid.scss +29 -0
- package/base/utilities/_initial-variables.scss +14 -10
- package/base/utilities/_typography.scss +6 -12
- package/base/utilities/dark-theme.scss +1 -0
- package/components/_ac-accordion.scss +14 -5
- package/components/_ac-alert-box.scss +32 -6
- package/components/_ac-card.scss +17 -5
- package/components/_ac-drag.scss +2 -0
- package/components/_ac-input.scss +19 -11
- package/components/_ac-modal.scss +1 -1
- package/components/_ac-multi-select.scss +60 -4
- package/components/_ac-report.scss +53 -0
- package/components/_ac-table.scss +60 -2
- package/components/_ac-tabs.scss +16 -2
- package/components/_ac-tags.scss +85 -0
- package/components/_ac-terminal.scss +1 -3
- package/components/_all.scss +29 -0
- package/components/_basic-card.scss +128 -0
- package/components/_buttons.scss +14 -33
- package/components/_dashboard-header.scss +32 -0
- package/components/_left-sidebar-menu.scss +9 -9
- package/components/_navbar.scss +89 -4
- package/components/_preview-modal.scss +14 -1
- package/components/_transitions.scss +296 -0
- package/components/_wizard.scss +1 -0
- package/components/bbum/_all.scss +9 -0
- package/components/bbum/_single-post-preview.scss +1 -1
- package/components/ui-builder/_ui-builder.scss +65 -1
- package/components/ui-builder/_vue-open-api.scss +6 -0
- package/layouts/_all.scss +2 -0
- package/layouts/_code-preview.scss +5 -2
- package/main.scss +5 -56
- package/package.json +4 -2
- package/plugins/caching.ts +243 -0
- package/plugins/time-convert.js +49 -0
- package/plugins/vue-toaster.js +3 -0
- package/vue-components/v2/banner/Banner.vue +2 -2
- package/vue-components/v2/breadcrumbs/Breadcrumb.vue +97 -0
- package/vue-components/v2/button/Button.vue +5 -0
- package/vue-components/v2/button/DownloadBtn.vue +45 -0
- package/vue-components/v2/card/Card.vue +1 -0
- package/vue-components/v2/content/ContentTable.vue +10 -0
- package/vue-components/v2/editor/Editor.vue +37 -24
- package/vue-components/v2/editor/FilteredFileEditor.vue +189 -0
- package/vue-components/v2/editor/MonacoEditor.vue +125 -0
- package/vue-components/v2/editor/ResourceKeyValueEditor.vue +209 -0
- package/vue-components/v2/form-fields/Input.vue +1 -1
- package/vue-components/v2/loaders/ResourceLoader.vue +101 -0
- package/vue-components/v2/loaders/SidebarLoader.vue +43 -0
- package/vue-components/v2/modal/Modal.vue +31 -5
- package/vue-components/v2/modals/DeleteConfirmationModal.vue +79 -0
- package/vue-components/v2/modals/JsonShowModal.vue +12 -2
- package/vue-components/v2/navbar/User.vue +229 -17
- package/vue-components/v2/notification/Notification.vue +101 -0
- package/vue-components/v2/notification/NotificationItem.vue +44 -0
- package/vue-components/v2/pagination/Pagination.vue +16 -3
- package/vue-components/v2/preloader/Preloader.vue +1 -1
- package/vue-components/v2/sidebar/SidebarItemWithDropDown.vue +19 -20
- package/vue-components/v2/tab/TabItem.vue +1 -1
- package/vue-components/v2/table/Table.vue +49 -8
- package/vue-components/v2/table/TableRow.vue +12 -2
- package/vue-components/v2/table/table-cell/CellValue.vue +29 -9
- package/vue-components/v2/table/table-cell/GenericCell.vue +56 -0
- package/vue-components/v2/table/table-cell/ObjectCell.vue +4 -1
- package/vue-components/v3/button/Button.vue +6 -1
- package/vue-components/v3/content/ContentHeader.vue +2 -1
- package/vue-components/v3/content/ContentTable.vue +25 -2
- package/vue-components/v3/editor/Editor.vue +36 -33
- package/vue-components/v3/editor/FilteredFileEditor.vue +186 -0
- package/vue-components/v3/editor/MonacoEditor.vue +131 -0
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +125 -0
- package/vue-components/v3/form/Form.vue +63 -0
- package/vue-components/v3/form-fields/Input.vue +11 -10
- package/vue-components/v3/header/HeaderItem.vue +5 -0
- package/vue-components/v3/header/HeaderItems.vue +5 -0
- package/vue-components/v3/loaders/ResourceLoader.vue +83 -0
- package/vue-components/v3/loaders/SidebarLoader.vue +34 -0
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +92 -0
- package/vue-components/v3/modal/Modal.vue +35 -7
- package/vue-components/v3/modals/DeleteConfirmationModal.vue +85 -0
- package/vue-components/v3/modals/JsonShowModal.vue +25 -16
- package/vue-components/v3/modals/LongRunningTasksModal.vue +400 -0
- package/vue-components/v3/navbar/ThemeMode.vue +41 -49
- package/vue-components/v3/navbar/User.vue +242 -18
- package/vue-components/v3/notification/AlertBox.vue +61 -0
- package/vue-components/v3/notification/Notification.vue +98 -0
- package/vue-components/v3/notification/NotificationItem.vue +52 -0
- package/vue-components/v3/pagination/Pagination.vue +16 -3
- package/vue-components/v3/sidebar/SidebarItemWithDropDown.vue +120 -0
- package/vue-components/v3/tab/TabItem.vue +1 -1
- package/vue-components/v3/table/MultiInfoTable.vue +143 -0
- package/vue-components/v3/table/Table.vue +55 -14
- package/vue-components/v3/table/TableContainer.vue +34 -0
- package/vue-components/v3/table/TableRow.vue +93 -6
- package/vue-components/v3/table/table-cell/CellValue.vue +23 -7
- package/vue-components/v3/table/table-cell/GenericCell.vue +75 -0
- package/vue-components/v3/table/table-cell/ObjectCell.vue +7 -2
- package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +148 -0
|
@@ -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="
|
|
9
|
+
@click.self="onModalOutsideClick"
|
|
10
10
|
>
|
|
11
11
|
<div class="ac-modal-inner">
|
|
12
12
|
<!-- modal header start -->
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:disabled="isCloseOptionDisabled"
|
|
21
21
|
:icon-image="crossIcon"
|
|
22
22
|
@click.stop="destroyModal"
|
|
23
|
+
data-testid="modal-generic-close-icon"
|
|
23
24
|
/>
|
|
24
25
|
</header-item>
|
|
25
26
|
</header-items>
|
|
@@ -27,7 +28,11 @@
|
|
|
27
28
|
<!-- modal header end -->
|
|
28
29
|
|
|
29
30
|
<!-- modal body start -->
|
|
30
|
-
<div
|
|
31
|
+
<div
|
|
32
|
+
class="ac-modal-body ac-vscrollbar"
|
|
33
|
+
:class="modifierBodyClasses"
|
|
34
|
+
data-testid="ac-modal-content-with-scroll"
|
|
35
|
+
>
|
|
31
36
|
<div class="ac-modal-content">
|
|
32
37
|
<!-- freedom content start -->
|
|
33
38
|
<slot />
|
|
@@ -37,7 +42,10 @@
|
|
|
37
42
|
<!-- modal body end -->
|
|
38
43
|
|
|
39
44
|
<!-- modal footer start -->
|
|
40
|
-
<div
|
|
45
|
+
<div
|
|
46
|
+
v-if="!hideActionFooter"
|
|
47
|
+
class="ac-modal-footer action-footer is-flex is-align-items-center is-justify-content-space-between"
|
|
48
|
+
>
|
|
41
49
|
<div>
|
|
42
50
|
<slot name="modal-footer-left" />
|
|
43
51
|
</div>
|
|
@@ -54,6 +62,11 @@
|
|
|
54
62
|
<script>
|
|
55
63
|
import { defineComponent, defineAsyncComponent } from "vue";
|
|
56
64
|
|
|
65
|
+
const modalCloseIcon = import.meta.glob(
|
|
66
|
+
"/src/assets/icons/modal/close-icon.svg",
|
|
67
|
+
{ eager: true }
|
|
68
|
+
);
|
|
69
|
+
|
|
57
70
|
export default defineComponent({
|
|
58
71
|
props: {
|
|
59
72
|
open: {
|
|
@@ -71,7 +84,19 @@ export default defineComponent({
|
|
|
71
84
|
isCloseOptionDisabled: {
|
|
72
85
|
type: Boolean,
|
|
73
86
|
default: false,
|
|
74
|
-
}
|
|
87
|
+
},
|
|
88
|
+
ignoreOutsideClick: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false,
|
|
91
|
+
},
|
|
92
|
+
hideActionFooter: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false,
|
|
95
|
+
},
|
|
96
|
+
modifierBodyClasses: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: "",
|
|
99
|
+
},
|
|
75
100
|
},
|
|
76
101
|
emits: ["closemodal"],
|
|
77
102
|
|
|
@@ -93,9 +118,8 @@ export default defineComponent({
|
|
|
93
118
|
data() {
|
|
94
119
|
return {
|
|
95
120
|
showModal: false,
|
|
96
|
-
crossIcon:
|
|
97
|
-
"/src/assets/icons/modal/close-icon.svg"
|
|
98
|
-
)["/src/assets/icons/modal/close-icon.svg"].default,
|
|
121
|
+
crossIcon:
|
|
122
|
+
modalCloseIcon["/src/assets/icons/modal/close-icon.svg"].default,
|
|
99
123
|
};
|
|
100
124
|
},
|
|
101
125
|
|
|
@@ -123,6 +147,10 @@ export default defineComponent({
|
|
|
123
147
|
this.showModal = true;
|
|
124
148
|
document.addEventListener("keydown", this.onKeyDown);
|
|
125
149
|
},
|
|
150
|
+
onModalOutsideClick() {
|
|
151
|
+
if (this.ignoreOutsideClick) return;
|
|
152
|
+
this.destroyModal();
|
|
153
|
+
},
|
|
126
154
|
destroyModal() {
|
|
127
155
|
if (this.isCloseOptionDisabled) return;
|
|
128
156
|
this.showModal = false;
|
|
@@ -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="
|
|
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(
|
|
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(
|
|
65
|
+
import("../button/Button.vue").then(module => module.default)
|
|
57
66
|
),
|
|
58
67
|
HeaderItem: defineAsyncComponent(() =>
|
|
59
|
-
import("../../v2/header/HeaderItem.vue").then(
|
|
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>
|