@procivis/one-react-native-components 0.3.94 → 0.3.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
- package/lib/commonjs/components/credential/credential.js.map +1 -1
- package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -2
- package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/commonjs/components/entity/entity-details.js +3 -3
- package/lib/commonjs/components/entity/entity-details.js.map +1 -1
- package/lib/commonjs/components/history/history-details-screen.js +10 -10
- package/lib/commonjs/components/history/history-details-screen.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item-icon.js +12 -8
- package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
- package/lib/commonjs/components/history/history-list-item.js.map +1 -1
- package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
- package/lib/commonjs/components/history/history-list-section-header.js +1 -1
- package/lib/commonjs/components/history/history-list-section-header.js.map +1 -1
- package/lib/commonjs/components/history/history-list.js.map +1 -1
- package/lib/commonjs/components/proof-request/share-credential-card-notice.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js +1 -1
- package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +2 -2
- package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +2 -2
- package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/commonjs/ui-components/accessibility/locale/fi.json +1 -1
- package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
- package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
- package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
- package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/commonjs/ui-components/settings/button-setting.js +3 -1
- package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
- package/lib/commonjs/ui-components/settings/setting-item.js +4 -2
- package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
- package/lib/commonjs/ui-components/settings/switch-setting.js +4 -2
- package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/history.js +1 -41
- package/lib/commonjs/utils/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/backup.js +3 -3
- package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/cache.js +10 -10
- package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/core-context.js +5 -5
- package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/credentials.js +3 -3
- package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js +1 -1
- package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/history.js +1 -1
- package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/identifiers.js +3 -3
- package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/proofs.js +9 -9
- package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/trust-entity.js +5 -5
- package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js +1 -1
- package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
- package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-images.js +11 -10
- package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js +14 -33
- package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential-sharing.js +4 -12
- package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/commonjs/utils/parsers/credential.js +31 -32
- package/lib/commonjs/utils/parsers/credential.js.map +1 -1
- package/lib/commonjs/utils/parsers/query.js.map +1 -1
- package/lib/commonjs/utils/url.js.map +1 -1
- package/lib/module/components/backup/preview-credentials.js.map +1 -1
- package/lib/module/components/credential/credential.js.map +1 -1
- package/lib/module/components/entity/EntityButtons.js.map +1 -1
- package/lib/module/components/entity/entity-attributes.js.map +1 -1
- package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
- package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
- package/lib/module/components/entity/entity-details.js +4 -4
- package/lib/module/components/entity/entity-details.js.map +1 -1
- package/lib/module/components/history/history-details-screen.js +11 -11
- package/lib/module/components/history/history-details-screen.js.map +1 -1
- package/lib/module/components/history/history-list-item-icon.js +13 -9
- package/lib/module/components/history/history-list-item-icon.js.map +1 -1
- package/lib/module/components/history/history-list-item.js.map +1 -1
- package/lib/module/components/history/history-list-screen.js.map +1 -1
- package/lib/module/components/history/history-list-section-header.js +1 -1
- package/lib/module/components/history/history-list-section-header.js.map +1 -1
- package/lib/module/components/history/history-list.js.map +1 -1
- package/lib/module/components/proof-request/share-credential-card-notice.js.map +1 -1
- package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
- package/lib/module/components/proof-request/v1/share-credential.js +2 -2
- package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
- package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js +2 -2
- package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
- package/lib/module/components/proof-request/v2/share-credential-v2.js +2 -2
- package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
- package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
- package/lib/module/ui-components/accessibility/locale/fi.json +1 -1
- package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
- package/lib/module/ui-components/header/foldable-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-header.js +1 -1
- package/lib/module/ui-components/history/history-section-header.js.map +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js +1 -1
- package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
- package/lib/module/ui-components/icons/entity.js.map +1 -1
- package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
- package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
- package/lib/module/ui-components/settings/button-setting.js +3 -1
- package/lib/module/ui-components/settings/button-setting.js.map +1 -1
- package/lib/module/ui-components/settings/setting-item.js +4 -2
- package/lib/module/ui-components/settings/setting-item.js.map +1 -1
- package/lib/module/ui-components/settings/switch-setting.js +4 -2
- package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/history.js +0 -38
- package/lib/module/utils/history.js.map +1 -1
- package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
- package/lib/module/utils/hooks/core/backup.js +4 -4
- package/lib/module/utils/hooks/core/backup.js.map +1 -1
- package/lib/module/utils/hooks/core/cache.js +11 -11
- package/lib/module/utils/hooks/core/cache.js.map +1 -1
- package/lib/module/utils/hooks/core/core-context.js +5 -5
- package/lib/module/utils/hooks/core/core-context.js.map +1 -1
- package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/credentials.js +4 -4
- package/lib/module/utils/hooks/core/credentials.js.map +1 -1
- package/lib/module/utils/hooks/core/dids.js +2 -2
- package/lib/module/utils/hooks/core/dids.js.map +1 -1
- package/lib/module/utils/hooks/core/history.js +1 -1
- package/lib/module/utils/hooks/core/history.js.map +1 -1
- package/lib/module/utils/hooks/core/identifiers.js +4 -4
- package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
- package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
- package/lib/module/utils/hooks/core/proofs.js +10 -10
- package/lib/module/utils/hooks/core/proofs.js.map +1 -1
- package/lib/module/utils/hooks/core/trust-entity.js +6 -6
- package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
- package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
- package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
- package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
- package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
- package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
- package/lib/module/utils/parsers/credential-images.js +12 -11
- package/lib/module/utils/parsers/credential-images.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing-v2.js +14 -33
- package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
- package/lib/module/utils/parsers/credential-sharing.js +4 -12
- package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
- package/lib/module/utils/parsers/credential.js +32 -33
- package/lib/module/utils/parsers/credential.js.map +1 -1
- package/lib/module/utils/parsers/query.js.map +1 -1
- package/lib/module/utils/url.js.map +1 -1
- package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
- package/lib/typescript/components/credential/credential.d.ts +2 -2
- package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
- package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
- package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
- package/lib/typescript/components/entity/entity-details.d.ts +5 -5
- package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
- package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
- package/lib/typescript/components/history/history-list-item.d.ts +5 -5
- package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
- package/lib/typescript/components/history/history-list.d.ts +5 -5
- package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
- package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
- package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
- package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
- package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
- package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
- package/lib/typescript/ui-components/settings/setting-item.d.ts +1 -0
- package/lib/typescript/utils/history.d.ts +3 -5
- package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/core-context.d.ts +1 -1
- package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
- package/lib/typescript/utils/hooks/core/credentials.d.ts +8 -8
- package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
- package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
- package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
- package/lib/typescript/utils/hooks/core/proofs.d.ts +9 -9
- package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -6
- package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -5
- package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
- package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
- package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -9
- package/lib/typescript/utils/parsers/credential.d.ts +15 -35
- package/lib/typescript/utils/parsers/query.d.ts +8 -8
- package/package.json +6 -4
- package/src/components/backup/preview-credentials.tsx +2 -2
- package/src/components/credential/credential.tsx +2 -2
- package/src/components/entity/EntityButtons.tsx +2 -2
- package/src/components/entity/entity-attributes.tsx +4 -4
- package/src/components/entity/entity-details-with-buttons.tsx +11 -6
- package/src/components/entity/entity-details.tsx +17 -16
- package/src/components/history/history-details-screen.tsx +13 -16
- package/src/components/history/history-list-item-icon.tsx +19 -11
- package/src/components/history/history-list-item.tsx +9 -5
- package/src/components/history/history-list-screen.tsx +4 -4
- package/src/components/history/history-list-section-header.tsx +1 -1
- package/src/components/history/history-list.tsx +6 -6
- package/src/components/proof-request/share-credential-card-notice.tsx +1 -1
- package/src/components/proof-request/v1/select-credential.tsx +2 -2
- package/src/components/proof-request/v1/share-credential.tsx +13 -11
- package/src/components/proof-request/v2/select-credential-v2.tsx +6 -3
- package/src/components/proof-request/v2/share-credential-v2-group.tsx +12 -12
- package/src/components/proof-request/v2/share-credential-v2.tsx +11 -11
- package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +4 -1
- package/src/ui-components/accessibility/locale/fi.json +1 -1
- package/src/ui-components/buttons/ghost-button.stories.tsx +0 -1
- package/src/ui-components/control/checkbox.stories.tsx +1 -1
- package/src/ui-components/control/switch.stories.tsx +1 -1
- package/src/ui-components/credential/card/credential-header.stories.tsx +0 -1
- package/src/ui-components/entity/entity-cluster.tsx +7 -6
- package/src/ui-components/header/foldable-header.tsx +8 -11
- package/src/ui-components/history/history-section-header.tsx +1 -1
- package/src/ui-components/history/history-section-list-item.tsx +1 -1
- package/src/ui-components/icons/entity.tsx +2 -2
- package/src/ui-components/pin/pin-code-screen.stories.tsx +1 -1
- package/src/ui-components/screens/image-preview-screen.stories.tsx +1 -1
- package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
- package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +1 -1
- package/src/ui-components/screens/section-list-screen.tsx +10 -1
- package/src/ui-components/searchbar/search-bar.stories.tsx +0 -1
- package/src/ui-components/settings/button-setting.tsx +2 -1
- package/src/ui-components/settings/setting-item.tsx +9 -2
- package/src/ui-components/settings/switch-setting.tsx +9 -2
- package/src/ui-components/text/typography.stories.tsx +2 -2
- package/src/utils/date.ts +2 -2
- package/src/utils/history.ts +4 -45
- package/src/utils/hooks/connectivity/connectivity.test.ts +2 -2
- package/src/utils/hooks/core/backup.ts +4 -4
- package/src/utils/hooks/core/cache.ts +13 -13
- package/src/utils/hooks/core/core-context.tsx +6 -6
- package/src/utils/hooks/core/credential-schemas.ts +7 -4
- package/src/utils/hooks/core/credentials.ts +21 -13
- package/src/utils/hooks/core/dids.ts +3 -3
- package/src/utils/hooks/core/history.ts +3 -3
- package/src/utils/hooks/core/identifiers.ts +9 -5
- package/src/utils/hooks/core/proof-schemas.ts +21 -16
- package/src/utils/hooks/core/proofs.ts +31 -27
- package/src/utils/hooks/core/trust-entity.ts +19 -12
- package/src/utils/hooks/core/wallet-unit.ts +21 -11
- package/src/utils/hooks/navigation/open-settings.ts +1 -1
- package/src/utils/hooks/revocation/credential-status.ts +2 -2
- package/src/utils/parsers/credential-images.tsx +19 -13
- package/src/utils/parsers/credential-sharing-v2.tsx +32 -48
- package/src/utils/parsers/credential-sharing.tsx +26 -36
- package/src/utils/parsers/credential.ts +64 -61
- package/src/utils/parsers/query.ts +16 -14
- package/src/utils/url.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_credentialCardExpanding","_credential","e","__esModule","default","PreviewCredentials","credentials","labels","onImagePreview","expandedCredential","onHeaderPress","useCredentialListExpandedCard","length","createElement","View","map","credential","index","key","id","CredentialDetails","credentialId","expanded","lastItem","exports"],"sources":["preview-credentials.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_credentialCardExpanding","_credential","e","__esModule","default","PreviewCredentials","credentials","labels","onImagePreview","expandedCredential","onHeaderPress","useCredentialListExpandedCard","length","createElement","View","map","credential","index","key","id","CredentialDetails","credentialId","expanded","lastItem","exports"],"sources":["preview-credentials.tsx"],"sourcesContent":["import { CredentialListItemBindingDto } from '@procivis/react-native-one-core';\nimport React, { FC } from 'react';\nimport { ImageSourcePropType, View } from 'react-native';\n\nimport { useCredentialListExpandedCard } from '../../utils/hooks/credential-card/credential-card-expanding';\nimport { CardLabels } from '../../utils/parsers/credential';\nimport { CredentialDetails } from '../credential/credential';\n\ninterface PreviewCredentialsProps {\n credentials: CredentialListItemBindingDto[] | undefined;\n labels: CardLabels;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n}\n\nexport const PreviewCredentials: FC<PreviewCredentialsProps> = ({ credentials, labels, onImagePreview }) => {\n const { expandedCredential, onHeaderPress } = useCredentialListExpandedCard();\n\n if (!credentials || credentials.length === 0) {\n return null;\n }\n\n return (\n <View>\n {credentials.map((credential, index, { length }) => (\n <View key={credential.id}>\n <CredentialDetails\n credentialId={credential.id}\n expanded={expandedCredential === credential.id}\n labels={labels}\n lastItem={index === length - 1}\n onHeaderPress={onHeaderPress}\n onImagePreview={onImagePreview}\n />\n </View>\n ))}\n </View>\n );\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAA6D,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQtD,MAAMG,kBAA+C,GAAGA,CAAC;EAAEC,WAAW;EAAEC,MAAM;EAAEC;AAAe,CAAC,KAAK;EAC1G,MAAM;IAAEC,kBAAkB;IAAEC;EAAc,CAAC,GAAG,IAAAC,sDAA6B,EAAC,CAAC;EAE7E,IAAI,CAACL,WAAW,IAAIA,WAAW,CAACM,MAAM,KAAK,CAAC,EAAE;IAC5C,OAAO,IAAI;EACb;EAEA,oBACEhB,MAAA,CAAAQ,OAAA,CAAAS,aAAA,CAACd,YAAA,CAAAe,IAAI,QACFR,WAAW,CAACS,GAAG,CAAC,CAACC,UAAU,EAAEC,KAAK,EAAE;IAAEL;EAAO,CAAC,kBAC7ChB,MAAA,CAAAQ,OAAA,CAAAS,aAAA,CAACd,YAAA,CAAAe,IAAI;IAACI,GAAG,EAAEF,UAAU,CAACG;EAAG,gBACvBvB,MAAA,CAAAQ,OAAA,CAAAS,aAAA,CAACZ,WAAA,CAAAmB,iBAAiB;IAChBC,YAAY,EAAEL,UAAU,CAACG,EAAG;IAC5BG,QAAQ,EAAEb,kBAAkB,KAAKO,UAAU,CAACG,EAAG;IAC/CZ,MAAM,EAAEA,MAAO;IACfgB,QAAQ,EAAEN,KAAK,KAAKL,MAAM,GAAG,CAAE;IAC/BF,aAAa,EAAEA,aAAc;IAC7BF,cAAc,EAAEA;EAAe,CAChC,CACG,CACP,CACG,CAAC;AAEX,CAAC;AAACgB,OAAA,CAAAnB,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_card","_utils","_coreConfig","_credentials","_credential","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CredentialDetails","claims","credentialId","expanded","labels","lastItem","onHeaderPress","onImagePreview","headerAccessory","data","credential","useCredentialDetail","config","useCoreConfig","cardWidth","useMemo","Dimensions","width","testID","concatTestID","id","card","attributes","detailsCardFromCredentialWithClaims","header","accessory","createElement","CredentialDetailsCardListItem","style","styles","exports","StyleSheet","create","marginBottom"],"sources":["credential.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_card","_utils","_coreConfig","_credentials","_credential","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CredentialDetails","claims","credentialId","expanded","labels","lastItem","onHeaderPress","onImagePreview","headerAccessory","data","credential","useCredentialDetail","config","useCoreConfig","cardWidth","useMemo","Dimensions","width","testID","concatTestID","id","card","attributes","detailsCardFromCredentialWithClaims","header","accessory","createElement","CredentialDetailsCardListItem","style","styles","exports","StyleSheet","create","marginBottom"],"sources":["credential.tsx"],"sourcesContent":["import { ClaimBindingDto } from '@procivis/react-native-one-core';\nimport React, { FC, useMemo } from 'react';\nimport { Dimensions, ImageSourcePropType, StyleSheet } from 'react-native';\n\nimport { CredentialDetailsCardListItem, CredentialHeaderProps } from '../../ui-components/credential/card';\nimport { concatTestID } from '../../utils';\nimport { useCoreConfig } from '../../utils/hooks/core/core-config';\nimport { useCredentialDetail } from '../../utils/hooks/core/credentials';\nimport { CardLabels, detailsCardFromCredentialWithClaims } from '../../utils/parsers/credential';\n\nexport interface CredentialDetailsProps {\n claims?: ClaimBindingDto[];\n credentialId: string;\n expanded?: boolean;\n headerAccessory?: CredentialHeaderProps['accessory'];\n labels: CardLabels;\n lastItem?: boolean;\n onHeaderPress?: (credentialId?: string) => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n}\n\nexport const CredentialDetails: FC<CredentialDetailsProps> = ({\n claims,\n credentialId,\n expanded = false,\n labels,\n lastItem,\n onHeaderPress,\n onImagePreview,\n headerAccessory,\n}) => {\n const { data: credential } = useCredentialDetail(credentialId);\n const { data: config } = useCoreConfig();\n const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);\n\n if (!credential || !config) {\n return null;\n }\n const testID = concatTestID('Credential.credential', credential.id);\n\n const { card, attributes } = detailsCardFromCredentialWithClaims(\n credential,\n claims ?? credential.claims,\n config,\n testID,\n labels,\n );\n if (headerAccessory) {\n card.header.accessory = headerAccessory;\n }\n\n return (\n <CredentialDetailsCardListItem\n attributes={attributes}\n card={{\n ...card,\n credentialId,\n onHeaderPress,\n width: cardWidth,\n }}\n expanded={expanded}\n lastItem={lastItem}\n onImagePreview={onImagePreview}\n style={styles.credential}\n testID={testID}\n />\n );\n};\n\nconst styles = StyleSheet.create({\n credential: {\n marginBottom: 8,\n },\n});\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAAiG,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SA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AAmC,EAC9Db,UAAU,EACVT,MAAM,aAANA,MAAM,cAANA,MAAM,GAAIS,UAAU,CAACT,MAAM,EAC3BW,MAAM,EACNM,MAAM,EACNd,MACF,CAAC;EACD,IAAII,eAAe,EAAE;IACnBa,IAAI,CAACG,MAAM,CAACC,SAAS,GAAGjB,eAAe;EACzC;EAEA,oBACErC,MAAA,CAAAe,OAAA,CAAAwC,aAAA,CAACnD,KAAA,CAAAoD,6BAA6B;IAC5BL,UAAU,EAAEA,UAAW;IACvBD,IAAI,EAAE;MACJ,GAAGA,IAAI;MACPnB,YAAY;MACZI,aAAa;MACbW,KAAK,EAAEH;IACT,CAAE;IACFX,QAAQ,EAAEA,QAAS;IACnBE,QAAQ,EAAEA,QAAS;IACnBE,cAAc,EAAEA,cAAe;IAC/BqB,KAAK,EAAEC,MAAM,CAACnB,UAAW;IACzBQ,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC;AAACY,OAAA,CAAA9B,iBAAA,GAAAA,iBAAA;AAEF,MAAM6B,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BtB,UAAU,EAAE;IACVuB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_buttons","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EntityButtons","entity","labels","testID","buttons","useMemo","label","visitWebsite","url","website","termsAndServices","termsUrl","privacyPolicy","privacyUrl","filter","btn","Boolean","openURL","useCallback","Linking","catch","reportException","createElement","View","style","styles","map","testIdSuffix","Button","key","title","onPress","urlButton","concatTestID","type","ButtonType","SmallTech","StyleSheet","create","paddingBottom","paddingHorizontal","borderRadius","borderWidth","marginTop","_default","exports","memo"],"sources":["EntityButtons.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_buttons","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","EntityButtons","entity","labels","testID","buttons","useMemo","label","visitWebsite","url","website","termsAndServices","termsUrl","privacyPolicy","privacyUrl","filter","btn","Boolean","openURL","useCallback","Linking","catch","reportException","createElement","View","style","styles","map","testIdSuffix","Button","key","title","onPress","urlButton","concatTestID","type","ButtonType","SmallTech","StyleSheet","create","paddingBottom","paddingHorizontal","borderRadius","borderWidth","marginTop","_default","exports","memo"],"sources":["EntityButtons.tsx"],"sourcesContent":["import { GetTrustEntityResponseBindingDto } from '@procivis/react-native-one-core';\nimport React, { FC, memo, useCallback, useMemo } from 'react';\nimport { Linking, StyleSheet, View } from 'react-native';\n\nimport { Button, ButtonType } from '../../ui-components/buttons';\nimport { EntityLabels } from '../../ui-components/screens/nerd-mode-screen';\nimport { concatTestID, reportException } from '../../utils';\n\nexport interface EntityButton {\n url: string;\n label: string;\n}\n\ninterface EntityButtonsProps {\n entity?: GetTrustEntityResponseBindingDto;\n labels: EntityLabels;\n testID?: string;\n}\n\nconst EntityButtons: FC<EntityButtonsProps> = ({ entity, labels, testID }) => {\n const buttons = useMemo(\n () =>\n [\n {\n label: labels.visitWebsite,\n url: entity?.website || '',\n testID: 'website',\n },\n {\n label: labels.termsAndServices,\n url: entity?.termsUrl || '',\n testID: 'termsOfService',\n },\n {\n label: labels.privacyPolicy,\n url: entity?.privacyUrl || '',\n testID: 'privacyPolicy',\n },\n ].filter((btn) => Boolean(btn.url)),\n [entity, labels],\n );\n\n const openURL = useCallback(\n (url: string) => () => {\n Linking.openURL(url).catch((e) => {\n reportException(e, 'Error opening entity link');\n });\n },\n [],\n );\n return (\n <View style={[styles.buttons]} testID={testID}>\n {buttons.map(({ label, url, testID: testIdSuffix }) => (\n <Button\n key={label}\n title={label}\n onPress={openURL(url)}\n style={styles.urlButton}\n testID={concatTestID(testID, testIdSuffix)}\n type={ButtonType.SmallTech}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n buttons: {\n paddingBottom: 10,\n paddingHorizontal: 12,\n },\n urlButton: {\n borderRadius: 4,\n borderWidth: 0,\n marginTop: 4,\n },\n});\n\nexport default memo(EntityButtons);\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,MAAA,GAAAH,OAAA;AAA4D,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,c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AAA,CAAAoC,aAAA,CAAC7C,YAAA,CAAA8C,IAAI;IAACC,KAAK,EAAE,CAACC,MAAM,CAACrB,OAAO,CAAE;IAACD,MAAM,EAAEA;EAAO,GAC3CC,OAAO,CAACsB,GAAG,CAAC,CAAC;IAAEpB,KAAK;IAAEE,GAAG;IAAEL,MAAM,EAAEwB;EAAa,CAAC,kBAChDrD,MAAA,CAAAY,OAAA,CAAAoC,aAAA,CAAC5C,QAAA,CAAAkD,MAAM;IACLC,GAAG,EAAEvB,KAAM;IACXwB,KAAK,EAAExB,KAAM;IACbyB,OAAO,EAAEd,OAAO,CAACT,GAAG,CAAE;IACtBgB,KAAK,EAAEC,MAAM,CAACO,SAAU;IACxB7B,MAAM,EAAE,IAAA8B,mBAAY,EAAC9B,MAAM,EAAEwB,YAAY,CAAE;IAC3CO,IAAI,EAAEC,mBAAU,CAACC;EAAU,CAC5B,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAMX,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BlC,OAAO,EAAE;IACPmC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE;EACrB,CAAC;EACDR,SAAS,EAAE;IACTS,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA3D,OAAA,gBAEY,IAAA4D,WAAI,EAAC9C,aAAa,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nerdView","_nerdModeScreen","_array","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityAttributes","certificate","did","trustEntity","trusted","labels","entityType","testID","onCopyToClipboard","_did$split","didSections","split","identifier","pop","didMethod","join","attributes","addElementIf","attributeKey","trustRegistry","highlightedText","trustAnchor","name","Boolean","EntityType","CredentialEntity","issuerIdentifier","entityIdentifier","attributeText","canBeCopied","role","createElement","View","style","styles","wrapper","map","attribute","NerdModeItem","key","StyleSheet","create","marginBottom","_default","exports","memo"],"sources":["entity-attributes.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_nerdView","_nerdModeScreen","_array","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityAttributes","certificate","did","trustEntity","trusted","labels","entityType","testID","onCopyToClipboard","_did$split","didSections","split","identifier","pop","didMethod","join","attributes","addElementIf","attributeKey","trustRegistry","highlightedText","trustAnchor","name","Boolean","EntityType","CredentialEntity","issuerIdentifier","entityIdentifier","attributeText","canBeCopied","role","createElement","View","style","styles","wrapper","map","attribute","NerdModeItem","key","StyleSheet","create","marginBottom","_default","exports","memo"],"sources":["entity-attributes.tsx"],"sourcesContent":["import { GetTrustEntityResponseBindingDto } from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport { NerdModeItem } from '../../ui-components/nerd-view';\nimport { AttributesLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { addElementIf } from '../../utils/array';\n\ninterface EntityAttributesProps {\n certificate?: string;\n did?: string;\n trustEntity?: GetTrustEntityResponseBindingDto;\n trusted: boolean;\n labels: AttributesLabels;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n testID?: string;\n}\n\nconst EntityAttributes: FC<EntityAttributesProps> = ({\n certificate,\n did,\n trustEntity,\n trusted,\n labels,\n entityType,\n testID,\n onCopyToClipboard,\n}) => {\n const didSections = did?.split(':') ?? [];\n const identifier = didSections.pop();\n const didMethod = didSections.length ? didSections.join(':') + ':' : '';\n\n const attributes = [\n ...addElementIf(trusted, {\n attributeKey: labels.trustRegistry,\n highlightedText: trustEntity?.trustAnchor.name,\n testID: 'trustRegistry',\n }),\n ...addElementIf(Boolean(did), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: identifier,\n canBeCopied: true,\n highlightedText: didMethod,\n testID: 'issuerDID',\n }),\n ...addElementIf(Boolean(certificate), {\n attributeKey: entityType === EntityType.CredentialEntity ? labels.issuerIdentifier : labels.entityIdentifier,\n attributeText: certificate,\n canBeCopied: true,\n testID: 'issuerCertificate',\n }),\n ...addElementIf(trusted && Boolean(trustEntity?.role), {\n attributeKey: labels.role,\n highlightedText: trustEntity?.role,\n testID: 'role',\n }),\n ];\n return (\n <View style={styles.wrapper}>\n {attributes.map((attribute) => (\n <NerdModeItem\n key={attribute.attributeKey}\n {...attribute}\n labels={labels}\n onCopyToClipboard={onCopyToClipboard}\n testID={testID}\n />\n ))}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n marginBottom: 20,\n },\n});\n\nexport default memo(EntityAttributes);\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAiD,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA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AAW,uBAAXA,WAAW,CAAE2B,IAAI,CAAC,EAAE;IACrDZ,YAAY,EAAEb,MAAM,CAACyB,IAAI;IACzBV,eAAe,EAAEjB,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAE2B,IAAI;IAClCvB,MAAM,EAAE;EACV,CAAC,CAAC,CACH;EACD,oBACExC,MAAA,CAAAa,OAAA,CAAAmD,aAAA,CAAC7D,YAAA,CAAA8D,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAQ,GACzBnB,UAAU,CAACoB,GAAG,CAAEC,SAAS,iBACxBtE,MAAA,CAAAa,OAAA,CAAAmD,aAAA,CAAC5D,SAAA,CAAAmE,YAAY,EAAA5C,QAAA;IACX6C,GAAG,EAAEF,SAAS,CAACnB;EAAa,GACxBmB,SAAS;IACbhC,MAAM,EAAEA,MAAO;IACfG,iBAAiB,EAAEA,iBAAkB;IACrCD,MAAM,EAAEA;EAAO,EAChB,CACF,CACG,CAAC;AAEX,CAAC;AAED,MAAM2B,MAAM,GAAGM,uBAAU,CAACC,MAAM,CAAC;EAC/BN,OAAO,EAAE;IACPO,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhE,OAAA,gBAEY,IAAAiE,WAAI,EAAC7C,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -36,7 +36,7 @@ const EntityDetailsWithButtons = ({
|
|
|
36
36
|
} = (0, _utils.useIdentifierDetails)(identifier === null || identifier === void 0 ? void 0 : identifier.id);
|
|
37
37
|
const trustEntity = data !== null && data !== void 0 ? data : undefined;
|
|
38
38
|
const colorScheme = (0, _colorSchemeContext.useAppColorScheme)();
|
|
39
|
-
const trusted = Boolean(trustEntity && trustEntity.state === _reactNativeOneCore.
|
|
39
|
+
const trusted = Boolean(trustEntity && trustEntity.state === _reactNativeOneCore.TrustEntityStateBindingEnum.ACTIVE && (trustEntity.role === _reactNativeOneCore.TrustEntityRoleBindingEnum.BOTH || trustEntity.role === role));
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
41
41
|
style: {
|
|
42
42
|
backgroundColor: colorScheme.nerdView.background
|
|
@@ -44,7 +44,7 @@ const EntityDetailsWithButtons = ({
|
|
|
44
44
|
}, /*#__PURE__*/_react.default.createElement(_entityDetails.default, _extends({
|
|
45
45
|
identifier: identifier,
|
|
46
46
|
labels: {
|
|
47
|
-
unknown: role === _reactNativeOneCore.
|
|
47
|
+
unknown: role === _reactNativeOneCore.TrustEntityRoleBindingEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier
|
|
48
48
|
},
|
|
49
49
|
role: role,
|
|
50
50
|
testID: testID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_reactNative","_colorSchemeContext","_utils","_trustEntity","_entityAttributes","_interopRequireDefault","_entityDetails","_EntityButtons","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityDetailsWithButtons","identifier","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","_identifierDetail$cer","_identifierDetail$did","data","useTrustEntity","id","identifierDetail","useIdentifierDetails","trustEntity","undefined","colorScheme","useAppColorScheme","trusted","Boolean","state","
|
|
1
|
+
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_reactNative","_colorSchemeContext","_utils","_trustEntity","_entityAttributes","_interopRequireDefault","_entityDetails","_EntityButtons","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","EntityDetailsWithButtons","identifier","entityLabels","attributesLabels","onCopyToClipboard","role","entityType","testID","props","_identifierDetail$cer","_identifierDetail$did","data","useTrustEntity","id","identifierDetail","useIdentifierDetails","trustEntity","undefined","colorScheme","useAppColorScheme","trusted","Boolean","state","TrustEntityStateBindingEnum","ACTIVE","TrustEntityRoleBindingEnum","BOTH","createElement","View","style","backgroundColor","nerdView","background","labels","unknown","ISSUER","unknownIssuer","unknownVerifier","entity","concatTestID","certificate","certificates","chain","did","_default","exports","memo"],"sources":["entity-details-with-buttons.tsx"],"sourcesContent":["import {\n GetIdentifierListItemBindingDto,\n TrustEntityRoleBindingEnum,\n TrustEntityStateBindingEnum,\n} from '@procivis/react-native-one-core';\nimport React, { FC, memo } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport { AttributesLabels, EntityLabels, EntityType } from '../../ui-components/screens/nerd-mode-screen';\nimport { useAppColorScheme } from '../../ui-components/theme/color-scheme-context';\nimport { concatTestID, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\nimport EntityAttributes from './entity-attributes';\nimport EntityDetails from './entity-details';\nimport EntityButtons from './EntityButtons';\n\nexport type ContextRole = Exclude<TrustEntityRoleBindingEnum, TrustEntityRoleBindingEnum.BOTH>;\n\ninterface EntityDetailsWithButtonsProps {\n identifier?: GetIdentifierListItemBindingDto;\n entityLabels: EntityLabels;\n attributesLabels: AttributesLabels;\n style?: StyleProp<ViewStyle>;\n textColor?: string;\n testID?: string;\n role: ContextRole;\n onCopyToClipboard: (value: string) => void;\n entityType: EntityType;\n}\n\nconst EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({\n identifier,\n entityLabels,\n attributesLabels,\n onCopyToClipboard,\n role,\n entityType,\n testID,\n ...props\n}) => {\n let { data } = useTrustEntity(identifier?.id);\n let { data: identifierDetail } = useIdentifierDetails(identifier?.id);\n const trustEntity = data ?? undefined;\n\n const colorScheme = useAppColorScheme();\n\n const trusted = Boolean(\n trustEntity &&\n trustEntity.state === TrustEntityStateBindingEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleBindingEnum.BOTH || trustEntity.role === role),\n );\n\n return (\n <View style={{ backgroundColor: colorScheme.nerdView.background }}>\n <EntityDetails\n identifier={identifier}\n labels={{\n unknown:\n role === TrustEntityRoleBindingEnum.ISSUER ? entityLabels.unknownIssuer : entityLabels.unknownVerifier,\n }}\n role={role}\n testID={testID}\n {...props}\n />\n {trusted && <EntityButtons entity={trustEntity} labels={entityLabels} testID={concatTestID(testID, 'links')} />}\n <EntityAttributes\n certificate={identifierDetail?.certificates?.[0]?.chain}\n did={identifierDetail?.did?.did}\n trustEntity={trustEntity}\n trusted={trusted}\n labels={attributesLabels}\n onCopyToClipboard={onCopyToClipboard}\n entityType={entityType}\n testID={testID}\n />\n </View>\n );\n};\n\nexport default memo(EntityDetailsWithButtons);\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAGA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,cAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,cAAA,GAAAF,sBAAA,CAAAR,OAAA;AAA4C,SAAAQ,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CA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A,CAAAG,OAAa;IAAC8D,MAAM,EAAEtB,WAAY;IAACiB,MAAM,EAAE/B,YAAa;IAACK,MAAM,EAAE,IAAAgC,mBAAY,EAAChC,MAAM,EAAE,OAAO;EAAE,CAAE,CAAC,eAC/G3C,MAAA,CAAAY,OAAA,CAAAmD,aAAA,CAACzD,iBAAA,CAAAM,OAAgB;IACfgE,WAAW,EAAE1B,gBAAgB,aAAhBA,gBAAgB,gBAAAL,qBAAA,GAAhBK,gBAAgB,CAAE2B,YAAY,cAAAhC,qBAAA,gBAAAA,qBAAA,GAA9BA,qBAAA,CAAiC,CAAC,CAAC,cAAAA,qBAAA,uBAAnCA,qBAAA,CAAqCiC,KAAM;IACxDC,GAAG,EAAE7B,gBAAgB,aAAhBA,gBAAgB,gBAAAJ,qBAAA,GAAhBI,gBAAgB,CAAE6B,GAAG,cAAAjC,qBAAA,uBAArBA,qBAAA,CAAuBiC,GAAI;IAChC3B,WAAW,EAAEA,WAAY;IACzBI,OAAO,EAAEA,OAAQ;IACjBa,MAAM,EAAE9B,gBAAiB;IACzBC,iBAAiB,EAAEA,iBAAkB;IACrCE,UAAU,EAAEA,UAAW;IACvBC,MAAM,EAAEA;EAAO,CAChB,CACG,CAAC;AAEX,CAAC;AAAC,IAAAqC,QAAA,GAAAC,OAAA,CAAArE,OAAA,gBAEa,IAAAsE,WAAI,EAAC9C,wBAAwB,CAAC","ignoreList":[]}
|
|
@@ -37,7 +37,7 @@ const EntityDetails = ({
|
|
|
37
37
|
data: identifierDetail,
|
|
38
38
|
isLoading: isLoadingIdentifier
|
|
39
39
|
} = (0, _utils.useIdentifierDetails)('identifier' in props ? (_props$identifier2 = props.identifier) === null || _props$identifier2 === void 0 ? void 0 : _props$identifier2.id : undefined);
|
|
40
|
-
const trusted = trustEntity && trustEntity.state === _reactNativeOneCore.
|
|
40
|
+
const trusted = trustEntity && trustEntity.state === _reactNativeOneCore.TrustEntityStateBindingEnum.ACTIVE && (trustEntity.role === _reactNativeOneCore.TrustEntityRoleBindingEnum.BOTH || trustEntity.role === role);
|
|
41
41
|
const isLoading = isLoadingIdentifier || isLoadingTrustEntity;
|
|
42
42
|
const avatarProps = (0, _react.useMemo)(() => {
|
|
43
43
|
var _identifierDetail$cer, _getCertificateCommon;
|
|
@@ -49,7 +49,7 @@ const EntityDetails = ({
|
|
|
49
49
|
uri: trustEntity.logo
|
|
50
50
|
}
|
|
51
51
|
} : undefined;
|
|
52
|
-
const placeholderText = (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === _reactNativeOneCore.
|
|
52
|
+
const placeholderText = (identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === _reactNativeOneCore.IdentifierTypeBindingEnum.CERTIFICATE && (_identifierDetail$cer = identifierDetail.certificates) !== null && _identifierDetail$cer !== void 0 && _identifierDetail$cer[0] ? (_getCertificateCommon = getCertificateCommonName(identifierDetail.certificates[0])) === null || _getCertificateCommon === void 0 ? void 0 : _getCertificateCommon.substring(0, 1) : 'D';
|
|
53
53
|
const statusIcon = trusted ? /*#__PURE__*/_react.default.createElement(_icons.EntityTrustedIcon, {
|
|
54
54
|
testID: (0, _utils.concatTestID)(testID, 'statusIcon', 'trusted')
|
|
55
55
|
}) : /*#__PURE__*/_react.default.createElement(_icons.EntityNotTrustedIcon, {
|
|
@@ -73,7 +73,7 @@ const EntityDetails = ({
|
|
|
73
73
|
if (isLoading) {
|
|
74
74
|
return '';
|
|
75
75
|
}
|
|
76
|
-
if ((identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === _reactNativeOneCore.
|
|
76
|
+
if ((identifierDetail === null || identifierDetail === void 0 ? void 0 : identifierDetail.type) === _reactNativeOneCore.IdentifierTypeBindingEnum.CERTIFICATE && (_identifierDetail$cer2 = identifierDetail.certificates) !== null && _identifierDetail$cer2 !== void 0 && _identifierDetail$cer2[0]) {
|
|
77
77
|
const commonName = getCertificateCommonName(identifierDetail.certificates[0]);
|
|
78
78
|
if (commonName) {
|
|
79
79
|
return commonName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_entityCluster","_interopRequireDefault","_icons","_utils","_trustEntity","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getCertificateCommonName","certificate","_certificate$x509Attr","x509Attributes","subject","split","find","s","startsWith","pop","EntityDetails","labels","renderMore","role","style","testID","sublineColor","textColor","props","_props$identifier","_props$identifier2","data","isLoading","isLoadingTrustEntity","useTrustEntity","identifier","id","undefined","trustEntity","entity","identifierDetail","isLoadingIdentifier","useIdentifierDetails","trusted","state","TrustEntityStateEnum","ACTIVE","TrustEntityRoleEnum","BOTH","avatarProps","useMemo","_identifierDetail$cer","_getCertificateCommon","avatar","type","logo","imageSource","uri","placeholderText","IdentifierTypeEnum","CERTIFICATE","certificates","substring","statusIcon","createElement","EntityTrustedIcon","concatTestID","EntityNotTrustedIcon","name","trustEntityName","_identifierDetail$cer2","_identifierDetail$did","commonName","did","replaceBreakingHyphens","unknown","Fragment","entityName","_default","exports"],"sources":["entity-details.tsx"],"sourcesContent":["import {\n IdentifierCertificateDetail,\n IdentifierListItem,\n IdentifierTypeEnum,\n TrustEntity,\n TrustEntityRoleEnum,\n TrustEntityStateEnum,\n} from '@procivis/react-native-one-core';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { AvatarProps } from '../../ui-components';\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: TrustEntity) => ReactNode;\n role: Exclude<TrustEntityRoleEnum, TrustEntityRoleEnum.BOTH>;\n style?: StyleProp<ViewStyle>;\n sublineColor?: string;\n textColor?: string;\n testID?: string;\n} & (\n | {\n identifier?: IdentifierListItem;\n }\n | {\n entity: TrustEntity;\n }\n);\n\nconst getCertificateCommonName = (certificate: IdentifierCertificateDetail): string | undefined => {\n return certificate.x509Attributes.subject\n .split(', ')\n .find((s) => s.startsWith('CN'))\n ?.split('=')\n ?.pop();\n};\n\nconst EntityDetails: FC<EntityDetailsProps> = ({\n labels,\n renderMore,\n role,\n style,\n testID,\n sublineColor,\n textColor,\n ...props\n}) => {\n const { data, isLoading: isLoadingTrustEntity } = useTrustEntity(\n 'identifier' in props ? props.identifier?.id : undefined,\n );\n const trustEntity: TrustEntity | undefined = 'entity' in props ? props.entity : data ?? undefined;\n const { data: identifierDetail, isLoading: isLoadingIdentifier } = useIdentifierDetails(\n 'identifier' in props ? props.identifier?.id : undefined,\n );\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityStateEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleEnum.BOTH || trustEntity.role === role);\n\n const isLoading = isLoadingIdentifier || isLoadingTrustEntity;\n\n const avatarProps: AvatarProps | undefined = useMemo(() => {\n if (isLoading) {\n return undefined;\n }\n\n const avatar =\n trusted && identifierDetail?.type === 'DID' && trustEntity.logo\n ? { imageSource: { uri: trustEntity.logo } }\n : undefined;\n\n const placeholderText =\n identifierDetail?.type === IdentifierTypeEnum.CERTIFICATE && identifierDetail.certificates?.[0]\n ? getCertificateCommonName(identifierDetail.certificates[0])?.substring(0, 1)\n : 'D';\n\n const statusIcon = trusted ? (\n <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />\n ) : (\n <EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />\n );\n\n if (trustEntity) {\n return {\n avatar,\n placeholderText:\n trusted && identifierDetail?.type === 'DID' ? trustEntity.name.substring(0, 1) : placeholderText,\n statusIcon,\n testID: concatTestID(testID, 'avatar'),\n };\n }\n\n return {\n placeholderText,\n statusIcon,\n };\n }, [trustEntity, trusted, identifierDetail, isLoading, testID]);\n\n const trustEntityName = useMemo(() => {\n if (isLoading) {\n return '';\n }\n if (identifierDetail?.type === IdentifierTypeEnum.CERTIFICATE && identifierDetail.certificates?.[0]) {\n const commonName = getCertificateCommonName(identifierDetail.certificates[0]);\n if (commonName) {\n return commonName;\n }\n }\n if (trustEntity) {\n return trustEntity.name;\n }\n if (identifierDetail?.did?.did) {\n return replaceBreakingHyphens(identifierDetail.did.did);\n }\n\n return labels.unknown;\n }, [labels.unknown, trustEntity, identifierDetail, isLoading]);\n\n return (\n <>\n <EntityCluster\n avatar={avatarProps}\n entityName={trustEntityName}\n style={style}\n testID={testID}\n textColor={textColor}\n sublineColor={sublineColor}\n isLoading={isLoading}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAIA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAAqE,SAAAI,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAA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rBD,YAAY,EAAEA,YAAa;IAC3BM,SAAS,EAAEA;EAAU,CACtB,CAAC,EACDM,WAAW,IAAIhB,UAAU,IAAIA,UAAU,CAACgB,WAAW,CACpD,CAAC;AAEP,CAAC;AAAC,IAAAwC,QAAA,GAAAC,OAAA,CAAAvF,OAAA,GAEa4B,aAAa","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_entityCluster","_interopRequireDefault","_icons","_utils","_trustEntity","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","getCertificateCommonName","certificate","_certificate$x509Attr","x509Attributes","subject","split","find","s","startsWith","pop","EntityDetails","labels","renderMore","role","style","testID","sublineColor","textColor","props","_props$identifier","_props$identifier2","data","isLoading","isLoadingTrustEntity","useTrustEntity","identifier","id","undefined","trustEntity","entity","identifierDetail","isLoadingIdentifier","useIdentifierDetails","trusted","state","TrustEntityStateBindingEnum","ACTIVE","TrustEntityRoleBindingEnum","BOTH","avatarProps","useMemo","_identifierDetail$cer","_getCertificateCommon","avatar","type","logo","imageSource","uri","placeholderText","IdentifierTypeBindingEnum","CERTIFICATE","certificates","substring","statusIcon","createElement","EntityTrustedIcon","concatTestID","EntityNotTrustedIcon","name","trustEntityName","_identifierDetail$cer2","_identifierDetail$did","commonName","did","replaceBreakingHyphens","unknown","Fragment","entityName","_default","exports"],"sources":["entity-details.tsx"],"sourcesContent":["import {\n CertificateResponseBindingDto,\n GetIdentifierListItemBindingDto,\n GetTrustEntityResponseBindingDto,\n IdentifierTypeBindingEnum,\n TrustEntityRoleBindingEnum,\n TrustEntityStateBindingEnum,\n} from '@procivis/react-native-one-core';\nimport React, { FC, ReactNode, useMemo } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\n\nimport { AvatarProps } from '../../ui-components';\nimport EntityCluster from '../../ui-components/entity/entity-cluster';\nimport { EntityNotTrustedIcon, EntityTrustedIcon } from '../../ui-components/icons';\nimport { concatTestID, replaceBreakingHyphens, useIdentifierDetails } from '../../utils';\nimport { useTrustEntity } from '../../utils/hooks/core/trust-entity';\n\nexport type EntityDetailsLabels = {\n unknown: string;\n};\n\nexport type EntityDetailsProps = {\n labels: EntityDetailsLabels;\n renderMore?: (trustEntity: GetTrustEntityResponseBindingDto) => ReactNode;\n role: Exclude<TrustEntityRoleBindingEnum, TrustEntityRoleBindingEnum.BOTH>;\n style?: StyleProp<ViewStyle>;\n sublineColor?: string;\n textColor?: string;\n testID?: string;\n} & (\n | {\n identifier?: GetIdentifierListItemBindingDto;\n }\n | {\n entity: GetTrustEntityResponseBindingDto;\n }\n);\n\nconst getCertificateCommonName = (certificate: CertificateResponseBindingDto): string | undefined => {\n return certificate.x509Attributes.subject\n .split(', ')\n .find((s) => s.startsWith('CN'))\n ?.split('=')\n ?.pop();\n};\n\nconst EntityDetails: FC<EntityDetailsProps> = ({\n labels,\n renderMore,\n role,\n style,\n testID,\n sublineColor,\n textColor,\n ...props\n}) => {\n const { data, isLoading: isLoadingTrustEntity } = useTrustEntity(\n 'identifier' in props ? props.identifier?.id : undefined,\n );\n const trustEntity: GetTrustEntityResponseBindingDto | undefined =\n 'entity' in props ? props.entity : data ?? undefined;\n const { data: identifierDetail, isLoading: isLoadingIdentifier } = useIdentifierDetails(\n 'identifier' in props ? props.identifier?.id : undefined,\n );\n\n const trusted =\n trustEntity &&\n trustEntity.state === TrustEntityStateBindingEnum.ACTIVE &&\n (trustEntity.role === TrustEntityRoleBindingEnum.BOTH || trustEntity.role === role);\n\n const isLoading = isLoadingIdentifier || isLoadingTrustEntity;\n\n const avatarProps: AvatarProps | undefined = useMemo(() => {\n if (isLoading) {\n return undefined;\n }\n\n const avatar =\n trusted && identifierDetail?.type === 'DID' && trustEntity.logo\n ? { imageSource: { uri: trustEntity.logo } }\n : undefined;\n\n const placeholderText =\n identifierDetail?.type === IdentifierTypeBindingEnum.CERTIFICATE && identifierDetail.certificates?.[0]\n ? getCertificateCommonName(identifierDetail.certificates[0])?.substring(0, 1)\n : 'D';\n\n const statusIcon = trusted ? (\n <EntityTrustedIcon testID={concatTestID(testID, 'statusIcon', 'trusted')} />\n ) : (\n <EntityNotTrustedIcon testID={concatTestID(testID, 'statusIcon', 'notTrusted')} />\n );\n\n if (trustEntity) {\n return {\n avatar,\n placeholderText:\n trusted && identifierDetail?.type === 'DID' ? trustEntity.name.substring(0, 1) : placeholderText,\n statusIcon,\n testID: concatTestID(testID, 'avatar'),\n };\n }\n\n return {\n placeholderText,\n statusIcon,\n };\n }, [trustEntity, trusted, identifierDetail, isLoading, testID]);\n\n const trustEntityName = useMemo(() => {\n if (isLoading) {\n return '';\n }\n if (identifierDetail?.type === IdentifierTypeBindingEnum.CERTIFICATE && identifierDetail.certificates?.[0]) {\n const commonName = getCertificateCommonName(identifierDetail.certificates[0]);\n if (commonName) {\n return commonName;\n }\n }\n if (trustEntity) {\n return trustEntity.name;\n }\n if (identifierDetail?.did?.did) {\n return replaceBreakingHyphens(identifierDetail.did.did);\n }\n\n return labels.unknown;\n }, [labels.unknown, trustEntity, identifierDetail, isLoading]);\n\n return (\n <>\n <EntityCluster\n avatar={avatarProps}\n entityName={trustEntityName}\n style={style}\n testID={testID}\n textColor={textColor}\n sublineColor={sublineColor}\n isLoading={isLoading}\n />\n {trustEntity && renderMore && renderMore(trustEntity)}\n </>\n );\n};\n\nexport default EntityDetails;\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAQA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAIA,IAAAG,cAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAAqE,SAAAI,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EA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oBACEjD,MAAA,CAAAS,OAAA,CAAAwE,aAAA,CAAAjF,MAAA,CAAAS,OAAA,CAAAoF,QAAA,qBACE7F,MAAA,CAAAS,OAAA,CAAAwE,aAAA,CAAC/E,cAAA,CAAAO,OAAa;IACZ6D,MAAM,EAAEJ,WAAY;IACpB4B,UAAU,EAAER,eAAgB;IAC5B7C,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfE,SAAS,EAAEA,SAAU;IACrBD,YAAY,EAAEA,YAAa;IAC3BM,SAAS,EAAEA;EAAU,CACtB,CAAC,EACDM,WAAW,IAAIhB,UAAU,IAAIA,UAAU,CAACgB,WAAW,CACpD,CAAC;AAEP,CAAC;AAAC,IAAAwC,QAAA,GAAAC,OAAA,CAAAvF,OAAA,GAEa4B,aAAa","ignoreList":[]}
|
|
@@ -13,17 +13,17 @@ var _historyListItemIcon = require("./history-list-item-icon");
|
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
const getStatusTextColor = (action, colorScheme) => {
|
|
15
15
|
switch (action) {
|
|
16
|
-
case _reactNativeOneCore.
|
|
17
|
-
case _reactNativeOneCore.
|
|
18
|
-
case _reactNativeOneCore.
|
|
19
|
-
case _reactNativeOneCore.
|
|
20
|
-
case _reactNativeOneCore.
|
|
21
|
-
case _reactNativeOneCore.
|
|
16
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.CLAIMS_REMOVED:
|
|
17
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.DEACTIVATED:
|
|
18
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.DELETED:
|
|
19
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.REJECTED:
|
|
20
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.REVOKED:
|
|
21
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.ERRORED:
|
|
22
22
|
return colorScheme.errorText;
|
|
23
|
-
case _reactNativeOneCore.
|
|
24
|
-
case _reactNativeOneCore.
|
|
25
|
-
case _reactNativeOneCore.
|
|
26
|
-
case _reactNativeOneCore.
|
|
23
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.SUSPENDED:
|
|
24
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.OFFERED:
|
|
25
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.PENDING:
|
|
26
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.REQUESTED:
|
|
27
27
|
return colorScheme.text;
|
|
28
28
|
default:
|
|
29
29
|
return colorScheme.successText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireDefault","_uiComponents","_historyDetails","_utils","_historyListItemIcon","e","__esModule","default","getStatusTextColor","action","colorScheme","
|
|
1
|
+
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireDefault","_uiComponents","_historyDetails","_utils","_historyListItemIcon","e","__esModule","default","getStatusTextColor","action","colorScheme","HistoryActionBindingEnum","CLAIMS_REMOVED","DEACTIVATED","DELETED","REJECTED","REVOKED","ERRORED","errorText","SUSPENDED","OFFERED","PENDING","REQUESTED","text","successText","HistoryDetailsScreen","assets","dataHeader","headerButton","item","labels","onBackPressed","onInfoPressed","onImagePreview","testID","_formatDateTimeLocali","useAppColorScheme","actionValueColor","createElement","HistoryDetailsView","data","header","date","formatDateTimeLocalized","Date","createdDate","icon","getHistoryItemActionIcon","label","capitalizeFirstLetter","actions","color","concatTestID","exports"],"sources":["history-details-screen.tsx"],"sourcesContent":["import { HistoryActionBindingEnum, HistoryListItemBindingDto } from '@procivis/react-native-one-core';\nimport React, { FC, ReactElement } from 'react';\nimport { ImageSourcePropType } from 'react-native';\n\nimport { ColorScheme, useAppColorScheme } from '../../ui-components';\nimport {\n HistoryDetailsLabels,\n HistoryDetailsView,\n HistoryDetailsViewProps,\n} from '../../ui-components/history/history-details';\nimport { capitalizeFirstLetter, concatTestID, formatDateTimeLocalized } from '../../utils';\nimport { HistoryListItemLabels } from './history-list-item';\nimport { getHistoryItemActionIcon } from './history-list-item-icon';\n\nconst getStatusTextColor = (action: HistoryActionBindingEnum, colorScheme: Readonly<ColorScheme>) => {\n switch (action) {\n case HistoryActionBindingEnum.CLAIMS_REMOVED:\n case HistoryActionBindingEnum.DEACTIVATED:\n case HistoryActionBindingEnum.DELETED:\n case HistoryActionBindingEnum.REJECTED:\n case HistoryActionBindingEnum.REVOKED:\n case HistoryActionBindingEnum.ERRORED:\n return colorScheme.errorText;\n case HistoryActionBindingEnum.SUSPENDED:\n case HistoryActionBindingEnum.OFFERED:\n case HistoryActionBindingEnum.PENDING:\n case HistoryActionBindingEnum.REQUESTED:\n return colorScheme.text;\n default:\n return colorScheme.successText;\n }\n};\n\nexport type HistoryDetailsScreenLabels = HistoryDetailsLabels & {\n item: HistoryListItemLabels;\n};\n\nexport type HistoryDetailsScreenProps = {\n assets: HistoryDetailsViewProps['assets'];\n dataHeader: HistoryDetailsViewProps['data']['header'];\n headerButton?: ReactElement;\n item: HistoryListItemBindingDto;\n labels: HistoryDetailsScreenLabels;\n onBackPressed: () => void;\n onInfoPressed?: () => void;\n onImagePreview: (title: string, image: ImageSourcePropType) => void;\n testID?: string;\n};\n\nexport const HistoryDetailsScreen: FC<HistoryDetailsScreenProps> = ({\n assets,\n dataHeader,\n headerButton,\n item,\n labels,\n onBackPressed,\n onInfoPressed,\n onImagePreview,\n testID = 'HistoryDetailScreen',\n}) => {\n const colorScheme = useAppColorScheme();\n\n const actionValueColor = getStatusTextColor(item.action, colorScheme);\n\n return (\n <HistoryDetailsView\n assets={assets}\n data={{\n header: dataHeader,\n date: formatDateTimeLocalized(new Date(item.createdDate)) ?? '',\n action: {\n icon: getHistoryItemActionIcon(item.action),\n label: capitalizeFirstLetter(labels.item.actions[item.action]),\n color: actionValueColor,\n testID: concatTestID(testID, 'action', item.action),\n },\n }}\n headerButton={headerButton}\n labels={labels}\n onBackPressed={onBackPressed}\n onInfoPressed={onInfoPressed}\n onImagePreview={onImagePreview}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AErE,oBACEX,MAAA,CAAAQ,OAAA,CAAA+B,aAAA,CAACpC,eAAA,CAAAqC,kBAAkB;IACjBb,MAAM,EAAEA,MAAO;IACfc,IAAI,EAAE;MACJC,MAAM,EAAEd,UAAU;MAClBe,IAAI,GAAAP,qBAAA,GAAE,IAAAQ,8BAAuB,EAAC,IAAIC,IAAI,CAACf,IAAI,CAACgB,WAAW,CAAC,CAAC,cAAAV,qBAAA,cAAAA,qBAAA,GAAI,EAAE;MAC/D1B,MAAM,EAAE;QACNqC,IAAI,EAAE,IAAAC,6CAAwB,EAAClB,IAAI,CAACpB,MAAM,CAAC;QAC3CuC,KAAK,EAAE,IAAAC,4BAAqB,EAACnB,MAAM,CAACD,IAAI,CAACqB,OAAO,CAACrB,IAAI,CAACpB,MAAM,CAAC,CAAC;QAC9D0C,KAAK,EAAEd,gBAAgB;QACvBH,MAAM,EAAE,IAAAkB,mBAAY,EAAClB,MAAM,EAAE,QAAQ,EAAEL,IAAI,CAACpB,MAAM;MACpD;IACF,CAAE;IACFmB,YAAY,EAAEA,YAAa;IAC3BE,MAAM,EAAEA,MAAO;IACfC,aAAa,EAAEA,aAAc;IAC7BC,aAAa,EAAEA,aAAc;IAC7BC,cAAc,EAAEA,cAAe;IAC/BC,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN,CAAC;AAACmB,OAAA,CAAA5B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -36,7 +36,10 @@ const defaultIcons = {
|
|
|
36
36
|
CSR_GENERATED: _uiComponents.HistoryStatusAcceptedIcon,
|
|
37
37
|
EXPIRED: _uiComponents.HistoryStatusErrorIcon,
|
|
38
38
|
INTERACTION_CREATED: _uiComponents.HistoryStatusAcceptedIcon,
|
|
39
|
-
INTERACTION_ERRORED: _uiComponents.HistoryStatusErrorIcon
|
|
39
|
+
INTERACTION_ERRORED: _uiComponents.HistoryStatusErrorIcon,
|
|
40
|
+
INTERACTION_EXPIRED: _uiComponents.HistoryStatusErrorIcon,
|
|
41
|
+
REGISTRATION_CERTIFICATE_CREATED: _uiComponents.HistoryStatusAcceptedIcon,
|
|
42
|
+
REGISTRATION_CERTIFICATE_REVOKED: _uiComponents.HistoryStatusErrorIcon
|
|
40
43
|
},
|
|
41
44
|
entityTypes: {
|
|
42
45
|
BACKUP: _uiComponents.HistoryRevokeIcon,
|
|
@@ -58,7 +61,8 @@ const defaultIcons = {
|
|
|
58
61
|
STS_ROLE: _uiComponents.HistoryIdentifierIcon,
|
|
59
62
|
STS_ORGANISATION: _uiComponents.HistoryOrganisationIcon,
|
|
60
63
|
STS_IAM_ROLE: _uiComponents.HistoryIdentifierIcon,
|
|
61
|
-
STS_TOKEN: _uiComponents.HistoryKeyIcon
|
|
64
|
+
STS_TOKEN: _uiComponents.HistoryKeyIcon,
|
|
65
|
+
SIGNATURE: _uiComponents.HistoryCertificateIcon
|
|
62
66
|
}
|
|
63
67
|
};
|
|
64
68
|
const getHistoryItemActionIcon = action => {
|
|
@@ -73,21 +77,21 @@ const HistoryListItemIcon = ({
|
|
|
73
77
|
const typeIcon = (0, _react.useMemo)(() => {
|
|
74
78
|
var _defaultIcons$entityT;
|
|
75
79
|
switch (item.entityType) {
|
|
76
|
-
case _reactNativeOneCore.
|
|
80
|
+
case _reactNativeOneCore.HistoryEntityTypeBindingEnum.BACKUP:
|
|
77
81
|
switch (item.action) {
|
|
78
|
-
case _reactNativeOneCore.
|
|
82
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.CREATED:
|
|
79
83
|
return _uiComponents.HistoryBackupCreatedIcon;
|
|
80
|
-
case _reactNativeOneCore.
|
|
84
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.RESTORED:
|
|
81
85
|
return _uiComponents.HistoryBackupRestoredIcon;
|
|
82
86
|
default:
|
|
83
87
|
break;
|
|
84
88
|
}
|
|
85
89
|
break;
|
|
86
|
-
case _reactNativeOneCore.
|
|
90
|
+
case _reactNativeOneCore.HistoryEntityTypeBindingEnum.CREDENTIAL:
|
|
87
91
|
switch (item.action) {
|
|
88
|
-
case _reactNativeOneCore.
|
|
92
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.REVOKED:
|
|
89
93
|
return _uiComponents.HistoryRevokeIcon;
|
|
90
|
-
case _reactNativeOneCore.
|
|
94
|
+
case _reactNativeOneCore.HistoryActionBindingEnum.SUSPENDED:
|
|
91
95
|
return _uiComponents.HistorySuspendIcon;
|
|
92
96
|
default:
|
|
93
97
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_uiComponents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","defaultIcons","actions","ACCEPTED","HistoryStatusAcceptedIcon","ACTIVATED","CLAIMS_REMOVED","HistoryStatusDeleteIcon","CREATED","DEACTIVATED","HistoryStatusErrorIcon","DELETED","ERRORED","IMPORTED","ISSUED","OFFERED","PENDING","REJECTED","REMOVED","REQUESTED","RESTORED","RETRACTED","REVOKED","SHARED","SUSPENDED","HistoryStatusSuspendIcon","UPDATED","WITHDRAWN","REACTIVATED","CSR_GENERATED","EXPIRED","INTERACTION_CREATED","INTERACTION_ERRORED","entityTypes","BACKUP","HistoryRevokeIcon","CERTIFICATE","HistoryCertificateIcon","CREDENTIAL","HistoryCredentialIcon","CREDENTIAL_SCHEMA","HistorySchemaIcon","DID","HistoryDidIcon","IDENTIFIER","HistoryIdentifierIcon","KEY","HistoryKeyIcon","ORGANISATION","HistoryOrganisationIcon","PROOF","HistoryProofRequestIcon","PROOF_SCHEMA","TRUST_ANCHOR","HistoryTrustAnchorIcon","TRUST_ENTITY","HistoryTrustedEntityIcon","WALLET_UNIT","WALLET_RELYING_PARTY","USER","PROVIDER","STS_ROLE","STS_ORGANISATION","STS_IAM_ROLE","STS_TOKEN","getHistoryItemActionIcon","action","_defaultIcons$actions","exports","HistoryListItemIcon","item","statusIcon","typeIcon","useMemo","_defaultIcons$entityT","entityType","
|
|
1
|
+
{"version":3,"names":["_reactNativeOneCore","require","_react","_interopRequireWildcard","_uiComponents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","defaultIcons","actions","ACCEPTED","HistoryStatusAcceptedIcon","ACTIVATED","CLAIMS_REMOVED","HistoryStatusDeleteIcon","CREATED","DEACTIVATED","HistoryStatusErrorIcon","DELETED","ERRORED","IMPORTED","ISSUED","OFFERED","PENDING","REJECTED","REMOVED","REQUESTED","RESTORED","RETRACTED","REVOKED","SHARED","SUSPENDED","HistoryStatusSuspendIcon","UPDATED","WITHDRAWN","REACTIVATED","CSR_GENERATED","EXPIRED","INTERACTION_CREATED","INTERACTION_ERRORED","INTERACTION_EXPIRED","REGISTRATION_CERTIFICATE_CREATED","REGISTRATION_CERTIFICATE_REVOKED","entityTypes","BACKUP","HistoryRevokeIcon","CERTIFICATE","HistoryCertificateIcon","CREDENTIAL","HistoryCredentialIcon","CREDENTIAL_SCHEMA","HistorySchemaIcon","DID","HistoryDidIcon","IDENTIFIER","HistoryIdentifierIcon","KEY","HistoryKeyIcon","ORGANISATION","HistoryOrganisationIcon","PROOF","HistoryProofRequestIcon","PROOF_SCHEMA","TRUST_ANCHOR","HistoryTrustAnchorIcon","TRUST_ENTITY","HistoryTrustedEntityIcon","WALLET_UNIT","WALLET_RELYING_PARTY","USER","PROVIDER","STS_ROLE","STS_ORGANISATION","STS_IAM_ROLE","STS_TOKEN","SIGNATURE","getHistoryItemActionIcon","action","_defaultIcons$actions","exports","HistoryListItemIcon","item","statusIcon","typeIcon","useMemo","_defaultIcons$entityT","entityType","HistoryEntityTypeBindingEnum","HistoryActionBindingEnum","HistoryBackupCreatedIcon","HistoryBackupRestoredIcon","HistorySuspendIcon","HistoryIssueIcon","createElement","HistoryItemIcon","StatusIcon","TypeIcon"],"sources":["history-list-item-icon.tsx"],"sourcesContent":["import {\n HistoryActionBindingEnum,\n HistoryEntityTypeBindingEnum,\n HistoryListItemBindingDto,\n} from '@procivis/react-native-one-core';\nimport React, { FC, useMemo } from 'react';\nimport { SvgProps } from 'react-native-svg';\n\nimport {\n HistoryBackupCreatedIcon,\n HistoryBackupRestoredIcon,\n HistoryCertificateIcon,\n HistoryCredentialIcon,\n HistoryDidIcon,\n HistoryIdentifierIcon,\n HistoryIssueIcon,\n HistoryItemIcon,\n HistoryKeyIcon,\n HistoryOrganisationIcon,\n HistoryProofRequestIcon,\n HistoryRevokeIcon,\n HistorySchemaIcon,\n HistoryStatusAcceptedIcon,\n HistoryStatusDeleteIcon,\n HistoryStatusErrorIcon,\n HistoryStatusSuspendIcon,\n HistorySuspendIcon,\n HistoryTrustAnchorIcon,\n HistoryTrustedEntityIcon,\n} from '../../ui-components';\n\nconst defaultIcons: {\n actions: { [key in keyof typeof HistoryActionBindingEnum]: FC<SvgProps> };\n entityTypes: { [key in keyof typeof HistoryEntityTypeBindingEnum]: FC<SvgProps> };\n} = {\n actions: {\n ACCEPTED: HistoryStatusAcceptedIcon,\n ACTIVATED: HistoryStatusAcceptedIcon,\n CLAIMS_REMOVED: HistoryStatusDeleteIcon,\n CREATED: HistoryStatusAcceptedIcon,\n DEACTIVATED: HistoryStatusErrorIcon,\n DELETED: HistoryStatusDeleteIcon,\n ERRORED: HistoryStatusErrorIcon,\n IMPORTED: HistoryStatusAcceptedIcon,\n ISSUED: HistoryStatusAcceptedIcon,\n OFFERED: HistoryStatusAcceptedIcon,\n PENDING: HistoryStatusAcceptedIcon,\n REJECTED: HistoryStatusErrorIcon,\n REMOVED: HistoryStatusDeleteIcon,\n REQUESTED: HistoryStatusAcceptedIcon,\n RESTORED: HistoryStatusAcceptedIcon,\n RETRACTED: HistoryStatusErrorIcon,\n REVOKED: HistoryStatusErrorIcon,\n SHARED: HistoryStatusAcceptedIcon,\n SUSPENDED: HistoryStatusSuspendIcon,\n UPDATED: HistoryStatusAcceptedIcon,\n WITHDRAWN: HistoryStatusErrorIcon,\n REACTIVATED: HistoryStatusAcceptedIcon,\n CSR_GENERATED: HistoryStatusAcceptedIcon,\n EXPIRED: HistoryStatusErrorIcon,\n INTERACTION_CREATED: HistoryStatusAcceptedIcon,\n INTERACTION_ERRORED: HistoryStatusErrorIcon,\n INTERACTION_EXPIRED: HistoryStatusErrorIcon,\n REGISTRATION_CERTIFICATE_CREATED: HistoryStatusAcceptedIcon,\n REGISTRATION_CERTIFICATE_REVOKED: HistoryStatusErrorIcon,\n },\n entityTypes: {\n BACKUP: HistoryRevokeIcon,\n CERTIFICATE: HistoryCertificateIcon,\n CREDENTIAL: HistoryCredentialIcon,\n CREDENTIAL_SCHEMA: HistorySchemaIcon,\n DID: HistoryDidIcon,\n IDENTIFIER: HistoryIdentifierIcon,\n KEY: HistoryKeyIcon,\n ORGANISATION: HistoryOrganisationIcon,\n PROOF: HistoryProofRequestIcon,\n PROOF_SCHEMA: HistorySchemaIcon,\n TRUST_ANCHOR: HistoryTrustAnchorIcon,\n TRUST_ENTITY: HistoryTrustedEntityIcon,\n WALLET_UNIT: HistoryTrustedEntityIcon,\n WALLET_RELYING_PARTY: HistoryTrustedEntityIcon,\n USER: HistoryIdentifierIcon,\n PROVIDER: HistoryIdentifierIcon,\n STS_ROLE: HistoryIdentifierIcon,\n STS_ORGANISATION: HistoryOrganisationIcon,\n STS_IAM_ROLE: HistoryIdentifierIcon,\n STS_TOKEN: HistoryKeyIcon,\n SIGNATURE: HistoryCertificateIcon,\n },\n};\n\nexport const getHistoryItemActionIcon = (action: HistoryActionBindingEnum) => {\n return defaultIcons.actions[action] ?? HistoryStatusAcceptedIcon;\n};\n\nexport type HistoryListItemIconProps = {\n item: HistoryListItemBindingDto;\n};\n\nexport const HistoryListItemIcon: FC<HistoryListItemIconProps> = ({ item }) => {\n const statusIcon = getHistoryItemActionIcon(item.action);\n const typeIcon = useMemo(() => {\n switch (item.entityType) {\n case HistoryEntityTypeBindingEnum.BACKUP:\n switch (item.action) {\n case HistoryActionBindingEnum.CREATED:\n return HistoryBackupCreatedIcon;\n case HistoryActionBindingEnum.RESTORED:\n return HistoryBackupRestoredIcon;\n default:\n break;\n }\n break;\n case HistoryEntityTypeBindingEnum.CREDENTIAL:\n switch (item.action) {\n case HistoryActionBindingEnum.REVOKED:\n return HistoryRevokeIcon;\n case HistoryActionBindingEnum.SUSPENDED:\n return HistorySuspendIcon;\n default:\n break;\n }\n break;\n default:\n break;\n }\n\n return defaultIcons.entityTypes[item.entityType] ?? HistoryIssueIcon;\n }, [item.action, item.entityType]);\n return <HistoryItemIcon StatusIcon={statusIcon} TypeIcon={typeIcon} />;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAGA,IAAAG,aAAA,GAAAH,OAAA;AAqB6B,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,S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B,CAAC3C,MAAM;QACtC,QAAQqC,IAAI,CAACJ,MAAM;UACjB,KAAKW,4CAAwB,CAACzE,OAAO;YACnC,OAAO0E,sCAAwB;UACjC,KAAKD,4CAAwB,CAAC7D,QAAQ;YACpC,OAAO+D,uCAAyB;UAClC;YACE;QACJ;QACA;MACF,KAAKH,gDAA4B,CAACvC,UAAU;QAC1C,QAAQiC,IAAI,CAACJ,MAAM;UACjB,KAAKW,4CAAwB,CAAC3D,OAAO;YACnC,OAAOgB,+BAAiB;UAC1B,KAAK2C,4CAAwB,CAACzD,SAAS;YACrC,OAAO4D,gCAAkB;UAC3B;YACE;QACJ;QACA;MACF;QACE;IACJ;IAEA,QAAAN,qBAAA,GAAO7E,YAAY,CAACmC,WAAW,CAACsC,IAAI,CAACK,UAAU,CAAC,cAAAD,qBAAA,cAAAA,qBAAA,GAAIO,8BAAgB;EACtE,CAAC,EAAE,CAACX,IAAI,CAACJ,MAAM,EAAEI,IAAI,CAACK,UAAU,CAAC,CAAC;EAClC,oBAAOrG,MAAA,CAAAS,OAAA,CAAAmG,aAAA,CAAC1G,aAAA,CAAA2G,eAAe;IAACC,UAAU,EAAEb,UAAW;IAACc,QAAQ,EAAEb;EAAS,CAAE,CAAC;AACxE,CAAC;AAACJ,OAAA,CAAAC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_uiComponents","_utils","_historyListItemIcon","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryListItemView","dateFormatter","formatTime","first","infoLabelMode","item","labels","last","onPress","testID","_dateFormatter","identifierId","target","undefined","data","trustEntity","useTrustEntity","label","entityTypes","entityType","actions","action","info","useMemo","name","icon","createElement","HistoryListItemIcon","pressHandler","useCallback","HistoryItemView","time","Date","createdDate","exports"],"sources":["history-list-item.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_uiComponents","_utils","_historyListItemIcon","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryListItemView","dateFormatter","formatTime","first","infoLabelMode","item","labels","last","onPress","testID","_dateFormatter","identifierId","target","undefined","data","trustEntity","useTrustEntity","label","entityTypes","entityType","actions","action","info","useMemo","name","icon","createElement","HistoryListItemIcon","pressHandler","useCallback","HistoryItemView","time","Date","createdDate","exports"],"sources":["history-list-item.tsx"],"sourcesContent":["import {\n HistoryActionBindingEnum,\n HistoryEntityTypeBindingEnum,\n HistoryListItemBindingDto,\n} from '@procivis/react-native-one-core';\nimport React, { FC, useCallback, useMemo } from 'react';\n\nimport { HistoryItemView } from '../../ui-components';\nimport { formatTime, useTrustEntity } from '../../utils';\nimport { HistoryListItemIcon } from './history-list-item-icon';\n\nexport type HistoryListItemLabels = {\n actions: { [key in keyof typeof HistoryActionBindingEnum]: string };\n entityTypes: { [key in keyof typeof HistoryEntityTypeBindingEnum]: string };\n};\n\nexport interface HistoryListItemViewProps {\n dateFormatter?: (date: Date) => string;\n first?: boolean;\n infoLabelMode?: 'entity' | 'associatedLabel' | 'none';\n item: HistoryListItemBindingDto;\n labels: HistoryListItemLabels;\n last?: boolean;\n onPress?: (item: HistoryListItemBindingDto) => void;\n testID?: string;\n}\n\nexport const HistoryListItemView: FC<HistoryListItemViewProps> = ({\n dateFormatter = formatTime,\n first,\n infoLabelMode = 'entity',\n item,\n labels,\n last,\n onPress,\n testID,\n}) => {\n const identifierId = infoLabelMode === 'entity' ? item.target : undefined;\n const { data: trustEntity } = useTrustEntity(identifierId);\n\n const label = `${labels.entityTypes[item.entityType]} ${labels.actions[item.action]}`;\n\n const info = useMemo(() => {\n switch (infoLabelMode) {\n case 'entity':\n return trustEntity?.name;\n case 'associatedLabel':\n return item.name;\n case 'none':\n return undefined;\n }\n }, [infoLabelMode, item, trustEntity]);\n\n const icon = <HistoryListItemIcon item={item} />;\n\n const pressHandler = useCallback(() => {\n onPress?.(item);\n }, [onPress, item]);\n\n return (\n <HistoryItemView\n first={first}\n icon={icon}\n info={info}\n label={label}\n last={last}\n onPress={pressHandler}\n testID={testID}\n time={dateFormatter(new Date(item.createdDate)) ?? ''}\n />\n );\n};\n"],"mappings":";;;;;;AAKA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AAA+D,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GA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AC,kBAAW,EAAC,MAAM;IACrCrB,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAGH,IAAI,CAAC;EACjB,CAAC,EAAE,CAACG,OAAO,EAAEH,IAAI,CAAC,CAAC;EAEnB,oBACE/B,MAAA,CAAAY,OAAA,CAAAwC,aAAA,CAACjD,aAAA,CAAAqD,eAAe;IACd3B,KAAK,EAAEA,KAAM;IACbsB,IAAI,EAAEA,IAAK;IACXH,IAAI,EAAEA,IAAK;IACXL,KAAK,EAAEA,KAAM;IACbV,IAAI,EAAEA,IAAK;IACXC,OAAO,EAAEoB,YAAa;IACtBnB,MAAM,EAAEA,MAAO;IACfsB,IAAI,GAAArB,cAAA,GAAET,aAAa,CAAC,IAAI+B,IAAI,CAAC3B,IAAI,CAAC4B,WAAW,CAAC,CAAC,cAAAvB,cAAA,cAAAA,cAAA,GAAI;EAAG,CACvD,CAAC;AAEN,CAAC;AAACwB,OAAA,CAAAlC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lodash","require","_react","_interopRequireWildcard","_reactNative","_uiComponents","_utils","_historyList","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryListScreen","children","groupItems","groupEntriesByDay","itemInfoLabelMode","labels","onBackPressed","onHistoryItemPressed","onOpenFilter","onSearchPhraseChange","queryParams","testID","_queryParams$search","colorScheme","useAppColorScheme","empty","setEmpty","useState","scrollOffset","Animated","Value","searchPhrase","setSearchPhrase","searchBarVisible","Boolean","search","text","handleSearchPhraseChange","useMemo","debounce","useEffect","undefined","headerHeight","insets","useListContentInset","additionalBottomPadding","createElement","View","style","styles","container","backgroundColor","background","emptyNotice","white","marginTop","paddingTop","Typography","align","color","preset","emptyTitle","shaded","emptySubtitle","HistoryListView","contentContainerStyle","itemProps","infoLabelMode","onPress","onEmpty","onScroll","event","nativeEvent","contentOffset","y","useNativeDriver","query","concatTestID","list","FoldableHeader","header","NavigationHeader","leftItem","BackButton","title","searchBar","rightButtons","FilterButton","active","credentialSchemaId","rightButtonAlwaysVisible","searchBarProps","placeholder","staticHeader","exports","StyleSheet","create","flex","borderRadius","marginHorizontal","paddingBottom","paddingHorizontal","opacity"],"sources":["history-list-screen.tsx"],"sourcesContent":["import { HistoryListItem, HistoryListQuery } from '@procivis/react-native-one-core';\nimport { debounce } from 'lodash';\nimport React, { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react';\nimport { Animated, StyleSheet, View } from 'react-native';\n\nimport {\n BackButton,\n FilterButton,\n FoldableHeader,\n NavigationHeader,\n Typography,\n useAppColorScheme,\n} from '../../ui-components';\nimport { concatTestID, groupEntriesByDay, HistoryGroupByDaySection, useListContentInset } from '../../utils';\nimport { HistoryListLabels, HistoryListView } from './history-list';\nimport { HistoryListItemViewProps } from './history-list-item';\n\nexport type HistoryListScreenLabels = {\n emptyTitle: string;\n emptySubtitle: string;\n list: HistoryListLabels;\n title: string;\n search: string;\n};\n\nexport type HistoryListScreenProps = {\n groupItems?: (entries: HistoryListItem[]) => HistoryGroupByDaySection[];\n itemInfoLabelMode?: HistoryListItemViewProps['infoLabelMode'];\n labels: HistoryListScreenLabels;\n onBackPressed: () => void;\n onHistoryItemPressed: (historyItem: HistoryListItem) => void;\n onOpenFilter?: () => void;\n onSearchPhraseChange: (searchPhrase: string | undefined) => void;\n queryParams: Partial<HistoryListQuery>;\n testID?: string;\n};\n\nexport const HistoryListScreen: FC<PropsWithChildren<HistoryListScreenProps>> = ({\n children,\n groupItems = groupEntriesByDay,\n itemInfoLabelMode = 'entity',\n labels,\n onBackPressed,\n onHistoryItemPressed,\n onOpenFilter,\n onSearchPhraseChange,\n queryParams,\n testID = 'HistoryScreen',\n}) => {\n const colorScheme = useAppColorScheme();\n const [empty, setEmpty] = useState<boolean>(false);\n const [scrollOffset] = useState(() => new Animated.Value(0));\n\n const [searchPhrase, setSearchPhrase] = useState<string>('');\n const searchBarVisible = !empty || Boolean(queryParams.search?.text);\n\n const handleSearchPhraseChange = useMemo(() => debounce(onSearchPhraseChange, 500), [onSearchPhraseChange]);\n useEffect(() => {\n handleSearchPhraseChange(searchPhrase || undefined);\n }, [searchPhrase, handleSearchPhraseChange]);\n\n const headerHeight = searchBarVisible ? 112 : 70;\n\n const insets = useListContentInset({\n additionalBottomPadding: 24,\n headerHeight,\n });\n\n return (\n <View\n style={[\n styles.container,\n {\n backgroundColor: colorScheme.background,\n },\n ]}\n testID={testID}>\n {empty && (\n <View\n style={[\n styles.emptyNotice,\n {\n backgroundColor: colorScheme.white,\n marginTop: insets.paddingTop,\n },\n ]}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s\">\n {labels.emptyTitle}\n </Typography>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-small\" style={styles.shaded}>\n {labels.emptySubtitle}\n </Typography>\n </View>\n )}\n <HistoryListView\n contentContainerStyle={insets}\n groupItems={groupItems}\n itemProps={{ infoLabelMode: itemInfoLabelMode, onPress: onHistoryItemPressed }}\n onEmpty={setEmpty}\n onScroll={Animated.event([{ nativeEvent: { contentOffset: { y: scrollOffset } } }], {\n useNativeDriver: true,\n })}\n query={queryParams}\n testID={concatTestID(testID, 'list')}\n labels={labels.list}\n />\n {children}\n <FoldableHeader\n header={\n <NavigationHeader\n backgroundColor={'transparent'}\n leftItem={<BackButton onPress={onBackPressed} testID={concatTestID(testID, 'back')} />}\n title={labels.title}\n />\n }\n scrollOffset={scrollOffset}\n searchBar={\n !searchBarVisible\n ? undefined\n : {\n rightButtons: onOpenFilter\n ? [\n <FilterButton\n active={Boolean(queryParams.credentialSchemaId)}\n onPress={onOpenFilter}\n testID={concatTestID(testID, 'filter')}\n />,\n ]\n : undefined,\n rightButtonAlwaysVisible: true,\n searchBarProps: {\n onSearchPhraseChange: setSearchPhrase,\n placeholder: labels.search,\n searchPhrase,\n testID: concatTestID(testID, 'search'),\n },\n }\n }\n staticHeader={!searchBarVisible}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n emptyNotice: {\n borderRadius: 12,\n marginHorizontal: 16,\n paddingBottom: 20,\n paddingHorizontal: 12,\n paddingTop: 16,\n },\n shaded: {\n opacity: 0.7,\n },\n});\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AAQA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAAoE,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,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9BC,cAAc,EAAE;QACdxE,oBAAoB,EAAEa,eAAe;QACrC4D,WAAW,EAAE7E,MAAM,CAACoB,MAAM;QAC1BJ,YAAY;QACZV,MAAM,EAAE,IAAAwD,mBAAY,EAACxD,MAAM,EAAE,QAAQ;MACvC;IACF,CACL;IACDwE,YAAY,EAAE,CAAC5D;EAAiB,CACjC,CACG,CAAC;AAEX,CAAC;AAAC6D,OAAA,CAAApF,iBAAA,GAAAA,iBAAA;AAEF,MAAMuC,MAAM,GAAG8C,uBAAU,CAACC,MAAM,CAAC;EAC/B9C,SAAS,EAAE;IACT+C,IAAI,EAAE;EACR,CAAC;EACD5C,WAAW,EAAE;IACX6C,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE,EAAE;IACpBC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrB7C,UAAU,EAAE;EACd,CAAC;EACDM,MAAM,EAAE;IACNwC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_lodash","require","_react","_interopRequireWildcard","_reactNative","_uiComponents","_utils","_historyList","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryListScreen","children","groupItems","groupEntriesByDay","itemInfoLabelMode","labels","onBackPressed","onHistoryItemPressed","onOpenFilter","onSearchPhraseChange","queryParams","testID","_queryParams$search","colorScheme","useAppColorScheme","empty","setEmpty","useState","scrollOffset","Animated","Value","searchPhrase","setSearchPhrase","searchBarVisible","Boolean","search","text","handleSearchPhraseChange","useMemo","debounce","useEffect","undefined","headerHeight","insets","useListContentInset","additionalBottomPadding","createElement","View","style","styles","container","backgroundColor","background","emptyNotice","white","marginTop","paddingTop","Typography","align","color","preset","emptyTitle","shaded","emptySubtitle","HistoryListView","contentContainerStyle","itemProps","infoLabelMode","onPress","onEmpty","onScroll","event","nativeEvent","contentOffset","y","useNativeDriver","query","concatTestID","list","FoldableHeader","header","NavigationHeader","leftItem","BackButton","title","searchBar","rightButtons","FilterButton","active","credentialSchemaId","rightButtonAlwaysVisible","searchBarProps","placeholder","staticHeader","exports","StyleSheet","create","flex","borderRadius","marginHorizontal","paddingBottom","paddingHorizontal","opacity"],"sources":["history-list-screen.tsx"],"sourcesContent":["import { HistoryListItemBindingDto, HistoryListQueryBindingDto } from '@procivis/react-native-one-core';\nimport { debounce } from 'lodash';\nimport React, { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react';\nimport { Animated, StyleSheet, View } from 'react-native';\n\nimport {\n BackButton,\n FilterButton,\n FoldableHeader,\n NavigationHeader,\n Typography,\n useAppColorScheme,\n} from '../../ui-components';\nimport { concatTestID, groupEntriesByDay, HistoryGroupByDaySection, useListContentInset } from '../../utils';\nimport { HistoryListLabels, HistoryListView } from './history-list';\nimport { HistoryListItemViewProps } from './history-list-item';\n\nexport type HistoryListScreenLabels = {\n emptyTitle: string;\n emptySubtitle: string;\n list: HistoryListLabels;\n title: string;\n search: string;\n};\n\nexport type HistoryListScreenProps = {\n groupItems?: (entries: HistoryListItemBindingDto[]) => HistoryGroupByDaySection[];\n itemInfoLabelMode?: HistoryListItemViewProps['infoLabelMode'];\n labels: HistoryListScreenLabels;\n onBackPressed: () => void;\n onHistoryItemPressed: (historyItem: HistoryListItemBindingDto) => void;\n onOpenFilter?: () => void;\n onSearchPhraseChange: (searchPhrase: string | undefined) => void;\n queryParams: Partial<HistoryListQueryBindingDto>;\n testID?: string;\n};\n\nexport const HistoryListScreen: FC<PropsWithChildren<HistoryListScreenProps>> = ({\n children,\n groupItems = groupEntriesByDay,\n itemInfoLabelMode = 'entity',\n labels,\n onBackPressed,\n onHistoryItemPressed,\n onOpenFilter,\n onSearchPhraseChange,\n queryParams,\n testID = 'HistoryScreen',\n}) => {\n const colorScheme = useAppColorScheme();\n const [empty, setEmpty] = useState<boolean>(false);\n const [scrollOffset] = useState(() => new Animated.Value(0));\n\n const [searchPhrase, setSearchPhrase] = useState<string>('');\n const searchBarVisible = !empty || Boolean(queryParams.search?.text);\n\n const handleSearchPhraseChange = useMemo(() => debounce(onSearchPhraseChange, 500), [onSearchPhraseChange]);\n useEffect(() => {\n handleSearchPhraseChange(searchPhrase || undefined);\n }, [searchPhrase, handleSearchPhraseChange]);\n\n const headerHeight = searchBarVisible ? 112 : 70;\n\n const insets = useListContentInset({\n additionalBottomPadding: 24,\n headerHeight,\n });\n\n return (\n <View\n style={[\n styles.container,\n {\n backgroundColor: colorScheme.background,\n },\n ]}\n testID={testID}>\n {empty && (\n <View\n style={[\n styles.emptyNotice,\n {\n backgroundColor: colorScheme.white,\n marginTop: insets.paddingTop,\n },\n ]}>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s\">\n {labels.emptyTitle}\n </Typography>\n <Typography align=\"center\" color={colorScheme.text} preset=\"s/line-height-small\" style={styles.shaded}>\n {labels.emptySubtitle}\n </Typography>\n </View>\n )}\n <HistoryListView\n contentContainerStyle={insets}\n groupItems={groupItems}\n itemProps={{ infoLabelMode: itemInfoLabelMode, onPress: onHistoryItemPressed }}\n onEmpty={setEmpty}\n onScroll={Animated.event([{ nativeEvent: { contentOffset: { y: scrollOffset } } }], {\n useNativeDriver: true,\n })}\n query={queryParams}\n testID={concatTestID(testID, 'list')}\n labels={labels.list}\n />\n {children}\n <FoldableHeader\n header={\n <NavigationHeader\n backgroundColor={'transparent'}\n leftItem={<BackButton onPress={onBackPressed} testID={concatTestID(testID, 'back')} />}\n title={labels.title}\n />\n }\n scrollOffset={scrollOffset}\n searchBar={\n !searchBarVisible\n ? undefined\n : {\n rightButtons: onOpenFilter\n ? [\n <FilterButton\n active={Boolean(queryParams.credentialSchemaId)}\n onPress={onOpenFilter}\n testID={concatTestID(testID, 'filter')}\n />,\n ]\n : undefined,\n rightButtonAlwaysVisible: true,\n searchBarProps: {\n onSearchPhraseChange: setSearchPhrase,\n placeholder: labels.search,\n searchPhrase,\n testID: concatTestID(testID, 'search'),\n },\n }\n }\n staticHeader={!searchBarVisible}\n />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n emptyNotice: {\n borderRadius: 12,\n marginHorizontal: 16,\n paddingBottom: 20,\n paddingHorizontal: 12,\n paddingTop: 16,\n },\n shaded: {\n opacity: 0.7,\n },\n});\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAAI,aAAA,GAAAJ,OAAA;AAQA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAAoE,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GA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,IAAI;MAC9BC,cAAc,EAAE;QACdxE,oBAAoB,EAAEa,eAAe;QACrC4D,WAAW,EAAE7E,MAAM,CAACoB,MAAM;QAC1BJ,YAAY;QACZV,MAAM,EAAE,IAAAwD,mBAAY,EAACxD,MAAM,EAAE,QAAQ;MACvC;IACF,CACL;IACDwE,YAAY,EAAE,CAAC5D;EAAiB,CACjC,CACG,CAAC;AAEX,CAAC;AAAC6D,OAAA,CAAApF,iBAAA,GAAAA,iBAAA;AAEF,MAAMuC,MAAM,GAAG8C,uBAAU,CAACC,MAAM,CAAC;EAC/B9C,SAAS,EAAE;IACT+C,IAAI,EAAE;EACR,CAAC;EACD5C,WAAW,EAAE;IACX6C,YAAY,EAAE,EAAE;IAChBC,gBAAgB,EAAE,EAAE;IACpBC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrB7C,UAAU,EAAE;EACd,CAAC;EACDM,MAAM,EAAE;IACNwC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ var _uiComponents = require("../../ui-components");
|
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
// components used on the history section lists (Settings->History,
|
|
13
|
+
// components used on the history section lists (Settings->History, CredentialDetailBindingDto->History)
|
|
14
14
|
// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
|
|
15
15
|
|
|
16
16
|
const HistoryListSectionHeaderView = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_moment","_interopRequireDefault","require","_react","_interopRequireWildcard","_uiComponents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryListSectionHeaderView","date","firstYearEntry","labels","testID","day","useMemo","now","moment","dateString","isSame","today","subtract","yesterday","format","createElement","HistorySectionHeaderView","year","toString","undefined","exports"],"sources":["history-list-section-header.tsx"],"sourcesContent":["import moment, { Moment } from 'moment';\nimport React, { FC, useMemo } from 'react';\n\nimport { HistorySectionHeaderView } from '../../ui-components';\n\nexport type HistoryListSectionHeaderLabels = {\n today: string;\n yesterday: string;\n};\n\nexport type HistoryListSectionHeaderViewProps = {\n date: Moment;\n firstYearEntry: boolean;\n labels: HistoryListSectionHeaderLabels;\n testID?: string;\n};\n\n// components used on the history section lists (Settings->History,
|
|
1
|
+
{"version":3,"names":["_moment","_interopRequireDefault","require","_react","_interopRequireWildcard","_uiComponents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HistoryListSectionHeaderView","date","firstYearEntry","labels","testID","day","useMemo","now","moment","dateString","isSame","today","subtract","yesterday","format","createElement","HistorySectionHeaderView","year","toString","undefined","exports"],"sources":["history-list-section-header.tsx"],"sourcesContent":["import moment, { Moment } from 'moment';\nimport React, { FC, useMemo } from 'react';\n\nimport { HistorySectionHeaderView } from '../../ui-components';\n\nexport type HistoryListSectionHeaderLabels = {\n today: string;\n yesterday: string;\n};\n\nexport type HistoryListSectionHeaderViewProps = {\n date: Moment;\n firstYearEntry: boolean;\n labels: HistoryListSectionHeaderLabels;\n testID?: string;\n};\n\n// components used on the history section lists (Settings->History, CredentialDetailBindingDto->History)\n// https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev\n\nexport const HistoryListSectionHeaderView: FC<HistoryListSectionHeaderViewProps> = ({\n date,\n firstYearEntry,\n labels,\n testID,\n}) => {\n const day = useMemo(() => {\n const now = moment();\n const dateString = moment(date);\n\n if (dateString.isSame(now, 'day')) {\n return labels.today;\n } else if (dateString.isSame(now.subtract(1, 'day'), 'day')) {\n return labels.yesterday;\n }\n return dateString.format('Do MMMM');\n }, [date, labels]);\n\n return (\n <HistorySectionHeaderView day={day} testID={testID} year={firstYearEntry ? date.year().toString() : undefined} />\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AAA+D,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wB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