@inriver/inri 1.14.0 → 1.16.0
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/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.eslintrc.js +5 -5
- package/azure/pipelines/single-build-release.yml +20 -0
- package/azure/pipelines/templates/deployFramework.yml +30 -0
- package/azure/pipelines/templates/publishFramwork.yml +39 -0
- package/componentProperties.d.ts +8 -8
- package/configs/base-eslint-config.js +36 -36
- package/configs/base-tailwind-config.js +149 -149
- package/i18n.ts +11 -11
- package/index.ts +29 -29
- package/package.json +7 -2
- package/src/components/CAutoBreadcrumbs.vue +72 -72
- package/src/components/CBtn.vue +98 -98
- package/src/components/CColorPicker.vue +55 -55
- package/src/components/CContextMenu.vue +29 -29
- package/src/components/CDatePicker.vue +51 -51
- package/src/components/CDeleteTileBtn.vue +52 -52
- package/src/components/CDialog.vue +253 -253
- package/src/components/CDialogCloseBtn.vue +9 -9
- package/src/components/CDirtyCheck.vue +68 -68
- package/src/components/CDrawer.vue +44 -44
- package/src/components/CDrawerButton.vue +91 -91
- package/src/components/CExpansionItem.vue +57 -57
- package/src/components/CExpansionItemWithCheckbox.vue +41 -41
- package/src/components/CFileDropzone.vue +114 -114
- package/src/components/CGrid.vue +101 -101
- package/src/components/CHeader.vue +10 -10
- package/src/components/CHeaderLinks.vue +61 -61
- package/src/components/CHeaderMenuLink.vue +51 -51
- package/src/components/CHeaderSearch.vue +142 -142
- package/src/components/CIconBtn.vue +70 -70
- package/src/components/CMenuItem.vue +66 -66
- package/src/components/CPageContainer.vue +11 -11
- package/src/components/CPageError.vue +24 -24
- package/src/components/CPageSpinner.vue +18 -18
- package/src/components/CSearch.vue +45 -45
- package/src/components/CSection.vue +29 -29
- package/src/components/CSectionTitle.vue +8 -8
- package/src/components/CSelect.vue +208 -208
- package/src/components/CSlideEffect.vue +62 -62
- package/src/components/CSpinner.vue +107 -107
- package/src/components/CTableActions.vue +16 -16
- package/src/components/CTileBtn.vue +178 -178
- package/src/components/CTimePicker.vue +42 -42
- package/src/components/CToggleGridView.vue +26 -26
- package/src/components/CToggleSidebarBtn.vue +19 -19
- package/src/components/CTooltip.vue +44 -44
- package/src/components/CTreeNode.vue +39 -39
- package/src/components/cards/CBannerCard.vue +103 -103
- package/src/components/cards/CSmallCard.vue +149 -149
- package/src/components/internal-components/ConfirmDialog.vue +78 -78
- package/src/composables/useDialog.ts +46 -46
- package/src/composables/useDirtyCheck.ts +25 -25
- package/src/composables/useDoubleClickListener.ts +28 -28
- package/src/composables/useSelectable.ts +62 -62
- package/src/composables/useTruncateChips.ts +46 -46
- package/src/i18n/de/index.ts +17 -17
- package/src/i18n/en/index.ts +84 -84
- package/src/i18n/es/index.ts +7 -7
- package/src/i18n/fr/index.ts +7 -7
- package/src/init/initInriFramework.ts +37 -37
- package/src/init/useInriApp.ts +55 -55
- package/src/layouts/CLayoutBlank.vue +7 -7
- package/src/layouts/CLayoutWithBackButton.vue +50 -50
- package/src/layouts/CLayoutWithSidebars.vue +46 -46
- package/src/layouts/layout-fragments/CPageAutoBreadcrumbs.vue +6 -6
- package/src/layouts/layout-fragments/CPageBackButton.vue +18 -18
- package/src/layouts/layout-fragments/CPageBlank.vue +20 -20
- package/src/layouts/layout-fragments/CPageFlexCol.vue +5 -5
- package/src/layouts/layout-fragments/CPageLeftSidebar.vue +5 -5
- package/src/layouts/layout-fragments/CPageMainContent.vue +5 -5
- package/src/layouts/layout-fragments/CPageOuterWrapper.vue +5 -5
- package/src/layouts/layout-fragments/CPageRightSidebar.vue +5 -5
- package/src/layouts/layout-fragments/CPageTitle.vue +34 -34
- package/src/plugins/dialog.ts +45 -45
- package/src/plugins/errors/ErrorFactories.ts +59 -59
- package/src/plugins/errors/Errors.ts +156 -156
- package/src/plugins/errors/Exception.ts +6 -6
- package/src/plugins/errors/globalErrorHandler.ts +21 -21
- package/src/plugins/errors/handleError.ts +34 -34
- package/src/plugins/errors/logger.ts +16 -16
- package/src/plugins/errors/vueErrorHandler.ts +26 -26
- package/src/plugins/globalAppConfig.ts +25 -25
- package/src/plugins/i18n.ts +46 -46
- package/src/plugins/inriIcons.ts +58 -58
- package/src/plugins/inriverQuasarComponentConfigurations.ts +67 -67
- package/src/plugins/library.ts +119 -119
- package/src/plugins/notify.ts +153 -153
- package/src/plugins/quasar-user-options.ts +19 -19
- package/src/plugins/validationRules.ts +292 -292
- package/src/shims-vue.d.ts +6 -6
- package/src/stores/inriStore.ts +54 -54
- package/src/stores/interfaceLanguageStore.ts +27 -27
- package/src/styles/_css-variables.scss +101 -101
- package/src/styles/_reset.scss +67 -67
- package/src/styles/_transitions.scss +9 -9
- package/src/styles/_utils.scss +15 -15
- package/src/styles/components/_breadcrumbs.scss +3 -3
- package/src/styles/components/_checkboxes.scss +17 -17
- package/src/styles/components/_chips.scss +17 -17
- package/src/styles/components/_forms.scss +203 -203
- package/src/styles/components/_menu.scss +12 -12
- package/src/styles/components/_notifications.scss +24 -24
- package/src/styles/components/_q-editor.scss +14 -14
- package/src/styles/components/_radio-buttons.scss +17 -17
- package/src/styles/components/_tables.scss +92 -92
- package/src/styles/components/_tooltips.scss +5 -5
- package/src/styles/components/_tree.scss +86 -86
- package/src/styles/components/_truncated-chips.scss +39 -39
- package/src/styles/main.scss +45 -45
- package/src/styles/quasar.variables.scss +50 -50
- package/src/styles/tailwind/index.css +2 -2
- package/src/typings.d.ts +70 -70
- package/src/utils/colorUtils.ts +73 -73
- package/src/utils/errorUtils.ts +37 -37
- package/src/utils/fileUtils.ts +57 -57
- package/src/utils/helpers.ts +6 -6
- package/src/utils/routeUtils.ts +23 -23
- package/tsconfig.json +34 -34
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-breadcrumbs
|
|
3
|
-
separator=">"
|
|
4
|
-
separator-color="grey"
|
|
5
|
-
active-color="grey-darkest"
|
|
6
|
-
>
|
|
7
|
-
<q-breadcrumbs-el
|
|
8
|
-
v-for="breadcrumb in breadcrumbs"
|
|
9
|
-
:key="breadcrumb.to.name"
|
|
10
|
-
:to="breadcrumb.to"
|
|
11
|
-
:label="breadcrumb.text"
|
|
12
|
-
/>
|
|
13
|
-
<q-breadcrumbs-el
|
|
14
|
-
v-if="currentBreadcrumb"
|
|
15
|
-
:label="currentBreadcrumb"
|
|
16
|
-
class="font-bold"
|
|
17
|
-
/>
|
|
18
|
-
</q-breadcrumbs>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script setup lang="ts">
|
|
22
|
-
import { ref, onMounted } from 'vue'
|
|
23
|
-
import { getRouteTitle } from '../utils/routeUtils'
|
|
24
|
-
import { useRouter, RouteRecordNormalized, RouteLocationNormalizedLoaded, RouteRecordName } from 'vue-router'
|
|
25
|
-
|
|
26
|
-
interface Breadcrumb {
|
|
27
|
-
text: string,
|
|
28
|
-
to: {
|
|
29
|
-
name?: RouteRecordName
|
|
30
|
-
},
|
|
31
|
-
exact: boolean
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const breadcrumbs = ref<Breadcrumb[]>([])
|
|
35
|
-
const parentRoutes = ref<RouteRecordNormalized[]>([])
|
|
36
|
-
const currentBreadcrumb = ref<string>()
|
|
37
|
-
const router = useRouter()
|
|
38
|
-
|
|
39
|
-
onMounted(() => {
|
|
40
|
-
generateBreadcrumbs(router.currentRoute.value)
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
function addParentRoutes (routeName: string) {
|
|
44
|
-
const parentRoute = router.getRoutes().find(route => route.name === routeName)
|
|
45
|
-
|
|
46
|
-
if (parentRoute) {
|
|
47
|
-
parentRoutes.value.push(parentRoute)
|
|
48
|
-
|
|
49
|
-
if (parentRoute.meta.parent) {
|
|
50
|
-
addParentRoutes(parentRoute.meta.parent as string)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function generateBreadcrumbs (to: RouteLocationNormalizedLoaded) {
|
|
56
|
-
if (to.meta.parent) {
|
|
57
|
-
addParentRoutes(to.meta.parent as string)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (parentRoutes.value.length) {
|
|
61
|
-
breadcrumbs.value = parentRoutes.value.reverse().map(foundRoute => {
|
|
62
|
-
return {
|
|
63
|
-
text: getRouteTitle(foundRoute, to),
|
|
64
|
-
to: { name: foundRoute.name },
|
|
65
|
-
exact: true,
|
|
66
|
-
}
|
|
67
|
-
})
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
currentBreadcrumb.value = getRouteTitle(to, to)
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<q-breadcrumbs
|
|
3
|
+
separator=">"
|
|
4
|
+
separator-color="grey"
|
|
5
|
+
active-color="grey-darkest"
|
|
6
|
+
>
|
|
7
|
+
<q-breadcrumbs-el
|
|
8
|
+
v-for="breadcrumb in breadcrumbs"
|
|
9
|
+
:key="breadcrumb.to.name"
|
|
10
|
+
:to="breadcrumb.to"
|
|
11
|
+
:label="breadcrumb.text"
|
|
12
|
+
/>
|
|
13
|
+
<q-breadcrumbs-el
|
|
14
|
+
v-if="currentBreadcrumb"
|
|
15
|
+
:label="currentBreadcrumb"
|
|
16
|
+
class="font-bold"
|
|
17
|
+
/>
|
|
18
|
+
</q-breadcrumbs>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { ref, onMounted } from 'vue'
|
|
23
|
+
import { getRouteTitle } from '../utils/routeUtils'
|
|
24
|
+
import { useRouter, RouteRecordNormalized, RouteLocationNormalizedLoaded, RouteRecordName } from 'vue-router'
|
|
25
|
+
|
|
26
|
+
interface Breadcrumb {
|
|
27
|
+
text: string,
|
|
28
|
+
to: {
|
|
29
|
+
name?: RouteRecordName
|
|
30
|
+
},
|
|
31
|
+
exact: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const breadcrumbs = ref<Breadcrumb[]>([])
|
|
35
|
+
const parentRoutes = ref<RouteRecordNormalized[]>([])
|
|
36
|
+
const currentBreadcrumb = ref<string>()
|
|
37
|
+
const router = useRouter()
|
|
38
|
+
|
|
39
|
+
onMounted(() => {
|
|
40
|
+
generateBreadcrumbs(router.currentRoute.value)
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
function addParentRoutes (routeName: string) {
|
|
44
|
+
const parentRoute = router.getRoutes().find(route => route.name === routeName)
|
|
45
|
+
|
|
46
|
+
if (parentRoute) {
|
|
47
|
+
parentRoutes.value.push(parentRoute)
|
|
48
|
+
|
|
49
|
+
if (parentRoute.meta.parent) {
|
|
50
|
+
addParentRoutes(parentRoute.meta.parent as string)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function generateBreadcrumbs (to: RouteLocationNormalizedLoaded) {
|
|
56
|
+
if (to.meta.parent) {
|
|
57
|
+
addParentRoutes(to.meta.parent as string)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (parentRoutes.value.length) {
|
|
61
|
+
breadcrumbs.value = parentRoutes.value.reverse().map(foundRoute => {
|
|
62
|
+
return {
|
|
63
|
+
text: getRouteTitle(foundRoute, to),
|
|
64
|
+
to: { name: foundRoute.name },
|
|
65
|
+
exact: true,
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
currentBreadcrumb.value = getRouteTitle(to, to)
|
|
71
|
+
}
|
|
72
|
+
</script>
|
package/src/components/CBtn.vue
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-btn
|
|
3
|
-
v-bind="$inri.button"
|
|
4
|
-
:color="color"
|
|
5
|
-
:label="label"
|
|
6
|
-
:disable="disable"
|
|
7
|
-
class="group overflow-hidden"
|
|
8
|
-
>
|
|
9
|
-
<template #loading>
|
|
10
|
-
<c-spinner
|
|
11
|
-
size="28"
|
|
12
|
-
:parent-color="color"
|
|
13
|
-
/>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<c-slide-effect
|
|
17
|
-
v-if="!disable"
|
|
18
|
-
:parent-color="color"
|
|
19
|
-
:slide-effect-color="slideEffectColor"
|
|
20
|
-
slide-right
|
|
21
|
-
class="-z-1"
|
|
22
|
-
/>
|
|
23
|
-
|
|
24
|
-
<slot />
|
|
25
|
-
|
|
26
|
-
<c-tooltip v-if="tooltip">
|
|
27
|
-
{{ tooltip }}
|
|
28
|
-
</c-tooltip>
|
|
29
|
-
</q-btn>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script setup lang="ts">
|
|
33
|
-
defineProps({
|
|
34
|
-
label: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: undefined,
|
|
37
|
-
},
|
|
38
|
-
color: {
|
|
39
|
-
type: String,
|
|
40
|
-
default: 'primary',
|
|
41
|
-
},
|
|
42
|
-
slideEffectColor: {
|
|
43
|
-
type: String,
|
|
44
|
-
default: undefined,
|
|
45
|
-
},
|
|
46
|
-
disable: Boolean,
|
|
47
|
-
tooltip: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: undefined,
|
|
50
|
-
},
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
<style lang="scss">
|
|
55
|
-
.c-btn {
|
|
56
|
-
height: 40px;
|
|
57
|
-
font-weight: 600;
|
|
58
|
-
padding: 4px 56px !important;
|
|
59
|
-
|
|
60
|
-
&.disabled {
|
|
61
|
-
opacity: 0.3 !important;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.q-icon {
|
|
65
|
-
font-size: 1rem;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.q-focus-helper {
|
|
69
|
-
display: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.bg-primary {
|
|
73
|
-
color: var(--on-primary-color);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&.bg-secondary {
|
|
77
|
-
color: var(--on-secondary-color);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&.bg-accent {
|
|
81
|
-
color: var(--on-accent-color);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.bg-surface {
|
|
85
|
-
color: var(--on-surface-color);
|
|
86
|
-
border: 1px solid var(--surface-border-color);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Special css for specific colors
|
|
90
|
-
&.bg-white {
|
|
91
|
-
border: 1px solid var(--color-grey);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.bg-black {
|
|
95
|
-
color: white;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn
|
|
3
|
+
v-bind="$inri.button"
|
|
4
|
+
:color="color"
|
|
5
|
+
:label="label"
|
|
6
|
+
:disable="disable"
|
|
7
|
+
class="group overflow-hidden"
|
|
8
|
+
>
|
|
9
|
+
<template #loading>
|
|
10
|
+
<c-spinner
|
|
11
|
+
size="28"
|
|
12
|
+
:parent-color="color"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<c-slide-effect
|
|
17
|
+
v-if="!disable"
|
|
18
|
+
:parent-color="color"
|
|
19
|
+
:slide-effect-color="slideEffectColor"
|
|
20
|
+
slide-right
|
|
21
|
+
class="-z-1"
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
<slot />
|
|
25
|
+
|
|
26
|
+
<c-tooltip v-if="tooltip">
|
|
27
|
+
{{ tooltip }}
|
|
28
|
+
</c-tooltip>
|
|
29
|
+
</q-btn>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup lang="ts">
|
|
33
|
+
defineProps({
|
|
34
|
+
label: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: undefined,
|
|
37
|
+
},
|
|
38
|
+
color: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'primary',
|
|
41
|
+
},
|
|
42
|
+
slideEffectColor: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: undefined,
|
|
45
|
+
},
|
|
46
|
+
disable: Boolean,
|
|
47
|
+
tooltip: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: undefined,
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style lang="scss">
|
|
55
|
+
.c-btn {
|
|
56
|
+
height: 40px;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
padding: 4px 56px !important;
|
|
59
|
+
|
|
60
|
+
&.disabled {
|
|
61
|
+
opacity: 0.3 !important;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.q-icon {
|
|
65
|
+
font-size: 1rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.q-focus-helper {
|
|
69
|
+
display: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.bg-primary {
|
|
73
|
+
color: var(--on-primary-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&.bg-secondary {
|
|
77
|
+
color: var(--on-secondary-color);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.bg-accent {
|
|
81
|
+
color: var(--on-accent-color);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.bg-surface {
|
|
85
|
+
color: var(--on-surface-color);
|
|
86
|
+
border: 1px solid var(--surface-border-color);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Special css for specific colors
|
|
90
|
+
&.bg-white {
|
|
91
|
+
border: 1px solid var(--color-grey);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.bg-black {
|
|
95
|
+
color: white;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<label
|
|
3
|
-
tabindex="0"
|
|
4
|
-
class="flex items-center cursor-pointer h-10 group max-w-max"
|
|
5
|
-
:class="{ 'cursor-not-allowed text-grey-dark': disabled }"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
class="rounded-full h-[30px] w-[30px] mr-2"
|
|
9
|
-
:class="{ 'border': border }"
|
|
10
|
-
:style="{ background: modelValue }"
|
|
11
|
-
/>
|
|
12
|
-
<span>{{ (!staticLabel ? modelValue?.toLowerCase() : false) || label || 'not selected' }}</span>
|
|
13
|
-
<q-icon
|
|
14
|
-
v-if="clearable && modelValue && !disabled"
|
|
15
|
-
name="mdi-close"
|
|
16
|
-
color="grey-darker"
|
|
17
|
-
class="cursor-pointer ml-2 opacity-0 group-hover:opacity-100"
|
|
18
|
-
size="18px"
|
|
19
|
-
@click.stop="$emit('update:model-value', null)"
|
|
20
|
-
/>
|
|
21
|
-
<q-menu v-if="!disabled">
|
|
22
|
-
<q-color
|
|
23
|
-
:model-value="modelValue"
|
|
24
|
-
no-header-tabs
|
|
25
|
-
no-footer
|
|
26
|
-
style="width: 290px;"
|
|
27
|
-
@update:model-value="$emit('update:model-value', $event)"
|
|
28
|
-
/>
|
|
29
|
-
</q-menu>
|
|
30
|
-
<slot />
|
|
31
|
-
</label>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script setup lang="ts">
|
|
35
|
-
import { computed } from 'vue'
|
|
36
|
-
|
|
37
|
-
defineEmits(['update:model-value'])
|
|
38
|
-
|
|
39
|
-
const props = defineProps({
|
|
40
|
-
modelValue: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: undefined,
|
|
43
|
-
},
|
|
44
|
-
label: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: undefined,
|
|
47
|
-
},
|
|
48
|
-
staticLabel: Boolean,
|
|
49
|
-
clearable: Boolean,
|
|
50
|
-
disabled: Boolean,
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
// Show a border if no value or fully white
|
|
54
|
-
const border = computed(() => (!props.modelValue || props.modelValue.toLowerCase() === '#ffffff') ? 'border border-grey-dark' : '')
|
|
55
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
tabindex="0"
|
|
4
|
+
class="flex items-center cursor-pointer h-10 group max-w-max"
|
|
5
|
+
:class="{ 'cursor-not-allowed text-grey-dark': disabled }"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
class="rounded-full h-[30px] w-[30px] mr-2"
|
|
9
|
+
:class="{ 'border': border }"
|
|
10
|
+
:style="{ background: modelValue }"
|
|
11
|
+
/>
|
|
12
|
+
<span>{{ (!staticLabel ? modelValue?.toLowerCase() : false) || label || 'not selected' }}</span>
|
|
13
|
+
<q-icon
|
|
14
|
+
v-if="clearable && modelValue && !disabled"
|
|
15
|
+
name="mdi-close"
|
|
16
|
+
color="grey-darker"
|
|
17
|
+
class="cursor-pointer ml-2 opacity-0 group-hover:opacity-100"
|
|
18
|
+
size="18px"
|
|
19
|
+
@click.stop="$emit('update:model-value', null)"
|
|
20
|
+
/>
|
|
21
|
+
<q-menu v-if="!disabled">
|
|
22
|
+
<q-color
|
|
23
|
+
:model-value="modelValue"
|
|
24
|
+
no-header-tabs
|
|
25
|
+
no-footer
|
|
26
|
+
style="width: 290px;"
|
|
27
|
+
@update:model-value="$emit('update:model-value', $event)"
|
|
28
|
+
/>
|
|
29
|
+
</q-menu>
|
|
30
|
+
<slot />
|
|
31
|
+
</label>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { computed } from 'vue'
|
|
36
|
+
|
|
37
|
+
defineEmits(['update:model-value'])
|
|
38
|
+
|
|
39
|
+
const props = defineProps({
|
|
40
|
+
modelValue: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: undefined,
|
|
43
|
+
},
|
|
44
|
+
label: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: undefined,
|
|
47
|
+
},
|
|
48
|
+
staticLabel: Boolean,
|
|
49
|
+
clearable: Boolean,
|
|
50
|
+
disabled: Boolean,
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
// Show a border if no value or fully white
|
|
54
|
+
const border = computed(() => (!props.modelValue || props.modelValue.toLowerCase() === '#ffffff') ? 'border border-grey-dark' : '')
|
|
55
|
+
</script>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<c-icon-btn
|
|
3
|
-
data-id="context-menu-btn"
|
|
4
|
-
icon="mdi-dots-vertical"
|
|
5
|
-
:tooltip-right="tooltip || $t('inri.common.more')"
|
|
6
|
-
@click.prevent
|
|
7
|
-
>
|
|
8
|
-
<q-menu>
|
|
9
|
-
<q-list class="menu-list pb-0">
|
|
10
|
-
<slot />
|
|
11
|
-
</q-list>
|
|
12
|
-
</q-menu>
|
|
13
|
-
</c-icon-btn>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script setup lang="ts">
|
|
17
|
-
defineProps({
|
|
18
|
-
tooltip: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: undefined,
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style scoped lang="scss">
|
|
26
|
-
.menu-list {
|
|
27
|
-
min-width: 146px;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<c-icon-btn
|
|
3
|
+
data-id="context-menu-btn"
|
|
4
|
+
icon="mdi-dots-vertical"
|
|
5
|
+
:tooltip-right="tooltip || $t('inri.common.more')"
|
|
6
|
+
@click.prevent
|
|
7
|
+
>
|
|
8
|
+
<q-menu>
|
|
9
|
+
<q-list class="menu-list pb-0">
|
|
10
|
+
<slot />
|
|
11
|
+
</q-list>
|
|
12
|
+
</q-menu>
|
|
13
|
+
</c-icon-btn>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
defineProps({
|
|
18
|
+
tooltip: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: undefined,
|
|
21
|
+
},
|
|
22
|
+
})
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped lang="scss">
|
|
26
|
+
.menu-list {
|
|
27
|
+
min-width: 146px;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-input
|
|
3
|
-
v-bind="dense ? $inri.inputDense : $inri.input"
|
|
4
|
-
:model-value="modelValue"
|
|
5
|
-
:label="label"
|
|
6
|
-
:stack-label="datePickerIsOpen"
|
|
7
|
-
mask="date"
|
|
8
|
-
:rules="modelValue ? ['date'] : undefined"
|
|
9
|
-
@update:model-value="$emit('update:model-value', $event)"
|
|
10
|
-
>
|
|
11
|
-
<template #append>
|
|
12
|
-
<q-icon
|
|
13
|
-
ref="icon"
|
|
14
|
-
name="mdi-calendar-outline"
|
|
15
|
-
class="cursor-pointer"
|
|
16
|
-
color="grey-dark"
|
|
17
|
-
size="19px"
|
|
18
|
-
@click="datePickerIsOpen = true"
|
|
19
|
-
/>
|
|
20
|
-
</template>
|
|
21
|
-
<q-menu
|
|
22
|
-
v-model="datePickerIsOpen"
|
|
23
|
-
no-parent-event
|
|
24
|
-
>
|
|
25
|
-
<q-date
|
|
26
|
-
:model-value="modelValue"
|
|
27
|
-
@update:model-value="$emit('update:model-value', $event)"
|
|
28
|
-
/>
|
|
29
|
-
</q-menu>
|
|
30
|
-
</q-input>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script setup lang="ts">
|
|
34
|
-
import { ref } from 'vue'
|
|
35
|
-
|
|
36
|
-
defineEmits(['update:model-value'])
|
|
37
|
-
|
|
38
|
-
defineProps({
|
|
39
|
-
modelValue: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: undefined,
|
|
42
|
-
},
|
|
43
|
-
label: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: undefined,
|
|
46
|
-
},
|
|
47
|
-
dense: Boolean,
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
const datePickerIsOpen = ref(false)
|
|
51
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<q-input
|
|
3
|
+
v-bind="dense ? $inri.inputDense : $inri.input"
|
|
4
|
+
:model-value="modelValue"
|
|
5
|
+
:label="label"
|
|
6
|
+
:stack-label="datePickerIsOpen"
|
|
7
|
+
mask="date"
|
|
8
|
+
:rules="modelValue ? ['date'] : undefined"
|
|
9
|
+
@update:model-value="$emit('update:model-value', $event)"
|
|
10
|
+
>
|
|
11
|
+
<template #append>
|
|
12
|
+
<q-icon
|
|
13
|
+
ref="icon"
|
|
14
|
+
name="mdi-calendar-outline"
|
|
15
|
+
class="cursor-pointer"
|
|
16
|
+
color="grey-dark"
|
|
17
|
+
size="19px"
|
|
18
|
+
@click="datePickerIsOpen = true"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
<q-menu
|
|
22
|
+
v-model="datePickerIsOpen"
|
|
23
|
+
no-parent-event
|
|
24
|
+
>
|
|
25
|
+
<q-date
|
|
26
|
+
:model-value="modelValue"
|
|
27
|
+
@update:model-value="$emit('update:model-value', $event)"
|
|
28
|
+
/>
|
|
29
|
+
</q-menu>
|
|
30
|
+
</q-input>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
import { ref } from 'vue'
|
|
35
|
+
|
|
36
|
+
defineEmits(['update:model-value'])
|
|
37
|
+
|
|
38
|
+
defineProps({
|
|
39
|
+
modelValue: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: undefined,
|
|
42
|
+
},
|
|
43
|
+
label: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: undefined,
|
|
46
|
+
},
|
|
47
|
+
dense: Boolean,
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
const datePickerIsOpen = ref(false)
|
|
51
|
+
</script>
|