Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 6f9fb3b

Browse files
authored
Merge pull request #211 from asigloo/feature/vue-demi-test
feat(installation): test vue-demi for isomorphic installation
2 parents 1274df7 + 4bce236 commit 6f9fb3b

File tree

15 files changed

+141
-55
lines changed

15 files changed

+141
-55
lines changed

package-lock.json

+123-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
"module": "dist/as-dynamic-forms.esm-bundler.js",
4747
"types": "dist/as-dynamic-forms.d.ts",
4848
"peerDependencies": {
49-
"vue": "^3.0.0"
49+
"@vue/composition-api": "^1.0.0-beta.10",
50+
"vue": "^2.0.0 || >=3.0.4"
5051
},
5152
"devDependencies": {
5253
"@microsoft/api-extractor": "^7.12.0",
@@ -94,7 +95,7 @@
9495
"dependencies": {
9596
"autoprefixer": "^9.8.6",
9697
"deep-clone": "^3.0.3",
97-
"deep-object-diff": "^1.1.0"
98-
98+
"deep-object-diff": "^1.1.0",
99+
"vue-demi": "^0.5.3"
99100
}
100101
}

src/components/checkbox-input/CheckboxInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent, h, PropType } from 'vue';
2+
import { defineComponent, h, PropType } from 'vue-demi';
33
import { FormControl, CheckboxInput } from '@/core/models';
44
import { useInputEvents } from '@/composables/input-events';
55
import { useInputValidation } from '@/composables/use-validation';

src/components/dynamic-form/DynamicForm.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
</template>
3737

3838
<script lang="ts">
39-
import { nextTick } from 'vue';
39+
import { nextTick } from 'vue-demi';
4040
4141
import {
4242
defineComponent,
@@ -48,7 +48,7 @@ import {
4848
watch,
4949
inject,
5050
toRaw,
51-
} from 'vue';
51+
} from 'vue-demi';
5252
import { diff } from 'deep-object-diff';
5353
5454
import DynamicInput from '../dynamic-input/DynamicInput.vue';

src/components/dynamic-input/DynamicInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
/* eslint-disable @typescript-eslint/no-use-before-define */
33
4-
import { defineComponent, PropType, computed, h } from 'vue';
4+
import { defineComponent, PropType, computed, h } from 'vue-demi';
55
import TextInputComponent from '../text-input/TextInput.vue';
66
import SelectInputComponent from '../select-input/SelectInput.vue';
77
import TextAreaInputComponent from '../text-area-input/TextAreaInput.vue';

src/components/number-input/NumberInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent, h, PropType } from 'vue';
2+
import { defineComponent, h, PropType } from 'vue-demi';
33
import { FormControl, NumberInput } from '@/core/models';
44
import { useInputEvents } from '@/composables/input-events';
55
import { useInputValidation } from '@/composables/use-validation';

src/components/radio-input/RadioInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent, h, PropType } from 'vue';
2+
import { defineComponent, h, PropType } from 'vue-demi';
33
import { FormControl, RadioInput } from '@/core/models';
44
import { useInputEvents } from '@/composables/input-events';
55
import { useInputValidation } from '@/composables/use-validation';

src/components/select-input/SelectInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent, h, PropType, computed } from 'vue';
2+
import { defineComponent, h, PropType, computed } from 'vue-demi';
33
import { FormControl, SelectInput } from '@/core/models';
44
import { useInputEvents } from '@/composables/input-events';
55
import { isObject } from '@/core/utils/helpers';

src/components/text-area-input/TextAreaInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent, h, PropType } from 'vue';
2+
import { defineComponent, h, PropType } from 'vue-demi';
33
import { FormControl, TextAreaInput } from '@/core/models';
44
import { useInputEvents } from '@/composables/input-events';
55
import { useInputValidation } from '@/composables/use-validation';

src/components/text-input/TextInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { defineComponent, h, PropType } from 'vue';
2+
import { defineComponent, h, PropType } from 'vue-demi';
33
import {
44
ColorInput,
55
EmailInput,

src/composables/input-events.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
2-
import { computed, ComputedRef, watch } from 'vue';
2+
import { computed, ComputedRef, watch } from 'vue-demi';
33
import { hasValue } from '../core/utils/helpers';
44

55
import { useInputValidation } from '@/composables/use-validation';

src/composables/use-validation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { ErrorMessage } from '@/core/models';
44
import { removeEmpty } from '@/core/utils/helpers';
5-
import { computed, ref, watch } from 'vue';
5+
import { computed, ref, watch } from 'vue-demi';
66

77
export function useInputValidation(props: any, emit: any) {
88
const isPendingValidation = ref(false);

src/dynamicForms.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { App } from 'vue';
1+
import { App } from 'vue-demi';
22
import { dynamicFormsSymbol } from './useApi';
33
import DynamicForm from './components/dynamic-form/DynamicForm.vue';
44
import { FormOptions } from './core/models';

src/shims-vue.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module '*.vue' {
2-
import { defineComponent } from 'vue';
2+
import { defineComponent } from 'vue-demi';
33
const component: ReturnType<typeof defineComponent>;
44
export default component;
55
}

src/useApi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { inject, InjectionKey } from 'vue';
1+
import { inject, InjectionKey } from 'vue-demi';
22
import { DynamicFormsPlugin } from './dynamicForms';
33

44
export const dynamicFormsSymbol: InjectionKey<DynamicFormsPlugin> = Symbol();

0 commit comments

Comments
 (0)