diginet-core-ui 1.3.67 → 1.3.68
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/components/avatar/index.js +19 -19
- package/components/badge/index.js +5 -5
- package/components/button/icon.js +21 -21
- package/components/button/index.js +13 -13
- package/components/form-control/attachment/index.js +21 -21
- package/components/form-control/calendar/function.js +113 -113
- package/components/form-control/input-base/index.js +47 -10
- package/components/form-control/money-input/index.js +6 -2
- package/components/form-control/number-input/index2.js +13 -4
- package/components/form-control/phone-input/index.js +6 -2
- package/components/form-control/text-input/index.js +13 -3
- package/components/paging/page-info.js +285 -101
- package/components/paging/page-selector2.js +95 -56
- package/components/popover/index.js +21 -21
- package/icons/effect.js +15 -15
- package/package.json +1 -1
- package/readme.md +6 -0
- package/styles/utils.js +10 -10
- package/utils/classNames.js +30 -0
- package/utils/index.js +1 -0
- package/utils/useInput.js +1 -8
|
@@ -458,18 +458,18 @@ Avatar.propTypes = {
|
|
|
458
458
|
/** source of file (http:// or https://) */
|
|
459
459
|
src: PropTypes.string,
|
|
460
460
|
|
|
461
|
-
/**
|
|
462
|
-
* it is used to display the default if there is no src<br />
|
|
463
|
-
* if undefined, will display icons available in the icons store
|
|
461
|
+
/**
|
|
462
|
+
* it is used to display the default if there is no src<br />
|
|
463
|
+
* if undefined, will display icons available in the icons store
|
|
464
464
|
*/
|
|
465
465
|
defaultSrc: PropTypes.string,
|
|
466
466
|
|
|
467
467
|
/** the direction to display more info */
|
|
468
468
|
direction: PropTypes.oneOf(['top', 'bottom', 'left', 'right']),
|
|
469
469
|
|
|
470
|
-
/**
|
|
471
|
-
* data to display when hoverAble is true<br />
|
|
472
|
-
* data is an object or function return a jsx element
|
|
470
|
+
/**
|
|
471
|
+
* data to display when hoverAble is true<br />
|
|
472
|
+
* data is an object or function return a jsx element
|
|
473
473
|
*/
|
|
474
474
|
data: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
|
|
475
475
|
|
|
@@ -485,19 +485,19 @@ Avatar.propTypes = {
|
|
|
485
485
|
/** lazy loading */
|
|
486
486
|
lazyLoading: PropTypes.bool,
|
|
487
487
|
|
|
488
|
-
/**
|
|
489
|
-
* ref methods
|
|
490
|
-
*
|
|
491
|
-
* * option(): Gets all UI component properties
|
|
492
|
-
* * Returns value - object
|
|
493
|
-
* * option(optionName): Gets the value of a single property
|
|
494
|
-
* * @param {optionName} - string
|
|
495
|
-
* * Returns value - any
|
|
496
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
497
|
-
* * @param {optionName} - string
|
|
498
|
-
* * @param {optionValue} - any
|
|
499
|
-
* * option(options): Updates the values of several properties
|
|
500
|
-
* * @param {options} - object
|
|
488
|
+
/**
|
|
489
|
+
* ref methods
|
|
490
|
+
*
|
|
491
|
+
* * option(): Gets all UI component properties
|
|
492
|
+
* * Returns value - object
|
|
493
|
+
* * option(optionName): Gets the value of a single property
|
|
494
|
+
* * @param {optionName} - string
|
|
495
|
+
* * Returns value - any
|
|
496
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
497
|
+
* * @param {optionName} - string
|
|
498
|
+
* * @param {optionValue} - any
|
|
499
|
+
* * option(options): Updates the values of several properties
|
|
500
|
+
* * @param {options} - object
|
|
501
501
|
*/
|
|
502
502
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
503
503
|
current: PropTypes.instanceOf(Element)
|
|
@@ -205,11 +205,11 @@ Badge.propTypes = {
|
|
|
205
205
|
/** other icon props when use prop name */
|
|
206
206
|
iconProps: PropTypes.object,
|
|
207
207
|
|
|
208
|
-
/** size of Badge
|
|
209
|
-
*
|
|
210
|
-
* * medium (dot 8px, typography p3)
|
|
211
|
-
* * large (button 10px, typography p2)
|
|
212
|
-
* * giant (button 12px, typography p1)
|
|
208
|
+
/** size of Badge
|
|
209
|
+
*
|
|
210
|
+
* * medium (dot 8px, typography p3)
|
|
211
|
+
* * large (button 10px, typography p2)
|
|
212
|
+
* * giant (button 12px, typography p1)
|
|
213
213
|
* */
|
|
214
214
|
size: PropTypes.oneOf(['medium', 'large', 'giant']),
|
|
215
215
|
|
|
@@ -368,14 +368,14 @@ ButtonIcon.propTypes = {
|
|
|
368
368
|
/** Name of [icon](https://core.diginet.com.vn/ui/?path=/story/icon-basic). */
|
|
369
369
|
name: PropTypes.string,
|
|
370
370
|
|
|
371
|
-
/**
|
|
372
|
-
* The size of the component.
|
|
373
|
-
*
|
|
374
|
-
* * tiny (button 24px, icon 16px)
|
|
375
|
-
* * small (button 32px, icon 20px)
|
|
376
|
-
* * medium (button 40px, icon 24px)
|
|
377
|
-
* * large (button 48px, icon 32px)
|
|
378
|
-
* * giant (button 56px, icon 40px)
|
|
371
|
+
/**
|
|
372
|
+
* The size of the component.
|
|
373
|
+
*
|
|
374
|
+
* * tiny (button 24px, icon 16px)
|
|
375
|
+
* * small (button 32px, icon 20px)
|
|
376
|
+
* * medium (button 40px, icon 24px)
|
|
377
|
+
* * large (button 48px, icon 32px)
|
|
378
|
+
* * giant (button 56px, icon 40px)
|
|
379
379
|
* */
|
|
380
380
|
size: PropTypes.oneOf(['tiny', 'small', 'medium', 'large', 'giant']),
|
|
381
381
|
|
|
@@ -391,19 +391,19 @@ ButtonIcon.propTypes = {
|
|
|
391
391
|
/** Width of the component. */
|
|
392
392
|
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
393
393
|
|
|
394
|
-
/**
|
|
395
|
-
* ref methods (ref.current.instance.*method*)
|
|
396
|
-
*
|
|
397
|
-
* * option(): Gets all UI component properties
|
|
398
|
-
* * Returns value - object
|
|
399
|
-
* * option(optionName): Gets the value of a single property
|
|
400
|
-
* * @param {optionName} - string
|
|
401
|
-
* * Returns value - any
|
|
402
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
403
|
-
* * @param {optionName} - string
|
|
404
|
-
* * @param {optionValue} - any
|
|
405
|
-
* * option(options): Updates the values of several properties
|
|
406
|
-
* * @param {options} - object
|
|
394
|
+
/**
|
|
395
|
+
* ref methods (ref.current.instance.*method*)
|
|
396
|
+
*
|
|
397
|
+
* * option(): Gets all UI component properties
|
|
398
|
+
* * Returns value - object
|
|
399
|
+
* * option(optionName): Gets the value of a single property
|
|
400
|
+
* * @param {optionName} - string
|
|
401
|
+
* * Returns value - any
|
|
402
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
403
|
+
* * @param {optionName} - string
|
|
404
|
+
* * @param {optionValue} - any
|
|
405
|
+
* * option(options): Updates the values of several properties
|
|
406
|
+
* * @param {options} - object
|
|
407
407
|
*/
|
|
408
408
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
409
409
|
current: PropTypes.instanceOf(Element)
|
|
@@ -478,19 +478,19 @@ Button.propTypes = {
|
|
|
478
478
|
/** The variant to use. */
|
|
479
479
|
viewType: PropTypes.oneOf(['text', 'outlined', 'filled', 'link']),
|
|
480
480
|
|
|
481
|
-
/**
|
|
482
|
-
* ref methods (ref.current.instance.*method*)
|
|
483
|
-
*
|
|
484
|
-
* * option(): Gets all UI component properties
|
|
485
|
-
* * Returns value - object
|
|
486
|
-
* * option(optionName): Gets the value of a single property
|
|
487
|
-
* * @param {optionName} - string
|
|
488
|
-
* * Returns value - any
|
|
489
|
-
* * option(optionName, optionValue): Updates the value of a single property
|
|
490
|
-
* * @param {optionName} - string
|
|
491
|
-
* * @param {optionValue} - any
|
|
492
|
-
* * option(options): Updates the values of several properties
|
|
493
|
-
* * @param {options} - object
|
|
481
|
+
/**
|
|
482
|
+
* ref methods (ref.current.instance.*method*)
|
|
483
|
+
*
|
|
484
|
+
* * option(): Gets all UI component properties
|
|
485
|
+
* * Returns value - object
|
|
486
|
+
* * option(optionName): Gets the value of a single property
|
|
487
|
+
* * @param {optionName} - string
|
|
488
|
+
* * Returns value - any
|
|
489
|
+
* * option(optionName, optionValue): Updates the value of a single property
|
|
490
|
+
* * @param {optionName} - string
|
|
491
|
+
* * @param {optionValue} - any
|
|
492
|
+
* * option(options): Updates the values of several properties
|
|
493
|
+
* * @param {options} - object
|
|
494
494
|
*/
|
|
495
495
|
reference: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
496
496
|
current: PropTypes.instanceOf(Element)
|
|
@@ -1786,17 +1786,17 @@ Attachment.propTypes = {
|
|
|
1786
1786
|
/** Class for component. */
|
|
1787
1787
|
className: PropTypes.string,
|
|
1788
1788
|
|
|
1789
|
-
/** List attachment:<br />
|
|
1790
|
-
* [{<br />
|
|
1791
|
-
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1792
|
-
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/8a07bee1eeff17a14eee.jpg?path=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlUGF0aCI6Ii8yMDIwLzA4LzQ0YjNhYjQ4LTMwNGQtNDQ3NC05ZDk0LWNkNGVlMDQwOGNlMy5qcGciLCJmaWxlTmFtZSI6IjhhMDdiZWUxZWVmZjE3YTE0ZWVlLmpwZyIsImZpbGVTaXplIjoyNDg4MzcsImZpbGVUeXBlIjoiaW1hZ2UvanBlZyIsImlhdCI6MTU5ODI0NDMwMiwiZXhwIjo4Nzk5ODI0NDMwMn0.fow6O5fp2z3vieA9gom5RRwQ7xxwBx9_7X2Fe8T2YI0",<br />
|
|
1793
|
-
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1794
|
-
* "FileSize": 248837,<br />
|
|
1795
|
-
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1796
|
-
* "CreateUserID": "LEMONADMIN",<br />
|
|
1797
|
-
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1798
|
-
* "UserName": "Quản trị hệ thống"<br />
|
|
1799
|
-
* }, ...]
|
|
1789
|
+
/** List attachment:<br />
|
|
1790
|
+
* [{<br />
|
|
1791
|
+
* "AttachmentID": "ATT2U8O7YPTF1KSNCW3X",<br />
|
|
1792
|
+
* "URL": "https://apricot.diginet.com.vn/cdn-dev/file/8a07bee1eeff17a14eee.jpg?path=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmaWxlUGF0aCI6Ii8yMDIwLzA4LzQ0YjNhYjQ4LTMwNGQtNDQ3NC05ZDk0LWNkNGVlMDQwOGNlMy5qcGciLCJmaWxlTmFtZSI6IjhhMDdiZWUxZWVmZjE3YTE0ZWVlLmpwZyIsImZpbGVTaXplIjoyNDg4MzcsImZpbGVUeXBlIjoiaW1hZ2UvanBlZyIsImlhdCI6MTU5ODI0NDMwMiwiZXhwIjo4Nzk5ODI0NDMwMn0.fow6O5fp2z3vieA9gom5RRwQ7xxwBx9_7X2Fe8T2YI0",<br />
|
|
1793
|
+
* "FileName": "8a07bee1eeff17a14eee.jpg",<br />
|
|
1794
|
+
* "FileSize": 248837,<br />
|
|
1795
|
+
* "KeyID": "W39OAD3YGLCWAQKV1D6PGEKNW4RLGVTZTUWLYEVFQ2QG8AOCXW",<br />
|
|
1796
|
+
* "CreateUserID": "LEMONADMIN",<br />
|
|
1797
|
+
* "CreateDate": "2020-08-24T11:54:04.307Z",<br />
|
|
1798
|
+
* "UserName": "Quản trị hệ thống"<br />
|
|
1799
|
+
* }, ...]
|
|
1800
1800
|
*/
|
|
1801
1801
|
data: PropTypes.array,
|
|
1802
1802
|
|
|
@@ -1839,16 +1839,16 @@ Attachment.propTypes = {
|
|
|
1839
1839
|
/** Download attached event, if not it will use default. */
|
|
1840
1840
|
onDownload: PropTypes.func,
|
|
1841
1841
|
|
|
1842
|
-
/**
|
|
1843
|
-
* event when removed file(s)
|
|
1844
|
-
*
|
|
1845
|
-
* return data: {<br/>
|
|
1846
|
-
* attached: [Files] (insist old and all new files )<br/>
|
|
1847
|
-
* allNewAttached: [Files]<br/>
|
|
1848
|
-
* oldAttached: [Files]<br/>
|
|
1849
|
-
* removedAttached: [Files]<br/>
|
|
1850
|
-
* element: [NodeList (just removed)]<br/>
|
|
1851
|
-
* }
|
|
1842
|
+
/**
|
|
1843
|
+
* event when removed file(s)
|
|
1844
|
+
*
|
|
1845
|
+
* return data: {<br/>
|
|
1846
|
+
* attached: [Files] (insist old and all new files )<br/>
|
|
1847
|
+
* allNewAttached: [Files]<br/>
|
|
1848
|
+
* oldAttached: [Files]<br/>
|
|
1849
|
+
* removedAttached: [Files]<br/>
|
|
1850
|
+
* element: [NodeList (just removed)]<br/>
|
|
1851
|
+
* }
|
|
1852
1852
|
*/
|
|
1853
1853
|
onRemove: PropTypes.func,
|
|
1854
1854
|
|
|
@@ -31,15 +31,15 @@ const {
|
|
|
31
31
|
danger8,
|
|
32
32
|
info8
|
|
33
33
|
} = colors;
|
|
34
|
-
/**
|
|
35
|
-
* START STYLE
|
|
34
|
+
/**
|
|
35
|
+
* START STYLE
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
*
|
|
40
|
-
* @param {Object} unique
|
|
41
|
-
* @param {Boolean} boxShadow
|
|
42
|
-
* @returns
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @param {Object} unique
|
|
41
|
+
* @param {Boolean} boxShadow
|
|
42
|
+
* @returns
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
45
|
const generateCalendarCSS = (unique, boxShadow = true, onClickActive = true) => css`
|
|
@@ -243,15 +243,15 @@ const generateCalendarCSS = (unique, boxShadow = true, onClickActive = true) =>
|
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
`;
|
|
246
|
-
/**
|
|
247
|
-
* END STYLE
|
|
246
|
+
/**
|
|
247
|
+
* END STYLE
|
|
248
248
|
*/
|
|
249
249
|
|
|
250
|
-
/**
|
|
251
|
-
*
|
|
252
|
-
* @description return props of the typography.
|
|
253
|
-
* @param {String} className
|
|
254
|
-
* @returns {Object} props of the typography
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @description return props of the typography.
|
|
253
|
+
* @param {String} className
|
|
254
|
+
* @returns {Object} props of the typography
|
|
255
255
|
*/
|
|
256
256
|
|
|
257
257
|
|
|
@@ -272,11 +272,11 @@ const typographyProps = className => {
|
|
|
272
272
|
type: 'h6'
|
|
273
273
|
};
|
|
274
274
|
};
|
|
275
|
-
/**
|
|
276
|
-
*
|
|
277
|
-
* @description return props of the button icon.
|
|
278
|
-
* @param {String} className
|
|
279
|
-
* @returns {Object} props of the button icon
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
* @description return props of the button icon.
|
|
278
|
+
* @param {String} className
|
|
279
|
+
* @returns {Object} props of the button icon
|
|
280
280
|
*/
|
|
281
281
|
|
|
282
282
|
|
|
@@ -290,11 +290,11 @@ const buttonIconProps = className => {
|
|
|
290
290
|
width: 28
|
|
291
291
|
};
|
|
292
292
|
};
|
|
293
|
-
/**
|
|
294
|
-
*
|
|
295
|
-
* @description return props of the button icon.
|
|
296
|
-
* @param {Function} fn
|
|
297
|
-
* @returns {Object} props of the button text
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
* @description return props of the button icon.
|
|
296
|
+
* @param {Function} fn
|
|
297
|
+
* @returns {Object} props of the button text
|
|
298
298
|
*/
|
|
299
299
|
|
|
300
300
|
|
|
@@ -311,21 +311,21 @@ const buttonTextProps = fn => {
|
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
313
|
};
|
|
314
|
-
/**
|
|
315
|
-
* @description detect value is a Date object
|
|
316
|
-
* @param {String | Number | Array} value
|
|
317
|
-
* @returns boolean
|
|
314
|
+
/**
|
|
315
|
+
* @description detect value is a Date object
|
|
316
|
+
* @param {String | Number | Array} value
|
|
317
|
+
* @returns boolean
|
|
318
318
|
*/
|
|
319
319
|
|
|
320
320
|
|
|
321
321
|
const isValidDate = value => {
|
|
322
322
|
return new Date(value) instanceof Date && !isNaN(new Date(value));
|
|
323
323
|
};
|
|
324
|
-
/**
|
|
325
|
-
*
|
|
326
|
-
* @description set Sunday (0) to the last day of week.
|
|
327
|
-
* @param {Date} date
|
|
328
|
-
* @returns number of day from 0 (Monday) to 6 (Sunday).
|
|
324
|
+
/**
|
|
325
|
+
*
|
|
326
|
+
* @description set Sunday (0) to the last day of week.
|
|
327
|
+
* @param {Date} date
|
|
328
|
+
* @returns number of day from 0 (Monday) to 6 (Sunday).
|
|
329
329
|
*/
|
|
330
330
|
|
|
331
331
|
|
|
@@ -334,26 +334,26 @@ const getDateOfWeek = date => {
|
|
|
334
334
|
if (day === 0) day = 7;
|
|
335
335
|
return day - 1;
|
|
336
336
|
};
|
|
337
|
-
/**
|
|
338
|
-
*
|
|
339
|
-
* @description check day is today.
|
|
340
|
-
* @param {Date} day
|
|
341
|
-
* @param {Date} today
|
|
342
|
-
* @param {String} className
|
|
343
|
-
* @returns {Boolean} is today
|
|
337
|
+
/**
|
|
338
|
+
*
|
|
339
|
+
* @description check day is today.
|
|
340
|
+
* @param {Date} day
|
|
341
|
+
* @param {Date} today
|
|
342
|
+
* @param {String} className
|
|
343
|
+
* @returns {Boolean} is today
|
|
344
344
|
*/
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
const isToday = (day, today, className) => {
|
|
348
348
|
return +moment(day).diff(today) === 0 ? className : '';
|
|
349
349
|
};
|
|
350
|
-
/**
|
|
351
|
-
*
|
|
352
|
-
* @description check day is active day.
|
|
353
|
-
* @param {Date} day
|
|
354
|
-
* @param {Date} active
|
|
355
|
-
* @param {String} className
|
|
356
|
-
* @returns {Boolean} is active day
|
|
350
|
+
/**
|
|
351
|
+
*
|
|
352
|
+
* @description check day is active day.
|
|
353
|
+
* @param {Date} day
|
|
354
|
+
* @param {Date} active
|
|
355
|
+
* @param {String} className
|
|
356
|
+
* @returns {Boolean} is active day
|
|
357
357
|
*/
|
|
358
358
|
|
|
359
359
|
|
|
@@ -370,14 +370,14 @@ const isActive = (day, active, className) => {
|
|
|
370
370
|
|
|
371
371
|
return '';
|
|
372
372
|
};
|
|
373
|
-
/**
|
|
374
|
-
*
|
|
375
|
-
* @description check day is min/max day.
|
|
376
|
-
* @param {Date} day
|
|
377
|
-
* @param {Date} max
|
|
378
|
-
* @param {Date} min
|
|
379
|
-
* @param {Object} className
|
|
380
|
-
* @returns {Boolean} is limited day
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @description check day is min/max day.
|
|
376
|
+
* @param {Date} day
|
|
377
|
+
* @param {Date} max
|
|
378
|
+
* @param {Date} min
|
|
379
|
+
* @param {Object} className
|
|
380
|
+
* @returns {Boolean} is limited day
|
|
381
381
|
*/
|
|
382
382
|
|
|
383
383
|
|
|
@@ -408,17 +408,17 @@ const isBeforeLimit = (min, time) => {
|
|
|
408
408
|
const isAfterLimit = (max, time) => {
|
|
409
409
|
return max && isValidDate(max) && moment(time).diff(new Date(max).setHours(0, 0, 0, 0)) > 0;
|
|
410
410
|
};
|
|
411
|
-
/**
|
|
412
|
-
*
|
|
413
|
-
* @description return the table body of the calendar.
|
|
414
|
-
* @param {Date} time
|
|
415
|
-
* @param {Date} activeValue
|
|
416
|
-
* @param {Object} className
|
|
417
|
-
* @param {Boolean} displayAnotherMonth
|
|
418
|
-
* @param {Function} onTableDataClick
|
|
419
|
-
* @param {Date} min
|
|
420
|
-
* @param {Date} max
|
|
421
|
-
* @returns {Element}
|
|
411
|
+
/**
|
|
412
|
+
*
|
|
413
|
+
* @description return the table body of the calendar.
|
|
414
|
+
* @param {Date} time
|
|
415
|
+
* @param {Date} activeValue
|
|
416
|
+
* @param {Object} className
|
|
417
|
+
* @param {Boolean} displayAnotherMonth
|
|
418
|
+
* @param {Function} onTableDataClick
|
|
419
|
+
* @param {Date} min
|
|
420
|
+
* @param {Date} max
|
|
421
|
+
* @returns {Element}
|
|
422
422
|
*/
|
|
423
423
|
|
|
424
424
|
|
|
@@ -438,8 +438,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
438
438
|
weekDateLast = getDateOfWeek(lastDay);
|
|
439
439
|
|
|
440
440
|
if (activeValue && Array.isArray(activeValue) && activeValue.length === 2 && activeValue[0] !== activeValue[1]) {
|
|
441
|
-
/**
|
|
442
|
-
* days of previous month
|
|
441
|
+
/**
|
|
442
|
+
* days of previous month
|
|
443
443
|
*/
|
|
444
444
|
active = activeValue;
|
|
445
445
|
|
|
@@ -455,8 +455,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
455
455
|
}, jsx(Typography, { ...typographyProps(className.day.day)
|
|
456
456
|
}, '')));
|
|
457
457
|
}
|
|
458
|
-
/**
|
|
459
|
-
* days of this month
|
|
458
|
+
/**
|
|
459
|
+
* days of this month
|
|
460
460
|
*/
|
|
461
461
|
|
|
462
462
|
|
|
@@ -470,8 +470,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
470
470
|
}, jsx(Typography, { ...typographyProps(className.day.day)
|
|
471
471
|
}, i + 1)));
|
|
472
472
|
}
|
|
473
|
-
/**
|
|
474
|
-
* days of next month
|
|
473
|
+
/**
|
|
474
|
+
* days of next month
|
|
475
475
|
*/
|
|
476
476
|
|
|
477
477
|
|
|
@@ -488,8 +488,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
488
488
|
}, '')));
|
|
489
489
|
}
|
|
490
490
|
} else {
|
|
491
|
-
/**
|
|
492
|
-
* days of previous month
|
|
491
|
+
/**
|
|
492
|
+
* days of previous month
|
|
493
493
|
*/
|
|
494
494
|
for (let i = weekDateFirst; i > 0; i--) {
|
|
495
495
|
const day = new Date(time.getFullYear(), time.getMonth() - 1, displayAnotherMonth ? prevDate - i + 1 : 1);
|
|
@@ -501,8 +501,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
501
501
|
}, jsx(Typography, { ...typographyProps(className.day.day)
|
|
502
502
|
}, displayAnotherMonth ? prevDate - i + 1 : '')));
|
|
503
503
|
}
|
|
504
|
-
/**
|
|
505
|
-
* days of this month
|
|
504
|
+
/**
|
|
505
|
+
* days of this month
|
|
506
506
|
*/
|
|
507
507
|
|
|
508
508
|
|
|
@@ -516,8 +516,8 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
516
516
|
}, jsx(Typography, { ...typographyProps(className.day.day)
|
|
517
517
|
}, i + 1)));
|
|
518
518
|
}
|
|
519
|
-
/**
|
|
520
|
-
* days of next month
|
|
519
|
+
/**
|
|
520
|
+
* days of next month
|
|
521
521
|
*/
|
|
522
522
|
|
|
523
523
|
|
|
@@ -547,10 +547,10 @@ const renderTableBody = (time, activeValue, className, displayAnotherMonth, onTa
|
|
|
547
547
|
|
|
548
548
|
return tableBody;
|
|
549
549
|
};
|
|
550
|
-
/**
|
|
551
|
-
*
|
|
552
|
-
* @param {Object} className
|
|
553
|
-
* @returns
|
|
550
|
+
/**
|
|
551
|
+
*
|
|
552
|
+
* @param {Object} className
|
|
553
|
+
* @returns
|
|
554
554
|
*/
|
|
555
555
|
|
|
556
556
|
|
|
@@ -573,15 +573,15 @@ const renderHeader = className => {
|
|
|
573
573
|
}, tableHeader));
|
|
574
574
|
return header;
|
|
575
575
|
};
|
|
576
|
-
/**
|
|
577
|
-
*
|
|
578
|
-
* @param {Object} className
|
|
579
|
-
* @param {Object} refs
|
|
580
|
-
* @param {Function} dbLeftFn
|
|
581
|
-
* @param {Function} leftFn
|
|
582
|
-
* @param {Function} rightFn
|
|
583
|
-
* @param {Function} dbRightFn
|
|
584
|
-
* @returns navigator
|
|
576
|
+
/**
|
|
577
|
+
*
|
|
578
|
+
* @param {Object} className
|
|
579
|
+
* @param {Object} refs
|
|
580
|
+
* @param {Function} dbLeftFn
|
|
581
|
+
* @param {Function} leftFn
|
|
582
|
+
* @param {Function} rightFn
|
|
583
|
+
* @param {Function} dbRightFn
|
|
584
|
+
* @returns navigator
|
|
585
585
|
*/
|
|
586
586
|
|
|
587
587
|
|
|
@@ -615,10 +615,10 @@ const renderNavigator = (className, refs, dbLeftFn, leftFn, rightFn, dbRightFn,
|
|
|
615
615
|
onClick: dbRightFn,
|
|
616
616
|
ref: refs.doubleRight
|
|
617
617
|
})));
|
|
618
|
-
/**
|
|
619
|
-
*
|
|
620
|
-
* @param {Date} time
|
|
621
|
-
* @returns {String} month year
|
|
618
|
+
/**
|
|
619
|
+
*
|
|
620
|
+
* @param {Date} time
|
|
621
|
+
* @returns {String} month year
|
|
622
622
|
*/
|
|
623
623
|
|
|
624
624
|
|
|
@@ -627,12 +627,12 @@ const renderNavigatorContent = time => {
|
|
|
627
627
|
const months = getGlobal(['months', 'full']);
|
|
628
628
|
return [months[value.getMonth()], value.getFullYear()];
|
|
629
629
|
};
|
|
630
|
-
/**
|
|
631
|
-
*
|
|
632
|
-
* @param {Date} time
|
|
633
|
-
* @param {Object} refs
|
|
634
|
-
* @param {Date} min
|
|
635
|
-
* @param {Date} max
|
|
630
|
+
/**
|
|
631
|
+
*
|
|
632
|
+
* @param {Date} time
|
|
633
|
+
* @param {Object} refs
|
|
634
|
+
* @param {Date} min
|
|
635
|
+
* @param {Date} max
|
|
636
636
|
*/
|
|
637
637
|
|
|
638
638
|
|
|
@@ -684,18 +684,18 @@ const onUpdateNavigator = (time, refs, min, max) => {
|
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
};
|
|
687
|
-
/**
|
|
688
|
-
*
|
|
689
|
-
* @param {Date} time
|
|
690
|
-
* @param {Object} navigatorRefs
|
|
691
|
-
* @param {Date} min
|
|
692
|
-
* @param {Date} max
|
|
693
|
-
* @param {Element} table
|
|
694
|
-
* @param {Date} activeValue
|
|
695
|
-
* @param {Object} className
|
|
696
|
-
* @param {Boolean} displayAnotherMonth
|
|
697
|
-
* @param {Function} onTableDataClick
|
|
698
|
-
* @param {Function} onUpdateNavigatorValue
|
|
687
|
+
/**
|
|
688
|
+
*
|
|
689
|
+
* @param {Date} time
|
|
690
|
+
* @param {Object} navigatorRefs
|
|
691
|
+
* @param {Date} min
|
|
692
|
+
* @param {Date} max
|
|
693
|
+
* @param {Element} table
|
|
694
|
+
* @param {Date} activeValue
|
|
695
|
+
* @param {Object} className
|
|
696
|
+
* @param {Boolean} displayAnotherMonth
|
|
697
|
+
* @param {Function} onTableDataClick
|
|
698
|
+
* @param {Function} onUpdateNavigatorValue
|
|
699
699
|
*/
|
|
700
700
|
|
|
701
701
|
|