@uniquedj95/vform 3.5.2 → 3.6.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/README.md +327 -16
- package/dist/components/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/CheckboxInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/RadioInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/RepeatInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/SelectInput.vue.d.ts.map +1 -1
- package/dist/components/inputs/TextAreaInput.vue.d.ts.map +1 -1
- package/dist/components/vForm.vue.d.ts +1 -0
- package/dist/components/vForm.vue.d.ts.map +1 -1
- package/dist/composables/useMultiStepForm.d.ts +1 -2
- package/dist/composables/useMultiStepForm.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +821 -794
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +31 -11
- package/dist/types/index.d.ts.map +1 -1
- package/dist/vform.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
A dynamic form builder for Vue.js with Ionic components
|
|
8
8
|
|
|
9
|
-
[](https://github.com/uniquedj95/vform/releases)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
[](https://vuejs.org/)
|
|
12
12
|
[](https://www.typescriptlang.org/)
|
|
@@ -31,6 +31,7 @@ A dynamic form builder for Vue.js with Ionic components
|
|
|
31
31
|
- [Basic Multi-Step Setup](#basic-multi-step-setup)
|
|
32
32
|
- [Step Configuration](#step-configuration)
|
|
33
33
|
- [Step Indicator Positioning](#step-indicator-positioning)
|
|
34
|
+
- [Custom Components in Steps](#custom-components-in-steps)
|
|
34
35
|
- [Step Validation](#step-validation)
|
|
35
36
|
- [Form Sections](#form-sections)
|
|
36
37
|
- [Basic Section Usage](#basic-section-usage)
|
|
@@ -71,6 +72,7 @@ The demo showcases:
|
|
|
71
72
|
- **Basic Forms**: All input types and basic functionality
|
|
72
73
|
- **Form Sections**: Organized forms with section headers and titles
|
|
73
74
|
- **Multi-Step Forms**: Step indicators, validation, and smart navigation
|
|
75
|
+
- **Custom Components**: Integration of custom Vue components within multi-step workflows
|
|
74
76
|
- **Advanced Features**: Masking, computed fields, custom buttons
|
|
75
77
|
- **Validation Examples**: Custom validators and error handling
|
|
76
78
|
- **Dependent Fields**: Dynamic field behavior and cascading options
|
|
@@ -90,6 +92,7 @@ npm run demo:update
|
|
|
90
92
|
## Features
|
|
91
93
|
|
|
92
94
|
- **Multi-Step Forms**: Create guided, step-by-step forms with configurable step indicators, validation, and smart navigation.
|
|
95
|
+
- **Custom Components**: Integrate custom Vue components directly into multi-step forms for advanced visualizations and workflows.
|
|
93
96
|
- **Form Sections**: Organize forms into logical sections with titles and subtitles for better user experience.
|
|
94
97
|
- **Dynamic Form Generation**: Create forms dynamically based on a schema definition.
|
|
95
98
|
- **Conditional Field Rendering**: Fields can be shown or hidden based on other form values.
|
|
@@ -433,13 +436,79 @@ function handleStepChange(stepIndex: number, stepId: string) {
|
|
|
433
436
|
|
|
434
437
|
Each step in the multi-step configuration supports the following properties:
|
|
435
438
|
|
|
436
|
-
| Property
|
|
437
|
-
|
|
|
438
|
-
| `id`
|
|
439
|
-
| `title`
|
|
440
|
-
| `subtitle`
|
|
441
|
-
| `schema`
|
|
442
|
-
| `
|
|
439
|
+
| Property | Type | Description | Required |
|
|
440
|
+
| ---------------- | ------------ | ------------------------------------------------------------------------ | -------- |
|
|
441
|
+
| `id` | `string` | Unique identifier for the step | Yes |
|
|
442
|
+
| `title` | `string` | Display title for the step | Yes |
|
|
443
|
+
| `subtitle` | `string` | Optional subtitle/description for the step | No |
|
|
444
|
+
| `schema` | `FormSchema` | Schema object containing fields for this step | No |
|
|
445
|
+
| `component` | `Component` | Custom Vue component to render instead of a schema | No |
|
|
446
|
+
| `componentProps` | `Object` | Props to pass to the custom component | No |
|
|
447
|
+
| `condition` | `function` | Function that determines if the step should be shown, based on form data | No |
|
|
448
|
+
| `validation` | `function` | Custom validation function for the step | No |
|
|
449
|
+
|
|
450
|
+
\*Either `schema` or `component` must be provided.
|
|
451
|
+
|
|
452
|
+
### Custom Components in Steps
|
|
453
|
+
|
|
454
|
+
vForm allows you to use custom Vue components in multi-step forms instead of schema-defined fields. This is useful for complex steps that require custom layouts, visualizations, or integration with other components.
|
|
455
|
+
|
|
456
|
+
```vue
|
|
457
|
+
<template>
|
|
458
|
+
<v-form :multi-step-config="multiStepConfig" @multi-step-submit="handleSubmit" />
|
|
459
|
+
</template>
|
|
460
|
+
|
|
461
|
+
<script setup lang="ts">
|
|
462
|
+
import { MultiStepConfig } from '@uniquedj95/vform';
|
|
463
|
+
import PreviousResultsTable from './components/PreviousResultsTable.vue';
|
|
464
|
+
|
|
465
|
+
const multiStepConfig: MultiStepConfig = {
|
|
466
|
+
steps: [
|
|
467
|
+
{
|
|
468
|
+
id: 'patient-info',
|
|
469
|
+
title: 'Patient Information',
|
|
470
|
+
schema: {
|
|
471
|
+
// Regular form schema for step 1
|
|
472
|
+
patientId: {
|
|
473
|
+
type: 'TextInput',
|
|
474
|
+
label: 'Patient ID',
|
|
475
|
+
required: true,
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
id: 'previous-results',
|
|
481
|
+
title: 'Previous ANC Results',
|
|
482
|
+
// Use a custom component instead of a schema
|
|
483
|
+
component: PreviousResultsTable,
|
|
484
|
+
componentProps: {
|
|
485
|
+
// Props to pass to your component
|
|
486
|
+
clinicId: 123,
|
|
487
|
+
showDetails: true,
|
|
488
|
+
},
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
id: 'new-visit',
|
|
492
|
+
title: 'New ANC Visit',
|
|
493
|
+
schema: {
|
|
494
|
+
// Back to regular schema for step 3
|
|
495
|
+
visitDate: {
|
|
496
|
+
type: 'DateInput',
|
|
497
|
+
label: 'Visit Date',
|
|
498
|
+
required: true,
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
],
|
|
503
|
+
};
|
|
504
|
+
</script>
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
Custom components need to implement a `validate()` method that returns a boolean to integrate with the form validation workflow, and emit an `update:data` event to pass data back to the form.
|
|
508
|
+
|
|
509
|
+
For detailed implementation examples and best practices, see the [Custom Components Guide](./docs/CUSTOM_COMPONENTS.md).
|
|
510
|
+
|
|
511
|
+
A complete working example is available in the demo app under `demo/src/examples/CustomComponentExample.vue` that demonstrates a real-world ANC (Antenatal Care) workflow using a custom component to display previous visit history.
|
|
443
512
|
|
|
444
513
|
### Step Indicator Positioning
|
|
445
514
|
|
|
@@ -461,6 +530,254 @@ const multiStepConfig: MultiStepConfig = {
|
|
|
461
530
|
- **Left**: Step indicators display vertically with titles to the right of numbered markers
|
|
462
531
|
- **Right**: Step indicators display vertically with titles to the left of numbered markers
|
|
463
532
|
|
|
533
|
+
### Conditional Steps
|
|
534
|
+
|
|
535
|
+
vForm allows you to conditionally show or hide steps based on the values entered in previous steps. This is useful for creating dynamic workflows that adapt to user input.
|
|
536
|
+
|
|
537
|
+
```vue
|
|
538
|
+
<script setup lang="ts">
|
|
539
|
+
import { reactive } from 'vue';
|
|
540
|
+
import { MultiStepConfig } from '@uniquedj95/vform';
|
|
541
|
+
|
|
542
|
+
const multiStepConfig = reactive<MultiStepConfig>({
|
|
543
|
+
steps: [
|
|
544
|
+
{
|
|
545
|
+
id: 'account-type',
|
|
546
|
+
title: 'Account Type',
|
|
547
|
+
schema: {
|
|
548
|
+
accountType: {
|
|
549
|
+
type: 'SelectInput',
|
|
550
|
+
label: 'Account Type',
|
|
551
|
+
options: [
|
|
552
|
+
{ label: 'Personal', value: 'personal' },
|
|
553
|
+
{ label: 'Business', value: 'business' },
|
|
554
|
+
],
|
|
555
|
+
value: 'personal',
|
|
556
|
+
required: true,
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
id: 'business-details',
|
|
562
|
+
title: 'Business Details',
|
|
563
|
+
schema: {
|
|
564
|
+
businessName: {
|
|
565
|
+
type: 'TextInput',
|
|
566
|
+
label: 'Business Name',
|
|
567
|
+
required: true,
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
// Only show this step if accountType is 'business'
|
|
571
|
+
// Using stepData with step ID to avoid field name conflicts
|
|
572
|
+
condition: (stepData, stepComputedData) => {
|
|
573
|
+
return /business/i.test(stepData['account-type'].accountType.label);
|
|
574
|
+
},
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
id: 'review',
|
|
578
|
+
title: 'Review',
|
|
579
|
+
schema: {
|
|
580
|
+
// Review fields
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
],
|
|
584
|
+
});
|
|
585
|
+
</script>
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
The `condition` function receives two arguments:
|
|
589
|
+
|
|
590
|
+
- `stepData`: Form data organized by step ID to avoid key conflicts
|
|
591
|
+
- `stepComputedData`: Computed data organized by step ID
|
|
592
|
+
|
|
593
|
+
```typescript
|
|
594
|
+
condition: (stepData, stepComputedData) => {
|
|
595
|
+
const firstStepData = stepData['first-step-id'];
|
|
596
|
+
return firstStepData.someField === 'expectedValue';
|
|
597
|
+
};
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
When a step is hidden:
|
|
601
|
+
|
|
602
|
+
- It won't be visible in the step indicator
|
|
603
|
+
- Navigation will skip over it automatically
|
|
604
|
+
- The step count and progress indicators will update accordingly
|
|
605
|
+
- **Data behavior**: Form data from hidden steps is automatically cleared
|
|
606
|
+
- Hidden step data is not included in the final submission
|
|
607
|
+
- If a step becomes visible again, it starts with empty/default values
|
|
608
|
+
- This prevents processing of data that was meant to be skipped
|
|
609
|
+
|
|
610
|
+
> **Note:** The data clearing happens whenever the visibility of steps changes. If you need
|
|
611
|
+
> to preserve data from conditionally hidden steps for some specific use case, you can
|
|
612
|
+
> store a backup of the data separately before the condition changes:
|
|
613
|
+
>
|
|
614
|
+
> ```typescript
|
|
615
|
+
> // Save data before hiding a step
|
|
616
|
+
> const backupData = { ...stepData.value['step-to-be-hidden'] };
|
|
617
|
+
>
|
|
618
|
+
> // Later, if you need to restore the data when the step becomes visible again
|
|
619
|
+
> updateStepData('step-to-be-hidden', backupData);
|
|
620
|
+
> ```
|
|
621
|
+
|
|
622
|
+
### Custom Components in Steps
|
|
623
|
+
|
|
624
|
+
vForm allows you to use custom Vue components in multi-step forms instead of schema-defined fields. This is useful for complex steps that require custom layouts, visualizations, or integration with other components.
|
|
625
|
+
|
|
626
|
+
```vue
|
|
627
|
+
<template>
|
|
628
|
+
<v-form
|
|
629
|
+
:multi-step-config="multiStepConfig"
|
|
630
|
+
@multi-step-submit="handleSubmit"
|
|
631
|
+
@step-change="handleStepChange"
|
|
632
|
+
/>
|
|
633
|
+
</template>
|
|
634
|
+
|
|
635
|
+
<script setup lang="ts">
|
|
636
|
+
import { defineComponent, ref } from 'vue';
|
|
637
|
+
import { MultiStepConfig } from '@uniquedj95/vform';
|
|
638
|
+
import PreviousResultsTable from './PreviousResultsTable.vue';
|
|
639
|
+
|
|
640
|
+
// Define your custom component
|
|
641
|
+
const PreviousResultsTable = defineComponent({
|
|
642
|
+
props: {
|
|
643
|
+
data: Object,
|
|
644
|
+
},
|
|
645
|
+
setup(props, { emit }) {
|
|
646
|
+
// Implement your component logic
|
|
647
|
+
const tableData = ref([
|
|
648
|
+
/* your data */
|
|
649
|
+
]);
|
|
650
|
+
|
|
651
|
+
// Custom validation function - will be called when clicking "Next"
|
|
652
|
+
function validate() {
|
|
653
|
+
// Add your validation logic here
|
|
654
|
+
return true; // Return true if valid, false if not
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// Function to update data in the parent form
|
|
658
|
+
function updateData() {
|
|
659
|
+
emit('update:data', {
|
|
660
|
+
/* your component data */
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
return { tableData, validate, updateData };
|
|
665
|
+
},
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
const multiStepConfig: MultiStepConfig = {
|
|
669
|
+
steps: [
|
|
670
|
+
{
|
|
671
|
+
id: 'patient-info',
|
|
672
|
+
title: 'Patient Information',
|
|
673
|
+
schema: {
|
|
674
|
+
// Standard form schema
|
|
675
|
+
patientId: {
|
|
676
|
+
type: 'TextInput',
|
|
677
|
+
label: 'Patient ID',
|
|
678
|
+
required: true,
|
|
679
|
+
},
|
|
680
|
+
// More fields...
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
id: 'previous-results',
|
|
685
|
+
title: 'Previous ANC Results',
|
|
686
|
+
// Use a custom component instead of a schema
|
|
687
|
+
component: PreviousResultsTable,
|
|
688
|
+
componentProps: {
|
|
689
|
+
// Props to pass to your component
|
|
690
|
+
clinicId: 123,
|
|
691
|
+
showDetails: true,
|
|
692
|
+
},
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
id: 'new-visit',
|
|
696
|
+
title: 'New ANC Visit',
|
|
697
|
+
schema: {
|
|
698
|
+
// Back to standard form schema
|
|
699
|
+
visitDate: {
|
|
700
|
+
type: 'DateInput',
|
|
701
|
+
label: 'Visit Date',
|
|
702
|
+
required: true,
|
|
703
|
+
},
|
|
704
|
+
// More fields...
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
],
|
|
708
|
+
stepPosition: 'top',
|
|
709
|
+
showProgress: true,
|
|
710
|
+
allowStepNavigation: true,
|
|
711
|
+
};
|
|
712
|
+
</script>
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
#### Custom Component Requirements
|
|
716
|
+
|
|
717
|
+
To work properly with the multi-step form, your custom component should:
|
|
718
|
+
|
|
719
|
+
1. **Accept Props**: Receive data and configuration through props
|
|
720
|
+
2. **Emit Data Updates**: Use `emit('update:data', yourData)` to send data back to the form
|
|
721
|
+
3. **Implement Validation**: Expose a `validate()` method that returns a boolean or promise resolving to boolean
|
|
722
|
+
|
|
723
|
+
#### Component Interface Example
|
|
724
|
+
|
|
725
|
+
```vue
|
|
726
|
+
<template>
|
|
727
|
+
<div class="custom-step-component">
|
|
728
|
+
<!-- Your custom UI here -->
|
|
729
|
+
<data-table :data="tableData" @row-click="selectRow" />
|
|
730
|
+
|
|
731
|
+
<!-- You can still use Ionic components -->
|
|
732
|
+
<ion-button @click="handleSave">Save Selection</ion-button>
|
|
733
|
+
</div>
|
|
734
|
+
</template>
|
|
735
|
+
|
|
736
|
+
<script setup>
|
|
737
|
+
import { ref, defineEmits, defineProps, defineExpose } from 'vue';
|
|
738
|
+
|
|
739
|
+
const props = defineProps({
|
|
740
|
+
// Your props here
|
|
741
|
+
initialData: Object,
|
|
742
|
+
});
|
|
743
|
+
|
|
744
|
+
const emits = defineEmits(['update:data']);
|
|
745
|
+
|
|
746
|
+
const tableData = ref([]);
|
|
747
|
+
const selectedRow = ref(null);
|
|
748
|
+
|
|
749
|
+
function selectRow(row) {
|
|
750
|
+
selectedRow.value = row;
|
|
751
|
+
emitData();
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
function handleSave() {
|
|
755
|
+
// Your save logic
|
|
756
|
+
emitData();
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
function emitData() {
|
|
760
|
+
// Send data back to parent form
|
|
761
|
+
emits('update:data', {
|
|
762
|
+
selected: selectedRow.value,
|
|
763
|
+
// other data...
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// This method will be called for validation
|
|
768
|
+
function validate() {
|
|
769
|
+
// Return false if validation fails
|
|
770
|
+
if (!selectedRow.value) {
|
|
771
|
+
return false;
|
|
772
|
+
}
|
|
773
|
+
return true;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// Expose the validate method to the parent
|
|
777
|
+
defineExpose({ validate });
|
|
778
|
+
</script>
|
|
779
|
+
```
|
|
780
|
+
|
|
464
781
|
### Step Validation
|
|
465
782
|
|
|
466
783
|
Multi-step forms include built-in validation that prevents users from proceeding to the next step until the current step is valid:
|
|
@@ -517,20 +834,14 @@ The `submit` event provides both the combined data from all steps and the per-st
|
|
|
517
834
|
```typescript
|
|
518
835
|
// multi-step data structure
|
|
519
836
|
multiStepData: MultiStepFormData = {
|
|
520
|
-
|
|
837
|
+
formData: {
|
|
521
838
|
personal: { firstName: 'John', lastName: 'Doe' },
|
|
522
839
|
contact: { email: 'john@example.com', phone: '...' },
|
|
523
840
|
review: { comments: '...' },
|
|
524
841
|
},
|
|
525
|
-
|
|
842
|
+
computedData: {
|
|
526
843
|
/* computed values per step */
|
|
527
844
|
},
|
|
528
|
-
allFormData: {
|
|
529
|
-
/* all form Data raw values */
|
|
530
|
-
},
|
|
531
|
-
allComputedData: {
|
|
532
|
-
/* all form data computed values */
|
|
533
|
-
},
|
|
534
845
|
};
|
|
535
846
|
```
|
|
536
847
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/BaseInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/BaseInput.vue"],"names":[],"mappings":"AA+BA;AA0EA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAMhE,KAAK,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,cAAc,CAAA;CAAE,CAAC;AAElE,QAAA,MAAM,KAAK,iEAAoE,CAAC;AAwChF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;AAgKhB,wBAUG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/CheckboxInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckboxInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/CheckboxInput.vue"],"names":[],"mappings":"AAeA;AAwDA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKhD,KAAK,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAE3C,QAAA,MAAM,KAAK,iEAAoE,CAAC;AAYhF,iBAAS,OAAO,SAIf;AAsBD,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;;AAqFhB,wBAUG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/RadioInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/RadioInput.vue"],"names":[],"mappings":"AA0BA;AAkFA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAU,MAAM,SAAS,CAAC;AAKxD,KAAK,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAE3C,QAAA,MAAM,KAAK,iEAAoE,CAAC;AAYhF,iBAAS,OAAO,SAIf;AAqCD,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;;AA+HhB,wBAUG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RepeatInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/RepeatInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RepeatInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/RepeatInput.vue"],"names":[],"mappings":"AAqCA;AA4HA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAU,MAAM,SAAS,CAAC;AAOhF,UAAU,MAAM;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,QAAA,MAAM,KAAK,iEAAoE,CAAC;AA2ChF,iBAAS,OAAO,SAEf;AAED,iBAAS,SAAS,aAEjB;AAED,iBAAe,aAAa,kBAE3B;AAiBD,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC;;;;;;;;;;;;AA2LhB,wBASG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/SelectInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/SelectInput.vue"],"names":[],"mappings":"AAwDA;AAgeA,OAAO,EAAiB,QAAQ,EAA6C,MAAM,KAAK,CAAC;AAEzF,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAU,MAAM,SAAS,CAAC;AAwFxE,iBAAS,OAAO,SAMf;AAkJD,iBAAe,aAAa,CAAC,GAAG,CAAC,EAAE,GAAG,iBAgBrC;;YAuamB,QAAQ,CAAC,UAAU,CAAC;UACtB,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;YADtB,QAAQ,CAAC,UAAU,CAAC;UACtB,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;AAX1C,wBAiBG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/TextAreaInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextAreaInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/inputs/TextAreaInput.vue"],"names":[],"mappings":"AA6BA;AAiEA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKhD,KAAK,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAE3C,QAAA,MAAM,KAAK,iEAAoE,CAAC;AAiChF,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;CAClC,GAAG,WAAW,CAAC;;;;;;;;;;;;;;;;;;;AAyHhB,wBAUG"}
|
|
@@ -50,6 +50,7 @@ declare const _default: import('vue').DefineComponent<FormProps, {
|
|
|
50
50
|
cancelButtonText: string;
|
|
51
51
|
hideButtons: boolean;
|
|
52
52
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
53
|
+
customComponentRef: unknown;
|
|
53
54
|
dynamicRefs: unknown[];
|
|
54
55
|
}, HTMLDivElement>;
|
|
55
56
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vForm.vue.d.ts","sourceRoot":"","sources":["../../src/components/vForm.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vForm.vue.d.ts","sourceRoot":"","sources":["../../src/components/vForm.vue"],"names":[],"mappings":"AA6LA;AA2nBA,OAAO,KAAK,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAOjB,UAAU,SAAS;IACjB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CACrC;AAqHD,iBAAS,iBAAiB,SAOzB;AAiBD,iBAAe,cAAc,kBAyB5B;AAED,iBAAe,kBAAkB,kBAOhC;AAED,iBAAe,eAAe,CAAC,SAAS,EAAE,MAAM,iBA2B/C;;;;;;;;;;;;;;;;;;;;;;;;;;gBArNc,OAAO;qBACF,OAAO;sBACN,OAAO;qBACR,OAAO,GAAG,QAAQ,GAAG,KAAK;sBACzB,MAAM;qBACP,MAAM;sBACL,MAAM;iBACX,OAAO;;;;;AAi7BvB,wBAWG"}
|
|
@@ -5,14 +5,13 @@ export declare function useMultiStepForm(config: MultiStepConfig): {
|
|
|
5
5
|
stepData: import('vue').Ref<Record<string, FormData>, Record<string, FormData>>;
|
|
6
6
|
stepComputedData: import('vue').Ref<Record<string, ComputedData>, Record<string, ComputedData>>;
|
|
7
7
|
stepValidationErrors: import('vue').Ref<Record<string, string[]>, Record<string, string[]>>;
|
|
8
|
+
visibleSteps: import('vue').ComputedRef<FormStep[]>;
|
|
8
9
|
isFirstStep: import('vue').ComputedRef<boolean>;
|
|
9
10
|
isLastStep: import('vue').ComputedRef<boolean>;
|
|
10
11
|
canGoNext: import('vue').ComputedRef<boolean>;
|
|
11
12
|
canGoPrevious: import('vue').ComputedRef<boolean>;
|
|
12
13
|
totalSteps: import('vue').ComputedRef<number>;
|
|
13
14
|
progressPercentage: import('vue').ComputedRef<number>;
|
|
14
|
-
allFormData: import('vue').ComputedRef<FormData>;
|
|
15
|
-
allComputedData: import('vue').ComputedRef<ComputedData>;
|
|
16
15
|
updateStepData: (stepId: string, data: FormData) => void;
|
|
17
16
|
updateStepComputedData: (stepId: string, data: ComputedData) => void;
|
|
18
17
|
clearStepData: (stepId: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMultiStepForm.d.ts","sourceRoot":"","sources":["../../src/composables/useMultiStepForm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGpG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe
|
|
1
|
+
{"version":3,"file":"useMultiStepForm.d.ts","sourceRoot":"","sources":["../../src/composables/useMultiStepForm.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGpG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe;;;;;;;;;;;;;6BAoFtB,MAAM,QAAQ,QAAQ;qCAId,MAAM,QAAQ,YAAY;4BAInC,MAAM;+BASC,OAAO,CAAC,OAAO,CAAC;0BAqBnB,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;oBAiBjC,OAAO,CAAC,OAAO,CAAC;wBAQZ,OAAO,CAAC,OAAO,CAAC;;4BAiBZ,OAAO,CAAC,OAAO,CAAC;gCAoBlB,iBAAiB;EAoCnD"}
|