@signal24/vue-foundation 3.8.0 → 4.0.0
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/.eslintrc.cjs +35 -0
- package/.prettierrc.json +4 -2
- package/dist/src/components/ajax-select.vue.d.ts +21 -0
- package/dist/src/components/alert-helpers.d.ts +8 -0
- package/dist/src/components/alert-modal.vue.d.ts +27 -0
- package/dist/src/components/ez-smart-select.vue.d.ts +27 -0
- package/dist/src/components/index.d.ts +8 -0
- package/dist/src/components/modal-container.d.ts +33 -0
- package/dist/src/components/modal.vue.d.ts +34 -0
- package/dist/src/components/smart-select.vue.d.ts +121 -0
- package/dist/src/config.d.ts +8 -0
- package/dist/src/directives/autofocus.d.ts +2 -0
- package/dist/src/directives/confirm-button.d.ts +2 -0
- package/dist/src/directives/date-input.d.ts +2 -0
- package/dist/src/directives/datetime.d.ts +2 -0
- package/dist/src/directives/disabled.d.ts +2 -0
- package/dist/src/directives/duration.d.ts +2 -0
- package/dist/src/directives/index.d.ts +24 -0
- package/dist/src/directives/infinite-scroll.d.ts +3 -0
- package/dist/src/directives/readonly.d.ts +2 -0
- package/dist/src/directives/tooltip.d.ts +41 -0
- package/dist/src/filters/index.d.ts +39 -0
- package/dist/src/helpers/array.d.ts +3 -0
- package/dist/src/helpers/context-menu.d.ts +13 -0
- package/dist/src/helpers/delay.d.ts +2 -0
- package/dist/src/helpers/error.d.ts +7 -0
- package/dist/src/helpers/index.d.ts +9 -0
- package/dist/src/helpers/mask.d.ts +15 -0
- package/dist/src/helpers/number.d.ts +1 -0
- package/dist/src/helpers/object.d.ts +2 -0
- package/dist/src/helpers/openapi.d.ts +34 -0
- package/dist/src/helpers/string.d.ts +5 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/infinite-scroll.d.ts +30 -0
- package/dist/src/hooks/resize-watcher.d.ts +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/types.d.ts +14 -0
- package/dist/src/vite-plugins/index.d.ts +1 -0
- package/dist/src/vite-plugins/index.js +2 -0
- package/dist/src/vite-plugins/vite-openapi-plugin.d.ts +4 -0
- package/dist/src/vite-plugins/vite-openapi-plugin.js +58 -0
- package/dist/vue-foundation.css +1 -0
- package/dist/vue-foundation.es.js +1129 -0
- package/package.json +44 -16
- package/src/components/ajax-select.vue +44 -23
- package/src/components/alert-helpers.ts +45 -0
- package/src/components/alert-modal.vue +68 -0
- package/src/components/ez-smart-select.vue +51 -0
- package/src/components/index.ts +10 -0
- package/src/components/modal-container.ts +131 -0
- package/src/components/modal.vue +44 -129
- package/src/components/smart-select.vue +196 -243
- package/src/config.ts +15 -0
- package/src/directives/autofocus.ts +20 -0
- package/src/directives/confirm-button.ts +50 -0
- package/src/directives/date-input.ts +19 -0
- package/src/directives/datetime.ts +48 -0
- package/src/directives/disabled.ts +30 -0
- package/src/directives/duration.ts +79 -0
- package/src/directives/index.ts +37 -0
- package/src/directives/infinite-scroll.ts +9 -0
- package/src/directives/readonly.ts +15 -0
- package/src/directives/tooltip.ts +190 -0
- package/src/filters/index.ts +79 -0
- package/src/helpers/array.ts +7 -0
- package/src/helpers/context-menu.ts +108 -0
- package/src/helpers/delay.ts +2 -0
- package/src/helpers/error.ts +41 -0
- package/src/helpers/index.ts +9 -0
- package/src/helpers/mask.ts +105 -0
- package/src/helpers/number.ts +3 -0
- package/src/helpers/object.ts +19 -0
- package/src/helpers/openapi.ts +82 -0
- package/src/helpers/string.ts +27 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/infinite-scroll.ts +107 -0
- package/src/hooks/resize-watcher.ts +8 -0
- package/src/index.ts +14 -0
- package/src/types.ts +14 -0
- package/src/vite-plugins/index.ts +2 -0
- package/src/vite-plugins/vite-openapi-plugin.ts +71 -0
- package/tsconfig.app.json +22 -0
- package/tsconfig.json +14 -0
- package/tsconfig.node.json +9 -0
- package/tsconfig.vite-plugins.json +10 -0
- package/tsconfig.vitest.json +9 -0
- package/vite.config.js +37 -35
- package/vitest.config.js +17 -0
- package/.eslintrc.js +0 -16
- package/CHANGES.md +0 -13
- package/postcss.config.cjs +0 -5
- package/src/app.js +0 -25
- package/src/components/alert.vue +0 -130
- package/src/components/index.js +0 -12
- package/src/config.js +0 -11
- package/src/directives/autofocus.js +0 -17
- package/src/directives/confirm-button.js +0 -40
- package/src/directives/date-input.js +0 -18
- package/src/directives/datetime.js +0 -46
- package/src/directives/disabled.js +0 -28
- package/src/directives/duration.js +0 -72
- package/src/directives/index.js +0 -10
- package/src/directives/infinite-scroll.js +0 -17
- package/src/directives/readonly.js +0 -17
- package/src/directives/tooltip.js +0 -178
- package/src/directives/user-text.js +0 -11
- package/src/filters/index.js +0 -82
- package/src/helpers/array.js +0 -99
- package/src/helpers/context-menu.js +0 -66
- package/src/helpers/delay.js +0 -3
- package/src/helpers/error.js +0 -36
- package/src/helpers/http.js +0 -44
- package/src/helpers/index.js +0 -9
- package/src/helpers/mask.js +0 -90
- package/src/helpers/number.js +0 -6
- package/src/helpers/string.js +0 -36
- package/src/helpers/vue.js +0 -5
- package/src/index.js +0 -33
- package/src/plugins/index.js +0 -10
- package/src/plugins/infinite-scroll/hook.js +0 -30
- package/src/plugins/infinite-scroll.js +0 -100
- package/src/plugins/resize-watcher.js +0 -28
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
require('@rushstack/eslint-patch/modern-module-resolution');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
root: true,
|
|
6
|
+
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier'],
|
|
7
|
+
overrides: [
|
|
8
|
+
{
|
|
9
|
+
files: ['cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}'],
|
|
10
|
+
extends: ['plugin:cypress/recommended']
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
files: ['vite.config.*', 'vitest.config.*', 'cypress.config.*', 'playwright.config.*'],
|
|
14
|
+
env: {
|
|
15
|
+
node: true
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
parserOptions: {
|
|
20
|
+
ecmaVersion: 'latest'
|
|
21
|
+
},
|
|
22
|
+
plugins: ['unused-imports', 'simple-import-sort'],
|
|
23
|
+
rules: {
|
|
24
|
+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
25
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
26
|
+
'simple-import-sort/imports': 'error',
|
|
27
|
+
'simple-import-sort/exports': 'error',
|
|
28
|
+
'prettier/prettier': 'warn',
|
|
29
|
+
'no-unused-vars': 'off',
|
|
30
|
+
'unused-imports/no-unused-imports': 'error',
|
|
31
|
+
'unused-imports/no-unused-vars': ['warn', { vars: 'all', varsIgnorePattern: '^_', args: 'all', argsIgnorePattern: '^_' }],
|
|
32
|
+
'vue/multi-word-component-names': 'off',
|
|
33
|
+
'vue/no-reserved-component-names': 'off'
|
|
34
|
+
}
|
|
35
|
+
};
|
package/.prettierrc.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type GenericObject = {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
5
|
+
props: Readonly<Omit<{
|
|
6
|
+
modelValue: any;
|
|
7
|
+
loadFn: () => Promise<GenericObject[]>;
|
|
8
|
+
nullText?: string | undefined;
|
|
9
|
+
loadingText?: string | undefined;
|
|
10
|
+
displayKey?: string | undefined;
|
|
11
|
+
preprocesor?: ((option: GenericObject) => string) | undefined;
|
|
12
|
+
}, "modelValue"> & {
|
|
13
|
+
modelValue: any;
|
|
14
|
+
}>;
|
|
15
|
+
options: import("vue").Ref<GenericObject[] | null>;
|
|
16
|
+
renderOptions: import("vue").ComputedRef<any[] | null>;
|
|
17
|
+
selectedItem: import("vue").Ref<GenericObject | null>;
|
|
18
|
+
}, {}, {}, {
|
|
19
|
+
load(): Promise<void>;
|
|
20
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function showAlert(title: string, message: string | Error): Promise<void>;
|
|
2
|
+
export declare function showAlert(message: string | Error): Promise<void>;
|
|
3
|
+
export declare function showConfirm(title: string, message: string): Promise<boolean>;
|
|
4
|
+
export declare function showConfirm(message: string): Promise<boolean>;
|
|
5
|
+
export declare function showConfirmDestroy(title: string, message: string): Promise<boolean>;
|
|
6
|
+
export declare function showConfirmDestroy(message: string): Promise<boolean>;
|
|
7
|
+
export declare function showWait(title: string, message: string): () => void;
|
|
8
|
+
export declare function showWait(message: string): () => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
isBare?: boolean | undefined;
|
|
3
|
+
isHtml?: boolean | undefined;
|
|
4
|
+
classes?: string[] | undefined;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
message: string | Error;
|
|
7
|
+
shouldConfirm?: boolean | undefined;
|
|
8
|
+
callback: (ok: boolean) => void;
|
|
9
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
isBare?: boolean | undefined;
|
|
11
|
+
isHtml?: boolean | undefined;
|
|
12
|
+
classes?: string[] | undefined;
|
|
13
|
+
title?: string | undefined;
|
|
14
|
+
message: string | Error;
|
|
15
|
+
shouldConfirm?: boolean | undefined;
|
|
16
|
+
callback: (ok: boolean) => void;
|
|
17
|
+
}>>>, {}>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
+
} : {
|
|
24
|
+
type: import('vue').PropType<T[K]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
modelValue: string | null | undefined;
|
|
3
|
+
nullTitle?: string | undefined;
|
|
4
|
+
placeholder?: string | undefined;
|
|
5
|
+
options: string[] | Record<string, string>;
|
|
6
|
+
formatter?: ((value: any) => string) | undefined;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: string | null) => void;
|
|
9
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
modelValue: string | null | undefined;
|
|
11
|
+
nullTitle?: string | undefined;
|
|
12
|
+
placeholder?: string | undefined;
|
|
13
|
+
options: string[] | Record<string, string>;
|
|
14
|
+
formatter?: ((value: any) => string) | undefined;
|
|
15
|
+
}>>> & {
|
|
16
|
+
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
17
|
+
}, {}>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
20
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
21
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
22
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
23
|
+
} : {
|
|
24
|
+
type: import('vue').PropType<T[K]>;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import VfAjaxSelect from './ajax-select.vue';
|
|
2
|
+
import VfAlertModal from './alert-modal.vue';
|
|
3
|
+
import VfEzSmartSelect from './ez-smart-select.vue';
|
|
4
|
+
import VfModal from './modal.vue';
|
|
5
|
+
import VfSmartSelect from './smart-select.vue';
|
|
6
|
+
export * from './alert-helpers';
|
|
7
|
+
export * from './modal-container';
|
|
8
|
+
export { VfAjaxSelect, VfAlertModal, VfEzSmartSelect, VfModal, VfSmartSelect };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Writable } from 'type-fest';
|
|
2
|
+
import { type AllowedComponentProps, type ComponentInternalInstance, type ComponentPublicInstance, type ComputedOptions, type MethodOptions, type Raw, type VNode, type VNodeProps } from 'vue';
|
|
3
|
+
interface ModalInjection<C extends Vue__ComponentPublicInstanceConstructor> {
|
|
4
|
+
id: string;
|
|
5
|
+
component: Raw<C>;
|
|
6
|
+
props: ComponentProps<C>;
|
|
7
|
+
vnode: VNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ModalContainer: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
12
|
+
export type Vue__ComponentPublicInstanceConstructor<T extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions> = {
|
|
13
|
+
__isFragment?: never;
|
|
14
|
+
__isTeleport?: never;
|
|
15
|
+
__isSuspense?: never;
|
|
16
|
+
new (...args: any[]): T;
|
|
17
|
+
};
|
|
18
|
+
export type ComponentConfig<T extends Vue__ComponentPublicInstanceConstructor> = T extends Vue__ComponentPublicInstanceConstructor<infer P> ? P : never;
|
|
19
|
+
export type ComponentProps<T extends Vue__ComponentPublicInstanceConstructor> = Writable<Omit<ComponentConfig<T>['$props'], keyof VNodeProps | keyof AllowedComponentProps>>;
|
|
20
|
+
export type AnyComponentPublicInstance = {
|
|
21
|
+
$: ComponentInternalInstance;
|
|
22
|
+
};
|
|
23
|
+
interface PropsWithCallback<T> {
|
|
24
|
+
callback?: (result: T) => void;
|
|
25
|
+
}
|
|
26
|
+
type ComponentReturn<C extends Vue__ComponentPublicInstanceConstructor> = ComponentProps<C> extends PropsWithCallback<infer R> ? R : never;
|
|
27
|
+
export declare function createModalInjection<C extends Vue__ComponentPublicInstanceConstructor>(component: C, props: ComponentProps<C>): ModalInjection<C>;
|
|
28
|
+
export declare function removeModalInjection(injection: ModalInjection<any>): void;
|
|
29
|
+
export declare function removeModalInjectionByInstance(instance: AnyComponentPublicInstance): void;
|
|
30
|
+
export declare function removeModalInjectionByInternalInstance(instance: ComponentInternalInstance): void;
|
|
31
|
+
export declare function removeModalInjectionByVnode(vnode: VNode): boolean;
|
|
32
|
+
export declare function presentModal<C extends Vue__ComponentPublicInstanceConstructor, R extends ComponentReturn<C>>(component: C, props: Omit<ComponentProps<C>, 'callback'>): Promise<R | undefined>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
id?: string | undefined;
|
|
3
|
+
closeOnMaskClick?: boolean | undefined;
|
|
4
|
+
scrolls?: boolean | undefined;
|
|
5
|
+
closeX?: boolean | undefined;
|
|
6
|
+
class?: string | undefined;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "formSubmit"[], "formSubmit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
closeOnMaskClick?: boolean | undefined;
|
|
10
|
+
scrolls?: boolean | undefined;
|
|
11
|
+
closeX?: boolean | undefined;
|
|
12
|
+
class?: string | undefined;
|
|
13
|
+
}>>> & {
|
|
14
|
+
onFormSubmit?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}, {}>, Partial<Record<"header", (_: {}) => any>> & Partial<Record<"default", (_: {}) => any>> & Partial<Record<"footer", (_: {}) => any>>>;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
18
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
19
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
20
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
21
|
+
} : {
|
|
22
|
+
type: import('vue').PropType<T[K]>;
|
|
23
|
+
required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
$props: __VLS_PropsChildren<S>;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type __VLS_PropsChildren<S> = {
|
|
33
|
+
[K in keyof (boolean extends (JSX.ElementChildrenAttribute extends never ? true : false) ? never : JSX.ElementChildrenAttribute)]?: S;
|
|
34
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export type GenericObject = {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
export interface OptionDescriptor {
|
|
6
|
+
key: string | Symbol;
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle?: string | null;
|
|
9
|
+
searchContent?: string;
|
|
10
|
+
ref?: GenericObject;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import("vue").DefineComponent<{
|
|
13
|
+
modelValue: {
|
|
14
|
+
type: PropType<any>;
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
loadOptions: PropType<(searchText: string | null) => Promise<GenericObject[]>>;
|
|
18
|
+
options: PropType<GenericObject[]>;
|
|
19
|
+
prependOptions: PropType<GenericObject[]>;
|
|
20
|
+
appendOptions: PropType<GenericObject[]>;
|
|
21
|
+
onCreateItem: PropType<(searchText: string) => void>;
|
|
22
|
+
preload: PropType<boolean>;
|
|
23
|
+
remoteSearch: PropType<boolean>;
|
|
24
|
+
searchFields: PropType<string[]>;
|
|
25
|
+
placeholder: PropType<string>;
|
|
26
|
+
keyExtractor: PropType<(option: any) => string | symbol>;
|
|
27
|
+
valueExtractor: PropType<(option: any) => any>;
|
|
28
|
+
formatter: {
|
|
29
|
+
type: PropType<(option: any) => string>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
subtitleFormatter: PropType<(option: any) => string>;
|
|
33
|
+
nullTitle: PropType<string>;
|
|
34
|
+
noResultsText: PropType<string>;
|
|
35
|
+
disabled: PropType<boolean>;
|
|
36
|
+
optionsListId: PropType<string>;
|
|
37
|
+
debug: PropType<boolean>;
|
|
38
|
+
}, unknown, {
|
|
39
|
+
isLoading: boolean;
|
|
40
|
+
isLoaded: boolean;
|
|
41
|
+
loadedOptions: GenericObject[];
|
|
42
|
+
isSearching: boolean;
|
|
43
|
+
searchText: string;
|
|
44
|
+
selectedOption: GenericObject | null;
|
|
45
|
+
selectedOptionTitle: string | null;
|
|
46
|
+
shouldDisplayOptions: boolean;
|
|
47
|
+
highlightedOptionKey: string | Symbol | null;
|
|
48
|
+
shouldShowCreateOption: boolean;
|
|
49
|
+
}, {
|
|
50
|
+
/**
|
|
51
|
+
* EFFECTIVE PROPS
|
|
52
|
+
*/
|
|
53
|
+
effectivePrependOptions(): GenericObject[];
|
|
54
|
+
effectiveAppendOptions(): GenericObject[];
|
|
55
|
+
effectiveDisabled(): boolean;
|
|
56
|
+
effectivePlaceholder(): string;
|
|
57
|
+
effectiveNoResultsText(): string;
|
|
58
|
+
effectiveKeyExtractor(): ((option: any) => any) | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* OPTIONS GENERATION
|
|
61
|
+
*/
|
|
62
|
+
allOptions(): GenericObject[];
|
|
63
|
+
optionsDescriptors(): OptionDescriptor[];
|
|
64
|
+
effectiveOptions(): OptionDescriptor[];
|
|
65
|
+
}, {
|
|
66
|
+
loadRemoteOptions(): Promise<void>;
|
|
67
|
+
handleSourceUpdate(): Promise<void> | undefined;
|
|
68
|
+
reloadOptions(): Promise<void>;
|
|
69
|
+
reloadOptionsIfSearching(): void;
|
|
70
|
+
handleKeyDown(e: KeyboardEvent): void;
|
|
71
|
+
handleInputFocused(): void;
|
|
72
|
+
setHighlightedOptionKey(useFirstItemAsFallback?: boolean): void;
|
|
73
|
+
getOptionKey(option: GenericObject): string | Symbol;
|
|
74
|
+
getOptionDescriptor(option: GenericObject): OptionDescriptor | null;
|
|
75
|
+
handleInputBlurred(): void;
|
|
76
|
+
handleOptionsDisplayed(): void;
|
|
77
|
+
teleportOptionsContainer(): void;
|
|
78
|
+
highlightInitialOption(): void;
|
|
79
|
+
handleOptionHover(option: OptionDescriptor): void;
|
|
80
|
+
incrementHighlightedOption(increment: number): void;
|
|
81
|
+
selectOption(option: OptionDescriptor): void;
|
|
82
|
+
handleValueChanged(): void;
|
|
83
|
+
addRemoteOption(option: GenericObject): void;
|
|
84
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
|
+
optionsLoaded: (options: any[]) => void;
|
|
86
|
+
createItem: (searchText: string) => void;
|
|
87
|
+
'update:modelValue': (value: any) => void;
|
|
88
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
+
modelValue: {
|
|
90
|
+
type: PropType<any>;
|
|
91
|
+
default: null;
|
|
92
|
+
};
|
|
93
|
+
loadOptions: PropType<(searchText: string | null) => Promise<GenericObject[]>>;
|
|
94
|
+
options: PropType<GenericObject[]>;
|
|
95
|
+
prependOptions: PropType<GenericObject[]>;
|
|
96
|
+
appendOptions: PropType<GenericObject[]>;
|
|
97
|
+
onCreateItem: PropType<(searchText: string) => void>;
|
|
98
|
+
preload: PropType<boolean>;
|
|
99
|
+
remoteSearch: PropType<boolean>;
|
|
100
|
+
searchFields: PropType<string[]>;
|
|
101
|
+
placeholder: PropType<string>;
|
|
102
|
+
keyExtractor: PropType<(option: any) => string | symbol>;
|
|
103
|
+
valueExtractor: PropType<(option: any) => any>;
|
|
104
|
+
formatter: {
|
|
105
|
+
type: PropType<(option: any) => string>;
|
|
106
|
+
required: true;
|
|
107
|
+
};
|
|
108
|
+
subtitleFormatter: PropType<(option: any) => string>;
|
|
109
|
+
nullTitle: PropType<string>;
|
|
110
|
+
noResultsText: PropType<string>;
|
|
111
|
+
disabled: PropType<boolean>;
|
|
112
|
+
optionsListId: PropType<string>;
|
|
113
|
+
debug: PropType<boolean>;
|
|
114
|
+
}>> & {
|
|
115
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
116
|
+
onOptionsLoaded?: ((options: any[]) => any) | undefined;
|
|
117
|
+
onCreateItem?: ((searchText: string) => any) | undefined;
|
|
118
|
+
}, {
|
|
119
|
+
modelValue: any;
|
|
120
|
+
}>;
|
|
121
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import { vAutofocus } from './autofocus';
|
|
3
|
+
import { vConfirmButton } from './confirm-button';
|
|
4
|
+
import { vDateInput } from './date-input';
|
|
5
|
+
import { vDatetime } from './datetime';
|
|
6
|
+
import { vDisabled } from './disabled';
|
|
7
|
+
import { vDuration } from './duration';
|
|
8
|
+
import { vInfiniteScroll } from './infinite-scroll';
|
|
9
|
+
import { vReadonly } from './readonly';
|
|
10
|
+
import { vTooltip } from './tooltip';
|
|
11
|
+
declare module 'vue' {
|
|
12
|
+
interface ComponentCustomProperties {
|
|
13
|
+
vAutofocus: typeof vAutofocus;
|
|
14
|
+
vConfirmButton: typeof vConfirmButton;
|
|
15
|
+
vDateInput: typeof vDateInput;
|
|
16
|
+
vDatetime: typeof vDatetime;
|
|
17
|
+
vDisabled: typeof vDisabled;
|
|
18
|
+
vDuration: typeof vDuration;
|
|
19
|
+
vInfiniteScroll: typeof vInfiniteScroll;
|
|
20
|
+
vReadonly: typeof vReadonly;
|
|
21
|
+
vTooltip: typeof vTooltip;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export declare function registerDirectives(app: App<Element>): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ObjectDirective } from 'vue';
|
|
2
|
+
type TooltipValue = string | null | false | undefined;
|
|
3
|
+
export declare const vTooltip: ObjectDirective<TooltipElement, TooltipValue>;
|
|
4
|
+
declare const TooltipState: unique symbol;
|
|
5
|
+
interface ITooltipState {
|
|
6
|
+
[TooltipState]?: VfTooltip;
|
|
7
|
+
}
|
|
8
|
+
type TooltipElement = HTMLElement & ITooltipState;
|
|
9
|
+
interface ITooltipOptions {
|
|
10
|
+
content: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
delay?: number;
|
|
13
|
+
html?: boolean;
|
|
14
|
+
class?: string | string[];
|
|
15
|
+
}
|
|
16
|
+
declare class VfTooltip {
|
|
17
|
+
private el;
|
|
18
|
+
private config;
|
|
19
|
+
private lastMoveEvt?;
|
|
20
|
+
private checkInterval?;
|
|
21
|
+
private shouldShow;
|
|
22
|
+
private tipEl?;
|
|
23
|
+
private titleEl?;
|
|
24
|
+
private contentEl?;
|
|
25
|
+
private mouseMoveBound;
|
|
26
|
+
private handleMouseMoveWithContext;
|
|
27
|
+
private handleTargetMouseEnterWithContext;
|
|
28
|
+
private handleTargetMouseLeaveWithContext;
|
|
29
|
+
constructor(el: HTMLElement, config: ITooltipOptions);
|
|
30
|
+
configure(config: ITooltipOptions): void;
|
|
31
|
+
handleTargetMouseEnter(e: MouseEvent): void;
|
|
32
|
+
handleTargetMouseLeave(): void;
|
|
33
|
+
show(e?: MouseEvent): void;
|
|
34
|
+
renderTooltip(): void;
|
|
35
|
+
getClasses(): string[];
|
|
36
|
+
removeTooltip(): void;
|
|
37
|
+
handleMouseMove(e: MouseEvent): void;
|
|
38
|
+
checkMoveEvent(): void;
|
|
39
|
+
destroy(): void;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
declare function bytes(value: number): string;
|
|
2
|
+
declare function dash(value: any): any;
|
|
3
|
+
declare function dashZeros(value: number | null): number | "-";
|
|
4
|
+
declare function number(value: string | number | null): string | null;
|
|
5
|
+
declare function phone(value: string | null): string | null;
|
|
6
|
+
declare function upperFirst(value: null): null;
|
|
7
|
+
declare function upperFirst(value: string): string;
|
|
8
|
+
declare function startCase(value: null): null;
|
|
9
|
+
declare function startCase(value: string): string;
|
|
10
|
+
declare function upperCase(value: null): null;
|
|
11
|
+
declare function upperCase(value: string): string;
|
|
12
|
+
declare function desnake(value: null): null;
|
|
13
|
+
declare function desnake(value: string): string;
|
|
14
|
+
declare function usCurrency(value: string | number): string;
|
|
15
|
+
declare const FilterFns: {
|
|
16
|
+
bytes: typeof bytes;
|
|
17
|
+
dash: typeof dash;
|
|
18
|
+
dashZeros: typeof dashZeros;
|
|
19
|
+
number: typeof number;
|
|
20
|
+
phone: typeof phone;
|
|
21
|
+
upperFirst: typeof upperFirst;
|
|
22
|
+
startCase: typeof startCase;
|
|
23
|
+
upperCase: typeof upperCase;
|
|
24
|
+
desnake: typeof desnake;
|
|
25
|
+
usCurrency: typeof usCurrency;
|
|
26
|
+
};
|
|
27
|
+
export declare const createFilters: <T>(factory: (baseFilters: typeof FilterFns) => T) => {
|
|
28
|
+
bytes: typeof bytes;
|
|
29
|
+
dash: typeof dash;
|
|
30
|
+
dashZeros: typeof dashZeros;
|
|
31
|
+
number: typeof number;
|
|
32
|
+
phone: typeof phone;
|
|
33
|
+
upperFirst: typeof upperFirst;
|
|
34
|
+
startCase: typeof startCase;
|
|
35
|
+
upperCase: typeof upperCase;
|
|
36
|
+
desnake: typeof desnake;
|
|
37
|
+
usCurrency: typeof usCurrency;
|
|
38
|
+
} & T;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface ContextMenuItem {
|
|
2
|
+
title: string;
|
|
3
|
+
handler: () => void;
|
|
4
|
+
class?: string;
|
|
5
|
+
shouldConfirm?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface ContextMenuConfig {
|
|
8
|
+
targetClass?: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
items: (ContextMenuItem | '-')[];
|
|
11
|
+
}
|
|
12
|
+
export declare function showContextMenu(e: MouseEvent, config: ContextMenuConfig): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class UserError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
export declare function formatError(err: any): string;
|
|
5
|
+
export declare function toError(err: any): Error;
|
|
6
|
+
export declare function handleErrorAndAlert(errIn: any, alertTitle?: string): Promise<void>;
|
|
7
|
+
export declare function handleError(errIn: any): Promise<void>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnyComponentPublicInstance } from '@/components';
|
|
2
|
+
declare const MaskState: unique symbol;
|
|
3
|
+
interface IMaskState {
|
|
4
|
+
[MaskState]?: {
|
|
5
|
+
maskEl: HTMLElement;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
type MaskElement = Element & IMaskState;
|
|
9
|
+
export declare function maskComponent(cmp: AnyComponentPublicInstance, message?: string): () => void;
|
|
10
|
+
export declare function unmaskComponent(cmp: AnyComponentPublicInstance): void;
|
|
11
|
+
export declare function maskEl(el: MaskElement, message?: string): () => void;
|
|
12
|
+
export declare function unmaskEl(el: MaskElement): void;
|
|
13
|
+
export declare function maskForm(formOrCmp: Element | AnyComponentPublicInstance, buttonSelector?: string | Element, buttonText?: string): () => void;
|
|
14
|
+
export declare function unmaskForm(formOrCmp: Element | AnyComponentPublicInstance): void;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatNumber(value: number): string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface IRequestOptions {
|
|
2
|
+
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
|
|
3
|
+
readonly url: string;
|
|
4
|
+
readonly path?: Record<string, any>;
|
|
5
|
+
readonly cookies?: Record<string, any>;
|
|
6
|
+
readonly headers?: Record<string, any>;
|
|
7
|
+
readonly query?: Record<string, any>;
|
|
8
|
+
readonly formData?: Record<string, any>;
|
|
9
|
+
readonly body?: any;
|
|
10
|
+
readonly mediaType?: string;
|
|
11
|
+
readonly responseHeader?: string;
|
|
12
|
+
readonly errors?: Record<number, string>;
|
|
13
|
+
}
|
|
14
|
+
interface IBaseHttpRequest {
|
|
15
|
+
request<T>(options: IRequestOptions): ICancelablePromise<T>;
|
|
16
|
+
}
|
|
17
|
+
interface IApiClient {
|
|
18
|
+
request: IBaseHttpRequest;
|
|
19
|
+
}
|
|
20
|
+
declare class ICancelablePromise<T = any> {
|
|
21
|
+
constructor(executor: (resolve: (value: any) => void, reject: (reason: any) => void, onCancel: (cancel: () => void) => void) => void);
|
|
22
|
+
then<TResult1 = any, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
|
|
23
|
+
catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): Promise<T | TResult>;
|
|
24
|
+
finally(onfinally?: (() => void) | undefined | null): Promise<T>;
|
|
25
|
+
cancel(): void;
|
|
26
|
+
}
|
|
27
|
+
interface IWrappedApiClientOptions<P extends ICancelablePromise = ICancelablePromise, Arguments extends unknown[] = any[]> {
|
|
28
|
+
apiClient: IApiClient;
|
|
29
|
+
onRequest?: (options: IRequestOptions) => IRequestOptions;
|
|
30
|
+
onError?: (err: Error, options: IRequestOptions) => Error | null | void;
|
|
31
|
+
CancelablePromise: new (...arguments_: Arguments) => P;
|
|
32
|
+
}
|
|
33
|
+
export declare function installApiClientInterceptors({ apiClient, onRequest, onError, CancelablePromise }: IWrappedApiClientOptions): void;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { escapeHtml } from '@vue/shared';
|
|
2
|
+
export declare function nl2br(value: string): string;
|
|
3
|
+
export declare function desnakeCase(value: string): string;
|
|
4
|
+
export declare function formatPhone(value: string): string;
|
|
5
|
+
export declare function formatUSCurrency(value: string | number): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ComponentInternalInstance } from 'vue';
|
|
2
|
+
declare const HookState: unique symbol;
|
|
3
|
+
interface IHookState {
|
|
4
|
+
el?: InfiniteScrollHandler;
|
|
5
|
+
ancestor?: InfiniteScrollHandler;
|
|
6
|
+
window?: InfiniteScrollHandler;
|
|
7
|
+
}
|
|
8
|
+
type InfiniteScrollComponent = ComponentInternalInstance & {
|
|
9
|
+
[HookState]?: IHookState;
|
|
10
|
+
};
|
|
11
|
+
export interface IInfiniteScrollOptions {
|
|
12
|
+
elScrolledToBottom?: () => void;
|
|
13
|
+
ancestorScrolledToBottom?: () => void;
|
|
14
|
+
windowScrolledToBottom?: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function useInfiniteScroll(options: IInfiniteScrollOptions, instance?: ComponentInternalInstance): void;
|
|
17
|
+
export declare function installScrollHook(cmp: InfiniteScrollComponent, options: IInfiniteScrollOptions): void;
|
|
18
|
+
export declare function reinstallScrollHook(cmp: InfiniteScrollComponent): void;
|
|
19
|
+
export declare function uninstallScrollHook(cmp: InfiniteScrollComponent): void;
|
|
20
|
+
export declare class InfiniteScrollHandler {
|
|
21
|
+
private el;
|
|
22
|
+
private handler;
|
|
23
|
+
isTripped: boolean;
|
|
24
|
+
constructor(el: Element, handler: (e: Event) => void);
|
|
25
|
+
install(): void;
|
|
26
|
+
uninstall(): void;
|
|
27
|
+
onScrollWithContext: (e: Event) => void;
|
|
28
|
+
onScroll(e: Event): void;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useResizeWatcher(fn: () => void): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export { configureVf } from './config';
|
|
4
|
+
export * from './filters';
|
|
5
|
+
export * from './helpers';
|
|
6
|
+
export * from './hooks';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export declare function installVf(app: App): void;
|