quasar-ui-danx 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -109
- package/demo/.eslintrc.cjs +15 -0
- package/demo/.prettierrc.json +8 -0
- package/demo/.vscode/extensions.json +7 -0
- package/demo/README.md +45 -0
- package/demo/env.d.ts +5 -0
- package/demo/index.html +13 -0
- package/demo/package.json +42 -0
- package/demo/public/favicon.ico +0 -0
- package/demo/src/App.vue +86 -0
- package/demo/src/assets/base.css +86 -0
- package/demo/src/assets/logo.svg +1 -0
- package/demo/src/assets/main.css +35 -0
- package/demo/src/components/DemoActionTable/demoTableActions.ts +26 -0
- package/demo/src/components/DemoActionTable/demoTableCallbacks.ts +109 -0
- package/demo/src/components/DemoActionTable/demoTableColumns.ts +34 -0
- package/demo/src/components/DemoActionTable/demoTableFilterFields.ts +40 -0
- package/demo/src/components/HelloWorld.vue +41 -0
- package/demo/src/components/TheWelcome.vue +88 -0
- package/demo/src/components/WelcomeItem.vue +87 -0
- package/demo/src/components/__tests__/HelloWorld.spec.ts +11 -0
- package/demo/src/components/icons/IconCommunity.vue +7 -0
- package/demo/src/components/icons/IconDocumentation.vue +7 -0
- package/demo/src/components/icons/IconEcosystem.vue +7 -0
- package/demo/src/components/icons/IconSupport.vue +7 -0
- package/demo/src/components/icons/IconTooling.vue +19 -0
- package/demo/src/main.ts +11 -0
- package/demo/src/router/index.ts +28 -0
- package/demo/src/views/AboutView.vue +15 -0
- package/demo/src/views/DemoView.vue +17 -0
- package/demo/src/views/HomeView.vue +9 -0
- package/demo/tsconfig.app.json +14 -0
- package/demo/tsconfig.json +19 -0
- package/demo/tsconfig.node.json +19 -0
- package/demo/tsconfig.vitest.json +11 -0
- package/demo/vite.config.ts +18 -0
- package/demo/vitest.config.ts +14 -0
- package/dist/components/ActionTable/Columns/index.d.ts +4 -0
- package/dist/components/ActionTable/Filters/index.d.ts +6 -0
- package/dist/components/ActionTable/Form/Fields/index.d.ts +24 -0
- package/dist/components/ActionTable/Form/index.d.ts +2 -0
- package/dist/components/ActionTable/Layouts/ActionTableLayout.vue.d.ts +12 -0
- package/dist/components/ActionTable/Layouts/index.d.ts +1 -0
- package/dist/components/ActionTable/index.d.ts +12 -0
- package/dist/components/ActionTable/listControls.d.ts +50 -0
- package/dist/components/ActionTable/listHelpers.d.ts +12 -0
- package/dist/components/ActionTable/tableColumns.d.ts +8 -0
- package/dist/components/AuditHistory/index.d.ts +2 -0
- package/dist/components/DragAndDrop/dragAndDrop.d.ts +111 -0
- package/dist/components/DragAndDrop/index.d.ts +4 -0
- package/dist/components/DragAndDrop/listDragAndDrop.d.ts +74 -0
- package/dist/components/PanelsDrawer/index.d.ts +3 -0
- package/dist/components/Utility/Buttons/index.d.ts +2 -0
- package/dist/components/Utility/Controls/index.d.ts +1 -0
- package/dist/components/Utility/Dialogs/index.d.ts +5 -0
- package/dist/components/Utility/Files/index.d.ts +2 -0
- package/dist/components/Utility/Formats/index.d.ts +5 -0
- package/dist/components/Utility/Layouts/index.d.ts +2 -0
- package/dist/components/Utility/Popovers/index.d.ts +2 -0
- package/dist/components/Utility/Tabs/index.d.ts +2 -0
- package/dist/components/Utility/Tools/index.d.ts +3 -0
- package/dist/components/Utility/Transitions/index.d.ts +3 -0
- package/dist/components/Utility/index.d.ts +10 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/danx.es.js +6 -6
- package/dist/danx.umd.js +2 -2
- package/dist/helpers/FileUpload.d.ts +107 -0
- package/dist/helpers/FlashMessages.d.ts +24 -0
- package/dist/helpers/actions.d.ts +58 -0
- package/dist/helpers/array.d.ts +16 -0
- package/dist/helpers/compatibility.d.ts +8 -0
- package/dist/helpers/date.d.ts +1 -0
- package/dist/helpers/download.d.ts +1 -0
- package/dist/helpers/downloadPdf.d.ts +24 -0
- package/dist/helpers/files.d.ts +1 -0
- package/dist/helpers/formats.d.ts +112 -0
- package/dist/helpers/http.d.ts +23 -0
- package/dist/helpers/index.d.ts +15 -0
- package/dist/helpers/multiFileUpload.d.ts +11 -0
- package/dist/helpers/singleFileUpload.d.ts +11 -0
- package/dist/helpers/storage.d.ts +2 -0
- package/dist/helpers/utils.d.ts +46 -0
- package/dist/svg/index.d.ts +12 -0
- package/dist/vendor/tinymce-config.d.ts +1 -0
- package/package.json +4 -3
- package/src/helpers/FileUpload.ts +16 -7
- package/tsconfig.json +24 -13
- package/vite.config.js +7 -1
@@ -0,0 +1,40 @@
|
|
1
|
+
import { computed } from "vue";
|
2
|
+
import { filterFieldOptions } from "./demoTableActions";
|
3
|
+
|
4
|
+
export const filterFields = computed(() => [
|
5
|
+
{
|
6
|
+
name: "Dates",
|
7
|
+
flat: true,
|
8
|
+
fields: [
|
9
|
+
{
|
10
|
+
type: "date-range",
|
11
|
+
name: "filterDateRange",
|
12
|
+
label: "Run Date(s)",
|
13
|
+
inline: true,
|
14
|
+
calcValue: f => f.filterDateRange,
|
15
|
+
filterBy: v => ({
|
16
|
+
filterDateRange: v || undefined
|
17
|
+
})
|
18
|
+
},
|
19
|
+
]
|
20
|
+
},
|
21
|
+
{
|
22
|
+
name: "Details",
|
23
|
+
fields: [
|
24
|
+
{
|
25
|
+
type: "multi-select",
|
26
|
+
name: "id",
|
27
|
+
label: "Name",
|
28
|
+
placeholder: "All Items",
|
29
|
+
options: filterFieldOptions.value["names"],
|
30
|
+
},
|
31
|
+
{
|
32
|
+
type: "multi-select",
|
33
|
+
name: "status",
|
34
|
+
label: "Status",
|
35
|
+
placeholder: "All Statuses",
|
36
|
+
options: filterFieldOptions.value["statuses"],
|
37
|
+
},
|
38
|
+
]
|
39
|
+
},
|
40
|
+
]);
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
defineProps<{
|
3
|
+
msg: string
|
4
|
+
}>()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div class="greetings">
|
9
|
+
<h1 class="green">{{ msg }}</h1>
|
10
|
+
<h3>
|
11
|
+
You’ve successfully created a project with
|
12
|
+
<a href="https://vitejs.dev/" target="_blank" rel="noopener">Vite</a> +
|
13
|
+
<a href="https://vuejs.org/" target="_blank" rel="noopener">Vue 3</a>. What's next?
|
14
|
+
</h3>
|
15
|
+
</div>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<style scoped>
|
19
|
+
h1 {
|
20
|
+
font-weight: 500;
|
21
|
+
font-size: 2.6rem;
|
22
|
+
position: relative;
|
23
|
+
top: -10px;
|
24
|
+
}
|
25
|
+
|
26
|
+
h3 {
|
27
|
+
font-size: 1.2rem;
|
28
|
+
}
|
29
|
+
|
30
|
+
.greetings h1,
|
31
|
+
.greetings h3 {
|
32
|
+
text-align: center;
|
33
|
+
}
|
34
|
+
|
35
|
+
@media (min-width: 1024px) {
|
36
|
+
.greetings h1,
|
37
|
+
.greetings h3 {
|
38
|
+
text-align: left;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
</style>
|
@@ -0,0 +1,88 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import WelcomeItem from './WelcomeItem.vue'
|
3
|
+
import DocumentationIcon from './icons/IconDocumentation.vue'
|
4
|
+
import ToolingIcon from './icons/IconTooling.vue'
|
5
|
+
import EcosystemIcon from './icons/IconEcosystem.vue'
|
6
|
+
import CommunityIcon from './icons/IconCommunity.vue'
|
7
|
+
import SupportIcon from './icons/IconSupport.vue'
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<template>
|
11
|
+
<WelcomeItem>
|
12
|
+
<template #icon>
|
13
|
+
<DocumentationIcon />
|
14
|
+
</template>
|
15
|
+
<template #heading>Documentation</template>
|
16
|
+
|
17
|
+
Vue’s
|
18
|
+
<a href="https://vuejs.org/" target="_blank" rel="noopener">official documentation</a>
|
19
|
+
provides you with all information you need to get started.
|
20
|
+
</WelcomeItem>
|
21
|
+
|
22
|
+
<WelcomeItem>
|
23
|
+
<template #icon>
|
24
|
+
<ToolingIcon />
|
25
|
+
</template>
|
26
|
+
<template #heading>Tooling</template>
|
27
|
+
|
28
|
+
This project is served and bundled with
|
29
|
+
<a href="https://vitejs.dev/guide/features.html" target="_blank" rel="noopener">Vite</a>. The
|
30
|
+
recommended IDE setup is
|
31
|
+
<a href="https://code.visualstudio.com/" target="_blank" rel="noopener">VSCode</a> +
|
32
|
+
<a href="https://github.com/johnsoncodehk/volar" target="_blank" rel="noopener">Volar</a>. If
|
33
|
+
you need to test your components and web pages, check out
|
34
|
+
<a href="https://www.cypress.io/" target="_blank" rel="noopener">Cypress</a> and
|
35
|
+
<a href="https://on.cypress.io/component" target="_blank" rel="noopener"
|
36
|
+
>Cypress Component Testing</a
|
37
|
+
>.
|
38
|
+
|
39
|
+
<br />
|
40
|
+
|
41
|
+
More instructions are available in <code>README.md</code>.
|
42
|
+
</WelcomeItem>
|
43
|
+
|
44
|
+
<WelcomeItem>
|
45
|
+
<template #icon>
|
46
|
+
<EcosystemIcon />
|
47
|
+
</template>
|
48
|
+
<template #heading>Ecosystem</template>
|
49
|
+
|
50
|
+
Get official tools and libraries for your project:
|
51
|
+
<a href="https://pinia.vuejs.org/" target="_blank" rel="noopener">Pinia</a>,
|
52
|
+
<a href="https://router.vuejs.org/" target="_blank" rel="noopener">Vue Router</a>,
|
53
|
+
<a href="https://test-utils.vuejs.org/" target="_blank" rel="noopener">Vue Test Utils</a>, and
|
54
|
+
<a href="https://github.com/vuejs/devtools" target="_blank" rel="noopener">Vue Dev Tools</a>. If
|
55
|
+
you need more resources, we suggest paying
|
56
|
+
<a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">Awesome Vue</a>
|
57
|
+
a visit.
|
58
|
+
</WelcomeItem>
|
59
|
+
|
60
|
+
<WelcomeItem>
|
61
|
+
<template #icon>
|
62
|
+
<CommunityIcon />
|
63
|
+
</template>
|
64
|
+
<template #heading>Community</template>
|
65
|
+
|
66
|
+
Got stuck? Ask your question on
|
67
|
+
<a href="https://chat.vuejs.org" target="_blank" rel="noopener">Vue Land</a>, our official
|
68
|
+
Discord server, or
|
69
|
+
<a href="https://stackoverflow.com/questions/tagged/vue.js" target="_blank" rel="noopener"
|
70
|
+
>StackOverflow</a
|
71
|
+
>. You should also subscribe to
|
72
|
+
<a href="https://news.vuejs.org" target="_blank" rel="noopener">our mailing list</a> and follow
|
73
|
+
the official
|
74
|
+
<a href="https://twitter.com/vuejs" target="_blank" rel="noopener">@vuejs</a>
|
75
|
+
twitter account for latest news in the Vue world.
|
76
|
+
</WelcomeItem>
|
77
|
+
|
78
|
+
<WelcomeItem>
|
79
|
+
<template #icon>
|
80
|
+
<SupportIcon />
|
81
|
+
</template>
|
82
|
+
<template #heading>Support Vue</template>
|
83
|
+
|
84
|
+
As an independent project, Vue relies on community backing for its sustainability. You can help
|
85
|
+
us by
|
86
|
+
<a href="https://vuejs.org/sponsor/" target="_blank" rel="noopener">becoming a sponsor</a>.
|
87
|
+
</WelcomeItem>
|
88
|
+
</template>
|
@@ -0,0 +1,87 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="item">
|
3
|
+
<i>
|
4
|
+
<slot name="icon"></slot>
|
5
|
+
</i>
|
6
|
+
<div class="details">
|
7
|
+
<h3>
|
8
|
+
<slot name="heading"></slot>
|
9
|
+
</h3>
|
10
|
+
<slot></slot>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<style scoped>
|
16
|
+
.item {
|
17
|
+
margin-top: 2rem;
|
18
|
+
display: flex;
|
19
|
+
position: relative;
|
20
|
+
}
|
21
|
+
|
22
|
+
.details {
|
23
|
+
flex: 1;
|
24
|
+
margin-left: 1rem;
|
25
|
+
}
|
26
|
+
|
27
|
+
i {
|
28
|
+
display: flex;
|
29
|
+
place-items: center;
|
30
|
+
place-content: center;
|
31
|
+
width: 32px;
|
32
|
+
height: 32px;
|
33
|
+
|
34
|
+
color: var(--color-text);
|
35
|
+
}
|
36
|
+
|
37
|
+
h3 {
|
38
|
+
font-size: 1.2rem;
|
39
|
+
font-weight: 500;
|
40
|
+
margin-bottom: 0.4rem;
|
41
|
+
color: var(--color-heading);
|
42
|
+
}
|
43
|
+
|
44
|
+
@media (min-width: 1024px) {
|
45
|
+
.item {
|
46
|
+
margin-top: 0;
|
47
|
+
padding: 0.4rem 0 1rem calc(var(--section-gap) / 2);
|
48
|
+
}
|
49
|
+
|
50
|
+
i {
|
51
|
+
top: calc(50% - 25px);
|
52
|
+
left: -26px;
|
53
|
+
position: absolute;
|
54
|
+
border: 1px solid var(--color-border);
|
55
|
+
background: var(--color-background);
|
56
|
+
border-radius: 8px;
|
57
|
+
width: 50px;
|
58
|
+
height: 50px;
|
59
|
+
}
|
60
|
+
|
61
|
+
.item:before {
|
62
|
+
content: ' ';
|
63
|
+
border-left: 1px solid var(--color-border);
|
64
|
+
position: absolute;
|
65
|
+
left: 0;
|
66
|
+
bottom: calc(50% + 25px);
|
67
|
+
height: calc(50% - 25px);
|
68
|
+
}
|
69
|
+
|
70
|
+
.item:after {
|
71
|
+
content: ' ';
|
72
|
+
border-left: 1px solid var(--color-border);
|
73
|
+
position: absolute;
|
74
|
+
left: 0;
|
75
|
+
top: calc(50% + 25px);
|
76
|
+
height: calc(50% - 25px);
|
77
|
+
}
|
78
|
+
|
79
|
+
.item:first-of-type:before {
|
80
|
+
display: none;
|
81
|
+
}
|
82
|
+
|
83
|
+
.item:last-of-type:after {
|
84
|
+
display: none;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
</style>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { describe, it, expect } from 'vitest'
|
2
|
+
|
3
|
+
import { mount } from '@vue/test-utils'
|
4
|
+
import HelloWorld from '../HelloWorld.vue'
|
5
|
+
|
6
|
+
describe('HelloWorld', () => {
|
7
|
+
it('renders properly', () => {
|
8
|
+
const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } })
|
9
|
+
expect(wrapper.text()).toContain('Hello Vitest')
|
10
|
+
})
|
11
|
+
})
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<template>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
3
|
+
<path
|
4
|
+
d="M15 4a1 1 0 1 0 0 2V4zm0 11v-1a1 1 0 0 0-1 1h1zm0 4l-.707.707A1 1 0 0 0 16 19h-1zm-4-4l.707-.707A1 1 0 0 0 11 14v1zm-4.707-1.293a1 1 0 0 0-1.414 1.414l1.414-1.414zm-.707.707l-.707-.707.707.707zM9 11v-1a1 1 0 0 0-.707.293L9 11zm-4 0h1a1 1 0 0 0-1-1v1zm0 4H4a1 1 0 0 0 1.707.707L5 15zm10-9h2V4h-2v2zm2 0a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2zm1 1v6h2V7h-2zm0 6a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2zm-1 1h-2v2h2v-2zm-3 1v4h2v-4h-2zm1.707 3.293l-4-4-1.414 1.414 4 4 1.414-1.414zM11 14H7v2h4v-2zm-4 0c-.276 0-.525-.111-.707-.293l-1.414 1.414C5.42 15.663 6.172 16 7 16v-2zm-.707 1.121l3.414-3.414-1.414-1.414-3.414 3.414 1.414 1.414zM9 12h4v-2H9v2zm4 0a3 3 0 0 0 3-3h-2a1 1 0 0 1-1 1v2zm3-3V3h-2v6h2zm0-6a3 3 0 0 0-3-3v2a1 1 0 0 1 1 1h2zm-3-3H3v2h10V0zM3 0a3 3 0 0 0-3 3h2a1 1 0 0 1 1-1V0zM0 3v6h2V3H0zm0 6a3 3 0 0 0 3 3v-2a1 1 0 0 1-1-1H0zm3 3h2v-2H3v2zm1-1v4h2v-4H4zm1.707 4.707l.586-.586-1.414-1.414-.586.586 1.414 1.414z"
|
5
|
+
/>
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<template>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" fill="currentColor">
|
3
|
+
<path
|
4
|
+
d="M11 2.253a1 1 0 1 0-2 0h2zm-2 13a1 1 0 1 0 2 0H9zm.447-12.167a1 1 0 1 0 1.107-1.666L9.447 3.086zM1 2.253L.447 1.42A1 1 0 0 0 0 2.253h1zm0 13H0a1 1 0 0 0 1.553.833L1 15.253zm8.447.833a1 1 0 1 0 1.107-1.666l-1.107 1.666zm0-14.666a1 1 0 1 0 1.107 1.666L9.447 1.42zM19 2.253h1a1 1 0 0 0-.447-.833L19 2.253zm0 13l-.553.833A1 1 0 0 0 20 15.253h-1zm-9.553-.833a1 1 0 1 0 1.107 1.666L9.447 14.42zM9 2.253v13h2v-13H9zm1.553-.833C9.203.523 7.42 0 5.5 0v2c1.572 0 2.961.431 3.947 1.086l1.107-1.666zM5.5 0C3.58 0 1.797.523.447 1.42l1.107 1.666C2.539 2.431 3.928 2 5.5 2V0zM0 2.253v13h2v-13H0zm1.553 13.833C2.539 15.431 3.928 15 5.5 15v-2c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM5.5 15c1.572 0 2.961.431 3.947 1.086l1.107-1.666C9.203 13.523 7.42 13 5.5 13v2zm5.053-11.914C11.539 2.431 12.928 2 14.5 2V0c-1.92 0-3.703.523-5.053 1.42l1.107 1.666zM14.5 2c1.573 0 2.961.431 3.947 1.086l1.107-1.666C18.203.523 16.421 0 14.5 0v2zm3.5.253v13h2v-13h-2zm1.553 12.167C18.203 13.523 16.421 13 14.5 13v2c1.573 0 2.961.431 3.947 1.086l1.107-1.666zM14.5 13c-1.92 0-3.703.523-5.053 1.42l1.107 1.666C11.539 15.431 12.928 15 14.5 15v-2z"
|
5
|
+
/>
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<template>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" fill="currentColor">
|
3
|
+
<path
|
4
|
+
d="M11.447 8.894a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm0 1.789a1 1 0 1 0 .894-1.789l-.894 1.789zM7.447 7.106a1 1 0 1 0-.894 1.789l.894-1.789zM10 9a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0H8zm9.447-5.606a1 1 0 1 0-.894-1.789l.894 1.789zm-2.894-.789a1 1 0 1 0 .894 1.789l-.894-1.789zm2 .789a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zM18 5a1 1 0 1 0-2 0h2zm-2 2.5a1 1 0 1 0 2 0h-2zm-5.447-4.606a1 1 0 1 0 .894-1.789l-.894 1.789zM9 1l.447-.894a1 1 0 0 0-.894 0L9 1zm-2.447.106a1 1 0 1 0 .894 1.789l-.894-1.789zm-6 3a1 1 0 1 0 .894 1.789L.553 4.106zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zm-2-.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 2.789a1 1 0 1 0 .894-1.789l-.894 1.789zM2 5a1 1 0 1 0-2 0h2zM0 7.5a1 1 0 1 0 2 0H0zm8.553 12.394a1 1 0 1 0 .894-1.789l-.894 1.789zm-1.106-2.789a1 1 0 1 0-.894 1.789l.894-1.789zm1.106 1a1 1 0 1 0 .894 1.789l-.894-1.789zm2.894.789a1 1 0 1 0-.894-1.789l.894 1.789zM8 19a1 1 0 1 0 2 0H8zm2-2.5a1 1 0 1 0-2 0h2zm-7.447.394a1 1 0 1 0 .894-1.789l-.894 1.789zM1 15H0a1 1 0 0 0 .553.894L1 15zm1-2.5a1 1 0 1 0-2 0h2zm12.553 2.606a1 1 0 1 0 .894 1.789l-.894-1.789zM17 15l.447.894A1 1 0 0 0 18 15h-1zm1-2.5a1 1 0 1 0-2 0h2zm-7.447-5.394l-2 1 .894 1.789 2-1-.894-1.789zm-1.106 1l-2-1-.894 1.789 2 1 .894-1.789zM8 9v2.5h2V9H8zm8.553-4.894l-2 1 .894 1.789 2-1-.894-1.789zm.894 0l-2-1-.894 1.789 2 1 .894-1.789zM16 5v2.5h2V5h-2zm-4.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zm-2.894-1l-2 1 .894 1.789 2-1L8.553.106zM1.447 5.894l2-1-.894-1.789-2 1 .894 1.789zm-.894 0l2 1 .894-1.789-2-1-.894 1.789zM0 5v2.5h2V5H0zm9.447 13.106l-2-1-.894 1.789 2 1 .894-1.789zm0 1.789l2-1-.894-1.789-2 1 .894 1.789zM10 19v-2.5H8V19h2zm-6.553-3.894l-2-1-.894 1.789 2 1 .894-1.789zM2 15v-2.5H0V15h2zm13.447 1.894l2-1-.894-1.789-2 1 .894 1.789zM18 15v-2.5h-2V15h2z"
|
5
|
+
/>
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<template>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor">
|
3
|
+
<path
|
4
|
+
d="M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.666.105 5.5 5.5 0 0 0-.114 7.665L10 18.78l8.39-8.4a5.5 5.5 0 0 0-.114-7.665 5.5 5.5 0 0 0-7.666-.105l-.61.61z"
|
5
|
+
/>
|
6
|
+
</svg>
|
7
|
+
</template>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- This icon is from <https://github.com/Templarian/MaterialDesign>, distributed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) license-->
|
2
|
+
<template>
|
3
|
+
<svg
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
5
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
6
|
+
aria-hidden="true"
|
7
|
+
role="img"
|
8
|
+
class="iconify iconify--mdi"
|
9
|
+
width="24"
|
10
|
+
height="24"
|
11
|
+
preserveAspectRatio="xMidYMid meet"
|
12
|
+
viewBox="0 0 24 24"
|
13
|
+
>
|
14
|
+
<path
|
15
|
+
d="M20 18v-4h-3v1h-2v-1H9v1H7v-1H4v4h16M6.33 8l-1.74 4H7v-1h2v1h6v-1h2v1h2.41l-1.74-4H6.33M9 5v1h6V5H9m12.84 7.61c.1.22.16.48.16.8V18c0 .53-.21 1-.6 1.41c-.4.4-.85.59-1.4.59H4c-.55 0-1-.19-1.4-.59C2.21 19 2 18.53 2 18v-4.59c0-.32.06-.58.16-.8L4.5 7.22C4.84 6.41 5.45 6 6.33 6H7V5c0-.55.18-1 .57-1.41C7.96 3.2 8.44 3 9 3h6c.56 0 1.04.2 1.43.59c.39.41.57.86.57 1.41v1h.67c.88 0 1.49.41 1.83 1.22l2.34 5.39z"
|
16
|
+
fill="currentColor"
|
17
|
+
></path>
|
18
|
+
</svg>
|
19
|
+
</template>
|
package/demo/src/main.ts
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
import { createRouter, createWebHistory } from "vue-router";
|
2
|
+
import HomeView from "../views/HomeView.vue";
|
3
|
+
|
4
|
+
const router = createRouter({
|
5
|
+
history: createWebHistory(import.meta.env.BASE_URL),
|
6
|
+
routes: [
|
7
|
+
{
|
8
|
+
path: "/",
|
9
|
+
name: "home",
|
10
|
+
component: HomeView
|
11
|
+
},
|
12
|
+
{
|
13
|
+
path: "/about",
|
14
|
+
name: "about",
|
15
|
+
// route level code-splitting
|
16
|
+
// this generates a separate chunk (About.[hash].js) for this route
|
17
|
+
// which is lazy-loaded when the route is visited.
|
18
|
+
component: () => import("../views/AboutView.vue")
|
19
|
+
},
|
20
|
+
{
|
21
|
+
path: "/demo",
|
22
|
+
name: "demo",
|
23
|
+
component: () => import("../views/DemoView.vue")
|
24
|
+
}
|
25
|
+
]
|
26
|
+
});
|
27
|
+
|
28
|
+
export default router;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { quasarPagination, selectedRows } from "@/components/DemoActionTable/demoTableActions";
|
3
|
+
import { columns } from "@/components/DemoActionTable/demoTableColumns";
|
4
|
+
import { ActionTable } from "quasar-ui-danx";
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<main>
|
9
|
+
<ActionTable
|
10
|
+
:columns="columns"
|
11
|
+
v-model:quasar-pagination="quasarPagination"
|
12
|
+
v-model:selected-rows="selectedRows"
|
13
|
+
label="Danx Action Table Demo"
|
14
|
+
name="danx-action-table"
|
15
|
+
/>
|
16
|
+
</main>
|
17
|
+
</template>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
3
|
+
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
4
|
+
"exclude": ["src/**/__tests__/*"],
|
5
|
+
"compilerOptions": {
|
6
|
+
"composite": true,
|
7
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
8
|
+
|
9
|
+
"baseUrl": ".",
|
10
|
+
"paths": {
|
11
|
+
"@/*": ["./src/*"]
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"files": [],
|
3
|
+
"include": [
|
4
|
+
"env.d.ts",
|
5
|
+
"src/**/*",
|
6
|
+
"src/**/*.vue"
|
7
|
+
],
|
8
|
+
"references": [
|
9
|
+
{
|
10
|
+
"path": "./tsconfig.node.json"
|
11
|
+
},
|
12
|
+
{
|
13
|
+
"path": "./tsconfig.app.json"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"path": "./tsconfig.vitest.json"
|
17
|
+
}
|
18
|
+
]
|
19
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"extends": "@tsconfig/node20/tsconfig.json",
|
3
|
+
"include": [
|
4
|
+
"vite.config.*",
|
5
|
+
"vitest.config.*",
|
6
|
+
"cypress.config.*",
|
7
|
+
"nightwatch.conf.*",
|
8
|
+
"playwright.config.*"
|
9
|
+
],
|
10
|
+
"compilerOptions": {
|
11
|
+
"composite": true,
|
12
|
+
"noEmit": true,
|
13
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
14
|
+
|
15
|
+
"module": "ESNext",
|
16
|
+
"moduleResolution": "Bundler",
|
17
|
+
"types": ["node"]
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { fileURLToPath, URL } from 'node:url'
|
2
|
+
|
3
|
+
import { defineConfig } from 'vite'
|
4
|
+
import vue from '@vitejs/plugin-vue'
|
5
|
+
import VueDevTools from 'vite-plugin-vue-devtools'
|
6
|
+
|
7
|
+
// https://vitejs.dev/config/
|
8
|
+
export default defineConfig({
|
9
|
+
plugins: [
|
10
|
+
vue(),
|
11
|
+
VueDevTools(),
|
12
|
+
],
|
13
|
+
resolve: {
|
14
|
+
alias: {
|
15
|
+
'@': fileURLToPath(new URL('./src', import.meta.url))
|
16
|
+
}
|
17
|
+
}
|
18
|
+
})
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { fileURLToPath } from 'node:url'
|
2
|
+
import { mergeConfig, defineConfig, configDefaults } from 'vitest/config'
|
3
|
+
import viteConfig from './vite.config'
|
4
|
+
|
5
|
+
export default mergeConfig(
|
6
|
+
viteConfig,
|
7
|
+
defineConfig({
|
8
|
+
test: {
|
9
|
+
environment: 'jsdom',
|
10
|
+
exclude: [...configDefaults.exclude, 'e2e/*'],
|
11
|
+
root: fileURLToPath(new URL('./', import.meta.url))
|
12
|
+
}
|
13
|
+
})
|
14
|
+
)
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export { default as ColumnListItem } from './ColumnListItem.vue';
|
2
|
+
export { default as ColumnSettingsDialog } from './ColumnSettingsDialog.vue';
|
3
|
+
export { default as TitleColumnFormat } from './TitleColumnFormat.vue';
|
4
|
+
export { default as VisibleColumnsToggleButtons } from './VisibleColumnsToggleButtons.vue';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { default as CollapsableFiltersSidebar } from './CollapsableFiltersSidebar.vue';
|
2
|
+
export { default as FilterableField } from './FilterableField.vue';
|
3
|
+
export { default as FilterFieldItem } from './FilterFieldItem.vue';
|
4
|
+
export { default as FilterFieldList } from './FilterFieldList.vue';
|
5
|
+
export { default as FilterListToggle } from './FilterListToggle.vue';
|
6
|
+
export { default as FilterToolbarLayout } from './FilterToolbarLayout.vue';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export { default as BooleanField } from './BooleanField.vue';
|
2
|
+
export { default as ConfirmPasswordField } from './ConfirmPasswordField.vue';
|
3
|
+
export { default as DateField } from './DateField.vue';
|
4
|
+
export { default as DateRangeField } from './DateRangeField.vue';
|
5
|
+
export { default as DateTimeField } from './DateTimeField.vue';
|
6
|
+
export { default as DateTimePicker } from './DateTimePicker.vue';
|
7
|
+
export { default as EditableDiv } from './EditableDiv.vue';
|
8
|
+
export { default as FieldLabel } from './FieldLabel.vue';
|
9
|
+
export { default as FileUploadButton } from './FileUploadButton.vue';
|
10
|
+
export { default as InlineDateTimeField } from './InlineDateTimeField.vue';
|
11
|
+
export { default as IntegerField } from './IntegerField.vue';
|
12
|
+
export { default as LabeledInput } from './LabeledInput.vue';
|
13
|
+
export { default as LabelValueBlock } from './LabelValueBlock.vue';
|
14
|
+
export { default as MultiFileField } from './MultiFileField.vue';
|
15
|
+
export { default as MultiKeywordField } from './MultiKeywordField.vue';
|
16
|
+
export { default as NewPasswordField } from './NewPasswordField.vue';
|
17
|
+
export { default as NumberField } from './NumberField.vue';
|
18
|
+
export { default as NumberRangeField } from './NumberRangeField.vue';
|
19
|
+
export { default as SelectDrawer } from './SelectDrawer.vue';
|
20
|
+
export { default as SelectField } from './SelectField.vue';
|
21
|
+
export { default as SelectWithChildrenField } from './SelectWithChildrenField.vue';
|
22
|
+
export { default as SingleFileField } from './SingleFileField.vue';
|
23
|
+
export { default as TextField } from './TextField.vue';
|
24
|
+
export { default as WysiwygField } from './WysiwygField.vue';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, {
|
2
|
+
top?(_: {}): any;
|
3
|
+
toolbar?(_: {}): any;
|
4
|
+
filters?(_: {}): any;
|
5
|
+
default?(_: {}): any;
|
6
|
+
}>;
|
7
|
+
export default _default;
|
8
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
9
|
+
new (): {
|
10
|
+
$slots: S;
|
11
|
+
};
|
12
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as ActionTableLayout } from './ActionTableLayout.vue';
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export * from './Columns';
|
2
|
+
export * from './Filters';
|
3
|
+
export * from './Form';
|
4
|
+
export * from './Layouts';
|
5
|
+
export * from './listControls';
|
6
|
+
export * from './listHelpers';
|
7
|
+
export * from './tableColumns';
|
8
|
+
export { default as ActionMenu } from './ActionMenu.vue';
|
9
|
+
export { default as ActionTable } from './ActionTable.vue';
|
10
|
+
export { default as ActionTableColumn } from './ActionTableColumn.vue';
|
11
|
+
export { default as EmptyTableState } from './EmptyTableState.vue';
|
12
|
+
export { default as TableSummaryRow } from './TableSummaryRow.vue';
|
@@ -0,0 +1,50 @@
|
|
1
|
+
interface ListActionsOptions {
|
2
|
+
listRoute: Function;
|
3
|
+
summaryRoute?: Function;
|
4
|
+
filterFieldOptionsRoute?: Function;
|
5
|
+
moreRoute?: Function;
|
6
|
+
itemDetailsRoute?: Function;
|
7
|
+
urlPattern?: RegExp;
|
8
|
+
filterDefaults?: Record<string, any>;
|
9
|
+
refreshFilters?: boolean;
|
10
|
+
}
|
11
|
+
export declare function useListControls(name: string, { listRoute, summaryRoute, filterFieldOptionsRoute, moreRoute, itemDetailsRoute, refreshFilters, urlPattern, filterDefaults }: ListActionsOptions): {
|
12
|
+
pagedItems: import('vue').Ref<null>;
|
13
|
+
filter: import('vue').Ref<{}>;
|
14
|
+
globalFilter: import('vue').Ref<{}>;
|
15
|
+
filterActiveCount: import('vue').ComputedRef<number>;
|
16
|
+
showFilters: import('vue').Ref<any>;
|
17
|
+
summary: import('vue').Ref<null>;
|
18
|
+
filterFieldOptions: import('vue').Ref<{}>;
|
19
|
+
selectedRows: import('vue').Ref<never[]>;
|
20
|
+
isLoadingList: import('vue').Ref<boolean>;
|
21
|
+
isLoadingFilters: import('vue').Ref<boolean>;
|
22
|
+
isLoadingSummary: import('vue').Ref<boolean>;
|
23
|
+
pager: import('vue').ComputedRef<{
|
24
|
+
perPage: number;
|
25
|
+
page: number;
|
26
|
+
filter: {};
|
27
|
+
sort: undefined;
|
28
|
+
}>;
|
29
|
+
quasarPagination: import('vue').Ref<{
|
30
|
+
__sort: null;
|
31
|
+
sortBy: null;
|
32
|
+
descending: boolean;
|
33
|
+
page: number;
|
34
|
+
rowsNumber: number;
|
35
|
+
rowsPerPage: number;
|
36
|
+
}>;
|
37
|
+
activeItem: import('vue').Ref<null>;
|
38
|
+
activePanel: import('vue').Ref<null>;
|
39
|
+
initialize: () => void;
|
40
|
+
loadSummary: () => Promise<void>;
|
41
|
+
resetPaging: () => void;
|
42
|
+
loadList: () => Promise<void>;
|
43
|
+
loadMore: (index: any, perPage?: undefined) => Promise<boolean>;
|
44
|
+
refreshAll: () => Promise<[void, void, void, void]>;
|
45
|
+
getNextItem: (offset: any) => Promise<void>;
|
46
|
+
activatePanel: (item: any, panel: any) => void;
|
47
|
+
applyFilterFromUrl: (url: any, filterFields?: null) => void;
|
48
|
+
setItemInPagedList: (updatedItem: any) => void;
|
49
|
+
};
|
50
|
+
export {};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export declare function registerStickyScrolling(tableRef: any): void;
|
2
|
+
export declare function mapSortBy(pagination: any, columns: any): {
|
3
|
+
column: any;
|
4
|
+
expression: any;
|
5
|
+
order: string;
|
6
|
+
}[] | null;
|
7
|
+
/**
|
8
|
+
* Returns the filter from the URL if it is set
|
9
|
+
* @param url
|
10
|
+
* @param allowedKeys
|
11
|
+
*/
|
12
|
+
export declare function getFilterFromUrl(url: string, allowedKeys?: null): {};
|