Просмотр исходного кода

Maintenance: Mobile - Rename "composable.ts" for easier search

Vladimir Sheremet 1 год назад
Родитель
Сommit
8129d76e8f

+ 2 - 2
app/frontend/apps/mobile/components/CommonConfirmation/CommonConfirmation.vue

@@ -3,11 +3,11 @@
 <script setup lang="ts">
 <script setup lang="ts">
 import { computed } from 'vue'
 import { computed } from 'vue'
 import CommonSectionPopup from '#mobile/components/CommonSectionPopup/CommonSectionPopup.vue'
 import CommonSectionPopup from '#mobile/components/CommonSectionPopup/CommonSectionPopup.vue'
-import useConfirmation from './composable.ts'
+import { useConfirmationDialog } from './useConfirmationDialog.ts'
 
 
 // TODO: Add a story for this component.
 // TODO: Add a story for this component.
 
 
-const { confirmationDialog } = useConfirmation()
+const { confirmationDialog } = useConfirmationDialog()
 
 
 const localState = computed({
 const localState = computed({
   get: () => !!confirmationDialog.value,
   get: () => !!confirmationDialog.value,

+ 1 - 1
app/frontend/apps/mobile/components/CommonConfirmation/__tests__/CommonConfirmation.spec.ts

@@ -6,7 +6,7 @@ import {
 } from '#tests/support/components/index.ts'
 } from '#tests/support/components/index.ts'
 import { waitForNextTick } from '#tests/support/utils.ts'
 import { waitForNextTick } from '#tests/support/utils.ts'
 
 
-import useConfirmationDialog from '../composable.ts'
+import { useConfirmationDialog } from '../useConfirmationDialog.ts'
 import CommonConfirmation from '../CommonConfirmation.vue'
 import CommonConfirmation from '../CommonConfirmation.vue'
 
 
 let wrapper: ExtendedRenderResult
 let wrapper: ExtendedRenderResult

+ 0 - 5
app/frontend/apps/mobile/components/CommonConfirmation/index.ts

@@ -1,5 +0,0 @@
-// Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
-
-export type { ConfirmationOptions } from './types.ts'
-
-export { default as useConfirmationDialog } from './composable.ts'

+ 2 - 2
app/frontend/apps/mobile/components/CommonConfirmation/composable.ts → app/frontend/apps/mobile/components/CommonConfirmation/useConfirmationDialog.ts

@@ -6,7 +6,7 @@ import type { ConfirmationOptions } from './types.ts'
 
 
 const confirmationDialog: Ref<ConfirmationOptions | undefined> = ref()
 const confirmationDialog: Ref<ConfirmationOptions | undefined> = ref()
 
 
-const useConfirmation = () => {
+const useConfirmationDialog = () => {
   const showConfirmation = (confirmationOptions: ConfirmationOptions) => {
   const showConfirmation = (confirmationOptions: ConfirmationOptions) => {
     confirmationDialog.value = confirmationOptions
     confirmationDialog.value = confirmationOptions
   }
   }
@@ -39,4 +39,4 @@ const useConfirmation = () => {
   }
   }
 }
 }
 
 
-export default useConfirmation
+export { useConfirmationDialog }

+ 6 - 8
app/frontend/apps/mobile/components/CommonDialogObjectForm/CommonDialogObjectForm.vue

@@ -2,11 +2,7 @@
 
 
 <script setup lang="ts">
 <script setup lang="ts">
 import type { ObjectLike } from '#shared/types/utils.ts'
 import type { ObjectLike } from '#shared/types/utils.ts'
-import {
-  type FormSchemaNode,
-  type FormData,
-  useForm,
-} from '#shared/components/Form/index.ts'
+import { useForm } from '#shared/components/Form/useForm.ts'
 import { closeDialog } from '#shared/composables/useDialog.ts'
 import { closeDialog } from '#shared/composables/useDialog.ts'
 import type {
 import type {
   EnumFormUpdaterId,
   EnumFormUpdaterId,
@@ -16,6 +12,8 @@ import type {
 import type {
 import type {
   FormFieldValue,
   FormFieldValue,
   FormSchemaField,
   FormSchemaField,
+  FormSchemaNode,
+  FormSubmitData,
 } from '#shared/components/Form/types.ts'
 } from '#shared/components/Form/types.ts'
 import type { OperationMutationFunction } from '#shared/types/server/apollo/handler.ts'
 import type { OperationMutationFunction } from '#shared/types/server/apollo/handler.ts'
 import { MutationHandler } from '#shared/server/apollo/handler/index.ts'
 import { MutationHandler } from '#shared/server/apollo/handler/index.ts'
@@ -24,7 +22,7 @@ import { useObjectAttributes } from '#shared/entities/object-attributes/composab
 import { useObjectAttributeFormData } from '#shared/entities/object-attributes/composables/useObjectAttributeFormData.ts'
 import { useObjectAttributeFormData } from '#shared/entities/object-attributes/composables/useObjectAttributeFormData.ts'
 import CommonButton from '#mobile/components/CommonButton/CommonButton.vue'
 import CommonButton from '#mobile/components/CommonButton/CommonButton.vue'
 import CommonDialog from '#mobile/components/CommonDialog/CommonDialog.vue'
 import CommonDialog from '#mobile/components/CommonDialog/CommonDialog.vue'
-import { useConfirmationDialog } from '../CommonConfirmation/index.ts'
+import { useConfirmationDialog } from '../CommonConfirmation/useConfirmationDialog.ts'
 
 
 export interface Props {
 export interface Props {
   name: string
   name: string
@@ -98,9 +96,9 @@ const changedFormField = (
   emit('changedField', fieldName, newValue, oldValue)
   emit('changedField', fieldName, newValue, oldValue)
 }
 }
 
 
-const saveObject = async (formData: FormData) => {
+const saveObject = async (FormSubmitData: FormSubmitData) => {
   const { internalObjectAttributeValues, additionalObjectAttributeValues } =
   const { internalObjectAttributeValues, additionalObjectAttributeValues } =
-    useObjectAttributeFormData(objectAttributesLookup.value, formData)
+    useObjectAttributeFormData(objectAttributesLookup.value, FormSubmitData)
 
 
   const result = await updateMutation.send({
   const result = await updateMutation.send({
     id: props.object?.id,
     id: props.object?.id,

+ 1 - 1
app/frontend/apps/mobile/components/CommonSelect/CommonSelect.vue

@@ -11,7 +11,7 @@ import type { Ref } from 'vue'
 import { onUnmounted, computed, nextTick, ref } from 'vue'
 import { onUnmounted, computed, nextTick, ref } from 'vue'
 import testFlags from '#shared/utils/testFlags.ts'
 import testFlags from '#shared/utils/testFlags.ts'
 import CommonSelectItem from './CommonSelectItem.vue'
 import CommonSelectItem from './CommonSelectItem.vue'
-import { useCommonSelect } from './composable.ts'
+import { useCommonSelect } from './useCommonSelect.ts'
 import type { CommonSelectInternalInstance } from './types.ts'
 import type { CommonSelectInternalInstance } from './types.ts'
 
 
 export interface Props {
 export interface Props {

+ 0 - 0
app/frontend/apps/mobile/components/CommonSelect/composable.ts → app/frontend/apps/mobile/components/CommonSelect/useCommonSelect.ts


+ 1 - 1
app/frontend/apps/mobile/components/transition/TransitionViewNavigation/TransitionViewNavigation.story.vue

@@ -3,7 +3,7 @@
 <script setup lang="ts">
 <script setup lang="ts">
 // TODO doesn't work as expected
 // TODO doesn't work as expected
 import { defineComponent, h, ref } from 'vue'
 import { defineComponent, h, ref } from 'vue'
-import { useViewTransition } from './composable.ts'
+import { useViewTransition } from './useViewTransition.ts'
 import TransitionViewNavigation from './TransitionViewNavigation.vue'
 import TransitionViewNavigation from './TransitionViewNavigation.vue'
 import { ViewTransitions } from './types.ts'
 import { ViewTransitions } from './types.ts'
 
 

+ 1 - 1
app/frontend/apps/mobile/components/transition/TransitionViewNavigation/TransitionViewNavigation.vue

@@ -1,7 +1,7 @@
 <!-- Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ -->
 <!-- Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ -->
 
 
 <script setup lang="ts">
 <script setup lang="ts">
-import { useViewTransition } from './composable.ts'
+import { useViewTransition } from './useViewTransition.ts'
 
 
 const { viewTransition } = useViewTransition()
 const { viewTransition } = useViewTransition()
 </script>
 </script>

+ 0 - 5
app/frontend/apps/mobile/components/transition/TransitionViewNavigation/index.ts

@@ -1,5 +0,0 @@
-// Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
-
-export { ViewTransitions } from './types.ts'
-
-export { useViewTransition } from './composable.ts'

Некоторые файлы не были показаны из-за большого количества измененных файлов