Updated with develop branch along with VcItemContent.tsx, VcItemActivation.tsx

This commit is contained in:
anil_majji
2023-06-23 13:55:32 +05:30
200 changed files with 5591 additions and 6616 deletions

5
.env
View File

@@ -1,10 +1,11 @@
# after making changes to the env file, ensure to start the bundler (or the project) with a --reset-cache
# eg . npm build android:newlogic --reset-cache
MIMOTO_HOST=https://api.qa-1201-b2.mosip.net
MIMOTO_HOST=https://api.qatriple.mosip.net
#MIMOTO_HOST=http://mock.mimoto.newlogic.dev
GOOGLE_NEARBY_MESSAGES_API_KEY=
#Application Theme can be ( orange | purple )
APPLICATION_THEME=orange
USE_BLE_SHARE=true
#environment can be changed if it is toggled
CREDENTIAL_REGISTRY_EDIT=true

View File

@@ -1,4 +1,7 @@
name: ID PASS - MOSIP Resident Application
name: PR - android build verification
env:
backendServiceDefaultUrl: https://api.sandbox.mosip.net
on:
push:
@@ -10,6 +13,13 @@ on:
- 0.9
tags:
- '*'
pull_request:
types: [ opened, synchronize ]
branches:
- develop
- 'release-**'
tags:
- '*'
jobs:
build-android:
@@ -19,8 +29,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
# Cache stuff for faster build
- name: Cache local npm repository
uses: actions/cache@v3.0.11
with:
@@ -34,7 +43,7 @@ jobs:
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Install npm dependencies
run: |
npm ci
@@ -43,33 +52,65 @@ jobs:
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
- name: Setup branch and env
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Setup branch and GPG public key
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Build App Newlogic Release
- name: Setup Firebase
run: |
cd android
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
./gradlew :app:assembleNewlogicRelease
env:
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
- name: Generate keystore
run: |
keytool \
-genkey -v \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-storepass $DEBUG_KEYSTORE_PASSWORD \
-keypass $DEBUG_KEYSTORE_PASSWORD \
-alias androiddebugkey \
-keystore android/app/debug.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
env:
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.1
- name: Export variables for keystore
run: |
cd android/app
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
export DEBUG_KEYSTORE_PASSWORD=$DEBUG_KEYSTORE_PASSWORD
env:
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
- name: Bump version code
uses: chkfung/android-version-actions@v1.2.1
with:
name: output
path: android/app/build/outputs/apk/newlogic/release/
retention-days: 1
gradlePath: android/app/build.gradle
versionCode: ${{github.run_number}}
- name: Run Build using Fastlane
run: |
cd android
yes | sudo gem install bundler
yes | sudo fastlane install_plugins
bundle exec fastlane android_build_verify
env:
DEBUG_KEYSTORE_ALIAS: androiddebugkey
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'

View File

@@ -1,7 +1,7 @@
name: ID PASS - MOSIP Resident Application Custom build
name: Android Custom Build
env:
backendServiceDefaultUrl: https://api.qa-121.mosip.net
backendServiceDefaultUrl: https://api.sandbox.mosip.net
on:
workflow_dispatch:
@@ -9,7 +9,7 @@ on:
backendServiceUrl:
description: 'Backend service URL'
required: true
default: 'https://api.qa-121.mosip.net'
default: 'https://api.sandbox.mosip.net'
type: string
theme:
description: 'Application Theme'
@@ -19,6 +19,14 @@ on:
options:
- orange
- purple
registry_edit:
description: 'Edit Registry'
required: true
default: 'true'
type: choice
options:
- false
- true
jobs:
build-android:
@@ -28,8 +36,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
# Cache stuff for faster build
- name: Cache local npm repository
uses: actions/cache@v3.0.11
with:
@@ -46,21 +53,70 @@ jobs:
- name: Install npm dependencies
run: |
npm install
npm ci
- name: Create .env.local file
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
- name: Build App Newlogic Release
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Setup Firebase
run: |
cd android
if [ ! -z "$FIREBASE_SECRET" ] && [ -f app/google-services.json.gpg ];then rm -f app/google-services.json;gpg2 --quiet --batch --passphrase=$FIREBASE_SECRET --pinentry-mode loopback --decrypt --output app/google-services.json app/mosip-google-services.json.gpg;fi
./gradlew :app:assembleNewlogicRelease
env:
FIREBASE_SECRET: ${{ secrets.GPG_SECRET }}
- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
base64 -d -i release.keystore.b64 > android/app/release.keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
- name: Export variables for keystore
run: |
cd android/app
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=$RELEASE_KEYSTORE_PASSWORD
env:
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
- name: Bump version code
uses: chkfung/android-version-actions@v1.2.1
with:
gradlePath: android/app/build.gradle
versionCode: ${{github.run_number}}
- name: Run Build
run: |
cd android/scripts
./run-fastlane.sh
env:
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }}
- name: Upload Artifact
APPLICATION_THEME: ${{ github.event.inputs.theme }}
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
- name: Upload Artifact to Actions
uses: actions/upload-artifact@v3.1.1
with:
name: apk-output
path: android/app/build/outputs/apk/newlogic/release/
retention-days: 5
name: Inji
path: android/app/build/outputs/apk/mosip/release/
retention-days: 10

59
.github/workflows/ios-build-verify.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: PR - IOS build verification
on:
push:
branches:
- main
- develop
- demobranch
- qa-develop
- 0.9
tags:
- '*'
pull_request:
types: [ opened, synchronize ]
branches:
- develop
- 'release-**'
tags:
- '*'
jobs:
build_ios:
name: Building the IPA
runs-on: macos-13
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install npm dependencies
run: |
npm install
- name: Install Pod
run: |
cd ios
pod install
- name: Building the IPA
run: |
cd ios
fastlane build_verify
env:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.IOS_INJI_DEVELOPER_APP_ID }}'
INJI_IOS_DEVELOPER_APP_IDENTIFIER: '${{ secrets.INJI_IOS_DEVELOPER_APP_IDENTIFIER }}'
INJI_IOS_DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.INJI_IOS_DEVELOPER_PORTAL_TEAM_ID }}'
INJI_IOS_FASTLANE_APPLE_ID: '${{ secrets.INJI_IOS_FASTLANE_APPLE_ID }}'
INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
INJI_IOS_PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.INJI_IOS_PROVISIONING_PROFILE_SPECIFIER }}'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'

88
.github/workflows/ios-build.yml vendored Normal file
View File

@@ -0,0 +1,88 @@
name: Inji iOS build
on:
workflow_dispatch:
inputs:
backendServiceUrl:
description: 'Backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
registry_edit:
description: 'Edit Registry'
required: true
default: 'true'
type: choice
options:
- false
- true
internal-testers:
description: 'Internal Testers Group'
required: true
default: 'QA-Triple'
type: choice
options:
- Dev-testing
- MEC
- QA
- MOSIP-Collab
- MOSIP-Dev-testing
buildDescription:
description: 'What to test'
required: true
default: 'QA-Triple environment build'
type: string
jobs:
build_ios:
name: Deploying to Testflight
runs-on: macos-13
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install npm dependencies
run: |
npm install
- name: Install Pod
run: |
cd ios
pod install
- name: Deploy iOS Beta to TestFlight
run: |
cd ios
fastlane beta
env:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.IOS_INJI_DEVELOPER_APP_ID }}'
INJI_IOS_DEVELOPER_APP_IDENTIFIER: '${{ secrets.INJI_IOS_DEVELOPER_APP_IDENTIFIER }}'
INJI_IOS_DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.INJI_IOS_DEVELOPER_PORTAL_TEAM_ID }}'
INJI_IOS_FASTLANE_APPLE_ID: '${{ secrets.INJI_IOS_FASTLANE_APPLE_ID }}'
INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
INJI_IOS_PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.INJI_IOS_PROVISIONING_PROFILE_SPECIFIER }}'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
APPLICATION_THEME: ${{ github.event.inputs.theme }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
MIMOTO_HOST: ${{ github.event.inputs.backendServiceUrl }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ github.event.inputs.internal-testers }}
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ github.event.inputs.buildDescription }}

2
.gitignore vendored
View File

@@ -60,8 +60,6 @@ yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# Bundle artifacts
*.jsbundle

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MOSIP Resident App</name>
<name>Inji</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>

6
android/Gemfile Normal file
View File

@@ -0,0 +1,6 @@
source "https://rubygems.org"
gem "fastlane"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)

220
android/Gemfile.lock Normal file
View File

@@ -0,0 +1,220 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.765.0)
aws-sdk-core (3.172.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.64.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.122.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.99.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.212.2)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-increment_version_code (0.4.3)
fastlane-plugin-increment_version_name (0.0.10)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.42.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.44.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.5.2)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.6.3)
jwt (2.7.0)
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.2)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.1.1)
os (1.1.4)
plist (3.7.0)
public_suffix (5.0.1)
rake (13.0.6)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
arm64-darwin-21
DEPENDENCIES
fastlane
BUNDLED WITH
2.4.10

View File

