@mc-markets/ui 1.0.34 → 1.0.37
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 +0 -614
- package/dist/{packages/index.d.ts → index.d.ts} +2 -1
- package/dist/index.js +4 -3
- package/dist/node_modules/@babel/parser/typings/babel-parser.d.ts +235 -0
- package/dist/node_modules/@babel/types/lib/index.d.ts +3308 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/conversion.d.ts +61 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.d.ts +4 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/format-input.d.ts +37 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.d.ts +14 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/index.d.ts +207 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.d.ts +46 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/public_api.d.ts +11 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/random.d.ts +24 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/readability.d.ts +46 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.d.ts +5 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +514 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +327 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/dist/node_modules/@types/lodash/common/array.d.ts +2137 -0
- package/dist/node_modules/@types/lodash/common/collection.d.ts +1938 -0
- package/dist/node_modules/@types/lodash/common/common.d.ts +287 -0
- package/dist/node_modules/@types/lodash/common/date.d.ts +23 -0
- package/dist/node_modules/@types/lodash/common/function.d.ts +1455 -0
- package/dist/node_modules/@types/lodash/common/lang.d.ts +1700 -0
- package/dist/node_modules/@types/lodash/common/math.d.ts +405 -0
- package/dist/node_modules/@types/lodash/common/number.d.ts +131 -0
- package/dist/node_modules/@types/lodash/common/object.d.ts +2643 -0
- package/dist/node_modules/@types/lodash/common/seq.d.ts +210 -0
- package/dist/node_modules/@types/lodash/common/string.d.ts +788 -0
- package/dist/node_modules/@types/lodash/common/util.d.ts +1220 -0
- package/dist/node_modules/@types/lodash/index.d.ts +21 -0
- package/dist/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1093 -0
- package/dist/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +45 -0
- package/dist/node_modules/@vue/reactivity/dist/reactivity.d.ts +756 -0
- package/dist/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1839 -0
- package/dist/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1397 -0
- package/dist/node_modules/@vue/shared/dist/shared.d.ts +335 -0
- package/dist/node_modules/@vueuse/core/index.d.ts +4536 -0
- package/dist/node_modules/@vueuse/core/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/node_modules/@vueuse/shared/index.d.ts +1072 -0
- package/dist/node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.d.ts +22 -0
- package/dist/node_modules/async-validator/dist-types/index.d.ts +43 -0
- package/dist/node_modules/async-validator/dist-types/interface.d.ts +135 -0
- package/dist/node_modules/csstype/index.d.ts +21297 -0
- package/dist/node_modules/dayjs/index.d.ts +429 -0
- package/dist/node_modules/dayjs/locale/index.d.ts +11 -0
- package/dist/node_modules/dayjs/locale/types.d.ts +33 -0
- package/dist/node_modules/element-plus/es/index.d.ts +26960 -0
- package/dist/node_modules/element-plus/es/utils/vue3.3.polyfill.d.ts +34 -0
- package/dist/node_modules/memoize-one/dist/memoize-one.d.ts +7 -0
- package/dist/node_modules/vue/dist/vue.d.mts +7 -0
- package/dist/style.css +1 -1
- package/dist/{packages/styles → styles}/theme-config.d.ts +0 -2
- package/dist/types/auto-imports.d.ts +84 -0
- package/dist/types/components.d.ts +55 -0
- package/package.json +5 -2
- package/packages/styles/element/form.scss +27 -0
- package/packages/styles/index.scss +5 -4
- package/packages/styles/theme-config.ts +0 -24
- package/packages/styles/variables.scss +130 -137
- package/USAGE.md +0 -383
- package/dist/src/main.d.ts +0 -0
- package/dist/src/utils/theme.d.ts +0 -66
- package/dist/vite.config.d.ts +0 -2
- /package/dist/{packages/components → components}/Alert/Alert.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Alert/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Banner/Banner.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Banner/index.d.ts +0 -0
- /package/dist/{packages/components → components}/DatePicker/DatePicker.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/DatePicker/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Dialog/index.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Empty/Empty.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Empty/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Icon/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Icon/types.d.ts +0 -0
- /package/dist/{packages/components → components}/Notification/Notification.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Notification/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Pagination/Pagination.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Pagination/index.d.ts +0 -0
- /package/dist/{packages/components → components}/Tab/Tab.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Tab/TabPane.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Tooltips/Tooltips.vue.d.ts +0 -0
- /package/dist/{packages/components → components}/Tooltips/index.d.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Vue from 'vue'
|
|
2
|
+
declare const isVue2: boolean
|
|
3
|
+
declare const isVue3: boolean
|
|
4
|
+
declare const Vue2: any
|
|
5
|
+
declare const install: (vue?: any) => void
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated To avoid bringing in all the tree-shakable modules, this API has been deprecated. Use `Vue2` or named exports instead.
|
|
8
|
+
* Refer to https://github.com/vueuse/vue-demi/issues/41
|
|
9
|
+
*/
|
|
10
|
+
declare const V: typeof Vue
|
|
11
|
+
|
|
12
|
+
export function set<T>(target: any, key: any, val: T): T
|
|
13
|
+
export function del(target: any, key: any): void
|
|
14
|
+
|
|
15
|
+
export * from 'vue'
|
|
16
|
+
export {
|
|
17
|
+
V as Vue,
|
|
18
|
+
Vue2,
|
|
19
|
+
isVue2,
|
|
20
|
+
isVue3,
|
|
21
|
+
install,
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { InternalRuleItem, InternalValidateMessages, RuleItem, Rules, ValidateCallback, ValidateMessages, ValidateOption, Values, SyncErrorType } from './interface';
|
|
2
|
+
export * from './interface';
|
|
3
|
+
/**
|
|
4
|
+
* Encapsulates a validation schema.
|
|
5
|
+
*
|
|
6
|
+
* @param descriptor An object declaring validation rules
|
|
7
|
+
* for this schema.
|
|
8
|
+
*/
|
|
9
|
+
declare class Schema {
|
|
10
|
+
static register: (type: string, validator: any) => void;
|
|
11
|
+
static warning: (type: string, errors: SyncErrorType[]) => void;
|
|
12
|
+
static messages: InternalValidateMessages;
|
|
13
|
+
static validators: {
|
|
14
|
+
string: import('./interface').ExecuteValidator;
|
|
15
|
+
method: import('./interface').ExecuteValidator;
|
|
16
|
+
number: import('./interface').ExecuteValidator;
|
|
17
|
+
boolean: import('./interface').ExecuteValidator;
|
|
18
|
+
regexp: import('./interface').ExecuteValidator;
|
|
19
|
+
integer: import('./interface').ExecuteValidator;
|
|
20
|
+
float: import('./interface').ExecuteValidator;
|
|
21
|
+
array: import('./interface').ExecuteValidator;
|
|
22
|
+
object: import('./interface').ExecuteValidator;
|
|
23
|
+
enum: import('./interface').ExecuteValidator;
|
|
24
|
+
pattern: import('./interface').ExecuteValidator;
|
|
25
|
+
date: import('./interface').ExecuteValidator;
|
|
26
|
+
url: import('./interface').ExecuteValidator;
|
|
27
|
+
hex: import('./interface').ExecuteValidator;
|
|
28
|
+
email: import('./interface').ExecuteValidator;
|
|
29
|
+
required: import('./interface').ExecuteValidator;
|
|
30
|
+
any: import('./interface').ExecuteValidator;
|
|
31
|
+
};
|
|
32
|
+
rules: Record<string, RuleItem[]>;
|
|
33
|
+
_messages: InternalValidateMessages;
|
|
34
|
+
constructor(descriptor: Rules);
|
|
35
|
+
define(rules: Rules): void;
|
|
36
|
+
messages(messages?: ValidateMessages): InternalValidateMessages;
|
|
37
|
+
validate(source: Values, option?: ValidateOption, callback?: ValidateCallback): Promise<Values>;
|
|
38
|
+
validate(source: Values, callback: ValidateCallback): Promise<Values>;
|
|
39
|
+
validate(source: Values): Promise<Values>;
|
|
40
|
+
getType(rule: InternalRuleItem): import('./interface').RuleType;
|
|
41
|
+
getValidationMethod(rule: InternalRuleItem): ((rule: InternalRuleItem, value: any, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => void | import('./interface').SyncValidateResult) | import('./interface').ExecuteValidator;
|
|
42
|
+
}
|
|
43
|
+
export default Schema;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export declare type RuleType = 'string' | 'number' | 'boolean' | 'method' | 'regexp' | 'integer' | 'float' | 'array' | 'object' | 'enum' | 'date' | 'url' | 'hex' | 'email' | 'pattern' | 'any';
|
|
2
|
+
export interface ValidateOption {
|
|
3
|
+
suppressWarning?: boolean;
|
|
4
|
+
suppressValidatorError?: boolean;
|
|
5
|
+
first?: boolean;
|
|
6
|
+
firstFields?: boolean | string[];
|
|
7
|
+
messages?: Partial<ValidateMessages>;
|
|
8
|
+
/** The name of rules need to be trigger. Will validate all rules if leave empty */
|
|
9
|
+
keys?: string[];
|
|
10
|
+
error?: (rule: InternalRuleItem, message: string) => ValidateError;
|
|
11
|
+
}
|
|
12
|
+
export declare type SyncErrorType = Error | string;
|
|
13
|
+
export declare type SyncValidateResult = boolean | SyncErrorType | SyncErrorType[];
|
|
14
|
+
export declare type ValidateResult = void | Promise<void> | SyncValidateResult;
|
|
15
|
+
export interface RuleItem {
|
|
16
|
+
type?: RuleType;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
pattern?: RegExp | string;
|
|
19
|
+
min?: number;
|
|
20
|
+
max?: number;
|
|
21
|
+
len?: number;
|
|
22
|
+
enum?: Array<string | number | boolean | null | undefined>;
|
|
23
|
+
whitespace?: boolean;
|
|
24
|
+
fields?: Record<string, Rule>;
|
|
25
|
+
options?: ValidateOption;
|
|
26
|
+
defaultField?: Rule;
|
|
27
|
+
transform?: (value: Value) => Value;
|
|
28
|
+
message?: string | ((a?: string) => string);
|
|
29
|
+
asyncValidator?: (rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => void | Promise<void>;
|
|
30
|
+
validator?: (rule: InternalRuleItem, value: Value, callback: (error?: string | Error) => void, source: Values, options: ValidateOption) => SyncValidateResult | void;
|
|
31
|
+
}
|
|
32
|
+
export declare type Rule = RuleItem | RuleItem[];
|
|
33
|
+
export declare type Rules = Record<string, Rule>;
|
|
34
|
+
/**
|
|
35
|
+
* Rule for validating a value exists in an enumerable list.
|
|
36
|
+
*
|
|
37
|
+
* @param rule The validation rule.
|
|
38
|
+
* @param value The value of the field on the source object.
|
|
39
|
+
* @param source The source object being validated.
|
|
40
|
+
* @param errors An array of errors that this rule may add
|
|
41
|
+
* validation errors to.
|
|
42
|
+
* @param options The validation options.
|
|
43
|
+
* @param options.messages The validation messages.
|
|
44
|
+
* @param type Rule type
|
|
45
|
+
*/
|
|
46
|
+
export declare type ExecuteRule = (rule: InternalRuleItem, value: Value, source: Values, errors: string[], options: ValidateOption, type?: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Performs validation for any type.
|
|
49
|
+
*
|
|
50
|
+
* @param rule The validation rule.
|
|
51
|
+
* @param value The value of the field on the source object.
|
|
52
|
+
* @param callback The callback function.
|
|
53
|
+
* @param source The source object being validated.
|
|
54
|
+
* @param options The validation options.
|
|
55
|
+
* @param options.messages The validation messages.
|
|
56
|
+
*/
|
|
57
|
+
export declare type ExecuteValidator = (rule: InternalRuleItem, value: Value, callback: (error?: string[]) => void, source: Values, options: ValidateOption) => void;
|
|
58
|
+
declare type ValidateMessage<T extends any[] = unknown[]> = string | ((...args: T) => string);
|
|
59
|
+
declare type FullField = string | undefined;
|
|
60
|
+
declare type EnumString = string | undefined;
|
|
61
|
+
declare type Pattern = string | RegExp | undefined;
|
|
62
|
+
declare type Range = number | undefined;
|
|
63
|
+
declare type Type = string | undefined;
|
|
64
|
+
export interface ValidateMessages {
|
|
65
|
+
default?: ValidateMessage;
|
|
66
|
+
required?: ValidateMessage<[FullField]>;
|
|
67
|
+
enum?: ValidateMessage<[FullField, EnumString]>;
|
|
68
|
+
whitespace?: ValidateMessage<[FullField]>;
|
|
69
|
+
date?: {
|
|
70
|
+
format?: ValidateMessage;
|
|
71
|
+
parse?: ValidateMessage;
|
|
72
|
+
invalid?: ValidateMessage;
|
|
73
|
+
};
|
|
74
|
+
types?: {
|
|
75
|
+
string?: ValidateMessage<[FullField, Type]>;
|
|
76
|
+
method?: ValidateMessage<[FullField, Type]>;
|
|
77
|
+
array?: ValidateMessage<[FullField, Type]>;
|
|
78
|
+
object?: ValidateMessage<[FullField, Type]>;
|
|
79
|
+
number?: ValidateMessage<[FullField, Type]>;
|
|
80
|
+
date?: ValidateMessage<[FullField, Type]>;
|
|
81
|
+
boolean?: ValidateMessage<[FullField, Type]>;
|
|
82
|
+
integer?: ValidateMessage<[FullField, Type]>;
|
|
83
|
+
float?: ValidateMessage<[FullField, Type]>;
|
|
84
|
+
regexp?: ValidateMessage<[FullField, Type]>;
|
|
85
|
+
email?: ValidateMessage<[FullField, Type]>;
|
|
86
|
+
url?: ValidateMessage<[FullField, Type]>;
|
|
87
|
+
hex?: ValidateMessage<[FullField, Type]>;
|
|
88
|
+
};
|
|
89
|
+
string?: {
|
|
90
|
+
len?: ValidateMessage<[FullField, Range]>;
|
|
91
|
+
min?: ValidateMessage<[FullField, Range]>;
|
|
92
|
+
max?: ValidateMessage<[FullField, Range]>;
|
|
93
|
+
range?: ValidateMessage<[FullField, Range, Range]>;
|
|
94
|
+
};
|
|
95
|
+
number?: {
|
|
96
|
+
len?: ValidateMessage<[FullField, Range]>;
|
|
97
|
+
min?: ValidateMessage<[FullField, Range]>;
|
|
98
|
+
max?: ValidateMessage<[FullField, Range]>;
|
|
99
|
+
range?: ValidateMessage<[FullField, Range, Range]>;
|
|
100
|
+
};
|
|
101
|
+
array?: {
|
|
102
|
+
len?: ValidateMessage<[FullField, Range]>;
|
|
103
|
+
min?: ValidateMessage<[FullField, Range]>;
|
|
104
|
+
max?: ValidateMessage<[FullField, Range]>;
|
|
105
|
+
range?: ValidateMessage<[FullField, Range, Range]>;
|
|
106
|
+
};
|
|
107
|
+
pattern?: {
|
|
108
|
+
mismatch?: ValidateMessage<[FullField, Value, Pattern]>;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export interface InternalValidateMessages extends ValidateMessages {
|
|
112
|
+
clone: () => InternalValidateMessages;
|
|
113
|
+
}
|
|
114
|
+
export declare type Value = any;
|
|
115
|
+
export declare type Values = Record<string, Value>;
|
|
116
|
+
export interface ValidateError {
|
|
117
|
+
message?: string;
|
|
118
|
+
fieldValue?: Value;
|
|
119
|
+
field?: string;
|
|
120
|
+
}
|
|
121
|
+
export declare type ValidateFieldsError = Record<string, ValidateError[]>;
|
|
122
|
+
export declare type ValidateCallback = (errors: ValidateError[] | null, fields: ValidateFieldsError | Values) => void;
|
|
123
|
+
export interface RuleValuePackage {
|
|
124
|
+
rule: InternalRuleItem;
|
|
125
|
+
value: Value;
|
|
126
|
+
source: Values;
|
|
127
|
+
field: string;
|
|
128
|
+
}
|
|
129
|
+
export interface InternalRuleItem extends Omit<RuleItem, 'validator'> {
|
|
130
|
+
field?: string;
|
|
131
|
+
fullField?: string;
|
|
132
|
+
fullFields?: string[];
|
|
133
|
+
validator?: RuleItem['validator'] | ExecuteValidator;
|
|
134
|
+
}
|
|
135
|
+
export {};
|