@g1cloud/open-bluesea-core 1.0.0-alpha.1 → 1.0.0-alpha.10
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/css/bluesea.css +0 -94
- package/dist/BSAlertModal-ZEIUM0ut.js +4 -0
- package/dist/BSYesNoModal-Cs6mgXcP.js +4 -0
- package/dist/index.d.ts +1571 -35
- package/dist/open-bluesea-core.css +2598 -1
- package/dist/open-bluesea-core.es.js +5068 -1886
- package/dist/open-bluesea-core.umd.js +5563 -1
- package/package.json +16 -1
- package/tailwind.preset.js +221 -0
- package/dist/blueseaPlugin.d.ts +0 -36
- package/dist/component/basic/PageNavigation.model.d.ts +0 -5
- package/dist/contextmenu/contextMenuPlugin.d.ts +0 -36
- package/dist/directive/vClickOutside.d.ts +0 -20
- package/dist/directive/vFocusOnLoad.d.ts +0 -3
- package/dist/directive/vTooltip.d.ts +0 -7
- package/dist/model/CommonTypes.d.ts +0 -29
- package/dist/model/DefaultImpl.d.ts +0 -7
- package/dist/model/FieldContext.d.ts +0 -14
- package/dist/notification/notificationPlugin.d.ts +0 -31
- package/dist/savepoint/SavePoint.d.ts +0 -46
- package/dist/util/componentUtil.d.ts +0 -11
- package/dist/util/debounceUtil.d.ts +0 -16
- package/dist/util/formatUtil.d.ts +0 -67
- package/dist/util/typeUtil.d.ts +0 -18
- package/dist/util/waitUtil.d.ts +0 -19
- package/dist/validator/FieldValidator.d.ts +0 -43
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ComputedRef, Ref, UnwrapRef } from "vue";
|
|
2
|
-
import type { FieldContext } from "@/model/FieldContext";
|
|
3
|
-
export type ValidationError = {
|
|
4
|
-
code: string;
|
|
5
|
-
message: string | undefined;
|
|
6
|
-
};
|
|
7
|
-
export type ValidationPhase = 'input' | 'change' | 'blur' | 'form';
|
|
8
|
-
export type FieldValidationRule<T> = (value: T, phase: ValidationPhase, fieldContext?: FieldContext<any>) => Promise<ValidationError[] | undefined> | ValidationError[] | undefined;
|
|
9
|
-
export type FieldValidatorOption<T> = {
|
|
10
|
-
field?: Ref<HTMLElement | undefined>;
|
|
11
|
-
disabled: Ref<boolean> | ComputedRef<boolean>;
|
|
12
|
-
initialValue?: T;
|
|
13
|
-
isValid?: (value: UnwrapRef<T> | undefined, phase: ValidationPhase) => undefined | ValidationError[] | Promise<ValidationError[]>;
|
|
14
|
-
convertToValue?: (value: string | undefined) => UnwrapRef<T>;
|
|
15
|
-
convertFromValue?: (value: UnwrapRef<T | undefined>) => string;
|
|
16
|
-
};
|
|
17
|
-
export type FieldValidator<T> = {
|
|
18
|
-
stringValue: Ref<string | undefined>;
|
|
19
|
-
value: Ref<UnwrapRef<T> | undefined>;
|
|
20
|
-
valid: Ref<boolean>;
|
|
21
|
-
errors: Ref<ValidationError[]>;
|
|
22
|
-
touched: Ref<boolean>;
|
|
23
|
-
handleInput: (event: Event) => Promise<void>;
|
|
24
|
-
handleChange: (event: Event) => Promise<void>;
|
|
25
|
-
handleFocus: (event: Event) => void;
|
|
26
|
-
handleBlur: (event: Event) => void;
|
|
27
|
-
validateValue: (value: UnwrapRef<T>, phase: ValidationPhase) => Promise<void>;
|
|
28
|
-
validate: (phase?: ValidationPhase) => Promise<void>;
|
|
29
|
-
clearErrors: () => void;
|
|
30
|
-
getName: () => string;
|
|
31
|
-
};
|
|
32
|
-
export declare const storeFieldValidator: <T>(field: HTMLElement, validator: FieldValidator<T>) => void;
|
|
33
|
-
export declare const loadFieldValidator: <T>(field: HTMLElement) => FieldValidator<T> | undefined;
|
|
34
|
-
export declare const findFieldValidatorElements: (element?: HTMLElement) => NodeListOf<HTMLElement> | undefined;
|
|
35
|
-
export declare const validateField: (field: HTMLElement | string, phase?: ValidationPhase) => Promise<void>;
|
|
36
|
-
export declare const validateFields: (fields: (HTMLElement | string)[], phase?: ValidationPhase) => Promise<void>;
|
|
37
|
-
export declare const fieldValidator: <T>(option: FieldValidatorOption<T>) => FieldValidator<T>;
|
|
38
|
-
export declare const executeFieldValidationRule: <T>(value: T, rules: FieldValidationRule<T>[] | undefined, errors: ValidationError[], phase: ValidationPhase, fieldContext?: FieldContext<any>) => Promise<boolean>;
|
|
39
|
-
export declare const executeRequiredValidation: (value: string | number | undefined, checkRequired: boolean, requiredMessage: string | undefined, errors: ValidationError[]) => boolean;
|
|
40
|
-
export declare const executeRegExpValidation: (value: string, regexp: string | undefined, message: string | undefined, errors: ValidationError[]) => boolean;
|
|
41
|
-
export declare const executeBetweenLengthValidation: (text: string, minLength: number | undefined, minLengthMessage: string | undefined, maxLength: number | undefined, maxLengthMessage: string | undefined, betweenLengthMessage: string | undefined, errors: ValidationError[]) => boolean;
|
|
42
|
-
export declare const executeBetweenValueValidation: (value: number, minValue: number | undefined, minValueMessage: string | undefined, maxValue: number | undefined, maxValueMessage: string | undefined, betweenValueMessage: string | undefined, errors: ValidationError[]) => boolean;
|
|
43
|
-
export declare const executeDateRangeValidation: (fromValue: string | undefined, toValue: string | undefined, validationMessage: string | undefined, erros: ValidationError[]) => boolean;
|