@pagopa/io-app-design-system 2.1.1 → 2.1.2
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/common/LogoPaymentWithFallback.js +11 -20
- package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +25 -27
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -0
- package/lib/commonjs/components/listitems/__test__/listitem.test.js +4 -10
- package/lib/commonjs/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleIDP.js +9 -2
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +6 -8
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +11 -4
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/core/IODSExperimentalContextProvider.js +2 -1
- package/lib/commonjs/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/commonjs/core/IOThemeContextProvider.js +2 -1
- package/lib/commonjs/core/IOThemeContextProvider.js.map +1 -1
- package/lib/commonjs/utils/accessibility.js +14 -1
- package/lib/commonjs/utils/accessibility.js.map +1 -1
- package/lib/commonjs/utils/dates.js +20 -0
- package/lib/commonjs/utils/dates.js.map +1 -0
- package/lib/commonjs/utils/image.js +14 -23
- package/lib/commonjs/utils/image.js.map +1 -1
- package/lib/commonjs/utils/object.js +5 -10
- package/lib/commonjs/utils/object.js.map +1 -1
- package/lib/module/components/common/LogoPaymentWithFallback.js +11 -20
- package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +23 -27
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -0
- package/lib/module/components/listitems/__test__/listitem.test.js +4 -10
- package/lib/module/components/listitems/__test__/listitem.test.js.map +1 -1
- package/lib/module/components/modules/ModuleIDP.js +10 -3
- package/lib/module/components/modules/ModuleIDP.js.map +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js +6 -8
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/tag/Tag.js +9 -4
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/core/IODSExperimentalContextProvider.js +2 -1
- package/lib/module/core/IODSExperimentalContextProvider.js.map +1 -1
- package/lib/module/core/IOThemeContextProvider.js +2 -1
- package/lib/module/core/IOThemeContextProvider.js.map +1 -1
- package/lib/module/utils/accessibility.js +9 -0
- package/lib/module/utils/accessibility.js.map +1 -1
- package/lib/module/utils/dates.js +11 -0
- package/lib/module/utils/dates.js.map +1 -0
- package/lib/module/utils/image.js +12 -23
- package/lib/module/utils/image.js.map +1 -1
- package/lib/module/utils/object.js +3 -10
- package/lib/module/utils/object.js.map +1 -1
- package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts +5 -11
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts +4 -10
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts.map +1 -1
- package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
- package/lib/typescript/core/IODSExperimentalContextProvider.d.ts.map +1 -1
- package/lib/typescript/core/IOThemeContextProvider.d.ts.map +1 -1
- package/lib/typescript/utils/accessibility.d.ts +5 -0
- package/lib/typescript/utils/accessibility.d.ts.map +1 -1
- package/lib/typescript/utils/dates.d.ts +9 -0
- package/lib/typescript/utils/dates.d.ts.map +1 -0
- package/lib/typescript/utils/image.d.ts +2 -2
- package/lib/typescript/utils/image.d.ts.map +1 -1
- package/lib/typescript/utils/object.d.ts +2 -1
- package/lib/typescript/utils/object.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/components/common/LogoPaymentWithFallback.tsx +17 -15
- package/src/components/listitems/ListItemTransaction.tsx +46 -40
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +10 -0
- package/src/components/listitems/__test__/listitem.test.tsx +4 -10
- package/src/components/modules/ModuleIDP.tsx +13 -4
- package/src/components/modules/ModulePaymentNotice.tsx +10 -14
- package/src/components/tag/Tag.tsx +19 -10
- package/src/core/IODSExperimentalContextProvider.tsx +2 -1
- package/src/core/IOThemeContextProvider.tsx +2 -1
- package/src/utils/accessibility.ts +17 -0
- package/src/utils/dates.ts +18 -0
- package/src/utils/image.ts +28 -28
- package/src/utils/object.ts +12 -13
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as O from "fp-ts/lib/Option";
|
|
2
|
+
import { pipe } from "fp-ts/lib/function";
|
|
1
3
|
import React from "react";
|
|
2
4
|
import { Platform, StyleSheet, View } from "react-native";
|
|
3
5
|
import { IOColors, IOTagRadius, useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
@@ -96,15 +98,18 @@ export const Tag = ({
|
|
|
96
98
|
return /*#__PURE__*/React.createElement(View, {
|
|
97
99
|
testID: testID,
|
|
98
100
|
style: styles.tag
|
|
99
|
-
}, variantProps
|
|
101
|
+
}, pipe(variantProps, O.fromNullable, O.fold(() => null, ({
|
|
102
|
+
iconColor,
|
|
103
|
+
iconName
|
|
104
|
+
}) => /*#__PURE__*/React.createElement(View, {
|
|
100
105
|
style: styles.iconWrapper
|
|
101
106
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
102
|
-
name:
|
|
103
|
-
color:
|
|
107
|
+
name: iconName,
|
|
108
|
+
color: iconColor,
|
|
104
109
|
size: IOTagIconSize,
|
|
105
110
|
accessible: !!iconAccessibilityLabel,
|
|
106
111
|
accessibilityLabel: iconAccessibilityLabel
|
|
107
|
-
})), variantProps && text && /*#__PURE__*/React.createElement(View, {
|
|
112
|
+
})))), variantProps && text && /*#__PURE__*/React.createElement(View, {
|
|
108
113
|
style: styles.spacer
|
|
109
114
|
}), text && /*#__PURE__*/React.createElement(IOText, {
|
|
110
115
|
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","StyleSheet","View","IOColors","IOTagRadius","useIOExperimentalDesign","useIOTheme","IOTagHSpacing","IOTagVSpacing","Icon","IOText","IOTagIconMargin","IOTagIconSize","styles","create","tag","alignSelf","flexDirection","alignItems","justifyContent","select","android","textAlignVertical","backgroundColor","white","borderWidth","borderColor","borderRadius","borderCurve","paddingHorizontal","paddingVertical","iconWrapper","flexShrink","spacer","width","getVariantProps","variant","customIconProps","iconColor","iconName","undefined","Tag","text","testID","iconAccessibilityLabel","theme","isExperimental","variantProps","createElement","style","name","color","size","accessible","accessibilityLabel","font","weight","lineHeight","numberOfLines","ellipsizeMode","textTransform","letterSpacing"],"sourceRoot":"../../../../src","sources":["components/tag/Tag.tsx"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"names":["O","pipe","React","Platform","StyleSheet","View","IOColors","IOTagRadius","useIOExperimentalDesign","useIOTheme","IOTagHSpacing","IOTagVSpacing","Icon","IOText","IOTagIconMargin","IOTagIconSize","styles","create","tag","alignSelf","flexDirection","alignItems","justifyContent","select","android","textAlignVertical","backgroundColor","white","borderWidth","borderColor","borderRadius","borderCurve","paddingHorizontal","paddingVertical","iconWrapper","flexShrink","spacer","width","getVariantProps","variant","customIconProps","iconColor","iconName","undefined","Tag","text","testID","iconAccessibilityLabel","theme","isExperimental","variantProps","createElement","style","fromNullable","fold","name","color","size","accessible","accessibilityLabel","font","weight","lineHeight","numberOfLines","ellipsizeMode","textTransform","letterSpacing"],"sourceRoot":"../../../../src","sources":["components/tag/Tag.tsx"],"mappings":"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"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { constVoid } from "fp-ts/function";
|
|
1
2
|
import React from "react";
|
|
2
3
|
/**
|
|
3
4
|
* Experimental Context for new UI Representations
|
|
4
5
|
*/
|
|
5
6
|
export const IOExperimentalDesignContext = /*#__PURE__*/React.createContext({
|
|
6
7
|
isExperimental: false,
|
|
7
|
-
setExperimental:
|
|
8
|
+
setExperimental: constVoid
|
|
8
9
|
});
|
|
9
10
|
export const useIOExperimentalDesign = () => React.useContext(IOExperimentalDesignContext);
|
|
10
11
|
export const IODSExperimentalContextProvider = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","IOExperimentalDesignContext","createContext","isExperimental","setExperimental","useIOExperimentalDesign","useContext","IODSExperimentalContextProvider","children","isExperimentaEnabled","useState","createElement","Provider","value"],"sourceRoot":"../../../src","sources":["core/IODSExperimentalContextProvider.tsx"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"names":["constVoid","React","IOExperimentalDesignContext","createContext","isExperimental","setExperimental","useIOExperimentalDesign","useContext","IODSExperimentalContextProvider","children","isExperimentaEnabled","useState","createElement","Provider","value"],"sourceRoot":"../../../src","sources":["core/IODSExperimentalContextProvider.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,gBAAgB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AAMzB;AACA;AACA;AACA,OAAO,MAAMC,2BAA2B,gBACtCD,KAAK,CAACE,aAAa,CAA4B;EAC7CC,cAAc,EAAE,KAAK;EACrBC,eAAe,EAAEL;AACnB,CAAC,CAAC;AAEJ,OAAO,MAAMM,uBAAuB,GAAGA,CAAA,KACrCL,KAAK,CAACM,UAAU,CAACL,2BAA2B,CAAC;AAM/C,OAAO,MAAMM,+BAA+B,GAAGA,CAAC;EAC9CC,QAAQ;EACRC;AAC2D,CAAC,KAAK;EACjE,MAAM,CAACN,cAAc,EAAEC,eAAe,CAAC,GAAGJ,KAAK,CAACU,QAAQ,CACtDD,oBAAoB,IAAI,KAC1B,CAAC;EAED,oBACET,KAAA,CAAAW,aAAA,CAACV,2BAA2B,CAACW,QAAQ;IACnCC,KAAK,EAAE;MAAEV,cAAc;MAAEC;IAAgB;EAAE,GAE1CI,QACmC,CAAC;AAE3C,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { constVoid } from "fp-ts/function";
|
|
1
2
|
import React, { useMemo } from "react";
|
|
2
3
|
import { Appearance } from "react-native";
|
|
3
4
|
import { IOThemeDark, IOThemeLight, IOThemeLightLegacy } from "./IOColors";
|
|
@@ -13,7 +14,7 @@ export const legacyIOThemes = {
|
|
|
13
14
|
export const IOThemeContext = /*#__PURE__*/React.createContext({
|
|
14
15
|
themeType: Appearance.getColorScheme() === "dark" ? "dark" : "light",
|
|
15
16
|
theme: Appearance.getColorScheme() === "dark" ? IOThemes.dark : IOThemes.light,
|
|
16
|
-
setTheme:
|
|
17
|
+
setTheme: constVoid
|
|
17
18
|
});
|
|
18
19
|
export const useIOThemeContext = () => React.useContext(IOThemeContext);
|
|
19
20
|
export const useIOTheme = () => useIOThemeContext().theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","Appearance","IOThemeDark","IOThemeLight","IOThemeLightLegacy","useIOExperimentalDesign","IOThemes","light","dark","legacyIOThemes","IOThemeContext","createContext","themeType","getColorScheme","theme","setTheme","useIOThemeContext","useContext","useIOTheme","IOThemeContextProvider","children","currentTheme","setCurrentTheme","useState","isExperimental","themeMap","createElement","Provider","value"],"sourceRoot":"../../../src","sources":["core/IOThemeContextProvider.tsx"],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"names":["constVoid","React","useMemo","Appearance","IOThemeDark","IOThemeLight","IOThemeLightLegacy","useIOExperimentalDesign","IOThemes","light","dark","legacyIOThemes","IOThemeContext","createContext","themeType","getColorScheme","theme","setTheme","useIOThemeContext","useContext","useIOTheme","IOThemeContextProvider","children","currentTheme","setCurrentTheme","useState","isExperimental","themeMap","createElement","Provider","value"],"sourceRoot":"../../../src","sources":["core/IOThemeContextProvider.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,gBAAgB;AAC1C,OAAOC,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAEEC,WAAW,EACXC,YAAY,EACZC,kBAAkB,QACb,YAAY;AACnB,SAASC,uBAAuB,QAAQ,mCAAmC;AAE3E,OAAO,MAAMC,QAAQ,GAAG;EAAEC,KAAK,EAAEJ,YAAY;EAAEK,IAAI,EAAEN;AAAY,CAAC;AAClE,OAAO,MAAMO,cAAc,GAAG;EAAEF,KAAK,EAAEH,kBAAkB;EAAEI,IAAI,EAAEN;AAAY,CAAC;AAS9E,OAAO,MAAMQ,cAAiD,gBAC5DX,KAAK,CAACY,aAAa,CAAqB;EACtCC,SAAS,EAAEX,UAAU,CAACY,cAAc,CAAC,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO;EACpEC,KAAK,EACHb,UAAU,CAACY,cAAc,CAAC,CAAC,KAAK,MAAM,GAAGP,QAAQ,CAACE,IAAI,GAAGF,QAAQ,CAACC,KAAK;EACzEQ,QAAQ,EAAEjB;AACZ,CAAC,CAAC;AAEJ,OAAO,MAAMkB,iBAAiB,GAAGA,CAAA,KAAMjB,KAAK,CAACkB,UAAU,CAACP,cAAc,CAAC;AAEvE,OAAO,MAAMQ,UAAU,GAAGA,CAAA,KAAMF,iBAAiB,CAAC,CAAC,CAACF,KAAK;AAMzD,OAAO,MAAMK,sBAAsB,GAAGA,CAAC;EACrCC,QAAQ;EACRN;AACoD,CAAC,KAAK;EAC1D,MAAM,CAACO,YAAY,EAAEC,eAAe,CAAC,GAAGvB,KAAK,CAACwB,QAAQ,CACpDT,KAAK,IAAI,OACX,CAAC;EACD,MAAM;IAAEU;EAAe,CAAC,GAAGnB,uBAAuB,CAAC,CAAC;EAEpD,MAAMoB,QAAQ,GAAGzB,OAAO,CACtB,MAAOwB,cAAc,GAAGlB,QAAQ,GAAGG,cAAe,EAClD,CAACe,cAAc,CACjB,CAAC;EAED,oBACEzB,KAAA,CAAA2B,aAAA,CAAChB,cAAc,CAACiB,QAAQ;IACtBC,KAAK,EAAE;MACLhB,SAAS,EAAES,YAAY;MACvBP,KAAK,EAAEW,QAAQ,CAACJ,YAAY,CAAC;MAC7BN,QAAQ,EAAEO;IACZ;EAAE,GAEDF,QACsB,CAAC;AAE9B,CAAC"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { pipe } from "fp-ts/lib/function";
|
|
2
|
+
import * as O from "fp-ts/lib/Option";
|
|
3
|
+
import I18n from "i18n-js";
|
|
1
4
|
import { useEffect, useState } from "react";
|
|
2
5
|
import { AccessibilityInfo, Platform } from "react-native";
|
|
3
6
|
|
|
7
|
+
/**
|
|
8
|
+
* This function is used to get the text that will be read by the screen reader
|
|
9
|
+
* with the correct minus symbol pronunciation.
|
|
10
|
+
*/
|
|
11
|
+
export const getAccessibleAmountText = amount => pipe(amount, O.fromNullable, O.map(amount => amount.replace("-", I18n.t("global.accessibility.minusSymbol"))), O.getOrElseW(() => undefined));
|
|
12
|
+
|
|
4
13
|
/**
|
|
5
14
|
* Query whether a bold text is currently enabled. The result is true
|
|
6
15
|
* when bold text is enabled and false otherwise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","AccessibilityInfo","Platform","useBoldTextEnabled","boldTextEnabled","setBoldTextEnabled","OS","boldTextChangedSubscription","addEventListener","isBoldTextEnabled","then","catch","_","remove"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,cAAc;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"names":["pipe","O","I18n","useEffect","useState","AccessibilityInfo","Platform","getAccessibleAmountText","amount","fromNullable","map","replace","t","getOrElseW","undefined","useBoldTextEnabled","boldTextEnabled","setBoldTextEnabled","OS","boldTextChangedSubscription","addEventListener","isBoldTextEnabled","then","catch","_","remove"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":"AAAA,SAASA,IAAI,QAAQ,oBAAoB;AACzC,OAAO,KAAKC,CAAC,MAAM,kBAAkB;AACrC,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,cAAc;;AAE1D;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAIC,MAAe,IACrDR,IAAI,CACFQ,MAAM,EACNP,CAAC,CAACQ,YAAY,EACdR,CAAC,CAACS,GAAG,CAACF,MAAM,IACVA,MAAM,CAACG,OAAO,CAAC,GAAG,EAAET,IAAI,CAACU,CAAC,CAAC,kCAAkC,CAAC,CAChE,CAAC,EACDX,CAAC,CAACY,UAAU,CAAC,MAAMC,SAAS,CAC9B,CAAC;;AAEH;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGb,QAAQ,CAAC,KAAK,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACd,IAAIG,QAAQ,CAACY,EAAE,KAAK,KAAK,EAAE;MACzB,MAAMC,2BAA2B,GAAGd,iBAAiB,CAACe,gBAAgB,CACpE,iBAAiB,EACjBC,iBAAiB,IAAI;QACnBJ,kBAAkB,CAACI,iBAAiB,CAAC;MACvC,CACF,CAAC;MAEDhB,iBAAiB,CAACgB,iBAAiB,CAAC,CAAC,CAClCC,IAAI,CAACD,iBAAiB,IAAI;QACzBJ,kBAAkB,CAACI,iBAAiB,CAAC;MACvC,CAAC,CAAC,CACDE,KAAK,CAACC,CAAC,IAAI,KAAK,CAAC;MAEpB,OAAO,MAAM;QACXL,2BAA2B,CAACM,MAAM,CAAC,CAAC;MACtC,CAAC;IACH;IACA;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOT,eAAe;AACxB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import I18n from "i18n-js";
|
|
2
|
+
export const localeDateFormat = (date, format) => isNaN(date.getTime()) ? I18n.t("global.date.invalid") : I18n.strftime(date, format);
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generates a locale formatted timestamp,
|
|
6
|
+
* used to force the refresh of the Image component cache for Android devices
|
|
7
|
+
* every 24 hours.
|
|
8
|
+
* @returns the actual locale date short format without slashes.
|
|
9
|
+
*/
|
|
10
|
+
export const toAndroidCacheTimestamp = () => localeDateFormat(new Date(), I18n.t("global.dateFormats.shortFormat").replace(/\//g, ""));
|
|
11
|
+
//# sourceMappingURL=dates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["I18n","localeDateFormat","date","format","isNaN","getTime","t","strftime","toAndroidCacheTimestamp","Date","replace"],"sourceRoot":"../../../src","sources":["utils/dates.ts"],"mappings":"AAAA,OAAOA,IAAI,MAAM,SAAS;AAE1B,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,IAAU,EAAEC,MAAc,KACzDC,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,GACjBL,IAAI,CAACM,CAAC,CAAC,qBAAqB,CAAC,GAC7BN,IAAI,CAACO,QAAQ,CAACL,IAAI,EAAEC,MAAM,CAAC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,uBAAuB,GAAGA,CAAA,KACrCP,gBAAgB,CACd,IAAIQ,IAAI,CAAC,CAAC,EACVT,IAAI,CAACM,CAAC,CAAC,gCAAgC,CAAC,CAACI,OAAO,CAAC,KAAK,EAAE,EAAE,CAC5D,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { pipe } from "fp-ts/lib/function";
|
|
1
2
|
import { Platform } from "react-native";
|
|
3
|
+
import * as B from "fp-ts/boolean";
|
|
4
|
+
import * as T from "io-ts";
|
|
5
|
+
import * as E from "fp-ts/Either";
|
|
6
|
+
import { toAndroidCacheTimestamp } from "./dates";
|
|
2
7
|
|
|
3
8
|
/**
|
|
4
9
|
* Adds a locale timestamp to the image URI to invalidate cache on the following day if the current platform is Android.
|
|
@@ -8,28 +13,12 @@ import { Platform } from "react-native";
|
|
|
8
13
|
* if the platform is Android and the source contains an URI. The same source otherwise.
|
|
9
14
|
*/
|
|
10
15
|
export const addCacheTimestampToUri = source => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return source;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// This invalidates the cache on the following day
|
|
22
|
-
const cacheBurstParam = new Date().toISOString().split("T")[0].replace(/-/g, "");
|
|
23
|
-
if (Array.isArray(source)) {
|
|
24
|
-
return source.map(image => image.uri ? {
|
|
25
|
-
...image,
|
|
26
|
-
uri: `${image.uri}?ts=${cacheBurstParam}`
|
|
27
|
-
} : image);
|
|
28
|
-
} else {
|
|
29
|
-
return source.uri ? {
|
|
30
|
-
...source,
|
|
31
|
-
uri: `${source.uri}?ts=${cacheBurstParam}`
|
|
32
|
-
} : source;
|
|
33
|
-
}
|
|
16
|
+
const UriSource = T.type({
|
|
17
|
+
uri: T.string
|
|
18
|
+
});
|
|
19
|
+
return pipe(Platform.OS === "android", B.fold(() => source, () => pipe(source, UriSource.decode, E.fold(() => source, () => ({
|
|
20
|
+
...source,
|
|
21
|
+
uri: `${source.uri}?ts=${toAndroidCacheTimestamp()}`
|
|
22
|
+
})))));
|
|
34
23
|
};
|
|
35
24
|
//# sourceMappingURL=image.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","
|
|
1
|
+
{"version":3,"names":["pipe","Platform","B","T","E","toAndroidCacheTimestamp","addCacheTimestampToUri","source","UriSource","type","uri","string","OS","fold","decode"],"sourceRoot":"../../../src","sources":["utils/image.ts"],"mappings":"AAAA,SAASA,IAAI,QAAQ,oBAAoB;AACzC,SAAyBC,QAAQ,QAAQ,cAAc;AACvD,OAAO,KAAKC,CAAC,MAAM,eAAe;AAClC,OAAO,KAAKC,CAAC,MAAM,OAAO;AAC1B,OAAO,KAAKC,CAAC,MAAM,cAAc;AACjC,SAASC,uBAAuB,QAAQ,SAAS;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAIC,MAAsB,IAAK;EAChE,MAAMC,SAAS,GAAGL,CAAC,CAACM,IAAI,CAAC;IACvBC,GAAG,EAAEP,CAAC,CAACQ;EACT,CAAC,CAAC;EAEF,OAAOX,IAAI,CACTC,QAAQ,CAACW,EAAE,KAAK,SAAS,EACzBV,CAAC,CAACW,IAAI,CACJ,MAAMN,MAAM,EACZ,MACEP,IAAI,CACFO,MAAM,EACNC,SAAS,CAACM,MAAM,EAChBV,CAAC,CAACS,IAAI,CACJ,MAAMN,MAAM,EACZ,OAAO;IACL,GAAGA,MAAM;IACTG,GAAG,EAAG,GAAEH,MAAM,CAACG,GAAI,OAAML,uBAAuB,CAAC,CAAE;EACrD,CAAC,CACH,CACF,CACJ,CACF,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
for (const [k] of Object.entries(obj)) {
|
|
5
|
-
if (k.toLowerCase() === lowerKey) {
|
|
6
|
-
return k;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return null;
|
|
10
|
-
};
|
|
1
|
+
import * as A from "fp-ts/Array";
|
|
2
|
+
import { pipe } from "fp-ts/lib/function";
|
|
3
|
+
export const findFirstCaseInsensitive = obj => key => pipe(obj, Object.entries, A.findFirst(([k, _]) => k.toLowerCase() === key.toLowerCase()));
|
|
11
4
|
//# sourceMappingURL=object.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["findFirstCaseInsensitive","obj","key","
|
|
1
|
+
{"version":3,"names":["A","pipe","findFirstCaseInsensitive","obj","key","Object","entries","findFirst","k","_","toLowerCase"],"sourceRoot":"../../../src","sources":["utils/object.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,aAAa;AAEhC,SAASC,IAAI,QAAQ,oBAAoB;AAEzC,OAAO,MAAMC,wBAAwB,GAC/BC,GAAyB,IAC5BC,GAAW,IACVH,IAAI,CACFE,GAAG,EACHE,MAAM,CAACC,OAAO,EACdN,CAAC,CAACO,SAAS,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAKD,CAAC,CAACE,WAAW,CAAC,CAAC,KAAKN,GAAG,CAACM,WAAW,CAAC,CAAC,CAC/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogoPaymentWithFallback.d.ts","sourceRoot":"","sources":["../../../../src/components/common/LogoPaymentWithFallback.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogoPaymentWithFallback.d.ts","sourceRoot":"","sources":["../../../../src/components/common/LogoPaymentWithFallback.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAQ,MAAM,UAAU,CAAC;AACjD,OAAO,EACL,oBAAoB,EAMrB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC;AACF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,mDAKjC,uBAAuB,sBAkBzB,CAAC"}
|
|
@@ -25,19 +25,13 @@ export type ListItemTransaction = WithTestID<PressableBaseProps & {
|
|
|
25
25
|
numberOfLines?: number;
|
|
26
26
|
accessible?: boolean;
|
|
27
27
|
} & ({
|
|
28
|
-
|
|
29
|
-
amount: string;
|
|
30
|
-
amountAccessibilityLabel: string;
|
|
31
|
-
status: ListItemTransactionStatusWithoutBadge;
|
|
32
|
-
};
|
|
28
|
+
transactionStatus: ListItemTransactionStatusWithoutBadge;
|
|
33
29
|
badgeText?: string;
|
|
30
|
+
transactionAmount: string;
|
|
34
31
|
} | {
|
|
35
|
-
|
|
36
|
-
amount?: string;
|
|
37
|
-
amountAccessibilityLabel?: string;
|
|
38
|
-
status: ListItemTransactionStatusWithBadge;
|
|
39
|
-
};
|
|
32
|
+
transactionStatus: ListItemTransactionStatusWithBadge;
|
|
40
33
|
badgeText: string;
|
|
34
|
+
transactionAmount?: string;
|
|
41
35
|
})>;
|
|
42
|
-
export declare const ListItemTransaction: ({ accessibilityLabel, hasChevronRight, isLoading, paymentLogoIcon, onPress, subtitle, testID, title,
|
|
36
|
+
export declare const ListItemTransaction: ({ accessibilityLabel, hasChevronRight, isLoading, paymentLogoIcon, onPress, subtitle, testID, title, transactionAmount, badgeText, transactionStatus, numberOfLines, accessible }: ListItemTransaction) => React.JSX.Element;
|
|
43
37
|
//# sourceMappingURL=ListItemTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemTransaction.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemTransaction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemTransaction.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemTransaction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAoB,MAAM,cAAc,CAAC;AAehE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,OAAO,EACL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,MAAM,qCAAqC,GAAG,OAAO,CACzD,yBAAyB,EACzB,SAAS,GAAG,UAAU,CACvB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,OAAO,CACtD,yBAAyB,EACzB,SAAS,GAAG,UAAU,CACvB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAC/B,iBAAiB,GACjB,cAAc,GACd,KAAK,CAAC,SAAS,CAAC;AAEpB,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,kBAAkB,GAAG;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,CACE;IACE,iBAAiB,EAAE,qCAAqC,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,iBAAiB,EAAE,kCAAkC,CAAC;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CACJ,CACJ,CAAC;AA2BF,eAAO,MAAM,mBAAmB,sLAc7B,mBAAmB,sBAwHrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleIDP.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/ModuleIDP.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ModuleIDP.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/ModuleIDP.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAS,mBAAmB,EAAwB,MAAM,cAAc,CAAC;AAQhF,OAAO,EAEL,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAE/B,UAAU,SAAU,SAAQ,wBAAwB;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,mBAAmB,CAAC;IAC/B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAiBD,eAAO,MAAM,SAAS,qFAQnB,SAAS,sBAuCX,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -9,18 +9,12 @@ export type ModulePaymentNoticeProps = WithTestID<{
|
|
|
9
9
|
subtitle: string;
|
|
10
10
|
onPress: (event: GestureResponderEvent) => void;
|
|
11
11
|
} & ({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
amount: string;
|
|
15
|
-
amountAccessibilityLabel: string;
|
|
16
|
-
};
|
|
12
|
+
paymentNoticeStatus: Extract<PaymentNoticeStatus, "default">;
|
|
13
|
+
paymentNoticeAmount: string;
|
|
17
14
|
badgeText?: never;
|
|
18
15
|
} | {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
amount?: string;
|
|
22
|
-
amountAccessibilityLabel?: string;
|
|
23
|
-
};
|
|
16
|
+
paymentNoticeStatus: Exclude<PaymentNoticeStatus, "default">;
|
|
17
|
+
paymentNoticeAmount?: never;
|
|
24
18
|
badgeText: string;
|
|
25
19
|
})>;
|
|
26
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulePaymentNotice.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/ModulePaymentNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAoB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ModulePaymentNotice.d.ts","sourceRoot":"","sources":["../../../../src/components/modules/ModulePaymentNotice.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAoB,MAAM,cAAc,CAAC;AAIvE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQ/C,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,MAAM,GACN,OAAO,GACP,SAAS,GACT,SAAS,GACT,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C;IACE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,GAAG,CACA;IACE,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAC7D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,GACD;IACE,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAC7D,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB,CACJ,CACF,CAAC;AAgFF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,gEAM7B,wBAAwB,sBAc1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/Tag.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/Tag.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,QAAQ,EAIT,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAmB,OAAO,EAAQ,MAAM,UAAU,CAAC;AAG1D,KAAK,YAAY,GAAG;IAClB,SAAS,EAAE,QAAQ,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,SAAS,GACV;IACE,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,GACD;IACE,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEN,MAAM,MAAM,GAAG,GAAG,SAAS,GACzB,UAAU,CACN;IACE,OAAO,EACH,QAAQ,GACR,cAAc,GACd,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,YAAY,GACZ,QAAQ,CAAC;IACb,eAAe,CAAC,EAAE,KAAK,CAAC;CACzB,GACD;IACE,OAAO,EAAE,YAAY,CAAC;IACtB,eAAe,EAAE,YAAY,CAAC;CAC/B,CACJ,CAAC;AAiFJ;;GAEG;AACH,eAAO,MAAM,GAAG,uEAMb,GAAG,sBAgDL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IODSExperimentalContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IODSExperimentalContextProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,2BAA2B,0CAIpC,CAAC;AAEL,eAAO,MAAM,uBAAuB,iCACW,CAAC;AAEhD,KAAK,kCAAkC,GAAG;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCAGzC,MAAM,iBAAiB,CAAC,kCAAkC,CAAC,sBAY7D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOThemeContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IOThemeContextProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IOThemeContextProvider.d.ts","sourceRoot":"","sources":["../../../src/core/IOThemeContextProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,OAAO,EACL,OAAO,EAIR,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,QAAQ;;;CAA6C,CAAC;AACnE,eAAO,MAAM,cAAc;;;CAAmD,CAAC;AAC/E,KAAK,WAAW,GAAG,MAAM,OAAO,QAAQ,CAAC;AAEzC,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,WAAW,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAMzD,CAAC;AAEL,eAAO,MAAM,iBAAiB,0BAAyC,CAAC;AAExE,eAAO,MAAM,UAAU,eAAkC,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB,wBAGhC,MAAM,iBAAiB,CAAC,2BAA2B,CAAC,sBAsBtD,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This function is used to get the text that will be read by the screen reader
|
|
3
|
+
* with the correct minus symbol pronunciation.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getAccessibleAmountText: (amount?: string) => string | undefined;
|
|
1
6
|
/**
|
|
2
7
|
* Query whether a bold text is currently enabled. The result is true
|
|
3
8
|
* when bold text is enabled and false otherwise.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,uBAQpD,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eA0B9B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const localeDateFormat: (date: Date, format: string) => string;
|
|
2
|
+
/**
|
|
3
|
+
* Generates a locale formatted timestamp,
|
|
4
|
+
* used to force the refresh of the Image component cache for Android devices
|
|
5
|
+
* every 24 hours.
|
|
6
|
+
* @returns the actual locale date short format without slashes.
|
|
7
|
+
*/
|
|
8
|
+
export declare const toAndroidCacheTimestamp: () => string;
|
|
9
|
+
//# sourceMappingURL=dates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../src/utils/dates.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,SAAU,IAAI,UAAU,MAAM,KAAG,MAG7B,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,cAIjC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ImageURISource } from "react-native";
|
|
2
2
|
/**
|
|
3
3
|
* Adds a locale timestamp to the image URI to invalidate cache on the following day if the current platform is Android.
|
|
4
4
|
* Useful to bypass React Native Image component aggressive cache on Android.
|
|
@@ -6,5 +6,5 @@ import { ImageSourcePropType } from "react-native";
|
|
|
6
6
|
* @returns a new source with a modified URI which includes the actual timestamp in the locale format without slashes
|
|
7
7
|
* if the platform is Android and the source contains an URI. The same source otherwise.
|
|
8
8
|
*/
|
|
9
|
-
export declare const addCacheTimestampToUri: (source:
|
|
9
|
+
export declare const addCacheTimestampToUri: (source: ImageURISource) => ImageURISource;
|
|
10
10
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/utils/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/utils/image.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAY,MAAM,cAAc,CAAC;AAMxD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,WAAY,cAAc,mBAuB5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,wBAAwB,WAC1B;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CAAE,WACvB,MAAM,KAAG,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAKhC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-app-design-system",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "The library defining the core components of the design system of @pagopa/io-app",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -100,6 +100,7 @@
|
|
|
100
100
|
"react-dom": "^18.2.0",
|
|
101
101
|
"react-native": "0.71.8",
|
|
102
102
|
"react-native-builder-bob": "^0.20.0",
|
|
103
|
+
"react-native-i18n": "^2.0.15",
|
|
103
104
|
"react-native-web": "^0.18.12",
|
|
104
105
|
"react-native-web-linear-gradient": "^1.1.2",
|
|
105
106
|
"react-test-renderer": "^18.2.0",
|
|
@@ -180,7 +181,9 @@
|
|
|
180
181
|
]
|
|
181
182
|
},
|
|
182
183
|
"dependencies": {
|
|
184
|
+
"@pagopa/ts-commons": "^12.0.0",
|
|
183
185
|
"@testing-library/jest-native": "^5.4.2",
|
|
186
|
+
"@types/react-native-i18n": "2.0.0",
|
|
184
187
|
"@types/react-test-renderer": "^18.0.0",
|
|
185
188
|
"auto-changelog": "^2.4.0",
|
|
186
189
|
"lodash": "^4.17.21",
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import * as O from "fp-ts/lib/Option";
|
|
2
|
+
import { pipe } from "fp-ts/lib/function";
|
|
1
3
|
import * as React from "react";
|
|
4
|
+
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
2
5
|
import { IOColors } from "../../core";
|
|
3
6
|
import { IOIconSizeScale, Icon } from "../icons";
|
|
4
7
|
import {
|
|
@@ -9,7 +12,6 @@ import {
|
|
|
9
12
|
LogoPayment,
|
|
10
13
|
LogoPaymentExt
|
|
11
14
|
} from "../logos";
|
|
12
|
-
import { findFirstCaseInsensitive } from "../../utils/object";
|
|
13
15
|
|
|
14
16
|
export type LogoPaymentWithFallback = {
|
|
15
17
|
brand?: string;
|
|
@@ -40,19 +42,19 @@ export const LogoPaymentWithFallback = ({
|
|
|
40
42
|
}: LogoPaymentWithFallback) => {
|
|
41
43
|
const logos = isExtended ? IOPaymentExtLogos : IOPaymentLogos;
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
return pipe(
|
|
46
|
+
brand,
|
|
47
|
+
O.fromNullable,
|
|
48
|
+
O.chain(findFirstCaseInsensitive(logos)),
|
|
49
|
+
O.map(([brand]) => brand),
|
|
50
|
+
O.fold(
|
|
51
|
+
() => <Icon name="creditCard" size={size} color={fallbackIconColor} />,
|
|
52
|
+
brand =>
|
|
53
|
+
isExtended ? (
|
|
54
|
+
<LogoPaymentExt name={brand as IOLogoPaymentExtType} size={size} />
|
|
55
|
+
) : (
|
|
56
|
+
<LogoPayment name={brand as IOLogoPaymentType} size={size} />
|
|
57
|
+
)
|
|
58
|
+
)
|
|
57
59
|
);
|
|
58
60
|
};
|