@indico-data/design-system 2.54.0 → 2.55.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/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +24 -0
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.d.ts +6 -0
- package/lib/components/forms/date/inputDateTimePicker/helpers.d.ts +1 -0
- package/lib/components/forms/date/inputDateTimePicker/index.d.ts +1 -0
- package/lib/components/forms/subcomponents/DisplayFormError.d.ts +2 -1
- package/lib/components/forms/timePicker/TimePicker.d.ts +3 -1
- package/lib/components/forms/timePicker/helpers.d.ts +2 -5
- package/lib/index.css +0 -90
- package/lib/index.d.ts +3 -1
- package/lib/index.esm.css +0 -90
- package/lib/index.esm.js +199 -178
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +199 -178
- package/lib/index.js.map +1 -1
- package/package.json +6 -6
- package/src/components/forms/date/datePicker/DatePicker.stories.tsx +4 -4
- package/src/components/forms/date/datePicker/DatePicker.tsx +0 -2
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.mdx +20 -0
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +262 -0
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +141 -0
- package/src/components/forms/date/inputDateTimePicker/helpers.ts +3 -0
- package/src/components/forms/date/inputDateTimePicker/index.ts +1 -0
- package/src/components/forms/input/Input.tsx +1 -1
- package/src/components/forms/passwordInput/PasswordInput.stories.tsx +1 -1
- package/src/components/forms/subcomponents/DisplayFormError.tsx +7 -2
- package/src/components/forms/timePicker/TimePicker.mdx +3 -27
- package/src/components/forms/timePicker/TimePicker.stories.tsx +19 -1
- package/src/components/forms/timePicker/TimePicker.tsx +37 -80
- package/src/components/forms/timePicker/__tests__/TimePicker.test.tsx +33 -11
- package/src/components/forms/timePicker/helpers.ts +61 -13
- package/src/styles/index.scss +0 -2
- package/lib/components/forms/timePicker/constants.d.ts +0 -13
- package/src/components/forms/timePicker/constants.ts +0 -21
- package/src/components/forms/timePicker/styles/TimePicker.scss +0 -51
package/lib/index.esm.js
CHANGED
|
@@ -5013,12 +5013,12 @@ var classnames = {exports: {}};
|
|
|
5013
5013
|
} (classnames));
|
|
5014
5014
|
|
|
5015
5015
|
var classnamesExports = classnames.exports;
|
|
5016
|
-
var
|
|
5016
|
+
var y$1 = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
5017
5017
|
|
|
5018
5018
|
const Icon = (_a) => {
|
|
5019
5019
|
var { name, size = 'md', className, ariaLabel } = _a, props = __rest(_a, ["name", "size", "className", "ariaLabel"]);
|
|
5020
5020
|
const label = ariaLabel || `${name} Icon`;
|
|
5021
|
-
const iconClasses =
|
|
5021
|
+
const iconClasses = y$1('icon', {
|
|
5022
5022
|
[`icon--${size}`]: size,
|
|
5023
5023
|
}, className);
|
|
5024
5024
|
const faIconName = name.split('fa-')[1];
|
|
@@ -5043,7 +5043,7 @@ const Icon = (_a) => {
|
|
|
5043
5043
|
|
|
5044
5044
|
const Button$1 = forwardRef((props, ref) => {
|
|
5045
5045
|
const { ariaLabel, children, isLoading, isDisabled, variant = 'solid', isPill, iconLeft, iconRight, onClick, type = 'button', size = 'md', onMouseEnter, onMouseExit, onKeyDown, className, href } = props, rest = __rest(props, ["ariaLabel", "children", "isLoading", "isDisabled", "variant", "isPill", "iconLeft", "iconRight", "onClick", "type", "size", "onMouseEnter", "onMouseExit", "onKeyDown", "className", "href"]);
|
|
5046
|
-
const buttonClasses =
|
|
5046
|
+
const buttonClasses = y$1('btn', {
|
|
5047
5047
|
[`btn--${variant}`]: variant,
|
|
5048
5048
|
[`btn--${size}`]: size,
|
|
5049
5049
|
'btn--icon-only': !children && (iconLeft || iconRight),
|
|
@@ -5103,7 +5103,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5103
5103
|
@media screen and (max-width: ${e}px) {
|
|
5104
5104
|
${css(t,...n)}
|
|
5105
5105
|
}
|
|
5106
|
-
|
|
5106
|
+
`,$$1=n.div`
|
|
5107
5107
|
position: relative;
|
|
5108
5108
|
display: flex;
|
|
5109
5109
|
align-items: center;
|
|
@@ -5111,7 +5111,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5111
5111
|
line-height: normal;
|
|
5112
5112
|
${({theme:e,$headCell:t})=>e[t?"headCells":"cells"].style};
|
|
5113
5113
|
${({$noPadding:e})=>e&&"padding: 0"};
|
|
5114
|
-
`,k$1=n(
|
|
5114
|
+
`,k$1=n($$1)`
|
|
5115
5115
|
flex-grow: ${({button:e,grow:t})=>0===t||e?0:t||1};
|
|
5116
5116
|
flex-shrink: 0;
|
|
5117
5117
|
flex-basis: 0;
|
|
@@ -5148,14 +5148,14 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5148
5148
|
${({$renderAsCell:e})=>!e&&P};
|
|
5149
5149
|
${({theme:e,$isDragging:t})=>t&&e.cells.draggingStyle};
|
|
5150
5150
|
${({$cellStyle:e})=>e};
|
|
5151
|
-
`;var H$1=React.memo((function({id:t,column:n,row:o,rowIndex:a,dataTag:l,isDragging:r,onDragStart:i,onDragOver:s,onDragEnd:d,onDragEnter:c,onDragLeave:g}){const{conditionalStyle:u,classNames:b}=p(o,n.conditionalCellStyles,["rdt_TableCell"]);return React.createElement(D$1,{id:t,"data-column-id":n.id,role:"cell",className:b,"data-tag":l,$cellStyle:n.style,$renderAsCell:!!n.cell,$allowOverflow:n.allowOverflow,button:n.button,center:n.center,compact:n.compact,grow:n.grow,hide:n.hide,maxWidth:n.maxWidth,minWidth:n.minWidth,right:n.right,width:n.width,$wrapCell:n.wrap,style:u,$isDragging:r,onDragStart:i,onDragOver:s,onDragEnd:d,onDragEnter:c,onDragLeave:g},!n.cell&&React.createElement("div",{"data-tag":l},function(e,t,n,o){return t?n&&"function"==typeof n?n(e,o):t(e,o):null}(o,n.selector,n.format,a)),n.cell&&n.cell(o,a,n,t))}));const F="input";var j=React.memo((function({name:t,component:n=F,componentOptions:o={style:{}},indeterminate:a=!1,checked:l=!1,disabled:r=!1,onClick:i=u}){const s=n,d=s!==F?o.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(r),c=React.useMemo((()=>function(e,...t){let n;return Object.keys(e).map((t=>e[t])).forEach(((o,a)=>{const l=e;"function"==typeof o&&(n=Object.assign(Object.assign({},l),{[Object.keys(e)[a]]:o(...t)}));})),n||e}(o,a)),[o,a]);return React.createElement(s,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=a);},style:d,onClick:r?u:i,name:t,"aria-label":t,checked:l,disabled:r},c,{onChange:u}))}));const I
|
|
5151
|
+
`;var H$1=React.memo((function({id:t,column:n,row:o,rowIndex:a,dataTag:l,isDragging:r,onDragStart:i,onDragOver:s,onDragEnd:d,onDragEnter:c,onDragLeave:g}){const{conditionalStyle:u,classNames:b}=p(o,n.conditionalCellStyles,["rdt_TableCell"]);return React.createElement(D$1,{id:t,"data-column-id":n.id,role:"cell",className:b,"data-tag":l,$cellStyle:n.style,$renderAsCell:!!n.cell,$allowOverflow:n.allowOverflow,button:n.button,center:n.center,compact:n.compact,grow:n.grow,hide:n.hide,maxWidth:n.maxWidth,minWidth:n.minWidth,right:n.right,width:n.width,$wrapCell:n.wrap,style:u,$isDragging:r,onDragStart:i,onDragOver:s,onDragEnd:d,onDragEnter:c,onDragLeave:g},!n.cell&&React.createElement("div",{"data-tag":l},function(e,t,n,o){return t?n&&"function"==typeof n?n(e,o):t(e,o):null}(o,n.selector,n.format,a)),n.cell&&n.cell(o,a,n,t))}));const F="input";var j$1=React.memo((function({name:t,component:n=F,componentOptions:o={style:{}},indeterminate:a=!1,checked:l=!1,disabled:r=!1,onClick:i=u}){const s=n,d=s!==F?o.style:(e=>Object.assign(Object.assign({fontSize:"18px"},!e&&{cursor:"pointer"}),{padding:0,marginTop:"1px",verticalAlign:"middle",position:"relative"}))(r),c=React.useMemo((()=>function(e,...t){let n;return Object.keys(e).map((t=>e[t])).forEach(((o,a)=>{const l=e;"function"==typeof o&&(n=Object.assign(Object.assign({},l),{[Object.keys(e)[a]]:o(...t)}));})),n||e}(o,a)),[o,a]);return React.createElement(s,Object.assign({type:"checkbox",ref:e=>{e&&(e.indeterminate=a);},style:d,onClick:r?u:i,name:t,"aria-label":t,checked:l,disabled:r},c,{onChange:u}))}));const I=n($$1)`
|
|
5152
5152
|
flex: 0 0 48px;
|
|
5153
5153
|
min-width: 48px;
|
|
5154
5154
|
justify-content: center;
|
|
5155
5155
|
align-items: center;
|
|
5156
5156
|
user-select: none;
|
|
5157
5157
|
white-space: nowrap;
|
|
5158
|
-
`;function T$1({name:t,keyField:n,row:o,rowCount:a,selected:l,selectableRowsComponent:r,selectableRowsComponentProps:i,selectableRowsSingle:s,selectableRowDisabled:d,onSelectedRow:c}){const g=!(!d||!d(o));return React.createElement(I
|
|
5158
|
+
`;function T$1({name:t,keyField:n,row:o,rowCount:a,selected:l,selectableRowsComponent:r,selectableRowsComponentProps:i,selectableRowsSingle:s,selectableRowDisabled:d,onSelectedRow:c}){const g=!(!d||!d(o));return React.createElement(I,{onClick:e=>e.stopPropagation(),className:"rdt_TableCell",$noPadding:!0},React.createElement(j$1,{name:t,component:r,componentOptions:i,checked:l,"aria-checked":l,onClick:()=>{c({type:"SELECT_SINGLE_ROW",row:o,isSelected:l,keyField:n,rowCount:a,singleSelect:s});},disabled:g}))}const M$1=n.button`
|
|
5159
5159
|
display: inline-flex;
|
|
5160
5160
|
align-items: center;
|
|
5161
5161
|
user-select: none;
|
|
@@ -5163,7 +5163,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5163
5163
|
border: none;
|
|
5164
5164
|
background-color: transparent;
|
|
5165
5165
|
${({theme:e})=>e.expanderButton.style};
|
|
5166
|
-
`;function L$1({disabled:t=!1,expanded:n=!1,expandableIcon:o,id:a,row:l,onToggled:r}){const i=n?o.expanded:o.collapsed;return React.createElement(M,{"aria-disabled":t,onClick:()=>r&&r(l),"data-testid":`expander-button-${a}`,disabled:t,"aria-label":n?"Collapse Row":"Expand Row",role:"button",type:"button"},i)}const A$1=n(
|
|
5166
|
+
`;function L$1({disabled:t=!1,expanded:n=!1,expandableIcon:o,id:a,row:l,onToggled:r}){const i=n?o.expanded:o.collapsed;return React.createElement(M$1,{"aria-disabled":t,onClick:()=>r&&r(l),"data-testid":`expander-button-${a}`,disabled:t,"aria-label":n?"Collapse Row":"Expand Row",role:"button",type:"button"},i)}const A$1=n($$1)`
|
|
5167
5167
|
white-space: nowrap;
|
|
5168
5168
|
font-weight: 400;
|
|
5169
5169
|
min-width: 48px;
|
|
@@ -5173,7 +5173,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5173
5173
|
box-sizing: border-box;
|
|
5174
5174
|
${({theme:e})=>e.expanderRow.style};
|
|
5175
5175
|
${({$extendedRowStyle:e})=>e};
|
|
5176
|
-
`;var z$1=React.memo((function({data:t,ExpanderComponent:n,expanderComponentProps:o,extendedRowStyle:a,extendedClassNames:l}){const r=["rdt_ExpanderRow",...l.split(" ").filter((e=>"rdt_TableRow"!==e))].join(" ");return React.createElement(N$1,{className:r,$extendedRowStyle:a},React.createElement(n,Object.assign({data:t},o)))}));const W="allowRowEvents";var B
|
|
5176
|
+
`;var z$1=React.memo((function({data:t,ExpanderComponent:n,expanderComponentProps:o,extendedRowStyle:a,extendedClassNames:l}){const r=["rdt_ExpanderRow",...l.split(" ").filter((e=>"rdt_TableRow"!==e))].join(" ");return React.createElement(N$1,{className:r,$extendedRowStyle:a},React.createElement(n,Object.assign({data:t},o)))}));const W="allowRowEvents";var B,G,V;!function(e){e.LTR="ltr",e.RTL="rtl",e.AUTO="auto";}(B||(B={})),function(e){e.LEFT="left",e.RIGHT="right",e.CENTER="center";}(G||(G={})),function(e){e.SM="sm",e.MD="md",e.LG="lg";}(V||(V={}));const U=css`
|
|
5177
5177
|
&:hover {
|
|
5178
5178
|
${({$highlightOnHover:e,theme:t})=>e&&t.rows.highlightOnHoverStyle};
|
|
5179
5179
|
}
|
|
@@ -5252,14 +5252,14 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5252
5252
|
overflow: hidden;
|
|
5253
5253
|
white-space: nowrap;
|
|
5254
5254
|
text-overflow: ellipsis;
|
|
5255
|
-
`;var ne=React.memo((function({column:t,disabled:n,draggingColumnId:o,selectedColumn:a={},sortDirection:r,sortIcon:i,sortServer:s,pagination:d,paginationServer:c,persistSelectedOnSort:g,selectableRowsVisibleOnly:u,onSort:p,onDragStart:b,onDragOver:m,onDragEnd:w,onDragEnter:f,onDragLeave:x}){React.useEffect((()=>{"string"==typeof t.selector&&console.error(`Warning: ${t.selector} is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]...`);}),[]);const[C,y]=React.useState(!1),R=React.useRef(null);if(React.useEffect((()=>{R.current&&y(R.current.scrollWidth>R.current.clientWidth);}),[C]),t.omit)return null;const v=()=>{if(!t.sortable&&!t.selector)return;let e=r;h$1(a.id,t.id)&&(e=r===l.ASC?l.DESC:l.ASC),p({type:"SORT_CHANGE",sortDirection:e,selectedColumn:t,clearSelectedOnSort:d&&c&&!g||s||u});},S=t=>React.createElement(Q,{sortActive:t,sortDirection:r}),E=()=>React.createElement("span",{className:[r,"__rdt_custom_sort_icon__"].join(" ")},i),O=!(!t.sortable||!h$1(a.id,t.id)),$=!t.sortable||n,k=t.sortable&&!i&&!t.right,P=t.sortable&&!i&&t.right,D=t.sortable&&i&&!t.right,H=t.sortable&&i&&t.right;return React.createElement(X,{"data-column-id":t.id,className:"rdt_TableCol",$headCell:!0,allowOverflow:t.allowOverflow,button:t.button,compact:t.compact,grow:t.grow,hide:t.hide,maxWidth:t.maxWidth,minWidth:t.minWidth,right:t.right,center:t.center,width:t.width,draggable:t.reorder,$isDragging:h$1(t.id,o),onDragStart:b,onDragOver:m,onDragEnd:w,onDragEnter:f,onDragLeave:x},t.name&&React.createElement(ee,{"data-column-id":t.id,"data-sort-id":t.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:$?void 0:v,onKeyPress:$?void 0:e=>{"Enter"===e.key&&v();},$sortActive:!$&&O,disabled:$},!$&&H&&E(),!$&&P&&S(O),"string"==typeof t.name?React.createElement(te,{title:C?t.name:void 0,ref:R,"data-column-id":t.id},t.name):t.name,!$&&D&&E(),!$&&k&&S(O)))}));const oe=n(
|
|
5255
|
+
`;var ne=React.memo((function({column:t,disabled:n,draggingColumnId:o,selectedColumn:a={},sortDirection:r,sortIcon:i,sortServer:s,pagination:d,paginationServer:c,persistSelectedOnSort:g,selectableRowsVisibleOnly:u,onSort:p,onDragStart:b,onDragOver:m,onDragEnd:w,onDragEnter:f,onDragLeave:x}){React.useEffect((()=>{"string"==typeof t.selector&&console.error(`Warning: ${t.selector} is a string based column selector which has been deprecated as of v7 and will be removed in v8. Instead, use a selector function e.g. row => row[field]...`);}),[]);const[C,y]=React.useState(!1),R=React.useRef(null);if(React.useEffect((()=>{R.current&&y(R.current.scrollWidth>R.current.clientWidth);}),[C]),t.omit)return null;const v=()=>{if(!t.sortable&&!t.selector)return;let e=r;h$1(a.id,t.id)&&(e=r===l.ASC?l.DESC:l.ASC),p({type:"SORT_CHANGE",sortDirection:e,selectedColumn:t,clearSelectedOnSort:d&&c&&!g||s||u});},S=t=>React.createElement(Q,{sortActive:t,sortDirection:r}),E=()=>React.createElement("span",{className:[r,"__rdt_custom_sort_icon__"].join(" ")},i),O=!(!t.sortable||!h$1(a.id,t.id)),$=!t.sortable||n,k=t.sortable&&!i&&!t.right,P=t.sortable&&!i&&t.right,D=t.sortable&&i&&!t.right,H=t.sortable&&i&&t.right;return React.createElement(X,{"data-column-id":t.id,className:"rdt_TableCol",$headCell:!0,allowOverflow:t.allowOverflow,button:t.button,compact:t.compact,grow:t.grow,hide:t.hide,maxWidth:t.maxWidth,minWidth:t.minWidth,right:t.right,center:t.center,width:t.width,draggable:t.reorder,$isDragging:h$1(t.id,o),onDragStart:b,onDragOver:m,onDragEnd:w,onDragEnter:f,onDragLeave:x},t.name&&React.createElement(ee,{"data-column-id":t.id,"data-sort-id":t.id,role:"columnheader",tabIndex:0,className:"rdt_TableCol_Sortable",onClick:$?void 0:v,onKeyPress:$?void 0:e=>{"Enter"===e.key&&v();},$sortActive:!$&&O,disabled:$},!$&&H&&E(),!$&&P&&S(O),"string"==typeof t.name?React.createElement(te,{title:C?t.name:void 0,ref:R,"data-column-id":t.id},t.name):t.name,!$&&D&&E(),!$&&k&&S(O)))}));const oe=n($$1)`
|
|
5256
5256
|
flex: 0 0 48px;
|
|
5257
5257
|
justify-content: center;
|
|
5258
5258
|
align-items: center;
|
|
5259
5259
|
user-select: none;
|
|
5260
5260
|
white-space: nowrap;
|
|
5261
5261
|
font-size: unset;
|
|
5262
|
-
`;function ae({headCell:t=!0,rowData:n,keyField:o,allSelected:a,mergeSelections:l,selectedRows:r,selectableRowsComponent:i,selectableRowsComponentProps:s,selectableRowDisabled:d,onSelectAllRows:c}){const g=r.length>0&&!a,u=d?n.filter((e=>!d(e))):n,p=0===u.length,b=Math.min(n.length,u.length);return React.createElement(oe,{className:"rdt_TableCol",$headCell:t,$noPadding:!0},React.createElement(j,{name:"select-all-rows",component:i,componentOptions:s,onClick:()=>{c({type:"SELECT_ALL_ROWS",rows:u,rowCount:b,mergeSelections:l,keyField:o});},checked:a,indeterminate:g,disabled:p}))}function le(t=B
|
|
5262
|
+
`;function ae({headCell:t=!0,rowData:n,keyField:o,allSelected:a,mergeSelections:l,selectedRows:r,selectableRowsComponent:i,selectableRowsComponentProps:s,selectableRowDisabled:d,onSelectAllRows:c}){const g=r.length>0&&!a,u=d?n.filter((e=>!d(e))):n,p=0===u.length,b=Math.min(n.length,u.length);return React.createElement(oe,{className:"rdt_TableCol",$headCell:t,$noPadding:!0},React.createElement(j$1,{name:"select-all-rows",component:i,componentOptions:s,onClick:()=>{c({type:"SELECT_ALL_ROWS",rows:u,rowCount:b,mergeSelections:l,keyField:o});},checked:a,indeterminate:g,disabled:p}))}function le(t=B.AUTO){const n="object"==typeof window,[o,a]=React.useState(!1);return React.useEffect((()=>{if(n)if("auto"!==t)a("rtl"===t);else {const e=!(!window.document||!window.document.createElement),t=document.getElementsByTagName("BODY")[0],n=document.getElementsByTagName("HTML")[0],o="rtl"===t.dir||"rtl"===n.dir;a(e&&o);}}),[t,n]),o}const re$1=n.div`
|
|
5263
5263
|
display: flex;
|
|
5264
5264
|
align-items: center;
|
|
5265
5265
|
flex: 1 0 auto;
|
|
@@ -5353,7 +5353,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5353
5353
|
position: relative;
|
|
5354
5354
|
width: 100%;
|
|
5355
5355
|
${({theme:e})=>e.tableWrapper.style};
|
|
5356
|
-
`,Re=n(
|
|
5356
|
+
`,Re=n($$1)`
|
|
5357
5357
|
white-space: nowrap;
|
|
5358
5358
|
${({theme:e})=>e.expanderCell.style};
|
|
5359
5359
|
`,ve=n.div`
|
|
@@ -5407,7 +5407,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5407
5407
|
user-select: none;
|
|
5408
5408
|
pointer-events: none;
|
|
5409
5409
|
}
|
|
5410
|
-
`,$e=t=>{var{defaultValue:n,onChange:o}=t,a=be(t,["defaultValue","onChange"]);return React.createElement(Oe,null,React.createElement(Ee,Object.assign({onChange:o,defaultValue:n},a)),React.createElement(Se,null))},ke={columns:[],data:[],title:"",keyField:"id",selectableRows:!1,selectableRowsHighlight:!1,selectableRowsNoSelectAll:!1,selectableRowSelected:null,selectableRowDisabled:null,selectableRowsComponent:"input",selectableRowsComponentProps:{},selectableRowsVisibleOnly:!1,selectableRowsSingle:!1,clearSelectedRows:!1,expandableRows:!1,expandableRowDisabled:null,expandableRowExpanded:null,expandOnRowClicked:!1,expandableRowsHideExpander:!1,expandOnRowDoubleClicked:!1,expandableInheritConditionalStyles:!1,expandableRowsComponent:function(){return React__default.createElement("div",null,"To add an expander pass in a component instance via ",React__default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:React__default.createElement((()=>React__default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),React__default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:React__default.createElement((()=>React__default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),React__default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:React__default.createElement("div",{style:{fontSize:"24px",fontWeight:700,padding:"24px"}},"Loading..."),persistTableHead:!1,sortIcon:null,sortFunction:null,sortServer:!1,striped:!1,highlightOnHover:!1,pointerOnHover:!1,noContextMenu:!1,contextMessage:{singular:"item",plural:"items",message:"selected"},actions:null,contextActions:null,contextComponent:null,defaultSortFieldId:null,defaultSortAsc:!0,responsive:!0,noDataComponent:React__default.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:G.RIGHT,subHeaderWrap:!0,subHeaderComponent:null,fixedHeader:!1,fixedHeaderScrollHeight:"100vh",pagination:!1,paginationServer:!1,paginationServerOptions:{persistSelectedOnSort:!1,persistSelectedOnPageChange:!1},paginationDefaultPage:1,paginationResetDefaultPage:!1,paginationTotalRows:0,paginationPerPage:10,paginationRowsPerPageOptions:[10,15,20,25,30],paginationComponent:null,paginationComponentOptions:{},paginationIconFirstPage:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),React__default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),React__default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),React__default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),React__default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:B
|
|
5410
|
+
`,$e=t=>{var{defaultValue:n,onChange:o}=t,a=be(t,["defaultValue","onChange"]);return React.createElement(Oe,null,React.createElement(Ee,Object.assign({onChange:o,defaultValue:n},a)),React.createElement(Se,null))},ke={columns:[],data:[],title:"",keyField:"id",selectableRows:!1,selectableRowsHighlight:!1,selectableRowsNoSelectAll:!1,selectableRowSelected:null,selectableRowDisabled:null,selectableRowsComponent:"input",selectableRowsComponentProps:{},selectableRowsVisibleOnly:!1,selectableRowsSingle:!1,clearSelectedRows:!1,expandableRows:!1,expandableRowDisabled:null,expandableRowExpanded:null,expandOnRowClicked:!1,expandableRowsHideExpander:!1,expandOnRowDoubleClicked:!1,expandableInheritConditionalStyles:!1,expandableRowsComponent:function(){return React__default.createElement("div",null,"To add an expander pass in a component instance via ",React__default.createElement("strong",null,"expandableRowsComponent"),". You can then access props.data from this component.")},expandableIcon:{collapsed:React__default.createElement((()=>React__default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),React__default.createElement("path",{d:"M0-.25h24v24H0z",fill:"none"}))),null),expanded:React__default.createElement((()=>React__default.createElement("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},React__default.createElement("path",{d:"M7.41 7.84L12 12.42l4.59-4.58L18 9.25l-6 6-6-6z"}),React__default.createElement("path",{d:"M0-.75h24v24H0z",fill:"none"}))),null)},expandableRowsComponentProps:{},progressPending:!1,progressComponent:React__default.createElement("div",{style:{fontSize:"24px",fontWeight:700,padding:"24px"}},"Loading..."),persistTableHead:!1,sortIcon:null,sortFunction:null,sortServer:!1,striped:!1,highlightOnHover:!1,pointerOnHover:!1,noContextMenu:!1,contextMessage:{singular:"item",plural:"items",message:"selected"},actions:null,contextActions:null,contextComponent:null,defaultSortFieldId:null,defaultSortAsc:!0,responsive:!0,noDataComponent:React__default.createElement("div",{style:{padding:"24px"}},"There are no records to display"),disabled:!1,noTableHead:!1,noHeader:!1,subHeader:!1,subHeaderAlign:G.RIGHT,subHeaderWrap:!0,subHeaderComponent:null,fixedHeader:!1,fixedHeaderScrollHeight:"100vh",pagination:!1,paginationServer:!1,paginationServerOptions:{persistSelectedOnSort:!1,persistSelectedOnPageChange:!1},paginationDefaultPage:1,paginationResetDefaultPage:!1,paginationTotalRows:0,paginationPerPage:10,paginationRowsPerPageOptions:[10,15,20,25,30],paginationComponent:null,paginationComponentOptions:{},paginationIconFirstPage:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),React__default.createElement("path",{fill:"none",d:"M24 24H0V0h24v24z"}))),null),paginationIconLastPage:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),React__default.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}))),null),paginationIconNext:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),React__default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),paginationIconPrevious:React__default.createElement((()=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":"true",role:"presentation"},React__default.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),React__default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))),null),dense:!1,conditionalRowStyles:[],theme:"default",customStyles:{},direction:B.AUTO,onChangePage:u,onChangeRowsPerPage:u,onRowClicked:u,onRowDoubleClicked:u,onRowMouseEnter:u,onRowMouseLeave:u,onRowExpandToggled:u,onSelectedRowsChange:u,onSort:u,onColumnOrderChange:u},Pe={rowsPerPageText:"Rows per page:",rangeSeparatorText:"of",noRowsPerPage:!1,selectAllRowsItem:!1,selectAllRowsItemText:"All"},De=n.nav`
|
|
5411
5411
|
display: flex;
|
|
5412
5412
|
flex: 1 1 auto;
|
|
5413
5413
|
justify-content: flex-end;
|
|
@@ -5440,7 +5440,7 @@ var l;function r(e,t){return e[t]}function i(e=[],t,n=0){return [...e.slice(0,n)
|
|
|
5440
5440
|
margin: 0 24px;
|
|
5441
5441
|
`,Te=n(je)`
|
|
5442
5442
|
margin: 0 4px;
|
|
5443
|
-
`;var Me=React.memo((function({rowsPerPage:t,rowCount:n,currentPage:o,direction:a=ke.direction,paginationRowsPerPageOptions:l=ke.paginationRowsPerPageOptions,paginationIconLastPage:r=ke.paginationIconLastPage,paginationIconFirstPage:i=ke.paginationIconFirstPage,paginationIconNext:s=ke.paginationIconNext,paginationIconPrevious:d=ke.paginationIconPrevious,paginationComponentOptions:g=ke.paginationComponentOptions,onChangeRowsPerPage:u=ke.onChangeRowsPerPage,onChangePage:p=ke.onChangePage}){const b=(()=>{const t="object"==typeof window;function n(){return {width:t?window.innerWidth:void 0,height:t?window.innerHeight:void 0}}const[o,a]=React.useState(n);return React.useEffect((()=>{if(!t)return ()=>null;function e(){a(n());}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),o})(),m=le(a),h=b.width&&b.width>599,w=c(n,t),f=o*t,x=f-t+1,C=1===o,y=o===w,R=Object.assign(Object.assign({},Pe),g),v=o===w?`${x}-${n} ${R.rangeSeparatorText} ${n}`:`${x}-${f} ${R.rangeSeparatorText} ${n}`,S=React.useCallback((()=>p(o-1)),[o,p]),E=React.useCallback((()=>p(o+1)),[o,p]),O=React.useCallback((()=>p(1)),[p]),$=React.useCallback((()=>p(c(n,t))),[p,n,t]),k=React.useCallback((e=>u(Number(e.target.value),o)),[o,u]),P=l.map((t=>React.createElement("option",{key:t,value:t},t)));R.selectAllRowsItem&&P.push(React.createElement("option",{key:-1,value:n},R.selectAllRowsItemText));const D=React.createElement($e,{onChange:k,defaultValue:t,"aria-label":R.rowsPerPageText},P);return React.createElement(De,{className:"rdt_Pagination"},!R.noRowsPerPage&&h&&React.createElement(React.Fragment,null,React.createElement(Te,null,R.rowsPerPageText),D),h&&React.createElement(Ie,null,v),React.createElement(Fe,null,React.createElement(He,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":C,onClick:O,disabled:C,$isRTL:m},i),React.createElement(He,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":C,onClick:S,disabled:C,$isRTL:m},d),!R.noRowsPerPage&&!h&&D,React.createElement(He,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":y,onClick:E,disabled:y,$isRTL:m},s),React.createElement(He,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":y,onClick:$,disabled:y,$isRTL:m},r)))}));const Le=(t,n)=>{const o=React.useRef(!0);React.useEffect((()=>{o.current?o.current=!1:t();}),n);};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e=function(e){return function(e){return !!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return "[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Ne}(e)}(e)};var Ne="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ze(e,t){return !1!==t.clone&&t.isMergeableObject(e)?Ue((n=e,Array.isArray(n)?[]:{}),e,t):e;var n;}function We(e,t,n){return e.concat(t).map((function(e){return ze(e,n)}))}function Be(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Ge(e,t){try{return t in e}catch(e){return !1}}function Ve(e,t,n){var o={};return n.isMergeableObject(e)&&Be(e).forEach((function(t){o[t]=ze(e[t],n);})),Be(t).forEach((function(a){(function(e,t){return Ge(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ge(e,a)&&n.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return "function"==typeof n?n:Ue}(a,n)(e[a],t[a],n):o[a]=ze(t[a],n));})),o}function Ue(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||We,n.isMergeableObject=n.isMergeableObject||_e,n.cloneUnlessOtherwiseSpecified=ze;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):Ve(e,t,n):ze(t,n)}Ue.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ue(e,n,t)}),{})};var Ye=Ae(Ue);const Ke={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},qe={default:Ke,light:Ke,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Qe(t,n,o,a){const[r,i]=React.useState((()=>d(t))),[s,c]=React.useState(""),g=React.useRef("");Le((()=>{i(d(t));}),[t]);const u=React.useCallback((e=>{var t,n,o;const{attributes:a}=e.target,l=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;l&&(g.current=(null===(o=null===(n=r[m(r,l)])||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString())||"",c(g.current));}),[r]),p=React.useCallback((e=>{var t;const{attributes:o}=e.target,a=null===(t=o.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;if(a&&g.current&&a!==g.current){const e=m(r,g.current),t=m(r,a),o=[...r];o[e]=r[t],o[t]=r[e],i(o),n(o);}}),[n,r]),b=React.useCallback((e=>{e.preventDefault();}),[]),h=React.useCallback((e=>{e.preventDefault();}),[]),w=React.useCallback((e=>{e.preventDefault(),g.current="",c("");}),[]),f=function(e=!1){return e?l.ASC:l.DESC}(a),x=React.useMemo((()=>r[m(r,null==o?void 0:o.toString())]||{}),[o,r]);return {tableColumns:r,draggingColumnId:s,handleDragStart:u,handleDragEnter:p,handleDragOver:b,handleDragLeave:h,handleDragEnd:w,defaultSortDirection:f,defaultSortColumn:x}}var Xe=React.memo((function(t){const{data:n=ke.data,columns:o=ke.columns,title:i=ke.title,actions:s=ke.actions,keyField:d=ke.keyField,striped:u=ke.striped,highlightOnHover:p=ke.highlightOnHover,pointerOnHover:m=ke.pointerOnHover,dense:h=ke.dense,selectableRows:f=ke.selectableRows,selectableRowsSingle:C=ke.selectableRowsSingle,selectableRowsHighlight:v=ke.selectableRowsHighlight,selectableRowsNoSelectAll:S=ke.selectableRowsNoSelectAll,selectableRowsVisibleOnly:E=ke.selectableRowsVisibleOnly,selectableRowSelected:O=ke.selectableRowSelected,selectableRowDisabled:k=ke.selectableRowDisabled,selectableRowsComponent:P=ke.selectableRowsComponent,selectableRowsComponentProps:D=ke.selectableRowsComponentProps,onRowExpandToggled:H=ke.onRowExpandToggled,onSelectedRowsChange:F=ke.onSelectedRowsChange,expandableIcon:j=ke.expandableIcon,onChangeRowsPerPage:I=ke.onChangeRowsPerPage,onChangePage:T=ke.onChangePage,paginationServer:M=ke.paginationServer,paginationServerOptions:L=ke.paginationServerOptions,paginationTotalRows:A=ke.paginationTotalRows,paginationDefaultPage:_=ke.paginationDefaultPage,paginationResetDefaultPage:N=ke.paginationResetDefaultPage,paginationPerPage:z=ke.paginationPerPage,paginationRowsPerPageOptions:W=ke.paginationRowsPerPageOptions,paginationIconLastPage:B=ke.paginationIconLastPage,paginationIconFirstPage:G=ke.paginationIconFirstPage,paginationIconNext:V=ke.paginationIconNext,paginationIconPrevious:U=ke.paginationIconPrevious,paginationComponent:Y=ke.paginationComponent,paginationComponentOptions:K=ke.paginationComponentOptions,responsive:J=ke.responsive,progressPending:Q=ke.progressPending,progressComponent:X=ke.progressComponent,persistTableHead:Z=ke.persistTableHead,noDataComponent:ee=ke.noDataComponent,disabled:te=ke.disabled,noTableHead:oe=ke.noTableHead,noHeader:le=ke.noHeader,fixedHeader:re=ke.fixedHeader,fixedHeaderScrollHeight:ie=ke.fixedHeaderScrollHeight,pagination:se=ke.pagination,subHeader:de=ke.subHeader,subHeaderAlign:ce=ke.subHeaderAlign,subHeaderWrap:ge=ke.subHeaderWrap,subHeaderComponent:ue=ke.subHeaderComponent,noContextMenu:be=ke.noContextMenu,contextMessage:me=ke.contextMessage,contextActions:he=ke.contextActions,contextComponent:Se=ke.contextComponent,expandableRows:Ee=ke.expandableRows,onRowClicked:Oe=ke.onRowClicked,onRowDoubleClicked:$e=ke.onRowDoubleClicked,onRowMouseEnter:Pe=ke.onRowMouseEnter,onRowMouseLeave:De=ke.onRowMouseLeave,sortIcon:He=ke.sortIcon,onSort:Fe=ke.onSort,sortFunction:je=ke.sortFunction,sortServer:Ie=ke.sortServer,expandableRowsComponent:Te=ke.expandableRowsComponent,expandableRowsComponentProps:Ae=ke.expandableRowsComponentProps,expandableRowDisabled:_e=ke.expandableRowDisabled,expandableRowsHideExpander:Ne=ke.expandableRowsHideExpander,expandOnRowClicked:ze=ke.expandOnRowClicked,expandOnRowDoubleClicked:We=ke.expandOnRowDoubleClicked,expandableRowExpanded:Be=ke.expandableRowExpanded,expandableInheritConditionalStyles:Ge=ke.expandableInheritConditionalStyles,defaultSortFieldId:Ve=ke.defaultSortFieldId,defaultSortAsc:Ue=ke.defaultSortAsc,clearSelectedRows:Ke=ke.clearSelectedRows,conditionalRowStyles:Je=ke.conditionalRowStyles,theme:Xe=ke.theme,customStyles:Ze=ke.customStyles,direction:et=ke.direction,onColumnOrderChange:tt=ke.onColumnOrderChange,className:nt}=t,{tableColumns:ot,draggingColumnId:at,handleDragStart:lt,handleDragEnter:rt,handleDragOver:it,handleDragLeave:st,handleDragEnd:dt,defaultSortDirection:ct,defaultSortColumn:gt}=Qe(o,tt,Ve,Ue),[{rowsPerPage:ut,currentPage:pt,selectedRows:bt,allSelected:mt,selectedCount:ht,selectedColumn:wt,sortDirection:ft,toggleOnSelectedRowsChange:xt},Ct]=React.useReducer(w$1,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:gt,toggleOnSelectedRowsChange:!1,sortDirection:ct,currentPage:_,rowsPerPage:z,selectedRowsFlag:!1,contextMessage:ke.contextMessage}),{persistSelectedOnSort:yt=!1,persistSelectedOnPageChange:Rt=!1}=L,vt=!(!M||!Rt&&!yt),St=se&&!Q&&n.length>0,Et=Y||Me,Ot=React.useMemo((()=>((e={},t="default",n="default")=>{const o=qe[t]?t:n;return Ye({table:{style:{color:(a=qe[o]).text.primary,backgroundColor:a.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:a.text.primary,backgroundColor:a.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:a.background.default,minHeight:"52px"}},head:{style:{color:a.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:a.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:a.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:a.context.background,fontSize:"18px",fontWeight:400,color:a.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:a.text.primary,backgroundColor:a.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:a.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:a.selected.text,backgroundColor:a.selected.default,borderBottomColor:a.background.default}},highlightOnHoverStyle:{color:a.highlightOnHover.text,backgroundColor:a.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:a.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:a.background.default},stripedStyle:{color:a.striped.text,backgroundColor:a.striped.default}},expanderRow:{style:{color:a.text.primary,backgroundColor:a.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:a.button.default,fill:a.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:a.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:a.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:a.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:a.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:a.button.default,fill:a.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:a.button.disabled,fill:a.button.disabled},"&:hover:not(:disabled)":{backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}}},e);var a;})(Ze,Xe)),[Ze,Xe]),$t=React.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),kt=React.useMemo((()=>{if(Ie)return n;if((null==wt?void 0:wt.sortFunction)&&"function"==typeof wt.sortFunction){const e=wt.sortFunction,t=ft===l.ASC?e:(t,n)=>-1*e(t,n);return [...n].sort(t)}return function(e,t,n,o){return t?o&&"function"==typeof o?o(e.slice(0),t,n):e.slice(0).sort(((e,o)=>{const a=t(e),l=t(o);if("asc"===n){if(a<l)return -1;if(a>l)return 1}if("desc"===n){if(a>l)return -1;if(a<l)return 1}return 0})):e}(n,null==wt?void 0:wt.selector,ft,je)}),[Ie,wt,ft,n,je]),Pt=React.useMemo((()=>{if(se&&!M){const e=pt*ut,t=e-ut;return kt.slice(t,e)}return kt}),[pt,se,M,ut,kt]),Dt=React.useCallback((e=>{Ct(e);}),[]),Ht=React.useCallback((e=>{Ct(e);}),[]),Ft=React.useCallback((e=>{Ct(e);}),[]),jt=React.useCallback(((e,t)=>Oe(e,t)),[Oe]),It=React.useCallback(((e,t)=>$e(e,t)),[$e]),Tt=React.useCallback(((e,t)=>Pe(e,t)),[Pe]),Mt=React.useCallback(((e,t)=>De(e,t)),[De]),Lt=React.useCallback((e=>Ct({type:"CHANGE_PAGE",page:e,paginationServer:M,visibleOnly:E,persistSelectedOnPageChange:Rt})),[M,Rt,E]),At=React.useCallback((e=>{const t=c(A||Pt.length,e),n=g(pt,t);M||Lt(n),Ct({type:"CHANGE_ROWS_PER_PAGE",page:n,rowsPerPage:e});}),[pt,Lt,M,A,Pt.length]);if(se&&!M&&kt.length>0&&0===Pt.length){const e=c(kt.length,ut),t=g(pt,e);Lt(t);}Le((()=>{F({allSelected:mt,selectedCount:ht,selectedRows:bt.slice(0)});}),[xt]),Le((()=>{Fe(wt,ft,kt.slice(0));}),[wt,ft]),Le((()=>{T(pt,A||kt.length);}),[pt]),Le((()=>{I(ut,pt);}),[ut]),Le((()=>{Lt(_);}),[_,N]),Le((()=>{if(se&&M&&A>0){const e=c(A,ut),t=g(pt,e);pt!==t&&Lt(t);}}),[A]),React.useEffect((()=>{Ct({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Ke});}),[C,Ke]),React.useEffect((()=>{if(!O)return;const e=kt.filter((e=>O(e))),t=C?e.slice(0,1):e;Ct({type:"SELECT_MULTIPLE_ROWS",keyField:d,selectedRows:t,totalRows:kt.length,mergeSelections:vt});}),[n,O]);const _t=E?Pt:kt,Nt=Rt||C||S;return React.createElement(ThemeProvider,{theme:Ot},!le&&(!!i||!!s)&&React.createElement(pe,{title:i,actions:s,showMenu:!be,selectedCount:ht,direction:et,contextActions:he,contextComponent:Se,contextMessage:me}),de&&React.createElement(we,{align:ce,wrapContent:ge},ue),React.createElement(xe,Object.assign({$responsive:J,$fixedHeader:re,$fixedHeaderScrollHeight:ie,className:nt},$t),React.createElement(ye,null,Q&&!Z&&React.createElement(Ce,null,X),React.createElement(x$1,{disabled:te,className:"rdt_Table",role:"table"},!oe&&(!!Z||kt.length>0&&!Q)&&React.createElement(y,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:re},React.createElement(R$1,{className:"rdt_TableHeadRow",role:"row",$dense:h},f&&(Nt?React.createElement($,{style:{flex:"0 0 48px"}}):React.createElement(ae,{allSelected:mt,selectedRows:bt,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,rowData:_t,keyField:d,mergeSelections:vt,onSelectAllRows:Ht})),Ee&&!Ne&&React.createElement(Re,null),ot.map((t=>React.createElement(ne,{key:t.id,column:t,selectedColumn:wt,disabled:Q||0===kt.length,pagination:se,paginationServer:M,persistSelectedOnSort:yt,selectableRowsVisibleOnly:E,sortDirection:ft,sortIcon:He,sortServer:Ie,onSort:Dt,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st,draggingColumnId:at}))))),!kt.length&&!Q&&React.createElement(ve,null,ee),Q&&Z&&React.createElement(Ce,null,X),!Q&&kt.length>0&&React.createElement(fe,{className:"rdt_TableBody",role:"rowgroup"},Pt.map(((t,n)=>{const o=r(t,d),a=function(e=""){return "number"!=typeof e&&(!e||0===e.length)}(o)?n:o,l=b$1(t,bt,d),i=!!(Ee&&Be&&Be(t)),s=!!(Ee&&_e&&_e(t));return React.createElement(q$1,{id:a,key:a,keyField:d,"data-row-id":a,columns:ot,row:t,rowCount:kt.length,rowIndex:n,selectableRows:f,expandableRows:Ee,expandableIcon:j,highlightOnHover:p,pointerOnHover:m,dense:h,expandOnRowClicked:ze,expandOnRowDoubleClicked:We,expandableRowsComponent:Te,expandableRowsComponentProps:Ae,expandableRowsHideExpander:Ne,defaultExpanderDisabled:s,defaultExpanded:i,expandableInheritConditionalStyles:Ge,conditionalRowStyles:Je,selected:l,selectableRowsHighlight:v,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,selectableRowsSingle:C,striped:u,onRowExpandToggled:H,onRowClicked:jt,onRowDoubleClicked:It,onRowMouseEnter:Tt,onRowMouseLeave:Mt,onSelectedRow:Ft,draggingColumnId:at,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st})})))))),St&&React.createElement("div",null,React.createElement(Et,{onChangePage:Lt,onChangeRowsPerPage:At,rowCount:A||kt.length,currentPage:pt,rowsPerPage:ut,direction:et,paginationRowsPerPageOptions:W,paginationIconLastPage:B,paginationIconFirstPage:G,paginationIconNext:V,paginationIconPrevious:U,paginationComponentOptions:K})))}));
|
|
5443
|
+
`;var Me=React.memo((function({rowsPerPage:t,rowCount:n,currentPage:o,direction:a=ke.direction,paginationRowsPerPageOptions:l=ke.paginationRowsPerPageOptions,paginationIconLastPage:r=ke.paginationIconLastPage,paginationIconFirstPage:i=ke.paginationIconFirstPage,paginationIconNext:s=ke.paginationIconNext,paginationIconPrevious:d=ke.paginationIconPrevious,paginationComponentOptions:g=ke.paginationComponentOptions,onChangeRowsPerPage:u=ke.onChangeRowsPerPage,onChangePage:p=ke.onChangePage}){const b=(()=>{const t="object"==typeof window;function n(){return {width:t?window.innerWidth:void 0,height:t?window.innerHeight:void 0}}const[o,a]=React.useState(n);return React.useEffect((()=>{if(!t)return ()=>null;function e(){a(n());}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),o})(),m=le(a),h=b.width&&b.width>599,w=c(n,t),f=o*t,x=f-t+1,C=1===o,y=o===w,R=Object.assign(Object.assign({},Pe),g),v=o===w?`${x}-${n} ${R.rangeSeparatorText} ${n}`:`${x}-${f} ${R.rangeSeparatorText} ${n}`,S=React.useCallback((()=>p(o-1)),[o,p]),E=React.useCallback((()=>p(o+1)),[o,p]),O=React.useCallback((()=>p(1)),[p]),$=React.useCallback((()=>p(c(n,t))),[p,n,t]),k=React.useCallback((e=>u(Number(e.target.value),o)),[o,u]),P=l.map((t=>React.createElement("option",{key:t,value:t},t)));R.selectAllRowsItem&&P.push(React.createElement("option",{key:-1,value:n},R.selectAllRowsItemText));const D=React.createElement($e,{onChange:k,defaultValue:t,"aria-label":R.rowsPerPageText},P);return React.createElement(De,{className:"rdt_Pagination"},!R.noRowsPerPage&&h&&React.createElement(React.Fragment,null,React.createElement(Te,null,R.rowsPerPageText),D),h&&React.createElement(Ie,null,v),React.createElement(Fe,null,React.createElement(He,{id:"pagination-first-page",type:"button","aria-label":"First Page","aria-disabled":C,onClick:O,disabled:C,$isRTL:m},i),React.createElement(He,{id:"pagination-previous-page",type:"button","aria-label":"Previous Page","aria-disabled":C,onClick:S,disabled:C,$isRTL:m},d),!R.noRowsPerPage&&!h&&D,React.createElement(He,{id:"pagination-next-page",type:"button","aria-label":"Next Page","aria-disabled":y,onClick:E,disabled:y,$isRTL:m},s),React.createElement(He,{id:"pagination-last-page",type:"button","aria-label":"Last Page","aria-disabled":y,onClick:$,disabled:y,$isRTL:m},r)))}));const Le=(t,n)=>{const o=React.useRef(!0);React.useEffect((()=>{o.current?o.current=!1:t();}),n);};function Ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _e=function(e){return function(e){return !!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return "[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Ne}(e)}(e)};var Ne="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function ze(e,t){return !1!==t.clone&&t.isMergeableObject(e)?Ue((n=e,Array.isArray(n)?[]:{}),e,t):e;var n;}function We(e,t,n){return e.concat(t).map((function(e){return ze(e,n)}))}function Be(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function Ge(e,t){try{return t in e}catch(e){return !1}}function Ve(e,t,n){var o={};return n.isMergeableObject(e)&&Be(e).forEach((function(t){o[t]=ze(e[t],n);})),Be(t).forEach((function(a){(function(e,t){return Ge(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(Ge(e,a)&&n.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ue;var n=t.customMerge(e);return "function"==typeof n?n:Ue}(a,n)(e[a],t[a],n):o[a]=ze(t[a],n));})),o}function Ue(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||We,n.isMergeableObject=n.isMergeableObject||_e,n.cloneUnlessOtherwiseSpecified=ze;var o=Array.isArray(t);return o===Array.isArray(e)?o?n.arrayMerge(e,t,n):Ve(e,t,n):ze(t,n)}Ue.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Ue(e,n,t)}),{})};var Ye=Ae(Ue);const Ke={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"},background:{default:"#FFFFFF"},context:{background:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},divider:{default:"rgba(0,0,0,.12)"},button:{default:"rgba(0,0,0,.54)",focus:"rgba(0,0,0,.12)",hover:"rgba(0,0,0,.12)",disabled:"rgba(0, 0, 0, .18)"},selected:{default:"#e3f2fd",text:"rgba(0, 0, 0, 0.87)"},highlightOnHover:{default:"#EEEEEE",text:"rgba(0, 0, 0, 0.87)"},striped:{default:"#FAFAFA",text:"rgba(0, 0, 0, 0.87)"}},qe={default:Ke,light:Ke,dark:{text:{primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(0,0,0,.12)"},background:{default:"#424242"},context:{background:"#E91E63",text:"#FFFFFF"},divider:{default:"rgba(81, 81, 81, 1)"},button:{default:"#FFFFFF",focus:"rgba(255, 255, 255, .54)",hover:"rgba(255, 255, 255, .12)",disabled:"rgba(255, 255, 255, .18)"},selected:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},highlightOnHover:{default:"rgba(0, 0, 0, .7)",text:"#FFFFFF"},striped:{default:"rgba(0, 0, 0, .87)",text:"#FFFFFF"}}};function Qe(t,n,o,a){const[r,i]=React.useState((()=>d(t))),[s,c]=React.useState(""),g=React.useRef("");Le((()=>{i(d(t));}),[t]);const u=React.useCallback((e=>{var t,n,o;const{attributes:a}=e.target,l=null===(t=a.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;l&&(g.current=(null===(o=null===(n=r[m(r,l)])||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString())||"",c(g.current));}),[r]),p=React.useCallback((e=>{var t;const{attributes:o}=e.target,a=null===(t=o.getNamedItem("data-column-id"))||void 0===t?void 0:t.value;if(a&&g.current&&a!==g.current){const e=m(r,g.current),t=m(r,a),o=[...r];o[e]=r[t],o[t]=r[e],i(o),n(o);}}),[n,r]),b=React.useCallback((e=>{e.preventDefault();}),[]),h=React.useCallback((e=>{e.preventDefault();}),[]),w=React.useCallback((e=>{e.preventDefault(),g.current="",c("");}),[]),f=function(e=!1){return e?l.ASC:l.DESC}(a),x=React.useMemo((()=>r[m(r,null==o?void 0:o.toString())]||{}),[o,r]);return {tableColumns:r,draggingColumnId:s,handleDragStart:u,handleDragEnter:p,handleDragOver:b,handleDragLeave:h,handleDragEnd:w,defaultSortDirection:f,defaultSortColumn:x}}var Xe=React.memo((function(t){const{data:n=ke.data,columns:o=ke.columns,title:i=ke.title,actions:s=ke.actions,keyField:d=ke.keyField,striped:u=ke.striped,highlightOnHover:p=ke.highlightOnHover,pointerOnHover:m=ke.pointerOnHover,dense:h=ke.dense,selectableRows:f=ke.selectableRows,selectableRowsSingle:C=ke.selectableRowsSingle,selectableRowsHighlight:v=ke.selectableRowsHighlight,selectableRowsNoSelectAll:S=ke.selectableRowsNoSelectAll,selectableRowsVisibleOnly:E=ke.selectableRowsVisibleOnly,selectableRowSelected:O=ke.selectableRowSelected,selectableRowDisabled:k=ke.selectableRowDisabled,selectableRowsComponent:P=ke.selectableRowsComponent,selectableRowsComponentProps:D=ke.selectableRowsComponentProps,onRowExpandToggled:H=ke.onRowExpandToggled,onSelectedRowsChange:F=ke.onSelectedRowsChange,expandableIcon:j=ke.expandableIcon,onChangeRowsPerPage:I=ke.onChangeRowsPerPage,onChangePage:T=ke.onChangePage,paginationServer:M=ke.paginationServer,paginationServerOptions:L=ke.paginationServerOptions,paginationTotalRows:A=ke.paginationTotalRows,paginationDefaultPage:_=ke.paginationDefaultPage,paginationResetDefaultPage:N=ke.paginationResetDefaultPage,paginationPerPage:z=ke.paginationPerPage,paginationRowsPerPageOptions:W=ke.paginationRowsPerPageOptions,paginationIconLastPage:B=ke.paginationIconLastPage,paginationIconFirstPage:G=ke.paginationIconFirstPage,paginationIconNext:V=ke.paginationIconNext,paginationIconPrevious:U=ke.paginationIconPrevious,paginationComponent:Y=ke.paginationComponent,paginationComponentOptions:K=ke.paginationComponentOptions,responsive:J=ke.responsive,progressPending:Q=ke.progressPending,progressComponent:X=ke.progressComponent,persistTableHead:Z=ke.persistTableHead,noDataComponent:ee=ke.noDataComponent,disabled:te=ke.disabled,noTableHead:oe=ke.noTableHead,noHeader:le=ke.noHeader,fixedHeader:re=ke.fixedHeader,fixedHeaderScrollHeight:ie=ke.fixedHeaderScrollHeight,pagination:se=ke.pagination,subHeader:de=ke.subHeader,subHeaderAlign:ce=ke.subHeaderAlign,subHeaderWrap:ge=ke.subHeaderWrap,subHeaderComponent:ue=ke.subHeaderComponent,noContextMenu:be=ke.noContextMenu,contextMessage:me=ke.contextMessage,contextActions:he=ke.contextActions,contextComponent:Se=ke.contextComponent,expandableRows:Ee=ke.expandableRows,onRowClicked:Oe=ke.onRowClicked,onRowDoubleClicked:$e=ke.onRowDoubleClicked,onRowMouseEnter:Pe=ke.onRowMouseEnter,onRowMouseLeave:De=ke.onRowMouseLeave,sortIcon:He=ke.sortIcon,onSort:Fe=ke.onSort,sortFunction:je=ke.sortFunction,sortServer:Ie=ke.sortServer,expandableRowsComponent:Te=ke.expandableRowsComponent,expandableRowsComponentProps:Ae=ke.expandableRowsComponentProps,expandableRowDisabled:_e=ke.expandableRowDisabled,expandableRowsHideExpander:Ne=ke.expandableRowsHideExpander,expandOnRowClicked:ze=ke.expandOnRowClicked,expandOnRowDoubleClicked:We=ke.expandOnRowDoubleClicked,expandableRowExpanded:Be=ke.expandableRowExpanded,expandableInheritConditionalStyles:Ge=ke.expandableInheritConditionalStyles,defaultSortFieldId:Ve=ke.defaultSortFieldId,defaultSortAsc:Ue=ke.defaultSortAsc,clearSelectedRows:Ke=ke.clearSelectedRows,conditionalRowStyles:Je=ke.conditionalRowStyles,theme:Xe=ke.theme,customStyles:Ze=ke.customStyles,direction:et=ke.direction,onColumnOrderChange:tt=ke.onColumnOrderChange,className:nt}=t,{tableColumns:ot,draggingColumnId:at,handleDragStart:lt,handleDragEnter:rt,handleDragOver:it,handleDragLeave:st,handleDragEnd:dt,defaultSortDirection:ct,defaultSortColumn:gt}=Qe(o,tt,Ve,Ue),[{rowsPerPage:ut,currentPage:pt,selectedRows:bt,allSelected:mt,selectedCount:ht,selectedColumn:wt,sortDirection:ft,toggleOnSelectedRowsChange:xt},Ct]=React.useReducer(w$1,{allSelected:!1,selectedCount:0,selectedRows:[],selectedColumn:gt,toggleOnSelectedRowsChange:!1,sortDirection:ct,currentPage:_,rowsPerPage:z,selectedRowsFlag:!1,contextMessage:ke.contextMessage}),{persistSelectedOnSort:yt=!1,persistSelectedOnPageChange:Rt=!1}=L,vt=!(!M||!Rt&&!yt),St=se&&!Q&&n.length>0,Et=Y||Me,Ot=React.useMemo((()=>((e={},t="default",n="default")=>{const o=qe[t]?t:n;return Ye({table:{style:{color:(a=qe[o]).text.primary,backgroundColor:a.background.default}},tableWrapper:{style:{display:"table"}},responsiveWrapper:{style:{}},header:{style:{fontSize:"22px",color:a.text.primary,backgroundColor:a.background.default,minHeight:"56px",paddingLeft:"16px",paddingRight:"8px"}},subHeader:{style:{backgroundColor:a.background.default,minHeight:"52px"}},head:{style:{color:a.text.primary,fontSize:"12px",fontWeight:500}},headRow:{style:{backgroundColor:a.background.default,minHeight:"52px",borderBottomWidth:"1px",borderBottomColor:a.divider.default,borderBottomStyle:"solid"},denseStyle:{minHeight:"32px"}},headCells:{style:{paddingLeft:"16px",paddingRight:"16px"},draggingStyle:{cursor:"move"}},contextMenu:{style:{backgroundColor:a.context.background,fontSize:"18px",fontWeight:400,color:a.context.text,paddingLeft:"16px",paddingRight:"8px",transform:"translate3d(0, -100%, 0)",transitionDuration:"125ms",transitionTimingFunction:"cubic-bezier(0, 0, 0.2, 1)",willChange:"transform"},activeStyle:{transform:"translate3d(0, 0, 0)"}},cells:{style:{paddingLeft:"16px",paddingRight:"16px",wordBreak:"break-word"},draggingStyle:{}},rows:{style:{fontSize:"13px",fontWeight:400,color:a.text.primary,backgroundColor:a.background.default,minHeight:"48px","&:not(:last-of-type)":{borderBottomStyle:"solid",borderBottomWidth:"1px",borderBottomColor:a.divider.default}},denseStyle:{minHeight:"32px"},selectedHighlightStyle:{"&:nth-of-type(n)":{color:a.selected.text,backgroundColor:a.selected.default,borderBottomColor:a.background.default}},highlightOnHoverStyle:{color:a.highlightOnHover.text,backgroundColor:a.highlightOnHover.default,transitionDuration:"0.15s",transitionProperty:"background-color",borderBottomColor:a.background.default,outlineStyle:"solid",outlineWidth:"1px",outlineColor:a.background.default},stripedStyle:{color:a.striped.text,backgroundColor:a.striped.default}},expanderRow:{style:{color:a.text.primary,backgroundColor:a.background.default}},expanderCell:{style:{flex:"0 0 48px"}},expanderButton:{style:{color:a.button.default,fill:a.button.default,backgroundColor:"transparent",borderRadius:"2px",transition:"0.25s",height:"100%",width:"100%","&:hover:enabled":{cursor:"pointer"},"&:disabled":{color:a.button.disabled},"&:hover:not(:disabled)":{cursor:"pointer",backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus},svg:{margin:"auto"}}},pagination:{style:{color:a.text.secondary,fontSize:"13px",minHeight:"56px",backgroundColor:a.background.default,borderTopStyle:"solid",borderTopWidth:"1px",borderTopColor:a.divider.default},pageButtonsStyle:{borderRadius:"50%",height:"40px",width:"40px",padding:"8px",margin:"px",cursor:"pointer",transition:"0.4s",color:a.button.default,fill:a.button.default,backgroundColor:"transparent","&:disabled":{cursor:"unset",color:a.button.disabled,fill:a.button.disabled},"&:hover:not(:disabled)":{backgroundColor:a.button.hover},"&:focus":{outline:"none",backgroundColor:a.button.focus}}},noData:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}},progress:{style:{display:"flex",alignItems:"center",justifyContent:"center",color:a.text.primary,backgroundColor:a.background.default}}},e);var a;})(Ze,Xe)),[Ze,Xe]),$t=React.useMemo((()=>Object.assign({},"auto"!==et&&{dir:et})),[et]),kt=React.useMemo((()=>{if(Ie)return n;if((null==wt?void 0:wt.sortFunction)&&"function"==typeof wt.sortFunction){const e=wt.sortFunction,t=ft===l.ASC?e:(t,n)=>-1*e(t,n);return [...n].sort(t)}return function(e,t,n,o){return t?o&&"function"==typeof o?o(e.slice(0),t,n):e.slice(0).sort(((e,o)=>{const a=t(e),l=t(o);if("asc"===n){if(a<l)return -1;if(a>l)return 1}if("desc"===n){if(a>l)return -1;if(a<l)return 1}return 0})):e}(n,null==wt?void 0:wt.selector,ft,je)}),[Ie,wt,ft,n,je]),Pt=React.useMemo((()=>{if(se&&!M){const e=pt*ut,t=e-ut;return kt.slice(t,e)}return kt}),[pt,se,M,ut,kt]),Dt=React.useCallback((e=>{Ct(e);}),[]),Ht=React.useCallback((e=>{Ct(e);}),[]),Ft=React.useCallback((e=>{Ct(e);}),[]),jt=React.useCallback(((e,t)=>Oe(e,t)),[Oe]),It=React.useCallback(((e,t)=>$e(e,t)),[$e]),Tt=React.useCallback(((e,t)=>Pe(e,t)),[Pe]),Mt=React.useCallback(((e,t)=>De(e,t)),[De]),Lt=React.useCallback((e=>Ct({type:"CHANGE_PAGE",page:e,paginationServer:M,visibleOnly:E,persistSelectedOnPageChange:Rt})),[M,Rt,E]),At=React.useCallback((e=>{const t=c(A||Pt.length,e),n=g(pt,t);M||Lt(n),Ct({type:"CHANGE_ROWS_PER_PAGE",page:n,rowsPerPage:e});}),[pt,Lt,M,A,Pt.length]);if(se&&!M&&kt.length>0&&0===Pt.length){const e=c(kt.length,ut),t=g(pt,e);Lt(t);}Le((()=>{F({allSelected:mt,selectedCount:ht,selectedRows:bt.slice(0)});}),[xt]),Le((()=>{Fe(wt,ft,kt.slice(0));}),[wt,ft]),Le((()=>{T(pt,A||kt.length);}),[pt]),Le((()=>{I(ut,pt);}),[ut]),Le((()=>{Lt(_);}),[_,N]),Le((()=>{if(se&&M&&A>0){const e=c(A,ut),t=g(pt,e);pt!==t&&Lt(t);}}),[A]),React.useEffect((()=>{Ct({type:"CLEAR_SELECTED_ROWS",selectedRowsFlag:Ke});}),[C,Ke]),React.useEffect((()=>{if(!O)return;const e=kt.filter((e=>O(e))),t=C?e.slice(0,1):e;Ct({type:"SELECT_MULTIPLE_ROWS",keyField:d,selectedRows:t,totalRows:kt.length,mergeSelections:vt});}),[n,O]);const _t=E?Pt:kt,Nt=Rt||C||S;return React.createElement(ThemeProvider,{theme:Ot},!le&&(!!i||!!s)&&React.createElement(pe,{title:i,actions:s,showMenu:!be,selectedCount:ht,direction:et,contextActions:he,contextComponent:Se,contextMessage:me}),de&&React.createElement(we,{align:ce,wrapContent:ge},ue),React.createElement(xe,Object.assign({$responsive:J,$fixedHeader:re,$fixedHeaderScrollHeight:ie,className:nt},$t),React.createElement(ye,null,Q&&!Z&&React.createElement(Ce,null,X),React.createElement(x$1,{disabled:te,className:"rdt_Table",role:"table"},!oe&&(!!Z||kt.length>0&&!Q)&&React.createElement(y,{className:"rdt_TableHead",role:"rowgroup",$fixedHeader:re},React.createElement(R$1,{className:"rdt_TableHeadRow",role:"row",$dense:h},f&&(Nt?React.createElement($$1,{style:{flex:"0 0 48px"}}):React.createElement(ae,{allSelected:mt,selectedRows:bt,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,rowData:_t,keyField:d,mergeSelections:vt,onSelectAllRows:Ht})),Ee&&!Ne&&React.createElement(Re,null),ot.map((t=>React.createElement(ne,{key:t.id,column:t,selectedColumn:wt,disabled:Q||0===kt.length,pagination:se,paginationServer:M,persistSelectedOnSort:yt,selectableRowsVisibleOnly:E,sortDirection:ft,sortIcon:He,sortServer:Ie,onSort:Dt,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st,draggingColumnId:at}))))),!kt.length&&!Q&&React.createElement(ve,null,ee),Q&&Z&&React.createElement(Ce,null,X),!Q&&kt.length>0&&React.createElement(fe,{className:"rdt_TableBody",role:"rowgroup"},Pt.map(((t,n)=>{const o=r(t,d),a=function(e=""){return "number"!=typeof e&&(!e||0===e.length)}(o)?n:o,l=b$1(t,bt,d),i=!!(Ee&&Be&&Be(t)),s=!!(Ee&&_e&&_e(t));return React.createElement(q$1,{id:a,key:a,keyField:d,"data-row-id":a,columns:ot,row:t,rowCount:kt.length,rowIndex:n,selectableRows:f,expandableRows:Ee,expandableIcon:j,highlightOnHover:p,pointerOnHover:m,dense:h,expandOnRowClicked:ze,expandOnRowDoubleClicked:We,expandableRowsComponent:Te,expandableRowsComponentProps:Ae,expandableRowsHideExpander:Ne,defaultExpanderDisabled:s,defaultExpanded:i,expandableInheritConditionalStyles:Ge,conditionalRowStyles:Je,selected:l,selectableRowsHighlight:v,selectableRowsComponent:P,selectableRowsComponentProps:D,selectableRowDisabled:k,selectableRowsSingle:C,striped:u,onRowExpandToggled:H,onRowClicked:jt,onRowDoubleClicked:It,onRowMouseEnter:Tt,onRowMouseLeave:Mt,onSelectedRow:Ft,draggingColumnId:at,onDragStart:lt,onDragOver:it,onDragEnd:dt,onDragEnter:rt,onDragLeave:st})})))))),St&&React.createElement("div",null,React.createElement(Et,{onChangePage:Lt,onChangeRowsPerPage:At,rowCount:A||kt.length,currentPage:pt,rowsPerPage:ut,direction:et,paginationRowsPerPageOptions:W,paginationIconLastPage:B,paginationIconFirstPage:G,paginationIconNext:V,paginationIconPrevious:U,paginationComponentOptions:K})))}));
|
|
5444
5444
|
|
|
5445
5445
|
const LoadingComponent = () => {
|
|
5446
5446
|
return jsx("div", { className: "table-loading", children: "Loading..." });
|
|
@@ -5461,8 +5461,9 @@ function withLabel(WrappedComponent) {
|
|
|
5461
5461
|
return forwardRef(WithLabelComponent);
|
|
5462
5462
|
}
|
|
5463
5463
|
|
|
5464
|
-
const DisplayFormError = (
|
|
5465
|
-
|
|
5464
|
+
const DisplayFormError = (_a) => {
|
|
5465
|
+
var { message } = _a, rest = __rest(_a, ["message"]);
|
|
5466
|
+
return (jsx("p", Object.assign({ className: "form-errors" }, rest, { children: message })));
|
|
5466
5467
|
};
|
|
5467
5468
|
|
|
5468
5469
|
const Input = React__default.forwardRef((_a, ref) => {
|
|
@@ -5471,11 +5472,11 @@ const Input = React__default.forwardRef((_a, ref) => {
|
|
|
5471
5472
|
const handleClear = () => {
|
|
5472
5473
|
onChange === null || onChange === void 0 ? void 0 : onChange({ target: { value: '' } });
|
|
5473
5474
|
};
|
|
5474
|
-
const inputClasses =
|
|
5475
|
+
const inputClasses = y$1('input', {
|
|
5475
5476
|
error: hasErrors,
|
|
5476
5477
|
'input--has-icon': iconName,
|
|
5477
5478
|
}, className);
|
|
5478
|
-
return (jsxs(Fragment, { children: [jsxs("div", { className: "input-wrapper", children: [iconName && (jsx(Icon, { name: iconName, "data-testid": `${name}-embedded-icon`, className: "embedded-icon" })), jsx("input", Object.assign({ ref: ref, id: id, "data-testid": `form-input-${name}`, name: name, type: "text", disabled: isDisabled, placeholder: placeholder, readOnly: readonly, onChange: onChange, onBlur: onBlur, maxLength: maxLength, onKeyDown: onKeyDown, className: inputClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired }, rest)), isClearable && !isDisabled && (jsx(Icon, { name: "x-close", "data-testid": `${name}-clearable-icon`, size: "sm", onClick: handleClear, className: "clearable-icon" }))] }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
|
|
5479
|
+
return (jsxs(Fragment, { children: [jsxs("div", { className: "input-wrapper", children: [iconName && (jsx(Icon, { name: iconName, "data-testid": `${name}-embedded-icon`, className: "embedded-icon" })), jsx("input", Object.assign({ ref: ref, id: id, "data-testid": `form-input-${name}`, name: name, type: "text", disabled: isDisabled, placeholder: placeholder, readOnly: readonly, onChange: onChange, onBlur: onBlur, maxLength: maxLength, onKeyDown: onKeyDown, className: inputClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired }, rest)), isClearable && !isDisabled && (jsx(Icon, { name: "x-close", "data-testid": `${name}-clearable-icon`, size: "sm", onClick: handleClear, className: "clearable-icon" }))] }), hasErrors && jsx(DisplayFormError, { "data-testid": `${name}-error`, message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
|
|
5479
5480
|
});
|
|
5480
5481
|
const LabeledInput = withLabel(Input);
|
|
5481
5482
|
|
|
@@ -5483,7 +5484,7 @@ const Pagination = (_a) => {
|
|
|
5483
5484
|
var { totalPages, currentPage = 1, onChange, className } = _a, rest = __rest(_a, ["totalPages", "currentPage", "onChange", "className"]);
|
|
5484
5485
|
const [inputValue, setInputValue] = useState(currentPage.toString());
|
|
5485
5486
|
const totalPagesText = `of ${totalPages}`;
|
|
5486
|
-
const classes =
|
|
5487
|
+
const classes = y$1('pagination', className);
|
|
5487
5488
|
useEffect(() => {
|
|
5488
5489
|
setInputValue(currentPage.toString());
|
|
5489
5490
|
}, [currentPage]);
|
|
@@ -5514,7 +5515,7 @@ const Pagination = (_a) => {
|
|
|
5514
5515
|
const isNextButtonDisabled = currentPage === totalPages;
|
|
5515
5516
|
const isPreviousButtonDisabled = currentPage === 1;
|
|
5516
5517
|
const hasError = Number(inputValue) > totalPages || Number(inputValue) < 1;
|
|
5517
|
-
return (jsx("div", Object.assign({ className: classes }, rest, { children: jsx(Container, { children: jsxs(Row, { gutterWidth: 12, align: "center", children: [jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__previous", children: jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled }) }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__current-page", children: jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className:
|
|
5518
|
+
return (jsx("div", Object.assign({ className: classes }, rest, { children: jsx(Container, { children: jsxs(Row, { gutterWidth: 12, align: "center", children: [jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__previous", children: jsx(Button$1, { "data-testid": "pagination-previous-button", ariaLabel: "Previous Page", variant: "link", onClick: handlePreviousPage, iconLeft: "chevron-left", isDisabled: isPreviousButtonDisabled }) }) }), jsx(Col, { xs: "content", children: jsx("div", { className: "pagination__current-page", children: jsx(LabeledInput, { "data-testid": "pagination-current-page-input", className: y$1('pagination__current-page-input', {
|
|
5518
5519
|
'has-error': hasError,
|
|
5519
5520
|
}), value: inputValue, name: "currentPage", label: "Current Page", hasHiddenLabel: true, onKeyDown: (e) => {
|
|
5520
5521
|
if (e.key === 'Enter') {
|
|
@@ -5762,11 +5763,11 @@ const Table = (props) => {
|
|
|
5762
5763
|
const { responsive = true, direction = 'auto', keyField = 'id', striped = false, noDataComponent = 'built-in', isDisabled, isLoading, isFullHeight = false, subHeaderAlign = 'left', className, paginationTotalRows, totalEntriesText, data, columns: initialColumns, canPinColumns = false, onPinnedColumnsChange } = props, rest = __rest(props, ["responsive", "direction", "keyField", "striped", "noDataComponent", "isDisabled", "isLoading", "isFullHeight", "subHeaderAlign", "className", "paginationTotalRows", "totalEntriesText", "data", "columns", "canPinColumns", "onPinnedColumnsChange"]);
|
|
5763
5764
|
// Turns on/off column pinning.
|
|
5764
5765
|
const { columnsWithPinning } = usePinnedColumnsManager(initialColumns, canPinColumns, onPinnedColumnsChange);
|
|
5765
|
-
const combinedClassName =
|
|
5766
|
+
const combinedClassName = y$1(className, {
|
|
5766
5767
|
'table--striped': striped,
|
|
5767
5768
|
'table-body': true,
|
|
5768
5769
|
});
|
|
5769
|
-
const tableWrapperClassName =
|
|
5770
|
+
const tableWrapperClassName = y$1('table', {
|
|
5770
5771
|
'table--full-height': isFullHeight,
|
|
5771
5772
|
});
|
|
5772
5773
|
return (jsx("div", { className: tableWrapperClassName, "data-testid": "table", children: jsx(Xe, Object.assign({ data: data, columns: columnsWithPinning, responsive: responsive, direction: direction, subHeaderAlign: subHeaderAlign, keyField: keyField, striped: striped, className: combinedClassName, disabled: isDisabled, noDataComponent: noDataComponent, progressPending: isLoading, progressComponent: jsx(LoadingComponent, {}), pagination: true, paginationComponent: (props) => (jsx(TablePagination$1, Object.assign({}, props, { totalEntriesText: totalEntriesText }))), paginationTotalRows: paginationTotalRows, highlightOnHover: true, pointerOnHover: true }, rest)) }));
|
|
@@ -5790,7 +5791,7 @@ const Toggle = React__default.forwardRef((_a, ref) => {
|
|
|
5790
5791
|
const Textarea = React__default.forwardRef((_a, ref) => {
|
|
5791
5792
|
var { label, name, placeholder, value, onChange, onKeyDown, isRequired, isDisabled, errorMessage, helpText, hasHiddenLabel, rows, cols, readonly, wrap, form, maxLength, autofocus, defaultValue } = _a, rest = __rest(_a, ["label", "name", "placeholder", "value", "onChange", "onKeyDown", "isRequired", "isDisabled", "errorMessage", "helpText", "hasHiddenLabel", "rows", "cols", "readonly", "wrap", "form", "maxLength", "autofocus", "defaultValue"]);
|
|
5792
5793
|
const hasErrors = errorMessage && errorMessage.length > 0;
|
|
5793
|
-
const textareaClasses =
|
|
5794
|
+
const textareaClasses = y$1('textarea', { error: hasErrors });
|
|
5794
5795
|
return (jsxs(Fragment, { children: [jsx("div", { className: "textarea-wrapper", children: jsx("textarea", Object.assign({ ref: ref, rows: rows, cols: cols, autoFocus: autofocus, wrap: wrap, form: form, maxLength: maxLength, readOnly: readonly, "data-testid": `form-textarea-${name}`, name: name, disabled: isDisabled, placeholder: placeholder, onChange: onChange, onKeyDown: onKeyDown, className: textareaClasses, "aria-invalid": hasErrors ? true : undefined, "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired, value: value, defaultValue: defaultValue }, rest)) }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
|
|
5795
5796
|
});
|
|
5796
5797
|
const LabeledTextarea = withLabel(Textarea);
|
|
@@ -5802,7 +5803,7 @@ const PasswordInput = React__default.forwardRef((_a, ref) => {
|
|
|
5802
5803
|
const handleShowPassword = () => {
|
|
5803
5804
|
setShowPassword((prevShowPassword) => !prevShowPassword);
|
|
5804
5805
|
};
|
|
5805
|
-
const inputClasses =
|
|
5806
|
+
const inputClasses = y$1('password-input', {
|
|
5806
5807
|
error: hasErrors,
|
|
5807
5808
|
}, 'password-input--has-icon');
|
|
5808
5809
|
return (jsxs(Fragment, { children: [jsxs("div", { className: "password-input-wrapper", children: [jsx(Icon, { name: "lock", "data-testid": `${name}-embedded-icon`, className: "embedded-icon" }), jsx("input", Object.assign({ ref: ref, "data-testid": `form-password-input-${name}`, name: name, type: showPassword ? 'text' : 'password', disabled: isDisabled, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown, className: inputClasses, "aria-invalid": hasErrors ? 'true' : 'false', "aria-describedby": hasErrors || helpText ? `${name}-helper` : undefined, "aria-required": isRequired }, rest)), hasShowPassword && (jsx(Icon, { name: showPassword ? 'fa-eye-slash' : 'eye', "data-testid": `${name}-${showPassword ? 'hide' : 'show'}-password-icon`, size: "md", onClick: handleShowPassword, className: "toggle-show-password-icon" }))] }), hasErrors && jsx(DisplayFormError, { message: errorMessage }), helpText && (jsx("div", { "data-testid": `${name}-help-text`, className: "help-text", id: `${name}-helper`, children: helpText }))] }));
|
|
@@ -5820,7 +5821,7 @@ const Select$1 = (_a) => {
|
|
|
5820
5821
|
Option: OptionComponent,
|
|
5821
5822
|
};
|
|
5822
5823
|
const mergedComponents = Object.assign(Object.assign({}, defaultComponents), customComponents);
|
|
5823
|
-
return (jsx(ReactSelect, Object.assign({ classNamePrefix: classNamePrefix, className:
|
|
5824
|
+
return (jsx(ReactSelect, Object.assign({ classNamePrefix: classNamePrefix, className: y$1('select-wrapper', className), components: mergedComponents }, props)));
|
|
5824
5825
|
};
|
|
5825
5826
|
|
|
5826
5827
|
/**
|
|
@@ -11833,38 +11834,114 @@ const getCommonProps = (props) => {
|
|
|
11833
11834
|
});
|
|
11834
11835
|
};
|
|
11835
11836
|
|
|
11836
|
-
const
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11837
|
+
const formatTimeValue = (value) => {
|
|
11838
|
+
if (!value || value.trim() === '') {
|
|
11839
|
+
return '';
|
|
11840
|
+
}
|
|
11841
|
+
// Normalize the input
|
|
11842
|
+
const normalizedValue = value.trim().toLowerCase();
|
|
11843
|
+
// Extract time components using regex
|
|
11844
|
+
const timeRegex = /^(0?[1-9]|1[0-2]):([0-5][0-9])(\s*)([ap]m)$/i;
|
|
11845
|
+
const matches = normalizedValue.match(timeRegex);
|
|
11846
|
+
if (matches) {
|
|
11847
|
+
const hours = parseInt(matches[1], 10);
|
|
11848
|
+
const minutes = parseInt(matches[2], 10);
|
|
11849
|
+
const period = matches[4].toUpperCase(); // Convert am/pm to AM/PM
|
|
11850
|
+
// Format as hh:mm AM/PM
|
|
11851
|
+
return `${hours}:${minutes < 10 ? '0' + minutes : minutes} ${period}`;
|
|
11852
|
+
}
|
|
11853
|
+
return value; // Return original if no match (shouldn't happen with valid inputs)
|
|
11854
|
+
};
|
|
11855
|
+
const validateInputValue = (value) => {
|
|
11856
|
+
if (!value || value.trim() === '') {
|
|
11857
|
+
return ''; // Empty input is allowed
|
|
11858
|
+
}
|
|
11859
|
+
// Normalize the input (remove extra spaces, convert to lowercase)
|
|
11860
|
+
const normalizedValue = value.trim().toLowerCase();
|
|
11861
|
+
// Regular expression for valid time formats: 1:10 pm, 01:10 pm, 1:10pm, 01:10pm
|
|
11862
|
+
const timeRegex = /^(0?[1-9]|1[0-2]):([0-5][0-9])(\s*)([ap]m)$/i;
|
|
11863
|
+
if (!timeRegex.test(normalizedValue)) {
|
|
11864
|
+
// Check if the issue might be a 24-hour format
|
|
11865
|
+
const hour24Regex = /^([13-9]|1[3-9]|2[0-3]):/i;
|
|
11866
|
+
if (hour24Regex.test(normalizedValue)) {
|
|
11867
|
+
return 'Please enter time in 12-hour format (e.g., 1:10 pm)';
|
|
11850
11868
|
}
|
|
11851
|
-
|
|
11852
|
-
|
|
11869
|
+
return 'Please enter a valid time format (e.g., 1:10 pm)';
|
|
11870
|
+
}
|
|
11871
|
+
// Extract hours and minutes for additional validation
|
|
11872
|
+
const matches = normalizedValue.match(timeRegex);
|
|
11873
|
+
if (matches) {
|
|
11874
|
+
const hours = parseInt(matches[1], 10);
|
|
11875
|
+
const minutes = parseInt(matches[2], 10);
|
|
11876
|
+
if (hours < 1 || hours > 12) {
|
|
11877
|
+
return 'Hours must be between 1 and 12';
|
|
11878
|
+
}
|
|
11879
|
+
if (minutes < 0 || minutes > 59) {
|
|
11880
|
+
return 'Minutes must be between 0 and 59';
|
|
11881
|
+
}
|
|
11882
|
+
}
|
|
11883
|
+
return ''; // Valid time format
|
|
11853
11884
|
};
|
|
11854
11885
|
|
|
11855
|
-
const
|
|
11856
|
-
|
|
11857
|
-
const
|
|
11858
|
-
const
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11886
|
+
const TimePicker = ({ timeValue = '', label = 'Time Picker', name = 'time-picker', hasHiddenLabel = false, onTimeChange, }) => {
|
|
11887
|
+
const [validationError, setValidationError] = useState('');
|
|
11888
|
+
const [inputValue, setInputValue] = useState(timeValue);
|
|
11889
|
+
const handleTimeChange = (e) => {
|
|
11890
|
+
const newValue = e.target.value;
|
|
11891
|
+
const error = validateInputValue(newValue);
|
|
11892
|
+
setInputValue(newValue);
|
|
11893
|
+
setValidationError(error);
|
|
11894
|
+
// Only send valid values to parent component
|
|
11895
|
+
if (!error || error === '') {
|
|
11896
|
+
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(newValue);
|
|
11897
|
+
}
|
|
11898
|
+
};
|
|
11899
|
+
const handleBlur = (e) => {
|
|
11900
|
+
const currentValue = e.target.value;
|
|
11901
|
+
// Only format if there's no validation error
|
|
11902
|
+
if (validationError === '' && currentValue.trim() !== '') {
|
|
11903
|
+
const formattedValue = formatTimeValue(currentValue);
|
|
11904
|
+
setInputValue(formattedValue);
|
|
11905
|
+
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(formattedValue);
|
|
11906
|
+
}
|
|
11907
|
+
};
|
|
11908
|
+
return (jsx("div", { className: "time-input-wrapper", children: jsx(LabeledInput, { "data-testid": `${name}-input`, label: label, hasHiddenLabel: hasHiddenLabel, value: inputValue, maxLength: 8, onChange: handleTimeChange, onBlur: handleBlur, name: name, errorMessage: validationError }) }));
|
|
11862
11909
|
};
|
|
11863
11910
|
|
|
11864
|
-
const
|
|
11865
|
-
|
|
11866
|
-
const
|
|
11867
|
-
|
|
11911
|
+
const DatePicker = (props) => {
|
|
11912
|
+
const { mode = 'single', className, captionLayout = 'dropdown', selected, hasTimePicker = false, id, month, defaultMonth, startMonth, endMonth, components, numberOfMonths, isDisabled, formatters, weekStartsOn, firstWeekContainsDate, today, timeValue, isRequired, min, max, onTimeChange, onSelect, onMonthChange, onNextClick, onPrevClick, onDayClick } = props, rest = __rest(props, ["mode", "className", "captionLayout", "selected", "hasTimePicker", "id", "month", "defaultMonth", "startMonth", "endMonth", "components", "numberOfMonths", "isDisabled", "formatters", "weekStartsOn", "firstWeekContainsDate", "today", "timeValue", "isRequired", "min", "max", "onTimeChange", "onSelect", "onMonthChange", "onNextClick", "onPrevClick", "onDayClick"]);
|
|
11913
|
+
const futureDateByYear = (year) => new Date(new Date().getFullYear() + year, 11, 31);
|
|
11914
|
+
const endMonthDefault = endMonth !== null && endMonth !== void 0 ? endMonth : futureDateByYear(5);
|
|
11915
|
+
const modeMap = {
|
|
11916
|
+
single: {
|
|
11917
|
+
mode: 'single',
|
|
11918
|
+
numberOfMonths: numberOfMonths !== null && numberOfMonths !== void 0 ? numberOfMonths : 1,
|
|
11919
|
+
selected: selected,
|
|
11920
|
+
onSelect: onSelect,
|
|
11921
|
+
endMonth: endMonthDefault,
|
|
11922
|
+
},
|
|
11923
|
+
multiple: {
|
|
11924
|
+
mode: 'multiple',
|
|
11925
|
+
numberOfMonths: numberOfMonths !== null && numberOfMonths !== void 0 ? numberOfMonths : 1,
|
|
11926
|
+
selected: selected,
|
|
11927
|
+
onSelect: onSelect,
|
|
11928
|
+
endMonth: endMonthDefault,
|
|
11929
|
+
},
|
|
11930
|
+
range: {
|
|
11931
|
+
mode: 'range',
|
|
11932
|
+
numberOfMonths: numberOfMonths !== null && numberOfMonths !== void 0 ? numberOfMonths : 2,
|
|
11933
|
+
selected: selected,
|
|
11934
|
+
onSelect: onSelect,
|
|
11935
|
+
endMonth: endMonthDefault,
|
|
11936
|
+
},
|
|
11937
|
+
};
|
|
11938
|
+
const modeProps = modeMap[mode];
|
|
11939
|
+
const commonProps = getCommonProps(props);
|
|
11940
|
+
const handleTimeChange = (time) => {
|
|
11941
|
+
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(time);
|
|
11942
|
+
};
|
|
11943
|
+
const finalProps = Object.assign(Object.assign(Object.assign({}, commonProps), rest), modeProps);
|
|
11944
|
+
return (jsxs(Fragment, { children: [hasTimePicker && (jsx("div", { className: "time-picker-wrapper", children: jsxs(Row, { align: "center", children: [jsx(Col, { xs: "content", children: jsx("p", { className: "ma-0", children: "Select Time" }) }), jsx(Col, { children: jsx(TimePicker, { timeValue: timeValue !== null && timeValue !== void 0 ? timeValue : '', onTimeChange: handleTimeChange }) })] }) })), jsx(DayPicker, Object.assign({}, finalProps))] }));
|
|
11868
11945
|
};
|
|
11869
11946
|
|
|
11870
11947
|
function getNodeName$1(node) {
|
|
@@ -13567,15 +13644,6 @@ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: con
|
|
|
13567
13644
|
(isPortal ? (jsx(FloatingPortal, { id: portalOptions === null || portalOptions === void 0 ? void 0 : portalOptions.rootId, children: tooltipContent })) : (tooltipContent))] }));
|
|
13568
13645
|
}
|
|
13569
13646
|
|
|
13570
|
-
function Menu(_a) {
|
|
13571
|
-
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
13572
|
-
return (jsx("div", Object.assign({ className: classNames('menu', className) }, rest, { children: React__default.Children.map(children, (child) => React__default.isValidElement(child)
|
|
13573
|
-
? React__default.cloneElement(child, {
|
|
13574
|
-
className: classNames(child.props.className, 'menu-item'),
|
|
13575
|
-
})
|
|
13576
|
-
: child) })));
|
|
13577
|
-
}
|
|
13578
|
-
|
|
13579
13647
|
const IconTriggerDatePicker = (props) => {
|
|
13580
13648
|
const { ariaLabel, className, isDisabled, disableBeforeDate, disableAfterDate, id, label, onSelect, selected, triggerIcon, triggerIconSize, mode, isOpen, clearOnClose, initialMonth } = props, rest = __rest(props, ["ariaLabel", "className", "isDisabled", "disableBeforeDate", "disableAfterDate", "id", "label", "onSelect", "selected", "triggerIcon", "triggerIconSize", "mode", "isOpen", "clearOnClose", "initialMonth"]);
|
|
13581
13649
|
const [localMonth, setLocalMonth] = useState(initialMonth !== null && initialMonth !== void 0 ? initialMonth : new Date());
|
|
@@ -19023,6 +19091,66 @@ function SingleInputDatePicker(props) {
|
|
|
19023
19091
|
return (jsxs(FloatUI, { isOpen: isOpen, ariaLabel: ariaLabel, children: [jsx(LabeledInput, { id: inputId, value: localTextValue, placeholder: inputPlaceholder, isDisabled: isDisabled, iconName: inputIconName, isClearable: isClearable, onChange: handleInputChange, errorMessage: errorMessage, label: 'Single Date Picker', name: 'Date Picker' }), jsx(DatePicker, Object.assign({ captionLayout: captionLayout, mode: "single", selected: selected, onSelect: handleDayPickerSelect, month: localMonth, onMonthChange: setLocalMonth }, rest))] }));
|
|
19024
19092
|
}
|
|
19025
19093
|
|
|
19094
|
+
const Form = (_a) => {
|
|
19095
|
+
var { children, onSubmit, action, method, target, autocomplete, noValidate, enctype, rel } = _a, rest = __rest(_a, ["children", "onSubmit", "action", "method", "target", "autocomplete", "noValidate", "enctype", "rel"]);
|
|
19096
|
+
const handleSubmit = (e) => {
|
|
19097
|
+
e.preventDefault(); // Prevent the default form submission
|
|
19098
|
+
// Create a FormData object, passing in the form (e.currentTarget)
|
|
19099
|
+
const formData = new FormData(e.currentTarget);
|
|
19100
|
+
// Convert FormData into a plain object
|
|
19101
|
+
const formObject = Array.from(formData.entries()).reduce((obj, [key, value]) => {
|
|
19102
|
+
obj[key] = value.toString();
|
|
19103
|
+
return obj;
|
|
19104
|
+
}, {});
|
|
19105
|
+
// Call the onSubmit prop, if provided, passing the form object instead of the event
|
|
19106
|
+
if (onSubmit) {
|
|
19107
|
+
onSubmit(formObject); // Modified to pass formObject instead of e
|
|
19108
|
+
}
|
|
19109
|
+
};
|
|
19110
|
+
return (jsx("form", Object.assign({ onSubmit: handleSubmit, action: action, method: method, target: target, autoComplete: autocomplete, noValidate: noValidate, encType: enctype, rel: rel }, rest, { children: children })));
|
|
19111
|
+
};
|
|
19112
|
+
|
|
19113
|
+
const Skeleton = (_a) => {
|
|
19114
|
+
var { className, height, width, isCircle, isFullHeight } = _a, rest = __rest(_a, ["className", "height", "width", "isCircle", "isFullHeight"]);
|
|
19115
|
+
const dynamicStyle = Object.assign(Object.assign({}, (height && { height: typeof height === 'number' ? `${height}px` : height })), (width && { width: typeof width === 'number' ? `${width}px` : width }));
|
|
19116
|
+
const circleClass = isCircle ? 'skeleton--circle' : '';
|
|
19117
|
+
const fullHeightClass = isFullHeight ? 'skeleton--full-height' : '';
|
|
19118
|
+
const combinedClassName = `skeleton ${circleClass} ${fullHeightClass} ${className || ''}`.trim();
|
|
19119
|
+
return jsx("div", Object.assign({ className: combinedClassName, style: dynamicStyle }, rest));
|
|
19120
|
+
};
|
|
19121
|
+
|
|
19122
|
+
const Card = (_a) => {
|
|
19123
|
+
var { className = '', children, title, subtitle, hasBoxShadow = false } = _a, rest = __rest(_a, ["className", "children", "title", "subtitle", "hasBoxShadow"]);
|
|
19124
|
+
const cardClasses = y$1('card', { 'card--box-shadow': hasBoxShadow }, className);
|
|
19125
|
+
return (jsxs("div", Object.assign({ className: cardClasses }, rest, { children: [(title || subtitle) && (jsxs("div", { className: "card__header", children: [title && jsx("h2", { children: title }), subtitle && jsx("p", { children: subtitle })] })), jsx("div", { className: "card__content", children: children })] })));
|
|
19126
|
+
};
|
|
19127
|
+
|
|
19128
|
+
function Menu(_a) {
|
|
19129
|
+
var { children, className } = _a, rest = __rest(_a, ["children", "className"]);
|
|
19130
|
+
return (jsx("div", Object.assign({ className: y$1('menu', className) }, rest, { children: React__default.Children.map(children, (child) => React__default.isValidElement(child)
|
|
19131
|
+
? React__default.cloneElement(child, {
|
|
19132
|
+
className: y$1(child.props.className, 'menu-item'),
|
|
19133
|
+
})
|
|
19134
|
+
: child) })));
|
|
19135
|
+
}
|
|
19136
|
+
|
|
19137
|
+
const Pill = (_a) => {
|
|
19138
|
+
var { children, className, color = 'info', size = 'sm' } = _a, rest = __rest(_a, ["children", "className", "color", "size"]);
|
|
19139
|
+
const pillClasses = y$1('pill', className, {
|
|
19140
|
+
[`pill--${color}`]: color,
|
|
19141
|
+
[`pill--${size}`]: size,
|
|
19142
|
+
});
|
|
19143
|
+
return (jsx("div", Object.assign({ className: pillClasses }, rest, { children: children })));
|
|
19144
|
+
};
|
|
19145
|
+
|
|
19146
|
+
const Badge = (_a) => {
|
|
19147
|
+
var { className = '', children, size = 'md', string } = _a, rest = __rest(_a, ["className", "children", "size", "string"]);
|
|
19148
|
+
const badgeClasses = y$1('badge', {
|
|
19149
|
+
[`badge--${size}`]: size,
|
|
19150
|
+
}, className);
|
|
19151
|
+
return (jsx("div", Object.assign({ className: badgeClasses }, rest, { children: string ? jsx("p", { children: string }) : children })));
|
|
19152
|
+
};
|
|
19153
|
+
|
|
19026
19154
|
var lib = {exports: {}};
|
|
19027
19155
|
|
|
19028
19156
|
var Modal$2 = {};
|
|
@@ -20845,19 +20973,11 @@ const Modal = (_a) => {
|
|
|
20845
20973
|
var { className = '', children, isOpen, onRequestClose, portalClassName, overlayClassName, appElement = document.getElementById('theme-root') ||
|
|
20846
20974
|
document.getElementById('root') ||
|
|
20847
20975
|
document.body, shouldCloseOnOverlayClick, shouldCloseOnEsc, testId, contentElement, overlayElement, position = 'center', parentSelector } = _a, rest = __rest(_a, ["className", "children", "isOpen", "onRequestClose", "portalClassName", "overlayClassName", "appElement", "shouldCloseOnOverlayClick", "shouldCloseOnEsc", "testId", "contentElement", "overlayElement", "position", "parentSelector"]);
|
|
20848
|
-
const modalClasses =
|
|
20849
|
-
const overlayClasses =
|
|
20976
|
+
const modalClasses = y$1('modal', `modal--${position}`, className);
|
|
20977
|
+
const overlayClasses = y$1('modal-overlay', overlayClassName);
|
|
20850
20978
|
return (jsx(ReactModal, Object.assign({ style: {}, className: modalClasses, overlayClassName: overlayClasses, testId: testId, isOpen: isOpen, onRequestClose: onRequestClose, portalClassName: portalClassName, appElement: appElement, parentSelector: parentSelector, shouldCloseOnOverlayClick: shouldCloseOnOverlayClick, shouldCloseOnEsc: shouldCloseOnEsc, contentElement: contentElement, overlayElement: overlayElement }, rest, { children: jsxs("div", { className: "modal-content", children: [jsx(Button$1, { className: "modal-close-button", onClick: onRequestClose, variant: "link", size: "md", iconLeft: "x-close", ariaLabel: "Close" }), jsx("div", { className: "modal-body", children: children })] }) })));
|
|
20851
20979
|
};
|
|
20852
20980
|
|
|
20853
|
-
const Badge = (_a) => {
|
|
20854
|
-
var { className = '', children, size = 'md', string } = _a, rest = __rest(_a, ["className", "children", "size", "string"]);
|
|
20855
|
-
const badgeClasses = classNames('badge', {
|
|
20856
|
-
[`badge--${size}`]: size,
|
|
20857
|
-
}, className);
|
|
20858
|
-
return (jsx("div", Object.assign({ className: badgeClasses }, rest, { children: string ? jsx("p", { children: string }) : children })));
|
|
20859
|
-
};
|
|
20860
|
-
|
|
20861
20981
|
/**
|
|
20862
20982
|
* table-core
|
|
20863
20983
|
*
|
|
@@ -23870,7 +23990,7 @@ function ActionBar({ table, TableActions, className, children, }) {
|
|
|
23870
23990
|
row.toggleSelected(false);
|
|
23871
23991
|
});
|
|
23872
23992
|
};
|
|
23873
|
-
return (jsx(Card, { className:
|
|
23993
|
+
return (jsx(Card, { className: y$1('tanstack-table__action-bar', className), children: children !== null && children !== void 0 ? children : (jsx("div", { className: "tanstack-table__action-bar__container", children: TableActions && (jsx("div", { className: "tanstack-table__action-bar__button-container", children: jsx(TableActions, { selectedItems: selectedItems, unselectRows: unselectRows }) })) })) }));
|
|
23874
23994
|
}
|
|
23875
23995
|
|
|
23876
23996
|
function NoResults({ clearFilters, hasFilters, message }) {
|
|
@@ -41155,7 +41275,7 @@ const TableHeader = forwardRef(({ table }, ref) => {
|
|
|
41155
41275
|
return (jsx(Fragment, { children: table.getHeaderGroups().map((headerGroup) => (jsx("tr", { children: headerGroup.headers.map((header) => {
|
|
41156
41276
|
var _a, _b, _c;
|
|
41157
41277
|
const { column } = header;
|
|
41158
|
-
return (jsx("th", { className:
|
|
41278
|
+
return (jsx("th", { className: y$1('tanstack-table__thead__th', {
|
|
41159
41279
|
'pa-0': !!((_c = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b.header) === null || _c === void 0 ? void 0 : _c.hasNoPadding),
|
|
41160
41280
|
}), ref: (el) => {
|
|
41161
41281
|
if (el)
|
|
@@ -41170,14 +41290,14 @@ function CirclePulse(_a) {
|
|
|
41170
41290
|
}
|
|
41171
41291
|
|
|
41172
41292
|
const TableBody = ({ table, onRowClick, isLoading, columnsLength, activeRows, }) => {
|
|
41173
|
-
return (jsxs(Fragment, { children: [table.getRowModel().rows.map((row) => (jsx("tr", { className:
|
|
41293
|
+
return (jsxs(Fragment, { children: [table.getRowModel().rows.map((row) => (jsx("tr", { className: y$1('tanstack-table__tbody__tr', {
|
|
41174
41294
|
'is-selected': row.getIsSelected(),
|
|
41175
41295
|
'show-hover': !!onRowClick,
|
|
41176
41296
|
'is-clicked': activeRows.includes(row.id), // Checkbox Is clicked
|
|
41177
41297
|
}), children: row.getVisibleCells().map((cell) => {
|
|
41178
41298
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41179
41299
|
const { columnDef } = cell.column;
|
|
41180
|
-
return (jsx("td", { className:
|
|
41300
|
+
return (jsx("td", { className: y$1('tanstack-table__tbody__td', {
|
|
41181
41301
|
'pa-0': !!((_c = (_b = (_a = columnDef.meta) === null || _a === void 0 ? void 0 : _a.styles) === null || _b === void 0 ? void 0 : _b.cell) === null || _c === void 0 ? void 0 : _c.hasNoPadding),
|
|
41182
41302
|
}), style: Object.assign({}, getTdStyles(cell.column, (_f = (_e = (_d = columnDef.meta) === null || _d === void 0 ? void 0 : _d.styles) === null || _e === void 0 ? void 0 : _e.cell) === null || _f === void 0 ? void 0 : _f.textAlign, (_h = (_g = columnDef.meta) === null || _g === void 0 ? void 0 : _g.styles) === null || _h === void 0 ? void 0 : _h.definedColumnSize, cell.column.getSize())), onClick: () => {
|
|
41183
41303
|
var _a, _b, _c;
|
|
@@ -41186,7 +41306,7 @@ const TableBody = ({ table, onRowClick, isLoading, columnsLength, activeRows, })
|
|
|
41186
41306
|
onRowClick === null || onRowClick === void 0 ? void 0 : onRowClick(row);
|
|
41187
41307
|
}
|
|
41188
41308
|
}, children: flexRender(columnDef.cell, cell.getContext()) }, cell.id));
|
|
41189
|
-
}) }, row.id))), isLoading && (jsx("tr", { className: "tanstack-table__tbody__tr", children: jsx("td", { className:
|
|
41309
|
+
}) }, row.id))), isLoading && (jsx("tr", { className: "tanstack-table__tbody__tr", children: jsx("td", { className: y$1('tanstack-table__centered-row', {
|
|
41190
41310
|
'is-Loading': isLoading,
|
|
41191
41311
|
}), colSpan: columnsLength, children: jsx(CirclePulse, { "data-testid": "loading-indicator" }) }) }))] }));
|
|
41192
41312
|
};
|
|
@@ -41232,7 +41352,7 @@ function TanstackTable(_a) {
|
|
|
41232
41352
|
}
|
|
41233
41353
|
return (jsx(TableBody, { table: table, onRowClick: onRowClick, isLoading: isLoading, columnsLength: columns.length, activeRows: activeRows }));
|
|
41234
41354
|
};
|
|
41235
|
-
return (jsxs("div", { className: "tanstack-table__outer-container", children: [jsxs("div", { className: "tanstack-table__container", children: [jsxs("table", { className:
|
|
41355
|
+
return (jsxs("div", { className: "tanstack-table__outer-container", children: [jsxs("div", { className: "tanstack-table__container", children: [jsxs("table", { className: y$1('tanstack-table', className, {
|
|
41236
41356
|
'is-Loading': isLoading,
|
|
41237
41357
|
}), children: [jsx("thead", { className: "tanstack-table__thead", children: jsx(TableHeader, { table: table, ref: thRefs }) }), jsx("tbody", { className: "tanstack-table__tbody", children: renderBody() })] }), hasSelectedRows && (jsx(ActionBar, { table: table, TableActions: TableActions, className: actionBarClassName }))] }), shouldRenderPagination ? (jsx(TablePagination, { currentPage: currentPage, rowCount: rowCount, onChangePage: onChangePage, rowsPerPage: rowsPerPage, totalEntriesText: totalEntriesText !== null && totalEntriesText !== void 0 ? totalEntriesText : `${totalRowsOnPage} of ${rowCount} entries` })) : null] }));
|
|
41238
41358
|
}
|
|
@@ -42735,12 +42855,12 @@ const computePosition = (reference, floating, options) => {
|
|
|
42735
42855
|
* @copyright ReactTooltip Team
|
|
42736
42856
|
* @license MIT
|
|
42737
42857
|
*/
|
|
42738
|
-
const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:!1,base:!1};function S({css:e,id:t=w,type:o="base",ref:r}){var l,n;if(!e||"undefined"==typeof document||b[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(l=null===process||void 0===process?void 0:process.env)||void 0===l?void 0:l.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=h),r||(r={});const{insertAt:c}=r;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===c&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),b[o]=!0;}const E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:r="top",offset:l=10,strategy:n="absolute",middlewares:c=[offset(Number(l)),flip({fallbackAxisSideDirection:"start"}),shift({padding:5})],border:i})=>{if(!e)return {tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return {tooltipStyles:{},tooltipArrowStyles:{},place:r};const s=c;return o?(s.push(arrow({element:o,padding:5})),computePosition(e,t,{placement:r,strategy:n,middleware:s}).then((({x:e,y:t,placement:o,middlewareData:r})=>{var l,n;const c={left:`${e}px`,top:`${t}px`,border:i},{x:s,y:a}=null!==(l=r.arrow)&&void 0!==l?l:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",d=i&&{borderBottom:i,borderRight:i};let p=0;if(i){const e=`${i}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1;}return {tooltipStyles:c,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):computePosition(e,t,{placement:"bottom",strategy:n,middleware:s}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},A=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_=(e,t,o)=>{let r=null;const l=function(...l){const n=()=>{r=null;};!r&&(e.apply(this,l),r=setTimeout(n,t));};return l.cancel=()=>{r&&(clearTimeout(r),r=null);},l},O=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,T=(e,t)=>{if(e===t)return !0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>T(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return !1;if(!O(e)||!O(t))return e===t;const o=Object.keys(e),r=Object.keys(t);return o.length===r.length&&o.every((o=>T(e[o],t[o])))},k=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return !1;const t=getComputedStyle(e);return ["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return "auto"===o||"scroll"===o}))},C=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(k(t))return t;t=t.parentElement;}return document.scrollingElement||document.documentElement},L="undefined"!=typeof window?useLayoutEffect:useEffect,R="DEFAULT_TOOLTIP_ID",x={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},N=createContext({getTooltipData:()=>x});function I(e=R){return useContext(N).getTooltipData(e)}var B={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},z={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const D=({forwardRef:t,id:r,className:c,classNameArrow:i,variant:u="dark",anchorId:d,anchorSelect:p,place:v="top",offset:m=10,events:h=["hover"],openOnClick:w=!1,positionStrategy:b="absolute",middlewares:S,wrapper:g,delayShow:A=0,delayHide:O=0,float:k=!1,hidden:R=!1,noArrow:x=!1,clickable:N=!1,closeOnEsc:$=!1,closeOnScroll:j=!1,closeOnResize:D=!1,openEvents:q,closeEvents:H,globalCloseEvents:M,imperativeModeOnly:W,style:P,position:V,afterShow:F,afterHide:K,content:U,contentWrapperRef:X,isOpen:Y,defaultIsOpen:G=!1,setIsOpen:Z,activeAnchor:J,setActiveAnchor:Q,border:ee,opacity:te,arrowColor:oe,role:re="tooltip"})=>{var le;const ne=useRef(null),ce=useRef(null),ie=useRef(null),se=useRef(null),ae=useRef(null),[ue,de]=useState({tooltipStyles:{},tooltipArrowStyles:{},place:v}),[pe,ve]=useState(!1),[me,fe]=useState(!1),[ye,he]=useState(null),we=useRef(!1),be=useRef(null),{anchorRefs:Se,setActiveAnchor:ge}=I(r),Ee=useRef(!1),[Ae,_e]=useState([]),Oe=useRef(!1),Te=w||h.includes("click"),ke=Te||(null==q?void 0:q.click)||(null==q?void 0:q.dblclick)||(null==q?void 0:q.mousedown),Ce=q?{...q}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!q&&Te&&Object.assign(Ce,{mouseenter:!1,focus:!1,click:!0});const Le=H?{...H}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!H&&Te&&Object.assign(Le,{mouseleave:!1,blur:!1});const Re=M?{...M}:{escape:$||!1,scroll:j||!1,resize:D||!1,clickOutsideAnchor:ke||!1};W&&(Object.assign(Ce,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Le,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Re,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),L((()=>(Oe.current=!0,()=>{Oe.current=!1;})),[]);const xe=e=>{Oe.current&&(e&&fe(!0),setTimeout((()=>{Oe.current&&(null==Z||Z(e),void 0===Y&&ve(e));}),10));};useEffect((()=>{if(void 0===Y)return ()=>null;Y&&fe(!0);const e=setTimeout((()=>{ve(Y);}),10);return ()=>{clearTimeout(e);}}),[Y]),useEffect((()=>{if(pe!==we.current)if(ae.current&&clearTimeout(ae.current),we.current=pe,pe)null==F||F();else {const e=(e=>{const t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,o,r]=t;return Number(o)*("ms"===r?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));ae.current=setTimeout((()=>{fe(!1),he(null),null==K||K();}),e+25);}}),[pe]);const Ne=e=>{de((t=>T(t,e)?t:e));},$e=(e=A)=>{ie.current&&clearTimeout(ie.current),me?xe(!0):ie.current=setTimeout((()=>{xe(!0);}),e);},Ie=(e=O)=>{se.current&&clearTimeout(se.current),se.current=setTimeout((()=>{Ee.current||xe(!1);}),e);},je=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return Q(null),void ge({current:null});A?$e():xe(!0),Q(o),ge({current:o}),se.current&&clearTimeout(se.current);},Be=()=>{N?Ie(O||100):O?Ie():xe(!1),ie.current&&clearTimeout(ie.current);},ze=({x:e,y:t})=>{var o;const r={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};E({place:null!==(o=null==ye?void 0:ye.place)&&void 0!==o?o:v,offset:m,elementReference:r,tooltipReference:ne.current,tooltipArrowReference:ce.current,strategy:b,middlewares:S,border:ee}).then((e=>{Ne(e);}));},De=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};ze(o),be.current=o;},qe=e=>{var t;if(!pe)return;const o=e.target;if(!o.isConnected)return;if(null===(t=ne.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${d}']`),...Ae].some((e=>null==e?void 0:e.contains(o)))||(xe(!1),ie.current&&clearTimeout(ie.current));},He=_(je,50),Me=_(Be,50),We=e=>{Me.cancel(),He(e);},Pe=()=>{He.cancel(),Me();},Ve=useCallback((()=>{var e,t;const o=null!==(e=null==ye?void 0:ye.position)&&void 0!==e?e:V;o?ze(o):k?be.current&&ze(be.current):(null==J?void 0:J.isConnected)&&E({place:null!==(t=null==ye?void 0:ye.place)&&void 0!==t?t:v,offset:m,elementReference:J,tooltipReference:ne.current,tooltipArrowReference:ce.current,strategy:b,middlewares:S,border:ee}).then((e=>{Oe.current&&Ne(e);}));}),[pe,J,U,P,v,null==ye?void 0:ye.place,m,b,V,null==ye?void 0:ye.position,k]);useEffect((()=>{var e,t;const o=new Set(Se);Ae.forEach((e=>{o.add({current:e});}));const r=document.querySelector(`[id='${d}']`);r&&o.add({current:r});const l=()=>{xe(!1);},n=C(J),c=C(ne.current);Re.scroll&&(window.addEventListener("scroll",l),null==n||n.addEventListener("scroll",l),null==c||c.addEventListener("scroll",l));let i=null;Re.resize?window.addEventListener("resize",l):J&&ne.current&&(i=autoUpdate(J,ne.current,Ve,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const s=e=>{"Escape"===e.key&&xe(!1);};Re.escape&&window.addEventListener("keydown",s),Re.clickOutsideAnchor&&window.addEventListener("click",qe);const a=[],u=e=>{pe&&(null==e?void 0:e.target)===J||je(e);},p=e=>{pe&&(null==e?void 0:e.target)===J&&Be();},v=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Ce).forEach((([e,t])=>{t&&(v.includes(e)?a.push({event:e,listener:We}):m.includes(e)&&a.push({event:e,listener:u}));})),Object.entries(Le).forEach((([e,t])=>{t&&(v.includes(e)?a.push({event:e,listener:Pe}):m.includes(e)&&a.push({event:e,listener:p}));})),k&&a.push({event:"pointermove",listener:De});const y=()=>{Ee.current=!0;},h=()=>{Ee.current=!1,Be();};return N&&!ke&&(null===(e=ne.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=ne.current)||void 0===t||t.addEventListener("mouseleave",h)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var r;null===(r=o.current)||void 0===r||r.addEventListener(e,t);}));})),()=>{var e,t;Re.scroll&&(window.removeEventListener("scroll",l),null==n||n.removeEventListener("scroll",l),null==c||c.removeEventListener("scroll",l)),Re.resize?window.removeEventListener("resize",l):null==i||i(),Re.clickOutsideAnchor&&window.removeEventListener("click",qe),Re.escape&&window.removeEventListener("keydown",s),N&&!ke&&(null===(e=ne.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=ne.current)||void 0===t||t.removeEventListener("mouseleave",h)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var r;null===(r=o.current)||void 0===r||r.removeEventListener(e,t);}));}));}}),[J,Ve,me,Se,Ae,q,H,M,Te,A,O]),useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==ye?void 0:ye.anchorSelect)&&void 0!==e?e:p)&&void 0!==t?t:"";!o&&r&&(o=`[data-tooltip-id='${r.replace(/'/g,"\\'")}']`);const l=new MutationObserver((e=>{const t=[],l=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===r?t.push(e.target):e.oldValue===r&&l.push(e.target);}if("childList"===e.type){if(J){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{l.push(...t.filter((e=>e.matches(o)))),l.push(...t.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}t.some((e=>{var t;return !!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,J))&&(fe(!1),xe(!1),Q(null),ie.current&&clearTimeout(ie.current),se.current&&clearTimeout(se.current),!0)}));}if(o)try{const r=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...r.filter((e=>e.matches(o)))),t.push(...r.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}}})),(t.length||l.length)&&_e((e=>[...e.filter((e=>!l.includes(e))),...t]));}));return l.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{l.disconnect();}}),[r,p,null==ye?void 0:ye.anchorSelect,J]),useEffect((()=>{Ve();}),[Ve]),useEffect((()=>{if(!(null==X?void 0:X.current))return ()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ve()));}));return e.observe(X.current),()=>{e.disconnect();}}),[U,null==X?void 0:X.current]),useEffect((()=>{var e;const t=document.querySelector(`[id='${d}']`),o=[...Ae,t];J&&o.includes(J)||Q(null!==(e=Ae[0])&&void 0!==e?e:t);}),[d,Ae,J]),useEffect((()=>(G&&xe(!0),()=>{ie.current&&clearTimeout(ie.current),se.current&&clearTimeout(se.current);})),[]),useEffect((()=>{var e;let t=null!==(e=null==ye?void 0:ye.anchorSelect)&&void 0!==e?e:p;if(!t&&r&&(t=`[data-tooltip-id='${r.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));_e(e);}catch(e){_e([]);}}),[r,p,null==ye?void 0:ye.anchorSelect]),useEffect((()=>{ie.current&&(clearTimeout(ie.current),$e(A));}),[A]);const Fe=null!==(le=null==ye?void 0:ye.content)&&void 0!==le?le:U,Ke=pe&&Object.keys(ue.tooltipStyles).length>0;return useImperativeHandle(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect);}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}he(null!=e?e:null),(null==e?void 0:e.delay)?$e(e.delay):xe(!0);},close:e=>{(null==e?void 0:e.delay)?Ie(e.delay):xe(!1);},activeAnchor:J,place:ue.place,isOpen:Boolean(me&&!R&&Fe&&Ke)}))),me&&!R&&Fe?React__default.createElement(g,{id:r,role:re,className:classNames("react-tooltip",B.tooltip,z.tooltip,z[u],c,`react-tooltip__place-${ue.place}`,B[Ke?"show":"closing"],Ke?"react-tooltip__show":"react-tooltip__closing","fixed"===b&&B.fixed,N&&B.clickable),onTransitionEnd:e=>{ae.current&&clearTimeout(ae.current),pe||"opacity"!==e.propertyName||(fe(!1),he(null),null==K||K());},style:{...P,...ue.tooltipStyles,opacity:void 0!==te&&Ke?te:void 0},ref:ne},Fe,React__default.createElement(g,{className:classNames("react-tooltip-arrow",B.arrow,z.arrow,i,x&&B.noArrow),style:{...ue.tooltipArrowStyles,background:oe?`linear-gradient(to right bottom, transparent 50%, ${oe} 50%)`:void 0},ref:ce})):null},q=({content:t})=>React__default.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),H=React__default.forwardRef((({id:t,anchorId:r,anchorSelect:n,content:c,html:i,render:a,className:u,classNameArrow:d,variant:p="dark",place:v="top",offset:m=10,wrapper:f="div",children:h=null,events:w=["hover"],openOnClick:b=!1,positionStrategy:S="absolute",middlewares:g,delayShow:E=0,delayHide:_=0,float:O=!1,hidden:T=!1,noArrow:k=!1,clickable:C=!1,closeOnEsc:L=!1,closeOnScroll:R=!1,closeOnResize:x=!1,openEvents:N,closeEvents:$,globalCloseEvents:j,imperativeModeOnly:B=!1,style:z,position:H,isOpen:M,defaultIsOpen:W=!1,disableStyleInjection:P=!1,border:V,opacity:F,arrowColor:K,setIsOpen:U,afterShow:X,afterHide:Y,role:G="tooltip"},Z)=>{const[J,Q]=useState(c),[ee,te]=useState(i),[oe,re]=useState(v),[le,ne]=useState(p),[ce,ie]=useState(m),[se,ae]=useState(E),[ue,de]=useState(_),[pe,ve]=useState(O),[me,fe]=useState(T),[ye,he]=useState(f),[we,be]=useState(w),[Se,ge]=useState(S),[Ee,Ae]=useState(null),[_e,Oe]=useState(null),Te=useRef(P),{anchorRefs:ke,activeAnchor:Ce}=I(t),Le=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var r;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(o))&&void 0!==r?r:null;}return t}),{}),Re=e=>{const t={place:e=>{var t;re(null!==(t=e)&&void 0!==t?t:v);},content:e=>{Q(null!=e?e:c);},html:e=>{te(null!=e?e:i);},variant:e=>{var t;ne(null!==(t=e)&&void 0!==t?t:p);},offset:e=>{ie(null===e?m:Number(e));},wrapper:e=>{var t;he(null!==(t=e)&&void 0!==t?t:f);},events:e=>{const t=null==e?void 0:e.split(" ");be(null!=t?t:w);},"position-strategy":e=>{var t;ge(null!==(t=e)&&void 0!==t?t:S);},"delay-show":e=>{ae(null===e?E:Number(e));},"delay-hide":e=>{de(null===e?_:Number(e));},float:e=>{ve(null===e?O:"true"===e);},hidden:e=>{fe(null===e?T:"true"===e);},"class-name":e=>{Ae(e);}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var r;null===(r=t[e])||void 0===r||r.call(t,o);}));};useEffect((()=>{Q(c);}),[c]),useEffect((()=>{te(i);}),[i]),useEffect((()=>{re(v);}),[v]),useEffect((()=>{ne(p);}),[p]),useEffect((()=>{ie(m);}),[m]),useEffect((()=>{ae(E);}),[E]),useEffect((()=>{de(_);}),[_]),useEffect((()=>{ve(O);}),[O]),useEffect((()=>{fe(T);}),[T]),useEffect((()=>{ge(S);}),[S]),useEffect((()=>{Te.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");}),[P]),useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}));}),[]),useEffect((()=>{var e;const o=new Set(ke);let l=n;if(!l&&t&&(l=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),l)try{document.querySelectorAll(l).forEach((e=>{o.add({current:e});}));}catch(e){console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`);}const c=document.querySelector(`[id='${r}']`);if(c&&o.add({current:c}),!o.size)return ()=>null;const i=null!==(e=null!=_e?_e:c)&&void 0!==e?e:Ce.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!i||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Le(i);Re(o);}));})),a={attributes:!0,childList:!1,subtree:!1};if(i){const e=Le(i);Re(e),s.observe(i,a);}return ()=>{s.disconnect();}}),[ke,Ce,_e,r,n]),useEffect((()=>{(null==z?void 0:z.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),V&&!A("border",`${V}`)&&console.warn(`[react-tooltip] "${V}" is not a valid \`border\`.`),(null==z?void 0:z.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!A("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);}),[]);let xe=h;const Ne=useRef(null);if(a){const t=a({content:(null==_e?void 0:_e.getAttribute("data-tooltip-content"))||J||null,activeAnchor:_e});xe=t?React__default.createElement("div",{ref:Ne,className:"react-tooltip-content-wrapper"},t):null;}else J&&(xe=J);ee&&(xe=React__default.createElement(q,{content:ee}));const $e={forwardRef:Z,id:t,anchorId:r,anchorSelect:n,className:classNames(u,Ee),classNameArrow:d,content:xe,contentWrapperRef:Ne,place:oe,variant:le,offset:ce,wrapper:ye,events:we,openOnClick:b,positionStrategy:Se,middlewares:g,delayShow:se,delayHide:ue,float:pe,hidden:me,noArrow:k,clickable:C,closeOnEsc:L,closeOnScroll:R,closeOnResize:x,openEvents:N,closeEvents:$,globalCloseEvents:j,imperativeModeOnly:B,style:z,position:H,isOpen:M,defaultIsOpen:W,border:V,opacity:F,arrowColor:K,setIsOpen:U,afterShow:X,afterHide:Y,activeAnchor:_e,setActiveAnchor:e=>Oe(e),role:G};return React__default.createElement(D,{...$e})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||S({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||S({css:`
|
|
42858
|
+
const h="react-tooltip-core-styles",w="react-tooltip-base-styles",b={core:!1,base:!1};function S({css:e,id:t=w,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||b[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=h),l||(l={});const{insertAt:i}=l;if(document.getElementById(t))return;const c=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.id=t,s.type="text/css","top"===i&&c.firstChild?c.insertBefore(s,c.firstChild):c.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e)),b[o]=!0;}const E=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:o=null,place:l="top",offset:r=10,strategy:n="absolute",middlewares:i=[offset(Number(r)),flip({fallbackAxisSideDirection:"start"}),shift({padding:5})],border:c})=>{if(!e)return {tooltipStyles:{},tooltipArrowStyles:{},place:l};if(null===t)return {tooltipStyles:{},tooltipArrowStyles:{},place:l};const s=i;return o?(s.push(arrow({element:o,padding:5})),computePosition(e,t,{placement:l,strategy:n,middleware:s}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const i={left:`${e}px`,top:`${t}px`,border:c},{x:s,y:a}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",d=c&&{borderBottom:c,borderRight:c};let p=0;if(c){const e=`${c}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1;}return {tooltipStyles:i,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):computePosition(e,t,{placement:"bottom",strategy:n,middleware:s}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},A=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),_=(e,t,o)=>{let l=null;const r=function(...r){const n=()=>{l=null;};!l&&(e.apply(this,r),l=setTimeout(n,t));};return r.cancel=()=>{l&&(clearTimeout(l),l=null);},r},O=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,k=(e,t)=>{if(e===t)return !0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>k(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return !1;if(!O(e)||!O(t))return e===t;const o=Object.keys(e),l=Object.keys(t);return o.length===l.length&&o.every((o=>k(e[o],t[o])))},T=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return !1;const t=getComputedStyle(e);return ["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return "auto"===o||"scroll"===o}))},L=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(T(t))return t;t=t.parentElement;}return document.scrollingElement||document.documentElement},C="undefined"!=typeof window?useLayoutEffect:useEffect,R=e=>{e.current&&(clearTimeout(e.current),e.current=null);},x="DEFAULT_TOOLTIP_ID",N={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},$=createContext({getTooltipData:()=>N});function j(e=x){return useContext($).getTooltipData(e)}var z={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},D={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const q=({forwardRef:t,id:l,className:i,classNameArrow:c,variant:u="dark",anchorId:d,anchorSelect:p,place:v="top",offset:m=10,events:h=["hover"],openOnClick:w=!1,positionStrategy:b="absolute",middlewares:S,wrapper:g,delayShow:A=0,delayHide:O=0,float:T=!1,hidden:x=!1,noArrow:N=!1,clickable:$=!1,closeOnEsc:I=!1,closeOnScroll:B=!1,closeOnResize:q=!1,openEvents:H,closeEvents:M,globalCloseEvents:W,imperativeModeOnly:P,style:V,position:F,afterShow:K,afterHide:U,disableTooltip:X,content:Y,contentWrapperRef:G,isOpen:Z,defaultIsOpen:J=!1,setIsOpen:Q,activeAnchor:ee,setActiveAnchor:te,border:oe,opacity:le,arrowColor:re,role:ne="tooltip"})=>{var ie;const ce=useRef(null),se=useRef(null),ae=useRef(null),ue=useRef(null),de=useRef(null),[pe,ve]=useState({tooltipStyles:{},tooltipArrowStyles:{},place:v}),[me,fe]=useState(!1),[ye,he]=useState(!1),[we,be]=useState(null),Se=useRef(!1),ge=useRef(null),{anchorRefs:Ee,setActiveAnchor:Ae}=j(l),_e=useRef(!1),[Oe,ke]=useState([]),Te=useRef(!1),Le=w||h.includes("click"),Ce=Le||(null==H?void 0:H.click)||(null==H?void 0:H.dblclick)||(null==H?void 0:H.mousedown),Re=H?{...H}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!H&&Le&&Object.assign(Re,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const xe=M?{...M}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!M&&Le&&Object.assign(xe,{mouseleave:!1,blur:!1,mouseout:!1});const Ne=W?{...W}:{escape:I||!1,scroll:B||!1,resize:q||!1,clickOutsideAnchor:Ce||!1};P&&(Object.assign(Re,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(xe,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Ne,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),C((()=>(Te.current=!0,()=>{Te.current=!1;})),[]);const $e=e=>{Te.current&&(e&&he(!0),setTimeout((()=>{Te.current&&(null==Q||Q(e),void 0===Z&&fe(e));}),10));};useEffect((()=>{if(void 0===Z)return ()=>null;Z&&he(!0);const e=setTimeout((()=>{fe(Z);}),10);return ()=>{clearTimeout(e);}}),[Z]),useEffect((()=>{if(me!==Se.current)if(R(de),Se.current=me,me)null==K||K();else {const e=(e=>{const t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,o,l]=t;return Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));de.current=setTimeout((()=>{he(!1),be(null),null==U||U();}),e+25);}}),[me]);const Ie=e=>{ve((t=>k(t,e)?t:e));},je=(e=A)=>{R(ae),ye?$e(!0):ae.current=setTimeout((()=>{$e(!0);}),e);},Be=(e=O)=>{R(ue),ue.current=setTimeout((()=>{_e.current||$e(!1);}),e);},ze=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return te(null),void Ae({current:null});A?je():$e(!0),te(o),Ae({current:o}),R(ue);},De=()=>{$?Be(O||100):O?Be():$e(!1),R(ae);},qe=({x:e,y:t})=>{var o;const l={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};E({place:null!==(o=null==we?void 0:we.place)&&void 0!==o?o:v,offset:m,elementReference:l,tooltipReference:ce.current,tooltipArrowReference:se.current,strategy:b,middlewares:S,border:oe}).then((e=>{Ie(e);}));},He=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};qe(o),ge.current=o;},Me=e=>{var t;if(!me)return;const o=e.target;if(!o.isConnected)return;if(null===(t=ce.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${d}']`),...Oe].some((e=>null==e?void 0:e.contains(o)))||($e(!1),R(ae));},We=_(ze,50),Pe=_(De,50),Ve=e=>{Pe.cancel(),We(e);},Fe=()=>{We.cancel(),Pe();},Ke=useCallback((()=>{var e,t;const o=null!==(e=null==we?void 0:we.position)&&void 0!==e?e:F;o?qe(o):T?ge.current&&qe(ge.current):(null==ee?void 0:ee.isConnected)&&E({place:null!==(t=null==we?void 0:we.place)&&void 0!==t?t:v,offset:m,elementReference:ee,tooltipReference:ce.current,tooltipArrowReference:se.current,strategy:b,middlewares:S,border:oe}).then((e=>{Te.current&&Ie(e);}));}),[me,ee,Y,V,v,null==we?void 0:we.place,m,b,F,null==we?void 0:we.position,T]);useEffect((()=>{var e,t;const o=new Set(Ee);Oe.forEach((e=>{(null==X?void 0:X(e))||o.add({current:e});}));const l=document.querySelector(`[id='${d}']`);l&&!(null==X?void 0:X(l))&&o.add({current:l});const r=()=>{$e(!1);},n=L(ee),i=L(ce.current);Ne.scroll&&(window.addEventListener("scroll",r),null==n||n.addEventListener("scroll",r),null==i||i.addEventListener("scroll",r));let c=null;Ne.resize?window.addEventListener("resize",r):ee&&ce.current&&(c=autoUpdate(ee,ce.current,Ke,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const s=e=>{"Escape"===e.key&&$e(!1);};Ne.escape&&window.addEventListener("keydown",s),Ne.clickOutsideAnchor&&window.addEventListener("click",Me);const a=[],u=e=>{me&&(null==e?void 0:e.target)===ee||ze(e);},p=e=>{me&&(null==e?void 0:e.target)===ee&&De();},v=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Re).forEach((([e,t])=>{t&&(v.includes(e)?a.push({event:e,listener:Ve}):m.includes(e)&&a.push({event:e,listener:u}));})),Object.entries(xe).forEach((([e,t])=>{t&&(v.includes(e)?a.push({event:e,listener:Fe}):m.includes(e)&&a.push({event:e,listener:p}));})),T&&a.push({event:"pointermove",listener:He});const y=()=>{_e.current=!0;},h=()=>{_e.current=!1,De();};return $&&!Ce&&(null===(e=ce.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=ce.current)||void 0===t||t.addEventListener("mouseleave",h)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.addEventListener(e,t);}));})),()=>{var e,t;Ne.scroll&&(window.removeEventListener("scroll",r),null==n||n.removeEventListener("scroll",r),null==i||i.removeEventListener("scroll",r)),Ne.resize?window.removeEventListener("resize",r):null==c||c(),Ne.clickOutsideAnchor&&window.removeEventListener("click",Me),Ne.escape&&window.removeEventListener("keydown",s),$&&!Ce&&(null===(e=ce.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=ce.current)||void 0===t||t.removeEventListener("mouseleave",h)),a.forEach((({event:e,listener:t})=>{o.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t);}));}));}}),[ee,Ke,ye,Ee,Oe,H,M,W,Le,A,O]),useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==we?void 0:we.anchorSelect)&&void 0!==e?e:p)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===l?t.push(e.target):e.oldValue===l&&r.push(e.target);}if("childList"===e.type){if(ee){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}t.some((e=>{var t;return !!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,ee))&&(he(!1),$e(!1),te(null),R(ae),R(ue),!0)}));}if(o)try{const l=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...l.filter((e=>e.matches(o)))),t.push(...l.flatMap((e=>[...e.querySelectorAll(o)])));}catch(e){}}})),(t.length||r.length)&&ke((e=>[...e.filter((e=>!r.includes(e))),...t]));}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect();}}),[l,p,null==we?void 0:we.anchorSelect,ee]),useEffect((()=>{Ke();}),[Ke]),useEffect((()=>{if(!(null==G?void 0:G.current))return ()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Ke()));}));return e.observe(G.current),()=>{e.disconnect();}}),[Y,null==G?void 0:G.current]),useEffect((()=>{var e;const t=document.querySelector(`[id='${d}']`),o=[...Oe,t];ee&&o.includes(ee)||te(null!==(e=Oe[0])&&void 0!==e?e:t);}),[d,Oe,ee]),useEffect((()=>(J&&$e(!0),()=>{R(ae),R(ue);})),[]),useEffect((()=>{var e;let t=null!==(e=null==we?void 0:we.anchorSelect)&&void 0!==e?e:p;if(!t&&l&&(t=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));ke(e);}catch(e){ke([]);}}),[l,p,null==we?void 0:we.anchorSelect]),useEffect((()=>{ae.current&&(R(ae),je(A));}),[A]);const Ue=null!==(ie=null==we?void 0:we.content)&&void 0!==ie?ie:Y,Xe=me&&Object.keys(pe.tooltipStyles).length>0;return useImperativeHandle(t,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect);}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}be(null!=e?e:null),(null==e?void 0:e.delay)?je(e.delay):$e(!0);},close:e=>{(null==e?void 0:e.delay)?Be(e.delay):$e(!1);},activeAnchor:ee,place:pe.place,isOpen:Boolean(ye&&!x&&Ue&&Xe)}))),ye&&!x&&Ue?React__default.createElement(g,{id:l,role:ne,className:y$1("react-tooltip",z.tooltip,D.tooltip,D[u],i,`react-tooltip__place-${pe.place}`,z[Xe?"show":"closing"],Xe?"react-tooltip__show":"react-tooltip__closing","fixed"===b&&z.fixed,$&&z.clickable),onTransitionEnd:e=>{R(de),me||"opacity"!==e.propertyName||(he(!1),be(null),null==U||U());},style:{...V,...pe.tooltipStyles,opacity:void 0!==le&&Xe?le:void 0},ref:ce},Ue,React__default.createElement(g,{className:y$1("react-tooltip-arrow",z.arrow,D.arrow,c,N&&z.noArrow),style:{...pe.tooltipArrowStyles,background:re?`linear-gradient(to right bottom, transparent 50%, ${re} 50%)`:void 0},ref:se})):null},H=({content:t})=>React__default.createElement("span",{dangerouslySetInnerHTML:{__html:t}}),M=React__default.forwardRef((({id:t,anchorId:l,anchorSelect:n,content:i,html:c,render:a,className:u,classNameArrow:d,variant:p="dark",place:v="top",offset:m=10,wrapper:f="div",children:h=null,events:w=["hover"],openOnClick:b=!1,positionStrategy:S="absolute",middlewares:g,delayShow:E=0,delayHide:_=0,float:O=!1,hidden:k=!1,noArrow:T=!1,clickable:L=!1,closeOnEsc:C=!1,closeOnScroll:R=!1,closeOnResize:x=!1,openEvents:N,closeEvents:$,globalCloseEvents:I,imperativeModeOnly:B=!1,style:z,position:D,isOpen:M,defaultIsOpen:W=!1,disableStyleInjection:P=!1,border:V,opacity:F,arrowColor:K,setIsOpen:U,afterShow:X,afterHide:Y,disableTooltip:G,role:Z="tooltip"},J)=>{const[Q,ee]=useState(i),[te,oe]=useState(c),[le,re]=useState(v),[ne,ie]=useState(p),[ce,se]=useState(m),[ae,ue]=useState(E),[de,pe]=useState(_),[ve,me]=useState(O),[fe,ye]=useState(k),[he,we]=useState(f),[be,Se]=useState(w),[ge,Ee]=useState(S),[Ae,_e]=useState(null),[Oe,ke]=useState(null),Te=useRef(P),{anchorRefs:Le,activeAnchor:Ce}=j(t),Re=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var l;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(l=null==e?void 0:e.getAttribute(o))&&void 0!==l?l:null;}return t}),{}),xe=e=>{const t={place:e=>{var t;re(null!==(t=e)&&void 0!==t?t:v);},content:e=>{ee(null!=e?e:i);},html:e=>{oe(null!=e?e:c);},variant:e=>{var t;ie(null!==(t=e)&&void 0!==t?t:p);},offset:e=>{se(null===e?m:Number(e));},wrapper:e=>{var t;we(null!==(t=e)&&void 0!==t?t:f);},events:e=>{const t=null==e?void 0:e.split(" ");Se(null!=t?t:w);},"position-strategy":e=>{var t;Ee(null!==(t=e)&&void 0!==t?t:S);},"delay-show":e=>{ue(null===e?E:Number(e));},"delay-hide":e=>{pe(null===e?_:Number(e));},float:e=>{me(null===e?O:"true"===e);},hidden:e=>{ye(null===e?k:"true"===e);},"class-name":e=>{_e(e);}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var l;null===(l=t[e])||void 0===l||l.call(t,o);}));};useEffect((()=>{ee(i);}),[i]),useEffect((()=>{oe(c);}),[c]),useEffect((()=>{re(v);}),[v]),useEffect((()=>{ie(p);}),[p]),useEffect((()=>{se(m);}),[m]),useEffect((()=>{ue(E);}),[E]),useEffect((()=>{pe(_);}),[_]),useEffect((()=>{me(O);}),[O]),useEffect((()=>{ye(k);}),[k]),useEffect((()=>{Ee(S);}),[S]),useEffect((()=>{Te.current!==P&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");}),[P]),useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===P,disableBase:P}}));}),[]),useEffect((()=>{var e;const o=new Set(Le);let r=n;if(!r&&t&&(r=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),r)try{document.querySelectorAll(r).forEach((e=>{o.add({current:e});}));}catch(e){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`);}const i=document.querySelector(`[id='${l}']`);if(i&&o.add({current:i}),!o.size)return ()=>null;const c=null!==(e=null!=Oe?Oe:i)&&void 0!==e?e:Ce.current,s=new MutationObserver((e=>{e.forEach((e=>{var t;if(!c||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Re(c);xe(o);}));})),a={attributes:!0,childList:!1,subtree:!1};if(c){const e=Re(c);xe(e),s.observe(c,a);}return ()=>{s.disconnect();}}),[Le,Ce,Oe,l,n]),useEffect((()=>{(null==z?void 0:z.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),V&&!A("border",`${V}`)&&console.warn(`[react-tooltip] "${V}" is not a valid \`border\`.`),(null==z?void 0:z.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),F&&!A("opacity",`${F}`)&&console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);}),[]);let Ne=h;const $e=useRef(null);if(a){const t=a({content:(null==Oe?void 0:Oe.getAttribute("data-tooltip-content"))||Q||null,activeAnchor:Oe});Ne=t?React__default.createElement("div",{ref:$e,className:"react-tooltip-content-wrapper"},t):null;}else Q&&(Ne=Q);te&&(Ne=React__default.createElement(H,{content:te}));const Ie={forwardRef:J,id:t,anchorId:l,anchorSelect:n,className:y$1(u,Ae),classNameArrow:d,content:Ne,contentWrapperRef:$e,place:le,variant:ne,offset:ce,wrapper:he,events:be,openOnClick:b,positionStrategy:ge,middlewares:g,delayShow:ae,delayHide:de,float:ve,hidden:fe,noArrow:T,clickable:L,closeOnEsc:C,closeOnScroll:R,closeOnResize:x,openEvents:N,closeEvents:$,globalCloseEvents:I,imperativeModeOnly:B,style:z,position:D,isOpen:M,defaultIsOpen:W,border:V,opacity:F,arrowColor:K,setIsOpen:U,afterShow:X,afterHide:Y,disableTooltip:G,activeAnchor:Oe,setActiveAnchor:e=>ke(e),role:Z};return React__default.createElement(q,{...Ie})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||S({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||S({css:`
|
|
42739
42859
|
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"});}));
|
|
42740
42860
|
|
|
42741
42861
|
const Tooltip = (_a) => {
|
|
42742
42862
|
var { id, clickToShow, delayShow, delayHide, children, zIndex = 1000, place = 'top' } = _a, rest = __rest(_a, ["id", "clickToShow", "delayShow", "delayHide", "children", "zIndex", "place"]);
|
|
42743
|
-
return (jsx(
|
|
42863
|
+
return (jsx(M, Object.assign({ border: "solid 1px var(--pf-border-color)", id: id, place: place, openOnClick: clickToShow, delayShow: delayShow, delayHide: delayHide, style: { zIndex } }, rest, { children: children })));
|
|
42744
42864
|
};
|
|
42745
42865
|
|
|
42746
42866
|
function BarSpinner(_a) {
|
|
@@ -42754,104 +42874,5 @@ function BarSpinner(_a) {
|
|
|
42754
42874
|
return (jsx("div", Object.assign({ className: `bar-spinner ${className}`, id: id, style: style }, rest, { children: jsx("span", {}) })));
|
|
42755
42875
|
}
|
|
42756
42876
|
|
|
42757
|
-
const hourOptions = Array.from({ length: 12 }, (_, i) => {
|
|
42758
|
-
const num = `${i + 1}`;
|
|
42759
|
-
return {
|
|
42760
|
-
label: num,
|
|
42761
|
-
value: num,
|
|
42762
|
-
};
|
|
42763
|
-
});
|
|
42764
|
-
const minuteOptions = Array.from({ length: 60 }, (_, i) => {
|
|
42765
|
-
const num = `${i}`.padStart(2, '0');
|
|
42766
|
-
return {
|
|
42767
|
-
label: num,
|
|
42768
|
-
value: num,
|
|
42769
|
-
};
|
|
42770
|
-
});
|
|
42771
|
-
const periodOptions = [
|
|
42772
|
-
{ label: 'AM', value: 'am' },
|
|
42773
|
-
{ label: 'PM', value: 'pm' },
|
|
42774
|
-
];
|
|
42775
|
-
|
|
42776
|
-
// Parse initial time value
|
|
42777
|
-
const parseTimeValue = (time) => {
|
|
42778
|
-
if (!time)
|
|
42779
|
-
return { hours: '12', minutes: '00', period: 'am' };
|
|
42780
|
-
const match = time.match(/(\d{1,2}):(\d{2})\s*(am|pm)/i);
|
|
42781
|
-
if (!match)
|
|
42782
|
-
return { hours: '12', minutes: '00', period: 'am' };
|
|
42783
|
-
const [, hours, minutes, period] = match;
|
|
42784
|
-
return {
|
|
42785
|
-
hours: hours,
|
|
42786
|
-
minutes: minutes,
|
|
42787
|
-
period: period.toLowerCase(),
|
|
42788
|
-
};
|
|
42789
|
-
};
|
|
42790
|
-
|
|
42791
|
-
const TimePicker = ({ timeValue = '', label = 'Time Picker', onTimeChange, }) => {
|
|
42792
|
-
const initialTime = parseTimeValue(timeValue);
|
|
42793
|
-
const [hours, setHours] = useState(initialTime.hours);
|
|
42794
|
-
const [minutes, setMinutes] = useState(initialTime.minutes);
|
|
42795
|
-
const [period, setPeriod] = useState(initialTime.period);
|
|
42796
|
-
const handleHourChange = (option) => {
|
|
42797
|
-
setHours((option === null || option === void 0 ? void 0 : option.value) || '12');
|
|
42798
|
-
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(`${(option === null || option === void 0 ? void 0 : option.value) || '12'}:${minutes} ${period.toUpperCase()}`);
|
|
42799
|
-
};
|
|
42800
|
-
const handleMinuteChange = (option) => {
|
|
42801
|
-
setMinutes((option === null || option === void 0 ? void 0 : option.value) || '00');
|
|
42802
|
-
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(`${hours}:${(option === null || option === void 0 ? void 0 : option.value) || '00'} ${period.toUpperCase()}`);
|
|
42803
|
-
};
|
|
42804
|
-
const handlePeriodChange = (option) => {
|
|
42805
|
-
setPeriod((option === null || option === void 0 ? void 0 : option.value) || 'am');
|
|
42806
|
-
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(`${hours}:${minutes} ${((option === null || option === void 0 ? void 0 : option.value) || 'am').toUpperCase()}`);
|
|
42807
|
-
};
|
|
42808
|
-
return (jsx("div", { className: "time-input-wrapper", children: jsxs(FloatUI, { ariaLabel: label, children: [jsx(LabeledInput, { "data-testid": "time-picker-input", name: "hours", label: label, hasHiddenLabel: true, value: `${hours}:${minutes} ${period.toUpperCase()}`, readonly: true, className: "time-picker-input" }), jsxs(Row, { gutterWidth: 0, className: "time-picker-row", children: [jsx(Col, { xs: "content", children: jsx(Select$1, { menuIsOpen: true, className: "hour-menu", components: { DropdownIndicator: () => null, IndicatorSeparator: () => null }, name: "hours", value: { label: hours, value: hours }, onChange: handleHourChange, options: hourOptions }) }), jsx(Col, { xs: "content", children: jsx(Select$1, { className: "minute-menu", components: { DropdownIndicator: () => null, IndicatorSeparator: () => null }, name: "minutes", options: minuteOptions, menuIsOpen: true, value: { label: minutes.padStart(2, '0'), value: minutes }, onChange: handleMinuteChange }) }), jsx(Col, { xs: "content", children: jsx(Select$1, { menuIsOpen: true, className: "period-menu", components: { DropdownIndicator: () => null, IndicatorSeparator: () => null }, name: "period", options: periodOptions, value: { label: period.toUpperCase(), value: period }, onChange: handlePeriodChange }) })] })] }) }));
|
|
42809
|
-
};
|
|
42810
|
-
|
|
42811
|
-
const DatePicker = (props) => {
|
|
42812
|
-
const { mode = 'single', className, captionLayout = 'dropdown', selected, hasTimePicker = false, id, month, defaultMonth, startMonth, endMonth, components, numberOfMonths, isDisabled, formatters, weekStartsOn, firstWeekContainsDate, today, timeValue, isRequired, min, max, onTimeChange, onSelect, onMonthChange, onNextClick, onPrevClick, onDayClick } = props, rest = __rest(props, ["mode", "className", "captionLayout", "selected", "hasTimePicker", "id", "month", "defaultMonth", "startMonth", "endMonth", "components", "numberOfMonths", "isDisabled", "formatters", "weekStartsOn", "firstWeekContainsDate", "today", "timeValue", "isRequired", "min", "max", "onTimeChange", "onSelect", "onMonthChange", "onNextClick", "onPrevClick", "onDayClick"]);
|
|
42813
|
-
const futureDateByYear = (year) => new Date(new Date().getFullYear() + year, 11, 31);
|
|
42814
|
-
const endMonthDefault = endMonth !== null && endMonth !== void 0 ? endMonth : futureDateByYear(5);
|
|
42815
|
-
const modeMap = {
|
|
42816
|
-
single: {
|
|
42817
|
-
mode: 'single',
|
|
42818
|
-
numberOfMonths: numberOfMonths !== null && numberOfMonths !== void 0 ? numberOfMonths : 1,
|
|
42819
|
-
selected: selected,
|
|
42820
|
-
onSelect: onSelect,
|
|
42821
|
-
endMonth: endMonthDefault,
|
|
42822
|
-
},
|
|
42823
|
-
multiple: {
|
|
42824
|
-
mode: 'multiple',
|
|
42825
|
-
numberOfMonths: numberOfMonths !== null && numberOfMonths !== void 0 ? numberOfMonths : 1,
|
|
42826
|
-
selected: selected,
|
|
42827
|
-
onSelect: onSelect,
|
|
42828
|
-
endMonth: endMonthDefault,
|
|
42829
|
-
},
|
|
42830
|
-
range: {
|
|
42831
|
-
mode: 'range',
|
|
42832
|
-
numberOfMonths: numberOfMonths !== null && numberOfMonths !== void 0 ? numberOfMonths : 2,
|
|
42833
|
-
selected: selected,
|
|
42834
|
-
onSelect: onSelect,
|
|
42835
|
-
endMonth: endMonthDefault,
|
|
42836
|
-
},
|
|
42837
|
-
};
|
|
42838
|
-
const modeProps = modeMap[mode];
|
|
42839
|
-
const commonProps = getCommonProps(props);
|
|
42840
|
-
const handleTimeChange = (time) => {
|
|
42841
|
-
onTimeChange === null || onTimeChange === void 0 ? void 0 : onTimeChange(time);
|
|
42842
|
-
};
|
|
42843
|
-
const finalProps = Object.assign(Object.assign(Object.assign({}, commonProps), rest), modeProps);
|
|
42844
|
-
return (jsxs(Fragment, { children: [hasTimePicker && (jsx("div", { className: "time-picker-wrapper", children: jsxs(Row, { align: "center", children: [jsx(Col, { xs: "content", children: jsx("p", { className: "ma-0", children: "Select Time" }) }), jsx(Col, { children: jsx(TimePicker, { timeValue: timeValue !== null && timeValue !== void 0 ? timeValue : '', onTimeChange: handleTimeChange }) })] }) })), jsx(DayPicker, Object.assign({}, finalProps))] }));
|
|
42845
|
-
};
|
|
42846
|
-
|
|
42847
|
-
const Pill = (_a) => {
|
|
42848
|
-
var { children, className, color = 'info', size = 'sm' } = _a, rest = __rest(_a, ["children", "className", "color", "size"]);
|
|
42849
|
-
const pillClasses = classNames('pill', className, {
|
|
42850
|
-
[`pill--${color}`]: color,
|
|
42851
|
-
[`pill--${size}`]: size,
|
|
42852
|
-
});
|
|
42853
|
-
return (jsx("div", Object.assign({ className: pillClasses }, rest, { children: children })));
|
|
42854
|
-
};
|
|
42855
|
-
|
|
42856
42877
|
export { Badge, BarSpinner, Button$1 as Button, Card, Checkbox, CirclePulse, Col, Container, DatePicker, FloatUI, Form, Icon, IconTriggerDatePicker, LabeledInput as Input, Menu, Modal, Pagination, LabeledPasswordInput as PasswordInput, Pill, Radio as RadioInput, Row, Select$1 as SelectInput, SingleInputDatePicker, Skeleton, Table, TanstackTable, LabeledTextarea as Textarea, TimePicker, Toggle as ToggleInput, Tooltip, arrow$2 as arrow, autoPlacement, autoUpdate$1 as autoUpdate, computePosition$2 as computePosition, detectOverflow$1 as detectOverflow, flip$2 as flip, getOverflowAncestors$1 as getOverflowAncestors, hide$1 as hide, inline, limitShift, offset$2 as offset, platform$1 as platform, registerFontAwesomeIcons, shift$2 as shift, size, useFloating$1 as useFloating };
|
|
42857
42878
|
//# sourceMappingURL=index.esm.js.map
|