@@ -1,4 +1,4 @@
plugins {
plugins {
id 'com.gladed.androidgitversion' version '0.4.14'
}
@@ -133,6 +133,7 @@ def enableHermes = project.ext.react.get("enableHermes", false);
androidGitVersion {
baseCode 1
format '% tag %%commit_%%branch%'
}
android {
@@ -154,11 +155,8 @@ android {
applicationId 'io.mosip.residentapp'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
// Update versionName and/or versionCode via git tag <XX.xx.xx>
// More info here:
// https://github.com/gladed/gradle-android-git-version#3-use-a-git-tag-to-specify-your-version-number-see-semantic-versioning
versionName androidGitVersion.name()
versionCode androidGitVersion.code()
versionCode 1
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
@@ -178,9 +176,9 @@ android {
}
signingConfigs {
release {
def keystore = System.getenv("RELEASE_KEYSTORE") ?: "debug.keystore"
def keystoreAlias = System.getenv("RELEASE_KEYSTORE_ALIAS") ?: "androiddebugkey"
def keystorePass = System.getenv("RELEASE_KEYSTORE_PASSWORD") ?: "android"
def keystore = file('release.keystore')
def keystoreAlias = System.getenv("RELEASE_KEYSTORE_ALIAS")
def keystorePass = System.getenv("RELEASE_KEYSTORE_PASSWORD")
storeFile file("$keystore")
storePassword "$keystorePass"
keyAlias "$keystoreAlias"
@@ -189,9 +187,9 @@ android {
v1SigningEnabled false
}
debug {
def keystore = System.getenv("DEBUG_KEYSTORE") ?: "debug.keystore"
def keystoreAlias = System.getenv("DEBUG_KEYSTORE_ALIAS") ?: "androiddebugkey"
def keystorePass = System.getenv("DEBUG_KEYSTORE_PASSWORD") ?: "android"
def keystore = file('debug.keystore')
def keystoreAlias = System.getenv("DEBUG_KEYSTORE_ALIAS")
def keystorePass = System.getenv("DEBUG_KEYSTORE_PASSWORD")
storeFile file("$keystore")
storePassword "$keystorePass"
keyAlias "$keystoreAlias"
@@ -321,4 +319,4 @@ try {
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
}

Binary file not shown.

View File

@@ -2,6 +2,15 @@
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30"/>
<!-- from Android 12, Location permission isn't required as we aren't using it to determine location -->
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
</manifest>

View File

@@ -1,10 +1,15 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.mosip.residentapp">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30"/>
<!-- from Android 12, Location permission isn't required as we aren't using it to determine location -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
@@ -31,7 +36,8 @@
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0" />
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@nlpaolo/mosip-resident-app" />
<meta-data android:name="com.google.android.nearby.messages.API_KEY" android:value="${GOOGLE_NEARBY_MESSAGES_API_KEY}" />
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustPan" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="portrait">
<activity android:name=".MainActivity" android:exported="true" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustPan" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -45,4 +51,4 @@
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
</manifest>

View File

@@ -29,9 +29,7 @@ public class MainActivity extends ReactActivity {
Manifest.permission.BLUETOOTH_ADMIN,
Manifest.permission.ACCESS_WIFI_STATE,
Manifest.permission.CHANGE_WIFI_STATE,
Manifest.permission.CHANGE_WIFI_MULTICAST_STATE,
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.CHANGE_WIFI_MULTICAST_STATE
};
private static final int REQUEST_CODE_REQUIRED_PERMISSIONS = 1;

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources>
<string name="app_name">MOSIP Resident App</string>
<string name="app_name">Inji</string>
<string name="app_name_mosip">MOSIP Resident App - Mosip/Inji</string>
<string name="app_name_newlogic">MOSIP Resident App - Newlogic</string>
<string name="app_name_ph">MOSIP Resident App - PH</string>

View File

@@ -4,8 +4,8 @@ buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 23
compileSdkVersion = 30
targetSdkVersion = 30
compileSdkVersion = 31
targetSdkVersion = 31
}
repositories {
google()

2
android/fastlane/Appfile Normal file
View File

@@ -0,0 +1,2 @@
json_key_file("")
package_name("io.mosip.residentapp")

15
android/fastlane/Fastfile Normal file
View File

@@ -0,0 +1,15 @@
default_platform(:android)
desc "Verify Build for Android"
lane :android_build_verify do
gradle(
task: "assembleMosipDebug",
)
end
desc "Build for Android"
lane :android_build do
gradle(
task: "assembleMosipRelease",
)
end

View File

@@ -0,0 +1,37 @@
## fastlane documentation
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```sh
xcode-select --install
```
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
# Available Actions
### test_android_build
```sh
[bundle exec] fastlane test_android_build
```
Verify Build for Android
### build_android
```sh
[bundle exec] fastlane build_android
```
Build Android and increase version code
---
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

View File

@@ -0,0 +1,7 @@
cd ..
yes | sudo gem install bundler
yes | sudo fastlane install_plugins
bundle exec fastlane android_build

View File

@@ -1,4 +1,4 @@
rootProject.name = 'MOSIP Resident App'
rootProject.name = 'Inji'
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle");
useExpoModules()

View File

@@ -1,6 +1,6 @@
export default {
name: 'MOSIP Resident App',
slug: 'mosip-resident-app',
name: 'Inji',
slug: 'inji',
version: '1.0.0',
orientation: 'portrait',
icon: './assets/icon.png',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -2,7 +2,7 @@ import React from 'react';
import { formatDistanceToNow } from 'date-fns';
import { useTranslation } from 'react-i18next';
import * as DateFnsLocale from '../lib/date-fns/locale';
import * as DateFnsLocale from 'date-fns/locale';
import { ActivityLog } from '../machines/activityLog';
import { TextItem } from './ui/TextItem';
@@ -27,6 +27,6 @@ function getActionLabel(activity: ActivityLog, language: string) {
locale: DateFnsLocale[language],
}),
]
.filter((label) => label.trim() !== '')
.filter((label) => label?.trim() !== '')
.join(' · ');
}

View File

@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Dimensions, I18nManager } from 'react-native';
import { Icon, ListItem, Overlay, Input } from 'react-native-elements';
import { Text, Column, Row, Button } from './ui';
@@ -9,6 +9,13 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
const { t } = useTranslation('common');
const [isEditing, setIsEditing] = useState(false);
const [newValue, setNewValue] = useState(props.value);
const [overlayOpened, setOverlayOpened] = useState(true);
useEffect(() => {
if (props.credentialRegistryResponse === 'success') {
closePopup();
}
}, [props.credentialRegistryResponse]);
return (
<ListItem bottomDivider topDivider onPress={() => setIsEditing(true)}>
@@ -25,6 +32,7 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
{props.label}
</Text>
</ListItem.Title>
<Text color={Theme.Colors.profileValue}>{props.value}</Text>
</ListItem.Content>
<Icon
name="chevron-right"
@@ -46,6 +54,14 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
textAlign: I18nManager.isRTL ? 'right' : 'left',
}}
/>
{props.credentialRegistryResponse === 'error' && (
<Text style={Theme.Styles.warningText}>
please try again after sometime...
</Text>
)}
{props.credentialRegistryResponse === 'success' &&
overlayOpened &&
closePopup()}
<Row>
<Button fill type="clear" title={t('cancel')} onPress={dismiss} />
<Button fill title={t('save')} onPress={edit} />
@@ -57,12 +73,20 @@ export const EditableListItem: React.FC<EditableListItemProps> = (props) => {
function edit() {
props.onEdit(newValue);
setIsEditing(false);
if (props.credentialRegistryResponse === undefined) {
setIsEditing(false);
}
}
function dismiss() {
setNewValue(props.value);
setIsEditing(false);
props.credentialRegistryResponse = '';
}
function closePopup() {
setIsEditing(false);
setOverlayOpened(false);
}
};
@@ -73,4 +97,5 @@ interface EditableListItemProps {
IconType?: string;
onEdit: (newValue: string) => void;
display?: 'none' | 'flex';
credentialRegistryResponse: string;
}

View File

@@ -65,6 +65,31 @@ export const MessageOverlay: React.FC<MessageOverlayProps> = (props) => {
);
};
export const ErrorMessageOverlay: React.FC<ErrorMessageOverlayProps> = ({
isVisible,
error,
onDismiss,
translationPath,
}) => {
const { t } = useTranslation(translationPath);
return (
<MessageOverlay
isVisible={isVisible}
title={t(error + '.title')}
message={t(error + '.message')}
onBackdropPress={onDismiss}
/>
);
};
export interface ErrorMessageOverlayProps {
isVisible: boolean;
error?: string;
onDismiss?: () => void;
translationPath: string;
}
const Progress: React.FC<Pick<MessageOverlayProps, 'progress'>> = (props) => {
return typeof props.progress === 'boolean' ? (
props.progress && (

View File

@@ -1,6 +1,6 @@
import { formatDistanceToNow } from 'date-fns';
import React from 'react';
import * as DateFnsLocale from '../lib/date-fns/locale';
import * as DateFnsLocale from 'date-fns/locale';
import { useTranslation } from 'react-i18next';
import { Image, ImageBackground, View } from 'react-native';
import { Icon } from 'react-native-elements';
@@ -11,6 +11,7 @@ import { TextItem } from './ui/TextItem';
import { VcItemTags } from './VcItemTags';
import VerifiedIcon from './VerifiedIcon';
import { getLocalizedField } from '../i18n';
import { CREDENTIAL_REGISTRY_EDIT } from 'react-native-dotenv';
import { QrCodeOverlay } from './QrCodeOverlay';
export const VcDetails: React.FC<VcDetailsProps> = (props) => {
@@ -246,6 +247,22 @@ export const VcDetails: React.FC<VcDetailsProps> = (props) => {
</Text>
</Row>
</Column>
{CREDENTIAL_REGISTRY_EDIT === 'true' && (
<Column fill style={Theme.Styles.labelPart}>
<Text
weight="bold"
size="smaller"
color={Theme.Colors.DetailsLabel}>
{t('credentialRegistry')}
</Text>
<Text
weight="semibold"
size="smaller"
color={Theme.Colors.Details}>
{props.vc?.credentialRegistry}
</Text>
</Column>
)}
</Column>
<VcItemTags tag={props.vc?.tag} />
</ImageBackground>

View File

@@ -11,10 +11,12 @@ import {
selectContext,
selectTag,
selectEmptyWalletBindingId,
selectStoreError,
selectIsSavingFailedInIdle,
selectKebabPopUp,
VcItemEvents,
} from '../machines/vcItem';
import { Column, Row, Text } from './ui';
import { VcItemEvents } from '../machines/vcItem';
import { ErrorMessageOverlay } from '../components/MessageOverlay';
import { Theme } from './ui/styleUtils';
import { GlobalContext } from '../shared/GlobalContext';
import { useTranslation } from 'react-i18next';
@@ -22,95 +24,12 @@ import { VcItemTags } from './VcItemTags';
import { KebabPopUp } from './KebabPopUp';
import VerifiedIcon from './VerifiedIcon';
import { getLocalizedField } from '../i18n';
const getDetails = (arg1, arg2, verifiableCredential) => {
if (arg1 === 'Status') {
return (
<Column>
<Text
weight="bold"
size="smaller"
color={
!verifiableCredential
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}>
{arg1}
</Text>
<Row>
<Text
numLines={1}
color={Theme.Colors.Details}
weight="bold"
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{!verifiableCredential ? '' : arg2}
</Text>
{!verifiableCredential ? null : <VerifiedIcon />}
</Row>
</Column>
);
} else {
return (
<Column>
<Text
color={
!verifiableCredential
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}
size="smaller"
weight={'bold'}
style={Theme.Styles.vcItemLabelHeader}>
{arg1}
</Text>
<Text
numLines={4}
color={Theme.Colors.Details}
weight="bold"
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{!verifiableCredential ? '' : arg2}
</Text>
</Column>
);
}
};
const WalletVerified: React.FC = () => {
return (
<Icon
name="verified-user"
color={Theme.Colors.VerifiedIcon}
size={28}
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
const WalletUnverified: React.FC = () => {
return (
<Icon
name="shield-alert"
color={Theme.Colors.Icon}
size={28}
type="material-community"
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
import { VcItemContent } from './VcItemContent';
import { VcItemActivationStatus } from './VcItemActivationStatus';
import { Column, Row } from './ui';
export const VcItem: React.FC<VcItemProps> = (props) => {
const { appService } = useContext(GlobalContext);
const { t } = useTranslation('VcDetails');
const machine = useRef(
createVcItemMachine(
appService.getSnapshot().context.serviceRefs,
@@ -124,150 +43,46 @@ export const VcItem: React.FC<VcItemProps> = (props) => {
const emptyWalletBindingId = useSelector(service, selectEmptyWalletBindingId);
const isKebabPopUp = useSelector(service, selectKebabPopUp);
const KEBAB_POPUP = () => service.send(VcItemEvents.KEBAB_POPUP());
const storeError = useSelector(service, selectStoreError);
const isSavingFailedInIdle = useSelector(service, selectIsSavingFailedInIdle);
const DISMISS = () => service.send(VcItemEvents.DISMISS());
//Assigning the UIN and VID from the VC details to display the idtype label
const uin = verifiableCredential?.credentialSubject.UIN;
const vid = verifiableCredential?.credentialSubject.VID;
let storeErrorTranslationPath = 'errors.savingFailed';
//ENOSPC - no space left on a device / drive
const isDiskFullError = storeError?.message?.match('ENOSPC') != null;
if (isDiskFullError) {
storeErrorTranslationPath = 'errors.diskFullError';
}
const generatedOn = useSelector(service, selectGeneratedOn);
const fullName = !verifiableCredential
? ''
: getLocalizedField(verifiableCredential.credentialSubject.fullName);
const isvalid = !verifiableCredential ? '' : t('valid');
const selectableOrCheck = props.selectable ? (
<CheckBox
checked={props.selected}
checkedIcon={<Icon name="radio-button-checked" />}
uncheckedIcon={<Icon name="radio-button-unchecked" />}
onPress={() => props.onPress(service)}
/>
) : null;
const tag = useSelector(service, selectTag);
return (
<Pressable
onPress={() => props.onPress(service)}
disabled={!verifiableCredential}
style={
props.selected
? Theme.Styles.selectedVc
: Theme.Styles.closeCardBgContainer
}>
<ImageBackground
source={!verifiableCredential ? null : Theme.CloseCard}
resizeMode="stretch"
borderRadius={4}
<React.Fragment>
<Pressable
onPress={() => props.onPress(service)}
disabled={!verifiableCredential}
style={
!verifiableCredential
? Theme.Styles.vertloadingContainer
: Theme.Styles.backgroundImageContainer
props.selected
? Theme.Styles.selectedBindedVc
: Theme.Styles.closeCardBgContainer
}>
<Column>
<Row align="space-between">
<Row>
<ImageBackground
source={
!verifiableCredential
? Theme.ProfileIcon
: { uri: context.credential.biometrics.face }
}
style={Theme.Styles.closeCardImage}>
{props.iconName && (
<Icon
name={props.iconName}
type={props.iconType}
color={Theme.Colors.Icon}
style={{ marginLeft: -80 }}
/>
)}
</ImageBackground>
<Column margin="0 0 0 10">
{getDetails(t('fullName'), fullName, verifiableCredential)}
<Column margin="10 0 0 0">
<Text
color={
!verifiableCredential
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}
weight="semibold"
size="smaller"
align="left">
{t('idType')}
</Text>
<Text
weight="regular"
color={Theme.Colors.Details}
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{t('nationalCard')}
</Text>
</Column>
</Column>
</Row>
<Column>{verifiableCredential ? selectableOrCheck : null}</Column>
</Row>
<Row
align="space-between"
margin="5 0 0 0"
style={
!verifiableCredential ? Theme.Styles.loadingContainer : null
}>
<Column>
{uin ? getDetails(t('uin'), uin, verifiableCredential) : null}
{vid ? getDetails(t('vid'), vid, verifiableCredential) : null}
{!verifiableCredential
? getDetails(t('id'), uin || vid, verifiableCredential)
: null}
{getDetails(t('generatedOn'), generatedOn, verifiableCredential)}
</Column>
<Column>
{verifiableCredential
? getDetails(t('status'), isvalid, verifiableCredential)
: null}
</Column>
<Column style={{ display: verifiableCredential ? 'flex' : 'none' }}>
<Image
source={Theme.MosipLogo}
style={Theme.Styles.logo}
resizeMethod="auto"
<VcItemContent
context={context}
verifiableCredential={verifiableCredential}
generatedOn={generatedOn}
tag={tag}
/>
<Row crossAlign="center">
{props.activeTab !== 'receivedVcsTab' &&
props.activeTab != 'sharingVcScreen' && (
<VcItemActivationStatus
verifiableCredential={verifiableCredential}
emptyWalletBindingId={emptyWalletBindingId}
onPress={() => props.onPress(service)}
showOnlyBindedVc={props.showOnlyBindedVc}
/>
</Column>
</Row>
</Column>
<VcItemTags tag={tag} />
</ImageBackground>
<Row
width={Dimensions.get('screen').width * 0.8}
align="space-between"
crossAlign="center">
<Row crossAlign="center" style={{ flex: 1 }}>
{verifiableCredential &&
(emptyWalletBindingId ? <WalletUnverified /> : <WalletVerified />)}
<Text
color={Theme.Colors.Details}
weight="semibold"
size="small"
margin="10 33 10 10"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}
children={
emptyWalletBindingId
? t('offlineAuthDisabledHeader')
: t('profileAuthenticated')
}></Text>
</Row>
{verifiableCredential && (
)}
<Pressable onPress={KEBAB_POPUP}>
<KebabPopUp
vcKey={props.vcKey}
@@ -278,9 +93,15 @@ export const VcItem: React.FC<VcItemProps> = (props) => {
service={service}
/>
</Pressable>
)}
</Row>
</Pressable>
</Row>
</Pressable>
<ErrorMessageOverlay
isVisible={isSavingFailedInIdle}
error={storeErrorTranslationPath}
onDismiss={DISMISS}
translationPath={'VcDetails'}
/>
</React.Fragment>
);
};
@@ -294,4 +115,5 @@ interface VcItemProps {
onShow?: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
iconName?: string;
iconType?: string;
activeTab?: string;
}

View File

@@ -0,0 +1,141 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Dimensions, Pressable } from 'react-native';
import { Icon } from 'react-native-elements';
import { ActorRefFrom } from 'xstate';
import { vcItemMachine } from '../machines/vcItem';
import { VerifiableCredential } from '../types/vc';
import { Row, Text } from './ui';
import { Theme } from './ui/styleUtils';
const WalletUnverifiedIcon: React.FC = () => {
return (
<Icon
name="shield-alert"
color={Theme.Colors.Icon}
size={28}
type="material-community"
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
const WalletVerifiedIcon: React.FC = () => {
return (
<Icon
name="verified-user"
color={Theme.Colors.VerifiedIcon}
size={28}
containerStyle={{ marginStart: 4, bottom: 1 }}
/>
);
};
const WalletUnverifiedActivationDetails: React.FC<
WalletUnVerifiedDetailsProps
> = (props) => {
const { t } = useTranslation('VcDetails');
return (
<Row
width={Dimensions.get('screen').width * 0.8}
align="space-between"
crossAlign="center">
<Row
crossAlign="center"
style={{
flex: 1,
}}>
{props.verifiableCredential && <WalletUnverifiedIcon />}
<Text
color={Theme.Colors.Details}
weight="semibold"
size="small"
margin="10 33 10 10"
style={
!props.verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.statusLabel
}
children={t('offlineAuthDisabledHeader')}></Text>
</Row>
{/* <Pressable>
<Icon
name="dots-three-horizontal"
type="entypo"
color={Theme.Colors.GrayIcon}
/>
</Pressable> */}
</Row>
);
};
const WalletVerifiedActivationDetails: React.FC<WalletVerifiedDetailsProps> = (
props
) => {
const { t } = useTranslation('VcDetails');
return (
<Row
width={Dimensions.get('screen').width * 0.8}
align="space-between"
crossAlign="center">
<Row
crossAlign="center"
style={{
flex: 1,
}}>
<WalletVerifiedIcon />
<Text
color={Theme.Colors.statusLabel}
weight="semibold"
size="smaller"
margin="10 10 10 10"
style={
!props.verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}
children={t('profileAuthenticated')}></Text>
</Row>
</Row>
);
};
export const VcItemActivationStatus: React.FC<VcItemActivationStatusProps> = (
props
) => {
return (
<Row>
{props.emptyWalletBindingId ? (
<WalletUnverifiedActivationDetails
verifiableCredential={props.verifiableCredential}
onPress={props.onPress}
/>
) : (
<WalletVerifiedActivationDetails
verifiableCredential={props.verifiableCredential}
showOnlyBindedVc={props.showOnlyBindedVc}
onPress={props.onPress}
/>
)}
</Row>
);
};
interface VcItemActivationStatusProps {
showOnlyBindedVc: boolean;
onPress: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
verifiableCredential: VerifiableCredential;
emptyWalletBindingId: boolean;
}
interface WalletVerifiedDetailsProps {
showOnlyBindedVc: boolean;
onPress: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
verifiableCredential: VerifiableCredential;
}
interface WalletUnVerifiedDetailsProps {
onPress: (vcRef?: ActorRefFrom<typeof vcItemMachine>) => void;
verifiableCredential: VerifiableCredential;
}

View File

@@ -0,0 +1,190 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Image, ImageBackground, View } from 'react-native';
import { getLocalizedField } from '../i18n';
import { VerifiableCredential } from '../types/vc';
import { RotatingIcon } from './RotatingIcon';
import { VcItemTags } from './VcItemTags';
import VerifiedIcon from './VerifiedIcon';
import { Column, Row, Text } from './ui';
import { Theme } from './ui/styleUtils';
const getDetails = (arg1, arg2, verifiableCredential) => {
if (arg1 === 'Status') {
return (
<Column>
<Text
weight="bold"
size="smaller"
color={
!verifiableCredential
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}>
{arg1}
</Text>
<Row>
<Text
numLines={1}
color={Theme.Colors.Details}
weight="bold"
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{!verifiableCredential ? '' : arg2}
</Text>
{!verifiableCredential ? null : <VerifiedIcon />}
</Row>
</Column>
);
} else {
return (
<Column>
<Text
color={
!verifiableCredential
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}
size="smaller"
weight={'bold'}
style={Theme.Styles.vcItemLabelHeader}>
{arg1}
</Text>
<Text
numLines={4}
color={Theme.Colors.Details}
weight="bold"
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{!verifiableCredential ? '' : arg2}
</Text>
</Column>
);
}
};
export const VcItemContent: React.FC<VcItemContentProps> = ({
context,
verifiableCredential,
generatedOn,
tag,
}) => {
//Assigning the UIN and VID from the VC details to display the idtype label
const uin = verifiableCredential?.credentialSubject.UIN;
const vid = verifiableCredential?.credentialSubject.VID;
const fullName = !verifiableCredential
? ''
: getLocalizedField(verifiableCredential.credentialSubject.fullName);
const { t } = useTranslation('VcDetails');
return (
<ImageBackground
source={!verifiableCredential ? null : Theme.CloseCard}
resizeMode="stretch"
borderRadius={4}
style={
!verifiableCredential
? Theme.Styles.vertloadingContainer
: Theme.Styles.backgroundImageContainer
}>
<Row
style={
!verifiableCredential
? Theme.Styles.loadingCardDetailsHeader
: Theme.Styles.cardDetailsHeader
}>
<Column>
<Text
color={
!verifiableCredential
? Theme.Colors.LoadingDetailsLabel
: Theme.Colors.DetailsLabel
}
weight="bold"
size="smaller">
{t('idType')}
</Text>
<Text
weight="bold"
color={Theme.Colors.Details}
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{t('nationalCard')}
</Text>
</Column>
<View style={Theme.Styles.mosipLogoContainer}>
<Image
source={Theme.MosipLogo}
style={Theme.Styles.logo}
resizeMethod="auto"
/>
</View>
</Row>
<Row
crossAlign="center"
margin="5 0 0 0"
style={
!verifiableCredential
? Theme.Styles.loadingCardDetailsContainer
: Theme.Styles.cardDetailsContainer
}>
<Column
style={
!verifiableCredential
? Theme.Styles.loadingContainer
: Theme.Styles.closeDetails
}>
<Image
source={
!verifiableCredential
? Theme.ProfileIcon
: {
uri: context.credential.biometrics.face,
}
}
style={Theme.Styles.closeCardImage}
/>
<Column
margin="0 0 0 25"
style={{
alignItems: 'flex-start',
}}>
{getDetails(t('fullName'), fullName, verifiableCredential)}
{!verifiableCredential
? getDetails(t('id'), uin || vid, verifiableCredential)
: null}
{uin ? getDetails(t('uin'), uin, verifiableCredential) : null}
{vid ? getDetails(t('vid'), vid, verifiableCredential) : null}
{getDetails(t('generatedOn'), generatedOn, verifiableCredential)}
{getDetails(t('status'), t('valid'), verifiableCredential)}
</Column>
</Column>
{!verifiableCredential && (
<RotatingIcon name="sync" color={Theme.Colors.rotatingIcon} />
)}
</Row>
<VcItemTags tag={tag} />
</ImageBackground>
);
};
interface VcItemContentProps {
context: any;
verifiableCredential: VerifiableCredential;
generatedOn: string;
tag: string;
}

View File

@@ -66,6 +66,12 @@ export const Column = createLayout('column');
export const Centered = createLayout('column', 'center', 'center');
export const HorizontallyCentered = createLayout(
'column',
'flex-start',
'center'
);
interface LayoutProps {
fill?: boolean;
align?: FlexStyle['justifyContent'];

View File

@@ -1,3 +1,3 @@
export { Text } from './Text';
export { Button } from './Button';
export { Row, Column, Centered } from './Layout';
export { Row, Column, Centered, HorizontallyCentered } from './Layout';

View File

@@ -141,6 +141,13 @@ export const DefaultTheme = {
backgroundColor: Colors.Grey6,
borderRadius: 4,
},
loadingCardDetailsContainer: {
flex: 1,
flexDirection: 'row',
backgroundColor: Colors.Grey6,
borderRadius: 4,
},
cardDetailsContainer: {},
bottomTabIconStyle: {
padding: 4,
width: 36,
@@ -274,12 +281,20 @@ export const DefaultTheme = {
justifyContent: 'space-between',
},
logo: {
height: 48,
width: 40,
height: 35,
width: 90,
},
loadingCardDetailsHeader: {
flex: 1,
},
homeCloseCardDetailsHeader: {
flex: 1,
},
cardDetailsHeader: {
flex: 1,
justifyContent: 'space-between',
},
mosipLogoContainer: {},
details: {
width: 290,
marginLeft: 110,
@@ -418,6 +433,10 @@ export const DefaultTheme = {
paddingLeft: 130,
elevation: 2,
},
warningText: {
color: Colors.Red,
fontSize: 18,
},
}),
PinInputStyle: StyleSheet.create({
input: {

View File

@@ -111,11 +111,22 @@ export const PurpleTheme = {
backgroundColor: Colors.Grey6,
borderRadius: 4,
},
loadingCardDetailsContainer: {
flex: 1,
flexDirection: 'row',
backgroundColor: Colors.Grey6,
borderRadius: 4,
padding: 5,
paddingTop: 0,
},
cardDetailsContainer: {
padding: 10,
paddingTop: 0,
},
vertloadingContainer: {
flex: 1,
backgroundColor: Colors.Grey6,
borderRadius: 4,
padding: 5,
},
closeDetailsContainer: {
flex: 1,
@@ -160,11 +171,9 @@ export const PurpleTheme = {
shadowOpacity: 0.4,
shadowRadius: 3,
elevation: 4,
padding: 10,
},
backgroundImageContainer: {
flex: 1,
padding: 10,
},
successTag: {
backgroundColor: Colors.Green,
@@ -184,14 +193,32 @@ export const PurpleTheme = {
openDetailsHeader: {
flex: 1,
justifyContent: 'space-between',
paddingLeft: 10,
paddingTop: 10,
},
logo: {
height: 46,
width: 40,
height: 33,
width: 90,
},
homeCloseCardDetailsHeader: {
loadingCardDetailsHeader: {
flex: 1,
justifyContent: 'space-between',
paddingLeft: 5,
paddingTop: 5,
},
cardDetailsHeader: {
flex: 1,
justifyContent: 'space-between',
paddingLeft: 10,
paddingTop: 10,
},
mosipLogoContainer: {
backgroundColor: 'white',
borderBottomLeftRadius: 50,
borderTopLeftRadius: 50,
padding: 2,
alignItems: 'center',
justifyContent: 'center',
},
closecardMosipLogo: {
alignSelf: 'flex-end',
@@ -203,7 +230,8 @@ export const PurpleTheme = {
},
openDetailsContainer: {
flex: 1,
padding: 10,
padding: 20,
paddingTop: 10,
},
closeCardImage: {
width: 105,
@@ -266,6 +294,10 @@ export const PurpleTheme = {
borderBottomWidth: 1,
marginTop: 10,
},
warningText: {
color: Colors.Red,
fontSize: 18,
},
}),
PinInputStyle: StyleSheet.create({
input: {

3
ios/Gemfile Normal file
View File

@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "fastlane"

218
ios/Gemfile.lock Normal file
View File

@@ -0,0 +1,218 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
rexml
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.765.0)
aws-sdk-core (3.172.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.64.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.122.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
declarative (0.0.20)
digest-crc (0.6.4)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.99.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.212.2)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (~> 2.0.0)
naturally (~> 2.2)
optparse (~> 0.1.1)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (>= 1.4.5, < 2.0.0)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.42.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.0)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.19.0)
google-apis-core (>= 0.9.0, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-storage (1.44.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.19.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.5.2)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.6.3)
jwt (2.7.0)
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.2)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.1.1)
os (1.1.4)
plist (3.7.0)
public_suffix (5.0.1)
rake (13.0.6)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.5)
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.17.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
terminal-notifier (2.0.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
arm64-darwin-22
DEPENDENCIES
fastlane
BUNDLED WITH
2.4.12

View File

@@ -12,28 +12,28 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
510157BBABB44471B56F17BD /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AB20D6FD6E0431BB5A6B1BF /* noop-file.swift */; };
6EC198FEB3D4CE20C451C9C8 /* libPods-MOSIPResidentApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F7F3091673D4A20E778B48BF /* libPods-MOSIPResidentApp.a */; };
6EC198FEB3D4CE20C451C9C8 /* libPods-Inji.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F7F3091673D4A20E778B48BF /* libPods-Inji.a */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* MOSIPResidentApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MOSIPResidentApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = MOSIPResidentApp/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = MOSIPResidentApp/AppDelegate.m; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = MOSIPResidentApp/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = MOSIPResidentApp/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = MOSIPResidentApp/main.m; sourceTree = "<group>"; };
3AB20D6FD6E0431BB5A6B1BF /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "MOSIPResidentApp/noop-file.swift"; sourceTree = "<group>"; };
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = MOSIPResidentApp/SplashScreen.storyboard; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* Inji.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Inji.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Inji/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Inji/AppDelegate.m; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Inji/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Inji/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Inji/main.m; sourceTree = "<group>"; };
3AB20D6FD6E0431BB5A6B1BF /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "Inji/noop-file.swift"; sourceTree = "<group>"; };
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = Inji/SplashScreen.storyboard; sourceTree = "<group>"; };
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
EBEDDC56BF724D17A326B9EC /* MOSIPResidentApp-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "MOSIPResidentApp-Bridging-Header.h"; path = "MOSIPResidentApp/MOSIPResidentApp-Bridging-Header.h"; sourceTree = "<group>"; };
EBEDDC56BF724D17A326B9EC /* Inji-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "Inji-Bridging-Header.h"; path = "Inji/Inji-Bridging-Header.h"; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
F4401A7A527915991104FE89 /* Pods-MOSIPResidentApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MOSIPResidentApp.release.xcconfig"; path = "Target Support Files/Pods-MOSIPResidentApp/Pods-MOSIPResidentApp.release.xcconfig"; sourceTree = "<group>"; };
F7F3091673D4A20E778B48BF /* libPods-MOSIPResidentApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MOSIPResidentApp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F842436D5AA4BFDC9B080787 /* Pods-MOSIPResidentApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MOSIPResidentApp.debug.xcconfig"; path = "Target Support Files/Pods-MOSIPResidentApp/Pods-MOSIPResidentApp.debug.xcconfig"; sourceTree = "<group>"; };
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-MOSIPResidentApp/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
F4401A7A527915991104FE89 /* Pods-Inji.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Inji.release.xcconfig"; path = "Target Support Files/Pods-Inji/Pods-Inji.release.xcconfig"; sourceTree = "<group>"; };
F7F3091673D4A20E778B48BF /* libPods-Inji.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Inji.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F842436D5AA4BFDC9B080787 /* Pods-Inji.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Inji.debug.xcconfig"; path = "Target Support Files/Pods-Inji/Pods-Inji.debug.xcconfig"; sourceTree = "<group>"; };
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Inji/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -41,14 +41,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6EC198FEB3D4CE20C451C9C8 /* libPods-MOSIPResidentApp.a in Frameworks */,
6EC198FEB3D4CE20C451C9C8 /* libPods-Inji.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
13B07FAE1A68108700A75B9A /* MOSIPResidentApp */ = {
13B07FAE1A68108700A75B9A /* Inji */ = {
isa = PBXGroup;
children = (
BB2F792B24A3F905000567C9 /* Supporting */,
@@ -60,16 +60,16 @@
13B07FB71A68108700A75B9A /* main.m */,
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
3AB20D6FD6E0431BB5A6B1BF /* noop-file.swift */,
EBEDDC56BF724D17A326B9EC /* MOSIPResidentApp-Bridging-Header.h */,
EBEDDC56BF724D17A326B9EC /* Inji-Bridging-Header.h */,
);
name = MOSIPResidentApp;
name = Inji;
sourceTree = "<group>";
};
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
isa = PBXGroup;
children = (
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
F7F3091673D4A20E778B48BF /* libPods-MOSIPResidentApp.a */,
F7F3091673D4A20E778B48BF /* libPods-Inji.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -84,7 +84,7 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
13B07FAE1A68108700A75B9A /* MOSIPResidentApp */,
13B07FAE1A68108700A75B9A /* Inji */,
832341AE1AAA6A7D00B99B32 /* Libraries */,
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
@@ -99,17 +99,17 @@
83CBBA001A601CBA00E9B192 /* Products */ = {
isa = PBXGroup;
children = (
13B07F961A680F5B00A75B9A /* MOSIPResidentApp.app */,
13B07F961A680F5B00A75B9A /* Inji.app */,
);
name = Products;
sourceTree = "<group>";
};
92DBD88DE9BF7D494EA9DA96 /* MOSIPResidentApp */ = {
92DBD88DE9BF7D494EA9DA96 /* Inji */ = {
isa = PBXGroup;
children = (
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */,
);
name = MOSIPResidentApp;
name = Inji;
sourceTree = "<group>";
};
BB2F792B24A3F905000567C9 /* Supporting */ = {
@@ -118,14 +118,14 @@
BB2F792C24A3F905000567C9 /* Expo.plist */,
);
name = Supporting;
path = MOSIPResidentApp/Supporting;
path = Inji/Supporting;
sourceTree = "<group>";
};
D65327D7A22EEC0BE12398D9 /* Pods */ = {
isa = PBXGroup;
children = (
F842436D5AA4BFDC9B080787 /* Pods-MOSIPResidentApp.debug.xcconfig */,
F4401A7A527915991104FE89 /* Pods-MOSIPResidentApp.release.xcconfig */,
F842436D5AA4BFDC9B080787 /* Pods-Inji.debug.xcconfig */,
F4401A7A527915991104FE89 /* Pods-Inji.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -133,7 +133,7 @@
D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */ = {
isa = PBXGroup;
children = (
92DBD88DE9BF7D494EA9DA96 /* MOSIPResidentApp */,
92DBD88DE9BF7D494EA9DA96 /* Inji */,
);
name = ExpoModulesProviders;
sourceTree = "<group>";
@@ -141,9 +141,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
13B07F861A680F5B00A75B9A /* MOSIPResidentApp */ = {
13B07F861A680F5B00A75B9A /* Inji */ = {
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MOSIPResidentApp" */;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Inji" */;
buildPhases = (
5C9927E01935CFEBE538B2C3 /* [CP] Check Pods Manifest.lock */,
FD10A7F022414F080027D42C /* Start Packager */,
@@ -157,9 +157,9 @@
);
dependencies = (
);
name = MOSIPResidentApp;
productName = MOSIPResidentApp;
productReference = 13B07F961A680F5B00A75B9A /* MOSIPResidentApp.app */;
name = Inji;
productName = Inji;
productReference = 13B07F961A680F5B00A75B9A /* Inji.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -171,11 +171,13 @@
LastUpgradeCheck = 1340;
TargetAttributes = {
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = F7JDUR6578;
LastSwiftMigration = 1250;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "MOSIPResidentApp" */;
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Inji" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 0;
@@ -188,7 +190,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
13B07F861A680F5B00A75B9A /* MOSIPResidentApp */,
13B07F861A680F5B00A75B9A /* Inji */,
);
};
/* End PBXProject section */
@@ -236,7 +238,7 @@
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-MOSIPResidentApp-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-Inji-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -255,7 +257,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MOSIPResidentApp/Pods-MOSIPResidentApp-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Inji/Pods-Inji-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FD10A7F022414F080027D42C /* Start Packager */ = {
@@ -296,30 +298,34 @@
/* Begin XCBuildConfiguration section */
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F842436D5AA4BFDC9B080787 /* Pods-MOSIPResidentApp.debug.xcconfig */;
baseConfigurationReference = F842436D5AA4BFDC9B080787 /* Pods-Inji.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MOSIPResidentApp/MOSIPResidentApp.entitlements;
CODE_SIGN_ENTITLEMENTS = Inji/Inji.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = F7JDUR6578;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
"FB_SONARKIT_ENABLED=1",
);
INFOPLIST_FILE = MOSIPResidentApp/Info.plist;
INFOPLIST_FILE = Inji/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Inji;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.4.1;
MARKETING_VERSION = 0.9.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = com.newlogic.inji;
PRODUCT_NAME = MOSIPResidentApp;
SWIFT_OBJC_BRIDGING_HEADER = "MOSIPResidentApp/MOSIPResidentApp-Bridging-Header.h";
PRODUCT_BUNDLE_IDENTIFIER = io.mosip.inji.mobileid;
PRODUCT_NAME = Inji;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Inji/Inji-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
@@ -329,25 +335,32 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F4401A7A527915991104FE89 /* Pods-MOSIPResidentApp.release.xcconfig */;
baseConfigurationReference = F4401A7A527915991104FE89 /* Pods-Inji.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MOSIPResidentApp/MOSIPResidentApp.entitlements;
CODE_SIGN_ENTITLEMENTS = Inji/Inji.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = MOSIPResidentApp/Info.plist;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = LD7H4CQ5P9;
INFOPLIST_FILE = Inji/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Inji;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.4.1;
MARKETING_VERSION = 0.9.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = com.newlogic.inji;
PRODUCT_NAME = MOSIPResidentApp;
SWIFT_OBJC_BRIDGING_HEADER = "MOSIPResidentApp/MOSIPResidentApp-Bridging-Header.h";
PRODUCT_BUNDLE_IDENTIFIER = io.mosip.inji.mobileid;
PRODUCT_NAME = Inji;
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore io.mosip.inji.mobileid";
SWIFT_OBJC_BRIDGING_HEADER = "Inji/Inji-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
@@ -383,7 +396,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = MOSIPResidentApp/MOSIPResidentApp.entitlements;
CODE_SIGN_ENTITLEMENTS = Inji/Inji.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -442,7 +455,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_ENTITLEMENTS = MOSIPResidentApp/MOSIPResidentApp.entitlements;
CODE_SIGN_ENTITLEMENTS = Inji/Inji.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
@@ -469,7 +482,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MOSIPResidentApp" */ = {
13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Inji" */ = {
isa = XCConfigurationList;
buildConfigurations = (
13B07F941A680F5B00A75B9A /* Debug */,
@@ -478,7 +491,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "MOSIPResidentApp" */ = {
83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Inji" */ = {
isa = XCConfigurationList;
buildConfigurations = (
83CBBA201A601CBA00E9B192 /* Debug */,

View File

@@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "MOSIPResidentApp.app"
BlueprintName = "MOSIPResidentApp"
ReferencedContainer = "container:MOSIPResidentApp.xcodeproj">
BuildableName = "Inji.app"
BlueprintName = "Inji"
ReferencedContainer = "container:Inji.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@@ -33,9 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "MOSIPResidentAppTests.xctest"
BlueprintName = "MOSIPResidentAppTests"
ReferencedContainer = "container:MOSIPResidentApp.xcodeproj">
BuildableName = "InjiTests.xctest"
BlueprintName = "InjiTests"
ReferencedContainer = "container:Inji.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
@@ -55,9 +55,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "MOSIPResidentApp.app"
BlueprintName = "MOSIPResidentApp"
ReferencedContainer = "container:MOSIPResidentApp.xcodeproj">
BuildableName = "Inji.app"
BlueprintName = "Inji"
ReferencedContainer = "container:Inji.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
@@ -79,9 +79,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "MOSIPResidentApp.app"
BlueprintName = "MOSIPResidentApp"
ReferencedContainer = "container:MOSIPResidentApp.xcodeproj">
BuildableName = "Inji.app"
BlueprintName = "Inji"
ReferencedContainer = "container:Inji.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>

View File

@@ -2,7 +2,7 @@
<Workspace
version = "1.0">
<FileRef
location = "group:MOSIPResidentApp.xcodeproj">
location = "group:Inji.xcodeproj">
</FileRef>
<FileRef
location = "group:Pods/Pods.xcodeproj">

View File

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

View File

Before

Width:  |  Height:  |  Size: 196 KiB

After

Width:  |  Height:  |  Size: 196 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "splash.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "splash@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "splash@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

Before

Width:  |  Height:  |  Size: 68 B

After

Width:  |  Height:  |  Size: 68 B

View File

@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>MOSIP Resident App</string>
<string>Inji</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
@@ -30,7 +30,9 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<string>5</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
@@ -46,6 +48,10 @@
</dict>
</dict>
</dict>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your location</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Bluetooth is used to allow sharing VCs with another device</string>
<key>NSBluetoothPeripheralUsageDescription</key>

View File

@@ -1,13 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EXPO-VIEWCONTROLLER-1">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EXPO-VIEWCONTROLLER-1">
<device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EXPO-SCENE-1">
<objects>
<viewController storyboardIdentifier="SplashScreenViewController" id="EXPO-VIEWCONTROLLER-1" sceneMemberID="viewController">
@@ -18,22 +20,22 @@
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" insetsLayoutMarginsFromSafeArea="NO" image="SplashScreenBackground" translatesAutoresizingMaskIntoConstraints="NO" id="EXPO-SplashScreenBackground" userLabel="SplashScreenBackground">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
</imageView>
<imageView id="EXPO-SplashScreen" userLabel="SplashScreen" image="SplashScreen" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" clipsSubviews="true" userInteractionEnabled="false" translatesAutoresizingMaskIntoConstraints="false">
<rect key="frame" x="0" y="0" width="414" height="736"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="SplashScreen" translatesAutoresizingMaskIntoConstraints="NO" id="EXPO-SplashScreen" userLabel="SplashScreen">
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
</imageView>
</subviews>
<viewLayoutGuide key="safeArea" id="Rmq-lb-GrQ"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="1gX-mQ-vu6"/>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="6tX-OG-Sck"/>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="ABX-8g-7v4"/>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="jkI-2V-eW5"/>
<constraint firstItem="EXPO-SplashScreen" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="83fcb9b545b870ba44c24f0feeb116490c499c52"/>
<constraint firstItem="EXPO-SplashScreen" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="61d16215e44b98e39d0a2c74fdbfaaa22601b12c"/>
<constraint firstItem="EXPO-SplashScreen" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="f934da460e9ab5acae3ad9987d5b676a108796c1"/>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="6tX-OG-Sck"/>
<constraint firstItem="EXPO-SplashScreen" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="83fcb9b545b870ba44c24f0feeb116490c499c52"/>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="ABX-8g-7v4"/>
<constraint firstItem="EXPO-SplashScreen" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="d6a0be88096b36fb132659aa90203d39139deda9"/>
<constraint firstItem="EXPO-SplashScreen" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="f934da460e9ab5acae3ad9987d5b676a108796c1"/>
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="jkI-2V-eW5"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Rmq-lb-GrQ"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="EXPO-PLACEHOLDER-1" userLabel="First Responder" sceneMemberID="firstResponder"/>
@@ -42,7 +44,10 @@
</scene>
</scenes>
<resources>
<image name="SplashScreen" width="375" height="812"/>
<image name="SplashScreenBackground" width="1" height="1"/>
<image name="SplashScreen" width="414" height="736"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
</document>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,21 +0,0 @@
{
"images": [
{
"idiom": "universal",
"filename": "image.png",
"scale": "1x"
},
{
"idiom": "universal",
"scale": "2x"
},
{
"idiom": "universal",
"scale": "3x"
}
],
"info": {
"version": 1,
"author": "expo"
}
}

View File

@@ -9,7 +9,7 @@ platform :ios, '13.0'
require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
target 'MOSIPResidentApp' do
target 'Inji' do
use_expo_modules!
post_integrate do |installer|
begin

View File

@@ -280,10 +280,6 @@ PODS:
- React-Core
- react-native-netinfo (7.1.3):
- React-Core
- react-native-openid4vp-ble (0.3.11):
- CrcSwift (~> 0.0.3)
- GzipSwift
- React-Core
- react-native-restart (0.0.24):
- React-Core
- react-native-rsa-native (2.0.5):
@@ -292,6 +288,10 @@ PODS:
- React-Core
- react-native-secure-key-store (2.0.10):
- React-Core
- react-native-tuvali (0.4.1):
- CrcSwift (~> 0.0.3)
- GzipSwift
- React-Core
- React-perflogger (0.64.4)
- React-RCTActionSheet (0.64.4):
- React-Core/RCTActionSheetHeaders (= 0.64.4)
@@ -433,11 +433,11 @@ DEPENDENCIES:
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
- react-native-mmkv-storage (from `../node_modules/react-native-mmkv-storage`)
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-openid4vp-ble (from `../node_modules/react-native-openid4vp-ble`)
- react-native-restart (from `../node_modules/react-native-restart`)
- react-native-rsa-native (from `../node_modules/react-native-rsa-native`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-secure-key-store (from `../node_modules/react-native-secure-key-store`)
- react-native-tuvali (from `../node_modules/react-native-tuvali`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
@@ -561,8 +561,6 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-mmkv-storage"
react-native-netinfo:
:path: "../node_modules/@react-native-community/netinfo"
react-native-openid4vp-ble:
:path: "../node_modules/react-native-openid4vp-ble"
react-native-restart:
:path: "../node_modules/react-native-restart"
react-native-rsa-native:
@@ -571,6 +569,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-secure-key-store:
:path: "../node_modules/react-native-secure-key-store"
react-native-tuvali:
:path: "../node_modules/react-native-tuvali"
React-perflogger:
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
React-RCTActionSheet:
@@ -674,11 +674,11 @@ SPEC CHECKSUMS:
React-jsinspector: d4f6973dd474357dbaaf6f52f31ffc713bf3e766
react-native-mmkv-storage: 8ba3c0216a6df283ece11205b442a3e435aec4e5
react-native-netinfo: 42c0965fca99069b92e3f7360ab2d425985e5104
react-native-openid4vp-ble: 98e3371b181b695a44f446f55d7c25c63fe0aa5f
react-native-restart: 45c8dca02491980f2958595333cbccd6877cb57e
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
react-native-secure-key-store: 910e6df6bc33cb790aba6ee24bc7818df1fe5898
react-native-tuvali: b30d1a0249ee02245e2be574c104956b132e592a
React-perflogger: 5a890ca0911669421b7611661e9b58f91c805f5c
React-RCTActionSheet: bd180e0879f8424a73650c5c28fbef4f3b5b27fb
React-RCTAnimation: 1004d2b4be1f2cedfdc4cb2326adc95b989e6c6b
@@ -706,6 +706,6 @@ SPEC CHECKSUMS:
Yoga: d1fc3575b8b68891ff5ef3c276daa855e841eb32
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
PODFILE CHECKSUM: 5b97bf5aba623284ca8545706889f881c9b64811
PODFILE CHECKSUM: c9f0fe8dbf7e1bc17ab0a1e74d2edd0a76cd4b7f
COCOAPODS: 1.11.3

5
ios/fastlane/Appfile Normal file
View File

@@ -0,0 +1,5 @@
app_identifier(ENV["INJI_IOS_DEVELOPER_APP_IDENTIFIER"]) # The bundle identifier of your app
apple_id(ENV["IOS_FASTLANE_APPLE_ID"]) # Your Apple Developer Portal username
itc_team_id(ENV["APP_STORE_CONNECT_TEAM_ID"]) # App Store Connect Team ID
team_id(ENV["INJI_IOS_DEVELOPER_PORTAL_TEAM_ID"]) # Developer Portal Team ID

160
ios/fastlane/Fastfile Normal file
View File

@@ -0,0 +1,160 @@
xcode_select '/Applications/Xcode_14.2.app'
default_platform(:ios)
APP_STORE_CONNECT_TEAM_ID = ENV["APP_STORE_CONNECT_TEAM_ID"]
APPLE_ISSUER_ID = ENV["APPLE_ISSUER_ID"]
APPLE_KEY_CONTENT = ENV["APPLE_KEY_CONTENT"]
APPLE_KEY_ID = ENV["APPLE_KEY_ID"]
DEVELOPER_APP_IDENTIFIER = ENV["INJI_IOS_DEVELOPER_APP_IDENTIFIER"]
TEAM_ID = ENV["INJI_IOS_DEVELOPER_PORTAL_TEAM_ID"]
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD = ENV["INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"]
FASTLANE_USER= ENV["IOS_FASTLANE_APPLE_ID"]
PROVISIONING_PROFILE_SPECIFIER = ENV["INJI_IOS_PROVISIONING_PROFILE_SPECIFIER"]
TEMP_KEYCHAIN_USER = ENV["INJI_IOS_TEMP_KEYCHAIN_USER"]
TEMP_KEYCHAIN_PASSWORD = ENV["INJI_IOS_TEMP_KEYCHAIN_PASSWORD"]
GIT_AUTHORIZATION = ENV["GIT_AUTHORIZATION"]
SLACK_URL = ENV["SLACK_URL"]
MATCH_PASSWORD = ENV["MATCH_PASSWORD"]
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT = "120"
TESTFLIGHT_INTERNAL_TESTERS_GROUP = ENV["TESTFLIGHT_INTERNAL_TESTERS_GROUP"]
TESTFLIGHT_BETA_APP_DESCRIPTION = ENV["TESTFLIGHT_BETA_APP_DESCRIPTION"]
DEVELOPER_APP_ID = ENV["DEVELOPER_APP_ID"]
def delete_temp_keychain(name)
delete_keychain(
name: name
) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db")
end
def create_temp_keychain(name, password)
create_keychain(
name: name,
password: password,
unlock: false,
timeout: 3600
)
end
def ensure_temp_keychain(name, password)
delete_temp_keychain(name)
create_temp_keychain(name, password)
end
platform :ios do
lane :beta do
keychain_name = TEMP_KEYCHAIN_USER
keychain_password = TEMP_KEYCHAIN_PASSWORD
ensure_temp_keychain(keychain_name, keychain_password)
api_key = app_store_connect_api_key(
key_id: "#{APPLE_KEY_ID}",
issuer_id: "#{APPLE_ISSUER_ID}",
key_content: "#{APPLE_KEY_CONTENT}",
duration: 1200,
in_house: false,
is_key_content_base64: true
)
version = get_version_number(xcodeproj: "Inji.xcodeproj")
previous_build_number = latest_testflight_build_number(
app_identifier: "#{DEVELOPER_APP_IDENTIFIER}",
api_key: api_key,
version: version
)
current_build_number = previous_build_number + 1
increment_build_number(
xcodeproj: "Inji.xcodeproj",
build_number: current_build_number
)
match(
type: 'appstore',
app_identifier: "#{DEVELOPER_APP_IDENTIFIER}",
git_basic_authorization: Base64.strict_encode64("#{GIT_AUTHORIZATION}"),
readonly: false,
keychain_name: keychain_name,
keychain_password: keychain_password,
api_key: api_key
)
profile_mapping = Actions.lane_context[SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING]
gym(
configuration: "Release",
workspace: "Inji.xcworkspace",
scheme: "Inji",
export_method: "app-store",
export_options: {
provisioningProfiles: {
"#{DEVELOPER_APP_ID}" => "#{PROVISIONING_PROFILE_SPECIFIER}"
}
}
)
pilot(
app_identifier: "#{DEVELOPER_APP_IDENTIFIER}",
api_key: api_key,
ipa: "./Inji.ipa",
changelog: "#{TESTFLIGHT_BETA_APP_DESCRIPTION}",
localized_build_info: {
"default": {
whats_new: "#{TESTFLIGHT_BETA_APP_DESCRIPTION}",
}
},
skip_waiting_for_build_processing: false,
distribute_external: true,
submit_beta_review: false,
groups: ["#{TESTFLIGHT_INTERNAL_TESTERS_GROUP}"],
)
delete_temp_keychain(keychain_name)
slack(
message: "Inji - #{version} (#{current_build_number}) is uploaded to testflight.",
success: true,
slack_url: "#{SLACK_URL}",
default_payloads: [:git_branch, :last_git_commit]
)
end
lane :build_verify do
keychain_name = TEMP_KEYCHAIN_USER
keychain_password = TEMP_KEYCHAIN_PASSWORD
ensure_temp_keychain(keychain_name, keychain_password)
api_key = app_store_connect_api_key(
key_id: "#{APPLE_KEY_ID}",
issuer_id: "#{APPLE_ISSUER_ID}",
key_content: "#{APPLE_KEY_CONTENT}",
duration: 1200,
in_house: false,
is_key_content_base64: true
)
match(
type: 'appstore',
app_identifier: "#{DEVELOPER_APP_IDENTIFIER}",
git_basic_authorization: Base64.strict_encode64("#{GIT_AUTHORIZATION}"),
readonly: false,
keychain_name: keychain_name,
keychain_password: keychain_password,
api_key: api_key
)
gym(
configuration: "Release",
workspace: "MOSIPResidentApp.xcworkspace",
scheme: "MOSIPResidentApp",
export_method: "app-store",
)
delete_temp_keychain(keychain_name)
end
end

5
ios/fastlane/Matchfile Normal file
View File

@@ -0,0 +1,5 @@
git_url("https://github.com/mosip/inji-ios-priv")
storage_mode("git")
type("appstore") # The default type, can be: appstore, adhoc, enterprise or development

View File

@@ -1,23 +0,0 @@
import type { FormatLongFn, FormatLongWidth } from '../../types';
export interface BuildFormatLongFnArgs<
DefaultMatchWidth extends FormatLongWidth
> {
formats: Partial<{ [format in FormatLongWidth]: string }> & {
[format in DefaultMatchWidth]: string;
};
defaultWidth: DefaultMatchWidth;
}
export default function buildFormatLongFn<
DefaultMatchWidth extends FormatLongWidth
>(args: BuildFormatLongFnArgs<DefaultMatchWidth>): FormatLongFn {
return (options = {}) => {
// TODO: Remove String()
const width = options.width
? (String(options.width) as FormatLongWidth)
: args.defaultWidth;
const format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}

View File

@@ -1,120 +0,0 @@
import type { Era, Quarter, Month, Day } from '../../../types';
import type {
LocaleDayPeriod,
LocalePatternWidth,
LocaleUnit,
LocalizeFn,
LocalizeUnitIndex,
} from '../../types';
type LocalizeEraValues = readonly [string, string];
type LocalizeQuarterValues = readonly [string, string, string, string];
type LocalizeDayValues = readonly [
string,
string,
string,
string,
string,
string,
string
];
type LocalizeMonthValues = readonly [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
];
export type LocalizeUnitValuesIndex<Values extends LocalizeUnitValues<any>> =
Values extends Record<LocaleDayPeriod, string>
? string
: Values extends LocalizeEraValues
? Era
: Values extends LocalizeQuarterValues
? Quarter
: Values extends LocalizeDayValues
? Day
: Values extends LocalizeMonthValues
? Month
: never;
export type LocalizeUnitValues<Unit extends LocaleUnit> =
Unit extends LocaleDayPeriod
? Record<LocaleDayPeriod, string>
: Unit extends Era
? LocalizeEraValues
: Unit extends Quarter
? LocalizeQuarterValues
: Unit extends Day
? LocalizeDayValues
: Unit extends Month
? LocalizeMonthValues
: never;
export type LocalizePeriodValuesMap<Unit extends LocaleUnit> = {
[pattern in LocalePatternWidth]?: LocalizeUnitValues<Unit>;
};
export type BuildLocalizeFnArgCallback<Result extends LocaleUnit | number> = (
value: Result
) => LocalizeUnitIndex<Result>;
export type BuildLocalizeFnArgs<
Result extends LocaleUnit,
ArgCallback extends BuildLocalizeFnArgCallback<Result> | undefined
> = {
values: LocalizePeriodValuesMap<Result>;
defaultWidth: LocalePatternWidth;
formattingValues?: LocalizePeriodValuesMap<Result>;
defaultFormattingWidth?: LocalePatternWidth;
} & (ArgCallback extends undefined
? { argumentCallback?: undefined }
: { argumentCallback: BuildLocalizeFnArgCallback<Result> });
export default function buildLocalizeFn<
Result extends LocaleUnit,
ArgCallback extends BuildLocalizeFnArgCallback<Result> | undefined
>(
args: BuildLocalizeFnArgs<Result, ArgCallback>
): LocalizeFn<Result, ArgCallback> {
return (dirtyIndex, dirtyOptions) => {
const options = dirtyOptions || {};
const context = options.context ? String(options.context) : 'standalone';
let valuesArray: LocalizeUnitValues<Result>;
if (context === 'formatting' && args.formattingValues) {
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
const width = (
options.width ? String(options.width) : defaultWidth
) as LocalePatternWidth;
valuesArray = (args.formattingValues[width] ||
args.formattingValues[defaultWidth]) as LocalizeUnitValues<Result>;
} else {
const defaultWidth = args.defaultWidth;
const width = (
options.width ? String(options.width) : args.defaultWidth
) as LocalePatternWidth;
valuesArray = (args.values[width] ||
args.values[defaultWidth]) as LocalizeUnitValues<Result>;
}
const index = (
args.argumentCallback
? args.argumentCallback(dirtyIndex as Result)
: (dirtyIndex as LocalizeUnitIndex<Result> as unknown)
) as LocalizeUnitValuesIndex<typeof valuesArray>;
// @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
return valuesArray[index];
};
}

View File

@@ -1,72 +0,0 @@
import type {
BuildMatchFnArgs,
LocaleDayPeriod,
LocaleUnit,
LocalePatternWidth,
MatchFn,
} from '../../types';
export default function buildMatchFn<
Result extends LocaleUnit,
DefaultMatchWidth extends LocalePatternWidth,
DefaultParseWidth extends LocalePatternWidth
>(
args: BuildMatchFnArgs<Result, DefaultMatchWidth, DefaultParseWidth>
): MatchFn<Result> {
return (string, options = {}) => {
const width = options.width;
const matchPattern =
(width && args.matchPatterns[width]) ||
args.matchPatterns[args.defaultMatchWidth];
const matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
const matchedString = matchResult[0];
const parsePatterns =
(width && args.parsePatterns[width]) ||
args.parsePatterns[args.defaultParseWidth];
const key = (
Array.isArray(parsePatterns)
? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
: findKey(parsePatterns, (pattern: any) => pattern.test(matchedString))
) as Result extends LocaleDayPeriod ? string : number;
let value: Result;
value = (args.valueCallback ? args.valueCallback(key) : key) as Result;
value = options.valueCallback ? options.valueCallback(value) : value;
const rest = string.slice(matchedString.length);
return { value, rest };
};
}
function findKey<Value, Obj extends { [key in string | number]: Value }>(
object: Obj,
predicate: (value: Value) => boolean
): keyof Obj | undefined {
for (const key in object) {
if (object.hasOwnProperty(key) && predicate(object[key])) {
return key;
}
}
return undefined;
}
function findIndex<Item>(
array: Item[],
predicate: (item: Item) => boolean
): number | undefined {
for (let key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return undefined;
}

View File

@@ -1,28 +0,0 @@
import type { MatchFn, MatchValueCallback } from '../../types';
export interface BuildMatchPatternFnArgs<Result> {
matchPattern: RegExp;
parsePattern: RegExp;
valueCallback?: MatchValueCallback<string, Result>;
}
export default function buildMatchPatternFn<Result>(
args: BuildMatchPatternFnArgs<Result>
): MatchFn<Result> {
return (string, options = {}) => {
const matchResult = string.match(args.matchPattern);
if (!matchResult) return null;
const matchedString = matchResult[0];
const parseResult = string.match(args.parsePattern);
if (!parseResult) return null;
let value = (
args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]
) as Result;
value = options.valueCallback ? options.valueCallback(value) : value;
const rest = string.slice(matchedString.length);
return { value, rest };
};
}

View File

@@ -1,112 +0,0 @@
import type { FormatDistanceFn, FormatDistanceLocale } from '../../../types';
type FormatDistanceTokenValue =
| string
| {
one: string;
other: string;
};
const formatDistanceLocale: FormatDistanceLocale<FormatDistanceTokenValue> = {
lessThanXSeconds: {
one: 'wala pang isang segundo',
other: 'wala pang {{count}} na segundo',
},
xSeconds: {
one: 'isang segundo',
other: '{{count}} segundo',
},
halfAMinute: 'kalahating minuto',
lessThanXMinutes: {
one: 'wala pang isang minuto',
other: 'wala pang {{count}} na minuto',
},
xMinutes: {
one: 'isang minuto',
other: '{{count}} minuto',
},
aboutXHours: {
one: 'mga isang oras',
other: 'mga {{count}} na oras',
},
xHours: {
one: 'isang oras',
other: '{{count}} na oras',
},
xDays: {
one: 'isang araw',
other: '{{count}} na araw',
},
aboutXWeeks: {
one: 'mga isang linggo',
other: 'mga {{count}} na linggo',
},
xWeeks: {
one: 'isang linggo',
other: '{{count}} na linggo',
},
aboutXMonths: {
one: 'mga isang buwan',
other: 'mga {{count}} na buwan',
},
xMonths: {
one: 'isang buwan',
other: '{{count}} na buwan',
},
aboutXYears: {
one: 'mga isang taon',
other: 'mga {{count}} na taon',
},
xYears: {
one: 'isang taon',
other: '{{count}} na taon',
},
overXYears: {
one: 'mahigit isang taon',
other: 'mahigit {{count}} na taon',
},
almostXYears: {
one: 'halos isang taon',
other: 'halos {{count}} na taon',
},
};
const formatDistance: FormatDistanceFn = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === 'string') {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace('{{count}}', count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return 'sa ' + result;
} else {
return result + ' nakaraan';
}
}
return result;
};
export default formatDistance;

View File

@@ -1,42 +0,0 @@
import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index';
import type { FormatLong } from '../../../types';
const dateFormats = {
full: 'EEEE, MMMM do, y',
long: 'MMMM do, y',
medium: 'MMM d, y',
short: 'MM/dd/yyyy',
};
const timeFormats = {
full: 'h:mm:ss a zzzz',
long: 'h:mm:ss a z',
medium: 'h:mm:ss a',
short: 'h:mm a',
};
const dateTimeFormats = {
full: "{{date}} 'at' {{time}}",
long: "{{date}} 'at' {{time}}",
medium: '{{date}}, {{time}}',
short: '{{date}}, {{time}}',
};
const formatLong: FormatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: 'full',
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: 'full',
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: 'full',
}),
};
export default formatLong;

View File

@@ -1,15 +0,0 @@
import type { FormatRelativeFn } from '../../../types';
const formatRelativeLocale = {
lastWeek: "'last' eeee 'at' p",
yesterday: "'yesterday at' p",
today: "'today at' p",
tomorrow: "'tomorrow at' p",
nextWeek: "eeee 'at' p",
other: 'P',
};
const formatRelative: FormatRelativeFn = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
export default formatRelative;

View File

@@ -1,199 +0,0 @@
import type { Quarter } from '../../../../types';
import type { Localize, LocalizeFn } from '../../../types';
import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index';
const eraValues = {
narrow: ['B', 'A'] as const,
abbreviated: ['BC', 'AD'] as const,
wide: ['Before Christ', 'Anno Domini'] as const,
};
const quarterValues = {
narrow: ['1', '2', '3', '4'] as const,
abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'] as const,
wide: [
'Unang sangkapat',
'Ikalawang sangkapat',
'Ikatlong sangkapat',
'Ikaapat sangkapat',
] as const,
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'] as const,
abbreviated: [
'Enero',
'Peb',
'Marso',
'Abr',
'Mayo',
'Hun',
'Hul',
'Agosto',
'Set',
'Okt',
'Nob',
'Dis',
] as const,
wide: [
'Enero',
'Pebrero',
'Marso',
'Abril',
'Mayo',
'Hunyo',
'Hulyo',
'Agosto',
'Setyembre',
'Oktubre',
'Nobyembre',
'Disyembre',
] as const,
};
const dayValues = {
narrow: ['L', 'L', 'M', 'M', 'H', 'B', 'S'] as const,
short: ['Li', 'Lu', 'Ma', 'Mi', 'Hu', 'Bi', 'Sa'] as const,
abbreviated: ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'] as const,
wide: [
'Linggo',
'Lunes',
'Martes',
'Miyerkules',
'Huwebes',
'Biyernes',
'Sabado',
] as const,
};
const dayPeriodValues = {
narrow: {
am: 'a',
pm: 'p',
midnight: 'mi',
noon: 'n',
morning: 'umaga',
afternoon: 'hapon',
evening: 'gabi',
night: 'gabi',
},
abbreviated: {
am: 'AM',
pm: 'PM',
midnight: 'hatinggabi',
noon: 'tanghali',
morning: 'umaga',
afternoon: 'hapon',
evening: 'gabi',
night: 'gabi',
},
wide: {
am: 'a.m.',
pm: 'p.m.',
midnight: 'hatinggabi',
noon: 'tanghali',
morning: 'umaga',
afternoon: 'hapon',
evening: 'gabi',
night: 'gabi',
},
};
const formattingDayPeriodValues = {
narrow: {
am: 'a',
pm: 'p',
midnight: 'mi',
noon: 'n',
morning: 'sa umaga',
afternoon: 'sa hapon',
evening: 'sa gabi',
night: 'sa gabi',
},
abbreviated: {
am: 'AM',
pm: 'PM',
midnight: 'midnight',
noon: 'noon',
morning: 'sa umaga',
afternoon: 'sa hapon',
evening: 'sa gabi',
night: 'sa gabi',
},
wide: {
am: 'a.m.',
pm: 'p.m.',
midnight: 'midnight',
noon: 'noon',
morning: 'sa umaga',
afternoon: 'sa hapon',
evening: 'sa gabi',
night: 'sa gabi',
},
};
const ordinalNumber: LocalizeFn<number, undefined> = (
dirtyNumber,
_options
) => {
const number = Number(dirtyNumber);
// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
// const rem100 = number % 100
// if (rem100 > 20 || rem100 < 10) {
// switch (rem100 % 10) {
// case 1:
// return number + 'st'
// case 2:
// return number + 'nd'
// case 3:
// return number + 'rd'
// }
// }
return 'ika-' + number;
};
const localize: Localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: 'wide',
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: 'wide',
argumentCallback: (quarter) => (quarter - 1) as Quarter,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: 'wide',
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: 'wide',
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: 'wide',
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: 'wide',
}),
};
export default localize;

View File

@@ -1,135 +0,0 @@
import type { Quarter } from '../../../../types';
import type { Match } from '../../../types';
import buildMatchFn from '../../../_lib/buildMatchFn/index';
import buildMatchPatternFn from '../../../_lib/buildMatchPatternFn/index';
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(b|a)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(before christ|before common era|anno domini|common era)/i,
};
const parseEraPatterns = {
any: [/^b/i, /^(a|c)/i] as const,
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](th|st|nd|rd)? quarter/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i] as const,
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
] as const,
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^may/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
] as const,
};
const matchDayPatterns = {
narrow: /^[smtwf]/i,
short: /^(su|mo|tu|we|th|fr|sa)/i,
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i] as const,
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] as const,
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i,
},
};
const match: Match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseEraPatterns,
defaultParseWidth: 'any',
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseQuarterPatterns,
defaultParseWidth: 'any',
valueCallback: (index) => (index + 1) as Quarter,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseMonthPatterns,
defaultParseWidth: 'any',
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: 'wide',
parsePatterns: parseDayPatterns,
defaultParseWidth: 'any',
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: 'any',
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: 'any',
}),
};
export default match;

View File

@@ -1,4 +0,0 @@
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
import { fil } from 'date-fns/locale';
export default fil;

View File

@@ -1,35 +0,0 @@
// @flow
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
export type Locale = {
code?: string,
formatDistance?: (...args: Array<any>) => any,
formatRelative?: (...args: Array<any>) => any,
localize?: {
ordinalNumber: (...args: Array<any>) => any,
era: (...args: Array<any>) => any,
quarter: (...args: Array<any>) => any,
month: (...args: Array<any>) => any,
day: (...args: Array<any>) => any,
dayPeriod: (...args: Array<any>) => any,
},
formatLong?: {
date: (...args: Array<any>) => any,
time: (...args: Array<any>) => any,
dateTime: (...args: Array<any>) => any,
},
match?: {
ordinalNumber: (...args: Array<any>) => any,
era: (...args: Array<any>) => any,
quarter: (...args: Array<any>) => any,
month: (...args: Array<any>) => any,
day: (...args: Array<any>) => any,
dayPeriod: (...args: Array<any>) => any,
},
options?: {
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
},
}
declare module.exports: Locale

View File

@@ -1,29 +0,0 @@
import formatDistance from './_lib/formatDistance/index';
import formatLong from './_lib/formatLong/index';
import formatRelative from './_lib/formatRelative/index';
import localize from './_lib/localize/index';
import match from './_lib/match/index';
import type { Locale } from '../types';
/**
* @type {Locale}
* @category Locales
* @summary Filipino locale (Philippines)
* @language Filipino
* @iso-639-2 fil
* @author Paolo Miguel de Leon [@pmigueld]{@link https://github.com/pmigueld}
*/
const locale: Locale = {
code: 'fil',
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
};
export default locale;

View File

@@ -1,330 +0,0 @@
# English (en-US) locale
## `format` and `parse`
| Title | Token string | Date | `format` result | `parse` result |
| ------------------------------- | ------------ | ------------------------ | ------------------------------------------------------- | ------------------------ |
| Calendar year | yo | 1987-02-11T12:13:14.015Z | 1987th | 1987-01-01T00:00:00.000Z |
| | | 0005-01-01T12:13:14.015Z | 5th | 0005-01-01T00:00:00.000Z |
| Local week-numbering year | Yo | 1987-02-11T12:13:14.015Z | 1987th | 1986-12-28T00:00:00.000Z |
| | | 0005-01-01T12:13:14.015Z | 5th | 0004-12-26T00:00:00.000Z |
| Quarter (formatting) | Qo | 2019-01-01T12:13:14.015Z | 1st | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | 2nd | 2019-04-01T00:00:00.000Z |
| | QQQ | 2019-01-01T12:13:14.015Z | Q1 | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | Q2 | 2019-04-01T00:00:00.000Z |
| | QQQQ | 2019-01-01T12:13:14.015Z | 1st quarter | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | 2nd quarter | 2019-04-01T00:00:00.000Z |
| | QQQQQ | 2019-01-01T12:13:14.015Z | 1 | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | 2 | 2019-04-01T00:00:00.000Z |
| Quarter (stand-alone) | qo | 2019-01-01T12:13:14.015Z | 1st | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | 2nd | 2019-04-01T00:00:00.000Z |
| | qqq | 2019-01-01T12:13:14.015Z | Q1 | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | Q2 | 2019-04-01T00:00:00.000Z |
| | qqqq | 2019-01-01T12:13:14.015Z | 1st quarter | 2019-01-01T00:00:00.000Z |
| | | 2019-04-01T12:13:14.015Z | 2nd quarter | 2019-04-01T00:00:00.000Z |
| Month (formatting) | Mo | 2019-02-11T12:13:14.015Z | 2nd | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | 7th | 2019-07-01T00:00:00.000Z |
| | MMM | 2019-02-11T12:13:14.015Z | Feb | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | Jul | 2019-07-01T00:00:00.000Z |
| | MMMM | 2019-02-11T12:13:14.015Z | February | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | July | 2019-07-01T00:00:00.000Z |
| | MMMMM | 2019-02-11T12:13:14.015Z | F | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | J | 2019-01-01T00:00:00.000Z |
| Month (stand-alone) | Lo | 2019-02-11T12:13:14.015Z | 2nd | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | 7th | 2019-07-01T00:00:00.000Z |
| | LLL | 2019-02-11T12:13:14.015Z | Feb | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | Jul | 2019-07-01T00:00:00.000Z |
| | LLLL | 2019-02-11T12:13:14.015Z | February | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | July | 2019-07-01T00:00:00.000Z |
| | LLLLL | 2019-02-11T12:13:14.015Z | F | 2019-02-01T00:00:00.000Z |
| | | 2019-07-10T12:13:14.015Z | J | 2019-01-01T00:00:00.000Z |
| Local week of year | wo | 2019-01-01T12:13:14.015Z | 1st | 2018-12-30T00:00:00.000Z |
| | | 2019-12-01T12:13:14.015Z | 49th | 2019-12-01T00:00:00.000Z |
| ISO week of year | Io | 2019-01-01T12:13:14.015Z | 1st | 2018-12-31T00:00:00.000Z |
| | | 2019-12-01T12:13:14.015Z | 48th | 2019-11-25T00:00:00.000Z |
| Day of month | do | 2019-02-11T12:13:14.015Z | 11th | 2019-02-11T00:00:00.000Z |
| | | 2019-02-28T12:13:14.015Z | 28th | 2019-02-28T00:00:00.000Z |
| Day of year | Do | 2019-02-11T12:13:14.015Z | 42nd | 2019-02-11T00:00:00.000Z |
| | | 2019-12-31T12:13:14.015Z | 365th | 2019-12-31T00:00:00.000Z |
| Day of week (formatting) | E | 2019-02-11T12:13:14.015Z | Mon | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fri | 2019-02-15T00:00:00.000Z |
| | EE | 2019-02-11T12:13:14.015Z | Mon | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fri | 2019-02-15T00:00:00.000Z |
| | EEE | 2019-02-11T12:13:14.015Z | Mon | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fri | 2019-02-15T00:00:00.000Z |
| | EEEE | 2019-02-11T12:13:14.015Z | Monday | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Friday | 2019-02-15T00:00:00.000Z |
| | EEEEE | 2019-02-11T12:13:14.015Z | M | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | F | 2019-02-15T00:00:00.000Z |
| | EEEEEE | 2019-02-11T12:13:14.015Z | Mo | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fr | 2019-02-15T00:00:00.000Z |
| ISO day of week (formatting) | io | 2019-02-11T12:13:14.015Z | 1st | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | 5th | 2019-02-15T00:00:00.000Z |
| | iii | 2019-02-11T12:13:14.015Z | Mon | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fri | 2019-02-15T00:00:00.000Z |
| | iiii | 2019-02-11T12:13:14.015Z | Monday | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Friday | 2019-02-15T00:00:00.000Z |
| | iiiii | 2019-02-11T12:13:14.015Z | M | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | F | 2019-02-15T00:00:00.000Z |
| | iiiiii | 2019-02-11T12:13:14.015Z | Mo | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fr | 2019-02-15T00:00:00.000Z |
| Local day of week (formatting) | eo | 2019-02-11T12:13:14.015Z | 2nd | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | 6th | 2019-02-15T00:00:00.000Z |
| | eee | 2019-02-11T12:13:14.015Z | Mon | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fri | 2019-02-15T00:00:00.000Z |
| | eeee | 2019-02-11T12:13:14.015Z | Monday | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Friday | 2019-02-15T00:00:00.000Z |
| | eeeee | 2019-02-11T12:13:14.015Z | M | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | F | 2019-02-15T00:00:00.000Z |
| | eeeeee | 2019-02-11T12:13:14.015Z | Mo | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fr | 2019-02-15T00:00:00.000Z |
| Local day of week (stand-alone) | co | 2019-02-11T12:13:14.015Z | 2nd | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | 6th | 2019-02-15T00:00:00.000Z |
| | ccc | 2019-02-11T12:13:14.015Z | Mon | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fri | 2019-02-15T00:00:00.000Z |
| | cccc | 2019-02-11T12:13:14.015Z | Monday | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Friday | 2019-02-15T00:00:00.000Z |
| | ccccc | 2019-02-11T12:13:14.015Z | M | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | F | 2019-02-15T00:00:00.000Z |
| | cccccc | 2019-02-11T12:13:14.015Z | Mo | 2019-02-11T00:00:00.000Z |
| | | 2019-02-15T12:13:14.015Z | Fr | 2019-02-15T00:00:00.000Z |
| AM, PM | a | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | aa | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | aaa | 2019-02-11T11:13:14.015Z | am | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | pm | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | pm | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | am | 2019-02-11T00:00:00.000Z |
| | aaaa | 2019-02-11T11:13:14.015Z | a.m. | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | p.m. | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | p.m. | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | a.m. | 2019-02-11T00:00:00.000Z |
| | aaaaa | 2019-02-11T11:13:14.015Z | a | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | p | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | p | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | a | 2019-02-11T00:00:00.000Z |
| AM, PM, noon, midnight | b | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | bb | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z |
| | bbb | 2019-02-11T11:13:14.015Z | am | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | pm | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | pm | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | am | 2019-02-11T00:00:00.000Z |
| | bbbb | 2019-02-11T11:13:14.015Z | a.m. | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | p.m. | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | p.m. | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | a.m. | 2019-02-11T00:00:00.000Z |
| | bbbbb | 2019-02-11T11:13:14.015Z | a | 2019-02-11T00:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | p | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | p | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | a | 2019-02-11T00:00:00.000Z |
| Flexible day period | B | 2019-02-11T11:13:14.015Z | in the morning | 2019-02-11T04:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | in the afternoon | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | in the evening | 2019-02-11T17:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | at night | 2019-02-11T00:00:00.000Z |
| | BB | 2019-02-11T11:13:14.015Z | in the morning | 2019-02-11T04:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | in the afternoon | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | in the evening | 2019-02-11T17:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | at night | 2019-02-11T00:00:00.000Z |
| | BBB | 2019-02-11T11:13:14.015Z | in the morning | 2019-02-11T04:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | in the afternoon | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | in the evening | 2019-02-11T17:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | at night | 2019-02-11T00:00:00.000Z |
| | BBBB | 2019-02-11T11:13:14.015Z | in the morning | 2019-02-11T04:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | in the afternoon | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | in the evening | 2019-02-11T17:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | at night | 2019-02-11T00:00:00.000Z |
| | BBBBB | 2019-02-11T11:13:14.015Z | in the morning | 2019-02-11T04:00:00.000Z |
| | | 2019-02-11T14:13:14.015Z | in the afternoon | 2019-02-11T12:00:00.000Z |
| | | 2019-02-11T19:13:14.015Z | in the evening | 2019-02-11T17:00:00.000Z |
| | | 2019-02-11T02:13:14.015Z | at night | Invalid Date |
| Hour [1-12] | ho | 2019-02-11T11:13:14.015Z | 11th | 2019-02-11T11:00:00.000Z |
| | | 2019-02-11T23:13:14.015Z | 11th | 2019-02-11T23:00:00.000Z |
| Hour [0-23] | Ho | 2019-02-11T11:13:14.015Z | 11th | 2019-02-11T11:00:00.000Z |
| | | 2019-02-11T23:13:14.015Z | 23rd | 2019-02-11T23:00:00.000Z |
| Hour [0-11] | Ko | 2019-02-11T11:13:14.015Z | 11th | 2019-02-11T11:00:00.000Z |
| | | 2019-02-11T23:13:14.015Z | 11th | 2019-02-11T23:00:00.000Z |
| Hour [1-24] | ko | 2019-02-11T11:13:14.015Z | 11th | 2019-02-11T11:00:00.000Z |
| | | 2019-02-11T23:13:14.015Z | 23rd | 2019-02-11T23:00:00.000Z |
| Minute | mo | 2019-01-01T12:01:14.015Z | 1st | 2019-01-01T12:01:00.000Z |
| | | 2019-04-01T12:55:14.015Z | 55th | 2019-04-01T12:55:00.000Z |
| Second | so | 2019-01-01T12:13:01.015Z | 1st | 2019-01-01T12:13:01.000Z |
| | | 2019-04-01T12:13:55.015Z | 55th | 2019-04-01T12:13:55.000Z |
| Long localized date | P | 1987-02-11T12:13:14.015Z | 02/11/1987 | 1987-02-11T00:00:00.000Z |
| | | 1453-05-29T23:59:59.999Z | 05/29/1453 | 1453-05-29T00:00:00.000Z |
| | PP | 1987-02-11T12:13:14.015Z | Feb 11, 1987 | 1987-02-11T00:00:00.000Z |
| | | 1453-05-29T23:59:59.999Z | May 29, 1453 | 1453-05-29T00:00:00.000Z |
| | PPP | 1987-02-11T12:13:14.015Z | February 11th, 1987 | 1987-02-11T00:00:00.000Z |
| | | 1453-05-29T23:59:59.999Z | May 29th, 1453 | 1453-05-29T00:00:00.000Z |
| | PPPP | 1987-02-11T12:13:14.015Z | Wednesday, February 11th, 1987 | 1987-02-11T00:00:00.000Z |
| | | 1453-05-29T23:59:59.999Z | Sunday, May 29th, 1453 | 1453-05-29T00:00:00.000Z |
| Long localized time | p | 1987-02-11T12:13:14.015Z | 12:13 PM | 1987-02-11T12:13:00.000Z |
| | | 1453-05-29T23:59:59.999Z | 11:59 PM | 1453-05-29T23:59:00.000Z |
| | pp | 1987-02-11T12:13:14.015Z | 12:13:14 PM | 1987-02-11T12:13:14.000Z |
| | | 1453-05-29T23:59:59.999Z | 11:59:59 PM | 1453-05-29T23:59:59.000Z |
| | ppp | 1987-02-11T12:13:14.015Z | 12:13:14 PM GMT+0 | Errored |
| | | 1453-05-29T23:59:59.999Z | 11:59:59 PM GMT+0 | Errored |
| | pppp | 1987-02-11T12:13:14.015Z | 12:13:14 PM GMT+00:00 | Errored |
| | | 1453-05-29T23:59:59.999Z | 11:59:59 PM GMT+00:00 | Errored |
| Combination of date and time | Pp | 1987-02-11T12:13:14.015Z | 02/11/1987, 12:13 PM | 1987-02-11T12:13:00.000Z |
| | | 1453-05-29T23:59:59.999Z | 05/29/1453, 11:59 PM | 1453-05-29T23:59:00.000Z |
| | PPpp | 1987-02-11T12:13:14.015Z | Feb 11, 1987, 12:13:14 PM | 1987-02-11T12:13:14.000Z |
| | | 1453-05-29T23:59:59.999Z | May 29, 1453, 11:59:59 PM | 1453-05-29T23:59:59.000Z |
| | PPPppp | 1987-02-11T12:13:14.015Z | February 11th, 1987 at 12:13:14 PM GMT+0 | Errored |
| | | 1453-05-29T23:59:59.999Z | May 29th, 1453 at 11:59:59 PM GMT+0 | Errored |
| | PPPPpppp | 1987-02-11T12:13:14.015Z | Wednesday, February 11th, 1987 at 12:13:14 PM GMT+00:00 | Errored |
| | | 1453-05-29T23:59:59.999Z | Sunday, May 29th, 1453 at 11:59:59 PM GMT+00:00 | Errored |
## `formatDistance`
If now is January 1st, 2000, 00:00.
| Date | Result | `includeSeconds: true` | `addSuffix: true` |
| ------------------------ | ------------------ | ---------------------- | ---------------------- |
| 2006-01-01T00:00:00.000Z | about 6 years | about 6 years | in about 6 years |
| 2005-01-01T00:00:00.000Z | about 5 years | about 5 years | in about 5 years |
| 2004-01-01T00:00:00.000Z | about 4 years | about 4 years | in about 4 years |
| 2003-01-01T00:00:00.000Z | about 3 years | about 3 years | in about 3 years |
| 2002-01-01T00:00:00.000Z | about 2 years | about 2 years | in about 2 years |
| 2001-06-01T00:00:00.000Z | over 1 year | over 1 year | in over 1 year |
| 2001-02-01T00:00:00.000Z | about 1 year | about 1 year | in about 1 year |
| 2001-01-01T00:00:00.000Z | about 1 year | about 1 year | in about 1 year |
| 2000-06-01T00:00:00.000Z | 5 months | 5 months | in 5 months |
| 2000-03-01T00:00:00.000Z | 2 months | 2 months | in 2 months |
| 2000-02-01T00:00:00.000Z | about 1 month | about 1 month | in about 1 month |
| 2000-01-15T00:00:00.000Z | 14 days | 14 days | in 14 days |
| 2000-01-02T00:00:00.000Z | 1 day | 1 day | in 1 day |
| 2000-01-01T06:00:00.000Z | about 6 hours | about 6 hours | in about 6 hours |
| 2000-01-01T01:00:00.000Z | about 1 hour | about 1 hour | in about 1 hour |
| 2000-01-01T00:45:00.000Z | about 1 hour | about 1 hour | in about 1 hour |
| 2000-01-01T00:30:00.000Z | 30 minutes | 30 minutes | in 30 minutes |
| 2000-01-01T00:15:00.000Z | 15 minutes | 15 minutes | in 15 minutes |
| 2000-01-01T00:01:00.000Z | 1 minute | 1 minute | in 1 minute |
| 2000-01-01T00:00:25.000Z | less than a minute | half a minute | in less than a minute |
| 2000-01-01T00:00:15.000Z | less than a minute | less than 20 seconds | in less than a minute |
| 2000-01-01T00:00:05.000Z | less than a minute | less than 10 seconds | in less than a minute |
| 2000-01-01T00:00:00.000Z | less than a minute | less than 5 seconds | less than a minute ago |
| 1999-12-31T23:59:55.000Z | less than a minute | less than 10 seconds | less than a minute ago |
| 1999-12-31T23:59:45.000Z | less than a minute | less than 20 seconds | less than a minute ago |
| 1999-12-31T23:59:35.000Z | less than a minute | half a minute | less than a minute ago |
| 1999-12-31T23:59:00.000Z | 1 minute | 1 minute | 1 minute ago |
| 1999-12-31T23:45:00.000Z | 15 minutes | 15 minutes | 15 minutes ago |
| 1999-12-31T23:30:00.000Z | 30 minutes | 30 minutes | 30 minutes ago |
| 1999-12-31T23:15:00.000Z | about 1 hour | about 1 hour | about 1 hour ago |
| 1999-12-31T23:00:00.000Z | about 1 hour | about 1 hour | about 1 hour ago |
| 1999-12-31T18:00:00.000Z | about 6 hours | about 6 hours | about 6 hours ago |
| 1999-12-30T00:00:00.000Z | 2 days | 2 days | 2 days ago |
| 1999-12-15T00:00:00.000Z | 17 days | 17 days | 17 days ago |
| 1999-12-01T00:00:00.000Z | about 1 month | about 1 month | about 1 month ago |
| 1999-11-01T00:00:00.000Z | 2 months | 2 months | 2 months ago |
| 1999-06-01T00:00:00.000Z | 7 months | 7 months | 7 months ago |
| 1999-01-01T00:00:00.000Z | about 1 year | about 1 year | about 1 year ago |
| 1998-12-01T00:00:00.000Z | about 1 year | about 1 year | about 1 year ago |
| 1998-06-01T00:00:00.000Z | over 1 year | over 1 year | over 1 year ago |
| 1998-01-01T00:00:00.000Z | about 2 years | about 2 years | about 2 years ago |
| 1997-01-01T00:00:00.000Z | about 3 years | about 3 years | about 3 years ago |
| 1996-01-01T00:00:00.000Z | about 4 years | about 4 years | about 4 years ago |
| 1995-01-01T00:00:00.000Z | about 5 years | about 5 years | about 5 years ago |
| 1994-01-01T00:00:00.000Z | about 6 years | about 6 years | about 6 years ago |
## `formatDistanceStrict`
If now is January 1st, 2000, 00:00.
| Date | Result | `addSuffix: true` | With forced unit (i.e. `hour`) |
| ------------------------ | ---------- | ----------------- | ------------------------------ |
| 2006-01-01T00:00:00.000Z | 6 years | in 6 years | 52608 hours |
| 2005-01-01T00:00:00.000Z | 5 years | in 5 years | 43848 hours |
| 2004-01-01T00:00:00.000Z | 4 years | in 4 years | 35064 hours |
| 2003-01-01T00:00:00.000Z | 3 years | in 3 years | 26304 hours |
| 2002-01-01T00:00:00.000Z | 2 years | in 2 years | 17544 hours |
| 2001-06-01T00:00:00.000Z | 1 year | in 1 year | 12408 hours |
| 2001-02-01T00:00:00.000Z | 1 year | in 1 year | 9528 hours |
| 2001-01-01T00:00:00.000Z | 1 year | in 1 year | 8784 hours |
| 2000-06-01T00:00:00.000Z | 5 months | in 5 months | 3648 hours |
| 2000-03-01T00:00:00.000Z | 2 months | in 2 months | 1440 hours |
| 2000-02-01T00:00:00.000Z | 1 month | in 1 month | 744 hours |
| 2000-01-15T00:00:00.000Z | 14 days | in 14 days | 336 hours |
| 2000-01-02T00:00:00.000Z | 1 day | in 1 day | 24 hours |
| 2000-01-01T06:00:00.000Z | 6 hours | in 6 hours | 6 hours |
| 2000-01-01T01:00:00.000Z | 1 hour | in 1 hour | 1 hour |
| 2000-01-01T00:45:00.000Z | 45 minutes | in 45 minutes | 1 hour |
| 2000-01-01T00:30:00.000Z | 30 minutes | in 30 minutes | 1 hour |
| 2000-01-01T00:15:00.000Z | 15 minutes | in 15 minutes | 0 hours |
| 2000-01-01T00:01:00.000Z | 1 minute | in 1 minute | 0 hours |
| 2000-01-01T00:00:25.000Z | 25 seconds | in 25 seconds | 0 hours |
| 2000-01-01T00:00:15.000Z | 15 seconds | in 15 seconds | 0 hours |
| 2000-01-01T00:00:05.000Z | 5 seconds | in 5 seconds | 0 hours |
| 2000-01-01T00:00:00.000Z | 0 seconds | 0 seconds ago | 0 hours |
| 1999-12-31T23:59:55.000Z | 5 seconds | 5 seconds ago | 0 hours |
| 1999-12-31T23:59:45.000Z | 15 seconds | 15 seconds ago | 0 hours |
| 1999-12-31T23:59:35.000Z | 25 seconds | 25 seconds ago | 0 hours |
| 1999-12-31T23:59:00.000Z | 1 minute | 1 minute ago | 0 hours |
| 1999-12-31T23:45:00.000Z | 15 minutes | 15 minutes ago | 0 hours |
| 1999-12-31T23:30:00.000Z | 30 minutes | 30 minutes ago | 1 hour |
| 1999-12-31T23:15:00.000Z | 45 minutes | 45 minutes ago | 1 hour |
| 1999-12-31T23:00:00.000Z | 1 hour | 1 hour ago | 1 hour |
| 1999-12-31T18:00:00.000Z | 6 hours | 6 hours ago | 6 hours |
| 1999-12-30T00:00:00.000Z | 2 days | 2 days ago | 48 hours |
| 1999-12-15T00:00:00.000Z | 17 days | 17 days ago | 408 hours |
| 1999-12-01T00:00:00.000Z | 1 month | 1 month ago | 744 hours |
| 1999-11-01T00:00:00.000Z | 2 months | 2 months ago | 1464 hours |
| 1999-06-01T00:00:00.000Z | 7 months | 7 months ago | 5136 hours |
| 1999-01-01T00:00:00.000Z | 1 year | 1 year ago | 8760 hours |
| 1998-12-01T00:00:00.000Z | 1 year | 1 year ago | 9504 hours |
| 1998-06-01T00:00:00.000Z | 2 years | 2 years ago | 13896 hours |
| 1998-01-01T00:00:00.000Z | 2 years | 2 years ago | 17520 hours |
| 1997-01-01T00:00:00.000Z | 3 years | 3 years ago | 26280 hours |
| 1996-01-01T00:00:00.000Z | 4 years | 4 years ago | 35064 hours |
| 1995-01-01T00:00:00.000Z | 5 years | 5 years ago | 43824 hours |
| 1994-01-01T00:00:00.000Z | 6 years | 6 years ago | 52584 hours |
## `formatRelative`
If now is January 1st, 2000, 00:00.
| Date | Result |
| ------------------------ | ----------------------- |
| 2000-01-10T00:00:00.000Z | 01/10/2000 |
| 2000-01-05T00:00:00.000Z | Wednesday at 12:00 AM |
| 2000-01-02T00:00:00.000Z | tomorrow at 12:00 AM |
| 2000-01-01T00:00:00.000Z | today at 12:00 AM |
| 1999-12-31T00:00:00.000Z | yesterday at 12:00 AM |
| 1999-12-27T00:00:00.000Z | last Monday at 12:00 AM |
| 1999-12-21T00:00:00.000Z | 12/21/1999 |
## `formatDuration`
| Duration | Result |
| ------------- | --------- |
| {"years":0} | 0 years |
| {"years":1} | 1 year |
| {"years":2} | 2 years |
| {"months":0} | 0 months |
| {"months":1} | 1 month |
| {"months":2} | 2 months |
| {"weeks":0} | 0 weeks |
| {"weeks":1} | 1 week |
| {"weeks":2} | 2 weeks |
| {"days":0} | 0 days |
| {"days":1} | 1 day |
| {"days":2} | 2 days |
| {"hours":0} | 0 hours |
| {"hours":1} | 1 hour |
| {"hours":2} | 2 hours |
| {"minutes":0} | 0 minutes |
| {"minutes":1} | 1 minute |
| {"minutes":2} | 2 minutes |
| {"seconds":0} | 0 seconds |
| {"seconds":1} | 1 second |
| {"seconds":2} | 2 seconds |

Some files were not shown because too many files have changed in this diff Show More