@teamturing/react-native-kit 1.3.0 → 1.3.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/component/ProfilePhoto/LightProfilePhoto.js +3 -2
- package/lib/commonjs/component/ProfilePhoto/LightProfilePhoto.js.map +1 -1
- package/lib/commonjs/component/ProfilePhoto/ProfilePhoto.js +4 -2
- package/lib/commonjs/component/ProfilePhoto/ProfilePhoto.js.map +1 -1
- package/lib/commonjs/hook/useTimeoutHandler.js +3 -1
- package/lib/commonjs/hook/useTimeoutHandler.js.map +1 -1
- package/lib/module/component/ProfilePhoto/LightProfilePhoto.js +3 -2
- package/lib/module/component/ProfilePhoto/LightProfilePhoto.js.map +1 -1
- package/lib/module/component/ProfilePhoto/ProfilePhoto.js +4 -2
- package/lib/module/component/ProfilePhoto/ProfilePhoto.js.map +1 -1
- package/lib/module/hook/useTimeoutHandler.js +3 -1
- package/lib/module/hook/useTimeoutHandler.js.map +1 -1
- package/lib/typescript/commonjs/src/component/ProfilePhoto/LightProfilePhoto.d.ts +3 -2
- package/lib/typescript/commonjs/src/component/ProfilePhoto/LightProfilePhoto.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/component/ProfilePhoto/ProfilePhoto.d.ts +3 -2
- package/lib/typescript/commonjs/src/component/ProfilePhoto/ProfilePhoto.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hook/useTimeoutHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/component/ProfilePhoto/LightProfilePhoto.d.ts +3 -2
- package/lib/typescript/module/src/component/ProfilePhoto/LightProfilePhoto.d.ts.map +1 -1
- package/lib/typescript/module/src/component/ProfilePhoto/ProfilePhoto.d.ts +3 -2
- package/lib/typescript/module/src/component/ProfilePhoto/ProfilePhoto.d.ts.map +1 -1
- package/lib/typescript/module/src/hook/useTimeoutHandler.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/component/ProfilePhoto/LightProfilePhoto.tsx +4 -2
- package/src/component/ProfilePhoto/ProfilePhoto.tsx +4 -2
- package/src/hook/useTimeoutHandler.ts +3 -1
|
@@ -17,7 +17,8 @@ const LightProfilePhoto = ({
|
|
|
17
17
|
size: _size,
|
|
18
18
|
borderColor,
|
|
19
19
|
borderWidth = 0,
|
|
20
|
-
optimize = true
|
|
20
|
+
optimize = true,
|
|
21
|
+
defaultImage = _profile_outline_gray_.default
|
|
21
22
|
}) => {
|
|
22
23
|
const size = _size || 56;
|
|
23
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
@@ -33,7 +34,7 @@ const LightProfilePhoto = ({
|
|
|
33
34
|
children: _index2.Img.render(_index.is.notEmptyString(profileImageUrl) ? optimize ? (0, _index.appendImageSizeQueryParams)({
|
|
34
35
|
url: profileImageUrl,
|
|
35
36
|
desiredWidth: size
|
|
36
|
-
}) : profileImageUrl :
|
|
37
|
+
}) : profileImageUrl : defaultImage, {
|
|
37
38
|
width: size,
|
|
38
39
|
height: size,
|
|
39
40
|
style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_index","_index2","_profile_outline_gray_","_interopRequireDefault","_jsxRuntime","e","__esModule","default","LightProfilePhoto","profileImageUrl","style","size","_size","borderColor","borderWidth","optimize","jsx","View","alignItems","justifyContent","width","height","borderRadius","children","Img","render","is","notEmptyString","appendImageSizeQueryParams","url","desiredWidth","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_index","_index2","_profile_outline_gray_","_interopRequireDefault","_jsxRuntime","e","__esModule","default","LightProfilePhoto","profileImageUrl","style","size","_size","borderColor","borderWidth","optimize","defaultImage","DEFAULT_PROFILE_IMAGE","jsx","View","alignItems","justifyContent","width","height","borderRadius","children","Img","render","is","notEmptyString","appendImageSizeQueryParams","url","desiredWidth","exports"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/LightProfilePhoto.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAE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const ProfilePhoto = ({
|
|
|
19
19
|
pressable = false,
|
|
20
20
|
length: _length,
|
|
21
21
|
testID,
|
|
22
|
-
profileImageUrl
|
|
22
|
+
profileImageUrl,
|
|
23
|
+
defaultImage
|
|
23
24
|
}) => {
|
|
24
25
|
const length = _index2.is.number(_length) ? _length : defaultLength;
|
|
25
26
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
@@ -40,7 +41,8 @@ const ProfilePhoto = ({
|
|
|
40
41
|
disabled: !pressable,
|
|
41
42
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LightProfilePhoto.LightProfilePhoto, {
|
|
42
43
|
profileImageUrl: profileImageUrl || '',
|
|
43
|
-
size: length
|
|
44
|
+
size: length,
|
|
45
|
+
defaultImage: defaultImage
|
|
44
46
|
}), showIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
45
47
|
style: {
|
|
46
48
|
width: 32,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_index","_index2","_index3","_index4","_LightProfilePhoto","_jsxRuntime","defaultLength","ProfilePhoto","style","onPress","showIcon","pressable","length","_length","testID","profileImageUrl","is","number","jsx","View","justifyContent","alignItems","width","height","children","jsxs","Touch","borderRadius","disabled","LightProfilePhoto","size","backgroundColor","palette","gray200","borderWidth","borderColor","white","position","right","bottom","pointerEvents","Icon","name","exports"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/ProfilePhoto.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAExD,MAAMO,aAAa,GAAG,EAAE;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_index","_index2","_index3","_index4","_LightProfilePhoto","_jsxRuntime","defaultLength","ProfilePhoto","style","onPress","showIcon","pressable","length","_length","testID","profileImageUrl","defaultImage","is","number","jsx","View","justifyContent","alignItems","width","height","children","jsxs","Touch","borderRadius","disabled","LightProfilePhoto","size","backgroundColor","palette","gray200","borderWidth","borderColor","white","position","right","bottom","pointerEvents","Icon","name","exports"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/ProfilePhoto.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAExD,MAAMO,aAAa,GAAG,EAAE;AAYxB,MAAMC,YAAY,GAAGA,CAAC;EACpBC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,SAAS,GAAG,KAAK;EACjBC,MAAM,EAAEC,OAAO;EACfC,MAAM;EACNC,eAAe;EACfC;AACK,CAAC,KAAmB;EACzB,MAAMJ,MAAM,GAAGK,UAAE,CAACC,MAAM,CAACL,OAAO,CAAC,GAAGA,OAAO,GAAGP,aAAa;EAE3D,oBACE,IAAAD,WAAA,CAAAc,GAAA,EAACrB,YAAA,CAAAsB,IAAI;IACHZ,KAAK,EAAE,CACLA,KAAK,EACL;MACEa,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,KAAK,EAAEX,MAAM;MACbY,MAAM,EAAEZ;IACV,CAAC,CACD;IAAAa,QAAA,eAEF,IAAApB,WAAA,CAAAqB,IAAA,EAACvB,OAAA,CAAAwB,KAAK;MACJb,MAAM,EAAEA,MAAM,IAAI,sBAAuB;MACzCN,KAAK,EAAE;QACLoB,YAAY,EAAE,IAAI;QAClBL,KAAK,EAAE,MAAM;QACbC,MAAM,EAAE;MACV,CAAE;MACFf,OAAO,EAAEA,OAAQ;MACjBoB,QAAQ,EAAE,CAAClB,SAAU;MAAAc,QAAA,gBAErB,IAAApB,WAAA,CAAAc,GAAA,EAACf,kBAAA,CAAA0B,iBAAiB;QAACf,eAAe,EAAEA,eAAe,IAAI,EAAG;QAACgB,IAAI,EAAEnB,MAAO;QAACI,YAAY,EAAEA;MAAa,CAAE,CAAC,EACtGN,QAAQ,gBACP,IAAAL,WAAA,CAAAc,GAAA,EAACrB,YAAA,CAAAsB,IAAI;QACHZ,KAAK,EAAE;UACLe,KAAK,EAAE,EAAE;UACTC,MAAM,EAAE,EAAE;UACVI,YAAY,EAAE,EAAE;UAChBI,eAAe,EAAEC,cAAO,CAACC,OAAO;UAChCZ,UAAU,EAAE,QAAQ;UACpBD,cAAc,EAAE,QAAQ;UACxBc,WAAW,EAAE,CAAC;UACdC,WAAW,EAAEH,cAAO,CAACI,KAAK;UAC1BC,QAAQ,EAAE,UAAU;UACpBC,KAAK,EAAE,CAAC,CAAC;UACTC,MAAM,EAAE,CAAC;QACX,CAAE;QACFC,aAAa,EAAE,MAAO;QAAAhB,QAAA,eAEtB,IAAApB,WAAA,CAAAc,GAAA,EAACjB,OAAA,CAAAwC,IAAI;UAACC,IAAI,EAAE,KAAM;UAACZ,IAAI,EAAE;QAAG,CAAE;MAAC,CAC3B,CAAC,GACL,IAAI;IAAA,CACH;EAAC,CACJ,CAAC;AAEX,CAAC;AAACa,OAAA,CAAArC,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -11,7 +11,9 @@ var _useUnmount = require("./useUnmount.js");
|
|
|
11
11
|
function useTimeoutHandler() {
|
|
12
12
|
const handler = (0, _react.useRef)(-1);
|
|
13
13
|
(0, _useUnmount.useUnmount)(() => {
|
|
14
|
-
|
|
14
|
+
if (handler.current !== -1) {
|
|
15
|
+
clearTimeout(handler.current);
|
|
16
|
+
}
|
|
15
17
|
});
|
|
16
18
|
return handler;
|
|
17
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_useStableCallback","_useUnmount","useTimeoutHandler","handler","useRef","useUnmount","
|
|
1
|
+
{"version":3,"names":["_react","require","_useStableCallback","_useUnmount","useTimeoutHandler","handler","useRef","useUnmount","current","clearTimeout","useTimeoutHandlers","forEach","clearAllTimers","useStableCallback","clearTimerAtUnmount","id","withClear","push","setAutoClearTimeout","callback","ms","setTimeout"],"sourceRoot":"../../../src","sources":["hook/useTimeoutHandler.ts"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,SAASG,iBAAiBA,CAAA,EAAG;EAC3B,MAAMC,OAAO,GAAG,IAAAC,aAAM,EAAM,CAAC,CAAC,CAAC;EAE/B,IAAAC,sBAAU,EAAC,MAAM;IACf,IAAIF,OAAO,CAACG,OAAO,KAAK,CAAC,CAAC,EAAE;MAC1BC,YAAY,CAACJ,OAAO,CAACG,OAAO,CAAC;IAC/B;EACF,CAAC,CAAC;EAEF,OAAOH,OAAO;AAChB;AAEA,SAASK,kBAAkBA,CAAA,EAAG;EAC5B,MAAML,OAAO,GAAG,IAAAC,aAAM,EAAW,EAAE,CAAC;EAEpC,IAAAC,sBAAU,EAAC,MAAM;IACfF,OAAO,CAACG,OAAO,CAACG,OAAO,CAACF,YAAY,CAAC;EACvC,CAAC,CAAC;EAEF,MAAMG,cAAc,GAAG,IAAAC,oCAAiB,EAAC,MAAM;IAC7CR,OAAO,CAACG,OAAO,CAACG,OAAO,CAACF,YAAY,CAAC;IACrCJ,OAAO,CAACG,OAAO,GAAG,EAAE;EACtB,CAAC,CAAC;EAEF,MAAMM,mBAAmB,GAAG,IAAAD,oCAAiB,EAC3C,CAACE,EAAO,EAAE;IAAEC;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IAC1E,IAAIA,SAAS,EAAE;MACbJ,cAAc,CAAC,CAAC;IAClB;IACAP,OAAO,CAACG,OAAO,CAACS,IAAI,CAACF,EAAE,CAAC;IACxB,OAAOA,EAAE;EACX,CACF,CAAC;EAED,MAAMG,mBAAmB,GAAG,IAAAL,oCAAiB,EAC3C,CAACM,QAAoB,EAAEC,EAAU,EAAE;IAAEJ;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IACnG,IAAIA,SAAS,EAAE;MACbJ,cAAc,CAAC,CAAC;IAClB;IACA,OAAOE,mBAAmB,CAACO,UAAU,CAACF,QAAQ,EAAEC,EAAE,CAAC,CAAC;EACtD,CACF,CAAC;EAED,OAAO;IAAEN,mBAAmB;IAAEF,cAAc;IAAEM;EAAoB,CAAC;AACrE","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import { is, appendImageSizeQueryParams } from "../../util/index.js";
|
|
5
5
|
import { Img } from "../Img/index.js";
|
|
6
|
-
import
|
|
6
|
+
import DEFAULT_PROFILE_IMAGE from './profile_outline_gray_90.png';
|
|
7
7
|
|
|
8
8
|
// this is used for just rendering character image in light component like list item(shouldn't be heavy)
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -13,7 +13,8 @@ const LightProfilePhoto = ({
|
|
|
13
13
|
size: _size,
|
|
14
14
|
borderColor,
|
|
15
15
|
borderWidth = 0,
|
|
16
|
-
optimize = true
|
|
16
|
+
optimize = true,
|
|
17
|
+
defaultImage = DEFAULT_PROFILE_IMAGE
|
|
17
18
|
}) => {
|
|
18
19
|
const size = _size || 56;
|
|
19
20
|
return /*#__PURE__*/_jsx(View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","is","appendImageSizeQueryParams","Img","
|
|
1
|
+
{"version":3,"names":["View","is","appendImageSizeQueryParams","Img","DEFAULT_PROFILE_IMAGE","jsx","_jsx","LightProfilePhoto","profileImageUrl","style","size","_size","borderColor","borderWidth","optimize","defaultImage","alignItems","justifyContent","width","height","borderRadius","children","render","notEmptyString","url","desiredWidth"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/LightProfilePhoto.tsx"],"mappings":";;AACA,SAASA,IAAI,QAAQ,cAAc;AAEnC,SAASC,EAAE,EAAEC,0BAA0B,QAAQ,qBAAY;AAC3D,SAASC,GAAG,QAAQ,iBAAQ;AAE5B,OAAOC,qBAAqB,MAAM,+BAA+B;;AAEjE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,iBAAiB,GAAGA,CAAC;EACzBC,eAAe;EACfC,KAAK;EACLC,IAAI,EAAEC,KAAK;EACXC,WAAW;EACXC,WAAW,GAAG,CAAC;EACfC,QAAQ,GAAG,IAAI;EACfC,YAAY,GAAGX;AASjB,CAAC,KAAK;EACJ,MAAMM,IAAI,GAAGC,KAAK,IAAI,EAAE;EACxB,oBACEL,IAAA,CAACN,IAAI;IAEHS,KAAK,EAAE,CACL;MACEO,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC,EACDR,KAAK,EACL;MACES,KAAK,EAAER,IAAI;MACXS,MAAM,EAAET,IAAI;MACZU,YAAY,EAAE,IAAI;MAClBP,WAAW,EAAE;IACf,CAAC,CACD;IAAAQ,QAAA,EAEDlB,GAAG,CAACmB,MAAM,CACTrB,EAAE,CAACsB,cAAc,CAACf,eAAe,CAAC,GAC9BM,QAAQ,GACNZ,0BAA0B,CAAC;MAAEsB,GAAG,EAAEhB,eAAe;MAAEiB,YAAY,EAAEf;IAAK,CAAC,CAAC,GACxEF,eAAe,GACjBO,YAAY,EAChB;MACEG,KAAK,EAAER,IAAI;MACXS,MAAM,EAAET,IAAI;MACZD,KAAK,EAAE;QAAEI,WAAW;QAAED,WAAW;QAAEQ,YAAY,EAAE;MAAI;IACvD,CACF;EAAC,GA1BIZ,eA2BD,CAAC;AAEX,CAAC;AAED,SAASD,iBAAiB","ignoreList":[]}
|
|
@@ -15,7 +15,8 @@ const ProfilePhoto = ({
|
|
|
15
15
|
pressable = false,
|
|
16
16
|
length: _length,
|
|
17
17
|
testID,
|
|
18
|
-
profileImageUrl
|
|
18
|
+
profileImageUrl,
|
|
19
|
+
defaultImage
|
|
19
20
|
}) => {
|
|
20
21
|
const length = is.number(_length) ? _length : defaultLength;
|
|
21
22
|
return /*#__PURE__*/_jsx(View, {
|
|
@@ -36,7 +37,8 @@ const ProfilePhoto = ({
|
|
|
36
37
|
disabled: !pressable,
|
|
37
38
|
children: [/*#__PURE__*/_jsx(LightProfilePhoto, {
|
|
38
39
|
profileImageUrl: profileImageUrl || '',
|
|
39
|
-
size: length
|
|
40
|
+
size: length,
|
|
41
|
+
defaultImage: defaultImage
|
|
40
42
|
}), showIcon ? /*#__PURE__*/_jsx(View, {
|
|
41
43
|
style: {
|
|
42
44
|
width: 32,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","palette","is","Icon","Touch","LightProfilePhoto","jsx","_jsx","jsxs","_jsxs","defaultLength","ProfilePhoto","style","onPress","showIcon","pressable","length","_length","testID","profileImageUrl","number","justifyContent","alignItems","width","height","children","borderRadius","disabled","size","backgroundColor","gray200","borderWidth","borderColor","white","position","right","bottom","pointerEvents","name"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/ProfilePhoto.tsx"],"mappings":";;AACA,SAAyCA,IAAI,
|
|
1
|
+
{"version":3,"names":["View","palette","is","Icon","Touch","LightProfilePhoto","jsx","_jsx","jsxs","_jsxs","defaultLength","ProfilePhoto","style","onPress","showIcon","pressable","length","_length","testID","profileImageUrl","defaultImage","number","justifyContent","alignItems","width","height","children","borderRadius","disabled","size","backgroundColor","gray200","borderWidth","borderColor","white","position","right","bottom","pointerEvents","name"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/ProfilePhoto.tsx"],"mappings":";;AACA,SAAyCA,IAAI,QAAkC,cAAc;AAE7F,SAASC,OAAO,QAAQ,sBAAa;AACrC,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E,QAAQ;UACpBD,cAAc,EAAE,QAAQ;UACxBU,WAAW,EAAE,CAAC;UACdC,WAAW,EAAEhC,OAAO,CAACiC,KAAK;UAC1BC,QAAQ,EAAE,UAAU;UACpBC,KAAK,EAAE,CAAC,CAAC;UACTC,MAAM,EAAE,CAAC;QACX,CAAE;QACFC,aAAa,EAAE,MAAO;QAAAZ,QAAA,eAEtBnB,IAAA,CAACJ,IAAI;UAACoC,IAAI,EAAE,KAAM;UAACV,IAAI,EAAE;QAAG,CAAE;MAAC,CAC3B,CAAC,GACL,IAAI;IAAA,CACH;EAAC,CACJ,CAAC;AAEX,CAAC;AAED,SAASlB,YAAY","ignoreList":[]}
|
|
@@ -6,7 +6,9 @@ import { useUnmount } from "./useUnmount.js";
|
|
|
6
6
|
function useTimeoutHandler() {
|
|
7
7
|
const handler = useRef(-1);
|
|
8
8
|
useUnmount(() => {
|
|
9
|
-
|
|
9
|
+
if (handler.current !== -1) {
|
|
10
|
+
clearTimeout(handler.current);
|
|
11
|
+
}
|
|
10
12
|
});
|
|
11
13
|
return handler;
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useRef","useStableCallback","useUnmount","useTimeoutHandler","handler","
|
|
1
|
+
{"version":3,"names":["useRef","useStableCallback","useUnmount","useTimeoutHandler","handler","current","clearTimeout","useTimeoutHandlers","forEach","clearAllTimers","clearTimerAtUnmount","id","withClear","push","setAutoClearTimeout","callback","ms","setTimeout"],"sourceRoot":"../../../src","sources":["hook/useTimeoutHandler.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,OAAO;AAE9B,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,UAAU,QAAQ,iBAAc;AAEzC,SAASC,iBAAiBA,CAAA,EAAG;EAC3B,MAAMC,OAAO,GAAGJ,MAAM,CAAM,CAAC,CAAC,CAAC;EAE/BE,UAAU,CAAC,MAAM;IACf,IAAIE,OAAO,CAACC,OAAO,KAAK,CAAC,CAAC,EAAE;MAC1BC,YAAY,CAACF,OAAO,CAACC,OAAO,CAAC;IAC/B;EACF,CAAC,CAAC;EAEF,OAAOD,OAAO;AAChB;AAEA,SAASG,kBAAkBA,CAAA,EAAG;EAC5B,MAAMH,OAAO,GAAGJ,MAAM,CAAW,EAAE,CAAC;EAEpCE,UAAU,CAAC,MAAM;IACfE,OAAO,CAACC,OAAO,CAACG,OAAO,CAACF,YAAY,CAAC;EACvC,CAAC,CAAC;EAEF,MAAMG,cAAc,GAAGR,iBAAiB,CAAC,MAAM;IAC7CG,OAAO,CAACC,OAAO,CAACG,OAAO,CAACF,YAAY,CAAC;IACrCF,OAAO,CAACC,OAAO,GAAG,EAAE;EACtB,CAAC,CAAC;EAEF,MAAMK,mBAAmB,GAAGT,iBAAiB,CAC3C,CAACU,EAAO,EAAE;IAAEC;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IAC1E,IAAIA,SAAS,EAAE;MACbH,cAAc,CAAC,CAAC;IAClB;IACAL,OAAO,CAACC,OAAO,CAACQ,IAAI,CAACF,EAAE,CAAC;IACxB,OAAOA,EAAE;EACX,CACF,CAAC;EAED,MAAMG,mBAAmB,GAAGb,iBAAiB,CAC3C,CAACc,QAAoB,EAAEC,EAAU,EAAE;IAAEJ;EAAmC,CAAC,GAAG;IAAEA,SAAS,EAAE;EAAM,CAAC,KAAK;IACnG,IAAIA,SAAS,EAAE;MACbH,cAAc,CAAC,CAAC;IAClB;IACA,OAAOC,mBAAmB,CAACO,UAAU,CAACF,QAAQ,EAAEC,EAAE,CAAC,CAAC;EACtD,CACF,CAAC;EAED,OAAO;IAAEN,mBAAmB;IAAED,cAAc;IAAEK;EAAoB,CAAC;AACrE;AAEA,SAASX,iBAAiB,EAAEI,kBAAkB","ignoreList":[]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
declare const LightProfilePhoto: ({ profileImageUrl, style, size: _size, borderColor, borderWidth, optimize, }: {
|
|
1
|
+
import type { StyleProp, ViewStyle, ImageSourcePropType } from 'react-native';
|
|
2
|
+
declare const LightProfilePhoto: ({ profileImageUrl, style, size: _size, borderColor, borderWidth, optimize, defaultImage, }: {
|
|
3
3
|
profileImageUrl: string;
|
|
4
4
|
style?: StyleProp<Omit<ViewStyle, 'borderWidth' | 'borderColor'>>;
|
|
5
5
|
size?: number | undefined;
|
|
6
6
|
borderWidth?: number | undefined;
|
|
7
7
|
borderColor?: string | undefined;
|
|
8
8
|
optimize?: boolean | undefined;
|
|
9
|
+
defaultImage?: ImageSourcePropType | undefined;
|
|
9
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export { LightProfilePhoto };
|
|
11
12
|
//# sourceMappingURL=LightProfilePhoto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/LightProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"LightProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/LightProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAS9E,QAAA,MAAM,iBAAiB;qBASJ,MAAM;YACf,UAAU,KAAK,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;;;;;;6CAuClE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewStyle, type ImageSourcePropType } from 'react-native';
|
|
3
3
|
type Props = {
|
|
4
4
|
style?: StyleProp<ViewStyle>;
|
|
5
5
|
onPress?: () => void;
|
|
@@ -8,7 +8,8 @@ type Props = {
|
|
|
8
8
|
length?: number;
|
|
9
9
|
testID?: string;
|
|
10
10
|
profileImageUrl?: string;
|
|
11
|
+
defaultImage?: ImageSourcePropType;
|
|
11
12
|
};
|
|
12
|
-
declare const ProfilePhoto: ({ style, onPress, showIcon, pressable, length: _length, testID, profileImageUrl, }: Props) => ReactElement;
|
|
13
|
+
declare const ProfilePhoto: ({ style, onPress, showIcon, pressable, length: _length, testID, profileImageUrl, defaultImage, }: Props) => ReactElement;
|
|
13
14
|
export { ProfilePhoto };
|
|
14
15
|
//# sourceMappingURL=ProfilePhoto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/ProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/ProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAW9F,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC,CAAC;AACF,QAAA,MAAM,YAAY,qGASf,KAAK,KAAG,YAiDV,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,0CAUzB;AAED,iBAAS,kBAAkB;8BAalB,GAAG;;;;oCAUG,MAAM,IAAI,MAAM,MAAM;;;EASpC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
declare const LightProfilePhoto: ({ profileImageUrl, style, size: _size, borderColor, borderWidth, optimize, }: {
|
|
1
|
+
import type { StyleProp, ViewStyle, ImageSourcePropType } from 'react-native';
|
|
2
|
+
declare const LightProfilePhoto: ({ profileImageUrl, style, size: _size, borderColor, borderWidth, optimize, defaultImage, }: {
|
|
3
3
|
profileImageUrl: string;
|
|
4
4
|
style?: StyleProp<Omit<ViewStyle, 'borderWidth' | 'borderColor'>>;
|
|
5
5
|
size?: number | undefined;
|
|
6
6
|
borderWidth?: number | undefined;
|
|
7
7
|
borderColor?: string | undefined;
|
|
8
8
|
optimize?: boolean | undefined;
|
|
9
|
+
defaultImage?: ImageSourcePropType | undefined;
|
|
9
10
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export { LightProfilePhoto };
|
|
11
12
|
//# sourceMappingURL=LightProfilePhoto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/LightProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"LightProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/LightProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAS9E,QAAA,MAAM,iBAAiB;qBASJ,MAAM;YACf,UAAU,KAAK,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;;;;;;6CAuClE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewStyle, type ImageSourcePropType } from 'react-native';
|
|
3
3
|
type Props = {
|
|
4
4
|
style?: StyleProp<ViewStyle>;
|
|
5
5
|
onPress?: () => void;
|
|
@@ -8,7 +8,8 @@ type Props = {
|
|
|
8
8
|
length?: number;
|
|
9
9
|
testID?: string;
|
|
10
10
|
profileImageUrl?: string;
|
|
11
|
+
defaultImage?: ImageSourcePropType;
|
|
11
12
|
};
|
|
12
|
-
declare const ProfilePhoto: ({ style, onPress, showIcon, pressable, length: _length, testID, profileImageUrl, }: Props) => ReactElement;
|
|
13
|
+
declare const ProfilePhoto: ({ style, onPress, showIcon, pressable, length: _length, testID, profileImageUrl, defaultImage, }: Props) => ReactElement;
|
|
13
14
|
export { ProfilePhoto };
|
|
14
15
|
//# sourceMappingURL=ProfilePhoto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/ProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfilePhoto.d.ts","sourceRoot":"","sources":["../../../../../../src/component/ProfilePhoto/ProfilePhoto.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAQ,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAW9F,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,mBAAmB,CAAC;CACpC,CAAC;AACF,QAAA,MAAM,YAAY,qGASf,KAAK,KAAG,YAiDV,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useTimeoutHandler.d.ts","sourceRoot":"","sources":["../../../../../src/hook/useTimeoutHandler.ts"],"names":[],"mappings":";AAKA,iBAAS,iBAAiB,0CAUzB;AAED,iBAAS,kBAAkB;8BAalB,GAAG;;;;oCAUG,MAAM,IAAI,MAAM,MAAM;;;EASpC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-native-kit",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "React Native Common Module for Team Turing",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"example": "yarn workspace @teamturing/react-native-kit-example",
|
|
@@ -158,5 +158,5 @@
|
|
|
158
158
|
"bugs": {
|
|
159
159
|
"url": "https://github.com/weareteamturing/bombe/issues"
|
|
160
160
|
},
|
|
161
|
-
"gitHead": "
|
|
161
|
+
"gitHead": "cf48ea1baf5ab0a956a94f750abbee533c8fd2c8"
|
|
162
162
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
1
|
+
import type { StyleProp, ViewStyle, ImageSourcePropType } from 'react-native';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { is, appendImageSizeQueryParams } from '../../util';
|
|
5
5
|
import { Img } from '../Img';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import DEFAULT_PROFILE_IMAGE from './profile_outline_gray_90.png';
|
|
8
8
|
|
|
9
9
|
// this is used for just rendering character image in light component like list item(shouldn't be heavy)
|
|
10
10
|
const LightProfilePhoto = ({
|
|
@@ -14,6 +14,7 @@ const LightProfilePhoto = ({
|
|
|
14
14
|
borderColor,
|
|
15
15
|
borderWidth = 0,
|
|
16
16
|
optimize = true,
|
|
17
|
+
defaultImage = DEFAULT_PROFILE_IMAGE,
|
|
17
18
|
}: {
|
|
18
19
|
profileImageUrl: string;
|
|
19
20
|
style?: StyleProp<Omit<ViewStyle, 'borderWidth' | 'borderColor'>>;
|
|
@@ -21,6 +22,7 @@ const LightProfilePhoto = ({
|
|
|
21
22
|
borderWidth?: number;
|
|
22
23
|
borderColor?: string;
|
|
23
24
|
optimize?: boolean;
|
|
25
|
+
defaultImage?: ImageSourcePropType;
|
|
24
26
|
}) => {
|
|
25
27
|
const size = _size || 56;
|
|
26
28
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import { type StyleProp, type ViewStyle, View } from 'react-native';
|
|
2
|
+
import { type StyleProp, type ViewStyle, View, type ImageSourcePropType } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { palette } from '../../theme';
|
|
5
5
|
import { is } from '../../util';
|
|
@@ -18,6 +18,7 @@ type Props = {
|
|
|
18
18
|
length?: number;
|
|
19
19
|
testID?: string;
|
|
20
20
|
profileImageUrl?: string;
|
|
21
|
+
defaultImage?: ImageSourcePropType;
|
|
21
22
|
};
|
|
22
23
|
const ProfilePhoto = ({
|
|
23
24
|
style,
|
|
@@ -27,6 +28,7 @@ const ProfilePhoto = ({
|
|
|
27
28
|
length: _length,
|
|
28
29
|
testID,
|
|
29
30
|
profileImageUrl,
|
|
31
|
+
defaultImage,
|
|
30
32
|
}: Props): ReactElement => {
|
|
31
33
|
const length = is.number(_length) ? _length : defaultLength;
|
|
32
34
|
|
|
@@ -52,7 +54,7 @@ const ProfilePhoto = ({
|
|
|
52
54
|
onPress={onPress}
|
|
53
55
|
disabled={!pressable}
|
|
54
56
|
>
|
|
55
|
-
<LightProfilePhoto profileImageUrl={profileImageUrl || ''} size={length} />
|
|
57
|
+
<LightProfilePhoto profileImageUrl={profileImageUrl || ''} size={length} defaultImage={defaultImage} />
|
|
56
58
|
{showIcon ? (
|
|
57
59
|
<View
|
|
58
60
|
style={{
|