@rebilly/revel 4.21.3 → 5.1.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.
Files changed (77) hide show
  1. package/CHANGELOG.md +29 -47
  2. package/README.md +23 -14
  3. package/dist/common/date-picker-compat.d.ts +1 -0
  4. package/dist/common/datetime-formats.d.ts +28 -0
  5. package/dist/common/helpers/debounce.d.ts +2 -0
  6. package/dist/common/helpers/deep-clone.d.ts +2 -0
  7. package/dist/common/helpers/format-date.d.ts +4 -0
  8. package/dist/common/helpers/index.d.ts +6 -0
  9. package/dist/common/helpers/is-object.d.ts +2 -0
  10. package/dist/common/helpers/kebab-case.d.ts +2 -0
  11. package/dist/components/index.d.ts +27 -0
  12. package/dist/components/r-avatar/r-avatar.vue.d.ts +86 -0
  13. package/dist/components/r-badge/r-badge.vue.d.ts +40 -0
  14. package/dist/components/r-button/r-button.vue.d.ts +195 -0
  15. package/dist/components/r-button-group/r-button-group.vue.d.ts +18 -0
  16. package/dist/components/r-checkbox/r-checkbox.vue.d.ts +148 -0
  17. package/dist/components/r-date-input/calendar-presets.d.ts +36 -0
  18. package/dist/components/r-date-input/r-calendar.vue.d.ts +159 -0
  19. package/dist/components/r-date-input/r-date-input.vue.d.ts +297 -0
  20. package/dist/components/r-date-input/r-date-range-button-group.vue.d.ts +167 -0
  21. package/dist/components/r-date-input/r-range-calendar.vue.d.ts +211 -0
  22. package/dist/components/r-date-input/shared-calendar-options.d.ts +64 -0
  23. package/dist/components/r-date-input/types.d.ts +8 -0
  24. package/dist/components/r-date-input/v-calendar.es.d.ts +459 -0
  25. package/dist/components/r-file-upload/r-file-upload.vue.d.ts +68 -0
  26. package/dist/components/r-grid/columnTypes/badge.vue.d.ts +42 -0
  27. package/dist/components/r-grid/columnTypes/date.vue.d.ts +25 -0
  28. package/dist/components/r-grid/columnTypes/index.d.ts +93 -0
  29. package/dist/components/r-grid/columnTypes/numeric.vue.d.ts +24 -0
  30. package/dist/components/r-grid/columnTypes/text.vue.d.ts +26 -0
  31. package/dist/components/r-grid/columnTypes/types.d.ts +24 -0
  32. package/dist/components/r-grid/helpers/color-generator.d.ts +4 -0
  33. package/dist/components/r-grid/r-grid.vue.d.ts +196 -0
  34. package/dist/components/r-icon/r-icon-sprites.d.ts +128 -0
  35. package/dist/components/r-icon/r-icon.vue.d.ts +61 -0
  36. package/dist/components/r-icon-button/r-icon-button.vue.d.ts +133 -0
  37. package/dist/components/r-img/r-img.vue.d.ts +96 -0
  38. package/dist/components/r-input/r-input.vue.d.ts +411 -0
  39. package/dist/components/r-loader/r-loader.vue.d.ts +55 -0
  40. package/dist/components/r-modal/r-modal.vue.d.ts +132 -0
  41. package/dist/components/r-month-picker/months.d.ts +1 -0
  42. package/dist/components/r-month-picker/r-month-picker.vue.d.ts +122 -0
  43. package/dist/components/r-pagination/r-pagination.vue.d.ts +97 -0
  44. package/dist/components/r-pagination/types.d.ts +8 -0
  45. package/dist/components/r-pagination-control/r-pagination-control.vue.d.ts +33 -0
  46. package/dist/components/r-popper/r-popper.vue.d.ts +275 -0
  47. package/dist/components/r-radio/r-radio.vue.d.ts +132 -0
  48. package/dist/components/r-repeater/r-repeater.vue.d.ts +58 -0
  49. package/dist/components/r-select/async-extension.d.ts +91 -0
  50. package/dist/components/r-select/r-select.vue.d.ts +733 -0
  51. package/dist/components/r-select/types.d.ts +29 -0
  52. package/dist/components/r-tabs/r-tab.vue.d.ts +70 -0
  53. package/dist/components/r-tabs/r-tabs.vue.d.ts +6983 -0
  54. package/dist/components/r-tabs/types.d.ts +23 -0
  55. package/dist/components/r-tile/r-tile.vue.d.ts +2 -0
  56. package/dist/components/r-toast/default-error-handler.d.ts +4 -0
  57. package/dist/components/r-toast/r-toast-manager.d.ts +17 -0
  58. package/dist/components/r-toast/r-toast.vue.d.ts +141 -0
  59. package/dist/components/r-toast/types.d.ts +19 -0
  60. package/dist/components/r-toggle/r-toggle.vue.d.ts +69 -0
  61. package/dist/directives/index.d.ts +8 -0
  62. package/dist/directives/r-click-outside/r-click-outside.d.ts +10 -0
  63. package/dist/directives/r-content/r-content.d.ts +9 -0
  64. package/dist/directives/r-fs-exclude.d.ts +7 -0
  65. package/dist/directives/r-lazy.d.ts +5 -0
  66. package/dist/directives/r-tooltip/r-tooltip.d.ts +12 -0
  67. package/dist/index.d.ts +20 -0
  68. package/dist/playground/Playground-copyme.vue.d.ts +2 -0
  69. package/dist/playground/main.d.ts +1 -0
  70. package/dist/revel.mjs +5580 -4747
  71. package/dist/revel.umd.js +115 -115
  72. package/dist/style.css +1 -1
  73. package/dist/styles/config.d.ts +32 -0
  74. package/dist/styles/index.d.ts +5 -0
  75. package/dist/styles/tokens.d.ts +130 -0
  76. package/dist/types.d.ts +24 -0
  77. 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 {};