@teamturing/react-native-kit 1.3.1 → 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.
@@ -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 : _profile_outline_gray_.default, {
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","defaultImage","exports"],"sourceRoot":"../../../../src","sources":["component/ProfilePhoto/LightProfilePhoto.tsx"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,sBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAyD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEzD;AACA,MAAMG,iBAAiB,GAAGA,CAAC;EACzBC,eAAe;EACfC,KAAK;EACLC,IAAI,EAAEC,KAAK;EACXC,WAAW;EACXC,WAAW,GAAG,CAAC;EACfC,QAAQ,GAAG;AAQb,CAAC,KAAK;EACJ,MAAMJ,IAAI,GAAGC,KAAK,IAAI,EAAE;EACxB,oBACE,IAAAR,WAAA,CAAAY,GAAA,EAAClB,YAAA,CAAAmB,IAAI;IAEHP,KAAK,EAAE,CACL;MACEQ,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC,EACDT,KAAK,EACL;MACEU,KAAK,EAAET,IAAI;MACXU,MAAM,EAAEV,IAAI;MACZW,YAAY,EAAE,IAAI;MAClBR,WAAW,EAAE;IACf,CAAC,CACD;IAAAS,QAAA,EAEDC,WAAG,CAACC,MAAM,CACTC,SAAE,CAACC,cAAc,CAAClB,eAAe,CAAC,GAC9BM,QAAQ,GACN,IAAAa,iCAA0B,EAAC;MAAEC,GAAG,EAAEpB,eAAe;MAAEqB,YAAY,EAAEnB;IAAK,CAAC,CAAC,GACxEF,eAAe,GACjBsB,8BAAY,EAChB;MACEX,KAAK,EAAET,IAAI;MACXU,MAAM,EAAEV,IAAI;MACZD,KAAK,EAAE;QAAEI,WAAW;QAAED,WAAW;QAAES,YAAY,EAAE;MAAI;IACvD,CACF;EAAC,GA1BIb,eA2BD,CAAC;AAEX,CAAC;AAACuB,OAAA,CAAAxB,iBAAA,GAAAA,iBAAA","ignoreList":[]}
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;AAEA,IAAAC,MAAA,GAAAD,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,
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;AAWxB,MAAMC,YAAY,GAAGA,CAAC;EACpBC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,SAAS,GAAG,KAAK;EACjBC,MAAM,EAAEC,OAAO;EACfC,MAAM;EACNC;AACK,CAAC,KAAmB;EACzB,MAAMH,MAAM,GAAGI,UAAE,CAACC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KAAM;UAACZ,IAAI,EAAE;QAAG,CAAE;MAAC,CAC3B,CAAC,GACL,IAAI;IAAA,CACH;EAAC,CACJ,CAAC;AAEX,CAAC;AAACa,OAAA,CAAApC,YAAA,GAAAA,YAAA","ignoreList":[]}
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":[]}
@@ -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 defaultImage from './profile_outline_gray_90.png';
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","defaultImage","jsx","_jsx","LightProfilePhoto","profileImageUrl","style","size","_size","borderColor","borderWidth","optimize","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,YAAY,MAAM,+BAA+B;;AAExD;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;AAQb,CAAC,KAAK;EACJ,MAAMJ,IAAI,GAAGC,KAAK,IAAI,EAAE;EACxB,oBACEL,IAAA,CAACN,IAAI;IAEHS,KAAK,EAAE,CACL;MACEM,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC,EACDP,KAAK,EACL;MACEQ,KAAK,EAAEP,IAAI;MACXQ,MAAM,EAAER,IAAI;MACZS,YAAY,EAAE,IAAI;MAClBN,WAAW,EAAE;IACf,CAAC,CACD;IAAAO,QAAA,EAEDjB,GAAG,CAACkB,MAAM,CACTpB,EAAE,CAACqB,cAAc,CAACd,eAAe,CAAC,GAC9BM,QAAQ,GACNZ,0BAA0B,CAAC;MAAEqB,GAAG,EAAEf,eAAe;MAAEgB,YAAY,EAAEd;IAAK,CAAC,CAAC,GACxEF,eAAe,GACjBJ,YAAY,EAChB;MACEa,KAAK,EAAEP,IAAI;MACXQ,MAAM,EAAER,IAAI;MACZD,KAAK,EAAE;QAAEI,WAAW;QAAED,WAAW;QAAEO,YAAY,EAAE;MAAI;IACvD,CACF;EAAC,GA1BIX,eA2BD,CAAC;AAEX,CAAC;AAED,SAASD,iBAAiB","ignoreList":[]}
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,SAAy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6B,OAAO;UAChCR,UAAU,EAAE,QAAQ;UACpBD,cAAc,EAAE,QAAQ;UACxBU,WAAW,EAAE,CAAC;UACdC,WAAW,EAAE/B,OAAO,CAACgC,KAAK;UAC1BC,QAAQ,EAAE,UAAU;UACpBC,KAAK,EAAE,CAAC,CAAC;UACTC,MAAM,EAAE,CAAC;QACX,CAAE;QACFC,aAAa,EAAE,MAAO;QAAAZ,QAAA,eAEtBlB,IAAA,CAACJ,IAAI;UAACmC,IAAI,EAAE,KAAM;UAACV,IAAI,EAAE;QAAG,CAAE;MAAC,CAC3B,CAAC,GACL,IAAI;IAAA,CACH;EAAC,CACJ,CAAC;AAEX,CAAC;AAED,SAASjB,YAAY","ignoreList":[]}
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,SAASC,EAAE,QAAQ,qBAAY;AAC/B,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,KAAK,QAAQ,uBAAc;AAEpC,SAASC,iBAAiB,QAAQ,wBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,MAAMC,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,GAAGd,EAAE,CAACmB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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;AASzD,QAAA,MAAM,iBAAiB;qBAQJ,MAAM;YACf,UAAU,KAAK,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;;;;;6CAsClE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,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;AAWpE,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;CAC1B,CAAC;AACF,QAAA,MAAM,YAAY,uFAQf,KAAK,KAAG,YAiDV,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,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,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;AASzD,QAAA,MAAM,iBAAiB;qBAQJ,MAAM;YACf,UAAU,KAAK,SAAS,EAAE,aAAa,GAAG,aAAa,CAAC,CAAC;;;;;6CAsClE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,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;AAWpE,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;CAC1B,CAAC;AACF,QAAA,MAAM,YAAY,uFAQf,KAAK,KAAG,YAiDV,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamturing/react-native-kit",
3
- "version": "1.3.1",
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": "3c14a1e46424fc2bcdf9de4340196cef6b674ef6"
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 defaultImage from './profile_outline_gray_90.png';
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={{