@dataloop-ai/components 0.18.5 → 0.18.7
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/package.json +1 -1
- package/src/components/basic/DlAlert/DlAlert.vue +5 -6
- package/src/components/basic/DlAlert/types.ts +1 -0
- package/src/components/basic/types.ts +1 -0
- package/src/components/compound/DlCodeEditor/components/CodeEditor.vue +23 -12
- package/src/components/compound/DlCounters/DlCounters.vue +4 -9
- package/src/components/compound/DlCounters/types.ts +5 -0
- package/src/components/compound/types.ts +2 -0
- package/src/components/essential/{DlPageLayout/DlPageLayout.vue → DlLayout/DlLayout.vue} +11 -11
- package/src/components/essential/DlLayout/index.ts +2 -0
- package/src/components/essential/index.ts +1 -1
- package/src/demos/DlDatasetBrowserLayoutDemo/DlDatasetBrowserLayoutDemo.vue +85 -0
- package/src/demos/DlDatasetBrowserLayoutDemo/index.ts +2 -0
- package/src/demos/DlDemoPage.vue +9 -6
- package/src/demos/DlLayoutDemo.vue +25 -0
- package/src/demos/DlPageLayoutDemo/DlPageLayoutDemo.vue +81 -0
- package/src/demos/DlPageLayoutDemo/index.ts +2 -0
- package/src/demos/DlStudioLayoutDemo/DlStudioLayoutDemo.vue +85 -0
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioLeftDrawer.vue +2 -2
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioTabsMenu.vue +2 -2
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/TabMenu/FilterMenu.vue +1 -1
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/TabMenu/TabMenuAnnotations.vue +1 -6
- package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/TabMenu/TabMenuItem.vue +1 -1
- package/src/demos/DlStudioLayoutDemo/index.ts +2 -0
- package/src/demos/index.ts +2 -2
- package/src/index.ts +2 -0
- package/src/layouts/{DlDatasetBrowser/DlDatasetBrowser.vue → DlDatasetBrowserLayout/DlDatasetBrowserLayout.vue} +6 -6
- package/src/layouts/DlDatasetBrowserLayout/index.ts +2 -0
- package/src/layouts/DlPageLayout/DlPageLayout.vue +61 -0
- package/src/layouts/DlPageLayout/components/DlPageLayoutHeader/DlPageLayoutHeader.vue +76 -0
- package/src/layouts/DlPageLayout/components/DlPageLayoutHeader/index.ts +2 -0
- package/src/layouts/DlPageLayout/components/index.ts +1 -0
- package/src/{components/essential → layouts}/DlPageLayout/index.ts +2 -0
- package/src/layouts/DlStudioLayout/DlStudioLayout.vue +6 -9
- package/src/layouts/index.ts +3 -0
- package/src/demos/DlPageLayoutDemo.vue +0 -146
- package/src/layouts/DlStudioLayout/components/Demo/StudioHeader.vue +0 -121
- package/src/layouts/DlStudioLayout/components/NavigationDrawer.vue +0 -147
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetFooter.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetHeader.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetLeftDrawer.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetMainContent.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/DatasetRightDrawer.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/ActionsMenu.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/AutomationMenu.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/CardView.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/CardViewGallery.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/CardViewTable.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/EmptyState/LayoutEmptyState.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/EmptyState/UploadData.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/MainContentImages.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/MainContent/MainContentNav.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/NavbarKpi.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/NavbarSearch.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/SearchFilterMenu.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/filters/AddFilter.vue +0 -0
- /package/src/{layouts/DlDatasetBrowser/DemoComponents → demos/DlDatasetBrowserLayoutDemo/components}/types/imageMetadata.ts +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/components/LayoutNavbar.vue +0 -0
- /package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/LeftMenuContent.vue +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/components/ListAutocomplete.vue +0 -0
- /package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioFooter.vue +0 -0
- /package/src/{layouts/DlStudioLayout/components/Demo → demos/DlStudioLayoutDemo/components}/StudioMainContent.vue +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/types/HorizontalItems.ts +0 -0
- /package/src/{layouts/DlStudioLayout → demos/DlStudioLayoutDemo}/types/VerticalItems.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<dl-
|
|
3
|
+
<dl-layout :template="template">
|
|
4
4
|
<template #header>
|
|
5
5
|
<slot name="header" />
|
|
6
6
|
</template>
|
|
@@ -10,24 +10,24 @@
|
|
|
10
10
|
<template #rightDrawer>
|
|
11
11
|
<slot name="rightDrawer" />
|
|
12
12
|
</template>
|
|
13
|
-
<template #
|
|
14
|
-
<slot name="
|
|
13
|
+
<template #body>
|
|
14
|
+
<slot name="body" />
|
|
15
15
|
</template>
|
|
16
16
|
<template #footer>
|
|
17
17
|
<slot name="footer" />
|
|
18
18
|
</template>
|
|
19
|
-
</dl-
|
|
19
|
+
</dl-layout>
|
|
20
20
|
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
24
|
import { defineComponent } from 'vue-demi'
|
|
25
|
-
import {
|
|
25
|
+
import { DlLayout } from '../../components'
|
|
26
26
|
|
|
27
27
|
export default defineComponent({
|
|
28
28
|
name: 'DlDatasetBrowser',
|
|
29
29
|
components: {
|
|
30
|
-
|
|
30
|
+
DlLayout
|
|
31
31
|
},
|
|
32
32
|
setup() {
|
|
33
33
|
const template = '"h h h" "l p r" "f f f"'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-layout :template="template">
|
|
4
|
+
<template #header>
|
|
5
|
+
<slot name="header">
|
|
6
|
+
<dl-page-layout-header
|
|
7
|
+
:title="title"
|
|
8
|
+
:sub-title="subTitle"
|
|
9
|
+
:counters="counters"
|
|
10
|
+
/>
|
|
11
|
+
</slot>
|
|
12
|
+
</template>
|
|
13
|
+
<template #body>
|
|
14
|
+
<slot name="body">
|
|
15
|
+
<slot />
|
|
16
|
+
</slot>
|
|
17
|
+
</template>
|
|
18
|
+
<template #footer>
|
|
19
|
+
<slot name="footer" />
|
|
20
|
+
</template>
|
|
21
|
+
</dl-layout>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import { defineComponent, PropType } from 'vue-demi'
|
|
27
|
+
import { DlLayout } from '../../components'
|
|
28
|
+
import { DlCounterItem } from '../../types'
|
|
29
|
+
import { DlPageLayoutHeader } from './components'
|
|
30
|
+
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
name: 'DlPageLayout',
|
|
33
|
+
components: {
|
|
34
|
+
DlLayout,
|
|
35
|
+
DlPageLayoutHeader
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
title: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
subTitle: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ''
|
|
45
|
+
},
|
|
46
|
+
counters: {
|
|
47
|
+
type: Array as PropType<DlCounterItem[]>,
|
|
48
|
+
default: () => [] as DlCounterItem[]
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
setup() {
|
|
52
|
+
const template = '"h h h" "p p p" "f f f"'
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
template
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style scoped></style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page-layout-header">
|
|
3
|
+
<div style="display: flex; height: 100%; align-items: center">
|
|
4
|
+
<div style="padding-left: 25px">
|
|
5
|
+
<dl-typography
|
|
6
|
+
color="dl-color-lighter"
|
|
7
|
+
size="10px"
|
|
8
|
+
>
|
|
9
|
+
{{ subTitle }}
|
|
10
|
+
</dl-typography>
|
|
11
|
+
<dl-typography
|
|
12
|
+
color="dl-color-darker"
|
|
13
|
+
size="30px"
|
|
14
|
+
>
|
|
15
|
+
{{ title }}
|
|
16
|
+
</dl-typography>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div
|
|
20
|
+
v-if="counters.length > 0"
|
|
21
|
+
style="
|
|
22
|
+
display: flex;
|
|
23
|
+
height: 100%;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: end;
|
|
26
|
+
padding-right: 10px;
|
|
27
|
+
"
|
|
28
|
+
>
|
|
29
|
+
<dl-counters
|
|
30
|
+
counter-font-size="20px"
|
|
31
|
+
title-font-size="12px"
|
|
32
|
+
:items="counters"
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts">
|
|
39
|
+
import { PropType, defineComponent } from 'vue-demi'
|
|
40
|
+
import { DlTypography, DlCounters } from '../../../../components'
|
|
41
|
+
import { DlCounterItem } from '../../../../types'
|
|
42
|
+
|
|
43
|
+
export default defineComponent({
|
|
44
|
+
name: 'DlPageLayoutHeader',
|
|
45
|
+
components: {
|
|
46
|
+
DlTypography,
|
|
47
|
+
DlCounters
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
title: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ''
|
|
53
|
+
},
|
|
54
|
+
subTitle: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ''
|
|
57
|
+
},
|
|
58
|
+
counters: {
|
|
59
|
+
type: Array as PropType<DlCounterItem[]>,
|
|
60
|
+
default: () => [] as DlCounterItem[]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style scoped>
|
|
67
|
+
.page-layout-header {
|
|
68
|
+
height: 100px;
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: 1fr 1fr;
|
|
71
|
+
width: 100%;
|
|
72
|
+
justify-self: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
background-color: var(--dl-color-body-background);
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DlPageLayoutHeader'
|
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="dl-studio-layout">
|
|
3
|
-
<dl-
|
|
4
|
-
<template #header>
|
|
5
|
-
<slot name="header" />
|
|
6
|
-
</template>
|
|
3
|
+
<dl-layout :template="template">
|
|
7
4
|
<template #leftDrawer>
|
|
8
5
|
<slot name="leftDrawer" />
|
|
9
6
|
</template>
|
|
10
7
|
<template #rightDrawer>
|
|
11
8
|
<slot name="rightDrawer" />
|
|
12
9
|
</template>
|
|
13
|
-
<template #
|
|
14
|
-
<slot name="
|
|
10
|
+
<template #body>
|
|
11
|
+
<slot name="body" />
|
|
15
12
|
</template>
|
|
16
13
|
<template #footer>
|
|
17
14
|
<slot name="footer" />
|
|
18
15
|
</template>
|
|
19
|
-
</dl-
|
|
16
|
+
</dl-layout>
|
|
20
17
|
</div>
|
|
21
18
|
</template>
|
|
22
19
|
|
|
23
20
|
<script lang="ts">
|
|
24
21
|
import { defineComponent } from 'vue-demi'
|
|
25
|
-
import {
|
|
22
|
+
import { DlLayout } from '../../components'
|
|
26
23
|
|
|
27
24
|
export default defineComponent({
|
|
28
25
|
name: 'DlStudioLayout',
|
|
29
26
|
components: {
|
|
30
|
-
|
|
27
|
+
DlLayout
|
|
31
28
|
},
|
|
32
29
|
setup() {
|
|
33
30
|
const template = '"h h h" "l p r" "l f r"'
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="height: 100px; width: 100%">
|
|
3
|
-
<dl-button @click="isOpenedStudioModal = true">
|
|
4
|
-
Studio Layout
|
|
5
|
-
</dl-button>
|
|
6
|
-
<div
|
|
7
|
-
v-if="isOpenedStudioModal"
|
|
8
|
-
class="fullscreen-template"
|
|
9
|
-
>
|
|
10
|
-
<div class="fullscreen-template__close">
|
|
11
|
-
<dl-button
|
|
12
|
-
flat
|
|
13
|
-
icon="icon-dl-close"
|
|
14
|
-
@click="isOpenedStudioModal = false"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
<DlStudioLayout>
|
|
18
|
-
<template #header>
|
|
19
|
-
<studio-header
|
|
20
|
-
:expand-left-drawer="expandLeftDrawer"
|
|
21
|
-
@update:expand-left-drawer="handleExpandLeftDrawer"
|
|
22
|
-
/>
|
|
23
|
-
</template>
|
|
24
|
-
<template #left-menu>
|
|
25
|
-
<left-menu-content />
|
|
26
|
-
</template>
|
|
27
|
-
<template #leftDrawer>
|
|
28
|
-
<studio-left-drawer />
|
|
29
|
-
</template>
|
|
30
|
-
<template #rightDrawer>
|
|
31
|
-
<studio-tabs-menu />
|
|
32
|
-
</template>
|
|
33
|
-
<template #mainContent>
|
|
34
|
-
<studio-main-content />
|
|
35
|
-
</template>
|
|
36
|
-
<template #footer>
|
|
37
|
-
<studio-footer />
|
|
38
|
-
</template>
|
|
39
|
-
</DlStudioLayout>
|
|
40
|
-
</div>
|
|
41
|
-
<dl-button @click="isOpenedDatasetBrowserModal = true">
|
|
42
|
-
Dataset Browser
|
|
43
|
-
</dl-button>
|
|
44
|
-
<div
|
|
45
|
-
v-if="isOpenedDatasetBrowserModal"
|
|
46
|
-
class="fullscreen-template"
|
|
47
|
-
>
|
|
48
|
-
<div class="fullscreen-template__close">
|
|
49
|
-
<dl-button
|
|
50
|
-
icon="icon-dl-close"
|
|
51
|
-
flat
|
|
52
|
-
@click="isOpenedDatasetBrowserModal = false"
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
<dl-dataset-browser>
|
|
56
|
-
<template #header>
|
|
57
|
-
<dataset-header />
|
|
58
|
-
</template>
|
|
59
|
-
<template #leftDrawer>
|
|
60
|
-
<dataset-left-drawer />
|
|
61
|
-
</template>
|
|
62
|
-
<template #rightDrawer>
|
|
63
|
-
<dataset-right-drawer />
|
|
64
|
-
</template>
|
|
65
|
-
<template #mainContent>
|
|
66
|
-
<dataset-main-content />
|
|
67
|
-
</template>
|
|
68
|
-
<template #footer>
|
|
69
|
-
<dataset-footer />
|
|
70
|
-
</template>
|
|
71
|
-
</dl-dataset-browser>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</template>
|
|
75
|
-
|
|
76
|
-
<script lang="ts">
|
|
77
|
-
import { defineComponent, ref } from 'vue-demi'
|
|
78
|
-
import { DlButton } from '../components'
|
|
79
|
-
import DlStudioLayout from '../layouts/DlStudioLayout/DlStudioLayout.vue'
|
|
80
|
-
import StudioHeader from '../layouts/DlStudioLayout/components/Demo/StudioHeader.vue'
|
|
81
|
-
import StudioMainContent from '../layouts/DlStudioLayout/components/Demo/StudioMainContent.vue'
|
|
82
|
-
import LeftMenuContent from '../layouts/DlStudioLayout/components/Demo/LeftMenuContent.vue'
|
|
83
|
-
import StudioTabsMenu from '../layouts/DlStudioLayout/components/Demo/StudioTabsMenu.vue'
|
|
84
|
-
import StudioLeftDrawer from '../layouts/DlStudioLayout/components/Demo/StudioLeftDrawer.vue'
|
|
85
|
-
import StudioFooter from '../layouts/DlStudioLayout/components/Demo/StudioFooter.vue'
|
|
86
|
-
import DlDatasetBrowser from '../layouts/DlDatasetBrowser/DlDatasetBrowser.vue'
|
|
87
|
-
import DatasetHeader from '../layouts/DlDatasetBrowser/DemoComponents/DatasetHeader.vue'
|
|
88
|
-
import DatasetMainContent from '../layouts/DlDatasetBrowser/DemoComponents/DatasetMainContent.vue'
|
|
89
|
-
import DatasetLeftDrawer from '../layouts/DlDatasetBrowser/DemoComponents/DatasetLeftDrawer.vue'
|
|
90
|
-
import DatasetRightDrawer from '../layouts/DlDatasetBrowser/DemoComponents/DatasetRightDrawer.vue'
|
|
91
|
-
import DatasetFooter from '../layouts/DlDatasetBrowser/DemoComponents/DatasetFooter.vue'
|
|
92
|
-
|
|
93
|
-
export default defineComponent({
|
|
94
|
-
name: 'DlPageLayoutDemo',
|
|
95
|
-
components: {
|
|
96
|
-
DlButton,
|
|
97
|
-
DlStudioLayout,
|
|
98
|
-
StudioHeader,
|
|
99
|
-
StudioMainContent,
|
|
100
|
-
StudioTabsMenu,
|
|
101
|
-
StudioLeftDrawer,
|
|
102
|
-
StudioFooter,
|
|
103
|
-
LeftMenuContent,
|
|
104
|
-
DlDatasetBrowser,
|
|
105
|
-
DatasetHeader,
|
|
106
|
-
DatasetLeftDrawer,
|
|
107
|
-
DatasetRightDrawer,
|
|
108
|
-
DatasetFooter,
|
|
109
|
-
DatasetMainContent
|
|
110
|
-
},
|
|
111
|
-
setup() {
|
|
112
|
-
const expandLeftDrawer = ref(false)
|
|
113
|
-
const isOpenedDatasetBrowserModal = ref(false)
|
|
114
|
-
const isOpenedStudioModal = ref(false)
|
|
115
|
-
|
|
116
|
-
const handleExpandLeftDrawer = (value: any) => {
|
|
117
|
-
expandLeftDrawer.value = value
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
expandLeftDrawer,
|
|
122
|
-
handleExpandLeftDrawer,
|
|
123
|
-
isOpenedDatasetBrowserModal,
|
|
124
|
-
isOpenedStudioModal
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
})
|
|
128
|
-
</script>
|
|
129
|
-
|
|
130
|
-
<style scoped lang="scss">
|
|
131
|
-
.fullscreen-template {
|
|
132
|
-
position: fixed;
|
|
133
|
-
height: 100vh;
|
|
134
|
-
width: 100%;
|
|
135
|
-
top: 0;
|
|
136
|
-
left: 0;
|
|
137
|
-
background-color: var(--dl-color-panel-background);
|
|
138
|
-
z-index: 1000;
|
|
139
|
-
|
|
140
|
-
&__close {
|
|
141
|
-
position: absolute;
|
|
142
|
-
right: 10px;
|
|
143
|
-
z-index: 2;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
</style>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="navbar-demo-content">
|
|
3
|
-
<div style="display: flex; height: 100%; align-items: center">
|
|
4
|
-
<dl-button
|
|
5
|
-
flat
|
|
6
|
-
icon="icon-dl-hamburger-menu"
|
|
7
|
-
color="secondary"
|
|
8
|
-
size="xl"
|
|
9
|
-
@click="updateExpandLeftDrawer"
|
|
10
|
-
/>
|
|
11
|
-
<dl-button
|
|
12
|
-
flat
|
|
13
|
-
color="secondary"
|
|
14
|
-
icon="icon-dl-left-chevron"
|
|
15
|
-
label="Go to: Dataset Browser"
|
|
16
|
-
/>
|
|
17
|
-
</div>
|
|
18
|
-
<div
|
|
19
|
-
style="
|
|
20
|
-
display: flex;
|
|
21
|
-
height: 100%;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: end;
|
|
24
|
-
padding-right: 10px;
|
|
25
|
-
"
|
|
26
|
-
>
|
|
27
|
-
<dl-button flat>
|
|
28
|
-
<dl-icon
|
|
29
|
-
size="16px"
|
|
30
|
-
icon="icon-dl-light-theme"
|
|
31
|
-
color="dl-color-warning"
|
|
32
|
-
/>
|
|
33
|
-
</dl-button>
|
|
34
|
-
<dl-button flat>
|
|
35
|
-
<dl-icon
|
|
36
|
-
size="16px"
|
|
37
|
-
icon="icon-dl-dark-theme"
|
|
38
|
-
color="dl-color-warning"
|
|
39
|
-
/>
|
|
40
|
-
</dl-button>
|
|
41
|
-
<dl-button
|
|
42
|
-
flat
|
|
43
|
-
color="secondary"
|
|
44
|
-
icon="icon-dl-question"
|
|
45
|
-
/>
|
|
46
|
-
<dl-button
|
|
47
|
-
flat
|
|
48
|
-
color="secondary"
|
|
49
|
-
>
|
|
50
|
-
<dl-icon
|
|
51
|
-
size="16px"
|
|
52
|
-
icon="icon-dl-notification"
|
|
53
|
-
/>
|
|
54
|
-
</dl-button>
|
|
55
|
-
<dl-button
|
|
56
|
-
flat
|
|
57
|
-
color="secondary"
|
|
58
|
-
icon="icon-dl-cloud-server"
|
|
59
|
-
/>
|
|
60
|
-
<dl-button
|
|
61
|
-
flat
|
|
62
|
-
color="secondary"
|
|
63
|
-
icon="icon-dl-magic"
|
|
64
|
-
/>
|
|
65
|
-
<dl-button flat>
|
|
66
|
-
<dl-avatar
|
|
67
|
-
tooltip="popcat@gmail.com"
|
|
68
|
-
size="25px"
|
|
69
|
-
>
|
|
70
|
-
<img src="https://popcat.click/twitter-card.jpg">
|
|
71
|
-
</dl-avatar>
|
|
72
|
-
</dl-button>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
76
|
-
|
|
77
|
-
<script lang="ts">
|
|
78
|
-
import { defineComponent, computed, ref } from 'vue-demi'
|
|
79
|
-
import { DlButton, DlAvatar, DlIcon } from '../../../../components'
|
|
80
|
-
|
|
81
|
-
export default defineComponent({
|
|
82
|
-
name: 'StudioHeader',
|
|
83
|
-
components: {
|
|
84
|
-
DlButton,
|
|
85
|
-
DlAvatar,
|
|
86
|
-
DlIcon
|
|
87
|
-
},
|
|
88
|
-
props: {
|
|
89
|
-
expandLeftDrawer: {
|
|
90
|
-
type: Boolean
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
emits: ['update:expandLeftDrawer'],
|
|
94
|
-
setup(props, ctx) {
|
|
95
|
-
const expandLeftDrawerProp = computed<boolean>(
|
|
96
|
-
() => props.expandLeftDrawer
|
|
97
|
-
)
|
|
98
|
-
const isExpandedLeftDrawer = ref(expandLeftDrawerProp.value)
|
|
99
|
-
|
|
100
|
-
const updateExpandLeftDrawer = () => {
|
|
101
|
-
isExpandedLeftDrawer.value = !isExpandedLeftDrawer.value
|
|
102
|
-
ctx.emit('update:expandLeftDrawer', isExpandedLeftDrawer.value)
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
updateExpandLeftDrawer
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
})
|
|
110
|
-
</script>
|
|
111
|
-
|
|
112
|
-
<style scoped>
|
|
113
|
-
.navbar-demo-content {
|
|
114
|
-
height: 100%;
|
|
115
|
-
display: grid;
|
|
116
|
-
grid-template-columns: 1fr 1fr;
|
|
117
|
-
width: 100%;
|
|
118
|
-
justify-self: center;
|
|
119
|
-
justify-content: center;
|
|
120
|
-
}
|
|
121
|
-
</style>
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="dl-layout-drawer"
|
|
4
|
-
:style="cssVars"
|
|
5
|
-
@mouseenter="onMouseEnter"
|
|
6
|
-
@mouseleave="onMouseLeave"
|
|
7
|
-
>
|
|
8
|
-
<div style="height: 100%; position: relative">
|
|
9
|
-
<div
|
|
10
|
-
v-if="location === 'right'"
|
|
11
|
-
class="dl-layout-drawer__wrapper"
|
|
12
|
-
>
|
|
13
|
-
<dl-icon
|
|
14
|
-
:icon="expandIcon"
|
|
15
|
-
size="25px"
|
|
16
|
-
class="dl-layout-drawer__wrapper__expand-icon"
|
|
17
|
-
:class="{ expanded: !isExpanded }"
|
|
18
|
-
@click="toggleExpandDrawer"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
<slot />
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script lang="ts">
|
|
27
|
-
import { defineComponent, ref, computed, onMounted, watch } from 'vue-demi'
|
|
28
|
-
import DlIcon from '../../../essential/DlIcon/DlIcon.vue'
|
|
29
|
-
|
|
30
|
-
export default defineComponent({
|
|
31
|
-
name: 'NavigationDrawer',
|
|
32
|
-
components: {
|
|
33
|
-
DlIcon
|
|
34
|
-
},
|
|
35
|
-
props: {
|
|
36
|
-
position: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: 'relative',
|
|
39
|
-
validator: (val: string) => ['relative', 'absolute'].includes(val)
|
|
40
|
-
},
|
|
41
|
-
location: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: 'left',
|
|
44
|
-
validator: (val: string) => ['left', 'right'].includes(val)
|
|
45
|
-
},
|
|
46
|
-
expandDrawer: {
|
|
47
|
-
type: Boolean
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
emits: ['expand'],
|
|
51
|
-
setup(props, context) {
|
|
52
|
-
const isVisible = ref(true)
|
|
53
|
-
const propsExpandDrawer = computed(() => props.expandDrawer)
|
|
54
|
-
const isExpanded = ref(propsExpandDrawer.value)
|
|
55
|
-
const drawerWidth = ref('')
|
|
56
|
-
const LARGE_WIDTH = '250px'
|
|
57
|
-
const SMALL_WIDTH = '0px'
|
|
58
|
-
|
|
59
|
-
const onMouseEnter = () => {
|
|
60
|
-
if (isExpanded.value) return
|
|
61
|
-
drawerWidth.value = LARGE_WIDTH
|
|
62
|
-
isVisible.value = true
|
|
63
|
-
}
|
|
64
|
-
const onMouseLeave = () => {
|
|
65
|
-
if (isExpanded.value) return
|
|
66
|
-
drawerWidth.value = SMALL_WIDTH
|
|
67
|
-
isVisible.value = false
|
|
68
|
-
}
|
|
69
|
-
const expandIcon = computed(() =>
|
|
70
|
-
props.location === 'left'
|
|
71
|
-
? 'icon-dl-left-chevron'
|
|
72
|
-
: 'icon-dl-right-chevron'
|
|
73
|
-
)
|
|
74
|
-
const toggleExpandDrawer = () => {
|
|
75
|
-
isExpanded.value = !isExpanded.value
|
|
76
|
-
context.emit('expand', isExpanded.value)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
onMounted(() => {
|
|
80
|
-
drawerWidth.value = SMALL_WIDTH
|
|
81
|
-
})
|
|
82
|
-
watch(isExpanded, (value) => {
|
|
83
|
-
isVisible.value = value
|
|
84
|
-
drawerWidth.value = value ? LARGE_WIDTH : SMALL_WIDTH
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
watch(propsExpandDrawer, (value) => {
|
|
88
|
-
isExpanded.value = value
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
const cssVars = computed(() => {
|
|
92
|
-
return {
|
|
93
|
-
'--dl-layout-drawer-width': isExpanded.value
|
|
94
|
-
? LARGE_WIDTH
|
|
95
|
-
: SMALL_WIDTH,
|
|
96
|
-
'--dl-layout-position': props.position,
|
|
97
|
-
'--dl-layout-drawer-overflow':
|
|
98
|
-
props.position === 'absolute' ? 'hidden' : null
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
return {
|
|
102
|
-
cssVars,
|
|
103
|
-
onMouseEnter,
|
|
104
|
-
drawerWidth,
|
|
105
|
-
onMouseLeave,
|
|
106
|
-
isVisible,
|
|
107
|
-
expandIcon,
|
|
108
|
-
isExpanded,
|
|
109
|
-
toggleExpandDrawer
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
</script>
|
|
114
|
-
|
|
115
|
-
<style scoped lang="scss">
|
|
116
|
-
.dl-layout-drawer {
|
|
117
|
-
position: var(--dl-layout-position);
|
|
118
|
-
z-index: 1;
|
|
119
|
-
width: var(--dl-layout-drawer-width);
|
|
120
|
-
height: 100%;
|
|
121
|
-
overflow: var(--dl-layout-drawer-overflow);
|
|
122
|
-
transition: all 300ms;
|
|
123
|
-
box-shadow: 1px 1px 9px rgba(0, 0, 0, 0.08);
|
|
124
|
-
background-color: transparent;
|
|
125
|
-
|
|
126
|
-
&__wrapper {
|
|
127
|
-
position: absolute;
|
|
128
|
-
top: 70px;
|
|
129
|
-
left: -17px;
|
|
130
|
-
cursor: pointer;
|
|
131
|
-
color: var(--dl-color-lighter);
|
|
132
|
-
text-align: right;
|
|
133
|
-
margin-top: 8px;
|
|
134
|
-
background-color: var(--dl-color-bg);
|
|
135
|
-
border-radius: 50px;
|
|
136
|
-
|
|
137
|
-
&__expand-icon {
|
|
138
|
-
display: flex !important;
|
|
139
|
-
transition: all 300ms;
|
|
140
|
-
|
|
141
|
-
&.expanded {
|
|
142
|
-
transform: rotate(180deg);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
</style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|