@appscode/design-system 1.1.0-beta.8 → 1.1.0-beta.81
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 +2 -2
- package/base/utilities/_colors.scss +105 -136
- package/base/utilities/_global.scss +25 -20
- package/base/utilities/_layouts.scss +0 -138
- package/base/utilities/_typography.scss +2 -2
- package/components/_ac-alert-box.scss +2 -2
- package/components/_ac-code-highlight.scss +9 -12
- package/components/_ac-drag.scss +4 -4
- package/components/_ac-modal.scss +2 -2
- package/components/_ac-select-box.scss +5 -5
- package/components/_ac-table.scss +7 -7
- package/components/_ac-tabs.scss +29 -26
- package/components/_all.scss +8 -5
- package/components/_buttons.scss +10 -10
- package/components/_getkeeper.scss +110 -0
- package/components/_graph.scss +10 -10
- package/components/_image-upload.scss +4 -4
- package/components/_input-card.scss +232 -0
- package/components/_input.scss +573 -0
- package/components/_left-sidebar-menu.scss +9 -13
- package/components/_monaco-editor.scss +2 -2
- package/components/_multi-select.scss +589 -0
- package/components/_navbar.scss +7 -7
- package/components/_nested-list.scss +2 -2
- package/components/_overview-info.scss +3 -3
- package/components/_pricing-table.scss +5 -5
- package/components/_progress-bar.scss +61 -74
- package/components/_subscription-card.scss +8 -10
- package/components/_table-of-content.scss +4 -4
- package/components/{_ac-terminal.scss → _terminal.scss} +63 -74
- package/components/_widget-menu.scss +7 -12
- package/components/_wizard.scss +13 -286
- package/components/ac-toaster/_ac-toasted.scss +4 -4
- package/components/bbum/_information-center.scss +8 -10
- package/components/bbum/_mobile-desktop.scss +9 -14
- package/components/bbum/_single-post-preview.scss +9 -9
- package/components/ui-builder/_ui-builder.scss +202 -18
- package/components/ui-builder/_vue-open-api.scss +63 -18
- package/icons/close-icon.svg +3 -0
- package/layouts/_code-preview.scss +6 -7
- package/package.json +1 -1
- package/vue-components/types/importFlow.ts +16 -0
- package/vue-components/types/notification.ts +3 -3
- package/vue-components/types/table.ts +1 -0
- package/vue-components/v2/banner/Banner.vue +1 -1
- package/vue-components/v2/button/Buttons.vue +1 -1
- package/vue-components/v2/modal/Modal.vue +1 -1
- package/vue-components/v3/alert/Alert.vue +2 -2
- package/vue-components/v3/banner/Banner.vue +2 -2
- package/vue-components/v3/breadcrumbs/Breadcrumb.vue +66 -4
- package/vue-components/v3/button/Button.vue +49 -786
- package/vue-components/v3/button/Buttons.vue +18 -2
- package/vue-components/v3/cards/Cluster.vue +37 -26
- package/vue-components/v3/cards/FeatureCard.vue +7 -11
- package/vue-components/v3/cards/FeatureCards.vue +1 -1
- package/vue-components/v3/cards/InfoCard.vue +1 -2
- package/vue-components/v3/cards/Monitoring.vue +6 -10
- package/vue-components/v3/cards/OverviewCard.vue +4 -0
- package/vue-components/v3/cards/OverviewCards.vue +10 -2
- package/vue-components/v3/cards/Vendor.vue +10 -6
- package/vue-components/v3/content/ContentHeader.vue +1 -1
- package/vue-components/v3/content/ContentTable.vue +1 -1
- package/vue-components/v3/dropdown/DropdownAction.vue +92 -0
- package/vue-components/v3/editor/Editor.vue +1 -1
- package/vue-components/v3/editor/FilteredFileEditor.vue +7 -0
- package/vue-components/v3/editor/ResourceKeyValueEditor.vue +3 -0
- package/vue-components/v3/footer/FooterArea.vue +8 -2
- package/vue-components/v3/footer/Info.vue +10 -8
- package/vue-components/v3/footer/Status.vue +24 -23
- package/vue-components/v3/footer/Usage.vue +20 -30
- package/vue-components/v3/form/Form.vue +0 -3
- package/vue-components/v3/form/FormFooter.vue +24 -0
- package/vue-components/v3/form-fields/AcSingleInput.vue +1 -508
- package/vue-components/v3/form-fields/FileUpload.vue +89 -0
- package/vue-components/v3/form-fields/Input.vue +2 -3
- package/vue-components/v3/header/Header.vue +1 -1
- package/vue-components/v3/loaders/InfoCardLoader.vue +18 -60
- package/vue-components/v3/loaders/SingleInfoCardLoader.vue +24 -0
- package/vue-components/v3/modal/Modal.vue +7 -12
- package/vue-components/v3/modals/JsonShowModal.vue +1 -0
- package/vue-components/v3/navbar/Navbar.vue +0 -159
- package/vue-components/v3/navbar/NavbarItem.vue +37 -15
- package/vue-components/v3/navbar/NavbarItemContent.vue +6 -3
- package/vue-components/v3/navbar/Notification.vue +35 -9
- package/vue-components/v3/navbar/User.vue +35 -31
- package/vue-components/v3/notification/AlertBox.vue +233 -3
- package/vue-components/v3/notification/Notification.vue +2 -2
- package/vue-components/v3/option-dots/Options.vue +17 -8
- package/vue-components/v3/pagination/Pagination.vue +27 -17
- package/vue-components/v3/preloader/Preloader.vue +1 -1
- package/vue-components/v3/searchbars/SearchBar.vue +1 -10
- package/vue-components/v3/sidebar/ClusterSwitcher.vue +1 -765
- package/vue-components/v3/sidebar/Sidebar.vue +3 -30
- package/vue-components/v3/sidebar/SidebarBody.vue +9 -2
- package/vue-components/v3/sidebar/SidebarFooter.vue +6 -3
- package/vue-components/v3/sidebar/SidebarHeader.vue +6 -2
- package/vue-components/v3/sidebar/Steps.vue +55 -51
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabs.vue +78 -2
- package/vue-components/v3/sidebar/sidebar-tabs/SidebarTabsLayout.vue +12 -3
- package/vue-components/v3/table/Table.vue +14 -16
- package/vue-components/v3/table/TableCell.vue +1 -9
- package/vue-components/v3/table/TableRow.vue +2 -2
- package/vue-components/v3/table/table-cell/ArrayCell.vue +35 -32
- package/vue-components/v3/table/table-cell/CellValue.vue +14 -40
- package/vue-components/v3/table/table-cell/ObjectCell.vue +40 -38
- package/vue-components/v3/tag/Tag.vue +1 -0
- package/base/utilities/dark-theme.scss +0 -26
- package/components/_ac-card.scss +0 -0
- package/components/_ac-input.scss +0 -901
- package/components/_ac-multi-select.scss +0 -780
- package/vue-components/text.vue +0 -1
- package/vue-components/types/longRunningTasks.ts +0 -20
- package/vue-components/v3/long-running-tasks/LongRunningTaskItem.vue +0 -94
- package/vue-components/v3/modals/LongRunningTasksModal.vue +0 -402
- package/vue-components/v3/terminal/LongRunningTaskTerminal.vue +0 -151
- /package/components/{_ac-accordion.scss → _accordion.scss} +0 -0
- /package/components/{_ac-report.scss → _report.scss} +0 -0
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { defineAsyncComponent, ref, watch, computed, nextTick } from "vue";
|
|
3
|
-
import
|
|
3
|
+
import HeroiconsCog6Tooth from "~icons/heroicons/cog-6-tooth";
|
|
4
|
+
import HeroiconsWrenchScrewdriver from "~icons/heroicons/wrench-screwdriver";
|
|
5
|
+
import HeroiconsUserGroup from "~icons/heroicons/user-group";
|
|
6
|
+
import HeroiconsChartPie from "~icons/heroicons/chart-pie";
|
|
7
|
+
import HeroiconsPower from "~icons/heroicons/power";
|
|
8
|
+
import HeroiconsCheck from "~icons/heroicons/check";
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
import type { User } from "../../types/user";
|
|
11
|
+
|
|
12
|
+
interface FormatedOrgs extends User {
|
|
6
13
|
isPersonalAccount?: boolean;
|
|
7
14
|
}
|
|
8
15
|
|
|
@@ -93,13 +100,13 @@ watch(dropDownStatus, (n) => {
|
|
|
93
100
|
<navbar-item :modifierClasses="'ac-profile-button'">
|
|
94
101
|
<template #navbar-item>
|
|
95
102
|
<div class="ac-user-profile mr-8">
|
|
96
|
-
<img :src="
|
|
103
|
+
<img :src="user.avatar_url" alt="User Photo" />
|
|
97
104
|
</div>
|
|
98
105
|
{{ user.full_name || user.username }}
|
|
99
106
|
<i class="fa fa-angle-down" aria-hidden="true"></i>
|
|
100
107
|
</template>
|
|
101
108
|
<!-- <button class="button ac-nav-button ac-profile-button">
|
|
102
|
-
|
|
109
|
+
|
|
103
110
|
</button> -->
|
|
104
111
|
|
|
105
112
|
<template #navbar-content>
|
|
@@ -129,17 +136,19 @@ watch(dropDownStatus, (n) => {
|
|
|
129
136
|
<a :href="`mailto:${user.email}`"> {{ user.email }}</a>
|
|
130
137
|
</div>
|
|
131
138
|
</div>
|
|
132
|
-
<transition-group name="list" tag="ul" class="list-items">
|
|
139
|
+
<transition-group name="list" tag="ul" class="list-items py-2">
|
|
133
140
|
<li key="settings">
|
|
134
141
|
<a
|
|
135
142
|
data-testid="user-settings-link"
|
|
136
143
|
:href="`${serverDomain}/user/settings/`"
|
|
137
|
-
|
|
144
|
+
><span class="icon"><HeroiconsCog6Tooth /></span
|
|
145
|
+
><span>Settings</span></a
|
|
138
146
|
>
|
|
139
147
|
</li>
|
|
140
148
|
<li v-if="user.is_admin" key="site-admin">
|
|
141
149
|
<a data-testid="site-admin-link" :href="`${accountsDomain}/admin`"
|
|
142
|
-
|
|
150
|
+
><span class="icon"><HeroiconsWrenchScrewdriver /></span
|
|
151
|
+
><span>Site Administration</span></a
|
|
143
152
|
>
|
|
144
153
|
</li>
|
|
145
154
|
<li
|
|
@@ -151,7 +160,10 @@ watch(dropDownStatus, (n) => {
|
|
|
151
160
|
class="ac-dropdown-button is-fullwidth is-flex is-justify-content-space-between is-align-items-center"
|
|
152
161
|
@click="toggleList()"
|
|
153
162
|
>
|
|
154
|
-
<
|
|
163
|
+
<div class="is-flex gap-8">
|
|
164
|
+
<span class="icon"><HeroiconsUserGroup /></span
|
|
165
|
+
><span>Switch Account</span>
|
|
166
|
+
</div>
|
|
155
167
|
<span
|
|
156
168
|
><i
|
|
157
169
|
:class="`fa fa-angle-${
|
|
@@ -203,40 +215,25 @@ watch(dropDownStatus, (n) => {
|
|
|
203
215
|
v-if="idx === 0"
|
|
204
216
|
class="material-icons font-size-18 ml-10 is-pulled-right"
|
|
205
217
|
>
|
|
206
|
-
|
|
218
|
+
<HeroiconsCheck />
|
|
207
219
|
</span>
|
|
208
220
|
</div>
|
|
209
221
|
</a>
|
|
210
222
|
</li>
|
|
211
223
|
</transition-group>
|
|
212
224
|
</li>
|
|
213
|
-
<li key="dashboard">
|
|
214
|
-
<router-link
|
|
215
|
-
v-if="isPlatformDomain"
|
|
216
|
-
to="/dashboard"
|
|
217
|
-
data-testid="user-dashboard-link"
|
|
218
|
-
>
|
|
219
|
-
Dashboard
|
|
220
|
-
</router-link>
|
|
221
|
-
<a
|
|
222
|
-
v-else
|
|
223
|
-
:href="`${serverDomain}/dashboard`"
|
|
224
|
-
data-testid="user-dashboard-link"
|
|
225
|
-
>
|
|
226
|
-
Dashboard
|
|
227
|
-
</a>
|
|
228
|
-
</li>
|
|
229
225
|
<li key="signout" @click="$emit('on-logout')">
|
|
230
226
|
<a
|
|
231
227
|
data-testid="user-logout-link"
|
|
232
228
|
:href="`${accountsDomain}/user/logout`"
|
|
233
229
|
>
|
|
234
|
-
|
|
230
|
+
<span class="icon"><HeroiconsPower /></span>
|
|
231
|
+
<span>Sign out</span>
|
|
235
232
|
</a>
|
|
236
233
|
</li>
|
|
237
|
-
<li key="theme" v-if="showThemeMode">
|
|
234
|
+
<!-- <li key="theme" v-if="showThemeMode">
|
|
238
235
|
<theme-mode @set:theme="setTheme" />
|
|
239
|
-
</li>
|
|
236
|
+
</li> -->
|
|
240
237
|
</transition-group>
|
|
241
238
|
</div>
|
|
242
239
|
</navbar-item-content>
|
|
@@ -253,7 +250,6 @@ watch(dropDownStatus, (n) => {
|
|
|
253
250
|
}
|
|
254
251
|
.navbar-dropdown-wrapper {
|
|
255
252
|
width: 240px;
|
|
256
|
-
transition: width 0.9s ease-in-out;
|
|
257
253
|
}
|
|
258
254
|
|
|
259
255
|
.user-profile-wrapper {
|
|
@@ -265,7 +261,7 @@ watch(dropDownStatus, (n) => {
|
|
|
265
261
|
display: flex;
|
|
266
262
|
align-items: center;
|
|
267
263
|
border-bottom: 1px solid $primary-90;
|
|
268
|
-
padding:
|
|
264
|
+
padding: 16px 16px;
|
|
269
265
|
|
|
270
266
|
.profile-photo {
|
|
271
267
|
// width: 50px;
|
|
@@ -341,17 +337,25 @@ watch(dropDownStatus, (n) => {
|
|
|
341
337
|
|
|
342
338
|
&.is-open {
|
|
343
339
|
ul {
|
|
340
|
+
padding: 8px;
|
|
344
341
|
max-height: 200px;
|
|
345
342
|
visibility: visible;
|
|
346
343
|
transition: max-height 0.25s ease-out;
|
|
344
|
+
li {
|
|
345
|
+
padding: 0;
|
|
346
|
+
border: 1px solid $primary-95;
|
|
347
|
+
}
|
|
347
348
|
}
|
|
348
349
|
}
|
|
349
350
|
a {
|
|
350
|
-
padding:
|
|
351
|
+
padding: 8px 16px;
|
|
351
352
|
font-weight: 500;
|
|
352
353
|
display: block;
|
|
353
354
|
color: $primary-10;
|
|
354
355
|
transition: 0.3s;
|
|
356
|
+
display: flex;
|
|
357
|
+
align-items: center;
|
|
358
|
+
gap: 8px;
|
|
355
359
|
|
|
356
360
|
&:hover {
|
|
357
361
|
background-color: $primary-97;
|
|
@@ -27,10 +27,15 @@ const { notificationType, content, hideIcon, actionButton } = toRefs(props);
|
|
|
27
27
|
|
|
28
28
|
const iconClass = computed(() => {
|
|
29
29
|
if (notificationType.value === "success") return "fa-check-circle";
|
|
30
|
-
else if (notificationType.value === "info") return "fa-info-circle";
|
|
31
|
-
else if (notificationType.value === "
|
|
30
|
+
else if (notificationType.value === "info") return "fa-info-circle ";
|
|
31
|
+
else if (notificationType.value === "error") return "fa-times-circle";
|
|
32
32
|
else return "fa-info-circle";
|
|
33
33
|
});
|
|
34
|
+
const backgroundColor = computed(() => {
|
|
35
|
+
if (notificationType.value === "success") return "is-success";
|
|
36
|
+
else if (notificationType.value === "error") return "is-danger";
|
|
37
|
+
else return "";
|
|
38
|
+
});
|
|
34
39
|
|
|
35
40
|
const getSanitizedHtml = (content: string) => {
|
|
36
41
|
return DOMPurify.sanitize(content || "");
|
|
@@ -40,7 +45,10 @@ const getSanitizedHtml = (content: string) => {
|
|
|
40
45
|
<template>
|
|
41
46
|
<!-- alert-message area start -->
|
|
42
47
|
<!-- plsease, use this class name ('.is-info' 'is-success', 'is-danger', 'is-warning') -->
|
|
43
|
-
<div
|
|
48
|
+
<div
|
|
49
|
+
class="ac-notification is-${notificationType} mb-15"
|
|
50
|
+
:class="backgroundColor"
|
|
51
|
+
>
|
|
44
52
|
<p>
|
|
45
53
|
<i v-if="!hideIcon" :class="`fa ${iconClass} mr-5`"></i
|
|
46
54
|
><span v-html="getSanitizedHtml(content)"></span>
|
|
@@ -56,3 +64,225 @@ const getSanitizedHtml = (content: string) => {
|
|
|
56
64
|
</div>
|
|
57
65
|
<!-- alert-message area end -->
|
|
58
66
|
</template>
|
|
67
|
+
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
// for alert message
|
|
70
|
+
.ac-notification {
|
|
71
|
+
background-color: #dee7f5;
|
|
72
|
+
font-size: 13px;
|
|
73
|
+
color: $primary;
|
|
74
|
+
min-height: 36px;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
padding: 8px 16px;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
border: 1px solid $primary;
|
|
80
|
+
border-radius: 4px;
|
|
81
|
+
justify-content: flex-start;
|
|
82
|
+
position: relative;
|
|
83
|
+
z-index: 1;
|
|
84
|
+
min-width: 280px;
|
|
85
|
+
|
|
86
|
+
p {
|
|
87
|
+
color: $primary;
|
|
88
|
+
margin-bottom: 0;
|
|
89
|
+
|
|
90
|
+
.close-icon {
|
|
91
|
+
padding-right: 10px;
|
|
92
|
+
font-size: 15px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
a {
|
|
96
|
+
text-decoration: underline;
|
|
97
|
+
color: $primary;
|
|
98
|
+
|
|
99
|
+
&:hover {
|
|
100
|
+
color: hsla(
|
|
101
|
+
var(--hsl-hue),
|
|
102
|
+
var(--hsl-saturation),
|
|
103
|
+
calc(var(--hsl-lightness) - 10%),
|
|
104
|
+
1
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
button.close {
|
|
111
|
+
background-color: transparent;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
right: 0px;
|
|
114
|
+
position: absolute;
|
|
115
|
+
box-shadow: none;
|
|
116
|
+
border: none;
|
|
117
|
+
font-size: 14px;
|
|
118
|
+
color: $danger;
|
|
119
|
+
width: 40px;
|
|
120
|
+
height: 100%;
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// mixin for .ac-notification
|
|
128
|
+
@mixin acNotification($colorName) {
|
|
129
|
+
background-color: scale-color($color: $colorName, $lightness: 80%);
|
|
130
|
+
color: $white-100;
|
|
131
|
+
border-color: $colorName;
|
|
132
|
+
|
|
133
|
+
p {
|
|
134
|
+
color: $colorName;
|
|
135
|
+
|
|
136
|
+
a {
|
|
137
|
+
color: $colorName;
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
color: $colorName;
|
|
141
|
+
opacity: 0.8;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
@mixin acPrimaryNotification() {
|
|
147
|
+
background-color: hsla(
|
|
148
|
+
var(--hsl-hue),
|
|
149
|
+
var(--hsl-saturation),
|
|
150
|
+
var(--hsl-lightness),
|
|
151
|
+
0.2
|
|
152
|
+
);
|
|
153
|
+
color: $white-100;
|
|
154
|
+
border-color: $primary;
|
|
155
|
+
|
|
156
|
+
p {
|
|
157
|
+
color: $primary;
|
|
158
|
+
|
|
159
|
+
a {
|
|
160
|
+
color: $primary;
|
|
161
|
+
|
|
162
|
+
&:hover {
|
|
163
|
+
color: $primary;
|
|
164
|
+
opacity: 0.8;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// is-primary
|
|
171
|
+
.ac-notification.is-primary {
|
|
172
|
+
@include acPrimaryNotification();
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// is.info
|
|
176
|
+
.ac-notification.is-info {
|
|
177
|
+
@include acNotification($info);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// is.success
|
|
181
|
+
.ac-notification.is-success {
|
|
182
|
+
@include acNotification($success);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// is-danger
|
|
186
|
+
.ac-notification.is-danger {
|
|
187
|
+
@include acNotification($danger);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// is-warning
|
|
191
|
+
.ac-notification.is-warning {
|
|
192
|
+
@include acNotification($warning);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/*====================================
|
|
196
|
+
AC Toast
|
|
197
|
+
=====================================*/
|
|
198
|
+
|
|
199
|
+
.ac-toast {
|
|
200
|
+
width: 350px;
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: space-between;
|
|
204
|
+
font-size: 13px;
|
|
205
|
+
border-radius: 4px;
|
|
206
|
+
position: relative;
|
|
207
|
+
padding-right: 30px;
|
|
208
|
+
margin-bottom: 10px;
|
|
209
|
+
|
|
210
|
+
* {
|
|
211
|
+
color: $white-100;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
p {
|
|
215
|
+
padding-left: 16px;
|
|
216
|
+
|
|
217
|
+
i.fa {
|
|
218
|
+
padding-right: 0 !important;
|
|
219
|
+
margin-right: 4px;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
a {
|
|
224
|
+
font-weight: 500;
|
|
225
|
+
text-decoration: underline;
|
|
226
|
+
padding: 0 15px;
|
|
227
|
+
|
|
228
|
+
&:hover {
|
|
229
|
+
color: $black-70;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
button.close-button {
|
|
234
|
+
border-radius: 0px;
|
|
235
|
+
background-color: transparent;
|
|
236
|
+
border: none;
|
|
237
|
+
color: $white-100;
|
|
238
|
+
position: absolute;
|
|
239
|
+
right: 0;
|
|
240
|
+
top: 0;
|
|
241
|
+
padding: 5px;
|
|
242
|
+
height: 100%;
|
|
243
|
+
width: 30px;
|
|
244
|
+
z-index: 1;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
border-left: 1px solid #dddddd;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// mixin for .ac-toast
|
|
251
|
+
@mixin acToast($colorName) {
|
|
252
|
+
background-color: $colorName;
|
|
253
|
+
color: $white-100;
|
|
254
|
+
border-color: $colorName;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// is-primary
|
|
258
|
+
.ac-toast.is-primary {
|
|
259
|
+
@include acToast($primary);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// is-info
|
|
263
|
+
.ac-toast.is-info {
|
|
264
|
+
@include acToast($info);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// is.success
|
|
268
|
+
.ac-toast.is-success {
|
|
269
|
+
@include acToast($success);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// is-danger
|
|
273
|
+
.ac-toast.is-danger {
|
|
274
|
+
@include acToast($danger);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// is-warning
|
|
278
|
+
.ac-toast.is-warning {
|
|
279
|
+
@include acToast($warning);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// dark theme start
|
|
283
|
+
// .is-dark-theme {
|
|
284
|
+
// .ac-notification.is-danger {
|
|
285
|
+
// background-color: $black-80;
|
|
286
|
+
// }
|
|
287
|
+
// }
|
|
288
|
+
</style>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
watch,
|
|
10
10
|
} from "vue";
|
|
11
11
|
import type { Ref } from "vue";
|
|
12
|
-
import type { TaskLog } from "../../types/longRunningTasks";
|
|
12
|
+
// import type { TaskLog } from "../../types/longRunningTasks";
|
|
13
13
|
import type { Notification } from "../../types/notification";
|
|
14
14
|
|
|
15
15
|
const NotificationItem = defineAsyncComponent(
|
|
@@ -48,7 +48,7 @@ async function subscribeToNotifcations() {
|
|
|
48
48
|
for await (const msg of subscription) {
|
|
49
49
|
console.log("notifications ===>");
|
|
50
50
|
console.log({ data: StringCodec().decode(msg.data) });
|
|
51
|
-
const log
|
|
51
|
+
const log = JSON.parse(StringCodec().decode(msg.data));
|
|
52
52
|
console.log({ log });
|
|
53
53
|
const currentTime = new Date().getTime();
|
|
54
54
|
addNewNotification({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { onMounted, onUnmounted, ref, type Ref } from "vue";
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
modifierClasses?: string;
|
|
@@ -44,18 +44,28 @@ const documentClick = (e: Event) => {
|
|
|
44
44
|
</div>
|
|
45
45
|
<!-- dropdown Item start -->
|
|
46
46
|
<!-- use "is-hidden" class in the line below for hide dropdown element -->
|
|
47
|
-
<slot
|
|
47
|
+
<slot :class="{ 'is-hidden': !showOptions }" />
|
|
48
48
|
<!-- dropdown Item end -->
|
|
49
49
|
</button>
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<style lang="scss">
|
|
53
53
|
.ac-options {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
width: 32px;
|
|
56
|
+
height: 32px;
|
|
57
|
+
text-align: center;
|
|
58
|
+
margin: 0;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: center;
|
|
57
62
|
border: none;
|
|
58
|
-
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
&:hover {
|
|
66
|
+
background-color: $primary-90;
|
|
67
|
+
}
|
|
68
|
+
|
|
59
69
|
&:focus-within {
|
|
60
70
|
.options-items {
|
|
61
71
|
opacity: 1;
|
|
@@ -87,8 +97,6 @@ const documentClick = (e: Event) => {
|
|
|
87
97
|
&.is-right {
|
|
88
98
|
.option-dots {
|
|
89
99
|
align-items: flex-end;
|
|
90
|
-
padding: 0 10px;
|
|
91
|
-
margin-right: -10px;
|
|
92
100
|
}
|
|
93
101
|
|
|
94
102
|
.options-items {
|
|
@@ -131,6 +139,7 @@ const documentClick = (e: Event) => {
|
|
|
131
139
|
opacity: 0;
|
|
132
140
|
visibility: hidden;
|
|
133
141
|
transition: 0.3s ease-in-out;
|
|
142
|
+
text-align: left;
|
|
134
143
|
|
|
135
144
|
li {
|
|
136
145
|
.list-button {
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
hideRowsPerPageSelection?: boolean;
|
|
6
6
|
totalNoOfItems?: number;
|
|
7
|
-
|
|
7
|
+
itemsPerPage?: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
const props = withDefaults(defineProps<Props>(), {
|
|
11
11
|
hideRowsPerPageSelection: false,
|
|
12
12
|
totalNoOfItems: 0,
|
|
13
|
-
|
|
13
|
+
itemsPerPage: 5,
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
const emit = defineEmits(["pagination:pagechange"]);
|
|
16
|
+
const emit = defineEmits(["pagination:pagechange", "pagination:countchange"]);
|
|
17
17
|
|
|
18
18
|
const activePageNo = ref(1);
|
|
19
|
-
const selectedItemCountPerPage =
|
|
19
|
+
const selectedItemCountPerPage = computed({
|
|
20
|
+
get() {
|
|
21
|
+
return props.itemsPerPage;
|
|
22
|
+
},
|
|
23
|
+
set(n) {
|
|
24
|
+
activePageNo.value = 1;
|
|
25
|
+
emit("pagination:countchange", n);
|
|
26
|
+
},
|
|
27
|
+
});
|
|
20
28
|
|
|
21
29
|
const noOfPages = computed(() => {
|
|
22
30
|
return Math.ceil(props.totalNoOfItems / selectedItemCountPerPage.value);
|
|
@@ -35,9 +43,9 @@ const pageRange = computed(() => {
|
|
|
35
43
|
if (activePageNo.value < 3) {
|
|
36
44
|
o.start = 1;
|
|
37
45
|
o.end = 5;
|
|
38
|
-
} else if (activePageNo.value
|
|
39
|
-
o.start =
|
|
40
|
-
o.end =
|
|
46
|
+
} else if (activePageNo.value >= noOfPages.value - 2) {
|
|
47
|
+
o.start = noOfPages.value - 4;
|
|
48
|
+
o.end = noOfPages.value;
|
|
41
49
|
} else {
|
|
42
50
|
o.start = activePageNo.value - 2;
|
|
43
51
|
o.end = activePageNo.value + 2;
|
|
@@ -79,7 +87,7 @@ const changePage = (page: number) => {
|
|
|
79
87
|
};
|
|
80
88
|
|
|
81
89
|
const nextPage = () => {
|
|
82
|
-
activePageNo.value = Math.min(activePageNo.value + 1,
|
|
90
|
+
activePageNo.value = Math.min(activePageNo.value + 1, noOfPages.value);
|
|
83
91
|
};
|
|
84
92
|
|
|
85
93
|
watch(
|
|
@@ -89,12 +97,9 @@ watch(
|
|
|
89
97
|
},
|
|
90
98
|
{
|
|
91
99
|
deep: true,
|
|
100
|
+
immediate: true,
|
|
92
101
|
}
|
|
93
102
|
);
|
|
94
|
-
|
|
95
|
-
watch(selectedItemCountPerPage, () => {
|
|
96
|
-
activePageNo.value = 1;
|
|
97
|
-
});
|
|
98
103
|
</script>
|
|
99
104
|
|
|
100
105
|
<template>
|
|
@@ -102,10 +107,7 @@ watch(selectedItemCountPerPage, () => {
|
|
|
102
107
|
<div class="pagination-filter level-left">
|
|
103
108
|
<div
|
|
104
109
|
class="level-item"
|
|
105
|
-
v-show="
|
|
106
|
-
!hideRowsPerPageSelection &&
|
|
107
|
-
totalNoOfItems > preSelectedItemsCountPerPage
|
|
108
|
-
"
|
|
110
|
+
v-show="!hideRowsPerPageSelection && totalNoOfItems > itemsPerPage"
|
|
109
111
|
>
|
|
110
112
|
<label>Rows per page</label>
|
|
111
113
|
<select
|
|
@@ -172,6 +174,7 @@ watch(selectedItemCountPerPage, () => {
|
|
|
172
174
|
ul {
|
|
173
175
|
li {
|
|
174
176
|
display: inline-block;
|
|
177
|
+
|
|
175
178
|
a {
|
|
176
179
|
display: block;
|
|
177
180
|
width: 20px;
|
|
@@ -188,12 +191,15 @@ watch(selectedItemCountPerPage, () => {
|
|
|
188
191
|
color: $white-100;
|
|
189
192
|
border: 1px solid $primary-90;
|
|
190
193
|
}
|
|
194
|
+
|
|
191
195
|
&.previous {
|
|
192
196
|
background-color: $primary-97;
|
|
193
197
|
}
|
|
198
|
+
|
|
194
199
|
&.next {
|
|
195
200
|
background-color: $primary-97;
|
|
196
201
|
}
|
|
202
|
+
|
|
197
203
|
&.is-current {
|
|
198
204
|
background-color: $primary;
|
|
199
205
|
color: $white-100;
|
|
@@ -207,11 +213,13 @@ watch(selectedItemCountPerPage, () => {
|
|
|
207
213
|
.pagination-filter {
|
|
208
214
|
color: $primary-30;
|
|
209
215
|
font-size: 12px;
|
|
216
|
+
|
|
210
217
|
span {
|
|
211
218
|
font-weight: 500;
|
|
212
219
|
padding: 0 4px;
|
|
213
220
|
}
|
|
214
221
|
}
|
|
222
|
+
|
|
215
223
|
.pagination-filter {
|
|
216
224
|
select {
|
|
217
225
|
background-color: $primary-97;
|
|
@@ -220,10 +228,12 @@ watch(selectedItemCountPerPage, () => {
|
|
|
220
228
|
margin-left: 4px;
|
|
221
229
|
height: 22px;
|
|
222
230
|
padding: 0 4px;
|
|
231
|
+
|
|
223
232
|
&:focus,
|
|
224
233
|
&:active,
|
|
225
234
|
&:focus-visible {
|
|
226
235
|
border: 1px solid $primary;
|
|
236
|
+
outline: none;
|
|
227
237
|
}
|
|
228
238
|
}
|
|
229
239
|
}
|
|
@@ -12,7 +12,7 @@ withDefaults(defineProps<Props>(), {
|
|
|
12
12
|
|
|
13
13
|
<template>
|
|
14
14
|
<div
|
|
15
|
-
class="is-flex is-justify-content-center is-align-items-center is-flex-direction-column ac-preloader"
|
|
15
|
+
class="is-flex is-justify-content-center is-align-items-center is-flex-direction-column ac-preloader page-loader"
|
|
16
16
|
style="height: calc(100vh - 200px)"
|
|
17
17
|
>
|
|
18
18
|
<span v-if="showSpinner" class="spinner"></span>
|
|
@@ -20,7 +20,7 @@ const emit = defineEmits(["search"]);
|
|
|
20
20
|
const searchText = ref("");
|
|
21
21
|
|
|
22
22
|
watch(searchText, (n) => {
|
|
23
|
-
emit("search", n);
|
|
23
|
+
emit("search", n.trim());
|
|
24
24
|
});
|
|
25
25
|
</script>
|
|
26
26
|
|
|
@@ -58,15 +58,6 @@ watch(searchText, (n) => {
|
|
|
58
58
|
.ac-single-input {
|
|
59
59
|
width: 200px;
|
|
60
60
|
transition: 0.3s all;
|
|
61
|
-
input {
|
|
62
|
-
// padding: 0 20px;
|
|
63
|
-
&::placeholder {
|
|
64
|
-
// opacity: 0;
|
|
65
|
-
}
|
|
66
|
-
&:focus {
|
|
67
|
-
// opacity: 1;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
61
|
}
|
|
71
62
|
}
|
|
72
63
|
</style>
|