@snolui/vue 1.0.6 → 1.0.8
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/dist/components/index.d.ts +1 -0
- package/dist/components/select/type.d.ts +2 -1
- package/dist/components/table-form/TableForm.vue.d.ts +7 -0
- package/dist/components/table-form/type.d.ts +22 -0
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/use-date-format/type.d.ts +7 -0
- package/dist/composables/use-date-format/useDateFormat.d.ts +9 -0
- package/dist/composables/use-zero/useZeroField.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/snol-ui.css +1 -1
- package/dist/snol-ui.js +5004 -5743
- package/dist/snol-ui.umd.cjs +44 -323
- package/package.json +1 -1
|
@@ -20,3 +20,4 @@ export { default as Progress } from './progress/Progress.vue';
|
|
|
20
20
|
export { default as RadioGroup } from './radio-group/RadioGroup.vue';
|
|
21
21
|
export { default as CheckboxGroup } from './checkbox-group/CheckboxGroup.vue';
|
|
22
22
|
export { default as User } from './user/User.vue';
|
|
23
|
+
export { default as TableForm } from './table-form/TableForm.vue';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface SnolSelectProps {
|
|
2
2
|
label?: string;
|
|
3
|
-
options
|
|
3
|
+
options?: any[];
|
|
4
4
|
optionLabel?: string;
|
|
5
5
|
optionValue?: string;
|
|
6
6
|
placeholder?: string;
|
|
@@ -14,4 +14,5 @@ export interface SnolSelectProps {
|
|
|
14
14
|
size?: 'sm' | 'md' | 'lg';
|
|
15
15
|
isAsyncScroll?: boolean;
|
|
16
16
|
showClear?: boolean;
|
|
17
|
+
class?: string;
|
|
17
18
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableFormProps } from './type.ts';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<TableFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableFormProps> & Readonly<{}>, {
|
|
3
|
+
radius: "none" | "sm" | "md" | "lg";
|
|
4
|
+
size: "sm" | "md" | "lg";
|
|
5
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Validation } from '@vuelidate/core';
|
|
2
|
+
export interface TableFormProps {
|
|
3
|
+
size?: "sm" | "md" | "lg";
|
|
4
|
+
radius?: "none" | "sm" | "md" | "lg";
|
|
5
|
+
columns?: TableFormCol[];
|
|
6
|
+
rows?: TableFormRow[];
|
|
7
|
+
validate?: Validation;
|
|
8
|
+
showValidation?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface TableFormCol {
|
|
11
|
+
key: string;
|
|
12
|
+
header?: string;
|
|
13
|
+
cell?: 'select' | 'input-text' | 'input-number' | 'date-picker' | 'button';
|
|
14
|
+
required?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
options?: any[];
|
|
17
|
+
optionLabel?: string;
|
|
18
|
+
optionValue?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TableFormRow {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
@@ -2,3 +2,4 @@ export { useZeroField } from './use-zero/useZeroField';
|
|
|
2
2
|
export { useTableFilter } from './use-filter/useTableFilter';
|
|
3
3
|
export type { SelectFilterField, DateFilterConfig, NumberFilterField, TextFilterField, FilterOptions } from './use-filter/useTableFilter';
|
|
4
4
|
export { useRowManager, type UseRowManager } from './use-row-manager/useRowManager';
|
|
5
|
+
export { useDateFormat } from './use-date-format/useDateFormat.ts';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as moment } from 'moment';
|
|
2
|
+
import { DateFormatOptions } from './type.ts';
|
|
3
|
+
export declare function useDateFormat(): {
|
|
4
|
+
formatDate: (value: string | Date | number | null | undefined, options?: DateFormatOptions) => string;
|
|
5
|
+
isValidDate: (value: string | Date | number | null | undefined) => boolean;
|
|
6
|
+
getDateDiff: (from: string | Date | number, to?: string | Date | number, unit?: moment.unitOfTime.Diff) => number;
|
|
7
|
+
startOf: (value: string | Date | number, unit: moment.unitOfTime.StartOf) => Date;
|
|
8
|
+
endOf: (value: string | Date | number, unit: moment.unitOfTime.StartOf) => Date;
|
|
9
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function useZeroField<T extends Record<string, any>>(form
|
|
1
|
+
export declare function useZeroField<T extends Record<string, any>>(form?: T): {
|
|
2
2
|
setZero: (field: keyof T) => Promise<void>;
|
|
3
3
|
clearZero: (field: keyof T) => Promise<void>;
|
|
4
4
|
setZeroArr: <K extends keyof any>(list: any[], index: number, field: K) => Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { default as axios } from 'axios';
|
|
|
5
5
|
import { configureApi } from './lib/config';
|
|
6
6
|
import { ApiAxios } from './lib/ApiAxios.ts';
|
|
7
7
|
import { useSnolLocale } from './config/local.ts';
|
|
8
|
+
import { Toaster as SnolToaster, toast as useSnolToast } from 'vue-sonner';
|
|
8
9
|
import { default as SnolUI } from './plugin';
|
|
9
|
-
import { useToast, Toast as SnolToast } from 'primevue';
|
|
10
10
|
import { Button as SnolButton, Icon as SnolIcon, Chip as SnolChip, Card as SnolCard, Tag as SnolTag, InputNumber as SnolInputNumber, InputNumberGroup as SnolInputNumberGroup, InputText as SnolInputText, InputTextGroup as SnolInputTextGroup, Textarea as SnolTextarea, Otp as SnolOtp, Select as SnolSelect, MultiSelect as SnolMultiSelect, Typography as SnolTypography, DatePicker as SnolDatePicker, Popover as SnolPopover, Avatar as SnolAvatar, Loading as SnolLoading, Progress as SnolProgress, RadioGroup as SnolRadioGroup, CheckboxGroup as SnolCheckboxGroup, User as SnolUser } from './components';
|
|
11
11
|
export * from './composables';
|
|
12
12
|
export * from './plugin';
|
|
13
|
-
export { SnolButton, SnolIcon, SnolChip, SnolCard, SnolTag, SnolInputNumber, SnolInputNumberGroup, SnolInputText, SnolInputTextGroup, SnolTextarea, SnolOtp, SnolSelect, SnolMultiSelect, SnolTypography, SnolDatePicker, SnolPopover, SnolAvatar, SnolLoading, SnolProgress, SnolRadioGroup, SnolCheckboxGroup, SnolUser, useSnolLocale, axios, configureApi, ApiAxios, Md5, required, helpers, useVuelidate,
|
|
13
|
+
export { SnolButton, SnolIcon, SnolChip, SnolCard, SnolTag, SnolInputNumber, SnolInputNumberGroup, SnolInputText, SnolInputTextGroup, SnolTextarea, SnolOtp, SnolSelect, SnolMultiSelect, SnolTypography, SnolDatePicker, SnolPopover, SnolAvatar, SnolLoading, SnolProgress, SnolRadioGroup, SnolCheckboxGroup, SnolUser, useSnolLocale, axios, configureApi, ApiAxios, Md5, required, helpers, useVuelidate, SnolToaster, useSnolToast, };
|
|
14
14
|
declare module "vue" {
|
|
15
15
|
interface GlobalComponents {
|
|
16
16
|
SnolButton: typeof import("./components/button/Button.vue")["default"];
|