diginet-core-ui 1.4.45-beta.4 → 1.4.45-beta.6
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.
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg width="39" height="39" viewBox="0 0 39 39" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2067_341)">
|
|
3
|
+
<path d="M31.7002 15.1H24.8002V7.5C24.8002 6.7 24.2002 6.1 23.4002 6.1C22.6002 6.1 22.0002 6.7 22.0002 7.5V16.5C22.0002 17.3 22.6002 17.9 23.4002 17.9H31.7002C32.5002 17.9 33.1002 17.3 33.1002 16.5C33.1002 15.7 32.5002 15.1 31.7002 15.1Z" fill="#FF8C00"/>
|
|
4
|
+
<path d="M39.0002 15.6C39.0002 17.9 38.5002 20.1 37.6002 22.1C37.0002 21.3 36.2002 20.6 35.4002 20C35.9002 18.6 36.2002 17.1 36.2002 15.6C36.2002 8.5 30.4002 2.8 23.4002 2.8C16.3002 2.8 10.6002 8.5 10.6002 15.6C10.5002 15.6 10.5002 15.6 10.4002 15.6H10.3002C9.9002 15.6 9.5002 15.7 9.1002 16C8.8002 16.2 8.6002 16.5 8.5002 16.8H7.8002C7.8002 16.4 7.7002 16 7.7002 15.7C7.7002 11.5 9.3002 7.6 12.3002 4.6C15.2002 1.6 19.2002 0 23.3002 0C32.0002 0 39.0002 7 39.0002 15.6Z" fill="#111D5E"/>
|
|
5
|
+
<path d="M16.4 20.0001C16 20.0001 15.7 19.9001 15.5 19.7001C15.3 19.5001 15.3 19.3001 15.3 19.0001V17.6001C15.3 17.3001 15.4 17.1001 15.6 16.9001C15.8 16.7001 16 16.6001 16.3 16.6001H16.4C16.7 16.6001 16.9 16.7001 17.1 16.9001C17.3 17.1001 17.4 17.3001 17.4 17.6001V19.0001C17.4 19.2001 17.4 19.5001 17.2 19.7001C17 19.9001 16.7 20.0001 16.4 20.0001Z" fill="#2680EB"/>
|
|
6
|
+
<path d="M10.9 19.8001C10.7 19.9001 10.5 20.0001 10.3 20.0001H10.2C10 20.0001 9.9 20.0001 9.7 19.9001C9.4 19.7001 9.2 19.4001 9.2 19.0001V17.6001C9.2 17.3001 9.3 17.0001 9.6 16.8001C9.8 16.7001 10 16.6001 10.2 16.6001H10.3C10.6 16.6001 10.8 16.7001 11 16.9001C11.2 17.1001 11.3 17.4001 11.3 17.6001V19.0001C11.3 19.3001 11.2 19.6001 10.9 19.8001Z" fill="#2680EB"/>
|
|
7
|
+
<path d="M4.2 20.0001C3.8 20.0001 3.5 19.9001 3.3 19.7001C3.1 19.5001 3 19.3001 3 19.0001V17.6001C3 17.2001 3.2 16.9001 3.5 16.7001H3.6C3.7 16.7001 3.8 16.7001 3.9 16.7001H4.1C4.6 16.8001 5 17.2001 5 17.7001V19.0001C5 19.5 4.8 20.0001 4.2 20.0001Z" fill="#2680EB"/>
|
|
8
|
+
<path d="M18.3 17.9001V19.0001C18.3 20.1001 17.4 20.9001 16.4 20.9001H16.3C15.2 20.9001 14.4 20.0001 14.4 19.0001V17.8001H12.2V19.0001C12.2 20.1001 11.3 20.9001 10.3 21.0001H10.2C9.1 21.0001 8.3 20.1001 8.3 19.0001V17.8001H6.1V19.0001C6.1 20.1001 5.3 20.9001 4.2 20.9001H4.1C3 20.9001 2.2 20.0001 2.2 19.0001V17.9001C1.7 17.9001 0 18.0001 0 20.9001V35.9001C0 37.6001 1.4 39.0001 3.1 39.0001H17.4C19.1 39.0001 20.5 37.6001 20.5 36.0001C19.9 35.2001 19.4 34.4001 19 33.5001V35.6001C19 36.6001 18.2 37.4001 17.2 37.4001H3.3C2.3 37.4001 1.5 36.6001 1.5 35.6001V25.8001C1.5 25.1001 2 24.6001 2.6 24.6001H17.7C18.1 24.6001 18.4 24.8001 18.6 25.1001C19 24.0001 19.6 22.9001 20.4 22.0001V20.8001C20.5 18.1001 18.9 17.9001 18.3 17.9001Z" fill="#2680EB"/>
|
|
9
|
+
<path d="M6.3 30.4001H3.6C3.3 30.4001 3 30.2001 3 29.8001V27.1001C3 26.8001 3.2 26.5001 3.6 26.5001H6.3C6.6 26.5001 6.9 26.7001 6.9 27.1001V29.8001C6.8 30.2001 6.6 30.4001 6.3 30.4001Z" fill="#7BC0F9"/>
|
|
10
|
+
<path d="M11.6 30.4001H8.9C8.6 30.4001 8.3 30.2001 8.3 29.8001V27.1001C8.3 26.8001 8.5 26.5001 8.9 26.5001H11.6C11.9 26.5001 12.2 26.7001 12.2 27.1001V29.8001C12.2 30.2001 11.9 30.4001 11.6 30.4001Z" fill="#7BC0F9"/>
|
|
11
|
+
<path d="M16.9 30.4001H14.2C13.9 30.4001 13.6 30.2001 13.6 29.8001V27.1001C13.6 26.8001 13.8 26.5001 14.2 26.5001H16.9C17.2 26.5001 17.5 26.7001 17.5 27.1001V29.8001C17.5 30.2001 17.2 30.4001 16.9 30.4001Z" fill="#7BC0F9"/>
|
|
12
|
+
<path d="M6.3 35.4001H3.6C3.3 35.4001 3 35.2001 3 34.8001V32.1001C3 31.8001 3.2 31.5001 3.6 31.5001H6.3C6.6 31.5001 6.9 31.7001 6.9 32.1001V34.8001C6.8 35.2001 6.6 35.4001 6.3 35.4001Z" fill="#7BC0F9"/>
|
|
13
|
+
<path d="M11.6 35.4001H8.9C8.6 35.4001 8.3 35.2001 8.3 34.8001V32.1001C8.3 31.8001 8.5 31.5001 8.9 31.5001H11.6C11.9 31.5001 12.2 31.7001 12.2 32.1001V34.8001C12.2 35.2001 11.9 35.4001 11.6 35.4001Z" fill="#7BC0F9"/>
|
|
14
|
+
<path d="M16.9 35.4001H14.2C13.9 35.4001 13.6 35.2001 13.6 34.8001V32.1001C13.6 31.8001 13.8 31.5001 14.2 31.5001H16.9C17.2 31.5001 17.5 31.7001 17.5 32.1001V34.8001C17.5 35.2001 17.2 35.4001 16.9 35.4001Z" fill="#7BC0F9"/>
|
|
15
|
+
<path d="M29 19C23.5 19 19 23.5 19 29C19 34.5 23.5 39 29 39C34.5 39 39 34.5 39 29C39 23.5 34.5 19 29 19ZM29 21C30.8 21 32.5 21.6 33.9 22.7L22.7 33.9C21.6 32.5 21 30.8 21 29C21 24.6 24.6 21 29 21ZM29 37C27.2 37 25.5 36.4 24.1 35.3L35.3 24.1C36.4 25.5 37 27.2 37 29C37 33.4 33.4 37 29 37Z" fill="#FF4444"/>
|
|
16
|
+
</g>
|
|
17
|
+
<defs>
|
|
18
|
+
<clipPath id="clip0_2067_341">
|
|
19
|
+
<rect width="39" height="39" fill="white"/>
|
|
20
|
+
</clipPath>
|
|
21
|
+
</defs>
|
|
22
|
+
</svg>
|
|
@@ -287,12 +287,12 @@ const Attachment = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referenc
|
|
|
287
287
|
// };
|
|
288
288
|
|
|
289
289
|
const onChangeFiles = async e => {
|
|
290
|
-
var _e$target, _e$target$files
|
|
290
|
+
var _e$target, _e$target$files, _Array$from$;
|
|
291
291
|
if (!isEnable) return;
|
|
292
292
|
e.persist();
|
|
293
|
-
if (e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && (_e$target$files = _e$target.files) !== null && _e$target$files !== void 0 && _e$target$files.length) {
|
|
294
|
-
var _ref;
|
|
295
|
-
let files = e.target.files;
|
|
293
|
+
if (e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && (_e$target$files = _e$target.files) !== null && _e$target$files !== void 0 && _e$target$files.length || (_Array$from$ = Array.from(document.getElementsByClassName('DGN-UI-Attachment-Input'))[0]) !== null && _Array$from$ !== void 0 && _Array$from$.files.length) {
|
|
294
|
+
var _Array$from$2, _ref;
|
|
295
|
+
let files = e.target.files || ((_Array$from$2 = Array.from(document.getElementsByClassName('DGN-UI-Attachment-Input'))[0]) === null || _Array$from$2 === void 0 ? void 0 : _Array$from$2.files);
|
|
296
296
|
// const lengthAttached = attached.length;
|
|
297
297
|
const lengthAttached = (_ref = [...dataState, ...newDataState]) === null || _ref === void 0 ? void 0 : _ref.length;
|
|
298
298
|
for (let i = 0; i < files.length; i++) {
|
|
@@ -433,7 +433,9 @@ const Attachment = /*#__PURE__*/memo( /*#__PURE__*/forwardRef((inProps, referenc
|
|
|
433
433
|
nodeList.forEach(itemEl => {
|
|
434
434
|
const index = Array.from(attachedRef.current.children).indexOf(itemEl.parentNode);
|
|
435
435
|
const deletedFile = attachedItems[index];
|
|
436
|
-
|
|
436
|
+
if (deletedFile.hasOwnProperty('AttachmentID')) {
|
|
437
|
+
removedAttachedRef.current.push(deletedFile);
|
|
438
|
+
}
|
|
437
439
|
recentRemovedAttached.push(deletedFile);
|
|
438
440
|
if (Object.prototype.toString.call(deletedFile) === '[object File]' && tempNewDataState !== null && tempNewDataState !== void 0 && tempNewDataState.length) {
|
|
439
441
|
removeFileOutInputFiles(tempNewDataState.findIndex(attach => (attach === null || attach === void 0 ? void 0 : attach.FileName) === (deletedFile === null || deletedFile === void 0 ? void 0 : deletedFile.FileName) && (attach === null || attach === void 0 ? void 0 : attach.CreateDate) === (deletedFile === null || deletedFile === void 0 ? void 0 : deletedFile.CreateDate)));
|
|
@@ -1465,17 +1467,17 @@ Attachment.propTypes = {
|
|
|
1465
1467
|
allowSort: PropTypes.bool,
|
|
1466
1468
|
/** Class for component. */
|
|
1467
1469
|
className: PropTypes.string,
|
|
1468
|
-
/** List attachment:<br />
|
|
1469
|
-
* [{<br />
|
|
1470
|
-
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1471
|
-
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/demo.jpg",<br />
|
|
1472
|
-
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1473
|
-
* "FileSize": 248837,<br />
|
|
1474
|
-
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1475
|
-
* "CreateUserID": "LEMONADMIN",<br />
|
|
1476
|
-
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1477
|
-
* "UserName": "Quản trị hệ thống"<br />
|
|
1478
|
-
* }, ...]
|
|
1470
|
+
/** List attachment:<br />
|
|
1471
|
+
* [{<br />
|
|
1472
|
+
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1473
|
+
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/demo.jpg",<br />
|
|
1474
|
+
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1475
|
+
* "FileSize": 248837,<br />
|
|
1476
|
+
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1477
|
+
* "CreateUserID": "LEMONADMIN",<br />
|
|
1478
|
+
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1479
|
+
* "UserName": "Quản trị hệ thống"<br />
|
|
1480
|
+
* }, ...]
|
|
1479
1481
|
*/
|
|
1480
1482
|
data: PropTypes.array,
|
|
1481
1483
|
/** The message to display when deleting files. */
|
|
@@ -1506,16 +1508,16 @@ Attachment.propTypes = {
|
|
|
1506
1508
|
onChange: PropTypes.func,
|
|
1507
1509
|
/** Download attached event, if not it will use default. */
|
|
1508
1510
|
onDownload: PropTypes.func,
|
|
1509
|
-
/**
|
|
1510
|
-
* event when removed file(s)
|
|
1511
|
-
*
|
|
1512
|
-
* return data: {<br/>
|
|
1513
|
-
* attached: [Files] (insist old and all new files )<br/>
|
|
1514
|
-
* allNewAttached: [Files]<br/>
|
|
1515
|
-
* oldAttached: [Files]<br/>
|
|
1516
|
-
* removedAttached: [Files]<br/>
|
|
1517
|
-
* element: [NodeList (just removed)]<br/>
|
|
1518
|
-
* }
|
|
1511
|
+
/**
|
|
1512
|
+
* event when removed file(s)
|
|
1513
|
+
*
|
|
1514
|
+
* return data: {<br/>
|
|
1515
|
+
* attached: [Files] (insist old and all new files )<br/>
|
|
1516
|
+
* allNewAttached: [Files]<br/>
|
|
1517
|
+
* oldAttached: [Files]<br/>
|
|
1518
|
+
* removedAttached: [Files]<br/>
|
|
1519
|
+
* element: [NodeList (just removed)]<br/>
|
|
1520
|
+
* }
|
|
1519
1521
|
*/
|
|
1520
1522
|
onRemove: PropTypes.func,
|
|
1521
1523
|
/** View attached event, if not it will use default. */
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -41,6 +41,12 @@ npm test
|
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
## Changelog
|
|
44
|
+
## 1.4.46
|
|
45
|
+
- \[Added\]: Icon – Add Icon Sql
|
|
46
|
+
- \[Added\]: Icon – Add IconMenu MHRM29N0006
|
|
47
|
+
- \[Fixed\]: Attachment - Fix the date display issue in the Attachment
|
|
48
|
+
- \[Changed\]: Dropdown – Add the One-Line Display Feature to the Dropdown
|
|
49
|
+
|
|
44
50
|
## 1.4.45
|
|
45
51
|
|
|
46
52
|
- \[Fixed\]: Popover - Fix the Popover still appears on click when the anchor is a disabled node
|
|
@@ -64,7 +70,7 @@ npm test
|
|
|
64
70
|
- \[Added\]: IconMenu – Add IconMenu MHRM38N0001
|
|
65
71
|
- \[Added\]: IconMenu – Add IconMenu MHRM38N0002
|
|
66
72
|
- \[Added\]: IconMenu – Add IconMenu MHRM38N0003
|
|
67
|
-
- \[Changed\]: Dropdown –
|
|
73
|
+
- \[Changed\]: Dropdown – Add inputProps for single mode
|
|
68
74
|
- \[Added\]: Icon – Add Inheritance
|
|
69
75
|
|
|
70
76
|
## 1.4.37
|