@commonsku/styles 1.13.2 → 1.13.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.
- package/dist/index.es.js +409 -89
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +417 -89
- package/dist/index.js.map +1 -1
- package/dist/styles/Button.d.ts +3 -2
- package/dist/styles/Button.d.ts.map +1 -1
- package/dist/styles/Dropdown.d.ts +16 -13
- package/dist/styles/Dropdown.d.ts.map +1 -1
- package/dist/styles/MultiProgress.d.ts +2 -0
- package/dist/styles/MultiProgress.d.ts.map +1 -1
- package/dist/styles/Task.d.ts.map +1 -1
- package/dist/styles/Text.d.ts +1 -1
- package/dist/styles/Theme.d.ts +474 -0
- package/dist/styles/Theme.d.ts.map +1 -1
- package/dist/styles/calendar/DraggableTasksCalendar.d.ts.map +1 -1
- package/dist/styles/calendar/DroppableFooter.d.ts.map +1 -1
- package/dist/styles/calendar/StyledDayText.d.ts +1 -1
- package/dist/styles/calendar/TasksCalendar.d.ts.map +1 -1
- package/dist/styles/calendar/TasksCalendarHeader.d.ts +2 -1
- package/dist/styles/calendar/TasksCalendarHeader.d.ts.map +1 -1
- package/dist/styles/colors.d.ts +363 -0
- package/dist/styles/colors.d.ts.map +1 -0
- package/dist/styles/hooks/useCalendar.d.ts +1 -0
- package/dist/styles/hooks/useCalendar.d.ts.map +1 -1
- package/dist/styles/icons/BulletIcon.d.ts +8 -0
- package/dist/styles/icons/BulletIcon.d.ts.map +1 -0
- package/dist/styles/icons/CheckmarkIcon.d.ts +8 -0
- package/dist/styles/icons/CheckmarkIcon.d.ts.map +1 -0
- package/dist/styles/icons/ErrorIcon.d.ts +8 -0
- package/dist/styles/icons/ErrorIcon.d.ts.map +1 -0
- package/dist/styles/icons/LeftArrowIcon.d.ts +8 -0
- package/dist/styles/icons/LeftArrowIcon.d.ts.map +1 -0
- package/dist/styles/icons/RightArrowIcon.d.ts +8 -0
- package/dist/styles/icons/RightArrowIcon.d.ts.map +1 -0
- package/dist/styles/icons/SalesDownArrowIcon.d.ts +8 -0
- package/dist/styles/icons/SalesDownArrowIcon.d.ts.map +1 -0
- package/dist/styles/icons/SalesUpArrowIcon.d.ts +8 -0
- package/dist/styles/icons/SalesUpArrowIcon.d.ts.map +1 -0
- package/dist/styles/icons/index.d.ts +7 -0
- package/dist/styles/icons/index.d.ts.map +1 -1
- package/dist/styles/tables/SimpleWindowedTable.d.ts +22 -3
- package/dist/styles/tables/SimpleWindowedTable.d.ts.map +1 -1
- package/dist/styles/tables/types.d.ts +6 -1
- package/dist/styles/tables/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -401,34 +401,235 @@ var templateObject_1$3, templateObject_2$3, templateObject_3;
|
|
|
401
401
|
var GlobalStyle = createGlobalStyle(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n body {\n font-family: ", ";\n }\n"], ["\n body {\n font-family: ", ";\n }\n"])), function (props) { return _.get(props, ['theme', 'fontFamily'], '"museo-sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif'); });
|
|
402
402
|
var templateObject_1$4;
|
|
403
403
|
|
|
404
|
-
var
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
404
|
+
var primary1 = {
|
|
405
|
+
'10': '#F6FEFF',
|
|
406
|
+
'20': '#E1F7FA',
|
|
407
|
+
'30': '#A6F4FF',
|
|
408
|
+
'40': '#5FE6FA',
|
|
409
|
+
'50': '#28D5EE',
|
|
410
|
+
'60': '#02C0DA',
|
|
411
|
+
'65': '#00B1C8',
|
|
412
|
+
'70': '#00A0B6',
|
|
413
|
+
'75': '#008EA0',
|
|
414
|
+
'80': '#00788A',
|
|
415
|
+
'85': '#006672',
|
|
416
|
+
'90': '#004D59',
|
|
417
|
+
'main': '',
|
|
418
|
+
'main-hover': '',
|
|
419
|
+
'light': '',
|
|
420
|
+
'lightest': '',
|
|
421
|
+
'dark': '',
|
|
422
|
+
'dark-hover': '',
|
|
423
|
+
'darkest': '',
|
|
424
|
+
};
|
|
425
|
+
primary1['main'] = primary1['70'];
|
|
426
|
+
primary1['main-hover'] = primary1['75'];
|
|
427
|
+
primary1['lightest'] = primary1['10'];
|
|
428
|
+
primary1['light'] = primary1['30'];
|
|
429
|
+
primary1['dark'] = primary1['80'];
|
|
430
|
+
primary1['dark-hover'] = primary1['85'];
|
|
431
|
+
primary1['darkest'] = primary1['90'];
|
|
432
|
+
var primary2 = {
|
|
433
|
+
main: '#FFFFFF',
|
|
434
|
+
border: {
|
|
435
|
+
main: '#0C5A88',
|
|
436
|
+
},
|
|
437
|
+
};
|
|
438
|
+
var secondary1 = {
|
|
439
|
+
'10': '#FFEDF4',
|
|
440
|
+
'20': '#FDC5DB',
|
|
441
|
+
'30': '#FC9DC2',
|
|
442
|
+
'40': '#F55393',
|
|
443
|
+
'50': '#EB1D6E',
|
|
444
|
+
'60': '#DB0057',
|
|
445
|
+
'70': '#C4004E',
|
|
446
|
+
'80': '#A70043',
|
|
447
|
+
'90': '#870036',
|
|
448
|
+
'main': '',
|
|
449
|
+
'lightest': '',
|
|
450
|
+
'light': '',
|
|
451
|
+
'dark': '',
|
|
452
|
+
'darkest': '',
|
|
453
|
+
};
|
|
454
|
+
secondary1['main'] = secondary1['60'];
|
|
455
|
+
primary1['lightest'] = primary1['10'];
|
|
456
|
+
primary1['light'] = primary1['30'];
|
|
457
|
+
primary1['dark'] = primary1['80'];
|
|
458
|
+
primary1['darkest'] = primary1['90'];
|
|
459
|
+
var secondary2 = {
|
|
460
|
+
'10': '#FFFDF5',
|
|
461
|
+
'20': '#FFF9C5',
|
|
462
|
+
'30': '#FFF597',
|
|
463
|
+
'40': '#FFE544',
|
|
464
|
+
'50': '#FFD302',
|
|
465
|
+
'60': '#E6BA00',
|
|
466
|
+
'70': '#C69B00',
|
|
467
|
+
'80': '#9E7800',
|
|
468
|
+
'90': '#735400',
|
|
469
|
+
'main': '',
|
|
470
|
+
'lightest': '',
|
|
471
|
+
'light': '',
|
|
472
|
+
'dark': '',
|
|
473
|
+
'darkest': '',
|
|
474
|
+
};
|
|
475
|
+
secondary2['main'] = secondary2['50'];
|
|
476
|
+
primary1['lightest'] = primary1['10'];
|
|
477
|
+
primary1['light'] = primary1['30'];
|
|
478
|
+
primary1['dark'] = primary1['70'];
|
|
479
|
+
primary1['darkest'] = primary1['90'];
|
|
480
|
+
var secondary3 = {
|
|
481
|
+
'10': '#F2FFF9',
|
|
482
|
+
'20': '#C9FDE5',
|
|
483
|
+
'30': '#A1FBD2',
|
|
484
|
+
'40': '#59F3AE',
|
|
485
|
+
'50': '#23E68E',
|
|
486
|
+
'60': '#00D374',
|
|
487
|
+
'70': '#00B966',
|
|
488
|
+
'80': '#009853',
|
|
489
|
+
'90': '#00733F',
|
|
490
|
+
'main': '',
|
|
491
|
+
'lightest': '',
|
|
492
|
+
'light': '',
|
|
493
|
+
'dark': '',
|
|
494
|
+
'darkest': '',
|
|
495
|
+
};
|
|
496
|
+
secondary3['main'] = secondary3['60'];
|
|
497
|
+
primary1['lightest'] = primary1['10'];
|
|
498
|
+
primary1['light'] = primary1['30'];
|
|
499
|
+
primary1['dark'] = primary1['80'];
|
|
500
|
+
primary1['darkest'] = primary1['90'];
|
|
501
|
+
var secondary4 = {
|
|
502
|
+
'10': '#EDF4F7',
|
|
503
|
+
'20': '#C6E8F7',
|
|
504
|
+
'30': '#A1DAF4',
|
|
505
|
+
'40': '#5BBDEC',
|
|
506
|
+
'50': '#249AD4',
|
|
507
|
+
'60': '#0F6EA6',
|
|
508
|
+
'70': '#0C5A88',
|
|
509
|
+
'80': '#05476E',
|
|
510
|
+
'90': '#003C5E',
|
|
511
|
+
'main': '',
|
|
512
|
+
'lightest': '',
|
|
513
|
+
'light': '',
|
|
514
|
+
'dark': '',
|
|
515
|
+
'darkest': '',
|
|
431
516
|
};
|
|
517
|
+
secondary4['main'] = secondary4['70'];
|
|
518
|
+
primary1['lightest'] = primary1['10'];
|
|
519
|
+
primary1['light'] = primary1['30'];
|
|
520
|
+
primary1['dark'] = primary1['80'];
|
|
521
|
+
primary1['darkest'] = primary1['90'];
|
|
522
|
+
var neutrals = {
|
|
523
|
+
'10': '#FFFFFF',
|
|
524
|
+
'20': '#EDF4F7',
|
|
525
|
+
'30': '#E6EFF2',
|
|
526
|
+
'40': '#DAE9EE',
|
|
527
|
+
'50': '#D0D7DC',
|
|
528
|
+
'60': '#B8C4CB',
|
|
529
|
+
'70': '#899CA9',
|
|
530
|
+
'80': '#597486',
|
|
531
|
+
'90': '#2A4D63',
|
|
532
|
+
'100': '#123952',
|
|
533
|
+
'main': '',
|
|
534
|
+
'darkest': '',
|
|
535
|
+
'bodyText': '',
|
|
536
|
+
'bg1': '',
|
|
537
|
+
'white': '',
|
|
538
|
+
};
|
|
539
|
+
neutrals['main'] = neutrals['100'];
|
|
540
|
+
neutrals['white'] = neutrals['10'];
|
|
541
|
+
neutrals['bg1'] = neutrals['20'];
|
|
542
|
+
neutrals['bodyText'] = neutrals['90'];
|
|
543
|
+
neutrals['darkest'] = neutrals['100'];
|
|
544
|
+
var errors = {
|
|
545
|
+
'10': '#FFF2F3',
|
|
546
|
+
'20': '#FDCACD',
|
|
547
|
+
'30': '#FBA3A9',
|
|
548
|
+
'40': '#F35C66',
|
|
549
|
+
'50': '#E52633',
|
|
550
|
+
'60': '#D10411',
|
|
551
|
+
'70': '#B4000C',
|
|
552
|
+
'80': '#8F000A',
|
|
553
|
+
'90': '#660007',
|
|
554
|
+
'main': '',
|
|
555
|
+
'lightest': '',
|
|
556
|
+
'light': '',
|
|
557
|
+
'dark': '',
|
|
558
|
+
'darkest': '',
|
|
559
|
+
};
|
|
560
|
+
errors['main'] = errors['60'];
|
|
561
|
+
errors['lightest'] = errors['10'];
|
|
562
|
+
errors['light'] = errors['30'];
|
|
563
|
+
errors['dark'] = errors['80'];
|
|
564
|
+
errors['darkest'] = errors['90'];
|
|
565
|
+
var colors = {
|
|
566
|
+
primary1: primary1,
|
|
567
|
+
secondary1: secondary1,
|
|
568
|
+
secondary2: secondary2,
|
|
569
|
+
secondary3: secondary3,
|
|
570
|
+
secondary4: secondary4,
|
|
571
|
+
pink: secondary1,
|
|
572
|
+
yellow: secondary2,
|
|
573
|
+
green: secondary3,
|
|
574
|
+
navy: secondary4,
|
|
575
|
+
neutrals: neutrals,
|
|
576
|
+
errors: errors,
|
|
577
|
+
orders: {
|
|
578
|
+
'OPPORTUNITY': {
|
|
579
|
+
main: primary1['80'],
|
|
580
|
+
},
|
|
581
|
+
'PRESENTATION': {
|
|
582
|
+
main: primary1['70'],
|
|
583
|
+
},
|
|
584
|
+
'ESTIMATE': {
|
|
585
|
+
main: primary1['50'],
|
|
586
|
+
},
|
|
587
|
+
'PRE-SALES': {
|
|
588
|
+
main: primary1['60'],
|
|
589
|
+
},
|
|
590
|
+
'SALES ORDER': {
|
|
591
|
+
main: secondary2['50'],
|
|
592
|
+
},
|
|
593
|
+
'INVOICE': {
|
|
594
|
+
main: secondary3['60'],
|
|
595
|
+
},
|
|
596
|
+
'TARGET': {
|
|
597
|
+
main: secondary1['50'],
|
|
598
|
+
},
|
|
599
|
+
},
|
|
600
|
+
notes: {
|
|
601
|
+
main: secondary1['50'],
|
|
602
|
+
},
|
|
603
|
+
calls: {
|
|
604
|
+
main: secondary4['40'],
|
|
605
|
+
},
|
|
606
|
+
meetings: {
|
|
607
|
+
main: secondary4['80'],
|
|
608
|
+
},
|
|
609
|
+
left_nav: {
|
|
610
|
+
main: primary1['70'],
|
|
611
|
+
sub_menu: {
|
|
612
|
+
bg: primary1['80'],
|
|
613
|
+
link: {
|
|
614
|
+
bg: primary1['90'],
|
|
615
|
+
text: primary2.main,
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
link: {
|
|
619
|
+
text: primary2.main,
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
text: {
|
|
623
|
+
main: neutrals['90'],
|
|
624
|
+
bold: neutrals['100'],
|
|
625
|
+
body: neutrals['90'],
|
|
626
|
+
title: neutrals['100'],
|
|
627
|
+
label: neutrals['100'],
|
|
628
|
+
placeholder: '#A4ABAE',
|
|
629
|
+
},
|
|
630
|
+
};
|
|
631
|
+
|
|
632
|
+
var colors$1 = __assign({ white: '#fff', black: '#000', primary: '#02c0da', cta: '#fa237c', primary0: '#DAE9EE', primary10: '#C9E8F2', primary100: '#00889B', disabledButton: '#DAE9EE', disabledButtonBorder: '#C9E8F2', texttitle: '#123952', textlabel: '#123952', textbody: '#52585C', textplaceholder: '#A4ABAE', bggray: '#EDF2F4', bgblue: '#ECF4F7', inputBorder: '#ABC7D1', special1: '#ffd302', special2: '#00d374', special3: '#ff297c', primaryBg: '#EAF2F6', special2Bg: '#E7FFE9', transparent: 'transparent', error: '#B21154', primary2: '#00A0B6', primary20: '#00788A', primary200: '#004D59', tableHeaderBg: '#F6FEFF', tableBorder: '#edf2f5' }, colors);
|
|
432
633
|
var fonts = ["'skufont-demibold'", 'sans-serif', 'Roboto'];
|
|
433
634
|
var fontSizes = {
|
|
434
635
|
tiny: '.8em',
|
|
@@ -437,7 +638,7 @@ var fontSizes = {
|
|
|
437
638
|
large: '3em'
|
|
438
639
|
};
|
|
439
640
|
var themeOptions = {
|
|
440
|
-
colors: colors,
|
|
641
|
+
colors: colors$1,
|
|
441
642
|
fonts: fonts,
|
|
442
643
|
fontFamily: "" + fonts.join(","),
|
|
443
644
|
fontSizes: fontSizes,
|
|
@@ -457,7 +658,7 @@ var themeOptions = {
|
|
|
457
658
|
};
|
|
458
659
|
function getColor(color, def) {
|
|
459
660
|
// @ts-ignore
|
|
460
|
-
return color && colors[color] ? colors[color] : colors[def];
|
|
661
|
+
return color && colors$1[color] ? colors$1[color] : colors$1[def];
|
|
461
662
|
}
|
|
462
663
|
function getFontSize(value, def) {
|
|
463
664
|
// @ts-ignore
|
|
@@ -719,7 +920,7 @@ function Page(props) {
|
|
|
719
920
|
}
|
|
720
921
|
var templateObject_1$d;
|
|
721
922
|
|
|
722
|
-
var Text = styled.span(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"], ["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"])), fonts.join(', '), function (props) { var _a; return colors[(_a = props.color) !== null && _a !== void 0 ? _a : 'textbody']; }, function (props) { return props.bg ? get(colors, props.color + "Bg", 'transparent') : 'transparent'; }, function (props) { return props.bg ? '5px' : '0px'; }, function (props) { return props.bg ? '5px' : '0px'; }, SharedStyles);
|
|
923
|
+
var Text = styled.span(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"], ["\n font-family: ", ";\n\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n padding: ", ";\n ", "\n"])), fonts.join(', '), function (props) { var _a; return colors$1[(_a = props.color) !== null && _a !== void 0 ? _a : 'textbody']; }, function (props) { return props.bg ? get(colors$1, props.color + "Bg", 'transparent') : 'transparent'; }, function (props) { return props.bg ? '5px' : '0px'; }, function (props) { return props.bg ? '5px' : '0px'; }, SharedStyles);
|
|
723
924
|
var _Link = function (_a) {
|
|
724
925
|
var highlight = _a.highlight, props = __rest(_a, ["highlight"]);
|
|
725
926
|
return React__default.createElement(Text, __assign({ color: highlight ? 'special2' : 'primary' }, props));
|
|
@@ -783,7 +984,7 @@ function skuSelectStyles(props) {
|
|
|
783
984
|
}
|
|
784
985
|
};
|
|
785
986
|
}
|
|
786
|
-
var skuSelectTheme = function (theme) { return (__assign(__assign({}, theme), { borderRadius: 5, colors: __assign(__assign({}, theme.colors), { primary25: colors.primary0, primary75: colors.primary0, primary50: colors.primary10, primary: colors.primary, neutral20: colors.inputBorder, neutral30: colors.inputBorder, neutral80: colors.textbody, neutral90: colors.textbody }) })); };
|
|
987
|
+
var skuSelectTheme = function (theme) { return (__assign(__assign({}, theme), { borderRadius: 5, colors: __assign(__assign({}, theme.colors), { primary25: colors$1.primary0, primary75: colors$1.primary0, primary50: colors$1.primary10, primary: colors$1.primary, neutral20: colors$1.inputBorder, neutral30: colors$1.inputBorder, neutral80: colors$1.textbody, neutral90: colors$1.textbody }) })); };
|
|
787
988
|
// duplicate styles to overide .resku global styles
|
|
788
989
|
var SKUSelect = styled(React__default.forwardRef(function (_a, ref) {
|
|
789
990
|
var noMargin = _a.noMargin, menuRelative = _a.menuRelative, inPopup = _a.inPopup, error = _a.error, props = __rest(_a, ["noMargin", "menuRelative", "inPopup", "error"]);
|
|
@@ -1221,13 +1422,13 @@ function WarningIcon(_a) {
|
|
|
1221
1422
|
}
|
|
1222
1423
|
|
|
1223
1424
|
var CircleProgressIcon = function (_a) {
|
|
1224
|
-
var _b = _a.sqSize, sqSize = _b === void 0 ? 50 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 5 : _c, _d = _a.percentage, percentage = _d === void 0 ? 0 : _d, _e = _a.strokeColor, strokeColor = _e === void 0 ? colors.primary : _e, _f = _a.textColor, textColor = _f === void 0 ? colors.primary : _f, _g = _a.text, text = _g === void 0 ? '' : _g, _h = _a.textStyle, textStyle = _h === void 0 ? {} : _h, props = __rest(_a, ["sqSize", "strokeWidth", "percentage", "strokeColor", "textColor", "text", "textStyle"]);
|
|
1425
|
+
var _b = _a.sqSize, sqSize = _b === void 0 ? 50 : _b, _c = _a.strokeWidth, strokeWidth = _c === void 0 ? 5 : _c, _d = _a.percentage, percentage = _d === void 0 ? 0 : _d, _e = _a.strokeColor, strokeColor = _e === void 0 ? colors$1.primary : _e, _f = _a.textColor, textColor = _f === void 0 ? colors$1.primary : _f, _g = _a.text, text = _g === void 0 ? '' : _g, _h = _a.textStyle, textStyle = _h === void 0 ? {} : _h, props = __rest(_a, ["sqSize", "strokeWidth", "percentage", "strokeColor", "textColor", "text", "textStyle"]);
|
|
1225
1426
|
var radius = (sqSize - strokeWidth) / 2;
|
|
1226
1427
|
var viewBox = "0 0 " + sqSize + " " + sqSize;
|
|
1227
1428
|
var dashArray = radius * Math.PI * 2;
|
|
1228
1429
|
var dashOffset = dashArray - dashArray * percentage / 100;
|
|
1229
1430
|
return (React__default.createElement("svg", __assign({ width: sqSize, height: sqSize, viewBox: viewBox }, props),
|
|
1230
|
-
React__default.createElement("circle", { className: "circle-background", cx: sqSize / 2, cy: sqSize / 2, r: radius, strokeWidth: strokeWidth + "px", style: { fill: 'none', stroke: colors.disabledButtonBorder, } }),
|
|
1431
|
+
React__default.createElement("circle", { className: "circle-background", cx: sqSize / 2, cy: sqSize / 2, r: radius, strokeWidth: strokeWidth + "px", style: { fill: 'none', stroke: colors$1.disabledButtonBorder, } }),
|
|
1231
1432
|
React__default.createElement("circle", { className: "circle-progress", cx: sqSize / 2, cy: sqSize / 2, r: radius, strokeWidth: strokeWidth + "px", transform: "rotate(-90 " + sqSize / 2 + " " + sqSize / 2 + ")", style: {
|
|
1232
1433
|
strokeDasharray: dashArray,
|
|
1233
1434
|
strokeDashoffset: dashOffset,
|
|
@@ -1245,8 +1446,8 @@ var templateObject_1$j;
|
|
|
1245
1446
|
function Loading(_a) {
|
|
1246
1447
|
var _b = _a.height, height = _b === void 0 ? 50 : _b, width = _a.width, _c = _a.animationDuration, animationDuration = _c === void 0 ? 1000 : _c, _d = _a.barWidth, barWidth = _d === void 0 ? 14 : _d, _e = _a.barRadius, barRadius = _e === void 0 ? 2 : _e, _f = _a.colorful, colorful = _f === void 0 ? false : _f, _g = _a.bars, bars = _g === void 0 ? 4 : _g, _h = _a.viewBox, viewBox = _h === void 0 ? "10 0 51 50" : _h, _j = _a.rotate, startColor = _a.startColor, endColor = _a.endColor, props = __rest(_a, ["height", "width", "animationDuration", "barWidth", "barRadius", "colorful", "bars", "viewBox", "rotate", "startColor", "endColor"]);
|
|
1247
1448
|
var colorGradient = colorful
|
|
1248
|
-
? generateColor(startColor || colors.special1, endColor || colors.primary, bars)
|
|
1249
|
-
: generateColor(startColor || colors.primary, endColor || colors.primary0, bars);
|
|
1449
|
+
? generateColor(startColor || colors$1.special1, endColor || colors$1.primary, bars)
|
|
1450
|
+
: generateColor(startColor || colors$1.primary, endColor || colors$1.primary0, bars);
|
|
1250
1451
|
var generateBar = function (v) {
|
|
1251
1452
|
return (React__default.createElement("rect", { key: "bar_" + v, x: 19 * v, y: "0", width: barWidth || 14, height: height, fill: "#" + colorGradient[v], rx: barRadius },
|
|
1252
1453
|
React__default.createElement("animate", { attributeName: "height", values: "50;10;50", begin: v * 0.2 + "s", dur: animationDuration / 1000 + "s", repeatCount: "indefinite" })));
|
|
@@ -1261,6 +1462,49 @@ function Loading(_a) {
|
|
|
1261
1462
|
return (React__default.createElement(SVG, __assign({ width: width ? width + "px" : "100%", height: height ? height + "px" : "100%", viewBox: viewBox, transform: "scale(1, -1) translate(0, -1)" }, props), generateBars()));
|
|
1262
1463
|
}
|
|
1263
1464
|
|
|
1465
|
+
function Icon(_a) {
|
|
1466
|
+
var _b = _a.width, width = _b === void 0 ? 19 : _b, _c = _a.height, height = _c === void 0 ? 16 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.secondary3['60'] : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
|
|
1467
|
+
return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1468
|
+
React__default.createElement("path", { d: "m9.5.5 8.66 15H.84L9.5.5Z", fill: fill })));
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
function Icon$1(_a) {
|
|
1472
|
+
var _b = _a.width, width = _b === void 0 ? 19 : _b, _c = _a.height, height = _c === void 0 ? 16 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.errors.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
|
|
1473
|
+
return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1474
|
+
React__default.createElement("path", { d: "M9 15.5.34.5h17.32L9 15.5Z", fill: fill })));
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
function Icon$2(_a) {
|
|
1478
|
+
var _b = _a.fill, fill = _b === void 0 ? "#E52633" : _b, _c = _a.style, style = _c === void 0 ? {} : _c, props = __rest(_a, ["fill", "style"]);
|
|
1479
|
+
return (React__default.createElement("svg", __assign({ width: 25, height: 24, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1480
|
+
React__default.createElement("rect", { x: 0.979, y: 0.791, width: 23.042, height: 22.419, rx: 3, fill: fill }),
|
|
1481
|
+
React__default.createElement("path", { d: "M11.137 13.03h2.72l.56-7.44h-3.84l.56 7.44Zm-.4 2.32c0 .88.72 1.6 1.76 1.6s1.76-.72 1.76-1.6c0-.88-.72-1.6-1.76-1.6s-1.76.72-1.76 1.6Z", fill: "#fff" })));
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
function Icon$3(_a) {
|
|
1485
|
+
var _b = _a.width, width = _b === void 0 ? 35 : _b, _c = _a.height, height = _c === void 0 ? 34 : _c, _d = _a.fill, fill = _d === void 0 ? '#01D374' : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
|
|
1486
|
+
return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1487
|
+
React__default.createElement("path", { d: "M17.5.333C8.3.333.833 7.8.833 17c0 9.2 7.467 16.667 16.667 16.667 9.2 0 16.667-7.467 16.667-16.667C34.167 7.8 26.7.333 17.5.333Zm0 30C10.15 30.333 4.167 24.35 4.167 17c0-7.35 5.983-13.333 13.333-13.333 7.35 0 13.333 5.983 13.333 13.333 0 7.35-5.983 13.333-13.333 13.333Zm7.65-20.7L14.167 20.617l-4.317-4.3-2.35 2.35 6.667 6.666L27.5 12l-2.35-2.367Z", fill: fill })));
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
function Icon$4(_a) {
|
|
1491
|
+
var _b = _a.width, width = _b === void 0 ? 24 : _b, _c = _a.height, height = _c === void 0 ? 24 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.primary1.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
|
|
1492
|
+
return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1493
|
+
React__default.createElement("path", { d: "m17.835 3.87-1.78-1.77-9.89 9.9 9.9 9.9 1.77-1.77L9.705 12l8.13-8.13Z", fill: fill })));
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
function Icon$5(_a) {
|
|
1497
|
+
var _b = _a.width, width = _b === void 0 ? 24 : _b, _c = _a.height, height = _c === void 0 ? 24 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.primary1.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
|
|
1498
|
+
return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1499
|
+
React__default.createElement("path", { d: "M6.115 20.23 7.885 22l10-10-10-10-1.77 1.77 8.23 8.23-8.23 8.23Z", fill: fill })));
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
function Icon$6(_a) {
|
|
1503
|
+
var _b = _a.width, width = _b === void 0 ? 13 : _b, _c = _a.height, height = _c === void 0 ? 14 : _c, _d = _a.fill, fill = _d === void 0 ? themeOptions.colors.primary1.main : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["width", "height", "fill", "style"]);
|
|
1504
|
+
return (React__default.createElement("svg", __assign({ width: width, height: height, fill: "none", xmlns: "http://www.w3.org/2000/svg", style: style }, props),
|
|
1505
|
+
React__default.createElement("circle", { cx: 6.5, cy: 7, r: 6.5, fill: fill })));
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1264
1508
|
var sharedStyle = css(templateObject_1$k || (templateObject_1$k = __makeTemplateObject(["\n line-height: 1.125rem;\n box-sizing: border-box;\n"], ["\n line-height: 1.125rem;\n box-sizing: border-box;\n"])));
|
|
1265
1509
|
var optionalPadding = css(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n &:first-child {\n padding-left: ", ";\n }\n\n &:last-child {\n padding-right: ", ";\n }\n"], ["\n &:first-child {\n padding-left: ", ";\n }\n\n &:last-child {\n padding-right: ", ";\n }\n"])), function (props) { return props.padded ? "20px" : "inherit"; }, function (props) { return props.padded ? "20px" : "inherit"; });
|
|
1266
1510
|
var Table = styled.table.attrs(function () { return ({ cellPadding: 0, cellSpacing: 0 }); })(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n &&& {\n background-color: white;\n border: none;\n border-spacing: 0;\n width: 100%;\n table-layout: auto;\n display: table;\n font-family: 'skufont-regular', sans-serif;\n ", "\n ", "\n ", "\n }\n"], ["\n &&& {\n background-color: white;\n border: none;\n border-spacing: 0;\n width: 100%;\n table-layout: auto;\n display: table;\n font-family: 'skufont-regular', sans-serif;\n ", "\n ", "\n ", "\n }\n"])), sharedStyle, SizerCss, SharedStyles);
|
|
@@ -1289,10 +1533,10 @@ var THSorted = function (_a) {
|
|
|
1289
1533
|
var templateObject_1$k, templateObject_2$b, templateObject_3$5, templateObject_4$4, templateObject_5$4, templateObject_6$4, templateObject_7$2, templateObject_8, templateObject_9;
|
|
1290
1534
|
|
|
1291
1535
|
var tabSizes = {
|
|
1292
|
-
small: css(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n
|
|
1293
|
-
medium: css(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n font-size: inherit;\n padding: 1rem 12px;\n
|
|
1536
|
+
small: css(templateObject_1$l || (templateObject_1$l = __makeTemplateObject(["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n margin: 0;\n "], ["\n font-size: 0.9rem;\n padding: 0.5rem 5px;\n margin: 0;\n "]))),
|
|
1537
|
+
medium: css(templateObject_2$c || (templateObject_2$c = __makeTemplateObject(["\n font-size: inherit;\n padding: 1rem 12px;\n margin: 0 15px 0 0;\n "], ["\n font-size: inherit;\n padding: 1rem 12px;\n margin: 0 15px 0 0;\n "]))),
|
|
1294
1538
|
};
|
|
1295
|
-
var TabBar = styled.ul(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n &&& {\n display: block;\n font-size:
|
|
1539
|
+
var TabBar = styled.ul(templateObject_3$6 || (templateObject_3$6 = __makeTemplateObject(["\n &&& {\n display: block;\n font-size: 16px;\n font-family: 'skufont-demibold', sans-serif;\n margin: 0;\n margin-bottom: ", ";\n padding: 0;\n ", "\n }\n"], ["\n &&& {\n display: block;\n font-size: 16px;\n font-family: 'skufont-demibold', sans-serif;\n margin: 0;\n margin-bottom: ", ";\n padding: 0;\n ", "\n }\n"])), function (props) { return props.padded ? "20px" : 0; }, SharedStyles);
|
|
1296
1540
|
var Tab = styled.li(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n &&& {\n cursor: pointer;\n display: inline-block;\n border-bottom: ", ";\n color: #222222;\n opacity: ", ";\n list-style: none;\n margin-bottom: 0 !important;\n position: relative;\n padding: 1rem 12px;\n margin-right: 15px;\n ", "\n\n ", "\n }\n"], ["\n &&& {\n cursor: pointer;\n display: inline-block;\n border-bottom: ", ";\n color: #222222;\n opacity: ", ";\n list-style: none;\n margin-bottom: 0 !important;\n position: relative;\n padding: 1rem 12px;\n margin-right: 15px;\n ", "\n\n ", "\n }\n"
|
|
1297
1541
|
/*
|
|
1298
1542
|
|
|
@@ -4757,13 +5001,13 @@ var Task = function (_a) {
|
|
|
4757
5001
|
var StyledCalendarTaskBody = styled.span(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n font-size: 13px;\n font-family: 'skufont-regular',sans-serif,Roboto;\n"], ["\n font-size: 13px;\n font-family: 'skufont-regular',sans-serif,Roboto;\n"])));
|
|
4758
5002
|
var StyledCalendarTaskWrapper = styled(StyledTask)(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\nborder-radius: 5px;\n", "\npadding: 5px;\nmargin: 0;\nheight: 100%;\nmargin-bottom: 7px;\n"], ["\nborder-radius: 5px;\n", "\npadding: 5px;\nmargin: 0;\nheight: 100%;\nmargin-bottom: 7px;\n"])), function (p) { return p.backgroundColor ? "background-color: " + p.backgroundColor + ";" : ''; });
|
|
4759
5003
|
var CalendarTask = React__default.forwardRef(function (_a, ref) {
|
|
4760
|
-
var title = _a.title, description = _a.description, date = _a.date, _b = _a.completed, completed = _b === void 0 ? false : _b, assignee = _a.assignee, onClickCheckbox = _a.onClickCheckbox, _c = _a.colorType, colorType = _c === void 0 ? 'light-green' : _c, _d = _a.isDescriptionHtml, isDescriptionHtml = _d === void 0 ? false : _d, props = __rest(_a, ["title", "description", "date", "completed", "assignee", "onClickCheckbox", "colorType", "isDescriptionHtml"]);
|
|
4761
|
-
var
|
|
5004
|
+
var title = _a.title, description = _a.description, date = _a.date, _b = _a.completed, completed = _b === void 0 ? false : _b, assignee = _a.assignee, onClickCheckbox = _a.onClickCheckbox, _c = _a.colorType, colorType = _c === void 0 ? 'light-green' : _c, _d = _a.isDescriptionHtml, isDescriptionHtml = _d === void 0 ? false : _d, _e = _a.hideCheckbox, hideCheckbox = _e === void 0 ? false : _e, props = __rest(_a, ["title", "description", "date", "completed", "assignee", "onClickCheckbox", "colorType", "isDescriptionHtml", "hideCheckbox"]);
|
|
5005
|
+
var _f = useState(completed), checked = _f[0], setChecked = _f[1];
|
|
4762
5006
|
useEffect(function () {
|
|
4763
5007
|
setChecked(completed);
|
|
4764
5008
|
}, [completed, title, date]);
|
|
4765
5009
|
return (React__default.createElement(StyledCalendarTaskWrapper, __assign({ backgroundColor: colorType === 'light-red' ? '#ffebf2' : '#01d37417' }, props),
|
|
4766
|
-
React__default.createElement(LabeledCheckbox, { ref: ref, stopPropagation: true, checked: checked, checkboxPosition: "top-right", checkboxStyle: {
|
|
5010
|
+
!hideCheckbox ? React__default.createElement(LabeledCheckbox, { ref: ref, stopPropagation: true, checked: checked, checkboxPosition: "top-right", checkboxStyle: {
|
|
4767
5011
|
borderColor: checked
|
|
4768
5012
|
? undefined : (colorType === 'light-red' ? 'rgba(209, 69, 121, 0.24)' : '#BEF1DA'),
|
|
4769
5013
|
}, hoverByLabel: false, labelStyle: { width: '100%', paddingLeft: 0, paddingRight: 0, marginRight: 0, marginLeft: 0, margin: 0, }, label: React__default.createElement(TaskLabel, { onClick: function (e) { e.preventDefault(); }, style: { fontWeight: 'bold' } },
|
|
@@ -4778,7 +5022,10 @@ var CalendarTask = React__default.forwardRef(function (_a, ref) {
|
|
|
4778
5022
|
onClickCheckbox && onClickCheckbox(!s);
|
|
4779
5023
|
return !s;
|
|
4780
5024
|
});
|
|
4781
|
-
} }),
|
|
5025
|
+
} }) : React__default.createElement(React__default.Fragment, null,
|
|
5026
|
+
React__default.createElement(TaskLabel, { onClick: function (e) { e.preventDefault(); }, style: { fontWeight: 'bold' } },
|
|
5027
|
+
React__default.createElement(TaskName, null, title),
|
|
5028
|
+
date ? React__default.createElement("div", null, _.isDate(date) ? format(date, 'yyyy-mm-dd') : date) : null)),
|
|
4782
5029
|
React__default.createElement(StyledCalendarTaskBody, __assign({}, (isDescriptionHtml && typeof description === 'string'
|
|
4783
5030
|
? { dangerouslySetInnerHTML: { __html: description } }
|
|
4784
5031
|
: { children: description }))),
|
|
@@ -4872,9 +5119,9 @@ var DropDownContent = styled.div(templateObject_3$e || (templateObject_3$e = __m
|
|
|
4872
5119
|
"\n font-weight: bold;\n :last-child {\n border-bottom: none;\n }\n\n &:hover {\n background-color: ", ";\n color: ", ";\n border-radius: 5px;\n cursor: pointer;\n }\n }\n*/\n"])), function (p) { return getColor(p.primary ? 'white' : 'white'); }, function (p) { return getColor(p.primary ? 'primary' : 'cta'); }, function (p) { return p.underlined &&
|
|
4873
5120
|
"border-bottom: 1px solid " + getColor(p.primary ? 'primary' : 'white') + ";"; }, function (p) { return getColor(p.primary ? 'primary0' : 'cta'); }, function (p) { return getColor(p.primary ? 'texttitle' : 'white'); });
|
|
4874
5121
|
var Dropdown = function (_a) {
|
|
4875
|
-
var items = _a.items,
|
|
5122
|
+
var items = _a.items, _b = _a.children, children = _b === void 0 ? undefined : _b, underlined = _a.underlined, primary = _a.primary, text = _a.text, icon = _a.icon, _c = _a.openMenu, openMenu = _c === void 0 ? false : _c, mouseLeaveCallback = _a.mouseLeaveCallback, size = _a.size, props = __rest(_a, ["items", "children", "underlined", "primary", "text", "icon", "openMenu", "mouseLeaveCallback", "size"]);
|
|
4876
5123
|
var node = useRef();
|
|
4877
|
-
var
|
|
5124
|
+
var _d = useState(openMenu), showMenu = _d[0], setShowMenu = _d[1];
|
|
4878
5125
|
var iconProps = {
|
|
4879
5126
|
width: '10px',
|
|
4880
5127
|
fill: getColor(primary ? 'primary100' : 'white'),
|
|
@@ -4908,7 +5155,7 @@ var Dropdown = function (_a) {
|
|
|
4908
5155
|
icon ?
|
|
4909
5156
|
React__default.createElement("span", { onClick: function () { return setShowMenu(!showMenu); } }, icon)
|
|
4910
5157
|
:
|
|
4911
|
-
React__default.createElement(Button, { cta: Boolean(!primary), onClick: function () { return setShowMenu(!showMenu); } },
|
|
5158
|
+
React__default.createElement(Button, { size: size, cta: Boolean(!primary), onClick: function () { return setShowMenu(!showMenu); } },
|
|
4912
5159
|
text ? text : "Actions",
|
|
4913
5160
|
" ",
|
|
4914
5161
|
React__default.createElement(UpArrowIcon, __assign({}, iconProps))),
|
|
@@ -4923,7 +5170,7 @@ var Dropdown = function (_a) {
|
|
|
4923
5170
|
};
|
|
4924
5171
|
var templateObject_1$w, templateObject_2$l, templateObject_3$e;
|
|
4925
5172
|
|
|
4926
|
-
var Badge = styled.span(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"], ["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"])), function (p) { return p.color === 'cta' ? colors.cta : p.color === 'grey' ? colors.primary0 : colors.primary; }, function (p) { return p.color === 'grey' ? colors.primary100 : colors.white; }, SharedStyles);
|
|
5173
|
+
var Badge = styled.span(templateObject_1$x || (templateObject_1$x = __makeTemplateObject(["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"], ["\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: ", ";\n color: ", ";\n border-radius: 10px;\n ", "\n"])), function (p) { return p.color === 'cta' ? colors$1.cta : p.color === 'grey' ? colors$1.primary0 : colors$1.primary; }, function (p) { return p.color === 'grey' ? colors$1.primary100 : colors$1.white; }, SharedStyles);
|
|
4927
5174
|
var templateObject_1$x;
|
|
4928
5175
|
|
|
4929
5176
|
var verticalScrollbarWidth = function verticalScrollbarWidth() {
|
|
@@ -5370,6 +5617,9 @@ var useCalendar = function (_a) {
|
|
|
5370
5617
|
else if (action === "next") {
|
|
5371
5618
|
dt = addMonths(currentMonth, 1);
|
|
5372
5619
|
}
|
|
5620
|
+
else if (action === "reset") {
|
|
5621
|
+
dt = today;
|
|
5622
|
+
}
|
|
5373
5623
|
setCurrentMonth(dt);
|
|
5374
5624
|
onChangeMonth && onChangeMonth({
|
|
5375
5625
|
action: action,
|
|
@@ -5386,6 +5636,9 @@ var useCalendar = function (_a) {
|
|
|
5386
5636
|
else if (action === "next") {
|
|
5387
5637
|
dt = addWeeks(currentMonth, 1);
|
|
5388
5638
|
}
|
|
5639
|
+
else if (action === "reset") {
|
|
5640
|
+
dt = today;
|
|
5641
|
+
}
|
|
5389
5642
|
setCurrentMonth(dt);
|
|
5390
5643
|
var week = getWeek(dt);
|
|
5391
5644
|
setCurrentWeek(week);
|
|
@@ -5405,6 +5658,11 @@ var useCalendar = function (_a) {
|
|
|
5405
5658
|
setSelectedDate(day);
|
|
5406
5659
|
}
|
|
5407
5660
|
};
|
|
5661
|
+
// reset to today's date
|
|
5662
|
+
var resetToToday = function () {
|
|
5663
|
+
setSelectedDate(today);
|
|
5664
|
+
changeWeek('reset');
|
|
5665
|
+
};
|
|
5408
5666
|
var onNextWeek = function () { return changeWeek("next"); };
|
|
5409
5667
|
var onPrevWeek = function () { return changeWeek("prev"); };
|
|
5410
5668
|
var onNextMonth = function () { return changeMonth("next"); };
|
|
@@ -5422,6 +5680,7 @@ var useCalendar = function (_a) {
|
|
|
5422
5680
|
onNextMonth: onNextMonth,
|
|
5423
5681
|
onPrevMonth: onPrevMonth,
|
|
5424
5682
|
getDatesBetween: getDatesBetween,
|
|
5683
|
+
onReset: resetToToday,
|
|
5425
5684
|
};
|
|
5426
5685
|
};
|
|
5427
5686
|
|
|
@@ -6303,8 +6562,8 @@ Transition.ENTERED = 3;
|
|
|
6303
6562
|
Transition.EXITING = 4;
|
|
6304
6563
|
|
|
6305
6564
|
var CollapseStyled = styled.div(templateObject_1$C || (templateObject_1$C = __makeTemplateObject(["\n&&& {\n .collapsed:not(.show) {\n display: none;\n }\n\n .collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n transition: height ", "s ease;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .collapsing {\n transition: none;\n }\n }\n}\n"], ["\n&&& {\n .collapsed:not(.show) {\n display: none;\n }\n\n .collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n transition: height ", "s ease;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .collapsing {\n transition: none;\n }\n }\n}\n"])), function (p) { return p.duration ? p.duration / 1000 : '0.35'; });
|
|
6306
|
-
var CollapseWrapper = styled.div(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"], ["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"])), colors.primary0);
|
|
6307
|
-
var CollapsiblePanelTitle = styled.div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"], ["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"])), colors.primary0, colors.primary);
|
|
6565
|
+
var CollapseWrapper = styled.div(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"], ["\n&&& {\n border: 1px solid ", ";\n border-radius: 5px;\n}\n"])), colors$1.primary0);
|
|
6566
|
+
var CollapsiblePanelTitle = styled.div(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"], ["\n&&& {\n background: #f3f6f7;\n border-bottom: 1px solid ", ";\n color: ", ";\n padding: 20px;\n cursor: pointer;\n}\n"])), colors$1.primary0, colors$1.primary);
|
|
6308
6567
|
var transitionStatusToClass = {
|
|
6309
6568
|
entering: 'collapsing',
|
|
6310
6569
|
entered: 'collapsed show',
|
|
@@ -6400,14 +6659,15 @@ function CollapsiblePanels(_a) {
|
|
|
6400
6659
|
var templateObject_1$C, templateObject_2$q, templateObject_3$j;
|
|
6401
6660
|
|
|
6402
6661
|
var ProgressWrapper$1 = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n max-width: 100%;\n width: 100%;\n height: 48px;\n background: linear-gradient(180deg, rgba(1, 211, 116, 0.051) 0%, rgba(1, 211, 116, 0.1) 100%);\n box-shadow: 0px 4px 5px rgba(72, 78, 86, 0.1);\n border-radius: 50px;\n \n ", "\n"], ["\n max-width: 100%;\n width: 100%;\n height: 48px;\n background: linear-gradient(180deg, rgba(1, 211, 116, 0.051) 0%, rgba(1, 211, 116, 0.1) 100%);\n box-shadow: 0px 4px 5px rgba(72, 78, 86, 0.1);\n border-radius: 50px;\n \n ", "\n"])), SharedStyles);
|
|
6403
|
-
var ProgressBar$1 = styled.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n max-width: 100%;\n width: ", "
|
|
6404
|
-
";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"])), function (
|
|
6662
|
+
var ProgressBar$1 = styled.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n max-width: 100%;\n width: ", ";\n height: 48px;\n background: ", ";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"], ["\n max-width: 100%;\n width: ", ";\n height: 48px;\n background: ",
|
|
6663
|
+
";\n border-radius: 50px;\n display: inline-block;\n position: absolute;\n"])), function (p) { return "calc(" + 100 * (!p.max ? 1 : (p.value / p.max)) + "% - (" + (p.left || 0) + "px + 17px))"; }, function (props) { return props.error ? "#B21154" : (props.color || "#00d374"); });
|
|
6405
6664
|
var StyledProgressTitle = styled(Text)(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n display: inline-block;\n position: absolute;\n z-index: 9;\n vertical-align: middle;\n padding: 12px;\n color: #FFFFFF;\n font-size: 18px;\n text-shadow: 0px 1px 2px #40B07E;\n"], ["\n display: inline-block;\n position: absolute;\n z-index: 9;\n vertical-align: middle;\n padding: 12px;\n color: #FFFFFF;\n font-size: 18px;\n text-shadow: 0px 1px 2px #40B07E;\n"])));
|
|
6406
6665
|
var LabeledBar = function (props) {
|
|
6407
6666
|
var width = useWindowSize()[0];
|
|
6408
|
-
var _a = useState({
|
|
6667
|
+
var _a = useState({ height: 0, width: 0, x: 0, y: 0, }), size = _a[0], setSize = _a[1];
|
|
6409
6668
|
var measureRef = useCallback(function (node) {
|
|
6410
|
-
|
|
6669
|
+
var rect = node === null || node === void 0 ? void 0 : node.getBoundingClientRect();
|
|
6670
|
+
setSize(function (s) { return (rect ? __assign(__assign({}, s), { height: rect.height, x: rect.x, y: rect.y, width: (rect.width > width ? width : rect.width) - rect.x }) : __assign(__assign({}, s), { height: 0, width: 0, x: 0, y: 0 })); });
|
|
6411
6671
|
}, [width, props.text, props.value]);
|
|
6412
6672
|
var text = (props.text || '') + '';
|
|
6413
6673
|
return (React__default.createElement(React__default.Fragment, null,
|
|
@@ -6418,9 +6678,8 @@ var LabeledBar = function (props) {
|
|
|
6418
6678
|
zIndex: 9,
|
|
6419
6679
|
marginTop: -25,
|
|
6420
6680
|
color: '#00d374',
|
|
6421
|
-
width: size.width - 10,
|
|
6422
6681
|
} }, text),
|
|
6423
|
-
React__default.createElement(ProgressBar$1, __assign({ ref: measureRef }, props))));
|
|
6682
|
+
React__default.createElement(ProgressBar$1, __assign({ ref: measureRef }, props, { left: size.x }))));
|
|
6424
6683
|
};
|
|
6425
6684
|
var MultiProgress = function (_a) {
|
|
6426
6685
|
var labeled = _a.labeled, error = _a.error, title = _a.title, values = _a.values, maxVal = _a.max, props = __rest(_a, ["labeled", "error", "title", "values", "max"]);
|
|
@@ -6430,22 +6689,21 @@ var MultiProgress = function (_a) {
|
|
|
6430
6689
|
return React__default.createElement(ProgressWrapper$1, __assign({}, props),
|
|
6431
6690
|
title ? React__default.createElement(StyledProgressTitle, null, title) : null,
|
|
6432
6691
|
values.map(function (v, i) {
|
|
6433
|
-
var color = i % 2 === 0 ? 'rgba(1, 211, 116, 0.2)' : '#00d374';
|
|
6692
|
+
var color = v.color || (i % 2 === 0 ? 'rgba(1, 211, 116, 0.2)' : '#00d374');
|
|
6434
6693
|
var val = typeof v.value === 'number' ? v.value : !isNaN(v.value) ? parseInt(v.value) : 0;
|
|
6435
|
-
return (labeled ? React__default.createElement(LabeledBar, { value: val < max ? val : max, max: max, error: error, color: color, text: v.text ? v.text(val) : val, key: "multiprogress-bar-" + val + "-" + i }) : React__default.createElement(ProgressBar$1, { value: val < max ? val : max, max: max, error: error, color: color, key: "multiprogress-bar-" + val + "-" + i }));
|
|
6694
|
+
return (labeled ? React__default.createElement(LabeledBar, { value: val < max ? val : max, max: max, error: error, color: color, text: v.text ? v.text(val) : val, key: "multiprogress-bar-" + val + "-" + i, textColor: v.textColor }) : React__default.createElement(ProgressBar$1, { value: val < max ? val : max, max: max, error: error, color: color, key: "multiprogress-bar-" + val + "-" + i }));
|
|
6436
6695
|
}),
|
|
6437
6696
|
error ? React__default.createElement(Text, { color: "error", bold: true }, error) : null);
|
|
6438
6697
|
};
|
|
6439
6698
|
var LabeledMultiProgress = function (props) {
|
|
6440
6699
|
return React__default.createElement("div", null,
|
|
6700
|
+
React__default.createElement(MultiProgress, __assign({}, props, { labeled: true })),
|
|
6441
6701
|
React__default.createElement("span", { style: {
|
|
6442
6702
|
float: 'right',
|
|
6443
6703
|
paddingRight: 8,
|
|
6444
6704
|
} },
|
|
6445
6705
|
"Target $",
|
|
6446
|
-
React__default.createElement(Number$1, { commas: true, decimalPoints: 0, num: props.max }))
|
|
6447
|
-
React__default.createElement("br", null),
|
|
6448
|
-
React__default.createElement(MultiProgress, { values: props.values, max: props.max, error: props.error, title: props.title, labeled: true }));
|
|
6706
|
+
React__default.createElement(Number$1, { commas: true, decimalPoints: 0, num: props.max })));
|
|
6449
6707
|
};
|
|
6450
6708
|
var templateObject_1$D, templateObject_2$r, templateObject_3$k;
|
|
6451
6709
|
|
|
@@ -6485,7 +6743,7 @@ var DaysHeaderWrapper = styled(Row)(templateObject_1$G || (templateObject_1$G =
|
|
|
6485
6743
|
var templateObject_1$G;
|
|
6486
6744
|
|
|
6487
6745
|
var StyledDayText = styled(Text)(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n ", "\n"], ["\n ",
|
|
6488
|
-
"\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: " + colors.cta + ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n " : ''; });
|
|
6746
|
+
"\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: " + colors$1.cta + ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n " : ''; });
|
|
6489
6747
|
var templateObject_1$H;
|
|
6490
6748
|
|
|
6491
6749
|
var CalendarDaysHeader = function (_a) {
|
|
@@ -6523,11 +6781,11 @@ var DefaultCalendarHeader = function (_a) {
|
|
|
6523
6781
|
React__default.createElement(Row, null,
|
|
6524
6782
|
React__default.createElement(LabeledCheckbox, { label: "Weekends", checked: true })))),
|
|
6525
6783
|
React__default.createElement(Col, { padded: true },
|
|
6526
|
-
React__default.createElement("div", { style: { cursor: 'pointer', color: colors.primary, }, onClick: onPrevWeek }, "< Prev Week")),
|
|
6784
|
+
React__default.createElement("div", { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onPrevWeek }, "< Prev Week")),
|
|
6527
6785
|
React__default.createElement(Col, { center: true, padded: true },
|
|
6528
|
-
React__default.createElement("span", { style: { color: colors.disabledButton } }, format(currentMonth, "MMM yyyy"))),
|
|
6786
|
+
React__default.createElement("span", { style: { color: colors$1.disabledButton } }, format(currentMonth, "MMM yyyy"))),
|
|
6529
6787
|
React__default.createElement(Col, { end: true, padded: true },
|
|
6530
|
-
React__default.createElement("div", { style: { cursor: 'pointer', color: colors.primary, }, onClick: onNextWeek }, "Next Week >"))));
|
|
6788
|
+
React__default.createElement("div", { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onNextWeek }, "Next Week >"))));
|
|
6531
6789
|
};
|
|
6532
6790
|
|
|
6533
6791
|
var TasksCalendarDayBody = function (_a) {
|
|
@@ -6540,18 +6798,29 @@ var TasksCalendarDayBody = function (_a) {
|
|
|
6540
6798
|
|
|
6541
6799
|
var WeekNav = styled(Text)(templateObject_1$K || (templateObject_1$K = __makeTemplateObject(["\n display: inline-block;\n padding: .9rem .5rem;\n"], ["\n display: inline-block;\n padding: .9rem .5rem;\n"])));
|
|
6542
6800
|
var TasksCalendarHeader = function (_a) {
|
|
6543
|
-
var onPrevWeek = _a.onPrevWeek, onNextWeek = _a.onNextWeek, currentMonth = _a.currentMonth, _b = _a.tabs, tabs = _b === void 0 ? [] : _b, weekendsCheckbox = _a.weekendsCheckbox, _c = _a.showAddTaskBtn, showAddTaskBtn = _c === void 0 ? true : _c, onClickAddTask = _a.onClickAddTask;
|
|
6801
|
+
var onPrevWeek = _a.onPrevWeek, onNextWeek = _a.onNextWeek, currentMonth = _a.currentMonth, currentWeek = _a.currentWeek, onResetDate = _a.onResetDate, selectedDate = _a.selectedDate, _b = _a.tabs, tabs = _b === void 0 ? [] : _b, weekendsCheckbox = _a.weekendsCheckbox, _c = _a.showAddTaskBtn, showAddTaskBtn = _c === void 0 ? true : _c, onClickAddTask = _a.onClickAddTask;
|
|
6802
|
+
var isCurrentWeek = currentWeek === getWeek(selectedDate);
|
|
6544
6803
|
return (React__default.createElement(HeaderWrapper, { style: { padding: "0.5rem" } },
|
|
6545
6804
|
React__default.createElement(Col, { start: true, xs: true, md: 7, padded: true },
|
|
6546
|
-
React__default.createElement(Tabs, { size: "
|
|
6805
|
+
React__default.createElement(Tabs, { size: "medium", tabs: tabs })),
|
|
6547
6806
|
React__default.createElement(Col, { end: true, xs: true, md: 5, style: { fontSize: '0.8em' } },
|
|
6548
6807
|
showAddTaskBtn ? React__default.createElement(Button, { onClick: onClickAddTask, style: { marginRight: 10, verticalAlign: 'bottom', } }, "+ Add Task") : null,
|
|
6549
6808
|
React__default.createElement(Dropdown, { icon: React__default.createElement(GearIcon, { width: "25", color: "#02C0DA" }) },
|
|
6550
6809
|
React__default.createElement(Row, null, weekendsCheckbox)),
|
|
6551
|
-
React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors.primary, }, onClick: onPrevWeek },
|
|
6810
|
+
React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onPrevWeek },
|
|
6552
6811
|
React__default.createElement(NextPrevIcon, { color: "#02C0DA", width: ".8rem" })),
|
|
6553
|
-
React__default.createElement(WeekNav, { style: { color: colors.disabledButton, verticalAlign: "middle" } },
|
|
6554
|
-
|
|
6812
|
+
React__default.createElement(WeekNav, { style: { color: colors$1.disabledButton, verticalAlign: "middle" } },
|
|
6813
|
+
currentMonth ? format(currentMonth, "MMM yyyy") : '',
|
|
6814
|
+
!isCurrentWeek ? React__default.createElement("span", { style: {
|
|
6815
|
+
display: 'block',
|
|
6816
|
+
textAlign: 'center',
|
|
6817
|
+
borderRadius: 5,
|
|
6818
|
+
background: '#02c0da',
|
|
6819
|
+
color: '#fff',
|
|
6820
|
+
padding: 4,
|
|
6821
|
+
cursor: 'pointer',
|
|
6822
|
+
}, onClick: function () { return onResetDate(); } }, "Today") : null),
|
|
6823
|
+
React__default.createElement(WeekNav, { style: { cursor: 'pointer', color: colors$1.primary, }, onClick: onNextWeek },
|
|
6555
6824
|
React__default.createElement(NextPrevIcon, { color: "#02C0DA", width: ".8rem", next: true })))));
|
|
6556
6825
|
};
|
|
6557
6826
|
var templateObject_1$K;
|
|
@@ -6618,7 +6887,7 @@ function convertTasksToDays(_a) {
|
|
|
6618
6887
|
}
|
|
6619
6888
|
var TasksCalendar = function (_a) {
|
|
6620
6889
|
var tasks = _a.tasks, _b = _a.headerTabs, headerTabs = _b === void 0 ? [] : _b, _c = _a.footerTasks, footerTasks = _c === void 0 ? [] : _c, _d = _a.components, props = __rest(_a, ["tasks", "headerTabs", "footerTasks", "components"]);
|
|
6621
|
-
var _e = useCalendar({}), currentMonth = _e.currentMonth, currentWeek = _e.currentWeek, selectedDate = _e.selectedDate, onNextWeek = _e.onNextWeek, onPrevWeek = _e.onPrevWeek, onNextMonth = _e.onNextMonth, onPrevMonth = _e.onPrevMonth, onClickDay = _e.onClickDay;
|
|
6890
|
+
var _e = useCalendar({}), currentMonth = _e.currentMonth, currentWeek = _e.currentWeek, selectedDate = _e.selectedDate, onNextWeek = _e.onNextWeek, onPrevWeek = _e.onPrevWeek, onNextMonth = _e.onNextMonth, onPrevMonth = _e.onPrevMonth, onClickDay = _e.onClickDay, onReset = _e.onReset;
|
|
6622
6891
|
var _f = useState(convertTasksToDays({ currentMonth: currentMonth, currentWeek: currentWeek, tasks: tasks, })), days = _f[0], setDays = _f[1];
|
|
6623
6892
|
var headerProps = {
|
|
6624
6893
|
onNextWeek: onNextWeek,
|
|
@@ -6630,7 +6899,7 @@ var TasksCalendar = function (_a) {
|
|
|
6630
6899
|
selectedDate: selectedDate,
|
|
6631
6900
|
};
|
|
6632
6901
|
return (React__default.createElement(CalendarWrapper, null,
|
|
6633
|
-
React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { tabs: headerTabs, weekendsCheckbox: React__default.createElement("div", null) })),
|
|
6902
|
+
React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { onResetDate: onReset, tabs: headerTabs, weekendsCheckbox: React__default.createElement("div", null) })),
|
|
6634
6903
|
React__default.createElement(CalendarDaysHeader, { currentMonth: currentMonth, selectedDate: selectedDate, weekendsCheckbox: React__default.createElement("div", null), weekend: true }),
|
|
6635
6904
|
React__default.createElement(CalendarDaysBody, { currentMonth: currentMonth, selectedDate: selectedDate, onClickDay: onClickDay, dayBodyProps: { tasks: tasks }, components: { DayBody: TasksCalendarDayBody, }, days: days }),
|
|
6636
6905
|
React__default.createElement(TasksCalendarFooter, __assign({}, headerProps, { tasks: footerTasks }))));
|
|
@@ -6675,7 +6944,9 @@ var DraggableCalendarFooterTasks = function (_a) {
|
|
|
6675
6944
|
|
|
6676
6945
|
var DroppableFooter = function (_a) {
|
|
6677
6946
|
var tasks = _a.tasks, props = __rest(_a, ["tasks"]);
|
|
6678
|
-
return (React__default.createElement(Droppable, { droppableId: 'footer-droppable', key: 'footer-droppable', isDropDisabled: true }, function (provided, snapshot) { return (React__default.createElement("div", __assign({}, droppableChildWrapperProps(provided, snapshot, {
|
|
6947
|
+
return (React__default.createElement(Droppable, { droppableId: 'footer-droppable', key: 'footer-droppable', isDropDisabled: true }, function (provided, snapshot) { return (React__default.createElement("div", __assign({}, droppableChildWrapperProps(provided, snapshot, {
|
|
6948
|
+
style: { minHeight: 0, maxHeight: 300, overflow: 'auto' }
|
|
6949
|
+
})),
|
|
6679
6950
|
provided.placeholder,
|
|
6680
6951
|
React__default.createElement(DraggableCalendarFooterTasks, __assign({}, props, { tasks: tasks })))); }));
|
|
6681
6952
|
};
|
|
@@ -6717,13 +6988,16 @@ var DroppableDays = function (_a) {
|
|
|
6717
6988
|
|
|
6718
6989
|
var DraggableTasksCalendar = function (_a) {
|
|
6719
6990
|
var _b = _a.tasks, tasks = _b === void 0 ? [] : _b, onUpdateTask = _a.onUpdateTask, onClickTask = _a.onClickTask, _c = _a.headerTabs, headerTabs = _c === void 0 ? [] : _c, _d = _a.footerTasks, footerTasks = _d === void 0 ? [] : _d, _e = _a.components, _f = _a.weekend, weekend = _f === void 0 ? false : _f, onChangeWeek = _a.onChangeWeek, onChangeMonth = _a.onChangeMonth, onToggleWeekend = _a.onToggleWeekend, _g = _a.showAddTaskBtn, showAddTaskBtn = _g === void 0 ? true : _g, onClickAddTask = _a.onClickAddTask, _h = _a.loading, loading = _h === void 0 ? false : _h, props = __rest(_a, ["tasks", "onUpdateTask", "onClickTask", "headerTabs", "footerTasks", "components", "weekend", "onChangeWeek", "onChangeMonth", "onToggleWeekend", "showAddTaskBtn", "onClickAddTask", "loading"]);
|
|
6720
|
-
var _j = useCalendar({ onChangeWeek: onChangeWeek, onChangeMonth: onChangeMonth }), currentMonth = _j.currentMonth, currentWeek = _j.currentWeek, selectedDate = _j.selectedDate, onNextWeek = _j.onNextWeek, onPrevWeek = _j.onPrevWeek, onNextMonth = _j.onNextMonth, onPrevMonth = _j.onPrevMonth, onClickDay = _j.onClickDay;
|
|
6991
|
+
var _j = useCalendar({ onChangeWeek: onChangeWeek, onChangeMonth: onChangeMonth }), currentMonth = _j.currentMonth, currentWeek = _j.currentWeek, selectedDate = _j.selectedDate, onNextWeek = _j.onNextWeek, onPrevWeek = _j.onPrevWeek, onNextMonth = _j.onNextMonth, onPrevMonth = _j.onPrevMonth, onClickDay = _j.onClickDay, onReset = _j.onReset;
|
|
6721
6992
|
var _k = useState({
|
|
6722
6993
|
days: convertTasksToDays({ currentMonth: currentMonth, currentWeek: currentWeek, tasks: tasks, }).reduce(function (acc, v) {
|
|
6723
6994
|
var _a;
|
|
6724
6995
|
return (__assign(__assign({}, acc), (_a = {}, _a[v.__id__] = v, _a)));
|
|
6725
6996
|
}, {}),
|
|
6726
|
-
footerTasks: footerTasks.filter(function (t) { return t.date
|
|
6997
|
+
footerTasks: footerTasks.filter(function (t) { return t.date
|
|
6998
|
+
? (getWeek(t.date) < currentWeek && getYear(t.date) === getYear(currentMonth))
|
|
6999
|
+
|| getYear(t.date) < getYear(currentMonth)
|
|
7000
|
+
: false; }),
|
|
6727
7001
|
}), state = _k[0], setState = _k[1];
|
|
6728
7002
|
var _l = useState(weekend), showWeekend = _l[0], setShowWeekend = _l[1];
|
|
6729
7003
|
useEffect(function () {
|
|
@@ -6737,8 +7011,11 @@ var DraggableTasksCalendar = function (_a) {
|
|
|
6737
7011
|
}, {}) })); });
|
|
6738
7012
|
}, [currentMonth, currentWeek, tasks]);
|
|
6739
7013
|
useEffect(function () {
|
|
6740
|
-
setState(function (s) { return (__assign(__assign({}, s), { footerTasks: footerTasks.filter(function (t) { return t.date
|
|
6741
|
-
|
|
7014
|
+
setState(function (s) { return (__assign(__assign({}, s), { footerTasks: footerTasks.filter(function (t) { return t.date
|
|
7015
|
+
? (getWeek(t.date) < currentWeek && getYear(t.date) === getYear(currentMonth))
|
|
7016
|
+
|| getYear(t.date) < getYear(currentMonth)
|
|
7017
|
+
: false; }) })); });
|
|
7018
|
+
}, [footerTasks, currentWeek, currentMonth]);
|
|
6742
7019
|
var headerProps = {
|
|
6743
7020
|
onNextWeek: onNextWeek,
|
|
6744
7021
|
onPrevWeek: onPrevWeek,
|
|
@@ -6826,7 +7103,7 @@ var DraggableTasksCalendar = function (_a) {
|
|
|
6826
7103
|
}); } });
|
|
6827
7104
|
return (React__default.createElement(DragDropContext, { onDragEnd: function (result) { return onDragEnd(result); } },
|
|
6828
7105
|
React__default.createElement(CalendarWrapper, null,
|
|
6829
|
-
React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { tabs: headerTabs, weekendsCheckbox: weekendsCheckbox })),
|
|
7106
|
+
React__default.createElement(TasksCalendarHeader, __assign({}, headerProps, { onResetDate: onReset, tabs: headerTabs, weekendsCheckbox: weekendsCheckbox })),
|
|
6830
7107
|
React__default.createElement("div", { className: "calendar-scroll" },
|
|
6831
7108
|
React__default.createElement(CalendarDaysHeader, { currentMonth: currentMonth, selectedDate: selectedDate, weekendsCheckbox: weekendsCheckbox, weekend: showWeekend }),
|
|
6832
7109
|
loading ? React__default.createElement("div", { style: { height: 400, paddingTop: 30, } },
|
|
@@ -6874,25 +7151,43 @@ var scrollbarWidth = function () {
|
|
|
6874
7151
|
return scrollbarWidth;
|
|
6875
7152
|
};
|
|
6876
7153
|
|
|
6877
|
-
var SimpleWindowedTableStyles = styled.div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\npadding: 1rem;\n\n.
|
|
6878
|
-
"\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n
|
|
7154
|
+
var SimpleWindowedTableStyles = styled.div(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"], ["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ",
|
|
7155
|
+
"\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ",
|
|
7156
|
+
"\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ",
|
|
7157
|
+
"\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ",
|
|
7158
|
+
"\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"])), function (p) { return p.rowClickable ? "\n .tr {\n cursor: pointer;\n }\n " : ''; }, function (p) { return p.bordered ?
|
|
7159
|
+
"border: " + (typeof p.bordered === 'string'
|
|
7160
|
+
? p.bordered
|
|
7161
|
+
: "1px solid " + getThemeColor(p, 'tableBorder', '#edf2f5')) + ";"
|
|
7162
|
+
: ''; }, colors$1.disabledButtonBorder, colors$1.disabledButtonBorder, function (p) { return p.hoverRowBg ?
|
|
7163
|
+
".tr:not(.header.tr, .table-footer.tr):hover {\n background: " + (typeof p.hoverRowBg === 'string'
|
|
7164
|
+
? p.hoverRowBg
|
|
7165
|
+
: getThemeColor(p, 'tableHeaderBg', '#F6FEFF')) + ";\n }" : ''; }, function (p) { return p.selectedRowIndex && p.selectedRowStyle ?
|
|
7166
|
+
".tr:nth-child(" + p.selectedRowIndex + ") {\n " + (typeof p.selectedRowStyle === 'boolean'
|
|
7167
|
+
? "background: " + getThemeColor(p, 'tableHeaderBg', '#F6FEFF') + ";"
|
|
7168
|
+
: css(p.selectedRowStyle)) + "\n }" : ''; });
|
|
6879
7169
|
function SimpleWindowedTable(_a) {
|
|
6880
|
-
var columns = _a.columns, data = _a.data, _b = _a.itemSize, itemSize = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 500 : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 140 : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 500 : _e, defaultSort = _a.defaultSort, onClickRow = _a.onClickRow, onScroll = _a.onScroll, onUpdateData = _a.onUpdateData, _f = _a.useTableProps, useTableProps = _f === void 0 ? {} : _f;
|
|
7170
|
+
var columns = _a.columns, data = _a.data, _b = _a.itemSize, itemSize = _b === void 0 ? 80 : _b, _c = _a.height, height = _c === void 0 ? 500 : _c, _d = _a.minWidth, minWidth = _d === void 0 ? 140 : _d, _e = _a.maxWidth, maxWidth = _e === void 0 ? 500 : _e, defaultSort = _a.defaultSort, onClickRow = _a.onClickRow, onScroll = _a.onScroll, onUpdateData = _a.onUpdateData, _f = _a.useTableProps, useTableProps = _f === void 0 ? {} : _f, _g = _a.tableHeaderProps, tableHeaderProps = _g === void 0 ? {} : _g, _h = _a.tableFooterProps, tableFooterProps = _h === void 0 ? {} : _h, _j = _a.hideFooter, hideFooter = _j === void 0 ? true : _j, _k = _a.className, className = _k === void 0 ? '' : _k, NoRowsFound = _a.NoRowsFound;
|
|
6881
7171
|
var defaultColumn = React__default.useMemo(function () { return ({
|
|
6882
7172
|
minWidth: minWidth,
|
|
6883
7173
|
maxWidth: maxWidth,
|
|
6884
7174
|
}); }, [minWidth, maxWidth]);
|
|
6885
7175
|
var scrollBarSize = React__default.useMemo(function () { return scrollbarWidth(); }, []);
|
|
6886
|
-
var
|
|
7176
|
+
var _l = useTable(__assign({ columns: columns,
|
|
6887
7177
|
data: data,
|
|
6888
|
-
defaultColumn: defaultColumn, initialState: __assign({}, (defaultSort ? { sortBy: [defaultSort] } : {})), onUpdateData: onUpdateData }, useTableProps), useSortBy, useFlexLayout), getTableProps =
|
|
7178
|
+
defaultColumn: defaultColumn, initialState: __assign({}, (defaultSort ? { sortBy: [defaultSort] } : {})), onUpdateData: onUpdateData }, useTableProps), useSortBy, useFlexLayout), getTableProps = _l.getTableProps, getTableBodyProps = _l.getTableBodyProps, headerGroups = _l.headerGroups, footerGroups = _l.footerGroups, rows = _l.rows, totalColumnsWidth = _l.totalColumnsWidth, prepareRow = _l.prepareRow;
|
|
6889
7179
|
var headerRef = useRef(null);
|
|
7180
|
+
var footerRef = useRef(null);
|
|
6890
7181
|
var rowsRef = useRef();
|
|
6891
7182
|
var onListScroll = function (e) {
|
|
6892
7183
|
if (headerRef.current && e && e.target) {
|
|
6893
7184
|
var target = e.target;
|
|
6894
7185
|
headerRef.current.scrollLeft = target.scrollLeft;
|
|
6895
7186
|
}
|
|
7187
|
+
if (footerRef.current && e && e.target) {
|
|
7188
|
+
var target = e.target;
|
|
7189
|
+
footerRef.current.scrollLeft = target.scrollLeft;
|
|
7190
|
+
}
|
|
6896
7191
|
};
|
|
6897
7192
|
useLayoutEffect(function () {
|
|
6898
7193
|
rowsRef.current && rowsRef.current.addEventListener('scroll', onListScroll);
|
|
@@ -6901,23 +7196,48 @@ function SimpleWindowedTable(_a) {
|
|
|
6901
7196
|
};
|
|
6902
7197
|
}, [rowsRef]);
|
|
6903
7198
|
var RenderRow = React__default.useCallback(function (_a) {
|
|
6904
|
-
var index = _a.index, style = _a.style;
|
|
7199
|
+
var index = _a.index, isScrolling = _a.isScrolling, style = _a.style;
|
|
6905
7200
|
var row = rows[index];
|
|
6906
7201
|
prepareRow(row);
|
|
6907
7202
|
return (React__default.createElement("div", __assign({}, row.getRowProps({
|
|
6908
7203
|
style: style
|
|
6909
7204
|
}), { className: "tr" }), row.cells.map(function (cell) {
|
|
6910
|
-
|
|
7205
|
+
var cellProps = cell.getCellProps();
|
|
7206
|
+
return (React__default.createElement("div", __assign({}, cellProps, { onClick: function () { return onClickRow ? onClickRow(cell.row.original, index) : null; }, className: "td " + (cellProps.className || '') }), cell.render("Cell", { isScrolling: isScrolling })));
|
|
6911
7207
|
})));
|
|
6912
7208
|
}, [prepareRow, rows, onClickRow]);
|
|
6913
|
-
|
|
6914
|
-
|
|
7209
|
+
var getHeaderProps = function (column, isFooter) {
|
|
7210
|
+
if (isFooter === void 0) { isFooter = false; }
|
|
7211
|
+
var headerProps = column.getHeaderProps(__assign(__assign({}, column.getSortByToggleProps()), (column.containerProps || {})));
|
|
7212
|
+
if (isFooter) {
|
|
7213
|
+
headerProps = column.getFooterProps(__assign(__assign({}, column.getSortByToggleProps()), (column.containerProps || {})));
|
|
7214
|
+
}
|
|
7215
|
+
var headerStyles = __assign(__assign({}, (headerProps.style || {})), (column.style || {}));
|
|
7216
|
+
var headerClassNames = __spreadArrays([
|
|
7217
|
+
'th'
|
|
7218
|
+
], (headerProps.className || "").split(' '), (column.className || "").split(' ')).filter(function (v) { return v; }).join(' ');
|
|
7219
|
+
return __assign(__assign({}, headerProps), { style: headerStyles, className: headerClassNames });
|
|
7220
|
+
};
|
|
7221
|
+
var getHeaderGroupProps = function (headerGroup, isFooter) {
|
|
7222
|
+
if (isFooter === void 0) { isFooter = false; }
|
|
7223
|
+
var headerGroupProps = headerGroup.getHeaderGroupProps(__assign({}, (headerGroup.containerProps || {})));
|
|
7224
|
+
if (isFooter) {
|
|
7225
|
+
headerGroupProps = headerGroup.getFooterGroupProps(__assign({}, (headerGroup.containerProps || {})));
|
|
7226
|
+
}
|
|
7227
|
+
var headerStyles = __assign(__assign({}, (headerGroupProps.style || {})), (headerGroup.style || {}));
|
|
7228
|
+
var headerClassNames = __spreadArrays([
|
|
7229
|
+
isFooter ? 'footer tr' : 'header tr'
|
|
7230
|
+
], (headerGroupProps.className || "").split(' '), (headerGroup.className || "").split(' ')).filter(function (v) { return v; }).join(' ');
|
|
7231
|
+
return __assign(__assign({}, headerGroupProps), { style: headerStyles, className: headerClassNames });
|
|
7232
|
+
};
|
|
7233
|
+
return (React__default.createElement("div", __assign({}, getTableProps(), { className: "table " + (className || '') }),
|
|
7234
|
+
React__default.createElement("div", __assign({}, tableHeaderProps, { className: "header-wrapper " + (tableHeaderProps.className || '') }), headerGroups.map(function (headerGroup) { return (React__default.createElement("div", __assign({}, getHeaderGroupProps(headerGroup, false), { className: "header tr", ref: headerRef }), headerGroup.headers.map(function (column) { return (React__default.createElement("div", __assign({}, getHeaderProps(column, false)),
|
|
6915
7235
|
column.render("Header"),
|
|
6916
|
-
React__default.createElement("span", { style: { display: 'inline-block', paddingLeft: 5, verticalAlign: 'text-top' } }, column.isSorted ? (column.isSortedDesc ? React__default.createElement(DownArrowIcon, { width: "15px" }) : React__default.createElement(UpArrowIcon, { width: "15px" })) : React__default.createElement(UpDownArrowsIcon, { width: "15px" })))); }))); })),
|
|
6917
|
-
React__default.createElement("div", __assign({}, getTableBodyProps()),
|
|
6918
|
-
|
|
7236
|
+
column.canSort ? React__default.createElement("span", { style: { display: 'inline-block', paddingLeft: 5, verticalAlign: 'text-top' } }, column.isSorted ? (column.isSortedDesc ? React__default.createElement(DownArrowIcon, { width: "15px" }) : React__default.createElement(UpArrowIcon, { width: "15px" })) : React__default.createElement(UpDownArrowsIcon, { width: "15px" })) : null)); }))); })),
|
|
7237
|
+
React__default.createElement("div", __assign({}, getTableBodyProps()), rows.length === 0 && NoRowsFound ? React__default.createElement(NoRowsFound, null) : React__default.createElement(FixedSizeList, { height: height, itemCount: rows.length, itemSize: itemSize, width: totalColumnsWidth + scrollBarSize, className: "table-list-rows", outerRef: rowsRef, onScroll: onScroll, useIsScrolling: true }, RenderRow)),
|
|
7238
|
+
!hideFooter ? React__default.createElement("div", __assign({}, tableFooterProps, { className: "table-footer-wrapper " + (tableFooterProps.className || '') }), footerGroups.map(function (footerGroup) { return (React__default.createElement("div", __assign({}, getHeaderGroupProps(footerGroup, true), { className: "table-footer tr", ref: footerRef }), footerGroup.headers.map(function (column) { return (React__default.createElement("div", __assign({}, getHeaderProps(column, true)), column.render("Footer"))); }))); })) : null));
|
|
6919
7239
|
}
|
|
6920
7240
|
var templateObject_1$L;
|
|
6921
7241
|
|
|
6922
|
-
export { Artwork, SKUAsyncSelect as AsyncSelect, Avatar, AwaitingProofIcon, Backdrop, Background, Badge, Box, Button, ButtonsGroup, Calendar, CalendarDayBody, CalendarDaysBody, CalendarDaysHeader, CalendarIcon, CalendarTask, CalendarWrapper, ChangeRequestedIcon, ChatIcon, CheckMark, CircleProgressIcon, ClientApprovedIcon, Col, CollapseStyled, CollapseWrapper, Collapsible, CollapsiblePanel, CollapsiblePanelTitle, CollapsiblePanels, ColumnSelectIcon, CouponIcon, SKUCreatableSelect as CreatableSelect, CustomDateInput, Datepicker, DaysBodyWrapper, DaysHeaderWrapper, DefaultCalendarFooter, DefaultCalendarHeader, Dot, DownArrowIcon, DownloadIcon, DraggableTasksCalendar, DropArea, DropDownContent, Dropdown, DropdownItem, Dropzoned, DropzonedPreviews, ErrorBoundary, FeedPost, GearIcon, GlobalStyle, Grid, H1, H2, H3, H4, H5, H6, HeaderWrapper, HeadlessTable, IconDoc, InfoIcon, Input, InputIconLabel, InputIconLabelContainer, Label, LabeledAsyncSelect, LabeledCheckbox, LabeledCreatableSelect, LabeledInput, LabeledMultiProgress, LabeledProgress, LabeledRadio, LabeledRadioGroup, LabeledSelect, LabeledTextarea, Link, Loading, LockIcon, MultiProgress, NavConnectIcon, NavFinanceIcon, NavManagementIcon, NavProdIcon, NavResourcesIcon, NavSalesIcon, NextPrevIcon, NoMarketingIcon, NoteIcon, Number$1 as Number, Overlay, Padding, Page, PanelContact, PanelIcon, PanelTileContact, PendingApprovalIcon, PinIcon, Popup, PopupHeader, Product, Progress, ProofReceivedIcon, ProofingCompleteIcon, Publisher, Radio, RadioLabel, ResponsiveTable, Row, SHARED_STYLE_MAPS, SKUSelect as Select, SharedStyles, ShowPopup, SidePanel, SimpleWindowedTable, SimpleWindowedTableStyles, SizerCss, SizerWrapper, Sparkles, Spinner, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown, StyledPanel, StyledTask, TBody, TD, TH, THSorted, THead, TR, Tab, TabBar, Table, TableIcon, Tabs, Task, TaskBody, TaskIcon, TaskLabel, TaskName, TasksCalendar, TasksCalendarDayBody, TasksCalendarFooter, TasksCalendarHeader, Text, Textarea, Theme, Toggle, ToggleLink, TrashIcon, UpArrowIcon, UpDownArrowsIcon, WarningIcon, Wrapper, YesMarketingIcon, colors, fontSizes, fonts, getColor, getFontSize, getThemeColor, getThemeFontFamily, getThemeFontSize, getThemeProperty, themeOptions };
|
|
7242
|
+
export { Artwork, SKUAsyncSelect as AsyncSelect, Avatar, AwaitingProofIcon, Backdrop, Background, Badge, Box, Icon$6 as BulletIcon, Button, ButtonsGroup, Calendar, CalendarDayBody, CalendarDaysBody, CalendarDaysHeader, CalendarIcon, CalendarTask, CalendarWrapper, ChangeRequestedIcon, ChatIcon, CheckMark, Icon$3 as CheckmarkIcon, CircleProgressIcon, ClientApprovedIcon, Col, CollapseStyled, CollapseWrapper, Collapsible, CollapsiblePanel, CollapsiblePanelTitle, CollapsiblePanels, ColumnSelectIcon, CouponIcon, SKUCreatableSelect as CreatableSelect, CustomDateInput, Datepicker, DaysBodyWrapper, DaysHeaderWrapper, DefaultCalendarFooter, DefaultCalendarHeader, Dot, DownArrowIcon, DownloadIcon, DraggableTasksCalendar, DropArea, DropDownContent, Dropdown, DropdownItem, Dropzoned, DropzonedPreviews, ErrorBoundary, Icon$2 as ErrorIcon, FeedPost, GearIcon, GlobalStyle, Grid, H1, H2, H3, H4, H5, H6, HeaderWrapper, HeadlessTable, IconDoc, InfoIcon, Input, InputIconLabel, InputIconLabelContainer, Label, LabeledAsyncSelect, LabeledCheckbox, LabeledCreatableSelect, LabeledInput, LabeledMultiProgress, LabeledProgress, LabeledRadio, LabeledRadioGroup, LabeledSelect, LabeledTextarea, Icon$4 as LeftArrowIcon, Link, Loading, LockIcon, MultiProgress, NavConnectIcon, NavFinanceIcon, NavManagementIcon, NavProdIcon, NavResourcesIcon, NavSalesIcon, NextPrevIcon, NoMarketingIcon, NoteIcon, Number$1 as Number, Overlay, Padding, Page, PanelContact, PanelIcon, PanelTileContact, PendingApprovalIcon, PinIcon, Popup, PopupHeader, Product, Progress, ProofReceivedIcon, ProofingCompleteIcon, Publisher, Radio, RadioLabel, ResponsiveTable, Icon$5 as RightArrowIcon, Row, SHARED_STYLE_MAPS, Icon$1 as SalesDownArrowIcon, Icon as SalesUpArrowIcon, SKUSelect as Select, SharedStyles, ShowPopup, SidePanel, SimpleWindowedTable, SimpleWindowedTableStyles, SizerCss, SizerWrapper, Sparkles, Spinner, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown, StyledPanel, StyledTask, TBody, TD, TH, THSorted, THead, TR, Tab, TabBar, Table, TableIcon, Tabs, Task, TaskBody, TaskIcon, TaskLabel, TaskName, TasksCalendar, TasksCalendarDayBody, TasksCalendarFooter, TasksCalendarHeader, Text, Textarea, Theme, Toggle, ToggleLink, TrashIcon, UpArrowIcon, UpDownArrowsIcon, WarningIcon, Wrapper, YesMarketingIcon, colors$1 as colors, fontSizes, fonts, getColor, getFontSize, getThemeColor, getThemeFontFamily, getThemeFontSize, getThemeProperty, sizes$1 as sizes, themeOptions };
|
|
6923
7243
|
//# sourceMappingURL=index.es.js.map
|