@rebilly/revel 6.30.26 → 6.30.28

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 CHANGED
@@ -1 +1 @@
1
- ## [6.30.26](https://github.com/Rebilly/rebilly/compare/revel-v6.30.25...revel-v6.30.26) (2024-07-19)
1
+ ## [6.30.28](https://github.com/Rebilly/rebilly/compare/revel-v6.30.27...revel-v6.30.28) (2024-07-19)
@@ -1,148 +1,94 @@
1
- import { type PropType } from 'vue';
2
1
  import type { ValidationState } from '../../types';
3
- declare const _default: import("vue").DefineComponent<{
2
+ interface Props {
4
3
  /**
5
4
  * Label for the checkbox
6
5
  */
7
- label: {
8
- type: StringConstructor;
9
- default: string;
10
- };
6
+ label?: string;
11
7
  /**
12
8
  * Unique id of the checkbox
13
9
  */
14
- id: {
15
- type: StringConstructor;
16
- default: () => string;
17
- };
10
+ id?: string;
18
11
  /**
19
12
  * A text to describe the checkbox
20
13
  */
21
- caption: {
22
- type: StringConstructor;
23
- default: null;
24
- };
14
+ caption?: string;
25
15
  /**
26
16
  * Actual parent model for the component
27
17
  * @model
28
18
  */
29
- modelValue: {
30
- type: (BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
31
- default: boolean;
32
- };
19
+ modelValue?: string | number | boolean | string[];
33
20
  /**
34
21
  * Used to decide if checkbox is selected. If this value exists
35
22
  * in the v-model (array) or equals it, the checkbox shows as checked.
36
23
  */
37
- value: {
38
- type: (BooleanConstructor | StringConstructor)[];
39
- default: string;
40
- };
24
+ value?: string | boolean;
41
25
  /**
42
26
  * Semi-selected state
43
27
  */
44
- fuzzy: {
45
- type: BooleanConstructor;
46
- default: boolean;
47
- };
28
+ fuzzy?: boolean;
48
29
  /**
49
30
  * Disable checkbox
50
31
  */
51
- disabled: {
52
- type: BooleanConstructor;
53
- default: boolean;
54
- };
32
+ disabled?: boolean;
55
33
  /**
56
34
  * Validation result sent by Vuelidate
57
35
  */
58
- validate: {
59
- type: PropType<ValidationState>;
60
- default: null;
61
- };
62
- }, unknown, unknown, {
63
- isInvalid(): boolean;
64
- isChecked(): boolean;
65
- checkIcon(): "dash-l" | "checkbox-checkmark";
66
- }, {
67
- /**
68
- * Method used to calculate the modified internal state *after* user action.
69
- *
70
- * This method is (and must be) used *only* when the checkbox is clicked by the user (@see change).
71
- * Checkbox does not keep internal state - it calculates it based on the properties passed.
72
- * Therfore on update, it sends the opposite of the current state (as the user has just changed it).
73
- * It's up to the parent to update it's model and pass the new value as property, so the checkbox can update itself.
74
- */
75
- getNegateInternalState(): boolean | unknown[];
76
- change(): void;
77
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
78
- /**
79
- * Label for the checkbox
80
- */
81
- label: {
82
- type: StringConstructor;
83
- default: string;
84
- };
85
- /**
86
- * Unique id of the checkbox
87
- */
88
- id: {
89
- type: StringConstructor;
90
- default: () => string;
91
- };
92
- /**
93
- * A text to describe the checkbox
94
- */
95
- caption: {
96
- type: StringConstructor;
97
- default: null;
98
- };
99
- /**
100
- * Actual parent model for the component
101
- * @model
102
- */
103
- modelValue: {
104
- type: (BooleanConstructor | ArrayConstructor | StringConstructor | NumberConstructor)[];
105
- default: boolean;
106
- };
107
- /**
108
- * Used to decide if checkbox is selected. If this value exists
109
- * in the v-model (array) or equals it, the checkbox shows as checked.
110
- */
111
- value: {
112
- type: (BooleanConstructor | StringConstructor)[];
113
- default: string;
114
- };
115
- /**
116
- * Semi-selected state
117
- */
118
- fuzzy: {
119
- type: BooleanConstructor;
120
- default: boolean;
121
- };
122
- /**
123
- * Disable checkbox
124
- */
125
- disabled: {
126
- type: BooleanConstructor;
127
- default: boolean;
128
- };
129
- /**
130
- * Validation result sent by Vuelidate
131
- */
132
- validate: {
133
- type: PropType<ValidationState>;
134
- default: null;
135
- };
136
- }>> & {
137
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
36
+ validate?: ValidationState;
37
+ }
38
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
39
+ label: string;
40
+ id: () => string;
41
+ caption: undefined;
42
+ modelValue: boolean;
43
+ value: string;
44
+ fuzzy: boolean;
45
+ disabled: boolean;
46
+ validate: undefined;
47
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
48
+ "update:modelValue": (value: string | number | boolean | string[]) => void;
49
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
50
+ label: string;
51
+ id: () => string;
52
+ caption: undefined;
53
+ modelValue: boolean;
54
+ value: string;
55
+ fuzzy: boolean;
56
+ disabled: boolean;
57
+ validate: undefined;
58
+ }>>> & {
59
+ "onUpdate:modelValue"?: ((value: string | number | boolean | string[]) => any) | undefined;
138
60
  }, {
139
61
  id: string;
140
62
  caption: string;
141
63
  label: string;
142
64
  disabled: boolean;
143
65
  value: string | boolean;
144
- modelValue: string | number | boolean | unknown[];
66
+ modelValue: string | number | boolean | string[];
145
67
  fuzzy: boolean;
146
68
  validate: ValidationState;
69
+ }>, {
70
+ label?(_: {}): any;
147
71
  }>;
148
72
  export default _default;
73
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
74
+ type __VLS_TypePropsToRuntimeProps<T> = {
75
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
76
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
77
+ } : {
78
+ type: import('vue').PropType<T[K]>;
79
+ required: true;
80
+ };
81
+ };
82
+ type __VLS_WithDefaults<P, D> = {
83
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
84
+ default: D[K];
85
+ }> : P[K];
86
+ };
87
+ type __VLS_Prettify<T> = {
88
+ [K in keyof T]: T[K];
89
+ } & {};
90
+ type __VLS_WithTemplateSlots<T, S> = T & {
91
+ new (): {
92
+ $slots: S;
93
+ };
94
+ };
@@ -1,134 +1,107 @@
1
- declare const _default: import("vue").DefineComponent<{
1
+ type ModalSize = 'large' | 'extra-large' | 'fluid';
2
+ interface Props {
2
3
  /**
3
- * Use this prop to conditionally show the modal from the outside (BREAKING CHANGE)
4
+ * Use this prop to conditionally show the modal from the outside
4
5
  */
5
- show: {
6
- type: BooleanConstructor;
7
- default: boolean;
8
- };
9
- /**
10
- * TBD
11
- */
12
- title: {
13
- type: StringConstructor;
14
- default: null;
15
- };
16
- /**
17
- * TBD
18
- */
19
- cancelLabel: {
20
- type: StringConstructor;
21
- default: string;
22
- };
23
- /**
24
- * large, extra-large or fluid
25
- */
26
- size: {
27
- type: StringConstructor;
28
- default: null;
29
- };
30
- /**
31
- * TBD
32
- */
33
- scroll: {
34
- type: BooleanConstructor;
35
- default: boolean;
36
- };
37
- /**
38
- * TBD
39
- */
40
- scrollContent: {
41
- type: BooleanConstructor;
42
- default: boolean;
43
- };
44
- /**
45
- * Transition duration
46
- */
47
- duration: {
48
- type: NumberConstructor;
49
- default: number;
50
- };
51
- }, {
52
- containerElement: import("vue").Ref<HTMLDivElement | null>;
53
- }, unknown, {
54
- transitionDuration(): {
55
- 'transition-duration': string;
56
- };
57
- classes(): Record<string, boolean>;
58
- }, {
59
- submit(data?: object): void;
60
- close(): void;
61
- /**
62
- * Assures that the modal container is focused Or at least
63
- * an element inside it. So key events can be captured.
64
- * The focus works on the DIV because tabindex attribute see:
65
- * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
66
- */
67
- focus(): void;
68
- enter(): void;
69
- leave(): void;
70
- }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "submit" | "leave" | "enter")[], "close" | "submit" | "leave" | "enter", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
71
- /**
72
- * Use this prop to conditionally show the modal from the outside (BREAKING CHANGE)
73
- */
74
- show: {
75
- type: BooleanConstructor;
76
- default: boolean;
77
- };
6
+ show: boolean;
78
7
  /**
79
- * TBD
8
+ * Adds a title to the modal
80
9
  */
