@edge-zuq/core 1.2.7
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/LICENSE +20 -0
- package/README.md +99 -0
- package/lib/module/assets/logo.png +0 -0
- package/lib/module/data/errors/http-client-error.js +14 -0
- package/lib/module/data/errors/http-client-error.js.map +1 -0
- package/lib/module/data/errors/index.js +6 -0
- package/lib/module/data/errors/index.js.map +1 -0
- package/lib/module/data/errors/save-file-error.js +9 -0
- package/lib/module/data/errors/save-file-error.js.map +1 -0
- package/lib/module/data/errors/unsupported-platform.js +9 -0
- package/lib/module/data/errors/unsupported-platform.js.map +1 -0
- package/lib/module/data/models/index.js +6 -0
- package/lib/module/data/models/index.js.map +1 -0
- package/lib/module/data/models/remote-get-comment-list-model.js +2 -0
- package/lib/module/data/models/remote-get-comment-list-model.js.map +1 -0
- package/lib/module/data/models/remote-get-image-list-model.js +2 -0
- package/lib/module/data/models/remote-get-image-list-model.js.map +1 -0
- package/lib/module/data/models/remote-user-model.js +2 -0
- package/lib/module/data/models/remote-user-model.js.map +1 -0
- package/lib/module/data/protocols/cookie-manager.js +2 -0
- package/lib/module/data/protocols/cookie-manager.js.map +1 -0
- package/lib/module/data/protocols/download-manager.js +4 -0
- package/lib/module/data/protocols/download-manager.js.map +1 -0
- package/lib/module/data/protocols/http-client.js +26 -0
- package/lib/module/data/protocols/http-client.js.map +1 -0
- package/lib/module/data/protocols/index.js +9 -0
- package/lib/module/data/protocols/index.js.map +1 -0
- package/lib/module/data/protocols/notification-manager.js +4 -0
- package/lib/module/data/protocols/notification-manager.js.map +1 -0
- package/lib/module/data/protocols/permission-manager.js +4 -0
- package/lib/module/data/protocols/permission-manager.js.map +1 -0
- package/lib/module/data/protocols/storage.js +4 -0
- package/lib/module/data/protocols/storage.js.map +1 -0
- package/lib/module/data/use-cases/index.js +6 -0
- package/lib/module/data/use-cases/index.js.map +1 -0
- package/lib/module/data/use-cases/remote-get-comment-list.js +29 -0
- package/lib/module/data/use-cases/remote-get-comment-list.js.map +1 -0
- package/lib/module/data/use-cases/remote-get-image-list.js +32 -0
- package/lib/module/data/use-cases/remote-get-image-list.js.map +1 -0
- package/lib/module/data/use-cases/remote-send-diagnostics.js +20 -0
- package/lib/module/data/use-cases/remote-send-diagnostics.js.map +1 -0
- package/lib/module/domain/errors/authentication-expired-error.js +9 -0
- package/lib/module/domain/errors/authentication-expired-error.js.map +1 -0
- package/lib/module/domain/errors/index.js +7 -0
- package/lib/module/domain/errors/index.js.map +1 -0
- package/lib/module/domain/errors/internal-server-error.js +9 -0
- package/lib/module/domain/errors/internal-server-error.js.map +1 -0
- package/lib/module/domain/errors/invalid-credentials-error.js +9 -0
- package/lib/module/domain/errors/invalid-credentials-error.js.map +1 -0
- package/lib/module/domain/errors/no-app-permission-error.js +9 -0
- package/lib/module/domain/errors/no-app-permission-error.js.map +1 -0
- package/lib/module/domain/models/get-comment-list-model.js +2 -0
- package/lib/module/domain/models/get-comment-list-model.js.map +1 -0
- package/lib/module/domain/models/get-image-list-model.js +2 -0
- package/lib/module/domain/models/get-image-list-model.js.map +1 -0
- package/lib/module/domain/models/index.js +6 -0
- package/lib/module/domain/models/index.js.map +1 -0
- package/lib/module/domain/models/user-model.js +2 -0
- package/lib/module/domain/models/user-model.js.map +1 -0
- package/lib/module/domain/use-cases/get-comment-list.js +4 -0
- package/lib/module/domain/use-cases/get-comment-list.js.map +1 -0
- package/lib/module/domain/use-cases/get-image-list.js +4 -0
- package/lib/module/domain/use-cases/get-image-list.js.map +1 -0
- package/lib/module/domain/use-cases/index.js +9 -0
- package/lib/module/domain/use-cases/index.js.map +1 -0
- package/lib/module/domain/use-cases/record-request.js +4 -0
- package/lib/module/domain/use-cases/record-request.js.map +1 -0
- package/lib/module/domain/use-cases/send-diagnostics.js +4 -0
- package/lib/module/domain/use-cases/send-diagnostics.js.map +1 -0
- package/lib/module/domain/use-cases/user-authentication.js +4 -0
- package/lib/module/domain/use-cases/user-authentication.js.map +1 -0
- package/lib/module/domain/use-cases/user-logout.js +4 -0
- package/lib/module/domain/use-cases/user-logout.js.map +1 -0
- package/lib/module/index.js +16 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/infra/axios-http-client-adapter.js +199 -0
- package/lib/module/infra/axios-http-client-adapter.js.map +1 -0
- package/lib/module/infra/index.js +10 -0
- package/lib/module/infra/index.js.map +1 -0
- package/lib/module/infra/isomorphic-id-manager.js +83 -0
- package/lib/module/infra/isomorphic-id-manager.js.map +1 -0
- package/lib/module/infra/mmkv-storage-adapter.js +62 -0
- package/lib/module/infra/mmkv-storage-adapter.js.map +1 -0
- package/lib/module/infra/notifee-notification-manager-adapter.js +69 -0
- package/lib/module/infra/notifee-notification-manager-adapter.js.map +1 -0
- package/lib/module/infra/offline-mutation-queue.js +210 -0
- package/lib/module/infra/offline-mutation-queue.js.map +1 -0
- package/lib/module/infra/rnbu-download-manager-adapter.js +31 -0
- package/lib/module/infra/rnbu-download-manager-adapter.js.map +1 -0
- package/lib/module/infra/rnp-permission-manager-adapter.js +117 -0
- package/lib/module/infra/rnp-permission-manager-adapter.js.map +1 -0
- package/lib/module/infra/storage-cookie-manager-adapter.js +24 -0
- package/lib/module/infra/storage-cookie-manager-adapter.js.map +1 -0
- package/lib/module/main/components/index.js +7 -0
- package/lib/module/main/components/index.js.map +1 -0
- package/lib/module/main/components/request-permissions.js +14 -0
- package/lib/module/main/components/request-permissions.js.map +1 -0
- package/lib/module/main/factories/infra/download-manager-factory.js +7 -0
- package/lib/module/main/factories/infra/download-manager-factory.js.map +1 -0
- package/lib/module/main/factories/infra/http-client-factory.js +7 -0
- package/lib/module/main/factories/infra/http-client-factory.js.map +1 -0
- package/lib/module/main/factories/infra/index.js +10 -0
- package/lib/module/main/factories/infra/index.js.map +1 -0
- package/lib/module/main/factories/infra/isomorphic-id-manager-factory.js +7 -0
- package/lib/module/main/factories/infra/isomorphic-id-manager-factory.js.map +1 -0
- package/lib/module/main/factories/infra/notification-manager-factory.js +7 -0
- package/lib/module/main/factories/infra/notification-manager-factory.js.map +1 -0
- package/lib/module/main/factories/infra/offline-mutation-queue-factory.js +7 -0
- package/lib/module/main/factories/infra/offline-mutation-queue-factory.js.map +1 -0
- package/lib/module/main/factories/infra/permission-manager-factory.js +7 -0
- package/lib/module/main/factories/infra/permission-manager-factory.js.map +1 -0
- package/lib/module/main/factories/infra/storage-factory.js +10 -0
- package/lib/module/main/factories/infra/storage-factory.js.map +1 -0
- package/lib/module/main/factories/use-cases/index.js +6 -0
- package/lib/module/main/factories/use-cases/index.js.map +1 -0
- package/lib/module/main/factories/use-cases/remote-get-comment-list-factory.js +7 -0
- package/lib/module/main/factories/use-cases/remote-get-comment-list-factory.js.map +1 -0
- package/lib/module/main/factories/use-cases/remote-get-image-list-factory.js +7 -0
- package/lib/module/main/factories/use-cases/remote-get-image-list-factory.js.map +1 -0
- package/lib/module/main/factories/use-cases/remote-send-diagnostics-factory.js +7 -0
- package/lib/module/main/factories/use-cases/remote-send-diagnostics-factory.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/presentation/components/atoms/UIBackdrop.js +31 -0
- package/lib/module/presentation/components/atoms/UIBackdrop.js.map +1 -0
- package/lib/module/presentation/components/atoms/UICheckbox.js +47 -0
- package/lib/module/presentation/components/atoms/UICheckbox.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIDot.js +33 -0
- package/lib/module/presentation/components/atoms/UIDot.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIIcon.js +1072 -0
- package/lib/module/presentation/components/atoms/UIIcon.js.map +1 -0
- package/lib/module/presentation/components/atoms/UILoading.js +19 -0
- package/lib/module/presentation/components/atoms/UILoading.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIPage.js +70 -0
- package/lib/module/presentation/components/atoms/UIPage.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIProgress.js +54 -0
- package/lib/module/presentation/components/atoms/UIProgress.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIScrollPage.js +72 -0
- package/lib/module/presentation/components/atoms/UIScrollPage.js.map +1 -0
- package/lib/module/presentation/components/atoms/UISeparator.js +30 -0
- package/lib/module/presentation/components/atoms/UISeparator.js.map +1 -0
- package/lib/module/presentation/components/atoms/UISpacer.js +19 -0
- package/lib/module/presentation/components/atoms/UISpacer.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIStack.js +31 -0
- package/lib/module/presentation/components/atoms/UIStack.js.map +1 -0
- package/lib/module/presentation/components/atoms/UIText.js +48 -0
- package/lib/module/presentation/components/atoms/UIText.js.map +1 -0
- package/lib/module/presentation/components/atoms/index.js +15 -0
- package/lib/module/presentation/components/atoms/index.js.map +1 -0
- package/lib/module/presentation/components/index.js +4 -0
- package/lib/module/presentation/components/index.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIActionSheet.js +199 -0
- package/lib/module/presentation/components/molecules/UIActionSheet.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIButton.js +173 -0
- package/lib/module/presentation/components/molecules/UIButton.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIButtonCTA.js +31 -0
- package/lib/module/presentation/components/molecules/UIButtonCTA.js.map +1 -0
- package/lib/module/presentation/components/molecules/UICheckboxInput.js +84 -0
- package/lib/module/presentation/components/molecules/UICheckboxInput.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIChip.js +49 -0
- package/lib/module/presentation/components/molecules/UIChip.js.map +1 -0
- package/lib/module/presentation/components/molecules/UICurrencyInput.js +32 -0
- package/lib/module/presentation/components/molecules/UICurrencyInput.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIDataList.js +26 -0
- package/lib/module/presentation/components/molecules/UIDataList.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIDataSectionList.js +26 -0
- package/lib/module/presentation/components/molecules/UIDataSectionList.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIDatetimeInput.js +202 -0
- package/lib/module/presentation/components/molecules/UIDatetimeInput.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIError.js +32 -0
- package/lib/module/presentation/components/molecules/UIError.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIImage.js +87 -0
- package/lib/module/presentation/components/molecules/UIImage.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIInlineDatePicker.js +245 -0
- package/lib/module/presentation/components/molecules/UIInlineDatePicker.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIInputIcon.js +38 -0
- package/lib/module/presentation/components/molecules/UIInputIcon.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIList.js +16 -0
- package/lib/module/presentation/components/molecules/UIList.js.map +1 -0
- package/lib/module/presentation/components/molecules/UIRadioInput.js +78 -0
- package/lib/module/presentation/components/molecules/UIRadioInput.js.map +1 -0
- package/lib/module/presentation/components/molecules/UISectionList.js +16 -0
- package/lib/module/presentation/components/molecules/UISectionList.js.map +1 -0
- package/lib/module/presentation/components/molecules/UISkeleton.js +54 -0
- package/lib/module/presentation/components/molecules/UISkeleton.js.map +1 -0
- package/lib/module/presentation/components/molecules/UISwitch.js +65 -0
- package/lib/module/presentation/components/molecules/UISwitch.js.map +1 -0
- package/lib/module/presentation/components/molecules/UITextInput.js +132 -0
- package/lib/module/presentation/components/molecules/UITextInput.js.map +1 -0
- package/lib/module/presentation/components/molecules/UITextInputMask.js +133 -0
- package/lib/module/presentation/components/molecules/UITextInputMask.js.map +1 -0
- package/lib/module/presentation/components/molecules/index.js +23 -0
- package/lib/module/presentation/components/molecules/index.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIAppBar.js +102 -0
- package/lib/module/presentation/components/organisms/UIAppBar.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIAppBarAction.js +21 -0
- package/lib/module/presentation/components/organisms/UIAppBarAction.js.map +1 -0
- package/lib/module/presentation/components/organisms/UICard.js +43 -0
- package/lib/module/presentation/components/organisms/UICard.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIComment.js +73 -0
- package/lib/module/presentation/components/organisms/UIComment.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIErrorBoundary.js +68 -0
- package/lib/module/presentation/components/organisms/UIErrorBoundary.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIForm.js +83 -0
- package/lib/module/presentation/components/organisms/UIForm.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormButton.js +43 -0
- package/lib/module/presentation/components/organisms/UIFormButton.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormCheckboxInput.js +39 -0
- package/lib/module/presentation/components/organisms/UIFormCheckboxInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormCurrencyInput.js +65 -0
- package/lib/module/presentation/components/organisms/UIFormCurrencyInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormDatetimeInput.js +54 -0
- package/lib/module/presentation/components/organisms/UIFormDatetimeInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormMultiselectInput.js +212 -0
- package/lib/module/presentation/components/organisms/UIFormMultiselectInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormRadioInput.js +36 -0
- package/lib/module/presentation/components/organisms/UIFormRadioInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormSelectInput.js +259 -0
- package/lib/module/presentation/components/organisms/UIFormSelectInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormTextInput.js +64 -0
- package/lib/module/presentation/components/organisms/UIFormTextInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIFormTextInputMask.js +69 -0
- package/lib/module/presentation/components/organisms/UIFormTextInputMask.js.map +1 -0
- package/lib/module/presentation/components/organisms/UIRow.js +55 -0
- package/lib/module/presentation/components/organisms/UIRow.js.map +1 -0
- package/lib/module/presentation/components/organisms/UISearchInput.js +33 -0
- package/lib/module/presentation/components/organisms/UISearchInput.js.map +1 -0
- package/lib/module/presentation/components/organisms/UISelectChip.js +94 -0
- package/lib/module/presentation/components/organisms/UISelectChip.js.map +1 -0
- package/lib/module/presentation/components/organisms/UISignature.js +159 -0
- package/lib/module/presentation/components/organisms/UISignature.js.map +1 -0
- package/lib/module/presentation/components/organisms/UISlideButton.js +90 -0
- package/lib/module/presentation/components/organisms/UISlideButton.js.map +1 -0
- package/lib/module/presentation/components/organisms/index.js +24 -0
- package/lib/module/presentation/components/organisms/index.js.map +1 -0
- package/lib/module/presentation/components/permissions/index.js +4 -0
- package/lib/module/presentation/components/permissions/index.js.map +1 -0
- package/lib/module/presentation/components/permissions/request-permissions.js +96 -0
- package/lib/module/presentation/components/permissions/request-permissions.js.map +1 -0
- package/lib/module/presentation/domain/metadata/index.js +5 -0
- package/lib/module/presentation/domain/metadata/index.js.map +1 -0
- package/lib/module/presentation/domain/metadata/use-comments.js +26 -0
- package/lib/module/presentation/domain/metadata/use-comments.js.map +1 -0
- package/lib/module/presentation/domain/metadata/use-images.js +26 -0
- package/lib/module/presentation/domain/metadata/use-images.js.map +1 -0
- package/lib/module/presentation/domain/offline/index.js +12 -0
- package/lib/module/presentation/domain/offline/index.js.map +1 -0
- package/lib/module/presentation/domain/offline/offline-mutation-queue-provider.js +69 -0
- package/lib/module/presentation/domain/offline/offline-mutation-queue-provider.js.map +1 -0
- package/lib/module/presentation/domain/offline/types.js +4 -0
- package/lib/module/presentation/domain/offline/types.js.map +1 -0
- package/lib/module/presentation/domain/offline/use-infinite-offline-query.js +69 -0
- package/lib/module/presentation/domain/offline/use-infinite-offline-query.js.map +1 -0
- package/lib/module/presentation/domain/offline/use-offline-id-v2.js +22 -0
- package/lib/module/presentation/domain/offline/use-offline-id-v2.js.map +1 -0
- package/lib/module/presentation/domain/offline/use-offline-id.js +11 -0
- package/lib/module/presentation/domain/offline/use-offline-id.js.map +1 -0
- package/lib/module/presentation/domain/offline/use-offline-mutation.js +115 -0
- package/lib/module/presentation/domain/offline/use-offline-mutation.js.map +1 -0
- package/lib/module/presentation/domain/offline/use-offline-query.js +33 -0
- package/lib/module/presentation/domain/offline/use-offline-query.js.map +1 -0
- package/lib/module/presentation/domain/offline/use-offline-queue.js +8 -0
- package/lib/module/presentation/domain/offline/use-offline-queue.js.map +1 -0
- package/lib/module/presentation/domain/offline/utils.js +110 -0
- package/lib/module/presentation/domain/offline/utils.js.map +1 -0
- package/lib/module/presentation/domain/provider/index.js +4 -0
- package/lib/module/presentation/domain/provider/index.js.map +1 -0
- package/lib/module/presentation/domain/provider/zuq-core-provider.js +51 -0
- package/lib/module/presentation/domain/provider/zuq-core-provider.js.map +1 -0
- package/lib/module/presentation/domain/utils/exists.js +6 -0
- package/lib/module/presentation/domain/utils/exists.js.map +1 -0
- package/lib/module/presentation/domain/utils/index.js +8 -0
- package/lib/module/presentation/domain/utils/index.js.map +1 -0
- package/lib/module/presentation/domain/utils/react-query.js +10 -0
- package/lib/module/presentation/domain/utils/react-query.js.map +1 -0
- package/lib/module/presentation/domain/utils/use-action-sheet.js +20 -0
- package/lib/module/presentation/domain/utils/use-action-sheet.js.map +1 -0
- package/lib/module/presentation/domain/utils/use-signature-ref.js +8 -0
- package/lib/module/presentation/domain/utils/use-signature-ref.js.map +1 -0
- package/lib/module/presentation/domain/utils/yup.js +5 -0
- package/lib/module/presentation/domain/utils/yup.js.map +1 -0
- package/lib/module/theme.js +211 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/data/errors/http-client-error.d.ts +13 -0
- package/lib/typescript/src/data/errors/http-client-error.d.ts.map +1 -0
- package/lib/typescript/src/data/errors/index.d.ts +4 -0
- package/lib/typescript/src/data/errors/index.d.ts.map +1 -0
- package/lib/typescript/src/data/errors/save-file-error.d.ts +4 -0
- package/lib/typescript/src/data/errors/save-file-error.d.ts.map +1 -0
- package/lib/typescript/src/data/errors/unsupported-platform.d.ts +4 -0
- package/lib/typescript/src/data/errors/unsupported-platform.d.ts.map +1 -0
- package/lib/typescript/src/data/models/index.d.ts +4 -0
- package/lib/typescript/src/data/models/index.d.ts.map +1 -0
- package/lib/typescript/src/data/models/remote-get-comment-list-model.d.ts +16 -0
- package/lib/typescript/src/data/models/remote-get-comment-list-model.d.ts.map +1 -0
- package/lib/typescript/src/data/models/remote-get-image-list-model.d.ts +16 -0
- package/lib/typescript/src/data/models/remote-get-image-list-model.d.ts.map +1 -0
- package/lib/typescript/src/data/models/remote-user-model.d.ts +14 -0
- package/lib/typescript/src/data/models/remote-user-model.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/cookie-manager.d.ts +7 -0
- package/lib/typescript/src/data/protocols/cookie-manager.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/download-manager.d.ts +12 -0
- package/lib/typescript/src/data/protocols/download-manager.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/http-client.d.ts +52 -0
- package/lib/typescript/src/data/protocols/http-client.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/index.d.ts +7 -0
- package/lib/typescript/src/data/protocols/index.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/notification-manager.d.ts +17 -0
- package/lib/typescript/src/data/protocols/notification-manager.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/permission-manager.d.ts +23 -0
- package/lib/typescript/src/data/protocols/permission-manager.d.ts.map +1 -0
- package/lib/typescript/src/data/protocols/storage.d.ts +17 -0
- package/lib/typescript/src/data/protocols/storage.d.ts.map +1 -0
- package/lib/typescript/src/data/use-cases/index.d.ts +4 -0
- package/lib/typescript/src/data/use-cases/index.d.ts.map +1 -0
- package/lib/typescript/src/data/use-cases/remote-get-comment-list.d.ts +9 -0
- package/lib/typescript/src/data/use-cases/remote-get-comment-list.d.ts.map +1 -0
- package/lib/typescript/src/data/use-cases/remote-get-image-list.d.ts +10 -0
- package/lib/typescript/src/data/use-cases/remote-get-image-list.d.ts.map +1 -0
- package/lib/typescript/src/data/use-cases/remote-send-diagnostics.d.ts +11 -0
- package/lib/typescript/src/data/use-cases/remote-send-diagnostics.d.ts.map +1 -0
- package/lib/typescript/src/domain/errors/authentication-expired-error.d.ts +4 -0
- package/lib/typescript/src/domain/errors/authentication-expired-error.d.ts.map +1 -0
- package/lib/typescript/src/domain/errors/index.d.ts +5 -0
- package/lib/typescript/src/domain/errors/index.d.ts.map +1 -0
- package/lib/typescript/src/domain/errors/internal-server-error.d.ts +4 -0
- package/lib/typescript/src/domain/errors/internal-server-error.d.ts.map +1 -0
- package/lib/typescript/src/domain/errors/invalid-credentials-error.d.ts +4 -0
- package/lib/typescript/src/domain/errors/invalid-credentials-error.d.ts.map +1 -0
- package/lib/typescript/src/domain/errors/no-app-permission-error.d.ts +4 -0
- package/lib/typescript/src/domain/errors/no-app-permission-error.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/get-comment-list-model.d.ts +10 -0
- package/lib/typescript/src/domain/models/get-comment-list-model.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/get-image-list-model.d.ts +8 -0
- package/lib/typescript/src/domain/models/get-image-list-model.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/index.d.ts +4 -0
- package/lib/typescript/src/domain/models/index.d.ts.map +1 -0
- package/lib/typescript/src/domain/models/user-model.d.ts +16 -0
- package/lib/typescript/src/domain/models/user-model.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/get-comment-list.d.ts +12 -0
- package/lib/typescript/src/domain/use-cases/get-comment-list.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/get-image-list.d.ts +12 -0
- package/lib/typescript/src/domain/use-cases/get-image-list.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/index.d.ts +7 -0
- package/lib/typescript/src/domain/use-cases/index.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/record-request.d.ts +14 -0
- package/lib/typescript/src/domain/use-cases/record-request.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/send-diagnostics.d.ts +15 -0
- package/lib/typescript/src/domain/use-cases/send-diagnostics.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/user-authentication.d.ts +12 -0
- package/lib/typescript/src/domain/use-cases/user-authentication.d.ts.map +1 -0
- package/lib/typescript/src/domain/use-cases/user-logout.d.ts +10 -0
- package/lib/typescript/src/domain/use-cases/user-logout.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +15 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/infra/axios-http-client-adapter.d.ts +33 -0
- package/lib/typescript/src/infra/axios-http-client-adapter.d.ts.map +1 -0
- package/lib/typescript/src/infra/index.d.ts +8 -0
- package/lib/typescript/src/infra/index.d.ts.map +1 -0
- package/lib/typescript/src/infra/isomorphic-id-manager.d.ts +29 -0
- package/lib/typescript/src/infra/isomorphic-id-manager.d.ts.map +1 -0
- package/lib/typescript/src/infra/mmkv-storage-adapter.d.ts +18 -0
- package/lib/typescript/src/infra/mmkv-storage-adapter.d.ts.map +1 -0
- package/lib/typescript/src/infra/notifee-notification-manager-adapter.d.ts +17 -0
- package/lib/typescript/src/infra/notifee-notification-manager-adapter.d.ts.map +1 -0
- package/lib/typescript/src/infra/offline-mutation-queue.d.ts +56 -0
- package/lib/typescript/src/infra/offline-mutation-queue.d.ts.map +1 -0
- package/lib/typescript/src/infra/rnbu-download-manager-adapter.d.ts +7 -0
- package/lib/typescript/src/infra/rnbu-download-manager-adapter.d.ts.map +1 -0
- package/lib/typescript/src/infra/rnp-permission-manager-adapter.d.ts +20 -0
- package/lib/typescript/src/infra/rnp-permission-manager-adapter.d.ts.map +1 -0
- package/lib/typescript/src/infra/storage-cookie-manager-adapter.d.ts +12 -0
- package/lib/typescript/src/infra/storage-cookie-manager-adapter.d.ts.map +1 -0
- package/lib/typescript/src/main/components/index.d.ts +5 -0
- package/lib/typescript/src/main/components/index.d.ts.map +1 -0
- package/lib/typescript/src/main/components/request-permissions.d.ts +6 -0
- package/lib/typescript/src/main/components/request-permissions.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/download-manager-factory.d.ts +3 -0
- package/lib/typescript/src/main/factories/infra/download-manager-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/http-client-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/infra/http-client-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/index.d.ts +8 -0
- package/lib/typescript/src/main/factories/infra/index.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/isomorphic-id-manager-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/infra/isomorphic-id-manager-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/notification-manager-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/infra/notification-manager-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/offline-mutation-queue-factory.d.ts +5 -0
- package/lib/typescript/src/main/factories/infra/offline-mutation-queue-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/permission-manager-factory.d.ts +3 -0
- package/lib/typescript/src/main/factories/infra/permission-manager-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/infra/storage-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/infra/storage-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/use-cases/index.d.ts +4 -0
- package/lib/typescript/src/main/factories/use-cases/index.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/use-cases/remote-get-comment-list-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/use-cases/remote-get-comment-list-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/use-cases/remote-get-image-list-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/use-cases/remote-get-image-list-factory.d.ts.map +1 -0
- package/lib/typescript/src/main/factories/use-cases/remote-send-diagnostics-factory.d.ts +4 -0
- package/lib/typescript/src/main/factories/use-cases/remote-send-diagnostics-factory.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIBackdrop.d.ts +10 -0
- package/lib/typescript/src/presentation/components/atoms/UIBackdrop.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UICheckbox.d.ts +11 -0
- package/lib/typescript/src/presentation/components/atoms/UICheckbox.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIDot.d.ts +10 -0
- package/lib/typescript/src/presentation/components/atoms/UIDot.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIIcon.d.ts +133 -0
- package/lib/typescript/src/presentation/components/atoms/UIIcon.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UILoading.d.ts +9 -0
- package/lib/typescript/src/presentation/components/atoms/UILoading.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIPage.d.ts +20 -0
- package/lib/typescript/src/presentation/components/atoms/UIPage.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIProgress.d.ts +10 -0
- package/lib/typescript/src/presentation/components/atoms/UIProgress.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIScrollPage.d.ts +17 -0
- package/lib/typescript/src/presentation/components/atoms/UIScrollPage.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UISeparator.d.ts +10 -0
- package/lib/typescript/src/presentation/components/atoms/UISeparator.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UISpacer.d.ts +9 -0
- package/lib/typescript/src/presentation/components/atoms/UISpacer.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIStack.d.ts +14 -0
- package/lib/typescript/src/presentation/components/atoms/UIStack.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/UIText.d.ts +14 -0
- package/lib/typescript/src/presentation/components/atoms/UIText.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/atoms/index.d.ts +13 -0
- package/lib/typescript/src/presentation/components/atoms/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/index.d.ts +2 -0
- package/lib/typescript/src/presentation/components/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIActionSheet.d.ts +17 -0
- package/lib/typescript/src/presentation/components/molecules/UIActionSheet.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIButton.d.ts +18 -0
- package/lib/typescript/src/presentation/components/molecules/UIButton.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIButtonCTA.d.ts +8 -0
- package/lib/typescript/src/presentation/components/molecules/UIButtonCTA.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UICheckboxInput.d.ts +16 -0
- package/lib/typescript/src/presentation/components/molecules/UICheckboxInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIChip.d.ts +17 -0
- package/lib/typescript/src/presentation/components/molecules/UIChip.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UICurrencyInput.d.ts +11 -0
- package/lib/typescript/src/presentation/components/molecules/UICurrencyInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIDataList.d.ts +9 -0
- package/lib/typescript/src/presentation/components/molecules/UIDataList.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIDataSectionList.d.ts +9 -0
- package/lib/typescript/src/presentation/components/molecules/UIDataSectionList.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIDatetimeInput.d.ts +10 -0
- package/lib/typescript/src/presentation/components/molecules/UIDatetimeInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIError.d.ts +8 -0
- package/lib/typescript/src/presentation/components/molecules/UIError.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIImage.d.ts +11 -0
- package/lib/typescript/src/presentation/components/molecules/UIImage.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIInlineDatePicker.d.ts +15 -0
- package/lib/typescript/src/presentation/components/molecules/UIInlineDatePicker.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIInputIcon.d.ts +9 -0
- package/lib/typescript/src/presentation/components/molecules/UIInputIcon.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIList.d.ts +5 -0
- package/lib/typescript/src/presentation/components/molecules/UIList.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UIRadioInput.d.ts +12 -0
- package/lib/typescript/src/presentation/components/molecules/UIRadioInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UISectionList.d.ts +5 -0
- package/lib/typescript/src/presentation/components/molecules/UISectionList.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UISkeleton.d.ts +8 -0
- package/lib/typescript/src/presentation/components/molecules/UISkeleton.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UISwitch.d.ts +10 -0
- package/lib/typescript/src/presentation/components/molecules/UISwitch.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UITextInput.d.ts +13 -0
- package/lib/typescript/src/presentation/components/molecules/UITextInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/UITextInputMask.d.ts +16 -0
- package/lib/typescript/src/presentation/components/molecules/UITextInputMask.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/molecules/index.d.ts +21 -0
- package/lib/typescript/src/presentation/components/molecules/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIAppBar.d.ts +13 -0
- package/lib/typescript/src/presentation/components/organisms/UIAppBar.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIAppBarAction.d.ts +6 -0
- package/lib/typescript/src/presentation/components/organisms/UIAppBarAction.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UICard.d.ts +9 -0
- package/lib/typescript/src/presentation/components/organisms/UICard.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIComment.d.ts +9 -0
- package/lib/typescript/src/presentation/components/organisms/UIComment.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIErrorBoundary.d.ts +9 -0
- package/lib/typescript/src/presentation/components/organisms/UIErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIForm.d.ts +13 -0
- package/lib/typescript/src/presentation/components/organisms/UIForm.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormButton.d.ts +11 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormButton.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormCheckboxInput.d.ts +9 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormCheckboxInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormCurrencyInput.d.ts +11 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormCurrencyInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormDatetimeInput.d.ts +10 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormDatetimeInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormMultiselectInput.d.ts +30 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormMultiselectInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormRadioInput.d.ts +9 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormRadioInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormSelectInput.d.ts +44 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormSelectInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormTextInput.d.ts +11 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormTextInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormTextInputMask.d.ts +11 -0
- package/lib/typescript/src/presentation/components/organisms/UIFormTextInputMask.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UIRow.d.ts +14 -0
- package/lib/typescript/src/presentation/components/organisms/UIRow.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UISearchInput.d.ts +6 -0
- package/lib/typescript/src/presentation/components/organisms/UISearchInput.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UISelectChip.d.ts +13 -0
- package/lib/typescript/src/presentation/components/organisms/UISelectChip.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UISignature.d.ts +26 -0
- package/lib/typescript/src/presentation/components/organisms/UISignature.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/UISlideButton.d.ts +8 -0
- package/lib/typescript/src/presentation/components/organisms/UISlideButton.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/organisms/index.d.ts +22 -0
- package/lib/typescript/src/presentation/components/organisms/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/permissions/index.d.ts +2 -0
- package/lib/typescript/src/presentation/components/permissions/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/components/permissions/request-permissions.d.ts +15 -0
- package/lib/typescript/src/presentation/components/permissions/request-permissions.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/metadata/index.d.ts +3 -0
- package/lib/typescript/src/presentation/domain/metadata/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/metadata/use-comments.d.ts +11 -0
- package/lib/typescript/src/presentation/domain/metadata/use-comments.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/metadata/use-images.d.ts +11 -0
- package/lib/typescript/src/presentation/domain/metadata/use-images.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/index.d.ts +10 -0
- package/lib/typescript/src/presentation/domain/offline/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/offline-mutation-queue-provider.d.ts +18 -0
- package/lib/typescript/src/presentation/domain/offline/offline-mutation-queue-provider.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/types.d.ts +18 -0
- package/lib/typescript/src/presentation/domain/offline/types.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/use-infinite-offline-query.d.ts +78 -0
- package/lib/typescript/src/presentation/domain/offline/use-infinite-offline-query.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-id-v2.d.ts +9 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-id-v2.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-id.d.ts +3 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-id.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-mutation.d.ts +88 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-mutation.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-query.d.ts +8 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-query.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-queue.d.ts +10 -0
- package/lib/typescript/src/presentation/domain/offline/use-offline-queue.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/offline/utils.d.ts +18 -0
- package/lib/typescript/src/presentation/domain/offline/utils.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/provider/index.d.ts +2 -0
- package/lib/typescript/src/presentation/domain/provider/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/provider/zuq-core-provider.d.ts +13 -0
- package/lib/typescript/src/presentation/domain/provider/zuq-core-provider.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/utils/exists.d.ts +2 -0
- package/lib/typescript/src/presentation/domain/utils/exists.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/utils/index.d.ts +6 -0
- package/lib/typescript/src/presentation/domain/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/utils/react-query.d.ts +5 -0
- package/lib/typescript/src/presentation/domain/utils/react-query.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/utils/use-action-sheet.d.ts +6 -0
- package/lib/typescript/src/presentation/domain/utils/use-action-sheet.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/utils/use-signature-ref.d.ts +15 -0
- package/lib/typescript/src/presentation/domain/utils/use-signature-ref.d.ts.map +1 -0
- package/lib/typescript/src/presentation/domain/utils/yup.d.ts +3 -0
- package/lib/typescript/src/presentation/domain/utils/yup.d.ts.map +1 -0
- package/lib/typescript/src/theme.d.ts +214 -0
- package/lib/typescript/src/theme.d.ts.map +1 -0
- package/package.json +210 -0
- package/src/assets/logo.png +0 -0
- package/src/data/errors/http-client-error.ts +23 -0
- package/src/data/errors/index.ts +3 -0
- package/src/data/errors/save-file-error.ts +6 -0
- package/src/data/errors/unsupported-platform.ts +6 -0
- package/src/data/models/index.ts +3 -0
- package/src/data/models/remote-get-comment-list-model.ts +15 -0
- package/src/data/models/remote-get-image-list-model.ts +15 -0
- package/src/data/models/remote-user-model.ts +13 -0
- package/src/data/protocols/cookie-manager.ts +6 -0
- package/src/data/protocols/download-manager.ts +13 -0
- package/src/data/protocols/http-client.ts +75 -0
- package/src/data/protocols/index.ts +6 -0
- package/src/data/protocols/notification-manager.ts +17 -0
- package/src/data/protocols/permission-manager.ts +46 -0
- package/src/data/protocols/storage.ts +18 -0
- package/src/data/use-cases/index.ts +3 -0
- package/src/data/use-cases/remote-get-comment-list.ts +34 -0
- package/src/data/use-cases/remote-get-image-list.ts +40 -0
- package/src/data/use-cases/remote-send-diagnostics.ts +20 -0
- package/src/domain/errors/authentication-expired-error.ts +6 -0
- package/src/domain/errors/index.ts +4 -0
- package/src/domain/errors/internal-server-error.ts +6 -0
- package/src/domain/errors/invalid-credentials-error.ts +6 -0
- package/src/domain/errors/no-app-permission-error.ts +6 -0
- package/src/domain/models/get-comment-list-model.ts +9 -0
- package/src/domain/models/get-image-list-model.ts +7 -0
- package/src/domain/models/index.ts +3 -0
- package/src/domain/models/user-model.ts +15 -0
- package/src/domain/use-cases/get-comment-list.ts +14 -0
- package/src/domain/use-cases/get-image-list.ts +14 -0
- package/src/domain/use-cases/index.ts +6 -0
- package/src/domain/use-cases/record-request.ts +15 -0
- package/src/domain/use-cases/send-diagnostics.ts +15 -0
- package/src/domain/use-cases/user-authentication.ts +16 -0
- package/src/domain/use-cases/user-logout.ts +10 -0
- package/src/index.tsx +29 -0
- package/src/infra/axios-http-client-adapter.ts +271 -0
- package/src/infra/index.ts +7 -0
- package/src/infra/isomorphic-id-manager.ts +107 -0
- package/src/infra/mmkv-storage-adapter.ts +73 -0
- package/src/infra/notifee-notification-manager-adapter.ts +87 -0
- package/src/infra/offline-mutation-queue.ts +280 -0
- package/src/infra/rnbu-download-manager-adapter.ts +29 -0
- package/src/infra/rnp-permission-manager-adapter.ts +147 -0
- package/src/infra/storage-cookie-manager-adapter.ts +29 -0
- package/src/main/components/index.ts +4 -0
- package/src/main/components/request-permissions.tsx +17 -0
- package/src/main/factories/infra/download-manager-factory.ts +6 -0
- package/src/main/factories/infra/http-client-factory.ts +9 -0
- package/src/main/factories/infra/index.ts +7 -0
- package/src/main/factories/infra/isomorphic-id-manager-factory.ts +6 -0
- package/src/main/factories/infra/notification-manager-factory.ts +8 -0
- package/src/main/factories/infra/offline-mutation-queue-factory.ts +22 -0
- package/src/main/factories/infra/permission-manager-factory.ts +6 -0
- package/src/main/factories/infra/storage-factory.ts +11 -0
- package/src/main/factories/use-cases/index.ts +3 -0
- package/src/main/factories/use-cases/remote-get-comment-list-factory.ts +6 -0
- package/src/main/factories/use-cases/remote-get-image-list-factory.ts +6 -0
- package/src/main/factories/use-cases/remote-send-diagnostics-factory.ts +10 -0
- package/src/presentation/components/atoms/UIBackdrop.tsx +35 -0
- package/src/presentation/components/atoms/UICheckbox.tsx +58 -0
- package/src/presentation/components/atoms/UIDot.tsx +40 -0
- package/src/presentation/components/atoms/UIIcon.tsx +1091 -0
- package/src/presentation/components/atoms/UILoading.tsx +17 -0
- package/src/presentation/components/atoms/UIPage.tsx +92 -0
- package/src/presentation/components/atoms/UIProgress.tsx +60 -0
- package/src/presentation/components/atoms/UIScrollPage.tsx +87 -0
- package/src/presentation/components/atoms/UISeparator.tsx +41 -0
- package/src/presentation/components/atoms/UISpacer.tsx +21 -0
- package/src/presentation/components/atoms/UIStack.tsx +44 -0
- package/src/presentation/components/atoms/UIText.tsx +59 -0
- package/src/presentation/components/atoms/index.ts +12 -0
- package/src/presentation/components/index.ts +1 -0
- package/src/presentation/components/molecules/UIActionSheet.tsx +230 -0
- package/src/presentation/components/molecules/UIButton.tsx +192 -0
- package/src/presentation/components/molecules/UIButtonCTA.tsx +38 -0
- package/src/presentation/components/molecules/UICheckboxInput.tsx +106 -0
- package/src/presentation/components/molecules/UIChip.tsx +69 -0
- package/src/presentation/components/molecules/UICurrencyInput.tsx +43 -0
- package/src/presentation/components/molecules/UIDataList.tsx +30 -0
- package/src/presentation/components/molecules/UIDataSectionList.tsx +30 -0
- package/src/presentation/components/molecules/UIDatetimeInput.tsx +205 -0
- package/src/presentation/components/molecules/UIError.tsx +24 -0
- package/src/presentation/components/molecules/UIImage.tsx +85 -0
- package/src/presentation/components/molecules/UIInlineDatePicker.tsx +244 -0
- package/src/presentation/components/molecules/UIInputIcon.tsx +39 -0
- package/src/presentation/components/molecules/UIList.tsx +17 -0
- package/src/presentation/components/molecules/UIRadioInput.tsx +97 -0
- package/src/presentation/components/molecules/UISectionList.tsx +17 -0
- package/src/presentation/components/molecules/UISkeleton.tsx +66 -0
- package/src/presentation/components/molecules/UISwitch.tsx +72 -0
- package/src/presentation/components/molecules/UITextInput.tsx +160 -0
- package/src/presentation/components/molecules/UITextInputMask.tsx +160 -0
- package/src/presentation/components/molecules/index.ts +20 -0
- package/src/presentation/components/organisms/UIAppBar.tsx +103 -0
- package/src/presentation/components/organisms/UIAppBarAction.tsx +13 -0
- package/src/presentation/components/organisms/UICard.tsx +48 -0
- package/src/presentation/components/organisms/UIComment.tsx +64 -0
- package/src/presentation/components/organisms/UIErrorBoundary.tsx +72 -0
- package/src/presentation/components/organisms/UIForm.tsx +81 -0
- package/src/presentation/components/organisms/UIFormButton.tsx +38 -0
- package/src/presentation/components/organisms/UIFormCheckboxInput.tsx +35 -0
- package/src/presentation/components/organisms/UIFormCurrencyInput.tsx +65 -0
- package/src/presentation/components/organisms/UIFormDatetimeInput.tsx +51 -0
- package/src/presentation/components/organisms/UIFormMultiselectInput.tsx +251 -0
- package/src/presentation/components/organisms/UIFormRadioInput.tsx +32 -0
- package/src/presentation/components/organisms/UIFormSelectInput.tsx +316 -0
- package/src/presentation/components/organisms/UIFormTextInput.tsx +62 -0
- package/src/presentation/components/organisms/UIFormTextInputMask.tsx +79 -0
- package/src/presentation/components/organisms/UIRow.tsx +61 -0
- package/src/presentation/components/organisms/UISearchInput.tsx +40 -0
- package/src/presentation/components/organisms/UISelectChip.tsx +104 -0
- package/src/presentation/components/organisms/UISignature.tsx +194 -0
- package/src/presentation/components/organisms/UISlideButton.tsx +112 -0
- package/src/presentation/components/organisms/index.ts +21 -0
- package/src/presentation/components/permissions/index.ts +1 -0
- package/src/presentation/components/permissions/request-permissions.tsx +115 -0
- package/src/presentation/domain/metadata/index.ts +2 -0
- package/src/presentation/domain/metadata/use-comments.ts +27 -0
- package/src/presentation/domain/metadata/use-images.ts +27 -0
- package/src/presentation/domain/offline/index.ts +9 -0
- package/src/presentation/domain/offline/offline-mutation-queue-provider.tsx +95 -0
- package/src/presentation/domain/offline/types.ts +21 -0
- package/src/presentation/domain/offline/use-infinite-offline-query.tsx +89 -0
- package/src/presentation/domain/offline/use-offline-id-v2.ts +29 -0
- package/src/presentation/domain/offline/use-offline-id.ts +12 -0
- package/src/presentation/domain/offline/use-offline-mutation.ts +150 -0
- package/src/presentation/domain/offline/use-offline-query.ts +55 -0
- package/src/presentation/domain/offline/use-offline-queue.ts +6 -0
- package/src/presentation/domain/offline/utils.ts +139 -0
- package/src/presentation/domain/provider/index.ts +1 -0
- package/src/presentation/domain/provider/zuq-core-provider.tsx +52 -0
- package/src/presentation/domain/utils/exists.ts +3 -0
- package/src/presentation/domain/utils/index.ts +5 -0
- package/src/presentation/domain/utils/react-query.ts +10 -0
- package/src/presentation/domain/utils/use-action-sheet.ts +21 -0
- package/src/presentation/domain/utils/use-signature-ref.ts +19 -0
- package/src/presentation/domain/utils/yup.ts +3 -0
- package/src/theme.ts +240 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Canvas,
|
|
3
|
+
Path,
|
|
4
|
+
Skia,
|
|
5
|
+
notifyChange,
|
|
6
|
+
useCanvasRef,
|
|
7
|
+
} from '@shopify/react-native-skia';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { Dimensions, Image, StyleSheet } from 'react-native';
|
|
10
|
+
import ReactNativeBlobUtil from 'react-native-blob-util';
|
|
11
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
12
|
+
import { useSharedValue } from 'react-native-reanimated';
|
|
13
|
+
import { UIIcon, UISeparator, UIStack, UIText } from '../atoms';
|
|
14
|
+
import { UIButton } from '../molecules';
|
|
15
|
+
import { theme } from '../../../theme';
|
|
16
|
+
import type { SignatureRef } from '../../domain/utils';
|
|
17
|
+
import { scheduleOnRN } from 'react-native-worklets';
|
|
18
|
+
|
|
19
|
+
const { width } = Dimensions.get('window');
|
|
20
|
+
|
|
21
|
+
const SNAPSHOT_PARAMS = {
|
|
22
|
+
height: 250,
|
|
23
|
+
width,
|
|
24
|
+
x: 0,
|
|
25
|
+
y: 0,
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
type ImageType = {
|
|
29
|
+
name: string;
|
|
30
|
+
uri: string;
|
|
31
|
+
type: string;
|
|
32
|
+
editable?: boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type Props = {
|
|
36
|
+
ref?: React.Ref<SignatureRef>;
|
|
37
|
+
initialImage?: ImageType;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
label?: string;
|
|
40
|
+
onReset?: () => void;
|
|
41
|
+
onTouchStart?: () => void;
|
|
42
|
+
testID?: string;
|
|
43
|
+
accessibilityLabel?: string;
|
|
44
|
+
labelSize?: number;
|
|
45
|
+
containerStyle?: React.ComponentProps<typeof UIStack>['style'];
|
|
46
|
+
signatureStyle?: React.ComponentProps<typeof Canvas>['style'];
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const UISignature = ({
|
|
50
|
+
ref,
|
|
51
|
+
initialImage,
|
|
52
|
+
disabled = false,
|
|
53
|
+
label = 'Assinatura',
|
|
54
|
+
onReset,
|
|
55
|
+
onTouchStart,
|
|
56
|
+
testID,
|
|
57
|
+
accessibilityLabel,
|
|
58
|
+
labelSize = 14,
|
|
59
|
+
containerStyle,
|
|
60
|
+
signatureStyle,
|
|
61
|
+
}: Props) => {
|
|
62
|
+
const canvasRef = useCanvasRef();
|
|
63
|
+
const currentPath = useSharedValue(Skia.Path.Make().moveTo(0, 0));
|
|
64
|
+
const [isDirty, setIsDirty] = React.useState(false);
|
|
65
|
+
const [image, setImage] = React.useState<ImageType | null>(
|
|
66
|
+
initialImage ?? null
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
const resetSignature = () => {
|
|
70
|
+
onReset?.();
|
|
71
|
+
currentPath.value = Skia.Path.Make().moveTo(0, 0);
|
|
72
|
+
setImage(null);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const onSave = async () => {
|
|
76
|
+
const image = canvasRef.current?.makeImageSnapshot(SNAPSHOT_PARAMS);
|
|
77
|
+
if (!image) return;
|
|
78
|
+
const name = `${Date.now()}.png`;
|
|
79
|
+
const path = ReactNativeBlobUtil.fs.dirs.DCIMDir + `/signatures/${name}`;
|
|
80
|
+
const base64 = image.encodeToBase64();
|
|
81
|
+
await ReactNativeBlobUtil.fs.writeFile(path, base64, 'base64');
|
|
82
|
+
const values = {
|
|
83
|
+
name,
|
|
84
|
+
uri: `file://${path}`,
|
|
85
|
+
type: 'image/png',
|
|
86
|
+
};
|
|
87
|
+
setImage(values);
|
|
88
|
+
return values;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const pan = Gesture.Pan()
|
|
92
|
+
.enabled(!disabled)
|
|
93
|
+
.averageTouches(true)
|
|
94
|
+
.maxPointers(1)
|
|
95
|
+
.minDistance(1)
|
|
96
|
+
.onStart((e) => {
|
|
97
|
+
currentPath.value.moveTo(e.x, e.y);
|
|
98
|
+
currentPath.value.lineTo(e.x, e.y);
|
|
99
|
+
notifyChange(currentPath);
|
|
100
|
+
if (onTouchStart) scheduleOnRN(onTouchStart);
|
|
101
|
+
})
|
|
102
|
+
.onUpdate((e) => {
|
|
103
|
+
scheduleOnRN(setIsDirty, true);
|
|
104
|
+
currentPath.value.lineTo(e.x, e.y);
|
|
105
|
+
notifyChange(currentPath);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
React.useImperativeHandle(ref, () => ({
|
|
109
|
+
isDirty,
|
|
110
|
+
save: onSave,
|
|
111
|
+
reset: resetSignature,
|
|
112
|
+
}));
|
|
113
|
+
|
|
114
|
+
React.useEffect(() => {
|
|
115
|
+
if (initialImage) {
|
|
116
|
+
setImage(initialImage);
|
|
117
|
+
}
|
|
118
|
+
}, [initialImage]);
|
|
119
|
+
|
|
120
|
+
const { height, width } = StyleSheet.flatten(signatureStyle ?? {});
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<UIStack style={[styles.signatureContainer, containerStyle]}>
|
|
124
|
+
{image ? (
|
|
125
|
+
<Image
|
|
126
|
+
source={image}
|
|
127
|
+
style={[
|
|
128
|
+
styles.image,
|
|
129
|
+
Boolean(width) && { width },
|
|
130
|
+
Boolean(height) && { height },
|
|
131
|
+
]}
|
|
132
|
+
/>
|
|
133
|
+
) : (
|
|
134
|
+
<GestureDetector gesture={pan}>
|
|
135
|
+
<Canvas
|
|
136
|
+
ref={canvasRef}
|
|
137
|
+
testID={testID}
|
|
138
|
+
accessibilityLabel={accessibilityLabel}
|
|
139
|
+
style={[styles.container, signatureStyle]}
|
|
140
|
+
>
|
|
141
|
+
<Path
|
|
142
|
+
path={currentPath}
|
|
143
|
+
strokeWidth={5}
|
|
144
|
+
style="stroke"
|
|
145
|
+
color="#000"
|
|
146
|
+
/>
|
|
147
|
+
</Canvas>
|
|
148
|
+
</GestureDetector>
|
|
149
|
+
)}
|
|
150
|
+
<UIStack style={styles.underline}>
|
|
151
|
+
<UISeparator color="neutral-light-50" style={styles.separator} />
|
|
152
|
+
<UIText size={labelSize}>{label}</UIText>
|
|
153
|
+
</UIStack>
|
|
154
|
+
<UIButton
|
|
155
|
+
style={styles.clear}
|
|
156
|
+
onPress={resetSignature}
|
|
157
|
+
disabled={disabled}
|
|
158
|
+
>
|
|
159
|
+
<UIIcon name="close" />
|
|
160
|
+
</UIButton>
|
|
161
|
+
</UIStack>
|
|
162
|
+
);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const styles = StyleSheet.create({
|
|
166
|
+
container: {
|
|
167
|
+
flex: 1,
|
|
168
|
+
position: 'relative',
|
|
169
|
+
},
|
|
170
|
+
image: { height: 250, width: '100%' },
|
|
171
|
+
signatureContainer: {
|
|
172
|
+
height: 250,
|
|
173
|
+
borderWidth: 1,
|
|
174
|
+
borderRadius: 10,
|
|
175
|
+
borderColor: theme.color.neutral.light[50],
|
|
176
|
+
overflow: 'hidden',
|
|
177
|
+
position: 'relative',
|
|
178
|
+
},
|
|
179
|
+
clear: {
|
|
180
|
+
position: 'absolute',
|
|
181
|
+
top: 0,
|
|
182
|
+
right: 0,
|
|
183
|
+
},
|
|
184
|
+
underline: {
|
|
185
|
+
position: 'absolute',
|
|
186
|
+
width: '100%',
|
|
187
|
+
paddingHorizontal: 20,
|
|
188
|
+
alignItems: 'center',
|
|
189
|
+
bottom: 20,
|
|
190
|
+
},
|
|
191
|
+
separator: {
|
|
192
|
+
opacity: 1,
|
|
193
|
+
},
|
|
194
|
+
});
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
4
|
+
import Animated, {
|
|
5
|
+
Extrapolation,
|
|
6
|
+
clamp,
|
|
7
|
+
interpolate,
|
|
8
|
+
runOnJS,
|
|
9
|
+
useAnimatedStyle,
|
|
10
|
+
useSharedValue,
|
|
11
|
+
withSpring,
|
|
12
|
+
} from 'react-native-reanimated';
|
|
13
|
+
import { UIStack, UIText } from '../atoms';
|
|
14
|
+
import { UIButton } from '../molecules';
|
|
15
|
+
import { theme } from '../../../theme';
|
|
16
|
+
|
|
17
|
+
type Props = React.PropsWithChildren<{
|
|
18
|
+
helperText?: string;
|
|
19
|
+
onPress?: () => void;
|
|
20
|
+
}>;
|
|
21
|
+
|
|
22
|
+
export const UISlideButton = ({ children, helperText, onPress }: Props) => {
|
|
23
|
+
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
24
|
+
const [buttonWidth, setButtonWidth] = React.useState(0);
|
|
25
|
+
const animation = useSharedValue(0);
|
|
26
|
+
|
|
27
|
+
const max = containerWidth - buttonWidth;
|
|
28
|
+
|
|
29
|
+
const buttonAnimatedStyle = useAnimatedStyle(() => {
|
|
30
|
+
return {
|
|
31
|
+
transform: [
|
|
32
|
+
{ translateX: interpolate(animation.value, [0, 1], [0, max]) },
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const labelAnimatedStyle = useAnimatedStyle(() => {
|
|
38
|
+
return {
|
|
39
|
+
opacity: interpolate(
|
|
40
|
+
animation.value,
|
|
41
|
+
[0, 1],
|
|
42
|
+
[1, -1.5],
|
|
43
|
+
Extrapolation.CLAMP
|
|
44
|
+
),
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const pan = Gesture.Pan()
|
|
49
|
+
.onUpdate((event) => {
|
|
50
|
+
animation.value = interpolate(
|
|
51
|
+
clamp(event.translationX, 0, max),
|
|
52
|
+
[0, max],
|
|
53
|
+
[0, 1]
|
|
54
|
+
);
|
|
55
|
+
})
|
|
56
|
+
.onEnd(() => {
|
|
57
|
+
if (animation.value > 0.9) {
|
|
58
|
+
if (onPress) {
|
|
59
|
+
runOnJS(onPress)();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
animation.value = withSpring(0, {
|
|
63
|
+
clamp: {
|
|
64
|
+
min: 0,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<UIStack
|
|
71
|
+
style={styles.container}
|
|
72
|
+
onLayout={(event) => {
|
|
73
|
+
setContainerWidth(event.nativeEvent.layout.width);
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
{helperText && (
|
|
77
|
+
<Animated.View style={[styles.text, labelAnimatedStyle]}>
|
|
78
|
+
<UIText weight="600">{helperText}</UIText>
|
|
79
|
+
</Animated.View>
|
|
80
|
+
)}
|
|
81
|
+
<GestureDetector gesture={pan}>
|
|
82
|
+
<Animated.View style={buttonAnimatedStyle}>
|
|
83
|
+
<UIButton
|
|
84
|
+
variant="contained"
|
|
85
|
+
style={styles.button}
|
|
86
|
+
onLayout={(event) => {
|
|
87
|
+
setButtonWidth(event.nativeEvent.layout.width);
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
{children}
|
|
91
|
+
</UIButton>
|
|
92
|
+
</Animated.View>
|
|
93
|
+
</GestureDetector>
|
|
94
|
+
</UIStack>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const styles = StyleSheet.create({
|
|
99
|
+
container: {
|
|
100
|
+
backgroundColor: theme.color.neutral.light['20'],
|
|
101
|
+
borderRadius: 16,
|
|
102
|
+
},
|
|
103
|
+
button: {
|
|
104
|
+
alignSelf: 'flex-start',
|
|
105
|
+
},
|
|
106
|
+
text: {
|
|
107
|
+
position: 'absolute',
|
|
108
|
+
alignSelf: 'center',
|
|
109
|
+
top: '50%',
|
|
110
|
+
transform: [{ translateY: -10 }],
|
|
111
|
+
},
|
|
112
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from './UIForm';
|
|
2
|
+
export * from './UIFormTextInput';
|
|
3
|
+
export * from './UICard';
|
|
4
|
+
export * from './UIFormButton';
|
|
5
|
+
export * from './UIRow';
|
|
6
|
+
export * from './UIComment';
|
|
7
|
+
export * from './UIFormRadioInput';
|
|
8
|
+
export * from './UIAppBarAction';
|
|
9
|
+
export * from './UIAppBar';
|
|
10
|
+
export * from './UIFormDatetimeInput';
|
|
11
|
+
export * from './UIFormCheckboxInput';
|
|
12
|
+
export * from './UIFormRadioInput';
|
|
13
|
+
export * from './UIFormMultiselectInput';
|
|
14
|
+
export * from './UIFormSelectInput';
|
|
15
|
+
export * from './UIFormTextInputMask';
|
|
16
|
+
export * from './UIFormCurrencyInput';
|
|
17
|
+
export * from './UISlideButton';
|
|
18
|
+
export * from './UISearchInput';
|
|
19
|
+
export * from './UISelectChip';
|
|
20
|
+
export * from './UIErrorBoundary';
|
|
21
|
+
export * from './UISignature';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './request-permissions';
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import type { PermissionManager } from '../../../data/protocols';
|
|
4
|
+
import { UIActionSheet, UIButton, UIList } from '../molecules';
|
|
5
|
+
import { UISeparator, UIStack, UIText } from '../atoms';
|
|
6
|
+
import { StyleSheet } from 'react-native';
|
|
7
|
+
import { useActionSheet } from '../../domain/utils';
|
|
8
|
+
|
|
9
|
+
type Permission = {
|
|
10
|
+
value: PermissionManager.Permission;
|
|
11
|
+
option: PermissionManager.Options;
|
|
12
|
+
onAllow?: () => void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
permissionManager: PermissionManager;
|
|
17
|
+
permissions: Array<Permission>;
|
|
18
|
+
title?: string;
|
|
19
|
+
height?: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const RequestPermissions = ({
|
|
23
|
+
permissionManager,
|
|
24
|
+
permissions,
|
|
25
|
+
title,
|
|
26
|
+
height,
|
|
27
|
+
}: Props) => {
|
|
28
|
+
const { visible, onOpen, onClose } = useActionSheet();
|
|
29
|
+
const [pending, setPending] = React.useState<Permission[]>([]);
|
|
30
|
+
|
|
31
|
+
const check = React.useCallback(async () => {
|
|
32
|
+
const current = await Promise.all(
|
|
33
|
+
permissions.map(async (permission) => ({
|
|
34
|
+
permission,
|
|
35
|
+
state: await permissionManager.get(permission.value),
|
|
36
|
+
}))
|
|
37
|
+
);
|
|
38
|
+
setPending(
|
|
39
|
+
current
|
|
40
|
+
.filter((item) => ['denied', 'blocked'].includes(item.state))
|
|
41
|
+
.map((item) => item.permission)
|
|
42
|
+
);
|
|
43
|
+
}, [permissionManager, permissions]);
|
|
44
|
+
|
|
45
|
+
const onAllow = React.useCallback(
|
|
46
|
+
async (permission: Permission) => {
|
|
47
|
+
const result = await permissionManager.request(permission.value, {
|
|
48
|
+
title: permission.option.title,
|
|
49
|
+
message: permission.option.message,
|
|
50
|
+
});
|
|
51
|
+
if (['granted', 'limited', 'unavailable'].includes(result)) {
|
|
52
|
+
permission.onAllow?.();
|
|
53
|
+
check();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
[check, permissionManager]
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
React.useEffect(() => {
|
|
60
|
+
check();
|
|
61
|
+
}, [check]);
|
|
62
|
+
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (pending.length) {
|
|
65
|
+
onOpen();
|
|
66
|
+
} else {
|
|
67
|
+
onClose();
|
|
68
|
+
}
|
|
69
|
+
}, [pending, onClose, onOpen]);
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<UIActionSheet
|
|
73
|
+
visible={visible}
|
|
74
|
+
onRequestClose={onClose}
|
|
75
|
+
title={title ?? 'Permissões'}
|
|
76
|
+
estimatedHeight={height}
|
|
77
|
+
>
|
|
78
|
+
<UIList
|
|
79
|
+
data={pending}
|
|
80
|
+
style={{ height: height ?? 400 }}
|
|
81
|
+
contentContainerStyle={styles.container}
|
|
82
|
+
renderItem={({ item }) => (
|
|
83
|
+
<UIStack size="lg" key={item.value}>
|
|
84
|
+
<UIStack size="md">
|
|
85
|
+
<UIText size={16} weight="600">
|
|
86
|
+
{item.option.title}
|
|
87
|
+
</UIText>
|
|
88
|
+
<UIText>{item.option.message}</UIText>
|
|
89
|
+
</UIStack>
|
|
90
|
+
<UIButton
|
|
91
|
+
variant="contained"
|
|
92
|
+
color="neutral-light-20"
|
|
93
|
+
textColor="brand-violet-500"
|
|
94
|
+
onPress={() => onAllow(item)}
|
|
95
|
+
>
|
|
96
|
+
{item.option.allow ?? 'Permitir'}
|
|
97
|
+
</UIButton>
|
|
98
|
+
</UIStack>
|
|
99
|
+
)}
|
|
100
|
+
ItemSeparatorComponent={() => <UISeparator style={styles.separator} />}
|
|
101
|
+
/>
|
|
102
|
+
</UIActionSheet>
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const styles = StyleSheet.create({
|
|
107
|
+
separator: {
|
|
108
|
+
marginTop: 16,
|
|
109
|
+
marginBottom: 12,
|
|
110
|
+
},
|
|
111
|
+
container: {
|
|
112
|
+
paddingTop: 24,
|
|
113
|
+
paddingHorizontal: 24,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { GetCommentList } from '../../../domain/use-cases';
|
|
2
|
+
import type { Storage } from '../../../data/protocols';
|
|
3
|
+
import { useOfflineQuery } from '../offline';
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
entityId?: number;
|
|
7
|
+
entityType?: string;
|
|
8
|
+
getMetadataComments: GetCommentList;
|
|
9
|
+
storage: Storage;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const useComments = ({
|
|
13
|
+
entityId,
|
|
14
|
+
entityType,
|
|
15
|
+
getMetadataComments,
|
|
16
|
+
storage,
|
|
17
|
+
}: Props) => {
|
|
18
|
+
return useOfflineQuery({
|
|
19
|
+
storage,
|
|
20
|
+
queryKey: ['Metadata', 'COMMENT', { entityId, entityType }],
|
|
21
|
+
queryFn: async () => {
|
|
22
|
+
if (!entityId || !entityType) return [];
|
|
23
|
+
const result = await getMetadataComments.get({ entityId, entityType });
|
|
24
|
+
return result ?? [];
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { GetImageList } from '../../../domain/use-cases';
|
|
2
|
+
import type { Storage } from '../../../data/protocols';
|
|
3
|
+
import { useOfflineQuery } from '../offline';
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
entityId?: number;
|
|
7
|
+
entityType?: string;
|
|
8
|
+
getMetadataImages: GetImageList;
|
|
9
|
+
storage: Storage;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const useImages = ({
|
|
13
|
+
entityId,
|
|
14
|
+
entityType,
|
|
15
|
+
getMetadataImages,
|
|
16
|
+
storage,
|
|
17
|
+
}: Props) => {
|
|
18
|
+
return useOfflineQuery({
|
|
19
|
+
storage,
|
|
20
|
+
queryKey: ['Metadata', 'PHOTO', { entityId, entityType }],
|
|
21
|
+
queryFn: async () => {
|
|
22
|
+
if (!entityId || !entityType) return [];
|
|
23
|
+
const result = await getMetadataImages.get({ entityId, entityType });
|
|
24
|
+
return result ?? [];
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './use-offline-query';
|
|
2
|
+
export * from './use-offline-mutation';
|
|
3
|
+
export * from './use-infinite-offline-query';
|
|
4
|
+
export * from './offline-mutation-queue-provider';
|
|
5
|
+
export * from './use-offline-queue';
|
|
6
|
+
export * from './use-offline-id';
|
|
7
|
+
export * from './utils';
|
|
8
|
+
export * from './types';
|
|
9
|
+
export * from './use-offline-id-v2';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { useNetInfo } from '@react-native-community/netinfo';
|
|
3
|
+
import type { OfflineMutation, OfflineMutationQueue } from '../../../infra';
|
|
4
|
+
|
|
5
|
+
const OFFLINE_EXECUTION_INTERVAL_IN_MS = 10000;
|
|
6
|
+
|
|
7
|
+
type Props = PropsWithChildren<{
|
|
8
|
+
queue?: OfflineMutationQueue;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
type OfflineMutationQueueContextProps = {
|
|
12
|
+
executing: boolean;
|
|
13
|
+
push: (key: string, offlineMutation: OfflineMutation) => void;
|
|
14
|
+
data: OfflineMutation[];
|
|
15
|
+
size: number;
|
|
16
|
+
clear: Function;
|
|
17
|
+
refetch: () => void;
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const OfflineMutationQueueContext =
|
|
22
|
+
React.createContext<OfflineMutationQueueContextProps>(
|
|
23
|
+
{} as OfflineMutationQueueContextProps
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const OfflineMutationQueueProvider = ({ queue, children }: Props) => {
|
|
27
|
+
const { isConnected, isInternetReachable } = useNetInfo();
|
|
28
|
+
const [queueSize, setQueueSize] = React.useState(0);
|
|
29
|
+
const [queueData, setQueueData] = React.useState<OfflineMutation[]>([]);
|
|
30
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
31
|
+
const intervalId = React.useRef<NodeJS.Timeout | undefined>(undefined);
|
|
32
|
+
const hasConnection = React.useMemo(
|
|
33
|
+
() => isConnected && isInternetReachable,
|
|
34
|
+
[isConnected, isInternetReachable]
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const push = React.useCallback(
|
|
38
|
+
(key: string, offlineMutation: OfflineMutation) => {
|
|
39
|
+
if (!queue) return;
|
|
40
|
+
queue.push(key, offlineMutation);
|
|
41
|
+
},
|
|
42
|
+
[queue]
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const refetch = React.useCallback(() => {
|
|
46
|
+
if (!queue) return;
|
|
47
|
+
setIsLoading(true);
|
|
48
|
+
setQueueData(queue.list());
|
|
49
|
+
setQueueSize(queue.size());
|
|
50
|
+
setIsLoading(false);
|
|
51
|
+
}, [queue]);
|
|
52
|
+
|
|
53
|
+
const clearQueueData = React.useCallback(() => {
|
|
54
|
+
if (!queue) return;
|
|
55
|
+
if (queueSize) {
|
|
56
|
+
queue.clear();
|
|
57
|
+
setQueueData([]);
|
|
58
|
+
}
|
|
59
|
+
}, [queue, queueSize]);
|
|
60
|
+
|
|
61
|
+
const clearQueueInterval = React.useCallback(() => {
|
|
62
|
+
if (intervalId.current) {
|
|
63
|
+
clearInterval(intervalId.current);
|
|
64
|
+
intervalId.current = undefined;
|
|
65
|
+
}
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
React.useEffect(() => {
|
|
69
|
+
if (!queue) return;
|
|
70
|
+
if (!intervalId.current) {
|
|
71
|
+
intervalId.current = setInterval(async () => {
|
|
72
|
+
if (hasConnection) await queue.execute();
|
|
73
|
+
setQueueSize(queue.size());
|
|
74
|
+
setQueueData(queue.list());
|
|
75
|
+
}, OFFLINE_EXECUTION_INTERVAL_IN_MS);
|
|
76
|
+
}
|
|
77
|
+
return clearQueueInterval;
|
|
78
|
+
}, [queue, clearQueueInterval, hasConnection]);
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<OfflineMutationQueueContext.Provider
|
|
82
|
+
value={{
|
|
83
|
+
executing: Boolean(intervalId.current),
|
|
84
|
+
data: queueData,
|
|
85
|
+
size: queueSize,
|
|
86
|
+
clear: clearQueueData,
|
|
87
|
+
push,
|
|
88
|
+
refetch,
|
|
89
|
+
isLoading,
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
92
|
+
{children}
|
|
93
|
+
</OfflineMutationQueueContext.Provider>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { QueryClient, QueryKey } from '@tanstack/react-query';
|
|
2
|
+
import type { Storage } from '../../../data/protocols';
|
|
3
|
+
import type { IsomorphicIdManager } from '../../../infra';
|
|
4
|
+
|
|
5
|
+
export type Dependency = string | number | IsomorphicIdManager.IsomorphicId;
|
|
6
|
+
|
|
7
|
+
export type OfflineId = string | number;
|
|
8
|
+
|
|
9
|
+
export type OptimisticRollbackParams = {
|
|
10
|
+
queryKey: QueryKey;
|
|
11
|
+
queryClient: QueryClient;
|
|
12
|
+
storage?: Storage;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type OptimisticUpdateParams<T> = {
|
|
16
|
+
queryKey: QueryKey;
|
|
17
|
+
queryClient: QueryClient;
|
|
18
|
+
handler: (data: T) => Promise<T>;
|
|
19
|
+
storage?: Storage;
|
|
20
|
+
fallbackData?: any;
|
|
21
|
+
};
|