@rebilly/revel 4.21.2 → 5.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/CHANGELOG.md +28 -46
- package/README.md +23 -14
- package/dist/common/date-picker-compat.d.ts +1 -0
- package/dist/common/datetime-formats.d.ts +28 -0
- package/dist/common/helpers/debounce.d.ts +2 -0
- package/dist/common/helpers/deep-clone.d.ts +2 -0
- package/dist/common/helpers/format-date.d.ts +4 -0
- package/dist/common/helpers/index.d.ts +6 -0
- package/dist/common/helpers/is-object.d.ts +2 -0
- package/dist/common/helpers/kebab-case.d.ts +2 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/components/r-avatar/r-avatar.vue.d.ts +86 -0
- package/dist/components/r-badge/r-badge.vue.d.ts +40 -0
- package/dist/components/r-button/r-button.vue.d.ts +195 -0
- package/dist/components/r-button-group/r-button-group.vue.d.ts +18 -0
- package/dist/components/r-checkbox/r-checkbox.vue.d.ts +148 -0
- package/dist/components/r-date-input/calendar-presets.d.ts +36 -0
- package/dist/components/r-date-input/r-calendar.vue.d.ts +159 -0
- package/dist/components/r-date-input/r-date-input.vue.d.ts +297 -0
- package/dist/components/r-date-input/r-date-range-button-group.vue.d.ts +167 -0
- package/dist/components/r-date-input/r-range-calendar.vue.d.ts +211 -0
- package/dist/components/r-date-input/shared-calendar-options.d.ts +64 -0
- package/dist/components/r-date-input/types.d.ts +8 -0
- package/dist/components/r-date-input/v-calendar.es.d.ts +459 -0
- package/dist/components/r-file-upload/r-file-upload.vue.d.ts +68 -0
- package/dist/components/r-grid/columnTypes/badge.vue.d.ts +42 -0
- package/dist/components/r-grid/columnTypes/date.vue.d.ts +25 -0
- package/dist/components/r-grid/columnTypes/index.d.ts +93 -0
- package/dist/components/r-grid/columnTypes/numeric.vue.d.ts +24 -0
- package/dist/components/r-grid/columnTypes/text.vue.d.ts +26 -0
- package/dist/components/r-grid/columnTypes/types.d.ts +24 -0
- package/dist/components/r-grid/helpers/color-generator.d.ts +4 -0
- package/dist/components/r-grid/r-grid.vue.d.ts +196 -0
- package/dist/components/r-icon/r-icon-sprites.d.ts +128 -0
- package/dist/components/r-icon/r-icon.vue.d.ts +61 -0
- package/dist/components/r-icon-button/r-icon-button.vue.d.ts +133 -0
- package/dist/components/r-img/r-img.vue.d.ts +96 -0
- package/dist/components/r-input/r-input.vue.d.ts +411 -0
- package/dist/components/r-loader/r-loader.vue.d.ts +55 -0
- package/dist/components/r-modal/r-modal.vue.d.ts +132 -0
- package/dist/components/r-month-picker/months.d.ts +1 -0
- package/dist/components/r-month-picker/r-month-picker.vue.d.ts +122 -0
- package/dist/components/r-pagination/r-pagination.vue.d.ts +97 -0
- package/dist/components/r-pagination/types.d.ts +8 -0
- package/dist/components/r-pagination-control/r-pagination-control.vue.d.ts +33 -0
- package/dist/components/r-popper/r-popper.vue.d.ts +275 -0
- package/dist/components/r-radio/r-radio.vue.d.ts +132 -0
- package/dist/components/r-repeater/r-repeater.vue.d.ts +58 -0
- package/dist/components/r-select/async-extension.d.ts +91 -0
- package/dist/components/r-select/r-select.vue.d.ts +733 -0
- package/dist/components/r-select/types.d.ts +29 -0
- package/dist/components/r-tabs/r-tab.vue.d.ts +70 -0
- package/dist/components/r-tabs/r-tabs.vue.d.ts +6983 -0
- package/dist/components/r-tabs/types.d.ts +23 -0
- package/dist/components/r-tile/r-tile.vue.d.ts +2 -0
- package/dist/components/r-toast/default-error-handler.d.ts +4 -0
- package/dist/components/r-toast/r-toast-manager.d.ts +17 -0
- package/dist/components/r-toast/r-toast.vue.d.ts +141 -0
- package/dist/components/r-toast/types.d.ts +19 -0
- package/dist/components/r-toggle/r-toggle.vue.d.ts +69 -0
- package/dist/directives/index.d.ts +8 -0
- package/dist/directives/r-click-outside/r-click-outside.d.ts +10 -0
- package/dist/directives/r-content/r-content.d.ts +9 -0
- package/dist/directives/r-fs-exclude.d.ts +7 -0
- package/dist/directives/r-lazy.d.ts +5 -0
- package/dist/directives/r-tooltip/r-tooltip.d.ts +12 -0
- package/dist/index.d.ts +20 -0
- package/dist/playground/Playground-copyme.vue.d.ts +2 -0
- package/dist/playground/main.d.ts +1 -0
- package/dist/revel.mjs +5577 -4744
- package/dist/revel.umd.js +115 -115
- package/dist/style.css +1 -1
- package/dist/styles/config.d.ts +32 -0
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/tokens.d.ts +130 -0
- package/dist/types.d.ts +24 -0
- package/package.json +107 -85
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
interface State {
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
rows: object[];
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import("vue").DefineComponent<{
|
|
7
|
+
/**
|
|
8
|
+
* Returns some data to be rendered by the default scoped slot
|
|
9
|
+
*/
|
|
10
|
+
provider: {
|
|
11
|
+
type: PropType<() => object[] | object[] | Promise<object[]>>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Defines if the loading state is fullscreen
|
|
16
|
+
*/
|
|
17
|
+
isLoaderFullscreen: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Defines the property, which changes will trigger the fetching of data
|
|
23
|
+
*/
|
|
24
|
+
watcher: {
|
|
25
|
+
type: ObjectConstructor;
|
|
26
|
+
default: () => {};
|
|
27
|
+
};
|
|
28
|
+
}, unknown, State, {
|
|
29
|
+
hasRows(): boolean;
|
|
30
|
+
}, {
|
|
31
|
+
fetchData(): Promise<void>;
|
|
32
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
/**
|
|
34
|
+
* Returns some data to be rendered by the default scoped slot
|
|
35
|
+
*/
|
|
36
|
+
provider: {
|
|
37
|
+
type: PropType<() => object[] | object[] | Promise<object[]>>;
|
|
38
|
+
required: true;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Defines if the loading state is fullscreen
|
|
42
|
+
*/
|
|
43
|
+
isLoaderFullscreen: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Defines the property, which changes will trigger the fetching of data
|
|
49
|
+
*/
|
|
50
|
+
watcher: {
|
|
51
|
+
type: ObjectConstructor;
|
|
52
|
+
default: () => {};
|
|
53
|
+
};
|
|
54
|
+
}>>, {
|
|
55
|
+
watcher: Record<string, any>;
|
|
56
|
+
isLoaderFullscreen: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { CreateComponentPublicInstance } from 'vue';
|
|
2
|
+
import type { Query, Value, CacheItem, Methods, AsyncSearchFn, Options } from './types';
|
|
3
|
+
import type { Nullable, Optional } from '../../types';
|
|
4
|
+
export type CacheValuePrefix = (value: unknown) => string;
|
|
5
|
+
export interface Config {
|
|
6
|
+
limit: number;
|
|
7
|
+
minValueLength: number;
|
|
8
|
+
cacheExpirationTime: number;
|
|
9
|
+
debounceDelay: number;
|
|
10
|
+
}
|
|
11
|
+
interface Cache {
|
|
12
|
+
lastRequestId: number;
|
|
13
|
+
itemsByKey: {
|
|
14
|
+
[key: string]: CacheItem;
|
|
15
|
+
};
|
|
16
|
+
lastKey: Nullable<string>;
|
|
17
|
+
}
|
|
18
|
+
export interface Component extends CreateComponentPublicInstance {
|
|
19
|
+
async: {
|
|
20
|
+
cache: Cache;
|
|
21
|
+
query: Query;
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface ConstructorPayload {
|
|
26
|
+
component: Component;
|
|
27
|
+
config: Config;
|
|
28
|
+
asyncGetInitValue: AsyncSearchFn;
|
|
29
|
+
asyncFind: AsyncSearchFn;
|
|
30
|
+
prepareCacheValuePrefix: CacheValuePrefix;
|
|
31
|
+
}
|
|
32
|
+
export declare class AsyncExtension {
|
|
33
|
+
private component;
|
|
34
|
+
private config;
|
|
35
|
+
private prepareCacheValuePrefix;
|
|
36
|
+
private methodsmap;
|
|
37
|
+
private cache;
|
|
38
|
+
private query;
|
|
39
|
+
isLoading: boolean;
|
|
40
|
+
findByValue: (value: Value) => Promise<void>;
|
|
41
|
+
findBySearch: (value: Value) => Promise<void>;
|
|
42
|
+
loadMore: (count: number) => Promise<void>;
|
|
43
|
+
loadByQuery: (query: Partial<Query>) => Promise<void>;
|
|
44
|
+
private static defaultConfig;
|
|
45
|
+
private static findMethodTypes;
|
|
46
|
+
constructor({ component, config, asyncGetInitValue, asyncFind, prepareCacheValuePrefix, }: ConstructorPayload);
|
|
47
|
+
static prepareConfig(config: Config): Config;
|
|
48
|
+
static makeCacheKey({ type, value, limit, offset, }: {
|
|
49
|
+
type: Methods;
|
|
50
|
+
value: string;
|
|
51
|
+
limit: number;
|
|
52
|
+
offset: number;
|
|
53
|
+
}): string;
|
|
54
|
+
static validateCacheData(data: Optional<CacheItem>, { expiration }: {
|
|
55
|
+
expiration: number;
|
|
56
|
+
}): boolean;
|
|
57
|
+
getConfig(): Readonly<{
|
|
58
|
+
limit: number;
|
|
59
|
+
minValueLength: number;
|
|
60
|
+
cacheExpirationTime: number;
|
|
61
|
+
debounceDelay: number;
|
|
62
|
+
}>;
|
|
63
|
+
getLastCachedFindResult(): CacheItem | undefined;
|
|
64
|
+
getLastCachedSearchFindResult(): CacheItem | undefined;
|
|
65
|
+
/** Returns actual query offset value. */
|
|
66
|
+
getOffset(): number;
|
|
67
|
+
/** Manual sets offset value. */
|
|
68
|
+
setOffset(offset: number): void;
|
|
69
|
+
/** Returns actual query limit value. */
|
|
70
|
+
getLimit(): number;
|
|
71
|
+
/** Returns true if last request has any options. */
|
|
72
|
+
hasOptions(): boolean;
|
|
73
|
+
find(type: Methods, value: Value, params?: Partial<Query>): Promise<void>;
|
|
74
|
+
private baseFindByValue;
|
|
75
|
+
private baseFindBySearch;
|
|
76
|
+
findNext(): Promise<void>;
|
|
77
|
+
findPrev(): Promise<void>;
|
|
78
|
+
baseLoadMore(count: number): Promise<void>;
|
|
79
|
+
baseLoadByQuery({ limit, offset }: Partial<Query>): Promise<void>;
|
|
80
|
+
getFromCache(key: Nullable<string>): CacheItem | undefined;
|
|
81
|
+
getAllCacheItems(): CacheItem[];
|
|
82
|
+
saveToCache({ key, type, options, value, query, }: {
|
|
83
|
+
key: string;
|
|
84
|
+
type: Methods;
|
|
85
|
+
options: Options;
|
|
86
|
+
value: Value;
|
|
87
|
+
query: Query;
|
|
88
|
+
}): void;
|
|
89
|
+
handleLoaded(): void;
|
|
90
|
+
}
|
|
91
|
+
export {};
|