etendo-ui-library 1.3.39 → 1.3.41
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/dist-native/components/cards/components/card/Card.js +1 -1
- package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.d.ts +1 -1
- package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.js +1 -1
- package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.d.ts +12 -13
- package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.js +1 -1
- package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.type.d.ts +2 -1
- package/dist-web/components/cards/components/card/Card.js +5 -1
- package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.d.ts +1 -1
- package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.js +13 -24
- package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.d.ts +12 -13
- package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.js +14 -15
- package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.type.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _table_utils=require("../../../../helpers/table_utils");var _Card=require("./Card.style");var _colors=require("../../../../styles/colors");var _SwitchRowCard=_interopRequireDefault(require("./components/switchRowCard/SwitchRowCard"));var _SwitchTitleCard=_interopRequireDefault(require("./components/switchTitleCard/SwitchTitleCard"));var _cards_utils=require("../../../../helpers/cards_utils");var _this=this,_jsxFileName="/home/jenkins/agent/workspace/etendo_ui_library_develop/etendo_ui_library/src/components/cards/components/card/Card.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}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&&Object.prototype.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;}var MAX_ROWS=4;var Card=function Card(_ref){var item=_ref.item,index=_ref.index,metadata=_ref.metadata,_onPress=_ref.onPress;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isPressable=_useState2[0],setIsPressable=_useState2[1];var _useState3=(0,_react.useState)({shadowOpacity:0.1}),_useState4=(0,_slicedToArray2.default)(_useState3,2),shadowOpacity=_useState4[0],setShadowOpacity=_useState4[1];var onHoverIn=function onHoverIn(){setShadowOpacity({shadowOpacity:0.2});};var onHoverOut=function onHoverOut(){setShadowOpacity({shadowOpacity:0.1});};var onPressIn=function onPressIn(){setIsPressable(true);};var onPressOut=function onPressOut(){setIsPressable(false);};var isDisabled=function isDisabled(){return item.isActive===false;};var changeBackground=function changeBackground(){if(isDisabled()||isPressable){return{backgroundColor:_colors.NEUTRAL_200};}};var changeStatusBackground=function changeStatusBackground(){if(isDisabled()){return{backgroundColor:_colors.NEUTRAL_400};}if(item.color){return{backgroundColor:item.color};}return{backgroundColor:_colors.TERTIARY_800};};var changeTextColor=function changeTextColor(){if(isDisabled()){return{color:_colors.NEUTRAL_500};}return{};};var getColumnTitle=(0,_react.useMemo)(function(){return(0,_cards_utils.findRowTitle)(metadata);},[metadata,item]);return _react.default.createElement(_reactNative.Pressable,{disabled:isDisabled(),onHoverIn:onHoverIn,onHoverOut:onHoverOut,onPressIn:onPressIn,onPressOut:onPressOut,onPress:function onPress(){if(_onPress){_onPress((0,_table_utils.findPrimaryId)(metadata,item));}},__self:_this,__source:{fileName:_jsxFileName,lineNumber:
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _table_utils=require("../../../../helpers/table_utils");var _Card=require("./Card.style");var _colors=require("../../../../styles/colors");var _SwitchRowCard=_interopRequireDefault(require("./components/switchRowCard/SwitchRowCard"));var _SwitchTitleCard=_interopRequireDefault(require("./components/switchTitleCard/SwitchTitleCard"));var _cards_utils=require("../../../../helpers/cards_utils");var _this=this,_jsxFileName="/home/jenkins/agent/workspace/etendo_ui_library_develop/etendo_ui_library/src/components/cards/components/card/Card.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}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&&Object.prototype.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;}var MAX_ROWS=4;var Card=function Card(_ref){var item=_ref.item,index=_ref.index,metadata=_ref.metadata,_onPress=_ref.onPress;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),isPressable=_useState2[0],setIsPressable=_useState2[1];var _useState3=(0,_react.useState)({shadowOpacity:0.1}),_useState4=(0,_slicedToArray2.default)(_useState3,2),shadowOpacity=_useState4[0],setShadowOpacity=_useState4[1];var onHoverIn=function onHoverIn(){setShadowOpacity({shadowOpacity:0.2});};var onHoverOut=function onHoverOut(){setShadowOpacity({shadowOpacity:0.1});};var onPressIn=function onPressIn(){setIsPressable(true);};var onPressOut=function onPressOut(){setIsPressable(false);};var isDisabled=function isDisabled(){return item.isActive===false;};var changeBackground=function changeBackground(){if(isDisabled()||isPressable){return{backgroundColor:_colors.NEUTRAL_200};}return{backgroundColor:_Card.styles.container.backgroundColor};};var changeStatusBackground=function changeStatusBackground(){if(isDisabled()){return{backgroundColor:_colors.NEUTRAL_400};}if(item.color){return{backgroundColor:item.color};}return{backgroundColor:_colors.TERTIARY_800};};var changeTextColor=function changeTextColor(){if(isDisabled()){return{color:_colors.NEUTRAL_500};}return{};};var getColumnTitle=(0,_react.useMemo)(function(){return(0,_cards_utils.findRowTitle)(metadata);},[metadata,item]);return _react.default.createElement(_reactNative.Pressable,{disabled:isDisabled(),onHoverIn:onHoverIn,onHoverOut:onHoverOut,onPressIn:onPressIn,onPressOut:onPressOut,onPress:function onPress(){if(_onPress){_onPress((0,_table_utils.findPrimaryId)(metadata,item));}},__self:_this,__source:{fileName:_jsxFileName,lineNumber:72,columnNumber:5}},_react.default.createElement(_reactNative.Animated.View,{style:[_Card.styles.container,changeBackground(),shadowOpacity],__self:_this,__source:{fileName:_jsxFileName,lineNumber:83,columnNumber:7}},_react.default.createElement(_reactNative.View,{style:[_Card.styles.status,changeStatusBackground()],__self:_this,__source:{fileName:_jsxFileName,lineNumber:85,columnNumber:9}}),_react.default.createElement(_SwitchTitleCard.default,{row:getColumnTitle,item:item,color:changeTextColor(),__self:_this,__source:{fileName:_jsxFileName,lineNumber:86,columnNumber:9}}),metadata.filter(function(row){return row.visible;}).slice(0,MAX_ROWS).map(function(row,rowIndex){return row.visible&&!row.title&&_react.default.createElement(_SwitchRowCard.default,{key:'rowCard'+index+rowIndex,row:row,item:item,color:changeTextColor(),backgroundColor:changeBackground(),__self:_this,__source:{fileName:_jsxFileName,lineNumber:98,columnNumber:17}});})));};var _default=exports.default=Card;
|
package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchRowCardProps } from './SwitchRowCard.type';
|
|
3
3
|
export declare const getIconByType: ({ row, item, color, }: SwitchRowCardProps) => React.JSX.Element | undefined;
|
|
4
|
-
declare const SwitchRowCard: ({ row, item, color }: SwitchRowCardProps) => React.JSX.Element | undefined;
|
|
4
|
+
declare const SwitchRowCard: ({ row, item, color, backgroundColor, }: SwitchRowCardProps) => React.JSX.Element | undefined;
|
|
5
5
|
export default SwitchRowCard;
|
package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getIconByType=exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _icons=require("../../../../../../assets/images/icons");var _SwitchRowCard=require("./SwitchRowCard.style");var _this=this,_jsxFileName="/home/jenkins/agent/workspace/etendo_ui_library_develop/etendo_ui_library/src/components/cards/components/card/components/switchRowCard/SwitchRowCard.tsx";var DOTS='
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getIconByType=exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _icons=require("../../../../../../assets/images/icons");var _SwitchRowCard=require("./SwitchRowCard.style");var _this=this,_jsxFileName="/home/jenkins/agent/workspace/etendo_ui_library_develop/etendo_ui_library/src/components/cards/components/card/components/switchRowCard/SwitchRowCard.tsx";var DOTS='··························';var getIconByType=exports.getIconByType=function getIconByType(_ref){var row=_ref.row,item=_ref.item,_ref$color=_ref.color,color=_ref$color===void 0?{}:_ref$color;if(row!=null&&row.key&&(item[row.key]||item[row.key]===false)){switch(row.type){case'date':return _react.default.createElement(_icons.CalendarIcon,{style:_SwitchRowCard.styles.calendar,fill:color.color,__self:_this,__source:{fileName:_jsxFileName,lineNumber:21,columnNumber:16}});case'time':return _react.default.createElement(_icons.TimeIcon,{style:_SwitchRowCard.styles.calendar,fill:color.color,__self:_this,__source:{fileName:_jsxFileName,lineNumber:23,columnNumber:16}});case'boolean':return item[row.key]?_react.default.createElement(_icons.CheckTrueIcon,{style:_SwitchRowCard.styles.check,stroke:color.color,fill:'transparent',__self:_this,__source:{fileName:_jsxFileName,lineNumber:26,columnNumber:11}}):_react.default.createElement(_icons.CheckFalseIcon,{style:_SwitchRowCard.styles.check,stroke:color.color,fill:'transparent',__self:_this,__source:{fileName:_jsxFileName,lineNumber:32,columnNumber:11}});default:break;}}};var SwitchRowCard=function SwitchRowCard(_ref2){var row=_ref2.row,item=_ref2.item,_ref2$color=_ref2.color,color=_ref2$color===void 0?{}:_ref2$color,backgroundColor=_ref2.backgroundColor;if(!row){return;}if(row.type!=='string'&&row.type){return _react.default.createElement(_reactNative.View,{style:_SwitchRowCard.styles.row,__self:_this,__source:{fileName:_jsxFileName,lineNumber:55,columnNumber:7}},_react.default.createElement(_reactNative.Text,{numberOfLines:1,ellipsizeMode:"clip",style:_SwitchRowCard.styles.dots,__self:_this,__source:{fileName:_jsxFileName,lineNumber:56,columnNumber:9}},DOTS),_react.default.createElement(_reactNative.View,{style:[_SwitchRowCard.styles.contentMiddleRow,_SwitchRowCard.styles.paddingRight,backgroundColor],__self:_this,__source:{fileName:_jsxFileName,lineNumber:59,columnNumber:9}},_react.default.createElement(_reactNative.Text,{style:[_SwitchRowCard.styles.textName,color],ellipsizeMode:"tail",numberOfLines:1,__self:_this,__source:{fileName:_jsxFileName,lineNumber:65,columnNumber:11}},row==null?void 0:row.label)),_react.default.createElement(_reactNative.View,{style:[_SwitchRowCard.styles.contentMiddleRow,_SwitchRowCard.styles.paddingLeft,backgroundColor],__self:_this,__source:{fileName:_jsxFileName,lineNumber:72,columnNumber:9}},getIconByType({row:row,item:item,color:color}),row.type!=='boolean'&&_react.default.createElement(_reactNative.Text,{style:[_SwitchRowCard.styles.textValue,color],ellipsizeMode:"tail",numberOfLines:1,__self:_this,__source:{fileName:_jsxFileName,lineNumber:80,columnNumber:13}},row!=null&&row.key?item[row.key]:'')));}return _react.default.createElement(_reactNative.View,{style:_SwitchRowCard.styles.column,__self:_this,__source:{fileName:_jsxFileName,lineNumber:93,columnNumber:5}},_react.default.createElement(_reactNative.Text,{style:[_SwitchRowCard.styles.textName,color],ellipsizeMode:"tail",numberOfLines:1,__self:_this,__source:{fileName:_jsxFileName,lineNumber:94,columnNumber:7}},row==null?void 0:row.label),_react.default.createElement(_reactNative.Text,{style:[_SwitchRowCard.styles.textValue,color],ellipsizeMode:"tail",numberOfLines:2,__self:_this,__source:{fileName:_jsxFileName,lineNumber:100,columnNumber:7}},row!=null&&row.key?item[row.key]:''));};var _default=exports.default=SwitchRowCard;
|
|
@@ -15,9 +15,10 @@ export declare const styles: {
|
|
|
15
15
|
};
|
|
16
16
|
row: {
|
|
17
17
|
width: "100%";
|
|
18
|
+
justifyContent: "space-between";
|
|
18
19
|
flexDirection: "row";
|
|
19
20
|
paddingHorizontal: number;
|
|
20
|
-
|
|
21
|
+
marginBottom: number;
|
|
21
22
|
alignItems: "center";
|
|
22
23
|
};
|
|
23
24
|
column: {
|
|
@@ -39,28 +40,26 @@ export declare const styles: {
|
|
|
39
40
|
maxWidth: number;
|
|
40
41
|
};
|
|
41
42
|
dots: {
|
|
42
|
-
flex: number;
|
|
43
43
|
letterSpacing: number;
|
|
44
44
|
color: string;
|
|
45
45
|
fontWeight: "700";
|
|
46
|
+
position: "absolute";
|
|
46
47
|
overflow: "hidden";
|
|
48
|
+
lineHeight: number;
|
|
49
|
+
alignSelf: "center";
|
|
50
|
+
textAlignVertical: "center";
|
|
51
|
+
display: "flex";
|
|
47
52
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
width: "50%";
|
|
53
|
+
contentMiddleRow: {
|
|
54
|
+
maxWidth: "50%";
|
|
51
55
|
flexDirection: "row";
|
|
52
56
|
alignItems: "center";
|
|
53
57
|
height: number;
|
|
54
58
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
marginLeft: number;
|
|
58
|
-
};
|
|
59
|
-
alignDotsLeft: {
|
|
60
|
-
textAlign: "left";
|
|
61
|
-
marginRight: number;
|
|
59
|
+
paddingLeft: {
|
|
60
|
+
paddingLeft: number;
|
|
62
61
|
};
|
|
63
|
-
|
|
62
|
+
paddingRight: {
|
|
64
63
|
paddingRight: number;
|
|
65
64
|
};
|
|
66
65
|
};
|
package/dist-native/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.styles=void 0;var _reactNative=require("react-native");var _colors=require("../../../../../../styles/colors");var styles=exports.styles=_reactNative.StyleSheet.create({textName:{fontFamily:'Inter',color:_colors.NEUTRAL_800,fontWeight:'700',fontSize:14,lineHeight:20},textValue:{fontFamily:'Inter',color:_colors.NEUTRAL_1000,fontWeight:'600',fontSize:14,lineHeight:20},row:{width:'100%',flexDirection:'row',paddingHorizontal:12,
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.styles=void 0;var _reactNative=require("react-native");var _colors=require("../../../../../../styles/colors");var styles=exports.styles=_reactNative.StyleSheet.create({textName:{fontFamily:'Inter',color:_colors.NEUTRAL_800,fontWeight:'700',fontSize:14,lineHeight:20},textValue:{fontFamily:'Inter',color:_colors.NEUTRAL_1000,fontWeight:'600',fontSize:14,lineHeight:20},row:{width:'100%',justifyContent:'space-between',flexDirection:'row',paddingHorizontal:12,marginBottom:8,alignItems:'center'},column:{flexDirection:'column',paddingHorizontal:12,paddingBottom:8},check:{width:16,height:16,minWidth:16,maxWidth:16},calendar:{width:16,height:16,marginRight:4,minWidth:16,maxWidth:16},dots:{letterSpacing:8,color:_colors.NEUTRAL_400,fontWeight:'700',position:'absolute',overflow:'hidden',lineHeight:20,alignSelf:'center',textAlignVertical:'center',display:'flex'},contentMiddleRow:{maxWidth:'50%',flexDirection:'row',alignItems:'center',height:20},paddingLeft:{paddingLeft:8},paddingRight:{paddingRight:8}});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { TextStyle } from 'react-native';
|
|
1
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
2
|
import { Metadata } from '../../../../../../types/table.types';
|
|
3
3
|
export interface SwitchRowCardProps {
|
|
4
4
|
row?: Metadata;
|
|
5
5
|
item: any;
|
|
6
6
|
color: TextStyle | undefined;
|
|
7
7
|
margin?: boolean;
|
|
8
|
+
backgroundColor?: ViewStyle;
|
|
8
9
|
}
|
|
@@ -53,6 +53,9 @@ var Card = function Card(_ref) {
|
|
|
53
53
|
backgroundColor: NEUTRAL_200
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
+
return {
|
|
57
|
+
backgroundColor: styles.container.backgroundColor
|
|
58
|
+
};
|
|
56
59
|
};
|
|
57
60
|
var changeStatusBackground = function changeStatusBackground() {
|
|
58
61
|
if (isDisabled()) {
|
|
@@ -106,7 +109,8 @@ var Card = function Card(_ref) {
|
|
|
106
109
|
key: 'rowCard' + index + rowIndex,
|
|
107
110
|
row: row,
|
|
108
111
|
item: item,
|
|
109
|
-
color: changeTextColor()
|
|
112
|
+
color: changeTextColor(),
|
|
113
|
+
backgroundColor: changeBackground()
|
|
110
114
|
});
|
|
111
115
|
})));
|
|
112
116
|
};
|
package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchRowCardProps } from './SwitchRowCard.type';
|
|
3
3
|
export declare const getIconByType: ({ row, item, color, }: SwitchRowCardProps) => React.JSX.Element | undefined;
|
|
4
|
-
declare const SwitchRowCard: ({ row, item, color }: SwitchRowCardProps) => React.JSX.Element | undefined;
|
|
4
|
+
declare const SwitchRowCard: ({ row, item, color, backgroundColor, }: SwitchRowCardProps) => React.JSX.Element | undefined;
|
|
5
5
|
export default SwitchRowCard;
|
|
@@ -2,13 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { View, Text } from "react-native-web";
|
|
3
3
|
import { CalendarIcon, CheckFalseIcon, CheckTrueIcon, TimeIcon } from "../../../../../../assets/images/icons";
|
|
4
4
|
import { styles } from "./SwitchRowCard.style";
|
|
5
|
-
var DOTS = '
|
|
5
|
+
var DOTS = '··························';
|
|
6
6
|
export var getIconByType = function getIconByType(_ref) {
|
|
7
7
|
var row = _ref.row,
|
|
8
8
|
item = _ref.item,
|
|
9
9
|
_ref$color = _ref.color,
|
|
10
10
|
color = _ref$color === void 0 ? {} : _ref$color;
|
|
11
|
-
if (row !== null && row !== void 0 && row.key && item[row.key]) {
|
|
11
|
+
if (row !== null && row !== void 0 && row.key && (item[row.key] || item[row.key] === false)) {
|
|
12
12
|
switch (row.type) {
|
|
13
13
|
case 'date':
|
|
14
14
|
return /*#__PURE__*/React.createElement(CalendarIcon, {
|
|
@@ -39,38 +39,27 @@ var SwitchRowCard = function SwitchRowCard(_ref2) {
|
|
|
39
39
|
var row = _ref2.row,
|
|
40
40
|
item = _ref2.item,
|
|
41
41
|
_ref2$color = _ref2.color,
|
|
42
|
-
color = _ref2$color === void 0 ? {} : _ref2$color
|
|
42
|
+
color = _ref2$color === void 0 ? {} : _ref2$color,
|
|
43
|
+
backgroundColor = _ref2.backgroundColor;
|
|
43
44
|
if (!row) {
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
47
|
if (row.type !== 'string' && row.type) {
|
|
47
48
|
return /*#__PURE__*/React.createElement(View, {
|
|
48
49
|
style: styles.row
|
|
49
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
50
|
-
style: styles.rowWitchdotsContainer
|
|
51
50
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
52
|
-
style: [styles.textName, color],
|
|
53
|
-
ellipsizeMode: "tail",
|
|
54
|
-
numberOfLines: 1
|
|
55
|
-
}, row === null || row === void 0 ? void 0 : row.label), /*#__PURE__*/React.createElement(Text, {
|
|
56
51
|
numberOfLines: 1,
|
|
57
52
|
ellipsizeMode: "clip",
|
|
58
|
-
style:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
textOverflow: 'clip'
|
|
62
|
-
}]
|
|
63
|
-
}, DOTS)), /*#__PURE__*/React.createElement(View, {
|
|
64
|
-
style: styles.rowWitchdotsContainer
|
|
53
|
+
style: styles.dots
|
|
54
|
+
}, DOTS), /*#__PURE__*/React.createElement(View, {
|
|
55
|
+
style: [styles.contentMiddleRow, styles.paddingRight, backgroundColor]
|
|
65
56
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
66
|
-
|
|
67
|
-
ellipsizeMode: "
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}]
|
|
73
|
-
}, DOTS), getIconByType({
|
|
57
|
+
style: [styles.textName, color],
|
|
58
|
+
ellipsizeMode: "tail",
|
|
59
|
+
numberOfLines: 1
|
|
60
|
+
}, row === null || row === void 0 ? void 0 : row.label)), /*#__PURE__*/React.createElement(View, {
|
|
61
|
+
style: [styles.contentMiddleRow, styles.paddingLeft, backgroundColor]
|
|
62
|
+
}, getIconByType({
|
|
74
63
|
row: row,
|
|
75
64
|
item: item,
|
|
76
65
|
color: color
|
package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.d.ts
CHANGED
|
@@ -15,9 +15,10 @@ export declare const styles: {
|
|
|
15
15
|
};
|
|
16
16
|
row: {
|
|
17
17
|
width: "100%";
|
|
18
|
+
justifyContent: "space-between";
|
|
18
19
|
flexDirection: "row";
|
|
19
20
|
paddingHorizontal: number;
|
|
20
|
-
|
|
21
|
+
marginBottom: number;
|
|
21
22
|
alignItems: "center";
|
|
22
23
|
};
|
|
23
24
|
column: {
|
|
@@ -39,28 +40,26 @@ export declare const styles: {
|
|
|
39
40
|
maxWidth: number;
|
|
40
41
|
};
|
|
41
42
|
dots: {
|
|
42
|
-
flex: number;
|
|
43
43
|
letterSpacing: number;
|
|
44
44
|
color: string;
|
|
45
45
|
fontWeight: "700";
|
|
46
|
+
position: "absolute";
|
|
46
47
|
overflow: "hidden";
|
|
48
|
+
lineHeight: number;
|
|
49
|
+
alignSelf: "center";
|
|
50
|
+
textAlignVertical: "center";
|
|
51
|
+
display: "flex";
|
|
47
52
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
width: "50%";
|
|
53
|
+
contentMiddleRow: {
|
|
54
|
+
maxWidth: "50%";
|
|
51
55
|
flexDirection: "row";
|
|
52
56
|
alignItems: "center";
|
|
53
57
|
height: number;
|
|
54
58
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
marginLeft: number;
|
|
58
|
-
};
|
|
59
|
-
alignDotsLeft: {
|
|
60
|
-
textAlign: "left";
|
|
61
|
-
marginRight: number;
|
|
59
|
+
paddingLeft: {
|
|
60
|
+
paddingLeft: number;
|
|
62
61
|
};
|
|
63
|
-
|
|
62
|
+
paddingRight: {
|
|
64
63
|
paddingRight: number;
|
|
65
64
|
};
|
|
66
65
|
};
|
package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.style.js
CHANGED
|
@@ -17,9 +17,10 @@ export var styles = StyleSheet.create({
|
|
|
17
17
|
},
|
|
18
18
|
row: {
|
|
19
19
|
width: '100%',
|
|
20
|
+
justifyContent: 'space-between',
|
|
20
21
|
flexDirection: 'row',
|
|
21
22
|
paddingHorizontal: 12,
|
|
22
|
-
|
|
23
|
+
marginBottom: 8,
|
|
23
24
|
alignItems: 'center'
|
|
24
25
|
},
|
|
25
26
|
column: {
|
|
@@ -41,28 +42,26 @@ export var styles = StyleSheet.create({
|
|
|
41
42
|
maxWidth: 16
|
|
42
43
|
},
|
|
43
44
|
dots: {
|
|
44
|
-
flex: 1,
|
|
45
45
|
letterSpacing: 8,
|
|
46
46
|
color: NEUTRAL_400,
|
|
47
47
|
fontWeight: '700',
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
rowWitchdotsContainer: {
|
|
48
|
+
position: 'absolute',
|
|
51
49
|
overflow: 'hidden',
|
|
52
|
-
|
|
50
|
+
lineHeight: 20,
|
|
51
|
+
alignSelf: 'center',
|
|
52
|
+
textAlignVertical: 'center',
|
|
53
|
+
display: 'flex'
|
|
54
|
+
},
|
|
55
|
+
contentMiddleRow: {
|
|
56
|
+
maxWidth: '50%',
|
|
53
57
|
flexDirection: 'row',
|
|
54
58
|
alignItems: 'center',
|
|
55
59
|
height: 20
|
|
56
60
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
marginLeft: 8
|
|
60
|
-
},
|
|
61
|
-
alignDotsLeft: {
|
|
62
|
-
textAlign: 'left',
|
|
63
|
-
marginRight: 8
|
|
61
|
+
paddingLeft: {
|
|
62
|
+
paddingLeft: 8
|
|
64
63
|
},
|
|
65
|
-
|
|
66
|
-
paddingRight:
|
|
64
|
+
paddingRight: {
|
|
65
|
+
paddingRight: 8
|
|
67
66
|
}
|
|
68
67
|
});
|
package/dist-web/components/cards/components/card/components/switchRowCard/SwitchRowCard.type.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { TextStyle } from 'react-native';
|
|
1
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
2
2
|
import { Metadata } from '../../../../../../types/table.types';
|
|
3
3
|
export interface SwitchRowCardProps {
|
|
4
4
|
row?: Metadata;
|
|
5
5
|
item: any;
|
|
6
6
|
color: TextStyle | undefined;
|
|
7
7
|
margin?: boolean;
|
|
8
|
+
backgroundColor?: ViewStyle;
|
|
8
9
|
}
|