@dynamicforms/vuetify-inputs 0.7.12 → 0.8.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/dist/dynamicforms-vuetify-inputs.css +1 -1
- package/dist/dynamicforms-vuetify-inputs.js +935 -908
- package/dist/dynamicforms-vuetify-inputs.js.map +1 -1
- package/dist/dynamicforms-vuetify-inputs.umd.cjs +1 -1
- package/dist/dynamicforms-vuetify-inputs.umd.cjs.map +1 -1
- package/dist/index.d.ts +59 -19
- package/package.json +3 -2
- package/readme.md +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ import { FormatPart } from 'date-fns';
|
|
|
20
20
|
import { FormatRelativeFn } from 'date-fns';
|
|
21
21
|
import { GlobalComponents } from 'vue';
|
|
22
22
|
import { GlobalDirectives } from 'vue';
|
|
23
|
-
import { IField } from '@dynamicforms/vue-forms';
|
|
24
23
|
import { IFieldConstructorParams } from '@dynamicforms/vue-forms';
|
|
25
24
|
import { Locale } from 'date-fns';
|
|
26
25
|
import { LocaleDayPeriod } from 'date-fns';
|
|
@@ -180,17 +179,28 @@ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
|
180
179
|
};
|
|
181
180
|
|
|
182
181
|
export declare class Action extends Action_2<ActionBreakpointOptions> {
|
|
183
|
-
static create<T extends ActionBreakpointOptions = ActionBreakpointOptions>(params?: Partial<IFieldConstructorParams<T>>): Action;
|
|
184
182
|
getBreakpointValue(breakpoint: Ref<BreakpointNames>): ComputedRef<ActionRenderOptions>;
|
|
183
|
+
/** @see ActionRenderOptions.name */
|
|
185
184
|
get name(): string | undefined;
|
|
185
|
+
/** @see ActionRenderOptions.label */
|
|
186
186
|
get label(): string | undefined;
|
|
187
|
+
/** @see ActionRenderOptions.showLabel */
|
|
187
188
|
get showLabel(): boolean | undefined;
|
|
189
|
+
/** @see ActionRenderOptions.icon */
|
|
188
190
|
get icon(): string | undefined;
|
|
191
|
+
/** @see ActionRenderOptions.showIcon */
|
|
189
192
|
get showIcon(): boolean | undefined;
|
|
193
|
+
/** @see ActionRenderOptions.renderAs */
|
|
190
194
|
get renderAs(): ActionDisplayStyle | undefined;
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
195
|
+
/** @see ActionRenderOptions.defaultConfirm */
|
|
196
|
+
get defaultConfirm(): boolean | undefined;
|
|
197
|
+
/** @see ActionRenderOptions.defaultReject */
|
|
198
|
+
get defaultReject(): boolean | undefined;
|
|
199
|
+
/** @see ActionRenderOptions.passthroughAttrs */
|
|
200
|
+
get passthroughAttrs(): Record<string, any> | undefined;
|
|
201
|
+
static closeAction(data?: Partial<IFieldConstructorParams<ActionBreakpointOptions>>): Action;
|
|
202
|
+
static yesAction(data?: Partial<IFieldConstructorParams<ActionBreakpointOptions>>): Action;
|
|
203
|
+
static noAction(data?: Partial<IFieldConstructorParams<ActionBreakpointOptions>>): Action;
|
|
194
204
|
}
|
|
195
205
|
|
|
196
206
|
export declare type ActionBreakpointOptions = BreakpointsJSON<ActionRenderOptions>;
|
|
@@ -210,10 +220,37 @@ export declare namespace ActionDisplayStyle {
|
|
|
210
220
|
}
|
|
211
221
|
|
|
212
222
|
export declare interface ActionRenderOptions extends ActionValue {
|
|
223
|
+
/** Unique identifier for the action. Purely informational to `<df-actions>` itself - it is not used for
|
|
224
|
+
* rendering - but by convention should match the key under which the action is registered in a
|
|
225
|
+
* `FormActions` (`Record<string, Action>`) map passed to `@dynamicforms/vuetify-modal-form-kit`'s
|
|
226
|
+
* `modal.message()`/`modal.yesNo()`/etc. That map key (or the action's `fieldName`, when it's part of a
|
|
227
|
+
* `Form.Group`) - not this `name` field - is what the modal's promise actually resolves with; keeping them
|
|
228
|
+
* in sync is what lets callers do e.g. `if (await modal.yesNo(...) === 'yes')`. */
|
|
213
229
|
name?: string;
|
|
230
|
+
/** How the action is rendered: {@link ActionDisplayStyle.BUTTON} for a tonal `<v-btn>`, or
|
|
231
|
+
* {@link ActionDisplayStyle.TEXT} for a text-variant `<v-btn>`. */
|
|
214
232
|
renderAs?: ActionDisplayStyle;
|
|
233
|
+
/** Whether the label is shown. If `label` is empty, the label is never shown regardless of this flag. */
|
|
215
234
|
showLabel?: boolean;
|
|
235
|
+
/** Whether the icon is shown. If `icon` is empty, the icon is never shown regardless of this flag. */
|
|
216
236
|
showIcon?: boolean;
|
|
237
|
+
/** Marks this as the action to trigger on Enter when rendered inside `<df-modal>` (see that component's
|
|
238
|
+
* `onKeydown` in `@dynamicforms/vuetify-modal-form-kit`) - e.g. a "Save" or "Yes" action. In `<df-actions>` it
|
|
239
|
+
* also colors the button `primary`, unless overridden via `passthroughAttrs.color`. At most one action in a
|
|
240
|
+
* given set should set this. */
|
|
241
|
+
defaultConfirm?: boolean;
|
|
242
|
+
/** Marks this as the action to trigger on Escape when rendered inside `<df-modal>` (see that component's
|
|
243
|
+
* `onKeydown` in `@dynamicforms/vuetify-modal-form-kit`) - e.g. a "Cancel" or "No" action. In `<df-actions>` it
|
|
244
|
+
* also colors the button `secondary`, unless overridden via `passthroughAttrs.color`. At most one action in a
|
|
245
|
+
* given set should set this (an action such as `Action.closeAction()` may set both `defaultConfirm` and
|
|
246
|
+
* `defaultReject` so it fires on either key). */
|
|
247
|
+
defaultReject?: boolean;
|
|
248
|
+
/** Additional props/attrs forwarded verbatim to the rendered `<v-btn>` (e.g. `color`, `loading`, `density`,
|
|
249
|
+
* `rounded`, `block`, `prependIcon`, ...), taking precedence over `<df-actions>`'s own computed bindings
|
|
250
|
+
* (`variant`, `color`, `disabled`). Mirrors the `passthroughAttrs` convention used by `df-input`/`df-file`/etc
|
|
251
|
+
* (see `helpers/input-base.ts`); it has to live on the action's value here because `<df-actions>` renders a
|
|
252
|
+
* whole array of buttons, not just one. */
|
|
253
|
+
passthroughAttrs?: Record<string, any>;
|
|
217
254
|
}
|
|
218
255
|
|
|
219
256
|
export declare interface BaseEmits<T = any> {
|
|
@@ -222,7 +259,7 @@ export declare interface BaseEmits<T = any> {
|
|
|
222
259
|
}
|
|
223
260
|
|
|
224
261
|
export declare interface BaseProps<T = any> {
|
|
225
|
-
control?: default_2.
|
|
262
|
+
control?: default_2.FieldBase<T>;
|
|
226
263
|
modelValue?: T;
|
|
227
264
|
label?: string | Label | MdString;
|
|
228
265
|
errors?: string[];
|
|
@@ -316,15 +353,6 @@ export declare const DateTimeLocaleConfig: {
|
|
|
316
353
|
setDateTimeLocale(locale: Locale | Ref<Locale>): void;
|
|
317
354
|
};
|
|
318
355
|
|
|
319
|
-
declare const _default: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
320
|
-
errors: string | ValidationError[];
|
|
321
|
-
message: string | ValidationError[];
|
|
322
|
-
errorClasses: ClassTypes;
|
|
323
|
-
messageClasses: ClassTypes;
|
|
324
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
325
|
-
export { _default as DFInputHint }
|
|
326
|
-
export { _default as DfInputHint }
|
|
327
|
-
|
|
328
356
|
export declare const defaultBaseProps: {
|
|
329
357
|
enabled: undefined;
|
|
330
358
|
clearable: boolean;
|
|
@@ -425,7 +453,7 @@ precision: number | null;
|
|
|
425
453
|
step: number;
|
|
426
454
|
min: number;
|
|
427
455
|
max: number;
|
|
428
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
456
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
429
457
|
|
|
430
458
|
export declare namespace DfInputComponentProps {
|
|
431
459
|
export {
|
|
@@ -449,13 +477,20 @@ export declare namespace DfInputComponents {
|
|
|
449
477
|
DfDateTime,
|
|
450
478
|
DfFile,
|
|
451
479
|
DfInput,
|
|
452
|
-
|
|
480
|
+
DfInputHint,
|
|
453
481
|
DfRtfEditor,
|
|
454
482
|
DfSelect,
|
|
455
483
|
DfTextArea
|
|
456
484
|
}
|
|
457
485
|
}
|
|
458
486
|
|
|
487
|
+
export declare const DfInputHint: DefineComponent<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
488
|
+
errors: string | ValidationError[];
|
|
489
|
+
message: string | ValidationError[];
|
|
490
|
+
errorClasses: ClassTypes;
|
|
491
|
+
messageClasses: ClassTypes;
|
|
492
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
493
|
+
|
|
459
494
|
declare interface DfInputProps extends BaseProps {
|
|
460
495
|
inputType?: 'text' | 'password' | 'email' | 'url' | 'number';
|
|
461
496
|
precision?: number | null;
|
|
@@ -473,8 +508,8 @@ export declare const DfRtfEditor: DefineComponent<DfRtfEditorProps, {}, {}, {},
|
|
|
473
508
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
474
509
|
"onClick:clear"?: (() => any) | undefined;
|
|
475
510
|
}>, {
|
|
476
|
-
enabled: boolean;
|
|
477
511
|
minHeight: string;
|
|
512
|
+
enabled: boolean;
|
|
478
513
|
clearable: boolean;
|
|
479
514
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
480
515
|
$editor: CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
@@ -540,7 +575,7 @@ enabled: boolean;
|
|
|
540
575
|
clearable: boolean;
|
|
541
576
|
rows: number;
|
|
542
577
|
maxRows: number;
|
|
543
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
578
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
544
579
|
|
|
545
580
|
declare interface DfTextAreaProps extends BaseProps {
|
|
546
581
|
rows?: number;
|
|
@@ -665,6 +700,11 @@ export declare function useInputBase<T = any>(props: BaseProps<T>, emit: BaseEmi
|
|
|
665
700
|
errors: ComputedRef<default_2.ValidationError[]>;
|
|
666
701
|
showErrors: ComputedRef<default_2.ValidationError[] | undefined>;
|
|
667
702
|
visibility: ComputedRef<default_2.DisplayMode>;
|
|
703
|
+
isRendered: ComputedRef<boolean>;
|
|
704
|
+
visibilityClass: ComputedRef< {
|
|
705
|
+
'd-none': boolean;
|
|
706
|
+
invisible: boolean;
|
|
707
|
+
}>;
|
|
668
708
|
label: ComputedRef<Label>;
|
|
669
709
|
touched: Ref<boolean, boolean>;
|
|
670
710
|
density: FieldDensity;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamicforms/vuetify-inputs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Vuetify input components with guaranteed visual consistency across all form fields — unified density/variant system, globally configurable, with inline mode for table cells. Built for @dynamicforms/vue-forms.",
|
|
7
7
|
"author": "Jure Erznožnik",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"build": "vite build",
|
|
25
25
|
"test": "vitest run --coverage",
|
|
26
26
|
"lint": "eslint src --fix && vue-tsc --noEmit",
|
|
27
|
+
"lint:ci": "eslint src && vue-tsc --noEmit",
|
|
27
28
|
"docs:dev": "npm run docs:dev -w docs",
|
|
28
29
|
"docs:build": "npm run docs:build -w docs",
|
|
29
30
|
"docs:preview": "npm run docs:preview -w docs"
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"@ckeditor/ckeditor5-vue": "^7.0.0",
|
|
54
|
-
"@dynamicforms/vue-forms": "^0.
|
|
55
|
+
"@dynamicforms/vue-forms": "^0.6.0",
|
|
55
56
|
"@mdi/font": "^7.4.47",
|
|
56
57
|
"ckeditor5": "^43.0.0",
|
|
57
58
|
"date-fns": "^4.1.0",
|
package/readme.md
CHANGED
|
@@ -91,9 +91,9 @@ import { DfSelect, DfTextArea, DfFile } from '@dynamicforms/vuetify-inputs';
|
|
|
91
91
|
|
|
92
92
|
// Create a form with fields
|
|
93
93
|
const form = new Group({
|
|
94
|
-
country: Field
|
|
95
|
-
description: Field
|
|
96
|
-
document: Field
|
|
94
|
+
country: new Field({ value: null }),
|
|
95
|
+
description: new Field({ value: '' }),
|
|
96
|
+
document: new Field({ value: null })
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
// Define options for the select field
|
|
@@ -132,6 +132,7 @@ Detailed documentation is available at [https://docs.velis.si/dynamicforms/vueti
|
|
|
132
132
|
- **df-date-time**: A date and time selection component with configurable format and type.
|
|
133
133
|
- **df-file**: A file upload component with progress indication
|
|
134
134
|
- **df-input**: A general value input.
|
|
135
|
+
- **df-input-hint**: Renders a field's or a group's errors, falling back to its hint text.
|
|
135
136
|
- **df-rtf-editor**: A RTF editor input.
|
|
136
137
|
- **df-select**: A selection component supporting static or dynamic options, multiple selection, and tagging
|
|
137
138
|
- **df-text-area**: A textarea component with configurable rows and validation
|