81
- title: {
82
- type: StringConstructor;
83
- default: null;
84
- };
10
+ title?: Nullable<string>;
85
11
  /**
86
- * TBD
12
+ * Adds a label to the cancel button
87
13
  */
88
- cancelLabel: {
89
- type: StringConstructor;
90
- default: string;
91
- };
14
+ cancelLabel?: string;
92
15
  /**
93
- * large, extra-large or fluid
16
+ * Adds a size to the modal
94
17
  */
95
- size: {
96
- type: StringConstructor;
97
- default: null;
98
- };
18
+ size?: Nullable<ModalSize>;
99
19
  /**
100
- * TBD
20
+ * Adds a scroll to the modal
101
21
  */
102
- scroll: {
103
- type: BooleanConstructor;
104
- default: boolean;
105
- };
22
+ scroll?: boolean;
106
23
  /**
107
- * TBD
24
+ * Adds a scroll to the content of the modal. Only works when using it with the `content` slot
108
25
  */
109
- scrollContent: {
110
- type: BooleanConstructor;
111
- default: boolean;
112
- };
26
+ scrollContent?: boolean;
113
27
  /**
114
- * Transition duration
28
+ * Adds a duration to the modal transition
115
29
  */
116
- duration: {
117
- type: NumberConstructor;
118
- default: number;
119
- };
120
- }>> & {
121
- onSubmit?: ((...args: any[]) => any) | undefined;
122
- onClose?: ((...args: any[]) => any) | undefined;
123
- onLeave?: ((...args: any[]) => any) | undefined;
124
- onEnter?: ((...args: any[]) => any) | undefined;
30
+ duration?: number;
31
+ }
32
+ declare function submit(data?: object): void;
33
+ declare function close(): void;
34
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
35
+ show: boolean;
36
+ title: null;
37
+ cancelLabel: string;
38
+ size: null;
39
+ scroll: boolean;
40
+ scrollContent: boolean;
41
+ duration: number;
42
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ close: () => void;
44
+ submit: (data?: object | undefined) => void;
45
+ leave: () => void;
46
+ enter: () => void;
47
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
48
+ show: boolean;
49
+ title: null;
50
+ cancelLabel: string;
51
+ size: null;
52
+ scroll: boolean;
53
+ scrollContent: boolean;
54
+ duration: number;
55
+ }>>> & {
56
+ onSubmit?: ((data?: object | undefined) => any) | undefined;
57
+ onClose?: (() => any) | undefined;
58
+ onLeave?: (() => any) | undefined;
59
+ onEnter?: (() => any) | undefined;
125
60
  }, {
126
- title: string;
127
- size: string;
61
+ title: Nullable<string>;
62
+ size: Nullable<ModalSize>;
128
63
  scroll: boolean;
129
64
  show: boolean;
130
65
  duration: number;
131
66
  cancelLabel: string;
132
67
  scrollContent: boolean;
68
+ }>, {
69
+ "header-actions"?(_: {}): any;
70
+ contents?(_: {}): any;
71
+ content?(_: {}): any;
72
+ "left-actions"?(_: {
73
+ submit: typeof submit;
74
+ close: typeof close;
75
+ }): any;
76
+ "right-actions"?(_: {
77
+ submit: typeof submit;
78
+ close: typeof close;
79
+ }): any;
80
+ actions?(_: {
81
+ submit: typeof submit;
82
+ close: typeof close;
83
+ }): any;
133
84
  }>;
134
85
  export default _default;
86
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
87
+ type __VLS_TypePropsToRuntimeProps<T> = {
88
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
89
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
90
+ } : {
91
+ type: import('vue').PropType<T[K]>;
92
+ required: true;
93
+ };
94
+ };
95
+ type __VLS_WithDefaults<P, D> = {
96
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
97
+ default: D[K];
98
+ }> : P[K];
99
+ };
100
+ type __VLS_Prettify<T> = {
101
+ [K in keyof T]: T[K];
102
+ } & {};
103
+ type __VLS_WithTemplateSlots<T, S> = T & {
104
+ new (): {
105
+ $slots: S;
106
+ };
107
+ };