@xaypay/tui 0.2.23 → 0.2.24
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 +124 -54
- package/dist/index.js +124 -54
- package/package.json +1 -1
- package/tui.config.js +5 -0
package/dist/index.es.js
CHANGED
|
@@ -154,6 +154,28 @@ const SvgDocIcon = ({
|
|
|
154
154
|
d: "M5.922 23.8H3.859v-5.818h2.08q.878 0 1.511.35.633.346.975.996.343.651.343 1.557 0 .909-.343 1.563-.341.653-.98 1.003-.637.349-1.523.349m-.833-1.054h.782q.546 0 .917-.193.375-.196.563-.605.19-.413.19-1.063 0-.645-.19-1.054a1.23 1.23 0 0 0-.56-.602q-.372-.193-.918-.193H5.09zm9.937-1.855q0 .951-.36 1.62a2.5 2.5 0 0 1-.978 1.02q-.616.348-1.386.349-.776 0-1.392-.353a2.5 2.5 0 0 1-.975-1.02q-.357-.668-.358-1.616 0-.952.358-1.62.359-.667.975-1.017a2.76 2.76 0 0 1 1.392-.352q.77 0 1.386.352.62.35.977 1.018.36.667.361 1.619m-1.247 0q0-.617-.185-1.04a1.4 1.4 0 0 0-.514-.642 1.4 1.4 0 0 0-.778-.219q-.447 0-.779.22-.332.218-.517.641-.182.423-.182 1.04 0 .616.182 1.04.185.423.517.642.332.218.779.218.445 0 .778-.218.333-.219.514-.642.185-.425.185-1.04m7.292-.872h-1.245a1.2 1.2 0 0 0-.139-.43 1.1 1.1 0 0 0-.27-.323 1.2 1.2 0 0 0-.38-.205 1.5 1.5 0 0 0-.463-.07 1.4 1.4 0 0 0-.787.224 1.43 1.43 0 0 0-.52.648q-.185.423-.185 1.028 0 .622.185 1.045.188.423.523.64.335.215.775.215.247 0 .457-.065.215-.065.378-.19.165-.128.273-.31.11-.182.154-.415l1.244.006a2.323 2.323 0 0 1-.756 1.435 2.4 2.4 0 0 1-.767.46q-.443.168-1.003.168-.778 0-1.392-.353a2.5 2.5 0 0 1-.966-1.02q-.352-.668-.352-1.616 0-.952.358-1.62.358-.667.972-1.017.614-.352 1.38-.352.506 0 .938.142.434.142.77.415.335.27.545.662.213.391.273.898"
|
|
155
155
|
}));
|
|
156
156
|
|
|
157
|
+
const SvgListItemSvg = ({
|
|
158
|
+
title,
|
|
159
|
+
titleId,
|
|
160
|
+
...props
|
|
161
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
162
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
163
|
+
width: "28",
|
|
164
|
+
height: "36",
|
|
165
|
+
viewBox: "0 0 28 36",
|
|
166
|
+
"aria-labelledby": titleId
|
|
167
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
168
|
+
id: titleId
|
|
169
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
170
|
+
d: "M27.39 9.078v16.043a1.213 1.213 0 0 1 .61 1.05v6.778A3.05 3.05 0 0 1 24.957 36H3.043A3.051 3.051 0 0 1 0 32.95v-8.872a1.22 1.22 0 0 1 .61-1.05V2.44c0-.648.257-1.27.71-1.726A2.44 2.44 0 0 1 3.043 0h15.293ZM8.759 27.871q-.585 0-1.043.203c-.309.133-.547.32-.723.559a1.35 1.35 0 0 0-.258.84c-.004.39.13.699.387.93q.393.346 1.066.511l.586.145c.192.046.36.097.493.152a.9.9 0 0 1 .308.207q.105.125.106.3 0 .19-.117.337a.73.73 0 0 1-.333.23 1.4 1.4 0 0 1-.496.082q-.292.001-.527-.086a.9.9 0 0 1-.367-.265.8.8 0 0 1-.152-.446H6.594q.013.573.277.957.271.388.746.582.48.198 1.13.196.65 0 1.112-.192.464-.2.711-.55c.164-.239.25-.52.25-.844a1.331 1.331 0 0 0-.453-1.027 2.1 2.1 0 0 0-.508-.32 3.3 3.3 0 0 0-.64-.204l-.48-.113a3 3 0 0 1-.329-.094 1.4 1.4 0 0 1-.273-.133.6.6 0 0 1-.184-.183.43.43 0 0 1-.062-.247q.001-.17.101-.304a.65.65 0 0 1 .293-.211q.188-.077.465-.078.41 0 .645.175a.64.64 0 0 1 .27.485h1.081a1.47 1.47 0 0 0-.254-.832 1.63 1.63 0 0 0-.695-.559c-.297-.137-.64-.203-1.04-.203m10.426 0q-.528.001-.985.184-.451.181-.793.535a2.45 2.45 0 0 0-.535.855 3.3 3.3 0 0 0-.187 1.149c0 .554.105 1.039.316 1.445q.317.603.887.938.57.328 1.32.328.675 0 1.195-.27.522-.27.82-.77.299-.502.298-1.199v-.664h-2.235v.84h1.145q-.005.316-.145.555a.95.95 0 0 1-.418.383 1.45 1.45 0 0 1-.652.136c-.285 0-.527-.07-.735-.203a1.3 1.3 0 0 1-.48-.59 2.4 2.4 0 0 1-.172-.941q.001-.552.172-.934.175-.386.48-.585c.207-.133.45-.204.723-.204q.217.001.399.055c.12.035.23.09.324.156a1.05 1.05 0 0 1 .394.582h1.149a1.9 1.9 0 0 0-.246-.715 2 2 0 0 0-.5-.566c-.2-.16-.434-.281-.692-.367a2.6 2.6 0 0 0-.847-.133m-6.047 5.36h1.457l1.844-5.286h-1.254l-1.297 4.016h-.047l-1.293-4.016h-1.258ZM3.043 1.218c-.324 0-.633.129-.86.36-.23.226-.359.538-.359.862V22.86h8.633c.352 0 .684.153.918.418l1.46 1.676h13.337V9.938H19.91A2.436 2.436 0 0 1 17.476 7.5V1.218Zm7.738 9.164c.078 0 .137.062.137.14v.313h5.46v-.313a.14.14 0 0 1 .142-.14h1.539a.14.14 0 0 1 .14.14v1.524a.14.14 0 0 1-.14.137h-.313v5.402h.313c.078 0 .14.059.14.137v1.523a.137.137 0 0 1-.14.137h-1.54a.137.137 0 0 1-.14-.137v-.312h-5.461v.312a.134.134 0 0 1-.137.137H9.238a.136.136 0 0 1-.136-.137v-1.523c0-.078.062-.137.136-.137h.317v-5.402h-.317a.14.14 0 0 1-.136-.137v-1.524a.14.14 0 0 1 .136-.14Zm.137 1.664a.14.14 0 0 1-.137.137h-.316v5.402h.316c.074 0 .137.062.137.137v.312h5.46v-.312a.14.14 0 0 1 .142-.137h.316v-5.402h-.316a.14.14 0 0 1-.141-.137v-.313h-5.461Zm0 0",
|
|
171
|
+
style: {
|
|
172
|
+
stroke: 'none',
|
|
173
|
+
fillRule: 'nonzero',
|
|
174
|
+
fill: '#00236a',
|
|
175
|
+
fillOpacity: 1
|
|
176
|
+
}
|
|
177
|
+
}));
|
|
178
|
+
|
|
157
179
|
const SvgListItemPdf = ({
|
|
158
180
|
title,
|
|
159
181
|
titleId,
|
|
@@ -266,6 +288,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
266
288
|
radius,
|
|
267
289
|
status,
|
|
268
290
|
iconDoc,
|
|
291
|
+
iconSvg,
|
|
269
292
|
iconPdf,
|
|
270
293
|
iconPng,
|
|
271
294
|
iconJpg,
|
|
@@ -409,7 +432,7 @@ const FileItem = /*#__PURE__*/React__default.memo(({
|
|
|
409
432
|
style: {
|
|
410
433
|
width: '32px'
|
|
411
434
|
}
|
|
412
|
-
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default.createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : fileFormat === 'msword' ? iconDoc ? iconDoc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : fileFormat === 'vnd.openxmlformats-officedocument.wordprocessingml.document' ? iconDocx ? iconDocx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
435
|
+
}, fileFormat === 'svg+xml' ? iconSvg ? iconSvg : /*#__PURE__*/React__default.createElement(SvgListItemSvg, null) : fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default.createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : fileFormat === 'msword' ? iconDoc ? iconDoc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : fileFormat === 'vnd.openxmlformats-officedocument.wordprocessingml.document' ? iconDocx ? iconDocx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : ''), /*#__PURE__*/React__default.createElement("div", {
|
|
413
436
|
style: {
|
|
414
437
|
position: 'relative',
|
|
415
438
|
display: 'flex',
|
|
@@ -1145,6 +1168,10 @@ var packageResult = {
|
|
|
1145
1168
|
wrapWidth: '100%',
|
|
1146
1169
|
wrapHeight: '100%'
|
|
1147
1170
|
},
|
|
1171
|
+
closeIcon: {
|
|
1172
|
+
top: '24px',
|
|
1173
|
+
right: '24px'
|
|
1174
|
+
},
|
|
1148
1175
|
icon: {
|
|
1149
1176
|
className: 'tui_close-modal-icon'
|
|
1150
1177
|
// zoom: React.createElement(SvgChecked, { fill: 'green' }),
|
|
@@ -1581,6 +1608,24 @@ Button.propTypes = {
|
|
|
1581
1608
|
withoutStylingHoverColor: PropTypes.string
|
|
1582
1609
|
};
|
|
1583
1610
|
|
|
1611
|
+
const SvgSvg = ({
|
|
1612
|
+
title,
|
|
1613
|
+
titleId,
|
|
1614
|
+
...props
|
|
1615
|
+
}) => /*#__PURE__*/React.createElement("svg", _extends({
|
|
1616
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1617
|
+
width: "1em",
|
|
1618
|
+
height: "1em",
|
|
1619
|
+
fill: "none",
|
|
1620
|
+
viewBox: "0 0 40 52",
|
|
1621
|
+
"aria-labelledby": titleId
|
|
1622
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
1623
|
+
id: titleId
|
|
1624
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
1625
|
+
fill: "#00236A",
|
|
1626
|
+
d: "M39.13 13.11v23.175a1.772 1.772 0 0 1 .87 1.518v9.79a4.45 4.45 0 0 1-1.274 3.115A4.33 4.33 0 0 1 35.652 52H4.348a4.33 4.33 0 0 1-3.074-1.292A4.45 4.45 0 0 1 0 47.593V34.78a1.77 1.77 0 0 1 .87-1.517V3.525c0-.934.367-1.831 1.019-2.493A3.46 3.46 0 0 1 4.348 0h21.847zM12.514 40.26q-.836 0-1.492.29a2.5 2.5 0 0 0-1.033.81q-.372.519-.369 1.212-.003.846.556 1.346t1.524.734l.832.21q.417.1.704.223.291.123.44.299a.64.64 0 0 1 .154.432.77.77 0 0 1-.168.489q-.168.212-.473.332-.303.12-.712.119a2.1 2.1 0 0 1-.75-.127 1.2 1.2 0 0 1-.526-.384 1.17 1.17 0 0 1-.22-.642H9.418q.018.824.398 1.383.384.556 1.067.84.686.284 1.611.283.932 0 1.592-.28.663-.283 1.015-.794.353-.514.357-1.216-.003-.477-.175-.845a1.9 1.9 0 0 0-.473-.642 2.8 2.8 0 0 0-.724-.459 5 5 0 0 0-.917-.298l-.687-.164a4 4 0 0 1-.47-.135 2 2 0 0 1-.387-.19.9.9 0 0 1-.265-.264.63.63 0 0 1-.086-.358q0-.246.142-.44a.94.94 0 0 1 .418-.302q.272-.112.667-.112.582 0 .92.25.34.25.386.7h1.547a2.14 2.14 0 0 0-.366-1.2 2.35 2.35 0 0 0-.992-.81q-.633-.29-1.483-.29m14.893 0q-.756 0-1.406.265a3.3 3.3 0 0 0-1.137.772 3.5 3.5 0 0 0-.76 1.238q-.27.727-.269 1.656 0 1.207.451 2.087a3.3 3.3 0 0 0 1.268 1.354q.813.474 1.886.474.962 0 1.709-.388a2.9 2.9 0 0 0 1.17-1.111q.425-.724.425-1.731v-.962h-3.195v1.216h1.638a1.6 1.6 0 0 1-.206.798 1.4 1.4 0 0 1-.597.555q-.388.195-.936.195a1.87 1.87 0 0 1-1.048-.291q-.443-.296-.686-.855-.242-.56-.242-1.356 0-.799.246-1.35.246-.556.685-.847.445-.29 1.03-.29.313 0 .57.078a1.49 1.49 0 0 1 1.03 1.066h1.64a2.8 2.8 0 0 0-.354-1.036 2.9 2.9 0 0 0-.713-.818 3.2 3.2 0 0 0-.99-.529 3.7 3.7 0 0 0-1.209-.19M18.766 48h2.08l2.634-7.637h-1.79l-1.85 5.802h-.07l-1.846-5.802H16.13zM4.349 1.762a1.73 1.73 0 0 0-1.23.516c-.327.33-.51.78-.51 1.246V33.02H14.94c.5 0 .978.219 1.308.601l2.087 2.421h19.056V14.356h-8.949c-.922 0-1.806-.37-2.459-1.032a3.55 3.55 0 0 1-1.018-2.493v-9.07zM15.4 15c.11 0 .2.09.2.2v.45h7.8v-.45a.2.2 0 0 1 .2-.2h2.2c.11 0 .2.09.2.2v2.2a.2.2 0 0 1-.2.2h-.45v7.8h.45a.2.2 0 0 1 .2.2v2.2a.2.2 0 0 1-.2.2h-2.2a.2.2 0 0 1-.2-.2v-.45h-7.8v.45a.2.2 0 0 1-.2.2h-2.2a.2.2 0 0 1-.2-.2v-2.2c0-.11.09-.2.2-.2h.45v-7.8h-.45a.2.2 0 0 1-.2-.2v-2.2c0-.11.09-.2.2-.2zm.2 2.4a.2.2 0 0 1-.2.2h-.45v7.8h.45a.2.2 0 0 1 .2.2v.45h7.8v-.45a.2.2 0 0 1 .2-.2h.45v-7.8h-.45a.2.2 0 0 1-.2-.2v-.45h-7.8z"
|
|
1627
|
+
}));
|
|
1628
|
+
|
|
1584
1629
|
const SvgPdf = ({
|
|
1585
1630
|
title,
|
|
1586
1631
|
titleId,
|
|
@@ -1777,6 +1822,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1777
1822
|
maxSizeError,
|
|
1778
1823
|
progressColor,
|
|
1779
1824
|
noChoosenFile,
|
|
1825
|
+
iconSvg,
|
|
1780
1826
|
iconPdf,
|
|
1781
1827
|
iconDoc,
|
|
1782
1828
|
iconPng,
|
|
@@ -1891,7 +1937,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1891
1937
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1892
1938
|
if (file[ix]) {
|
|
1893
1939
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1894
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword')) {
|
|
1940
|
+
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword') || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml') {
|
|
1895
1941
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1896
1942
|
change({
|
|
1897
1943
|
id: '',
|
|
@@ -1927,6 +1973,15 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1927
1973
|
check: formatError ?? configStyles.FILE.error.format
|
|
1928
1974
|
});
|
|
1929
1975
|
});
|
|
1976
|
+
} else if (file[ix].type === 'image/svg+xml') {
|
|
1977
|
+
change({
|
|
1978
|
+
id: '',
|
|
1979
|
+
check: '',
|
|
1980
|
+
status: '',
|
|
1981
|
+
file: file[ix],
|
|
1982
|
+
uuid: v4()
|
|
1983
|
+
});
|
|
1984
|
+
setImage('svg');
|
|
1930
1985
|
} else {
|
|
1931
1986
|
change({
|
|
1932
1987
|
id: '',
|
|
@@ -1957,7 +2012,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1957
2012
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1958
2013
|
if (file[ix]) {
|
|
1959
2014
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1960
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword')) {
|
|
2015
|
+
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword') || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml') {
|
|
1961
2016
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1962
2017
|
change({
|
|
1963
2018
|
id: '',
|
|
@@ -1993,6 +2048,15 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
1993
2048
|
check: formatError ?? configStyles.FILE.error.format
|
|
1994
2049
|
});
|
|
1995
2050
|
});
|
|
2051
|
+
} else if (file[ix].type === 'image/svg+xml') {
|
|
2052
|
+
change({
|
|
2053
|
+
id: '',
|
|
2054
|
+
check: '',
|
|
2055
|
+
status: '',
|
|
2056
|
+
file: file[ix],
|
|
2057
|
+
uuid: v4()
|
|
2058
|
+
});
|
|
2059
|
+
setImage('svg');
|
|
1996
2060
|
} else {
|
|
1997
2061
|
change({
|
|
1998
2062
|
id: '',
|
|
@@ -2032,7 +2096,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2032
2096
|
} else {
|
|
2033
2097
|
if (file[0]) {
|
|
2034
2098
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
2035
|
-
if (fileExtensions.includes(file[0].type.split('/')[1]) || (fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[0].type.split('/')[1] === 'msword')) {
|
|
2099
|
+
if (fileExtensions.includes(file[0].type.split('/')[1]) || (fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[0].type.split('/')[1] === 'msword') || fileExtensions.includes('svg') && file[0].type.split('/')[1] === 'svg+xml') {
|
|
2036
2100
|
setError('');
|
|
2037
2101
|
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2038
2102
|
setImage('docx');
|
|
@@ -2076,7 +2140,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2076
2140
|
}
|
|
2077
2141
|
};
|
|
2078
2142
|
const handleClick = () => {
|
|
2079
|
-
if (!image && !singleFile) {
|
|
2143
|
+
if (!image && !singleFile || multiple) {
|
|
2080
2144
|
inpRef.current.files = null;
|
|
2081
2145
|
inpRef.current.value = null;
|
|
2082
2146
|
inpRef.current.click();
|
|
@@ -2251,6 +2315,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2251
2315
|
}
|
|
2252
2316
|
};
|
|
2253
2317
|
}, []);
|
|
2318
|
+
console.log(image, ' - - - -image');
|
|
2254
2319
|
return configStyles.FILE && /*#__PURE__*/React__default.createElement("div", {
|
|
2255
2320
|
ref: parentlRef,
|
|
2256
2321
|
style: {
|
|
@@ -2335,7 +2400,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2335
2400
|
fontFamily: family ?? configStyles.FILE.font.family,
|
|
2336
2401
|
fontWeight: weight ?? configStyles.FILE.font.weight
|
|
2337
2402
|
}
|
|
2338
|
-
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
2403
|
+
}, !multiple && image && preview ? image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default.createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : /*#__PURE__*/React__default.createElement("img", {
|
|
2339
2404
|
src: image,
|
|
2340
2405
|
style: {
|
|
2341
2406
|
display: 'block',
|
|
@@ -2386,7 +2451,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2386
2451
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
2387
2452
|
backgroundColor: uploadBtnBackgroundColor ?? configStyles.FILE.uploadBtn.colors.background,
|
|
2388
2453
|
backgroundHoverColor: uploadBtnBackgroundColorHover ?? configStyles.FILE.uploadBtn.colors.backgroundHover
|
|
2389
|
-
}) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default.createElement(Button, {
|
|
2454
|
+
}) : image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default.createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default.createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default.createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default.createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default.createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default.createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default.createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default.createElement(Button, {
|
|
2390
2455
|
contentWidth: true,
|
|
2391
2456
|
onClick: _ => _,
|
|
2392
2457
|
font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
@@ -2450,6 +2515,7 @@ const File = /*#__PURE__*/forwardRef(({
|
|
|
2450
2515
|
status: item.status,
|
|
2451
2516
|
size: item?.file?.size,
|
|
2452
2517
|
name: item?.file?.name,
|
|
2518
|
+
iconSvg: iconSvg ?? configStyles.FILE.icon.svg,
|
|
2453
2519
|
iconPdf: iconPdf ?? configStyles.FILE.icon.pdf,
|
|
2454
2520
|
iconDoc: iconDoc ?? configStyles.FILE.icon.doc,
|
|
2455
2521
|
iconPng: iconPng ?? configStyles.FILE.icon.png,
|
|
@@ -2537,6 +2603,7 @@ File.propTypes = {
|
|
|
2537
2603
|
progressColor: PropTypes.string,
|
|
2538
2604
|
deleteComponent: PropTypes.bool,
|
|
2539
2605
|
removeComponent: PropTypes.func,
|
|
2606
|
+
iconSvg: PropTypes.element,
|
|
2540
2607
|
iconPdf: PropTypes.element,
|
|
2541
2608
|
iconDoc: PropTypes.element,
|
|
2542
2609
|
iconPng: PropTypes.element,
|
|
@@ -2955,6 +3022,7 @@ const TD = ({
|
|
|
2955
3022
|
handleCheckedBody,
|
|
2956
3023
|
openListFontWeight,
|
|
2957
3024
|
openListFontFamily,
|
|
3025
|
+
handleClickOnRowTd,
|
|
2958
3026
|
tableColumnMinWidth,
|
|
2959
3027
|
tableColumnMaxWidth,
|
|
2960
3028
|
handleBodyActionClick,
|
|
@@ -3045,7 +3113,8 @@ const TD = ({
|
|
|
3045
3113
|
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
3046
3114
|
borderTopRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px',
|
|
3047
3115
|
borderBottomRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px'
|
|
3048
|
-
}
|
|
3116
|
+
},
|
|
3117
|
+
onClick: e => handleClickOnRowTd(e, row, item, index, innerIndex)
|
|
3049
3118
|
}, Array.isArray(item) ? item.length > 0 ? item.map((newItem, newIndex) => {
|
|
3050
3119
|
if (newItem && !Array.isArray(newItem) && typeof newItem === 'object') {
|
|
3051
3120
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -3364,7 +3433,8 @@ const Table = ({
|
|
|
3364
3433
|
tableBorderColor,
|
|
3365
3434
|
collapseFullRow,
|
|
3366
3435
|
openArrow,
|
|
3367
|
-
closeArrow
|
|
3436
|
+
closeArrow,
|
|
3437
|
+
clickableRowColumnTd
|
|
3368
3438
|
}) => {
|
|
3369
3439
|
const itemRefs = useRef({});
|
|
3370
3440
|
const headerRef = useRef(null);
|
|
@@ -3939,6 +4009,20 @@ const Table = ({
|
|
|
3939
4009
|
return value;
|
|
3940
4010
|
});
|
|
3941
4011
|
};
|
|
4012
|
+
const handleClickOnRowTd = (e, row, item, index, innerIndex) => {
|
|
4013
|
+
e.stopPropagation();
|
|
4014
|
+
if (clickableRowColumnTd) {
|
|
4015
|
+
const actionData = {
|
|
4016
|
+
from: 'body',
|
|
4017
|
+
item,
|
|
4018
|
+
id: item.id,
|
|
4019
|
+
index,
|
|
4020
|
+
row,
|
|
4021
|
+
innerIndex
|
|
4022
|
+
};
|
|
4023
|
+
getData(actionData);
|
|
4024
|
+
}
|
|
4025
|
+
};
|
|
3942
4026
|
useEffect(() => {
|
|
3943
4027
|
if (checkDrag != null) {
|
|
3944
4028
|
const draggableArray = body && body.length > 0 ? body.map((item, index) => {
|
|
@@ -4155,6 +4239,7 @@ const Table = ({
|
|
|
4155
4239
|
openListFontWeight: openListFontWeight ?? configStyles.TABLE.openList.font.weight,
|
|
4156
4240
|
openListFontFamily: openListFontFamily ?? configStyles.TABLE.openList.font.family,
|
|
4157
4241
|
handleCheckedBody: handleCheckedBody,
|
|
4242
|
+
handleClickOnRowTd: handleClickOnRowTd,
|
|
4158
4243
|
handleBodyActionClick: handleBodyActionClick,
|
|
4159
4244
|
handleMoreOptionsClick: handleMoreOptionsClick,
|
|
4160
4245
|
handleContentListClick: handleContentListClick,
|
|
@@ -4272,7 +4357,8 @@ Table.propTypes = {
|
|
|
4272
4357
|
tableBorder: PropTypes.string,
|
|
4273
4358
|
tableBorderColor: PropTypes.string,
|
|
4274
4359
|
openArrow: PropTypes.element,
|
|
4275
|
-
closeArrow: PropTypes.element
|
|
4360
|
+
closeArrow: PropTypes.element,
|
|
4361
|
+
clickableRowColumnTd: PropTypes.bool
|
|
4276
4362
|
};
|
|
4277
4363
|
|
|
4278
4364
|
var css_248z$b = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
|
|
@@ -4397,9 +4483,12 @@ const Modal = ({
|
|
|
4397
4483
|
prevIcon,
|
|
4398
4484
|
nextIcon,
|
|
4399
4485
|
closeIcon,
|
|
4486
|
+
closeIconFix,
|
|
4400
4487
|
showCloseIcon,
|
|
4401
4488
|
closeIconClass,
|
|
4402
4489
|
closeSlideIcon,
|
|
4490
|
+
closeIconTopPosition,
|
|
4491
|
+
closeIconRightPosition,
|
|
4403
4492
|
selected,
|
|
4404
4493
|
children,
|
|
4405
4494
|
minWidth,
|
|
@@ -4586,6 +4675,7 @@ const Modal = ({
|
|
|
4586
4675
|
}
|
|
4587
4676
|
}, type === 'content' && /*#__PURE__*/React__default.createElement("div", {
|
|
4588
4677
|
style: {
|
|
4678
|
+
position: closeIconFix ? 'relative' : 'unset',
|
|
4589
4679
|
width: '100%',
|
|
4590
4680
|
minWidth: '0',
|
|
4591
4681
|
display: 'flex',
|
|
@@ -4624,6 +4714,9 @@ const Modal = ({
|
|
|
4624
4714
|
}, headerText), showCloseIcon ? /*#__PURE__*/React__default.createElement("div", {
|
|
4625
4715
|
onClick: () => setShow(false),
|
|
4626
4716
|
style: {
|
|
4717
|
+
position: closeIconFix ? 'absolute' : 'unset',
|
|
4718
|
+
top: closeIconTopPosition ?? configStyles.MODAL?.closeIcon?.top,
|
|
4719
|
+
right: closeIconRightPosition ?? configStyles.MODAL?.closeIcon?.right,
|
|
4627
4720
|
display: 'flex',
|
|
4628
4721
|
minWidth: '14px',
|
|
4629
4722
|
minHeight: '14px',
|
|
@@ -4631,7 +4724,7 @@ const Modal = ({
|
|
|
4631
4724
|
width: 'fit-content',
|
|
4632
4725
|
alignItems: 'center',
|
|
4633
4726
|
alignSelf: 'flex-end',
|
|
4634
|
-
height: '100%',
|
|
4727
|
+
height: closeIconFix ? 'fit-content' : '100%',
|
|
4635
4728
|
justifyContent: 'center'
|
|
4636
4729
|
},
|
|
4637
4730
|
className: closeIconClass ? closeIconClass : configStyles.MODAL.icon.className
|
|
@@ -4783,9 +4876,12 @@ Modal.propTypes = {
|
|
|
4783
4876
|
prevIcon: PropTypes.element,
|
|
4784
4877
|
nextIcon: PropTypes.element,
|
|
4785
4878
|
closeIcon: PropTypes.element,
|
|
4879
|
+
closeIconFix: PropTypes.bool,
|
|
4786
4880
|
showCloseIcon: PropTypes.bool,
|
|
4787
4881
|
closeIconClass: PropTypes.string,
|
|
4788
4882
|
closeSlideIcon: PropTypes.element,
|
|
4883
|
+
closeIconTopPosition: PropTypes.string,
|
|
4884
|
+
closeIconRightPosition: PropTypes.string,
|
|
4789
4885
|
headerText: PropTypes.string,
|
|
4790
4886
|
headerSize: PropTypes.string,
|
|
4791
4887
|
headerStyle: PropTypes.string,
|
|
@@ -7805,6 +7901,7 @@ Accordion.propTypes = {
|
|
|
7805
7901
|
fontFamily: PropTypes.string
|
|
7806
7902
|
};
|
|
7807
7903
|
|
|
7904
|
+
// import React from 'react';
|
|
7808
7905
|
const Swipe = ({
|
|
7809
7906
|
id,
|
|
7810
7907
|
title,
|
|
@@ -7826,8 +7923,8 @@ const Swipe = ({
|
|
|
7826
7923
|
} = props || {};
|
|
7827
7924
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
7828
7925
|
style: {
|
|
7829
|
-
width: '100%',
|
|
7830
|
-
height: '
|
|
7926
|
+
width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
|
|
7927
|
+
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100vh'
|
|
7831
7928
|
}
|
|
7832
7929
|
}, (title || showCloseIcon) && /*#__PURE__*/React__default.createElement("div", {
|
|
7833
7930
|
style: {
|
|
@@ -7886,6 +7983,7 @@ var css_248z$2 = ".swipe-module_to-top__lrHfG{bottom:0}.swipe-module_to-left__kg
|
|
|
7886
7983
|
var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","slideTop":"swipe-module_slideTop__-Bbap","move-left":"swipe-module_move-left__4TDLs","slideLeft":"swipe-module_slideLeft__i24cS","move-right":"swipe-module_move-right__FrYo0","slideRight":"swipe-module_slideRight__swgSY","move-bottom":"swipe-module_move-bottom__eYDx6","slideBottom":"swipe-module_slideBottom__TBoZo","back-top":"swipe-module_back-top__gJZv0","backTop":"swipe-module_backTop__32loc","back-left":"swipe-module_back-left__Wd3aY","backLeft":"swipe-module_backLeft__q89ub","back-right":"swipe-module_back-right__Lgwz7","backRight":"swipe-module_backRight__8t5Dm","back-bottom":"swipe-module_back-bottom__JRN-7","backBottom":"swipe-module_backBottom__lwR8B"};
|
|
7887
7984
|
styleInject(css_248z$2);
|
|
7888
7985
|
|
|
7986
|
+
// import React, { useEffect, useRef } from 'react';
|
|
7889
7987
|
let swipeCount = 0;
|
|
7890
7988
|
const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
7891
7989
|
const {
|
|
@@ -7896,11 +7994,11 @@ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
|
7896
7994
|
borderRadius,
|
|
7897
7995
|
backgroundColor
|
|
7898
7996
|
} = props || {};
|
|
7899
|
-
swipeBlock.style.position = '
|
|
7997
|
+
swipeBlock.style.position = 'fixed';
|
|
7900
7998
|
swipeBlock.style.zIndex = swipeCount;
|
|
7901
7999
|
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
7902
8000
|
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
7903
|
-
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '
|
|
8001
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100vh';
|
|
7904
8002
|
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7905
8003
|
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7906
8004
|
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
@@ -7934,25 +8032,26 @@ const createSwipe = (id, title, child, props, swipable) => {
|
|
|
7934
8032
|
};
|
|
7935
8033
|
createElem(id, title, child, props, swipeBlock, innerConfigStyles);
|
|
7936
8034
|
if (!swipable) {
|
|
8035
|
+
const widthParent = hasOwnerProperty(props, 'withParent') ? props.withParent === true ? true : false : innerConfigStyles.SWIPEMODAL.withParent;
|
|
7937
8036
|
swipable = document.createElement('div');
|
|
7938
8037
|
swipable.setAttribute('id', 'swipable');
|
|
7939
|
-
swipable.style.position = '
|
|
8038
|
+
swipable.style.position = 'fixed';
|
|
7940
8039
|
swipable.style.top = '0px';
|
|
7941
8040
|
swipable.style.left = '0px';
|
|
7942
8041
|
swipable.style.zIndex = 99999;
|
|
7943
8042
|
swipable.style.maxWidth = '100%';
|
|
7944
8043
|
swipable.style.maxHeight = '100vh';
|
|
7945
|
-
swipable.style.
|
|
7946
|
-
swipable.style.
|
|
8044
|
+
swipable.style.visibility = 'hidden';
|
|
8045
|
+
swipable.style.width = widthParent ? '100%' : '0px';
|
|
8046
|
+
swipable.style.height = widthParent ? '100vh' : '0px';
|
|
7947
8047
|
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
8048
|
+
swipable.classList.add(styles$2['visible']);
|
|
7948
8049
|
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
7949
8050
|
swipable.addEventListener('click', function () {
|
|
7950
8051
|
hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
|
|
7951
8052
|
});
|
|
7952
8053
|
}
|
|
7953
|
-
|
|
7954
|
-
SwipifyBlock.style.display = 'block';
|
|
7955
|
-
SwipifyBlock.appendChild(swipable);
|
|
8054
|
+
document.body.appendChild(swipable);
|
|
7956
8055
|
}
|
|
7957
8056
|
swipable.appendChild(swipeBlock);
|
|
7958
8057
|
}, error => {
|
|
@@ -8001,6 +8100,7 @@ const swipe = {
|
|
|
8001
8100
|
close: id => {
|
|
8002
8101
|
if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
|
|
8003
8102
|
alert('Please pass valid id prop (string / number) when call swipe.close function');
|
|
8103
|
+
return;
|
|
8004
8104
|
}
|
|
8005
8105
|
let swipable = document.getElementById('swipable');
|
|
8006
8106
|
swipeCount -= 1;
|
|
@@ -8015,9 +8115,7 @@ const swipe = {
|
|
|
8015
8115
|
if (swipeCount === 0 && swipable) {
|
|
8016
8116
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8017
8117
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8018
|
-
|
|
8019
|
-
SwipifyBlock.style.display = 'none';
|
|
8020
|
-
SwipifyBlock.removeChild(swipable);
|
|
8118
|
+
document.body.removeChild(swipable);
|
|
8021
8119
|
}
|
|
8022
8120
|
}, 200);
|
|
8023
8121
|
} else {
|
|
@@ -8025,42 +8123,14 @@ const swipe = {
|
|
|
8025
8123
|
if (swipeCount === 0 && swipable) {
|
|
8026
8124
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8027
8125
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8028
|
-
|
|
8029
|
-
SwipifyBlock.style.display = 'none';
|
|
8030
|
-
SwipifyBlock.removeChild(swipable);
|
|
8126
|
+
document.body.removeChild(swipable);
|
|
8031
8127
|
}
|
|
8032
8128
|
}
|
|
8033
|
-
} else {
|
|
8034
|
-
if (swipeCount === 0 && swipable) {
|
|
8035
|
-
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
8036
|
-
SwipifyBlock.style.display = 'none';
|
|
8037
|
-
SwipifyBlock.removeChild(swipable);
|
|
8038
|
-
}
|
|
8039
8129
|
}
|
|
8040
8130
|
}
|
|
8041
8131
|
};
|
|
8042
8132
|
const SwipeModal = () => {
|
|
8043
|
-
|
|
8044
|
-
useEffect(() => {
|
|
8045
|
-
const parentSize = ref.current.parentNode.style.height;
|
|
8046
|
-
if (Number(parentSize.replace(/\D/g, '')) > 0) {
|
|
8047
|
-
ref.current.style.height = '100%';
|
|
8048
|
-
} else {
|
|
8049
|
-
ref.current.style.height = '100vh';
|
|
8050
|
-
}
|
|
8051
|
-
}, [ref]);
|
|
8052
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
8053
|
-
ref: ref,
|
|
8054
|
-
id: "swipify_tui",
|
|
8055
|
-
style: {
|
|
8056
|
-
position: 'absolute',
|
|
8057
|
-
width: '100%',
|
|
8058
|
-
top: 0,
|
|
8059
|
-
overflow: 'hidden',
|
|
8060
|
-
zIndex: 1,
|
|
8061
|
-
display: 'none'
|
|
8062
|
-
}
|
|
8063
|
-
});
|
|
8133
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
8064
8134
|
};
|
|
8065
8135
|
|
|
8066
8136
|
const TypographyType = {
|
package/dist/index.js
CHANGED
|
@@ -185,6 +185,28 @@ const SvgDocIcon = ({
|
|
|
185
185
|
d: "M5.922 23.8H3.859v-5.818h2.08q.878 0 1.511.35.633.346.975.996.343.651.343 1.557 0 .909-.343 1.563-.341.653-.98 1.003-.637.349-1.523.349m-.833-1.054h.782q.546 0 .917-.193.375-.196.563-.605.19-.413.19-1.063 0-.645-.19-1.054a1.23 1.23 0 0 0-.56-.602q-.372-.193-.918-.193H5.09zm9.937-1.855q0 .951-.36 1.62a2.5 2.5 0 0 1-.978 1.02q-.616.348-1.386.349-.776 0-1.392-.353a2.5 2.5 0 0 1-.975-1.02q-.357-.668-.358-1.616 0-.952.358-1.62.359-.667.975-1.017a2.76 2.76 0 0 1 1.392-.352q.77 0 1.386.352.62.35.977 1.018.36.667.361 1.619m-1.247 0q0-.617-.185-1.04a1.4 1.4 0 0 0-.514-.642 1.4 1.4 0 0 0-.778-.219q-.447 0-.779.22-.332.218-.517.641-.182.423-.182 1.04 0 .616.182 1.04.185.423.517.642.332.218.779.218.445 0 .778-.218.333-.219.514-.642.185-.425.185-1.04m7.292-.872h-1.245a1.2 1.2 0 0 0-.139-.43 1.1 1.1 0 0 0-.27-.323 1.2 1.2 0 0 0-.38-.205 1.5 1.5 0 0 0-.463-.07 1.4 1.4 0 0 0-.787.224 1.43 1.43 0 0 0-.52.648q-.185.423-.185 1.028 0 .622.185 1.045.188.423.523.64.335.215.775.215.247 0 .457-.065.215-.065.378-.19.165-.128.273-.31.11-.182.154-.415l1.244.006a2.323 2.323 0 0 1-.756 1.435 2.4 2.4 0 0 1-.767.46q-.443.168-1.003.168-.778 0-1.392-.353a2.5 2.5 0 0 1-.966-1.02q-.352-.668-.352-1.616 0-.952.358-1.62.358-.667.972-1.017.614-.352 1.38-.352.506 0 .938.142.434.142.77.415.335.27.545.662.213.391.273.898"
|
|
186
186
|
}));
|
|
187
187
|
|
|
188
|
+
const SvgListItemSvg = ({
|
|
189
|
+
title,
|
|
190
|
+
titleId,
|
|
191
|
+
...props
|
|
192
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
193
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
194
|
+
width: "28",
|
|
195
|
+
height: "36",
|
|
196
|
+
viewBox: "0 0 28 36",
|
|
197
|
+
"aria-labelledby": titleId
|
|
198
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
199
|
+
id: titleId
|
|
200
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
201
|
+
d: "M27.39 9.078v16.043a1.213 1.213 0 0 1 .61 1.05v6.778A3.05 3.05 0 0 1 24.957 36H3.043A3.051 3.051 0 0 1 0 32.95v-8.872a1.22 1.22 0 0 1 .61-1.05V2.44c0-.648.257-1.27.71-1.726A2.44 2.44 0 0 1 3.043 0h15.293ZM8.759 27.871q-.585 0-1.043.203c-.309.133-.547.32-.723.559a1.35 1.35 0 0 0-.258.84c-.004.39.13.699.387.93q.393.346 1.066.511l.586.145c.192.046.36.097.493.152a.9.9 0 0 1 .308.207q.105.125.106.3 0 .19-.117.337a.73.73 0 0 1-.333.23 1.4 1.4 0 0 1-.496.082q-.292.001-.527-.086a.9.9 0 0 1-.367-.265.8.8 0 0 1-.152-.446H6.594q.013.573.277.957.271.388.746.582.48.198 1.13.196.65 0 1.112-.192.464-.2.711-.55c.164-.239.25-.52.25-.844a1.331 1.331 0 0 0-.453-1.027 2.1 2.1 0 0 0-.508-.32 3.3 3.3 0 0 0-.64-.204l-.48-.113a3 3 0 0 1-.329-.094 1.4 1.4 0 0 1-.273-.133.6.6 0 0 1-.184-.183.43.43 0 0 1-.062-.247q.001-.17.101-.304a.65.65 0 0 1 .293-.211q.188-.077.465-.078.41 0 .645.175a.64.64 0 0 1 .27.485h1.081a1.47 1.47 0 0 0-.254-.832 1.63 1.63 0 0 0-.695-.559c-.297-.137-.64-.203-1.04-.203m10.426 0q-.528.001-.985.184-.451.181-.793.535a2.45 2.45 0 0 0-.535.855 3.3 3.3 0 0 0-.187 1.149c0 .554.105 1.039.316 1.445q.317.603.887.938.57.328 1.32.328.675 0 1.195-.27.522-.27.82-.77.299-.502.298-1.199v-.664h-2.235v.84h1.145q-.005.316-.145.555a.95.95 0 0 1-.418.383 1.45 1.45 0 0 1-.652.136c-.285 0-.527-.07-.735-.203a1.3 1.3 0 0 1-.48-.59 2.4 2.4 0 0 1-.172-.941q.001-.552.172-.934.175-.386.48-.585c.207-.133.45-.204.723-.204q.217.001.399.055c.12.035.23.09.324.156a1.05 1.05 0 0 1 .394.582h1.149a1.9 1.9 0 0 0-.246-.715 2 2 0 0 0-.5-.566c-.2-.16-.434-.281-.692-.367a2.6 2.6 0 0 0-.847-.133m-6.047 5.36h1.457l1.844-5.286h-1.254l-1.297 4.016h-.047l-1.293-4.016h-1.258ZM3.043 1.218c-.324 0-.633.129-.86.36-.23.226-.359.538-.359.862V22.86h8.633c.352 0 .684.153.918.418l1.46 1.676h13.337V9.938H19.91A2.436 2.436 0 0 1 17.476 7.5V1.218Zm7.738 9.164c.078 0 .137.062.137.14v.313h5.46v-.313a.14.14 0 0 1 .142-.14h1.539a.14.14 0 0 1 .14.14v1.524a.14.14 0 0 1-.14.137h-.313v5.402h.313c.078 0 .14.059.14.137v1.523a.137.137 0 0 1-.14.137h-1.54a.137.137 0 0 1-.14-.137v-.312h-5.461v.312a.134.134 0 0 1-.137.137H9.238a.136.136 0 0 1-.136-.137v-1.523c0-.078.062-.137.136-.137h.317v-5.402h-.317a.14.14 0 0 1-.136-.137v-1.524a.14.14 0 0 1 .136-.14Zm.137 1.664a.14.14 0 0 1-.137.137h-.316v5.402h.316c.074 0 .137.062.137.137v.312h5.46v-.312a.14.14 0 0 1 .142-.137h.316v-5.402h-.316a.14.14 0 0 1-.141-.137v-.313h-5.461Zm0 0",
|
|
202
|
+
style: {
|
|
203
|
+
stroke: 'none',
|
|
204
|
+
fillRule: 'nonzero',
|
|
205
|
+
fill: '#00236a',
|
|
206
|
+
fillOpacity: 1
|
|
207
|
+
}
|
|
208
|
+
}));
|
|
209
|
+
|
|
188
210
|
const SvgListItemPdf = ({
|
|
189
211
|
title,
|
|
190
212
|
titleId,
|
|
@@ -297,6 +319,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
297
319
|
radius,
|
|
298
320
|
status,
|
|
299
321
|
iconDoc,
|
|
322
|
+
iconSvg,
|
|
300
323
|
iconPdf,
|
|
301
324
|
iconPng,
|
|
302
325
|
iconJpg,
|
|
@@ -440,7 +463,7 @@ const FileItem = /*#__PURE__*/React__default["default"].memo(({
|
|
|
440
463
|
style: {
|
|
441
464
|
width: '32px'
|
|
442
465
|
}
|
|
443
|
-
}, fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : fileFormat === 'msword' ? iconDoc ? iconDoc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : fileFormat === 'vnd.openxmlformats-officedocument.wordprocessingml.document' ? iconDocx ? iconDocx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
466
|
+
}, fileFormat === 'svg+xml' ? iconSvg ? iconSvg : /*#__PURE__*/React__default["default"].createElement(SvgListItemSvg, null) : fileFormat === 'pdf' ? iconPdf ? iconPdf : /*#__PURE__*/React__default["default"].createElement(SvgListItemPdf, null) : fileFormat === 'jpg' ? iconJpg ? iconJpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : fileFormat === 'png' ? iconPng ? iconPng : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : fileFormat === 'jpeg' ? iconJpeg ? iconJpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : fileFormat === 'heic' || fileFormat === 'heif' ? iconHeic ? iconHeic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : fileFormat === 'msword' ? iconDoc ? iconDoc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : fileFormat === 'vnd.openxmlformats-officedocument.wordprocessingml.document' ? iconDocx ? iconDocx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : ''), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
444
467
|
style: {
|
|
445
468
|
position: 'relative',
|
|
446
469
|
display: 'flex',
|
|
@@ -1176,6 +1199,10 @@ var packageResult = {
|
|
|
1176
1199
|
wrapWidth: '100%',
|
|
1177
1200
|
wrapHeight: '100%'
|
|
1178
1201
|
},
|
|
1202
|
+
closeIcon: {
|
|
1203
|
+
top: '24px',
|
|
1204
|
+
right: '24px'
|
|
1205
|
+
},
|
|
1179
1206
|
icon: {
|
|
1180
1207
|
className: 'tui_close-modal-icon'
|
|
1181
1208
|
// zoom: React.createElement(SvgChecked, { fill: 'green' }),
|
|
@@ -1612,6 +1639,24 @@ Button.propTypes = {
|
|
|
1612
1639
|
withoutStylingHoverColor: PropTypes__default["default"].string
|
|
1613
1640
|
};
|
|
1614
1641
|
|
|
1642
|
+
const SvgSvg = ({
|
|
1643
|
+
title,
|
|
1644
|
+
titleId,
|
|
1645
|
+
...props
|
|
1646
|
+
}) => /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
1647
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1648
|
+
width: "1em",
|
|
1649
|
+
height: "1em",
|
|
1650
|
+
fill: "none",
|
|
1651
|
+
viewBox: "0 0 40 52",
|
|
1652
|
+
"aria-labelledby": titleId
|
|
1653
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
1654
|
+
id: titleId
|
|
1655
|
+
}, title) : null, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1656
|
+
fill: "#00236A",
|
|
1657
|
+
d: "M39.13 13.11v23.175a1.772 1.772 0 0 1 .87 1.518v9.79a4.45 4.45 0 0 1-1.274 3.115A4.33 4.33 0 0 1 35.652 52H4.348a4.33 4.33 0 0 1-3.074-1.292A4.45 4.45 0 0 1 0 47.593V34.78a1.77 1.77 0 0 1 .87-1.517V3.525c0-.934.367-1.831 1.019-2.493A3.46 3.46 0 0 1 4.348 0h21.847zM12.514 40.26q-.836 0-1.492.29a2.5 2.5 0 0 0-1.033.81q-.372.519-.369 1.212-.003.846.556 1.346t1.524.734l.832.21q.417.1.704.223.291.123.44.299a.64.64 0 0 1 .154.432.77.77 0 0 1-.168.489q-.168.212-.473.332-.303.12-.712.119a2.1 2.1 0 0 1-.75-.127 1.2 1.2 0 0 1-.526-.384 1.17 1.17 0 0 1-.22-.642H9.418q.018.824.398 1.383.384.556 1.067.84.686.284 1.611.283.932 0 1.592-.28.663-.283 1.015-.794.353-.514.357-1.216-.003-.477-.175-.845a1.9 1.9 0 0 0-.473-.642 2.8 2.8 0 0 0-.724-.459 5 5 0 0 0-.917-.298l-.687-.164a4 4 0 0 1-.47-.135 2 2 0 0 1-.387-.19.9.9 0 0 1-.265-.264.63.63 0 0 1-.086-.358q0-.246.142-.44a.94.94 0 0 1 .418-.302q.272-.112.667-.112.582 0 .92.25.34.25.386.7h1.547a2.14 2.14 0 0 0-.366-1.2 2.35 2.35 0 0 0-.992-.81q-.633-.29-1.483-.29m14.893 0q-.756 0-1.406.265a3.3 3.3 0 0 0-1.137.772 3.5 3.5 0 0 0-.76 1.238q-.27.727-.269 1.656 0 1.207.451 2.087a3.3 3.3 0 0 0 1.268 1.354q.813.474 1.886.474.962 0 1.709-.388a2.9 2.9 0 0 0 1.17-1.111q.425-.724.425-1.731v-.962h-3.195v1.216h1.638a1.6 1.6 0 0 1-.206.798 1.4 1.4 0 0 1-.597.555q-.388.195-.936.195a1.87 1.87 0 0 1-1.048-.291q-.443-.296-.686-.855-.242-.56-.242-1.356 0-.799.246-1.35.246-.556.685-.847.445-.29 1.03-.29.313 0 .57.078a1.49 1.49 0 0 1 1.03 1.066h1.64a2.8 2.8 0 0 0-.354-1.036 2.9 2.9 0 0 0-.713-.818 3.2 3.2 0 0 0-.99-.529 3.7 3.7 0 0 0-1.209-.19M18.766 48h2.08l2.634-7.637h-1.79l-1.85 5.802h-.07l-1.846-5.802H16.13zM4.349 1.762a1.73 1.73 0 0 0-1.23.516c-.327.33-.51.78-.51 1.246V33.02H14.94c.5 0 .978.219 1.308.601l2.087 2.421h19.056V14.356h-8.949c-.922 0-1.806-.37-2.459-1.032a3.55 3.55 0 0 1-1.018-2.493v-9.07zM15.4 15c.11 0 .2.09.2.2v.45h7.8v-.45a.2.2 0 0 1 .2-.2h2.2c.11 0 .2.09.2.2v2.2a.2.2 0 0 1-.2.2h-.45v7.8h.45a.2.2 0 0 1 .2.2v2.2a.2.2 0 0 1-.2.2h-2.2a.2.2 0 0 1-.2-.2v-.45h-7.8v.45a.2.2 0 0 1-.2.2h-2.2a.2.2 0 0 1-.2-.2v-2.2c0-.11.09-.2.2-.2h.45v-7.8h-.45a.2.2 0 0 1-.2-.2v-2.2c0-.11.09-.2.2-.2zm.2 2.4a.2.2 0 0 1-.2.2h-.45v7.8h.45a.2.2 0 0 1 .2.2v.45h7.8v-.45a.2.2 0 0 1 .2-.2h.45v-7.8h-.45a.2.2 0 0 1-.2-.2v-.45h-7.8z"
|
|
1658
|
+
}));
|
|
1659
|
+
|
|
1615
1660
|
const SvgPdf = ({
|
|
1616
1661
|
title,
|
|
1617
1662
|
titleId,
|
|
@@ -1808,6 +1853,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1808
1853
|
maxSizeError,
|
|
1809
1854
|
progressColor,
|
|
1810
1855
|
noChoosenFile,
|
|
1856
|
+
iconSvg,
|
|
1811
1857
|
iconPdf,
|
|
1812
1858
|
iconDoc,
|
|
1813
1859
|
iconPng,
|
|
@@ -1922,7 +1968,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1922
1968
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1923
1969
|
if (file[ix]) {
|
|
1924
1970
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1925
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword')) {
|
|
1971
|
+
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword') || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml') {
|
|
1926
1972
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1927
1973
|
change({
|
|
1928
1974
|
id: '',
|
|
@@ -1958,6 +2004,15 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1958
2004
|
check: formatError ?? configStyles.FILE.error.format
|
|
1959
2005
|
});
|
|
1960
2006
|
});
|
|
2007
|
+
} else if (file[ix].type === 'image/svg+xml') {
|
|
2008
|
+
change({
|
|
2009
|
+
id: '',
|
|
2010
|
+
check: '',
|
|
2011
|
+
status: '',
|
|
2012
|
+
file: file[ix],
|
|
2013
|
+
uuid: v4()
|
|
2014
|
+
});
|
|
2015
|
+
setImage('svg');
|
|
1961
2016
|
} else {
|
|
1962
2017
|
change({
|
|
1963
2018
|
id: '',
|
|
@@ -1988,7 +2043,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
1988
2043
|
for (let ix = 0; ix < file.length; ix++) {
|
|
1989
2044
|
if (file[ix]) {
|
|
1990
2045
|
if (file[ix].size <= maxSize * Math.pow(2, 20)) {
|
|
1991
|
-
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword')) {
|
|
2046
|
+
if (fileExtensions.includes(file[ix].type.split('/')[1]) || file[ix].name.toLowerCase().endsWith('.heic') || file[ix].name.toLowerCase().endsWith('.heif') || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[ix].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[ix].type.split('/')[1] === 'msword') || fileExtensions.includes('svg') && file[ix].type.split('/')[1] === 'svg+xml') {
|
|
1992
2047
|
if (file[ix].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
1993
2048
|
change({
|
|
1994
2049
|
id: '',
|
|
@@ -2024,6 +2079,15 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2024
2079
|
check: formatError ?? configStyles.FILE.error.format
|
|
2025
2080
|
});
|
|
2026
2081
|
});
|
|
2082
|
+
} else if (file[ix].type === 'image/svg+xml') {
|
|
2083
|
+
change({
|
|
2084
|
+
id: '',
|
|
2085
|
+
check: '',
|
|
2086
|
+
status: '',
|
|
2087
|
+
file: file[ix],
|
|
2088
|
+
uuid: v4()
|
|
2089
|
+
});
|
|
2090
|
+
setImage('svg');
|
|
2027
2091
|
} else {
|
|
2028
2092
|
change({
|
|
2029
2093
|
id: '',
|
|
@@ -2063,7 +2127,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2063
2127
|
} else {
|
|
2064
2128
|
if (file[0]) {
|
|
2065
2129
|
if (file[0].size <= maxSize * Math.pow(2, 20)) {
|
|
2066
|
-
if (fileExtensions.includes(file[0].type.split('/')[1]) || (fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[0].type.split('/')[1] === 'msword')) {
|
|
2130
|
+
if (fileExtensions.includes(file[0].type.split('/')[1]) || (fileExtensions.includes('heic') || fileExtensions.includes('heif')) && (file[0].type === 'image/heif' || file[0].type === 'image/heic' || file[0].name.toLowerCase().endsWith('.heic') || file[0].name.toLowerCase().endsWith('.heif')) || (fileExtensions.includes('doc') || fileExtensions.includes('docx')) && (file[0].type.split('/')[1] === 'vnd.openxmlformats-officedocument.wordprocessingml.document' || file[0].type.split('/')[1] === 'msword') || fileExtensions.includes('svg') && file[0].type.split('/')[1] === 'svg+xml') {
|
|
2067
2131
|
setError('');
|
|
2068
2132
|
if (file[0].type === 'application/vnd.openxmlformats-officedocument.wordprocessingml.document') {
|
|
2069
2133
|
setImage('docx');
|
|
@@ -2107,7 +2171,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2107
2171
|
}
|
|
2108
2172
|
};
|
|
2109
2173
|
const handleClick = () => {
|
|
2110
|
-
if (!image && !singleFile) {
|
|
2174
|
+
if (!image && !singleFile || multiple) {
|
|
2111
2175
|
inpRef.current.files = null;
|
|
2112
2176
|
inpRef.current.value = null;
|
|
2113
2177
|
inpRef.current.click();
|
|
@@ -2282,6 +2346,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2282
2346
|
}
|
|
2283
2347
|
};
|
|
2284
2348
|
}, []);
|
|
2349
|
+
console.log(image, ' - - - -image');
|
|
2285
2350
|
return configStyles.FILE && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2286
2351
|
ref: parentlRef,
|
|
2287
2352
|
style: {
|
|
@@ -2366,7 +2431,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2366
2431
|
fontFamily: family ?? configStyles.FILE.font.family,
|
|
2367
2432
|
fontWeight: weight ?? configStyles.FILE.font.weight
|
|
2368
2433
|
}
|
|
2369
|
-
}, !multiple && image && preview ? image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2434
|
+
}, !multiple && image && preview ? image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default["default"].createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : /*#__PURE__*/React__default["default"].createElement("img", {
|
|
2370
2435
|
src: image,
|
|
2371
2436
|
style: {
|
|
2372
2437
|
display: 'block',
|
|
@@ -2417,7 +2482,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2417
2482
|
hoverColor: uploadBtnHoverColor ?? configStyles.FILE.uploadBtn.colors.hover,
|
|
2418
2483
|
backgroundColor: uploadBtnBackgroundColor ?? configStyles.FILE.uploadBtn.colors.background,
|
|
2419
2484
|
backgroundHoverColor: uploadBtnBackgroundColorHover ?? configStyles.FILE.uploadBtn.colors.backgroundHover
|
|
2420
|
-
}) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2485
|
+
}) : image === 'svg' ? iconSvg ? iconSvg : configStyles.FILE.icon.svg ? configStyles.FILE.icon.svg : /*#__PURE__*/React__default["default"].createElement(SvgSvg, null) : image === 'pdf' ? iconPdf ? iconPdf : configStyles.FILE.icon.pdf ? configStyles.FILE.icon.pdf : /*#__PURE__*/React__default["default"].createElement(SvgPdf, null) : image === 'heif' || image === 'heic' ? iconHeic ? iconHeic : configStyles.FILE.icon.heic ? configStyles.FILE.icon.heic : /*#__PURE__*/React__default["default"].createElement(SvgHeic, null) : image === 'doc' ? iconDoc ? iconDoc : configStyles.FILE.icon.doc ? configStyles.FILE.icon.doc : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : image === 'docx' ? iconDocx ? iconDocx : configStyles.FILE.icon.docx ? configStyles.FILE.icon.docx : /*#__PURE__*/React__default["default"].createElement(SvgDocIcon, null) : singleFile[0].type === 'image/jpeg' ? iconJpeg ? iconJpeg : configStyles.FILE.icon.jpeg ? configStyles.FILE.icon.jpeg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpeg, null) : singleFile[0].type === 'image/png' ? iconPng ? iconPng : configStyles.FILE.icon.png ? configStyles.FILE.icon.png : /*#__PURE__*/React__default["default"].createElement(SvgListItemPng, null) : singleFile[0].type === 'image/jpg' ? iconJpeg ? iconJpg : configStyles.FILE.icon.jpg ? configStyles.FILE.icon.jpg : /*#__PURE__*/React__default["default"].createElement(SvgListItemJpg, null) : '' : /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
2421
2486
|
contentWidth: true,
|
|
2422
2487
|
onClick: _ => _,
|
|
2423
2488
|
font: uploadBtnFont ?? configStyles.FILE.uploadBtn.font.family,
|
|
@@ -2481,6 +2546,7 @@ const File = /*#__PURE__*/React.forwardRef(({
|
|
|
2481
2546
|
status: item.status,
|
|
2482
2547
|
size: item?.file?.size,
|
|
2483
2548
|
name: item?.file?.name,
|
|
2549
|
+
iconSvg: iconSvg ?? configStyles.FILE.icon.svg,
|
|
2484
2550
|
iconPdf: iconPdf ?? configStyles.FILE.icon.pdf,
|
|
2485
2551
|
iconDoc: iconDoc ?? configStyles.FILE.icon.doc,
|
|
2486
2552
|
iconPng: iconPng ?? configStyles.FILE.icon.png,
|
|
@@ -2568,6 +2634,7 @@ File.propTypes = {
|
|
|
2568
2634
|
progressColor: PropTypes__default["default"].string,
|
|
2569
2635
|
deleteComponent: PropTypes__default["default"].bool,
|
|
2570
2636
|
removeComponent: PropTypes__default["default"].func,
|
|
2637
|
+
iconSvg: PropTypes__default["default"].element,
|
|
2571
2638
|
iconPdf: PropTypes__default["default"].element,
|
|
2572
2639
|
iconDoc: PropTypes__default["default"].element,
|
|
2573
2640
|
iconPng: PropTypes__default["default"].element,
|
|
@@ -2986,6 +3053,7 @@ const TD = ({
|
|
|
2986
3053
|
handleCheckedBody,
|
|
2987
3054
|
openListFontWeight,
|
|
2988
3055
|
openListFontFamily,
|
|
3056
|
+
handleClickOnRowTd,
|
|
2989
3057
|
tableColumnMinWidth,
|
|
2990
3058
|
tableColumnMaxWidth,
|
|
2991
3059
|
handleBodyActionClick,
|
|
@@ -3076,7 +3144,8 @@ const TD = ({
|
|
|
3076
3144
|
borderBottomLeftRadius: rowItem && innerIndex === 0 ? rowRadius : '0px',
|
|
3077
3145
|
borderTopRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px',
|
|
3078
3146
|
borderBottomRightRadius: rowItem && innerIndex === row.length - 1 ? rowRadius : '0px'
|
|
3079
|
-
}
|
|
3147
|
+
},
|
|
3148
|
+
onClick: e => handleClickOnRowTd(e, row, item, index, innerIndex)
|
|
3080
3149
|
}, Array.isArray(item) ? item.length > 0 ? item.map((newItem, newIndex) => {
|
|
3081
3150
|
if (newItem && !Array.isArray(newItem) && typeof newItem === 'object') {
|
|
3082
3151
|
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -3395,7 +3464,8 @@ const Table = ({
|
|
|
3395
3464
|
tableBorderColor,
|
|
3396
3465
|
collapseFullRow,
|
|
3397
3466
|
openArrow,
|
|
3398
|
-
closeArrow
|
|
3467
|
+
closeArrow,
|
|
3468
|
+
clickableRowColumnTd
|
|
3399
3469
|
}) => {
|
|
3400
3470
|
const itemRefs = React.useRef({});
|
|
3401
3471
|
const headerRef = React.useRef(null);
|
|
@@ -3970,6 +4040,20 @@ const Table = ({
|
|
|
3970
4040
|
return value;
|
|
3971
4041
|
});
|
|
3972
4042
|
};
|
|
4043
|
+
const handleClickOnRowTd = (e, row, item, index, innerIndex) => {
|
|
4044
|
+
e.stopPropagation();
|
|
4045
|
+
if (clickableRowColumnTd) {
|
|
4046
|
+
const actionData = {
|
|
4047
|
+
from: 'body',
|
|
4048
|
+
item,
|
|
4049
|
+
id: item.id,
|
|
4050
|
+
index,
|
|
4051
|
+
row,
|
|
4052
|
+
innerIndex
|
|
4053
|
+
};
|
|
4054
|
+
getData(actionData);
|
|
4055
|
+
}
|
|
4056
|
+
};
|
|
3973
4057
|
React.useEffect(() => {
|
|
3974
4058
|
if (checkDrag != null) {
|
|
3975
4059
|
const draggableArray = body && body.length > 0 ? body.map((item, index) => {
|
|
@@ -4186,6 +4270,7 @@ const Table = ({
|
|
|
4186
4270
|
openListFontWeight: openListFontWeight ?? configStyles.TABLE.openList.font.weight,
|
|
4187
4271
|
openListFontFamily: openListFontFamily ?? configStyles.TABLE.openList.font.family,
|
|
4188
4272
|
handleCheckedBody: handleCheckedBody,
|
|
4273
|
+
handleClickOnRowTd: handleClickOnRowTd,
|
|
4189
4274
|
handleBodyActionClick: handleBodyActionClick,
|
|
4190
4275
|
handleMoreOptionsClick: handleMoreOptionsClick,
|
|
4191
4276
|
handleContentListClick: handleContentListClick,
|
|
@@ -4303,7 +4388,8 @@ Table.propTypes = {
|
|
|
4303
4388
|
tableBorder: PropTypes__default["default"].string,
|
|
4304
4389
|
tableBorderColor: PropTypes__default["default"].string,
|
|
4305
4390
|
openArrow: PropTypes__default["default"].element,
|
|
4306
|
-
closeArrow: PropTypes__default["default"].element
|
|
4391
|
+
closeArrow: PropTypes__default["default"].element,
|
|
4392
|
+
clickableRowColumnTd: PropTypes__default["default"].bool
|
|
4307
4393
|
};
|
|
4308
4394
|
|
|
4309
4395
|
var css_248z$b = ".modal-module_animation__modal__3mt48{animation:modal-module_show-popup__WrH7a .15s;-webkit-animation:modal-module_show-popup__WrH7a .15s}@keyframes modal-module_show-popup__WrH7a{0%{transform:translate3d(0,-50%,0);-webkit-transform:translate3d(0,-50%,0);-moz-transform:translate3d(0,-50%,0);-ms-transform:translate3d(0,-50%,0);-o-transform:translate3d(0,-50%,0)}to{opacity:1;transform:translateZ(0);-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0)}}";
|
|
@@ -4428,9 +4514,12 @@ const Modal = ({
|
|
|
4428
4514
|
prevIcon,
|
|
4429
4515
|
nextIcon,
|
|
4430
4516
|
closeIcon,
|
|
4517
|
+
closeIconFix,
|
|
4431
4518
|
showCloseIcon,
|
|
4432
4519
|
closeIconClass,
|
|
4433
4520
|
closeSlideIcon,
|
|
4521
|
+
closeIconTopPosition,
|
|
4522
|
+
closeIconRightPosition,
|
|
4434
4523
|
selected,
|
|
4435
4524
|
children,
|
|
4436
4525
|
minWidth,
|
|
@@ -4617,6 +4706,7 @@ const Modal = ({
|
|
|
4617
4706
|
}
|
|
4618
4707
|
}, type === 'content' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4619
4708
|
style: {
|
|
4709
|
+
position: closeIconFix ? 'relative' : 'unset',
|
|
4620
4710
|
width: '100%',
|
|
4621
4711
|
minWidth: '0',
|
|
4622
4712
|
display: 'flex',
|
|
@@ -4655,6 +4745,9 @@ const Modal = ({
|
|
|
4655
4745
|
}, headerText), showCloseIcon ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4656
4746
|
onClick: () => setShow(false),
|
|
4657
4747
|
style: {
|
|
4748
|
+
position: closeIconFix ? 'absolute' : 'unset',
|
|
4749
|
+
top: closeIconTopPosition ?? configStyles.MODAL?.closeIcon?.top,
|
|
4750
|
+
right: closeIconRightPosition ?? configStyles.MODAL?.closeIcon?.right,
|
|
4658
4751
|
display: 'flex',
|
|
4659
4752
|
minWidth: '14px',
|
|
4660
4753
|
minHeight: '14px',
|
|
@@ -4662,7 +4755,7 @@ const Modal = ({
|
|
|
4662
4755
|
width: 'fit-content',
|
|
4663
4756
|
alignItems: 'center',
|
|
4664
4757
|
alignSelf: 'flex-end',
|
|
4665
|
-
height: '100%',
|
|
4758
|
+
height: closeIconFix ? 'fit-content' : '100%',
|
|
4666
4759
|
justifyContent: 'center'
|
|
4667
4760
|
},
|
|
4668
4761
|
className: closeIconClass ? closeIconClass : configStyles.MODAL.icon.className
|
|
@@ -4814,9 +4907,12 @@ Modal.propTypes = {
|
|
|
4814
4907
|
prevIcon: PropTypes__default["default"].element,
|
|
4815
4908
|
nextIcon: PropTypes__default["default"].element,
|
|
4816
4909
|
closeIcon: PropTypes__default["default"].element,
|
|
4910
|
+
closeIconFix: PropTypes__default["default"].bool,
|
|
4817
4911
|
showCloseIcon: PropTypes__default["default"].bool,
|
|
4818
4912
|
closeIconClass: PropTypes__default["default"].string,
|
|
4819
4913
|
closeSlideIcon: PropTypes__default["default"].element,
|
|
4914
|
+
closeIconTopPosition: PropTypes__default["default"].string,
|
|
4915
|
+
closeIconRightPosition: PropTypes__default["default"].string,
|
|
4820
4916
|
headerText: PropTypes__default["default"].string,
|
|
4821
4917
|
headerSize: PropTypes__default["default"].string,
|
|
4822
4918
|
headerStyle: PropTypes__default["default"].string,
|
|
@@ -7836,6 +7932,7 @@ Accordion.propTypes = {
|
|
|
7836
7932
|
fontFamily: PropTypes__default["default"].string
|
|
7837
7933
|
};
|
|
7838
7934
|
|
|
7935
|
+
// import React from 'react';
|
|
7839
7936
|
const Swipe = ({
|
|
7840
7937
|
id,
|
|
7841
7938
|
title,
|
|
@@ -7857,8 +7954,8 @@ const Swipe = ({
|
|
|
7857
7954
|
} = props || {};
|
|
7858
7955
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7859
7956
|
style: {
|
|
7860
|
-
width: '100%',
|
|
7861
|
-
height: '
|
|
7957
|
+
width: position === 'left' || position === 'right' ? width ?? SWIPEMODAL.width : '100%',
|
|
7958
|
+
height: position === 'top' || position === 'bottom' ? height ?? SWIPEMODAL.height : '100vh'
|
|
7862
7959
|
}
|
|
7863
7960
|
}, (title || showCloseIcon) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7864
7961
|
style: {
|
|
@@ -7917,6 +8014,7 @@ var css_248z$2 = ".swipe-module_to-top__lrHfG{bottom:0}.swipe-module_to-left__kg
|
|
|
7917
8014
|
var styles$2 = {"to-top":"swipe-module_to-top__lrHfG","to-left":"swipe-module_to-left__kgLsE","to-right":"swipe-module_to-right__Xu3Ul","to-bottom":"swipe-module_to-bottom__94M7H","visible":"swipe-module_visible__---aC","swipe-block":"swipe-module_swipe-block__Yv1B3","move-top":"swipe-module_move-top__m6t2O","slideTop":"swipe-module_slideTop__-Bbap","move-left":"swipe-module_move-left__4TDLs","slideLeft":"swipe-module_slideLeft__i24cS","move-right":"swipe-module_move-right__FrYo0","slideRight":"swipe-module_slideRight__swgSY","move-bottom":"swipe-module_move-bottom__eYDx6","slideBottom":"swipe-module_slideBottom__TBoZo","back-top":"swipe-module_back-top__gJZv0","backTop":"swipe-module_backTop__32loc","back-left":"swipe-module_back-left__Wd3aY","backLeft":"swipe-module_backLeft__q89ub","back-right":"swipe-module_back-right__Lgwz7","backRight":"swipe-module_backRight__8t5Dm","back-bottom":"swipe-module_back-bottom__JRN-7","backBottom":"swipe-module_backBottom__lwR8B"};
|
|
7918
8015
|
styleInject(css_248z$2);
|
|
7919
8016
|
|
|
8017
|
+
// import React, { useEffect, useRef } from 'react';
|
|
7920
8018
|
let swipeCount = 0;
|
|
7921
8019
|
const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
7922
8020
|
const {
|
|
@@ -7927,11 +8025,11 @@ const createElem = (id, title, child, props, swipeBlock, innerConfigStyles) => {
|
|
|
7927
8025
|
borderRadius,
|
|
7928
8026
|
backgroundColor
|
|
7929
8027
|
} = props || {};
|
|
7930
|
-
swipeBlock.style.position = '
|
|
8028
|
+
swipeBlock.style.position = 'fixed';
|
|
7931
8029
|
swipeBlock.style.zIndex = swipeCount;
|
|
7932
8030
|
swipeBlock.style.backgroundColor = backgroundColor ?? innerConfigStyles.SWIPEMODAL.colors.background;
|
|
7933
8031
|
swipeBlock.style.width = position === 'left' || position === 'right' ? width ?? innerConfigStyles.SWIPEMODAL.width : '100%';
|
|
7934
|
-
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '
|
|
8032
|
+
swipeBlock.style.height = position === 'top' || position === 'bottom' ? height ?? innerConfigStyles.SWIPEMODAL.height : '100vh';
|
|
7935
8033
|
swipeBlock.style.borderTopLeftRadius = position === 'right' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7936
8034
|
swipeBlock.style.borderTopRightRadius = position === 'left' || position === 'bottom' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
7937
8035
|
swipeBlock.style.borderBottomLeftRadius = position === 'right' || position === 'top' ? '0px' : borderRadius ?? innerConfigStyles.SWIPEMODAL.border.radius;
|
|
@@ -7965,25 +8063,26 @@ const createSwipe = (id, title, child, props, swipable) => {
|
|
|
7965
8063
|
};
|
|
7966
8064
|
createElem(id, title, child, props, swipeBlock, innerConfigStyles);
|
|
7967
8065
|
if (!swipable) {
|
|
8066
|
+
const widthParent = hasOwnerProperty(props, 'withParent') ? props.withParent === true ? true : false : innerConfigStyles.SWIPEMODAL.withParent;
|
|
7968
8067
|
swipable = document.createElement('div');
|
|
7969
8068
|
swipable.setAttribute('id', 'swipable');
|
|
7970
|
-
swipable.style.position = '
|
|
8069
|
+
swipable.style.position = 'fixed';
|
|
7971
8070
|
swipable.style.top = '0px';
|
|
7972
8071
|
swipable.style.left = '0px';
|
|
7973
8072
|
swipable.style.zIndex = 99999;
|
|
7974
8073
|
swipable.style.maxWidth = '100%';
|
|
7975
8074
|
swipable.style.maxHeight = '100vh';
|
|
7976
|
-
swipable.style.
|
|
7977
|
-
swipable.style.
|
|
8075
|
+
swipable.style.visibility = 'hidden';
|
|
8076
|
+
swipable.style.width = widthParent ? '100%' : '0px';
|
|
8077
|
+
swipable.style.height = widthParent ? '100vh' : '0px';
|
|
7978
8078
|
swipable.style.backgroundColor = props?.parent?.backgroundColor ?? innerConfigStyles.SWIPEMODAL.parent.colors.background;
|
|
8079
|
+
swipable.classList.add(styles$2['visible']);
|
|
7979
8080
|
if (props.outSideClose || innerConfigStyles.SWIPEMODAL.outSideClose) {
|
|
7980
8081
|
swipable.addEventListener('click', function () {
|
|
7981
8082
|
hasOwnerProperty(props, 'callClose') && {}.toString.call(props.callClose) === '[object Function]' ? props.callClose() : '';
|
|
7982
8083
|
});
|
|
7983
8084
|
}
|
|
7984
|
-
|
|
7985
|
-
SwipifyBlock.style.display = 'block';
|
|
7986
|
-
SwipifyBlock.appendChild(swipable);
|
|
8085
|
+
document.body.appendChild(swipable);
|
|
7987
8086
|
}
|
|
7988
8087
|
swipable.appendChild(swipeBlock);
|
|
7989
8088
|
}, error => {
|
|
@@ -8032,6 +8131,7 @@ const swipe = {
|
|
|
8032
8131
|
close: id => {
|
|
8033
8132
|
if (id === undefined || id === null && (typeof id !== 'string' || typeof id !== 'number')) {
|
|
8034
8133
|
alert('Please pass valid id prop (string / number) when call swipe.close function');
|
|
8134
|
+
return;
|
|
8035
8135
|
}
|
|
8036
8136
|
let swipable = document.getElementById('swipable');
|
|
8037
8137
|
swipeCount -= 1;
|
|
@@ -8046,9 +8146,7 @@ const swipe = {
|
|
|
8046
8146
|
if (swipeCount === 0 && swipable) {
|
|
8047
8147
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8048
8148
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8049
|
-
|
|
8050
|
-
SwipifyBlock.style.display = 'none';
|
|
8051
|
-
SwipifyBlock.removeChild(swipable);
|
|
8149
|
+
document.body.removeChild(swipable);
|
|
8052
8150
|
}
|
|
8053
8151
|
}, 200);
|
|
8054
8152
|
} else {
|
|
@@ -8056,42 +8154,14 @@ const swipe = {
|
|
|
8056
8154
|
if (swipeCount === 0 && swipable) {
|
|
8057
8155
|
window.removeEventListener('popstate', handleNavigationChange);
|
|
8058
8156
|
window.removeEventListener('navigationchange', handleNavigationChange);
|
|
8059
|
-
|
|
8060
|
-
SwipifyBlock.style.display = 'none';
|
|
8061
|
-
SwipifyBlock.removeChild(swipable);
|
|
8157
|
+
document.body.removeChild(swipable);
|
|
8062
8158
|
}
|
|
8063
8159
|
}
|
|
8064
|
-
} else {
|
|
8065
|
-
if (swipeCount === 0 && swipable) {
|
|
8066
|
-
const SwipifyBlock = document.getElementById('swipify_tui');
|
|
8067
|
-
SwipifyBlock.style.display = 'none';
|
|
8068
|
-
SwipifyBlock.removeChild(swipable);
|
|
8069
|
-
}
|
|
8070
8160
|
}
|
|
8071
8161
|
}
|
|
8072
8162
|
};
|
|
8073
8163
|
const SwipeModal = () => {
|
|
8074
|
-
|
|
8075
|
-
React.useEffect(() => {
|
|
8076
|
-
const parentSize = ref.current.parentNode.style.height;
|
|
8077
|
-
if (Number(parentSize.replace(/\D/g, '')) > 0) {
|
|
8078
|
-
ref.current.style.height = '100%';
|
|
8079
|
-
} else {
|
|
8080
|
-
ref.current.style.height = '100vh';
|
|
8081
|
-
}
|
|
8082
|
-
}, [ref]);
|
|
8083
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
8084
|
-
ref: ref,
|
|
8085
|
-
id: "swipify_tui",
|
|
8086
|
-
style: {
|
|
8087
|
-
position: 'absolute',
|
|
8088
|
-
width: '100%',
|
|
8089
|
-
top: 0,
|
|
8090
|
-
overflow: 'hidden',
|
|
8091
|
-
zIndex: 1,
|
|
8092
|
-
display: 'none'
|
|
8093
|
-
}
|
|
8094
|
-
});
|
|
8164
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
8095
8165
|
};
|
|
8096
8166
|
|
|
8097
8167
|
const TypographyType = {
|
package/package.json
CHANGED
package/tui.config.js
CHANGED