Skip to content

Commit

Permalink
split to async components
Browse files Browse the repository at this point in the history
  • Loading branch information
kewcoder committed Dec 4, 2024
1 parent 8a4e380 commit e21a280
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 30 deletions.
4 changes: 0 additions & 4 deletions packages/core/src/Calendar.js

This file was deleted.

6 changes: 0 additions & 6 deletions packages/core/src/Cropper.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/core/src/Draggable.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/core/src/EmojiPicker.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComplexCalendar } from '@/orchidui-core/Calendar.js'
import { ComplexCalendar } from '@/orchidui-core'
import { Theme } from '@/orchidui-core'
import dayjs from 'dayjs'
import { ref } from 'vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComplexCalendar } from '@/orchidui-core/Calendar.js'
import { ComplexCalendar } from '@/orchidui-core'
import { Theme } from '@/orchidui-core'
import dayjs from 'dayjs'
import { ref } from 'vue'
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/Form/PhoneInput/OcPhoneInput.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
<script setup>
import { Dropdown, Input, Icon } from '@/orchidui-core'
import { computed, ref } from 'vue'
import codes from '../../data/CountryCodes.sample'
import { preventEventIfNotNumberInput } from '@/orchidui-core/composables/helpers.js'
import { parsePhoneNumber } from 'libphonenumber-js'
const props = defineProps({
countryCodes: { type: Array, default: () => codes },
countryCodes: { type: Array, default: () => [] },
initialCountryCode: {
type: String,
default: 'sg'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { computed, onMounted, ref } from 'vue'
import { Input, Button, BaseInput, Icon, Dropdown } from '@/orchidui-core'
import { useUploadFileProgress } from '@/orchidui-core/composables/uploadFileProgress.js'
import { ModalCropper } from '@/orchidui-core/Cropper.js'
import { ModalCropper } from '@/orchidui-core'
import SingleOnlyImageUpload from './OcSingleOnlyImageUpload.vue'
const props = defineProps({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { Icon, Dropdown } from '@/orchidui-core'
import { ModalCropper } from '@/orchidui-core/Cropper.js'
import { ModalCropper } from '@/orchidui-core'
import { ref } from 'vue'
const props = defineProps({
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/StoreDesign.js

This file was deleted.

14 changes: 9 additions & 5 deletions packages/core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,11 @@ export * from './Theme/OcTheme.js'
export * from './FormBuilder/OcFormBuilder.js'

//
import DataTable from '@/orchidui-core/DataTable/OcDataTable.vue'
import FilterSearch from '@/orchidui-core/DataTable/OcFilterSearch.vue'
import FilterSearchFor from '@/orchidui-core/DataTable/OcFilterSearchFor.vue'
import FilterForm from '@/orchidui-core/DataTable/OcFilterForm.vue'

export { DataTable, FilterSearch, FilterSearchFor, FilterForm }
const DataTable = defineAsyncComponent(() => import('./DataTable/OcDataTable.vue'))
const FilterSearch = defineAsyncComponent(() => import('./DataTable/OcFilterSearch.vue'))
const FilterSearchFor = defineAsyncComponent(() => import('./DataTable/OcFilterSearchFor.vue'))
const FilterForm = defineAsyncComponent(() => import('./DataTable/OcFilterForm.vue'))

//
const ComplexCalendar = defineAsyncComponent(
Expand Down Expand Up @@ -97,6 +96,11 @@ const TimePicker = defineAsyncComponent(() => import('./Form/TimePicker/OcTimePi
export {}

export {
// datatable
DataTable,
FilterSearch,
FilterSearchFor,
FilterForm,
// calendar
ComplexCalendar,
ComplexDatePicker,
Expand Down

0 comments on commit e21a280

Please sign in to comment.