@vc-shell/framework 1.0.231 → 1.0.233
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/CHANGELOG.md +36 -0
- package/core/types/index.ts +14 -1
- package/dist/core/types/index.d.ts +12 -2
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/framework.js +14875 -14580
- package/dist/index.css +1 -1
- package/dist/locales/en.json +8 -2
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
- package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/types/index.d.ts +10 -5
- package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts +187 -17
- package/dist/ui/components/atoms/vc-badge/vc-badge.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +19 -3
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-button/vc-button.stories.d.ts +91 -91
- package/dist/ui/components/atoms/vc-button/vc-button.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.stories.d.ts +9 -9
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-image/index.d.ts +12 -3
- package/dist/ui/components/atoms/vc-image/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts +12 -3
- package/dist/ui/components/atoms/vc-image/vc-image.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts +5 -1
- package/dist/ui/components/atoms/vc-image/vc-image.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-status/vc-status.stories.d.ts +7 -7
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/index.d.ts +6 -0
- package/dist/ui/components/atoms/vc-widget/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts +6 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget.stories.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts +1 -0
- package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.d.ts +3 -3
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -0
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts +2 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.stories.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +2 -0
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts +3 -0
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
- package/package.json +4 -4
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +1 -1
- package/shared/components/user-dropdown-button/user-dropdown-button.vue +11 -3
- package/shared/modules/dynamic/components/SchemaRender.ts +0 -2
- package/shared/modules/dynamic/components/fields/Card.ts +1 -1
- package/shared/modules/dynamic/components/fields/GalleryField.ts +1 -0
- package/shared/modules/dynamic/components/fields/StatusField.ts +39 -3
- package/shared/modules/dynamic/pages/dynamic-blade-form.vue +17 -22
- package/shared/modules/dynamic/types/index.ts +15 -7
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +3 -3
- package/ui/components/atoms/vc-badge/vc-badge.vue +58 -10
- package/ui/components/atoms/vc-container/vc-container.vue +2 -2
- package/ui/components/atoms/vc-image/vc-image.vue +3 -1
- package/ui/components/atoms/vc-status/vc-status.vue +5 -2
- package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +1 -1
- package/ui/components/atoms/vc-widget/vc-widget.vue +42 -22
- package/ui/components/molecules/vc-editor/vc-editor.vue +5 -1
- package/ui/components/molecules/vc-input/vc-input.vue +17 -2
- package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +20 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +21 -10
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue +3 -0
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +59 -9
- package/ui/components/organisms/vc-app/vc-app.vue +0 -1
- package/ui/components/organisms/vc-blade/vc-blade.vue +89 -2
- package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +72 -56
- package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +27 -7
- package/ui/components/organisms/vc-table/vc-table.stories.ts +1 -1
- package/ui/components/organisms/vc-table/vc-table.vue +138 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vc-table.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/organisms/vc-table/vc-table.vue.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EACR,GAAG,EAWJ,MAAM,KAAK,CAAC;AAGb,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAO/E,OAAO,iCAAiC,CAAC;AACzC,OAAO,gCAAgC,CAAC;AAIxC,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,SAAS;IACxB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IACjB,OAAO,CAAC,EAAE,oBAAoB,EAAE,CAAC;CAClC;;;;;;;
|
|
1
|
+
{"version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,GAAG;2BACnC,CAAC,IAAI,EAAE;gBAAE,IAAI,EAAE,CAAC,CAAA;aAAE,KAAK,GAAG;sBAG/B,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG;mBACtB,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG;oBAClB,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG;;;uBA0DQ,MAAM;uBAAa,MAAM;mBAAS,CAAC,EAAE;;mBAExC;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;aAAE;mBAAS,MAAM;;iBAE9D,MAAM,GAAG,SAAS;mBAAS,MAAM;;;;AA5E7D,wBAujE2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vc-shell/framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.233",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/framework.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/dompurify": "^3.0.5",
|
|
62
62
|
"@types/quill": "^2.0.14",
|
|
63
|
-
"@vc-shell/api-client-generator": "^1.0.
|
|
64
|
-
"@vc-shell/config-generator": "^1.0.
|
|
65
|
-
"@vc-shell/ts-config": "^1.0.
|
|
63
|
+
"@vc-shell/api-client-generator": "^1.0.233",
|
|
64
|
+
"@vc-shell/config-generator": "^1.0.233",
|
|
65
|
+
"@vc-shell/ts-config": "^1.0.233",
|
|
66
66
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
67
67
|
"sass": "^1.69.6",
|
|
68
68
|
"shx": "^0.3.4",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-on-click-outside="onClose"
|
|
4
|
-
class="tw-relative tw-h-full tw-flex tw-items-center tw-justify-center tw-mx-
|
|
4
|
+
class="tw-relative tw-h-full tw-flex tw-items-center tw-justify-center tw-mx-3 tw-shrink-0"
|
|
5
5
|
>
|
|
6
6
|
<button
|
|
7
7
|
class="hover:[&>img] hover:[&_div]:tw-bg-[color:var(--app-bar-button-color-hover)]"
|
|
@@ -49,10 +49,16 @@
|
|
|
49
49
|
<div
|
|
50
50
|
v-for="(item, i) in menu"
|
|
51
51
|
:key="`menu_item_${i}`"
|
|
52
|
-
class="user-dropdown-button__menu-item"
|
|
52
|
+
class="user-dropdown-button__menu-item tw-group"
|
|
53
53
|
@click="item.hasOwnProperty('clickHandler') ? item.clickHandler?.() : null"
|
|
54
54
|
>
|
|
55
|
-
|
|
55
|
+
<VcIcon
|
|
56
|
+
v-if="item.icon"
|
|
57
|
+
:icon="item.icon"
|
|
58
|
+
size="l"
|
|
59
|
+
class="tw-mr-3 tw-text-[color:var(--app-bar-button-color)] group-hover:tw-text-[color:var(--app-bar-button-color-hover)]"
|
|
60
|
+
></VcIcon>
|
|
61
|
+
<p>{{ item.title }}</p>
|
|
56
62
|
</div>
|
|
57
63
|
</div>
|
|
58
64
|
</div>
|
|
@@ -94,12 +100,14 @@ const menu = computed(() => [
|
|
|
94
100
|
...props.menuItems,
|
|
95
101
|
{
|
|
96
102
|
title: t("SHELL.ACCOUNT.CHANGE_PASSWORD"),
|
|
103
|
+
icon: "fas fa-key",
|
|
97
104
|
clickHandler() {
|
|
98
105
|
open();
|
|
99
106
|
},
|
|
100
107
|
},
|
|
101
108
|
{
|
|
102
109
|
title: t("SHELL.ACCOUNT.LOGOUT"),
|
|
110
|
+
icon: "fas fa-sign-out-alt",
|
|
103
111
|
async clickHandler() {
|
|
104
112
|
const isPrevented = await closeBlade(0);
|
|
105
113
|
|
|
@@ -168,7 +176,7 @@ const imageHandler = computed(() => {
|
|
|
168
176
|
@apply tw-absolute -tw-left-px tw-right-0 tw-top-[var(--app-bar-height)] tw-bg-white tw-z-[10000] tw-shadow-[0_-6px_6px_white,1px_1px_22px_rgba(126,142,157,0.2)];
|
|
169
177
|
|
|
170
178
|
&-item {
|
|
171
|
-
@apply tw-p-3 tw-text-lg tw-text-black tw-border-l tw-border-solid tw-border-l-[#eef0f2] tw-border-b tw-border-b-[#eef0f2] tw-bg-white hover:tw-bg-[#eff7fc];
|
|
179
|
+
@apply tw-p-3 tw-text-lg tw-text-black tw-border-l tw-border-solid tw-border-l-[#eef0f2] tw-border-b tw-border-b-[#eef0f2] tw-bg-white hover:tw-bg-[#eff7fc] tw-flex tw-flex-row tw-items-center;
|
|
172
180
|
}
|
|
173
181
|
}
|
|
174
182
|
|
|
@@ -72,8 +72,6 @@ export default defineComponent({
|
|
|
72
72
|
"div",
|
|
73
73
|
{ class: "tw-flex tw-flex-col tw-gap-4" },
|
|
74
74
|
props.uiSchema.reduce((arr, field): VNode[] => {
|
|
75
|
-
console.log(field.id, field.permissions, hasAccess(field.permissions));
|
|
76
|
-
|
|
77
75
|
if (safeIn("permissions", field) && !hasAccess(field.permissions)) {
|
|
78
76
|
return arr;
|
|
79
77
|
}
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import { useI18n } from "vue-i18n";
|
|
2
|
-
import { Component, ExtractPropTypes, computed, h, unref } from "vue";
|
|
2
|
+
import { Component, ExtractPropTypes, computed, h, onMounted, ref, unref, watch } from "vue";
|
|
3
3
|
import componentProps from "./props";
|
|
4
4
|
import { StatusSchema } from "../../types";
|
|
5
5
|
import { StatusField } from "../factories";
|
|
6
6
|
import { VcIcon } from "../../../../../ui/components";
|
|
7
7
|
import { unrefNested } from "../../helpers/unrefNested";
|
|
8
|
+
import VcButton from "../../../../../ui/components/atoms/vc-button/vc-button.vue";
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
name: "StatusField",
|
|
11
12
|
props: componentProps,
|
|
12
13
|
setup(props: ExtractPropTypes<typeof componentProps> & { element: StatusSchema }) {
|
|
13
14
|
const { t } = useI18n({ useScope: "global" });
|
|
15
|
+
const hasOverflow = ref(false);
|
|
16
|
+
const isExpanded = ref(false);
|
|
17
|
+
const contentRef = ref<HTMLElement | null>(null);
|
|
18
|
+
|
|
19
|
+
const toggle = () => {
|
|
20
|
+
isExpanded.value = !isExpanded.value;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const checkOverflow = () => {
|
|
24
|
+
if (contentRef.value) {
|
|
25
|
+
hasOverflow.value = contentRef.value.scrollHeight > 100;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
onMounted(() => {
|
|
30
|
+
checkOverflow();
|
|
31
|
+
});
|
|
14
32
|
|
|
15
33
|
return () => {
|
|
16
34
|
const slotContent = computed(() => {
|
|
@@ -55,9 +73,27 @@ export default {
|
|
|
55
73
|
class: "tw-mr-3",
|
|
56
74
|
})
|
|
57
75
|
: undefined,
|
|
58
|
-
h("div", [
|
|
76
|
+
h("div", { class: "tw-flex tw-flex-col" }, [
|
|
59
77
|
h("div", { class: "tw-font-bold" }, computed(() => t(props.element.title ?? "")).value),
|
|
60
|
-
h(
|
|
78
|
+
h(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
class: {
|
|
82
|
+
"tw-overflow-hidden": true,
|
|
83
|
+
"tw-max-h-[100px] tw-line-clamp-4": !isExpanded.value,
|
|
84
|
+
"tw-max-h-[100%]": isExpanded.value,
|
|
85
|
+
},
|
|
86
|
+
ref: contentRef,
|
|
87
|
+
},
|
|
88
|
+
slotContent.value,
|
|
89
|
+
),
|
|
90
|
+
hasOverflow.value
|
|
91
|
+
? h(VcButton, { text: true, class: "tw-self-end", onClick: toggle }, () =>
|
|
92
|
+
isExpanded.value
|
|
93
|
+
? t("COMPONENTS.ATOMS.VC_STATUS.SHOW_LESS")
|
|
94
|
+
: t("COMPONENTS.ATOMS.VC_STATUS.SHOW_MORE"),
|
|
95
|
+
)
|
|
96
|
+
: undefined,
|
|
61
97
|
]),
|
|
62
98
|
]);
|
|
63
99
|
},
|
|
@@ -41,24 +41,23 @@
|
|
|
41
41
|
></SchemaRender>
|
|
42
42
|
</VcForm>
|
|
43
43
|
</div>
|
|
44
|
-
<div
|
|
45
|
-
v-if="bladeWidgets && bladeWidgets.length"
|
|
46
|
-
class="item-details__widgets"
|
|
47
|
-
>
|
|
48
|
-
<div
|
|
49
|
-
v-for="(item, index) in bladeWidgets"
|
|
50
|
-
:key="index"
|
|
51
|
-
>
|
|
52
|
-
<component
|
|
53
|
-
:is="item"
|
|
54
|
-
:ref="(el: HTMLElement) => widgetsRefs.set({ component: item, el })"
|
|
55
|
-
v-model="bladeContext"
|
|
56
|
-
@click="setActiveWidget(item)"
|
|
57
|
-
></component>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
44
|
</div>
|
|
61
45
|
</VcContainer>
|
|
46
|
+
|
|
47
|
+
<template
|
|
48
|
+
v-if="bladeWidgets && bladeWidgets.length"
|
|
49
|
+
#widgets="{ isExpanded }"
|
|
50
|
+
>
|
|
51
|
+
<component
|
|
52
|
+
:is="item"
|
|
53
|
+
v-for="(item, index) in bladeWidgets"
|
|
54
|
+
:key="index"
|
|
55
|
+
:ref="(el: HTMLElement) => widgetsRefs.set({ component: item, el })"
|
|
56
|
+
v-model="bladeContext"
|
|
57
|
+
:is-expanded="isExpanded"
|
|
58
|
+
@click="setActiveWidget(item)"
|
|
59
|
+
></component>
|
|
60
|
+
</template>
|
|
62
61
|
</VcBlade>
|
|
63
62
|
</template>
|
|
64
63
|
|
|
@@ -387,16 +386,12 @@ defineExpose({
|
|
|
387
386
|
@apply tw-text-[#ff4a4a] tw-mr-3;
|
|
388
387
|
}
|
|
389
388
|
|
|
390
|
-
.
|
|
389
|
+
.vc-app_mobile &__inner {
|
|
391
390
|
@apply tw-flex-col;
|
|
392
391
|
}
|
|
393
392
|
|
|
394
|
-
.
|
|
393
|
+
.vc-app_mobile &__content {
|
|
395
394
|
@apply tw-border-r-0 tw-border-b tw-border-solid tw-border-b-[#eaedf3] tw-overflow-visible;
|
|
396
395
|
}
|
|
397
|
-
|
|
398
|
-
.app_phone &__widgets {
|
|
399
|
-
@apply tw-flex tw-flex-row;
|
|
400
|
-
}
|
|
401
396
|
}
|
|
402
397
|
</style>
|
|
@@ -156,7 +156,16 @@ export interface ListContentSchema {
|
|
|
156
156
|
multiselect?: boolean;
|
|
157
157
|
header?: boolean;
|
|
158
158
|
footer?: boolean;
|
|
159
|
-
columns?: (
|
|
159
|
+
columns?: ((
|
|
160
|
+
| ITableColumns
|
|
161
|
+
| {
|
|
162
|
+
visible?:
|
|
163
|
+
| boolean
|
|
164
|
+
| {
|
|
165
|
+
method: string;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
) & {
|
|
160
169
|
id: string;
|
|
161
170
|
title: string;
|
|
162
171
|
sortable?: boolean;
|
|
@@ -171,11 +180,6 @@ export interface ListContentSchema {
|
|
|
171
180
|
onCellBlur?: {
|
|
172
181
|
method: string;
|
|
173
182
|
};
|
|
174
|
-
visible?:
|
|
175
|
-
| boolean
|
|
176
|
-
| {
|
|
177
|
-
method: string;
|
|
178
|
-
};
|
|
179
183
|
})[];
|
|
180
184
|
reorderableRows?: boolean;
|
|
181
185
|
// TODO Add to documentation
|
|
@@ -595,7 +599,7 @@ export interface StatusSchema extends Pick<SchemaBase, "id" | "visibility" | "ho
|
|
|
595
599
|
extend?: boolean;
|
|
596
600
|
/**
|
|
597
601
|
* Status variant.
|
|
598
|
-
* @type {"info" | "info-dark" | "warning" | "danger" | "success" | "light-danger"}
|
|
602
|
+
* @type {"info" | "info-dark" | "warning" | "danger" | "success" | "light-danger" | "primary"}
|
|
599
603
|
*/
|
|
600
604
|
variant?: ComponentProps<typeof VcStatus>["variant"];
|
|
601
605
|
/**
|
|
@@ -762,6 +766,10 @@ export interface GallerySchema
|
|
|
762
766
|
* @type {boolean}
|
|
763
767
|
*/
|
|
764
768
|
hideAfterUpload?: boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Custom gallery upload icon.
|
|
771
|
+
*/
|
|
772
|
+
uploadIcon?: string;
|
|
765
773
|
}
|
|
766
774
|
|
|
767
775
|
/**
|
|
@@ -5,10 +5,10 @@ export default {
|
|
|
5
5
|
title: "atoms/VcBadge",
|
|
6
6
|
component: VcBadge,
|
|
7
7
|
args: {
|
|
8
|
-
|
|
8
|
+
content: "42",
|
|
9
9
|
},
|
|
10
10
|
argTypes: {
|
|
11
|
-
|
|
11
|
+
content: {
|
|
12
12
|
control: "text",
|
|
13
13
|
},
|
|
14
14
|
active: {
|
|
@@ -38,7 +38,7 @@ export default {
|
|
|
38
38
|
const Template: StoryFn<typeof VcBadge> = (args) => ({
|
|
39
39
|
components: { VcBadge },
|
|
40
40
|
setup: () => ({ args }),
|
|
41
|
-
template: `<VcBadge v-bind="args"
|
|
41
|
+
template: `<VcBadge v-bind="args"></VcBadge>`,
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
export const Basic = Template.bind({});
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
class="
|
|
3
|
+
class="vc-badge"
|
|
4
4
|
:class="{
|
|
5
|
-
'
|
|
6
|
-
|
|
7
|
-
'tw-cursor-pointer hover:tw-bg-[color:var(--badge-background-color-active)] hover:tw-text-[color:var(--badge-text-color-hover)] hover:tw-border-[color:var(--badge-border-color-hover)]':
|
|
8
|
-
clickable,
|
|
9
|
-
'cursor-not-allowed tw-bg-[color:var(--badge-background-color-disabled)] tw-text-[color:var(--badge-text-color-disabled)] tw-border-[color:var(--badge-border-color-disabled)] hover:tw-bg-[color:var(--badge-background-color-disabled)] hover:tw-text-[color:var(--badge-text-color-disabled)] hover:tw-border-[color:var(--badge-border-color-disabled)]':
|
|
10
|
-
disabled,
|
|
5
|
+
'vc-badge--small': size === 's',
|
|
6
|
+
'vc-badge--medium': size === 'm',
|
|
11
7
|
}"
|
|
12
|
-
@click="onClick"
|
|
13
8
|
>
|
|
14
|
-
<
|
|
9
|
+
<div class="tw-flex tw-relative">
|
|
10
|
+
<slot name="default"></slot>
|
|
11
|
+
<div
|
|
12
|
+
class="vc-badge__badge tw-absolute tw-inline-flex tw-justify-center tw-items-center tw-text-center tw-indent-0 tw-rounded-[var(--badge-border-radius)] tw-text-[13px] tw-leading-[13px] tw-font-normal tw-bg-[color:var(--badge-background-color)] tw-text-[color:var(--badge-text-color)] tw-border tw-border-solid tw-border-[color:var(--badge-border-color)] tw-transition tw-duration-200"
|
|
13
|
+
:class="{
|
|
14
|
+
'tw-bg-[color:var(--badge-background-color-active)] tw-text-[color:var(--badge-text-color-active)] tw-border-[color:var(--badge-border-color-active)]':
|
|
15
|
+
active,
|
|
16
|
+
'tw-cursor-pointer hover:tw-bg-[color:var(--badge-background-color-active)] hover:tw-text-[color:var(--badge-text-color-hover)] hover:tw-border-[color:var(--badge-border-color-hover)]':
|
|
17
|
+
clickable,
|
|
18
|
+
'cursor-not-allowed tw-bg-[color:var(--badge-background-color-disabled)] tw-text-[color:var(--badge-text-color-disabled)] tw-border-[color:var(--badge-border-color-disabled)] hover:tw-bg-[color:var(--badge-background-color-disabled)] hover:tw-text-[color:var(--badge-text-color-disabled)] hover:tw-border-[color:var(--badge-border-color-disabled)]':
|
|
19
|
+
disabled,
|
|
20
|
+
}"
|
|
21
|
+
@click="onClick"
|
|
22
|
+
>
|
|
23
|
+
{{ content }}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
15
26
|
</div>
|
|
16
27
|
</template>
|
|
17
28
|
|
|
@@ -20,13 +31,17 @@ export interface Props {
|
|
|
20
31
|
active?: boolean;
|
|
21
32
|
disabled?: boolean;
|
|
22
33
|
clickable?: boolean;
|
|
34
|
+
content?: string | number;
|
|
35
|
+
size?: "s" | "m";
|
|
23
36
|
}
|
|
24
37
|
|
|
25
38
|
export interface Emits {
|
|
26
39
|
(event: "click"): void;
|
|
27
40
|
}
|
|
28
41
|
|
|
29
|
-
const props = defineProps<Props>()
|
|
42
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
43
|
+
size: "m",
|
|
44
|
+
});
|
|
30
45
|
|
|
31
46
|
const emit = defineEmits<Emits>();
|
|
32
47
|
|
|
@@ -62,5 +77,38 @@ function onClick(): void {
|
|
|
62
77
|
--badge-border-color-hover: #8fb3cc;
|
|
63
78
|
--badge-border-color-active: #8fb3cc;
|
|
64
79
|
--badge-border-color-disabled: #b2cbdc;
|
|
80
|
+
|
|
81
|
+
--badge-width-small: 15px;
|
|
82
|
+
--badge-height-small: 15px;
|
|
83
|
+
|
|
84
|
+
--badge-width-medium: 25px;
|
|
85
|
+
--badge-height-medium: 25px;
|
|
86
|
+
|
|
87
|
+
--badge-padding-small: 2px 5px;
|
|
88
|
+
--badge-padding-medium: 4px 6px;
|
|
89
|
+
|
|
90
|
+
--badge-distance-bottom-small: calc(100% - 12px);
|
|
91
|
+
--badge-distance-left-small: calc(100% - 12px);
|
|
92
|
+
|
|
93
|
+
--badge-distance-bottom-medium: calc(100% - 20px);
|
|
94
|
+
--badge-distance-left-medium: calc(100% - 20px);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
$sizes: small, medium;
|
|
98
|
+
|
|
99
|
+
@each $size in $sizes {
|
|
100
|
+
.vc-badge {
|
|
101
|
+
&--#{$size} {
|
|
102
|
+
.vc-badge__badge {
|
|
103
|
+
width: var(--badge-width-#{$size});
|
|
104
|
+
height: var(--badge-height-#{$size});
|
|
105
|
+
min-width: var(--badge-width-#{$size});
|
|
106
|
+
min-height: var(--badge-height-#{$size});
|
|
107
|
+
padding: var(--badge-padding-#{$size});
|
|
108
|
+
bottom: var(--badge-distance-bottom-#{$size});
|
|
109
|
+
left: var(--badge-distance-left-#{$size});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
65
113
|
}
|
|
66
114
|
</style>
|
|
@@ -54,7 +54,7 @@ export interface Emits {
|
|
|
54
54
|
(event: "scroll:ptr"): void;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
defineProps<Props>();
|
|
57
|
+
const props = defineProps<Props>();
|
|
58
58
|
|
|
59
59
|
const emit = defineEmits<Emits>();
|
|
60
60
|
|
|
@@ -77,7 +77,7 @@ const scrollTop = () => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
function onTouchstart(e: TouchEvent | MouseEvent) {
|
|
80
|
-
if (refreshing.value) return;
|
|
80
|
+
if (refreshing.value || !props.usePtr) return;
|
|
81
81
|
touching.value = true;
|
|
82
82
|
touchstartY = "clientY" in e ? e.clientY : e.touches[0].clientY;
|
|
83
83
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
class="tw-absolute tw-w-full tw-h-full tw-flex tw-items-center tw-justify-center tw-text-[#83a3be]"
|
|
22
22
|
>
|
|
23
23
|
<VcIcon
|
|
24
|
-
icon="
|
|
24
|
+
:icon="emptyIcon"
|
|
25
25
|
size="xl"
|
|
26
26
|
></VcIcon>
|
|
27
27
|
</div>
|
|
@@ -41,6 +41,7 @@ export interface Props {
|
|
|
41
41
|
src?: string;
|
|
42
42
|
size?: "auto" | "xs" | "s" | "m" | "l" | "xl" | "xxl";
|
|
43
43
|
background?: "cover" | "contain" | "auto";
|
|
44
|
+
emptyIcon?: string;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export interface Emits {
|
|
@@ -51,6 +52,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
51
52
|
aspect: "1x1",
|
|
52
53
|
size: "auto",
|
|
53
54
|
background: "cover",
|
|
55
|
+
emptyIcon: "fas fa-image",
|
|
54
56
|
});
|
|
55
57
|
|
|
56
58
|
const emit = defineEmits<Emits>();
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<!-- eslint-disable @typescript-eslint/no-explicit-any -->
|
|
10
10
|
<script lang="ts" setup>
|
|
11
11
|
export interface Props {
|
|
12
|
-
variant?: "info" | "warning" | "danger" | "success" | "light-danger" | "info-dark";
|
|
12
|
+
variant?: "info" | "warning" | "danger" | "success" | "light-danger" | "info-dark" | "primary";
|
|
13
13
|
outline?: boolean;
|
|
14
14
|
extend?: boolean;
|
|
15
15
|
}
|
|
@@ -50,9 +50,12 @@ defineSlots<{
|
|
|
50
50
|
|
|
51
51
|
--status-info-dark-color: #ffffff;
|
|
52
52
|
--status-info-dark-main-color: #82a6bd;
|
|
53
|
+
|
|
54
|
+
--status-primary-main-color: #319ed4;
|
|
55
|
+
--status-primary-color: #ffffff;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
$variants: info, warning, danger, success, light-danger, info-dark;
|
|
58
|
+
$variants: info, warning, danger, success, light-danger, info-dark, primary;
|
|
56
59
|
|
|
57
60
|
.vc-status {
|
|
58
61
|
@apply tw-inline-block tw-rounded-[var(--status-border-radius)] tw-py-1 tw-px-3.5 tw-text-base tw-font-normal tw-whitespace-nowrap;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<teleport to="body">
|
|
13
13
|
<span
|
|
14
|
-
v-if="tooltipVisible"
|
|
14
|
+
v-if="tooltipVisible && $slots['tooltip']"
|
|
15
15
|
ref="tooltipRef"
|
|
16
16
|
:style="floatingStyles"
|
|
17
17
|
class="tw-absolute tw-z-[101] tw-bg-white tw-border tw-border-solid tw-border-[color:#eef0f2] tw-shadow-[1px_1px_8px_rgba(126,142,157,0.25)] tw-rounded-[3px] tw-text-[color:#8e9daa] tw-font-normal tw-py-1 tw-px-2"
|
|
@@ -1,28 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:
|
|
5
|
-
|
|
2
|
+
<VcTooltip
|
|
3
|
+
:placement="$isDesktop.value ? 'bottom' : 'top'"
|
|
4
|
+
:offset="{
|
|
5
|
+
crossAxis: 0,
|
|
6
|
+
mainAxis: -10,
|
|
7
|
+
}"
|
|
6
8
|
>
|
|
7
|
-
<VcIcon
|
|
8
|
-
v-if="icon"
|
|
9
|
-
class="vc-widget__icon"
|
|
10
|
-
:icon="icon"
|
|
11
|
-
size="xxl"
|
|
12
|
-
></VcIcon>
|
|
13
9
|
<div
|
|
14
|
-
|
|
15
|
-
class="
|
|
10
|
+
class="vc-widget tw-relative tw-shrink-0 tw-py-4 tw-px-2"
|
|
11
|
+
:class="{
|
|
12
|
+
'tw-w-[80px]': isExpanded,
|
|
13
|
+
'vc-widget_disabled': disabled,
|
|
14
|
+
'tw-w-[36px]': !isExpanded,
|
|
15
|
+
'tw-w-[70px]': $isMobile.value,
|
|
16
|
+
}"
|
|
17
|
+
@click="onClick"
|
|
16
18
|
>
|
|
17
|
-
|
|
19
|
+
<VcBadge
|
|
20
|
+
:content="value"
|
|
21
|
+
:size="isExpanded ? 'm' : 's'"
|
|
22
|
+
>
|
|
23
|
+
<div class="tw-flex tw-flex-col tw-items-center tw-justify-center">
|
|
24
|
+
<VcIcon
|
|
25
|
+
v-if="icon"
|
|
26
|
+
class="vc-widget__icon"
|
|
27
|
+
:icon="icon"
|
|
28
|
+
:size="isExpanded ? 'xxl' : 'l'"
|
|
29
|
+
></VcIcon>
|
|
30
|
+
</div>
|
|
31
|
+
</VcBadge>
|
|
32
|
+
<div class="tw-truncate tw-w-full">
|
|
33
|
+
<div
|
|
34
|
+
v-if="title && isExpanded"
|
|
35
|
+
class="vc-widget__title tw-truncate"
|
|
36
|
+
>
|
|
37
|
+
{{ title }}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
18
40
|
</div>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{{ value }}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
41
|
+
<template #tooltip>
|
|
42
|
+
{{ title }}
|
|
43
|
+
</template>
|
|
44
|
+
</VcTooltip>
|
|
26
45
|
</template>
|
|
27
46
|
|
|
28
47
|
<script lang="ts" setup>
|
|
@@ -32,6 +51,7 @@ export interface Props {
|
|
|
32
51
|
title?: string;
|
|
33
52
|
value?: string | number;
|
|
34
53
|
disabled?: boolean;
|
|
54
|
+
isExpanded?: boolean;
|
|
35
55
|
}
|
|
36
56
|
|
|
37
57
|
export interface Emits {
|
|
@@ -51,7 +71,7 @@ function onClick() {
|
|
|
51
71
|
|
|
52
72
|
<style lang="scss">
|
|
53
73
|
.vc-widget {
|
|
54
|
-
@apply tw-flex
|
|
74
|
+
@apply tw-flex tw-overflow-hidden
|
|
55
75
|
tw-box-border tw-flex-col tw-items-center
|
|
56
76
|
tw-justify-center tw-border-b tw-border-solid
|
|
57
77
|
tw-border-b-[#eaedf3] tw-cursor-pointer tw-bg-white
|
|
@@ -70,7 +90,7 @@ function onClick() {
|
|
|
70
90
|
}
|
|
71
91
|
|
|
72
92
|
&__title {
|
|
73
|
-
@apply tw-font-medium tw-text-sm tw-text-[#333333] tw-mt-
|
|
93
|
+
@apply tw-font-medium tw-text-sm tw-text-[#333333] tw-mt-2 tw-mx-0 tw-text-center;
|
|
74
94
|
}
|
|
75
95
|
|
|
76
96
|
&_disabled &__title {
|
|
@@ -168,7 +168,11 @@ function onTextChange() {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
if (quill.value.getText().trim() !== props.modelValue?.trim()) {
|
|
171
|
-
|
|
171
|
+
if (quill.value.root.innerHTML === "<p><br></p>") {
|
|
172
|
+
emit("update:modelValue", "");
|
|
173
|
+
} else {
|
|
174
|
+
emit("update:modelValue", quill.value.root.innerHTML);
|
|
175
|
+
}
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
</script>
|
|
@@ -409,8 +409,17 @@ const handleValue = computed({
|
|
|
409
409
|
return props.type === "integer" || props.type === "number" ? (isNaN(temp.value) ? "" : temp.value) : temp.value;
|
|
410
410
|
},
|
|
411
411
|
set(value) {
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
if (props.type === "number" || props.type === "integer") {
|
|
413
|
+
if (value < 0) {
|
|
414
|
+
temp.value = Math.abs(value);
|
|
415
|
+
} else {
|
|
416
|
+
temp.value = value;
|
|
417
|
+
}
|
|
418
|
+
} else {
|
|
419
|
+
temp.value = value;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
onInput(temp.value);
|
|
414
423
|
},
|
|
415
424
|
});
|
|
416
425
|
const mutatedModel = ref();
|
|
@@ -457,6 +466,12 @@ const formatDateWithLocale: (date: Date) => string = (date) => {
|
|
|
457
466
|
function onKeyDown(e: KeyboardEvent) {
|
|
458
467
|
const allowedKeys = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
|
|
459
468
|
const keypressed = e.key;
|
|
469
|
+
|
|
470
|
+
if (props.type === "number" || props.type === "integer") {
|
|
471
|
+
if (keypressed === "-" || keypressed === "e") {
|
|
472
|
+
e.preventDefault();
|
|
473
|
+
}
|
|
474
|
+
}
|
|
460
475
|
if (props.type === "integer") {
|
|
461
476
|
if (!/^\d$/.test(keypressed) && !allowedKeys.includes(keypressed)) {
|
|
462
477
|
e.preventDefault();
|