@epam/uui 4.11.0-alpha.1 → 4.11.0

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.
Files changed (143) hide show
  1. package/assets/styles/buttonLayout.scss +66 -66
  2. package/assets/styles/controlLayout.scss +27 -27
  3. package/assets/styles/effects.scss +9 -9
  4. package/assets/styles/font-faces.scss +51 -51
  5. package/assets/styles/icons.scss +18 -18
  6. package/assets/styles/index.scss +7 -7
  7. package/assets/styles/inputs.scss +69 -69
  8. package/assets/styles/layout-mixins.scss +8 -8
  9. package/assets/styles/prettifyScrollBar.scss +52 -52
  10. package/assets/styles/text-layout.scss +80 -80
  11. package/assets/styles/text-size.scss +37 -37
  12. package/assets/styles/typography-mixins.scss +159 -159
  13. package/assets/styles/typography.scss +38 -38
  14. package/assets/styles/variables/widgets/badge.scss +50 -50
  15. package/components/buttons/Button/Button.d.ts +12 -12
  16. package/components/buttons/Button/Button.test.d.ts +1 -1
  17. package/components/buttons/Button/index.d.ts +1 -1
  18. package/components/buttons/IconButton.d.ts +9 -9
  19. package/components/buttons/LinkButton.d.ts +7 -7
  20. package/components/buttons/TabButton.d.ts +7 -7
  21. package/components/buttons/VerticalTabButton.d.ts +4 -4
  22. package/components/buttons/helper.d.ts +2 -2
  23. package/components/buttons/index.d.ts +5 -5
  24. package/components/datePickers/Calendar.d.ts +4 -4
  25. package/components/datePickers/CalendarPresets.d.ts +3 -3
  26. package/components/datePickers/DatePicker.d.ts +12 -12
  27. package/components/datePickers/DatePickerBody.d.ts +3 -3
  28. package/components/datePickers/RangeDatePicker.d.ts +12 -12
  29. package/components/datePickers/RangeDatePickerBody.d.ts +3 -3
  30. package/components/datePickers/index.d.ts +5 -5
  31. package/components/dnd/DropMarker.d.ts +8 -8
  32. package/components/dnd/index.d.ts +1 -1
  33. package/components/filters/FilterDataPickerBody.d.ts +13 -13
  34. package/components/filters/FilterItemBody.d.ts +2 -2
  35. package/components/filters/FilterNumericBody.d.ts +12 -12
  36. package/components/filters/FilterPanelItemToggler.d.ts +12 -12
  37. package/components/filters/FilterPickerBody.d.ts +19 -19
  38. package/components/filters/FilterRangeDatePickerBody.d.ts +18 -18
  39. package/components/filters/FiltersPanel.d.ts +8 -8
  40. package/components/filters/FiltersPanelItem.d.ts +7 -7
  41. package/components/filters/PresetPanel/Preset.d.ts +8 -8
  42. package/components/filters/PresetPanel/PresetActionsDropdown.d.ts +9 -9
  43. package/components/filters/PresetPanel/PresetInput.d.ts +8 -8
  44. package/components/filters/PresetPanel/PresetsPanel.d.ts +6 -6
  45. package/components/filters/PresetPanel/index.d.ts +1 -1
  46. package/components/filters/defaultPredicates.d.ts +4 -4
  47. package/components/filters/index.d.ts +4 -4
  48. package/components/forms/Form.d.ts +3 -3
  49. package/components/forms/index.d.ts +2 -2
  50. package/components/forms/useForm.d.ts +2 -2
  51. package/components/index.d.ts +14 -14
  52. package/components/inputs/Checkbox.d.ts +8 -8
  53. package/components/inputs/MultiSwitch.d.ts +15 -15
  54. package/components/inputs/NumericInput.d.ts +8 -8
  55. package/components/inputs/RadioInput.d.ts +6 -6
  56. package/components/inputs/Switch.d.ts +6 -6
  57. package/components/inputs/TextArea.d.ts +9 -9
  58. package/components/inputs/TextInput.d.ts +12 -12
  59. package/components/inputs/index.d.ts +7 -7
  60. package/components/layout/Accordion.d.ts +6 -6
  61. package/components/layout/Blocker.d.ts +3 -3
  62. package/components/layout/CheckboxGroup.d.ts +2 -2
  63. package/components/layout/ControlGroup.d.ts +2 -2
  64. package/components/layout/FlexItems/FlexCell.d.ts +11 -11
  65. package/components/layout/FlexItems/FlexRow.d.ts +16 -16
  66. package/components/layout/FlexItems/FlexSpacer.d.ts +4 -4
  67. package/components/layout/FlexItems/Panel.d.ts +7 -7
  68. package/components/layout/FlexItems/index.d.ts +4 -4
  69. package/components/layout/LabeledInput.d.ts +5 -5
  70. package/components/layout/RadioGroup.d.ts +2 -2
  71. package/components/layout/ScrollBars.d.ts +3 -3
  72. package/components/layout/VirtualList.d.ts +2 -2
  73. package/components/layout/index.d.ts +10 -10
  74. package/components/navigation/MainMenu/Burger/Burger.d.ts +5 -5
  75. package/components/navigation/MainMenu/Burger/BurgerButton.d.ts +7 -7
  76. package/components/navigation/MainMenu/Burger/BurgerGroupHeader.d.ts +4 -4
  77. package/components/navigation/MainMenu/Burger/BurgerSearch.d.ts +4 -4
  78. package/components/navigation/MainMenu/Burger/index.d.ts +4 -4
  79. package/components/navigation/MainMenu/GlobalMenu.d.ts +5 -5
  80. package/components/navigation/MainMenu/MainMenu.d.ts +4 -4
  81. package/components/navigation/MainMenu/MainMenuAvatar.d.ts +7 -7
  82. package/components/navigation/MainMenu/MainMenuButton.d.ts +6 -6
  83. package/components/navigation/MainMenu/MainMenuDropdown.d.ts +5 -5
  84. package/components/navigation/MainMenu/MainMenuIcon.d.ts +7 -7
  85. package/components/navigation/MainMenu/MainMenuSearch.d.ts +6 -6
  86. package/components/navigation/MainMenu/index.d.ts +8 -8
  87. package/components/navigation/index.d.ts +1 -1
  88. package/components/overlays/Alert.d.ts +23 -23
  89. package/components/overlays/ConfirmationModal.d.ts +10 -10
  90. package/components/overlays/Dropdown.d.ts +5 -5
  91. package/components/overlays/DropdownContainer.d.ts +8 -8
  92. package/components/overlays/DropdownMenu.d.ts +33 -33
  93. package/components/overlays/Modals.d.ts +19 -19
  94. package/components/overlays/NotificationCard.d.ts +25 -25
  95. package/components/overlays/Tooltip.d.ts +5 -5
  96. package/components/overlays/index.d.ts +7 -7
  97. package/components/pickers/DataPickerBody.d.ts +16 -16
  98. package/components/pickers/DataPickerFooter.d.ts +8 -8
  99. package/components/pickers/DataPickerHeader.d.ts +7 -7
  100. package/components/pickers/DataPickerRow.d.ts +15 -15
  101. package/components/pickers/MobileDropdownWrapper.d.ts +10 -10
  102. package/components/pickers/PickerInput.d.ts +16 -16
  103. package/components/pickers/PickerItem.d.ts +13 -13
  104. package/components/pickers/PickerList.d.ts +17 -17
  105. package/components/pickers/PickerListItem.d.ts +8 -8
  106. package/components/pickers/PickerModal.d.ts +16 -16
  107. package/components/pickers/PickerToggler.d.ts +7 -7
  108. package/components/pickers/index.d.ts +11 -11
  109. package/components/tables/ColumnHeaderDropdown/ColumnHeaderDropdown.d.ts +13 -13
  110. package/components/tables/ColumnHeaderDropdown/SortingPanel.d.ts +7 -7
  111. package/components/tables/ColumnHeaderDropdown/index.d.ts +1 -1
  112. package/components/tables/DataTable.d.ts +15 -15
  113. package/components/tables/DataTableCell.d.ts +4 -4
  114. package/components/tables/DataTableHeaderCell.d.ts +18 -18
  115. package/components/tables/DataTableHeaderRow.d.ts +4 -4
  116. package/components/tables/DataTableRow.d.ts +10 -10
  117. package/components/tables/columnsConfigurationModal/ColumnRow.d.ts +6 -6
  118. package/components/tables/columnsConfigurationModal/ColumnsConfigurationModal.d.ts +9 -9
  119. package/components/tables/columnsConfigurationModal/PinIconButton.d.ts +9 -9
  120. package/components/tables/columnsConfigurationModal/index.d.ts +1 -1
  121. package/components/tables/index.d.ts +8 -8
  122. package/components/tables/types.d.ts +31 -31
  123. package/components/types.d.ts +34 -34
  124. package/components/typography/RichTextView.d.ts +6 -6
  125. package/components/typography/Text.d.ts +11 -11
  126. package/components/typography/TextPlaceholder.d.ts +9 -9
  127. package/components/typography/index.d.ts +3 -3
  128. package/components/widgets/Avatar.d.ts +2 -2
  129. package/components/widgets/Badge.d.ts +14 -14
  130. package/components/widgets/Spinner.d.ts +5 -5
  131. package/components/widgets/Tag.d.ts +8 -8
  132. package/components/widgets/index.d.ts +4 -4
  133. package/helpers/index.d.ts +2 -2
  134. package/helpers/textLayout.d.ts +8 -8
  135. package/helpers/useColumnsWithFilters.d.ts +2 -2
  136. package/i18n.d.ts +103 -103
  137. package/icons/icons.d.ts +3 -3
  138. package/index.d.ts +4 -4
  139. package/index.js +1967 -1967
  140. package/index.js.map +1 -1
  141. package/package.json +5 -5
  142. package/readme.md +4 -4
  143. package/stats.html +1 -1
package/index.js CHANGED
@@ -352,178 +352,178 @@ var SvgHelpFill16 = function SvgHelpFill16(props, ref) {
352
352
  };
353
353
  var ForwardRef$J = /*#__PURE__*/React.forwardRef(SvgHelpFill16);
354
354
 
355
- const systemIcons = {
356
- '18': {
357
- clear: ForwardRef$10,
358
- foldingArrow: ForwardRef$Z,
359
- accept: ForwardRef$W,
360
- search: ForwardRef$T,
361
- calendar: ForwardRef$Q,
362
- info: ForwardRef$N,
363
- help: ForwardRef$K,
364
- },
365
- '24': {
366
- clear: ForwardRef$10,
367
- foldingArrow: ForwardRef$Z,
368
- accept: ForwardRef$W,
369
- search: ForwardRef$T,
370
- calendar: ForwardRef$Q,
371
- info: ForwardRef$N,
372
- help: ForwardRef$K,
373
- },
374
- '30': {
375
- clear: ForwardRef$$,
376
- foldingArrow: ForwardRef$Y,
377
- accept: ForwardRef$V,
378
- search: ForwardRef$S,
379
- calendar: ForwardRef$P,
380
- info: ForwardRef$M,
381
- help: ForwardRef$K,
382
- },
383
- '36': {
384
- clear: ForwardRef$$,
385
- foldingArrow: ForwardRef$Y,
386
- accept: ForwardRef$V,
387
- search: ForwardRef$S,
388
- calendar: ForwardRef$P,
389
- info: ForwardRef$M,
390
- help: ForwardRef$J,
391
- },
392
- '42': {
393
- clear: ForwardRef$$,
394
- foldingArrow: ForwardRef$Y,
395
- accept: ForwardRef$V,
396
- search: ForwardRef$S,
397
- calendar: ForwardRef$P,
398
- info: ForwardRef$M,
399
- help: ForwardRef$J,
400
- },
401
- '48': {
402
- clear: ForwardRef$_,
403
- foldingArrow: ForwardRef$X,
404
- accept: ForwardRef$U,
405
- search: ForwardRef$R,
406
- calendar: ForwardRef$O,
407
- info: ForwardRef$L,
408
- help: ForwardRef$J,
409
- },
410
- '60': {
411
- clear: ForwardRef$_,
412
- foldingArrow: ForwardRef$X,
413
- accept: ForwardRef$U,
414
- search: ForwardRef$R,
415
- calendar: ForwardRef$O,
416
- info: ForwardRef$L,
417
- help: ForwardRef$J,
418
- },
419
- 'none': {
420
- clear: ForwardRef$$,
421
- foldingArrow: ForwardRef$Y,
422
- accept: ForwardRef$V,
423
- search: ForwardRef$S,
424
- calendar: ForwardRef$P,
425
- info: ForwardRef$M,
426
- help: ForwardRef$J,
427
- },
355
+ const systemIcons = {
356
+ '18': {
357
+ clear: ForwardRef$10,
358
+ foldingArrow: ForwardRef$Z,
359
+ accept: ForwardRef$W,
360
+ search: ForwardRef$T,
361
+ calendar: ForwardRef$Q,
362
+ info: ForwardRef$N,
363
+ help: ForwardRef$K,
364
+ },
365
+ '24': {
366
+ clear: ForwardRef$10,
367
+ foldingArrow: ForwardRef$Z,
368
+ accept: ForwardRef$W,
369
+ search: ForwardRef$T,
370
+ calendar: ForwardRef$Q,
371
+ info: ForwardRef$N,
372
+ help: ForwardRef$K,
373
+ },
374
+ '30': {
375
+ clear: ForwardRef$$,
376
+ foldingArrow: ForwardRef$Y,
377
+ accept: ForwardRef$V,
378
+ search: ForwardRef$S,
379
+ calendar: ForwardRef$P,
380
+ info: ForwardRef$M,
381
+ help: ForwardRef$K,
382
+ },
383
+ '36': {
384
+ clear: ForwardRef$$,
385
+ foldingArrow: ForwardRef$Y,
386
+ accept: ForwardRef$V,
387
+ search: ForwardRef$S,
388
+ calendar: ForwardRef$P,
389
+ info: ForwardRef$M,
390
+ help: ForwardRef$J,
391
+ },
392
+ '42': {
393
+ clear: ForwardRef$$,
394
+ foldingArrow: ForwardRef$Y,
395
+ accept: ForwardRef$V,
396
+ search: ForwardRef$S,
397
+ calendar: ForwardRef$P,
398
+ info: ForwardRef$M,
399
+ help: ForwardRef$J,
400
+ },
401
+ '48': {
402
+ clear: ForwardRef$_,
403
+ foldingArrow: ForwardRef$X,
404
+ accept: ForwardRef$U,
405
+ search: ForwardRef$R,
406
+ calendar: ForwardRef$O,
407
+ info: ForwardRef$L,
408
+ help: ForwardRef$J,
409
+ },
410
+ '60': {
411
+ clear: ForwardRef$_,
412
+ foldingArrow: ForwardRef$X,
413
+ accept: ForwardRef$U,
414
+ search: ForwardRef$R,
415
+ calendar: ForwardRef$O,
416
+ info: ForwardRef$L,
417
+ help: ForwardRef$J,
418
+ },
419
+ 'none': {
420
+ clear: ForwardRef$$,
421
+ foldingArrow: ForwardRef$Y,
422
+ accept: ForwardRef$V,
423
+ search: ForwardRef$S,
424
+ calendar: ForwardRef$P,
425
+ info: ForwardRef$M,
426
+ help: ForwardRef$J,
427
+ },
428
428
  };
429
429
 
430
430
  var buttonCss = {"typography-header":"Button_typography-header__N39Sj","typography-block":"Button_typography-block__wNgIs","typography-inline":"Button_typography-inline__rkIhO","typography-16":"Button_typography-16__zilSM","typography-14":"Button_typography-14__TkTJy","typography-12":"Button_typography-12__qT2zs","typography-promo":"Button_typography-promo__34xBe Button_typography-header__N39Sj Button_typography-block__wNgIs Button_typography-inline__rkIhO","root":"Button_root__uIzk9","mode-solid":"Button_mode-solid__zr23o","mode-outline":"Button_mode-outline__e9LiF","mode-none":"Button_mode-none__j8rJ3","mode-ghost":"Button_mode-ghost__c8QtK","size-24":"Button_size-24__8SJZp","size-30":"Button_size-30__z1sFR","size-36":"Button_size-36__7ldWy","size-42":"Button_size-42__h3Y-0","size-48":"Button_size-48__VaI4-","typographyHeader":"Button_typography-header__N39Sj","typographyBlock":"Button_typography-block__wNgIs","typographyInline":"Button_typography-inline__rkIhO","typography16":"Button_typography-16__zilSM","typography14":"Button_typography-14__TkTJy","typography12":"Button_typography-12__qT2zs","typographyPromo":"Button_typography-promo__34xBe Button_typography-header__N39Sj Button_typography-block__wNgIs Button_typography-inline__rkIhO","modeSolid":"Button_mode-solid__zr23o","modeOutline":"Button_mode-outline__e9LiF","modeNone":"Button_mode-none__j8rJ3","modeGhost":"Button_mode-ghost__c8QtK","size24":"Button_size-24__8SJZp","size30":"Button_size-30__z1sFR","size36":"Button_size-36__7ldWy","size42":"Button_size-42__h3Y-0","size48":"Button_size-48__VaI4-"};
431
431
 
432
- const allButtonColors = ['accent', 'primary', 'secondary', 'negative'];
433
- const defaultSize$a = '36';
434
- function applyButtonMods(mods) {
435
- return [
436
- `button-${mods.color || 'primary'}`,
437
- buttonCss.root,
438
- buttonCss[`size-${mods.size || defaultSize$a}`],
439
- buttonCss[`mode-${mods.mode || 'solid'}`],
440
- ];
441
- }
442
- const Button = uuiCore.withMods(uuiComponents.Button, applyButtonMods, (props) => ({
443
- dropdownIcon: systemIcons[props.size || defaultSize$a].foldingArrow,
444
- clearIcon: systemIcons[props.size || defaultSize$a].clear,
432
+ const allButtonColors = ['accent', 'primary', 'secondary', 'negative'];
433
+ const defaultSize$a = '36';
434
+ function applyButtonMods(mods) {
435
+ return [
436
+ `button-${mods.color || 'primary'}`,
437
+ buttonCss.root,
438
+ buttonCss[`size-${mods.size || defaultSize$a}`],
439
+ buttonCss[`mode-${mods.mode || 'solid'}`],
440
+ ];
441
+ }
442
+ const Button = uuiCore.withMods(uuiComponents.Button, applyButtonMods, (props) => ({
443
+ dropdownIcon: systemIcons[props.size || defaultSize$a].foldingArrow,
444
+ clearIcon: systemIcons[props.size || defaultSize$a].clear,
445
445
  }));
446
446
 
447
447
  var css$12 = {"root":"IconButton_root__c1hRd"};
448
448
 
449
- const allIconColors = ['info', 'success', 'warning', 'error', 'secondary', 'default'];
450
- function applyIconButtonMods(mods) {
451
- return [
452
- `icon-button-${mods.color || 'default'}`,
453
- css$12.root,
454
- ];
455
- }
449
+ const allIconColors = ['info', 'success', 'warning', 'error', 'secondary', 'default'];
450
+ function applyIconButtonMods(mods) {
451
+ return [
452
+ `icon-button-${mods.color || 'default'}`,
453
+ css$12.root,
454
+ ];
455
+ }
456
456
  const IconButton = uuiCore.withMods(uuiComponents.IconButton, applyIconButtonMods);
457
457
 
458
458
  var css$11 = {"root":"LinkButton_root__SWC7c","size-18":"LinkButton_size-18__XI44N","size-24":"LinkButton_size-24__yj-DG","size-30":"LinkButton_size-30__sKZ9H","size-36":"LinkButton_size-36__HIbgO","size-42":"LinkButton_size-42__apHCj","size-48":"LinkButton_size-48__7zgFe","size18":"LinkButton_size-18__XI44N","size24":"LinkButton_size-24__yj-DG","size30":"LinkButton_size-30__sKZ9H","size36":"LinkButton_size-36__HIbgO","size42":"LinkButton_size-42__apHCj","size48":"LinkButton_size-48__7zgFe"};
459
459
 
460
- function getIconClass(props) {
461
- let classList = {
462
- 'has-left-icon': false,
463
- 'has-right-icon': false,
464
- };
465
- if (props.onClear) {
466
- classList['has-right-icon'] = true;
467
- }
468
- if (props.isDropdown) {
469
- classList[props.dropdownIconPosition === 'left' ? 'has-left-icon' : 'has-right-icon'] = true;
470
- }
471
- if (props.icon) {
472
- classList[props.iconPosition !== 'right' ? 'has-left-icon' : 'has-right-icon'] = true;
473
- }
474
- return [
475
- classList['has-left-icon'] ? 'uui-has-left-icon' : 'uui-no-left-icon',
476
- classList['has-right-icon'] ? 'uui-has-right-icon' : 'uui-no-right-icon',
477
- ];
460
+ function getIconClass(props) {
461
+ let classList = {
462
+ 'has-left-icon': false,
463
+ 'has-right-icon': false,
464
+ };
465
+ if (props.onClear) {
466
+ classList['has-right-icon'] = true;
467
+ }
468
+ if (props.isDropdown) {
469
+ classList[props.dropdownIconPosition === 'left' ? 'has-left-icon' : 'has-right-icon'] = true;
470
+ }
471
+ if (props.icon) {
472
+ classList[props.iconPosition !== 'right' ? 'has-left-icon' : 'has-right-icon'] = true;
473
+ }
474
+ return [
475
+ classList['has-left-icon'] ? 'uui-has-left-icon' : 'uui-no-left-icon',
476
+ classList['has-right-icon'] ? 'uui-has-right-icon' : 'uui-no-right-icon',
477
+ ];
478
478
  }
479
479
 
480
- const defaultSize$9 = '36';
481
- function applyLinkButtonMods(mods) {
482
- return [
483
- css$11.root,
484
- css$11['size-' + (mods.size || defaultSize$9)],
485
- ...getIconClass(mods),
486
- ];
487
- }
488
- const LinkButton = uuiCore.withMods(uuiComponents.Button, applyLinkButtonMods, (props) => ({
489
- dropdownIcon: systemIcons[props.size || defaultSize$9].foldingArrow,
490
- clearIcon: systemIcons[props.size || defaultSize$9].clear,
480
+ const defaultSize$9 = '36';
481
+ function applyLinkButtonMods(mods) {
482
+ return [
483
+ css$11.root,
484
+ css$11['size-' + (mods.size || defaultSize$9)],
485
+ ...getIconClass(mods),
486
+ ];
487
+ }
488
+ const LinkButton = uuiCore.withMods(uuiComponents.Button, applyLinkButtonMods, (props) => ({
489
+ dropdownIcon: systemIcons[props.size || defaultSize$9].foldingArrow,
490
+ clearIcon: systemIcons[props.size || defaultSize$9].clear,
491
491
  }));
492
492
 
493
493
  var css$10 = {"typography-header":"TabButton_typography-header__RS80s","typography-block":"TabButton_typography-block__GaCpm","typography-inline":"TabButton_typography-inline__JMTQP","typography-16":"TabButton_typography-16__GLE4t","typography-14":"TabButton_typography-14__VWnXE","typography-12":"TabButton_typography-12__nGcxo","typography-promo":"TabButton_typography-promo__Des7p TabButton_typography-header__RS80s TabButton_typography-block__GaCpm TabButton_typography-inline__JMTQP","root":"TabButton_root__WwWmb","uui-notification":"TabButton_uui-notification__kS3SP","size-36":"TabButton_size-36__GqZ6d","size-48":"TabButton_size-48__SPXAO","size-60":"TabButton_size-60__lPhOn","typographyHeader":"TabButton_typography-header__RS80s","typographyBlock":"TabButton_typography-block__GaCpm","typographyInline":"TabButton_typography-inline__JMTQP","typography16":"TabButton_typography-16__GLE4t","typography14":"TabButton_typography-14__VWnXE","typography12":"TabButton_typography-12__nGcxo","typographyPromo":"TabButton_typography-promo__Des7p TabButton_typography-header__RS80s TabButton_typography-block__GaCpm TabButton_typography-inline__JMTQP","uuiNotification":"TabButton_uui-notification__kS3SP","size36":"TabButton_size-36__GqZ6d","size48":"TabButton_size-48__SPXAO","size60":"TabButton_size-60__lPhOn"};
494
494
 
495
- function applyTabButtonMods(mods) {
496
- return [
497
- css$10.root,
498
- css$10['size-' + (mods.size || '48')],
499
- mods.withNotify && css$10.uuiNotification,
500
- ...getIconClass(mods),
501
- ];
502
- }
495
+ function applyTabButtonMods(mods) {
496
+ return [
497
+ css$10.root,
498
+ css$10['size-' + (mods.size || '48')],
499
+ mods.withNotify && css$10.uuiNotification,
500
+ ...getIconClass(mods),
501
+ ];
502
+ }
503
503
  const TabButton = uuiCore.withMods(uuiComponents.Button, applyTabButtonMods, props => (Object.assign(Object.assign({ dropdownIcon: systemIcons['36'].foldingArrow, clearIcon: systemIcons['36'].clear, countPosition: 'right' }, props), { rawProps: Object.assign({ role: 'tab' }, props.rawProps) })));
504
504
 
505
505
  var css$$ = {"typography-header":"VerticalTabButton_typography-header__S9ICQ","typography-block":"VerticalTabButton_typography-block__CJa1q","typography-inline":"VerticalTabButton_typography-inline__evOKQ","typography-16":"VerticalTabButton_typography-16__DAHVj","typography-14":"VerticalTabButton_typography-14__XEpmf","typography-12":"VerticalTabButton_typography-12__db63C","typography-promo":"VerticalTabButton_typography-promo__LMvtV VerticalTabButton_typography-header__S9ICQ VerticalTabButton_typography-block__CJa1q VerticalTabButton_typography-inline__evOKQ","root":"VerticalTabButton_root__LInYW","typographyHeader":"VerticalTabButton_typography-header__S9ICQ","typographyBlock":"VerticalTabButton_typography-block__CJa1q","typographyInline":"VerticalTabButton_typography-inline__evOKQ","typography16":"VerticalTabButton_typography-16__DAHVj","typography14":"VerticalTabButton_typography-14__XEpmf","typography12":"VerticalTabButton_typography-12__db63C","typographyPromo":"VerticalTabButton_typography-promo__LMvtV VerticalTabButton_typography-header__S9ICQ VerticalTabButton_typography-block__CJa1q VerticalTabButton_typography-inline__evOKQ"};
506
506
 
507
- function applyVerticalTabButtonMods() {
508
- return [
509
- css$$.root,
510
- ];
511
- }
507
+ function applyVerticalTabButtonMods() {
508
+ return [
509
+ css$$.root,
510
+ ];
511
+ }
512
512
  const VerticalTabButton = uuiCore.withMods(TabButton, applyVerticalTabButtonMods);
513
513
 
514
- const allButtonModes = ['solid', 'outline', 'ghost', 'none'];
515
- const allSizes = ['24', '30', '36', '42', '48'];
516
- const allRowSizes = [null, '24', '30', '36', '42', '48'];
517
- const allSemanticColors = ['info', 'success', 'warning', 'error'];
518
- const allButtonSemanticColors = ['accent', 'primary', 'secondary', 'negative'];
519
- const allEpamBadgeSemanticColors = ['info', 'success', 'warning', 'error', 'default'];
520
- const allTextSizes = ['18', '24', '30', '36', '48'];
521
- const allFontStyles = ['regular', 'semibold', 'italic', 'primary', 'promo'];
522
- exports.EditMode = void 0;
523
- (function (EditMode) {
524
- EditMode["FORM"] = "form";
525
- EditMode["CELL"] = "cell";
526
- EditMode["INLINE"] = "inline";
514
+ const allButtonModes = ['solid', 'outline', 'ghost', 'none'];
515
+ const allSizes = ['24', '30', '36', '42', '48'];
516
+ const allRowSizes = [null, '24', '30', '36', '42', '48'];
517
+ const allSemanticColors = ['info', 'success', 'warning', 'error'];
518
+ const allButtonSemanticColors = ['accent', 'primary', 'secondary', 'negative'];
519
+ const allEpamBadgeSemanticColors = ['info', 'success', 'warning', 'error', 'default'];
520
+ const allTextSizes = ['18', '24', '30', '36', '48'];
521
+ const allFontStyles = ['regular', 'semibold', 'italic', 'primary', 'promo'];
522
+ exports.EditMode = void 0;
523
+ (function (EditMode) {
524
+ EditMode["FORM"] = "form";
525
+ EditMode["CELL"] = "cell";
526
+ EditMode["INLINE"] = "inline";
527
527
  })(exports.EditMode || (exports.EditMode = {}));
528
528
 
529
529
  var _path$F;
@@ -592,17 +592,17 @@ var ForwardRef$F = /*#__PURE__*/React.forwardRef(SvgPartlySelect18);
592
592
 
593
593
  var css$_ = {"typography-header":"Checkbox_typography-header__7PKo9","typography-block":"Checkbox_typography-block__9ZdZP","typography-inline":"Checkbox_typography-inline__v0o42","typography-16":"Checkbox_typography-16__QPhxK","typography-14":"Checkbox_typography-14__LuNUA","typography-12":"Checkbox_typography-12__UsWx3","typography-promo":"Checkbox_typography-promo__-nAeN Checkbox_typography-header__7PKo9 Checkbox_typography-block__9ZdZP Checkbox_typography-inline__v0o42","root":"Checkbox_root__-oMf6","size-18":"Checkbox_size-18__BzbEk","size-12":"Checkbox_size-12__ASr3R","mode-cell":"Checkbox_mode-cell__qVdJV","typographyHeader":"Checkbox_typography-header__7PKo9","typographyBlock":"Checkbox_typography-block__9ZdZP","typographyInline":"Checkbox_typography-inline__v0o42","typography16":"Checkbox_typography-16__QPhxK","typography14":"Checkbox_typography-14__LuNUA","typography12":"Checkbox_typography-12__UsWx3","typographyPromo":"Checkbox_typography-promo__-nAeN Checkbox_typography-header__7PKo9 Checkbox_typography-block__9ZdZP Checkbox_typography-inline__v0o42","size18":"Checkbox_size-18__BzbEk","size12":"Checkbox_size-12__ASr3R","modeCell":"Checkbox_mode-cell__qVdJV"};
594
594
 
595
- function applyCheckboxMods(mods) {
596
- return [
597
- css$_.root,
598
- css$_['size-' + (mods.size || '18')],
599
- css$_['mode-' + (mods.mode || 'form')],
600
- ];
601
- }
602
- const applyUUICheckboxProps = (props) => ({
603
- icon: (props.size === '12') ? ForwardRef$I : ForwardRef$H,
604
- indeterminateIcon: (props.size === '12') ? ForwardRef$G : ForwardRef$F,
605
- });
595
+ function applyCheckboxMods(mods) {
596
+ return [
597
+ css$_.root,
598
+ css$_['size-' + (mods.size || '18')],
599
+ css$_['mode-' + (mods.mode || 'form')],
600
+ ];
601
+ }
602
+ const applyUUICheckboxProps = (props) => ({
603
+ icon: (props.size === '12') ? ForwardRef$I : ForwardRef$H,
604
+ indeterminateIcon: (props.size === '12') ? ForwardRef$G : ForwardRef$F,
605
+ });
606
606
  const Checkbox = uuiCore.withMods(uuiComponents.Checkbox, applyCheckboxMods, applyUUICheckboxProps);
607
607
 
608
608
  var css$Z = {"typography-header":"RadioInput_typography-header__TjrmU","typography-block":"RadioInput_typography-block__N9NNT","typography-inline":"RadioInput_typography-inline__9Q7fd","typography-16":"RadioInput_typography-16__MAISE","typography-14":"RadioInput_typography-14__dXuSH","typography-12":"RadioInput_typography-12__qFDEG","typography-promo":"RadioInput_typography-promo__w74S0 RadioInput_typography-header__TjrmU RadioInput_typography-block__N9NNT RadioInput_typography-inline__9Q7fd","root":"RadioInput_root__wxJgt","size-18":"RadioInput_size-18__csI3z","size-12":"RadioInput_size-12__2lBQH","typographyHeader":"RadioInput_typography-header__TjrmU","typographyBlock":"RadioInput_typography-block__N9NNT","typographyInline":"RadioInput_typography-inline__9Q7fd","typography16":"RadioInput_typography-16__MAISE","typography14":"RadioInput_typography-14__dXuSH","typography12":"RadioInput_typography-12__qFDEG","typographyPromo":"RadioInput_typography-promo__w74S0 RadioInput_typography-header__TjrmU RadioInput_typography-block__N9NNT RadioInput_typography-inline__9Q7fd","size18":"RadioInput_size-18__csI3z","size12":"RadioInput_size-12__2lBQH"};
@@ -624,23 +624,23 @@ var SvgRadioPoint = function SvgRadioPoint(props, ref) {
624
624
  };
625
625
  var ForwardRef$E = /*#__PURE__*/React.forwardRef(SvgRadioPoint);
626
626
 
627
- function applyRadioInputMods(mods) {
628
- return [
629
- css$Z.root,
630
- css$Z['size-' + (mods.size || '18')],
631
- ];
632
- }
627
+ function applyRadioInputMods(mods) {
628
+ return [
629
+ css$Z.root,
630
+ css$Z['size-' + (mods.size || '18')],
631
+ ];
632
+ }
633
633
  const RadioInput = uuiCore.withMods(uuiComponents.RadioInput, applyRadioInputMods, () => ({ icon: ForwardRef$E }));
634
634
 
635
635
  var css$Y = {"root":"Switch_root__q-6Iy","size-12":"Switch_size-12__7-pqh","size-18":"Switch_size-18__l3E-E","size-24":"Switch_size-24__DmaSh","size12":"Switch_size-12__7-pqh","size18":"Switch_size-18__l3E-E","size24":"Switch_size-24__DmaSh"};
636
636
 
637
- function applySwitchMods(mods) {
638
- return [
639
- 'switch-vars',
640
- css$Y.root,
641
- css$Y['size-' + (mods.size || '18')],
642
- ];
643
- }
637
+ function applySwitchMods(mods) {
638
+ return [
639
+ 'switch-vars',
640
+ css$Y.root,
641
+ css$Y['size-' + (mods.size || '18')],
642
+ ];
643
+ }
644
644
  const Switch = uuiCore.withMods(uuiComponents.Switch, applySwitchMods);
645
645
 
646
646
  /******************************************************************************
@@ -682,38 +682,38 @@ function __awaiter(thisArg, _arguments, P, generator) {
682
682
 
683
683
  var textInputCss = {"typography-header":"TextInput_typography-header__D2R6e","typography-block":"TextInput_typography-block__tb5ac","typography-inline":"TextInput_typography-inline__DAwAE","typography-16":"TextInput_typography-16__FJ4fX","typography-14":"TextInput_typography-14__LgtNs","typography-12":"TextInput_typography-12__rCAko","typography-promo":"TextInput_typography-promo__uZQ6- TextInput_typography-header__D2R6e TextInput_typography-block__tb5ac TextInput_typography-inline__DAwAE","root":"TextInput_root__UKzkT","mode-form":"TextInput_mode-form__JsK1y","mode-inline":"TextInput_mode-inline__QkIod","mode-cell":"TextInput_mode-cell__H2C-f","size-24":"TextInput_size-24__buGZm","size-30":"TextInput_size-30__G0e43","size-36":"TextInput_size-36__bOehk","size-42":"TextInput_size-42__5Gdbv","size-48":"TextInput_size-48__Eb1Xy","typographyHeader":"TextInput_typography-header__D2R6e","typographyBlock":"TextInput_typography-block__tb5ac","typographyInline":"TextInput_typography-inline__DAwAE","typography16":"TextInput_typography-16__FJ4fX","typography14":"TextInput_typography-14__LgtNs","typography12":"TextInput_typography-12__rCAko","typographyPromo":"TextInput_typography-promo__uZQ6- TextInput_typography-header__D2R6e TextInput_typography-block__tb5ac TextInput_typography-inline__DAwAE","modeForm":"TextInput_mode-form__JsK1y","modeInline":"TextInput_mode-inline__QkIod","modeCell":"TextInput_mode-cell__H2C-f","size24":"TextInput_size-24__buGZm","size30":"TextInput_size-30__G0e43","size36":"TextInput_size-36__bOehk","size42":"TextInput_size-42__5Gdbv","size48":"TextInput_size-48__Eb1Xy"};
684
684
 
685
- const defaultSize$8 = '36';
686
- const defaultMode$4 = exports.EditMode.FORM;
687
- function applyTextInputMods(mods) {
688
- return [
689
- textInputCss.root,
690
- textInputCss['size-' + (mods.size || defaultSize$8)],
691
- textInputCss['mode-' + (mods.mode || defaultMode$4)],
692
- ];
693
- }
694
- const TextInput = uuiCore.withMods(uuiComponents.TextInput, applyTextInputMods, (props) => ({
695
- acceptIcon: systemIcons[props.size || defaultSize$8].accept,
696
- cancelIcon: systemIcons[props.size || defaultSize$8].clear,
697
- dropdownIcon: systemIcons[props.size || defaultSize$8].foldingArrow,
698
- }));
699
- const SearchInput = React__namespace.default.forwardRef((props, ref) => {
700
- // analytics events are sending in IEditableDebouncer, so we need to avoid sending events in TextInput
701
- const textInputProps = __rest(props, []);
702
- delete textInputProps.getValueChangeAnalyticsEvent;
703
- return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: iEditable => (React__namespace.default.createElement(TextInput, Object.assign({ icon: systemIcons[props.size || defaultSize$8].search, onCancel: !!props.value ? (() => iEditable.onValueChange('')) : undefined, type: "search", inputMode: "search", ref: ref }, textInputProps, iEditable))) })));
685
+ const defaultSize$8 = '36';
686
+ const defaultMode$4 = exports.EditMode.FORM;
687
+ function applyTextInputMods(mods) {
688
+ return [
689
+ textInputCss.root,
690
+ textInputCss['size-' + (mods.size || defaultSize$8)],
691
+ textInputCss['mode-' + (mods.mode || defaultMode$4)],
692
+ ];
693
+ }
694
+ const TextInput = uuiCore.withMods(uuiComponents.TextInput, applyTextInputMods, (props) => ({
695
+ acceptIcon: systemIcons[props.size || defaultSize$8].accept,
696
+ cancelIcon: systemIcons[props.size || defaultSize$8].clear,
697
+ dropdownIcon: systemIcons[props.size || defaultSize$8].foldingArrow,
698
+ }));
699
+ const SearchInput = React__namespace.default.forwardRef((props, ref) => {
700
+ // analytics events are sending in IEditableDebouncer, so we need to avoid sending events in TextInput
701
+ const textInputProps = __rest(props, []);
702
+ delete textInputProps.getValueChangeAnalyticsEvent;
703
+ return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: iEditable => (React__namespace.default.createElement(TextInput, Object.assign({ icon: systemIcons[props.size || defaultSize$8].search, onCancel: !!props.value ? (() => iEditable.onValueChange('')) : undefined, type: "search", inputMode: "search", ref: ref }, textInputProps, iEditable))) })));
704
704
  });
705
705
 
706
706
  var css$X = {"root":"Accordion_root__fTEyW","mode-block":"Accordion_mode-block__WJ0h9","mode-inline":"Accordion_mode-inline__2zs0-","padding-0":"Accordion_padding-0__GQG7C","padding-6":"Accordion_padding-6__0FFj5","padding-12":"Accordion_padding-12__Bl9rW","padding-18":"Accordion_padding-18__XQdL-","modeBlock":"Accordion_mode-block__WJ0h9","modeInline":"Accordion_mode-inline__2zs0-","padding0":"Accordion_padding-0__GQG7C","padding6":"Accordion_padding-6__0FFj5","padding12":"Accordion_padding-12__Bl9rW","padding18":"Accordion_padding-18__XQdL-"};
707
707
 
708
- function applyAccordionMods(mods) {
709
- return [
710
- css$X.root,
711
- css$X['mode-' + (mods.mode || 'block')],
712
- mods.padding && css$X['padding-' + mods.padding],
713
- ];
714
- }
715
- const Accordion = uuiCore.withMods(uuiComponents.Accordion, applyAccordionMods, (mods) => ({
716
- dropdownIcon: mods.dropdownIcon !== null && systemIcons[mods.mode === 'block' ? '60' : '30'].foldingArrow,
708
+ function applyAccordionMods(mods) {
709
+ return [
710
+ css$X.root,
711
+ css$X['mode-' + (mods.mode || 'block')],
712
+ mods.padding && css$X['padding-' + mods.padding],
713
+ ];
714
+ }
715
+ const Accordion = uuiCore.withMods(uuiComponents.Accordion, applyAccordionMods, (mods) => ({
716
+ dropdownIcon: mods.dropdownIcon !== null && systemIcons[mods.mode === 'block' ? '60' : '30'].foldingArrow,
717
717
  }));
718
718
 
719
719
  var css$W = {"root":"ControlGroup_root__wOZ9-"};
@@ -722,32 +722,32 @@ const ControlGroup = uuiCore.withMods(uuiComponents.ControlGroup, () => [css$W.r
722
722
 
723
723
  var css$V = {"typography-header":"FlexRow_typography-header__2lsWG","typography-block":"FlexRow_typography-block__I0TO6","typography-inline":"FlexRow_typography-inline__br3BL","typography-16":"FlexRow_typography-16__ZDP4a","typography-14":"FlexRow_typography-14__fbJ6t","typography-12":"FlexRow_typography-12__xjb4B","typography-promo":"FlexRow_typography-promo__63NoR FlexRow_typography-header__2lsWG FlexRow_typography-block__I0TO6 FlexRow_typography-inline__br3BL","root":"FlexRow_root__8pevZ","top-shadow":"FlexRow_top-shadow__yLJfa","size-24":"FlexRow_size-24__UC-Ra","size-30":"FlexRow_size-30__KKsZ5","size-36":"FlexRow_size-36__oVCZp","size-42":"FlexRow_size-42__n5Pxh","size-48":"FlexRow_size-48__N-bVM","padding-6":"FlexRow_padding-6__TyXUB","padding-12":"FlexRow_padding-12__NiZVt","padding-18":"FlexRow_padding-18__f-DJ9","padding-24":"FlexRow_padding-24__aVQje","margin-24":"FlexRow_margin-24__W8cmr","margin-12":"FlexRow_margin-12__Tt04l","vPadding-12":"FlexRow_vPadding-12__f3sn6","vPadding-18":"FlexRow_vPadding-18__7Ljl4","vPadding-24":"FlexRow_vPadding-24__nJLBC","vPadding-36":"FlexRow_vPadding-36__7E6EY","vPadding-48":"FlexRow_vPadding-48__zzaPF","spacing-6":"FlexRow_spacing-6__l7a8O","spacing-12":"FlexRow_spacing-12__8ToPe","spacing-18":"FlexRow_spacing-18__QdC3L","border-bottom":"FlexRow_border-bottom__5L1Xk","typographyHeader":"FlexRow_typography-header__2lsWG","typographyBlock":"FlexRow_typography-block__I0TO6","typographyInline":"FlexRow_typography-inline__br3BL","typography16":"FlexRow_typography-16__ZDP4a","typography14":"FlexRow_typography-14__fbJ6t","typography12":"FlexRow_typography-12__xjb4B","typographyPromo":"FlexRow_typography-promo__63NoR FlexRow_typography-header__2lsWG FlexRow_typography-block__I0TO6 FlexRow_typography-inline__br3BL","topShadow":"FlexRow_top-shadow__yLJfa","size24":"FlexRow_size-24__UC-Ra","size30":"FlexRow_size-30__KKsZ5","size36":"FlexRow_size-36__oVCZp","size42":"FlexRow_size-42__n5Pxh","size48":"FlexRow_size-48__N-bVM","padding6":"FlexRow_padding-6__TyXUB","padding12":"FlexRow_padding-12__NiZVt","padding18":"FlexRow_padding-18__f-DJ9","padding24":"FlexRow_padding-24__aVQje","margin24":"FlexRow_margin-24__W8cmr","margin12":"FlexRow_margin-12__Tt04l","vPadding12":"FlexRow_vPadding-12__f3sn6","vPadding18":"FlexRow_vPadding-18__7Ljl4","vPadding24":"FlexRow_vPadding-24__nJLBC","vPadding36":"FlexRow_vPadding-36__7E6EY","vPadding48":"FlexRow_vPadding-48__zzaPF","spacing6":"FlexRow_spacing-6__l7a8O","spacing12":"FlexRow_spacing-12__8ToPe","spacing18":"FlexRow_spacing-18__QdC3L","borderBottom":"FlexRow_border-bottom__5L1Xk"};
724
724
 
725
- const FlexCell = uuiCore.withMods(uuiComponents.FlexCell, props => [
726
- css$V.flexCell,
725
+ const FlexCell = uuiCore.withMods(uuiComponents.FlexCell, props => [
726
+ css$V.flexCell,
727
727
  ]);
728
728
 
729
- const FlexRow = uuiCore.withMods(uuiComponents.FlexRow, props => {
730
- return [
731
- css$V.root,
732
- props.size !== null && css$V['size-' + (props.size || '36')],
733
- props.padding && css$V['padding-' + props.padding],
734
- props.vPadding && css$V['vPadding-' + props.vPadding],
735
- props.margin && css$V['margin-' + props.margin],
736
- props.topShadow && css$V.topShadow,
737
- props.borderBottom && css$V['border-bottom'],
738
- props.spacing && css$V['spacing-' + props.spacing],
739
- ];
729
+ const FlexRow = uuiCore.withMods(uuiComponents.FlexRow, props => {
730
+ return [
731
+ css$V.root,
732
+ props.size !== null && css$V['size-' + (props.size || '36')],
733
+ props.padding && css$V['padding-' + props.padding],
734
+ props.vPadding && css$V['vPadding-' + props.vPadding],
735
+ props.margin && css$V['margin-' + props.margin],
736
+ props.topShadow && css$V.topShadow,
737
+ props.borderBottom && css$V['border-bottom'],
738
+ props.spacing && css$V['spacing-' + props.spacing],
739
+ ];
740
740
  });
741
741
 
742
742
  const FlexSpacer = uuiComponents.FlexSpacer;
743
743
 
744
744
  var css$U = {"root":"Panel_root__Ue9u5","margin-24":"Panel_margin-24__EZfwq","padding-12":"Panel_padding-12__zmnQV","padding-24":"Panel_padding-24__mOtka","shadow":"Panel_shadow__lMI9N","margin24":"Panel_margin-24__EZfwq","padding12":"Panel_padding-12__zmnQV","padding24":"Panel_padding-24__mOtka"};
745
745
 
746
- const Panel = uuiCore.withMods(uuiComponents.VPanel, props => [
747
- 'uui-panel',
748
- css$U.root,
749
- props.shadow && css$U.shadow,
750
- props.margin && css$U['margin-' + props.margin],
746
+ const Panel = uuiCore.withMods(uuiComponents.VPanel, props => [
747
+ 'uui-panel',
748
+ css$U.root,
749
+ props.shadow && css$U.shadow,
750
+ props.margin && css$U['margin-' + props.margin],
751
751
  ]);
752
752
 
753
753
  var _path$B;
@@ -832,331 +832,331 @@ var ForwardRef$z = /*#__PURE__*/React.forwardRef(SvgNavigationClose24$1);
832
832
 
833
833
  var css$T = {"root":"Alert_root__o9-Bu","icon-wrapper":"Alert_icon-wrapper__MVBsA","alert-wrapper":"Alert_alert-wrapper__QuJWm","action-wrapper":"Alert_action-wrapper__-z2l9","action-link":"Alert_action-link__Hj-D2","close-icon":"Alert_close-icon__brCPM","main-path":"Alert_main-path__jHhJZ","content":"Alert_content__ae2CO","iconWrapper":"Alert_icon-wrapper__MVBsA","alertWrapper":"Alert_alert-wrapper__QuJWm","actionWrapper":"Alert_action-wrapper__-z2l9","actionLink":"Alert_action-link__Hj-D2","closeIcon":"Alert_close-icon__brCPM","mainPath":"Alert_main-path__jHhJZ"};
834
834
 
835
- const Alert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ role: "alert", ref: ref, className: cx__default.default(css$T.alertWrapper, `alert-${props.color || 'default'}`, css$T.root, props.cx) }, props.rawProps),
836
- React__namespace.createElement("div", { className: css$T.mainPath },
837
- props.icon && React__namespace.createElement("div", { className: css$T.iconWrapper },
838
- React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$T.actionIcon })),
839
- React__namespace.createElement("div", { className: css$T.content },
840
- props.children,
841
- props.actions && React__namespace.createElement("div", { className: css$T.actionWrapper }, props.actions.map(action => (React__namespace.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$T.actionLink, size: '24' }))))),
842
- props.onClose && React__namespace.createElement(IconButton, { icon: ForwardRef$z, color: 'default', onClick: props.onClose, cx: css$T.closeIcon })))));
843
- const WarningAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$C, color: 'warning', ref: ref }, props))));
844
- const SuccessAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$D, color: 'success', ref: ref }, props))));
845
- const HintAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$A, color: 'info', ref: ref }, props))));
835
+ const Alert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ role: "alert", ref: ref, className: cx__default.default(css$T.alertWrapper, `alert-${props.color || 'default'}`, css$T.root, props.cx) }, props.rawProps),
836
+ React__namespace.createElement("div", { className: css$T.mainPath },
837
+ props.icon && React__namespace.createElement("div", { className: css$T.iconWrapper },
838
+ React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$T.actionIcon })),
839
+ React__namespace.createElement("div", { className: css$T.content },
840
+ props.children,
841
+ props.actions && React__namespace.createElement("div", { className: css$T.actionWrapper }, props.actions.map(action => (React__namespace.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$T.actionLink, size: '24' }))))),
842
+ props.onClose && React__namespace.createElement(IconButton, { icon: ForwardRef$z, color: 'default', onClick: props.onClose, cx: css$T.closeIcon })))));
843
+ const WarningAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$C, color: 'warning', ref: ref }, props))));
844
+ const SuccessAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$D, color: 'success', ref: ref }, props))));
845
+ const HintAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$A, color: 'info', ref: ref }, props))));
846
846
  const ErrorAlert = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(Alert, Object.assign({ icon: ForwardRef$B, color: 'error', ref: ref }, props))));
847
847
 
848
- class Dropdown extends React__namespace.Component {
849
- render() {
850
- return (React__namespace.createElement(uuiComponents.Dropdown, Object.assign({}, this.props)));
851
- }
848
+ class Dropdown extends React__namespace.Component {
849
+ render() {
850
+ return (React__namespace.createElement(uuiComponents.Dropdown, Object.assign({}, this.props)));
851
+ }
852
852
  }
853
853
 
854
854
  var css$S = {"root":"DropdownContainer_root__0tHS6"};
855
855
 
856
- function applyDropdownContainerMods(mods) {
857
- return [
858
- css$S.root,
859
- mods.vPadding && `vPadding-${mods.vPadding}`,
860
- mods.padding && `padding-${mods.padding}`,
861
- ];
862
- }
856
+ function applyDropdownContainerMods(mods) {
857
+ return [
858
+ css$S.root,
859
+ mods.vPadding && `vPadding-${mods.vPadding}`,
860
+ mods.padding && `padding-${mods.padding}`,
861
+ ];
862
+ }
863
863
  const DropdownContainer = uuiCore.withMods(uuiComponents.DropdownContainer, applyDropdownContainerMods);
864
864
 
865
865
  var css$R = {"typography-header":"DropdownMenu_typography-header__d5Gl6","typography-block":"DropdownMenu_typography-block__-l-b3","typography-inline":"DropdownMenu_typography-inline__QTz-3","typography-16":"DropdownMenu_typography-16__FrdMO","typography-14":"DropdownMenu_typography-14__cx4-6","typography-12":"DropdownMenu_typography-12__PDMu0","typography-promo":"DropdownMenu_typography-promo__-BGfx DropdownMenu_typography-header__d5Gl6 DropdownMenu_typography-block__-l-b3 DropdownMenu_typography-inline__QTz-3","menuRoot":"DropdownMenu_menuRoot__gRW4S","bodyRoot":"DropdownMenu_bodyRoot__hAgqI","submenuRootItem":"DropdownMenu_submenuRootItem__52Bxy","iconAfter":"DropdownMenu_iconAfter__Hbijr","iconCheck":"DropdownMenu_iconCheck__TtmI6","splitterRoot":"DropdownMenu_splitterRoot__mJGU2","splitter":"DropdownMenu_splitter__7AuFo","headerRoot":"DropdownMenu_headerRoot__iEVUM","itemRoot":"DropdownMenu_itemRoot__mBMPU","icon":"DropdownMenu_icon__YE2-L","link":"DropdownMenu_link__pgNjs","typographyHeader":"DropdownMenu_typography-header__d5Gl6","typographyBlock":"DropdownMenu_typography-block__-l-b3","typographyInline":"DropdownMenu_typography-inline__QTz-3","typography16":"DropdownMenu_typography-16__FrdMO","typography14":"DropdownMenu_typography-14__cx4-6","typography12":"DropdownMenu_typography-12__PDMu0","typographyPromo":"DropdownMenu_typography-promo__-BGfx DropdownMenu_typography-header__d5Gl6 DropdownMenu_typography-block__-l-b3 DropdownMenu_typography-inline__QTz-3"};
866
866
 
867
- const icons = systemIcons['36'];
868
- exports.IDropdownControlKeys = void 0;
869
- (function (IDropdownControlKeys) {
870
- IDropdownControlKeys["ENTER"] = "Enter";
871
- IDropdownControlKeys["ESCAPE"] = "Escape";
872
- IDropdownControlKeys["LEFT_ARROW"] = "ArrowLeft";
873
- IDropdownControlKeys["RIGHT_ARROW"] = "ArrowRight";
874
- IDropdownControlKeys["UP_ARROW"] = "ArrowUp";
875
- IDropdownControlKeys["DOWN_ARROW"] = "ArrowDown";
876
- })(exports.IDropdownControlKeys || (exports.IDropdownControlKeys = {}));
877
- const DropdownMenuContainer = (props) => {
878
- const menuRef = React.useRef(null);
879
- const [currentlyFocused, setFocused] = React.useState(-1);
880
- const menuItems = menuRef.current ? Array.from(menuRef.current.querySelectorAll(`[role="menuitem"]:not(.${uuiCore.uuiMod.disabled})`)) : [];
881
- React.useEffect(() => {
882
- var _a;
883
- (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.focus();
884
- }, [menuRef.current]);
885
- const changeFocus = (nextFocusedIndex) => {
886
- if (menuItems.length > 0) {
887
- setFocused(nextFocusedIndex);
888
- menuItems[nextFocusedIndex].focus();
889
- }
890
- };
891
- const handleArrowKeys = (e) => {
892
- e.stopPropagation();
893
- const lastMenuItemsIndex = menuItems.length - 1;
894
- if (e.key === exports.IDropdownControlKeys.UP_ARROW) {
895
- changeFocus(currentlyFocused > 0 ? currentlyFocused - 1 : lastMenuItemsIndex);
896
- }
897
- else if (e.key === exports.IDropdownControlKeys.DOWN_ARROW) {
898
- changeFocus(currentlyFocused < lastMenuItemsIndex ? currentlyFocused + 1 : 0);
899
- }
900
- else if (e.key === props.closeOnKey && props.onClose) {
901
- props.onClose();
902
- }
903
- };
904
- return (React__namespace.default.createElement(FocusLock__default.default, { as: "menu", className: css$R.menuRoot, returnFocus: true, autoFocus: false, ref: menuRef, lockProps: { onKeyDown: handleArrowKeys, tabIndex: -1 } },
905
- React__namespace.default.createElement(uuiComponents.DropdownContainer, Object.assign({}, props, { rawProps: { tabIndex: -1 } }))));
906
- };
907
- const DropdownMenuBody = uuiCore.withMods(DropdownMenuContainer, () => [css$R.bodyRoot], ({ style }) => ({ style }));
908
- const DropdownMenuButton = React__namespace.default.forwardRef((props, ref) => {
909
- const context = React.useContext(uuiCore.UuiContext);
910
- const { icon, iconPosition, onIconClick, caption, isDisabled, isSelected, isActive, link, href, onClick, toggleDropdownOpening, isDropdown, isOpen, target, } = props;
911
- const handleClick = (event) => {
912
- if (isDisabled || !onClick)
913
- return;
914
- onClick(event);
915
- context.uuiAnalytics.sendEvent(props.clickAnalyticsEvent);
916
- };
917
- const handleOpenDropdown = (event) => {
918
- if (event.key === exports.IDropdownControlKeys.RIGHT_ARROW && isDropdown) {
919
- toggleDropdownOpening(true);
920
- }
921
- else if (event.key === exports.IDropdownControlKeys.ENTER && onClick) {
922
- onClick(event);
923
- }
924
- };
925
- const getMenuButtonContent = () => {
926
- const isIconBefore = Boolean(icon && iconPosition !== "right");
927
- const isIconAfter = Boolean(icon && iconPosition === "right");
928
- const iconElement = React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'info' : 'default', onClick: onIconClick, cx: uuiCore.cx(css$R.icon, iconPosition === "right" ? css$R.iconAfter : css$R.iconBefore) });
929
- return React__namespace.default.createElement(React__namespace.default.Fragment, null,
930
- isIconBefore && iconElement,
931
- React__namespace.default.createElement(uuiComponents.Text, { cx: css$R.caption }, caption),
932
- isIconAfter && React__namespace.default.createElement(React__namespace.default.Fragment, null,
933
- React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
934
- iconElement));
935
- };
936
- const isAnchor = Boolean(link || href);
937
- const itemClassNames = uuiCore.cx(props.cx, css$R.itemRoot, isDisabled && uuiCore.uuiMod.disabled, isActive && uuiCore.uuiMod.active, isOpen && uuiCore.uuiMod.opened);
938
- return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$R.link, itemClassNames), link: link, href: href, rawProps: { role: 'menuitem', tabIndex: isDisabled ? -1 : 0 }, onClick: handleClick, isDisabled: isDisabled, forwardedRef: ref, target: target }, getMenuButtonContent())) : (React__namespace.default.createElement(uuiComponents.FlexRow, { rawProps: {
939
- tabIndex: isDisabled ? -1 : 0,
940
- role: 'menuitem',
941
- onKeyDown: isDisabled ? null : handleOpenDropdown,
942
- }, cx: itemClassNames, onClick: handleClick, ref: ref },
943
- getMenuButtonContent(),
944
- isSelected && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icons.accept, cx: css$R.selectedCheckmark })));
945
- });
946
- DropdownMenuButton.displayName = 'DropdownMenuButton';
947
- const DropdownMenuSplitter = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$R.splitterRoot) },
948
- React__namespace.default.createElement("hr", { className: css$R.splitter })));
949
- const DropdownMenuHeader = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$R.headerRoot) },
950
- React__namespace.default.createElement("span", { className: css$R.header }, props.caption)));
951
- const DropdownSubMenu = (props) => {
952
- return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", placement: "right-start", renderBody: (dropdownProps) => (React__namespace.default.createElement(DropdownMenuBody, Object.assign({ closeOnKey: exports.IDropdownControlKeys.LEFT_ARROW }, props, dropdownProps))), renderTarget: (_a) => {
953
- var { toggleDropdownOpening } = _a, targetProps = __rest(_a, ["toggleDropdownOpening"]);
954
- return (React__namespace.default.createElement(DropdownMenuButton, Object.assign({ cx: uuiCore.cx(css$R.submenuRootItem), icon: icons.foldingArrow, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening }, props, targetProps)));
955
- } }));
956
- };
957
- const DropdownMenuSwitchButton = (props) => {
958
- const context = React.useContext(uuiCore.UuiContext);
959
- const { icon, caption, isDisabled, isSelected, onValueChange, } = props;
960
- const onHandleValueChange = (value) => {
961
- if (isDisabled || !onValueChange)
962
- return;
963
- onValueChange(value);
964
- context.uuiAnalytics.sendEvent(props.clickAnalyticsEvent);
965
- };
966
- const handleKeySelect = (e) => {
967
- if (e.key === exports.IDropdownControlKeys.ENTER) {
968
- onHandleValueChange(!isSelected);
969
- }
970
- };
971
- return (React__namespace.default.createElement(uuiComponents.FlexRow, { cx: uuiCore.cx(props.cx, css$R.itemRoot, isDisabled && uuiCore.uuiMod.disabled), onClick: () => onHandleValueChange(!isSelected), rawProps: { role: 'menuitem', onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 } },
972
- icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$R.iconBefore }),
973
- React__namespace.default.createElement(uuiComponents.Text, { cx: css$R.caption }, caption),
974
- React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
975
- React__namespace.default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
867
+ const icons = systemIcons['36'];
868
+ exports.IDropdownControlKeys = void 0;
869
+ (function (IDropdownControlKeys) {
870
+ IDropdownControlKeys["ENTER"] = "Enter";
871
+ IDropdownControlKeys["ESCAPE"] = "Escape";
872
+ IDropdownControlKeys["LEFT_ARROW"] = "ArrowLeft";
873
+ IDropdownControlKeys["RIGHT_ARROW"] = "ArrowRight";
874
+ IDropdownControlKeys["UP_ARROW"] = "ArrowUp";
875
+ IDropdownControlKeys["DOWN_ARROW"] = "ArrowDown";
876
+ })(exports.IDropdownControlKeys || (exports.IDropdownControlKeys = {}));
877
+ const DropdownMenuContainer = (props) => {
878
+ const menuRef = React.useRef(null);
879
+ const [currentlyFocused, setFocused] = React.useState(-1);
880
+ const menuItems = menuRef.current ? Array.from(menuRef.current.querySelectorAll(`[role="menuitem"]:not(.${uuiCore.uuiMod.disabled})`)) : [];
881
+ React.useEffect(() => {
882
+ var _a;
883
+ (_a = menuRef.current) === null || _a === void 0 ? void 0 : _a.focus();
884
+ }, [menuRef.current]);
885
+ const changeFocus = (nextFocusedIndex) => {
886
+ if (menuItems.length > 0) {
887
+ setFocused(nextFocusedIndex);
888
+ menuItems[nextFocusedIndex].focus();
889
+ }
890
+ };
891
+ const handleArrowKeys = (e) => {
892
+ e.stopPropagation();
893
+ const lastMenuItemsIndex = menuItems.length - 1;
894
+ if (e.key === exports.IDropdownControlKeys.UP_ARROW) {
895
+ changeFocus(currentlyFocused > 0 ? currentlyFocused - 1 : lastMenuItemsIndex);
896
+ }
897
+ else if (e.key === exports.IDropdownControlKeys.DOWN_ARROW) {
898
+ changeFocus(currentlyFocused < lastMenuItemsIndex ? currentlyFocused + 1 : 0);
899
+ }
900
+ else if (e.key === props.closeOnKey && props.onClose) {
901
+ props.onClose();
902
+ }
903
+ };
904
+ return (React__namespace.default.createElement(FocusLock__default.default, { as: "menu", className: css$R.menuRoot, returnFocus: true, autoFocus: false, ref: menuRef, lockProps: { onKeyDown: handleArrowKeys, tabIndex: -1 } },
905
+ React__namespace.default.createElement(uuiComponents.DropdownContainer, Object.assign({}, props, { rawProps: { tabIndex: -1 } }))));
906
+ };
907
+ const DropdownMenuBody = uuiCore.withMods(DropdownMenuContainer, () => [css$R.bodyRoot], ({ style }) => ({ style }));
908
+ const DropdownMenuButton = React__namespace.default.forwardRef((props, ref) => {
909
+ const context = React.useContext(uuiCore.UuiContext);
910
+ const { icon, iconPosition, onIconClick, caption, isDisabled, isSelected, isActive, link, href, onClick, toggleDropdownOpening, isDropdown, isOpen, target, } = props;
911
+ const handleClick = (event) => {
912
+ if (isDisabled || !onClick)
913
+ return;
914
+ onClick(event);
915
+ context.uuiAnalytics.sendEvent(props.clickAnalyticsEvent);
916
+ };
917
+ const handleOpenDropdown = (event) => {
918
+ if (event.key === exports.IDropdownControlKeys.RIGHT_ARROW && isDropdown) {
919
+ toggleDropdownOpening(true);
920
+ }
921
+ else if (event.key === exports.IDropdownControlKeys.ENTER && onClick) {
922
+ onClick(event);
923
+ }
924
+ };
925
+ const getMenuButtonContent = () => {
926
+ const isIconBefore = Boolean(icon && iconPosition !== "right");
927
+ const isIconAfter = Boolean(icon && iconPosition === "right");
928
+ const iconElement = React__namespace.default.createElement(IconButton, { icon: icon, color: isActive ? 'info' : 'default', onClick: onIconClick, cx: uuiCore.cx(css$R.icon, iconPosition === "right" ? css$R.iconAfter : css$R.iconBefore) });
929
+ return React__namespace.default.createElement(React__namespace.default.Fragment, null,
930
+ isIconBefore && iconElement,
931
+ React__namespace.default.createElement(uuiComponents.Text, { cx: css$R.caption }, caption),
932
+ isIconAfter && React__namespace.default.createElement(React__namespace.default.Fragment, null,
933
+ React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
934
+ iconElement));
935
+ };
936
+ const isAnchor = Boolean(link || href);
937
+ const itemClassNames = uuiCore.cx(props.cx, css$R.itemRoot, isDisabled && uuiCore.uuiMod.disabled, isActive && uuiCore.uuiMod.active, isOpen && uuiCore.uuiMod.opened);
938
+ return isAnchor ? (React__namespace.default.createElement(uuiComponents.Anchor, { cx: uuiCore.cx(css$R.link, itemClassNames), link: link, href: href, rawProps: { role: 'menuitem', tabIndex: isDisabled ? -1 : 0 }, onClick: handleClick, isDisabled: isDisabled, forwardedRef: ref, target: target }, getMenuButtonContent())) : (React__namespace.default.createElement(uuiComponents.FlexRow, { rawProps: {
939
+ tabIndex: isDisabled ? -1 : 0,
940
+ role: 'menuitem',
941
+ onKeyDown: isDisabled ? null : handleOpenDropdown,
942
+ }, cx: itemClassNames, onClick: handleClick, ref: ref },
943
+ getMenuButtonContent(),
944
+ isSelected && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icons.accept, cx: css$R.selectedCheckmark })));
945
+ });
946
+ DropdownMenuButton.displayName = 'DropdownMenuButton';
947
+ const DropdownMenuSplitter = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$R.splitterRoot) },
948
+ React__namespace.default.createElement("hr", { className: css$R.splitter })));
949
+ const DropdownMenuHeader = (props) => (React__namespace.default.createElement("div", { className: uuiCore.cx(props.cx, css$R.headerRoot) },
950
+ React__namespace.default.createElement("span", { className: css$R.header }, props.caption)));
951
+ const DropdownSubMenu = (props) => {
952
+ return (React__namespace.default.createElement(uuiComponents.Dropdown, { openOnHover: props.openOnHover || true, closeOnMouseLeave: "boundary", placement: "right-start", renderBody: (dropdownProps) => (React__namespace.default.createElement(DropdownMenuBody, Object.assign({ closeOnKey: exports.IDropdownControlKeys.LEFT_ARROW }, props, dropdownProps))), renderTarget: (_a) => {
953
+ var { toggleDropdownOpening } = _a, targetProps = __rest(_a, ["toggleDropdownOpening"]);
954
+ return (React__namespace.default.createElement(DropdownMenuButton, Object.assign({ cx: uuiCore.cx(css$R.submenuRootItem), icon: icons.foldingArrow, iconPosition: "right", isDropdown: true, toggleDropdownOpening: toggleDropdownOpening }, props, targetProps)));
955
+ } }));
956
+ };
957
+ const DropdownMenuSwitchButton = (props) => {
958
+ const context = React.useContext(uuiCore.UuiContext);
959
+ const { icon, caption, isDisabled, isSelected, onValueChange, } = props;
960
+ const onHandleValueChange = (value) => {
961
+ if (isDisabled || !onValueChange)
962
+ return;
963
+ onValueChange(value);
964
+ context.uuiAnalytics.sendEvent(props.clickAnalyticsEvent);
965
+ };
966
+ const handleKeySelect = (e) => {
967
+ if (e.key === exports.IDropdownControlKeys.ENTER) {
968
+ onHandleValueChange(!isSelected);
969
+ }
970
+ };
971
+ return (React__namespace.default.createElement(uuiComponents.FlexRow, { cx: uuiCore.cx(props.cx, css$R.itemRoot, isDisabled && uuiCore.uuiMod.disabled), onClick: () => onHandleValueChange(!isSelected), rawProps: { role: 'menuitem', onKeyDown: handleKeySelect, tabIndex: isDisabled ? -1 : 0 } },
972
+ icon && React__namespace.default.createElement(uuiComponents.IconContainer, { icon: icon, cx: css$R.iconBefore }),
973
+ React__namespace.default.createElement(uuiComponents.Text, { cx: css$R.caption }, caption),
974
+ React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
975
+ React__namespace.default.createElement(Switch, { value: isSelected, tabIndex: -1, onValueChange: onHandleValueChange })));
976
976
  };
977
977
 
978
978
  var css$Q = {"root":"Text_root__iUAW9"};
979
979
 
980
980
  var css$P = {"line-height-12":"text-layout_line-height-12__-fXrz","line-height-18":"text-layout_line-height-18__kfeYe","line-height-24":"text-layout_line-height-24__VmJFi","line-height-30":"text-layout_line-height-30__C4k89","font-size-10":"text-layout_font-size-10__U-DE-","font-size-12":"text-layout_font-size-12__1WdLm","font-size-14":"text-layout_font-size-14__5I7px","font-size-16":"text-layout_font-size-16__loUuU","font-size-18":"text-layout_font-size-18__PvhrF","font-size-24":"text-layout_font-size-24__JsYUV","v-padding-2":"text-layout_v-padding-2__-bGuG","v-padding-3":"text-layout_v-padding-3__ImU4D","v-padding-5":"text-layout_v-padding-5__el2DC","v-padding-6":"text-layout_v-padding-6__4QshS","v-padding-8":"text-layout_v-padding-8__CKQZ6","v-padding-9":"text-layout_v-padding-9__8cSJ-","v-padding-11":"text-layout_v-padding-11__kJwOK","v-padding-12":"text-layout_v-padding-12__J6PjS","v-padding-14":"text-layout_v-padding-14__TgJs7","v-padding-15":"text-layout_v-padding-15__kVl-D","v-padding-17":"text-layout_v-padding-17__065AA","v-padding-18":"text-layout_v-padding-18__hxDYP","v-padding-23":"text-layout_v-padding-23__44pE2","v-padding-24":"text-layout_v-padding-24__gxRAs","lineHeight12":"text-layout_line-height-12__-fXrz","lineHeight18":"text-layout_line-height-18__kfeYe","lineHeight24":"text-layout_line-height-24__VmJFi","lineHeight30":"text-layout_line-height-30__C4k89","fontSize10":"text-layout_font-size-10__U-DE-","fontSize12":"text-layout_font-size-12__1WdLm","fontSize14":"text-layout_font-size-14__5I7px","fontSize16":"text-layout_font-size-16__loUuU","fontSize18":"text-layout_font-size-18__PvhrF","fontSize24":"text-layout_font-size-24__JsYUV","vPadding2":"text-layout_v-padding-2__-bGuG","vPadding3":"text-layout_v-padding-3__ImU4D","vPadding5":"text-layout_v-padding-5__el2DC","vPadding6":"text-layout_v-padding-6__4QshS","vPadding8":"text-layout_v-padding-8__CKQZ6","vPadding9":"text-layout_v-padding-9__8cSJ-","vPadding11":"text-layout_v-padding-11__kJwOK","vPadding12":"text-layout_v-padding-12__J6PjS","vPadding14":"text-layout_v-padding-14__TgJs7","vPadding15":"text-layout_v-padding-15__kVl-D","vPadding17":"text-layout_v-padding-17__065AA","vPadding18":"text-layout_v-padding-18__hxDYP","vPadding23":"text-layout_v-padding-23__44pE2","vPadding24":"text-layout_v-padding-24__gxRAs"};
981
981
 
982
- const defaultTextSettings = {
983
- 18: { lineHeight: 12, fontSize: 10 },
984
- 24: { lineHeight: 18, fontSize: 12 },
985
- 30: { lineHeight: 18, fontSize: 14 },
986
- 36: { lineHeight: 18, fontSize: 14 },
987
- 42: { lineHeight: 24, fontSize: 16 },
988
- 48: { lineHeight: 24, fontSize: 16 },
989
- 60: { lineHeight: 30, fontSize: 24 },
990
- };
991
- function getTextClasses(props, border) {
992
- if (props.size === 'none') {
993
- return [
994
- css$P['line-height-' + props.lineHeight],
995
- css$P['font-size-' + props.fontSize],
996
- ];
997
- }
998
- const setting = {
999
- size: props.size,
1000
- lineHeight: props.lineHeight || defaultTextSettings[props.size].lineHeight,
1001
- fontSize: props.fontSize || defaultTextSettings[props.size].fontSize,
1002
- };
1003
- const vPadding = (+setting.size - +setting.lineHeight - (border ? 2 : 0)) / 2;
1004
- return [
1005
- css$P['line-height-' + setting.lineHeight],
1006
- css$P['font-size-' + setting.fontSize],
1007
- css$P['v-padding-' + vPadding],
1008
- ];
982
+ const defaultTextSettings = {
983
+ 18: { lineHeight: 12, fontSize: 10 },
984
+ 24: { lineHeight: 18, fontSize: 12 },
985
+ 30: { lineHeight: 18, fontSize: 14 },
986
+ 36: { lineHeight: 18, fontSize: 14 },
987
+ 42: { lineHeight: 24, fontSize: 16 },
988
+ 48: { lineHeight: 24, fontSize: 16 },
989
+ 60: { lineHeight: 30, fontSize: 24 },
990
+ };
991
+ function getTextClasses(props, border) {
992
+ if (props.size === 'none') {
993
+ return [
994
+ css$P['line-height-' + props.lineHeight],
995
+ css$P['font-size-' + props.fontSize],
996
+ ];
997
+ }
998
+ const setting = {
999
+ size: props.size,
1000
+ lineHeight: props.lineHeight || defaultTextSettings[props.size].lineHeight,
1001
+ fontSize: props.fontSize || defaultTextSettings[props.size].fontSize,
1002
+ };
1003
+ const vPadding = (+setting.size - +setting.lineHeight - (border ? 2 : 0)) / 2;
1004
+ return [
1005
+ css$P['line-height-' + setting.lineHeight],
1006
+ css$P['font-size-' + setting.fontSize],
1007
+ css$P['v-padding-' + vPadding],
1008
+ ];
1009
1009
  }
1010
1010
 
1011
- function applyTextMods(mods) {
1012
- const textClasses = getTextClasses({
1013
- size: mods.size || '36',
1014
- lineHeight: mods.lineHeight,
1015
- fontSize: mods.fontSize,
1016
- }, false);
1017
- return [
1018
- `uui-font-${mods.font || 'regular'}`,
1019
- `uui-text-${mods.color || 'primary'}`,
1020
- css$Q.root,
1021
- ].concat(textClasses);
1022
- }
1011
+ function applyTextMods(mods) {
1012
+ const textClasses = getTextClasses({
1013
+ size: mods.size || '36',
1014
+ lineHeight: mods.lineHeight,
1015
+ fontSize: mods.fontSize,
1016
+ }, false);
1017
+ return [
1018
+ `uui-font-${mods.font || 'regular'}`,
1019
+ `uui-text-${mods.color || 'primary'}`,
1020
+ css$Q.root,
1021
+ ].concat(textClasses);
1022
+ }
1023
1023
  const Text = uuiCore.withMods(uuiComponents.Text, applyTextMods);
1024
1024
 
1025
1025
  var css$O = {"container":"TextPlaceholder_container__Jn60D","loading-word":"TextPlaceholder_loading-word__22WpS","animated-loading":"TextPlaceholder_animated-loading__ao75r","skeleton_loading":"TextPlaceholder_skeleton_loading__NzV8h","loadingWord":"TextPlaceholder_loading-word__22WpS","animatedLoading":"TextPlaceholder_animated-loading__ao75r","skeletonLoading":"TextPlaceholder_skeleton_loading__NzV8h"};
1026
1026
 
1027
- const TextPlaceholder = (props) => {
1028
- const pattern = `&nbsp;`;
1029
- const text = React__namespace.useMemo(() => {
1030
- const words = [];
1031
- for (let i = 0; i < (props.wordsCount || 1); i++) {
1032
- let lengthWord = Math.floor(Math.random() * 10 + 8);
1033
- words.push(pattern.repeat(lengthWord));
1034
- }
1035
- return words;
1036
- }, [props.wordsCount]);
1037
- return (React__namespace.createElement("div", Object.assign({ "aria-busy": true, className: css$O.container }, props.rawProps), text.map((it, index) => (React__namespace.createElement("span", { key: index, className: cx__default.default([
1038
- props.cx,
1039
- css$O.loadingWord,
1040
- !props.isNotAnimated && css$O.animatedLoading,
1041
- ]), dangerouslySetInnerHTML: { __html: it } })))));
1027
+ const TextPlaceholder = (props) => {
1028
+ const pattern = `&nbsp;`;
1029
+ const text = React__namespace.useMemo(() => {
1030
+ const words = [];
1031
+ for (let i = 0; i < (props.wordsCount || 1); i++) {
1032
+ let lengthWord = Math.floor(Math.random() * 10 + 8);
1033
+ words.push(pattern.repeat(lengthWord));
1034
+ }
1035
+ return words;
1036
+ }, [props.wordsCount]);
1037
+ return (React__namespace.createElement("div", Object.assign({ "aria-busy": true, className: css$O.container }, props.rawProps), text.map((it, index) => (React__namespace.createElement("span", { key: index, className: cx__default.default([
1038
+ props.cx,
1039
+ css$O.loadingWord,
1040
+ !props.isNotAnimated && css$O.animatedLoading,
1041
+ ]), dangerouslySetInnerHTML: { __html: it } })))));
1042
1042
  };
1043
1043
 
1044
1044
  var style = {"typography-header":"typography_typography-header__xCe-Q","typography-block":"typography_typography-block__xvrwC","typography-inline":"typography_typography-inline__EbQN2","typography-16":"typography_typography-16__4OCWa","typography-14":"typography_typography-14__4Rcyl","typography-12":"typography_typography-12__2BEhy","typography-promo":"typography_typography-promo__P68Jv typography_typography-header__xCe-Q typography_typography-block__xvrwC typography_typography-inline__EbQN2","typographyHeader":"typography_typography-header__xCe-Q","typographyBlock":"typography_typography-block__xvrwC","typographyInline":"typography_typography-inline__EbQN2","typography16":"typography_typography-16__4OCWa","typography14":"typography_typography-14__4Rcyl","typography12":"typography_typography-12__2BEhy","typographyPromo":"typography_typography-promo__P68Jv typography_typography-header__xCe-Q typography_typography-block__xvrwC typography_typography-inline__EbQN2"};
1045
1045
 
1046
- const RichTextView = uuiCore.withMods(uuiComponents.RichTextView, (mods) => [
1047
- style.typographyPromo,
1048
- style['typography-' + (mods.size || '14')],
1046
+ const RichTextView = uuiCore.withMods(uuiComponents.RichTextView, (mods) => [
1047
+ style.typographyPromo,
1048
+ style['typography-' + (mods.size || '14')],
1049
1049
  ]);
1050
1050
 
1051
1051
  var css$N = {"typography-header":"Modals_typography-header__Jwt-p","typography-block":"Modals_typography-block__szftG","typography-inline":"Modals_typography-inline__ZDBk-","typography-16":"Modals_typography-16__5x7rd","typography-14":"Modals_typography-14__ZF20L","typography-12":"Modals_typography-12__4fSpR","typography-promo":"Modals_typography-promo__JbRIA Modals_typography-header__Jwt-p Modals_typography-block__szftG Modals_typography-inline__ZDBk-","modal-blocker":"Modals_modal-blocker__nCAZ7","animateModalBlocker":"Modals_animateModalBlocker__S-4dL","modal":"Modals_modal__m41wI","modal-footer":"Modals_modal-footer__gg-90","border-top":"Modals_border-top__cfzhv","modal-header":"Modals_modal-header__8aswP","typographyHeader":"Modals_typography-header__Jwt-p","typographyBlock":"Modals_typography-block__szftG","typographyInline":"Modals_typography-inline__ZDBk-","typography16":"Modals_typography-16__5x7rd","typography14":"Modals_typography-14__ZF20L","typography12":"Modals_typography-12__4fSpR","typographyPromo":"Modals_typography-promo__JbRIA Modals_typography-header__Jwt-p Modals_typography-block__szftG Modals_typography-inline__ZDBk-","modalBlocker":"Modals_modal-blocker__nCAZ7","modalFooter":"Modals_modal-footer__gg-90","borderTop":"Modals_border-top__cfzhv","modalHeader":"Modals_modal-header__8aswP"};
1052
1052
 
1053
- const ModalBlocker = uuiCore.withMods(uuiComponents.ModalBlocker, () => [
1054
- css$N.modalBlocker,
1055
- ]);
1056
- const ModalWindow = uuiCore.withMods(uuiComponents.ModalWindow, () => [css$N.modal], props => ({ rawProps: {
1057
- style: {
1058
- width: `${props.width || 480}px`,
1059
- height: props.height ? `${props.height}px` : 'auto',
1060
- },
1061
- },
1062
- }));
1063
- class ModalHeader extends React__namespace.Component {
1064
- render() {
1065
- return (React__namespace.createElement(FlexRow, { padding: this.props.padding || '24', vPadding: '12', borderBottom: this.props.borderBottom, cx: [css$N.modalHeader, this.props.cx], spacing: '12', rawProps: this.props.rawProps },
1066
- this.props.title && React__namespace.createElement(Text, { size: '48', fontSize: '18', font: 'semibold' }, this.props.title),
1067
- this.props.children,
1068
- this.props.onClose && React__namespace.createElement(FlexSpacer, null),
1069
- this.props.onClose && React__namespace.createElement(FlexCell, { shrink: 0, width: 'auto' },
1070
- React__namespace.createElement(IconButton, { icon: ForwardRef$z, onClick: this.props.onClose }))));
1071
- }
1072
- }
1073
- class ModalFooter extends React__namespace.Component {
1074
- render() {
1075
- return (React__namespace.createElement(FlexRow, { spacing: this.props.spacing || '12', cx: [css$N.modalFooter, this.props.borderTop && css$N.borderTop, this.props.cx], padding: this.props.padding || '24', vPadding: this.props.vPadding || '24', rawProps: this.props.rawProps }, this.props.children));
1076
- }
1053
+ const ModalBlocker = uuiCore.withMods(uuiComponents.ModalBlocker, () => [
1054
+ css$N.modalBlocker,
1055
+ ]);
1056
+ const ModalWindow = uuiCore.withMods(uuiComponents.ModalWindow, () => [css$N.modal], props => ({ rawProps: {
1057
+ style: {
1058
+ width: `${props.width || 480}px`,
1059
+ height: props.height ? `${props.height}px` : 'auto',
1060
+ },
1061
+ },
1062
+ }));
1063
+ class ModalHeader extends React__namespace.Component {
1064
+ render() {
1065
+ return (React__namespace.createElement(FlexRow, { padding: this.props.padding || '24', vPadding: '12', borderBottom: this.props.borderBottom, cx: [css$N.modalHeader, this.props.cx], spacing: '12', rawProps: this.props.rawProps },
1066
+ this.props.title && React__namespace.createElement(Text, { size: '48', fontSize: '18', font: 'semibold' }, this.props.title),
1067
+ this.props.children,
1068
+ this.props.onClose && React__namespace.createElement(FlexSpacer, null),
1069
+ this.props.onClose && React__namespace.createElement(FlexCell, { shrink: 0, width: 'auto' },
1070
+ React__namespace.createElement(IconButton, { icon: ForwardRef$z, onClick: this.props.onClose }))));
1071
+ }
1072
+ }
1073
+ class ModalFooter extends React__namespace.Component {
1074
+ render() {
1075
+ return (React__namespace.createElement(FlexRow, { spacing: this.props.spacing || '12', cx: [css$N.modalFooter, this.props.borderTop && css$N.borderTop, this.props.cx], padding: this.props.padding || '24', vPadding: this.props.vPadding || '24', rawProps: this.props.rawProps }, this.props.children));
1076
+ }
1077
1077
  }
1078
1078
 
1079
- const i18n = Object.assign(Object.assign({}, uuiCore.i18n), { dataPickerBody: {
1080
- searchPlaceholder: 'Search',
1081
- noRecordsMessage: 'No records found',
1082
- noRecordsSubTitle: 'Check your spelling, or search for a different keyword',
1083
- }, pickerModal: {
1084
- headerTitle: 'Please select',
1085
- searchPlaceholder: 'Type text for quick search',
1086
- cancelButton: 'Cancel',
1087
- selectButton: 'Select',
1088
- clearAllButton: 'CLEAR ALL',
1089
- selectAllButton: 'SELECT ALL',
1090
- }, pickerInput: {
1091
- showOnlySelectedLabel: 'Show only selected',
1092
- clearSelectionButton: 'CLEAR ALL',
1093
- clearSelectionButtonSingle: 'CLEAR',
1094
- selectAllButton: 'SELECT ALL',
1095
- }, notificationCard: {
1096
- closeAllNotificationsButton: 'CLOSE ALL NOTIFICATIONS',
1097
- }, form: {
1098
- notifications: {
1099
- actionButtonCaption: 'Restore',
1100
- unsavedChangesMessage: 'You have unsaved changes. Click Restore button if you would like to recover the data',
1101
- },
1102
- modals: {
1103
- beforeLeaveMessage: 'Your data may be lost. Do you want to save data?',
1104
- discardButton: 'Discard',
1105
- saveButton: 'Save',
1106
- },
1107
- }, rangeDatePicker: {
1108
- pickerPlaceholderFrom: 'From:',
1109
- pickerPlaceholderTo: 'To:',
1110
- }, tables: {
1111
- noResultsBlock: {
1112
- title: 'No results found',
1113
- message: 'We can’t find any item matching your request',
1114
- },
1115
- columnsConfigurationModal: {
1116
- applyButton: 'Apply',
1117
- cancelButton: 'Cancel',
1118
- selectAllButton: 'Select all',
1119
- clearAllButton: 'Clear all',
1120
- checkAllButton: 'Check All',
1121
- uncheckAllButton: 'Uncheck All',
1122
- configureColumnsTitle: 'Configure columns',
1123
- resetToDefaultButton: 'Reset to Default',
1124
- displayedSectionTitle: 'Displayed in table',
1125
- hiddenSectionTitle: 'Hidden in table',
1126
- searchPlaceholder: 'Search by column name',
1127
- noResultsFound: {
1128
- text: 'No results found',
1129
- subText: 'We can’t find any item matching your request',
1130
- },
1131
- enableAtLeastOneColumnMessage: 'Please enable at least one column',
1132
- pinColumnButton: "Pin column",
1133
- unPinColumnButton: "Unpin column",
1134
- lockedColumnPinButton: "You cannot unpin this column",
1135
- },
1136
- }, pickerFilterHeader: {
1137
- sortAscending: 'Sort Ascending',
1138
- sortDescending: 'Sort Descending',
1139
- }, filterToolbar: {
1140
- addCaption: 'Add filter',
1141
- datePicker: {
1142
- placeholder: 'Select date',
1143
- removeCaption: 'REMOVE FILTER',
1144
- clearCaption: 'CLEAR',
1145
- },
1146
- rangeDatePicker: {
1147
- emptyPickerPlaceholder: 'Select period',
1148
- emptyPlaceholderFrom: 'Select From',
1149
- emptyPlaceholderTo: 'Select To',
1150
- },
1151
- pickerInput: {
1152
- itemsPlaceholder: 'items',
1153
- emptyValueCaption: 'ALL',
1154
- },
1155
- }, presetPanel: {
1156
- addCaption: 'Add Preset',
1157
- }, confirmationModal: {
1158
- discardButton: 'Discard',
1159
- saveButton: 'Save',
1079
+ const i18n = Object.assign(Object.assign({}, uuiCore.i18n), { dataPickerBody: {
1080
+ searchPlaceholder: 'Search',
1081
+ noRecordsMessage: 'No records found',
1082
+ noRecordsSubTitle: 'Check your spelling, or search for a different keyword',
1083
+ }, pickerModal: {
1084
+ headerTitle: 'Please select',
1085
+ searchPlaceholder: 'Type text for quick search',
1086
+ cancelButton: 'Cancel',
1087
+ selectButton: 'Select',
1088
+ clearAllButton: 'CLEAR ALL',
1089
+ selectAllButton: 'SELECT ALL',
1090
+ }, pickerInput: {
1091
+ showOnlySelectedLabel: 'Show only selected',
1092
+ clearSelectionButton: 'CLEAR ALL',
1093
+ clearSelectionButtonSingle: 'CLEAR',
1094
+ selectAllButton: 'SELECT ALL',
1095
+ }, notificationCard: {
1096
+ closeAllNotificationsButton: 'CLOSE ALL NOTIFICATIONS',
1097
+ }, form: {
1098
+ notifications: {
1099
+ actionButtonCaption: 'Restore',
1100
+ unsavedChangesMessage: 'You have unsaved changes. Click Restore button if you would like to recover the data',
1101
+ },
1102
+ modals: {
1103
+ beforeLeaveMessage: 'Your data may be lost. Do you want to save data?',
1104
+ discardButton: 'Discard',
1105
+ saveButton: 'Save',
1106
+ },
1107
+ }, rangeDatePicker: {
1108
+ pickerPlaceholderFrom: 'From:',
1109
+ pickerPlaceholderTo: 'To:',
1110
+ }, tables: {
1111
+ noResultsBlock: {
1112
+ title: 'No results found',
1113
+ message: 'We can’t find any item matching your request',
1114
+ },
1115
+ columnsConfigurationModal: {
1116
+ applyButton: 'Apply',
1117
+ cancelButton: 'Cancel',
1118
+ selectAllButton: 'Select all',
1119
+ clearAllButton: 'Clear all',
1120
+ checkAllButton: 'Check All',
1121
+ uncheckAllButton: 'Uncheck All',
1122
+ configureColumnsTitle: 'Configure columns',
1123
+ resetToDefaultButton: 'Reset to Default',
1124
+ displayedSectionTitle: 'Displayed in table',
1125
+ hiddenSectionTitle: 'Hidden in table',
1126
+ searchPlaceholder: 'Search by column name',
1127
+ noResultsFound: {
1128
+ text: 'No results found',
1129
+ subText: 'We can’t find any item matching your request',
1130
+ },
1131
+ enableAtLeastOneColumnMessage: 'Please enable at least one column',
1132
+ pinColumnButton: "Pin column",
1133
+ unPinColumnButton: "Unpin column",
1134
+ lockedColumnPinButton: "You cannot unpin this column",
1135
+ },
1136
+ }, pickerFilterHeader: {
1137
+ sortAscending: 'Sort Ascending',
1138
+ sortDescending: 'Sort Descending',
1139
+ }, filterToolbar: {
1140
+ addCaption: 'Add filter',
1141
+ datePicker: {
1142
+ placeholder: 'Select date',
1143
+ removeCaption: 'REMOVE FILTER',
1144
+ clearCaption: 'CLEAR',
1145
+ },
1146
+ rangeDatePicker: {
1147
+ emptyPickerPlaceholder: 'Select period',
1148
+ emptyPlaceholderFrom: 'Select From',
1149
+ emptyPlaceholderTo: 'Select To',
1150
+ },
1151
+ pickerInput: {
1152
+ itemsPlaceholder: 'items',
1153
+ emptyValueCaption: 'ALL',
1154
+ },
1155
+ }, presetPanel: {
1156
+ addCaption: 'Add Preset',
1157
+ }, confirmationModal: {
1158
+ discardButton: 'Discard',
1159
+ saveButton: 'Save',
1160
1160
  } });
1161
1161
 
1162
1162
  var _path$w;
@@ -1177,76 +1177,76 @@ var ForwardRef$y = /*#__PURE__*/React.forwardRef(SvgCross);
1177
1177
 
1178
1178
  var css$M = {"typography-header":"NotificationCard_typography-header__JcbKn","typography-block":"NotificationCard_typography-block__nKwA0","typography-inline":"NotificationCard_typography-inline__BO1HG","typography-16":"NotificationCard_typography-16__mixDm","typography-14":"NotificationCard_typography-14__E40GV","typography-12":"NotificationCard_typography-12__r-3ka","typography-promo":"NotificationCard_typography-promo__P5KSk NotificationCard_typography-header__JcbKn NotificationCard_typography-block__nKwA0 NotificationCard_typography-inline__BO1HG","root":"NotificationCard_root__HP4NM","icon-wrapper":"NotificationCard_icon-wrapper__FZUAl","action-wrapper":"NotificationCard_action-wrapper__MahuR","action-link":"NotificationCard_action-link__DXfp7","close-icon":"NotificationCard_close-icon__p0MvI","main-path":"NotificationCard_main-path__yWH2j","content":"NotificationCard_content__O4mCt","clear-button":"NotificationCard_clear-button__-RzMj","close-wrapper":"NotificationCard_close-wrapper__BVl8x","typographyHeader":"NotificationCard_typography-header__JcbKn","typographyBlock":"NotificationCard_typography-block__nKwA0","typographyInline":"NotificationCard_typography-inline__BO1HG","typography16":"NotificationCard_typography-16__mixDm","typography14":"NotificationCard_typography-14__E40GV","typography12":"NotificationCard_typography-12__r-3ka","typographyPromo":"NotificationCard_typography-promo__P5KSk NotificationCard_typography-header__JcbKn NotificationCard_typography-block__nKwA0 NotificationCard_typography-inline__BO1HG","iconWrapper":"NotificationCard_icon-wrapper__FZUAl","actionWrapper":"NotificationCard_action-wrapper__MahuR","actionLink":"NotificationCard_action-link__DXfp7","closeIcon":"NotificationCard_close-icon__p0MvI","mainPath":"NotificationCard_main-path__yWH2j","clearButton":"NotificationCard_clear-button__-RzMj","closeWrapper":"NotificationCard_close-wrapper__BVl8x"};
1179
1179
 
1180
- const NotificationCard = React__namespace.default.forwardRef((props, ref) => {
1181
- const notificationCardNode = React__namespace.default.useRef(null);
1182
- React__namespace.default.useImperativeHandle(ref, () => notificationCardNode.current, [notificationCardNode.current]);
1183
- React__namespace.default.useLayoutEffect(() => {
1184
- var _a, _b;
1185
- (_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', props.clearTimer);
1186
- (_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', props.refreshTimer);
1187
- return () => {
1188
- var _a, _b;
1189
- (_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', props.clearTimer);
1190
- (_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', props.refreshTimer);
1191
- };
1192
- }, []);
1193
- return (React__namespace.default.createElement("div", Object.assign({ role: "alert", className: cx__default.default(`notification-card-${props.color}`, css$M.root, props.cx), ref: notificationCardNode }, props.rawProps),
1194
- React__namespace.default.createElement("div", { className: css$M.mainPath },
1195
- props.icon && (React__namespace.default.createElement("div", { className: css$M.iconWrapper },
1196
- React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$M.actionIcon }))),
1197
- React__namespace.default.createElement("div", { className: css$M.content },
1198
- props.children,
1199
- props.actions && React__namespace.default.createElement("div", { className: css$M.actionWrapper }, props.actions.map(action => (React__namespace.default.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$M.actionLink, size: '36', rawProps: action.rawProps }))))),
1200
- props.onClose && (React__namespace.default.createElement("div", { className: css$M.closeWrapper },
1201
- React__namespace.default.createElement(IconButton, { icon: ForwardRef$y, color: 'default', onClick: props.onClose, cx: css$M.closeIcon }))))));
1202
- });
1203
- const WarningNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$C, color: 'warning' }, props, { ref: ref, cx: props.cx }))));
1204
- const SuccessNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$D, color: 'success' }, props, { ref: ref, cx: props.cx }))));
1205
- const HintNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$A, color: 'info' }, props, { ref: ref, cx: props.cx }))));
1206
- const ErrorNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$B, color: 'error' }, props, { ref: ref, cx: props.cx }))));
1207
- class ClearNotification extends React__namespace.default.Component {
1208
- render() {
1209
- return React__namespace.default.createElement("div", { className: cx__default.default(css$M.notificationWrapper, css$M.clearButton) },
1210
- React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => this.context.uuiNotifications.clearAll() }));
1211
- }
1212
- }
1180
+ const NotificationCard = React__namespace.default.forwardRef((props, ref) => {
1181
+ const notificationCardNode = React__namespace.default.useRef(null);
1182
+ React__namespace.default.useImperativeHandle(ref, () => notificationCardNode.current, [notificationCardNode.current]);
1183
+ React__namespace.default.useLayoutEffect(() => {
1184
+ var _a, _b;
1185
+ (_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.addEventListener('mouseenter', props.clearTimer);
1186
+ (_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.addEventListener('mouseleave', props.refreshTimer);
1187
+ return () => {
1188
+ var _a, _b;
1189
+ (_a = notificationCardNode.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', props.clearTimer);
1190
+ (_b = notificationCardNode.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', props.refreshTimer);
1191
+ };
1192
+ }, []);
1193
+ return (React__namespace.default.createElement("div", Object.assign({ role: "alert", className: cx__default.default(`notification-card-${props.color}`, css$M.root, props.cx), ref: notificationCardNode }, props.rawProps),
1194
+ React__namespace.default.createElement("div", { className: css$M.mainPath },
1195
+ props.icon && (React__namespace.default.createElement("div", { className: css$M.iconWrapper },
1196
+ React__namespace.default.createElement(uuiComponents.IconContainer, { icon: props.icon, cx: css$M.actionIcon }))),
1197
+ React__namespace.default.createElement("div", { className: css$M.content },
1198
+ props.children,
1199
+ props.actions && React__namespace.default.createElement("div", { className: css$M.actionWrapper }, props.actions.map(action => (React__namespace.default.createElement(LinkButton, { caption: action.name, onClick: action.action, key: action.name, cx: css$M.actionLink, size: '36', rawProps: action.rawProps }))))),
1200
+ props.onClose && (React__namespace.default.createElement("div", { className: css$M.closeWrapper },
1201
+ React__namespace.default.createElement(IconButton, { icon: ForwardRef$y, color: 'default', onClick: props.onClose, cx: css$M.closeIcon }))))));
1202
+ });
1203
+ const WarningNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$C, color: 'warning' }, props, { ref: ref, cx: props.cx }))));
1204
+ const SuccessNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$D, color: 'success' }, props, { ref: ref, cx: props.cx }))));
1205
+ const HintNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$A, color: 'info' }, props, { ref: ref, cx: props.cx }))));
1206
+ const ErrorNotification = React__namespace.default.forwardRef((props, ref) => (React__namespace.default.createElement(NotificationCard, Object.assign({ icon: ForwardRef$B, color: 'error' }, props, { ref: ref, cx: props.cx }))));
1207
+ class ClearNotification extends React__namespace.default.Component {
1208
+ render() {
1209
+ return React__namespace.default.createElement("div", { className: cx__default.default(css$M.notificationWrapper, css$M.clearButton) },
1210
+ React__namespace.default.createElement(LinkButton, { caption: i18n.notificationCard.closeAllNotificationsButton, onClick: () => this.context.uuiNotifications.clearAll() }));
1211
+ }
1212
+ }
1213
1213
  ClearNotification.contextType = uuiCore.UuiContext;
1214
1214
 
1215
1215
  var css$L = {"typography-header":"Tooltip_typography-header__cNsyM","typography-block":"Tooltip_typography-block__l3S7W","typography-inline":"Tooltip_typography-inline__PWbqK","typography-16":"Tooltip_typography-16__v0Yv5","typography-14":"Tooltip_typography-14__WqOph","typography-12":"Tooltip_typography-12__4oje1","typography-promo":"Tooltip_typography-promo__Epmej Tooltip_typography-header__cNsyM Tooltip_typography-block__l3S7W Tooltip_typography-inline__PWbqK","root":"Tooltip_root__zZwnu","typographyHeader":"Tooltip_typography-header__cNsyM","typographyBlock":"Tooltip_typography-block__l3S7W","typographyInline":"Tooltip_typography-inline__PWbqK","typography16":"Tooltip_typography-16__v0Yv5","typography14":"Tooltip_typography-14__WqOph","typography12":"Tooltip_typography-12__4oje1","typographyPromo":"Tooltip_typography-promo__Epmej Tooltip_typography-header__cNsyM Tooltip_typography-block__l3S7W Tooltip_typography-inline__PWbqK"};
1216
1216
 
1217
- function applyTooltipMods(mods) {
1218
- return [
1219
- `tooltip-${mods.color}`,
1220
- css$L.root,
1221
- ];
1222
- }
1217
+ function applyTooltipMods(mods) {
1218
+ return [
1219
+ `tooltip-${mods.color}`,
1220
+ css$L.root,
1221
+ ];
1222
+ }
1223
1223
  const Tooltip = uuiCore.withMods(uuiComponents.Tooltip, applyTooltipMods);
1224
1224
 
1225
1225
  var css$K = {"typography-header":"LabeledInput_typography-header__HJu91","typography-block":"LabeledInput_typography-block__4Jo8P","typography-inline":"LabeledInput_typography-inline__iNLix","typography-16":"LabeledInput_typography-16__B-aku","typography-14":"LabeledInput_typography-14__YxFLH","typography-12":"LabeledInput_typography-12__Jr6Uq","typography-promo":"LabeledInput_typography-promo__3-e-V LabeledInput_typography-header__HJu91 LabeledInput_typography-block__4Jo8P LabeledInput_typography-inline__iNLix","root":"LabeledInput_root__xDC2q","size-24":"LabeledInput_size-24__0LWBQ","size-30":"LabeledInput_size-30__KDnLe","size-36":"LabeledInput_size-36__4qHf7","size-42":"LabeledInput_size-42__zo6a7","size-48":"LabeledInput_size-48__3NqJt","typographyHeader":"LabeledInput_typography-header__HJu91","typographyBlock":"LabeledInput_typography-block__4Jo8P","typographyInline":"LabeledInput_typography-inline__iNLix","typography16":"LabeledInput_typography-16__B-aku","typography14":"LabeledInput_typography-14__YxFLH","typography12":"LabeledInput_typography-12__Jr6Uq","typographyPromo":"LabeledInput_typography-promo__3-e-V LabeledInput_typography-header__HJu91 LabeledInput_typography-block__4Jo8P LabeledInput_typography-inline__iNLix","size24":"LabeledInput_size-24__0LWBQ","size30":"LabeledInput_size-30__KDnLe","size36":"LabeledInput_size-36__4qHf7","size42":"LabeledInput_size-42__zo6a7","size48":"LabeledInput_size-48__3NqJt"};
1226
1226
 
1227
- const defaultSize$7 = '36';
1228
- function applyLabeledInputMods(mods) {
1229
- return [
1230
- css$K.root,
1231
- css$K['size-' + (mods.size || defaultSize$7)],
1232
- ];
1233
- }
1234
- const LabeledInput = uuiCore.withMods(uuiComponents.LabeledInput, applyLabeledInputMods, (props) => ({
1235
- Tooltip,
1236
- infoIcon: systemIcons[props.size || defaultSize$7].help,
1227
+ const defaultSize$7 = '36';
1228
+ function applyLabeledInputMods(mods) {
1229
+ return [
1230
+ css$K.root,
1231
+ css$K['size-' + (mods.size || defaultSize$7)],
1232
+ ];
1233
+ }
1234
+ const LabeledInput = uuiCore.withMods(uuiComponents.LabeledInput, applyLabeledInputMods, (props) => ({
1235
+ Tooltip,
1236
+ infoIcon: systemIcons[props.size || defaultSize$7].help,
1237
1237
  }));
1238
1238
 
1239
1239
  var css$J = {"root":"RadioGroup_root__uLWIn"};
1240
1240
 
1241
1241
  const RadioGroup = uuiCore.withMods(uuiComponents.RadioGroup, () => [css$J.root], () => ({ RadioInput }));
1242
1242
 
1243
- function applyScrollBarsMods() {
1244
- return [
1245
- 'uui-scroll-bars',
1246
- 'uui-shadow-top',
1247
- 'uui-shadow-bottom',
1248
- ];
1249
- }
1243
+ function applyScrollBarsMods() {
1244
+ return [
1245
+ 'uui-scroll-bars',
1246
+ 'uui-shadow-top',
1247
+ 'uui-shadow-bottom',
1248
+ ];
1249
+ }
1250
1250
  const ScrollBars = uuiCore.withMods(uuiComponents.ScrollBars, applyScrollBarsMods);
1251
1251
 
1252
1252
  const VirtualList = uuiComponents.VirtualList;
@@ -1255,11 +1255,11 @@ var css$I = {"root":"Blocker_root__OB584"};
1255
1255
 
1256
1256
  var css$H = {"root":"Spinner_root__jJ3FR","uui-spinner":"Spinner_uui-spinner__qD4cq","uuiSpinner":"Spinner_uui-spinner__qD4cq"};
1257
1257
 
1258
- function applySpinnerMods() {
1259
- return [
1260
- css$H.root,
1261
- ];
1262
- }
1258
+ function applySpinnerMods() {
1259
+ return [
1260
+ css$H.root,
1261
+ ];
1262
+ }
1263
1263
  const Spinner = uuiCore.withMods(uuiComponents.Spinner, applySpinnerMods);
1264
1264
 
1265
1265
  const Blocker = uuiCore.withMods(uuiComponents.Blocker, () => [css$I.root], (cmpProps) => ({ renderSpinner: cmpProps.renderSpinner || (() => React__namespace.default.createElement(Spinner, null)) }));
@@ -1268,188 +1268,188 @@ var css$G = {"root":"CheckboxGroup_root__6KmvL"};
1268
1268
 
1269
1269
  const CheckboxGroup = uuiCore.withMods(uuiComponents.CheckboxGroup, () => [css$G.root], () => ({ CheckboxInput: Checkbox }));
1270
1270
 
1271
- function MultiSwitchComponent(props, ref) {
1272
- return (React__namespace.createElement(ControlGroup, { ref: ref, rawProps: Object.assign(Object.assign({}, props.rawProps), { role: 'tablist' }) }, props.items.map((item, index) => (React__namespace.createElement(Button, Object.assign({}, props, item, { isDisabled: props.isDisabled, key: index + '-' + item.id, onClick: () => props.onValueChange(item.id), mode: props.value === item.id ? 'solid' : 'outline', color: props.color === 'secondary' && props.value === item.id ? 'primary' : props.color || 'primary', size: props.size, rawProps: { 'aria-current': props.value === item.id, role: 'tab' } }))))));
1273
- }
1271
+ function MultiSwitchComponent(props, ref) {
1272
+ return (React__namespace.createElement(ControlGroup, { ref: ref, rawProps: Object.assign(Object.assign({}, props.rawProps), { role: 'tablist' }) }, props.items.map((item, index) => (React__namespace.createElement(Button, Object.assign({}, props, item, { isDisabled: props.isDisabled, key: index + '-' + item.id, onClick: () => props.onValueChange(item.id), mode: props.value === item.id ? 'solid' : 'outline', color: props.color === 'secondary' && props.value === item.id ? 'primary' : props.color || 'primary', size: props.size, rawProps: { 'aria-current': props.value === item.id, role: 'tab' } }))))));
1273
+ }
1274
1274
  const MultiSwitch = React__namespace.forwardRef(MultiSwitchComponent);
1275
1275
 
1276
1276
  var css$F = {"typography-header":"NumericInput_typography-header__GGZXK","typography-block":"NumericInput_typography-block__kzaEI","typography-inline":"NumericInput_typography-inline__i-mmY","typography-16":"NumericInput_typography-16__1kNP6","typography-14":"NumericInput_typography-14__GS-GA","typography-12":"NumericInput_typography-12__-r6Ni","typography-promo":"NumericInput_typography-promo__7QcU- NumericInput_typography-header__GGZXK NumericInput_typography-block__kzaEI NumericInput_typography-inline__i-mmY","root":"NumericInput_root__vElno","size-24":"NumericInput_size-24__9pSyj","size-30":"NumericInput_size-30__kfXj0","size-36":"NumericInput_size-36__tYgRe","size-42":"NumericInput_size-42__RoV0p","size-48":"NumericInput_size-48__wyaYa","mode-form":"NumericInput_mode-form__2EKWT","mode-cell":"NumericInput_mode-cell__oJI4L","typographyHeader":"NumericInput_typography-header__GGZXK","typographyBlock":"NumericInput_typography-block__kzaEI","typographyInline":"NumericInput_typography-inline__i-mmY","typography16":"NumericInput_typography-16__1kNP6","typography14":"NumericInput_typography-14__GS-GA","typography12":"NumericInput_typography-12__-r6Ni","typographyPromo":"NumericInput_typography-promo__7QcU- NumericInput_typography-header__GGZXK NumericInput_typography-block__kzaEI NumericInput_typography-inline__i-mmY","size24":"NumericInput_size-24__9pSyj","size30":"NumericInput_size-30__kfXj0","size36":"NumericInput_size-36__tYgRe","size42":"NumericInput_size-42__RoV0p","size48":"NumericInput_size-48__wyaYa","modeForm":"NumericInput_mode-form__2EKWT","modeCell":"NumericInput_mode-cell__oJI4L"};
1277
1277
 
1278
- const defaultSize$6 = "36";
1279
- const defaultMode$3 = exports.EditMode.FORM;
1280
- function applyNumericInputMods(mods) {
1281
- return [
1282
- textInputCss.root,
1283
- css$F.root,
1284
- css$F["size-" + (mods.size || defaultSize$6)],
1285
- textInputCss["size-" + (mods.size || defaultSize$6)],
1286
- textInputCss["mode-" + (mods.mode || defaultMode$3)],
1287
- ];
1288
- }
1289
- const NumericInput = uuiCore.withMods(uuiComponents.NumericInput, applyNumericInputMods, (props) => {
1290
- var _a, _b;
1291
- return ({
1292
- upIcon: systemIcons[props.size || defaultSize$6].foldingArrow,
1293
- downIcon: systemIcons[props.size || defaultSize$6].foldingArrow,
1294
- align: (_a = props.align) !== null && _a !== void 0 ? _a : (props.mode === "cell" ? "right" : "left"),
1295
- disableArrows: (_b = props.disableArrows) !== null && _b !== void 0 ? _b : props.mode === "cell",
1296
- });
1278
+ const defaultSize$6 = "36";
1279
+ const defaultMode$3 = exports.EditMode.FORM;
1280
+ function applyNumericInputMods(mods) {
1281
+ return [
1282
+ textInputCss.root,
1283
+ css$F.root,
1284
+ css$F["size-" + (mods.size || defaultSize$6)],
1285
+ textInputCss["size-" + (mods.size || defaultSize$6)],
1286
+ textInputCss["mode-" + (mods.mode || defaultMode$3)],
1287
+ ];
1288
+ }
1289
+ const NumericInput = uuiCore.withMods(uuiComponents.NumericInput, applyNumericInputMods, (props) => {
1290
+ var _a, _b;
1291
+ return ({
1292
+ upIcon: systemIcons[props.size || defaultSize$6].foldingArrow,
1293
+ downIcon: systemIcons[props.size || defaultSize$6].foldingArrow,
1294
+ align: (_a = props.align) !== null && _a !== void 0 ? _a : (props.mode === "cell" ? "right" : "left"),
1295
+ disableArrows: (_b = props.disableArrows) !== null && _b !== void 0 ? _b : props.mode === "cell",
1296
+ });
1297
1297
  });
1298
1298
 
1299
1299
  var css$E = {"typography-header":"TextArea_typography-header__o-1aw","typography-block":"TextArea_typography-block__eszLT","typography-inline":"TextArea_typography-inline__Y5s6o","typography-16":"TextArea_typography-16__FZZaw","typography-14":"TextArea_typography-14__ZQ-8z","typography-12":"TextArea_typography-12__iYiOG","typography-promo":"TextArea_typography-promo__pYQ5f TextArea_typography-header__o-1aw TextArea_typography-block__eszLT TextArea_typography-inline__Y5s6o","root":"TextArea_root__rb0Et","mode-form":"TextArea_mode-form__1DZlL","mode-cell":"TextArea_mode-cell__KthXC","mode-inline":"TextArea_mode-inline__dZEPS","size-24":"TextArea_size-24__-1cgl","size-30":"TextArea_size-30__B2Zjq","size-36":"TextArea_size-36__r2jj6","size-42":"TextArea_size-42__G6PPY","size-48":"TextArea_size-48__1yQdt","typographyHeader":"TextArea_typography-header__o-1aw","typographyBlock":"TextArea_typography-block__eszLT","typographyInline":"TextArea_typography-inline__Y5s6o","typography16":"TextArea_typography-16__FZZaw","typography14":"TextArea_typography-14__ZQ-8z","typography12":"TextArea_typography-12__iYiOG","typographyPromo":"TextArea_typography-promo__pYQ5f TextArea_typography-header__o-1aw TextArea_typography-block__eszLT TextArea_typography-inline__Y5s6o","modeForm":"TextArea_mode-form__1DZlL","modeCell":"TextArea_mode-cell__KthXC","modeInline":"TextArea_mode-inline__dZEPS","size24":"TextArea_size-24__-1cgl","size30":"TextArea_size-30__B2Zjq","size36":"TextArea_size-36__r2jj6","size42":"TextArea_size-42__G6PPY","size48":"TextArea_size-48__1yQdt"};
1300
1300
 
1301
- const defaultSize$5 = '36';
1302
- const defaultMode$2 = exports.EditMode.FORM;
1303
- function applyTextAreaMods(mods) {
1304
- return [
1305
- css$E.root,
1306
- css$E['size-' + (mods.size || defaultSize$5)],
1307
- css$E['mode-' + (mods.mode || defaultMode$2)],
1308
- ];
1309
- }
1310
- const TextArea = uuiCore.withMods(uuiComponents.TextArea, applyTextAreaMods, props => ({
1311
- autoSize: props.mode === exports.EditMode.CELL ? true : props.autoSize,
1312
- maxLength: props.mode === exports.EditMode.CELL ? undefined : props.maxLength,
1301
+ const defaultSize$5 = '36';
1302
+ const defaultMode$2 = exports.EditMode.FORM;
1303
+ function applyTextAreaMods(mods) {
1304
+ return [
1305
+ css$E.root,
1306
+ css$E['size-' + (mods.size || defaultSize$5)],
1307
+ css$E['mode-' + (mods.mode || defaultMode$2)],
1308
+ ];
1309
+ }
1310
+ const TextArea = uuiCore.withMods(uuiComponents.TextArea, applyTextAreaMods, props => ({
1311
+ autoSize: props.mode === exports.EditMode.CELL ? true : props.autoSize,
1312
+ maxLength: props.mode === exports.EditMode.CELL ? undefined : props.maxLength,
1313
1313
  }));
1314
1314
 
1315
1315
  var css$D = {"typography-header":"DatePicker_typography-header__d3UN6","typography-block":"DatePicker_typography-block__vnQqM","typography-inline":"DatePicker_typography-inline__uM5kg","typography-16":"DatePicker_typography-16__-wmeU","typography-14":"DatePicker_typography-14__Upcdm","typography-12":"DatePicker_typography-12__Z1YnJ","typography-promo":"DatePicker_typography-promo__V5CNx DatePicker_typography-header__d3UN6 DatePicker_typography-block__vnQqM DatePicker_typography-inline__uM5kg","root":"DatePicker_root__kqFyh","typographyHeader":"DatePicker_typography-header__d3UN6","typographyBlock":"DatePicker_typography-block__vnQqM","typographyInline":"DatePicker_typography-inline__uM5kg","typography16":"DatePicker_typography-16__-wmeU","typography14":"DatePicker_typography-14__Upcdm","typography12":"DatePicker_typography-12__Z1YnJ","typographyPromo":"DatePicker_typography-promo__V5CNx DatePicker_typography-header__d3UN6 DatePicker_typography-block__vnQqM DatePicker_typography-inline__uM5kg"};
1316
1316
 
1317
1317
  var calendarCss = {"typography-header":"Calendar_typography-header__dkLL8","typography-block":"Calendar_typography-block__DXJIH","typography-inline":"Calendar_typography-inline__NGFRU","typography-16":"Calendar_typography-16__FGS6a","typography-14":"Calendar_typography-14__fa4gQ","typography-12":"Calendar_typography-12__8rwED","typography-promo":"Calendar_typography-promo__-3dg- Calendar_typography-header__dkLL8 Calendar_typography-block__DXJIH Calendar_typography-inline__NGFRU","root":"Calendar_root__Vh71D","typographyHeader":"Calendar_typography-header__dkLL8","typographyBlock":"Calendar_typography-block__DXJIH","typographyInline":"Calendar_typography-inline__NGFRU","typography16":"Calendar_typography-16__FGS6a","typography14":"Calendar_typography-14__fa4gQ","typography12":"Calendar_typography-12__8rwED","typographyPromo":"Calendar_typography-promo__-3dg- Calendar_typography-header__dkLL8 Calendar_typography-block__DXJIH Calendar_typography-inline__NGFRU"};
1318
1318
 
1319
- function applyDatePickerBodyMods() {
1320
- return [
1321
- css$D.root,
1322
- calendarCss.root,
1323
- ];
1324
- }
1319
+ function applyDatePickerBodyMods() {
1320
+ return [
1321
+ css$D.root,
1322
+ calendarCss.root,
1323
+ ];
1324
+ }
1325
1325
  const DatePickerBody = uuiCore.withMods(uuiComponents.DatePickerBody, applyDatePickerBodyMods, () => ({ navIconLeft: ForwardRef$Y, navIconRight: ForwardRef$Y }));
1326
1326
 
1327
- const defaultMode$1 = exports.EditMode.FORM;
1328
- class DatePicker extends uuiComponents.BaseDatePicker {
1329
- constructor() {
1330
- super(...arguments);
1331
- this.renderInput = (props) => {
1332
- var _a;
1333
- return (React__namespace.default.createElement(TextInput, Object.assign({}, props, { onClick: null, isDropdown: false, cx: uuiCore.cx(this.props.inputCx, this.state.isOpen && uuiCore.uuiMod.focus), icon: this.props.mode !== exports.EditMode.CELL && systemIcons[this.props.size || '36'].calendar, iconPosition: this.props.iconPosition || 'left', placeholder: this.props.placeholder ? this.props.placeholder : this.getFormat(), size: this.props.size || '36', value: this.state.inputValue, onValueChange: this.handleInputChange, onCancel: (this.props.disableClear || !this.state.inputValue) ? undefined : this.handleCancel, isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, tabIndex: (this.props.isReadonly || this.props.isDisabled) ? -1 : 0, onFocus: this.handleFocus, onBlur: this.handleBlur, mode: this.props.mode || defaultMode$1, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.input })));
1334
- };
1335
- }
1336
- renderBody(props) {
1337
- var _a, _b, _c;
1338
- return React__namespace.default.createElement(DropdownContainer, Object.assign({}, props),
1339
- React__namespace.default.createElement(DatePickerBody, { cx: uuiCore.cx(this.props.bodyCx), filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggle, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }), (_c = (_b = this.props).renderFooter) === null || _c === void 0 ? void 0 :
1340
- _c.call(_b));
1341
- }
1327
+ const defaultMode$1 = exports.EditMode.FORM;
1328
+ class DatePicker extends uuiComponents.BaseDatePicker {
1329
+ constructor() {
1330
+ super(...arguments);
1331
+ this.renderInput = (props) => {
1332
+ var _a;
1333
+ return (React__namespace.default.createElement(TextInput, Object.assign({}, props, { onClick: null, isDropdown: false, cx: uuiCore.cx(this.props.inputCx, this.state.isOpen && uuiCore.uuiMod.focus), icon: this.props.mode !== exports.EditMode.CELL && systemIcons[this.props.size || '36'].calendar, iconPosition: this.props.iconPosition || 'left', placeholder: this.props.placeholder ? this.props.placeholder : this.getFormat(), size: this.props.size || '36', value: this.state.inputValue, onValueChange: this.handleInputChange, onCancel: (this.props.disableClear || !this.state.inputValue) ? undefined : this.handleCancel, isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, tabIndex: (this.props.isReadonly || this.props.isDisabled) ? -1 : 0, onFocus: this.handleFocus, onBlur: this.handleBlur, mode: this.props.mode || defaultMode$1, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.input })));
1334
+ };
1335
+ }
1336
+ renderBody(props) {
1337
+ var _a, _b, _c;
1338
+ return React__namespace.default.createElement(DropdownContainer, Object.assign({}, props),
1339
+ React__namespace.default.createElement(DatePickerBody, { cx: uuiCore.cx(this.props.bodyCx), filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggle, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }), (_c = (_b = this.props).renderFooter) === null || _c === void 0 ? void 0 :
1340
+ _c.call(_b));
1341
+ }
1342
1342
  }
1343
1343
 
1344
- function applyDateSelectionMods() {
1345
- return [
1346
- calendarCss.root,
1347
- ];
1348
- }
1344
+ function applyDateSelectionMods() {
1345
+ return [
1346
+ calendarCss.root,
1347
+ ];
1348
+ }
1349
1349
  const Calendar = uuiCore.withMods(uuiComponents.Calendar, applyDateSelectionMods);
1350
1350
 
1351
1351
  var css$C = {"typography-header":"RangeDatePicker_typography-header__1MSa3","typography-block":"RangeDatePicker_typography-block__pC0T7","typography-inline":"RangeDatePicker_typography-inline__efdyU","typography-16":"RangeDatePicker_typography-16__FHiRR","typography-14":"RangeDatePicker_typography-14__5MCXV","typography-12":"RangeDatePicker_typography-12__zcQS2","typography-promo":"RangeDatePicker_typography-promo__GtLFC RangeDatePicker_typography-header__1MSa3 RangeDatePicker_typography-block__pC0T7 RangeDatePicker_typography-inline__efdyU","dropdown-container":"RangeDatePicker_dropdown-container__GJh6o","container":"RangeDatePicker_container__Kz2FS","button-group":"RangeDatePicker_button-group__a-twv","counter":"RangeDatePicker_counter__rNj2e","date-input":"RangeDatePicker_date-input__2aXJj","size-24":"RangeDatePicker_size-24__64v-x","size-30":"RangeDatePicker_size-30__7OPWW","size-36":"RangeDatePicker_size-36__urHhS","size-42":"RangeDatePicker_size-42__VMCut","size-48":"RangeDatePicker_size-48__YHcLe","date-input-group":"RangeDatePicker_date-input-group__CGdCd","separator":"RangeDatePicker_separator__qmCk8","mode-form":"RangeDatePicker_mode-form__o0e0M","mode-cell":"RangeDatePicker_mode-cell__neiVz","typographyHeader":"RangeDatePicker_typography-header__1MSa3","typographyBlock":"RangeDatePicker_typography-block__pC0T7","typographyInline":"RangeDatePicker_typography-inline__efdyU","typography16":"RangeDatePicker_typography-16__FHiRR","typography14":"RangeDatePicker_typography-14__5MCXV","typography12":"RangeDatePicker_typography-12__zcQS2","typographyPromo":"RangeDatePicker_typography-promo__GtLFC RangeDatePicker_typography-header__1MSa3 RangeDatePicker_typography-block__pC0T7 RangeDatePicker_typography-inline__efdyU","dropdownContainer":"RangeDatePicker_dropdown-container__GJh6o","buttonGroup":"RangeDatePicker_button-group__a-twv","dateInput":"RangeDatePicker_date-input__2aXJj","size24":"RangeDatePicker_size-24__64v-x","size30":"RangeDatePicker_size-30__7OPWW","size36":"RangeDatePicker_size-36__urHhS","size42":"RangeDatePicker_size-42__VMCut","size48":"RangeDatePicker_size-48__YHcLe","dateInputGroup":"RangeDatePicker_date-input-group__CGdCd","modeForm":"RangeDatePicker_mode-form__o0e0M","modeCell":"RangeDatePicker_mode-cell__neiVz"};
1352
1352
 
1353
- const defaultValue = { from: null, to: null };
1354
- class RangeDatePicker extends uuiComponents.BaseRangeDatePicker {
1355
- constructor() {
1356
- super(...arguments);
1357
- this.renderInput = (props) => {
1358
- var _a, _b;
1359
- return (React__namespace.createElement("div", { className: cx__default.default(this.props.inputCx, css$C.dateInputGroup, this.props.isDisabled && uuiCore.uuiMod.disabled, this.props.isReadonly && uuiCore.uuiMod.readonly, this.props.isInvalid && uuiCore.uuiMod.invalid, this.state.inFocus && uuiCore.uuiMod.focus), onClick: !this.props.isDisabled && props.onClick, onBlur: this.handleWrapperBlur, ref: props.ref },
1360
- React__namespace.createElement(TextInput, { icon: systemIcons[this.props.size || '36'].calendar, cx: cx__default.default(this.props.bodyCx, css$C.dateInput, css$C['size-' + (this.props.size || 36)], this.state.inFocus === 'from' && uuiCore.uuiMod.focus), size: this.props.size || '36', placeholder: this.props.getPlaceholder ? this.props.getPlaceholder('from') : i18n.rangeDatePicker.pickerPlaceholderFrom, value: this.state.inputValue.from, onValueChange: this.getChangeHandler('from'), isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, onFocus: (event) => this.handleFocus(event, 'from'), onBlur: (event) => this.handleBlur(event, 'from'), isDropdown: false, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.from }),
1361
- React__namespace.createElement("div", { className: css$C.separator }),
1362
- React__namespace.createElement(TextInput, { cx: cx__default.default(this.props.bodyCx, css$C.dateInput, css$C['size-' + (this.props.size || 36)], this.state.inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: this.props.getPlaceholder ? this.props.getPlaceholder('to') : i18n.rangeDatePicker.pickerPlaceholderTo, size: this.props.size || '36', value: this.state.inputValue.to, onCancel: this.props.disableClear ? null : this.state.inputValue.from && this.state.inputValue.to && this.handleCancel, onValueChange: this.getChangeHandler('to'), isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, onFocus: (e) => this.handleFocus(e, 'to'), onBlur: (e) => this.handleBlur(e, 'to'), isDropdown: false, rawProps: (_b = this.props.rawProps) === null || _b === void 0 ? void 0 : _b.to })));
1363
- };
1364
- }
1365
- renderBody(props) {
1366
- var _a;
1367
- return (React__namespace.createElement(DropdownContainer, Object.assign({}, props, { cx: cx__default.default(css$C.dropdownContainer) }),
1368
- React__namespace.createElement(FlexRow, null,
1369
- React__namespace.createElement(RangeDatePickerBody, { cx: cx__default.default(this.props.bodyCx), value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, changeIsOpen: this.toggleOpening, presets: this.props.presets, focusPart: this.state.inFocus, renderDay: this.props.renderDay, renderFooter: this.props.renderFooter && (() => this.props.renderFooter(this.props.value || defaultValue)), isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }))));
1370
- }
1353
+ const defaultValue = { from: null, to: null };
1354
+ class RangeDatePicker extends uuiComponents.BaseRangeDatePicker {
1355
+ constructor() {
1356
+ super(...arguments);
1357
+ this.renderInput = (props) => {
1358
+ var _a, _b;
1359
+ return (React__namespace.createElement("div", { className: cx__default.default(this.props.inputCx, css$C.dateInputGroup, this.props.isDisabled && uuiCore.uuiMod.disabled, this.props.isReadonly && uuiCore.uuiMod.readonly, this.props.isInvalid && uuiCore.uuiMod.invalid, this.state.inFocus && uuiCore.uuiMod.focus), onClick: !this.props.isDisabled && props.onClick, onBlur: this.handleWrapperBlur, ref: props.ref },
1360
+ React__namespace.createElement(TextInput, { icon: systemIcons[this.props.size || '36'].calendar, cx: cx__default.default(this.props.bodyCx, css$C.dateInput, css$C['size-' + (this.props.size || 36)], this.state.inFocus === 'from' && uuiCore.uuiMod.focus), size: this.props.size || '36', placeholder: this.props.getPlaceholder ? this.props.getPlaceholder('from') : i18n.rangeDatePicker.pickerPlaceholderFrom, value: this.state.inputValue.from, onValueChange: this.getChangeHandler('from'), isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, onFocus: (event) => this.handleFocus(event, 'from'), onBlur: (event) => this.handleBlur(event, 'from'), isDropdown: false, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.from }),
1361
+ React__namespace.createElement("div", { className: css$C.separator }),
1362
+ React__namespace.createElement(TextInput, { cx: cx__default.default(this.props.bodyCx, css$C.dateInput, css$C['size-' + (this.props.size || 36)], this.state.inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: this.props.getPlaceholder ? this.props.getPlaceholder('to') : i18n.rangeDatePicker.pickerPlaceholderTo, size: this.props.size || '36', value: this.state.inputValue.to, onCancel: this.props.disableClear ? null : this.state.inputValue.from && this.state.inputValue.to && this.handleCancel, onValueChange: this.getChangeHandler('to'), isInvalid: this.props.isInvalid, isDisabled: this.props.isDisabled, isReadonly: this.props.isReadonly, onFocus: (e) => this.handleFocus(e, 'to'), onBlur: (e) => this.handleBlur(e, 'to'), isDropdown: false, rawProps: (_b = this.props.rawProps) === null || _b === void 0 ? void 0 : _b.to })));
1363
+ };
1364
+ }
1365
+ renderBody(props) {
1366
+ var _a;
1367
+ return (React__namespace.createElement(DropdownContainer, Object.assign({}, props, { cx: cx__default.default(css$C.dropdownContainer) }),
1368
+ React__namespace.createElement(FlexRow, null,
1369
+ React__namespace.createElement(RangeDatePickerBody, { cx: cx__default.default(this.props.bodyCx), value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, changeIsOpen: this.toggleOpening, presets: this.props.presets, focusPart: this.state.inFocus, renderDay: this.props.renderDay, renderFooter: this.props.renderFooter && (() => this.props.renderFooter(this.props.value || defaultValue)), isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body }))));
1370
+ }
1371
1371
  }
1372
1372
 
1373
1373
  var rangeCss = {"typography-header":"RangeDatePickerBody_typography-header__yuzZD","typography-block":"RangeDatePickerBody_typography-block__lYgPa","typography-inline":"RangeDatePickerBody_typography-inline__E8RNG","typography-16":"RangeDatePickerBody_typography-16__9uEL3","typography-14":"RangeDatePickerBody_typography-14__TEa5n","typography-12":"RangeDatePickerBody_typography-12__S-NBX","typography-promo":"RangeDatePickerBody_typography-promo__4VksA RangeDatePickerBody_typography-header__yuzZD RangeDatePickerBody_typography-block__lYgPa RangeDatePickerBody_typography-inline__E8RNG","root":"RangeDatePickerBody_root__CCVfb","typographyHeader":"RangeDatePickerBody_typography-header__yuzZD","typographyBlock":"RangeDatePickerBody_typography-block__lYgPa","typographyInline":"RangeDatePickerBody_typography-inline__E8RNG","typography16":"RangeDatePickerBody_typography-16__9uEL3","typography14":"RangeDatePickerBody_typography-14__TEa5n","typography12":"RangeDatePickerBody_typography-12__S-NBX","typographyPromo":"RangeDatePickerBody_typography-promo__4VksA RangeDatePickerBody_typography-header__yuzZD RangeDatePickerBody_typography-block__lYgPa RangeDatePickerBody_typography-inline__E8RNG"};
1374
1374
 
1375
1375
  var calendarPresetsCss = {"typography-header":"CalendarPresets_typography-header__D2UZW","typography-block":"CalendarPresets_typography-block__68m9o","typography-inline":"CalendarPresets_typography-inline__5mzPE","typography-16":"CalendarPresets_typography-16__-TrF-","typography-14":"CalendarPresets_typography-14__-onzo","typography-12":"CalendarPresets_typography-12__zE74w","typography-promo":"CalendarPresets_typography-promo__Zp05u CalendarPresets_typography-header__D2UZW CalendarPresets_typography-block__68m9o CalendarPresets_typography-inline__5mzPE","root":"CalendarPresets_root__5O668","typographyHeader":"CalendarPresets_typography-header__D2UZW","typographyBlock":"CalendarPresets_typography-block__68m9o","typographyInline":"CalendarPresets_typography-inline__5mzPE","typography16":"CalendarPresets_typography-16__-TrF-","typography14":"CalendarPresets_typography-14__-onzo","typography12":"CalendarPresets_typography-12__zE74w","typographyPromo":"CalendarPresets_typography-promo__Zp05u CalendarPresets_typography-header__D2UZW CalendarPresets_typography-block__68m9o CalendarPresets_typography-inline__5mzPE"};
1376
1376
 
1377
- function applyRangeDatePickerBodyMods() {
1378
- return [
1379
- css$D.root,
1380
- rangeCss.root,
1381
- calendarCss.root,
1382
- calendarPresetsCss.root,
1383
- ];
1384
- }
1377
+ function applyRangeDatePickerBodyMods() {
1378
+ return [
1379
+ css$D.root,
1380
+ rangeCss.root,
1381
+ calendarCss.root,
1382
+ calendarPresetsCss.root,
1383
+ ];
1384
+ }
1385
1385
  const RangeDatePickerBody = uuiCore.withMods(uuiComponents.RangeDatePickerBody, applyRangeDatePickerBodyMods, () => ({ navIconLeft: ForwardRef$Y, navIconRight: ForwardRef$Y }));
1386
1386
 
1387
1387
  var css$B = {"typography-header":"DropMarker_typography-header__W65wc","typography-block":"DropMarker_typography-block__uaCk0","typography-inline":"DropMarker_typography-inline__tZ3Y-","typography-16":"DropMarker_typography-16__o-pNo","typography-14":"DropMarker_typography-14__so29S","typography-12":"DropMarker_typography-12__UmnG8","typography-promo":"DropMarker_typography-promo__rioi4 DropMarker_typography-header__W65wc DropMarker_typography-block__uaCk0 DropMarker_typography-inline__tZ3Y-","blocker":"DropMarker_blocker__x-t-D","marker":"DropMarker_marker__5weO4","top":"DropMarker_top__a-UDx","bottom":"DropMarker_bottom__kUP91","left":"DropMarker_left__w5JwO","right":"DropMarker_right__zAmSs","inside":"DropMarker_inside__SfmMo","typographyHeader":"DropMarker_typography-header__W65wc","typographyBlock":"DropMarker_typography-block__uaCk0","typographyInline":"DropMarker_typography-inline__tZ3Y-","typography16":"DropMarker_typography-16__o-pNo","typography14":"DropMarker_typography-14__so29S","typography12":"DropMarker_typography-12__UmnG8","typographyPromo":"DropMarker_typography-promo__rioi4 DropMarker_typography-header__W65wc DropMarker_typography-block__uaCk0 DropMarker_typography-inline__tZ3Y-"};
1388
1388
 
1389
- class DropMarker extends React__namespace.Component {
1390
- render() {
1391
- return this.props.isDndInProgress ? React__namespace.createElement(React__namespace.Fragment, null,
1392
- this.props.enableBlocker && React__namespace.createElement("div", { className: css$B.blocker }),
1393
- React__namespace.createElement("div", { className: cx__default.default({
1394
- [css$B.marker]: true,
1395
- [css$B[this.props.position]]: true,
1396
- [this.props.cx]: !!this.props.cx,
1397
- }) })) : null;
1398
- }
1389
+ class DropMarker extends React__namespace.Component {
1390
+ render() {
1391
+ return this.props.isDndInProgress ? React__namespace.createElement(React__namespace.Fragment, null,
1392
+ this.props.enableBlocker && React__namespace.createElement("div", { className: css$B.blocker }),
1393
+ React__namespace.createElement("div", { className: cx__default.default({
1394
+ [css$B.marker]: true,
1395
+ [css$B[this.props.position]]: true,
1396
+ [this.props.cx]: !!this.props.cx,
1397
+ }) })) : null;
1398
+ }
1399
1399
  }
1400
1400
 
1401
1401
  var css$A = {"typography-header":"DataPickerBody_typography-header__AlPy4","typography-block":"DataPickerBody_typography-block__BIQe2","typography-inline":"DataPickerBody_typography-inline__lOHW0","typography-16":"DataPickerBody_typography-16__P2rqG","typography-14":"DataPickerBody_typography-14__kmNXP","typography-12":"DataPickerBody_typography-12__W2f-m","typography-promo":"DataPickerBody_typography-promo__VoJO5 DataPickerBody_typography-header__AlPy4 DataPickerBody_typography-block__BIQe2 DataPickerBody_typography-inline__lOHW0","body":"DataPickerBody_body__9Atow","multi":"DataPickerBody_multi__sToHj","modal":"DataPickerBody_modal__zvOE2","search-wrapper":"DataPickerBody_search-wrapper__UeG2b","checkbox":"DataPickerBody_checkbox__EFs7y","no-found-size-24":"DataPickerBody_no-found-size-24__4RC9-","no-found-size-30":"DataPickerBody_no-found-size-30__M8eYW","no-found-size-36":"DataPickerBody_no-found-size-36__jr82u","no-found-size-42":"DataPickerBody_no-found-size-42__9WVA5","typographyHeader":"DataPickerBody_typography-header__AlPy4","typographyBlock":"DataPickerBody_typography-block__BIQe2","typographyInline":"DataPickerBody_typography-inline__lOHW0","typography16":"DataPickerBody_typography-16__P2rqG","typography14":"DataPickerBody_typography-14__kmNXP","typography12":"DataPickerBody_typography-12__W2f-m","typographyPromo":"DataPickerBody_typography-promo__VoJO5 DataPickerBody_typography-header__AlPy4 DataPickerBody_typography-block__BIQe2 DataPickerBody_typography-inline__lOHW0","searchWrapper":"DataPickerBody_search-wrapper__UeG2b","noFoundSize24":"DataPickerBody_no-found-size-24__4RC9-","noFoundSize30":"DataPickerBody_no-found-size-30__M8eYW","noFoundSize36":"DataPickerBody_no-found-size-36__jr82u","noFoundSize42":"DataPickerBody_no-found-size-42__9WVA5"};
1402
1402
 
1403
- class DataPickerBody extends uuiComponents.PickerBodyBase {
1404
- constructor() {
1405
- super(...arguments);
1406
- this.lens = uuiCore.Lens.onEditableComponent(this);
1407
- this.searchLens = this.lens.prop('search');
1408
- }
1409
- renderNotFound() {
1410
- if (this.props.renderNotFound) {
1411
- return this.props.renderNotFound();
1412
- }
1413
- return React__namespace.default.createElement(uuiComponents.FlexCell, { cx: css$A[`no-found-size-${this.props.searchSize || 36}`], grow: 1, textAlign: 'center' },
1414
- React__namespace.default.createElement(Text, { size: this.props.searchSize || '36' }, i18n.dataPickerBody.noRecordsMessage));
1415
- }
1416
- render() {
1417
- const searchSize = uuiCore.isMobile() ? '48' : (this.props.searchSize || '36');
1418
- return React__namespace.default.createElement(React__namespace.default.Fragment, null,
1419
- this.showSearch() && (React__namespace.default.createElement("div", { key: 'search', className: css$A.searchWrapper },
1420
- React__namespace.default.createElement(uuiComponents.FlexCell, { grow: 1 },
1421
- React__namespace.default.createElement(SearchInput, Object.assign({ ref: this.searchRef, placeholder: i18n.dataPickerBody.searchPlaceholder }, this.searchLens.toProps(), { onKeyDown: this.searchKeyDown, size: searchSize }))))),
1422
- React__namespace.default.createElement(FlexRow, { key: 'body', cx: uuiCore.cx(css$A.body, css$A[this.props.editMode], css$A[this.props.selectionMode]), rawProps: { style: { maxHeight: this.props.maxHeight } } }, this.props.rowsCount > 0
1423
- ? React__namespace.default.createElement(VirtualList, Object.assign({}, this.lens.toProps(), { rows: this.props.rows, role: 'listbox', rawProps: this.props.rawProps, rowsCount: this.props.rowsCount }))
1424
- : this.renderNotFound()));
1425
- }
1403
+ class DataPickerBody extends uuiComponents.PickerBodyBase {
1404
+ constructor() {
1405
+ super(...arguments);
1406
+ this.lens = uuiCore.Lens.onEditableComponent(this);
1407
+ this.searchLens = this.lens.prop('search');
1408
+ }
1409
+ renderNotFound() {
1410
+ if (this.props.renderNotFound) {
1411
+ return this.props.renderNotFound();
1412
+ }
1413
+ return React__namespace.default.createElement(uuiComponents.FlexCell, { cx: css$A[`no-found-size-${this.props.searchSize || 36}`], grow: 1, textAlign: 'center' },
1414
+ React__namespace.default.createElement(Text, { size: this.props.searchSize || '36' }, i18n.dataPickerBody.noRecordsMessage));
1415
+ }
1416
+ render() {
1417
+ const searchSize = uuiCore.isMobile() ? '48' : (this.props.searchSize || '36');
1418
+ return React__namespace.default.createElement(React__namespace.default.Fragment, null,
1419
+ this.showSearch() && (React__namespace.default.createElement("div", { key: 'search', className: css$A.searchWrapper },
1420
+ React__namespace.default.createElement(uuiComponents.FlexCell, { grow: 1 },
1421
+ React__namespace.default.createElement(SearchInput, Object.assign({ ref: this.searchRef, placeholder: i18n.dataPickerBody.searchPlaceholder }, this.searchLens.toProps(), { onKeyDown: this.searchKeyDown, size: searchSize }))))),
1422
+ React__namespace.default.createElement(FlexRow, { key: 'body', cx: uuiCore.cx(css$A.body, css$A[this.props.editMode], css$A[this.props.selectionMode]), rawProps: { style: { maxHeight: this.props.maxHeight } } }, this.props.rowsCount > 0
1423
+ ? React__namespace.default.createElement(VirtualList, Object.assign({}, this.lens.toProps(), { rows: this.props.rows, role: 'listbox', rawProps: this.props.rawProps, rowsCount: this.props.rowsCount }))
1424
+ : this.renderNotFound()));
1425
+ }
1426
1426
  }
1427
1427
 
1428
- const switchSizes = {
1429
- '24': '12',
1430
- '36': '18',
1431
- '42': '24',
1432
- '48': '24',
1433
- };
1434
- const DataPickerFooterImpl = (props) => {
1435
- const { clearSelection, view, showSelected } = props;
1436
- const size = uuiCore.isMobile() ? '48' : (props.size || '36');
1437
- const switchSize = switchSizes[size];
1438
- const hasSelection = view.getSelectedRows().length > 0;
1439
- const handleKeyDown = (e) => {
1440
- if (!e.shiftKey && e.key === 'Tab')
1441
- e.preventDefault();
1442
- };
1443
- return (React__namespace.default.createElement(FlexRow, { padding: '12' },
1444
- !props.hideShowOnlySelected && React__namespace.default.createElement(Switch, { size: switchSize, value: showSelected.value, isDisabled: !hasSelection, onValueChange: showSelected.onValueChange, label: i18n.pickerInput.showOnlySelectedLabel }),
1445
- React__namespace.default.createElement(FlexSpacer, null),
1446
- view.selectAll && (React__namespace.default.createElement(FlexCell, { width: 'auto', alignSelf: 'center' },
1447
- React__namespace.default.createElement(LinkButton, { size: size, caption: hasSelection
1448
- ? i18n.pickerInput.clearSelectionButton
1449
- : i18n.pickerInput.selectAllButton, onClick: hasSelection
1450
- ? clearSelection
1451
- : () => view.selectAll.onValueChange(true), rawProps: { onKeyDown: handleKeyDown } })))));
1452
- };
1428
+ const switchSizes = {
1429
+ '24': '12',
1430
+ '36': '18',
1431
+ '42': '24',
1432
+ '48': '24',
1433
+ };
1434
+ const DataPickerFooterImpl = (props) => {
1435
+ const { clearSelection, view, showSelected } = props;
1436
+ const size = uuiCore.isMobile() ? '48' : (props.size || '36');
1437
+ const switchSize = switchSizes[size];
1438
+ const hasSelection = view.getSelectedRows().length > 0;
1439
+ const handleKeyDown = (e) => {
1440
+ if (!e.shiftKey && e.key === 'Tab')
1441
+ e.preventDefault();
1442
+ };
1443
+ return (React__namespace.default.createElement(FlexRow, { padding: '12' },
1444
+ !props.hideShowOnlySelected && React__namespace.default.createElement(Switch, { size: switchSize, value: showSelected.value, isDisabled: !hasSelection, onValueChange: showSelected.onValueChange, label: i18n.pickerInput.showOnlySelectedLabel }),
1445
+ React__namespace.default.createElement(FlexSpacer, null),
1446
+ view.selectAll && (React__namespace.default.createElement(FlexCell, { width: 'auto', alignSelf: 'center' },
1447
+ React__namespace.default.createElement(LinkButton, { size: size, caption: hasSelection
1448
+ ? i18n.pickerInput.clearSelectionButton
1449
+ : i18n.pickerInput.selectAllButton, onClick: hasSelection
1450
+ ? clearSelection
1451
+ : () => view.selectAll.onValueChange(true), rawProps: { onKeyDown: handleKeyDown } })))));
1452
+ };
1453
1453
  const DataPickerFooter = React__namespace.default.memo(DataPickerFooterImpl);
1454
1454
 
1455
1455
  var css$z = {"header":"DataPickerHeader_header__UDMhr","close":"DataPickerHeader_close__30pW6"};
@@ -1471,12 +1471,12 @@ var SvgNavigationClose24 = function SvgNavigationClose24(props, ref) {
1471
1471
  };
1472
1472
  var ForwardRef$x = /*#__PURE__*/React.forwardRef(SvgNavigationClose24);
1473
1473
 
1474
- const DataPickerHeaderImpl = props => {
1475
- const title = props.title ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
1476
- return (React__namespace.default.createElement(FlexRow, { alignItems: 'center', borderBottom: true, size: "48", cx: css$z.header },
1477
- React__namespace.default.createElement(Text, { font: 'semibold' }, title),
1478
- React__namespace.default.createElement(IconButton, { icon: ForwardRef$x, onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$z.close })));
1479
- };
1474
+ const DataPickerHeaderImpl = props => {
1475
+ const title = props.title ? props.title.charAt(0).toUpperCase() + props.title.slice(1) : '';
1476
+ return (React__namespace.default.createElement(FlexRow, { alignItems: 'center', borderBottom: true, size: "48", cx: css$z.header },
1477
+ React__namespace.default.createElement(Text, { font: 'semibold' }, title),
1478
+ React__namespace.default.createElement(IconButton, { icon: ForwardRef$x, onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$z.close })));
1479
+ };
1480
1480
  const DataPickerHeader = React__namespace.default.memo(DataPickerHeaderImpl);
1481
1481
 
1482
1482
  var _defs$1, _use;
@@ -1504,59 +1504,59 @@ var ForwardRef$w = /*#__PURE__*/React.forwardRef(SvgTreeFoldingArrow);
1504
1504
 
1505
1505
  var css$y = {"cell":"DataTableCell_cell__VgHTT","wrapper":"DataTableCell_wrapper__6hBNx","align-widgets-top":"DataTableCell_align-widgets-top__7LNVl","size-24":"DataTableCell_size-24__g6m7O","folding-arrow":"DataTableCell_folding-arrow__6iI4s","size-30":"DataTableCell_size-30__hpjkm","size-36":"DataTableCell_size-36__8qiBq","size-42":"DataTableCell_size-42__jJMhr","size-48":"DataTableCell_size-48__XXrAx","size-60":"DataTableCell_size-60__0XLPh","align-widgets-center":"DataTableCell_align-widgets-center__VXHNb","padding-12":"DataTableCell_padding-12__xvGe5","padding-24":"DataTableCell_padding-24__r322g","padding-left-12":"DataTableCell_padding-left-12__g6QSx","padding-left-24":"DataTableCell_padding-left-24__vm-bI","padding-right-24":"DataTableCell_padding-right-24__CjNWh","drag-handle":"DataTableCell_drag-handle__Ge7UM","checkbox":"DataTableCell_checkbox__sY2kh","indent":"DataTableCell_indent__lcZWO","folding-arrow-12":"DataTableCell_folding-arrow-12__mVKaH","folding-arrow-18":"DataTableCell_folding-arrow-18__hiEIW","icon-container":"DataTableCell_icon-container__1fR7V","alignWidgetsTop":"DataTableCell_align-widgets-top__7LNVl","size24":"DataTableCell_size-24__g6m7O","foldingArrow":"DataTableCell_folding-arrow__6iI4s","size30":"DataTableCell_size-30__hpjkm","size36":"DataTableCell_size-36__8qiBq","size42":"DataTableCell_size-42__jJMhr","size48":"DataTableCell_size-48__XXrAx","size60":"DataTableCell_size-60__0XLPh","alignWidgetsCenter":"DataTableCell_align-widgets-center__VXHNb","padding12":"DataTableCell_padding-12__xvGe5","padding24":"DataTableCell_padding-24__r322g","paddingLeft12":"DataTableCell_padding-left-12__g6QSx","paddingLeft24":"DataTableCell_padding-left-24__vm-bI","paddingRight24":"DataTableCell_padding-right-24__CjNWh","dragHandle":"DataTableCell_drag-handle__Ge7UM","foldingArrow12":"DataTableCell_folding-arrow-12__mVKaH","foldingArrow18":"DataTableCell_folding-arrow-18__hiEIW","iconContainer":"DataTableCell_icon-container__1fR7V"};
1506
1506
 
1507
- function DataTableRowAddons(props) {
1508
- var _a, _b;
1509
- const row = props.rowProps;
1510
- const additionalItemSize = +props.size < 30 ? '12' : '18';
1511
- return React__namespace.createElement(React__namespace.Fragment, null,
1512
- ((_a = row.dnd) === null || _a === void 0 ? void 0 : _a.srcData) && React__namespace.createElement(uuiComponents.DragHandle, { key: 'dh', cx: css$y.dragHandle }),
1513
- ((_b = row === null || row === void 0 ? void 0 : row.checkbox) === null || _b === void 0 ? void 0 : _b.isVisible) && React__namespace.createElement(Checkbox, { key: 'cb', cx: css$y.checkbox, tabIndex: props.tabIndex, size: additionalItemSize, value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid }),
1514
- row.indent > 0 && (React__namespace.createElement("div", { key: 'fold', className: css$y.indent, style: { marginLeft: (row.indent - 1) * 24 } }, row.isFoldable &&
1515
- React__namespace.createElement(uuiComponents.IconContainer, { key: 'icon', icon: ForwardRef$w, cx: [css$y.foldingArrow, css$y[`folding-arrow-${additionalItemSize}`], uuiCore.uuiMarkers.clickable, css$y.iconContainer], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row) }))));
1516
- }
1517
- function DataTableCell(props) {
1518
- var _a;
1519
- props = Object.assign({}, props);
1520
- if (props.isFirstColumn) {
1521
- props.addons = React__namespace.createElement(DataTableRowAddons, Object.assign({}, props));
1522
- }
1523
- props.renderPlaceholder = props.renderPlaceholder || (() => (React__namespace.createElement(Text, { key: 't', size: props.size != '60' ? props.size : '48' },
1524
- React__namespace.createElement(TextPlaceholder, null))));
1525
- props.renderTooltip = (tooltipProps) => React__namespace.createElement(Tooltip, Object.assign({ color: 'critical' }, tooltipProps));
1526
- const isEditable = !!props.onValueChange;
1527
- props.border = (_a = props.border) !== null && _a !== void 0 ? _a : (isEditable ? true : null);
1528
- props.cx = [
1529
- 'data-table-cell',
1530
- props.cx,
1531
- css$y.cell,
1532
- css$y['size-' + (props.size || '36')],
1533
- css$y[`padding-${props.padding || ((isEditable && !props.rowProps.isLoading) && '0') || '12'}`],
1534
- props.isFirstColumn && css$y[`padding-left-${props.padding || '24'}`],
1535
- props.isLastColumn && css$y['padding-right-24'],
1536
- css$y[`align-widgets-${props.alignActions || 'top'}`],
1537
- props.background && `background-${props.background}`,
1538
- props.border && 'uui-dt-cell-border',
1539
- ];
1540
- return React__namespace.createElement(uuiComponents.DataTableCell, Object.assign({}, props));
1507
+ function DataTableRowAddons(props) {
1508
+ var _a, _b;
1509
+ const row = props.rowProps;
1510
+ const additionalItemSize = +props.size < 30 ? '12' : '18';
1511
+ return React__namespace.createElement(React__namespace.Fragment, null,
1512
+ ((_a = row.dnd) === null || _a === void 0 ? void 0 : _a.srcData) && React__namespace.createElement(uuiComponents.DragHandle, { key: 'dh', cx: css$y.dragHandle }),
1513
+ ((_b = row === null || row === void 0 ? void 0 : row.checkbox) === null || _b === void 0 ? void 0 : _b.isVisible) && React__namespace.createElement(Checkbox, { key: 'cb', cx: css$y.checkbox, tabIndex: props.tabIndex, size: additionalItemSize, value: row.isChecked, indeterminate: !row.isChecked && row.isChildrenChecked, onValueChange: () => row.onCheck(row), isDisabled: row.checkbox.isDisabled, isInvalid: row.checkbox.isInvalid }),
1514
+ row.indent > 0 && (React__namespace.createElement("div", { key: 'fold', className: css$y.indent, style: { marginLeft: (row.indent - 1) * 24 } }, row.isFoldable &&
1515
+ React__namespace.createElement(uuiComponents.IconContainer, { key: 'icon', icon: ForwardRef$w, cx: [css$y.foldingArrow, css$y[`folding-arrow-${additionalItemSize}`], uuiCore.uuiMarkers.clickable, css$y.iconContainer], rotate: row.isFolded ? '90ccw' : '0', onClick: () => row.onFold(row) }))));
1516
+ }
1517
+ function DataTableCell(props) {
1518
+ var _a;
1519
+ props = Object.assign({}, props);
1520
+ if (props.isFirstColumn) {
1521
+ props.addons = React__namespace.createElement(DataTableRowAddons, Object.assign({}, props));
1522
+ }
1523
+ props.renderPlaceholder = props.renderPlaceholder || (() => (React__namespace.createElement(Text, { key: 't', size: props.size != '60' ? props.size : '48' },
1524
+ React__namespace.createElement(TextPlaceholder, null))));
1525
+ props.renderTooltip = (tooltipProps) => React__namespace.createElement(Tooltip, Object.assign({ color: 'critical' }, tooltipProps));
1526
+ const isEditable = !!props.onValueChange;
1527
+ props.border = (_a = props.border) !== null && _a !== void 0 ? _a : (isEditable ? true : null);
1528
+ props.cx = [
1529
+ 'data-table-cell',
1530
+ props.cx,
1531
+ css$y.cell,
1532
+ css$y['size-' + (props.size || '36')],
1533
+ css$y[`padding-${props.padding || ((isEditable && !props.rowProps.isLoading) && '0') || '12'}`],
1534
+ props.isFirstColumn && css$y[`padding-left-${props.padding || '24'}`],
1535
+ props.isLastColumn && css$y['padding-right-24'],
1536
+ css$y[`align-widgets-${props.alignActions || 'top'}`],
1537
+ props.background && `background-${props.background}`,
1538
+ props.border && 'uui-dt-cell-border',
1539
+ ];
1540
+ return React__namespace.createElement(uuiComponents.DataTableCell, Object.assign({}, props));
1541
1541
  }
1542
1542
 
1543
1543
  var css$x = {"typography-header":"DataTableRow_typography-header__uNO7L","typography-block":"DataTableRow_typography-block__tHe35","typography-inline":"DataTableRow_typography-inline__KgXSh","typography-16":"DataTableRow_typography-16__gMKvg","typography-14":"DataTableRow_typography-14__itR0W","typography-12":"DataTableRow_typography-12__G4k4k","typography-promo":"DataTableRow_typography-promo__LE-gA DataTableRow_typography-header__uNO7L DataTableRow_typography-block__tHe35 DataTableRow_typography-inline__KgXSh","root":"DataTableRow_root__ThnfZ","size-24":"DataTableRow_size-24__mjGKU","size-30":"DataTableRow_size-30__Kb8nP","size-36":"DataTableRow_size-36__dolOJ","size-48":"DataTableRow_size-48__DpAQX","size-60":"DataTableRow_size-60__k0ZKS","background-white":"DataTableRow_background-white__GKFMn","typographyHeader":"DataTableRow_typography-header__uNO7L","typographyBlock":"DataTableRow_typography-block__tHe35","typographyInline":"DataTableRow_typography-inline__KgXSh","typography16":"DataTableRow_typography-16__gMKvg","typography14":"DataTableRow_typography-14__itR0W","typography12":"DataTableRow_typography-12__G4k4k","typographyPromo":"DataTableRow_typography-promo__LE-gA DataTableRow_typography-header__uNO7L DataTableRow_typography-block__tHe35 DataTableRow_typography-inline__KgXSh","size24":"DataTableRow_size-24__mjGKU","size30":"DataTableRow_size-30__Kb8nP","size36":"DataTableRow_size-36__dolOJ","size48":"DataTableRow_size-48__DpAQX","size60":"DataTableRow_size-60__k0ZKS","backgroundWhite":"DataTableRow_background-white__GKFMn"};
1544
1544
 
1545
- // Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
1546
- // As we need our mods to style the cell properly, we extract them from DataTableCellProps.rowProps, which is a hack, but it's reliable enough.
1547
- const renderCell = (props) => {
1548
- const mods = props.rowProps;
1549
- return React__namespace.createElement(DataTableCell, Object.assign({ size: mods.size }, props));
1550
- };
1551
- const renderDropMarkers = (props) => React__namespace.createElement(DropMarker, Object.assign({}, props, { enableBlocker: true }));
1552
- const propsMods = { renderCell, renderDropMarkers };
1553
- const DataTableRow = uuiCore.withMods(uuiComponents.DataTableRow, ({ borderBottom = true, background, size }) => {
1554
- return [
1555
- css$x.root,
1556
- borderBottom && 'uui-dt-row-border',
1557
- css$x['size-' + (size || '36')],
1558
- css$x['background-' + (background || 'default')],
1559
- ];
1545
+ // Here we define a single instance of the renderCell function to make DataTableRow#shouldComponentUpdate work.
1546
+ // As we need our mods to style the cell properly, we extract them from DataTableCellProps.rowProps, which is a hack, but it's reliable enough.
1547
+ const renderCell = (props) => {
1548
+ const mods = props.rowProps;
1549
+ return React__namespace.createElement(DataTableCell, Object.assign({ size: mods.size }, props));
1550
+ };
1551
+ const renderDropMarkers = (props) => React__namespace.createElement(DropMarker, Object.assign({}, props, { enableBlocker: true }));
1552
+ const propsMods = { renderCell, renderDropMarkers };
1553
+ const DataTableRow = uuiCore.withMods(uuiComponents.DataTableRow, ({ borderBottom = true, background, size }) => {
1554
+ return [
1555
+ css$x.root,
1556
+ borderBottom && 'uui-dt-row-border',
1557
+ css$x['size-' + (size || '36')],
1558
+ css$x['background-' + (background || 'default')],
1559
+ ];
1560
1560
  }, () => propsMods);
1561
1561
 
1562
1562
  var css$w = {"typography-header":"DataTableHeaderRow_typography-header__17Mf0","typography-block":"DataTableHeaderRow_typography-block__qHB6b","typography-inline":"DataTableHeaderRow_typography-inline__lCA-Y","typography-16":"DataTableHeaderRow_typography-16__ZijSq","typography-14":"DataTableHeaderRow_typography-14__wGc4t","typography-12":"DataTableHeaderRow_typography-12__spGat","typography-promo":"DataTableHeaderRow_typography-promo__j-vYv DataTableHeaderRow_typography-header__17Mf0 DataTableHeaderRow_typography-block__qHB6b DataTableHeaderRow_typography-inline__lCA-Y","header-cell":"DataTableHeaderRow_header-cell__KtC6r","config-icon":"DataTableHeaderRow_config-icon__w0uLR","typographyHeader":"DataTableHeaderRow_typography-header__17Mf0","typographyBlock":"DataTableHeaderRow_typography-block__qHB6b","typographyInline":"DataTableHeaderRow_typography-inline__lCA-Y","typography16":"DataTableHeaderRow_typography-16__ZijSq","typography14":"DataTableHeaderRow_typography-14__wGc4t","typography12":"DataTableHeaderRow_typography-12__spGat","typographyPromo":"DataTableHeaderRow_typography-promo__j-vYv DataTableHeaderRow_typography-header__17Mf0 DataTableHeaderRow_typography-block__qHB6b DataTableHeaderRow_typography-inline__lCA-Y","headerCell":"DataTableHeaderRow_header-cell__KtC6r","configIcon":"DataTableHeaderRow_config-icon__w0uLR"};
@@ -1578,9 +1578,9 @@ var SvgActionSettings18 = function SvgActionSettings18(props, ref) {
1578
1578
  };
1579
1579
  var ForwardRef$v = /*#__PURE__*/React.forwardRef(SvgActionSettings18);
1580
1580
 
1581
- const DataTableHeaderRow = uuiCore.withMods(uuiComponents.DataTableHeaderRow, mods => [css$w.root], mods => ({
1582
- renderCell: props => React__namespace.createElement(DataTableHeaderCell, Object.assign({}, props, { size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key })),
1583
- renderConfigButton: () => React__namespace.createElement(IconButton, { key: 'configuration', onClick: mods.onConfigButtonClick, cx: css$w.configIcon, color: 'default', icon: ForwardRef$v }),
1581
+ const DataTableHeaderRow = uuiCore.withMods(uuiComponents.DataTableHeaderRow, mods => [css$w.root], mods => ({
1582
+ renderCell: props => React__namespace.createElement(DataTableHeaderCell, Object.assign({}, props, { size: mods.size, textCase: mods.textCase || 'normal', key: props.column.key })),
1583
+ renderConfigButton: () => React__namespace.createElement(IconButton, { key: 'configuration', onClick: mods.onConfigButtonClick, cx: css$w.configIcon, color: 'default', icon: ForwardRef$v }),
1584
1584
  }));
1585
1585
 
1586
1586
  var css$v = {"typography-header":"DataTableHeaderCell_typography-header__oILYa","typography-block":"DataTableHeaderCell_typography-block__BQMtM","typography-inline":"DataTableHeaderCell_typography-inline__cfsue","typography-16":"DataTableHeaderCell_typography-16__ZEqH6","typography-14":"DataTableHeaderCell_typography-14__keNR5","typography-12":"DataTableHeaderCell_typography-12__PhqnS","typography-promo":"DataTableHeaderCell_typography-promo__G4UmR DataTableHeaderCell_typography-header__oILYa DataTableHeaderCell_typography-block__BQMtM DataTableHeaderCell_typography-inline__cfsue","cell":"DataTableHeaderCell_cell__8JnbB","sort-icon":"DataTableHeaderCell_sort-icon__Wi-rh","dropdown-icon":"DataTableHeaderCell_dropdown-icon__-vO3u","infoIcon":"DataTableHeaderCell_infoIcon__1Ang4","resizable":"DataTableHeaderCell_resizable__sNvwo","size-24":"DataTableHeaderCell_size-24__ntP26","size-30":"DataTableHeaderCell_size-30__znptx","size-36":"DataTableHeaderCell_size-36__m5DC6","size-42":"DataTableHeaderCell_size-42__YX4yM","size-48":"DataTableHeaderCell_size-48__YCyCX","padding-left-24":"DataTableHeaderCell_padding-left-24__sZhuC","padding-right-24":"DataTableHeaderCell_padding-right-24__5Ne7M","caption":"DataTableHeaderCell_caption__pF7VF","checkbox":"DataTableHeaderCell_checkbox__sg2V-","icon":"DataTableHeaderCell_icon__XDYeh","icon-cell":"DataTableHeaderCell_icon-cell__t-wBF","align-right":"DataTableHeaderCell_align-right__JzZ-h","align-center":"DataTableHeaderCell_align-center__BegNE","tooltip-wrapper":"DataTableHeaderCell_tooltip-wrapper__ILECw","cell-tooltip":"DataTableHeaderCell_cell-tooltip__XAI4G","upper-case":"DataTableHeaderCell_upper-case__YCQ24","font-size-14":"DataTableHeaderCell_font-size-14__3JeGt","resize-mark":"DataTableHeaderCell_resize-mark__Vlv3w","draggable":"DataTableHeaderCell_draggable__c0dne","ghost":"DataTableHeaderCell_ghost__Yjb5B","is-dragged-out":"DataTableHeaderCell_is-dragged-out__HzBd6","dnd-marker-left":"DataTableHeaderCell_dnd-marker-left__0pkPC","dnd-marker-right":"DataTableHeaderCell_dnd-marker-right__1i9gh","typographyHeader":"DataTableHeaderCell_typography-header__oILYa","typographyBlock":"DataTableHeaderCell_typography-block__BQMtM","typographyInline":"DataTableHeaderCell_typography-inline__cfsue","typography16":"DataTableHeaderCell_typography-16__ZEqH6","typography14":"DataTableHeaderCell_typography-14__keNR5","typography12":"DataTableHeaderCell_typography-12__PhqnS","typographyPromo":"DataTableHeaderCell_typography-promo__G4UmR DataTableHeaderCell_typography-header__oILYa DataTableHeaderCell_typography-block__BQMtM DataTableHeaderCell_typography-inline__cfsue","sortIcon":"DataTableHeaderCell_sort-icon__Wi-rh","dropdownIcon":"DataTableHeaderCell_dropdown-icon__-vO3u","size24":"DataTableHeaderCell_size-24__ntP26","size30":"DataTableHeaderCell_size-30__znptx","size36":"DataTableHeaderCell_size-36__m5DC6","size42":"DataTableHeaderCell_size-42__YX4yM","size48":"DataTableHeaderCell_size-48__YCyCX","paddingLeft24":"DataTableHeaderCell_padding-left-24__sZhuC","paddingRight24":"DataTableHeaderCell_padding-right-24__5Ne7M","iconCell":"DataTableHeaderCell_icon-cell__t-wBF","alignRight":"DataTableHeaderCell_align-right__JzZ-h","alignCenter":"DataTableHeaderCell_align-center__BegNE","tooltipWrapper":"DataTableHeaderCell_tooltip-wrapper__ILECw","cellTooltip":"DataTableHeaderCell_cell-tooltip__XAI4G","upperCase":"DataTableHeaderCell_upper-case__YCQ24","fontSize14":"DataTableHeaderCell_font-size-14__3JeGt","resizeMark":"DataTableHeaderCell_resize-mark__Vlv3w","isDraggedOut":"DataTableHeaderCell_is-dragged-out__HzBd6","dndMarkerLeft":"DataTableHeaderCell_dnd-marker-left__0pkPC","dndMarkerRight":"DataTableHeaderCell_dnd-marker-right__1i9gh"};
@@ -1704,68 +1704,68 @@ var SvgNotificationInfoOutline18 = function SvgNotificationInfoOutline18(props,
1704
1704
  };
1705
1705
  var ForwardRef$o = /*#__PURE__*/React.forwardRef(SvgNotificationInfoOutline18);
1706
1706
 
1707
- class DataTableHeaderCell extends React__namespace.Component {
1708
- constructor() {
1709
- super(...arguments);
1710
- this.state = {
1711
- isDropdownOpen: null,
1712
- };
1713
- this.getTextStyle = () => {
1714
- if (this.props.textCase === 'upper')
1715
- return css$v.upperCase;
1716
- return css$v['font-size-14'];
1717
- };
1718
- this.getColumnCaption = () => (React__namespace.createElement("div", { className: css$v.tooltipWrapper },
1719
- React__namespace.createElement(Tooltip, { trigger: "hover", placement: "bottom-start", renderContent: (!this.state.isDropdownOpen && this.props.column.info) ? () => this.props.column.info : null, color: "default", cx: css$v.cellTooltip, offset: [-12, 12] },
1720
- React__namespace.createElement("div", { className: uuiCore.cx(css$v.iconCell, css$v['align-' + this.props.column.textAlign], uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaptionWrapper) },
1721
- React__namespace.createElement(Text, { key: "text", lineHeight: "30", fontSize: "14", size: "30", cx: uuiCore.cx(css$v.caption, this.getTextStyle(), uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaption) }, this.props.column.caption),
1722
- this.props.column.info && (React__namespace.createElement(IconButton, { key: "info", cx: uuiCore.cx(css$v.icon, css$v.infoIcon, this.props.sortDirection && css$v.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: 'secondary', icon: ForwardRef$o })),
1723
- this.props.column.isSortable && (!this.props.column.renderFilter || this.props.sortDirection) && (React__namespace.createElement(IconButton, { key: "sort", cx: uuiCore.cx(css$v.icon, css$v.sortIcon, this.props.sortDirection && css$v.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: this.props.sortDirection ? 'default' : 'secondary', icon: this.props.sortDirection === 'desc' ? ForwardRef$s : this.props.sortDirection === 'asc' ? ForwardRef$t : ForwardRef$u })),
1724
- this.props.isFilterActive && (React__namespace.createElement(IconButton, { key: "filter", cx: uuiCore.cx(css$v.icon, !this.props.sortDirection && css$v.filterIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderFilterIcon), color: "default", icon: ForwardRef$r })),
1725
- this.props.column.renderFilter && (React__namespace.createElement(IconButton, { key: "dropdown", cx: uuiCore.cx(css$v.icon, css$v.dropdownIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderDropdownIcon), color: "secondary", icon: this.state.isDropdownOpen ? ForwardRef$p : ForwardRef$q }))))));
1726
- this.renderHeaderCheckbox = () => this.props.selectAll && this.props.isFirstColumn && (React__namespace.createElement(Checkbox, Object.assign({ size: +this.props.size < 36 ? '12' : '18' }, this.props.selectAll, { cx: uuiCore.cx(css$v.checkbox, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCheckbox) })));
1727
- this.renderResizeMark = (props) => (React__namespace.createElement("div", { onMouseDown: props.onResizeStart, className: uuiCore.cx(css$v.resizeMark, uuiCore.uuiMarkers.draggable) }));
1728
- this.renderCellContent = (props, dropdownProps) => (React__namespace.createElement(FlexCell, Object.assign({}, this.props.column, { minWidth: this.props.column.width, ref: ref => {
1729
- var _a;
1730
- props.ref(ref);
1731
- (_a = dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.ref) === null || _a === void 0 ? void 0 : _a.call(dropdownProps, ref);
1732
- }, cx: uuiCore.cx(uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCell, (this.props.column.isSortable || this.props.isDropdown) && uuiCore.uuiMarkers.clickable, css$v.cell, css$v['size-' + (this.props.size || '36')], this.props.isFirstColumn && css$v[`padding-left-24`], this.props.isLastColumn && css$v['padding-right-24'], this.props.column.cx, this.props.allowColumnsResizing && css$v.resizable, props.isDraggable && css$v.draggable, props.isDragGhost && css$v.ghost, props.isDraggedOut && css$v.isDraggedOut, props.isDndInProgress && css$v['dnd-marker-' + props.position]), onClick: !this.props.column.renderFilter ? props.toggleSort : dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.onClick, rawProps: Object.assign({ role: 'columnheader', 'aria-sort': this.props.sortDirection === 'asc' ? 'ascending' : this.props.sortDirection ? 'descending' : 'none' }, props.eventHandlers) }),
1733
- this.renderHeaderCheckbox(),
1734
- this.getColumnCaption(),
1735
- this.props.allowColumnsResizing && this.renderResizeMark(props)));
1736
- this.renderCellWithFilter = (props) => (React__namespace.createElement(ColumnHeaderDropdown, { isOpen: this.state.isDropdownOpen, isSortable: this.props.column.isSortable, renderTarget: dropdownProps => this.renderCellContent(props, dropdownProps), renderFilter: this.props.renderFilter, onSort: this.props.onSort, sortDirection: this.props.sortDirection, onOpenChange: isDropdownOpen => this.setState({ isDropdownOpen }), title: this.props.column.caption }));
1737
- }
1738
- render() {
1739
- return (React__namespace.createElement(uuiComponents.DataTableHeaderCell, Object.assign({}, this.props, { renderCellContent: this.props.column.renderFilter
1740
- ? this.renderCellWithFilter
1741
- : this.renderCellContent })));
1742
- }
1707
+ class DataTableHeaderCell extends React__namespace.Component {
1708
+ constructor() {
1709
+ super(...arguments);
1710
+ this.state = {
1711
+ isDropdownOpen: null,
1712
+ };
1713
+ this.getTextStyle = () => {
1714
+ if (this.props.textCase === 'upper')
1715
+ return css$v.upperCase;
1716
+ return css$v['font-size-14'];
1717
+ };
1718
+ this.getColumnCaption = () => (React__namespace.createElement("div", { className: css$v.tooltipWrapper },
1719
+ React__namespace.createElement(Tooltip, { trigger: "hover", placement: "bottom-start", renderContent: (!this.state.isDropdownOpen && this.props.column.info) ? () => this.props.column.info : null, color: "default", cx: css$v.cellTooltip, offset: [-12, 12] },
1720
+ React__namespace.createElement("div", { className: uuiCore.cx(css$v.iconCell, css$v['align-' + this.props.column.textAlign], uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaptionWrapper) },
1721
+ React__namespace.createElement(Text, { key: "text", lineHeight: "30", fontSize: "14", size: "30", cx: uuiCore.cx(css$v.caption, this.getTextStyle(), uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCaption) }, this.props.column.caption),
1722
+ this.props.column.info && (React__namespace.createElement(IconButton, { key: "info", cx: uuiCore.cx(css$v.icon, css$v.infoIcon, this.props.sortDirection && css$v.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: 'secondary', icon: ForwardRef$o })),
1723
+ this.props.column.isSortable && (!this.props.column.renderFilter || this.props.sortDirection) && (React__namespace.createElement(IconButton, { key: "sort", cx: uuiCore.cx(css$v.icon, css$v.sortIcon, this.props.sortDirection && css$v.sortIconActive, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderSortIcon), color: this.props.sortDirection ? 'default' : 'secondary', icon: this.props.sortDirection === 'desc' ? ForwardRef$s : this.props.sortDirection === 'asc' ? ForwardRef$t : ForwardRef$u })),
1724
+ this.props.isFilterActive && (React__namespace.createElement(IconButton, { key: "filter", cx: uuiCore.cx(css$v.icon, !this.props.sortDirection && css$v.filterIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderFilterIcon), color: "default", icon: ForwardRef$r })),
1725
+ this.props.column.renderFilter && (React__namespace.createElement(IconButton, { key: "dropdown", cx: uuiCore.cx(css$v.icon, css$v.dropdownIcon, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderDropdownIcon), color: "secondary", icon: this.state.isDropdownOpen ? ForwardRef$p : ForwardRef$q }))))));
1726
+ this.renderHeaderCheckbox = () => this.props.selectAll && this.props.isFirstColumn && (React__namespace.createElement(Checkbox, Object.assign({ size: +this.props.size < 36 ? '12' : '18' }, this.props.selectAll, { cx: uuiCore.cx(css$v.checkbox, uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCheckbox) })));
1727
+ this.renderResizeMark = (props) => (React__namespace.createElement("div", { onMouseDown: props.onResizeStart, className: uuiCore.cx(css$v.resizeMark, uuiCore.uuiMarkers.draggable) }));
1728
+ this.renderCellContent = (props, dropdownProps) => (React__namespace.createElement(FlexCell, Object.assign({}, this.props.column, { minWidth: this.props.column.width, ref: ref => {
1729
+ var _a;
1730
+ props.ref(ref);
1731
+ (_a = dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.ref) === null || _a === void 0 ? void 0 : _a.call(dropdownProps, ref);
1732
+ }, cx: uuiCore.cx(uuiCore.uuiDataTableHeaderCell.uuiTableHeaderCell, (this.props.column.isSortable || this.props.isDropdown) && uuiCore.uuiMarkers.clickable, css$v.cell, css$v['size-' + (this.props.size || '36')], this.props.isFirstColumn && css$v[`padding-left-24`], this.props.isLastColumn && css$v['padding-right-24'], this.props.column.cx, this.props.allowColumnsResizing && css$v.resizable, props.isDraggable && css$v.draggable, props.isDragGhost && css$v.ghost, props.isDraggedOut && css$v.isDraggedOut, props.isDndInProgress && css$v['dnd-marker-' + props.position]), onClick: !this.props.column.renderFilter ? props.toggleSort : dropdownProps === null || dropdownProps === void 0 ? void 0 : dropdownProps.onClick, rawProps: Object.assign({ role: 'columnheader', 'aria-sort': this.props.sortDirection === 'asc' ? 'ascending' : this.props.sortDirection ? 'descending' : 'none' }, props.eventHandlers) }),
1733
+ this.renderHeaderCheckbox(),
1734
+ this.getColumnCaption(),
1735
+ this.props.allowColumnsResizing && this.renderResizeMark(props)));
1736
+ this.renderCellWithFilter = (props) => (React__namespace.createElement(ColumnHeaderDropdown, { isOpen: this.state.isDropdownOpen, isSortable: this.props.column.isSortable, renderTarget: dropdownProps => this.renderCellContent(props, dropdownProps), renderFilter: this.props.renderFilter, onSort: this.props.onSort, sortDirection: this.props.sortDirection, onOpenChange: isDropdownOpen => this.setState({ isDropdownOpen }), title: this.props.column.caption }));
1737
+ }
1738
+ render() {
1739
+ return (React__namespace.createElement(uuiComponents.DataTableHeaderCell, Object.assign({}, this.props, { renderCellContent: this.props.column.renderFilter
1740
+ ? this.renderCellWithFilter
1741
+ : this.renderCellContent })));
1742
+ }
1743
1743
  }
1744
1744
 
1745
- const useColumnsWithFilters = (initialColumns, filters) => {
1746
- const makeFilterRenderCallback = React.useCallback((key) => (filterLens, dropdownProps) => {
1747
- const filter = filters.find(f => f.columnKey === key);
1748
- if (!filter)
1749
- return null;
1750
- const props = filterLens.prop(filter.field).toProps();
1751
- return React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, filter, dropdownProps));
1752
- }, [filters]);
1753
- const columns = React.useMemo(() => {
1754
- if (filters) {
1755
- const filterKeys = filters.map(f => f.columnKey);
1756
- const newColumns = (initialColumns.map(column => {
1757
- if (filterKeys.includes(column.key)) {
1758
- return Object.assign(Object.assign({}, column), { renderFilter: makeFilterRenderCallback(column.key) });
1759
- }
1760
- else {
1761
- return column;
1762
- }
1763
- }));
1764
- return newColumns;
1765
- }
1766
- return initialColumns;
1767
- }, [filters, initialColumns]);
1768
- return columns;
1745
+ const useColumnsWithFilters = (initialColumns, filters) => {
1746
+ const makeFilterRenderCallback = React.useCallback((key) => (filterLens, dropdownProps) => {
1747
+ const filter = filters.find(f => f.columnKey === key);
1748
+ if (!filter)
1749
+ return null;
1750
+ const props = filterLens.prop(filter.field).toProps();
1751
+ return React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, filter, dropdownProps));
1752
+ }, [filters]);
1753
+ const columns = React.useMemo(() => {
1754
+ if (filters) {
1755
+ const filterKeys = filters.map(f => f.columnKey);
1756
+ const newColumns = (initialColumns.map(column => {
1757
+ if (filterKeys.includes(column.key)) {
1758
+ return Object.assign(Object.assign({}, column), { renderFilter: makeFilterRenderCallback(column.key) });
1759
+ }
1760
+ else {
1761
+ return column;
1762
+ }
1763
+ }));
1764
+ return newColumns;
1765
+ }
1766
+ return initialColumns;
1767
+ }, [filters, initialColumns]);
1768
+ return columns;
1769
1769
  };
1770
1770
 
1771
1771
  var _path$m, _path2$1, _path3, _path4, _path5, _path6, _g$1, _path7, _path8, _path9, _path10, _path11, _path12, _path13, _path14, _path15, _path16, _path17, _path18, _path19, _path20, _path21, _path22, _path23, _path24, _defs;
@@ -1910,43 +1910,43 @@ var ForwardRef$n = /*#__PURE__*/React.forwardRef(SvgEmptyTable);
1910
1910
 
1911
1911
  var css$u = {"sticky-header":"DataTable_sticky-header__Dt-br","listContainer":"DataTable_listContainer__MJ2d9","table":"DataTable_table__n--u-","no-results":"DataTable_no-results__8wzS9","no-results-icon":"DataTable_no-results-icon__-nnhq","no-results-title":"DataTable_no-results-title__MM7z0","stickyHeader":"DataTable_sticky-header__Dt-br","noResults":"DataTable_no-results__8wzS9","noResultsIcon":"DataTable_no-results-icon__-nnhq","noResultsTitle":"DataTable_no-results-title__MM7z0"};
1912
1912
 
1913
- function DataTable(props) {
1914
- var _a;
1915
- const { uuiModals } = uuiCore.useUuiContext();
1916
- const columnsWithFilters = useColumnsWithFilters(props.columns, props.filters);
1917
- const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, (_a = props.value) === null || _a === void 0 ? void 0 : _a.columnsConfig);
1918
- const renderRow = React__namespace.useCallback((rowProps) => {
1919
- return React__namespace.createElement(DataTableRow, Object.assign({ key: rowProps.rowKey, size: props.size, borderBottom: props.border }, rowProps));
1920
- }, []);
1921
- const rows = props.getRows();
1922
- const renderedRows = rows.map(row => (props.renderRow || renderRow)(Object.assign(Object.assign({}, row), { columns })));
1923
- const renderNoResultsBlock = React__namespace.useCallback(() => {
1924
- var _a;
1925
- return (React__namespace.createElement("div", { className: css$u.noResults }, props.renderNoResultsBlock ? (_a = props.renderNoResultsBlock) === null || _a === void 0 ? void 0 : _a.call(props) :
1926
- React__namespace.createElement(React__namespace.Fragment, null,
1927
- React__namespace.createElement(uuiComponents.IconContainer, { cx: css$u.noResultsIcon, icon: ForwardRef$n }),
1928
- React__namespace.createElement(Text, { cx: css$u.noResultsTitle, fontSize: '24', lineHeight: '30', color: 'primary', font: 'semibold' }, i18n.tables.noResultsBlock.title),
1929
- React__namespace.createElement(Text, { fontSize: '16', lineHeight: '24', font: 'regular', color: 'primary' }, i18n.tables.noResultsBlock.message))));
1930
- }, [props.renderNoResultsBlock]);
1931
- const onConfigurationButtonClick = React__namespace.useCallback(() => {
1932
- uuiModals.show(modalProps => (React__namespace.createElement(ColumnsConfigurationModal, Object.assign({}, modalProps, { columns: props.columns, columnsConfig: config, defaultConfig: defaultConfig }))))
1933
- .then(columnsConfig => props.onValueChange(Object.assign(Object.assign({}, props.value), { columnsConfig })))
1934
- .catch(() => null);
1935
- }, [props.columns, config, defaultConfig, props.value, props.onValueChange]);
1936
- const renderRowsContainer = React__namespace.useCallback(({ listContainerRef, estimatedHeight, offsetY, scrollShadows }) => (React__namespace.createElement(React__namespace.Fragment, null,
1937
- React__namespace.createElement("div", { className: css$u.stickyHeader },
1938
- React__namespace.createElement(DataTableHeaderRow, { columns: columns, onConfigButtonClick: props.showColumnsConfig && onConfigurationButtonClick, selectAll: props.selectAll, size: props.size, textCase: props.headerTextCase, allowColumnsReordering: props.allowColumnsReordering, allowColumnsResizing: props.allowColumnsResizing, value: props.value, onValueChange: props.onValueChange }),
1939
- React__namespace.createElement("div", { className: uuiCore.cx(uuiCore.uuiScrollShadows.top, {
1940
- [uuiCore.uuiScrollShadows.topVisible]: scrollShadows.verticalTop,
1941
- }) })),
1942
- props.exactRowsCount !== 0 ? (React__namespace.createElement("div", { className: css$u.listContainer, style: { minHeight: `${estimatedHeight}px` } },
1943
- React__namespace.createElement("div", { ref: listContainerRef, role: 'rowgroup', style: { marginTop: offsetY }, children: renderedRows }))) : renderNoResultsBlock === null || renderNoResultsBlock === void 0 ? void 0 : renderNoResultsBlock())), [props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick]);
1944
- return (React__namespace.createElement(uuiComponents.DataTableSelectionProvider, { onCopy: props.onCopy, rows: rows, columns: columns },
1945
- React__namespace.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rows: renderedRows, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: uuiCore.cx(css$u.table), rawProps: {
1946
- role: 'table',
1947
- 'aria-colcount': columns.length,
1948
- 'aria-rowcount': props.rowsCount,
1949
- } })));
1913
+ function DataTable(props) {
1914
+ var _a;
1915
+ const { uuiModals } = uuiCore.useUuiContext();
1916
+ const columnsWithFilters = useColumnsWithFilters(props.columns, props.filters);
1917
+ const { columns, config, defaultConfig } = uuiCore.useColumnsConfig(columnsWithFilters, (_a = props.value) === null || _a === void 0 ? void 0 : _a.columnsConfig);
1918
+ const renderRow = React__namespace.useCallback((rowProps) => {
1919
+ return React__namespace.createElement(DataTableRow, Object.assign({ key: rowProps.rowKey, size: props.size, borderBottom: props.border }, rowProps));
1920
+ }, []);
1921
+ const rows = props.getRows();
1922
+ const renderedRows = rows.map(row => (props.renderRow || renderRow)(Object.assign(Object.assign({}, row), { columns })));
1923
+ const renderNoResultsBlock = React__namespace.useCallback(() => {
1924
+ var _a;
1925
+ return (React__namespace.createElement("div", { className: css$u.noResults }, props.renderNoResultsBlock ? (_a = props.renderNoResultsBlock) === null || _a === void 0 ? void 0 : _a.call(props) :
1926
+ React__namespace.createElement(React__namespace.Fragment, null,
1927
+ React__namespace.createElement(uuiComponents.IconContainer, { cx: css$u.noResultsIcon, icon: ForwardRef$n }),
1928
+ React__namespace.createElement(Text, { cx: css$u.noResultsTitle, fontSize: '24', lineHeight: '30', color: 'primary', font: 'semibold' }, i18n.tables.noResultsBlock.title),
1929
+ React__namespace.createElement(Text, { fontSize: '16', lineHeight: '24', font: 'regular', color: 'primary' }, i18n.tables.noResultsBlock.message))));
1930
+ }, [props.renderNoResultsBlock]);
1931
+ const onConfigurationButtonClick = React__namespace.useCallback(() => {
1932
+ uuiModals.show(modalProps => (React__namespace.createElement(ColumnsConfigurationModal, Object.assign({}, modalProps, { columns: props.columns, columnsConfig: config, defaultConfig: defaultConfig }))))
1933
+ .then(columnsConfig => props.onValueChange(Object.assign(Object.assign({}, props.value), { columnsConfig })))
1934
+ .catch(() => null);
1935
+ }, [props.columns, config, defaultConfig, props.value, props.onValueChange]);
1936
+ const renderRowsContainer = React__namespace.useCallback(({ listContainerRef, estimatedHeight, offsetY, scrollShadows }) => (React__namespace.createElement(React__namespace.Fragment, null,
1937
+ React__namespace.createElement("div", { className: css$u.stickyHeader },
1938
+ React__namespace.createElement(DataTableHeaderRow, { columns: columns, onConfigButtonClick: props.showColumnsConfig && onConfigurationButtonClick, selectAll: props.selectAll, size: props.size, textCase: props.headerTextCase, allowColumnsReordering: props.allowColumnsReordering, allowColumnsResizing: props.allowColumnsResizing, value: props.value, onValueChange: props.onValueChange }),
1939
+ React__namespace.createElement("div", { className: uuiCore.cx(uuiCore.uuiScrollShadows.top, {
1940
+ [uuiCore.uuiScrollShadows.topVisible]: scrollShadows.verticalTop,
1941
+ }) })),
1942
+ props.exactRowsCount !== 0 ? (React__namespace.createElement("div", { className: css$u.listContainer, style: { minHeight: `${estimatedHeight}px` } },
1943
+ React__namespace.createElement("div", { ref: listContainerRef, role: 'rowgroup', style: { marginTop: offsetY }, children: renderedRows }))) : renderNoResultsBlock === null || renderNoResultsBlock === void 0 ? void 0 : renderNoResultsBlock())), [props, columns, rows, renderNoResultsBlock, onConfigurationButtonClick]);
1944
+ return (React__namespace.createElement(uuiComponents.DataTableSelectionProvider, { onCopy: props.onCopy, rows: rows, columns: columns },
1945
+ React__namespace.createElement(VirtualList, { value: props.value, onValueChange: props.onValueChange, onScroll: props.onScroll, rows: renderedRows, rowsCount: props.rowsCount, renderRows: renderRowsContainer, cx: uuiCore.cx(css$u.table), rawProps: {
1946
+ role: 'table',
1947
+ 'aria-colcount': columns.length,
1948
+ 'aria-rowcount': props.rowsCount,
1949
+ } })));
1950
1950
  }
1951
1951
 
1952
1952
  var styles$1 = {"typography-header":"ColumnsConfigurationModal_typography-header__o3r5C","typography-block":"ColumnsConfigurationModal_typography-block__CXaTR","typography-inline":"ColumnsConfigurationModal_typography-inline__VJCzZ","typography-16":"ColumnsConfigurationModal_typography-16__97zzl","typography-14":"ColumnsConfigurationModal_typography-14__tVuMI","typography-12":"ColumnsConfigurationModal_typography-12__-4gpA","typography-promo":"ColumnsConfigurationModal_typography-promo__5VMFg ColumnsConfigurationModal_typography-header__o3r5C ColumnsConfigurationModal_typography-block__CXaTR ColumnsConfigurationModal_typography-inline__VJCzZ","main-panel":"ColumnsConfigurationModal_main-panel__hCrXd","group-title":"ColumnsConfigurationModal_group-title__UtJIu","group-title-text":"ColumnsConfigurationModal_group-title-text__3hOPf","group-title-badge":"ColumnsConfigurationModal_group-title-badge__4agZV","group-items":"ColumnsConfigurationModal_group-items__g1FUY","no-data":"ColumnsConfigurationModal_no-data__CzFcf","h-divider":"ColumnsConfigurationModal_h-divider__W9MsK","search-area":"ColumnsConfigurationModal_search-area__FGWyb","typographyHeader":"ColumnsConfigurationModal_typography-header__o3r5C","typographyBlock":"ColumnsConfigurationModal_typography-block__CXaTR","typographyInline":"ColumnsConfigurationModal_typography-inline__VJCzZ","typography16":"ColumnsConfigurationModal_typography-16__97zzl","typography14":"ColumnsConfigurationModal_typography-14__tVuMI","typography12":"ColumnsConfigurationModal_typography-12__-4gpA","typographyPromo":"ColumnsConfigurationModal_typography-promo__5VMFg ColumnsConfigurationModal_typography-header__o3r5C ColumnsConfigurationModal_typography-block__CXaTR ColumnsConfigurationModal_typography-inline__VJCzZ","mainPanel":"ColumnsConfigurationModal_main-panel__hCrXd","groupTitle":"ColumnsConfigurationModal_group-title__UtJIu","groupTitleText":"ColumnsConfigurationModal_group-title-text__3hOPf","groupTitleBadge":"ColumnsConfigurationModal_group-title-badge__4agZV","groupItems":"ColumnsConfigurationModal_group-items__g1FUY","noData":"ColumnsConfigurationModal_no-data__CzFcf","hDivider":"ColumnsConfigurationModal_h-divider__W9MsK","searchArea":"ColumnsConfigurationModal_search-area__FGWyb"};
@@ -2034,145 +2034,145 @@ var SvgActionPinOff18 = function SvgActionPinOff18(props, ref) {
2034
2034
  };
2035
2035
  var ForwardRef$i = /*#__PURE__*/React.forwardRef(SvgActionPinOff18);
2036
2036
 
2037
- const i18nLocal$1 = i18n.tables.columnsConfigurationModal;
2038
- function PinIconButton(props) {
2039
- const [isHovered, setIsHovered] = React.useState(false);
2040
- const { id, onTogglePin, isPinned, canUnpin } = props;
2041
- const isPinnedAlways = isPinned && !canUnpin;
2042
- const tooltipText = React.useMemo(() => {
2043
- if (isPinned) {
2044
- return isPinnedAlways ? i18nLocal$1.lockedColumnPinButton : i18nLocal$1.unPinColumnButton;
2045
- }
2046
- return i18nLocal$1.pinColumnButton;
2047
- }, [isPinned, isPinnedAlways]);
2048
- const pinIcon = React.useMemo(() => {
2049
- if (isPinnedAlways) {
2050
- return ForwardRef$k;
2051
- }
2052
- if (isPinned) {
2053
- return isHovered ? ForwardRef$i : ForwardRef$j;
2054
- }
2055
- return ForwardRef$j;
2056
- }, [isPinnedAlways, isHovered, isPinned]);
2057
- const pinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(id);
2058
- return (React__namespace.createElement("span", { onMouseOver: () => setIsHovered(true), onMouseOut: () => setIsHovered(false) },
2059
- React__namespace.createElement(Tooltip, { content: tooltipText, placement: "bottom" },
2060
- React__namespace.createElement(IconButton, { icon: pinIcon, onClick: pinClickHandler, isDisabled: isPinnedAlways, color: isPinned ? 'info' : undefined }))));
2037
+ const i18nLocal$1 = i18n.tables.columnsConfigurationModal;
2038
+ function PinIconButton(props) {
2039
+ const [isHovered, setIsHovered] = React.useState(false);
2040
+ const { id, onTogglePin, isPinned, canUnpin } = props;
2041
+ const isPinnedAlways = isPinned && !canUnpin;
2042
+ const tooltipText = React.useMemo(() => {
2043
+ if (isPinned) {
2044
+ return isPinnedAlways ? i18nLocal$1.lockedColumnPinButton : i18nLocal$1.unPinColumnButton;
2045
+ }
2046
+ return i18nLocal$1.pinColumnButton;
2047
+ }, [isPinned, isPinnedAlways]);
2048
+ const pinIcon = React.useMemo(() => {
2049
+ if (isPinnedAlways) {
2050
+ return ForwardRef$k;
2051
+ }
2052
+ if (isPinned) {
2053
+ return isHovered ? ForwardRef$i : ForwardRef$j;
2054
+ }
2055
+ return ForwardRef$j;
2056
+ }, [isPinnedAlways, isHovered, isPinned]);
2057
+ const pinClickHandler = isPinnedAlways ? undefined : () => onTogglePin(id);
2058
+ return (React__namespace.createElement("span", { onMouseOver: () => setIsHovered(true), onMouseOut: () => setIsHovered(false) },
2059
+ React__namespace.createElement(Tooltip, { content: tooltipText, placement: "bottom" },
2060
+ React__namespace.createElement(IconButton, { icon: pinIcon, onClick: pinClickHandler, isDisabled: isPinnedAlways, color: isPinned ? 'info' : undefined }))));
2061
2061
  }
2062
2062
 
2063
2063
  var styles = {"typography-header":"ColumnRow_typography-header__v5iBP","typography-block":"ColumnRow_typography-block__PpJOb","typography-inline":"ColumnRow_typography-inline__GYRwx","typography-16":"ColumnRow_typography-16__4CRKd","typography-14":"ColumnRow_typography-14__xizHg","typography-12":"ColumnRow_typography-12__Cr5Gv","typography-promo":"ColumnRow_typography-promo__ea8Ex ColumnRow_typography-header__v5iBP ColumnRow_typography-block__PpJOb ColumnRow_typography-inline__GYRwx","row-wrapper":"ColumnRow_row-wrapper__XJiWz","not-pinned":"ColumnRow_not-pinned__I-gDy","pin-icon-button":"ColumnRow_pin-icon-button__YTlTW","drag-handle":"ColumnRow_drag-handle__S4faK","dnd-disabled":"ColumnRow_dnd-disabled__HqbOB","typographyHeader":"ColumnRow_typography-header__v5iBP","typographyBlock":"ColumnRow_typography-block__PpJOb","typographyInline":"ColumnRow_typography-inline__GYRwx","typography16":"ColumnRow_typography-16__4CRKd","typography14":"ColumnRow_typography-14__xizHg","typography12":"ColumnRow_typography-12__Cr5Gv","typographyPromo":"ColumnRow_typography-promo__ea8Ex ColumnRow_typography-header__v5iBP ColumnRow_typography-block__PpJOb ColumnRow_typography-inline__GYRwx","rowWrapper":"ColumnRow_row-wrapper__XJiWz","notPinned":"ColumnRow_not-pinned__I-gDy","pinIconButton":"ColumnRow_pin-icon-button__YTlTW","dragHandle":"ColumnRow_drag-handle__S4faK","dndDisabled":"ColumnRow_dnd-disabled__HqbOB"};
2064
2064
 
2065
- const ColumnRow = React__namespace.memo(function ColumnRow(props) {
2066
- const { column } = props;
2067
- const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways } = column;
2068
- const { isVisible, fix } = columnConfig;
2069
- const isPinned = fix || isPinnedAlways;
2070
- const data = { column, columnConfig };
2071
- const renderContent = (dndActorParams) => {
2072
- const wrapperClasses = uuiCore.cx(styles.rowWrapper, !isPinned && styles.notPinned, ...(isDndAllowed ? dndActorParams.classNames : []));
2073
- const _a = dndActorParams.eventHandlers, { onTouchStart, onPointerDown } = _a, restEventHandlers = __rest(_a, ["onTouchStart", "onPointerDown"]);
2074
- const wrapperAttrs = Object.assign(Object.assign({}, (isDndAllowed ? { ref: dndActorParams.ref } : {})), (isDndAllowed ? { rawProps: Object.assign({}, restEventHandlers) } : {}));
2075
- const dragHandleRawProps = Object.assign({}, (isDndAllowed ? { onTouchStart, onPointerDown } : {}));
2076
- return (React__namespace.createElement(FlexRow, Object.assign({ size: "30", cx: wrapperClasses }, wrapperAttrs),
2077
- React__namespace.createElement(FlexRow, { size: "30", spacing: '6', cx: styles.title },
2078
- React__namespace.createElement(uuiComponents.DragHandle, { rawProps: dragHandleRawProps, isDisabled: !isDndAllowed, cx: uuiCore.cx(styles.dragHandle, !isDndAllowed && styles.dndDisabled) }),
2079
- React__namespace.createElement(Checkbox, { key: column.key, label: column.caption, value: isVisible, onValueChange: toggleVisibility, isDisabled: column.isAlwaysVisible })),
2080
- React__namespace.createElement(uuiComponents.FlexSpacer, null),
2081
- React__namespace.createElement(FlexRow, { size: "30", cx: styles.pinIconButton },
2082
- React__namespace.createElement(PinIconButton, { id: column.key, isPinned: !!isPinned, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
2083
- React__namespace.createElement(DropMarker, Object.assign({}, dndActorParams))));
2084
- };
2085
- return (React__namespace.createElement(uuiCore.DndActor, { key: column.key, srcData: data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
2065
+ const ColumnRow = React__namespace.memo(function ColumnRow(props) {
2066
+ const { column } = props;
2067
+ const { toggleVisibility, togglePin, onCanAcceptDrop, onDrop, columnConfig, isDndAllowed, isPinnedAlways } = column;
2068
+ const { isVisible, fix } = columnConfig;
2069
+ const isPinned = fix || isPinnedAlways;
2070
+ const data = { column, columnConfig };
2071
+ const renderContent = (dndActorParams) => {
2072
+ const wrapperClasses = uuiCore.cx(styles.rowWrapper, !isPinned && styles.notPinned, ...(isDndAllowed ? dndActorParams.classNames : []));
2073
+ const _a = dndActorParams.eventHandlers, { onTouchStart, onPointerDown } = _a, restEventHandlers = __rest(_a, ["onTouchStart", "onPointerDown"]);
2074
+ const wrapperAttrs = Object.assign(Object.assign({}, (isDndAllowed ? { ref: dndActorParams.ref } : {})), (isDndAllowed ? { rawProps: Object.assign({}, restEventHandlers) } : {}));
2075
+ const dragHandleRawProps = Object.assign({}, (isDndAllowed ? { onTouchStart, onPointerDown } : {}));
2076
+ return (React__namespace.createElement(FlexRow, Object.assign({ size: "30", cx: wrapperClasses }, wrapperAttrs),
2077
+ React__namespace.createElement(FlexRow, { size: "30", spacing: '6', cx: styles.title },
2078
+ React__namespace.createElement(uuiComponents.DragHandle, { rawProps: dragHandleRawProps, isDisabled: !isDndAllowed, cx: uuiCore.cx(styles.dragHandle, !isDndAllowed && styles.dndDisabled) }),
2079
+ React__namespace.createElement(Checkbox, { key: column.key, label: column.caption, value: isVisible, onValueChange: toggleVisibility, isDisabled: column.isAlwaysVisible })),
2080
+ React__namespace.createElement(uuiComponents.FlexSpacer, null),
2081
+ React__namespace.createElement(FlexRow, { size: "30", cx: styles.pinIconButton },
2082
+ React__namespace.createElement(PinIconButton, { id: column.key, isPinned: !!isPinned, canUnpin: !isPinnedAlways, onTogglePin: togglePin })),
2083
+ React__namespace.createElement(DropMarker, Object.assign({}, dndActorParams))));
2084
+ };
2085
+ return (React__namespace.createElement(uuiCore.DndActor, { key: column.key, srcData: data, dstData: data, canAcceptDrop: onCanAcceptDrop, onDrop: onDrop, render: renderContent }));
2086
2086
  });
2087
2087
 
2088
- const i18nLocal = i18n.tables.columnsConfigurationModal;
2089
- const renderGroupTitle = (title, amount) => React__namespace.createElement(FlexRow, { size: "24", padding: "24", spacing: "6", cx: styles$1.groupTitle },
2090
- React__namespace.createElement(Text, { cx: styles$1.groupTitleText, font: "semibold", lineHeight: "24", fontSize: "14" }, title),
2091
- React__namespace.createElement(Badge, { cx: styles$1.groupTitleBadge, caption: amount, color: 'info', size: "18" }));
2092
- function ColumnsConfigurationModal(props) {
2093
- const { columns, columnsConfig: initialColumnsConfig, defaultConfig } = props, modalProps = __rest(props, ["columns", "columnsConfig", "defaultConfig"]);
2094
- const { groupedColumns, searchValue, columnsConfig, reset, checkAll, uncheckAll, setSearchValue, } = uuiComponents.useColumnsConfiguration({ initialColumnsConfig, columns, defaultConfig });
2095
- const apply = React.useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
2096
- const close = React.useCallback(() => modalProps.abort(), [modalProps]);
2097
- const isNoData = React.useMemo(() => Object.values(groupedColumns).every(v => !v.length), [groupedColumns]);
2098
- const renderVisible = () => {
2099
- const amountPinned = groupedColumns.displayedPinned.length;
2100
- const amountUnPinned = groupedColumns.displayedUnpinned.length;
2101
- if (!amountPinned && !amountUnPinned) {
2102
- return null;
2103
- }
2104
- const hasDivider = !!(amountPinned && amountUnPinned);
2105
- return (React__namespace.createElement(React__namespace.Fragment, null,
2106
- renderGroupTitle(i18nLocal.displayedSectionTitle, amountPinned + amountUnPinned),
2107
- !!amountPinned && React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.displayedPinned.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key }))),
2108
- hasDivider && React__namespace.createElement("div", { className: styles$1.hDivider }),
2109
- !!amountUnPinned && React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.displayedUnpinned.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key })))));
2110
- };
2111
- const renderHidden = () => {
2112
- const amountHidden = groupedColumns.hidden.length;
2113
- if (!amountHidden) {
2114
- return null;
2115
- }
2116
- return (React__namespace.createElement(React__namespace.Fragment, null,
2117
- renderGroupTitle(i18nLocal.hiddenSectionTitle, amountHidden),
2118
- React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.hidden.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key })))));
2119
- };
2120
- const noVisibleColumns = React.useMemo(() => !groupedColumns.displayedPinned.length && !groupedColumns.displayedUnpinned.length, [groupedColumns.displayedPinned, groupedColumns.displayedUnpinned]);
2121
- const applyButton = React__namespace.createElement(Button, { caption: i18nLocal.applyButton, isDisabled: noVisibleColumns, color: "accent", onClick: apply });
2122
- return (React__namespace.createElement(ModalBlocker, Object.assign({}, modalProps),
2123
- React__namespace.createElement(ModalWindow, { height: 700 },
2124
- React__namespace.createElement(ModalHeader, { title: i18nLocal.configureColumnsTitle, onClose: close }),
2125
- React__namespace.createElement(FlexRow, { padding: "24", borderBottom: true, spacing: "12", cx: styles$1.searchArea },
2126
- React__namespace.createElement(SearchInput, { size: "30", value: searchValue, onValueChange: setSearchValue, placeholder: i18nLocal.searchPlaceholder }),
2127
- React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => React__namespace.createElement(Panel, { shadow: true },
2128
- React__namespace.createElement(DropdownMenuButton, { caption: i18nLocal.clearAllButton, onClick: uncheckAll }),
2129
- React__namespace.createElement(DropdownMenuButton, { caption: i18nLocal.selectAllButton, onClick: checkAll })), renderTarget: props => React__namespace.createElement(Button, Object.assign({}, props, { mode: "none", icon: ForwardRef$m, size: "30", color: "secondary", isDropdown: false })) })),
2130
- React__namespace.createElement(Panel, { cx: styles$1.mainPanel },
2131
- React__namespace.createElement(ScrollBars, null,
2132
- renderVisible(),
2133
- renderHidden(),
2134
- isNoData && (React__namespace.createElement(FlexRow, { cx: styles$1.noData },
2135
- React__namespace.createElement(Text, { fontSize: '24', lineHeight: '30', color: 'primary', font: 'semibold' }, i18nLocal.noResultsFound.text),
2136
- React__namespace.createElement(Text, { fontSize: '16', lineHeight: '24', font: 'regular', color: 'primary' }, i18nLocal.noResultsFound.subText))))),
2137
- React__namespace.createElement(ModalFooter, { borderTop: true },
2138
- React__namespace.createElement(LinkButton, { icon: ForwardRef$l, caption: i18nLocal.resetToDefaultButton, onClick: reset }),
2139
- React__namespace.createElement(FlexSpacer, null),
2140
- React__namespace.createElement(Button, { mode: "ghost", color: "secondary", caption: i18nLocal.cancelButton, onClick: close }),
2141
- noVisibleColumns
2142
- ? (React__namespace.createElement(Tooltip, { content: i18nLocal.enableAtLeastOneColumnMessage, placement: 'top-end', color: 'contrast' }, applyButton))
2143
- : applyButton))));
2088
+ const i18nLocal = i18n.tables.columnsConfigurationModal;
2089
+ const renderGroupTitle = (title, amount) => React__namespace.createElement(FlexRow, { size: "24", padding: "24", spacing: "6", cx: styles$1.groupTitle },
2090
+ React__namespace.createElement(Text, { cx: styles$1.groupTitleText, font: "semibold", lineHeight: "24", fontSize: "14" }, title),
2091
+ React__namespace.createElement(Badge, { cx: styles$1.groupTitleBadge, caption: amount, color: 'info', size: "18" }));
2092
+ function ColumnsConfigurationModal(props) {
2093
+ const { columns, columnsConfig: initialColumnsConfig, defaultConfig } = props, modalProps = __rest(props, ["columns", "columnsConfig", "defaultConfig"]);
2094
+ const { groupedColumns, searchValue, columnsConfig, reset, checkAll, uncheckAll, setSearchValue, } = uuiComponents.useColumnsConfiguration({ initialColumnsConfig, columns, defaultConfig });
2095
+ const apply = React.useCallback(() => modalProps.success(columnsConfig), [columnsConfig, modalProps]);
2096
+ const close = React.useCallback(() => modalProps.abort(), [modalProps]);
2097
+ const isNoData = React.useMemo(() => Object.values(groupedColumns).every(v => !v.length), [groupedColumns]);
2098
+ const renderVisible = () => {
2099
+ const amountPinned = groupedColumns.displayedPinned.length;
2100
+ const amountUnPinned = groupedColumns.displayedUnpinned.length;
2101
+ if (!amountPinned && !amountUnPinned) {
2102
+ return null;
2103
+ }
2104
+ const hasDivider = !!(amountPinned && amountUnPinned);
2105
+ return (React__namespace.createElement(React__namespace.Fragment, null,
2106
+ renderGroupTitle(i18nLocal.displayedSectionTitle, amountPinned + amountUnPinned),
2107
+ !!amountPinned && React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.displayedPinned.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key }))),
2108
+ hasDivider && React__namespace.createElement("div", { className: styles$1.hDivider }),
2109
+ !!amountUnPinned && React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.displayedUnpinned.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key })))));
2110
+ };
2111
+ const renderHidden = () => {
2112
+ const amountHidden = groupedColumns.hidden.length;
2113
+ if (!amountHidden) {
2114
+ return null;
2115
+ }
2116
+ return (React__namespace.createElement(React__namespace.Fragment, null,
2117
+ renderGroupTitle(i18nLocal.hiddenSectionTitle, amountHidden),
2118
+ React__namespace.createElement(FlexRow, { cx: styles$1.groupItems, size: "30" }, groupedColumns.hidden.map(c => React__namespace.createElement(ColumnRow, { column: c, key: c.key })))));
2119
+ };
2120
+ const noVisibleColumns = React.useMemo(() => !groupedColumns.displayedPinned.length && !groupedColumns.displayedUnpinned.length, [groupedColumns.displayedPinned, groupedColumns.displayedUnpinned]);
2121
+ const applyButton = React__namespace.createElement(Button, { caption: i18nLocal.applyButton, isDisabled: noVisibleColumns, color: "accent", onClick: apply });
2122
+ return (React__namespace.createElement(ModalBlocker, Object.assign({}, modalProps),
2123
+ React__namespace.createElement(ModalWindow, { height: 700 },
2124
+ React__namespace.createElement(ModalHeader, { title: i18nLocal.configureColumnsTitle, onClose: close }),
2125
+ React__namespace.createElement(FlexRow, { padding: "24", borderBottom: true, spacing: "12", cx: styles$1.searchArea },
2126
+ React__namespace.createElement(SearchInput, { size: "30", value: searchValue, onValueChange: setSearchValue, placeholder: i18nLocal.searchPlaceholder }),
2127
+ React__namespace.createElement(Dropdown, { closeOnTargetClick: true, renderBody: () => React__namespace.createElement(Panel, { shadow: true },
2128
+ React__namespace.createElement(DropdownMenuButton, { caption: i18nLocal.clearAllButton, onClick: uncheckAll }),
2129
+ React__namespace.createElement(DropdownMenuButton, { caption: i18nLocal.selectAllButton, onClick: checkAll })), renderTarget: props => React__namespace.createElement(Button, Object.assign({}, props, { mode: "none", icon: ForwardRef$m, size: "30", color: "secondary", isDropdown: false })) })),
2130
+ React__namespace.createElement(Panel, { cx: styles$1.mainPanel },
2131
+ React__namespace.createElement(ScrollBars, null,
2132
+ renderVisible(),
2133
+ renderHidden(),
2134
+ isNoData && (React__namespace.createElement(FlexRow, { cx: styles$1.noData },
2135
+ React__namespace.createElement(Text, { fontSize: '24', lineHeight: '30', color: 'primary', font: 'semibold' }, i18nLocal.noResultsFound.text),
2136
+ React__namespace.createElement(Text, { fontSize: '16', lineHeight: '24', font: 'regular', color: 'primary' }, i18nLocal.noResultsFound.subText))))),
2137
+ React__namespace.createElement(ModalFooter, { borderTop: true },
2138
+ React__namespace.createElement(LinkButton, { icon: ForwardRef$l, caption: i18nLocal.resetToDefaultButton, onClick: reset }),
2139
+ React__namespace.createElement(FlexSpacer, null),
2140
+ React__namespace.createElement(Button, { mode: "ghost", color: "secondary", caption: i18nLocal.cancelButton, onClick: close }),
2141
+ noVisibleColumns
2142
+ ? (React__namespace.createElement(Tooltip, { content: i18nLocal.enableAtLeastOneColumnMessage, placement: 'top-end', color: 'contrast' }, applyButton))
2143
+ : applyButton))));
2144
2144
  }
2145
2145
 
2146
2146
  var css$t = {"panel":"ColumnHeaderDropdown_panel__52aQo"};
2147
2147
 
2148
2148
  var css$s = {"typography-header":"SortingPanel_typography-header__xME1m","typography-block":"SortingPanel_typography-block__YDYpy","typography-inline":"SortingPanel_typography-inline__Tcu9M","typography-16":"SortingPanel_typography-16__63gUO","typography-14":"SortingPanel_typography-14__fFFKh","typography-12":"SortingPanel_typography-12__gbS0m","typography-promo":"SortingPanel_typography-promo__Ng4h4 SortingPanel_typography-header__xME1m SortingPanel_typography-block__YDYpy SortingPanel_typography-inline__Tcu9M","sorting-panel-container":"SortingPanel_sorting-panel-container__DH1x6","sort-active":"SortingPanel_sort-active__KNhjc","typographyHeader":"SortingPanel_typography-header__xME1m","typographyBlock":"SortingPanel_typography-block__YDYpy","typographyInline":"SortingPanel_typography-inline__Tcu9M","typography16":"SortingPanel_typography-16__63gUO","typography14":"SortingPanel_typography-14__fFFKh","typography12":"SortingPanel_typography-12__gbS0m","typographyPromo":"SortingPanel_typography-promo__Ng4h4 SortingPanel_typography-header__xME1m SortingPanel_typography-block__YDYpy SortingPanel_typography-inline__Tcu9M","sortingPanelContainer":"SortingPanel_sorting-panel-container__DH1x6","sortActive":"SortingPanel_sort-active__KNhjc"};
2149
2149
 
2150
- const SortingPanelImpl = ({ sortDirection, onSort }) => {
2151
- const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
2152
- const sortDesc = React.useCallback(() => onSort(sortDirection === 'desc' ? undefined : 'desc'), [onSort]);
2153
- return (React__namespace.default.createElement(FlexCell, { cx: css$s.sortingPanelContainer },
2154
- React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'asc', caption: i18n.pickerFilterHeader.sortAscending, icon: ForwardRef$t, onClick: sortAsc }),
2155
- React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'desc', caption: i18n.pickerFilterHeader.sortDescending, icon: ForwardRef$s, onClick: sortDesc })));
2156
- };
2150
+ const SortingPanelImpl = ({ sortDirection, onSort }) => {
2151
+ const sortAsc = React.useCallback(() => onSort(sortDirection === 'asc' ? undefined : 'asc'), [onSort]);
2152
+ const sortDesc = React.useCallback(() => onSort(sortDirection === 'desc' ? undefined : 'desc'), [onSort]);
2153
+ return (React__namespace.default.createElement(FlexCell, { cx: css$s.sortingPanelContainer },
2154
+ React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'asc', caption: i18n.pickerFilterHeader.sortAscending, icon: ForwardRef$t, onClick: sortAsc }),
2155
+ React__namespace.default.createElement(DropdownMenuButton, { isActive: sortDirection === 'desc', caption: i18n.pickerFilterHeader.sortDescending, icon: ForwardRef$s, onClick: sortDesc })));
2156
+ };
2157
2157
  const SortingPanel = React__namespace.default.memo(SortingPanelImpl);
2158
2158
 
2159
- const ColumnHeaderDropdownImpl = props => {
2160
- const popperModifiers = React.useMemo(() => [
2161
- {
2162
- name: 'offset',
2163
- options: { offset: [0, 1] },
2164
- },
2165
- uuiCore.mobilePopperModifier,
2166
- ], []);
2167
- const style = React.useMemo(() => ({
2168
- width: uuiCore.isMobile() ? document.documentElement.clientWidth : undefined,
2169
- }), []);
2170
- const closeDropdown = React.useCallback(() => props.onOpenChange(false), [props.onOpenChange]);
2171
- return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: props.renderTarget, renderBody: dropdownProps => (React__namespace.default.createElement(Panel, { style: style, shadow: true, cx: css$t.panel },
2172
- React__namespace.default.createElement(MobileDropdownWrapper, { title: props.title, close: closeDropdown },
2173
- props.isSortable && (React__namespace.default.createElement(SortingPanel, { sortDirection: props.sortDirection, onSort: props.onSort })),
2174
- props.renderFilter(dropdownProps)))), modifiers: popperModifiers, value: props.isOpen, onValueChange: props.onOpenChange }));
2175
- };
2159
+ const ColumnHeaderDropdownImpl = props => {
2160
+ const popperModifiers = React.useMemo(() => [
2161
+ {
2162
+ name: 'offset',
2163
+ options: { offset: [0, 1] },
2164
+ },
2165
+ uuiCore.mobilePopperModifier,
2166
+ ], []);
2167
+ const style = React.useMemo(() => ({
2168
+ width: uuiCore.isMobile() ? document.documentElement.clientWidth : undefined,
2169
+ }), []);
2170
+ const closeDropdown = React.useCallback(() => props.onOpenChange(false), [props.onOpenChange]);
2171
+ return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: props.renderTarget, renderBody: dropdownProps => (React__namespace.default.createElement(Panel, { style: style, shadow: true, cx: css$t.panel },
2172
+ React__namespace.default.createElement(MobileDropdownWrapper, { title: props.title, close: closeDropdown },
2173
+ props.isSortable && (React__namespace.default.createElement(SortingPanel, { sortDirection: props.sortDirection, onSort: props.onSort })),
2174
+ props.renderFilter(dropdownProps)))), modifiers: popperModifiers, value: props.isOpen, onValueChange: props.onOpenChange }));
2175
+ };
2176
2176
  const ColumnHeaderDropdown = React__namespace.default.memo(ColumnHeaderDropdownImpl);
2177
2177
 
2178
2178
  var _path$g;
@@ -2226,46 +2226,46 @@ var ForwardRef$f = /*#__PURE__*/React.forwardRef(SvgNotificationDone12);
2226
2226
 
2227
2227
  var css$r = {"typography-header":"DataPickerRow_typography-header__IfaEa","typography-block":"DataPickerRow_typography-block__h7PJR","typography-inline":"DataPickerRow_typography-inline__nLffn","typography-16":"DataPickerRow_typography-16__d2vFn","typography-14":"DataPickerRow_typography-14__lhGfr","typography-12":"DataPickerRow_typography-12__jpyOF","typography-promo":"DataPickerRow_typography-promo__XThFP DataPickerRow_typography-header__IfaEa DataPickerRow_typography-block__h7PJR DataPickerRow_typography-inline__nLffn","render-item":"DataPickerRow_render-item__YsRTQ","icon-wrapper":"DataPickerRow_icon-wrapper__Pwg6e","picker-row":"DataPickerRow_picker-row__yZk93","icon-default":"DataPickerRow_icon-default__DpPlP","icon-info":"DataPickerRow_icon-info__7aYSO","typographyHeader":"DataPickerRow_typography-header__IfaEa","typographyBlock":"DataPickerRow_typography-block__h7PJR","typographyInline":"DataPickerRow_typography-inline__nLffn","typography16":"DataPickerRow_typography-16__d2vFn","typography14":"DataPickerRow_typography-14__lhGfr","typography12":"DataPickerRow_typography-12__jpyOF","typographyPromo":"DataPickerRow_typography-promo__XThFP DataPickerRow_typography-header__IfaEa DataPickerRow_typography-block__h7PJR DataPickerRow_typography-inline__nLffn","renderItem":"DataPickerRow_render-item__YsRTQ","iconWrapper":"DataPickerRow_icon-wrapper__Pwg6e","pickerRow":"DataPickerRow_picker-row__yZk93","iconDefault":"DataPickerRow_icon-default__DpPlP","iconInfo":"DataPickerRow_icon-info__7aYSO"};
2228
2228
 
2229
- class DataPickerRow extends React__namespace.Component {
2230
- constructor() {
2231
- super(...arguments);
2232
- this.getIcon = (size) => {
2233
- switch (size) {
2234
- case '24': return ForwardRef$f;
2235
- case '30': return ForwardRef$g;
2236
- case '36': return ForwardRef$g;
2237
- case '42': return ForwardRef$h;
2238
- default: return ForwardRef$g;
2239
- }
2240
- };
2241
- this.column = {
2242
- key: 'name',
2243
- grow: 1,
2244
- width: 0,
2245
- render: (item, rowProps) => React__namespace.createElement("div", { key: rowProps.id, className: css$r.renderItem },
2246
- this.props.renderItem(item, rowProps),
2247
- React__namespace.createElement(FlexSpacer, null),
2248
- (rowProps.isChildrenSelected || rowProps.isSelected) && React__namespace.createElement("div", { className: css$r.iconWrapper },
2249
- React__namespace.createElement(uuiComponents.IconContainer, { icon: this.getIcon(this.props.size), cx: rowProps.isChildrenSelected ? css$r.iconDefault : css$r.iconInfo }))),
2250
- };
2251
- this.renderContent = () => {
2252
- return React__namespace.createElement(DataTableCell, { key: 'name', size: this.props.size || '36', padding: this.props.padding || '24', isFirstColumn: true, isLastColumn: false, tabIndex: -1, column: this.column, rowProps: this.props, alignActions: this.props.alignActions || 'top' });
2253
- };
2254
- }
2255
- render() {
2256
- return React__namespace.createElement(uuiComponents.DataPickerRow, Object.assign({}, this.props, { cx: [css$r.pickerRow, this.props.cx], renderContent: this.renderContent }));
2257
- }
2229
+ class DataPickerRow extends React__namespace.Component {
2230
+ constructor() {
2231
+ super(...arguments);
2232
+ this.getIcon = (size) => {
2233
+ switch (size) {
2234
+ case '24': return ForwardRef$f;
2235
+ case '30': return ForwardRef$g;
2236
+ case '36': return ForwardRef$g;
2237
+ case '42': return ForwardRef$h;
2238
+ default: return ForwardRef$g;
2239
+ }
2240
+ };
2241
+ this.column = {
2242
+ key: 'name',
2243
+ grow: 1,
2244
+ width: 0,
2245
+ render: (item, rowProps) => React__namespace.createElement("div", { key: rowProps.id, className: css$r.renderItem },
2246
+ this.props.renderItem(item, rowProps),
2247
+ React__namespace.createElement(FlexSpacer, null),
2248
+ (rowProps.isChildrenSelected || rowProps.isSelected) && React__namespace.createElement("div", { className: css$r.iconWrapper },
2249
+ React__namespace.createElement(uuiComponents.IconContainer, { icon: this.getIcon(this.props.size), cx: rowProps.isChildrenSelected ? css$r.iconDefault : css$r.iconInfo }))),
2250
+ };
2251
+ this.renderContent = () => {
2252
+ return React__namespace.createElement(DataTableCell, { key: 'name', size: this.props.size || '36', padding: this.props.padding || '24', isFirstColumn: true, isLastColumn: false, tabIndex: -1, column: this.column, rowProps: this.props, alignActions: this.props.alignActions || 'top' });
2253
+ };
2254
+ }
2255
+ render() {
2256
+ return React__namespace.createElement(uuiComponents.DataPickerRow, Object.assign({}, this.props, { cx: [css$r.pickerRow, this.props.cx], renderContent: this.renderContent }));
2257
+ }
2258
2258
  }
2259
2259
 
2260
2260
  var css$q = {"typography-header":"MobileDropdownWrapper_typography-header__x4CWx","typography-block":"MobileDropdownWrapper_typography-block__qdVMl","typography-inline":"MobileDropdownWrapper_typography-inline__yk-yR","typography-16":"MobileDropdownWrapper_typography-16__keTAm","typography-14":"MobileDropdownWrapper_typography-14__kN-FT","typography-12":"MobileDropdownWrapper_typography-12__X6oPE","typography-promo":"MobileDropdownWrapper_typography-promo__tKPcE MobileDropdownWrapper_typography-header__x4CWx MobileDropdownWrapper_typography-block__qdVMl MobileDropdownWrapper_typography-inline__yk-yR","done":"MobileDropdownWrapper_done__kE5Pe","typographyHeader":"MobileDropdownWrapper_typography-header__x4CWx","typographyBlock":"MobileDropdownWrapper_typography-block__qdVMl","typographyInline":"MobileDropdownWrapper_typography-inline__yk-yR","typography16":"MobileDropdownWrapper_typography-16__keTAm","typography14":"MobileDropdownWrapper_typography-14__kN-FT","typography12":"MobileDropdownWrapper_typography-12__X6oPE","typographyPromo":"MobileDropdownWrapper_typography-promo__tKPcE MobileDropdownWrapper_typography-header__x4CWx MobileDropdownWrapper_typography-block__qdVMl MobileDropdownWrapper_typography-inline__yk-yR"};
2261
2261
 
2262
- const MobileDropdownWrapper = props => {
2263
- const isVisible = uuiCore.isMobile();
2264
- uuiCore.useAppMobileHeight();
2265
- return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
2266
- isVisible && React__namespace.default.createElement(DataPickerHeader, { title: props.title, close: props.close }),
2267
- props.children,
2268
- isVisible && (React__namespace.default.createElement(LinkButton, { caption: 'DONE', onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$q.done, size: '48' }))));
2262
+ const MobileDropdownWrapper = props => {
2263
+ const isVisible = uuiCore.isMobile();
2264
+ uuiCore.useAppMobileHeight();
2265
+ return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
2266
+ isVisible && React__namespace.default.createElement(DataPickerHeader, { title: props.title, close: props.close }),
2267
+ props.children,
2268
+ isVisible && (React__namespace.default.createElement(LinkButton, { caption: 'DONE', onClick: () => { var _a; return (_a = props.close) === null || _a === void 0 ? void 0 : _a.call(props); }, cx: css$q.done, size: '48' }))));
2269
2269
  };
2270
2270
 
2271
2271
  var css$p = {"typography-header":"PickerModal_typography-header__UkGcm","typography-block":"PickerModal_typography-block__ZZN4H","typography-inline":"PickerModal_typography-inline__KorkO","typography-16":"PickerModal_typography-16__iu8BL","typography-14":"PickerModal_typography-14__q81pu","typography-12":"PickerModal_typography-12__yekWT","typography-promo":"PickerModal_typography-promo__aiTeX PickerModal_typography-header__UkGcm PickerModal_typography-block__ZZN4H PickerModal_typography-inline__KorkO","sub-header-wrapper":"PickerModal_sub-header-wrapper__ArWps","switch":"PickerModal_switch__l1-Vd","typographyHeader":"PickerModal_typography-header__UkGcm","typographyBlock":"PickerModal_typography-block__ZZN4H","typographyInline":"PickerModal_typography-inline__KorkO","typography16":"PickerModal_typography-16__iu8BL","typography14":"PickerModal_typography-14__q81pu","typography12":"PickerModal_typography-12__yekWT","typographyPromo":"PickerModal_typography-promo__aiTeX PickerModal_typography-header__UkGcm PickerModal_typography-block__ZZN4H PickerModal_typography-inline__KorkO","subHeaderWrapper":"PickerModal_sub-header-wrapper__ArWps","$switch$":"PickerModal_switch__l1-Vd"};
@@ -2292,527 +2292,527 @@ var SvgSearchWithBackground = function SvgSearchWithBackground(props, ref) {
2292
2292
  };
2293
2293
  var ForwardRef$e = /*#__PURE__*/React.forwardRef(SvgSearchWithBackground);
2294
2294
 
2295
- class PickerModalImpl extends uuiComponents.PickerModalBase {
2296
- constructor() {
2297
- super(...arguments);
2298
- this.renderNotFound = () => {
2299
- return this.props.renderNotFound
2300
- ? this.props.renderNotFound({ search: this.state.dataSourceState.search, onClose: () => this.props.success(null) })
2301
- : React__namespace.createElement("div", { className: css$p.noFoundModalContainer },
2302
- React__namespace.createElement(uuiComponents.IconContainer, { cx: css$p.noFoundModalContainerIcon, icon: ForwardRef$e }),
2303
- React__namespace.createElement(Text, { cx: css$p.noFoundModalContainerText, font: 'semibold', fontSize: '16', lineHeight: '24', color: 'primary', size: '36' }, i18n.dataPickerBody.noRecordsMessage),
2304
- React__namespace.createElement(Text, { cx: css$p.noFoundModalContainerText, fontSize: '12', lineHeight: '18', font: 'regular', color: 'primary', size: '36' }, i18n.dataPickerBody.noRecordsSubTitle));
2305
- };
2306
- }
2307
- renderRow(rowProps) {
2308
- return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', padding: '24', size: '36', renderItem: (i) => React__namespace.createElement(Text, { size: '36' }, rowProps.isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : this.getName(i)) })));
2309
- }
2310
- renderFooter(selectedDataRows) {
2311
- const hasSelection = selectedDataRows.length > 0;
2312
- const view = this.getView();
2313
- return React__namespace.createElement(React__namespace.Fragment, null,
2314
- view.selectAll && React__namespace.createElement(LinkButton, { caption: hasSelection ? i18n.pickerModal.clearAllButton : i18n.pickerModal.selectAllButton, onClick: hasSelection ? () => this.clearSelection() : () => view.selectAll.onValueChange(true) }),
2315
- React__namespace.createElement(FlexSpacer, null),
2316
- React__namespace.createElement(Button, { mode: 'outline', color: 'secondary', caption: i18n.pickerModal.cancelButton, onClick: () => this.props.abort() }),
2317
- React__namespace.createElement(Button, { color: 'accent', caption: i18n.pickerModal.selectButton, onClick: () => this.props.success(null) }));
2318
- }
2319
- render() {
2320
- const view = this.getView();
2321
- const dataRows = this.getRows();
2322
- const selectedDataRows = view.getSelectedRows();
2323
- const rows = dataRows.map(props => this.renderRow(props));
2324
- return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
2325
- React__namespace.createElement(ModalWindow, { width: 600, height: 700 },
2326
- React__namespace.createElement(ModalHeader, { title: this.props.caption || i18n.pickerModal.headerTitle, onClose: () => this.props.abort() }),
2327
- React__namespace.createElement(FlexCell, { cx: css$p.subHeaderWrapper },
2328
- React__namespace.createElement(FlexRow, { vPadding: '24' },
2329
- React__namespace.createElement(SearchInput, Object.assign({}, this.lens.prop('dataSourceState').prop('search').toProps(), { onKeyDown: (e) => uuiComponents.handleDataSourceKeyboard({
2330
- value: this.getDataSourceState(),
2331
- onValueChange: this.handleDataSourceValueChange,
2332
- listView: view,
2333
- rows: dataRows,
2334
- editMode: 'modal',
2335
- }, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder }))),
2336
- !this.isSingleSelect() && React__namespace.createElement(Switch, Object.assign({ cx: css$p.switch, size: '18' }, this.stateLens.prop('showSelected').toProps(), { isDisabled: selectedDataRows.length < 1, label: 'Show only selected' })),
2337
- this.props.renderFilter && React__namespace.createElement(FlexCell, { grow: 2 }, this.props.renderFilter(this.lens.prop('dataSourceState').prop('filter').toProps()))),
2338
- React__namespace.createElement(DataPickerBody, Object.assign({}, this.getListProps(), { value: this.getDataSourceState(), onValueChange: this.handleDataSourceValueChange, search: this.lens.prop('dataSourceState').prop('search').toProps(), showSearch: false, rows: rows, renderNotFound: this.renderNotFound, editMode: 'modal' })),
2339
- React__namespace.createElement(ModalFooter, { padding: '24', vPadding: '24' }, this.props.renderFooter
2340
- ? this.props.renderFooter(this.getFooterProps())
2341
- : this.renderFooter(selectedDataRows)))));
2342
- }
2343
- }
2344
- class PickerModal extends React__namespace.Component {
2345
- constructor() {
2346
- super(...arguments);
2347
- this.state = { selection: this.props.initialValue };
2348
- this.lens = uuiCore.Lens.onState(this);
2349
- }
2350
- render() {
2351
- return React__namespace.createElement(PickerModalImpl, Object.assign({}, this.props, this.lens.prop('selection').toProps(), { success: () => this.props.success(this.state.selection) }));
2352
- }
2295
+ class PickerModalImpl extends uuiComponents.PickerModalBase {
2296
+ constructor() {
2297
+ super(...arguments);
2298
+ this.renderNotFound = () => {
2299
+ return this.props.renderNotFound
2300
+ ? this.props.renderNotFound({ search: this.state.dataSourceState.search, onClose: () => this.props.success(null) })
2301
+ : React__namespace.createElement("div", { className: css$p.noFoundModalContainer },
2302
+ React__namespace.createElement(uuiComponents.IconContainer, { cx: css$p.noFoundModalContainerIcon, icon: ForwardRef$e }),
2303
+ React__namespace.createElement(Text, { cx: css$p.noFoundModalContainerText, font: 'semibold', fontSize: '16', lineHeight: '24', color: 'primary', size: '36' }, i18n.dataPickerBody.noRecordsMessage),
2304
+ React__namespace.createElement(Text, { cx: css$p.noFoundModalContainerText, fontSize: '12', lineHeight: '18', font: 'regular', color: 'primary', size: '36' }, i18n.dataPickerBody.noRecordsSubTitle));
2305
+ };
2306
+ }
2307
+ renderRow(rowProps) {
2308
+ return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', padding: '24', size: '36', renderItem: (i) => React__namespace.createElement(Text, { size: '36' }, rowProps.isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : this.getName(i)) })));
2309
+ }
2310
+ renderFooter(selectedDataRows) {
2311
+ const hasSelection = selectedDataRows.length > 0;
2312
+ const view = this.getView();
2313
+ return React__namespace.createElement(React__namespace.Fragment, null,
2314
+ view.selectAll && React__namespace.createElement(LinkButton, { caption: hasSelection ? i18n.pickerModal.clearAllButton : i18n.pickerModal.selectAllButton, onClick: hasSelection ? () => this.clearSelection() : () => view.selectAll.onValueChange(true) }),
2315
+ React__namespace.createElement(FlexSpacer, null),
2316
+ React__namespace.createElement(Button, { mode: 'outline', color: 'secondary', caption: i18n.pickerModal.cancelButton, onClick: () => this.props.abort() }),
2317
+ React__namespace.createElement(Button, { color: 'accent', caption: i18n.pickerModal.selectButton, onClick: () => this.props.success(null) }));
2318
+ }
2319
+ render() {
2320
+ const view = this.getView();
2321
+ const dataRows = this.getRows();
2322
+ const selectedDataRows = view.getSelectedRows();
2323
+ const rows = dataRows.map(props => this.renderRow(props));
2324
+ return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
2325
+ React__namespace.createElement(ModalWindow, { width: 600, height: 700 },
2326
+ React__namespace.createElement(ModalHeader, { title: this.props.caption || i18n.pickerModal.headerTitle, onClose: () => this.props.abort() }),
2327
+ React__namespace.createElement(FlexCell, { cx: css$p.subHeaderWrapper },
2328
+ React__namespace.createElement(FlexRow, { vPadding: '24' },
2329
+ React__namespace.createElement(SearchInput, Object.assign({}, this.lens.prop('dataSourceState').prop('search').toProps(), { onKeyDown: (e) => uuiComponents.handleDataSourceKeyboard({
2330
+ value: this.getDataSourceState(),
2331
+ onValueChange: this.handleDataSourceValueChange,
2332
+ listView: view,
2333
+ rows: dataRows,
2334
+ editMode: 'modal',
2335
+ }, e), autoFocus: true, placeholder: i18n.pickerModal.searchPlaceholder }))),
2336
+ !this.isSingleSelect() && React__namespace.createElement(Switch, Object.assign({ cx: css$p.switch, size: '18' }, this.stateLens.prop('showSelected').toProps(), { isDisabled: selectedDataRows.length < 1, label: 'Show only selected' })),
2337
+ this.props.renderFilter && React__namespace.createElement(FlexCell, { grow: 2 }, this.props.renderFilter(this.lens.prop('dataSourceState').prop('filter').toProps()))),
2338
+ React__namespace.createElement(DataPickerBody, Object.assign({}, this.getListProps(), { value: this.getDataSourceState(), onValueChange: this.handleDataSourceValueChange, search: this.lens.prop('dataSourceState').prop('search').toProps(), showSearch: false, rows: rows, renderNotFound: this.renderNotFound, editMode: 'modal' })),
2339
+ React__namespace.createElement(ModalFooter, { padding: '24', vPadding: '24' }, this.props.renderFooter
2340
+ ? this.props.renderFooter(this.getFooterProps())
2341
+ : this.renderFooter(selectedDataRows)))));
2342
+ }
2343
+ }
2344
+ class PickerModal extends React__namespace.Component {
2345
+ constructor() {
2346
+ super(...arguments);
2347
+ this.state = { selection: this.props.initialValue };
2348
+ this.lens = uuiCore.Lens.onState(this);
2349
+ }
2350
+ render() {
2351
+ return React__namespace.createElement(PickerModalImpl, Object.assign({}, this.props, this.lens.prop('selection').toProps(), { success: () => this.props.success(this.state.selection) }));
2352
+ }
2353
2353
  }
2354
2354
 
2355
2355
  const Avatar = uuiCore.withMods(uuiComponents.Avatar, () => []);
2356
2356
 
2357
2357
  var css$o = {"typography-header":"Badge_typography-header__zhcFQ","typography-block":"Badge_typography-block__aR47j","typography-inline":"Badge_typography-inline__MLd7F","typography-16":"Badge_typography-16__gwWRC","typography-14":"Badge_typography-14__ins26","typography-12":"Badge_typography-12__pj7lQ","typography-promo":"Badge_typography-promo__jJwa3 Badge_typography-header__zhcFQ Badge_typography-block__aR47j Badge_typography-inline__MLd7F","root":"Badge_root__wIzSP","size-18":"Badge_size-18__-VlZJ","fill-transparent":"Badge_fill-transparent__za27N","size-24":"Badge_size-24__WZsqd","size-30":"Badge_size-30__oGbuk","size-36":"Badge_size-36__MMdK5","size-42":"Badge_size-42__MOPTB","size-48":"Badge_size-48__FEYnJ","fill-solid":"Badge_fill-solid__ptnEO","fill-semitransparent":"Badge_fill-semitransparent__Nd9RN","typographyHeader":"Badge_typography-header__zhcFQ","typographyBlock":"Badge_typography-block__aR47j","typographyInline":"Badge_typography-inline__MLd7F","typography16":"Badge_typography-16__gwWRC","typography14":"Badge_typography-14__ins26","typography12":"Badge_typography-12__pj7lQ","typographyPromo":"Badge_typography-promo__jJwa3 Badge_typography-header__zhcFQ Badge_typography-block__aR47j Badge_typography-inline__MLd7F","size18":"Badge_size-18__-VlZJ","fillTransparent":"Badge_fill-transparent__za27N","size24":"Badge_size-24__WZsqd","size30":"Badge_size-30__oGbuk","size36":"Badge_size-36__MMdK5","size42":"Badge_size-42__MOPTB","size48":"Badge_size-48__FEYnJ","fillSolid":"Badge_fill-solid__ptnEO","fillSemitransparent":"Badge_fill-semitransparent__Nd9RN"};
2358
2358
 
2359
- const defaultSize$4 = '36';
2360
- const mapSize$1 = {
2361
- '48': '48',
2362
- '42': '48',
2363
- '36': '36',
2364
- '30': '30',
2365
- '24': '30',
2366
- '18': '18',
2367
- };
2368
- function applyBadgeMods(mods) {
2369
- return [
2370
- css$o.root,
2371
- buttonCss.root,
2372
- css$o['size-' + (mods.size || defaultSize$4)],
2373
- css$o['fill-' + (mods.fill || 'solid')],
2374
- mods.color && `badge-${(mods.color)}`,
2375
- ];
2376
- }
2377
- const Badge = uuiCore.withMods(uuiComponents.Button, applyBadgeMods, (props) => ({
2378
- dropdownIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$4].foldingArrow,
2379
- clearIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$4].clear,
2380
- countPosition: 'left',
2359
+ const defaultSize$4 = '36';
2360
+ const mapSize$1 = {
2361
+ '48': '48',
2362
+ '42': '48',
2363
+ '36': '36',
2364
+ '30': '30',
2365
+ '24': '30',
2366
+ '18': '18',
2367
+ };
2368
+ function applyBadgeMods(mods) {
2369
+ return [
2370
+ css$o.root,
2371
+ buttonCss.root,
2372
+ css$o['size-' + (mods.size || defaultSize$4)],
2373
+ css$o['fill-' + (mods.fill || 'solid')],
2374
+ mods.color && `badge-${(mods.color)}`,
2375
+ ];
2376
+ }
2377
+ const Badge = uuiCore.withMods(uuiComponents.Button, applyBadgeMods, (props) => ({
2378
+ dropdownIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$4].foldingArrow,
2379
+ clearIcon: systemIcons[props.size && mapSize$1[props.size] || defaultSize$4].clear,
2380
+ countPosition: 'left',
2381
2381
  }));
2382
2382
 
2383
2383
  var css$n = {"typography-header":"Tag_typography-header__F6CIv","typography-block":"Tag_typography-block__3N7TQ","typography-inline":"Tag_typography-inline__Yhikn","typography-16":"Tag_typography-16__Qssa4","typography-14":"Tag_typography-14__k1h7D","typography-12":"Tag_typography-12__ZH87T","typography-promo":"Tag_typography-promo__32H9w Tag_typography-header__F6CIv Tag_typography-block__3N7TQ Tag_typography-inline__Yhikn","root":"Tag_root__610w5","size-18":"Tag_size-18__mPDDm","size-24":"Tag_size-24__VXzbd","size-30":"Tag_size-30__pmOOa","size-36":"Tag_size-36__3O1rY","size-42":"Tag_size-42__20AON","size-48":"Tag_size-48__488DB","typographyHeader":"Tag_typography-header__F6CIv","typographyBlock":"Tag_typography-block__3N7TQ","typographyInline":"Tag_typography-inline__Yhikn","typography16":"Tag_typography-16__Qssa4","typography14":"Tag_typography-14__k1h7D","typography12":"Tag_typography-12__ZH87T","typographyPromo":"Tag_typography-promo__32H9w Tag_typography-header__F6CIv Tag_typography-block__3N7TQ Tag_typography-inline__Yhikn","size18":"Tag_size-18__mPDDm","size24":"Tag_size-24__VXzbd","size30":"Tag_size-30__pmOOa","size36":"Tag_size-36__3O1rY","size42":"Tag_size-42__20AON","size48":"Tag_size-48__488DB"};
2384
2384
 
2385
- const defaultSize$3 = '36';
2386
- const mapSize = {
2387
- '48': '48',
2388
- '42': '48',
2389
- '36': '36',
2390
- '30': '30',
2391
- '24': '30',
2392
- '18': '18',
2393
- };
2394
- function applyTagMods(mods) {
2395
- return [
2396
- css$n['size-' + (mods.size || defaultSize$3)],
2397
- css$n.root,
2398
- ];
2399
- }
2400
- const Tag = uuiCore.withMods(uuiComponents.Button, applyTagMods, (props) => ({
2401
- dropdownIcon: systemIcons[mapSize[props.size] || defaultSize$3].foldingArrow,
2402
- clearIcon: systemIcons[mapSize[props.size] || defaultSize$3].clear,
2385
+ const defaultSize$3 = '36';
2386
+ const mapSize = {
2387
+ '48': '48',
2388
+ '42': '48',
2389
+ '36': '36',
2390
+ '30': '30',
2391
+ '24': '30',
2392
+ '18': '18',
2393
+ };
2394
+ function applyTagMods(mods) {
2395
+ return [
2396
+ css$n['size-' + (mods.size || defaultSize$3)],
2397
+ css$n.root,
2398
+ ];
2399
+ }
2400
+ const Tag = uuiCore.withMods(uuiComponents.Button, applyTagMods, (props) => ({
2401
+ dropdownIcon: systemIcons[mapSize[props.size] || defaultSize$3].foldingArrow,
2402
+ clearIcon: systemIcons[mapSize[props.size] || defaultSize$3].clear,
2403
2403
  }));
2404
2404
 
2405
2405
  var css$m = {"typography-header":"PickerToggler_typography-header__Wl3bF","typography-block":"PickerToggler_typography-block__ujo3e","typography-inline":"PickerToggler_typography-inline__R6g9F","typography-16":"PickerToggler_typography-16__umTFU","typography-14":"PickerToggler_typography-14__3RWdh","typography-12":"PickerToggler_typography-12__PnVPR","typography-promo":"PickerToggler_typography-promo__PFoH7 PickerToggler_typography-header__Wl3bF PickerToggler_typography-block__ujo3e PickerToggler_typography-inline__R6g9F","root":"PickerToggler_root__G7gEl","mode-form":"PickerToggler_mode-form__OlTHW","mode-cell":"PickerToggler_mode-cell__hBg0t","size-24":"PickerToggler_size-24__MUg2U","size-30":"PickerToggler_size-30__K0XU-","size-36":"PickerToggler_size-36__NqG3q","size-42":"PickerToggler_size-42__xm0IS","size-48":"PickerToggler_size-48__DGIi9","typographyHeader":"PickerToggler_typography-header__Wl3bF","typographyBlock":"PickerToggler_typography-block__ujo3e","typographyInline":"PickerToggler_typography-inline__R6g9F","typography16":"PickerToggler_typography-16__umTFU","typography14":"PickerToggler_typography-14__3RWdh","typography12":"PickerToggler_typography-12__PnVPR","typographyPromo":"PickerToggler_typography-promo__PFoH7 PickerToggler_typography-header__Wl3bF PickerToggler_typography-block__ujo3e PickerToggler_typography-inline__R6g9F","modeForm":"PickerToggler_mode-form__OlTHW","modeCell":"PickerToggler_mode-cell__hBg0t","size24":"PickerToggler_size-24__MUg2U","size30":"PickerToggler_size-30__K0XU-","size36":"PickerToggler_size-36__NqG3q","size42":"PickerToggler_size-42__xm0IS","size48":"PickerToggler_size-48__DGIi9"};
2406
2406
 
2407
- const defaultSize$2 = '36';
2408
- const defaultMode = exports.EditMode.FORM;
2409
- function applyPickerTogglerMods(mods) {
2410
- return [
2411
- css$m.root,
2412
- css$m['size-' + (mods.size || defaultSize$2)],
2413
- css$m['mode-' + (mods.mode || defaultMode)],
2414
- ];
2415
- }
2416
- function PickerTogglerComponent(props, ref) {
2417
- const getPickerTogglerButtonSize = (propSize) => {
2418
- switch (propSize) {
2419
- case '48':
2420
- return '42';
2421
- case '42':
2422
- return '36';
2423
- case '36':
2424
- return '30';
2425
- case '30':
2426
- return '24';
2427
- case '24':
2428
- return '18';
2429
- }
2430
- };
2431
- const getCaption = (row) => {
2432
- var _a;
2433
- const maxItems = (props.maxItems || props.maxItems === 0) ? props.maxItems : 100;
2434
- if (row.isLoading) {
2435
- return React__namespace.createElement(TextPlaceholder, null);
2436
- }
2437
- else if (!props.getName || ((_a = props.selection) === null || _a === void 0 ? void 0 : _a.length) > maxItems) {
2438
- return row.value;
2439
- }
2440
- else {
2441
- return props.getName(row.value);
2442
- }
2443
- };
2444
- const renderItem = (row) => {
2445
- var _a;
2446
- return (React__namespace.createElement(Tag, { key: row.rowKey, caption: getCaption(row), tabIndex: -1, size: props.size ? getPickerTogglerButtonSize(props.size) : '30', onClear: e => {
2447
- var _a;
2448
- (_a = row.onCheck) === null || _a === void 0 ? void 0 : _a.call(row, row);
2449
- e.stopPropagation();
2450
- }, isDisabled: props.isDisabled || props.isReadonly || ((_a = row === null || row === void 0 ? void 0 : row.checkbox) === null || _a === void 0 ? void 0 : _a.isDisabled) }));
2451
- };
2452
- return (React__namespace.createElement(uuiComponents.PickerToggler, Object.assign({}, props, { ref: ref, cx: [applyPickerTogglerMods(props), props.cx], renderItem: !!props.renderItem ? props.renderItem : renderItem, getName: (item) => props.getName ? props.getName(item) : item, cancelIcon: systemIcons[props.size || defaultSize$2].clear, dropdownIcon: systemIcons[props.size || defaultSize$2].foldingArrow })));
2453
- }
2407
+ const defaultSize$2 = '36';
2408
+ const defaultMode = exports.EditMode.FORM;
2409
+ function applyPickerTogglerMods(mods) {
2410
+ return [
2411
+ css$m.root,
2412
+ css$m['size-' + (mods.size || defaultSize$2)],
2413
+ css$m['mode-' + (mods.mode || defaultMode)],
2414
+ ];
2415
+ }
2416
+ function PickerTogglerComponent(props, ref) {
2417
+ const getPickerTogglerButtonSize = (propSize) => {
2418
+ switch (propSize) {
2419
+ case '48':
2420
+ return '42';
2421
+ case '42':
2422
+ return '36';
2423
+ case '36':
2424
+ return '30';
2425
+ case '30':
2426
+ return '24';
2427
+ case '24':
2428
+ return '18';
2429
+ }
2430
+ };
2431
+ const getCaption = (row) => {
2432
+ var _a;
2433
+ const maxItems = (props.maxItems || props.maxItems === 0) ? props.maxItems : 100;
2434
+ if (row.isLoading) {
2435
+ return React__namespace.createElement(TextPlaceholder, null);
2436
+ }
2437
+ else if (!props.getName || ((_a = props.selection) === null || _a === void 0 ? void 0 : _a.length) > maxItems) {
2438
+ return row.value;
2439
+ }
2440
+ else {
2441
+ return props.getName(row.value);
2442
+ }
2443
+ };
2444
+ const renderItem = (row) => {
2445
+ var _a;
2446
+ return (React__namespace.createElement(Tag, { key: row.rowKey, caption: getCaption(row), tabIndex: -1, size: props.size ? getPickerTogglerButtonSize(props.size) : '30', onClear: e => {
2447
+ var _a;
2448
+ (_a = row.onCheck) === null || _a === void 0 ? void 0 : _a.call(row, row);
2449
+ e.stopPropagation();
2450
+ }, isDisabled: props.isDisabled || props.isReadonly || ((_a = row === null || row === void 0 ? void 0 : row.checkbox) === null || _a === void 0 ? void 0 : _a.isDisabled) }));
2451
+ };
2452
+ return (React__namespace.createElement(uuiComponents.PickerToggler, Object.assign({}, props, { ref: ref, cx: [applyPickerTogglerMods(props), props.cx], renderItem: !!props.renderItem ? props.renderItem : renderItem, getName: (item) => props.getName ? props.getName(item) : item, cancelIcon: systemIcons[props.size || defaultSize$2].clear, dropdownIcon: systemIcons[props.size || defaultSize$2].foldingArrow })));
2453
+ }
2454
2454
  const PickerToggler = React__namespace.forwardRef(PickerTogglerComponent);
2455
2455
 
2456
2456
  var css$l = {"root":"PickerItem_root__m-i2g","multiline-vertical-padding-24":"PickerItem_multiline-vertical-padding-24__ivzzQ","multiline-vertical-padding-30":"PickerItem_multiline-vertical-padding-30__tBEW-","multiline-vertical-padding-36":"PickerItem_multiline-vertical-padding-36__NpueM","multiline-vertical-padding-42":"PickerItem_multiline-vertical-padding-42__UjLpR","multiline-vertical-padding-48":"PickerItem_multiline-vertical-padding-48__65Jdv","text":"PickerItem_text__k9Jsu","multilineVerticalPadding24":"PickerItem_multiline-vertical-padding-24__ivzzQ","multilineVerticalPadding30":"PickerItem_multiline-vertical-padding-30__tBEW-","multilineVerticalPadding36":"PickerItem_multiline-vertical-padding-36__NpueM","multilineVerticalPadding42":"PickerItem_multiline-vertical-padding-42__UjLpR","multilineVerticalPadding48":"PickerItem_multiline-vertical-padding-48__65Jdv"};
2457
2457
 
2458
- const defaultSize$1 = '36';
2459
- class PickerItem extends React__namespace.Component {
2460
- constructor() {
2461
- super(...arguments);
2462
- this.getAvatarSize = (size, isMultiline) => {
2463
- return isMultiline ? size : +size - 6;
2464
- };
2465
- }
2466
- render() {
2467
- const { size, avatarUrl, title, subtitle, isLoading, isDisabled, icon } = this.props;
2468
- const itemSize = size && size !== 'none' ? size : defaultSize$1;
2469
- const isMultiline = !!(title && subtitle);
2470
- return (React__namespace.createElement(FlexCell, { width: 'auto', cx: css$l.root },
2471
- React__namespace.createElement(FlexRow, { size: itemSize, cx: isMultiline && css$l[`multiline-vertical-padding-${itemSize}`], spacing: '12' },
2472
- avatarUrl && React__namespace.createElement(Avatar, { isLoading: isLoading, img: avatarUrl, size: this.getAvatarSize(itemSize, isMultiline).toString() }),
2473
- icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: icon }),
2474
- React__namespace.createElement(FlexCell, { width: 'auto' },
2475
- title && React__namespace.createElement(Text, { size: itemSize, cx: css$l.text, color: isDisabled ? 'disabled' : 'primary' }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : title),
2476
- subtitle && React__namespace.createElement(Text, { size: itemSize, color: 'disabled', cx: css$l.text }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : subtitle)))));
2477
- }
2458
+ const defaultSize$1 = '36';
2459
+ class PickerItem extends React__namespace.Component {
2460
+ constructor() {
2461
+ super(...arguments);
2462
+ this.getAvatarSize = (size, isMultiline) => {
2463
+ return isMultiline ? size : +size - 6;
2464
+ };
2465
+ }
2466
+ render() {
2467
+ const { size, avatarUrl, title, subtitle, isLoading, isDisabled, icon } = this.props;
2468
+ const itemSize = size && size !== 'none' ? size : defaultSize$1;
2469
+ const isMultiline = !!(title && subtitle);
2470
+ return (React__namespace.createElement(FlexCell, { width: 'auto', cx: css$l.root },
2471
+ React__namespace.createElement(FlexRow, { size: itemSize, cx: isMultiline && css$l[`multiline-vertical-padding-${itemSize}`], spacing: '12' },
2472
+ avatarUrl && React__namespace.createElement(Avatar, { isLoading: isLoading, img: avatarUrl, size: this.getAvatarSize(itemSize, isMultiline).toString() }),
2473
+ icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: icon }),
2474
+ React__namespace.createElement(FlexCell, { width: 'auto' },
2475
+ title && React__namespace.createElement(Text, { size: itemSize, cx: css$l.text, color: isDisabled ? 'disabled' : 'primary' }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : title),
2476
+ subtitle && React__namespace.createElement(Text, { size: itemSize, color: 'disabled', cx: css$l.text }, isLoading ? React__namespace.createElement(TextPlaceholder, { wordsCount: 2 }) : subtitle)))));
2477
+ }
2478
2478
  }
2479
2479
 
2480
2480
  var css$k = {"typography-header":"PickerInput_typography-header__pZmu4","typography-block":"PickerInput_typography-block__MMlH6","typography-inline":"PickerInput_typography-inline__3Z1Fw","typography-16":"PickerInput_typography-16__58rbi","typography-14":"PickerInput_typography-14__CCnu9","typography-12":"PickerInput_typography-12__T51Lb","typography-promo":"PickerInput_typography-promo__tcN6K PickerInput_typography-header__pZmu4 PickerInput_typography-block__MMlH6 PickerInput_typography-inline__3Z1Fw","panel":"PickerInput_panel__0GHsI","footer-wrapper":"PickerInput_footer-wrapper__hMVx6","footer-size-24":"PickerInput_footer-size-24__X1s8w","footer-size-30":"PickerInput_footer-size-30__2kxYO","footer-size-36":"PickerInput_footer-size-36__xEFus","footer-size-42":"PickerInput_footer-size-42__q6lln","footer-size-48":"PickerInput_footer-size-48__uP99C","typographyHeader":"PickerInput_typography-header__pZmu4","typographyBlock":"PickerInput_typography-block__MMlH6","typographyInline":"PickerInput_typography-inline__3Z1Fw","typography16":"PickerInput_typography-16__58rbi","typography14":"PickerInput_typography-14__CCnu9","typography12":"PickerInput_typography-12__T51Lb","typographyPromo":"PickerInput_typography-promo__tcN6K PickerInput_typography-header__pZmu4 PickerInput_typography-block__MMlH6 PickerInput_typography-inline__3Z1Fw","footerWrapper":"PickerInput_footer-wrapper__hMVx6","footerSize24":"PickerInput_footer-size-24__X1s8w","footerSize30":"PickerInput_footer-size-30__2kxYO","footerSize36":"PickerInput_footer-size-36__xEFus","footerSize42":"PickerInput_footer-size-42__q6lln","footerSize48":"PickerInput_footer-size-48__uP99C"};
2481
2481
 
2482
- const pickerHeight$1 = 300;
2483
- const pickerWidth$1 = 360;
2484
- class PickerInput extends uuiComponents.PickerInputBase {
2485
- constructor() {
2486
- super(...arguments);
2487
- this.renderItem = (item, rowProps) => {
2488
- return React__namespace.default.createElement(PickerItem, Object.assign({ title: this.getName(item), size: this.getRowSize() }, rowProps));
2489
- };
2490
- this.renderRow = (rowProps) => {
2491
- return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.default.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', size: this.getRowSize(), padding: this.props.editMode === 'modal' ? '24' : '12', renderItem: this.renderItem })));
2492
- };
2493
- }
2494
- toggleModalOpening(opened) {
2495
- const _a = this.props, { renderFooter, rawProps } = _a, restProps = __rest(_a, ["renderFooter", "rawProps"]);
2496
- this.context.uuiModals.show(props => React__namespace.default.createElement(PickerModal, Object.assign({}, restProps, { rawProps: rawProps === null || rawProps === void 0 ? void 0 : rawProps.body }, props, { caption: this.getPlaceholder(), initialValue: this.props.value, renderRow: this.renderRow, selectionMode: this.props.selectionMode, valueType: this.props.valueType })))
2497
- .then(newSelection => {
2498
- this.handleSelectionValueChange(newSelection);
2499
- this.returnFocusToInput();
2500
- })
2501
- .catch(() => {
2502
- this.returnFocusToInput();
2503
- });
2504
- }
2505
- getRowSize() {
2506
- return uuiCore.isMobile()
2507
- ? '48'
2508
- : this.props.editMode === 'modal'
2509
- ? '36'
2510
- : this.props.size;
2511
- }
2512
- getTogglerMods() {
2513
- return {
2514
- size: this.props.size,
2515
- mode: this.props.mode ? this.props.mode : exports.EditMode.FORM,
2516
- };
2517
- }
2518
- renderFooter() {
2519
- const footerProps = this.getFooterProps();
2520
- return this.props.renderFooter
2521
- ? this.props.renderFooter(footerProps)
2522
- : React__namespace.default.createElement(DataPickerFooter, Object.assign({}, footerProps, { size: this.props.size }));
2523
- }
2524
- renderTarget(targetProps) {
2525
- const renderTarget = this.props.renderToggler || (props => React__namespace.default.createElement(PickerToggler, Object.assign({}, props)));
2526
- return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, { value: targetProps.value, onValueChange: this.handleTogglerSearchChange, render: editableProps => renderTarget(Object.assign(Object.assign(Object.assign({}, this.getTogglerMods()), targetProps), editableProps)) }));
2527
- }
2528
- renderBody(props, rows) {
2529
- const renderedDataRows = rows.map((props) => this.renderRow(props));
2530
- const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight$1);
2531
- const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth$1);
2532
- return (React__namespace.default.createElement(Panel, { shadow: true, style: { width: props.togglerWidth > minBodyWidth ? props.togglerWidth : minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [css$k.panel, uuiCore.uuiMarkers.lockFocus] },
2533
- React__namespace.default.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () => {
2534
- this.returnFocusToInput();
2535
- this.toggleBodyOpening(false);
2536
- } },
2537
- React__namespace.default.createElement(DataPickerBody, Object.assign({}, props, { rows: renderedDataRows, maxHeight: maxHeight, searchSize: this.props.size, editMode: 'dropdown', selectionMode: this.props.selectionMode, renderNotFound: this.props.renderNotFound ?
2538
- () => this.props.renderNotFound({
2539
- search: this.state.dataSourceState.search,
2540
- onClose: () => this.toggleBodyOpening(false),
2541
- }) : undefined })),
2542
- !this.isSingleSelect() && this.renderFooter())));
2543
- }
2482
+ const pickerHeight$1 = 300;
2483
+ const pickerWidth$1 = 360;
2484
+ class PickerInput extends uuiComponents.PickerInputBase {
2485
+ constructor() {
2486
+ super(...arguments);
2487
+ this.renderItem = (item, rowProps) => {
2488
+ return React__namespace.default.createElement(PickerItem, Object.assign({ title: this.getName(item), size: this.getRowSize() }, rowProps));
2489
+ };
2490
+ this.renderRow = (rowProps) => {
2491
+ return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.default.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: 'none', size: this.getRowSize(), padding: this.props.editMode === 'modal' ? '24' : '12', renderItem: this.renderItem })));
2492
+ };
2493
+ }
2494
+ toggleModalOpening(opened) {
2495
+ const _a = this.props, { renderFooter, rawProps } = _a, restProps = __rest(_a, ["renderFooter", "rawProps"]);
2496
+ this.context.uuiModals.show(props => React__namespace.default.createElement(PickerModal, Object.assign({}, restProps, { rawProps: rawProps === null || rawProps === void 0 ? void 0 : rawProps.body }, props, { caption: this.getPlaceholder(), initialValue: this.props.value, renderRow: this.renderRow, selectionMode: this.props.selectionMode, valueType: this.props.valueType })))
2497
+ .then(newSelection => {
2498
+ this.handleSelectionValueChange(newSelection);
2499
+ this.returnFocusToInput();
2500
+ })
2501
+ .catch(() => {
2502
+ this.returnFocusToInput();
2503
+ });
2504
+ }
2505
+ getRowSize() {
2506
+ return uuiCore.isMobile()
2507
+ ? '48'
2508
+ : this.props.editMode === 'modal'
2509
+ ? '36'
2510
+ : this.props.size;
2511
+ }
2512
+ getTogglerMods() {
2513
+ return {
2514
+ size: this.props.size,
2515
+ mode: this.props.mode ? this.props.mode : exports.EditMode.FORM,
2516
+ };
2517
+ }
2518
+ renderFooter() {
2519
+ const footerProps = this.getFooterProps();
2520
+ return this.props.renderFooter
2521
+ ? this.props.renderFooter(footerProps)
2522
+ : React__namespace.default.createElement(DataPickerFooter, Object.assign({}, footerProps, { size: this.props.size }));
2523
+ }
2524
+ renderTarget(targetProps) {
2525
+ const renderTarget = this.props.renderToggler || (props => React__namespace.default.createElement(PickerToggler, Object.assign({}, props)));
2526
+ return (React__namespace.default.createElement(uuiCore.IEditableDebouncer, { value: targetProps.value, onValueChange: this.handleTogglerSearchChange, render: editableProps => renderTarget(Object.assign(Object.assign(Object.assign({}, this.getTogglerMods()), targetProps), editableProps)) }));
2527
+ }
2528
+ renderBody(props, rows) {
2529
+ const renderedDataRows = rows.map((props) => this.renderRow(props));
2530
+ const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight$1);
2531
+ const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth$1);
2532
+ return (React__namespace.default.createElement(Panel, { shadow: true, style: { width: props.togglerWidth > minBodyWidth ? props.togglerWidth : minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [css$k.panel, uuiCore.uuiMarkers.lockFocus] },
2533
+ React__namespace.default.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () => {
2534
+ this.returnFocusToInput();
2535
+ this.toggleBodyOpening(false);
2536
+ } },
2537
+ React__namespace.default.createElement(DataPickerBody, Object.assign({}, props, { rows: renderedDataRows, maxHeight: maxHeight, searchSize: this.props.size, editMode: 'dropdown', selectionMode: this.props.selectionMode, renderNotFound: this.props.renderNotFound ?
2538
+ () => this.props.renderNotFound({
2539
+ search: this.state.dataSourceState.search,
2540
+ onClose: () => this.toggleBodyOpening(false),
2541
+ }) : undefined })),
2542
+ !this.isSingleSelect() && this.renderFooter())));
2543
+ }
2544
2544
  }
2545
2545
 
2546
2546
  var css$j = {"row":"PickerListItem_row__1Uzrn"};
2547
2547
 
2548
- class PickerListItem extends React__namespace.default.Component {
2549
- render() {
2550
- let label;
2551
- if (this.props.isLoading) {
2552
- label = React__namespace.default.createElement(TextPlaceholder, { wordsCount: 2 });
2553
- }
2554
- else {
2555
- label = this.props.getName(this.props.value);
2556
- }
2557
- let component;
2558
- if (this.props.checkbox) {
2559
- component = React__namespace.default.createElement(Checkbox, Object.assign({}, this.props.checkbox, { isDisabled: this.props.isLoading || this.props.checkbox.isDisabled, label: label, value: this.props.isChecked, onValueChange: () => this.props.onCheck(this.props) }));
2560
- }
2561
- else {
2562
- component = React__namespace.default.createElement(RadioInput, { label: label, value: this.props.isSelected, isDisabled: this.props.isLoading || !this.props.isSelectable, onValueChange: () => this.props.onSelect(this.props) });
2563
- }
2564
- return React__namespace.default.createElement("div", { className: css$j.row }, component);
2565
- }
2548
+ class PickerListItem extends React__namespace.default.Component {
2549
+ render() {
2550
+ let label;
2551
+ if (this.props.isLoading) {
2552
+ label = React__namespace.default.createElement(TextPlaceholder, { wordsCount: 2 });
2553
+ }
2554
+ else {
2555
+ label = this.props.getName(this.props.value);
2556
+ }
2557
+ let component;
2558
+ if (this.props.checkbox) {
2559
+ component = React__namespace.default.createElement(Checkbox, Object.assign({}, this.props.checkbox, { isDisabled: this.props.isLoading || this.props.checkbox.isDisabled, label: label, value: this.props.isChecked, onValueChange: () => this.props.onCheck(this.props) }));
2560
+ }
2561
+ else {
2562
+ component = React__namespace.default.createElement(RadioInput, { label: label, value: this.props.isSelected, isDisabled: this.props.isLoading || !this.props.isSelectable, onValueChange: () => this.props.onSelect(this.props) });
2563
+ }
2564
+ return React__namespace.default.createElement("div", { className: css$j.row }, component);
2565
+ }
2566
2566
  }
2567
2567
 
2568
- class PickerList extends uuiComponents.PickerListBase {
2569
- constructor() {
2570
- super(...arguments);
2571
- this.sessionStartTime = (new Date()).getTime();
2572
- this.renderRow = (row) => {
2573
- return React__namespace.default.createElement(PickerListItem, Object.assign({ getName: item => this.getName(item) }, row, { key: row.rowKey }));
2574
- };
2575
- this.handleShowPicker = () => {
2576
- this.context.uuiModals
2577
- .show(props => (React__namespace.default.createElement(PickerModal, Object.assign({}, props, this.props, { caption: this.props.placeholder || `Please select ${this.getEntityName() ? this.getEntityName() : ""}`, initialValue: this.props.value, selectionMode: this.props.selectionMode, valueType: this.props.valueType }))))
2578
- .then((value) => {
2579
- this.appendLastSelected([...this.getSelectedIdsArray(value)]);
2580
- this.props.onValueChange(value);
2581
- });
2582
- };
2583
- this.defaultRenderToggler = (props) => (React__namespace.default.createElement(LinkButton, Object.assign({ caption: 'Show all' }, props)));
2584
- }
2585
- render() {
2586
- const view = this.getView();
2587
- const viewProps = view.getListProps();
2588
- const selectedRows = view.getSelectedRows();
2589
- const rows = this.buildRowsList();
2590
- const showPicker = viewProps.totalCount == null || viewProps.totalCount > this.getMaxDefaultItems();
2591
- const renderToggler = this.props.renderModalToggler || this.defaultRenderToggler;
2592
- const renderRow = this.props.renderRow || this.renderRow;
2593
- return (React__namespace.default.createElement("div", null,
2594
- !rows.length && (this.props.noOptionsMessage ?
2595
- this.props.noOptionsMessage :
2596
- React__namespace.default.createElement(Text, { color: 'secondary', size: this.props.size }, "No options available")),
2597
- rows.map(row => renderRow(row, this.state.dataSourceState)),
2598
- showPicker && renderToggler({
2599
- onClick: this.handleShowPicker,
2600
- caption: this.getModalTogglerCaption(viewProps.totalCount, selectedRows.length),
2601
- }, selectedRows)));
2602
- }
2603
- }
2568
+ class PickerList extends uuiComponents.PickerListBase {
2569
+ constructor() {
2570
+ super(...arguments);
2571
+ this.sessionStartTime = (new Date()).getTime();
2572
+ this.renderRow = (row) => {
2573
+ return React__namespace.default.createElement(PickerListItem, Object.assign({ getName: item => this.getName(item) }, row, { key: row.rowKey }));
2574
+ };
2575
+ this.handleShowPicker = () => {
2576
+ this.context.uuiModals
2577
+ .show(props => (React__namespace.default.createElement(PickerModal, Object.assign({}, props, this.props, { caption: this.props.placeholder || `Please select ${this.getEntityName() ? this.getEntityName() : ""}`, initialValue: this.props.value, selectionMode: this.props.selectionMode, valueType: this.props.valueType }))))
2578
+ .then((value) => {
2579
+ this.appendLastSelected([...this.getSelectedIdsArray(value)]);
2580
+ this.props.onValueChange(value);
2581
+ });
2582
+ };
2583
+ this.defaultRenderToggler = (props) => (React__namespace.default.createElement(LinkButton, Object.assign({ caption: 'Show all' }, props)));
2584
+ }
2585
+ render() {
2586
+ const view = this.getView();
2587
+ const viewProps = view.getListProps();
2588
+ const selectedRows = view.getSelectedRows();
2589
+ const rows = this.buildRowsList();
2590
+ const showPicker = viewProps.totalCount == null || viewProps.totalCount > this.getMaxDefaultItems();
2591
+ const renderToggler = this.props.renderModalToggler || this.defaultRenderToggler;
2592
+ const renderRow = this.props.renderRow || this.renderRow;
2593
+ return (React__namespace.default.createElement("div", null,
2594
+ !rows.length && (this.props.noOptionsMessage ?
2595
+ this.props.noOptionsMessage :
2596
+ React__namespace.default.createElement(Text, { color: 'secondary', size: this.props.size }, "No options available")),
2597
+ rows.map(row => renderRow(row, this.state.dataSourceState)),
2598
+ showPicker && renderToggler({
2599
+ onClick: this.handleShowPicker,
2600
+ caption: this.getModalTogglerCaption(viewProps.totalCount, selectedRows.length),
2601
+ }, selectedRows)));
2602
+ }
2603
+ }
2604
2604
  PickerList.contextType = uuiCore.UuiContext;
2605
2605
 
2606
2606
  var css$i = {"typography-header":"FilterPanelItemToggler_typography-header__nwnk9","typography-block":"FilterPanelItemToggler_typography-block__RS98Q","typography-inline":"FilterPanelItemToggler_typography-inline__GBz0E","typography-16":"FilterPanelItemToggler_typography-16__ilpGd","typography-14":"FilterPanelItemToggler_typography-14__O2RUd","typography-12":"FilterPanelItemToggler_typography-12__kvTGV","typography-promo":"FilterPanelItemToggler_typography-promo__6cloV FilterPanelItemToggler_typography-header__nwnk9 FilterPanelItemToggler_typography-block__RS98Q FilterPanelItemToggler_typography-inline__GBz0E","root":"FilterPanelItemToggler_root__KIGYZ","title-wrapper":"FilterPanelItemToggler_title-wrapper__hrBtt","title":"FilterPanelItemToggler_title__wECIj","text-wrapper":"FilterPanelItemToggler_text-wrapper__lYOV6","selection":"FilterPanelItemToggler_selection__4HBx1","postfix":"FilterPanelItemToggler_postfix__Sz2ir","selected":"FilterPanelItemToggler_selected__97jlL","typographyHeader":"FilterPanelItemToggler_typography-header__nwnk9","typographyBlock":"FilterPanelItemToggler_typography-block__RS98Q","typographyInline":"FilterPanelItemToggler_typography-inline__GBz0E","typography16":"FilterPanelItemToggler_typography-16__ilpGd","typography14":"FilterPanelItemToggler_typography-14__O2RUd","typography12":"FilterPanelItemToggler_typography-12__kvTGV","typographyPromo":"FilterPanelItemToggler_typography-promo__6cloV FilterPanelItemToggler_typography-header__nwnk9 FilterPanelItemToggler_typography-block__RS98Q FilterPanelItemToggler_typography-inline__GBz0E","titleWrapper":"FilterPanelItemToggler_title-wrapper__hrBtt","textWrapper":"FilterPanelItemToggler_text-wrapper__lYOV6"};
2607
2607
 
2608
- const defaultSize = "36";
2609
- const FilterPanelItemToggler = React__namespace.forwardRef((props, ref) => {
2610
- const togglerPickerOpened = (e) => {
2611
- var _a;
2612
- if (props.isDisabled)
2613
- return;
2614
- e.preventDefault();
2615
- (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
2616
- };
2617
- const getTitle = props.predicateName ? `${props.title} ${props.predicateName}` : `${props.title}:`;
2618
- return (React__namespace.createElement(uuiComponents.FlexRow, Object.assign({}, props, { rawProps: { style: { maxWidth: `${(props.maxWidth ? (props.maxWidth + 'px') : 'auto')}` } }, cx: cx__default.default(css$i.root, uuiCore.uuiElement.inputBox, uuiCore.uuiMarkers.clickable, props.isOpen && uuiCore.uuiMod.opened, ["size-" + (props.size || defaultSize)], props.cx), onClick: togglerPickerOpened, ref: ref }),
2619
- React__namespace.createElement(uuiComponents.FlexRow, { cx: css$i.titleWrapper },
2620
- React__namespace.createElement(Text, { cx: css$i.title }, getTitle),
2621
- React__namespace.createElement("div", { className: css$i.textWrapper },
2622
- React__namespace.createElement(Text, { color: "brand", cx: css$i.selection }, props.selection),
2623
- props.postfix && React__namespace.createElement(Text, { color: "brand", cx: css$i.postfix }, props.postfix))),
2624
- !props.isDisabled &&
2625
- React__namespace.createElement(uuiComponents.IconContainer, { icon: systemIcons[props.size || defaultSize].foldingArrow, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
2608
+ const defaultSize = "36";
2609
+ const FilterPanelItemToggler = React__namespace.forwardRef((props, ref) => {
2610
+ const togglerPickerOpened = (e) => {
2611
+ var _a;
2612
+ if (props.isDisabled)
2613
+ return;
2614
+ e.preventDefault();
2615
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props);
2616
+ };
2617
+ const getTitle = props.predicateName ? `${props.title} ${props.predicateName}` : `${props.title}:`;
2618
+ return (React__namespace.createElement(uuiComponents.FlexRow, Object.assign({}, props, { rawProps: { style: { maxWidth: `${(props.maxWidth ? (props.maxWidth + 'px') : 'auto')}` } }, cx: cx__default.default(css$i.root, uuiCore.uuiElement.inputBox, uuiCore.uuiMarkers.clickable, props.isOpen && uuiCore.uuiMod.opened, ["size-" + (props.size || defaultSize)], props.cx), onClick: togglerPickerOpened, ref: ref }),
2619
+ React__namespace.createElement(uuiComponents.FlexRow, { cx: css$i.titleWrapper },
2620
+ React__namespace.createElement(Text, { cx: css$i.title }, getTitle),
2621
+ React__namespace.createElement("div", { className: css$i.textWrapper },
2622
+ React__namespace.createElement(Text, { color: "brand", cx: css$i.selection }, props.selection),
2623
+ props.postfix && React__namespace.createElement(Text, { color: "brand", cx: css$i.postfix }, props.postfix))),
2624
+ !props.isDisabled &&
2625
+ React__namespace.createElement(uuiComponents.IconContainer, { icon: systemIcons[props.size || defaultSize].foldingArrow, flipY: props.isOpen, cx: "uui-icon-dropdown" })));
2626
2626
  });
2627
2627
 
2628
2628
  var css$h = {"typography-header":"FilterPickerBody_typography-header__2k2Z8","typography-block":"FilterPickerBody_typography-block__IVJqu","typography-inline":"FilterPickerBody_typography-inline__mBxPJ","typography-16":"FilterPickerBody_typography-16__dtP5r","typography-14":"FilterPickerBody_typography-14__HZiqg","typography-12":"FilterPickerBody_typography-12__w8xeY","typography-promo":"FilterPickerBody_typography-promo__S9Gyx FilterPickerBody_typography-header__2k2Z8 FilterPickerBody_typography-block__IVJqu FilterPickerBody_typography-inline__mBxPJ","footer-wrapper":"FilterPickerBody_footer-wrapper__-CvZO","typographyHeader":"FilterPickerBody_typography-header__2k2Z8","typographyBlock":"FilterPickerBody_typography-block__IVJqu","typographyInline":"FilterPickerBody_typography-inline__mBxPJ","typography16":"FilterPickerBody_typography-16__dtP5r","typography14":"FilterPickerBody_typography-14__HZiqg","typography12":"FilterPickerBody_typography-12__w8xeY","typographyPromo":"FilterPickerBody_typography-promo__S9Gyx FilterPickerBody_typography-header__2k2Z8 FilterPickerBody_typography-block__IVJqu FilterPickerBody_typography-inline__mBxPJ","footerWrapper":"FilterPickerBody_footer-wrapper__-CvZO"};
2629
2629
 
2630
- const pickerHeight = 300;
2631
- const pickerWidth = 360;
2632
- class FilterPickerBody extends uuiComponents.PickerInputBase {
2633
- constructor() {
2634
- super(...arguments);
2635
- this.renderItem = (item, rowProps) => {
2636
- return React__namespace.createElement(PickerItem, Object.assign({ title: this.getName(item), size: "36" }, rowProps));
2637
- };
2638
- this.onSelect = (row) => {
2639
- this.props.onClose();
2640
- this.handleDataSourceValueChange(Object.assign(Object.assign({}, this.state.dataSourceState), { search: '', selectedId: row.id }));
2641
- };
2642
- this.renderRow = (rowProps) => {
2643
- if (rowProps.isSelectable && this.isSingleSelect() && this.props.editMode !== 'modal') {
2644
- rowProps.onSelect = this.onSelect;
2645
- }
2646
- return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: "none", size: "36", padding: "12", renderItem: this.renderItem })));
2647
- };
2648
- this.renderFooter = (isSelectAll) => {
2649
- if (isSelectAll) {
2650
- return React__namespace.createElement(DataPickerFooter, Object.assign({}, this.getFooterProps(), { hideShowOnlySelected: this.isSingleSelect(), size: "36" }));
2651
- }
2652
- const { clearSelection, view } = this.getFooterProps();
2653
- const size = uuiCore.isMobile() ? '48' : '36';
2654
- const hasSelection = view.getSelectedRows().length > 0;
2655
- const handleKeyDown = (e) => {
2656
- if (!e.shiftKey && e.key === 'Tab')
2657
- e.preventDefault();
2658
- };
2659
- return (React__namespace.createElement(FlexRow, { padding: "12", cx: cx__default.default(css$h.footerWrapper) },
2660
- React__namespace.createElement(FlexCell, { width: "auto", alignSelf: "center" },
2661
- React__namespace.createElement(LinkButton, { isDisabled: !hasSelection, size: size, caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection, rawProps: { onKeyDown: handleKeyDown } }))));
2662
- };
2663
- }
2664
- shouldShowBody() {
2665
- return this.props.isOpen;
2666
- }
2667
- toggleModalOpening(opened) {
2668
- }
2669
- renderTarget(targetProps) {
2670
- return React__namespace.createElement("div", null);
2671
- }
2672
- renderBody(props, rows) {
2673
- const renderedDataRows = rows.map(props => this.renderRow(props));
2674
- const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight);
2675
- const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth);
2676
- return (React__namespace.createElement(Panel, { style: { width: minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [uuiCore.uuiMarkers.lockFocus] },
2677
- React__namespace.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () => this.toggleBodyOpening(false) },
2678
- React__namespace.createElement(DataPickerBody, Object.assign({}, props, { selectionMode: this.props.selectionMode, rows: renderedDataRows, maxHeight: maxHeight, searchSize: "36", editMode: "dropdown", showSearch: true })),
2679
- this.renderFooter(props.selectAll))));
2680
- }
2681
- render() {
2682
- const rows = this.getRows();
2683
- return this.renderBody(Object.assign(Object.assign({}, this.getPickerBodyProps(rows)), this.getListProps()), rows);
2684
- }
2630
+ const pickerHeight = 300;
2631
+ const pickerWidth = 360;
2632
+ class FilterPickerBody extends uuiComponents.PickerInputBase {
2633
+ constructor() {
2634
+ super(...arguments);
2635
+ this.renderItem = (item, rowProps) => {
2636
+ return React__namespace.createElement(PickerItem, Object.assign({ title: this.getName(item), size: "36" }, rowProps));
2637
+ };
2638
+ this.onSelect = (row) => {
2639
+ this.props.onClose();
2640
+ this.handleDataSourceValueChange(Object.assign(Object.assign({}, this.state.dataSourceState), { search: '', selectedId: row.id }));
2641
+ };
2642
+ this.renderRow = (rowProps) => {
2643
+ if (rowProps.isSelectable && this.isSingleSelect() && this.props.editMode !== 'modal') {
2644
+ rowProps.onSelect = this.onSelect;
2645
+ }
2646
+ return this.props.renderRow ? this.props.renderRow(rowProps, this.state.dataSourceState) : (React__namespace.createElement(DataPickerRow, Object.assign({}, rowProps, { key: rowProps.rowKey, borderBottom: "none", size: "36", padding: "12", renderItem: this.renderItem })));
2647
+ };
2648
+ this.renderFooter = (isSelectAll) => {
2649
+ if (isSelectAll) {
2650
+ return React__namespace.createElement(DataPickerFooter, Object.assign({}, this.getFooterProps(), { hideShowOnlySelected: this.isSingleSelect(), size: "36" }));
2651
+ }
2652
+ const { clearSelection, view } = this.getFooterProps();
2653
+ const size = uuiCore.isMobile() ? '48' : '36';
2654
+ const hasSelection = view.getSelectedRows().length > 0;
2655
+ const handleKeyDown = (e) => {
2656
+ if (!e.shiftKey && e.key === 'Tab')
2657
+ e.preventDefault();
2658
+ };
2659
+ return (React__namespace.createElement(FlexRow, { padding: "12", cx: cx__default.default(css$h.footerWrapper) },
2660
+ React__namespace.createElement(FlexCell, { width: "auto", alignSelf: "center" },
2661
+ React__namespace.createElement(LinkButton, { isDisabled: !hasSelection, size: size, caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection, rawProps: { onKeyDown: handleKeyDown } }))));
2662
+ };
2663
+ }
2664
+ shouldShowBody() {
2665
+ return this.props.isOpen;
2666
+ }
2667
+ toggleModalOpening(opened) {
2668
+ }
2669
+ renderTarget(targetProps) {
2670
+ return React__namespace.createElement("div", null);
2671
+ }
2672
+ renderBody(props, rows) {
2673
+ const renderedDataRows = rows.map(props => this.renderRow(props));
2674
+ const maxHeight = uuiCore.isMobile() ? document.documentElement.clientHeight : (this.props.dropdownHeight || pickerHeight);
2675
+ const minBodyWidth = uuiCore.isMobile() ? document.documentElement.clientWidth : (this.props.minBodyWidth || pickerWidth);
2676
+ return (React__namespace.createElement(Panel, { style: { width: minBodyWidth }, rawProps: { tabIndex: -1 }, cx: [uuiCore.uuiMarkers.lockFocus] },
2677
+ React__namespace.createElement(MobileDropdownWrapper, { title: this.props.entityName, close: () => this.toggleBodyOpening(false) },
2678
+ React__namespace.createElement(DataPickerBody, Object.assign({}, props, { selectionMode: this.props.selectionMode, rows: renderedDataRows, maxHeight: maxHeight, searchSize: "36", editMode: "dropdown", showSearch: true })),
2679
+ this.renderFooter(props.selectAll))));
2680
+ }
2681
+ render() {
2682
+ const rows = this.getRows();
2683
+ return this.renderBody(Object.assign(Object.assign({}, this.getPickerBodyProps(rows)), this.getListProps()), rows);
2684
+ }
2685
2685
  }
2686
2686
 
2687
- class FilterDataPickerBody extends uuiComponents.BaseDatePicker {
2688
- constructor() {
2689
- super(...arguments);
2690
- this.state = Object.assign(Object.assign({}, super.getValue()), { isOpen: false, inputValue: null });
2691
- this.renderInput = () => {
2692
- return null;
2693
- };
2694
- this.onToggleHandler = (val) => {
2695
- this.onToggle(val);
2696
- this.props.onClose();
2697
- };
2698
- this.handleCancel = () => {
2699
- this.handleValueChange(undefined);
2700
- this.setState({ inputValue: null, selectedDate: null });
2701
- };
2702
- }
2703
- renderBody() {
2704
- var _a;
2705
- return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
2706
- React__namespace.default.createElement(FlexRow, { borderBottom: true },
2707
- React__namespace.default.createElement(DatePickerBody, { filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggleHandler, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body })),
2708
- React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
2709
- React__namespace.default.createElement(FlexRow, { padding: "24", vPadding: "12" },
2710
- React__namespace.default.createElement(Text, null, this.state.selectedDate ? dayjs__default.default(this.state.selectedDate).format('MMM DD, YYYY') : ''),
2711
- React__namespace.default.createElement(FlexSpacer, null),
2712
- React__namespace.default.createElement(LinkButton, { isDisabled: !this.state.selectedDate, caption: i18n.filterToolbar.datePicker.clearCaption, onClick: this.handleCancel })))));
2713
- }
2714
- render() {
2715
- return this.renderBody();
2716
- }
2687
+ class FilterDataPickerBody extends uuiComponents.BaseDatePicker {
2688
+ constructor() {
2689
+ super(...arguments);
2690
+ this.state = Object.assign(Object.assign({}, super.getValue()), { isOpen: false, inputValue: null });
2691
+ this.renderInput = () => {
2692
+ return null;
2693
+ };
2694
+ this.onToggleHandler = (val) => {
2695
+ this.onToggle(val);
2696
+ this.props.onClose();
2697
+ };
2698
+ this.handleCancel = () => {
2699
+ this.handleValueChange(undefined);
2700
+ this.setState({ inputValue: null, selectedDate: null });
2701
+ };
2702
+ }
2703
+ renderBody() {
2704
+ var _a;
2705
+ return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
2706
+ React__namespace.default.createElement(FlexRow, { borderBottom: true },
2707
+ React__namespace.default.createElement(DatePickerBody, { filter: this.props.filter, value: this.getValue(), setSelectedDate: this.setSelectedDate, setDisplayedDateAndView: this.setDisplayedDateAndView, changeIsOpen: this.onToggleHandler, renderDay: this.props.renderDay, isHoliday: this.props.isHoliday, rawProps: (_a = this.props.rawProps) === null || _a === void 0 ? void 0 : _a.body })),
2708
+ React__namespace.default.createElement(FlexCell, { alignSelf: "stretch" },
2709
+ React__namespace.default.createElement(FlexRow, { padding: "24", vPadding: "12" },
2710
+ React__namespace.default.createElement(Text, null, this.state.selectedDate ? dayjs__default.default(this.state.selectedDate).format('MMM DD, YYYY') : ''),
2711
+ React__namespace.default.createElement(FlexSpacer, null),
2712
+ React__namespace.default.createElement(LinkButton, { isDisabled: !this.state.selectedDate, caption: i18n.filterToolbar.datePicker.clearCaption, onClick: this.handleCancel })))));
2713
+ }
2714
+ render() {
2715
+ return this.renderBody();
2716
+ }
2717
2717
  }
2718
2718
 
2719
2719
  var css$g = {"typography-header":"FilterRangeDatePickerBody_typography-header__HGaXO","typography-block":"FilterRangeDatePickerBody_typography-block__xPG--","typography-inline":"FilterRangeDatePickerBody_typography-inline__M3AvG","typography-16":"FilterRangeDatePickerBody_typography-16__gUKHq","typography-14":"FilterRangeDatePickerBody_typography-14__Cf-Is","typography-12":"FilterRangeDatePickerBody_typography-12__gG1-W","typography-promo":"FilterRangeDatePickerBody_typography-promo__ENzVq FilterRangeDatePickerBody_typography-header__HGaXO FilterRangeDatePickerBody_typography-block__xPG-- FilterRangeDatePickerBody_typography-inline__M3AvG","date-input":"FilterRangeDatePickerBody_date-input__5E3aM","size-24":"FilterRangeDatePickerBody_size-24__tTZkD","size-30":"FilterRangeDatePickerBody_size-30__YcAKz","size-36":"FilterRangeDatePickerBody_size-36__On-Tz","size-42":"FilterRangeDatePickerBody_size-42__Qe9fl","size-48":"FilterRangeDatePickerBody_size-48__5yljc","date-input-group":"FilterRangeDatePickerBody_date-input-group__cYRz6","separator":"FilterRangeDatePickerBody_separator__Txi2W","mode-form":"FilterRangeDatePickerBody_mode-form__V4zoN","mode-cell":"FilterRangeDatePickerBody_mode-cell__RA5Pu","typographyHeader":"FilterRangeDatePickerBody_typography-header__HGaXO","typographyBlock":"FilterRangeDatePickerBody_typography-block__xPG--","typographyInline":"FilterRangeDatePickerBody_typography-inline__M3AvG","typography16":"FilterRangeDatePickerBody_typography-16__gUKHq","typography14":"FilterRangeDatePickerBody_typography-14__Cf-Is","typography12":"FilterRangeDatePickerBody_typography-12__gG1-W","typographyPromo":"FilterRangeDatePickerBody_typography-promo__ENzVq FilterRangeDatePickerBody_typography-header__HGaXO FilterRangeDatePickerBody_typography-block__xPG-- FilterRangeDatePickerBody_typography-inline__M3AvG","dateInput":"FilterRangeDatePickerBody_date-input__5E3aM","size24":"FilterRangeDatePickerBody_size-24__tTZkD","size30":"FilterRangeDatePickerBody_size-30__YcAKz","size36":"FilterRangeDatePickerBody_size-36__On-Tz","size42":"FilterRangeDatePickerBody_size-42__Qe9fl","size48":"FilterRangeDatePickerBody_size-48__5yljc","dateInputGroup":"FilterRangeDatePickerBody_date-input-group__cYRz6","modeForm":"FilterRangeDatePickerBody_mode-form__V4zoN","modeCell":"FilterRangeDatePickerBody_mode-cell__RA5Pu"};
2720
2720
 
2721
- class FilterRangeDatePickerBody extends uuiComponents.BaseRangeDatePicker {
2722
- constructor() {
2723
- super(...arguments);
2724
- this.state = Object.assign(Object.assign({}, super.getInitialState()), { inFocus: 'from' });
2725
- this.renderInput = () => {
2726
- return null;
2727
- };
2728
- }
2729
- renderBody() {
2730
- return (React__namespace.createElement(React__namespace.Fragment, null,
2731
- React__namespace.createElement(FlexRow, { borderBottom: true },
2732
- React__namespace.createElement(RangeDatePickerBody, { value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, focusPart: this.state.inFocus, changeIsOpen: this.toggleOpening })),
2733
- React__namespace.createElement(FlexCell, { alignSelf: "stretch" },
2734
- React__namespace.createElement(FlexRow, { padding: "24", vPadding: "12" },
2735
- React__namespace.createElement("div", { className: cx__default.default(css$g.dateInputGroup, this.state.inFocus && uuiCore.uuiMod.focus) },
2736
- React__namespace.createElement(TextInput, { icon: systemIcons['30'].calendar, cx: cx__default.default(css$g.dateInput, css$g['size-30'], this.state.inFocus === 'from' && uuiCore.uuiMod.focus), size: '30', placeholder: i18n.rangeDatePicker.pickerPlaceholderFrom, value: this.state.inputValue.from, onValueChange: this.getChangeHandler('from'), onFocus: (event) => this.handleFocus(event, 'from'), onBlur: (event) => this.handleBlur(event, 'from') }),
2737
- React__namespace.createElement("div", { className: css$g.separator }),
2738
- React__namespace.createElement(TextInput, { cx: cx__default.default(css$g.dateInput, css$g['size-30'], this.state.inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: i18n.rangeDatePicker.pickerPlaceholderTo, size: '30', value: this.state.inputValue.to, onCancel: this.state.inputValue.from && this.state.inputValue.to && this.handleCancel, onValueChange: this.getChangeHandler('to'), onFocus: (event) => this.handleFocus(event, 'to'), onBlur: (event) => this.handleBlur(event, 'to') })),
2739
- React__namespace.createElement(FlexSpacer, null),
2740
- React__namespace.createElement(LinkButton, { isDisabled: !this.state.inputValue.from && !this.state.inputValue.to, caption: i18n.pickerModal.clearAllButton, onClick: this.handleCancel })))));
2741
- }
2742
- render() {
2743
- return this.renderBody();
2744
- }
2721
+ class FilterRangeDatePickerBody extends uuiComponents.BaseRangeDatePicker {
2722
+ constructor() {
2723
+ super(...arguments);
2724
+ this.state = Object.assign(Object.assign({}, super.getInitialState()), { inFocus: 'from' });
2725
+ this.renderInput = () => {
2726
+ return null;
2727
+ };
2728
+ }
2729
+ renderBody() {
2730
+ return (React__namespace.createElement(React__namespace.Fragment, null,
2731
+ React__namespace.createElement(FlexRow, { borderBottom: true },
2732
+ React__namespace.createElement(RangeDatePickerBody, { value: this.getValue(), onValueChange: this.onRangeChange, filter: this.props.filter, focusPart: this.state.inFocus, changeIsOpen: this.toggleOpening })),
2733
+ React__namespace.createElement(FlexCell, { alignSelf: "stretch" },
2734
+ React__namespace.createElement(FlexRow, { padding: "24", vPadding: "12" },
2735
+ React__namespace.createElement("div", { className: cx__default.default(css$g.dateInputGroup, this.state.inFocus && uuiCore.uuiMod.focus) },
2736
+ React__namespace.createElement(TextInput, { icon: systemIcons['30'].calendar, cx: cx__default.default(css$g.dateInput, css$g['size-30'], this.state.inFocus === 'from' && uuiCore.uuiMod.focus), size: '30', placeholder: i18n.rangeDatePicker.pickerPlaceholderFrom, value: this.state.inputValue.from, onValueChange: this.getChangeHandler('from'), onFocus: (event) => this.handleFocus(event, 'from'), onBlur: (event) => this.handleBlur(event, 'from') }),
2737
+ React__namespace.createElement("div", { className: css$g.separator }),
2738
+ React__namespace.createElement(TextInput, { cx: cx__default.default(css$g.dateInput, css$g['size-30'], this.state.inFocus === 'to' && uuiCore.uuiMod.focus), placeholder: i18n.rangeDatePicker.pickerPlaceholderTo, size: '30', value: this.state.inputValue.to, onCancel: this.state.inputValue.from && this.state.inputValue.to && this.handleCancel, onValueChange: this.getChangeHandler('to'), onFocus: (event) => this.handleFocus(event, 'to'), onBlur: (event) => this.handleBlur(event, 'to') })),
2739
+ React__namespace.createElement(FlexSpacer, null),
2740
+ React__namespace.createElement(LinkButton, { isDisabled: !this.state.inputValue.from && !this.state.inputValue.to, caption: i18n.pickerModal.clearAllButton, onClick: this.handleCancel })))));
2741
+ }
2742
+ render() {
2743
+ return this.renderBody();
2744
+ }
2745
2745
  }
2746
2746
 
2747
- const FilterNumericBody = (props) => {
2748
- var _a, _b;
2749
- const isInRangePredicate = (props === null || props === void 0 ? void 0 : props.selectedPredicate) === 'inRange' || (props === null || props === void 0 ? void 0 : props.selectedPredicate) === 'notInRange';
2750
- const rangeValueHandler = (type) => (val) => {
2751
- var _a, _b;
2752
- const value = props.value;
2753
- switch (type) {
2754
- case "from": {
2755
- props.onValueChange({
2756
- from: val,
2757
- to: (_a = value === null || value === void 0 ? void 0 : value.to) !== null && _a !== void 0 ? _a : null,
2758
- });
2759
- break;
2760
- }
2761
- case "to": {
2762
- props.onValueChange({
2763
- from: (_b = value === null || value === void 0 ? void 0 : value.from) !== null && _b !== void 0 ? _b : null,
2764
- to: val,
2765
- });
2766
- break;
2767
- }
2768
- }
2769
- };
2770
- const renderFooter = () => {
2771
- const size = uuiCore.isMobile() ? '48' : '36';
2772
- const clearSelection = () => {
2773
- if (isInRangePredicate) {
2774
- props.onValueChange({ from: null, to: null });
2775
- }
2776
- else {
2777
- props.onValueChange(null);
2778
- }
2779
- };
2780
- const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
2781
- return (React__namespace.default.createElement(FlexRow, { padding: "12" },
2782
- React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
2783
- React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
2784
- React__namespace.default.createElement(LinkButton, { isDisabled: isClearDisabled, size: size, caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
2785
- };
2786
- if (isInRangePredicate) {
2787
- const value = props.value;
2788
- return (React__namespace.default.createElement("div", null,
2789
- React__namespace.default.createElement(FlexRow, { padding: "12", vPadding: "24", alignItems: "center", spacing: "12", borderBottom: true },
2790
- React__namespace.default.createElement(FlexCell, { width: '100%' },
2791
- React__namespace.default.createElement(NumericInput, { value: (_a = value === null || value === void 0 ? void 0 : value.from) !== null && _a !== void 0 ? _a : null, onValueChange: rangeValueHandler('from'), size: "30", placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
2792
- React__namespace.default.createElement(FlexCell, { width: '100%' },
2793
- React__namespace.default.createElement(NumericInput, { value: (_b = value === null || value === void 0 ? void 0 : value.to) !== null && _b !== void 0 ? _b : null, onValueChange: rangeValueHandler('to'), size: "30", placeholder: "Max", formatOptions: { maximumFractionDigits: 2 } }))),
2794
- renderFooter()));
2795
- }
2796
- return (React__namespace.default.createElement("div", null,
2797
- React__namespace.default.createElement(FlexRow, { padding: "12", vPadding: "24", alignItems: "center", borderBottom: true },
2798
- React__namespace.default.createElement(FlexCell, { width: 130 },
2799
- React__namespace.default.createElement(NumericInput, { value: typeof props.value === 'number' ? props.value : null, onValueChange: props.onValueChange, size: "30", placeholder: "Enter a number", formatOptions: { maximumFractionDigits: 2 } }))),
2800
- renderFooter()));
2801
- };
2802
-
2803
- const FilterItemBody = (props) => {
2804
- switch (props.type) {
2805
- case "singlePicker":
2806
- return (React__namespace.default.createElement(FilterPickerBody, Object.assign({}, props, { selectionMode: "single", valueType: "id" })));
2807
- case "numeric":
2808
- return (React__namespace.default.createElement(FilterNumericBody, Object.assign({}, props)));
2809
- case "multiPicker":
2810
- return (React__namespace.default.createElement(FilterPickerBody, Object.assign({}, props, { selectionMode: "multi", valueType: "id" })));
2811
- case "datePicker":
2812
- return (React__namespace.default.createElement(FilterDataPickerBody, Object.assign({}, props, { format: props.format || "DD/MM/YYYY" })));
2813
- case "rangeDatePicker":
2814
- return (React__namespace.default.createElement(FilterRangeDatePickerBody, Object.assign({}, props, { format: props.format || "DD/MM/YYYY", value: props.value || { from: null, to: null } })));
2815
- }
2747
+ const FilterNumericBody = (props) => {
2748
+ var _a, _b;
2749
+ const isInRangePredicate = (props === null || props === void 0 ? void 0 : props.selectedPredicate) === 'inRange' || (props === null || props === void 0 ? void 0 : props.selectedPredicate) === 'notInRange';
2750
+ const rangeValueHandler = (type) => (val) => {
2751
+ var _a, _b;
2752
+ const value = props.value;
2753
+ switch (type) {
2754
+ case "from": {
2755
+ props.onValueChange({
2756
+ from: val,
2757
+ to: (_a = value === null || value === void 0 ? void 0 : value.to) !== null && _a !== void 0 ? _a : null,
2758
+ });
2759
+ break;
2760
+ }
2761
+ case "to": {
2762
+ props.onValueChange({
2763
+ from: (_b = value === null || value === void 0 ? void 0 : value.from) !== null && _b !== void 0 ? _b : null,
2764
+ to: val,
2765
+ });
2766
+ break;
2767
+ }
2768
+ }
2769
+ };
2770
+ const renderFooter = () => {
2771
+ const size = uuiCore.isMobile() ? '48' : '36';
2772
+ const clearSelection = () => {
2773
+ if (isInRangePredicate) {
2774
+ props.onValueChange({ from: null, to: null });
2775
+ }
2776
+ else {
2777
+ props.onValueChange(null);
2778
+ }
2779
+ };
2780
+ const isClearDisabled = typeof props.value !== 'number' && typeof props.value !== 'object';
2781
+ return (React__namespace.default.createElement(FlexRow, { padding: "12" },
2782
+ React__namespace.default.createElement(uuiComponents.FlexSpacer, null),
2783
+ React__namespace.default.createElement(FlexCell, { width: "auto", alignSelf: "center" },
2784
+ React__namespace.default.createElement(LinkButton, { isDisabled: isClearDisabled, size: size, caption: i18n.pickerInput.clearSelectionButtonSingle, onClick: clearSelection }))));
2785
+ };
2786
+ if (isInRangePredicate) {
2787
+ const value = props.value;
2788
+ return (React__namespace.default.createElement("div", null,
2789
+ React__namespace.default.createElement(FlexRow, { padding: "12", vPadding: "24", alignItems: "center", spacing: "12", borderBottom: true },
2790
+ React__namespace.default.createElement(FlexCell, { width: '100%' },
2791
+ React__namespace.default.createElement(NumericInput, { value: (_a = value === null || value === void 0 ? void 0 : value.from) !== null && _a !== void 0 ? _a : null, onValueChange: rangeValueHandler('from'), size: "30", placeholder: "Min", formatOptions: { maximumFractionDigits: 2 } })),
2792
+ React__namespace.default.createElement(FlexCell, { width: '100%' },
2793
+ React__namespace.default.createElement(NumericInput, { value: (_b = value === null || value === void 0 ? void 0 : value.to) !== null && _b !== void 0 ? _b : null, onValueChange: rangeValueHandler('to'), size: "30", placeholder: "Max", formatOptions: { maximumFractionDigits: 2 } }))),
2794
+ renderFooter()));
2795
+ }
2796
+ return (React__namespace.default.createElement("div", null,
2797
+ React__namespace.default.createElement(FlexRow, { padding: "12", vPadding: "24", alignItems: "center", borderBottom: true },
2798
+ React__namespace.default.createElement(FlexCell, { width: 130 },
2799
+ React__namespace.default.createElement(NumericInput, { value: typeof props.value === 'number' ? props.value : null, onValueChange: props.onValueChange, size: "30", placeholder: "Enter a number", formatOptions: { maximumFractionDigits: 2 } }))),
2800
+ renderFooter()));
2801
+ };
2802
+
2803
+ const FilterItemBody = (props) => {
2804
+ switch (props.type) {
2805
+ case "singlePicker":
2806
+ return (React__namespace.default.createElement(FilterPickerBody, Object.assign({}, props, { selectionMode: "single", valueType: "id" })));
2807
+ case "numeric":
2808
+ return (React__namespace.default.createElement(FilterNumericBody, Object.assign({}, props)));
2809
+ case "multiPicker":
2810
+ return (React__namespace.default.createElement(FilterPickerBody, Object.assign({}, props, { selectionMode: "multi", valueType: "id" })));
2811
+ case "datePicker":
2812
+ return (React__namespace.default.createElement(FilterDataPickerBody, Object.assign({}, props, { format: props.format || "DD/MM/YYYY" })));
2813
+ case "rangeDatePicker":
2814
+ return (React__namespace.default.createElement(FilterRangeDatePickerBody, Object.assign({}, props, { format: props.format || "DD/MM/YYYY", value: props.value || { from: null, to: null } })));
2815
+ }
2816
2816
  };
2817
2817
 
2818
2818
  var _path$c;
@@ -2833,117 +2833,117 @@ var ForwardRef$d = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever12);
2833
2833
 
2834
2834
  var css$f = {"typography-header":"FiltersPanelItem_typography-header__cxbkP","typography-block":"FiltersPanelItem_typography-block__AI7VG","typography-inline":"FiltersPanelItem_typography-inline__j90GN","typography-16":"FiltersPanelItem_typography-16__h8TGe","typography-14":"FiltersPanelItem_typography-14__xFk8h","typography-12":"FiltersPanelItem_typography-12__5Pmwi","typography-promo":"FiltersPanelItem_typography-promo__-gtw7 FiltersPanelItem_typography-header__cxbkP FiltersPanelItem_typography-block__AI7VG FiltersPanelItem_typography-inline__j90GN","header":"FiltersPanelItem_header__1Ogc3","removeButton":"FiltersPanelItem_removeButton__ykSMB","typographyHeader":"FiltersPanelItem_typography-header__cxbkP","typographyBlock":"FiltersPanelItem_typography-block__AI7VG","typographyInline":"FiltersPanelItem_typography-inline__j90GN","typography16":"FiltersPanelItem_typography-16__h8TGe","typography14":"FiltersPanelItem_typography-14__xFk8h","typography12":"FiltersPanelItem_typography-12__5Pmwi","typographyPromo":"FiltersPanelItem_typography-promo__-gtw7 FiltersPanelItem_typography-header__cxbkP FiltersPanelItem_typography-block__AI7VG FiltersPanelItem_typography-inline__j90GN"};
2835
2835
 
2836
- const FiltersToolbarItemImpl = (props) => {
2837
- const getDefaultPredicate = () => {
2838
- var _a, _b;
2839
- if (!props.predicates) {
2840
- return null;
2841
- }
2842
- return Object.keys(props.value || {})[0] || ((_a = props.predicates.find(i => i.isDefault)) === null || _a === void 0 ? void 0 : _a.predicate) || ((_b = props.predicates) === null || _b === void 0 ? void 0 : _b[0].predicate);
2843
- };
2844
- const [isOpen, isOpenChange] = React.useState(props.autoFocus);
2845
- const [predicate, setPredicate] = React.useState(getDefaultPredicate());
2846
- const predicateName = React__namespace.default.useMemo(() => predicate && props.predicates.find(p => p.predicate === predicate).name, [predicate]);
2847
- const forceUpdate = uuiCore.useForceUpdate();
2848
- React.useEffect(() => {
2849
- if (props.predicates && Object.keys(props.value || {})[0] && Object.keys(props.value || {})[0] !== predicate) {
2850
- setPredicate(Object.keys(props.value || {})[0]);
2851
- }
2852
- }, [props.value]);
2853
- const onValueChange = React.useCallback((value) => {
2854
- if (props.predicates) {
2855
- props.onValueChange({ [props.field]: { [predicate]: value } });
2856
- }
2857
- else {
2858
- props.onValueChange({ [props.field]: value });
2859
- }
2860
- }, [props.field, props.onValueChange]);
2861
- const removeOnclickHandler = () => {
2862
- props.removeFilter(props.field);
2863
- };
2864
- const changePredicate = (val) => {
2865
- const isInRange = (p) => p === 'inRange' || p === 'notInRange';
2866
- if (props.type === 'numeric') {
2867
- let predicateValue = {
2868
- [props.field]: { [val]: getValue() },
2869
- };
2870
- if (isInRange(val) && !isInRange(predicate)) { // from simple predicate -> to Range
2871
- predicateValue = { [props.field]: { [val]: { from: null, to: null } } };
2872
- }
2873
- else if (!isInRange(val) && isInRange(predicate)) { // from Range -> to simple predicate
2874
- predicateValue = { [props.field]: { [val]: null } };
2875
- }
2876
- props.onValueChange(predicateValue);
2877
- }
2878
- else {
2879
- props.onValueChange({ [props.field]: { [val]: getValue() } });
2880
- }
2881
- setPredicate(val);
2882
- };
2883
- const renderHeader = () => (React__namespace.default.createElement("div", { className: cx__default.default(css$f.header) },
2884
- props.predicates ? React__namespace.default.createElement(MultiSwitch, { items: props.predicates.map(i => ({ id: i.predicate, caption: i.name })), value: predicate, onValueChange: changePredicate, size: "24" }) : React__namespace.default.createElement(Text, { color: "secondary", fontSize: "12" }, props.title),
2885
- !(props === null || props === void 0 ? void 0 : props.isAlwaysVisible) && (React__namespace.default.createElement(LinkButton, { cx: css$f.removeButton, caption: i18n.filterToolbar.datePicker.removeCaption, onClick: removeOnclickHandler, size: "24", icon: ForwardRef$d }))));
2886
- const renderBody = (dropdownProps) => (React__namespace.default.createElement(DropdownContainer, null,
2887
- React__namespace.default.createElement(Panel, null,
2888
- renderHeader(),
2889
- React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, dropdownProps, { selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })))));
2890
- const getValue = () => {
2891
- var _a;
2892
- return predicate ? (_a = props.value) === null || _a === void 0 ? void 0 : _a[predicate] : props.value;
2893
- };
2894
- const getTogglerValue = () => {
2895
- const currentValue = getValue();
2896
- const defaultFormat = "MMM DD, YYYY";
2897
- switch (props.type) {
2898
- case "multiPicker": {
2899
- const view = props.dataSource.getView({}, forceUpdate);
2900
- let postfix = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.length) > 2 ? ` +${(currentValue.length - 2).toString()} ${i18n.filterToolbar.pickerInput.itemsPlaceholder}` : null;
2901
- let isLoading = false;
2902
- const selection = currentValue ? currentValue === null || currentValue === void 0 ? void 0 : currentValue.slice(0, 2).map((i) => {
2903
- const item = view.getById(i, null);
2904
- isLoading = item.isLoading;
2905
- return item.isLoading ? React__namespace.default.createElement(TextPlaceholder, null) : (props.getName ? props.getName(item.value) : item.value.name);
2906
- }) : [i18n.filterToolbar.pickerInput.emptyValueCaption];
2907
- const selectionText = isLoading ? selection : selection.join(', ');
2908
- return { selection: selectionText, postfix };
2909
- }
2910
- case "numeric": {
2911
- const isRangePredicate = predicate === 'inRange' || predicate === 'notInRange';
2912
- const decimalFormat = (val) => uuiCore.getSeparatedValue(val, { maximumFractionDigits: 2 });
2913
- if ((isRangePredicate && !currentValue) || (!isRangePredicate && !currentValue && currentValue !== 0)) {
2914
- return { selection: i18n.filterToolbar.pickerInput.emptyValueCaption };
2915
- }
2916
- const selection = isRangePredicate
2917
- ? `${(!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) !== 0) ? 'Min' : decimalFormat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from)} - ${(!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) !== 0) ? 'Max' : decimalFormat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to)}`
2918
- : `${(!currentValue && currentValue !== 0) ? 'ALL' : decimalFormat(currentValue)}`;
2919
- return { selection };
2920
- }
2921
- case "singlePicker": {
2922
- const view = props.dataSource.getView({}, forceUpdate);
2923
- const item = (currentValue !== null && currentValue !== undefined) && view.getById(currentValue, null);
2924
- if (!item) {
2925
- return { selection: i18n.filterToolbar.pickerInput.emptyValueCaption };
2926
- }
2927
- const selection = item.isLoading ? React__namespace.default.createElement(TextPlaceholder, null) : (props.getName ? props.getName(item.value) : item.value.name);
2928
- return { selection };
2929
- }
2930
- case "datePicker": {
2931
- return { selection: currentValue ? dayjs__default.default(currentValue).format(props.format || defaultFormat) : i18n.filterToolbar.datePicker.placeholder };
2932
- }
2933
- case "rangeDatePicker": {
2934
- if (!currentValue || (!currentValue.from && !currentValue.to)) {
2935
- return { selection: i18n.filterToolbar.rangeDatePicker.emptyPickerPlaceholder };
2936
- }
2937
- const currentValueFrom = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) ? dayjs__default.default(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from).format(props.format || defaultFormat) : i18n.filterToolbar.rangeDatePicker.emptyPlaceholderFrom;
2938
- const currentValueTo = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) ? dayjs__default.default(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to).format(props.format || defaultFormat) : i18n.filterToolbar.rangeDatePicker.emptyPlaceholderTo;
2939
- const selection = `${currentValueFrom} - ${currentValueTo}`;
2940
- return { selection };
2941
- }
2942
- }
2943
- };
2944
- const renderTarget = (dropdownProps) => (React__namespace.default.createElement(FilterPanelItemToggler, Object.assign({}, dropdownProps, getTogglerValue(), { title: props.title, predicateName: props.value ? predicateName : null, maxWidth: (props.type === 'datePicker' || props.type === 'rangeDatePicker') ? null : '300' })));
2945
- return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: renderTarget, renderBody: renderBody, closeBodyOnTogglerHidden: !uuiCore.isMobile(), value: isOpen, onValueChange: isOpenChange, modifiers: [{ name: 'offset', options: { offset: [0, 6] } }] }));
2946
- };
2836
+ const FiltersToolbarItemImpl = (props) => {
2837
+ const getDefaultPredicate = () => {
2838
+ var _a, _b;
2839
+ if (!props.predicates) {
2840
+ return null;
2841
+ }
2842
+ return Object.keys(props.value || {})[0] || ((_a = props.predicates.find(i => i.isDefault)) === null || _a === void 0 ? void 0 : _a.predicate) || ((_b = props.predicates) === null || _b === void 0 ? void 0 : _b[0].predicate);
2843
+ };
2844
+ const [isOpen, isOpenChange] = React.useState(props.autoFocus);
2845
+ const [predicate, setPredicate] = React.useState(getDefaultPredicate());
2846
+ const predicateName = React__namespace.default.useMemo(() => predicate && props.predicates.find(p => p.predicate === predicate).name, [predicate]);
2847
+ const forceUpdate = uuiCore.useForceUpdate();
2848
+ React.useEffect(() => {
2849
+ if (props.predicates && Object.keys(props.value || {})[0] && Object.keys(props.value || {})[0] !== predicate) {
2850
+ setPredicate(Object.keys(props.value || {})[0]);
2851
+ }
2852
+ }, [props.value]);
2853
+ const onValueChange = React.useCallback((value) => {
2854
+ if (props.predicates) {
2855
+ props.onValueChange({ [props.field]: { [predicate]: value } });
2856
+ }
2857
+ else {
2858
+ props.onValueChange({ [props.field]: value });
2859
+ }
2860
+ }, [props.field, props.onValueChange]);
2861
+ const removeOnclickHandler = () => {
2862
+ props.removeFilter(props.field);
2863
+ };
2864
+ const changePredicate = (val) => {
2865
+ const isInRange = (p) => p === 'inRange' || p === 'notInRange';
2866
+ if (props.type === 'numeric') {
2867
+ let predicateValue = {
2868
+ [props.field]: { [val]: getValue() },
2869
+ };
2870
+ if (isInRange(val) && !isInRange(predicate)) { // from simple predicate -> to Range
2871
+ predicateValue = { [props.field]: { [val]: { from: null, to: null } } };
2872
+ }
2873
+ else if (!isInRange(val) && isInRange(predicate)) { // from Range -> to simple predicate
2874
+ predicateValue = { [props.field]: { [val]: null } };
2875
+ }
2876
+ props.onValueChange(predicateValue);
2877
+ }
2878
+ else {
2879
+ props.onValueChange({ [props.field]: { [val]: getValue() } });
2880
+ }
2881
+ setPredicate(val);
2882
+ };
2883
+ const renderHeader = () => (React__namespace.default.createElement("div", { className: cx__default.default(css$f.header) },
2884
+ props.predicates ? React__namespace.default.createElement(MultiSwitch, { items: props.predicates.map(i => ({ id: i.predicate, caption: i.name })), value: predicate, onValueChange: changePredicate, size: "24" }) : React__namespace.default.createElement(Text, { color: "secondary", fontSize: "12" }, props.title),
2885
+ !(props === null || props === void 0 ? void 0 : props.isAlwaysVisible) && (React__namespace.default.createElement(LinkButton, { cx: css$f.removeButton, caption: i18n.filterToolbar.datePicker.removeCaption, onClick: removeOnclickHandler, size: "24", icon: ForwardRef$d }))));
2886
+ const renderBody = (dropdownProps) => (React__namespace.default.createElement(DropdownContainer, null,
2887
+ React__namespace.default.createElement(Panel, null,
2888
+ renderHeader(),
2889
+ React__namespace.default.createElement(FilterItemBody, Object.assign({}, props, dropdownProps, { selectedPredicate: predicate, value: getValue(), onValueChange: onValueChange })))));
2890
+ const getValue = () => {
2891
+ var _a;
2892
+ return predicate ? (_a = props.value) === null || _a === void 0 ? void 0 : _a[predicate] : props.value;
2893
+ };
2894
+ const getTogglerValue = () => {
2895
+ const currentValue = getValue();
2896
+ const defaultFormat = "MMM DD, YYYY";
2897
+ switch (props.type) {
2898
+ case "multiPicker": {
2899
+ const view = props.dataSource.getView({}, forceUpdate);
2900
+ let postfix = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.length) > 2 ? ` +${(currentValue.length - 2).toString()} ${i18n.filterToolbar.pickerInput.itemsPlaceholder}` : null;
2901
+ let isLoading = false;
2902
+ const selection = currentValue ? currentValue === null || currentValue === void 0 ? void 0 : currentValue.slice(0, 2).map((i) => {
2903
+ const item = view.getById(i, null);
2904
+ isLoading = item.isLoading;
2905
+ return item.isLoading ? React__namespace.default.createElement(TextPlaceholder, null) : (props.getName ? props.getName(item.value) : item.value.name);
2906
+ }) : [i18n.filterToolbar.pickerInput.emptyValueCaption];
2907
+ const selectionText = isLoading ? selection : selection.join(', ');
2908
+ return { selection: selectionText, postfix };
2909
+ }
2910
+ case "numeric": {
2911
+ const isRangePredicate = predicate === 'inRange' || predicate === 'notInRange';
2912
+ const decimalFormat = (val) => uuiCore.getSeparatedValue(val, { maximumFractionDigits: 2 });
2913
+ if ((isRangePredicate && !currentValue) || (!isRangePredicate && !currentValue && currentValue !== 0)) {
2914
+ return { selection: i18n.filterToolbar.pickerInput.emptyValueCaption };
2915
+ }
2916
+ const selection = isRangePredicate
2917
+ ? `${(!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) !== 0) ? 'Min' : decimalFormat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from)} - ${(!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) !== 0) ? 'Max' : decimalFormat(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to)}`
2918
+ : `${(!currentValue && currentValue !== 0) ? 'ALL' : decimalFormat(currentValue)}`;
2919
+ return { selection };
2920
+ }
2921
+ case "singlePicker": {
2922
+ const view = props.dataSource.getView({}, forceUpdate);
2923
+ const item = (currentValue !== null && currentValue !== undefined) && view.getById(currentValue, null);
2924
+ if (!item) {
2925
+ return { selection: i18n.filterToolbar.pickerInput.emptyValueCaption };
2926
+ }
2927
+ const selection = item.isLoading ? React__namespace.default.createElement(TextPlaceholder, null) : (props.getName ? props.getName(item.value) : item.value.name);
2928
+ return { selection };
2929
+ }
2930
+ case "datePicker": {
2931
+ return { selection: currentValue ? dayjs__default.default(currentValue).format(props.format || defaultFormat) : i18n.filterToolbar.datePicker.placeholder };
2932
+ }
2933
+ case "rangeDatePicker": {
2934
+ if (!currentValue || (!currentValue.from && !currentValue.to)) {
2935
+ return { selection: i18n.filterToolbar.rangeDatePicker.emptyPickerPlaceholder };
2936
+ }
2937
+ const currentValueFrom = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.from) ? dayjs__default.default(currentValue === null || currentValue === void 0 ? void 0 : currentValue.from).format(props.format || defaultFormat) : i18n.filterToolbar.rangeDatePicker.emptyPlaceholderFrom;
2938
+ const currentValueTo = (currentValue === null || currentValue === void 0 ? void 0 : currentValue.to) ? dayjs__default.default(currentValue === null || currentValue === void 0 ? void 0 : currentValue.to).format(props.format || defaultFormat) : i18n.filterToolbar.rangeDatePicker.emptyPlaceholderTo;
2939
+ const selection = `${currentValueFrom} - ${currentValueTo}`;
2940
+ return { selection };
2941
+ }
2942
+ }
2943
+ };
2944
+ const renderTarget = (dropdownProps) => (React__namespace.default.createElement(FilterPanelItemToggler, Object.assign({}, dropdownProps, getTogglerValue(), { title: props.title, predicateName: props.value ? predicateName : null, maxWidth: (props.type === 'datePicker' || props.type === 'rangeDatePicker') ? null : '300' })));
2945
+ return (React__namespace.default.createElement(uuiComponents.Dropdown, { renderTarget: renderTarget, renderBody: renderBody, closeBodyOnTogglerHidden: !uuiCore.isMobile(), value: isOpen, onValueChange: isOpenChange, modifiers: [{ name: 'offset', options: { offset: [0, 6] } }] }));
2946
+ };
2947
2947
  const FiltersPanelItem = React__namespace.default.memo(FiltersToolbarItemImpl);
2948
2948
 
2949
2949
  var _path$b;
@@ -2961,112 +2961,112 @@ var SvgContentPlusBold18 = function SvgContentPlusBold18(props, ref) {
2961
2961
  };
2962
2962
  var ForwardRef$c = /*#__PURE__*/React.forwardRef(SvgContentPlusBold18);
2963
2963
 
2964
- const normalizeFilterWithPredicates = (filter) => {
2965
- if (!filter) {
2966
- return {};
2967
- }
2968
- const result = filter;
2969
- const keys = Object.keys(filter);
2970
- for (let n = 0; n < keys.length; n++) {
2971
- const key = keys[n];
2972
- const filterValue = filter[key];
2973
- if (filterValue && typeof filterValue === "object") {
2974
- if ('from' in filterValue && 'to' in filterValue) {
2975
- continue;
2976
- }
2977
- if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
2978
- delete filter[key];
2979
- }
2980
- if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
2981
- delete filter[key];
2982
- }
2983
- if ('inRange' in filterValue) {
2984
- if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
2985
- delete filter[key];
2986
- }
2987
- }
2988
- if ('notInRange' in filterValue) {
2989
- if (!filterValue.notInRange.from && !filterValue.notInRange.to) {
2990
- delete filter[key];
2991
- }
2992
- }
2993
- Object.keys(filterValue).forEach(predicate => {
2994
- if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
2995
- delete filter[key];
2996
- }
2997
- });
2998
- }
2999
- }
3000
- return result;
3001
- };
3002
- const FiltersToolbarImpl = (props) => {
3003
- const { filters, tableState, setTableState } = props;
3004
- const [newFilterId, setNewFilterId] = React.useState(null);
3005
- const dataSource = uuiCore.useArrayDataSource({
3006
- items: filters,
3007
- getId: item => item.field,
3008
- }, []);
3009
- const onFiltersChange = (filters) => {
3010
- var _a;
3011
- const newConfig = {};
3012
- const newFilter = {};
3013
- const sortedOrders = tableState.filtersConfig && sortBy__default.default(tableState.filtersConfig, f => f === null || f === void 0 ? void 0 : f.order);
3014
- let order = (sortedOrders === null || sortedOrders === void 0 ? void 0 : sortedOrders.length) ? (_a = sortedOrders[sortedOrders.length - 1]) === null || _a === void 0 ? void 0 : _a.order : null;
3015
- filters.forEach(filter => {
3016
- var _a, _b;
3017
- const newOrder = ((_b = (_a = tableState === null || tableState === void 0 ? void 0 : tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[filter === null || filter === void 0 ? void 0 : filter.field]) === null || _b === void 0 ? void 0 : _b.order) || uuiCore.getOrderBetween(order, null);
3018
- order = newOrder;
3019
- newConfig[filter.field] = { isVisible: true, order: newOrder };
3020
- // Remove unselected filters from filter object
3021
- if (tableState.filter) {
3022
- newFilter[filter.field] = tableState.filter[filter.field];
3023
- }
3024
- });
3025
- setTableState(Object.assign(Object.assign({}, tableState), { filtersConfig: newConfig, filter: newFilter }));
3026
- };
3027
- const handleFilterChange = (newFilter) => {
3028
- const filter = normalizeFilterWithPredicates(Object.assign(Object.assign({}, tableState.filter), newFilter));
3029
- setTableState(Object.assign(Object.assign({}, tableState), { filter: filter }));
3030
- };
3031
- const removeFilter = (field) => {
3032
- const filterConfig = Object.assign({}, tableState.filtersConfig);
3033
- delete filterConfig[field];
3034
- const filter = Object.assign({}, tableState.filter);
3035
- delete filter[field];
3036
- const newTableState = Object.assign(Object.assign({}, tableState), { filtersConfig: filterConfig, filter: filter });
3037
- setTableState(Object.assign({}, newTableState));
3038
- };
3039
- const selectedFilters = React.useMemo(() => {
3040
- const filtersConfig = tableState.filtersConfig || {};
3041
- return filters.filter(filter => {
3042
- return filter.isAlwaysVisible || (filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field] ? filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field].isVisible : false);
3043
- });
3044
- }, [tableState.filtersConfig, filters]);
3045
- const sortedActiveFilters = React.useMemo(() => {
3046
- return sortBy__default.default(selectedFilters, f => { var _a, _b; return (_b = (_a = tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[f.field]) === null || _b === void 0 ? void 0 : _b.order; });
3047
- }, [filters, tableState.filtersConfig]);
3048
- const renderAddFilterToggler = React.useCallback((props) => {
3049
- return React__namespace.default.createElement(Button, { size: "36", onClick: props.onClick, ref: props.ref, caption: i18n.filterToolbar.addCaption, icon: ForwardRef$c, iconPosition: "left", mode: "ghost", color: "primary" });
3050
- }, []);
3051
- const getRowOptions = React.useCallback((item) => ({
3052
- isDisabled: item.isAlwaysVisible,
3053
- checkbox: {
3054
- isVisible: true,
3055
- isDisabled: item.isAlwaysVisible,
3056
- },
3057
- }), []);
3058
- React.useEffect(() => {
3059
- // Reset new filter id, after first render with autofocus
3060
- setNewFilterId(null);
3061
- }, [newFilterId]);
3062
- return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
3063
- sortedActiveFilters.map(f => {
3064
- var _a;
3065
- return (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
3066
- React__namespace.default.createElement(FiltersPanelItem, Object.assign({}, f, { value: (_a = tableState.filter) === null || _a === void 0 ? void 0 : _a[f.field], onValueChange: handleFilterChange, key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter }))));
3067
- }),
3068
- React__namespace.default.createElement(PickerInput, { dataSource: dataSource, value: selectedFilters, onValueChange: onFiltersChange, selectionMode: "multi", valueType: "entity", key: newFilterId, renderRow: (props) => React__namespace.default.createElement(DataPickerRow, Object.assign({}, props, { padding: "12", key: props.key, onCheck: (row) => { props.onCheck(row); !row.isChecked && setNewFilterId(row.value.field); }, renderItem: (item, rowProps) => React__namespace.default.createElement(PickerItem, Object.assign({}, rowProps, { title: item.title })) })), getName: i => i.title, renderToggler: renderAddFilterToggler, emptyValue: [], getRowOptions: getRowOptions, fixedBodyPosition: true })));
3069
- };
2964
+ const normalizeFilterWithPredicates = (filter) => {
2965
+ if (!filter) {
2966
+ return {};
2967
+ }
2968
+ const result = filter;
2969
+ const keys = Object.keys(filter);
2970
+ for (let n = 0; n < keys.length; n++) {
2971
+ const key = keys[n];
2972
+ const filterValue = filter[key];
2973
+ if (filterValue && typeof filterValue === "object") {
2974
+ if ('from' in filterValue && 'to' in filterValue) {
2975
+ continue;
2976
+ }
2977
+ if ('in' in filterValue && (!Array.isArray(filterValue.in) || !filterValue.in.length)) {
2978
+ delete filter[key];
2979
+ }
2980
+ if ('nin' in filterValue && (!Array.isArray(filterValue.nin) || !filterValue.nin.length)) {
2981
+ delete filter[key];
2982
+ }
2983
+ if ('inRange' in filterValue) {
2984
+ if (!filterValue.inRange || (!filterValue.inRange.from && !filterValue.inRange.to)) {
2985
+ delete filter[key];
2986
+ }
2987
+ }
2988
+ if ('notInRange' in filterValue) {
2989
+ if (!filterValue.notInRange.from && !filterValue.notInRange.to) {
2990
+ delete filter[key];
2991
+ }
2992
+ }
2993
+ Object.keys(filterValue).forEach(predicate => {
2994
+ if (filterValue[predicate] === null || filterValue[predicate] === undefined) {
2995
+ delete filter[key];
2996
+ }
2997
+ });
2998
+ }
2999
+ }
3000
+ return result;
3001
+ };
3002
+ const FiltersToolbarImpl = (props) => {
3003
+ const { filters, tableState, setTableState } = props;
3004
+ const [newFilterId, setNewFilterId] = React.useState(null);
3005
+ const dataSource = uuiCore.useArrayDataSource({
3006
+ items: filters,
3007
+ getId: item => item.field,
3008
+ }, []);
3009
+ const onFiltersChange = (filters) => {
3010
+ var _a;
3011
+ const newConfig = {};
3012
+ const newFilter = {};
3013
+ const sortedOrders = tableState.filtersConfig && sortBy__default.default(tableState.filtersConfig, f => f === null || f === void 0 ? void 0 : f.order);
3014
+ let order = (sortedOrders === null || sortedOrders === void 0 ? void 0 : sortedOrders.length) ? (_a = sortedOrders[sortedOrders.length - 1]) === null || _a === void 0 ? void 0 : _a.order : null;
3015
+ filters.forEach(filter => {
3016
+ var _a, _b;
3017
+ const newOrder = ((_b = (_a = tableState === null || tableState === void 0 ? void 0 : tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[filter === null || filter === void 0 ? void 0 : filter.field]) === null || _b === void 0 ? void 0 : _b.order) || uuiCore.getOrderBetween(order, null);
3018
+ order = newOrder;
3019
+ newConfig[filter.field] = { isVisible: true, order: newOrder };
3020
+ // Remove unselected filters from filter object
3021
+ if (tableState.filter) {
3022
+ newFilter[filter.field] = tableState.filter[filter.field];
3023
+ }
3024
+ });
3025
+ setTableState(Object.assign(Object.assign({}, tableState), { filtersConfig: newConfig, filter: newFilter }));
3026
+ };
3027
+ const handleFilterChange = (newFilter) => {
3028
+ const filter = normalizeFilterWithPredicates(Object.assign(Object.assign({}, tableState.filter), newFilter));
3029
+ setTableState(Object.assign(Object.assign({}, tableState), { filter: filter }));
3030
+ };
3031
+ const removeFilter = (field) => {
3032
+ const filterConfig = Object.assign({}, tableState.filtersConfig);
3033
+ delete filterConfig[field];
3034
+ const filter = Object.assign({}, tableState.filter);
3035
+ delete filter[field];
3036
+ const newTableState = Object.assign(Object.assign({}, tableState), { filtersConfig: filterConfig, filter: filter });
3037
+ setTableState(Object.assign({}, newTableState));
3038
+ };
3039
+ const selectedFilters = React.useMemo(() => {
3040
+ const filtersConfig = tableState.filtersConfig || {};
3041
+ return filters.filter(filter => {
3042
+ return filter.isAlwaysVisible || (filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field] ? filtersConfig[filter === null || filter === void 0 ? void 0 : filter.field].isVisible : false);
3043
+ });
3044
+ }, [tableState.filtersConfig, filters]);
3045
+ const sortedActiveFilters = React.useMemo(() => {
3046
+ return sortBy__default.default(selectedFilters, f => { var _a, _b; return (_b = (_a = tableState.filtersConfig) === null || _a === void 0 ? void 0 : _a[f.field]) === null || _b === void 0 ? void 0 : _b.order; });
3047
+ }, [filters, tableState.filtersConfig]);
3048
+ const renderAddFilterToggler = React.useCallback((props) => {
3049
+ return React__namespace.default.createElement(Button, { size: "36", onClick: props.onClick, ref: props.ref, caption: i18n.filterToolbar.addCaption, icon: ForwardRef$c, iconPosition: "left", mode: "ghost", color: "primary" });
3050
+ }, []);
3051
+ const getRowOptions = React.useCallback((item) => ({
3052
+ isDisabled: item.isAlwaysVisible,
3053
+ checkbox: {
3054
+ isVisible: true,
3055
+ isDisabled: item.isAlwaysVisible,
3056
+ },
3057
+ }), []);
3058
+ React.useEffect(() => {
3059
+ // Reset new filter id, after first render with autofocus
3060
+ setNewFilterId(null);
3061
+ }, [newFilterId]);
3062
+ return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
3063
+ sortedActiveFilters.map(f => {
3064
+ var _a;
3065
+ return (React__namespace.default.createElement(uuiComponents.FlexCell, { width: "auto", key: f.field },
3066
+ React__namespace.default.createElement(FiltersPanelItem, Object.assign({}, f, { value: (_a = tableState.filter) === null || _a === void 0 ? void 0 : _a[f.field], onValueChange: handleFilterChange, key: f.field, autoFocus: newFilterId === f.field, removeFilter: removeFilter }))));
3067
+ }),
3068
+ React__namespace.default.createElement(PickerInput, { dataSource: dataSource, value: selectedFilters, onValueChange: onFiltersChange, selectionMode: "multi", valueType: "entity", key: newFilterId, renderRow: (props) => React__namespace.default.createElement(DataPickerRow, Object.assign({}, props, { padding: "12", key: props.key, onCheck: (row) => { props.onCheck(row); !row.isChecked && setNewFilterId(row.value.field); }, renderItem: (item, rowProps) => React__namespace.default.createElement(PickerItem, Object.assign({}, rowProps, { title: item.title })) })), getName: i => i.title, renderToggler: renderAddFilterToggler, emptyValue: [], getRowOptions: getRowOptions, fixedBodyPosition: true })));
3069
+ };
3070
3070
  const FiltersPanel = React__namespace.default.memo(FiltersToolbarImpl);
3071
3071
 
3072
3072
  var css$e = {"divider":"PresetsPanel_divider__jIY7S","dropdownDeleteIcon":"PresetsPanel_dropdownDeleteIcon__58Nc7","presetsWrapper":"PresetsPanel_presetsWrapper__ssv3J","addPresetContainer":"PresetsPanel_addPresetContainer__SLcW-"};
@@ -3173,177 +3173,177 @@ var SvgActionDeleteforever18 = function SvgActionDeleteforever18(props, ref) {
3173
3173
  };
3174
3174
  var ForwardRef$6 = /*#__PURE__*/React.forwardRef(SvgActionDeleteforever18);
3175
3175
 
3176
- const PresetActionsDropdown = (props) => {
3177
- const { uuiNotifications } = uuiCore.useUuiContext();
3178
- const copyUrlToClipboard = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
3179
- yield navigator.clipboard.writeText(props.getPresetLink(props.preset));
3180
- successNotificationHandler('Link copied!');
3181
- }), []);
3182
- const saveInCurrent = React.useCallback((preset) => __awaiter(void 0, void 0, void 0, function* () {
3183
- const newPreset = Object.assign(Object.assign({}, preset), { filter: props.tableState.filter, sorting: props.tableState.sorting, columnsConfig: props.tableState.columnsConfig, filtersConfig: props.tableState.filtersConfig, viewState: props.tableState.viewState });
3184
- yield props.updatePreset(newPreset);
3185
- successNotificationHandler('Changes saved!');
3186
- }), [props.tableState.filter, props.tableState.columnsConfig, props.tableState.filtersConfig]);
3187
- const successNotificationHandler = React.useCallback((text) => {
3188
- uuiNotifications.show((props) => (React__namespace.default.createElement(SuccessNotification, Object.assign({}, props),
3189
- React__namespace.default.createElement(Text, { size: "36", font: "regular", fontSize: "14" }, text))), { duration: 3 }).catch(() => null);
3190
- }, []);
3191
- const saveInCurrentHandler = React.useCallback(() => {
3192
- saveInCurrent(props.preset);
3193
- }, [props.preset]);
3194
- const discardAllChangesHandler = React.useCallback(() => {
3195
- props.choosePreset(props.preset);
3196
- }, [props.preset]);
3197
- const duplicateHandler = React.useCallback(() => {
3198
- props.duplicatePreset(props.preset);
3199
- }, [props.preset]);
3200
- const deleteHandler = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
3201
- yield props.deletePreset(props.preset);
3202
- }), [props.activePresetId, props.deletePreset, props.preset]);
3203
- const renderBody = () => {
3204
- const isReadonlyPreset = props.preset.isReadonly;
3205
- return (React__namespace.default.createElement(Panel, { shadow: true, cx: css$d.presetDropdownPanel },
3206
- (props.activePresetId === props.preset.id && props.hasPresetChanged(props.preset)) &&
3207
- React__namespace.default.createElement(React__namespace.default.Fragment, null,
3208
- !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-in-current` },
3209
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$l, caption: "Save in current", onClick: saveInCurrentHandler })),
3210
- React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-as-new` },
3211
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$b, caption: "Save as new", onClick: props.addPreset })),
3212
- React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-discard`, borderBottom: true },
3213
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$a, caption: "Discard all changes", onClick: discardAllChangesHandler }))),
3214
- props.preset.id === props.activePresetId && !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-rename` },
3215
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$8, caption: "Rename", onClick: props.renamePreset })),
3216
- React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-duplicate` },
3217
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$9, caption: "Duplicate", onClick: duplicateHandler })),
3218
- React__namespace.default.createElement(FlexRow, { borderBottom: true, key: `${props.preset.id}-copyLink` },
3219
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$7, caption: "Copy Link", onClick: copyUrlToClipboard })),
3220
- !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-delete`, cx: css$d.deleteRow },
3221
- React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$6, caption: "Delete", cx: css$d.deleteButton, onClick: deleteHandler }))));
3222
- };
3223
- const renderTarget = React.useCallback((dropdownProps) => {
3224
- return (React__namespace.default.createElement(IconButton, Object.assign({ cx: dropdownProps.isOpen && css$d.targetOpen, color: props.preset.id === props.activePresetId ? 'info' : 'default' }, dropdownProps, { icon: ForwardRef$m })));
3225
- }, []);
3226
- return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
3227
- React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", modifiers: [{ name: 'offset', options: { offset: [0, 22] } }] })));
3176
+ const PresetActionsDropdown = (props) => {
3177
+ const { uuiNotifications } = uuiCore.useUuiContext();
3178
+ const copyUrlToClipboard = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
3179
+ yield navigator.clipboard.writeText(props.getPresetLink(props.preset));
3180
+ successNotificationHandler('Link copied!');
3181
+ }), []);
3182
+ const saveInCurrent = React.useCallback((preset) => __awaiter(void 0, void 0, void 0, function* () {
3183
+ const newPreset = Object.assign(Object.assign({}, preset), { filter: props.tableState.filter, sorting: props.tableState.sorting, columnsConfig: props.tableState.columnsConfig, filtersConfig: props.tableState.filtersConfig, viewState: props.tableState.viewState });
3184
+ yield props.updatePreset(newPreset);
3185
+ successNotificationHandler('Changes saved!');
3186
+ }), [props.tableState.filter, props.tableState.columnsConfig, props.tableState.filtersConfig]);
3187
+ const successNotificationHandler = React.useCallback((text) => {
3188
+ uuiNotifications.show((props) => (React__namespace.default.createElement(SuccessNotification, Object.assign({}, props),
3189
+ React__namespace.default.createElement(Text, { size: "36", font: "regular", fontSize: "14" }, text))), { duration: 3 }).catch(() => null);
3190
+ }, []);
3191
+ const saveInCurrentHandler = React.useCallback(() => {
3192
+ saveInCurrent(props.preset);
3193
+ }, [props.preset]);
3194
+ const discardAllChangesHandler = React.useCallback(() => {
3195
+ props.choosePreset(props.preset);
3196
+ }, [props.preset]);
3197
+ const duplicateHandler = React.useCallback(() => {
3198
+ props.duplicatePreset(props.preset);
3199
+ }, [props.preset]);
3200
+ const deleteHandler = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
3201
+ yield props.deletePreset(props.preset);
3202
+ }), [props.activePresetId, props.deletePreset, props.preset]);
3203
+ const renderBody = () => {
3204
+ const isReadonlyPreset = props.preset.isReadonly;
3205
+ return (React__namespace.default.createElement(Panel, { shadow: true, cx: css$d.presetDropdownPanel },
3206
+ (props.activePresetId === props.preset.id && props.hasPresetChanged(props.preset)) &&
3207
+ React__namespace.default.createElement(React__namespace.default.Fragment, null,
3208
+ !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-in-current` },
3209
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$l, caption: "Save in current", onClick: saveInCurrentHandler })),
3210
+ React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-save-as-new` },
3211
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$b, caption: "Save as new", onClick: props.addPreset })),
3212
+ React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-discard`, borderBottom: true },
3213
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$a, caption: "Discard all changes", onClick: discardAllChangesHandler }))),
3214
+ props.preset.id === props.activePresetId && !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-rename` },
3215
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$8, caption: "Rename", onClick: props.renamePreset })),
3216
+ React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-duplicate` },
3217
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$9, caption: "Duplicate", onClick: duplicateHandler })),
3218
+ React__namespace.default.createElement(FlexRow, { borderBottom: true, key: `${props.preset.id}-copyLink` },
3219
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$7, caption: "Copy Link", onClick: copyUrlToClipboard })),
3220
+ !isReadonlyPreset && React__namespace.default.createElement(FlexRow, { key: `${props.preset.id}-delete`, cx: css$d.deleteRow },
3221
+ React__namespace.default.createElement(DropdownMenuButton, { icon: ForwardRef$6, caption: "Delete", cx: css$d.deleteButton, onClick: deleteHandler }))));
3222
+ };
3223
+ const renderTarget = React.useCallback((dropdownProps) => {
3224
+ return (React__namespace.default.createElement(IconButton, Object.assign({ cx: dropdownProps.isOpen && css$d.targetOpen, color: props.preset.id === props.activePresetId ? 'info' : 'default' }, dropdownProps, { icon: ForwardRef$m })));
3225
+ }, []);
3226
+ return (React__namespace.default.createElement(React__namespace.default.Fragment, null,
3227
+ React__namespace.default.createElement(Dropdown, { renderBody: renderBody, renderTarget: renderTarget, placement: "bottom-end", modifiers: [{ name: 'offset', options: { offset: [0, 22] } }] })));
3228
3228
  };
3229
3229
 
3230
3230
  var css$c = {"preset-input-cell":"PresetInput_preset-input-cell__PInCC","preset-input":"PresetInput_preset-input__vBBRA","presetInputCell":"PresetInput_preset-input-cell__PInCC","presetInput":"PresetInput_preset-input__vBBRA"};
3231
3231
 
3232
- const PresetInput = (props) => {
3233
- var _a;
3234
- const [presetCaption, setPresetCaption] = React.useState(((_a = props.preset) === null || _a === void 0 ? void 0 : _a.name) || '');
3235
- const cancelActionHandler = React.useCallback(() => {
3236
- setPresetCaption('');
3237
- props.onCancel();
3238
- }, [props.onCancel]);
3239
- const acceptActionHandler = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
3240
- if (presetCaption) {
3241
- yield props.onSuccess(presetCaption);
3242
- }
3243
- props.onCancel();
3244
- }), [presetCaption]);
3245
- const newPresetOnBlurHandler = React.useCallback(() => {
3246
- if (presetCaption.length) {
3247
- return;
3248
- }
3249
- props.onCancel();
3250
- }, [presetCaption.length, props.onCancel]);
3251
- return (React__namespace.default.createElement(FlexCell, { cx: css$c.presetInputCell, minWidth: 180 },
3252
- React__namespace.default.createElement(TextInput, { cx: css$c.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true })));
3232
+ const PresetInput = (props) => {
3233
+ var _a;
3234
+ const [presetCaption, setPresetCaption] = React.useState(((_a = props.preset) === null || _a === void 0 ? void 0 : _a.name) || '');
3235
+ const cancelActionHandler = React.useCallback(() => {
3236
+ setPresetCaption('');
3237
+ props.onCancel();
3238
+ }, [props.onCancel]);
3239
+ const acceptActionHandler = React.useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
3240
+ if (presetCaption) {
3241
+ yield props.onSuccess(presetCaption);
3242
+ }
3243
+ props.onCancel();
3244
+ }), [presetCaption]);
3245
+ const newPresetOnBlurHandler = React.useCallback(() => {
3246
+ if (presetCaption.length) {
3247
+ return;
3248
+ }
3249
+ props.onCancel();
3250
+ }, [presetCaption.length, props.onCancel]);
3251
+ return (React__namespace.default.createElement(FlexCell, { cx: css$c.presetInputCell, minWidth: 180 },
3252
+ React__namespace.default.createElement(TextInput, { cx: css$c.presetInput, onValueChange: setPresetCaption, value: presetCaption, onCancel: cancelActionHandler, onAccept: acceptActionHandler, onBlur: newPresetOnBlurHandler, autoFocus: true })));
3253
3253
  };
3254
3254
 
3255
3255
  var css$b = {"preset":"Preset_preset__aitu-","activePreset":"Preset_activePreset__SFqmD"};
3256
3256
 
3257
- const Preset = (props) => {
3258
- const [isRenamePreset, setIsRenamePreset] = React.useState(false);
3259
- const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
3260
- const cancelRenamePreset = React.useCallback(() => {
3261
- setIsRenamePreset(() => false);
3262
- }, []);
3263
- const setPresetForRename = React.useCallback(() => {
3264
- if (!isRenamePreset) {
3265
- setIsRenamePreset(() => true);
3266
- }
3267
- }, []);
3268
- const handlePresetRename = React.useCallback((name) => {
3269
- const newPreset = Object.assign(Object.assign({}, props.preset), { name: name });
3270
- return props.updatePreset(newPreset);
3271
- }, [props.preset]);
3272
- const isPresetActive = props.activePresetId === props.preset.id;
3273
- return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: 'center', width: 'auto' }, isRenamePreset
3274
- ? React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })
3275
- :
3276
- React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$b.preset, isPresetActive && css$b.activePreset], size: "60", withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: () => React__namespace.default.createElement(PresetActionsDropdown, Object.assign({ renamePreset: setPresetForRename }, props)), iconPosition: "right", isLinkActive: isPresetActive })));
3277
- };
3278
-
3279
- const PresetsPanel = (props) => {
3280
- const [isAddingPreset, setIsAddingPreset] = React.useState(false);
3281
- const setAddingPreset = React.useCallback(() => {
3282
- setIsAddingPreset(true);
3283
- }, []);
3284
- const cancelAddingPreset = React.useCallback(() => {
3285
- setIsAddingPreset(false);
3286
- }, []);
3287
- const presetApi = __rest(props, ["presets"]);
3288
- const renderPreset = (preset) => {
3289
- return (React__namespace.default.createElement(Preset, Object.assign({ key: preset.id, preset: preset, addPreset: setAddingPreset }, presetApi)));
3290
- };
3291
- const renderAddPresetButton = React.useCallback(() => {
3292
- return (React__namespace.default.createElement("div", { key: 'addingPresetBlock', className: css$e.addPresetContainer }, !isAddingPreset ? React__namespace.default.createElement(Button, { size: "36", onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: ForwardRef$c, iconPosition: "left", mode: "ghost", color: "primary" }) :
3293
- React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset })));
3294
- }, [isAddingPreset]);
3295
- const onPresetDropdownSelect = (preset) => {
3296
- props.choosePreset(preset.preset);
3297
- props.updatePreset(preset.preset);
3298
- };
3299
- const renderMoreButtonDropdown = (item, hiddenItems) => {
3300
- return (React__namespace.default.createElement(Dropdown, { renderTarget: (props) => React__namespace.default.createElement(FlexRow, null,
3301
- React__namespace.default.createElement("div", { className: css$e.divider }),
3302
- React__namespace.default.createElement(Button, Object.assign({ mode: "ghost", color: 'secondary', caption: `${(hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.length) || ''} more` }, props))), renderBody: () => React__namespace.default.createElement(DropdownContainer, { width: 230 }, hiddenItems.map(item => React__namespace.default.createElement(DropdownMenuButton, { onClick: () => onPresetDropdownSelect(item), caption: item.preset.name, icon: !item.preset.isReadonly && ForwardRef$6, iconPosition: 'right', cx: css$e.dropdownDeleteIcon, onIconClick: !item.preset.isReadonly && (() => props.deletePreset(item.preset)) }))) }));
3303
- };
3304
- const getPresetPriority = (preset, index) => {
3305
- return preset.id === props.activePresetId ? 100499 : 1000 - index;
3306
- };
3307
- const getPanelItems = () => {
3308
- return [
3309
- ...sortBy__default.default(props.presets, (i) => i.order).map((preset, index) => ({ id: preset.id.toString(), render: () => renderPreset(preset), priority: getPresetPriority(preset, index), preset: preset })),
3310
- { id: 'collapsedContainer', render: renderMoreButtonDropdown,
3311
- priority: 100501, collapsedContainer: true,
3312
- },
3313
- { id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
3314
- ];
3315
- };
3316
- return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310 },
3317
- React__namespace.default.createElement(FlexRow, { size: null, spacing: '12', cx: css$e.presetsWrapper },
3318
- React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
3319
- };
3320
-
3321
- const defaultPredicates = {
3322
- numeric: [
3323
- { predicate: 'eq', name: '=', isDefault: true },
3324
- { predicate: 'neq', name: '≠' },
3325
- { predicate: 'lte', name: '≤' },
3326
- { predicate: 'gte', name: '≥' },
3327
- { predicate: 'inRange', name: 'In Range' },
3328
- ],
3329
- multiPicker: [
3330
- { predicate: 'in', name: 'is', isDefault: true },
3331
- { predicate: 'nin', name: 'is not' },
3332
- ],
3333
- rangeDatePicker: [
3334
- { predicate: 'inRange', name: 'In Range', isDefault: true },
3335
- { predicate: 'notInRange', name: 'Not in Range' },
3336
- ],
3257
+ const Preset = (props) => {
3258
+ const [isRenamePreset, setIsRenamePreset] = React.useState(false);
3259
+ const choosePresetHandler = React.useCallback(() => props.choosePreset(props.preset), [props]);
3260
+ const cancelRenamePreset = React.useCallback(() => {
3261
+ setIsRenamePreset(() => false);
3262
+ }, []);
3263
+ const setPresetForRename = React.useCallback(() => {
3264
+ if (!isRenamePreset) {
3265
+ setIsRenamePreset(() => true);
3266
+ }
3267
+ }, []);
3268
+ const handlePresetRename = React.useCallback((name) => {
3269
+ const newPreset = Object.assign(Object.assign({}, props.preset), { name: name });
3270
+ return props.updatePreset(newPreset);
3271
+ }, [props.preset]);
3272
+ const isPresetActive = props.activePresetId === props.preset.id;
3273
+ return (React__namespace.default.createElement(FlexCell, { key: props.preset.id, alignSelf: 'center', width: 'auto' }, isRenamePreset
3274
+ ? React__namespace.default.createElement(PresetInput, { onCancel: cancelRenamePreset, onSuccess: handlePresetRename, preset: props.preset })
3275
+ :
3276
+ React__namespace.default.createElement(TabButton, { caption: props.preset.name, onClick: !isPresetActive && choosePresetHandler, cx: [css$b.preset, isPresetActive && css$b.activePreset], size: "60", withNotify: isPresetActive && props.hasPresetChanged(props.preset), icon: () => React__namespace.default.createElement(PresetActionsDropdown, Object.assign({ renamePreset: setPresetForRename }, props)), iconPosition: "right", isLinkActive: isPresetActive })));
3277
+ };
3278
+
3279
+ const PresetsPanel = (props) => {
3280
+ const [isAddingPreset, setIsAddingPreset] = React.useState(false);
3281
+ const setAddingPreset = React.useCallback(() => {
3282
+ setIsAddingPreset(true);
3283
+ }, []);
3284
+ const cancelAddingPreset = React.useCallback(() => {
3285
+ setIsAddingPreset(false);
3286
+ }, []);
3287
+ const presetApi = __rest(props, ["presets"]);
3288
+ const renderPreset = (preset) => {
3289
+ return (React__namespace.default.createElement(Preset, Object.assign({ key: preset.id, preset: preset, addPreset: setAddingPreset }, presetApi)));
3290
+ };
3291
+ const renderAddPresetButton = React.useCallback(() => {
3292
+ return (React__namespace.default.createElement("div", { key: 'addingPresetBlock', className: css$e.addPresetContainer }, !isAddingPreset ? React__namespace.default.createElement(Button, { size: "36", onClick: setAddingPreset, caption: i18n.presetPanel.addCaption, icon: ForwardRef$c, iconPosition: "left", mode: "ghost", color: "primary" }) :
3293
+ React__namespace.default.createElement(PresetInput, { onCancel: cancelAddingPreset, onSuccess: props.createNewPreset })));
3294
+ }, [isAddingPreset]);
3295
+ const onPresetDropdownSelect = (preset) => {
3296
+ props.choosePreset(preset.preset);
3297
+ props.updatePreset(preset.preset);
3298
+ };
3299
+ const renderMoreButtonDropdown = (item, hiddenItems) => {
3300
+ return (React__namespace.default.createElement(Dropdown, { renderTarget: (props) => React__namespace.default.createElement(FlexRow, null,
3301
+ React__namespace.default.createElement("div", { className: css$e.divider }),
3302
+ React__namespace.default.createElement(Button, Object.assign({ mode: "ghost", color: 'secondary', caption: `${(hiddenItems === null || hiddenItems === void 0 ? void 0 : hiddenItems.length) || ''} more` }, props))), renderBody: () => React__namespace.default.createElement(DropdownContainer, { width: 230 }, hiddenItems.map(item => React__namespace.default.createElement(DropdownMenuButton, { onClick: () => onPresetDropdownSelect(item), caption: item.preset.name, icon: !item.preset.isReadonly && ForwardRef$6, iconPosition: 'right', cx: css$e.dropdownDeleteIcon, onIconClick: !item.preset.isReadonly && (() => props.deletePreset(item.preset)) }))) }));
3303
+ };
3304
+ const getPresetPriority = (preset, index) => {
3305
+ return preset.id === props.activePresetId ? 100499 : 1000 - index;
3306
+ };
3307
+ const getPanelItems = () => {
3308
+ return [
3309
+ ...sortBy__default.default(props.presets, (i) => i.order).map((preset, index) => ({ id: preset.id.toString(), render: () => renderPreset(preset), priority: getPresetPriority(preset, index), preset: preset })),
3310
+ { id: 'collapsedContainer', render: renderMoreButtonDropdown,
3311
+ priority: 100501, collapsedContainer: true,
3312
+ },
3313
+ { id: 'addPreset', render: renderAddPresetButton, priority: 100501 },
3314
+ ];
3315
+ };
3316
+ return (React__namespace.default.createElement(FlexCell, { grow: 1, minWidth: 310 },
3317
+ React__namespace.default.createElement(FlexRow, { size: null, spacing: '12', cx: css$e.presetsWrapper },
3318
+ React__namespace.default.createElement(uuiComponents.AdaptivePanel, { items: getPanelItems() }))));
3319
+ };
3320
+
3321
+ const defaultPredicates = {
3322
+ numeric: [
3323
+ { predicate: 'eq', name: '=', isDefault: true },
3324
+ { predicate: 'neq', name: '≠' },
3325
+ { predicate: 'lte', name: '≤' },
3326
+ { predicate: 'gte', name: '≥' },
3327
+ { predicate: 'inRange', name: 'In Range' },
3328
+ ],
3329
+ multiPicker: [
3330
+ { predicate: 'in', name: 'is', isDefault: true },
3331
+ { predicate: 'nin', name: 'is not' },
3332
+ ],
3333
+ rangeDatePicker: [
3334
+ { predicate: 'inRange', name: 'In Range', isDefault: true },
3335
+ { predicate: 'notInRange', name: 'Not in Range' },
3336
+ ],
3337
3337
  };
3338
3338
 
3339
3339
  var css$a = {"root":"MainMenu_root__39Kfw"};
3340
3340
 
3341
- function applyMainMenuMods() {
3342
- return [css$a.root];
3343
- }
3344
- const MainMenu = uuiCore.withMods(uuiComponents.MainMenu, applyMainMenuMods, () => ({
3345
- Burger,
3346
- MainMenuDropdown,
3341
+ function applyMainMenuMods() {
3342
+ return [css$a.root];
3343
+ }
3344
+ const MainMenu = uuiCore.withMods(uuiComponents.MainMenu, applyMainMenuMods, () => ({
3345
+ Burger,
3346
+ MainMenuDropdown,
3347
3347
  }));
3348
3348
 
3349
3349
  var _path$4;
@@ -3364,7 +3364,7 @@ var ForwardRef$5 = /*#__PURE__*/React.forwardRef(SvgGlobalMenu);
3364
3364
 
3365
3365
  var css$9 = {"global-menu-btn":"GlobalMenu_global-menu-btn__QdXAw","globalMenuIcon":"GlobalMenu_globalMenuIcon__62mij","globalMenuBtn":"GlobalMenu_global-menu-btn__QdXAw"};
3366
3366
 
3367
- const GlobalMenu = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ ref: ref, id: 'global_menu_toggle', className: cx__default.default(css$9.globalMenuBtn, props.cx) }, props.rawProps),
3367
+ const GlobalMenu = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({ ref: ref, id: 'global_menu_toggle', className: cx__default.default(css$9.globalMenuBtn, props.cx) }, props.rawProps),
3368
3368
  React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$5, cx: css$9.globalMenuIcon }))));
3369
3369
 
3370
3370
  var css$8 = {"root":"Burger_root__euW9D","burger-content":"Burger_burger-content__4ssSJ","burgerContent":"Burger_burger-content__4ssSJ"};
@@ -3399,13 +3399,13 @@ var SvgBurgerClose = function SvgBurgerClose(props, ref) {
3399
3399
  };
3400
3400
  var ForwardRef$3 = /*#__PURE__*/React.forwardRef(SvgBurgerClose);
3401
3401
 
3402
- function applyBurgerMods() {
3403
- return [css$8.root];
3404
- }
3405
- const Burger = uuiCore.withMods(uuiComponents.Burger, applyBurgerMods, () => ({
3406
- burgerIcon: ForwardRef$4,
3407
- crossIcon: ForwardRef$3,
3408
- burgerContentCx: css$8.burgerContent,
3402
+ function applyBurgerMods() {
3403
+ return [css$8.root];
3404
+ }
3405
+ const Burger = uuiCore.withMods(uuiComponents.Burger, applyBurgerMods, () => ({
3406
+ burgerIcon: ForwardRef$4,
3407
+ crossIcon: ForwardRef$3,
3408
+ burgerContentCx: css$8.burgerContent,
3409
3409
  }));
3410
3410
 
3411
3411
  var _g, _path$1;
@@ -3436,12 +3436,12 @@ var ForwardRef$2 = /*#__PURE__*/React.forwardRef(SvgTriangle);
3436
3436
 
3437
3437
  var css$7 = {"typography-header":"BurgerButton_typography-header__U1Ojg","typography-block":"BurgerButton_typography-block__-fzNQ","typography-inline":"BurgerButton_typography-inline__Q7e9n","typography-16":"BurgerButton_typography-16__yCkJk","typography-14":"BurgerButton_typography-14__Oe153","typography-12":"BurgerButton_typography-12__Lfcud","typography-promo":"BurgerButton_typography-promo__4LGMX BurgerButton_typography-header__U1Ojg BurgerButton_typography-block__-fzNQ BurgerButton_typography-inline__Q7e9n","root":"BurgerButton_root__FLwMS","button-primary":"BurgerButton_button-primary__CJHtP","button-secondary":"BurgerButton_button-secondary__6Aa0H","hasIcon":"BurgerButton_hasIcon__-Hrg6","dropdown":"BurgerButton_dropdown__TUqjg","typographyHeader":"BurgerButton_typography-header__U1Ojg","typographyBlock":"BurgerButton_typography-block__-fzNQ","typographyInline":"BurgerButton_typography-inline__Q7e9n","typography16":"BurgerButton_typography-16__yCkJk","typography14":"BurgerButton_typography-14__Oe153","typography12":"BurgerButton_typography-12__Lfcud","typographyPromo":"BurgerButton_typography-promo__4LGMX BurgerButton_typography-header__U1Ojg BurgerButton_typography-block__-fzNQ BurgerButton_typography-inline__Q7e9n","buttonPrimary":"BurgerButton_button-primary__CJHtP","buttonSecondary":"BurgerButton_button-secondary__6Aa0H"};
3438
3438
 
3439
- const BurgerButton = uuiCore.withMods(uuiComponents.Button, props => [
3440
- css$7.root,
3441
- css$7['button-' + (props.type || 'primary')],
3442
- css$7['indent-' + (props.indentLevel || 0)],
3443
- props.isDropdown && css$7.dropdown,
3444
- props.icon && css$7.hasIcon,
3439
+ const BurgerButton = uuiCore.withMods(uuiComponents.Button, props => [
3440
+ css$7.root,
3441
+ css$7['button-' + (props.type || 'primary')],
3442
+ css$7['indent-' + (props.indentLevel || 0)],
3443
+ props.isDropdown && css$7.dropdown,
3444
+ props.icon && css$7.hasIcon,
3445
3445
  ], () => ({ dropdownIcon: ForwardRef$2, dropdownIconPosition: 'left', role: 'menuitem' }));
3446
3446
 
3447
3447
  function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
@@ -3496,25 +3496,25 @@ const BurgerSearch = (props) => (React__namespace.createElement(uuiComponents.Te
3496
3496
 
3497
3497
  var css$5 = {"group-header":"BurgerGroupHeader_group-header__3i4ay","group-name":"BurgerGroupHeader_group-name__szcRq","line":"BurgerGroupHeader_line__oAhHd","groupHeader":"BurgerGroupHeader_group-header__3i4ay","groupName":"BurgerGroupHeader_group-name__szcRq"};
3498
3498
 
3499
- const BurgerGroupHeader = (props) => {
3500
- return (React__namespace.createElement("div", { className: css$5.groupHeader },
3501
- React__namespace.createElement("hr", { className: css$5.line }),
3502
- React__namespace.createElement("span", { className: css$5.groupName }, props.caption)));
3499
+ const BurgerGroupHeader = (props) => {
3500
+ return (React__namespace.createElement("div", { className: css$5.groupHeader },
3501
+ React__namespace.createElement("hr", { className: css$5.line }),
3502
+ React__namespace.createElement("span", { className: css$5.groupName }, props.caption)));
3503
3503
  };
3504
3504
 
3505
3505
  var css$4 = {"container":"MainMenuAvatar_container__vT8rb","dropdown":"MainMenuAvatar_dropdown__ezcds","open":"MainMenuAvatar_open__S2acz"};
3506
3506
 
3507
- const MainMenuAvatar = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", { ref: ref, className: cx__default.default(css$4.container, props.isDropdown && css$4.dropdown, props.isOpen && css$4.open, props.cx), onClick: props.onClick },
3508
- React__namespace.createElement(uuiComponents.Avatar, { size: '36', img: props.avatarUrl }),
3509
- props.icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon }),
3510
- props.isDropdown && (React__namespace.createElement("div", null,
3507
+ const MainMenuAvatar = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", { ref: ref, className: cx__default.default(css$4.container, props.isDropdown && css$4.dropdown, props.isOpen && css$4.open, props.cx), onClick: props.onClick },
3508
+ React__namespace.createElement(uuiComponents.Avatar, { size: '36', img: props.avatarUrl }),
3509
+ props.icon && React__namespace.createElement(uuiComponents.IconContainer, { icon: props.icon }),
3510
+ props.isDropdown && (React__namespace.createElement("div", null,
3511
3511
  React__namespace.createElement(uuiComponents.IconContainer, { icon: ForwardRef$Y, flipY: props.isOpen }))))));
3512
3512
 
3513
3513
  var css$3 = {"search-input":"MainMenuSearch_search-input__xTdYX","searchInput":"MainMenuSearch_search-input__xTdYX"};
3514
3514
 
3515
- const MainMenuSearch = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: iEditable => {
3516
- var _a;
3517
- return React__namespace.createElement(uuiComponents.TextInput, Object.assign({ iconPosition: 'left', icon: ForwardRef$S, cancelIcon: ((_a = props.value) === null || _a === void 0 ? void 0 : _a.length) > 0 && ForwardRef$1 }, props, iEditable, { ref: ref, cx: uuiCore.cx(css$3.searchInput, props.cx) }, props.rawProps));
3515
+ const MainMenuSearch = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(uuiCore.IEditableDebouncer, Object.assign({}, props, { render: iEditable => {
3516
+ var _a;
3517
+ return React__namespace.createElement(uuiComponents.TextInput, Object.assign({ iconPosition: 'left', icon: ForwardRef$S, cancelIcon: ((_a = props.value) === null || _a === void 0 ? void 0 : _a.length) > 0 && ForwardRef$1 }, props, iEditable, { ref: ref, cx: uuiCore.cx(css$3.searchInput, props.cx) }, props.rawProps));
3518
3518
  } }))));
3519
3519
 
3520
3520
  var css$2 = {"container":"MainMenuIcon_container__s-83v"};
@@ -3541,71 +3541,71 @@ var SvgChevronDown24 = function SvgChevronDown24(props, ref) {
3541
3541
  };
3542
3542
  var ForwardRef = /*#__PURE__*/React.forwardRef(SvgChevronDown24);
3543
3543
 
3544
- const MainMenuButton = uuiCore.withMods(uuiComponents.Button, mods => [
3545
- css.root,
3546
- css['type-' + (mods.type || 'primary')],
3544
+ const MainMenuButton = uuiCore.withMods(uuiComponents.Button, mods => [
3545
+ css.root,
3546
+ css['type-' + (mods.type || 'primary')],
3547
3547
  ], () => ({ dropdownIcon: ForwardRef, role: 'menuitem' }));
3548
3548
 
3549
- class MainMenuDropdown extends React__namespace.Component {
3550
- render() {
3551
- return (React__namespace.createElement(uuiComponents.Dropdown, { renderTarget: props => (React__namespace.createElement(MainMenuButton, Object.assign({ caption: this.props.caption }, props, { rawProps: this.props.rawProps, isLinkActive: this.props.isLinkActive, isDropdown: true }))), renderBody: props => (React__namespace.createElement("div", { className: cx__default.default(css$1.dropdownBody) }, React__namespace.Children.map(this.props.children, item => {
3552
- if (!item)
3553
- return item;
3554
- return React__namespace.createElement(item.type, Object.assign(Object.assign({}, item.props), { onClick: item.props.onClick ? () => {
3555
- item.props.onClick();
3556
- props.onClose();
3557
- } : null }));
3558
- }))), placement: "bottom-start" }));
3559
- }
3549
+ class MainMenuDropdown extends React__namespace.Component {
3550
+ render() {
3551
+ return (React__namespace.createElement(uuiComponents.Dropdown, { renderTarget: props => (React__namespace.createElement(MainMenuButton, Object.assign({ caption: this.props.caption }, props, { rawProps: this.props.rawProps, isLinkActive: this.props.isLinkActive, isDropdown: true }))), renderBody: props => (React__namespace.createElement("div", { className: cx__default.default(css$1.dropdownBody) }, React__namespace.Children.map(this.props.children, item => {
3552
+ if (!item)
3553
+ return item;
3554
+ return React__namespace.createElement(item.type, Object.assign(Object.assign({}, item.props), { onClick: item.props.onClick ? () => {
3555
+ item.props.onClick();
3556
+ props.onClose();
3557
+ } : null }));
3558
+ }))), placement: "bottom-start" }));
3559
+ }
3560
3560
  }
3561
3561
 
3562
- class ConfirmationModal extends React__namespace.Component {
3563
- render() {
3564
- let bodyContent;
3565
- if (this.props.bodyContent) {
3566
- bodyContent = React__namespace.createElement(Panel, { margin: '24' }, this.props.bodyContent);
3567
- }
3568
- return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
3569
- React__namespace.createElement(ModalWindow, { width: 420 },
3570
- React__namespace.createElement(ModalHeader, { borderBottom: true, title: this.props.caption, onClose: () => this.props.abort() }),
3571
- React__namespace.createElement(ScrollBars, null, bodyContent),
3572
- React__namespace.createElement(ModalFooter, null,
3573
- React__namespace.createElement(FlexSpacer, null),
3574
- this.props.hideCancelButton || React__namespace.createElement(Button, { caption: i18n.form.modals.discardButton, onClick: () => this.props.success(false), mode: 'outline', color: 'secondary' }),
3575
- React__namespace.createElement(Button, { caption: i18n.form.modals.saveButton, onClick: () => this.props.success(true), color: 'accent' })))));
3576
- }
3562
+ class ConfirmationModal extends React__namespace.Component {
3563
+ render() {
3564
+ let bodyContent;
3565
+ if (this.props.bodyContent) {
3566
+ bodyContent = React__namespace.createElement(Panel, { margin: '24' }, this.props.bodyContent);
3567
+ }
3568
+ return (React__namespace.createElement(ModalBlocker, Object.assign({}, this.props),
3569
+ React__namespace.createElement(ModalWindow, { width: 420 },
3570
+ React__namespace.createElement(ModalHeader, { borderBottom: true, title: this.props.caption, onClose: () => this.props.abort() }),
3571
+ React__namespace.createElement(ScrollBars, null, bodyContent),
3572
+ React__namespace.createElement(ModalFooter, null,
3573
+ React__namespace.createElement(FlexSpacer, null),
3574
+ this.props.hideCancelButton || React__namespace.createElement(Button, { caption: i18n.form.modals.discardButton, onClick: () => this.props.success(false), mode: 'outline', color: 'secondary' }),
3575
+ React__namespace.createElement(Button, { caption: i18n.form.modals.saveButton, onClick: () => this.props.success(true), color: 'accent' })))));
3576
+ }
3577
3577
  }
3578
3578
 
3579
- function Form(props) {
3580
- const context = uuiCore.useUuiContext();
3581
- const beforeLeave = () => {
3582
- return context.uuiModals.show(modalProps => React__namespace.createElement(ConfirmationModal, Object.assign({ caption: i18n.form.modals.beforeLeaveMessage }, modalProps)));
3583
- };
3584
- const loadUnsavedChanges = () => {
3585
- return context.uuiNotifications.show((props) => React__namespace.createElement(WarningNotification, Object.assign({}, props, { actions: [{
3586
- name: i18n.form.notifications.actionButtonCaption,
3587
- action: props.onSuccess,
3588
- }] }),
3589
- React__namespace.createElement(RichTextView, null,
3590
- React__namespace.createElement(Text, { size: "36" }, i18n.form.notifications.unsavedChangesMessage))), { duration: 5, position: 'bot-left' }).catch(() => null);
3591
- };
3592
- return (React__namespace.createElement(uuiCore.Form, Object.assign({ loadUnsavedChanges: loadUnsavedChanges, beforeLeave: beforeLeave }, props)));
3579
+ function Form(props) {
3580
+ const context = uuiCore.useUuiContext();
3581
+ const beforeLeave = () => {
3582
+ return context.uuiModals.show(modalProps => React__namespace.createElement(ConfirmationModal, Object.assign({ caption: i18n.form.modals.beforeLeaveMessage }, modalProps)));
3583
+ };
3584
+ const loadUnsavedChanges = () => {
3585
+ return context.uuiNotifications.show((props) => React__namespace.createElement(WarningNotification, Object.assign({}, props, { actions: [{
3586
+ name: i18n.form.notifications.actionButtonCaption,
3587
+ action: props.onSuccess,
3588
+ }] }),
3589
+ React__namespace.createElement(RichTextView, null,
3590
+ React__namespace.createElement(Text, { size: "36" }, i18n.form.notifications.unsavedChangesMessage))), { duration: 5, position: 'bot-left' }).catch(() => null);
3591
+ };
3592
+ return (React__namespace.createElement(uuiCore.Form, Object.assign({ loadUnsavedChanges: loadUnsavedChanges, beforeLeave: beforeLeave }, props)));
3593
3593
  }
3594
3594
 
3595
- function useForm(props) {
3596
- const context = uuiCore.useUuiContext();
3597
- const beforeLeave = () => {
3598
- return context.uuiModals.show(modalProps => (React__namespace.default.createElement(ConfirmationModal, Object.assign({ caption: i18n.form.modals.beforeLeaveMessage }, modalProps))));
3599
- };
3600
- const loadUnsavedChanges = () => {
3601
- return context.uuiNotifications.show((props) => React__namespace.default.createElement(WarningNotification, Object.assign({}, props, { actions: [{
3602
- name: i18n.form.notifications.actionButtonCaption,
3603
- action: props.onSuccess,
3604
- }] }),
3605
- React__namespace.default.createElement(RichTextView, null,
3606
- React__namespace.default.createElement(Text, { size: "36" }, i18n.form.notifications.unsavedChangesMessage))), { duration: 5, position: 'bot-left' }).catch(() => null);
3607
- };
3608
- return uuiCore.useForm(Object.assign({ beforeLeave, loadUnsavedChanges }, props));
3595
+ function useForm(props) {
3596
+ const context = uuiCore.useUuiContext();
3597
+ const beforeLeave = () => {
3598
+ return context.uuiModals.show(modalProps => (React__namespace.default.createElement(ConfirmationModal, Object.assign({ caption: i18n.form.modals.beforeLeaveMessage }, modalProps))));
3599
+ };
3600
+ const loadUnsavedChanges = () => {
3601
+ return context.uuiNotifications.show((props) => React__namespace.default.createElement(WarningNotification, Object.assign({}, props, { actions: [{
3602
+ name: i18n.form.notifications.actionButtonCaption,
3603
+ action: props.onSuccess,
3604
+ }] }),
3605
+ React__namespace.default.createElement(RichTextView, null,
3606
+ React__namespace.default.createElement(Text, { size: "36" }, i18n.form.notifications.unsavedChangesMessage))), { duration: 5, position: 'bot-left' }).catch(() => null);
3607
+ };
3608
+ return uuiCore.useForm(Object.assign({ beforeLeave, loadUnsavedChanges }, props));
3609
3609
  }
3610
3610
 
3611
3611
  Object.defineProperty(exports, 'IconContainer', {