@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,316 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet, TextInput } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import * as Yup from 'yup';
|
|
5
|
+
|
|
6
|
+
import { useForm, useFormContext } from 'react-hook-form';
|
|
7
|
+
import {
|
|
8
|
+
UIActionSheet,
|
|
9
|
+
UIDataList,
|
|
10
|
+
UIInputIcon,
|
|
11
|
+
UIRadioInput,
|
|
12
|
+
type UITextInput,
|
|
13
|
+
} from '../molecules';
|
|
14
|
+
import { UIFormButton } from './UIFormButton';
|
|
15
|
+
import { UIFormTextInput } from './UIFormTextInput';
|
|
16
|
+
import { UIIcon, UIStack, UIText } from '../atoms';
|
|
17
|
+
import { UIForm } from './UIForm';
|
|
18
|
+
import { useActionSheet } from '../../domain/utils';
|
|
19
|
+
import { theme } from '../../../theme';
|
|
20
|
+
import _ from 'lodash';
|
|
21
|
+
|
|
22
|
+
const schema = Yup.object({
|
|
23
|
+
name: Yup.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
type SearchFormResult = {
|
|
27
|
+
search: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
type Props<T> = {
|
|
31
|
+
name: string;
|
|
32
|
+
title: string;
|
|
33
|
+
label: string;
|
|
34
|
+
data: T[] | undefined;
|
|
35
|
+
loading: boolean;
|
|
36
|
+
refreshing: boolean;
|
|
37
|
+
sorted?: boolean;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
emptyMessage?: string;
|
|
40
|
+
sheetStyle?: React.ComponentProps<typeof UIActionSheet>['style'];
|
|
41
|
+
inputStyle?: React.ComponentProps<typeof UITextInput>['style'];
|
|
42
|
+
inputContainerStyle?: React.ComponentProps<
|
|
43
|
+
typeof UITextInput
|
|
44
|
+
>['containerStyle'];
|
|
45
|
+
inputFormContainerStyle?: React.ComponentProps<
|
|
46
|
+
typeof UIFormTextInput
|
|
47
|
+
>['formContainerStyle'];
|
|
48
|
+
contentStyle?: React.ComponentProps<
|
|
49
|
+
typeof UIDataList
|
|
50
|
+
>['contentContainerStyle'];
|
|
51
|
+
variant?: React.ComponentProps<typeof UITextInput>['variant'];
|
|
52
|
+
searchPlaceholder?: string;
|
|
53
|
+
searchEmptyMessage?: string;
|
|
54
|
+
searchVariant?: React.ComponentProps<typeof UITextInput>['variant'];
|
|
55
|
+
createMessage?: string;
|
|
56
|
+
createVariant?: React.ComponentProps<typeof UIFormButton>['variant'];
|
|
57
|
+
getItemLabel: (item: T) => string | number;
|
|
58
|
+
getItemKey: (item: T) => string | number;
|
|
59
|
+
onRefresh: () => Promise<any>;
|
|
60
|
+
onCreate?: (search: string) => Promise<T>;
|
|
61
|
+
onClose?: () => void;
|
|
62
|
+
onSearch?: (value: string) => void;
|
|
63
|
+
getErrorMessage?: React.ComponentProps<
|
|
64
|
+
typeof UIFormButton
|
|
65
|
+
>['getErrorMessage'];
|
|
66
|
+
action?: React.ReactNode;
|
|
67
|
+
ListFooterComponent?: React.ComponentProps<
|
|
68
|
+
typeof UIDataList
|
|
69
|
+
>['ListFooterComponent'];
|
|
70
|
+
onEndReached?: React.ComponentProps<typeof UIDataList>['onEndReached'];
|
|
71
|
+
closeOnSelect?: boolean;
|
|
72
|
+
editable?: boolean;
|
|
73
|
+
enableClientSearch?: boolean;
|
|
74
|
+
onFocus?: () => void;
|
|
75
|
+
onBlur?: () => void;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const UIFormSelectInput = <T,>({
|
|
79
|
+
title,
|
|
80
|
+
label,
|
|
81
|
+
name,
|
|
82
|
+
data,
|
|
83
|
+
loading,
|
|
84
|
+
refreshing,
|
|
85
|
+
getItemLabel,
|
|
86
|
+
getItemKey,
|
|
87
|
+
onRefresh,
|
|
88
|
+
variant = 'contained',
|
|
89
|
+
searchVariant = 'outlined',
|
|
90
|
+
placeholder,
|
|
91
|
+
sheetStyle,
|
|
92
|
+
contentStyle,
|
|
93
|
+
searchPlaceholder = 'Busque ou crie um novo item',
|
|
94
|
+
searchEmptyMessage = 'Não foram encontrados itens para essa busca',
|
|
95
|
+
createMessage = 'Criar novo item',
|
|
96
|
+
createVariant = 'contained',
|
|
97
|
+
emptyMessage = 'Não há itens encontrados',
|
|
98
|
+
onCreate,
|
|
99
|
+
getErrorMessage,
|
|
100
|
+
onClose: onCloseFromProps,
|
|
101
|
+
action,
|
|
102
|
+
ListFooterComponent,
|
|
103
|
+
onEndReached,
|
|
104
|
+
onSearch,
|
|
105
|
+
closeOnSelect,
|
|
106
|
+
sorted = false,
|
|
107
|
+
editable = true,
|
|
108
|
+
enableClientSearch = true,
|
|
109
|
+
inputStyle,
|
|
110
|
+
inputContainerStyle,
|
|
111
|
+
inputFormContainerStyle,
|
|
112
|
+
onFocus,
|
|
113
|
+
onBlur,
|
|
114
|
+
}: Props<T>) => {
|
|
115
|
+
const ref = React.useRef<TextInput>(null);
|
|
116
|
+
const { visible, onClose: onCloseFromHook, onOpen } = useActionSheet();
|
|
117
|
+
|
|
118
|
+
const {
|
|
119
|
+
getValues: getValuesContext,
|
|
120
|
+
setValue: setValueContext,
|
|
121
|
+
watch: watchContext,
|
|
122
|
+
clearErrors: clearErrorsContext,
|
|
123
|
+
} = useFormContext();
|
|
124
|
+
|
|
125
|
+
const { watch, getValues, reset, ...rest } = useForm();
|
|
126
|
+
const form = {
|
|
127
|
+
...rest,
|
|
128
|
+
watch,
|
|
129
|
+
getValues,
|
|
130
|
+
reset,
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const [isCreating, setIsCreating] = React.useState(false);
|
|
134
|
+
|
|
135
|
+
const onClose = React.useCallback(() => {
|
|
136
|
+
ref.current?.blur();
|
|
137
|
+
onCloseFromProps?.();
|
|
138
|
+
onCloseFromHook();
|
|
139
|
+
onSearch?.('');
|
|
140
|
+
reset();
|
|
141
|
+
}, [onCloseFromProps, onCloseFromHook, onSearch, reset]);
|
|
142
|
+
|
|
143
|
+
const onSelect = (item: T) => {
|
|
144
|
+
const current = getValuesContext(name) as T;
|
|
145
|
+
const isSelected = current && getItemKey(current) === getItemKey(item);
|
|
146
|
+
if (isSelected) {
|
|
147
|
+
setValueContext(name, undefined);
|
|
148
|
+
} else {
|
|
149
|
+
setValueContext(name, item);
|
|
150
|
+
clearErrorsContext(name);
|
|
151
|
+
}
|
|
152
|
+
if (closeOnSelect) onClose();
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const onSubmit = async ({ search }: SearchFormResult) => {
|
|
156
|
+
if (!onCreate) return;
|
|
157
|
+
setIsCreating(true);
|
|
158
|
+
const data = await onCreate(search);
|
|
159
|
+
setIsCreating(false);
|
|
160
|
+
onSelect(data);
|
|
161
|
+
await onRefresh();
|
|
162
|
+
onClose();
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const filteredData = React.useMemo(() => {
|
|
166
|
+
const search = getValues('search');
|
|
167
|
+
if (!data) return [];
|
|
168
|
+
if (!Array.isArray(data)) return [];
|
|
169
|
+
let filtered = data;
|
|
170
|
+
if (enableClientSearch && search) {
|
|
171
|
+
filtered = data.filter((item) =>
|
|
172
|
+
String(getItemLabel(item) ?? '')
|
|
173
|
+
.toLowerCase()
|
|
174
|
+
.includes(search.toLowerCase())
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
if (sorted) {
|
|
178
|
+
filtered = filtered.sort((a, b) =>
|
|
179
|
+
String(getItemLabel(a)).localeCompare(String(getItemLabel(b)))
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
return filtered;
|
|
183
|
+
}, [data, sorted, getItemLabel, watch('search')]); //eslint-disable-line
|
|
184
|
+
|
|
185
|
+
const value = React.useMemo(() => {
|
|
186
|
+
const current = getValuesContext(name);
|
|
187
|
+
if (current) {
|
|
188
|
+
return String(getItemLabel(current));
|
|
189
|
+
}
|
|
190
|
+
return;
|
|
191
|
+
}, [name, getItemLabel, getValuesContext, watchContext(name)]); //eslint-disable-line
|
|
192
|
+
|
|
193
|
+
//eslint-disable-next-line
|
|
194
|
+
const onSearchDebounced = React.useCallback(
|
|
195
|
+
_.debounce((value: string) => {
|
|
196
|
+
onSearch?.(value);
|
|
197
|
+
}, 1000),
|
|
198
|
+
[onSearch]
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
return (
|
|
202
|
+
<>
|
|
203
|
+
<UIFormTextInput
|
|
204
|
+
caretHidden
|
|
205
|
+
name={name}
|
|
206
|
+
ref={ref}
|
|
207
|
+
showSoftInputOnFocus={false}
|
|
208
|
+
onFocus={() => {
|
|
209
|
+
onOpen();
|
|
210
|
+
onFocus?.();
|
|
211
|
+
}}
|
|
212
|
+
onBlur={onBlur}
|
|
213
|
+
variant={variant}
|
|
214
|
+
label={label}
|
|
215
|
+
value={value}
|
|
216
|
+
placeholder={placeholder}
|
|
217
|
+
editable={editable}
|
|
218
|
+
style={inputStyle}
|
|
219
|
+
containerStyle={inputContainerStyle}
|
|
220
|
+
formContainerStyle={inputFormContainerStyle}
|
|
221
|
+
/>
|
|
222
|
+
<UIActionSheet
|
|
223
|
+
visible={visible}
|
|
224
|
+
onRequestClose={onClose}
|
|
225
|
+
title={title}
|
|
226
|
+
style={sheetStyle}
|
|
227
|
+
estimatedHeight={520}
|
|
228
|
+
>
|
|
229
|
+
<UIStack flex={1}>
|
|
230
|
+
<UIForm schema={schema} form={form} style={styles.form}>
|
|
231
|
+
<UIStack horizontal center>
|
|
232
|
+
<UIFormTextInput
|
|
233
|
+
name="search"
|
|
234
|
+
placeholder={searchPlaceholder}
|
|
235
|
+
variant={searchVariant}
|
|
236
|
+
onChangeText={(text) => onSearchDebounced(text)}
|
|
237
|
+
endIcon={<UIInputIcon position="end" name="search" size={24} />}
|
|
238
|
+
/>
|
|
239
|
+
{action}
|
|
240
|
+
</UIStack>
|
|
241
|
+
{!Boolean(filteredData.length) && Boolean(watch('search')) && (
|
|
242
|
+
<UIStack size="md" style={styles.emptySearch}>
|
|
243
|
+
<UIText align="center" weight="500">
|
|
244
|
+
{searchEmptyMessage}
|
|
245
|
+
</UIText>
|
|
246
|
+
{onCreate && (
|
|
247
|
+
<UIFormButton
|
|
248
|
+
loading={isCreating}
|
|
249
|
+
variant={createVariant}
|
|
250
|
+
onSubmit={onSubmit}
|
|
251
|
+
getErrorMessage={getErrorMessage}
|
|
252
|
+
>
|
|
253
|
+
<UIStack style={styles.create} horizontal center>
|
|
254
|
+
<UIText color="neutral-light-00">{createMessage}</UIText>
|
|
255
|
+
<UIIcon
|
|
256
|
+
name="add"
|
|
257
|
+
size={24}
|
|
258
|
+
color={theme.color.neutral.light['00']}
|
|
259
|
+
/>
|
|
260
|
+
</UIStack>
|
|
261
|
+
</UIFormButton>
|
|
262
|
+
)}
|
|
263
|
+
</UIStack>
|
|
264
|
+
)}
|
|
265
|
+
</UIForm>
|
|
266
|
+
<UIDataList
|
|
267
|
+
data={filteredData}
|
|
268
|
+
loading={loading}
|
|
269
|
+
onRefresh={onRefresh}
|
|
270
|
+
refreshing={refreshing}
|
|
271
|
+
style={styles.list}
|
|
272
|
+
contentContainerStyle={contentStyle}
|
|
273
|
+
ListFooterComponent={ListFooterComponent}
|
|
274
|
+
onEndReached={onEndReached}
|
|
275
|
+
ListEmptyComponent={() => {
|
|
276
|
+
const search = getValues('search');
|
|
277
|
+
if (search) return null;
|
|
278
|
+
return (
|
|
279
|
+
<UIText align="center" weight="500" style={styles.emptySearch}>
|
|
280
|
+
{emptyMessage}
|
|
281
|
+
</UIText>
|
|
282
|
+
);
|
|
283
|
+
}}
|
|
284
|
+
renderItem={({ item }) => {
|
|
285
|
+
const current = watchContext(name) as T;
|
|
286
|
+
const isSelected =
|
|
287
|
+
current && Boolean(getItemKey(current) === getItemKey(item));
|
|
288
|
+
const label = String(getItemLabel(item));
|
|
289
|
+
return (
|
|
290
|
+
<UIRadioInput
|
|
291
|
+
selected={isSelected}
|
|
292
|
+
label={label}
|
|
293
|
+
onPress={() => onSelect(item)}
|
|
294
|
+
/>
|
|
295
|
+
);
|
|
296
|
+
}}
|
|
297
|
+
/>
|
|
298
|
+
</UIStack>
|
|
299
|
+
</UIActionSheet>
|
|
300
|
+
</>
|
|
301
|
+
);
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
const styles = StyleSheet.create({
|
|
305
|
+
list: { height: 350 },
|
|
306
|
+
emptySearch: {
|
|
307
|
+
marginTop: 24,
|
|
308
|
+
},
|
|
309
|
+
form: {
|
|
310
|
+
flex: 1,
|
|
311
|
+
marginHorizontal: 16,
|
|
312
|
+
},
|
|
313
|
+
create: {
|
|
314
|
+
alignSelf: 'center',
|
|
315
|
+
},
|
|
316
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UITextInput } from '../molecules';
|
|
3
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
4
|
+
import { theme } from '../../../theme';
|
|
5
|
+
import { UIIcon, UIText, UIStack } from '../atoms';
|
|
6
|
+
import { StyleSheet, type TextInput } from 'react-native';
|
|
7
|
+
|
|
8
|
+
type Props = React.ComponentProps<typeof UITextInput> & {
|
|
9
|
+
name: string;
|
|
10
|
+
formContainerStyle?: React.ComponentProps<typeof UIStack>['style'];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const UIFormTextInput = React.forwardRef<TextInput, Props>(
|
|
14
|
+
(
|
|
15
|
+
{
|
|
16
|
+
name,
|
|
17
|
+
containerStyle,
|
|
18
|
+
onChangeText,
|
|
19
|
+
editable,
|
|
20
|
+
formContainerStyle,
|
|
21
|
+
...props
|
|
22
|
+
},
|
|
23
|
+
ref
|
|
24
|
+
) => {
|
|
25
|
+
const {
|
|
26
|
+
control,
|
|
27
|
+
formState: { errors, isSubmitting },
|
|
28
|
+
} = useFormContext();
|
|
29
|
+
const { field } = useController({ name, control });
|
|
30
|
+
|
|
31
|
+
const hasError = Boolean(errors[name]);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<UIStack style={[styles.container, formContainerStyle]}>
|
|
35
|
+
<UITextInput
|
|
36
|
+
ref={ref}
|
|
37
|
+
value={field.value}
|
|
38
|
+
editable={isSubmitting || editable}
|
|
39
|
+
onChangeText={(text) => {
|
|
40
|
+
field.onChange(text);
|
|
41
|
+
onChangeText?.(text);
|
|
42
|
+
}}
|
|
43
|
+
containerStyle={[
|
|
44
|
+
hasError && { borderColor: theme.color.feedback.red['500'] },
|
|
45
|
+
containerStyle,
|
|
46
|
+
]}
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
{hasError && (
|
|
50
|
+
<UIStack horizontal center>
|
|
51
|
+
<UIText color="feedback-red-500">
|
|
52
|
+
{errors[name]?.message?.toString()}
|
|
53
|
+
</UIText>
|
|
54
|
+
<UIIcon name="warning" color={theme.color.feedback.red['500']} />
|
|
55
|
+
</UIStack>
|
|
56
|
+
)}
|
|
57
|
+
</UIStack>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const styles = StyleSheet.create({ container: { flexGrow: 1 } });
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UITextInputMask } from '../molecules';
|
|
3
|
+
import { useController, useFormContext } from 'react-hook-form';
|
|
4
|
+
import { theme } from '../../../theme';
|
|
5
|
+
import { UIIcon, UIText, UIStack } from '../atoms';
|
|
6
|
+
import { StyleSheet, type TextInput } from 'react-native';
|
|
7
|
+
|
|
8
|
+
type Props = React.ComponentProps<typeof UITextInputMask> & {
|
|
9
|
+
name: string;
|
|
10
|
+
formContainerStyle?: React.ComponentProps<typeof UIStack>['style'];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const UIFormTextInputMask = React.forwardRef<TextInput, Props>(
|
|
14
|
+
(
|
|
15
|
+
{
|
|
16
|
+
name,
|
|
17
|
+
containerStyle,
|
|
18
|
+
onChangeText: onChangeTextProp,
|
|
19
|
+
formContainerStyle,
|
|
20
|
+
mask,
|
|
21
|
+
...props
|
|
22
|
+
},
|
|
23
|
+
ref
|
|
24
|
+
) => {
|
|
25
|
+
const [value, setValue] = React.useState<string>('');
|
|
26
|
+
const {
|
|
27
|
+
control,
|
|
28
|
+
formState: { errors },
|
|
29
|
+
} = useFormContext();
|
|
30
|
+
const { field } = useController({ name, control });
|
|
31
|
+
|
|
32
|
+
const hasError = Boolean(errors[name]);
|
|
33
|
+
|
|
34
|
+
const onChangeText = React.useCallback(
|
|
35
|
+
(formatted: string, extracted: string, obfuscated: string) => {
|
|
36
|
+
field.onChange(extracted);
|
|
37
|
+
setValue(formatted);
|
|
38
|
+
onChangeTextProp?.(formatted, extracted, obfuscated);
|
|
39
|
+
},
|
|
40
|
+
[field, onChangeTextProp]
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
setValue(field.value);
|
|
45
|
+
}, [field.value]);
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<UIStack style={[styles.container, formContainerStyle]}>
|
|
49
|
+
<UITextInputMask
|
|
50
|
+
ref={ref}
|
|
51
|
+
value={value}
|
|
52
|
+
onChangeText={onChangeText}
|
|
53
|
+
mask={mask}
|
|
54
|
+
containerStyle={[
|
|
55
|
+
hasError && {
|
|
56
|
+
borderColor: theme.color.feedback.red['500'],
|
|
57
|
+
},
|
|
58
|
+
containerStyle,
|
|
59
|
+
]}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
{hasError && (
|
|
63
|
+
<UIStack horizontal center>
|
|
64
|
+
<UIText color="feedback-red-500">
|
|
65
|
+
{errors[name]?.message?.toString()}
|
|
66
|
+
</UIText>
|
|
67
|
+
<UIIcon name="warning" color={theme.color.feedback.red['500']} />
|
|
68
|
+
</UIStack>
|
|
69
|
+
)}
|
|
70
|
+
</UIStack>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
container: {
|
|
77
|
+
flexGrow: 1,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UIIcon, UIText, UIStack } from '../atoms';
|
|
4
|
+
import type { IconName } from '../atoms';
|
|
5
|
+
import { UIButton } from '../molecules';
|
|
6
|
+
import { theme } from '../../../theme';
|
|
7
|
+
|
|
8
|
+
type Props = React.ComponentProps<typeof UIButton> & {
|
|
9
|
+
icon?: IconName;
|
|
10
|
+
label: string;
|
|
11
|
+
value?: React.ReactNode;
|
|
12
|
+
pressable?: boolean;
|
|
13
|
+
contentStyle?: React.ComponentProps<typeof UIStack>['style'];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const UIRow = ({
|
|
17
|
+
label,
|
|
18
|
+
icon,
|
|
19
|
+
value,
|
|
20
|
+
pressable,
|
|
21
|
+
disabled,
|
|
22
|
+
style,
|
|
23
|
+
contentStyle,
|
|
24
|
+
...props
|
|
25
|
+
}: Props) => {
|
|
26
|
+
if (typeof value === 'string' || typeof value === 'number')
|
|
27
|
+
value = <UIText>{value}</UIText>;
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<UIButton
|
|
31
|
+
disabled={!pressable || disabled}
|
|
32
|
+
style={[styles.button, style as any]}
|
|
33
|
+
{...props}
|
|
34
|
+
>
|
|
35
|
+
<UIStack horizontal center style={[styles.container, contentStyle]}>
|
|
36
|
+
<UIStack size="lg" horizontal center>
|
|
37
|
+
{icon && (
|
|
38
|
+
<UIIcon
|
|
39
|
+
name={icon}
|
|
40
|
+
size={24}
|
|
41
|
+
color={theme.color.neutral.mid['60']}
|
|
42
|
+
/>
|
|
43
|
+
)}
|
|
44
|
+
<UIText>{label}</UIText>
|
|
45
|
+
</UIStack>
|
|
46
|
+
{value}
|
|
47
|
+
</UIStack>
|
|
48
|
+
</UIButton>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
container: {
|
|
54
|
+
justifyContent: 'space-between',
|
|
55
|
+
paddingHorizontal: 24,
|
|
56
|
+
paddingVertical: 20,
|
|
57
|
+
},
|
|
58
|
+
button: {
|
|
59
|
+
padding: 0,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { UIInputIcon, UITextInput } from '../molecules';
|
|
3
|
+
import { theme } from '../../../theme';
|
|
4
|
+
import type React from 'react';
|
|
5
|
+
|
|
6
|
+
type Props = React.ComponentProps<typeof UITextInput>;
|
|
7
|
+
|
|
8
|
+
export const UISearchInput = ({
|
|
9
|
+
placeholder,
|
|
10
|
+
startIcon,
|
|
11
|
+
containerStyle,
|
|
12
|
+
...props
|
|
13
|
+
}: Props) => {
|
|
14
|
+
return (
|
|
15
|
+
<UITextInput
|
|
16
|
+
variant="outlined"
|
|
17
|
+
placeholder={placeholder ?? 'Insira o termo da busca...'}
|
|
18
|
+
startIcon={
|
|
19
|
+
startIcon ?? (
|
|
20
|
+
<UIInputIcon
|
|
21
|
+
name="search"
|
|
22
|
+
size={20}
|
|
23
|
+
position="start"
|
|
24
|
+
color={theme.color.brand.violet['500']}
|
|
25
|
+
/>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
containerStyle={[styles.container, containerStyle]}
|
|
29
|
+
{...props}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const styles = StyleSheet.create({
|
|
35
|
+
container: {
|
|
36
|
+
backgroundColor: theme.color.neutral.light['20'],
|
|
37
|
+
borderColor: theme.color.neutral.light['20'],
|
|
38
|
+
borderRadius: 28,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { UIButton, UIChip, UIList } from '../molecules';
|
|
3
|
+
import { UIIcon, UISeparator, UISpacer, UIStack, UIText } from '../atoms';
|
|
4
|
+
import { theme } from '../../../theme';
|
|
5
|
+
|
|
6
|
+
type PropsToOmit = 'renderItem' | 'ItemSeparatorComponent';
|
|
7
|
+
|
|
8
|
+
type Props<T> = Omit<React.ComponentProps<typeof UIList<T>>, PropsToOmit> & {
|
|
9
|
+
data: T[];
|
|
10
|
+
getItemLabel: (item: T) => string;
|
|
11
|
+
getItemKey: (item: T) => string;
|
|
12
|
+
selected: T;
|
|
13
|
+
onSelect: (item: T) => void;
|
|
14
|
+
onReset: () => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const UISelectChip = <T,>({
|
|
18
|
+
data,
|
|
19
|
+
getItemLabel,
|
|
20
|
+
getItemKey,
|
|
21
|
+
selected,
|
|
22
|
+
onSelect,
|
|
23
|
+
onReset,
|
|
24
|
+
...props
|
|
25
|
+
}: Props<T>) => {
|
|
26
|
+
return (
|
|
27
|
+
<UIList
|
|
28
|
+
horizontal
|
|
29
|
+
data={data}
|
|
30
|
+
renderItem={({ item }) => {
|
|
31
|
+
const isSelected = getItemKey(selected) === getItemKey(item);
|
|
32
|
+
return (
|
|
33
|
+
<UIButton onPress={() => onSelect(item)} style={styles.button}>
|
|
34
|
+
<UIChip
|
|
35
|
+
content={
|
|
36
|
+
<UIStack horizontal center>
|
|
37
|
+
{isSelected && (
|
|
38
|
+
<UIIcon
|
|
39
|
+
name="check-alt"
|
|
40
|
+
color={theme.color.neutral.light['00']}
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
<UIText
|
|
44
|
+
weight="500"
|
|
45
|
+
color={isSelected ? 'neutral-light-00' : 'neutral-mid-60'}
|
|
46
|
+
>
|
|
47
|
+
{getItemLabel(item)}
|
|
48
|
+
</UIText>
|
|
49
|
+
</UIStack>
|
|
50
|
+
}
|
|
51
|
+
color={isSelected ? 'brand-violet-500' : 'neutral-light-05'}
|
|
52
|
+
borderColor={isSelected ? 'brand-violet-500' : 'neutral-light-50'}
|
|
53
|
+
style={styles.chip}
|
|
54
|
+
/>
|
|
55
|
+
</UIButton>
|
|
56
|
+
);
|
|
57
|
+
}}
|
|
58
|
+
ItemSeparatorComponent={() => <UISpacer horizontal />}
|
|
59
|
+
ListHeaderComponent={() => (
|
|
60
|
+
<UIStack horizontal center size="md" style={styles.header}>
|
|
61
|
+
<UIButton onPress={() => onReset()} style={styles.button}>
|
|
62
|
+
<UIChip
|
|
63
|
+
content={
|
|
64
|
+
<UIStack horizontal center>
|
|
65
|
+
{!selected && (
|
|
66
|
+
<UIIcon
|
|
67
|
+
name="check-alt"
|
|
68
|
+
color={theme.color.neutral.light['00']}
|
|
69
|
+
/>
|
|
70
|
+
)}
|
|
71
|
+
<UIText
|
|
72
|
+
weight="500"
|
|
73
|
+
color={!selected ? 'neutral-light-00' : 'neutral-mid-60'}
|
|
74
|
+
>
|
|
75
|
+
Todos
|
|
76
|
+
</UIText>
|
|
77
|
+
</UIStack>
|
|
78
|
+
}
|
|
79
|
+
color={!selected ? 'brand-violet-500' : 'neutral-light-05'}
|
|
80
|
+
borderColor={!selected ? 'brand-violet-500' : 'neutral-light-50'}
|
|
81
|
+
style={styles.chip}
|
|
82
|
+
/>
|
|
83
|
+
</UIButton>
|
|
84
|
+
<UISeparator horizontal={false} />
|
|
85
|
+
</UIStack>
|
|
86
|
+
)}
|
|
87
|
+
{...props}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const styles = StyleSheet.create({
|
|
93
|
+
chip: {
|
|
94
|
+
paddingTop: 6,
|
|
95
|
+
paddingBottom: 6,
|
|
96
|
+
paddingHorizontal: 16,
|
|
97
|
+
},
|
|
98
|
+
header: {
|
|
99
|
+
marginRight: 8,
|
|
100
|
+
},
|
|
101
|
+
button: {
|
|
102
|
+
padding: 0,
|
|
103
|
+
},
|
|
104
|
+
});
|