@xaypay/tui 0.1.1 → 0.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/dist/index.es.js +45 -21
- package/dist/index.js +45 -21
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1596,14 +1596,15 @@ const TD = ({
|
|
|
1596
1596
|
optionIndex
|
|
1597
1597
|
});
|
|
1598
1598
|
};
|
|
1599
|
-
const handleContentList = (e, item, index, innerIndex, listContentId, listContent, listContentIndex) => {
|
|
1599
|
+
const handleContentList = (e, item, index, innerIndex, listContentId, listContent, listContentIndex, contentListInnerItem) => {
|
|
1600
1600
|
handleContentListClick(e, {
|
|
1601
1601
|
item,
|
|
1602
1602
|
index,
|
|
1603
1603
|
innerIndex,
|
|
1604
1604
|
listContentId,
|
|
1605
1605
|
listContent,
|
|
1606
|
-
listContentIndex
|
|
1606
|
+
listContentIndex,
|
|
1607
|
+
contentListInnerItem
|
|
1607
1608
|
});
|
|
1608
1609
|
};
|
|
1609
1610
|
return /*#__PURE__*/React__default.createElement("td", {
|
|
@@ -1763,20 +1764,46 @@ const TD = ({
|
|
|
1763
1764
|
height: item.status === 'close' ? '0px' : 'auto'
|
|
1764
1765
|
}
|
|
1765
1766
|
}, item.contentList.map((innerItem, innerItemIndex) => {
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1767
|
+
if (Array.isArray(innerItem.content)) {
|
|
1768
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1769
|
+
key: `__${innerItemIndex}__`,
|
|
1770
|
+
style: {
|
|
1771
|
+
display: 'flex',
|
|
1772
|
+
justifyContent: 'center'
|
|
1773
|
+
}
|
|
1774
|
+
}, innerItem.content.map((contInnerItem, contInnerIndex) => {
|
|
1775
|
+
return /*#__PURE__*/React__default.createElement("p", {
|
|
1776
|
+
key: `${contInnerItem}_${contInnerIndex}`,
|
|
1777
|
+
className: styles$9['list-text'],
|
|
1778
|
+
style: {
|
|
1779
|
+
maxWidth: '100%',
|
|
1780
|
+
color: openListColor,
|
|
1781
|
+
textAlign: tBodyTextAlign,
|
|
1782
|
+
fontSize: openListFontSize,
|
|
1783
|
+
fontStyle: openListFontStyle,
|
|
1784
|
+
fontWeight: openListFontWeight,
|
|
1785
|
+
fontFamily: openListFontFamily,
|
|
1786
|
+
marginRight: contInnerIndex === innerItem.content.length - 1 ? '0px' : '10px'
|
|
1787
|
+
},
|
|
1788
|
+
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex, contInnerItem)
|
|
1789
|
+
}, contInnerItem.content === 0 ? contInnerItem.content.toString() : contInnerItem.content ? contInnerItem.content : '');
|
|
1790
|
+
}));
|
|
1791
|
+
} else {
|
|
1792
|
+
return /*#__PURE__*/React__default.createElement("p", {
|
|
1793
|
+
key: `${innerItem}_${innerItemIndex}`,
|
|
1794
|
+
className: styles$9['list-text'],
|
|
1795
|
+
style: {
|
|
1796
|
+
maxWidth: '100%',
|
|
1797
|
+
color: openListColor,
|
|
1798
|
+
textAlign: tBodyTextAlign,
|
|
1799
|
+
fontSize: openListFontSize,
|
|
1800
|
+
fontStyle: openListFontStyle,
|
|
1801
|
+
fontWeight: openListFontWeight,
|
|
1802
|
+
fontFamily: openListFontFamily
|
|
1803
|
+
},
|
|
1804
|
+
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
|
|
1805
|
+
}, innerItem.content === 0 ? innerItem.content.toString() : innerItem.content ? innerItem.content : '');
|
|
1806
|
+
}
|
|
1780
1807
|
}))), !hasOwnerProperty(item, 'hideArrow') && item.hideArrow !== false && hasOwnerProperty(item, 'rightArrow') && item.rightArrow === true ? hasOwnerProperty(item, 'contentList') && (hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && /*#__PURE__*/React__default.createElement("div", {
|
|
1781
1808
|
id: item.id,
|
|
1782
1809
|
style: {
|
|
@@ -2256,7 +2283,8 @@ const Table = ({
|
|
|
2256
2283
|
listItemId: data.listContentId,
|
|
2257
2284
|
listItemContent: data.listContent,
|
|
2258
2285
|
itemIndex: removeItemIndex !== undefined && removeItemIndex < data.innerIndex ? data.innerIndex - 1 : data.innerIndex,
|
|
2259
|
-
listItemInnerIndex: data.listContentIndex
|
|
2286
|
+
listItemInnerIndex: data.listContentIndex,
|
|
2287
|
+
contentListInnerItem: data.contentListInnerItem
|
|
2260
2288
|
};
|
|
2261
2289
|
getData(listData);
|
|
2262
2290
|
};
|
|
@@ -3028,14 +3056,10 @@ const Input = ({
|
|
|
3028
3056
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
3029
3057
|
if (type === 'tel') {
|
|
3030
3058
|
if (!phoneNumberRegex.test(val)) {
|
|
3031
|
-
if (errorMessage) {
|
|
3032
|
-
setInnerErrorMessage(errorMessage);
|
|
3033
|
-
}
|
|
3034
3059
|
if (val !== '') {
|
|
3035
3060
|
val = prevVal;
|
|
3036
3061
|
}
|
|
3037
3062
|
} else {
|
|
3038
|
-
setInnerErrorMessage('');
|
|
3039
3063
|
if (val.length > 8) {
|
|
3040
3064
|
val = val.substr(0, 8);
|
|
3041
3065
|
}
|
package/dist/index.js
CHANGED
|
@@ -1626,14 +1626,15 @@ const TD = ({
|
|
|
1626
1626
|
optionIndex
|
|
1627
1627
|
});
|
|
1628
1628
|
};
|
|
1629
|
-
const handleContentList = (e, item, index, innerIndex, listContentId, listContent, listContentIndex) => {
|
|
1629
|
+
const handleContentList = (e, item, index, innerIndex, listContentId, listContent, listContentIndex, contentListInnerItem) => {
|
|
1630
1630
|
handleContentListClick(e, {
|
|
1631
1631
|
item,
|
|
1632
1632
|
index,
|
|
1633
1633
|
innerIndex,
|
|
1634
1634
|
listContentId,
|
|
1635
1635
|
listContent,
|
|
1636
|
-
listContentIndex
|
|
1636
|
+
listContentIndex,
|
|
1637
|
+
contentListInnerItem
|
|
1637
1638
|
});
|
|
1638
1639
|
};
|
|
1639
1640
|
return /*#__PURE__*/React__default["default"].createElement("td", {
|
|
@@ -1793,20 +1794,46 @@ const TD = ({
|
|
|
1793
1794
|
height: item.status === 'close' ? '0px' : 'auto'
|
|
1794
1795
|
}
|
|
1795
1796
|
}, item.contentList.map((innerItem, innerItemIndex) => {
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1797
|
+
if (Array.isArray(innerItem.content)) {
|
|
1798
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1799
|
+
key: `__${innerItemIndex}__`,
|
|
1800
|
+
style: {
|
|
1801
|
+
display: 'flex',
|
|
1802
|
+
justifyContent: 'center'
|
|
1803
|
+
}
|
|
1804
|
+
}, innerItem.content.map((contInnerItem, contInnerIndex) => {
|
|
1805
|
+
return /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1806
|
+
key: `${contInnerItem}_${contInnerIndex}`,
|
|
1807
|
+
className: styles$9['list-text'],
|
|
1808
|
+
style: {
|
|
1809
|
+
maxWidth: '100%',
|
|
1810
|
+
color: openListColor,
|
|
1811
|
+
textAlign: tBodyTextAlign,
|
|
1812
|
+
fontSize: openListFontSize,
|
|
1813
|
+
fontStyle: openListFontStyle,
|
|
1814
|
+
fontWeight: openListFontWeight,
|
|
1815
|
+
fontFamily: openListFontFamily,
|
|
1816
|
+
marginRight: contInnerIndex === innerItem.content.length - 1 ? '0px' : '10px'
|
|
1817
|
+
},
|
|
1818
|
+
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex, contInnerItem)
|
|
1819
|
+
}, contInnerItem.content === 0 ? contInnerItem.content.toString() : contInnerItem.content ? contInnerItem.content : '');
|
|
1820
|
+
}));
|
|
1821
|
+
} else {
|
|
1822
|
+
return /*#__PURE__*/React__default["default"].createElement("p", {
|
|
1823
|
+
key: `${innerItem}_${innerItemIndex}`,
|
|
1824
|
+
className: styles$9['list-text'],
|
|
1825
|
+
style: {
|
|
1826
|
+
maxWidth: '100%',
|
|
1827
|
+
color: openListColor,
|
|
1828
|
+
textAlign: tBodyTextAlign,
|
|
1829
|
+
fontSize: openListFontSize,
|
|
1830
|
+
fontStyle: openListFontStyle,
|
|
1831
|
+
fontWeight: openListFontWeight,
|
|
1832
|
+
fontFamily: openListFontFamily
|
|
1833
|
+
},
|
|
1834
|
+
onClick: e => handleContentList(e, item, index, innerIndex, innerItem.id, innerItem.content, innerItemIndex)
|
|
1835
|
+
}, innerItem.content === 0 ? innerItem.content.toString() : innerItem.content ? innerItem.content : '');
|
|
1836
|
+
}
|
|
1810
1837
|
}))), !hasOwnerProperty(item, 'hideArrow') && item.hideArrow !== false && hasOwnerProperty(item, 'rightArrow') && item.rightArrow === true ? hasOwnerProperty(item, 'contentList') && (hasOwnerProperty(item, 'closeArrow') || hasOwnerProperty(item, 'openArrow')) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1811
1838
|
id: item.id,
|
|
1812
1839
|
style: {
|
|
@@ -2286,7 +2313,8 @@ const Table = ({
|
|
|
2286
2313
|
listItemId: data.listContentId,
|
|
2287
2314
|
listItemContent: data.listContent,
|
|
2288
2315
|
itemIndex: removeItemIndex !== undefined && removeItemIndex < data.innerIndex ? data.innerIndex - 1 : data.innerIndex,
|
|
2289
|
-
listItemInnerIndex: data.listContentIndex
|
|
2316
|
+
listItemInnerIndex: data.listContentIndex,
|
|
2317
|
+
contentListInnerItem: data.contentListInnerItem
|
|
2290
2318
|
};
|
|
2291
2319
|
getData(listData);
|
|
2292
2320
|
};
|
|
@@ -3058,14 +3086,10 @@ const Input = ({
|
|
|
3058
3086
|
const handleCheckTypeTel = (val, prevVal) => {
|
|
3059
3087
|
if (type === 'tel') {
|
|
3060
3088
|
if (!phoneNumberRegex.test(val)) {
|
|
3061
|
-
if (errorMessage) {
|
|
3062
|
-
setInnerErrorMessage(errorMessage);
|
|
3063
|
-
}
|
|
3064
3089
|
if (val !== '') {
|
|
3065
3090
|
val = prevVal;
|
|
3066
3091
|
}
|
|
3067
3092
|
} else {
|
|
3068
|
-
setInnerErrorMessage('');
|
|
3069
3093
|
if (val.length > 8) {
|
|
3070
3094
|
val = val.substr(0, 8);
|
|
3071
3095
|
}
|