From 7313e2753fe86633707006547b539f644943a8ea Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 8 May 2023 12:03:55 +1200 Subject: [PATCH] MNT Use React Testing Library --- client/dist/js/bundle.js | 2 +- .../HistoryViewerCompareWarning.js | 2 + .../HistoryViewer/tests/HistoryViewer-test.js | 489 ++++++--------- .../tests/HistoryViewerHeading-test.js | 64 +- .../tests/HistoryViewerToolbar-test.js | 61 +- .../tests/HistoryViewerVersion-test.js | 343 +++++----- .../tests/HistoryViewerVersionList-test.js | 36 +- .../tests/HistoryViewerVersionState-test.js | 198 +++--- package.json | 10 +- yarn.lock | 589 ++++++++---------- 10 files changed, 740 insertions(+), 1054 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index 023674f1..e5e474e6 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1 +1 @@ -!function(){var e={7274:function(e,t,n){"use strict";var r=s(n(9521)),o=s(n(4180));function s(e){return e&&e.__esModule?e:{default:e}}window.document.addEventListener("DOMContentLoaded",(()=>{(0,r.default)(),(0,o.default)()}))},9521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(6648)),o=d(n(4065)),s=d(n(9559)),i=d(n(9769)),a=d(n(3461)),l=d(n(2477)),u=d(n(8488)),c=d(n(5385)),p=d(n(1553));function d(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({HistoryViewer:o.default,HistoryViewerHeading:s.default,HistoryViewerToolbar:i.default,HistoryViewerVersion:a.default,HistoryViewerVersionDetail:l.default,HistoryViewerVersionList:u.default,HistoryViewerVersionState:c.default,HistoryViewerCompareWarning:p.default})}},4180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(6648)),o=n(2827),s=i(n(7908));function i(e){return e&&e.__esModule?e:{default:e}}var a=()=>{r.default.reducer.register("versionedAdmin",(0,o.combineReducers)({historyViewer:s.default}))};t.default=a},4065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=b(n(7363)),o=n(2827),s=n(1624),i=y(n(8345)),a=y(n(2291)),l=y(n(4754)),u=n(6648),c=y(n(1264)),p=n(6215),d=n(185),f=n(1118),h=y(n(7820)),m=y(n(6104)),g=b(n(5108)),v=y(n(7086));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}class w extends r.Component{constructor(e){super(e),this.handleSetPage=this.handleSetPage.bind(this),this.handleNextPage=this.handleNextPage.bind(this),this.handlePrevPage=this.handlePrevPage.bind(this)}componentDidUpdate(e){if(!this.props.actions||!this.props.actions.versions)return;const{page:t}=e,{page:n}=this.props,{actions:{versions:r}}=this.props;t!==n&&"function"==typeof r.goToPage&&r.goToPage(n)}componentWillUnmount(){const{onSelect:e}=this.props;"function"==typeof e&&e(0)}getVersions(){const{versions:e}=this.props;return e&&e.versions&&e.versions.nodes?e.versions.nodes:[]}getContainerClasses(){const{compare:e,isInGridField:t}=this.props;return(0,h.default)("history-viewer","fill-height","panel--scrollable",{"history-viewer__compare-mode":e,"history-viewer--no-margins":t&&!this.isListView()})}getLatestVersion(){const{currentVersion:e}=this.props;if(e&&!0===e.latestDraftVersion)return e;const t=this.getVersions().filter((e=>!0===e.latestDraftVersion));return t.length?t[0]:null}isListView(){const{compare:e,currentVersion:t}=this.props;return!t||!!e&&!(!e.versionFrom||e.versionTo)}handleSetPage(e){const{onSetPage:t}=this.props;"function"==typeof t&&t(e+1)}handleNextPage(){const{page:e}=this.props;this.handleSetPage(e)}handlePrevPage(){const{page:e}=this.props,t=e-1;t<1?this.handleSetPage(t):this.handleSetPage(t-1)}compareModeAvailable(){return this.getVersions().length>1}renderVersionDetail(){const{currentVersion:e,isPreviewable:t,isRevertable:n,recordId:o,recordClass:s,schemaUrl:i,VersionDetailComponent:a,compare:l,compare:{versionFrom:u=!1,versionTo:c=!1},previewState:p}=this.props,d={":id":o,":class":s,":version":e.version},f={":id":o,":class":s,":from":u.version||0,":to":c.version||0},h=l?/:id|:class|:from|:to/g:/:id|:class|:version/g,g=l?f:d,v=l?u:e,y=this.getLatestVersion(),C={isLatestVersion:!l&&y&&y.version===v.version,isPreviewable:t,isRevertable:n,recordId:o,schemaUrl:i.replace(h,(e=>g[e])),version:v,compare:l,compareModeAvailable:this.compareModeAvailable(),previewState:p};return r.default.createElement(m.default,{className:this.getContainerClasses(),onResize:e=>{let{width:t}=e;return this.props.onResize(t)}},r.default.createElement(a,C))}renderPagination(){const{limit:e,page:t,versions:n}=this.props;if(!n)return null;const o=n.versions?n.versions.pageInfo.totalCount:0;if(o<=e)return null;const s={setPage:this.handleSetPage,maxPage:Math.ceil(o/e),next:this.handleNextPage,nextText:l.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:l.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:t-1,useGriddleStyles:!1};return r.default.createElement("div",{className:"griddle-footer"},r.default.createElement(i.default.GridPagination,s))}renderComparisonSelectionList(){const{compare:{versionFrom:e},ListComponent:t}=this.props;if(!e)return null;const n=(0,h.default)("history-viewer__table","history-viewer__table--comparison-selected");return r.default.createElement(t,{versions:[e],extraClass:n})}renderVersionList(){const{isInGridField:e,ListComponent:t,CompareWarningComponent:n,compare:o,compare:{versionFrom:s}}=this.props;return r.default.createElement("div",{className:this.getContainerClasses()},r.default.createElement(n,null),r.default.createElement("div",{className:e?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),r.default.createElement(t,{versions:this.getVersions(),showHeader:!o||o&&!s,compareModeAvailable:this.compareModeAvailable()}),r.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}renderCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}render(){const{loading:e,compare:t,currentVersion:n}=this.props;return e?r.default.createElement(c.default,null):this.compareModeAvailable()&&t?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}t.Component=w,w.propTypes={contextKey:v.default.string,limit:v.default.number,ListComponent:v.default.elementType.isRequired,offset:v.default.number,recordId:v.default.number.isRequired,currentVersion:v.default.oneOfType([v.default.bool,d.versionType]),compare:f.compareType,isInGridField:v.default.bool,isPreviewable:v.default.bool,isRevertable:v.default.bool,VersionDetailComponent:v.default.elementType.isRequired,CompareWarningComponent:v.default.elementType.isRequired,versions:v.default.shape({versions:v.default.shape({pageInfo:v.default.shape({totalCount:v.default.number}),nodes:v.default.arrayOf(d.versionType)})}),page:v.default.number,schemaUrl:v.default.string,previewState:v.default.oneOf(["edit","preview","split"]),actions:v.default.object,onSelect:v.default.func,onSetPage:v.default.func,onResize:v.default.func},w.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,schemaUrl:"",versions:{versions:{pageInfo:{totalCount:0},nodes:[]}}};var x=(0,o.compose)((0,s.connect)((function(e){const{currentPage:t,currentVersion:n,compare:r}=e.versionedAdmin.historyViewer,{activeState:o}=e.viewMode;return{page:t,currentVersion:n,compare:r,previewState:o}}),(function(e){return{onSelect(t){e((0,p.showVersion)(t)),e((0,p.clearMessages)())},onSetPage(t){e((0,p.setCurrentPage)(t))},onResize(t){e(g.enableOrDisableSplitMode(t))}}})),a.default,(0,u.inject)(["HistoryViewerVersionList","HistoryViewerVersionDetail","HistoryViewerCompareWarning"],((e,t,n)=>({ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:n})),(e=>{let{contextKey:t}=e;return`VersionedAdmin.HistoryViewer.${t}`})))(w);t.default=x},1553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=l(n(7086)),s=n(1624),i=l(n(4754)),a=n(6215);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends r.Component{constructor(e){super(e),this.handleDismissCompare=this.handleDismissCompare.bind(this)}handleDismissCompare(){this.props.onDismissCompare()}render(){return this.props.isCompare?r.default.createElement("div",{className:"history-viewer__compare-notice alert alert-info"},r.default.createElement("span",{className:"notice-message"},r.default.createElement("strong",null,i.default._t("HistoryViewer.COMPARE_MODE","Compare mode"),": "),i.default._t("HistoryViewer.SELECT_PROMPT","Select two versions")),r.default.createElement("button",{className:"btn dismiss-button font-icon-cancel",onClick:this.handleDismissCompare},i.default._t("HistoryViewer.EXIT","Exit"))):null}}c.propTypes={isCompare:o.default.bool.isRequired};var p=(0,s.connect)((function(e){const{compare:t}=e.versionedAdmin.historyViewer;return{isCompare:!!t}}),(function(e){return{onDismissCompare(){e((0,a.setCompareMode)(!1))}}}))(c);t.default=p},9559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=p(n(4754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),s=n(8127),i=n(6215),a=n(2827),l=n(1624),u=p(n(7086));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}class d extends o.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.handleCompareModeChange=this.handleCompareModeChange.bind(this),this.state={dropdownOpen:!1}}toggle(){this.setState((e=>({dropdownOpen:!e.dropdownOpen})))}handleCompareModeChange(){const{compareModeSelected:e,onCompareModeUnselect:t,onCompareModeSelect:n}=this.props;e?t():n()}renderDropdown(){const{compareModeAvailable:e,compareModeSelected:t}=this.props,{dropdownOpen:n}=this.state;return e?o.default.createElement(s.Dropdown,{isOpen:n,toggle:this.toggle,className:"history-viewer__actions-dropdown"},o.default.createElement(s.DropdownToggle,{className:"font-icon-sliders"}),o.default.createElement(s.DropdownMenu,{right:!0},o.default.createElement("div",{className:"form-check"},o.default.createElement("input",{id:"history-viewer-compare-two",type:"checkbox",className:"no-change-track history-viewer-heading__compare-mode-checkbox",checked:t,onChange:this.handleCompareModeChange}),o.default.createElement("label",{className:"form-check-label",htmlFor:"history-viewer-compare-two"},r.default._t("HistoryViewerHeading.COMPARE_VERSIONS","Compare two versions"))))):null}render(){return o.default.createElement("li",{className:"history-viewer__heading",role:"row"},o.default.createElement("span",{className:"history-viewer__version-no",role:"columnheader"},"#"),o.default.createElement("span",{className:"history-viewer__version-state",role:"columnheader"},r.default._t("HistoryViewer.Record","Record")),o.default.createElement("span",{className:"history-viewer__author",role:"columnheader"},r.default._t("HistoryViewer.Author","Author")),o.default.createElement("span",{className:"history-viewer__actions",role:"columnheader"},this.renderDropdown()))}}t.Component=d,d.propTypes={compareModeAvailable:u.default.bool,compareModeSelected:u.default.bool,onCompareModeSelect:u.default.func,onCompareModeUnselect:u.default.func},d.defaultProps={compareModeAvailable:!0};var f=(0,a.compose)((0,l.connect)((function(e){return{compareModeSelected:!!e.versionedAdmin.historyViewer.compare}}),(function(e){return{onCompareModeSelect(){e((0,i.setCompareMode)(!0))},onCompareModeUnselect(){e((0,i.setCompareMode)(!1))}}})))(d);t.default=f},9769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7086)),s=n(2827),i=n(1624),a=c(n(4754)),l=n(6648),u=n(6215);function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{constructor(e){super(e),this.handleRevert=this.handleRevert.bind(this),this.state={isReverting:!1}}handleRevert(){const{actions:{revertToVersion:e},onAfterRevert:t,recordId:n,versionId:r}=this.props;this.setState({isReverting:!0});const o="function"==typeof t?t:()=>{};return e(n,r,"DRAFT","DRAFT").then((()=>o(r)))}render(){const{FormActionComponent:e,ViewModeComponent:t,isLatestVersion:n,isPreviewable:o,isRevertable:s}=this.props,{isReverting:i}=this.state;let l="";return i?l=a.default._t("HistoryViewerToolbar.REVERT_IN_PROGRESS","Revert in progress..."):n&&(l=a.default._t("HistoryViewerToolbar.REVERT_UNAVAILABLE","Unavailable for the current version")),r.default.createElement("div",{className:"toolbar toolbar--south"},r.default.createElement("div",{className:"btn-toolbar"},s&&r.default.createElement(e,{onClick:this.handleRevert,icon:"back-in-time",name:"revert",attributes:{title:l},data:{buttonStyle:"warning"},disabled:n||i,loading:i,title:a.default._t("HistoryViewerToolbar.REVERT_TO_VERSION","Revert to this version")}),o&&r.default.createElement(t,{id:"history-viewer-edit-mode",area:"edit"})))}}t.Component=d,d.propTypes={actions:o.default.shape({revertToVersion:o.default.func.isRequired}),FormActionComponent:o.default.elementType.isRequired,ViewModeComponent:o.default.elementType.isRequired,isLatestVersion:o.default.bool,isPreviewable:o.default.bool,isRevertable:o.default.bool,onAfterRevert:o.default.func,recordId:o.default.number.isRequired,versionId:o.default.number.isRequired},d.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1};var f=(0,s.compose)((0,i.connect)(null,(function(e){return{onAfterRevert(t){e((0,u.addMessage)(a.default.sprintf(a.default._t("HistoryViewerToolbar.REVERTED_MESSAGE","Successfully reverted to version %s"),t))),e((0,u.showList)())}}})),(0,l.inject)(["FormAction","ViewModeToggle"],((e,t)=>({FormActionComponent:e,ViewModeComponent:t})),(()=>"VersionedAdmin.HistoryViewer.Toolbar")))(d);t.default=f},3461:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=n(2827),i=n(1624),a=n(6648),l=n(185),u=n(1118),c=f(n(4754)),p=f(n(7820)),d=n(6215);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.handleCompare=this.handleCompare.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}getAuthor(){const{version:e}=this.props;let t={};return e.published&&e.publisher?t=e.publisher:e.author&&(t=e.author),`${t.firstName||""} ${t.surname||""}`}getClassNames(){const{extraClass:e,isActive:t,compare:n,compare:{compareFrom:r,compareTo:o}}=this.props,s={"history-viewer__row":!0,"history-viewer__row--current":t,"history-viewer__row--comparison-selected":n&&!(r&&o)};return(0,p.default)(s,e)}handleKeyUp(e){13===e.keyCode&&this.handleClick()}handleClick(){const{onSelect:e,version:t,isActive:n,compare:r}=this.props;return n||e(t,r),!1}handleCompare(){const{onCompareMode:e,version:t}=this.props;e(t)}handleClose(){const{onSelect:e,version:t,compare:n,compare:{versionFrom:r}}=this.props;r&&r.version===t.version&&delete n.versionFrom,e(0,n)}renderCompareButton(){const{compareModeAvailable:e,compare:t,FormActionComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.COMPARE","Compare");return!e||t?null:r.default.createElement(n,{onClick:this.handleCompare,title:o,buttonStyle:"outline-light",extraClass:"history-viewer__compare-button"},o)}renderClearButton(){const{FormActionComponent:e,isActive:t}=this.props;return t?r.default.createElement(e,{onClick:this.handleClose,icon:"cancel",attributes:{title:c.default._t("HistoryViewerVersion.CLOSE","Close")},title:null,buttonStyle:"outline-light",extraClass:"history-viewer__close-button"}):null}renderSelectedMessage(){const{isActive:e}=this.props;return e?r.default.createElement("span",{className:"history-viewer__selected-message"},c.default._t("HistoryViewerVersion.SELECTED","Already selected")):null}renderActions(){const{isActive:e,compare:t}=this.props;return e||t?r.default.createElement("span",{className:"history-viewer__actions",role:"cell"},this.renderCompareButton(),this.renderSelectedMessage(),this.renderClearButton()):r.default.createElement("span",{className:"history-viewer__actions",role:"cell"})}render(){const{version:e,isActive:t,StateComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.GO_TO_VERSION","Go to version {version}");return r.default.createElement("li",{className:this.getClassNames(),role:"row"},r.default.createElement("span",{className:"history-viewer__version-link",role:"button",title:c.default.inject(o,{version:e.Version}),onClick:this.handleClick,onKeyUp:this.handleKeyUp,tabIndex:0},r.default.createElement("span",{className:"history-viewer__version-no",role:"cell"},e.version),r.default.createElement(n,{version:e,isActive:t}),r.default.createElement("span",{className:"history-viewer__author",role:"cell"},this.getAuthor()),this.renderActions()))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),version:l.versionType,isActive:o.default.bool,onSelect:o.default.func,onCompareMode:o.default.func,compare:u.compareType,compareModeAvailable:o.default.bool,StateComponent:o.default.elementType.isRequired,FormActionComponent:o.default.elementType.isRequired},m.defaultProps={isActive:!1,version:l.defaultVersion,compare:!1,compareModeAvailable:!0};var g=(0,s.compose)((0,i.connect)(null,(function(e){return{onSelect(t,n){const{versionFrom:r}=n;n?e(r?(0,d.setCompareTo)(t):(0,d.setCompareFrom)(t)):(e((0,d.showVersion)(t)),e((0,d.clearMessages)()))},onCompareMode(t){e((0,d.setCompareFrom)(t)),e((0,d.setCompareMode)(!0))}}})),(0,a.inject)(["HistoryViewerVersionState","FormAction"],((e,t)=>({StateComponent:e,FormActionComponent:t})),(e=>{let{version:t}=e,n="VersionedAdmin.HistoryViewer.HistoryViewerVersion";return t&&(n+=`.${t.version}`),n})))(m);t.default=g},2477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=p(n(7820)),s=p(n(8238)),i=n(6648),a=n(185),l=p(n(7086)),u=p(n(1872)),c=p(n(7902));function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class f extends r.PureComponent{componentDidMount(){this.toggleToolbarClass(!0)}componentDidUpdate(){this.toggleToolbarClass("split"===this.props.previewState)}componentWillUnmount(){this.toggleToolbarClass(!1)}getListVersions(){const{compare:e,version:t}=this.props;return this.isCompareMode()?[e.versionTo,e.versionFrom]:[t]}isPreviewable(){const{isPreviewable:e}=this.props;return e&&!this.isCompareMode()}isCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo}toggleToolbarClass(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=document.querySelector(".CMSPageHistoryViewerController div:not(.cms-content-tools) .cms-content-header"),n="history-viewer__toolbar--condensed";t&&this.isPreviewable()&&(e?t.classList.add(n):t.classList.remove(n))}renderPreview(){const{version:{absoluteLink:e,lastEdited:t,version:n},PreviewComponent:o,previewState:s}=this.props;if(!this.isPreviewable()||"edit"===s)return null;const i=u.default.parse(e),a=c.default.parse(i.query);a.archiveDate=t;const l=u.default.format({...i,search:c.default.stringify(a)});return r.default.createElement(o,{className:"history-viewer__preview flexbox-area-grow",itemLinks:{preview:{Stage:{href:l,type:"text/html"}}},itemId:n})}renderToolbar(){const{ToolbarComponent:e,isLatestVersion:t,isRevertable:n,recordId:o,version:s}=this.props;return this.isCompareMode()?null:r.default.createElement(e,{identifier:"HistoryViewer.VersionDetail.Toolbar",isLatestVersion:t,recordId:o,versionId:s.version,isPreviewable:this.isPreviewable(),isRevertable:n})}renderDetails(){const{compareModeAvailable:e,ListComponent:t,schemaUrl:n,CompareWarningComponent:i,previewState:a}=this.props;if(this.isPreviewable()&&"preview"===a)return null;const l={"history-viewer__table":!0,"history-viewer__table--current":!0,"history-viewer__table--compare":this.isCompareMode()},u={"history-viewer__version-detail":!0,"history-viewer__version-detail--compare":this.isCompareMode()};return r.default.createElement("div",{className:"flexbox-area-grow fill-height"},r.default.createElement(i,{fixed:!0}),r.default.createElement("div",{className:(0,o.default)(["flexbox-area-grow","panel","panel--scrollable","panel--padded","panel--padded-side"])},r.default.createElement(t,{extraClass:(0,o.default)(l),versions:this.getListVersions(),compareModeAvailable:e}),r.default.createElement("div",{className:(0,o.default)(u)},r.default.createElement(s.default,{identifier:"HistoryViewer.VersionDetail",schemaUrl:n}))),this.renderToolbar())}render(){return r.default.createElement("div",{className:"flexbox-area-grow fill-width"},this.renderDetails(),this.renderPreview())}}t.Component=f,f.propTypes={isLatestVersion:l.default.bool,isPreviewable:l.default.bool,isRevertable:l.default.bool,ListComponent:l.default.elementType.isRequired,PreviewComponent:l.default.elementType,recordId:l.default.number.isRequired,schemaUrl:l.default.string.isRequired,ToolbarComponent:l.default.elementType.isRequired,version:a.versionType,compare:l.default.oneOfType([l.default.shape({versionFrom:a.versionType,versionTo:a.versionType}),l.default.bool]),previewState:l.default.oneOf(["edit","preview","split"])},f.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1,compare:!1};var h=(0,i.inject)(["HistoryViewerVersionList","HistoryViewerToolbar","Preview","HistoryViewerCompareWarning"],((e,t,n,r)=>({ListComponent:e,ToolbarComponent:t,PreviewComponent:n,CompareWarningComponent:r})),((e,t)=>{let{version:n}=e;return`${t}.HistoryViewerVersionDetail.${n.Version}`}))(f);t.default=h},8488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=f(n(7820)),i=f(n(4754)),a=n(1624),l=n(2827),u=n(6648),c=n(3057),p=n(185),d=n(1118);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.PureComponent{getClassNames(){const{extraClass:e,showHeader:t}=this.props;return(0,s.default)(e,{table:!0,"history-viewer__table--headerless":!t})}isVersionActive(e){const{currentVersion:t,compare:n,compare:{versionFrom:r,versionTo:o}}=this.props,s=t&&t.version===e.version,i=r&&r.version===e.version,a=o&&o.version===e.version;return!n&&s||i||a}renderMessages(){const{FormAlertComponent:e,messages:t}=this.props;return t.length?r.default.createElement("div",{className:"history-viewer__messages"},t.map((t=>r.default.createElement(e,{key:t.id,type:t.type,value:t.message,closeLabel:i.default._t("HistoryViewerVersionList.CLOSE","Close")})))):null}renderHeader(){const{showHeader:e,HeadingComponent:t,compareModeAvailable:n}=this.props;if(!e)return null;const o={compareModeAvailable:n};return r.default.createElement(t,o)}render(){const{VersionComponent:e,versions:t,compareModeAvailable:n,compare:o}=this.props;return r.default.createElement("div",{className:"history-viewer__list"},this.renderMessages(),r.default.createElement("ul",{className:this.getClassNames(),role:"table"},this.renderHeader(),t.map((t=>r.default.createElement(e,{key:t.version,isActive:this.isVersionActive(t),version:t,compare:o,compareModeAvailable:n})))))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),showHeader:o.default.bool,FormAlertComponent:o.default.elementType.isRequired,HeadingComponent:o.default.elementType.isRequired,messages:o.default.arrayOf(c.messageType),VersionComponent:o.default.elementType.isRequired,versions:o.default.arrayOf(p.versionType),compare:d.compareType,compareModeAvailable:o.default.bool},m.defaultProps={compareModeAvailable:!0,extraClass:"history-viewer__table",messages:[],showHeader:!0,versions:[]};var g=(0,l.compose)((0,a.connect)((function(e){const{messages:t,compare:n,currentVersion:r}=e.versionedAdmin.historyViewer;return{messages:t,compare:n,currentVersion:r}})),(0,u.inject)(["FormAlert","HistoryViewerHeading","HistoryViewerVersion"],((e,t,n)=>({FormAlertComponent:e,HeadingComponent:t,VersionComponent:n})),(()=>"VersionedAdmin.HistoryViewer.HistoryViewerVersionList")))(m);t.default=g},5385:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7820)),s=c(n(4754)),i=c(n(7657)),a=n(185),l=n(6648),u=c(n(7086));function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{getClassNames(){const{extraClass:e}=this.props;return(0,o.default)("history-viewer__version-state",e)}getPublishedState(){const{version:e}=this.props;return 1===e.version?s.default._t("HistoryViewer.Created","Created"):e.published?e.deleted?e.draft?s.default._t("HistoryViewer.Archived","Archived"):s.default._t("HistoryViewer.Unpublished","Unpublished"):s.default._t("HistoryViewer.Published","Published"):s.default._t("HistoryViewer.Saved","Saved")}getDate(){return i.default.locale(s.default.detectLocale()),(0,i.default)(this.props.version.lastEdited).format("L LT")}getBadges(){const{version:e,isActive:t,BadgeComponent:n}=this.props;return e.liveVersion?r.default.createElement(n,{status:"success",message:s.default._t("HistoryViewer.BadgeLive","Live"),className:"",inverted:t}):""}render(){return r.default.createElement("span",{className:this.getClassNames(),role:"cell"},this.getPublishedState()," ",r.default.createElement("small",{className:"text-muted"},this.getDate()),this.getBadges())}}t.Component=d,d.propTypes={version:a.versionType,extraClass:u.default.string,isActive:u.default.bool,BadgeComponent:u.default.oneOfType([u.default.node,u.default.func]).isRequired},d.defaultProps={version:a.defaultVersion,extraClass:"",isActive:!1};var f=(0,l.inject)(["Badge"],(e=>({BadgeComponent:e})),(e=>{let{version:t}=e;return`HistoryViewer.HistoryViewerVersionState.${t.Version}`}))(d);t.default=f},2291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7363)),o=i(n(4510)),s=n(6648);function i(e){return e&&e.__esModule?e:{default:e}}var a=e=>{class t extends r.default.Component{getConfig(){return o.default.getSection("SilverStripe\\VersionedAdmin\\Controllers\\HistoryViewerController")}getSchemaUrlDetails(){const{compare:e}=this.props;return e?{formName:"compareForm",queryParts:["RecordVersionFrom=:from","RecordVersionTo=:to"]}:{formName:"versionForm",queryParts:["RecordVersion=:version"]}}getSchemaUrl(){const e=this.getConfig(),{formName:t,queryParts:n}=this.getSchemaUrlDetails();return`${`${e.form[t].schemaUrl}/:id`}?${n.concat("RecordClass=:class&RecordID=:id").join("&")}`}render(){const t={...this.props,config:this.getConfig(),HistoryViewer:e,schemaUrl:this.getSchemaUrl()};return r.default.createElement(e,t)}}return(0,s.inject)(["HistoryViewer"])(t)};t.default=a},9679:function(e,t,n){"use strict";var r;((r=n(5311))&&r.__esModule?r:{default:r}).default.entwine("ss",(e=>{e(".ArchiveAdmin__action--restore").entwine({onmatch(){e(this).attr("readonly",!1),e(this).attr("disabled",!1)}}),e(".ArchiveAdmin .other-model-selector select").entwine({onchange(t){t.preventDefault();let n=e(this).val();const r=e(this).data("others-archive-url");if(n){n=n.replace(/\\/g,"-");const t=r+n;e(".cms-container").loadPanel(t,"",{pjax:"CurrentForm"})}}})}))},6674:function(e,t,n){"use strict";var r=a(n(5311)),o=a(n(7363)),s=n(9691),i=n(6648);function a(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss",(e=>{e(".js-injector-boot .history-viewer__container").entwine({ReactRoot:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,i.loadComponent)("HistoryViewer",t),r=this.data("schema"),a={...r.data,isInGridField:r.data.isInGridField||!this.hasClass("history-viewer--standalone")},l=(0,s.createRoot)(this[0]);l.render(o.default.createElement(n,a)),this.setReactRoot(l)},onunmatch(){const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))}}),e(".history-viewer__version-detail .nav-link").entwine({onclick(e){e.preventDefault(),this._super(e)}}),e(".tab.tab--history-viewer[aria-hidden=false]").entwine({onmatch(){e(".toolbar--south.cms-content-actions").hide()},onunmatch(){e(".toolbar--south.cms-content-actions").show()}}),e(".tab.tab--history-viewer .history-viewer__version-detail").entwine({onmatch(){this.parent().css("padding-bottom","3rem").next(".toolbar--south").css({position:"absolute",bottom:0,left:0,right:0})}})}))},574:function(e,t,n){"use strict";var r=o(n(4754));function o(e){return e&&e.__esModule?e:{default:e}}o(n(5311)).default.entwine("ss",(e=>{e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doUnpublish").entwine({onclick(e){const t=r.default._t("VersionedEditForm.PUBLISH_CONFIRM_MESSAGE","Are you sure you want to remove your record from the published site?\n\nThis record will still be available in the CMS as draft.");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doArchive").entwine({onclick(e){const t=r.default._t("VersionedEditForm.ARCHIVE_CONFIRM_MESSAGE","Warning: This record will be unpublished before being sent to the archive.\n\nAre you sure you want to proceed?");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}})}))},3061:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["SHOW_VERSION","SHOW_LIST","SET_CURRENT_PAGE","ADD_MESSAGE","CLEAR_MESSAGES","SET_COMPARE_MODE","SET_COMPARE_FROM","SET_COMPARE_TO"].reduce(((e,t)=>Object.assign(e,{[t]:`HISTORY_VIEWER.${t}`})),{});t.default=n},6215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMessage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";return{type:s.default.ADD_MESSAGE,payload:{id:(0,o.v1)(),message:e,type:t}}},t.clearMessages=function(){return{type:s.default.CLEAR_MESSAGES}},t.setCompareFrom=function(e){return{type:s.default.SET_COMPARE_FROM,payload:{version:e}}},t.setCompareMode=function(e){return{type:s.default.SET_COMPARE_MODE,payload:{enabled:e}}},t.setCompareTo=function(e){return{type:s.default.SET_COMPARE_TO,payload:{version:e}}},t.setCurrentPage=function(e){return{type:s.default.SET_CURRENT_PAGE,payload:{page:e}}},t.showList=function(){return{type:s.default.SHOW_LIST}},t.showVersion=function(e){return{type:s.default.SHOW_VERSION,payload:{version:e}}};var r,o=n(7429),s=(r=n(3061))&&r.__esModule?r:{default:r}},7908:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,payload:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case o.default.SET_CURRENT_PAGE:return{...e,currentPage:n.page};case o.default.SHOW_VERSION:return{...e,currentVersion:n.version};case o.default.SHOW_LIST:return{...e,currentVersion:0,currentPage:0};case o.default.ADD_MESSAGE:return{...e,messages:[n,...e.messages]};case o.default.CLEAR_MESSAGES:return{...e,messages:[]};case o.default.SET_COMPARE_MODE:{const t={versionFrom:!1,versionTo:!1,...e.compare};return{...e,compare:!!n.enabled&&t}}case o.default.SET_COMPARE_FROM:{let{compare:{versionFrom:t,versionTo:r}}=e;return t=n.version||!1,t||(t=r,r=!1),{...e,currentVersion:t,compare:{versionFrom:t,versionTo:r}}}case o.default.SET_COMPARE_TO:{let{compare:{versionFrom:t,versionTo:r}}=e;return r=n.version||!1,r&&t&&r.version0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var r=this.getColumnMetadataByName(e);return null==r?n:r.hasOwnProperty(t)?r[t]:n}},{key:"orderColumns",value:function(e){var t=this;return l(e,(function(e){var n=a(t.columnMetadata,{columnName:e});return null==n||isNaN(n.order)?100:n.order}))}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=u(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=c},1172:function(e,t,n){"use strict";var r=n(7363),o=n(2555)({getDefaultProps:function(){return{placeholderText:""}},render:function(){return"function"!=typeof this.props.customFilterComponent?(console.log("Couldn't find valid template."),r.createElement("div",null)):r.createElement(this.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=o},2039:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t0&&(e=r.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=r.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,o=null,i=null;if(!0===this.props.useGriddleStyles){var a={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},a),o=s({textAlign:"center",width:"33%"},a),n=s({width:"33%"},a)}for(var l=[],u=1;u<=this.props.maxPage;u++)l.push(r.createElement("option",{value:u,key:u},u));return r.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},r.createElement("div",{className:this.props.previousClassName,style:n},e),r.createElement("div",{className:"griddle-page",style:o},r.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},l)," / ",this.props.maxPage),r.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},344:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(7024)),i=n(3560),a=n(7287),l=n(8583),u=n(1747),c=n(3220),p=n(2569),d=o({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var o=this.props.columnSettings.getColumns(),d=a(o,[]),f=l({},this.props.data);u(f,d);var h,m,g=c(s.pick(f,p(o,"children"))).map((function(t,o){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),a=0===o&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===o&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===o&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=l(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&null!=i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=r.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},u)}else s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},a,e.formatData(t[1]));return s||r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:o,style:n},a,t[1])}));if(null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(r.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},r.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"})))}var v=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?v="child-row":t.props.hasChildren&&(v=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),r.createElement("tr",{onClick:h,className:v},g)}});e.exports=d},3302:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(8718)),i=o({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return r.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(r.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var o=null;return e.state.showChildren&&(o=e.props.hasChildren&&this.props.data.children.map((function(t,n){var o=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return r.createElement("tr",{key:o,style:{paddingLeft:5}},r.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},r.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return r.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:o})}))),!1===e.props.hasChildren?t[0]:r.createElement("tbody",null,e.state.showChildren?t.concat(o):t)}});e.exports=i},7033:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4721),i=n(2569),a=n(3311),l=o({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map((function(t,n){var o=s(e.props.selectedColumns,t),i=a(e.props.columnMetadata,{columnName:t}),l=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(l=i.displayName),void 0!==i&&null!=i&&i.locked?r.createElement("div",{className:"column checkbox"},r.createElement("label",null,r.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:o,"data-name":t}),l)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:r.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},r.createElement("label",null,r.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:o,"data-name":t}),l))})));var n=e.props.enableToggleCustom?r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:"maxRows"},r.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",o=this.props.showSetPageSize?r.createElement("div",null,r.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",r.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},r.createElement("option",{value:"5"},"5"),r.createElement("option",{value:"10"},"10"),r.createElement("option",{value:"25"},"25"),r.createElement("option",{value:"50"},"50"),r.createElement("option",{value:"100"},"100")))):"";return r.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},r.createElement("h6",null,this.props.settingsText),r.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),o,n)}});e.exports=l},1277:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4769),i=n(3302),a=(n(3059),n(5203),o({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var o={scrollTop:t,scrollHeight:n,clientHeight:r};this.setState(o)}.6*(n-(t+r)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,o=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var a=e.getAdjustedRowHeight(),l=Math.ceil(e.state.clientHeight/a),u=Math.max(0,Math.floor(e.state.scrollTop/a)-.25*l),c=Math.min(u+1.25*l,this.props.data.length-1);n=n.slice(u,c+1);var p={height:u*a+"px"};o=r.createElement("tr",{key:"above-"+p.height,style:p});var d={height:(this.props.data.length-c)*a+"px"};s=r.createElement("tr",{key:"below-"+d.height,style:d})}var f=n.map((function(n,o){var s=void 0!==n.children&&n.children.length>0,a=e.props.rowSettings.getRowKey(n,o);return s&&(t=s),r.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:a+"-container",uniqueId:a,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})}));if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(r.createElement("tr",{key:"no-data-section"},r.createElement("td",{colSpan:h},this.props.noDataSection)))}return o&&f.unshift(o),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var o=null,i=null,a={width:"100%"};if(this.props.useFixedLayout&&(a.tableLayout="fixed"),this.props.enableInfiniteScroll&&(o={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var l,u=null;this.props.useGriddleStyles&&(u={textAlign:"center",paddingBottom:"40px"}),l=this.props.columnSettings.getVisibleColumnCount();var c=this.props.externalLoadingComponent?r.createElement(this.props.externalLoadingComponent,null):r.createElement("div",null,"Loading...");i=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{style:u,colSpan:l},c)))}var p=this.props.showTableHeading?r.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=r.createElement("tbody",null,e));var d=r.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;d=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(a.tableLayout="fixed"),r.createElement("div",null,r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p),r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},e,i,d)))):r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p,e,i,d))}}));e.exports=a},4769:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)return!0}return!1}))},defaultColumnFilter:function(e,t,n){var r=A(M(n)?n:[n],(function(e){return(e||"").toLowerCase()}));return V(C.getObjectValues(t),(function(e){return e=e.toString().toLowerCase(),V(r,(function(t){return e.indexOf(t)>=0}))}))},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce((function(n,r){return D(n,(function(n){var o=C.getAt(n,r||""),s=e[r];return t(r||"",o,s)}))}),this.props.results),r={columnFilters:e};e?(r.filteredResults=n,r.maxPage=this.getMaxPage(r.filteredResults)):this.state.filter?r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):r.filteredResults=null,this.setState(r)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=N(n,t);else{var r={};r[t]=e,n=T({},n,r)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)this.props.externalSetFilter(e);else{var n=this,r={page:0,filter:e};r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),r.maxPage=n.getMaxPage(r.filteredResults),(j(e)||O(e)||R(e))&&(r.filter=e,r.filteredResults=null),n.setState(r),this._resetSelectedRows()}},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return null==e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)this.props.externalSetPage(e);else{if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t={page:e};this.setState(t)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})}},setColumns:function(e){this.columnSettings.filteredColumns=M(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=x(this.props.columnMetadata,{columnName:e})||{},r=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],o=r.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null),s={page:0,sortColumn:e,sortDirection:r[o=(o+1)%r.length]?r[o]:null};this.setState(s)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=C.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every((function(e,n){return e===t[n]}))||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,A(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new v(this.props.results.length>0?C.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new y(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:d,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var r=this,o=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,a=D(this.props.columnMetadata,{columnName:i}),l={columns:[],orders:[]};if(a.length>0&&(s=a[0].hasOwnProperty("customCompareFn")&&a[0].customCompareFn,a[0].multiSort&&(l=a[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort((function(e,t){return s(F(e,i),F(t,i))})),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=I(e,(function(e){return s(F(e,i))}),[this.state.sortDirection]));else{var u=[function(e){return(F(e,i)||"").toString().toLowerCase()}],c=[this.state.sortDirection];l.columns.forEach((function(e,t){u.push((function(t){return(F(t,e)||"").toString().toLowerCase()})),"asc"===l.orders[t]||"desc"===l.orders[t]?c.push(l.orders[t]):c.push(r.state.sortDirection)})),e=I(e,u,c)}}var p=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(p+1)<=this.state.resultsPerPage*this.state.maxPage&&p>=0)if(this.isInfiniteScrollEnabled())e=S(e,(p+1)*this.state.resultsPerPage);else{var d=b(e,p*this.state.resultsPerPage);e=(w||E)(d,d.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=o.getDataForRender(m[o.props.childrenColumnName],t,!1),"children"!==o.props.childrenColumnName&&delete m[o.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),r=this;_(e,(function(e){r._updateSelectedRowIds(e[r.props.uniqueIdentifier],n,t)}),this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),r=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],r,t);var o=this._getAreAllRowsChecked(r,A(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:o,selectedRowIds:r}),this.props.onSelectionChange&&this.props.onSelectionChange(r,o)},_updateSelectedRowIds:function(e,t,n){n?void 0===x(t,(function(t){return e===t}))&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===P(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!x(this.props.results,(function(e){return"children"in e}))&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?o.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):o.createElement(l,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?o.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,r=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),r=this.getSettingsStyles(),s=this.getClearFixStyles()),o.createElement("div",{className:"top-section",style:s},o.createElement("div",{className:"griddle-filter",style:n},e),o.createElement("div",{className:"griddle-settings-toggle",style:r},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return o.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?o.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):o.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?o.createElement(c,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return o.createElement(this.props.customGridComponent,r({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,r,s){return o.createElement("div",null,o.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&r)},getStandardGridSection:function(e,t,n,r,s){var i=this.getSortObject(),l=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),c=this.getNoDataSection();return o.createElement("div",{className:"griddle-body"},o.createElement(a,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:c,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:l,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:r,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,r,o,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,r,s):this.getStandardGridSection(e,t,n,r,o)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?o.createElement("div",{className:this.props.noDataClassName},o.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):o.createElement(p,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),r=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),a=this.getDataForRender(e,i,!0),l=this.columnSettings.getMetadataColumns();this.props.columnMetadata?_(this.props.columnMetadata,(function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)})):s=C.keys(N(e[0],l)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),c=this.getCurrentMaxPage(),p=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",o.createElement("div",{className:m},r,h,o.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=k},5203:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(p=l,d=!1,t=new r(t));e:for(;++c0&&s(c)?n>1?e(c,n-1,s,i,a):r(a,c):i||(a[a.length]=c)}return a}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),o=n(3674);e.exports=function(e,t){return e&&r(e,t,o)}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n=120&&v.length>=120)?new r(f&&v):void 0}v=e[0];var y=-1,C=h[0];e:for(;++yo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++rt||i&&a&&u&&!l&&!c||o&&a&&u||!n&&u||!s)return 1;if(!o&&!i&&!c&&e=l?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(s--,i):void 0,a&&o(n[0],n[1],a)&&(i=s<3?void 0:i,s=1),t=Object(t);++r-1?a[l?t[u]:u]:void 0}}},3866:function(e,t,n){var r=n(8969),o=n(4160),s=n(8776),i=n(9294);e.exports=function(e){return function(t){var n=o(t);return"[object Map]"==n?s(t):"[object Set]"==n?i(t):r(t,e(t))}}},696:function(e,t,n){var r=n(8630);e.exports=function(e){return r(e)?void 0:e}},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),s=n(4757);e.exports=function(e,t,n,i,a,l){var u=1&n,c=e.length,p=t.length;if(c!=p&&!(u&&p>c))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),s=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,i=s&&s.exports===o&&r.process,a=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,a=o(s.length-t,0),l=Array(a);++i0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),s=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(i)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(r=1);++n-1:!!c&&r(e,t,n)>-1}},8125:function(e,t,n){var r=n(4259);e.exports=function(e){return(null==e?0:e.length)?r(e,0,-1):[]}},5325:function(e,t,n){var r=n(9932),o=n(7556),s=n(5976),i=n(4387),a=s((function(e){var t=r(e,i);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},5694:function(e,t,n){var r=n(9454),o=n(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,a=i&&i.exports===s?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},1609:function(e,t,n){var r=n(280),o=n(4160),s=n(5694),i=n(1469),a=n(8612),l=n(4144),u=n(5726),c=n(6719),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||s(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),s=n(1167),i=s&&s.isMap,a=i?o(i):r;e.exports=a},5220:function(e){e.exports=function(e){return null===e}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),s=n(7005),i=Function.prototype,a=Object.prototype,l=i.toString,u=a.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!s(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},2928:function(e,t,n){var r=n(9221),o=n(1717),s=n(1167),i=s&&s.isSet,a=i?o(i):r;e.exports=a},7037:function(e,t,n){var r=n(4239),o=n(1469),s=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&s(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),s=n(1167),i=s&&s.isTypedArray,a=i?o(i):r;e.exports=a},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),s=n(8612);e.exports=function(e){return s(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),s=n(8612);e.exports=function(e){return s(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,n){var r=n(9932),o=n(7206),s=n(9199),i=n(1469);e.exports=function(e,t){return(i(e)?r:s)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var i=e.apply(this,r);return n.cache=s.set(o,i)||s,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},7557:function(e,t,n){var r=n(9932),o=n(5990),s=n(7406),i=n(1811),a=n(8363),l=n(696),u=n(9021),c=n(6904),p=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=i(t,e),u||(u=t.length>1),t})),a(e,c(e),n),u&&(n=o(n,7,l));for(var p=t.length;p--;)s(n,t[p]);return n}));e.exports=p},5472:function(e,t,n){var r=n(2689),o=n(1469);e.exports=function(e,t,n,s){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=s?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},8718:function(e,t,n){var r=n(5970),o=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},9601:function(e,t,n){var r=n(371),o=n(9152),s=n(5403),i=n(327);e.exports=function(e){return s(e)?r(i(e)):o(e)}},9704:function(e,t,n){var r=n(2908),o=n(7206),s=n(5076),i=n(1469),a=n(6612);e.exports=function(e,t,n){var l=i(e)?r:s;return n&&a(e,t,n)&&(t=void 0),l(e,o(t,3))}},9734:function(e,t,n){var r=n(1078),o=n(2689),s=n(5976),i=n(6612),a=s((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=a},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9572:function(e,t,n){var r=n(4259),o=n(554);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},8601:function(e,t,n){var r=n(4841),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,n){var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:function(e,t,n){var r=n(7561),o=n(3218),s=n(3448),i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},3220:function(e,t,n){var r=n(3866)(n(3674));e.exports=r},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3955:function(e,t,n){var r=n(9833),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2628:function(e,t,n){var r=n(7415),o=n(3674);e.exports=function(e){return null==e?[]:r(e,o(e))}},2569:function(e,t,n){var r=n(731),o=n(5976),s=n(9246),i=o((function(e,t){return s(e)?r(e,t):[]}));e.exports=i},7287:function(e,t,n){var r=n(4865),o=n(1757);e.exports=function(e,t){return o(e||[],t||[],r)}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var i,a,l=o(e),u=1;u>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,s,i){return r((a=r(r(t,e),r(o,i)))<<(l=s)|a>>>32-l,n);var a,l}function s(e,t,n,r,s,i,a){return o(t&n|~t&r,e,t,s,i,a)}function i(e,t,n,r,s,i,a){return o(t&r|n&~r,e,t,s,i,a)}function a(e,t,n,r,s,i,a){return o(t^n^r,e,t,s,i,a)}function l(e,t,n,r,s,i,a){return o(n^(t|~r),e,t,s,i,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,s=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};t.default=s},58:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:function(e,t){"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;p=c,c=u,u=r(l,30)>>>0,l=i,i=a}o[0]=o[0]+i>>>0,o[1]=o[1]+l>>>0,o[2]=o[2]+u>>>0,o[3]=o[3]+c>>>0,o[4]=o[4]+p>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},4008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function i(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}var a=function(e,t=0){const n=i(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n};t.default=a},3990:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3319))&&r.__esModule?r:{default:r},s=n(4008);let i,a,l=0,u=0;var c=function(e,t,n){let r=t&&n||0;const c=t||new Array(16);let p=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:a;if(null==p||null==d){const t=e.random||(e.rng||o.default)();null==p&&(p=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==d&&(d=a=16383&(t[6]<<8|t[7]))}let f=void 0!==e.msecs?e.msecs:Date.now(),h=void 0!==e.nsecs?e.nsecs:u+1;const m=f-l+(h-u)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||f>l)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=f,u=h,a=d,f+=122192928e5;const g=(1e4*(268435455&f)+h)%4294967296;c[r++]=g>>>24&255,c[r++]=g>>>16&255,c[r++]=g>>>8&255,c[r++]=255&g;const v=f/4294967296*1e4&268435455;c[r++]=v>>>8&255,c[r++]=255&v,c[r++]=v>>>24&15|16,c[r++]=v>>>16&255,c[r++]=d>>>8|128,c[r++]=255&d;for(let e=0;e<6;++e)c[r+e]=p[e];return t||(0,s.unsafeStringify)(c)};t.default=c},8237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(7925)),o=s(n(4163));function s(e){return e&&e.__esModule?e:{default:e}}var i=(0,r.default)("v3",48,o.default);t.default=i},7925:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,i,a){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{(0,r.default)(),(0,o.default)()}))},9521:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=d(n(6648)),o=d(n(4065)),s=d(n(9559)),i=d(n(9769)),a=d(n(3461)),l=d(n(2477)),u=d(n(8488)),c=d(n(5385)),p=d(n(1553));function d(e){return e&&e.__esModule?e:{default:e}}t.default=()=>{r.default.component.registerMany({HistoryViewer:o.default,HistoryViewerHeading:s.default,HistoryViewerToolbar:i.default,HistoryViewerVersion:a.default,HistoryViewerVersionDetail:l.default,HistoryViewerVersionList:u.default,HistoryViewerVersionState:c.default,HistoryViewerCompareWarning:p.default})}},4180:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(6648)),o=n(2827),s=i(n(7908));function i(e){return e&&e.__esModule?e:{default:e}}var a=()=>{r.default.reducer.register("versionedAdmin",(0,o.combineReducers)({historyViewer:s.default}))};t.default=a},4065:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=b(n(7363)),o=n(2827),s=n(1624),i=y(n(8345)),a=y(n(2291)),l=y(n(4754)),u=n(6648),c=y(n(1264)),p=n(6215),d=n(185),f=n(1118),h=y(n(7820)),m=y(n(6104)),g=b(n(5108)),v=y(n(7086));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(C=function(e){return e?n:t})(e)}function b(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=C(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}class w extends r.Component{constructor(e){super(e),this.handleSetPage=this.handleSetPage.bind(this),this.handleNextPage=this.handleNextPage.bind(this),this.handlePrevPage=this.handlePrevPage.bind(this)}componentDidUpdate(e){if(!this.props.actions||!this.props.actions.versions)return;const{page:t}=e,{page:n}=this.props,{actions:{versions:r}}=this.props;t!==n&&"function"==typeof r.goToPage&&r.goToPage(n)}componentWillUnmount(){const{onSelect:e}=this.props;"function"==typeof e&&e(0)}getVersions(){const{versions:e}=this.props;return e&&e.versions&&e.versions.nodes?e.versions.nodes:[]}getContainerClasses(){const{compare:e,isInGridField:t}=this.props;return(0,h.default)("history-viewer","fill-height","panel--scrollable",{"history-viewer__compare-mode":e,"history-viewer--no-margins":t&&!this.isListView()})}getLatestVersion(){const{currentVersion:e}=this.props;if(e&&!0===e.latestDraftVersion)return e;const t=this.getVersions().filter((e=>!0===e.latestDraftVersion));return t.length?t[0]:null}isListView(){const{compare:e,currentVersion:t}=this.props;return!t||!!e&&!(!e.versionFrom||e.versionTo)}handleSetPage(e){const{onSetPage:t}=this.props;"function"==typeof t&&t(e+1)}handleNextPage(){const{page:e}=this.props;this.handleSetPage(e)}handlePrevPage(){const{page:e}=this.props,t=e-1;t<1?this.handleSetPage(t):this.handleSetPage(t-1)}compareModeAvailable(){return this.getVersions().length>1}renderVersionDetail(){const{currentVersion:e,isPreviewable:t,isRevertable:n,recordId:o,recordClass:s,schemaUrl:i,VersionDetailComponent:a,compare:l,compare:{versionFrom:u=!1,versionTo:c=!1},previewState:p}=this.props,d={":id":o,":class":s,":version":e.version},f={":id":o,":class":s,":from":u.version||0,":to":c.version||0},h=l?/:id|:class|:from|:to/g:/:id|:class|:version/g,g=l?f:d,v=l?u:e,y=this.getLatestVersion(),C={isLatestVersion:!l&&y&&y.version===v.version,isPreviewable:t,isRevertable:n,recordId:o,schemaUrl:i.replace(h,(e=>g[e])),version:v,compare:l,compareModeAvailable:this.compareModeAvailable(),previewState:p};return r.default.createElement(m.default,{className:this.getContainerClasses(),onResize:e=>{let{width:t}=e;return this.props.onResize(t)}},r.default.createElement(a,C))}renderPagination(){const{limit:e,page:t,versions:n}=this.props;if(!n)return null;const o=n.versions?n.versions.pageInfo.totalCount:0;if(o<=e)return null;const s={setPage:this.handleSetPage,maxPage:Math.ceil(o/e),next:this.handleNextPage,nextText:l.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:l.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:t-1,useGriddleStyles:!1};return r.default.createElement("div",{className:"griddle-footer"},r.default.createElement(i.default.GridPagination,s))}renderComparisonSelectionList(){const{compare:{versionFrom:e},ListComponent:t}=this.props;if(!e)return null;const n=(0,h.default)("history-viewer__table","history-viewer__table--comparison-selected");return r.default.createElement(t,{versions:[e],extraClass:n})}renderVersionList(){const{isInGridField:e,ListComponent:t,CompareWarningComponent:n,compare:o,compare:{versionFrom:s}}=this.props;return r.default.createElement("div",{className:this.getContainerClasses()},r.default.createElement(n,null),r.default.createElement("div",{className:e?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),r.default.createElement(t,{versions:this.getVersions(),showHeader:!o||o&&!s,compareModeAvailable:this.compareModeAvailable()}),r.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}renderCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}render(){const{loading:e,compare:t,currentVersion:n}=this.props;return e?r.default.createElement(c.default,null):this.compareModeAvailable()&&t?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}t.Component=w,w.propTypes={contextKey:v.default.string,limit:v.default.number,ListComponent:v.default.elementType.isRequired,offset:v.default.number,recordId:v.default.number.isRequired,currentVersion:v.default.oneOfType([v.default.bool,d.versionType]),compare:f.compareType,isInGridField:v.default.bool,isPreviewable:v.default.bool,isRevertable:v.default.bool,VersionDetailComponent:v.default.elementType.isRequired,CompareWarningComponent:v.default.elementType.isRequired,versions:v.default.shape({versions:v.default.shape({pageInfo:v.default.shape({totalCount:v.default.number}),nodes:v.default.arrayOf(d.versionType)})}),page:v.default.number,schemaUrl:v.default.string,previewState:v.default.oneOf(["edit","preview","split"]),actions:v.default.object,onSelect:v.default.func,onSetPage:v.default.func,onResize:v.default.func},w.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,schemaUrl:"",versions:{versions:{pageInfo:{totalCount:0},nodes:[]}}};var x=(0,o.compose)((0,s.connect)((function(e){const{currentPage:t,currentVersion:n,compare:r}=e.versionedAdmin.historyViewer,{activeState:o}=e.viewMode;return{page:t,currentVersion:n,compare:r,previewState:o}}),(function(e){return{onSelect(t){e((0,p.showVersion)(t)),e((0,p.clearMessages)())},onSetPage(t){e((0,p.setCurrentPage)(t))},onResize(t){e(g.enableOrDisableSplitMode(t))}}})),a.default,(0,u.inject)(["HistoryViewerVersionList","HistoryViewerVersionDetail","HistoryViewerCompareWarning"],((e,t,n)=>({ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:n})),(e=>{let{contextKey:t}=e;return`VersionedAdmin.HistoryViewer.${t}`})))(w);t.default=x},1553:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=l(n(7086)),s=n(1624),i=l(n(4754)),a=n(6215);function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}class c extends r.Component{constructor(e){super(e),this.handleDismissCompare=this.handleDismissCompare.bind(this)}handleDismissCompare(){this.props.onDismissCompare()}render(){return this.props.isCompare?r.default.createElement("div",{className:"history-viewer__compare-notice alert alert-info"},r.default.createElement("span",{className:"notice-message"},r.default.createElement("strong",null,i.default._t("HistoryViewer.COMPARE_MODE","Compare mode"),": "),i.default._t("HistoryViewer.SELECT_PROMPT","Select two versions")),r.default.createElement("button",{className:"btn dismiss-button font-icon-cancel",onClick:this.handleDismissCompare},i.default._t("HistoryViewer.EXIT","Exit"))):null}}t.Component=c,c.propTypes={isCompare:o.default.bool.isRequired};var p=(0,s.connect)((function(e){const{compare:t}=e.versionedAdmin.historyViewer;return{isCompare:!!t}}),(function(e){return{onDismissCompare(){e((0,a.setCompareMode)(!1))}}}))(c);t.default=p},9559:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=p(n(4754)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),s=n(8127),i=n(6215),a=n(2827),l=n(1624),u=p(n(7086));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function p(e){return e&&e.__esModule?e:{default:e}}class d extends o.Component{constructor(e){super(e),this.toggle=this.toggle.bind(this),this.handleCompareModeChange=this.handleCompareModeChange.bind(this),this.state={dropdownOpen:!1}}toggle(){this.setState((e=>({dropdownOpen:!e.dropdownOpen})))}handleCompareModeChange(){const{compareModeSelected:e,onCompareModeUnselect:t,onCompareModeSelect:n}=this.props;e?t():n()}renderDropdown(){const{compareModeAvailable:e,compareModeSelected:t}=this.props,{dropdownOpen:n}=this.state;return e?o.default.createElement(s.Dropdown,{isOpen:n,toggle:this.toggle,className:"history-viewer__actions-dropdown"},o.default.createElement(s.DropdownToggle,{className:"font-icon-sliders"}),o.default.createElement(s.DropdownMenu,{right:!0},o.default.createElement("div",{className:"form-check"},o.default.createElement("input",{id:"history-viewer-compare-two",type:"checkbox",className:"no-change-track history-viewer-heading__compare-mode-checkbox",checked:t,onChange:this.handleCompareModeChange}),o.default.createElement("label",{className:"form-check-label",htmlFor:"history-viewer-compare-two"},r.default._t("HistoryViewerHeading.COMPARE_VERSIONS","Compare two versions"))))):null}render(){return o.default.createElement("li",{className:"history-viewer__heading",role:"row"},o.default.createElement("span",{className:"history-viewer__version-no",role:"columnheader"},"#"),o.default.createElement("span",{className:"history-viewer__version-state",role:"columnheader"},r.default._t("HistoryViewer.Record","Record")),o.default.createElement("span",{className:"history-viewer__author",role:"columnheader"},r.default._t("HistoryViewer.Author","Author")),o.default.createElement("span",{className:"history-viewer__actions",role:"columnheader"},this.renderDropdown()))}}t.Component=d,d.propTypes={compareModeAvailable:u.default.bool,compareModeSelected:u.default.bool,onCompareModeSelect:u.default.func,onCompareModeUnselect:u.default.func},d.defaultProps={compareModeAvailable:!0};var f=(0,a.compose)((0,l.connect)((function(e){return{compareModeSelected:!!e.versionedAdmin.historyViewer.compare}}),(function(e){return{onCompareModeSelect(){e((0,i.setCompareMode)(!0))},onCompareModeUnselect(){e((0,i.setCompareMode)(!1))}}})))(d);t.default=f},9769:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7086)),s=n(2827),i=n(1624),a=c(n(4754)),l=n(6648),u=n(6215);function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{constructor(e){super(e),this.handleRevert=this.handleRevert.bind(this),this.state={isReverting:!1}}handleRevert(){const{actions:{revertToVersion:e},onAfterRevert:t,recordId:n,versionId:r}=this.props;this.setState({isReverting:!0});const o="function"==typeof t?t:()=>{};return e(n,r,"DRAFT","DRAFT").then((()=>o(r)))}render(){const{FormActionComponent:e,ViewModeComponent:t,isLatestVersion:n,isPreviewable:o,isRevertable:s}=this.props,{isReverting:i}=this.state;let l="";return i?l=a.default._t("HistoryViewerToolbar.REVERT_IN_PROGRESS","Revert in progress..."):n&&(l=a.default._t("HistoryViewerToolbar.REVERT_UNAVAILABLE","Unavailable for the current version")),r.default.createElement("div",{className:"toolbar toolbar--south"},r.default.createElement("div",{className:"btn-toolbar"},s&&r.default.createElement(e,{onClick:this.handleRevert,icon:"back-in-time",name:"revert",attributes:{title:l},data:{buttonStyle:"warning"},disabled:n||i,loading:i,title:a.default._t("HistoryViewerToolbar.REVERT_TO_VERSION","Revert to this version")}),o&&r.default.createElement(t,{id:"history-viewer-edit-mode",area:"edit"})))}}t.Component=d,d.propTypes={actions:o.default.shape({revertToVersion:o.default.func.isRequired}),FormActionComponent:o.default.elementType.isRequired,ViewModeComponent:o.default.elementType.isRequired,isLatestVersion:o.default.bool,isPreviewable:o.default.bool,isRevertable:o.default.bool,onAfterRevert:o.default.func,recordId:o.default.number.isRequired,versionId:o.default.number.isRequired},d.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1};var f=(0,s.compose)((0,i.connect)(null,(function(e){return{onAfterRevert(t){e((0,u.addMessage)(a.default.sprintf(a.default._t("HistoryViewerToolbar.REVERTED_MESSAGE","Successfully reverted to version %s"),t))),e((0,u.showList)())}}})),(0,l.inject)(["FormAction","ViewModeToggle"],((e,t)=>({FormActionComponent:e,ViewModeComponent:t})),(()=>"VersionedAdmin.HistoryViewer.Toolbar")))(d);t.default=f},3461:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=n(2827),i=n(1624),a=n(6648),l=n(185),u=n(1118),c=f(n(4754)),p=f(n(7820)),d=n(6215);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleClose=this.handleClose.bind(this),this.handleCompare=this.handleCompare.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}getAuthor(){const{version:e}=this.props;let t={};return e.published&&e.publisher?t=e.publisher:e.author&&(t=e.author),`${t.firstName||""} ${t.surname||""}`}getClassNames(){const{extraClass:e,isActive:t,compare:n,compare:{compareFrom:r,compareTo:o}}=this.props,s={"history-viewer__row":!0,"history-viewer__row--current":t,"history-viewer__row--comparison-selected":n&&!(r&&o)};return(0,p.default)(s,e)}handleKeyUp(e){13===e.keyCode&&this.handleClick()}handleClick(){const{onSelect:e,version:t,isActive:n,compare:r}=this.props;return n||e(t,r),!1}handleCompare(){const{onCompareMode:e,version:t}=this.props;e(t)}handleClose(){const{onSelect:e,version:t,compare:n,compare:{versionFrom:r}}=this.props;r&&r.version===t.version&&delete n.versionFrom,e(0,n)}renderCompareButton(){const{compareModeAvailable:e,compare:t,FormActionComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.COMPARE","Compare");return!e||t?null:r.default.createElement(n,{onClick:this.handleCompare,title:o,buttonStyle:"outline-light",extraClass:"history-viewer__compare-button"},o)}renderClearButton(){const{FormActionComponent:e,isActive:t}=this.props;return t?r.default.createElement(e,{onClick:this.handleClose,icon:"cancel",attributes:{title:c.default._t("HistoryViewerVersion.CLOSE","Close")},title:null,buttonStyle:"outline-light",extraClass:"history-viewer__close-button"}):null}renderSelectedMessage(){const{isActive:e}=this.props;return e?r.default.createElement("span",{className:"history-viewer__selected-message"},c.default._t("HistoryViewerVersion.SELECTED","Already selected")):null}renderActions(){const{isActive:e,compare:t}=this.props;return e||t?r.default.createElement("span",{className:"history-viewer__actions",role:"cell"},this.renderCompareButton(),this.renderSelectedMessage(),this.renderClearButton()):r.default.createElement("span",{className:"history-viewer__actions",role:"cell"})}render(){const{version:e,isActive:t,StateComponent:n}=this.props,o=c.default._t("HistoryViewerVersion.GO_TO_VERSION","Go to version {version}");return r.default.createElement("li",{className:this.getClassNames(),role:"row"},r.default.createElement("span",{className:"history-viewer__version-link",role:"button",title:c.default.inject(o,{version:e.Version}),onClick:this.handleClick,onKeyUp:this.handleKeyUp,tabIndex:0},r.default.createElement("span",{className:"history-viewer__version-no",role:"cell"},e.version),r.default.createElement(n,{version:e,isActive:t}),r.default.createElement("span",{className:"history-viewer__author",role:"cell"},this.getAuthor()),this.renderActions()))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),version:l.versionType,isActive:o.default.bool,onSelect:o.default.func,onCompareMode:o.default.func,compare:u.compareType,compareModeAvailable:o.default.bool,StateComponent:o.default.elementType.isRequired,FormActionComponent:o.default.elementType.isRequired},m.defaultProps={isActive:!1,version:l.defaultVersion,compare:!1,compareModeAvailable:!0};var g=(0,s.compose)((0,i.connect)(null,(function(e){return{onSelect(t,n){const{versionFrom:r}=n;n?e(r?(0,d.setCompareTo)(t):(0,d.setCompareFrom)(t)):(e((0,d.showVersion)(t)),e((0,d.clearMessages)()))},onCompareMode(t){e((0,d.setCompareFrom)(t)),e((0,d.setCompareMode)(!0))}}})),(0,a.inject)(["HistoryViewerVersionState","FormAction"],((e,t)=>({StateComponent:e,FormActionComponent:t})),(e=>{let{version:t}=e,n="VersionedAdmin.HistoryViewer.HistoryViewerVersion";return t&&(n+=`.${t.version}`),n})))(m);t.default=g},2477:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=p(n(7820)),s=p(n(8238)),i=n(6648),a=n(185),l=p(n(7086)),u=p(n(1872)),c=p(n(7902));function p(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}class f extends r.PureComponent{componentDidMount(){this.toggleToolbarClass(!0)}componentDidUpdate(){this.toggleToolbarClass("split"===this.props.previewState)}componentWillUnmount(){this.toggleToolbarClass(!1)}getListVersions(){const{compare:e,version:t}=this.props;return this.isCompareMode()?[e.versionTo,e.versionFrom]:[t]}isPreviewable(){const{isPreviewable:e}=this.props;return e&&!this.isCompareMode()}isCompareMode(){const{compare:e}=this.props;return e&&e.versionFrom&&e.versionTo}toggleToolbarClass(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=document.querySelector(".CMSPageHistoryViewerController div:not(.cms-content-tools) .cms-content-header"),n="history-viewer__toolbar--condensed";t&&this.isPreviewable()&&(e?t.classList.add(n):t.classList.remove(n))}renderPreview(){const{version:{absoluteLink:e,lastEdited:t,version:n},PreviewComponent:o,previewState:s}=this.props;if(!this.isPreviewable()||"edit"===s)return null;const i=u.default.parse(e),a=c.default.parse(i.query);a.archiveDate=t;const l=u.default.format({...i,search:c.default.stringify(a)});return r.default.createElement(o,{className:"history-viewer__preview flexbox-area-grow",itemLinks:{preview:{Stage:{href:l,type:"text/html"}}},itemId:n})}renderToolbar(){const{ToolbarComponent:e,isLatestVersion:t,isRevertable:n,recordId:o,version:s}=this.props;return this.isCompareMode()?null:r.default.createElement(e,{identifier:"HistoryViewer.VersionDetail.Toolbar",isLatestVersion:t,recordId:o,versionId:s.version,isPreviewable:this.isPreviewable(),isRevertable:n})}renderDetails(){const{compareModeAvailable:e,ListComponent:t,schemaUrl:n,CompareWarningComponent:i,previewState:a}=this.props;if(this.isPreviewable()&&"preview"===a)return null;const l={"history-viewer__table":!0,"history-viewer__table--current":!0,"history-viewer__table--compare":this.isCompareMode()},u={"history-viewer__version-detail":!0,"history-viewer__version-detail--compare":this.isCompareMode()};return r.default.createElement("div",{className:"flexbox-area-grow fill-height"},r.default.createElement(i,{fixed:!0}),r.default.createElement("div",{className:(0,o.default)(["flexbox-area-grow","panel","panel--scrollable","panel--padded","panel--padded-side"])},r.default.createElement(t,{extraClass:(0,o.default)(l),versions:this.getListVersions(),compareModeAvailable:e}),r.default.createElement("div",{className:(0,o.default)(u)},r.default.createElement(s.default,{identifier:"HistoryViewer.VersionDetail",schemaUrl:n}))),this.renderToolbar())}render(){return r.default.createElement("div",{className:"flexbox-area-grow fill-width"},this.renderDetails(),this.renderPreview())}}t.Component=f,f.propTypes={isLatestVersion:l.default.bool,isPreviewable:l.default.bool,isRevertable:l.default.bool,ListComponent:l.default.elementType.isRequired,PreviewComponent:l.default.elementType,recordId:l.default.number.isRequired,schemaUrl:l.default.string.isRequired,ToolbarComponent:l.default.elementType.isRequired,version:a.versionType,compare:l.default.oneOfType([l.default.shape({versionFrom:a.versionType,versionTo:a.versionType}),l.default.bool]),previewState:l.default.oneOf(["edit","preview","split"])},f.defaultProps={isLatestVersion:!1,isPreviewable:!1,isRevertable:!1,compare:!1};var h=(0,i.inject)(["HistoryViewerVersionList","HistoryViewerToolbar","Preview","HistoryViewerCompareWarning"],((e,t,n,r)=>({ListComponent:e,ToolbarComponent:t,PreviewComponent:n,CompareWarningComponent:r})),((e,t)=>{let{version:n}=e;return`${t}.HistoryViewerVersionDetail.${n.Version}`}))(f);t.default=h},8488:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=f(n(7086)),s=f(n(7820)),i=f(n(4754)),a=n(1624),l=n(2827),u=n(6648),c=n(3057),p=n(185),d=n(1118);function f(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}class m extends r.PureComponent{getClassNames(){const{extraClass:e,showHeader:t}=this.props;return(0,s.default)(e,{table:!0,"history-viewer__table--headerless":!t})}isVersionActive(e){const{currentVersion:t,compare:n,compare:{versionFrom:r,versionTo:o}}=this.props,s=t&&t.version===e.version,i=r&&r.version===e.version,a=o&&o.version===e.version;return!n&&s||i||a}renderMessages(){const{FormAlertComponent:e,messages:t}=this.props;return t.length?r.default.createElement("div",{className:"history-viewer__messages"},t.map((t=>r.default.createElement(e,{key:t.id,type:t.type,value:t.message,closeLabel:i.default._t("HistoryViewerVersionList.CLOSE","Close")})))):null}renderHeader(){const{showHeader:e,HeadingComponent:t,compareModeAvailable:n}=this.props;if(!e)return null;const o={compareModeAvailable:n};return r.default.createElement(t,o)}render(){const{VersionComponent:e,versions:t,compareModeAvailable:n,compare:o}=this.props;return r.default.createElement("div",{className:"history-viewer__list"},this.renderMessages(),r.default.createElement("ul",{className:this.getClassNames(),role:"table"},this.renderHeader(),t.map((t=>r.default.createElement(e,{key:t.version,isActive:this.isVersionActive(t),version:t,compare:o,compareModeAvailable:n})))))}}t.Component=m,m.propTypes={extraClass:o.default.oneOfType([o.default.string,o.default.array,o.default.object]),showHeader:o.default.bool,FormAlertComponent:o.default.elementType.isRequired,HeadingComponent:o.default.elementType.isRequired,messages:o.default.arrayOf(c.messageType),VersionComponent:o.default.elementType.isRequired,versions:o.default.arrayOf(p.versionType),compare:d.compareType,compareModeAvailable:o.default.bool},m.defaultProps={compareModeAvailable:!0,extraClass:"history-viewer__table",messages:[],showHeader:!0,versions:[]};var g=(0,l.compose)((0,a.connect)((function(e){const{messages:t,compare:n,currentVersion:r}=e.versionedAdmin.historyViewer;return{messages:t,compare:n,currentVersion:r}})),(0,u.inject)(["FormAlert","HistoryViewerHeading","HistoryViewerVersion"],((e,t,n)=>({FormAlertComponent:e,HeadingComponent:t,VersionComponent:n})),(()=>"VersionedAdmin.HistoryViewer.HistoryViewerVersionList")))(m);t.default=g},5385:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Component=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}r.default=e,n&&n.set(e,r);return r}(n(7363)),o=c(n(7820)),s=c(n(4754)),i=c(n(7657)),a=n(185),l=n(6648),u=c(n(7086));function c(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}class d extends r.Component{getClassNames(){const{extraClass:e}=this.props;return(0,o.default)("history-viewer__version-state",e)}getPublishedState(){const{version:e}=this.props;return 1===e.version?s.default._t("HistoryViewer.Created","Created"):e.published?e.deleted?e.draft?s.default._t("HistoryViewer.Archived","Archived"):s.default._t("HistoryViewer.Unpublished","Unpublished"):s.default._t("HistoryViewer.Published","Published"):s.default._t("HistoryViewer.Saved","Saved")}getDate(){return i.default.locale(s.default.detectLocale()),(0,i.default)(this.props.version.lastEdited).format("L LT")}getBadges(){const{version:e,isActive:t,BadgeComponent:n}=this.props;return e.liveVersion?r.default.createElement(n,{status:"success",message:s.default._t("HistoryViewer.BadgeLive","Live"),className:"",inverted:t}):""}render(){return r.default.createElement("span",{className:this.getClassNames(),role:"cell"},this.getPublishedState()," ",r.default.createElement("small",{className:"text-muted"},this.getDate()),this.getBadges())}}t.Component=d,d.propTypes={version:a.versionType,extraClass:u.default.string,isActive:u.default.bool,BadgeComponent:u.default.oneOfType([u.default.node,u.default.func]).isRequired},d.defaultProps={version:a.defaultVersion,extraClass:"",isActive:!1};var f=(0,l.inject)(["Badge"],(e=>({BadgeComponent:e})),(e=>{let{version:t}=e;return`HistoryViewer.HistoryViewerVersionState.${t.Version}`}))(d);t.default=f},2291:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(7363)),o=i(n(4510)),s=n(6648);function i(e){return e&&e.__esModule?e:{default:e}}var a=e=>{class t extends r.default.Component{getConfig(){return o.default.getSection("SilverStripe\\VersionedAdmin\\Controllers\\HistoryViewerController")}getSchemaUrlDetails(){const{compare:e}=this.props;return e?{formName:"compareForm",queryParts:["RecordVersionFrom=:from","RecordVersionTo=:to"]}:{formName:"versionForm",queryParts:["RecordVersion=:version"]}}getSchemaUrl(){const e=this.getConfig(),{formName:t,queryParts:n}=this.getSchemaUrlDetails();return`${`${e.form[t].schemaUrl}/:id`}?${n.concat("RecordClass=:class&RecordID=:id").join("&")}`}render(){const t={...this.props,config:this.getConfig(),HistoryViewer:e,schemaUrl:this.getSchemaUrl()};return r.default.createElement(e,t)}}return(0,s.inject)(["HistoryViewer"])(t)};t.default=a},9679:function(e,t,n){"use strict";var r;((r=n(5311))&&r.__esModule?r:{default:r}).default.entwine("ss",(e=>{e(".ArchiveAdmin__action--restore").entwine({onmatch(){e(this).attr("readonly",!1),e(this).attr("disabled",!1)}}),e(".ArchiveAdmin .other-model-selector select").entwine({onchange(t){t.preventDefault();let n=e(this).val();const r=e(this).data("others-archive-url");if(n){n=n.replace(/\\/g,"-");const t=r+n;e(".cms-container").loadPanel(t,"",{pjax:"CurrentForm"})}}})}))},6674:function(e,t,n){"use strict";var r=a(n(5311)),o=a(n(7363)),s=n(9691),i=n(6648);function a(e){return e&&e.__esModule?e:{default:e}}r.default.entwine("ss",(e=>{e(".js-injector-boot .history-viewer__container").entwine({ReactRoot:null,onmatch(){const e=this.closest(".cms-content").attr("id"),t=e?{context:e}:{},n=(0,i.loadComponent)("HistoryViewer",t),r=this.data("schema"),a={...r.data,isInGridField:r.data.isInGridField||!this.hasClass("history-viewer--standalone")},l=(0,s.createRoot)(this[0]);l.render(o.default.createElement(n,a)),this.setReactRoot(l)},onunmatch(){const e=this.getReactRoot();e&&(e.unmount(),this.setReactRoot(null))}}),e(".history-viewer__version-detail .nav-link").entwine({onclick(e){e.preventDefault(),this._super(e)}}),e(".tab.tab--history-viewer[aria-hidden=false]").entwine({onmatch(){e(".toolbar--south.cms-content-actions").hide()},onunmatch(){e(".toolbar--south.cms-content-actions").show()}}),e(".tab.tab--history-viewer .history-viewer__version-detail").entwine({onmatch(){this.parent().css("padding-bottom","3rem").next(".toolbar--south").css({position:"absolute",bottom:0,left:0,right:0})}})}))},574:function(e,t,n){"use strict";var r=o(n(4754));function o(e){return e&&e.__esModule?e:{default:e}}o(n(5311)).default.entwine("ss",(e=>{e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doUnpublish").entwine({onclick(e){const t=r.default._t("VersionedEditForm.PUBLISH_CONFIRM_MESSAGE","Are you sure you want to remove your record from the published site?\n\nThis record will still be available in the CMS as draft.");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}}),e(".cms-edit-form .btn-toolbar #Form_ItemEditForm_action_doArchive").entwine({onclick(e){const t=r.default._t("VersionedEditForm.ARCHIVE_CONFIRM_MESSAGE","Warning: This record will be unpublished before being sent to the archive.\n\nAre you sure you want to proceed?");return!!confirm(t)&&(this.parents("form:first").addClass("loading"),this._super(e))}})}))},3061:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=["SHOW_VERSION","SHOW_LIST","SET_CURRENT_PAGE","ADD_MESSAGE","CLEAR_MESSAGES","SET_COMPARE_MODE","SET_COMPARE_FROM","SET_COMPARE_TO"].reduce(((e,t)=>Object.assign(e,{[t]:`HISTORY_VIEWER.${t}`})),{});t.default=n},6215:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addMessage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";return{type:s.default.ADD_MESSAGE,payload:{id:(0,o.v1)(),message:e,type:t}}},t.clearMessages=function(){return{type:s.default.CLEAR_MESSAGES}},t.setCompareFrom=function(e){return{type:s.default.SET_COMPARE_FROM,payload:{version:e}}},t.setCompareMode=function(e){return{type:s.default.SET_COMPARE_MODE,payload:{enabled:e}}},t.setCompareTo=function(e){return{type:s.default.SET_COMPARE_TO,payload:{version:e}}},t.setCurrentPage=function(e){return{type:s.default.SET_CURRENT_PAGE,payload:{page:e}}},t.showList=function(){return{type:s.default.SHOW_LIST}},t.showVersion=function(e){return{type:s.default.SHOW_VERSION,payload:{version:e}}};var r,o=n(7429),s=(r=n(3061))&&r.__esModule?r:{default:r}},7908:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,payload:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case o.default.SET_CURRENT_PAGE:return{...e,currentPage:n.page};case o.default.SHOW_VERSION:return{...e,currentVersion:n.version};case o.default.SHOW_LIST:return{...e,currentVersion:0,currentPage:0};case o.default.ADD_MESSAGE:return{...e,messages:[n,...e.messages]};case o.default.CLEAR_MESSAGES:return{...e,messages:[]};case o.default.SET_COMPARE_MODE:{const t={versionFrom:!1,versionTo:!1,...e.compare};return{...e,compare:!!n.enabled&&t}}case o.default.SET_COMPARE_FROM:{let{compare:{versionFrom:t,versionTo:r}}=e;return t=n.version||!1,t||(t=r,r=!1),{...e,currentVersion:t,compare:{versionFrom:t,versionTo:r}}}case o.default.SET_COMPARE_TO:{let{compare:{versionFrom:t,versionTo:r}}=e;return r=n.version||!1,r&&t&&r.version0}},{key:"getMetadataColumnProperty",value:function(e,t,n){var r=this.getColumnMetadataByName(e);return null==r?n:r.hasOwnProperty(t)?r[t]:n}},{key:"orderColumns",value:function(e){var t=this;return l(e,(function(e){var n=a(t.columnMetadata,{columnName:e});return null==n||isNaN(n.order)?100:n.order}))}},{key:"getColumns",value:function(){var e=0===this.filteredColumns.length?this.allColumns:this.filteredColumns;return e=u(e,this.metadataColumns),e=this.orderColumns(e)}}]),e}();e.exports=c},1172:function(e,t,n){"use strict";var r=n(7363),o=n(2555)({getDefaultProps:function(){return{placeholderText:""}},render:function(){return"function"!=typeof this.props.customFilterComponent?(console.log("Couldn't find valid template."),r.createElement("div",null)):r.createElement(this.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=o},2039:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t0&&(e=r.createElement("button",{type:"button",onClick:this.props.previous,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 0 0 10px"}:null},this.props.previousIconComponent,this.props.previousText)),this.props.currentPage!==this.props.maxPage-1&&(t=r.createElement("button",{type:"button",onClick:this.props.next,style:this.props.useGriddleStyles?{color:"#222",border:"none",background:"none",margin:"0 10px 0 0"}:null},this.props.nextText,this.props.nextIconComponent));var n=null,o=null,i=null;if(!0===this.props.useGriddleStyles){var a={float:"left",minHeight:"1px",marginTop:"5px"};i=s({textAlign:"right",width:"34%"},a),o=s({textAlign:"center",width:"33%"},a),n=s({width:"33%"},a)}for(var l=[],u=1;u<=this.props.maxPage;u++)l.push(r.createElement("option",{value:u,key:u},u));return r.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},r.createElement("div",{className:this.props.previousClassName,style:n},e),r.createElement("div",{className:"griddle-page",style:o},r.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},l)," / ",this.props.maxPage),r.createElement("div",{className:this.props.nextClassName,style:i},t))}});e.exports=i},344:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(7024)),i=n(3560),a=n(7287),l=n(8583),u=n(1747),c=n(3220),p=n(2569),d=o({getDefaultProps:function(){return{isChildRow:!1,showChildren:!1,data:{},columnSettings:null,rowSettings:null,hasChildren:!1,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,multipleSelectionSettings:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},componentWillMount:function(){null!==this.props.onRowWillMount&&i(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&i(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&i(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&i(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&i(this.props.onRowMouseLeave)&&this.props.onRowMouseLeave(this,e)},handleSelectionChange:function(e){},handleSelectClick:function(e){this.props.multipleSelectionSettings.isMultipleSelection&&("checkbox"===e.target.type?this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,this.refs.selected.checked):this.props.multipleSelectionSettings.toggleSelectRow(this.props.data,!this.refs.selected.checked))},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRow: The columnSettings prop is null and it shouldn't be")},formatData:function(e){return"boolean"==typeof e?String(e):e},render:function(){var e=this;this.verifyProps();var t=this,n=null;this.props.useGriddleStyles&&(n={margin:"0px",padding:t.props.paddingHeight+"px 5px "+t.props.paddingHeight+"px 5px",height:t.props.rowHeight?this.props.rowHeight-2*t.props.paddingHeight+"px":null,backgroundColor:"#FFF",borderTopColor:"#DDD",color:"#222"});var o=this.props.columnSettings.getColumns(),d=a(o,[]),f=l({},this.props.data);u(f,d);var h,m,g=c(s.pick(f,p(o,"children"))).map((function(t,o){var s=null,i=e.props.columnSettings.getColumnMetadataByName(t[0]),a=0===o&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===o&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?r.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===o&&e.props.isChildRow&&e.props.useGriddleStyles&&(n=l(n,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&null!=i)if(void 0!==i.customComponent&&null!==i.customComponent){var u=r.createElement(i.customComponent,{data:t[1],rowData:f,metadata:i});s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},u)}else s=r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:i.cssClassName,key:o,style:n},a,e.formatData(t[1]));return s||r.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:o,style:n},a,t[1])}));if(null!==this.props.onRowClick&&i(this.props.onRowClick)?(h=null,m=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(h=this.handleSelectClick,m=null):(h=null,m=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(r.createElement("td",{key:"selection",style:n,className:"griddle-select griddle-select-cell",onClick:m},r.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(f),onChange:this.handleSelectionChange,ref:"selected"})))}var v=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?v="child-row":t.props.hasChildren&&(v=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),r.createElement("tr",{onClick:h,className:v},g)}});e.exports=d},3302:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=(n(3059),n(8718)),i=o({getDefaultProps:function(){return{useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,columnSettings:null,rowSettings:null,paddingHeight:null,rowHeight:null,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null,multipleSelectionSettings:null}},getInitialState:function(){return{data:{},showChildren:!1}},componentWillReceiveProps:function(){this.setShowChildren(!1)},toggleChildren:function(){this.setShowChildren(!1===this.state.showChildren)},setShowChildren:function(e){this.setState({showChildren:e})},verifyProps:function(){null===this.props.columnSettings&&console.error("gridRowContainer: The columnSettings prop is null and it shouldn't be")},render:function(){this.verifyProps();var e=this;if(void 0===this.props.data)return r.createElement("tbody",null);var t=[],n=this.props.columnSettings.getColumns();t.push(r.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?s(this.props.data,n):this.props.data,rowData:this.props.rowSettings.isCustom?this.props.data:null,columnSettings:this.props.columnSettings,rowSettings:this.props.rowSettings,hasChildren:e.props.hasChildren,toggleChildren:e.toggleChildren,showChildren:e.state.showChildren,key:e.props.uniqueId+"_base_row",useGriddleIcons:e.props.useGriddleIcons,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedComponent:this.props.parentRowExpandedComponent,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,multipleSelectionSettings:this.props.multipleSelectionSettings,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount}));var o=null;return e.state.showChildren&&(o=e.props.hasChildren&&this.props.data.children.map((function(t,n){var o=e.props.rowSettings.getRowKey(t,n);if(void 0!==t.children){var s=e.constructor.Griddle;return r.createElement("tr",{key:o,style:{paddingLeft:5}},r.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},r.createElement(s,{rowMetadata:{key:"id"},isSubGriddle:!0,results:[t],columns:e.props.columnSettings.getColumns(),tableClassName:e.props.tableClassName,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,showTableHeading:!1,showPager:!1,columnMetadata:e.props.columnSettings.columnMetadata,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,paddingHeight:e.props.paddingHeight,rowHeight:e.props.rowHeight})))}return r.createElement(e.props.rowSettings.rowComponent,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,data:t,columnSettings:e.props.columnSettings,isChildRow:!0,columnMetadata:e.props.columnSettings.columnMetadata,key:o})}))),!1===e.props.hasChildren?t[0]:r.createElement("tbody",null,e.state.showChildren?t.concat(o):t)}});e.exports=i},7033:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4721),i=n(2569),a=n(3311),l=o({getDefaultProps:function(){return{columns:[],columnMetadata:[],selectedColumns:[],settingsText:"",maxRowsText:"",resultsPerPage:0,enableToggleCustom:!1,useCustomComponent:!1,useGriddleStyles:!0,toggleCustomComponent:function(){}}},setPageSize:function(e){var t=parseInt(e.target.value,10);this.props.setPageSize(t)},handleChange:function(e){var t=e.target.dataset?e.target.dataset.name:e.target.getAttribute("data-name");!0===e.target.checked&&!1===s(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(i(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map((function(t,n){var o=s(e.props.selectedColumns,t),i=a(e.props.columnMetadata,{columnName:t}),l=t;return void 0!==i&&void 0!==i.displayName&&null!=i.displayName&&(l=i.displayName),void 0!==i&&null!=i&&i.locked?r.createElement("div",{className:"column checkbox"},r.createElement("label",null,r.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:o,"data-name":t}),l)):void 0!==i&&null!=i&&void 0!==i.visible&&!1===i.visible?null:r.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},r.createElement("label",null,r.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:o,"data-name":t}),l))})));var n=e.props.enableToggleCustom?r.createElement("div",{className:"form-group"},r.createElement("label",{htmlFor:"maxRows"},r.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",o=this.props.showSetPageSize?r.createElement("div",null,r.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",r.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},r.createElement("option",{value:"5"},"5"),r.createElement("option",{value:"10"},"10"),r.createElement("option",{value:"25"},"25"),r.createElement("option",{value:"50"},"50"),r.createElement("option",{value:"100"},"100")))):"";return r.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},r.createElement("h6",null,this.props.settingsText),r.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),o,n)}});e.exports=l},1277:function(e,t,n){"use strict";var r=n(7363),o=n(2555),s=n(4769),i=n(3302),a=(n(3059),n(5203),o({getDefaultProps:function(){return{data:[],columnSettings:null,rowSettings:null,sortSettings:null,multipleSelectionSettings:null,className:"",enableInfiniteScroll:!1,nextPage:null,hasMorePages:!1,useFixedHeader:!1,useFixedLayout:!0,paddingHeight:null,rowHeight:null,filterByColumn:null,infiniteScrollLoadTreshold:null,bodyHeight:null,useGriddleStyles:!0,useGriddleIcons:!0,isSubGriddle:!1,parentRowCollapsedClassName:"parent-row",parentRowExpandedClassName:"parent-row expanded",parentRowCollapsedComponent:"▶",parentRowExpandedComponent:"▼",externalLoadingComponent:null,externalIsLoading:!1,onRowClick:null,onRowMouseEnter:null,onRowMouseLeave:null,onRowWillMount:null,onRowWillUnmount:null}},getInitialState:function(){return{scrollTop:0,scrollHeight:this.props.bodyHeight,clientHeight:this.props.bodyHeight}},componentDidMount:function(){this.gridScroll()},componentDidUpdate:function(e,t){this.gridScroll()},gridScroll:function(){if(this.props.enableInfiniteScroll&&!this.props.externalIsLoading){var e=this.refs.scrollable,t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var o={scrollTop:t,scrollHeight:n,clientHeight:r};this.setState(o)}.6*(n-(t+r)-this.props.infiniteScrollLoadTreshold)<=this.props.infiniteScrollLoadTreshold&&this.props.nextPage()}},verifyProps:function(){null===this.props.columnSettings&&console.error("gridTable: The columnSettings prop is null and it shouldn't be"),null===this.props.rowSettings&&console.error("gridTable: The rowSettings prop is null and it shouldn't be")},getAdjustedRowHeight:function(){return this.props.rowHeight+2*this.props.paddingHeight},getNodeContent:function(){this.verifyProps();var e=this,t=!1;if(!this.props.externalIsLoading||this.props.enableInfiniteScroll){var n=e.props.data,o=null,s=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var a=e.getAdjustedRowHeight(),l=Math.ceil(e.state.clientHeight/a),u=Math.max(0,Math.floor(e.state.scrollTop/a)-.25*l),c=Math.min(u+1.25*l,this.props.data.length-1);n=n.slice(u,c+1);var p={height:u*a+"px"};o=r.createElement("tr",{key:"above-"+p.height,style:p});var d={height:(this.props.data.length-c)*a+"px"};s=r.createElement("tr",{key:"below-"+d.height,style:d})}var f=n.map((function(n,o){var s=void 0!==n.children&&n.children.length>0,a=e.props.rowSettings.getRowKey(n,o);return s&&(t=s),r.createElement(i,{useGriddleStyles:e.props.useGriddleStyles,isSubGriddle:e.props.isSubGriddle,parentRowExpandedClassName:e.props.parentRowExpandedClassName,parentRowCollapsedClassName:e.props.parentRowCollapsedClassName,parentRowExpandedComponent:e.props.parentRowExpandedComponent,parentRowCollapsedComponent:e.props.parentRowCollapsedComponent,data:n,key:a+"-container",uniqueId:a,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:s,tableClassName:e.props.className,onRowClick:e.props.onRowClick,onRowMouseEnter:e.props.onRowMouseEnter,onRowMouseLeave:e.props.onRowMouseLeave,onRowWillMount:e.props.onRowWillMount,onRowWillUnmount:e.props.onRowWillUnmount})}));if(this.props.showNoData){var h=this.props.columnSettings.getVisibleColumnCount();f.push(r.createElement("tr",{key:"no-data-section"},r.createElement("td",{colSpan:h},this.props.noDataSection)))}return o&&f.unshift(o),s&&f.push(s),{nodes:f,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,n=this.getNodeContent();n&&(e=n.nodes,t=n.anyHasChildren);var o=null,i=null,a={width:"100%"};if(this.props.useFixedLayout&&(a.tableLayout="fixed"),this.props.enableInfiniteScroll&&(o={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var l,u=null;this.props.useGriddleStyles&&(u={textAlign:"center",paddingBottom:"40px"}),l=this.props.columnSettings.getVisibleColumnCount();var c=this.props.externalLoadingComponent?r.createElement(this.props.externalLoadingComponent,null):r.createElement("div",null,"Loading...");i=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{style:u,colSpan:l},c)))}var p=this.props.showTableHeading?r.createElement(s,{useGriddleStyles:this.props.useGriddleStyles,useGriddleIcons:this.props.useGriddleIcons,sortSettings:this.props.sortSettings,multipleSelectionSettings:this.props.multipleSelectionSettings,columnSettings:this.props.columnSettings,filterByColumn:this.props.filterByColumn,rowSettings:this.props.rowSettings}):void 0;t||(e=r.createElement("tbody",null,e));var d=r.createElement("tbody",null);if(this.props.showPager){var f=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;d=r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:f,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(a.tableLayout="fixed"),r.createElement("div",null,r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p),r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},e,i,d)))):r.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:o},r.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&a||null},p,e,i,d))}}));e.exports=a},4769:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=0)return!0}return!1}))},defaultColumnFilter:function(e,t,n){var r=A(M(n)?n:[n],(function(e){return(e||"").toLowerCase()}));return V(C.getObjectValues(t),(function(e){return e=e.toString().toLowerCase(),V(r,(function(t){return e.indexOf(t)>=0}))}))},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,n=Object.keys(e).reduce((function(n,r){return D(n,(function(n){var o=C.getAt(n,r||""),s=e[r];return t(r||"",o,s)}))}),this.props.results),r={columnFilters:e};e?(r.filteredResults=n,r.maxPage=this.getMaxPage(r.filteredResults)):this.state.filter?r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):r.filteredResults=null,this.setState(r)},filterByColumn:function(e,t){var n=this.state.columnFilters;if(n.hasOwnProperty(t)&&!e)n=N(n,t);else{var r={};r[t]=e,n=T({},n,r)}this.filterByColumnFilters(n)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)this.props.externalSetFilter(e);else{var n=this,r={page:0,filter:e};r.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),r.maxPage=n.getMaxPage(r.filteredResults),(j(e)||O(e)||R(e))&&(r.filter=e,r.filteredResults=null),n.setState(r),this._resetSelectedRows()}},setPageSize:function(e){if(this.props.useExternal)return this.setState({resultsPerPage:e}),void this.props.externalSetPageSize(e);this.state.resultsPerPage=e,this.setMaxPage()},toggleColumnChooser:function(){this.setState({showColumnChooser:!this.state.showColumnChooser})},isNullOrUndefined:function(e){return null==e},shouldUseCustomRowComponent:function(){return this.isNullOrUndefined(this.state.useCustomRowComponent)?this.props.useCustomRowComponent:this.state.useCustomRowComponent},shouldUseCustomGridComponent:function(){return this.isNullOrUndefined(this.state.useCustomGridComponent)?this.props.useCustomGridComponent:this.state.useCustomGridComponent},toggleCustomComponent:function(){"grid"===this.state.customComponentType?this.setState({useCustomGridComponent:!this.shouldUseCustomGridComponent()}):"row"===this.state.customComponentType&&this.setState({useCustomRowComponent:!this.shouldUseCustomRowComponent()})},getMaxPage:function(e,t){return this.props.useExternal?this.props.externalMaxPage:(t||(t=(e||this.getCurrentResults()).length),Math.ceil(t/this.state.resultsPerPage))},setMaxPage:function(e){var t=this.getMaxPage(e);this.state.maxPage!==t&&this.setState({page:0,maxPage:t,filteredColumns:this.columnSettings.filteredColumns})},setPage:function(e){if(this.props.useExternal)this.props.externalSetPage(e);else{if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t={page:e};this.setState(t)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})}},setColumns:function(e){this.columnSettings.filteredColumns=M(e)?e:[e],this.setState({filteredColumns:this.columnSettings.filteredColumns})},nextPage:function(){var e=this.getCurrentPage();e0&&this.setPage(e-1)},changeSort:function(e){if(!1!==this.props.enableSort){if(this.props.useExternal){var t=this.props.externalSortColumn!==e||!this.props.externalSortAscending;return this.setState({sortColumn:e,sortDirection:t?"asc":"desc"}),void this.props.externalChangeSort(e,t)}var n=x(this.props.columnMetadata,{columnName:e})||{},r=n.sortDirectionCycle?n.sortDirectionCycle:[null,"asc","desc"],o=r.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null),s={page:0,sortColumn:e,sortDirection:r[o=(o+1)%r.length]?r[o]:null};this.setState(s)}},componentWillReceiveProps:function(e){if(e.results!==this.props.results&&this.setFilter(this.state.filter,e.results),this.setMaxPage(e.results),e.resultsPerPage!==this.props.resultsPerPage&&this.setPageSize(e.resultsPerPage),this.columnSettings.columnMetadata=e.columnMetadata,e.results.length>0){var t=C.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every((function(e,n){return e===t[n]}))||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var n=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,A(n,this.props.uniqueIdentifier)),selectedRowIds:e.selectedRowIds})}},getInitialState:function(){return{maxPage:0,page:0,filteredResults:null,filteredColumns:[],filter:"",columnFilters:{},resultsPerPage:this.props.resultsPerPage||5,showColumnChooser:!1,isSelectAllChecked:!1,selectedRowIds:this.props.selectedRowIds}},componentWillMount:function(){this.verifyExternal(),this.verifyCustom(),this.columnSettings=new v(this.props.results.length>0?C.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new y(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:d,this.props.useCustomTableRowComponent),this.props.initialSort&&(this.props.useExternal?this.setState({sortColumn:this.props.externalSortColumn,sortDirection:this.props.externalSortAscending?"asc":"desc"}):this.changeSort(this.props.initialSort)),this.setMaxPage(),this.shouldUseCustomGridComponent()?this.setState({customComponentType:"grid"}):this.shouldUseCustomRowComponent()?this.setState({customComponentType:"row"}):this.setState({filteredColumns:this.columnSettings.filteredColumns})},componentDidMount:function(){if(this.props.componentDidMount&&"function"==typeof this.props.componentDidMount)return this.props.componentDidMount()},componentDidUpdate:function(){if(this.props.componentDidUpdate&&"function"==typeof this.props.componentDidUpdate)return this.props.componentDidUpdate(this.state)},verifyExternal:function(){!0===this.props.useExternal&&(null===this.props.externalSetPage&&console.error("useExternal is set to true but there is no externalSetPage function specified."),null===this.props.externalChangeSort&&console.error("useExternal is set to true but there is no externalChangeSort function specified."),null===this.props.externalSetFilter&&console.error("useExternal is set to true but there is no externalSetFilter function specified."),null===this.props.externalSetPageSize&&console.error("useExternal is set to true but there is no externalSetPageSize function specified."),null===this.props.externalMaxPage&&console.error("useExternal is set to true but externalMaxPage is not set."),null===this.props.externalCurrentPage&&console.error("useExternal is set to true but externalCurrentPage is not set. Griddle will not page correctly without that property when using external data."))},verifyCustom:function(){!0===this.props.useCustomGridComponent&&null===this.props.customGridComponent&&console.error("useCustomGridComponent is set to true but no custom component was specified."),!0===this.props.useCustomRowComponent&&null===this.props.customRowComponent&&console.error("useCustomRowComponent is set to true but no custom component was specified."),!0===this.props.useCustomGridComponent&&!0===this.props.useCustomRowComponent&&console.error("Cannot currently use both customGridComponent and customRowComponent."),!0===this.props.useCustomFilterer&&null===this.props.customFilterer&&console.error("useCustomFilterer is set to true but no custom filter function was specified."),!0===this.props.useCustomFilterComponent&&null===this.props.customFilterComponent&&console.error("useCustomFilterComponent is set to true but no customFilterComponent was specified.")},getDataForRender:function(e,t,n){var r=this,o=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var s,i=this.state.sortColumn,a=D(this.props.columnMetadata,{columnName:i}),l={columns:[],orders:[]};if(a.length>0&&(s=a[0].hasOwnProperty("customCompareFn")&&a[0].customCompareFn,a[0].multiSort&&(l=a[0].multiSort)),this.state.sortDirection)if("function"==typeof s)2===s.length?(e=e.sort((function(e,t){return s(F(e,i),F(t,i))})),"desc"===this.state.sortDirection&&e.reverse()):1===s.length&&(e=I(e,(function(e){return s(F(e,i))}),[this.state.sortDirection]));else{var u=[function(e){return(F(e,i)||"").toString().toLowerCase()}],c=[this.state.sortDirection];l.columns.forEach((function(e,t){u.push((function(t){return(F(t,e)||"").toString().toLowerCase()})),"asc"===l.orders[t]||"desc"===l.orders[t]?c.push(l.orders[t]):c.push(r.state.sortDirection)})),e=I(e,u,c)}}var p=this.getCurrentPage();if(!this.props.useExternal&&n&&this.state.resultsPerPage*(p+1)<=this.state.resultsPerPage*this.state.maxPage&&p>=0)if(this.isInfiniteScrollEnabled())e=S(e,(p+1)*this.state.resultsPerPage);else{var d=b(e,p*this.state.resultsPerPage);e=(w||E)(d,d.length-this.state.resultsPerPage)}}for(var f=[],h=0;h0&&(m.children=o.getDataForRender(m[o.props.childrenColumnName],t,!1),"children"!==o.props.childrenColumnName&&delete m[o.props.childrenColumnName]),f.push(m)}return f},getCurrentResults:function(e){return this.state.filteredResults||e||this.props.results},getCurrentPage:function(){return this.props.externalCurrentPage||this.state.page},getCurrentSort:function(){return this.props.useExternal?this.props.externalSortColumn:this.state.sortColumn},getCurrentSortAscending:function(){return this.props.useExternal?this.props.externalSortAscending:"asc"===this.state.sortDirection},getCurrentMaxPage:function(){return this.props.useExternal?this.props.externalMaxPage:this.state.maxPage},getSortObject:function(){return{enableSort:this.props.enableSort,changeSort:this.changeSort,sortColumn:this.getCurrentSort(),sortAscending:this.getCurrentSortAscending(),sortDirection:this.state.sortDirection,sortAscendingClassName:this.props.sortAscendingClassName,sortDescendingClassName:this.props.sortDescendingClassName,sortAscendingComponent:this.props.sortAscendingComponent,sortDescendingComponent:this.props.sortDescendingComponent,sortDefaultComponent:this.props.sortDefaultComponent}},_toggleSelectAll:function(){var e=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),t=!this.state.isSelectAllChecked,n=JSON.parse(JSON.stringify(this.state.selectedRowIds)),r=this;_(e,(function(e){r._updateSelectedRowIds(e[r.props.uniqueIdentifier],n,t)}),this),this.setState({isSelectAllChecked:t,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,t)},_toggleSelectRow:function(e,t){var n=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),r=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],r,t);var o=this._getAreAllRowsChecked(r,A(n,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:o,selectedRowIds:r}),this.props.onSelectionChange&&this.props.onSelectionChange(r,o)},_updateSelectedRowIds:function(e,t,n){n?void 0===x(t,(function(t){return e===t}))&&t.push(e):t.splice(t.indexOf(e),1)},_getIsSelectAllChecked:function(){return this.state.isSelectAllChecked},_getAreAllRowsChecked:function(e,t){return t.length===P(t,e).length},_getIsRowChecked:function(e){return this.state.selectedRowIds.indexOf(e[this.props.uniqueIdentifier])>-1},getSelectedRowIds:function(){return this.state.selectedRowIds},_resetSelectedRows:function(){this.setState({isSelectAllChecked:!1,selectedRowIds:[]})},getMultipleSelectionObject:function(){return{isMultipleSelection:!x(this.props.results,(function(e){return"children"in e}))&&this.props.isMultipleSelection,toggleSelectAll:this._toggleSelectAll,getIsSelectAllChecked:this._getIsSelectAllChecked,toggleSelectRow:this._toggleSelectRow,getSelectedRowIds:this.getSelectedRowIds,getIsRowChecked:this._getIsRowChecked}},isInfiniteScrollEnabled:function(){return!this.props.useCustomPagerComponent&&this.props.enableInfiniteScroll},getClearFixStyles:function(){return{clear:"both",display:"table",width:"100%"}},getSettingsStyles:function(){return{float:"left",width:"50%",textAlign:"right"}},getFilterStyles:function(){return{float:"left",width:"50%",textAlign:"left",color:"#222",minHeight:"1px"}},getFilter:function(){return this.props.showFilter&&!1===this.shouldUseCustomGridComponent()?this.props.useCustomFilterComponent?o.createElement(g,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):o.createElement(l,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?o.createElement("button",{type:"button",className:this.props.settingsToggleClassName,onClick:this.toggleColumnChooser,style:this.props.useGriddleStyles?{background:"none",border:"none",padding:0,margin:0,fontSize:14}:null},this.props.settingsText,this.props.settingsIconComponent):""},getTopSection:function(e,t){if(!1===this.props.showFilter&&!1===this.props.showSettings)return"";var n=null,r=null,s=null;return this.props.useGriddleStyles&&(n=this.getFilterStyles(),r=this.getSettingsStyles(),s=this.getClearFixStyles()),o.createElement("div",{className:"top-section",style:s},o.createElement("div",{className:"griddle-filter",style:n},e),o.createElement("div",{className:"griddle-settings-toggle",style:r},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return o.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?o.createElement(m,{customPagerComponentOptions:this.props.customPagerComponentOptions,next:this.nextPage,previous:this.previousPage,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText,customPagerComponent:this.props.customPagerComponent}):o.createElement(u,{useGriddleStyles:this.props.useGriddleStyles,next:this.nextPage,previous:this.previousPage,nextClassName:this.props.nextClassName,nextIconComponent:this.props.nextIconComponent,previousClassName:this.props.previousClassName,previousIconComponent:this.props.previousIconComponent,currentPage:e,maxPage:t,setPage:this.setPage,nextText:this.props.nextText,previousText:this.props.previousText}))},getColumnSelectorSection:function(e,t){return this.state.showColumnChooser?o.createElement(c,{columns:e,selectedColumns:t,setColumns:this.setColumns,settingsText:this.props.settingsText,settingsIconComponent:this.props.settingsIconComponent,maxRowsText:this.props.maxRowsText,setPageSize:this.setPageSize,showSetPageSize:!this.shouldUseCustomGridComponent(),resultsPerPage:this.state.resultsPerPage,enableToggleCustom:this.props.enableToggleCustom,toggleCustomComponent:this.toggleCustomComponent,useCustomComponent:this.shouldUseCustomRowComponent()||this.shouldUseCustomGridComponent(),useGriddleStyles:this.props.useGriddleStyles,enableCustomFormatText:this.props.enableCustomFormatText,columnMetadata:this.props.columnMetadata}):""},getCustomGridSection:function(){return o.createElement(this.props.customGridComponent,r({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,n,r,s){return o.createElement("div",null,o.createElement(h,{data:e,columns:t,metadataColumns:n,globalData:s,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&r)},getStandardGridSection:function(e,t,n,r,s){var i=this.getSortObject(),l=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),c=this.getNoDataSection();return o.createElement("div",{className:"griddle-body"},o.createElement(a,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:c,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:i,multipleSelectionSettings:l,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:r,data:e,className:this.props.tableClassName,enableInfiniteScroll:this.isInfiniteScrollEnabled(),nextPage:this.nextPage,showTableHeading:this.props.showTableHeading,useFixedHeader:this.props.useFixedHeader,parentRowCollapsedClassName:this.props.parentRowCollapsedClassName,parentRowExpandedClassName:this.props.parentRowExpandedClassName,parentRowCollapsedComponent:this.props.parentRowCollapsedComponent,parentRowExpandedComponent:this.props.parentRowExpandedComponent,bodyHeight:this.props.bodyHeight,paddingHeight:this.props.paddingHeight,rowHeight:this.props.rowHeight,infiniteScrollLoadTreshold:this.props.infiniteScrollLoadTreshold,externalLoadingComponent:this.props.externalLoadingComponent,externalIsLoading:this.props.externalIsLoading,hasMorePages:s,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,n,r,o,s){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,n,r,s):this.getStandardGridSection(e,t,n,r,o)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?o.createElement("div",{className:this.props.noDataClassName},o.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):o.createElement(p,{noDataMessage:this.props.noDataMessage})},shouldShowNoDataSection:function(e){return!this.props.allowEmptyGrid&&(!1===this.props.useExternal&&(void 0===e||0===e.length)||!0===this.props.useExternal&&!1===this.props.externalIsLoading&&0===e.length)},render:function(){var e=this.getCurrentResults(),t=(this.props.tableClassName,this.getFilter()),n=this.getSettings(),r=this.getTopSection(t,n),s=[],i=this.columnSettings.getColumns(),a=this.getDataForRender(e,i,!0),l=this.columnSettings.getMetadataColumns();this.props.columnMetadata?_(this.props.columnMetadata,(function(e){"boolean"==typeof e.visible&&!1===e.visible||s.push(e.columnName)})):s=C.keys(N(e[0],l)),s=this.columnSettings.orderColumns(s);var u=this.getCurrentPage(),c=this.getCurrentMaxPage(),p=u+10?"griddle "+this.props.gridClassName:"griddle";return m+=this.shouldUseCustomRowComponent()?" griddle-custom":"",o.createElement("div",{className:m},r,h,o.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},f))}});f.Griddle=e.exports=k},5203:function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n-1}},1196:function(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r=200&&(p=l,d=!1,t=new r(t));e:for(;++c0&&s(c)?n>1?e(c,n-1,s,i,a):r(a,c):i||(a[a.length]=c)}return a}},8483:function(e,t,n){var r=n(5063)();e.exports=r},7816:function(e,t,n){var r=n(8483),o=n(3674);e.exports=function(e,t){return e&&r(e,t,o)}},7786:function(e,t,n){var r=n(1811),o=n(327);e.exports=function(e,t){for(var n=0,s=(t=r(t,e)).length;null!=e&&n=120&&v.length>=120)?new r(f&&v):void 0}v=e[0];var y=-1,C=h[0];e:for(;++yo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(o);++rt||i&&a&&u&&!l&&!c||o&&a&&u||!n&&u||!s)return 1;if(!o&&!i&&!c&&e=l?u:u*("desc"==n[o]?-1:1)}return e.index-t.index}},278:function(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[s-1]:void 0,a=s>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(s--,i):void 0,a&&o(n[0],n[1],a)&&(i=s<3?void 0:i,s=1),t=Object(t);++r-1?a[l?t[u]:u]:void 0}}},3866:function(e,t,n){var r=n(8969),o=n(4160),s=n(8776),i=n(9294);e.exports=function(e){return function(t){var n=o(t);return"[object Map]"==n?s(t):"[object Set]"==n?i(t):r(t,e(t))}}},696:function(e,t,n){var r=n(8630);e.exports=function(e){return r(e)?void 0:e}},8777:function(e,t,n){var r=n(852),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},7114:function(e,t,n){var r=n(8668),o=n(2908),s=n(4757);e.exports=function(e,t,n,i,a,l){var u=1&n,c=e.length,p=t.length;if(c!=p&&!(u&&p>c))return!1;var d=l.get(e),f=l.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h-1&&e%1==0&&e-1}},4705:function(e,t,n){var r=n(8470);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},4785:function(e,t,n){var r=n(1989),o=n(8407),s=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(s||o),string:new r}}},1285:function(e,t,n){var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:function(e,t,n){var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:function(e,t,n){var r=n(5050);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},8776:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2634:function(e){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},4523:function(e,t,n){var r=n(8306);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},4536:function(e,t,n){var r=n(852)(Object,"create");e.exports=r},6916:function(e,t,n){var r=n(5569)(Object.keys,Object);e.exports=r},3498:function(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1167:function(e,t,n){e=n.nmd(e);var r=n(1957),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,i=s&&s.exports===o&&r.process,a=function(){try{var e=s&&s.require&&s.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a},2333:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},5357:function(e,t,n){var r=n(6874),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,a=o(s.length-t,0),l=Array(a);++i0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},7465:function(e,t,n){var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:function(e){e.exports=function(e){return this.__data__.get(e)}},4758:function(e){e.exports=function(e){return this.__data__.has(e)}},4309:function(e,t,n){var r=n(8407),o=n(7071),s=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new s(i)}return n.set(e,t),this.size=n.size,this}},2351:function(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r2?t[2]:void 0;for(u&&s(t[0],t[1],u)&&(r=1);++n-1:!!c&&r(e,t,n)>-1}},8125:function(e,t,n){var r=n(4259);e.exports=function(e){return(null==e?0:e.length)?r(e,0,-1):[]}},5325:function(e,t,n){var r=n(9932),o=n(7556),s=n(5976),i=n(4387),a=s((function(e){var t=r(e,i);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},5694:function(e,t,n){var r=n(9454),o=n(7005),s=Object.prototype,i=s.hasOwnProperty,a=s.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:function(e){var t=Array.isArray;e.exports=t},8612:function(e,t,n){var r=n(3560),o=n(1780);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},9246:function(e,t,n){var r=n(8612),o=n(7005);e.exports=function(e){return o(e)&&r(e)}},4144:function(e,t,n){e=n.nmd(e);var r=n(5639),o=n(5062),s=t&&!t.nodeType&&t,i=s&&e&&!e.nodeType&&e,a=i&&i.exports===s?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},1609:function(e,t,n){var r=n(280),o=n(4160),s=n(5694),i=n(1469),a=n(8612),l=n(4144),u=n(5726),c=n(6719),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||c(e)||s(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},3560:function(e,t,n){var r=n(4239),o=n(3218);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},6688:function(e,t,n){var r=n(5588),o=n(1717),s=n(1167),i=s&&s.isMap,a=i?o(i):r;e.exports=a},5220:function(e){e.exports=function(e){return null===e}},3218:function(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8630:function(e,t,n){var r=n(4239),o=n(5924),s=n(7005),i=Function.prototype,a=Object.prototype,l=i.toString,u=a.hasOwnProperty,c=l.call(Object);e.exports=function(e){if(!s(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=u.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==c}},2928:function(e,t,n){var r=n(9221),o=n(1717),s=n(1167),i=s&&s.isSet,a=i?o(i):r;e.exports=a},7037:function(e,t,n){var r=n(4239),o=n(1469),s=n(7005);e.exports=function(e){return"string"==typeof e||!o(e)&&s(e)&&"[object String]"==r(e)}},3448:function(e,t,n){var r=n(4239),o=n(7005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},6719:function(e,t,n){var r=n(8749),o=n(1717),s=n(1167),i=s&&s.isTypedArray,a=i?o(i):r;e.exports=a},2353:function(e){e.exports=function(e){return void 0===e}},3674:function(e,t,n){var r=n(4636),o=n(280),s=n(8612);e.exports=function(e){return s(e)?r(e):o(e)}},1704:function(e,t,n){var r=n(4636),o=n(313),s=n(8612);e.exports=function(e){return s(e)?r(e,!0):o(e)}},928:function(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5161:function(e,t,n){var r=n(9932),o=n(7206),s=n(9199),i=n(1469);e.exports=function(e,t){return(i(e)?r:s)(e,o(t,3))}},8306:function(e,t,n){var r=n(3369);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var i=e.apply(this,r);return n.cache=s.set(o,i)||s,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},7557:function(e,t,n){var r=n(9932),o=n(5990),s=n(7406),i=n(1811),a=n(8363),l=n(696),u=n(9021),c=n(6904),p=u((function(e,t){var n={};if(null==e)return n;var u=!1;t=r(t,(function(t){return t=i(t,e),u||(u=t.length>1),t})),a(e,c(e),n),u&&(n=o(n,7,l));for(var p=t.length;p--;)s(n,t[p]);return n}));e.exports=p},5472:function(e,t,n){var r=n(2689),o=n(1469);e.exports=function(e,t,n,s){return null==e?[]:(o(t)||(t=null==t?[]:[t]),o(n=s?void 0:n)||(n=null==n?[]:[n]),r(e,t,n))}},8718:function(e,t,n){var r=n(5970),o=n(9021)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},9601:function(e,t,n){var r=n(371),o=n(9152),s=n(5403),i=n(327);e.exports=function(e){return s(e)?r(i(e)):o(e)}},9704:function(e,t,n){var r=n(2908),o=n(7206),s=n(5076),i=n(1469),a=n(6612);e.exports=function(e,t,n){var l=i(e)?r:s;return n&&a(e,t,n)&&(t=void 0),l(e,o(t,3))}},9734:function(e,t,n){var r=n(1078),o=n(2689),s=n(5976),i=n(6612),a=s((function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=a},479:function(e){e.exports=function(){return[]}},5062:function(e){e.exports=function(){return!1}},9572:function(e,t,n){var r=n(4259),o=n(554);e.exports=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:o(t),r(e,0,t<0?0:t)):[]}},8601:function(e,t,n){var r=n(4841),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:function(e,t,n){var r=n(8601);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},4841:function(e,t,n){var r=n(7561),o=n(3218),s=n(3448),i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(s(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):i.test(e)?NaN:+e}},3220:function(e,t,n){var r=n(3866)(n(3674));e.exports=r},9833:function(e,t,n){var r=n(531);e.exports=function(e){return null==e?"":r(e)}},3955:function(e,t,n){var r=n(9833),o=0;e.exports=function(e){var t=++o;return r(e)+t}},2628:function(e,t,n){var r=n(7415),o=n(3674);e.exports=function(e){return null==e?[]:r(e,o(e))}},2569:function(e,t,n){var r=n(731),o=n(5976),s=n(9246),i=o((function(e,t){return s(e)?r(e,t):[]}));e.exports=i},7287:function(e,t,n){var r=n(4865),o=n(1757);e.exports=function(e,t){return o(e||[],t||[],r)}},7418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,s){for(var i,a,l=o(e),u=1;u>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,s,i){return r((a=r(r(t,e),r(o,i)))<<(l=s)|a>>>32-l,n);var a,l}function s(e,t,n,r,s,i,a){return o(t&n|~t&r,e,t,s,i,a)}function i(e,t,n,r,s,i,a){return o(t&r|n&~r,e,t,s,i,a)}function a(e,t,n,r,s,i,a){return o(t^n^r,e,t,s,i,a)}function l(e,t,n,r,s,i,a){return o(n^(t|~r),e,t,s,i,a)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var u=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n>5]>>>o%32&255,s=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[n/8])<>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};t.default=s},58:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:function(e,t){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:function(e,t){"use strict";function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n>>0;p=c,c=u,u=r(l,30)>>>0,l=i,i=a}o[0]=o[0]+i>>>0,o[1]=o[1]+l>>>0,o[2]=o[2]+u>>>0,o[3]=o[3]+c>>>0,o[4]=o[4]+p>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]};t.default=o},4008:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=i;var r,o=(r=n(6435))&&r.__esModule?r:{default:r};const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function i(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}var a=function(e,t=0){const n=i(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n};t.default=a},3990:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(3319))&&r.__esModule?r:{default:r},s=n(4008);let i,a,l=0,u=0;var c=function(e,t,n){let r=t&&n||0;const c=t||new Array(16);let p=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:a;if(null==p||null==d){const t=e.random||(e.rng||o.default)();null==p&&(p=i=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==d&&(d=a=16383&(t[6]<<8|t[7]))}let f=void 0!==e.msecs?e.msecs:Date.now(),h=void 0!==e.nsecs?e.nsecs:u+1;const m=f-l+(h-u)/1e4;if(m<0&&void 0===e.clockseq&&(d=d+1&16383),(m<0||f>l)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=f,u=h,a=d,f+=122192928e5;const g=(1e4*(268435455&f)+h)%4294967296;c[r++]=g>>>24&255,c[r++]=g>>>16&255,c[r++]=g>>>8&255,c[r++]=255&g;const v=f/4294967296*1e4&268435455;c[r++]=v>>>8&255,c[r++]=255&v,c[r++]=v>>>24&15|16,c[r++]=v>>>16&255,c[r++]=d>>>8|128,c[r++]=255&d;for(let e=0;e<6;++e)c[r+e]=p[e];return t||(0,s.unsafeStringify)(c)};t.default=c},8237:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(n(7925)),o=s(n(4163));function s(e){return e&&e.__esModule?e:{default:e}}var i=(0,r.default)("v3",48,o.default);t.default=i},7925:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,i,a){var l;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n { - const ListComponent = () => ; - const VersionDetailComponent = () =>
; - const CompareWarningComponent = () =>
; - - // Mock select functions to replace the ones provided by mapDispatchToProps - let mockOnSelect; - let mockOnSetPage; - - beforeEach(() => { - mockOnSelect = jest.fn(); - mockOnSetPage = jest.fn(); - }); - - const versions = { +import { render, screen, fireEvent } from '@testing-library/react'; + +function makeProps(obj = {}) { + return { + ListComponent: ({ versions }) => ( +
+ {versions.map((version) =>
)} +
+ ), + VersionDetailComponent: ({ isLatestVersion, version, compareModeAvailable }) => ( +
+ ), + CompareWarningComponent: () =>
, versions: { - pageInfo: { - totalCount: 2 - }, - nodes: [ - { - version: 14, - author: { - firstName: 'Michelle', - surname: 'Masters' - }, - publisher: null, - published: false, - latestDraftVersion: false, - liveVersion: false, - lastEdited: '2018-03-08 11:57:58' + versions: { + pageInfo: { + totalCount: 2 }, - { - version: 13, - author: { - firstName: 'Scott', - surname: 'Stockman' + nodes: [ + { + version: 14, + author: { + firstName: 'Michelle', + surname: 'Masters' + }, + publisher: null, + published: false, + latestDraftVersion: false, + liveVersion: false, + lastEdited: '2018-03-08 11:57:58' }, - publisher: null, - published: false, - latestDraftVersion: true, - liveVersion: false, - lastEdited: '2018-03-08 11:57:56' - }, - ], + { + version: 13, + author: { + firstName: 'Scott', + surname: 'Stockman' + }, + publisher: null, + published: false, + latestDraftVersion: true, + liveVersion: false, + lastEdited: '2018-03-08 11:57:56' + }, + ], + }, }, + onSelect: () => null, + onSetPage: () => null, + onResize: () => null, + recordId: 1, + limit: 100, + page: 1, + compare: false, + ...obj }; +} + +test('HistoryViewer returns the node element from each version edge', async () => { + render( + + ); + const versions = await screen.findAllByTestId('test-version'); + expect(versions[0].getAttribute('data-id')).toEqual('14'); + expect(versions[1].getAttribute('data-id')).toEqual('13'); +}); - describe('getVersions()', () => { - it('returns the node element from each version edge', () => { - const wrapper = shallow( - - ); - - expect(wrapper.instance().getVersions().map((version) => version.version)).toEqual([14, 13]); - }); - }); - - describe('getLatestVersion()', () => { - it('returns the version marked as LatestDraftVersion', () => { - const wrapper = shallow( - - ); - - expect(wrapper.instance().getLatestVersion().version).toEqual(13); - }); - - it('gives priority to the currentVersion', () => { - const wrapper = shallow( - - ); - - expect(wrapper.instance().getLatestVersion().version).toEqual(123); - }); - }); - - describe('render()', () => { - it('shows a loading state while loading results', () => { - const wrapper = shallow( - - ); - - const result = wrapper.find( - 'cms-content-loading-spinner' - ); - - expect(result).toBeTruthy(); - }); - }); - - describe('handlePagination()', () => { - it('should have called onSetPage and handlePrevPage after prev button in navigation clicked', () => { - const wrapper = shallow( - - ); - wrapper.instance().handlePrevPage(); - expect(mockOnSetPage).toBeCalledWith(1); - }); - }); - - describe('onSelect()', () => { - it('called when components unmounts', () => { - const wrapper = shallow( - - ); - - wrapper.instance().componentWillUnmount(); - expect(mockOnSelect).toBeCalled(); - }); - }); - - describe('isListView()', () => { - it('returns true when no current version or compare mode is set', () => { - const wrapper = shallow( - - ); - - expect(wrapper.instance().isListView()).toBe(true); - }); - - it('returns false current version is set and compare mode is not', () => { - const wrapper = shallow( - - ); - - expect(wrapper.instance().isListView()).toBe(false); - }); +test('HistoryViewer knows which version is the the latestDraftVersion', async () => { + render( + + ); + const el = await screen.findByTestId('test-version-detail'); + expect(el.getAttribute('data-islatestversion')).toEqual('false'); +}); - it('returns true when current version is set with only compare FROM', () => { - const wrapper = shallow( - - ); +test('HistoryViewer knows which versions are not the the latestDraftVersion', async () => { + render( + + ); + const el = await screen.findByTestId('test-version-detail'); + expect(el.getAttribute('data-islatestversion')).toEqual('true'); +}); - expect(wrapper.instance().isListView()).toBe(true); - }); +test('HistoryViewer gives priority to the currentVersion', async () => { + render( + + ); + const version = await screen.findByTestId('test-version-detail'); + expect(version.getAttribute('data-version')).toEqual('123'); +}); - it('returns false when in compare mode', () => { - const wrapper = shallow( - - ); +test('HistoryViewer shows a loading state while loading results', async () => { + const { container } = render( + + ); + expect(container.querySelectorAll('.cms-content-loading-spinner')).toHaveLength(1); +}); - expect(wrapper.instance().isListView()).toBe(false); - }); - }); +test('HistoryViewer should have called onSetPage and handleNextPage after next button in navigation clicked', async () => { + const onSetPage = jest.fn(); + render( + + ); + const button = await screen.findByText('Previous'); + fireEvent.click(button); + expect(onSetPage).toBeCalledWith(1); +}); - describe('compareModeAvailable()', () => { - it('returns true when more than one version is present', () => { - const wrapper = shallow( - - ); +test('HistoryViewer onSelect() called when components unmounts', async () => { + const onSelect = jest.fn(); + const unmount = render( + + ).unmount; + unmount(); + expect(onSelect).toBeCalled(); +}); - expect(wrapper.instance().compareModeAvailable()).toBe(true); - }); +test('HistoryViewer isListView() returns there is a currentVersion and compare mode is false', async () => { + // the only way that isListView() is used is as part of the logic to determine if the css class + // history-viewer--no-margins is added + const { container } = render( + + ); + expect(container.querySelectorAll('.history-viewer')[0].classList).toContain('history-viewer--no-margins'); +}); - it('returns false with only one version', () => { - const wrapper = shallow( - - ); +test('HistoryViewer compoareModeAvailable() returns true when more than one version is present', async () => { + render( + + ); + const el = await screen.findByTestId('test-version-detail'); + expect(el.getAttribute('data-comparemodeavailable')).toEqual('true'); +}); - expect(wrapper.instance().compareModeAvailable()).toBe(false); - }); - }); +test('HistoryViewer compoareModeAvailable() returns false with only one version', async () => { + render( + + ); + const el = await screen.findByTestId('test-version-detail'); + expect(el.getAttribute('data-comparemodeavailable')).toEqual('false'); }); diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerHeading-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerHeading-test.js index 0ca186ed..f38f4a5d 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerHeading-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerHeading-test.js @@ -1,44 +1,32 @@ /* eslint-disable import/no-extraneous-dependencies */ -/* global jest, describe, it, expect */ +/* global jest, test, describe, it, expect */ import React from 'react'; import { Component as HistoryViewerHeading } from '../HistoryViewerHeading'; -import Enzyme, { shallow } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16/build/index'; - -Enzyme.configure({ adapter: new Adapter() }); - -describe('HistoryViewerHeading', () => { - // Mock select functions to replace the ones provided by mapDispatchToProps - const mockOnCompareModeSelect = jest.fn(); - const mockOnCompareModeUnselect = jest.fn(); - - describe('onChange()', () => { - it('triggers mapDispatchToProps functions to notify and update the Redux store', () => { - const wrapper = shallow( - - ); - - wrapper.find('.history-viewer-heading__compare-mode-checkbox').at(0).simulate('change'); - expect(mockOnCompareModeUnselect).toHaveBeenCalled(); - }); - - it('simulate change event in disabled compare mode', () => { - const wrapper = shallow( - - ); - - wrapper.find('.history-viewer-heading__compare-mode-checkbox').at(0).simulate('change'); - expect(mockOnCompareModeSelect).toHaveBeenCalled(); - }); - }); +import { render, fireEvent } from '@testing-library/react'; + +test('HistoryViewerHeading triggers mapDispatchToProps functions to notify and update the Redux store', () => { + const onCompareModeUnselect = jest.fn(); + const { container } = render( + + ); + fireEvent.click(container.querySelector('.history-viewer-heading__compare-mode-checkbox')); + expect(onCompareModeUnselect).toHaveBeenCalled(); }); +test('HistoryViewerHeading simulates change event in disabled compare mode', () => { + const onCompareModeSelect = jest.fn(); + const { container } = render( + + ); + fireEvent.click(container.querySelector('.history-viewer-heading__compare-mode-checkbox')); + expect(onCompareModeSelect).toHaveBeenCalled(); +}); diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js index 82cd69c0..76e69679 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js @@ -1,42 +1,29 @@ -/* global jest, describe, it, expect */ +/* global jest, test, describe, it, expect */ import React from 'react'; -import ReactTestUtils from 'react-dom/test-utils'; import { Component as HistoryViewerToolbar } from '../HistoryViewerToolbar'; +import { render, fireEvent } from '@testing-library/react'; -describe('HistoryViewerToolbar', () => { - const FormActionComponent = () =>
; - const ViewModeComponent = () =>
; - let component = null; - let mockRevertMutation; - let revertHandler; - - beforeEach(() => { - mockRevertMutation = jest.fn((recordID, versionID) => Promise.resolve(versionID)); - revertHandler = jest.fn(); - }); - - describe('render()', () => { - it('calls revert function then onAfterRevert on success, and it renders', () => { - component = ReactTestUtils.renderIntoDocument( - - ); - - return component.handleRevert() - .then(() => { - expect(mockRevertMutation.mock.calls.length).toBe(1); - expect(mockRevertMutation.mock.calls[0][0]).toBe(123); - expect(mockRevertMutation.mock.calls[0][1]).toBe(234); - expect(revertHandler.mock.calls.length).toBe(1); - expect(revertHandler.mock.calls[0][0]).toBe(234); - }); - }); - }); +test('HistoryViewerToolbar renders', async () => { + const revertHandler = jest.fn(); + const mockRevertMutation = jest.fn((recordID, versionID) => Promise.resolve(versionID)); + const { container } = render( +
, + ViewModeComponent: () =>
, + recordId: 123, + versionId: 234, + isRevertable: true, + onAfterRevert: revertHandler, + actions: { + revertToVersion: mockRevertMutation + } + }} + /> + ); + expect(container.querySelector('.toolbar')).not.toBeNull(); + fireEvent.click(container.querySelector('.test-form-action')); + expect(mockRevertMutation).toBeCalledWith(123, 234, 'DRAFT', 'DRAFT'); + await new Promise(resolve => setTimeout(resolve, 0)); + expect(revertHandler).toBeCalledWith(234); }); diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js index 8ab541e2..fec8ee1e 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js @@ -1,28 +1,13 @@ /* eslint-disable import/no-extraneous-dependencies */ -/* global jest, describe, it, expect */ +/* global jest, test, describe, it, expect */ import React from 'react'; import { Component as HistoryViewerVersion } from '../HistoryViewerVersion'; -import Enzyme, { shallow } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16/build/index'; +import { render, screen, fireEvent } from '@testing-library/react'; -Enzyme.configure({ adapter: new Adapter() }); - -describe('HistoryViewerVersion', () => { - const StateComponent = () =>
; - const FormActionComponent = () =>
; - - let mockOnCompareMode; - let mockOnCompareSelect; - let mockOnSelect; - let version = {}; - - beforeEach(() => { - mockOnCompareMode = jest.fn(); - mockOnCompareSelect = jest.fn(); - mockOnSelect = jest.fn(); - - version = { +function makeProps(obj = {}) { + return { + version: { author: { firstName: 'John', surname: 'Smith', @@ -33,196 +18,152 @@ describe('HistoryViewerVersion', () => { surname: 'Smith', }, version: 3, - }; - }); - - describe('handleCompare()', () => { - it('calls onCompareMode to dispatch an action as the result of handleCompare call', () => { - const wrapper = shallow( - - ); - - wrapper.instance().handleCompare(); - expect(mockOnCompareMode).toBeCalledWith(version); - }); - }); + }, + isActive: true, + onSelect: () => null, + StateComponent: () =>
, + FormActionComponent: ({ onClick, extraClass }) =>
, + ...obj + }; +} + +test('HistoryViewerVersion calls onCompareMode to dispatch an action as the result of handleCompare call', async () => { + const onCompareMode = jest.fn(); + render( + + ); + const actions = await screen.findAllByTestId('test-form-action'); + fireEvent.click(actions[0]); + expect(onCompareMode).toBeCalledWith(makeProps().version); +}); - describe('getAuthor()', () => { - it('returns the author name when unpublished', () => { - const wrapper = shallow( - - ); +test('HistoryViewerVersion getAuthor() returns the author name when unpublished', async () => { + const { container } = render( + + ); + await screen.findByText('Already selected'); + expect(container.querySelector('.history-viewer__author').textContent).toBe('John Smith'); +}); - expect(wrapper.instance().getAuthor()).toEqual('John Smith'); - }); +test('HistoryViewerVersion getAuthor() returns the publisher name when published', async () => { + const { container } = render( + + ); + await screen.findByText('Already selected'); + expect(container.querySelector('.history-viewer__author').textContent).toBe('Sarah Smith'); +}); - it('returns the publisher name when published', () => { - const wrapper = shallow( - - ); +test('HistoryViewerVersion handleClick() does nothing on row click when the clear button is shown', async () => { + const onSelect = jest.fn(); + const onCompareMode = jest.fn(); + const { container } = render( + + ); + await screen.findByText('Already selected'); + fireEvent.click(container.querySelector('.history-viewer__row')); + expect(onSelect).not.toBeCalled(); + expect(onCompareMode).not.toBeCalled(); +}); - expect(wrapper.instance().getAuthor()).toEqual('Sarah Smith'); - }); - }); +test('HistoryViewerVersion handleClick() renders version details when version clicked', async () => { + const onSelect = jest.fn(); + const onCompareMode = jest.fn(); + const { container } = render( + + ); + await screen.findByText('John Smith'); + fireEvent.click(container.querySelector('.history-viewer__version-link')); + expect(onSelect).toBeCalledWith(makeProps().version, false); + expect(onCompareMode).not.toBeCalled(); +}); - describe('handleClick()', () => { - it('does nothing on row click when the clear button is shown', () => { - const wrapper = shallow( - - ); +test('HistoryViewerVersion handleClick() renders version details when version clicked', async () => { + // Note: handleClick is only fired when isActive is false + const onSelect = jest.fn(); + const onCompareMode = jest.fn(); + const compare = { + versionFrom: { Version: 0 }, + versionTo: { Version: 0 }, + }; + const { container } = render( + + ); + await screen.findByText('John Smith'); + fireEvent.click(container.querySelector('.history-viewer__version-link')); + expect(onSelect).toBeCalledWith(makeProps().version, compare); + expect(onCompareMode).not.toBeCalled(); +}); - wrapper.simulate('click'); - expect(mockOnCompareSelect).not.toHaveBeenCalled(); - expect(mockOnSelect).not.toHaveBeenCalled(); - }); +test('HistoryViewerVersion render() renders the close button in the version details', async () => { + const { container } = render( + + ); + await screen.findByText('Already selected'); + expect(container.querySelectorAll('[data-extraclass="history-viewer__close-button"')).toHaveLength(1); +}); - it('renders version details when version clicked', () => { - const wrapper = shallow( - - ); +test('HistoryViewerVersion render() renders the close button in the version details', async () => { + const { container } = render( + + ); + await screen.findByText('Already selected'); + expect(container.querySelectorAll('[data-extraclass="history-viewer__compare-button"')).toHaveLength(1); +}); - wrapper.instance().handleClick(); - expect(mockOnCompareSelect).not.toHaveBeenCalled(); - expect(mockOnSelect).toHaveBeenCalledWith(version, false); - }); +test('HistoryViewerVersion handleClose() return back to list view when closing version via action dispatch', async () => { + const onSelect = jest.fn(); + const { container } = render( + + ); + await screen.findByText('Already selected'); + fireEvent.click(container.querySelector('[data-extraclass="history-viewer__close-button"')); + expect(onSelect).toBeCalled(); +}); - it('renders version details when version clicked', () => { - const compare = { +test('HistoryViewerVersion handleClose() deselect version when closing version in compare mode', async () => { + const onSelect = jest.fn(); + const onCompareMode = jest.fn(); + const { container } = render( + - ); - - wrapper.instance().handleClick(); - expect(mockOnCompareSelect).not.toHaveBeenCalled(); - expect(mockOnSelect).toHaveBeenCalledWith(version, compare); - }); - - it('chooses version when version clicked in compare mode', () => { - const wrapper = shallow( - - ); - - wrapper.instance().handleClick(); - expect(mockOnSelect).toHaveBeenCalled(); - expect(mockOnCompareMode).not.toHaveBeenCalled(); - }); - }); - - describe('render()', () => { - it('renders the close button in the version details', () => { - const wrapper = shallow( - - ); - - expect(wrapper.find(FormActionComponent).at(1).props().extraClass).toEqual('history-viewer__close-button'); - }); - - it('renders the compare button in the version details', () => { - const wrapper = shallow( - - ); - - expect(wrapper.find(FormActionComponent).at(0).props().extraClass).toEqual('history-viewer__compare-button'); - }); - }); - - describe('handleClose()', () => { - it('return back to list view when closing version via action dispatch', () => { - const wrapper = shallow( - - ); - - wrapper.instance().handleClose(); - expect(mockOnSelect).toHaveBeenCalled(); - }); - - it('deselect version when closing version in compare mode', () => { - const wrapper = shallow( - - ); - - wrapper.instance().handleClose(); - expect(mockOnSelect).toHaveBeenCalled(); - expect(mockOnCompareMode).not.toHaveBeenCalled(); - }); - }); + }, + })} + /> + ); + await screen.findByText('Already selected'); + fireEvent.click(container.querySelector('[data-extraclass="history-viewer__close-button"')); + expect(onSelect).toBeCalled(); + expect(onCompareMode).not.toBeCalled(); }); diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerVersionList-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerVersionList-test.js index 139e89d8..25b00293 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerVersionList-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerVersionList-test.js @@ -1,31 +1,19 @@ -/* global jest, describe, it, expect */ +/* global jest, test, describe, it, expect */ import React from 'react'; -import ReactTestUtils from 'react-dom/test-utils'; import { Component as HistoryViewerVersionList } from '../HistoryViewerVersionList'; +import { render } from '@testing-library/react'; -describe('HistoryViewerVersionList', () => { - const FormAlertComponent = () =>
; - const HeadingComponent = () =>
  • ; - const VersionComponent = () =>
    ; - - const component = ReactTestUtils.renderIntoDocument( - { + const { container } = render( +
    , + HeadingComponent: () =>
  • , + VersionComponent: () =>
    , + versions: [], + }} /> ); - - describe('render()', () => { - it('returns an unordered list', () => { - const list = ReactTestUtils.scryRenderedDOMComponentsWithTag( - component, - 'ul' - ); - - expect(list[0].className).toContain('history-viewer__table'); - }); - }); + expect(container.querySelector('ul.history-viewer__table')).not.toBeNull(); }); + diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js index 0dedd04c..b9b89d7e 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js @@ -1,120 +1,122 @@ -/* global jest, describe, it, expect */ +/* global jest, test, describe, it, expect */ import React from 'react'; -import ReactTestUtils from 'react-dom/test-utils'; import { Component as HistoryViewerVersionState } from '../HistoryViewerVersionState'; +import { render } from '@testing-library/react'; + +function makeProps(obj = {}) { + return { + BadgeComponent: ({ status, message }) =>
    , + ...obj + }; +} + +test('HistoryViewerVersionState adds extra classes to the default class', () => { + const { container } = render( + + ); + expect(container.querySelector('.history-viewer__version-state.foobar')).not.toBeNull(); +}); -describe('HistoryViewerVersionState', () => { - let component = null; - HistoryViewerVersionState.defaultProps.BadgeComponent = () =>
    ; - - describe('getClassNames()', () => { - it('adds extra classes to the default class', () => { - component = ReactTestUtils.renderIntoDocument( - - ); - - expect(component.getClassNames()).toContain('foobar'); - expect(component.getClassNames()).toContain('history-viewer__version-state'); - }); - }); - - describe('getPublishedState', () => { - it('returns the correct state', () => { - const mockVersion = { +test('HistoryViewerVersionState returns the correct state', () => { + const { container } = render( + - ); - - expect(component.getPublishedState()).toBe('Published'); - }); + }, + })} + /> + ); + expect(container.querySelector('.history-viewer__version-state').textContent).toContain('Published'); +}); - it('returns the Unpublished state correctly', () => { - const mockVersion = { +test('HistoryViewerVersionState returns the Unplublished state correctly', () => { + const { container } = render( + - ); - - expect(component.getPublishedState()).toBe('Unpublished'); - }); + }, + })} + /> + ); + expect(container.querySelector('.history-viewer__version-state').textContent).toContain('Unpublished'); +}); - it('returns the Archived state correctly', () => { - const mockVersion = { +test('HistoryViewerVersionState returns the Archived state correctly', () => { + const { container } = render( + - ); - - expect(component.getPublishedState()).toBe('Archived'); - }); + }, + })} + /> + ); + expect(container.querySelector('.history-viewer__version-state').textContent).toContain('Archived'); +}); - it('returns the Created state correctly', () => { - const mockVersion = { +test('HistoryViewerVersionState returns the Created state correctly', () => { + const { container } = render( + - ); - - expect(component.getPublishedState()).toBe('Created'); - }); - - it('defaults to "Modified" if not defined', () => { - component = ReactTestUtils.renderIntoDocument( - - ); + }, + })} + /> + ); + expect(container.querySelector('.history-viewer__version-state').textContent).toContain('Created'); +}); - expect(component.getPublishedState()).toBe('Saved'); - }); - }); +test('HistoryViewerVersionState defaults to "Modified" if not defined', () => { + const { container } = render( + + ); + expect(container.querySelector('.history-viewer__version-state').textContent).toContain('Saved'); +}); - describe('getDate', () => { - it('returns a formatted date', () => { - const mockVersion = { +test('HistoryViewerVersionState returns a formatted date', () => { + const { container } = render( + - ); - - // NB: default locale in i18n is en_US - expect(component.getDate()).toBe('05/03/2018 5:12 PM'); - }); - }); + }, + })} + /> + ); + expect(container.querySelector('.history-viewer__version-state .text-muted').textContent).toBe('05/03/2018 5:12 PM'); +}); - describe('getBadges', () => { - it('returns a Badge when the version is live', () => { - const mockVersion = { +test('HistoryViewerVersionState returns a badge when the version is live', () => { + const { container } = render( + - ); - - const badge = component.getBadges(); - expect(badge.props.message).toEqual('Live'); - expect(badge.props.status).toEqual('success'); - }); + }, + })} + /> + ); + const badge = container.querySelector('.test-badge'); + expect(badge.getAttribute('data-message')).toBe('Live'); + expect(badge.getAttribute('data-status')).toBe('success'); +}); - it('returns an empty string when version is not live', () => { - component = ReactTestUtils.renderIntoDocument( - - ); - expect(component.getBadges()).toBe(''); - }); - }); +test('HistoryViewerVersionState doess not return a badge when the version is false', () => { + const { container } = render( + + ); + expect(container.querySelector('.test-badge')).toBeNull(); }); diff --git a/package.json b/package.json index c1ec5e46..924db477 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,6 @@ "roots": [ "client/src" ], - "moduleNameMapper": { - "^react-dom/client$": "react-dom-16", - "^react-dom((/.*)?)$": "react-dom-16$1", - "^react((/.*)?)$": "react-16$1" - }, "modulePaths": [ "client/src", "../admin/client/src", @@ -58,13 +53,10 @@ "@storybook/addon-actions": "^6.5.13", "@storybook/addons": "^6.5.13", "@storybook/react": "^6.5.13", + "@testing-library/react": "^14.0.0", "babel-jest": "^29.3.0", - "enzyme": "^3.11.0", - "enzyme-adapter-react-16": "^1.15.7", "jest-cli": "^29.3.0", "jest-environment-jsdom": "^29.3.1", - "react-16": "npm:react@^16.14.0", - "react-dom-16": "npm:react-dom@^16.14.0", "terser-webpack-plugin": "^5.3.6", "webpack": "^5.74.0", "webpack-cli": "^5.0.0" diff --git a/yarn.lock b/yarn.lock index 51ad4071..aa414516 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2507,11 +2507,39 @@ regenerator-runtime "^0.13.7" resolve-from "^5.0.0" +"@testing-library/dom@^9.0.0": + version "9.2.0" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.2.0.tgz#0e1f45e956f2a16f471559c06edd8827c4832f04" + integrity sha512-xTEnpUKiV/bMyEsE5bT4oYA0x0Z/colMtxzUY8bKyPXBNLn/e0V4ZjBZkEhms0xE4pv9QsPfSRu9AWS4y5wGvA== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/runtime" "^7.12.5" + "@types/aria-query" "^5.0.1" + aria-query "^5.0.0" + chalk "^4.1.0" + dom-accessibility-api "^0.5.9" + lz-string "^1.5.0" + pretty-format "^27.0.2" + +"@testing-library/react@^14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.0.0.tgz#59030392a6792450b9ab8e67aea5f3cc18d6347c" + integrity sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg== + dependencies: + "@babel/runtime" "^7.12.5" + "@testing-library/dom" "^9.0.0" + "@types/react-dom" "^18.0.0" + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== +"@types/aria-query@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" + integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== + "@types/babel__core@^7.1.14": version "7.1.20" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.20.tgz#e168cdd612c92a2d335029ed62ac94c95b362359" @@ -2732,6 +2760,13 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== +"@types/react-dom@^18.0.0": + version "18.2.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.4.tgz#13f25bfbf4e404d26f62ac6e406591451acba9e0" + integrity sha512-G2mHoTMTL4yoydITgOGwWdWMVd8sNgyEP85xVmMKAPUBwQWm9wBPQUmvbeF4V3WBY1P7mmL4BkjQ0SqUpf1snw== + dependencies: + "@types/react" "*" + "@types/react@*": version "18.0.25" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.25.tgz#8b1dcd7e56fe7315535a4af25435e0bb55c8ae44" @@ -3283,21 +3318,6 @@ airbnb-js-shims@^2.2.1: string.prototype.padstart "^3.0.0" symbol.prototype.description "^1.0.0" -airbnb-prop-types@^2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/airbnb-prop-types/-/airbnb-prop-types-2.16.0.tgz#b96274cefa1abb14f623f804173ee97c13971dc2" - integrity sha512-7WHOFolP/6cS96PhKNrslCLMYAI8yB1Pp6u6XmxozQOiZbsI5ycglZr5cHhBFfuRcQQjzCMith5ZPZdYiJCxUg== - dependencies: - array.prototype.find "^2.1.1" - function.prototype.name "^1.1.2" - is-regex "^1.1.0" - object-is "^1.1.2" - object.assign "^4.1.0" - object.entries "^1.1.2" - prop-types "^15.7.2" - prop-types-exact "^1.2.0" - react-is "^16.13.1" - ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -3502,6 +3522,13 @@ aria-query@^4.2.2: "@babel/runtime" "^7.10.2" "@babel/runtime-corejs3" "^7.10.2" +aria-query@^5.0.0: + version "5.1.3" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" + integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== + dependencies: + deep-equal "^2.0.5" + arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" @@ -3517,6 +3544,14 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -3560,28 +3595,7 @@ array-unique@^0.3.2: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== -array.prototype.filter@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/array.prototype.filter/-/array.prototype.filter-1.0.2.tgz#5f90ca6e3d01c31ea8db24c147665541db28bb4c" - integrity sha512-us+UrmGOilqttSOgoWZTpOvHu68vZT2YCjc/H4vhu56vzZpaDFBhB+Se2UwqWzMKbDv7Myq5M5pcZLAtUvTQdQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-array-method-boxes-properly "^1.0.0" - is-string "^1.0.7" - -array.prototype.find@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.2.1.tgz#769b8182a0b535c3d76ac025abab98ba1e12467b" - integrity sha512-I2ri5Z9uMpMvnsNrHre9l3PaX+z9D0/z6F7Yt2u15q7wt0I62g5kX6xUKR1SJiefgG+u2/gJUmM8B47XRvQR6w== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - es-shim-unscopables "^1.0.0" - -array.prototype.flat@^1.2.1, array.prototype.flat@^1.2.3, array.prototype.flat@^1.2.5: +array.prototype.flat@^1.2.1, array.prototype.flat@^1.2.5: version "1.3.1" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== @@ -3713,6 +3727,11 @@ autoprefixer@^9.8.6: postcss "^7.0.32" postcss-value-parser "^4.1.0" +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + axe-core@^4.4.3: version "4.5.1" resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.5.1.tgz#04d561c11b6d76d096d34e9d14ba2c294fb20cdc" @@ -4340,9 +4359,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001426: - version "1.0.30001431" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795" - integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ== + version "1.0.30001482" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001482.tgz" + integrity sha512-F1ZInsg53cegyjroxLNW9DmrEQ1SuGRTO1QlpA0o2/6OpQ0gFeDRoq1yFmnr8Sakn9qwwt9DmbxHB6w167OSuQ== case-sensitive-paths-webpack-plugin@^2.3.0: version "2.4.0" @@ -4402,31 +4421,6 @@ character-reference-invalid@^1.0.0: resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@^1.0.0-rc.3: - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - "chokidar@>=3.0.0 <4.0.0", chokidar@^3.4.1, chokidar@^3.4.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -5029,18 +5023,7 @@ css-select@^4.1.3: domutils "^2.8.0" nth-check "^2.0.1" -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-what@^6.0.1, css-what@^6.1.0: +css-what@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== @@ -5164,6 +5147,30 @@ deep-equal@^1.1.1: object-keys "^1.1.1" regexp.prototype.flags "^1.2.0" +deep-equal@^2.0.5: + version "2.2.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.1.tgz#c72ab22f3a7d3503a4ca87dde976fe9978816739" + integrity sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + es-get-iterator "^1.1.3" + get-intrinsic "^1.2.0" + is-arguments "^1.1.1" + is-array-buffer "^3.0.2" + is-date-object "^1.0.5" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + isarray "^2.0.5" + object-is "^1.1.5" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.0" + side-channel "^1.0.4" + which-boxed-primitive "^1.0.2" + which-collection "^1.0.1" + which-typed-array "^1.1.9" + deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" @@ -5203,6 +5210,14 @@ define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" + integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -5326,11 +5341,6 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -discontinuous-range@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" - integrity sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ== - doctrine@^1.2.2: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -5353,6 +5363,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-accessibility-api@^0.5.9: + version "0.5.16" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" + integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -5376,15 +5391,6 @@ dom-serializer@^1.0.1: domhandler "^4.2.0" entities "^2.0.0" -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" @@ -5395,7 +5401,7 @@ domain-browser@^1.1.1: resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== -domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: +domelementtype@^2.0.1, domelementtype@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== @@ -5414,13 +5420,6 @@ domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1: dependencies: domelementtype "^2.2.0" -domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" @@ -5430,15 +5429,6 @@ domutils@^2.5.2, domutils@^2.8.0: domelementtype "^2.2.0" domhandler "^4.2.0" -domutils@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.0.1.tgz#696b3875238338cb186b6c0612bd4901c89a4f1c" - integrity sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.1" - dot-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751" @@ -5565,7 +5555,7 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== -entities@^4.2.0, entities@^4.3.0, entities@^4.4.0: +entities@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== @@ -5585,70 +5575,6 @@ envinfo@^7.7.3: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== -enzyme-adapter-react-16@^1.15.7: - version "1.15.7" - resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.7.tgz#a737e6d8e2c147e9da5acf957755be7634f76201" - integrity sha512-LtjKgvlTc/H7adyQcj+aq0P0H07LDL480WQl1gU512IUyaDo/sbOaNDdZsJXYW2XaoPqrLLE9KbZS+X2z6BASw== - dependencies: - enzyme-adapter-utils "^1.14.1" - enzyme-shallow-equal "^1.0.5" - has "^1.0.3" - object.assign "^4.1.4" - object.values "^1.1.5" - prop-types "^15.8.1" - react-is "^16.13.1" - react-test-renderer "^16.0.0-0" - semver "^5.7.0" - -enzyme-adapter-utils@^1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.14.1.tgz#f30db15dafc22e0ccd44f5acc8d93be29218cdcf" - integrity sha512-JZgMPF1QOI7IzBj24EZoDpaeG/p8Os7WeBZWTJydpsH7JRStc7jYbHE4CmNQaLqazaGFyLM8ALWA3IIZvxW3PQ== - dependencies: - airbnb-prop-types "^2.16.0" - function.prototype.name "^1.1.5" - has "^1.0.3" - object.assign "^4.1.4" - object.fromentries "^2.0.5" - prop-types "^15.8.1" - semver "^5.7.1" - -enzyme-shallow-equal@^1.0.1, enzyme-shallow-equal@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/enzyme-shallow-equal/-/enzyme-shallow-equal-1.0.5.tgz#5528a897a6ad2bdc417c7221a7db682cd01711ba" - integrity sha512-i6cwm7hN630JXenxxJFBKzgLC3hMTafFQXflvzHgPmDhOBhxUWDe8AeRv1qp2/uWJ2Y8z5yLWMzmAfkTOiOCZg== - dependencies: - has "^1.0.3" - object-is "^1.1.5" - -enzyme@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/enzyme/-/enzyme-3.11.0.tgz#71d680c580fe9349f6f5ac6c775bc3e6b7a79c28" - integrity sha512-Dw8/Gs4vRjxY6/6i9wU0V+utmQO9kvh9XLnz3LIudviOnVYDEe2ec+0k+NQoMamn1VrjKgCUOWj5jG/5M5M0Qw== - dependencies: - array.prototype.flat "^1.2.3" - cheerio "^1.0.0-rc.3" - enzyme-shallow-equal "^1.0.1" - function.prototype.name "^1.1.2" - has "^1.0.3" - html-element-map "^1.2.0" - is-boolean-object "^1.0.1" - is-callable "^1.1.5" - is-number-object "^1.0.4" - is-regex "^1.0.5" - is-string "^1.0.5" - is-subset "^0.1.1" - lodash.escape "^4.0.1" - lodash.isequal "^4.5.0" - object-inspect "^1.7.0" - object-is "^1.0.2" - object.assign "^4.1.0" - object.entries "^1.1.1" - object.values "^1.1.1" - raf "^3.4.1" - rst-selector-parser "^2.2.3" - string.prototype.trim "^1.2.1" - err-code@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" @@ -5724,6 +5650,21 @@ es-get-iterator@^1.0.2: is-string "^1.0.5" isarray "^2.0.5" +es-get-iterator@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" + integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + has-symbols "^1.0.3" + is-arguments "^1.1.1" + is-map "^2.0.2" + is-set "^2.0.2" + is-string "^1.0.7" + isarray "^2.0.5" + stop-iteration-iterator "^1.0.0" + es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" @@ -6539,6 +6480,13 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -6712,7 +6660,7 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -function.prototype.name@^1.1.0, function.prototype.name@^1.1.2, function.prototype.name@^1.1.5: +function.prototype.name@^1.1.0, function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== @@ -6722,7 +6670,7 @@ function.prototype.name@^1.1.0, function.prototype.name@^1.1.2, function.prototy es-abstract "^1.19.0" functions-have-names "^1.2.2" -functions-have-names@^1.2.2: +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -6789,6 +6737,15 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" @@ -6965,6 +6922,13 @@ gonzales-pe-sl@^4.2.3: dependencies: minimist "1.1.x" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -7257,14 +7221,6 @@ hosted-git-info@^5.0.0, hosted-git-info@^5.2.1: dependencies: lru-cache "^7.5.1" -html-element-map@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/html-element-map/-/html-element-map-1.3.1.tgz#44b2cbcfa7be7aa4ff59779e47e51012e1c73c08" - integrity sha512-6XMlxrAFX4UEEGxctfFnmrFaaZFNf9i5fNuV5wZ3WWQ4FVaNP1aX1LkX9j2mfEx1NpjeE/rL3nmgEn23GdFmrg== - dependencies: - array.prototype.filter "^1.0.0" - call-bind "^1.0.2" - html-encoding-sniffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" @@ -7330,16 +7286,6 @@ htmlparser2@^6.1.0: domutils "^2.5.2" entities "^2.0.0" -htmlparser2@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.1.tgz#abaa985474fcefe269bc761a779b544d7196d010" - integrity sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - domutils "^3.0.1" - entities "^4.3.0" - http-cache-semantics@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" @@ -7578,6 +7524,15 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" +internal-slot@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" @@ -7630,7 +7585,7 @@ is-alphanumerical@^1.0.0: is-alphabetical "^1.0.0" is-decimal "^1.0.0" -is-arguments@^1.0.4, is-arguments@^1.1.0: +is-arguments@^1.0.4, is-arguments@^1.1.0, is-arguments@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -7638,6 +7593,15 @@ is-arguments@^1.0.4, is-arguments@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -7664,7 +7628,7 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-boolean-object@^1.0.1, is-boolean-object@^1.1.0: +is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== @@ -7682,7 +7646,7 @@ is-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== -is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.7: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -7715,7 +7679,7 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1: +is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -7831,7 +7795,7 @@ is-lambda@^1.0.1: resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== -is-map@^2.0.2: +is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== @@ -7913,7 +7877,7 @@ is-property@^1.0.0, is-property@^1.0.2: resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" integrity sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g== -is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.0, is-regex@^1.1.2, is-regex@^1.1.4: +is-regex@^1.0.4, is-regex@^1.1.2, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== @@ -7926,7 +7890,7 @@ is-resolvable@^1.0.0: resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== -is-set@^2.0.2: +is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== @@ -7950,11 +7914,6 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-subset@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" - integrity sha512-6Ybun0IkarhmEqxXCNw/C0bna6Zb/TkfUX9UbwJtK6ObwAVCxmAP308WWTHviM/zAqXk05cdhYsUsZeGQh99iw== - is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" @@ -7962,11 +7921,27 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-typed-array@^1.1.10: + version "1.1.10" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" + integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== +is-weakmap@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" + integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== + is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -7974,6 +7949,14 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" +is-weakset@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" + integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz#0858edd94a95594c7c9dd0b5c174ec6e45ee4aa7" @@ -9008,21 +8991,11 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== -lodash.escape@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" - integrity sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw== - lodash.flatten@^4.2.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha512-C5N2Z3DgnnKr0LOpv/hKCgKdb7ZZwafIrsesve6lmzvZIRZRGaZ/l6Q8+2W7NaT+ZwO3fFlSCzCzrDCFdJfZ4g== -lodash.flattendeep@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" - integrity sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ== - lodash.forown@^4.1.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.forown/-/lodash.forown-4.4.0.tgz#85115cf04f73ef966eced52511d3893cc46683af" @@ -9043,7 +9016,7 @@ lodash.includes@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== -lodash.isequal@^4.2.0, lodash.isequal@^4.5.0: +lodash.isequal@^4.2.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== @@ -9144,6 +9117,11 @@ lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.14.1.tgz#8da8d2f5f59827edb388e63e459ac23d6d408fea" integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA== +lz-string@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" + integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== + make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -9603,11 +9581,6 @@ moment@^2.29.4: resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== -moo@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/moo/-/moo-0.5.2.tgz#f9fe82473bc7c184b0d32e2215d3f6e67278733c" - integrity sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q== - move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -9687,16 +9660,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -nearley@^2.7.10: - version "2.20.1" - resolved "https://registry.yarnpkg.com/nearley/-/nearley-2.20.1.tgz#246cd33eff0d012faf197ff6774d7ac78acdd474" - integrity sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ== - dependencies: - commander "^2.19.0" - moo "^0.5.0" - railroad-diagrams "^1.0.0" - randexp "0.4.6" - negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" @@ -10074,12 +10037,12 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.2, object-inspect@^1.7.0, object-inspect@^1.9.0: +object-inspect@^1.12.2, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== -object-is@^1.0.1, object-is@^1.0.2, object-is@^1.1.2, object-is@^1.1.5: +object-is@^1.0.1, object-is@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== @@ -10099,7 +10062,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.3, object.assign@^4.1.4: +object.assign@^4.1.2, object.assign@^4.1.3, object.assign@^4.1.4: version "4.1.4" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== @@ -10109,7 +10072,7 @@ object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.3, object.assign@ has-symbols "^1.0.3" object-keys "^1.1.1" -object.entries@^1.1.0, object.entries@^1.1.1, object.entries@^1.1.2, object.entries@^1.1.5: +object.entries@^1.1.0, object.entries@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.6.tgz#9737d0e5b8291edd340a3e3264bb8a3b00d5fa23" integrity sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w== @@ -10152,7 +10115,7 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -object.values@^1.1.0, object.values@^1.1.1, object.values@^1.1.5: +object.values@^1.1.0, object.values@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" integrity sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw== @@ -10458,14 +10421,6 @@ parse-json@^5.0.0, parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - parse5@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" @@ -10587,11 +10542,6 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - picocolors@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-0.2.1.tgz#570670f793646851d1ba135996962abad587859f" @@ -10845,6 +10795,15 @@ pretty-error@^2.1.1: lodash "^4.17.20" renderkid "^2.0.4" +pretty-format@^27.0.2: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + pretty-format@^29.2.1: version "29.2.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.2.1.tgz#86e7748fe8bbc96a6a4e04fa99172630907a9611" @@ -10947,15 +10906,6 @@ promzard@^0.3.0: dependencies: read "1" -prop-types-exact@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/prop-types-exact/-/prop-types-exact-1.2.0.tgz#825d6be46094663848237e3925a98c6e944e9869" - integrity sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA== - dependencies: - has "^1.0.3" - object.assign "^4.1.0" - reflect.ownkeys "^0.2.0" - prop-types@^15.0.0, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -11079,31 +11029,11 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -raf@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" - integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== - dependencies: - performance-now "^2.1.0" - -railroad-diagrams@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" - integrity sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A== - ramda@^0.28.0: version "0.28.0" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.28.0.tgz#acd785690100337e8b063cab3470019be427cc97" integrity sha512-9QnLuG/kPVgWvMQ4aODhsBUFKOUmnbUnsSXACv+NCQZcHbeb+v8Lodp8OVxtRULN1/xOyYLLaL6npE6dMq5QTA== -randexp@0.4.6: - version "0.4.6" - resolved "https://registry.yarnpkg.com/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" - integrity sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ== - dependencies: - discontinuous-range "1.0.0" - ret "~0.1.10" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -11142,15 +11072,6 @@ raw-loader@^4.0.2: loader-utils "^2.0.0" schema-utils "^3.0.0" -"react-16@npm:react@^16.14.0": - version "16.14.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d" - integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - react-docgen-typescript@^2.1.1: version "2.2.2" resolved "https://registry.yarnpkg.com/react-docgen-typescript/-/react-docgen-typescript-2.2.2.tgz#4611055e569edc071204aadb20e1c93e1ab1659c" @@ -11172,16 +11093,6 @@ react-docgen@^5.0.0: node-dir "^0.1.10" strip-indent "^3.0.0" -"react-dom-16@npm:react-dom@^16.14.0": - version "16.14.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.14.0.tgz#7ad838ec29a777fb3c75c3a190f661cf92ab8b89" - integrity sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.19.1" - react-dom@^18.2.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" @@ -11208,12 +11119,12 @@ react-inspector@^5.1.0: is-dom "^1.0.0" prop-types "^15.0.0" -react-is@17.0.2: +react-is@17.0.2, react-is@^17.0.1: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== -react-is@^16.13.1, react-is@^16.7.0, react-is@^16.8.6: +react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== @@ -11270,16 +11181,6 @@ react-router@^6.4.3: dependencies: "@remix-run/router" "1.0.3" -react-test-renderer@^16.0.0-0: - version "16.14.0" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.14.0.tgz#e98360087348e260c56d4fe2315e970480c228ae" - integrity sha512-L8yPjqPE5CZO6rKsKXRO/rVPiaCOy0tQQJbC+UjPNlobl5mad59lvPjwFsQHTvL03caVDIVr9x9/OSgDe6I5Eg== - dependencies: - object-assign "^4.1.1" - prop-types "^15.6.2" - react-is "^16.8.6" - scheduler "^0.19.1" - react-transition-group@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-3.0.0.tgz#36efa4db970d5eec5e3028e0c458931163fa3b9b" @@ -11453,11 +11354,6 @@ redux@^4.2.0: dependencies: "@babel/runtime" "^7.9.2" -reflect.ownkeys@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz#749aceec7f3fdf8b63f927a04809e90c5c0b3460" - integrity sha512-qOLsBKHCpSOFKK1NUOCGC5VyeufB6lEsFe92AL2bhIJsacZS1qdoOZSbPk3MYKuT2cFlRDnulKXuuElIrMjGUg== - regenerate-unicode-properties@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" @@ -11504,6 +11400,15 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexp.prototype.flags@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" + integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + functions-have-names "^1.2.3" + regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -11770,14 +11675,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rst-selector-parser@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" - integrity sha512-nDG1rZeP6oFTLN6yNDV/uiAvs1+FS/KlrEwh7+y7dpuApDBy6bI2HTBcc0/V8lv9OTqfyD34eF7au2pm8aBbhA== - dependencies: - lodash.flattendeep "^4.4.0" - nearley "^2.7.10" - run-async@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" @@ -11884,14 +11781,6 @@ saxes@^6.0.0: dependencies: xmlchars "^2.2.0" -scheduler@^0.19.1: - version "0.19.1" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" - integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.23.0: version "0.23.0" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" @@ -11945,7 +11834,7 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" -"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -12331,6 +12220,13 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +stop-iteration-iterator@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" + integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== + dependencies: + internal-slot "^1.0.4" + store2@^2.12.0: version "2.14.2" resolved "https://registry.yarnpkg.com/store2/-/store2-2.14.2.tgz#56138d200f9fe5f582ad63bc2704dbc0e4a45068" @@ -12434,15 +12330,6 @@ string.prototype.padstart@^3.0.0: define-properties "^1.1.4" es-abstract "^1.20.4" -string.prototype.trim@^1.2.1: - version "1.2.7" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz#a68352740859f6893f14ce3ef1bb3037f7a90533" - integrity sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - es-abstract "^1.20.4" - string.prototype.trimend@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz#c4a27fa026d979d79c04f17397f250a462944533" @@ -13622,11 +13509,33 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-collection@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" + integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== + dependencies: + is-map "^2.0.1" + is-set "^2.0.1" + is-weakmap "^2.0.1" + is-weakset "^2.0.1" + which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== +which-typed-array@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" + integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.10" + which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"