@qualtrics/ui-react 2.23.1-alpha.2 → 2.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -1
- package/dist/__shared/cjs/{index-da3cbfe3.js → index-4645fe11.js} +314 -309
- package/dist/__shared/cjs/{index-d609f942.js → index-f36fbcf7.js} +4 -4
- package/dist/components/Accordion/Accordion2.js +4 -4
- package/dist/components/Banner/Banner.css.ts.vanilla.js +1 -1
- package/dist/components/Button/Button.js +4 -4
- package/dist/components/ButtonGroup/ButtonGroup2.js +4 -4
- package/dist/components/Checkbox/Check.js +1 -1
- package/dist/components/Checkbox/Checkbox2.js +4 -4
- package/dist/components/Checkbox/VisualCheckbox.js +2 -2
- package/dist/components/Checkbox/VisualCheckbox2.js +4 -4
- package/dist/components/ColorPicker/ColorPicker2.js +4 -4
- package/dist/components/Combobox/Combobox2.js +4 -4
- package/dist/components/ConfigPane/ConfigPane2.js +4 -4
- package/dist/components/Divider/Divider2.js +4 -4
- package/dist/components/Dropdown/Dropdown2.js +4 -4
- package/dist/components/Dropdown/DropdownButton.js +2 -1
- package/dist/components/FilePicker/FilePicker2.js +4 -4
- package/dist/components/FormField/Caption.js +4 -4
- package/dist/components/FormField/FormField2.js +4 -4
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +4 -4
- package/dist/components/IconButton/IconButton.js +3 -3
- package/dist/components/IconButton/IconButton2.js +5 -5
- package/dist/components/InlineInput/InlineInput2.js +4 -4
- package/dist/components/Input/Input2.js +4 -4
- package/dist/components/InputGroup/InputGroup2.js +4 -4
- package/dist/components/Label/Label2.js +4 -4
- package/dist/components/Link/Link2.js +4 -4
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +4 -4
- package/dist/components/LogicEditor/ConditionContainer.js +4 -1
- package/dist/components/LogicEditor/LogicEditor2.js +4 -4
- package/dist/components/Modal/Modal2.js +4 -4
- package/dist/components/NewMenu/NewMenu.js +4 -4
- package/dist/components/NumberStepper/NumberStepper2.js +4 -4
- package/dist/components/PageLayout/PageLayout.js +4 -4
- package/dist/components/Pagination/Pagination2.js +4 -4
- package/dist/components/Popover/Popover2.js +4 -4
- package/dist/components/QuickSearch/QuickSearch2.js +4 -4
- package/dist/components/Radio/Radio2.js +4 -4
- package/dist/components/SearchInput/SearchInput2.js +4 -4
- package/dist/components/SidebarNav/SidebarNav2.js +4 -4
- package/dist/components/Slider/Slider2.js +4 -4
- package/dist/components/Switch/Switch2.js +4 -4
- package/dist/components/Table/Table2.js +4 -4
- package/dist/components/Tabs/Tabs2.js +4 -4
- package/dist/components/Tooltip/Tooltip2.js +4 -4
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +4 -4
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +4 -4
- package/dist/components/deprecated_Tabs/Tabs2.js +4 -4
- package/dist/components/deprecated_Toolbar/Toolbar2.js +4 -4
- package/dist/hooks/useOverlay/useOverlay2.js +4 -4
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +4 -4
- package/dist/icons/Icon.js +4 -4
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +43 -50
- package/dist/next/AdvancedTable/AdvancedTable2.js +4 -4
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +21 -27
- package/dist/next/AdvancedTable/AdvancedTableRow.js +1 -3
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +10 -15
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +4 -4
- package/dist/next/Combobox/Combobox2.js +4 -4
- package/dist/next/Drawer/Drawer2.js +4 -4
- package/dist/next/FilterAnchor/FilterAnchor2.js +4 -4
- package/dist/next/Input/Input2.js +4 -4
- package/dist/next/Menu/Menu2.js +4 -4
- package/dist/next/Menu/usePaneSearch.js +9 -7
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +4 -4
- package/dist/next/SplitButton/SplitButton2.js +4 -4
- package/dist/next/TimePicker/TimePicker2.js +4 -4
- package/dist/next/ToggleButton/styles.js +4 -4
- package/dist/next/index.js +123 -143
- package/dist/utils/Flyout/Flyout2.js +4 -4
- package/dist/utils/Popper/Popper2.js +1 -1
- package/next/package.json +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"tooltip":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._Z6fj-{position:absolute;z-index:2000;max-width:240px;padding:8px 16px;color:#fff;text-align:center;text-decoration:none;background-color:#222;border-radius:4px;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);font-size:14px;opacity:0;pointer-events:none;overflow-wrap:break-word;border:1px solid #898989}._Z6fj-._1G1l-{color:#32363a;background-color:#fff}._KEuUI{opacity:1;pointer-events:all}._vR-pl,._vR-pl>div{position:absolute;width:8px;height:8px;background:inherit}._vR-pl{visibility:hidden;z-index:2000}._vR-pl>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._vR-pl{bottom:-4px}[data-popper-placement^=top]>._vR-pl>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._vR-pl{left:-5px}[data-popper-placement^=right]>._vR-pl>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._vR-pl{top:-5px}[data-popper-placement^=bottom]>._vR-pl>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._vR-pl{right:-4px}[data-popper-placement^=left]>._vR-pl>div{border-bottom-color:transparent;border-left-color:transparent}._Aiheu{position:absolute}[data-popper-placement^=top]>._Aiheu{bottom:-13px;left:0;width:100%;height:17px}[data-popper-placement^=right]>._Aiheu{top:0;left:-13px;width:17px;height:100%}[data-popper-placement^=bottom]>._Aiheu{top:-13px;left:0;width:100%;height:17px}[data-popper-placement^=left]>._Aiheu{top:0;right:-13px;width:17px;height:100%}";
|
|
4
|
+
var styles = {"tooltip":"_Z6fj-","lightTheme":"_1G1l-","visible":"_KEuUI","arrow":"_vR-pl","offsetBackplate":"_Aiheu"};
|
|
5
|
+
var stylesheet="._Z6fj-{position:absolute;z-index:2000;max-width:240px;padding:8px 16px;color:#fff;text-align:center;text-decoration:none;background-color:#222;border-radius:4px;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);font-size:14px;opacity:0;pointer-events:none;overflow-wrap:break-word;border:1px solid #898989}._Z6fj-._1G1l-{color:#32363a;background-color:#fff}._KEuUI{opacity:1;pointer-events:all}._vR-pl,._vR-pl>div{position:absolute;width:8px;height:8px;background:inherit}._vR-pl{visibility:hidden;z-index:2000}._vR-pl>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._vR-pl{bottom:-4px}[data-popper-placement^=top]>._vR-pl>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._vR-pl{left:-5px}[data-popper-placement^=right]>._vR-pl>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._vR-pl{top:-5px}[data-popper-placement^=bottom]>._vR-pl>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._vR-pl{right:-4px}[data-popper-placement^=left]>._vR-pl>div{border-bottom-color:transparent;border-left-color:transparent}._Aiheu{position:absolute}[data-popper-placement^=top]>._Aiheu{bottom:-13px;left:0;width:100%;height:17px}[data-popper-placement^=right]>._Aiheu{top:0;left:-13px;width:17px;height:100%}[data-popper-placement^=bottom]>._Aiheu{top:-13px;left:0;width:100%;height:17px}[data-popper-placement^=left]>._Aiheu{top:0;right:-13px;width:17px;height:100%}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"colorPickerBtnColor":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._U8n4-{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._F6BeZ{margin-right:-12px;margin-left:4px}._srXEb{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._R8eqv{margin:8px 8px 0;display:flex}._l3x89,._oTE3c{margin-left:4px}._9dHXv{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._Wb2uF{margin:0 4px 4px 0}._Wb2uF:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._Omh0P{margin:4px 8px 8px}._fzEqC{position:relative;width:96px;height:96px;outline:0}._fzEqC.focus-visible ._Kwcnk,._fzEqC:focus-visible ._Kwcnk{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._g9KNq{background:linear-gradient(90deg,#fff,transparent)}._D7J4W,._g9KNq{position:absolute;top:0;right:0;bottom:0;left:0}._D7J4W{background:linear-gradient(0deg,#000,transparent)}._Kwcnk{position:absolute;border:2px solid #fff;border-radius:5px;height:8px;width:8px;margin:0 0 -4px -4px;box-shadow:0 0 1px 1px rgba(0,0,0,.4),inset 0 0 1px #000}._CDAyG{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}._CDAyG.focus-visible ._7onMR,._CDAyG:focus-visible ._7onMR{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._7onMR{width:16px;height:4px;background:#fff;border-radius:50%;position:absolute;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._qR0AG{position:relative;width:16px;height:96px}._-9dXu{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._7ZE2s,._-9dXu{position:absolute}._7ZE2s{top:0;right:0;bottom:0;left:0;outline:0}._7ZE2s.focus-visible ._-9dXu,._7ZE2s:focus-visible ._-9dXu{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._jqEcW{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#d9dadb 25%,transparent 0),linear-gradient(-45deg,#d9dadb 25%,transparent 0),linear-gradient(45deg,transparent 75%,#d9dadb 0),linear-gradient(-45deg,transparent 75%,#d9dadb 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}._ayKfi{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._ayKfi.focus-visible,._ayKfi:focus-visible{outline:none}._ayKfi.focus-visible,._ayKfi:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._E4QfQ{display:flex}._E4QfQ ._vjlV8{position:relative;flex-shrink:0;width:26px;height:26px}._E4QfQ ._7993t{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._E4QfQ ._M6r-v{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
4
|
+
var styles = {"colorPickerBtnColor":"_U8n4-","colorPickerBtnIcon":"_F6BeZ","colorPicker":"_srXEb","colorPickerSliderContainer":"_R8eqv","colorPickerHue":"_l3x89","colorPickerAlpha":"_oTE3c","colorPickerSwatches":"_9dHXv","colorPickerSwatch":"_Wb2uF","colorPickerHex":"_Omh0P","saturation":"_fzEqC","saturationCircle":"_Kwcnk","saturationWhite":"_g9KNq","saturationBlack":"_D7J4W","hue":"_CDAyG","hueSlider":"_7onMR","alpha":"_qR0AG","alphaSlider":"_-9dXu","alphaGradient":"_7ZE2s","alphaCheckerboard":"_jqEcW","swatch":"_ayKfi","hex":"_E4QfQ","hexSwatch":"_vjlV8","hexSwatchColor":"_7993t","hexInput":"_M6r-v"};
|
|
5
|
+
var stylesheet="._U8n4-{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._F6BeZ{margin-right:-12px;margin-left:4px}._srXEb{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._R8eqv{margin:8px 8px 0;display:flex}._l3x89,._oTE3c{margin-left:4px}._9dHXv{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._Wb2uF{margin:0 4px 4px 0}._Wb2uF:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._Omh0P{margin:4px 8px 8px}._fzEqC{position:relative;width:96px;height:96px;outline:0}._fzEqC.focus-visible ._Kwcnk,._fzEqC:focus-visible ._Kwcnk{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._g9KNq{background:linear-gradient(90deg,#fff,transparent)}._D7J4W,._g9KNq{position:absolute;top:0;right:0;bottom:0;left:0}._D7J4W{background:linear-gradient(0deg,#000,transparent)}._Kwcnk{position:absolute;border:2px solid #fff;border-radius:5px;height:8px;width:8px;margin:0 0 -4px -4px;box-shadow:0 0 1px 1px rgba(0,0,0,.4),inset 0 0 1px #000}._CDAyG{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}._CDAyG.focus-visible ._7onMR,._CDAyG:focus-visible ._7onMR{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._7onMR{width:16px;height:4px;background:#fff;border-radius:50%;position:absolute;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._qR0AG{position:relative;width:16px;height:96px}._-9dXu{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._7ZE2s,._-9dXu{position:absolute}._7ZE2s{top:0;right:0;bottom:0;left:0;outline:0}._7ZE2s.focus-visible ._-9dXu,._7ZE2s:focus-visible ._-9dXu{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._jqEcW{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#d9dadb 25%,transparent 0),linear-gradient(-45deg,#d9dadb 25%,transparent 0),linear-gradient(45deg,transparent 75%,#d9dadb 0),linear-gradient(-45deg,transparent 75%,#d9dadb 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}._ayKfi{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._ayKfi.focus-visible,._ayKfi:focus-visible{outline:none}._ayKfi.focus-visible,._ayKfi:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._E4QfQ{display:flex}._E4QfQ ._vjlV8{position:relative;flex-shrink:0;width:26px;height:26px}._E4QfQ ._7993t{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._E4QfQ ._M6r-v{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"numberStepperContainer":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._mDVNU{display:inline-flex}._fbirV{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._fbirV:hover:not(._xZ85f){cursor:pointer;background:#f5f5f5}._fbirV._8xGec{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._fbirV._xZ85f{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._fbirV._xZ85f>svg{opacity:.4}._fbirV::-webkit-inner-spin-button,._fbirV::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._fbirV:focus{z-index:0;border:none;border-radius:4px}._fbirV:focus:not(._8xGec){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._bn1S8,._fbirV:focus:not(._xZ85f){background:#fafafa}._bn1S8{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._bn1S8:hover:not(._xZ85f){cursor:pointer;background:#f5f5f5}._bn1S8:active:not(._xZ85f){background:#e5e5e5}._bn1S8._xZ85f{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._bn1S8._xZ85f>svg{opacity:.4}._mR32-{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._mR32-:hover:not(._xZ85f){cursor:pointer;background:#f5f5f5}._mR32-:active:not(._xZ85f){background:#e5e5e5}._mR32-._xZ85f{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._mR32-._xZ85f>svg{opacity:.4}._dDOR6{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_mDVNU","numberStepperInput":"_fbirV","disabled":"_xZ85f","invalid":"_8xGec","decrementBtn":"_bn1S8","incrementBtn":"_mR32-","inputValueAlert":"_dDOR6"};
|
|
5
|
+
var stylesheet="._mDVNU{display:inline-flex}._fbirV{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._fbirV:hover:not(._xZ85f){cursor:pointer;background:#f5f5f5}._fbirV._8xGec{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._fbirV._xZ85f{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._fbirV._xZ85f>svg{opacity:.4}._fbirV::-webkit-inner-spin-button,._fbirV::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._fbirV:focus{z-index:0;border:none;border-radius:4px}._fbirV:focus:not(._8xGec){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._bn1S8,._fbirV:focus:not(._xZ85f){background:#fafafa}._bn1S8{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._bn1S8:hover:not(._xZ85f){cursor:pointer;background:#f5f5f5}._bn1S8:active:not(._xZ85f){background:#e5e5e5}._bn1S8._xZ85f{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._bn1S8._xZ85f>svg{opacity:.4}._mR32-{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._mR32-:hover:not(._xZ85f){cursor:pointer;background:#f5f5f5}._mR32-:active:not(._xZ85f){background:#e5e5e5}._mR32-._xZ85f{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._mR32-._xZ85f>svg{opacity:.4}._dDOR6{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"tabs":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._McRaN{display:block}._Vp9TV{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._iA3IC{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._iA3IC:hover{color:#32363a}._iA3IC:focus{outline:none}._iA3IC._f5y7q{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._Nnayb{padding-top:32px}._Nnayb._G6rEK{display:none}._iA3IC.focus-visible,._iA3IC:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_McRaN","bar":"_Vp9TV","tab":"_iA3IC","active":"_f5y7q","panel":"_Nnayb","inactive":"_G6rEK"};
|
|
5
|
+
var stylesheet="._McRaN{display:block}._Vp9TV{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._iA3IC{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._iA3IC:hover{color:#32363a}._iA3IC:focus{outline:none}._iA3IC._f5y7q{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._Nnayb{padding-top:32px}._Nnayb._G6rEK{display:none}._iA3IC.focus-visible,._iA3IC:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"toolbar":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._bamM0,._yFdnR{display:flex}._bamM0{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._tuMPw{width:69px;min-width:auto;max-width:none}._SSRCX{width:100%}._x8hsN{margin-bottom:12px;background-color:transparent!important}._x8hsN:hover{background-color:rgba(11,110,208,.08)!important}._x8hsN:hover>svg{fill:#085caf}._x8hsN:hover>span{color:#085caf}._x8hsN:active{background-color:rgba(11,110,208,.12)!important}._x8hsN:active>svg{fill:#0854a1}._x8hsN:active>span{color:#0854a1}._x8hsN._2HMXl{background-color:rgba(11,110,208,.08)!important}._x8hsN._2HMXl>svg{fill:#0b6ed0}._x8hsN._2HMXl>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._x8hsN._2HMXl:hover{background-color:rgba(11,110,208,.08)!important}._x8hsN._2HMXl:hover>svg{fill:#085caf}._x8hsN._2HMXl:hover>span{color:#085caf}._x8hsN._2HMXl:active{background-color:rgba(11,110,208,.12)!important}._x8hsN._2HMXl:active>svg{fill:#0854a1}._x8hsN._2HMXl:active>span{color:#0854a1}._81Y1m{border-radius:6px}._81Y1m>._YY3P7{display:block;fill:#515559}._hRqsj{margin-top:auto;margin-bottom:0}._-inf-{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._-inf-:hover>._0k3XA{opacity:1}._i-pZM{width:0;border-width:0;padding:0}._bsy8W{border-radius:4px;min-width:100%;min-height:100%;outline:none}._zXYxd{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._0k3XA{opacity:0}._0k3XA:hover,._Ai1Ur,._zXYxd._XEUA0._XEUA0{opacity:1}._zXYxd._Dw4ei._Dw4ei{opacity:0}._zXYxd>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._zXYxd>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._zXYxd>span:hover>svg{fill:#fff}._zXYxd>span:active{background-color:#0854a1;border-color:#0854a1}._zXYxd>span:active>svg{fill:#fff}._zXYxd>span>svg{fill:#515559;border-radius:50%}._bsy8W._k7CRx{display:none!important}._EQexO{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._vY2-k{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._sK1Zx{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._hTtsI{fill:#515559}._QOwsh{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._bsy8W.focus-visible,._bsy8W:focus-visible,._EQexO.focus-visible,._EQexO:focus-visible,._sK1Zx.focus-visible,._sK1Zx:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._zXYxd.focus-visible,._zXYxd:focus-visible{border-color:#0a3f88}._zXYxd:active>span{background-color:#0854a1;border-color:#0854a1}._zXYxd:active>span>svg{fill:#fff}._0k3XA.focus-visible,._0k3XA:focus-visible{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_yFdnR","toolbarNav":"_bamM0","toolbarNavCollapsed":"_tuMPw","toolbarTabs":"_SSRCX","toolbarTab":"_x8hsN","selected":"_2HMXl","toolbarTabIconButton":"_81Y1m","icon":"_YY3P7","tabsExpandCollapseButton":"_hRqsj","toolbarPanels":"_-inf-","toolbarPanelExpandCollapseButtonDefaultHidden":"_0k3XA","toolbarPanelsCollapsed":"_i-pZM","toolbarPanel":"_bsy8W","toolbarPanelExpandCollapseButton":"_zXYxd","toolbarPanelExpandCollapseButtonDefaultShown":"_Ai1Ur","overrideShow":"_XEUA0","overrideHide":"_Dw4ei","notSelected":"_k7CRx","buttonWithLabel":"_EQexO","buttonWithLabelLabel":"_vY2-k","iconButtonWithLabel":"_sK1Zx","iconButtonWithLabelIcon":"_hTtsI","iconButtonWithLabelLabel":"_QOwsh"};
|
|
5
|
+
var stylesheet="._bamM0,._yFdnR{display:flex}._bamM0{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._tuMPw{width:69px;min-width:auto;max-width:none}._SSRCX{width:100%}._x8hsN{margin-bottom:12px;background-color:transparent!important}._x8hsN:hover{background-color:rgba(11,110,208,.08)!important}._x8hsN:hover>svg{fill:#085caf}._x8hsN:hover>span{color:#085caf}._x8hsN:active{background-color:rgba(11,110,208,.12)!important}._x8hsN:active>svg{fill:#0854a1}._x8hsN:active>span{color:#0854a1}._x8hsN._2HMXl{background-color:rgba(11,110,208,.08)!important}._x8hsN._2HMXl>svg{fill:#0b6ed0}._x8hsN._2HMXl>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._x8hsN._2HMXl:hover{background-color:rgba(11,110,208,.08)!important}._x8hsN._2HMXl:hover>svg{fill:#085caf}._x8hsN._2HMXl:hover>span{color:#085caf}._x8hsN._2HMXl:active{background-color:rgba(11,110,208,.12)!important}._x8hsN._2HMXl:active>svg{fill:#0854a1}._x8hsN._2HMXl:active>span{color:#0854a1}._81Y1m{border-radius:6px}._81Y1m>._YY3P7{display:block;fill:#515559}._hRqsj{margin-top:auto;margin-bottom:0}._-inf-{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._-inf-:hover>._0k3XA{opacity:1}._i-pZM{width:0;border-width:0;padding:0}._bsy8W{border-radius:4px;min-width:100%;min-height:100%;outline:none}._zXYxd{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._0k3XA{opacity:0}._0k3XA:hover,._Ai1Ur,._zXYxd._XEUA0._XEUA0{opacity:1}._zXYxd._Dw4ei._Dw4ei{opacity:0}._zXYxd>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._zXYxd>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._zXYxd>span:hover>svg{fill:#fff}._zXYxd>span:active{background-color:#0854a1;border-color:#0854a1}._zXYxd>span:active>svg{fill:#fff}._zXYxd>span>svg{fill:#515559;border-radius:50%}._bsy8W._k7CRx{display:none!important}._EQexO{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._vY2-k{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._sK1Zx{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._hTtsI{fill:#515559}._QOwsh{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._bsy8W.focus-visible,._bsy8W:focus-visible,._EQexO.focus-visible,._EQexO:focus-visible,._sK1Zx.focus-visible,._sK1Zx:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._zXYxd.focus-visible,._zXYxd:focus-visible{border-color:#0a3f88}._zXYxd:active>span{background-color:#0854a1;border-color:#0854a1}._zXYxd:active>span>svg{fill:#fff}._0k3XA.focus-visible,._0k3XA:focus-visible{opacity:1}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"overlay":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._CIK58{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._nJ-xa{visibility:hidden}";
|
|
4
|
+
var styles = {"overlay":"_CIK58","hidden":"_nJ-xa"};
|
|
5
|
+
var stylesheet="._CIK58{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._nJ-xa{visibility:hidden}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var classes = {"ariaLiveElement":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._de-QY{position:absolute;top:-10000px;left:-10000px}";
|
|
4
|
+
var classes = {"ariaLiveElement":"_de-QY"};
|
|
5
|
+
var stylesheet="._de-QY{position:absolute;top:-10000px;left:-10000px}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { classes as default, stylesheet };
|
package/dist/icons/Icon.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"icon":"
|
|
5
|
-
var stylesheet=".
|
|
6
|
-
if(typeof
|
|
3
|
+
var css_248z = "._Q7TuY{flex-shrink:0}";
|
|
4
|
+
var styles = {"icon":"_Q7TuY"};
|
|
5
|
+
var stylesheet="._Q7TuY{flex-shrink:0}";
|
|
6
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
package/dist/icons/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var icons_index = require('../__shared/cjs/index-
|
|
5
|
+
var icons_index = require('../__shared/cjs/index-f36fbcf7.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
package/dist/index.d.ts
CHANGED
|
@@ -1929,9 +1929,9 @@ export declare const Switch: React_2.ForwardRefExoticComponent<SwitchProps & Rea
|
|
|
1929
1929
|
|
|
1930
1930
|
export declare const SwitchField: React_2.ForwardRefExoticComponent<SwitchFieldProps & React_2.RefAttributes<HTMLLabelElement>>;
|
|
1931
1931
|
|
|
1932
|
-
export declare interface SwitchFieldProps extends Omit<React_2.AllHTMLAttributes<HTMLLabelElement>, 'onChange'> {
|
|
1932
|
+
export declare interface SwitchFieldProps extends Omit<React_2.AllHTMLAttributes<HTMLLabelElement>, 'label' | 'onChange'> {
|
|
1933
1933
|
id?: string;
|
|
1934
|
-
label:
|
|
1934
|
+
label: React_2.ReactNode;
|
|
1935
1935
|
className?: string;
|
|
1936
1936
|
checked?: boolean;
|
|
1937
1937
|
defaultChecked?: boolean;
|
package/dist/index.es.js
CHANGED
|
@@ -101,6 +101,6 @@ export { default as deprecated_ToolbarPanel } from './components/deprecated_Tool
|
|
|
101
101
|
|
|
102
102
|
/* eslint-disable camelcase */
|
|
103
103
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
104
|
-
const version = '2.
|
|
104
|
+
const version = '2.24.1';
|
|
105
105
|
|
|
106
106
|
export { version };
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./__shared/cjs/index-
|
|
5
|
+
var index = require('./__shared/cjs/index-4645fe11.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
|
-
require('./__shared/cjs/index-
|
|
8
|
+
require('./__shared/cjs/index-f36fbcf7.js');
|
|
9
9
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
10
10
|
require('react-popper');
|
|
11
11
|
require('@popperjs/core');
|
|
@@ -19,7 +19,7 @@ require('throttle-debounce');
|
|
|
19
19
|
|
|
20
20
|
/* eslint-disable camelcase */
|
|
21
21
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
22
|
-
const version = '2.
|
|
22
|
+
const version = '2.24.1';
|
|
23
23
|
|
|
24
24
|
exports.Accordion = index.Accordion;
|
|
25
25
|
exports.AccordionHeader = index.AccordionHeader;
|
|
@@ -79,7 +79,15 @@ const AdvancedTable = _ref => {
|
|
|
79
79
|
// and the internal row transforms cause infinite state updates using a standard default assignment
|
|
80
80
|
const stableDefaultArray = useMemo(() => [], []);
|
|
81
81
|
const rowsProp = rowsPropExternal !== null && rowsPropExternal !== void 0 ? rowsPropExternal : stableDefaultArray;
|
|
82
|
-
const
|
|
82
|
+
const rows = useMemo(() => {
|
|
83
|
+
let filteredRows = [];
|
|
84
|
+
rowsProp.forEach((row, i) => {
|
|
85
|
+
filteredRows = filteredRows.concat(mapExternalRowToInternalRows(row, rowsProp.length + 1, i + 1) // add 1 to account for table header
|
|
86
|
+
);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return filteredRows;
|
|
90
|
+
}, [rowsProp]);
|
|
83
91
|
const rowActionsColumnConfigId = useId();
|
|
84
92
|
let rowActionsColumnConfig;
|
|
85
93
|
const columnConfigs = useMemo(() => [...externalColumnConfigs],
|
|
@@ -227,8 +235,6 @@ const AdvancedTable = _ref => {
|
|
|
227
235
|
const [dropTarget, setDropTarget] = useState('');
|
|
228
236
|
const [dropTargetSide, setDropTargetSide] = useState();
|
|
229
237
|
const [lastToggledRowId, setLastToggledRowId] = useState('');
|
|
230
|
-
// Enables disabling row hover styles when hovering on the checkbox. Needed since a CSS parent selector doesn't exist.
|
|
231
|
-
const [isCheckboxHovered, setIsCheckboxHovered] = useState(false);
|
|
232
238
|
|
|
233
239
|
// Enables using Set.prototype.has() vs Array.prototype.includes() for better performance at scale
|
|
234
240
|
const [checkedRowIdsSet, setCheckedRowIdsSet] = useState(new Set(checkedRowIds));
|
|
@@ -238,38 +244,6 @@ const AdvancedTable = _ref => {
|
|
|
238
244
|
selectedSortOption,
|
|
239
245
|
setCurrentPage
|
|
240
246
|
});
|
|
241
|
-
const mapExternalRowToInternalRows = useCallback(function (row, depthSize, depthIndex, parentId) {
|
|
242
|
-
let depth = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
243
|
-
let mappedRows = [];
|
|
244
|
-
const hasChildRows = !!row.childRows && row.childRows.length > 0;
|
|
245
|
-
mappedRows.push({
|
|
246
|
-
id: row.id,
|
|
247
|
-
data: row.data,
|
|
248
|
-
hasChildRows,
|
|
249
|
-
parentId,
|
|
250
|
-
depth,
|
|
251
|
-
depthSize,
|
|
252
|
-
depthIndex,
|
|
253
|
-
isExpanded: row.isExpanded,
|
|
254
|
-
rowProps: row.unsafe_rowProps,
|
|
255
|
-
rowPropReference: row
|
|
256
|
-
});
|
|
257
|
-
if (row.isExpanded && row.childRows !== undefined && hasChildRows) {
|
|
258
|
-
row.childRows.forEach((child, i) => {
|
|
259
|
-
mappedRows = mappedRows.concat(mapExternalRowToInternalRows(child, row.childRows !== undefined ? row.childRows.length : 0, i, row.id, depth + 1));
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
return mappedRows;
|
|
263
|
-
}, []);
|
|
264
|
-
useEffect(() => {
|
|
265
|
-
let filteredRows = [];
|
|
266
|
-
rowsProp.forEach((row, i) => {
|
|
267
|
-
filteredRows = filteredRows.concat(mapExternalRowToInternalRows(row, rowsProp.length + 1, i + 1) // add 1 to account for table header
|
|
268
|
-
);
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
setRows(filteredRows);
|
|
272
|
-
}, [rowsProp, mapExternalRowToInternalRows]);
|
|
273
247
|
useEffect(() => {
|
|
274
248
|
setCheckedRowIdsSet(new Set(checkedRowIds));
|
|
275
249
|
}, [checkedRowIds]);
|
|
@@ -565,8 +539,7 @@ const AdvancedTable = _ref => {
|
|
|
565
539
|
e.stopPropagation(); // prevent onRowSelect
|
|
566
540
|
e.preventDefault();
|
|
567
541
|
updateExpandedRowIds(rowIndex);
|
|
568
|
-
}
|
|
569
|
-
onFocus: onRowFocus(rowIndex, minColumnIndex)
|
|
542
|
+
}
|
|
570
543
|
});
|
|
571
544
|
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
572
545
|
let children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
@@ -576,7 +549,8 @@ const AdvancedTable = _ref => {
|
|
|
576
549
|
}),
|
|
577
550
|
style: {
|
|
578
551
|
width
|
|
579
|
-
}
|
|
552
|
+
},
|
|
553
|
+
role: "presentation"
|
|
580
554
|
}, children);
|
|
581
555
|
};
|
|
582
556
|
const getCellProps = (columnConfig, columnIndex, data, rowIndex, rowId, depth) => {
|
|
@@ -618,6 +592,8 @@ const AdvancedTable = _ref => {
|
|
|
618
592
|
backend: HTML5Backend
|
|
619
593
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
620
594
|
className: styles.advancedTable,
|
|
595
|
+
ref: tableRef
|
|
596
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
621
597
|
role: hasExpandableRows ? 'treegrid' : 'grid',
|
|
622
598
|
"aria-multiselectable": hasExpandableRows && hasCheckboxColumn ? true : undefined,
|
|
623
599
|
"aria-rowcount": rows ? rows.length + 1 : 0,
|
|
@@ -625,8 +601,7 @@ const AdvancedTable = _ref => {
|
|
|
625
601
|
"aria-labelledby": ariaLabelledBy,
|
|
626
602
|
"aria-label": ariaLabel,
|
|
627
603
|
"aria-describedby": ariaDescribedBy,
|
|
628
|
-
"data-testid": dataTestId
|
|
629
|
-
ref: tableRef
|
|
604
|
+
"data-testid": dataTestId
|
|
630
605
|
}, dragSource && !disableUserPinnableColumns && !disableUserReorderableColumns ? /*#__PURE__*/React__default.createElement(AdvancedTableDragPreview, {
|
|
631
606
|
tableRef: tableRef,
|
|
632
607
|
columnHeaderRefs: cellRefs.current[-1]
|
|
@@ -663,7 +638,6 @@ const AdvancedTable = _ref => {
|
|
|
663
638
|
state: checkedRowIds.length === totalRowsCountWithExpansion ? 'true' : checkedRowIds.length === 0 ? 'false' : 'mixed',
|
|
664
639
|
isRowFocused: headerRowIndex === focusedRowIndex,
|
|
665
640
|
onClick: handleColumnHeaderCheckboxToggle,
|
|
666
|
-
onFocus: onRowFocus(headerRowIndex, minColumnIndex),
|
|
667
641
|
variant: "header"
|
|
668
642
|
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, pinnedColumnConfigs.map((columnConfigs, i) => {
|
|
669
643
|
const props = getColumnHeaderProps(columnConfigs, i, true);
|
|
@@ -682,11 +656,10 @@ const AdvancedTable = _ref => {
|
|
|
682
656
|
depth = 0,
|
|
683
657
|
depthSize,
|
|
684
658
|
depthIndex,
|
|
685
|
-
rowPropReference,
|
|
686
659
|
parentId,
|
|
687
|
-
rowProps
|
|
660
|
+
rowProps,
|
|
661
|
+
hasChildRows
|
|
688
662
|
} = row;
|
|
689
|
-
const hasChildRows = rowPropReference.childRows && rowPropReference.childRows.length > 0;
|
|
690
663
|
const paginatedRowIndex = getPaginatedRowIndex(rowIndex);
|
|
691
664
|
const onSelect = e => {
|
|
692
665
|
e.preventDefault(); // stops event from triggering on new target when focus is changed during onSelect
|
|
@@ -706,12 +679,12 @@ const AdvancedTable = _ref => {
|
|
|
706
679
|
"aria-rowindex": hasExpandableRows ? undefined : paginatedRowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
707
680
|
,
|
|
708
681
|
|
|
682
|
+
"aria-expanded": hasChildRows ? !!isExpanded : undefined,
|
|
709
683
|
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId) : undefined,
|
|
710
684
|
hasOnRowSelect: hasOnRowSelect,
|
|
711
685
|
isFocusable: hasFocusableRows,
|
|
712
686
|
isFocused: paginatedRowIndex === focusedRowIndex && minColumnIndex === focusedColumnIndex,
|
|
713
687
|
isSelected: selectedRowId === rowId,
|
|
714
|
-
isCheckboxHovered: isCheckboxHovered,
|
|
715
688
|
onKeyDown: onRowKeyDown,
|
|
716
689
|
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex),
|
|
717
690
|
onClick: e => onSelect(e),
|
|
@@ -735,10 +708,7 @@ const AdvancedTable = _ref => {
|
|
|
735
708
|
} else {
|
|
736
709
|
singleUpdateCheckedRowIds(paginatedRowIndex);
|
|
737
710
|
}
|
|
738
|
-
}
|
|
739
|
-
onMouseEnter: () => setIsCheckboxHovered(true),
|
|
740
|
-
onMouseLeave: () => setIsCheckboxHovered(false),
|
|
741
|
-
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex)
|
|
711
|
+
}
|
|
742
712
|
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, pinnedColumnConfigs.map((c, i) => {
|
|
743
713
|
const props = getCellProps(c, i, data, paginatedRowIndex, rowId, depth);
|
|
744
714
|
return /*#__PURE__*/React__default.createElement(AdvancedTableCell, _extends({}, props, {
|
|
@@ -755,7 +725,7 @@ const AdvancedTable = _ref => {
|
|
|
755
725
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
756
726
|
}));
|
|
757
727
|
}));
|
|
758
|
-
})), rowsPerPage ? /*#__PURE__*/React__default.createElement(AdvancedTablePagination, {
|
|
728
|
+
}))), rowsPerPage ? /*#__PURE__*/React__default.createElement(AdvancedTablePagination, {
|
|
759
729
|
rowsPerPage: rowsPerPage,
|
|
760
730
|
onPageChange: onPageChange,
|
|
761
731
|
ariaLabel: paginationAriaLabel,
|
|
@@ -916,5 +886,28 @@ function useFocusState(_ref8) {
|
|
|
916
886
|
cellRefs
|
|
917
887
|
};
|
|
918
888
|
}
|
|
889
|
+
function mapExternalRowToInternalRows(row, depthSize, depthIndex, parentId) {
|
|
890
|
+
let depth = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
891
|
+
let mappedRows = [];
|
|
892
|
+
const hasChildRows = !!row.childRows && row.childRows.length > 0;
|
|
893
|
+
mappedRows.push({
|
|
894
|
+
id: row.id,
|
|
895
|
+
data: row.data,
|
|
896
|
+
hasChildRows,
|
|
897
|
+
parentId,
|
|
898
|
+
depth,
|
|
899
|
+
depthSize,
|
|
900
|
+
depthIndex,
|
|
901
|
+
isExpanded: row.isExpanded,
|
|
902
|
+
rowProps: row.unsafe_rowProps,
|
|
903
|
+
rowPropReference: row
|
|
904
|
+
});
|
|
905
|
+
if (row.isExpanded && row.childRows !== undefined && hasChildRows) {
|
|
906
|
+
row.childRows.forEach((child, i) => {
|
|
907
|
+
mappedRows = mappedRows.concat(mapExternalRowToInternalRows(child, row.childRows !== undefined ? row.childRows.length : 0, i, row.id, depth + 1));
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
return mappedRows;
|
|
911
|
+
}
|
|
919
912
|
|
|
920
913
|
export { AdvancedTable };
|