@winchsa/ui 0.1.43 → 0.1.45
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/README.md +6 -0
- package/dist/components/Drawer.d.vue.ts +3 -3
- package/dist/components/Drawer.vue +0 -1
- package/dist/components/Drawer.vue.d.ts +3 -3
- package/dist/components/cards/InputCard.vue +5 -5
- package/dist/components/forms/AppNumberField.d.vue.ts +1 -0
- package/dist/components/forms/AppNumberField.vue +5 -4
- package/dist/components/forms/AppNumberField.vue.d.ts +1 -0
- package/dist/components/table/DataTable.vue +2 -1
- package/dist/utils/ruleValidator.js +8 -5
- package/dist/utils/ruleValidator.mjs +8 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -130,3 +130,9 @@ The `bump` command in `package.json` does the following:
|
|
|
130
130
|
**Publishing**
|
|
131
131
|
|
|
132
132
|
After running `pnpm run bump`, go to **GitHub** → **Releases** and create a new release based on the commit generated. This will trigger the `publish.yaml` GitHub Actions workflow, which handles the actual publishing process
|
|
133
|
+
|
|
134
|
+
**Publish to npm **
|
|
135
|
+
|
|
136
|
+
``bash
|
|
137
|
+
npm publish --access public
|
|
138
|
+
```
|
|
@@ -5,13 +5,13 @@ type __VLS_ModelProps = {
|
|
|
5
5
|
'editModal'?: boolean;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare var __VLS_19: {},
|
|
8
|
+
declare var __VLS_19: {}, __VLS_35: {}, __VLS_43: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
title?: (props: typeof __VLS_19) => any;
|
|
11
11
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_35) => any;
|
|
13
13
|
} & {
|
|
14
|
-
actions?: (props: typeof
|
|
14
|
+
actions?: (props: typeof __VLS_43) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
"update:editModal": (value: boolean | undefined) => any;
|
|
@@ -5,13 +5,13 @@ type __VLS_ModelProps = {
|
|
|
5
5
|
'editModal'?: boolean;
|
|
6
6
|
};
|
|
7
7
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
-
declare var __VLS_19: {},
|
|
8
|
+
declare var __VLS_19: {}, __VLS_35: {}, __VLS_43: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
title?: (props: typeof __VLS_19) => any;
|
|
11
11
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_35) => any;
|
|
13
13
|
} & {
|
|
14
|
-
actions?: (props: typeof
|
|
14
|
+
actions?: (props: typeof __VLS_43) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
"update:editModal": (value: boolean | undefined) => any;
|
|
@@ -31,10 +31,10 @@ const colorStyle = computed(() => props.color ? `text-${props.color}` : "");
|
|
|
31
31
|
elevation="0"
|
|
32
32
|
min-height="41px"
|
|
33
33
|
>
|
|
34
|
-
<div class="d-flex flex-column">
|
|
34
|
+
<div class="d-flex flex-column app-font-size-13" style="color: rgba(var(--v-theme-on-surface), var(--v-disabled-opacity))">
|
|
35
35
|
<slot>
|
|
36
36
|
<AppLink
|
|
37
|
-
class="pb-0"
|
|
37
|
+
class="pb-0 app-font-size-13"
|
|
38
38
|
:class="`${colorStyle}`"
|
|
39
39
|
:to="to"
|
|
40
40
|
>
|
|
@@ -55,8 +55,8 @@ const colorStyle = computed(() => props.color ? `text-${props.color}` : "");
|
|
|
55
55
|
background: rgb(var(--v-disabled-background)) !important;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.app-input-card span {
|
|
59
|
-
font-size:
|
|
60
|
-
color: rgba(var(--v-theme-on-
|
|
58
|
+
.app-input-card span, .app-input-card p {
|
|
59
|
+
font-size: 13px;
|
|
60
|
+
color: rgba(var(--v-theme-on-surface), var(--v-disabled-opacity));
|
|
61
61
|
}
|
|
62
62
|
</style>
|
|
@@ -5,11 +5,12 @@ import { useI18n } from "vue-i18n";
|
|
|
5
5
|
const { t } = useI18n();
|
|
6
6
|
const attrs = useAttrs();
|
|
7
7
|
defineOptions({
|
|
8
|
-
name: "
|
|
8
|
+
name: "AppNumberField",
|
|
9
9
|
inheritAttrs: false
|
|
10
10
|
});
|
|
11
11
|
const props = defineProps({
|
|
12
|
-
modelValue: { type: [String, null, Number], required: false, default: null }
|
|
12
|
+
modelValue: { type: [String, null, Number], required: false, default: null },
|
|
13
|
+
title: { type: String, required: false }
|
|
13
14
|
});
|
|
14
15
|
const emit = defineEmits(["update:modelValue"]);
|
|
15
16
|
const numberValue = ref(null);
|
|
@@ -44,10 +45,10 @@ const validateInput = (event) => {
|
|
|
44
45
|
:class="$attrs.class"
|
|
45
46
|
>
|
|
46
47
|
<VLabel
|
|
47
|
-
v-if="label"
|
|
48
|
+
v-if="title ?? label"
|
|
48
49
|
:for="elementId"
|
|
49
50
|
class="mb-2 text-body-2 text-high-emphasis app-font-size-13"
|
|
50
|
-
:text="langLabel"
|
|
51
|
+
:text="title ?? langLabel"
|
|
51
52
|
/>
|
|
52
53
|
<VTextField
|
|
53
54
|
v-bind="{
|
|
@@ -70,7 +70,8 @@ const queryParamsString = computed(() => buildQueryString({
|
|
|
70
70
|
page: currentPage.value,
|
|
71
71
|
pages_count: itemsPerPage.value
|
|
72
72
|
}));
|
|
73
|
-
const
|
|
73
|
+
const prefix = import.meta.env.VITE_APP_TYPE;
|
|
74
|
+
const queryKey = computed(() => ["table-data", prefix, props.url, queryParamsString.value]);
|
|
74
75
|
const { data, error: tableError, isLoading, refetch: refresh } = useQuery({
|
|
75
76
|
queryKey,
|
|
76
77
|
queryFn: async () => {
|
|
@@ -194,11 +194,14 @@ const useFormValidation = () => {
|
|
|
194
194
|
const scrollToError = async () => {
|
|
195
195
|
validationType.value = "input";
|
|
196
196
|
await (0, _vue.nextTick)(() => {
|
|
197
|
-
const
|
|
198
|
-
el?.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
const elements = document.querySelectorAll(".v-messages__message");
|
|
198
|
+
const el = Array.from(elements).find(element => element.textContent?.trim());
|
|
199
|
+
if (el) {
|
|
200
|
+
el.scrollIntoView({
|
|
201
|
+
behavior: "smooth",
|
|
202
|
+
block: "center"
|
|
203
|
+
});
|
|
204
|
+
}
|
|
202
205
|
});
|
|
203
206
|
};
|
|
204
207
|
return {
|
|
@@ -180,11 +180,14 @@ export const useFormValidation = () => {
|
|
|
180
180
|
const scrollToError = async () => {
|
|
181
181
|
validationType.value = "input";
|
|
182
182
|
await nextTick(() => {
|
|
183
|
-
const
|
|
184
|
-
el?.
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
const elements = document.querySelectorAll(".v-messages__message");
|
|
184
|
+
const el = Array.from(elements).find((element) => element.textContent?.trim());
|
|
185
|
+
if (el) {
|
|
186
|
+
el.scrollIntoView({
|
|
187
|
+
behavior: "smooth",
|
|
188
|
+
block: "center"
|
|
189
|
+
});
|
|
190
|
+
}
|
|
188
191
|
});
|
|
189
192
|
};
|
|
190
193
|
return {
|