From cfd9ef8aad9f86bc2a9b6d0ed9952ba995749348 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 24 May 2021 16:56:32 +1200 Subject: [PATCH 1/3] NEW GraphQL 3.5.0 compat Changed field names to lowercase for forwards compat with GraphQL v4 --- .../components/HistoryViewer/HistoryViewer.js | 38 ++++++------- .../HistoryViewer/HistoryViewerSnapshot.js | 8 +-- .../HistoryViewer/HistoryViewerVersion.js | 2 +- .../HistoryViewerVersionDetail.js | 14 ++--- .../HistoryViewer/HistoryViewerVersionList.js | 6 +-- .../HistoryViewer/tests/HistoryViewer-test.js | 52 +++++++++--------- .../tests/HistoryViewerToolbar-test.js | 1 + .../tests/HistoryViewerVersion-test.js | 10 ++-- .../tests/HistoryViewerVersionState-test.js | 6 +-- client/src/graphql/createRollbackMutation.js | 8 +-- client/src/graphql/createSnapshotsQuery.js | 54 +++++++++---------- client/src/helpers/getDateFromVersion.js | 2 +- client/src/types/versionType.js | 48 ++++++++--------- src/DataObjectScaffolderExtension.php | 22 ++++---- src/SnapshotScaffoldingProvider.php | 10 ++-- 15 files changed, 141 insertions(+), 140 deletions(-) diff --git a/client/src/components/HistoryViewer/HistoryViewer.js b/client/src/components/HistoryViewer/HistoryViewer.js index e13eb87..742f3b9 100644 --- a/client/src/components/HistoryViewer/HistoryViewer.js +++ b/client/src/components/HistoryViewer/HistoryViewer.js @@ -75,23 +75,23 @@ class HistoryViewer extends Component { */ getVersions() { const { versions } = this.props; - const edges = (versions && versions.SnapshotHistory && versions.SnapshotHistory.edges) - ? versions.SnapshotHistory.edges + const edges = (versions && versions.snapshotHistory && versions.snapshotHistory.edges) + ? versions.snapshotHistory.edges : []; return edges.map(({ node }) => { return { ...node, - ...node.OriginVersion, + ...node.originVersion, // Snapshots author is authoritative - Author: { - ...node.Author + author: { + ...node.author }, - AbsoluteLink: (node.IsFullVersion && node.OriginVersion) - ? node.OriginVersion.AbsoluteLink - : versions.AbsoluteLink, - Version: node.IsFullVersion && node.OriginVersion - ? node.OriginVersion.Version - : node.BaseVersion, + absoluteLink: (node.isFullVersion && node.originVersion) + ? node.originVersion.absoluteLink + : versions.absoluteLink, + version: node.isFullVersion && node.originVersion + ? node.originVersion.version + : node.baseVersion, } }); } @@ -120,13 +120,13 @@ class HistoryViewer extends Component { const { currentVersion } = this.props; // Check whether the "current version" (in the store) is the latest draft - if (currentVersion && currentVersion.LatestDraftVersion === true) { + if (currentVersion && currentVersion.latestDraftVersion === true) { return currentVersion; } // Look for one in the list of available versions const latestDraftVersion = this.getVersions() - .filter(version => version.LatestDraftVersion === true); + .filter(version => version.latestDraftVersion === true); if (latestDraftVersion.length) { return latestDraftVersion[0]; @@ -236,13 +236,13 @@ class HistoryViewer extends Component { // Currently previewMode === MODE_VERSION is disabled as it displays incorrect relations. - schemaVersionReplacements[':date'] = currentVersion.LastEdited; + schemaVersionReplacements[':date'] = currentVersion.lastEdited; const schemaCompareReplacements = { ':id': recordId, ':class': recordClass, - ':from': versionFrom.Version || 0, - ':to': versionTo.Version || 0, + ':from': versionFrom.version || 0, + ':to': versionTo.version || 0, }; const schemaSearch = compare ? /:id|:class|:from|:to/g : /:id|:class|:version|:date/g; const schemaReplacements = compare ? schemaCompareReplacements : schemaVersionReplacements; @@ -251,7 +251,7 @@ class HistoryViewer extends Component { const latestVersion = this.getLatestVersion(); const props = { // comparison shows two versions as one, so by nature cannot be a single 'latest' version. - isLatestVersion: !compare && latestVersion && latestVersion.Version === version.Version, + isLatestVersion: !compare && latestVersion && latestVersion.version === version.version, isPreviewable, recordId, typeName, @@ -419,7 +419,7 @@ HistoryViewer.propTypes = { VersionDetailComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired, CompareWarningComponent: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired, versions: PropTypes.shape({ - Versions: PropTypes.shape({ + versions: PropTypes.shape({ pageInfo: PropTypes.shape({ totalCount: PropTypes.number, }), @@ -448,7 +448,7 @@ HistoryViewer.defaultProps = { typeName: '', schemaUrl: '', versions: { - Versions: { + versions: { pageInfo: { totalCount: 0, }, diff --git a/client/src/components/HistoryViewer/HistoryViewerSnapshot.js b/client/src/components/HistoryViewer/HistoryViewerSnapshot.js index 4be74a1..392afd7 100644 --- a/client/src/components/HistoryViewer/HistoryViewerSnapshot.js +++ b/client/src/components/HistoryViewer/HistoryViewerSnapshot.js @@ -58,8 +58,8 @@ class HistoryViewerSnapshot extends Component { render() { const { version, StateComponent, FormActionComponent, isComparing, isActive } = this.props; - const { Author: { FirstName, Surname } } = version; - const author = `${FirstName || ''} ${Surname || ''}`; + const { Author: { firstName, surname } } = version; + const author = `${firstName || ''} ${surname || ''}`; const rowTitle = i18n._t('HistoryViewerSnapshot.GO_TO_SNAPSHOT', 'Go to snapshot at {date}'); return ( @@ -67,7 +67,7 @@ class HistoryViewerSnapshot extends Component { ); @@ -138,13 +138,13 @@ class HistoryViewerVersionDetail extends PureComponent { return ( ); @@ -198,7 +198,7 @@ class HistoryViewerVersionDetail extends PureComponent {
@@ -261,5 +261,5 @@ export default inject( PreviewComponent, CompareWarningComponent, }), - ({ version }, context) => `${context}.HistoryViewerVersionDetail.${version.Version}` + ({ version }, context) => `${context}.HistoryViewerVersionDetail.${version.version}` )(HistoryViewerVersionDetail); diff --git a/client/src/components/HistoryViewer/HistoryViewerVersionList.js b/client/src/components/HistoryViewer/HistoryViewerVersionList.js index 7599a2e..2571dcf 100644 --- a/client/src/components/HistoryViewer/HistoryViewerVersionList.js +++ b/client/src/components/HistoryViewer/HistoryViewerVersionList.js @@ -111,9 +111,9 @@ class HistoryViewerVersionList extends PureComponent { {this.renderHeader()} { versions.map((version, index) => ( - version.IsFullVersion ? + version.isFullVersion ? : { }); const versions = { - SnapshotHistory: { + snapshotHistory: { pageInfo: { totalCount: 2 }, edges: [ { node: { - BaseVersion: 14, - Author: { - FirstName: 'Michelle', - Surname: 'Masters' + baseVersion: 14, + author: { + firstName: 'Michelle', + surname: 'Masters' }, - Publisher: null, - Published: false, - LatestDraftVersion: false, - LiveVersion: false, - LastEdited: '2018-03-08 11:57:58', - IsFullVersion: false, + publisher: null, + published: false, + latestDraftVersion: false, + liveVersion: false, + lastEdited: '2018-03-08 11:57:58', + isFullVersion: false, } }, { node: { - BaseVersion: 13, - Author: { - FirstName: 'Scott', - Surname: 'Stockman' + baseVersion: 13, + author: { + firstName: 'Scott', + surname: 'Stockman' }, - Publisher: null, - Published: false, - LatestDraftVersion: true, - LiveVersion: false, - LastEdited: '2018-03-08 11:57:56', - IsFullVersion: false, + publisher: null, + published: false, + latestDraftVersion: true, + liveVersion: false, + lastEdited: '2018-03-08 11:57:56', + isFullVersion: false, } }, ], @@ -74,7 +74,7 @@ describe('HistoryViewer', () => { compare={false} />); - expect(wrapper.instance().getVersions().map((version) => version.Version)).toEqual([14, 13]); + expect(wrapper.instance().getVersions().map((version) => version.version)).toEqual([14, 13]); }); }); @@ -91,7 +91,7 @@ describe('HistoryViewer', () => { compare={false} />); - expect(wrapper.instance().getLatestVersion().Version).toEqual(13); + expect(wrapper.instance().getLatestVersion().version).toEqual(13); }); it('gives priority to the currentVersion', () => { @@ -105,12 +105,12 @@ describe('HistoryViewer', () => { page={1} compare={false} currentVersion={{ - Version: 123, - LatestDraftVersion: true + version: 123, + latestDraftVersion: true }} />); - expect(wrapper.instance().getLatestVersion().Version).toEqual(123); + expect(wrapper.instance().getLatestVersion().version).toEqual(123); }); }); diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js index df489d8..1b82a09 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerToolbar-test.js @@ -25,6 +25,7 @@ describe('HistoryViewerToolbar', () => { ViewModeComponent={ViewModeComponent} recordId={123} versionId={234} + typeName="MockType" />); return component.handleRevert() diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js index 8623c41..5aa638f 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerVersion-test.js @@ -24,13 +24,13 @@ describe('HistoryViewerVersion', () => { version = { Author: { - FirstName: 'John', - Surname: 'Smith', + firstName: 'John', + surname: 'Smith', }, Published: false, - Publisher: { - FirstName: 'Sarah', - Surname: 'Smith', + publisher: { + firstName: 'Sarah', + surname: 'Smith', }, Version: 3, }; diff --git a/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js b/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js index fae1387..96f1bfe 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewerVersionState-test.js @@ -21,7 +21,7 @@ describe('HistoryViewerVersionState', () => { describe('getPublishedState', () => { it('returns the correct state', () => { const mockVersion = { - Published: true + published: true }; component = ReactTestUtils @@ -41,7 +41,7 @@ describe('HistoryViewerVersionState', () => { describe('getDate', () => { it('returns a formatted date', () => { const mockVersion = { - LastEdited: '2018-05-03 17:12:00' + lastEdited: '2018-05-03 17:12:00' }; component = ReactTestUtils .renderIntoDocument(); @@ -54,7 +54,7 @@ describe('HistoryViewerVersionState', () => { describe('getBadges', () => { it('returns a Badge when the version is live', () => { const mockVersion = { - LiveVersion: true + liveVersion: true }; component = ReactTestUtils .renderIntoDocument(); diff --git a/client/src/graphql/createRollbackMutation.js b/client/src/graphql/createRollbackMutation.js index 3369051..76bf6ff 100644 --- a/client/src/graphql/createRollbackMutation.js +++ b/client/src/graphql/createRollbackMutation.js @@ -5,11 +5,11 @@ const createRollbakMutation = typeName => { return gql` mutation rollback${typeName}($id:ID!, $toVersion:Int!) { rollback${typeName}( - ID: $id - ToVersion: $toVersion + id: $id + toVersion: $toVersion ) { - ID - ClassName + id + className } } `; diff --git a/client/src/graphql/createSnapshotsQuery.js b/client/src/graphql/createSnapshotsQuery.js index cbff99a..c1dce6d 100644 --- a/client/src/graphql/createSnapshotsQuery.js +++ b/client/src/graphql/createSnapshotsQuery.js @@ -4,43 +4,43 @@ const createSnapshotsQuery = (typeName, isPreviewable) => { return gql` query ReadSnapshots${typeName} ($page_id: ID!, $limit: Int!, $offset: Int!) { readOne${typeName}( - ID: $page_id + id: $page_id ) { - ID - ${isPreviewable ? 'AbsoluteLink' : ''} - SnapshotHistory (limit: $limit, offset: $offset) { + id + ${isPreviewable ? 'absoluteLink' : ''} + snapshotHistory (limit: $limit, offset: $offset) { pageInfo { totalCount } edges { node { - ID - LastEdited - ActivityDescription - ActivityType - ActivityAgo - IsFullVersion - IsLiveSnapshot - BaseVersion - Message - Author { - FirstName - Surname + id + lastEdited + activityDescription + activityType + activityAgo + isFullVersion + isLiveSnapshot + baseVersion + message + author { + firstName + surname } - OriginVersion { - Version - ${isPreviewable ? 'AbsoluteLink' : ''} - Author { - FirstName - Surname + originVersion { + version + ${isPreviewable ? 'absoluteLink' : ''} + author { + firstName + surname } - Published - Publisher { - FirstName - Surname + published + publisher { + firstName + surname } - LatestDraftVersion + latestDraftVersion } } } diff --git a/client/src/helpers/getDateFromVersion.js b/client/src/helpers/getDateFromVersion.js index 45481d6..675d715 100644 --- a/client/src/helpers/getDateFromVersion.js +++ b/client/src/helpers/getDateFromVersion.js @@ -9,7 +9,7 @@ import moment from 'moment'; */ const getDateFromVersion = version => { moment.locale(i18n.detectLocale()); - return moment(version.LastEdited).format('L LT'); + return moment(version.lastEdited).format('L LT'); }; export default getDateFromVersion; diff --git a/client/src/types/versionType.js b/client/src/types/versionType.js index da1b473..8803be0 100644 --- a/client/src/types/versionType.js +++ b/client/src/types/versionType.js @@ -2,39 +2,39 @@ import PropTypes from 'prop-types'; // Describes the expected data structure for a member attached to a version const memberShape = PropTypes.shape({ - FirstName: PropTypes.string, - Surname: PropTypes.string, + firstName: PropTypes.string, + surname: PropTypes.string, }); // Describes the data structure for a Version, returned via GraphQL scaffolding const versionType = PropTypes.shape({ - Version: PropTypes.number, - AbsoluteLink: PropTypes.string, - LastEdited: PropTypes.string, - Published: PropTypes.boolean, - LiveVersion: PropTypes.boolean, - LatestDraftVersion: PropTypes.boolean, - Message: PropTypes.string, - Publisher: memberShape, - Author: memberShape, + version: PropTypes.number, + absoluteLink: PropTypes.string, + lastEdited: PropTypes.string, + published: PropTypes.boolean, + liveVersion: PropTypes.boolean, + latestDraftVersion: PropTypes.boolean, + message: PropTypes.string, + publisher: memberShape, + author: memberShape, }); // A default (empty) data set for a version const defaultVersion = { - Version: 0, - AbsoluteLink: '', - LastEdited: '', - Published: false, - LiveVersion: false, - LatestDraftVersion: false, - Message: '', - Publisher: { - FirstName: '', - Surname: '', + version: 0, + absoluteLink: '', + lastEdited: '', + published: false, + liveVersion: false, + latestDraftVersion: false, + message: '', + publisher: { + firstName: '', + surname: '', }, - Author: { - FirstName: '', - Surname: '', + author: { + firstName: '', + surname: '', }, }; diff --git a/src/DataObjectScaffolderExtension.php b/src/DataObjectScaffolderExtension.php index e35c5a7..1778332 100644 --- a/src/DataObjectScaffolderExtension.php +++ b/src/DataObjectScaffolderExtension.php @@ -42,17 +42,17 @@ public function onBeforeAddToManager(Manager $manager) 'name' => $snapshotName, 'fields' => function () use ($manager, $versionTypeName, $memberType) { return [ - 'ID' => Type::id(), - 'LastEdited' => Type::string(), - 'ActivityDescription' => Type::string(), - 'ActivityType' => $this->createActivityEnum(), - 'ActivityAgo' => Type::string(), - 'OriginVersion' => $manager->getType($versionTypeName), - 'Author' => $manager->getType($memberType), - 'IsFullVersion' => Type::boolean(), - 'IsLiveSnapshot' => Type::boolean(), - 'BaseVersion' => Type::int(), - 'Message' => Type::string(), + 'id' => Type::id(), + 'lastEdited' => Type::string(), + 'activityDescription' => Type::string(), + 'activityType' => $this->createActivityEnum(), + 'activityAgo' => Type::string(), + 'originVersion' => $manager->getType($versionTypeName), + 'author' => $manager->getType($memberType), + 'isFullVersion' => Type::boolean(), + 'isLiveSnapshot' => Type::boolean(), + 'baseVersion' => Type::int(), + 'message' => Type::string(), ]; } ]); diff --git a/src/SnapshotScaffoldingProvider.php b/src/SnapshotScaffoldingProvider.php index f2fc724..02d897e 100644 --- a/src/SnapshotScaffoldingProvider.php +++ b/src/SnapshotScaffoldingProvider.php @@ -19,10 +19,10 @@ class SnapshotScaffoldingProvider implements ScaffoldingProvider public function provideGraphQLScaffolding(SchemaScaffolder $scaffolder) { $scaffolder->type(Member::class) - ->addFields(['FirstName','Surname']); + ->addFields(['firstName','surname']); if (class_exists(SiteTree::class)) { $scaffolder->type(SiteTree::class) - ->addField('ClassName'); + ->addField('className'); } foreach (ClassInfo::subclassesFor(DataObject::class, false) as $class) { /* @var DataObject|SnapshotHistoryExtension $inst */ @@ -34,9 +34,9 @@ public function provideGraphQLScaffolding(SchemaScaffolder $scaffolder) continue; } - $fields = ['ID', 'ClassName']; - if ($inst->hasMethod('AbsoluteLink')) { - $fields[] = 'AbsoluteLink'; + $fields = ['id', 'className']; + if ($inst->hasMethod('absoluteLink')) { + $fields[] = 'absoluteLink'; } $scaffolder->type($inst->baseClass()) ->addFields($fields) From 4982019c0c3bb7b7e67364c7e3dc440e6e0c8f9d Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 24 May 2021 18:56:50 +1200 Subject: [PATCH 2/3] NEW GraphQL v4 support --- client/dist/js/bundle.js | 8 +------- client/dist/styles/bundle.css | 3 +-- .../HistoryViewer/HistoryViewerSnapshot.js | 4 ++-- .../HistoryViewerSnapshotState.js | 8 ++++---- .../HistoryViewer/HistoryViewerVersion.js | 10 +++++----- .../HistoryViewerVersionState.js | 2 +- .../HistoryViewer/tests/HistoryViewer-test.js | 2 +- .../tests/HistoryViewerVersion-test.js | 20 +++++++++---------- .../historyviewer/HistoryViewerReducer.js | 4 ++-- .../tests/HistoryViewerReducer-test.js | 16 +++++++-------- composer.json | 1 + src/ReadSnapshotHistory.php | 2 +- 12 files changed, 37 insertions(+), 43 deletions(-) diff --git a/client/dist/js/bundle.js b/client/dist/js/bundle.js index fbba40f..6e3ab63 100644 --- a/client/dist/js/bundle.js +++ b/client/dist/js/bundle.js @@ -1,7 +1 @@ -!function(e){function t(n){if(o[n])return o[n].exports;var s=o[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=o("./client/src/boot/registerComponents.js"),r=n(s),a=o("./client/src/boot/registerReducers.js"),i=n(a);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)(),(0,i.default)()})},"./client/src/boot/registerComponents.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=o(2),r=n(s),a=o("./client/src/components/HistoryViewer/HistoryViewer.js"),i=n(a),l=o("./client/src/components/HistoryViewer/SnapshotViewerContainer.js"),u=n(l),d=o("./client/src/components/HistoryViewer/HistoryViewerHeading.js"),c=n(d),p=o("./client/src/components/HistoryViewer/HistoryViewerToolbar.js"),h=n(p),m=o("./client/src/components/HistoryViewer/HistoryViewerVersion.js"),f=n(m),_=o("./client/src/components/HistoryViewer/HistoryViewerVersionDetail.js"),g=n(_),v=o("./client/src/components/HistoryViewer/HistoryViewerVersionList.js"),y=n(v),j=o("./client/src/components/HistoryViewer/HistoryViewerVersionState.js"),b=n(j),C=o("./client/src/components/HistoryViewer/HistoryViewerSnapshotState.js"),w=n(C),S=o("./client/src/components/HistoryViewer/HistoryViewerSnapshot.js"),x=n(S),E=o("./client/src/components/HistoryViewer/HistoryViewerCompareWarning.js"),P=n(E),O=o("./client/src/components/HistoryViewer/RollbackMutation.js"),R=n(O);t.default=function(){r.default.component.register("SnapshotViewer",i.default),r.default.component.register("SnapshotViewerContainer",u.default),r.default.component.register("SnapshotHistoryViewer",i.default),r.default.component.register("SnapshotRollbackMutation",R.default),r.default.component.registerMany({SnapshotHistoryViewerHeading:c.default,SnapshotHistoryViewerToolbar:h.default,SnapshotHistoryViewerVersion:f.default,SnapshotHistoryViewerVersionDetail:g.default,SnapshotHistoryViewerVersionList:y.default,SnapshotHistoryViewerVersionState:b.default,SnapshotHistoryViewerSnapshotState:w.default,SnapshotHistoryViewerSnapshot:x.default,SnapshotHistoryViewerCompareWarning:P.default},{force:!0})}},"./client/src/boot/registerReducers.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=o(2),r=n(s),a=o(5),i=o("./client/src/state/historyviewer/HistoryViewerReducer.js"),l=n(i),u=function(){r.default.reducer.register("versionedAdmin",(0,a.combineReducers)({historyViewer:l.default}),{force:!0})};t.default=u},"./client/src/bundles/bundle.js":function(e,t,o){"use strict";o("./node_modules/expose-loader/index.js?SnapshotsViewer!./client/src/components/HistoryViewer/HistoryViewer.js-exposed"),o("./node_modules/expose-loader/index.js?versionType!./client/src/types/versionType.js-exposed"),o("./client/src/legacy/ArchiveAdmin/ArchiveAdmin.js"),o("./client/src/legacy/HistoryViewer/HistoryViewerEntwine.js"),o("./client/src/boot/index.js")},"./client/src/components/HistoryViewer/HistoryViewer.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){var t=e.versionedAdmin.historyViewer,o=t.currentPage,n=t.currentVersion,s=t.previewMode;return{page:o,currentVersion:n,compare:t.compare,previewMode:s,previewState:e.viewMode.activeState}}function l(e){return{onSelect:function(t){e((0,S.showVersion)(t)),e((0,S.clearMessages)())},onSetPage:function(t){e((0,S.setCurrentPage)(t))},onResize:function(t){e(V.enableOrDisableSplitMode(t))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.VERSION_MODE_DATE=t.VERSION_MODE_VERSION=void 0;var u=Object.assign||function(e){for(var t=1;t1}},{key:"renderVersionDetail",value:function(){var e=this,t=this.props,o=t.currentVersion,n=t.isPreviewable,s=t.recordId,r=t.recordClass,a=t.typeName,i=t.schemaUrl,l=t.VersionDetailComponent,u=t.compare,d=t.compare,c=d.versionFrom,h=void 0!==c&&c,m=d.versionTo,f=void 0!==m&&m,_=t.previewState,g={":id":s,":class":r,":date":"",":version":""};g[":date"]=o.LastEdited;var v={":id":s,":class":r,":from":h.Version||0,":to":f.Version||0},y=u?/:id|:class|:from|:to/g:/:id|:class|:version|:date/g,j=u?v:g,b=u?h:o,C=this.getLatestVersion(),w={isLatestVersion:!u&&C&&C.Version===b.Version,isPreviewable:n,recordId:s,typeName:a,schemaUrl:i.replace(y,function(e){return j[e]}),version:b,compare:u,compareModeAvailable:this.compareModeAvailable(),previewState:_};return p.default.createElement(M.default,{className:this.getContainerClasses(),onResize:function(t){var o=t.width;return e.props.onResize(o)}},p.default.createElement(l,w))}},{key:"renderPagination",value:function(){var e=this.props,t=e.limit,o=e.page,n=e.versions;if(!n)return null;var s=n.SnapshotHistory?n.SnapshotHistory.pageInfo.totalCount:0;if(s<=t)return null;var r={setPage:this.handleSetPage,maxPage:Math.ceil(s/t),next:this.handleNextPage,nextText:j.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:j.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:o-1,useGriddleStyles:!1};return p.default.createElement("div",{className:"griddle-footer"},p.default.createElement(_.default.GridPagination,r))}},{key:"renderComparisonSelectionList",value:function(){var e=this.props,t=e.compare.versionFrom,o=e.ListComponent;if(!t)return null;var n=(0,O.default)("history-viewer__table","history-viewer__table--comparison-selected");return p.default.createElement(o,{versions:[t],extraClass:n})}},{key:"renderVersionList",value:function(){var e=this.props,t=e.isInGridField,o=e.ListComponent,n=e.CompareWarningComponent,s=e.compare,r=e.compare.versionFrom;return p.default.createElement("div",{className:this.getContainerClasses()},p.default.createElement(n,null),p.default.createElement("div",{className:t?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),p.default.createElement(o,{versions:this.getVersions(),showHeader:!s||s&&!r,compareModeAvailable:this.compareModeAvailable()}),p.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}},{key:"renderCompareMode",value:function(){var e=this.props.compare;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}},{key:"render",value:function(){var e=this.props,t=e.loading,o=e.compare,n=e.previewMode;return t?p.default.createElement(w.default,null):this.compareModeAvailable()&&o?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}]),t}(c.Component);k.propTypes={contextKey:N.default.string,limit:N.default.number,ListComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,offset:N.default.number,recordId:N.default.number.isRequired,recordClass:N.default.string.isRequired,typeName:N.default.string.isRequired,currentVersion:N.default.oneOfType([N.default.bool,x.versionType]),compare:E.compareType,isInGridField:N.default.bool,isPreviewable:N.default.bool,VersionDetailComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,CompareWarningComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,versions:N.default.shape({Versions:N.default.shape({pageInfo:N.default.shape({totalCount:N.default.number}),edges:N.default.arrayOf(N.default.shape({node:x.versionType}))})}),page:N.default.number,schemaUrl:N.default.string,previewState:N.default.oneOf(["edit","preview","split"]),actions:N.default.object,onSelect:N.default.func,onSetPage:N.default.func,onResize:N.default.func},k.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,typeName:"",schemaUrl:"",versions:{Versions:{pageInfo:{totalCount:0},edges:[]}}},t.Component=k,t.default=(0,h.compose)((0,m.connect)(i,l),v.default,(0,b.inject)(["SnapshotHistoryViewerVersionList","SnapshotHistoryViewerVersionDetail","SnapshotHistoryViewerCompareWarning"],function(e,t,o){return{ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:o}},function(e){return"VersionedAdmin.HistoryViewer."+e.contextKey}))(k)},"./client/src/components/HistoryViewer/HistoryViewerCompareWarning.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return{isCompare:!!e.versionedAdmin.historyViewer.compare}}function l(e){return{onDismissCompare:function(){e((0,g.setCompareMode)(!1))}}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var o=0;o1?s.map(function(e,t){return React.createElement("div",{key:t},e)}):n+" "+t}},{key:"getBadges",value:function(){return null}}]),t}(i.Component);t.Component=u,t.default=(0,l.inject)(["Badge"],function(e){return{BadgeComponent:e}})(u)},"./client/src/components/HistoryViewer/HistoryViewerToolbar.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return{onAfterRevert:function(t){e((0,v.addMessage)(_.default.sprintf(_.default._t("HistoryViewerToolbar.REVERTED_MESSAGE","Successfully reverted to version %s"),t))),e((0,v.showList)())}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var o=0;o0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".CMSPageHistoryViewerController div:not(.cms-content-tools) .cms-content-header"),o="history-viewer__toolbar--condensed";t&&this.isPreviewable()&&(e?t.classList.add(o):t.classList.remove(o))}},{key:"renderPreview",value:function(){var e=this.props,t=e.version,o=e.PreviewComponent,n=e.previewState;return this.isPreviewable()&&"edit"!==n?u.default.createElement("div",{className:"history-viewer-preview flexbox-area-grow"},u.default.createElement("div",{className:"history-viewer-preview__underlay"},u.default.createElement("div",{className:"history-viewer-preview__spinner"}),y.default._t("HistoryViewerVersionDetail.LOADING_PREVIEW","Generating preview...")),u.default.createElement(o,{className:"history-viewer-preview__frame flexbox-area-grow",itemLinks:{preview:{Stage:{href:t.AbsoluteLink+"&archiveDate="+t.LastEdited,type:"text/html"}}},itemId:t.Version})):null}},{key:"renderToolbar",value:function(){var e=this.props,t=e.ToolbarComponent,o=e.isLatestVersion,n=e.recordId,s=e.version,r=e.typeName;if(this.isCompareMode())return null;var a=y.default._t("HistoryViewerVersionDetail.CANNOT_ROLLBACK_SNAPSHOTS","You can only revert to base versions");return u.default.createElement(t,{identifier:"HistoryViewer.VersionDetail.Toolbar",isLatestVersion:o,recordId:n,typeName:r,versionId:s.Version,isPreviewable:this.isPreviewable(),canRollback:s.IsFullVersion,rollbackMessage:a})}},{key:"renderDetails",value:function(){var e=this.props,t=e.compareModeAvailable,o=e.ListComponent,n=e.schemaUrl,s=e.CompareWarningComponent,r=e.previewState,a=e.version;if(this.isPreviewable()&&"preview"===r)return null;var i=["flexbox-area-grow","panel","panel--scrollable","panel--padded","panel--padded-side"],l={"history-viewer__table":!0,"history-viewer__table--current":!0,"history-viewer__table--compare":this.isCompareMode()},d={"history-viewer__version-detail":!0,"history-viewer__version-detail--compare":this.isCompareMode()};return u.default.createElement("div",{className:"flexbox-area-grow fill-height"},u.default.createElement("div",{className:(0,c.default)(i)},u.default.createElement(o,{extraClass:(0,c.default)(l),versions:this.getListVersions(),compareModeAvailable:t}),u.default.createElement("div",{className:(0,c.default)(d)},u.default.createElement(h.default,{identifier:"HistoryViewer.VersionDetail."+a.ID,schemaUrl:n,refetchSchemaOnMount:!1}))),this.renderToolbar(),u.default.createElement(s,{fixed:!0}))}},{key:"render",value:function(){return u.default.createElement("div",{className:"flexbox-area-grow fill-width"},this.renderDetails(),this.renderPreview())}}]),t}(l.PureComponent);j.propTypes={isLatestVersion:g.default.bool,isPreviewable:g.default.bool,ListComponent:g.default.oneOfType([g.default.node,g.default.func]).isRequired,PreviewComponent:g.default.oneOfType([g.default.node,g.default.func]),recordId:g.default.number.isRequired,typeName:g.default.string.isRequired,schemaUrl:g.default.string.isRequired,ToolbarComponent:g.default.oneOfType([g.default.node,g.default.func]).isRequired,version:f.versionType,compare:g.default.oneOfType([g.default.shape({versionFrom:f.versionType,versionTo:f.versionType}),g.default.bool]),previewState:g.default.oneOf(["edit","preview","split"])},j.defaultProps={isLatestVersion:!1,isPreviewable:!1,compare:!1},t.Component=j,t.default=(0,m.inject)(["SnapshotHistoryViewerVersionList","SnapshotHistoryViewerToolbar","Preview","SnapshotHistoryViewerCompareWarning"],function(e,t,o,n){return{ListComponent:e,ToolbarComponent:t,PreviewComponent:o,CompareWarningComponent:n}},function(e,t){return t+".HistoryViewerVersionDetail."+e.version.Version})(j)},"./client/src/components/HistoryViewer/HistoryViewerVersionList.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){var t=e.versionedAdmin.historyViewer;return{messages:t.messages,compare:t.compare,currentVersion:t.currentVersion}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:"success";return{type:m.default.ADD_MESSAGE,payload:{id:(0,_.default)(),message:e,type:t}}}function u(){return{type:m.default.CLEAR_MESSAGES}}function d(e){return{type:m.default.SET_COMPARE_MODE,payload:{enabled:e}}}function c(e){return{type:m.default.SET_COMPARE_FROM,payload:{version:e}}}function p(e){return{type:m.default.SET_COMPARE_TO,payload:{version:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.showVersion=s,t.showDate=r,t.showList=a,t.setCurrentPage=i,t.addMessage=l,t.clearMessages=u,t.setCompareMode=d,t.setCompareFrom=c,t.setCompareTo=p;var h=o("./client/src/state/historyviewer/HistoryViewerActionTypes.js"),m=n(h),f=o("./node_modules/uuid/v1.js"),_=n(f)},"./client/src/state/historyviewer/HistoryViewerReducer.js":function(e,t,o){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.type,s=t.payload;switch(o){case i.default.SET_CURRENT_PAGE:return r({},e,{currentPage:s.page});case i.default.SHOW_VERSION:var a=s.version;return r({},e,{previewMode:a&&u.VERSION_MODE_VERSION,currentVersion:a});case i.default.SHOW_DATE:var l=s.version;return r({},e,{previewMode:l&&u.VERSION_MODE_DATE,currentVersion:l});case i.default.SHOW_LIST:return r({},e,{currentVersion:!1,currentDate:!1,previewMode:!1,currentPage:0});case i.default.ADD_MESSAGE:return r({},e,{messages:[s].concat(n(e.messages))});case i.default.CLEAR_MESSAGES:return r({},e,{messages:[]});case i.default.SET_COMPARE_MODE:var c=r({versionFrom:!1,versionTo:!1},e.compare);return r({},e,{compare:!!s.enabled&&c,previewMode:!!s.enabled&&e.previewMode});case i.default.SET_COMPARE_FROM:var p=e.compare,h=p.versionFrom,m=p.versionTo;return h=s.version||!1,h||(h=m,m=!1),r({},e,{currentVersion:h,compare:{versionFrom:h,versionTo:m}});case i.default.SET_COMPARE_TO:var f=e.compare,_=f.versionFrom,g=f.versionTo;return g=s.version||!1,g&&_&&g.Version<_.Version&&(_=g,g=e.compare.versionFrom),r({},e,{currentVersion:_,compare:{versionFrom:_,versionTo:g}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1}},{key:"renderVersionDetail",value:function(){var e=this,t=this.props,o=t.currentVersion,n=t.isPreviewable,s=t.recordId,r=t.recordClass,a=t.typeName,i=t.schemaUrl,l=t.VersionDetailComponent,u=t.compare,d=t.compare,c=d.versionFrom,h=void 0!==c&&c,m=d.versionTo,f=void 0!==m&&m,_=t.previewState,g={":id":s,":class":r,":date":"",":version":""};g[":date"]=o.LastEdited;var v={":id":s,":class":r,":from":h.Version||0,":to":f.Version||0},y=u?/:id|:class|:from|:to/g:/:id|:class|:version|:date/g,j=u?v:g,b=u?h:o,C=this.getLatestVersion(),w={isLatestVersion:!u&&C&&C.Version===b.Version,isPreviewable:n,recordId:s,typeName:a,schemaUrl:i.replace(y,function(e){return j[e]}),version:b,compare:u,compareModeAvailable:this.compareModeAvailable(),previewState:_};return p.default.createElement(M.default,{className:this.getContainerClasses(),onResize:function(t){var o=t.width;return e.props.onResize(o)}},p.default.createElement(l,w))}},{key:"renderPagination",value:function(){var e=this.props,t=e.limit,o=e.page,n=e.versions;if(!n)return null;var s=n.SnapshotHistory?n.SnapshotHistory.pageInfo.totalCount:0;if(s<=t)return null;var r={setPage:this.handleSetPage,maxPage:Math.ceil(s/t),next:this.handleNextPage,nextText:j.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:j.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:o-1,useGriddleStyles:!1};return p.default.createElement("div",{className:"griddle-footer"},p.default.createElement(_.default.GridPagination,r))}},{key:"renderComparisonSelectionList",value:function(){var e=this.props,t=e.compare.versionFrom,o=e.ListComponent;if(!t)return null;var n=(0,O.default)("history-viewer__table","history-viewer__table--comparison-selected");return p.default.createElement(o,{versions:[t],extraClass:n})}},{key:"renderVersionList",value:function(){var e=this.props,t=e.isInGridField,o=e.ListComponent,n=e.CompareWarningComponent,s=e.compare,r=e.compare.versionFrom;return p.default.createElement("div",{className:this.getContainerClasses()},p.default.createElement(n,null),p.default.createElement("div",{className:t?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),p.default.createElement(o,{versions:this.getVersions(),showHeader:!s||s&&!r,compareModeAvailable:this.compareModeAvailable()}),p.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}},{key:"renderCompareMode",value:function(){var e=this.props.compare;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}},{key:"render",value:function(){var e=this.props,t=e.loading,o=e.compare,n=e.previewMode;return t?p.default.createElement(w.default,null):this.compareModeAvailable()&&o?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}]),t}(c.Component);k.propTypes={contextKey:N.default.string,limit:N.default.number,ListComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,offset:N.default.number,recordId:N.default.number.isRequired,recordClass:N.default.string.isRequired,typeName:N.default.string.isRequired,currentVersion:N.default.oneOfType([N.default.bool,x.versionType]),compare:E.compareType,isInGridField:N.default.bool,isPreviewable:N.default.bool,VersionDetailComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,CompareWarningComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,versions:N.default.shape({Versions:N.default.shape({pageInfo:N.default.shape({totalCount:N.default.number}),edges:N.default.arrayOf(N.default.shape({node:x.versionType}))})}),page:N.default.number,schemaUrl:N.default.string,previewState:N.default.oneOf(["edit","preview","split"]),actions:N.default.object,onSelect:N.default.func,onSetPage:N.default.func,onResize:N.default.func},k.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,typeName:"",schemaUrl:"",versions:{Versions:{pageInfo:{totalCount:0},edges:[]}}},t.Component=k,t.default=(0,h.compose)((0,m.connect)(i,l),v.default,(0,b.inject)(["SnapshotHistoryViewerVersionList","SnapshotHistoryViewerVersionDetail","SnapshotHistoryViewerCompareWarning"],function(e,t,o){return{ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:o}},function(e){return"VersionedAdmin.HistoryViewer."+e.contextKey}))(k)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":true}!./client/src/types/versionType.js':function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultVersion=t.versionType=void 0;var n=o(1),s=function(e){return e&&e.__esModule?e:{default:e}}(n),r=s.default.shape({FirstName:s.default.string,Surname:s.default.string}),a=s.default.shape({Version:s.default.number,AbsoluteLink:s.default.string,LastEdited:s.default.string,Published:s.default.boolean,LiveVersion:s.default.boolean,LatestDraftVersion:s.default.boolean,Message:s.default.string,Publisher:r,Author:r}),i={Version:0,AbsoluteLink:"",LastEdited:"",Published:!1,LiveVersion:!1,LatestDraftVersion:!1,Message:"",Publisher:{FirstName:"",Surname:""},Author:{FirstName:"",Surname:""}};t.versionType=a,t.defaultVersion=i},"./node_modules/create-react-class/factory.js":function(e,t,o){"use strict";function n(e){return e}function s(e,t,o){function s(e,t,o){for(var n in t)t.hasOwnProperty(n)&&u("function"==typeof t[n],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",r[o],n)}function c(e,t){var o=b.hasOwnProperty(t)?b[t]:null;E.hasOwnProperty(t)&&l("OVERRIDE_BASE"===o,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&l("DEFINE_MANY"===o||"DEFINE_MANY_MERGED"===o,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function p(e,o){if(!o){var n=typeof o;return void u("object"===n&&null!==o,"%s: You're attempting to include a mixin that is either null or not an object. Check the mixins included by the component, as well as any mixins they include themselves. Expected object but got %s.",e.displayName||"ReactClass",null===o?null:n)}l("function"!=typeof o,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),l(!t(o),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var s=e.prototype,r=s.__reactAutoBindPairs;o.hasOwnProperty(d)&&w.mixins(e,o.mixins);for(var a in o)if(o.hasOwnProperty(a)&&a!==d){var i=o[a],p=s.hasOwnProperty(a);if(c(p,a),w.hasOwnProperty(a))w[a](e,i);else{var h=b.hasOwnProperty(a),m="function"==typeof i,g=m&&!h&&!p&&!1!==o.autobind;if(g)r.push(a,i),s[a]=i;else if(p){var v=b[a];l(h&&("DEFINE_MANY_MERGED"===v||"DEFINE_MANY"===v),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",v,a),"DEFINE_MANY_MERGED"===v?s[a]=f(s[a],i):"DEFINE_MANY"===v&&(s[a]=_(s[a],i))}else s[a]=i,"function"==typeof i&&o.displayName&&(s[a].displayName=o.displayName+"_"+a)}}}function h(e,t){if(t)for(var o in t){var n=t[o];if(t.hasOwnProperty(o)){var s=o in w;l(!s,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',o);var r=o in e;if(r){var a=C.hasOwnProperty(o)?C[o]:null;return l("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",o),void(e[o]=f(e[o],n))}e[o]=n}}}function m(e,t){l(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var o in t)t.hasOwnProperty(o)&&(l(void 0===e[o],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",o),e[o]=t[o]);return e}function f(e,t){return function(){var o=e.apply(this,arguments),n=t.apply(this,arguments);if(null==o)return n;if(null==n)return o;var s={};return m(s,o),m(s,n),s}}function _(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function g(e,t){var o=t.bind(e);o.__reactBoundContext=e,o.__reactBoundMethod=t,o.__reactBoundArguments=null;var n=e.constructor.displayName,s=o.bind;return o.bind=function(r){for(var a=arguments.length,i=Array(a>1?a-1:0),l=1;l1?t-1:0),n=1;n2?o-2:0),s=2;s0}},{key:"getMetadataColumnProperty",value:function(e,t,o){var n=this.getColumnMetadataByName(e);return void 0===n||null===n?o:n.hasOwnProperty(t)?n[t]:o}},{key:"orderColumns",value:function(e){var t=this;return l(e,function(e){var o=i(t.columnMetadata,{columnName:e});return void 0===o||null===o||isNaN(o.order)?100:o.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=d},"./node_modules/griddle-react/modules/customFilterContainer.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=s({getDefaultProps:function(){return{placeholderText:""}},render:function(){var e=this;return"function"!=typeof e.props.customFilterComponent?(console.log("Couldn't find valid template."),n.createElement("div",null)):n.createElement(e.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=r},"./node_modules/griddle-react/modules/customPaginationContainer.jsx.js":function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t0&&(e=n.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=n.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 o=null,s=null,a=null;if(!0===this.props.useGriddleStyles){var i={float:"left",minHeight:"1px",marginTop:"5px"};a=r({textAlign:"right",width:"34%"},i),s=r({textAlign:"center",width:"33%"},i),o=r({width:"33%"},i)}for(var l=[],u=1;u<=this.props.maxPage;u++)l.push(n.createElement("option",{value:u,key:u},u));return n.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},n.createElement("div",{className:this.props.previousClassName,style:o},e),n.createElement("div",{className:"griddle-page",style:s},n.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},l)," / ",this.props.maxPage),n.createElement("div",{className:this.props.nextClassName,style:a},t))}});e.exports=a},"./node_modules/griddle-react/modules/gridRow.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=(o("./node_modules/griddle-react/modules/columnProperties.js"),o("./node_modules/griddle-react/modules/deep.js")),a=o("./node_modules/lodash/isFunction.js"),i=o("./node_modules/lodash/zipObject.js"),l=o("./node_modules/lodash/assign.js"),u=o("./node_modules/lodash/defaults.js"),d=o("./node_modules/lodash/toPairs.js"),c=o("./node_modules/lodash/without.js"),p=s({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&&a(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&a(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&a(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&a(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&a(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,o=null;this.props.useGriddleStyles&&(o={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 s=this.props.columnSettings.getColumns(),p=i(s,[]),h=l({},this.props.data);u(h,p);var m,f,_=d(r.pick(h,c(s,"children"))),g=_.map(function(t,s){var r=null,a=e.props.columnSettings.getColumnMetadataByName(t[0]),i=0===s&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?n.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===s&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?n.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===s&&e.props.isChildRow&&e.props.useGriddleStyles&&(o=l(o,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&void 0!==a&&null!==a)if(void 0!==a.customComponent&&null!==a.customComponent){var u=n.createElement(a.customComponent,{data:t[1],rowData:h,metadata:a});r=n.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:a.cssClassName,key:s,style:o},u)}else r=n.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:a.cssClassName,key:s,style:o},i,e.formatData(t[1]));return r||n.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:s,style:o},i,t[1])});if(null!==this.props.onRowClick&&a(this.props.onRowClick)?(m=null,f=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(m=this.handleSelectClick,f=null):(m=null,f=null),g&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection){this.props.multipleSelectionSettings.getSelectedRowIds();g.unshift(n.createElement("td",{key:"selection",style:o,className:"griddle-select griddle-select-cell",onClick:f},n.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(h),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),n.createElement("tr",{onClick:m,className:v},g)}});e.exports=p},"./node_modules/griddle-react/modules/gridRowContainer.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=(o("./node_modules/griddle-react/modules/columnProperties.js"),o("./node_modules/lodash/pick.js")),a=s({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 n.createElement("tbody",null);var t=[],o=this.props.columnSettings.getColumns();t.push(n.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?r(this.props.data,o):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 s=null;return e.state.showChildren&&(s=e.props.hasChildren&&this.props.data.children.map(function(t,o){var s=e.props.rowSettings.getRowKey(t,o);if(void 0!==t.children){var r=e.constructor.Griddle;return n.createElement("tr",{key:s,style:{paddingLeft:5}},n.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},n.createElement(r,{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 n.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:s})})),!1===e.props.hasChildren?t[0]:n.createElement("tbody",null,e.state.showChildren?t.concat(s):t)}});e.exports=a},"./node_modules/griddle-react/modules/gridSettings.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=o("./node_modules/lodash/includes.js"),a=o("./node_modules/lodash/without.js"),i=o("./node_modules/lodash/find.js"),l=s({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===r(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(a(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map(function(t,o){var s=r(e.props.selectedColumns,t),a=i(e.props.columnMetadata,{columnName:t}),l=t;return void 0!==a&&void 0!==a.displayName&&null!=a.displayName&&(l=a.displayName),void 0!==a&&null!=a&&a.locked?n.createElement("div",{className:"column checkbox"},n.createElement("label",null,n.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:s,"data-name":t}),l)):void 0!==a&&null!=a&&void 0!==a.visible&&!1===a.visible?null:n.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},n.createElement("label",null,n.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:s,"data-name":t}),l))}));var o=e.props.enableToggleCustom?n.createElement("div",{className:"form-group"},n.createElement("label",{htmlFor:"maxRows"},n.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",s=this.props.showSetPageSize?n.createElement("div",null,n.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",n.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},n.createElement("option",{value:"5"},"5"),n.createElement("option",{value:"10"},"10"),n.createElement("option",{value:"25"},"25"),n.createElement("option",{value:"50"},"50"),n.createElement("option",{value:"100"},"100")))):"";return n.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},n.createElement("h6",null,this.props.settingsText),n.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),s,o)}});e.exports=l},"./node_modules/griddle-react/modules/gridTable.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=o("./node_modules/griddle-react/modules/gridTitle.jsx.js"),a=o("./node_modules/griddle-react/modules/gridRowContainer.jsx.js"),i=(o("./node_modules/griddle-react/modules/columnProperties.js"),o("./node_modules/griddle-react/modules/rowProperties.js"),s({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,o=e.scrollHeight,n=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var s={scrollTop:t,scrollHeight:o,clientHeight:n};this.setState(s)}.6*(o-(t+n)-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 o=e.props.data,s=null,r=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var i=e.getAdjustedRowHeight(),l=Math.ceil(e.state.clientHeight/i),u=Math.max(0,Math.floor(e.state.scrollTop/i)-.25*l),d=Math.min(u+1.25*l,this.props.data.length-1);o=o.slice(u,d+1);var c={height:u*i+"px"};s=n.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*i+"px"};r=n.createElement("tr",{key:"below-"+p.height,style:p})}var h=o.map(function(o,s){var r=void 0!==o.children&&o.children.length>0,i=e.props.rowSettings.getRowKey(o,s);return r&&(t=r),n.createElement(a,{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:o,key:i+"-container",uniqueId:i,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:r,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 m=this.props.columnSettings.getVisibleColumnCount();h.push(n.createElement("tr",{key:"no-data-section"},n.createElement("td",{colSpan:m},this.props.noDataSection)))}return s&&h.unshift(s),r&&h.push(r),{nodes:h,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,o=this.getNodeContent();o&&(e=o.nodes,t=o.anyHasChildren);var s=null,a=null,i={width:"100%"};if(this.props.useFixedLayout&&(i.tableLayout="fixed"),this.props.enableInfiniteScroll&&(s={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var l=null,u=null;this.props.useGriddleStyles&&(l={textAlign:"center",paddingBottom:"40px"}),u=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?n.createElement(this.props.externalLoadingComponent,null):n.createElement("div",null,"Loading...");a=n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",{style:l,colSpan:u},d)))}var c=this.props.showTableHeading?n.createElement(r,{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=n.createElement("tbody",null,e));var p=n.createElement("tbody",null);if(this.props.showPager){var h=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;p=n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:h,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(i.tableLayout="fixed"),n.createElement("div",null,n.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&i||null},c),n.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:s},n.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&i||null},e,a,p)))):n.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:s},n.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&i||null},c,e,a,p))}}));e.exports=i},"./node_modules/griddle-react/modules/gridTitle.jsx.js":function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t=0)return!0}return!1})},defaultColumnFilter:function(e,t,o){var n=V(P(o)?o:[o],function(e){return(e||"").toLowerCase()});return D(y.getObjectValues(t),function(e){return e=e.toString().toLowerCase(),D(n,function(t){return e.indexOf(t)>=0})})},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,o=Object.keys(e).reduce(function(o,n){return N(o,function(o){var s=y.getAt(o,n||""),r=e[n];return t(n||"",s,r)})},this.props.results),n={columnFilters:e};e?(n.filteredResults=o,n.maxPage=this.getMaxPage(n.filteredResults)):this.state.filter?n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):n.filteredResults=null,this.setState(n)},filterByColumn:function(e,t){var o=this.state.columnFilters;if(o.hasOwnProperty(t)&&!e)o=A(o,t);else{var n={};n[t]=e,o=T({},o,n)}this.filterByColumnFilters(o)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)return void this.props.externalSetFilter(e);var o=this,n={page:0,filter:e};n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),n.maxPage=o.getMaxPage(n.filteredResults),(M(e)||R(e)||O(e))&&(n.filter=e,n.filteredResults=null),o.setState(n),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 void 0===e||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)return void this.props.externalSetPage(e);if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t=this,o={page:e};t.setState(o)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})},setColumns:function(e){this.columnSettings.filteredColumns=P(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 o=C(this.props.columnMetadata,{columnName:e})||{},n=o.sortDirectionCycle?o.sortDirectionCycle:[null,"asc","desc"],s=null,r=n.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null);r=(r+1)%n.length,s=n[r]?n[r]:null;var a={page:0,sortColumn:e,sortDirection:s};this.setState(a)}},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=y.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every(function(e,o){return e===t[o]})||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var o=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,V(o,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 g(this.props.results.length>0?y.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new v(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:p,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,o){var n=this,s=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var r,a=this.state.sortColumn,i=N(this.props.columnMetadata,{columnName:a}),l={columns:[],orders:[]};if(i.length>0&&(r=i[0].hasOwnProperty("customCompareFn")&&i[0].customCompareFn,i[0].multiSort&&(l=i[0].multiSort)),this.state.sortDirection)if("function"==typeof r)2===r.length?(e=e.sort(function(e,t){return r(I(e,a),I(t,a))}),"desc"===this.state.sortDirection&&e.reverse()):1===r.length&&(e=k(e,function(e){return r(I(e,a))},[this.state.sortDirection]));else{var u=[function(e){return(I(e,a)||"").toString().toLowerCase()}],d=[this.state.sortDirection];l.columns.forEach(function(e,t){u.push(function(t){return(I(t,e)||"").toString().toLowerCase()}),"asc"===l.orders[t]||"desc"===l.orders[t]?d.push(l.orders[t]):d.push(n.state.sortDirection)}),e=k(e,u,d)}}var c=this.getCurrentPage();if(!this.props.useExternal&&o&&this.state.resultsPerPage*(c+1)<=this.state.resultsPerPage*this.state.maxPage&&c>=0)if(this.isInfiniteScrollEnabled())e=w(e,(c+1)*this.state.resultsPerPage);else{var p=j(e,c*this.state.resultsPerPage);e=(b||x)(p,p.length-this.state.resultsPerPage)}}for(var h=[],m=0;m0&&(f.children=s.getDataForRender(f[s.props.childrenColumnName],t,!1),"children"!==s.props.childrenColumnName&&delete f[s.props.childrenColumnName]),h.push(f)}return h},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,o=JSON.parse(JSON.stringify(this.state.selectedRowIds)),n=this;S(e,function(e){n._updateSelectedRowIds(e[n.props.uniqueIdentifier],o,t)},this),this.setState({isSelectAllChecked:t,selectedRowIds:o}),this.props.onSelectionChange&&this.props.onSelectionChange(o,t)},_toggleSelectRow:function(e,t){var o=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),n=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],n,t);var s=this._getAreAllRowsChecked(n,V(o,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:s,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,s)},_updateSelectedRowIds:function(e,t,o){o?void 0===C(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===E(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:!C(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?s.createElement(_,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):s.createElement(l,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?s.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 o=null,n=null,r=null;return this.props.useGriddleStyles&&(o=this.getFilterStyles(),n=this.getSettingsStyles(),r=this.getClearFixStyles()),s.createElement("div",{className:"top-section",style:r},s.createElement("div",{className:"griddle-filter",style:o},e),s.createElement("div",{className:"griddle-settings-toggle",style:n},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return s.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?s.createElement(f,{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}):s.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?s.createElement(d,{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 s.createElement(this.props.customGridComponent,n({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,o,n,r){return s.createElement("div",null,s.createElement(m,{data:e,columns:t,metadataColumns:o,globalData:r,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&n)},getStandardGridSection:function(e,t,o,n,r){var a=this.getSortObject(),l=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return s.createElement("div",{className:"griddle-body"},s.createElement(i,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:a,multipleSelectionSettings:l,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:n,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:r,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,o,n,s,r){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,o,n,r):this.getStandardGridSection(e,t,o,n,s)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?s.createElement("div",{className:this.props.noDataClassName},s.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):s.createElement(c,{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()),o=this.getSettings(),n=this.getTopSection(t,o),r=[],a=this.columnSettings.getColumns(),i=this.getDataForRender(e,a,!0),l=this.columnSettings.getMetadataColumns();this.props.columnMetadata?S(this.props.columnMetadata,function(e){"boolean"==typeof e.visible&&!1===e.visible||r.push(e.columnName)}):r=y.keys(A(e[0],l)),r=this.columnSettings.orderColumns(r);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return f+=this.shouldUseCustomRowComponent()?" griddle-custom":"",s.createElement("div",{className:f},n,m,s.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},h))}});h.Griddle=e.exports=H},"./node_modules/griddle-react/modules/rowProperties.js":function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var o=0;o-1}var s=o("./node_modules/lodash/_baseIndexOf.js");e.exports=n},"./node_modules/lodash/_arrayIncludesWith.js":function(e,t){function o(e,t,o){for(var n=-1,s=null==e?0:e.length;++n=d&&(p=u,h=!1,t=new s(t));e:for(;++c0&&o(d)?t>1?n(d,t-1,o,a,i):s(i,d):a||(i[i.length]=d)}return i}var s=o("./node_modules/lodash/_arrayPush.js"),r=o("./node_modules/lodash/_isFlattenable.js");e.exports=n},"./node_modules/lodash/_baseFor.js":function(e,t,o){var n=o("./node_modules/lodash/_createBaseFor.js"),s=n();e.exports=s},"./node_modules/lodash/_baseForOwn.js":function(e,t,o){function n(e,t){return e&&s(e,t,r)}var s=o("./node_modules/lodash/_baseFor.js"),r=o("./node_modules/lodash/keys.js");e.exports=n},"./node_modules/lodash/_baseGet.js":function(e,t,o){function n(e,t){t=s(t,e);for(var o=0,n=t.length;null!=e&&o=120&&g.length>=120)?new s(h&&g):void 0}g=e[0];var v=-1,y=m[0];e:for(;++vs?0:s+t),o=o>s?s:o,o<0&&(o+=s),s=t>o?0:o-t>>>0,t>>>=0;for(var r=Array(s);++nt||a&&i&&u&&!l&&!d||n&&i&&u||!o&&u||!r)return 1;if(!n&&!a&&!d&&e=l)return u;return u*("desc"==o[n]?-1:1)}}return e.index-t.index}var s=o("./node_modules/lodash/_compareAscending.js");e.exports=n},"./node_modules/lodash/_copyArray.js":function(e,t){function o(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o1?o[s-1]:void 0,i=s>2?o[2]:void 0;for(a=e.length>3&&"function"==typeof a?(s--,a):void 0,i&&r(o[0],o[1],i)&&(a=s<3?void 0:a,s=1),t=Object(t);++n-1?i[l?t[u]:u]:void 0}}var s=o("./node_modules/lodash/_baseIteratee.js"),r=o("./node_modules/lodash/isArrayLike.js"),a=o("./node_modules/lodash/keys.js");e.exports=n},"./node_modules/lodash/_createToPairs.js":function(e,t,o){function n(e){return function(t){var o=r(t);return o==l?a(t):o==u?i(t):s(t,e(t))}}var s=o("./node_modules/lodash/_baseToPairs.js"),r=o("./node_modules/lodash/_getTag.js"),a=o("./node_modules/lodash/_mapToArray.js"),i=o("./node_modules/lodash/_setToPairs.js"),l="[object Map]",u="[object Set]";e.exports=n},"./node_modules/lodash/_customOmitClone.js":function(e,t,o){function n(e){return s(e)?void 0:e}var s=o("./node_modules/lodash/isPlainObject.js");e.exports=n},"./node_modules/lodash/_defineProperty.js":function(e,t,o){var n=o("./node_modules/lodash/_getNative.js"),s=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=s},"./node_modules/lodash/_equalArrays.js":function(e,t,o){function n(e,t,o,n,u,d){var c=o&i,p=e.length,h=t.length;if(p!=h&&!(c&&h>p))return!1;var m=d.get(e);if(m&&d.get(t))return m==t;var f=-1,_=!0,g=o&l?new s:void 0;for(d.set(e,t),d.set(t,e);++f-1&&e%1==0&&e-1}var s=o("./node_modules/lodash/_assocIndexOf.js");e.exports=n},"./node_modules/lodash/_listCacheSet.js":function(e,t,o){function n(e,t){var o=this.__data__,n=s(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this}var s=o("./node_modules/lodash/_assocIndexOf.js");e.exports=n},"./node_modules/lodash/_mapCacheClear.js":function(e,t,o){function n(){this.size=0,this.__data__={hash:new s,map:new(a||r),string:new s}}var s=o("./node_modules/lodash/_Hash.js"),r=o("./node_modules/lodash/_ListCache.js"),a=o("./node_modules/lodash/_Map.js");e.exports=n},"./node_modules/lodash/_mapCacheDelete.js":function(e,t,o){function n(e){var t=s(this,e).delete(e);return this.size-=t?1:0,t}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapCacheGet.js":function(e,t,o){function n(e){return s(this,e).get(e)}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapCacheHas.js":function(e,t,o){function n(e){return s(this,e).has(e)}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapCacheSet.js":function(e,t,o){function n(e,t){var o=s(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapToArray.js":function(e,t){function o(e){var t=-1,o=Array(e.size);return e.forEach(function(e,n){o[++t]=[n,e]}),o}e.exports=o},"./node_modules/lodash/_matchesStrictComparable.js":function(e,t){function o(e,t){return function(o){return null!=o&&(o[e]===t&&(void 0!==t||e in Object(o)))}}e.exports=o},"./node_modules/lodash/_memoizeCapped.js":function(e,t,o){function n(e){var t=s(e,function(e){return o.size===r&&o.clear(),e}),o=t.cache;return t}var s=o("./node_modules/lodash/memoize.js"),r=500;e.exports=n},"./node_modules/lodash/_nativeCreate.js":function(e,t,o){var n=o("./node_modules/lodash/_getNative.js"),s=n(Object,"create");e.exports=s},"./node_modules/lodash/_nativeKeys.js":function(e,t,o){var n=o("./node_modules/lodash/_overArg.js"),s=n(Object.keys,Object);e.exports=s},"./node_modules/lodash/_nativeKeysIn.js":function(e,t){function o(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}e.exports=o},"./node_modules/lodash/_nodeUtil.js":function(e,t,o){(function(e){var n=o("./node_modules/lodash/_freeGlobal.js"),s="object"==typeof t&&t&&!t.nodeType&&t,r=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=r&&r.exports===s,i=a&&n.process,l=function(){try{var e=r&&r.require&&r.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=l}).call(t,o("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/_objectToString.js":function(e,t){function o(e){return s.call(e)}var n=Object.prototype,s=n.toString;e.exports=o},"./node_modules/lodash/_overArg.js":function(e,t){function o(e,t){return function(o){return e(t(o))}}e.exports=o},"./node_modules/lodash/_overRest.js":function(e,t,o){function n(e,t,o){return t=r(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=r(n.length-t,0),l=Array(i);++a0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,s=16,r=Date.now;e.exports=o},"./node_modules/lodash/_stackClear.js":function(e,t,o){function n(){this.__data__=new s,this.size=0}var s=o("./node_modules/lodash/_ListCache.js");e.exports=n},"./node_modules/lodash/_stackDelete.js":function(e,t){function o(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}e.exports=o},"./node_modules/lodash/_stackGet.js":function(e,t){function o(e){return this.__data__.get(e)}e.exports=o},"./node_modules/lodash/_stackHas.js":function(e,t){function o(e){return this.__data__.has(e)}e.exports=o},"./node_modules/lodash/_stackSet.js":function(e,t,o){function n(e,t){var o=this.__data__;if(o instanceof s){var n=o.__data__;if(!r||n.length2?t[2]:void 0;for(u&&r(t[0],t[1],u)&&(n=1);++o-1:!!d&&s(e,t,o)>-1}var s=o("./node_modules/lodash/_baseIndexOf.js"),r=o("./node_modules/lodash/isArrayLike.js"),a=o("./node_modules/lodash/isString.js"),i=o("./node_modules/lodash/toInteger.js"),l=o("./node_modules/lodash/values.js"),u=Math.max;e.exports=n},"./node_modules/lodash/initial.js":function(e,t,o){function n(e){return(null==e?0:e.length)?s(e,0,-1):[]}var s=o("./node_modules/lodash/_baseSlice.js");e.exports=n},"./node_modules/lodash/intersection.js":function(e,t,o){var n=o("./node_modules/lodash/_arrayMap.js"),s=o("./node_modules/lodash/_baseIntersection.js"),r=o("./node_modules/lodash/_baseRest.js"),a=o("./node_modules/lodash/_castArrayLikeObject.js"),i=r(function(e){var t=n(e,a);return t.length&&t[0]===e[0]?s(t):[]});e.exports=i},"./node_modules/lodash/isArguments.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsArguments.js"),s=o("./node_modules/lodash/isObjectLike.js"),r=Object.prototype,a=r.hasOwnProperty,i=r.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return s(e)&&a.call(e,"callee")&&!i.call(e,"callee")};e.exports=l},"./node_modules/lodash/isArray.js":function(e,t){var o=Array.isArray;e.exports=o},"./node_modules/lodash/isArrayLike.js":function(e,t,o){function n(e){return null!=e&&r(e.length)&&!s(e)}var s=o("./node_modules/lodash/isFunction.js"),r=o("./node_modules/lodash/isLength.js");e.exports=n},"./node_modules/lodash/isArrayLikeObject.js":function(e,t,o){function n(e){return r(e)&&s(e)}var s=o("./node_modules/lodash/isArrayLike.js"),r=o("./node_modules/lodash/isObjectLike.js");e.exports=n},"./node_modules/lodash/isBuffer.js":function(e,t,o){(function(e){var n=o("./node_modules/lodash/_root.js"),s=o("./node_modules/lodash/stubFalse.js"),r="object"==typeof t&&t&&!t.nodeType&&t,a=r&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i?n.Buffer:void 0,u=l?l.isBuffer:void 0,d=u||s;e.exports=d}).call(t,o("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/isEmpty.js":function(e,t,o){function n(e){if(null==e)return!0;if(l(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||a(e)))return!e.length;var t=r(e);if(t==p||t==h)return!e.size;if(d(e))return!s(e).length;for(var o in e)if(f.call(e,o))return!1;return!0}var s=o("./node_modules/lodash/_baseKeys.js"),r=o("./node_modules/lodash/_getTag.js"),a=o("./node_modules/lodash/isArguments.js"),i=o("./node_modules/lodash/isArray.js"),l=o("./node_modules/lodash/isArrayLike.js"),u=o("./node_modules/lodash/isBuffer.js"),d=o("./node_modules/lodash/_isPrototype.js"),c=o("./node_modules/lodash/isTypedArray.js"),p="[object Map]",h="[object Set]",m=Object.prototype,f=m.hasOwnProperty;e.exports=n},"./node_modules/lodash/isFunction.js":function(e,t,o){function n(e){if(!r(e))return!1;var t=s(e);return t==i||t==l||t==a||t==u}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/isObject.js"),a="[object AsyncFunction]",i="[object Function]",l="[object GeneratorFunction]",u="[object Proxy]";e.exports=n},"./node_modules/lodash/isLength.js":function(e,t){function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=o},"./node_modules/lodash/isMap.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsMap.js"),s=o("./node_modules/lodash/_baseUnary.js"),r=o("./node_modules/lodash/_nodeUtil.js"),a=r&&r.isMap,i=a?s(a):n;e.exports=i},"./node_modules/lodash/isNull.js":function(e,t){function o(e){return null===e}e.exports=o},"./node_modules/lodash/isObject.js":function(e,t){function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=o},"./node_modules/lodash/isObjectLike.js":function(e,t){function o(e){return null!=e&&"object"==typeof e}e.exports=o},"./node_modules/lodash/isPlainObject.js":function(e,t,o){function n(e){if(!a(e)||s(e)!=i)return!1;var t=r(e);if(null===t)return!0;var o=c.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&d.call(o)==p}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/_getPrototype.js"),a=o("./node_modules/lodash/isObjectLike.js"),i="[object Object]",l=Function.prototype,u=Object.prototype,d=l.toString,c=u.hasOwnProperty,p=d.call(Object);e.exports=n},"./node_modules/lodash/isSet.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsSet.js"),s=o("./node_modules/lodash/_baseUnary.js"),r=o("./node_modules/lodash/_nodeUtil.js"),a=r&&r.isSet,i=a?s(a):n;e.exports=i},"./node_modules/lodash/isString.js":function(e,t,o){function n(e){return"string"==typeof e||!r(e)&&a(e)&&s(e)==i}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/isArray.js"),a=o("./node_modules/lodash/isObjectLike.js"),i="[object String]";e.exports=n},"./node_modules/lodash/isSymbol.js":function(e,t,o){function n(e){return"symbol"==typeof e||r(e)&&s(e)==a}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/isObjectLike.js"),a="[object Symbol]";e.exports=n},"./node_modules/lodash/isTypedArray.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsTypedArray.js"),s=o("./node_modules/lodash/_baseUnary.js"),r=o("./node_modules/lodash/_nodeUtil.js"),a=r&&r.isTypedArray,i=a?s(a):n;e.exports=i},"./node_modules/lodash/isUndefined.js":function(e,t){function o(e){return void 0===e}e.exports=o},"./node_modules/lodash/keys.js":function(e,t,o){function n(e){return a(e)?s(e):r(e)}var s=o("./node_modules/lodash/_arrayLikeKeys.js"),r=o("./node_modules/lodash/_baseKeys.js"),a=o("./node_modules/lodash/isArrayLike.js");e.exports=n},"./node_modules/lodash/keysIn.js":function(e,t,o){function n(e){return a(e)?s(e,!0):r(e)}var s=o("./node_modules/lodash/_arrayLikeKeys.js"),r=o("./node_modules/lodash/_baseKeysIn.js"),a=o("./node_modules/lodash/isArrayLike.js");e.exports=n},"./node_modules/lodash/last.js":function(e,t){function o(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=o},"./node_modules/lodash/map.js":function(e,t,o){function n(e,t){return(i(e)?s:a)(e,r(t,3))}var s=o("./node_modules/lodash/_arrayMap.js"),r=o("./node_modules/lodash/_baseIteratee.js"),a=o("./node_modules/lodash/_baseMap.js"),i=o("./node_modules/lodash/isArray.js");e.exports=n},"./node_modules/lodash/memoize.js":function(e,t,o){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(r);var o=function(){var n=arguments,s=t?t.apply(this,n):n[0],r=o.cache;if(r.has(s))return r.get(s);var a=e.apply(this,n);return o.cache=r.set(s,a)||r,a};return o.cache=new(n.Cache||s),o}var s=o("./node_modules/lodash/_MapCache.js"),r="Expected a function";n.Cache=s,e.exports=n},"./node_modules/lodash/omit.js":function(e,t,o){var n=o("./node_modules/lodash/_arrayMap.js"),s=o("./node_modules/lodash/_baseClone.js"),r=o("./node_modules/lodash/_baseUnset.js"),a=o("./node_modules/lodash/_castPath.js"),i=o("./node_modules/lodash/_copyObject.js"),l=o("./node_modules/lodash/_customOmitClone.js"),u=o("./node_modules/lodash/_flatRest.js"),d=o("./node_modules/lodash/_getAllKeysIn.js"),c=u(function(e,t){var o={};if(null==e)return o;var u=!1;t=n(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),i(e,d(e),o),u&&(o=s(o,7,l));for(var c=t.length;c--;)r(o,t[c]);return o});e.exports=c},"./node_modules/lodash/orderBy.js":function(e,t,o){function n(e,t,o,n){return null==e?[]:(r(t)||(t=null==t?[]:[t]),o=n?void 0:o,r(o)||(o=null==o?[]:[o]),s(e,t,o))}var s=o("./node_modules/lodash/_baseOrderBy.js"),r=o("./node_modules/lodash/isArray.js");e.exports=n},"./node_modules/lodash/pick.js":function(e,t,o){var n=o("./node_modules/lodash/_basePick.js"),s=o("./node_modules/lodash/_flatRest.js"),r=s(function(e,t){return null==e?{}:n(e,t)});e.exports=r},"./node_modules/lodash/property.js":function(e,t,o){function n(e){return a(e)?s(i(e)):r(e)}var s=o("./node_modules/lodash/_baseProperty.js"),r=o("./node_modules/lodash/_basePropertyDeep.js"),a=o("./node_modules/lodash/_isKey.js"),i=o("./node_modules/lodash/_toKey.js");e.exports=n},"./node_modules/lodash/some.js":function(e,t,o){function n(e,t,o){var n=i(e)?s:a;return o&&l(e,t,o)&&(t=void 0),n(e,r(t,3))}var s=o("./node_modules/lodash/_arraySome.js"),r=o("./node_modules/lodash/_baseIteratee.js"),a=o("./node_modules/lodash/_baseSome.js"),i=o("./node_modules/lodash/isArray.js"),l=o("./node_modules/lodash/_isIterateeCall.js");e.exports=n},"./node_modules/lodash/sortBy.js":function(e,t,o){var n=o("./node_modules/lodash/_baseFlatten.js"),s=o("./node_modules/lodash/_baseOrderBy.js"),r=o("./node_modules/lodash/_baseRest.js"),a=o("./node_modules/lodash/_isIterateeCall.js"),i=r(function(e,t){if(null==e)return[];var o=t.length;return o>1&&a(e,t[0],t[1])?t=[]:o>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),s(e,n(t,1),[])});e.exports=i},"./node_modules/lodash/stubArray.js":function(e,t){function o(){return[]}e.exports=o},"./node_modules/lodash/stubFalse.js":function(e,t){function o(){return!1}e.exports=o},"./node_modules/lodash/take.js":function(e,t,o){function n(e,t,o){return e&&e.length?(t=o||void 0===t?1:r(t),s(e,0,t<0?0:t)):[]}var s=o("./node_modules/lodash/_baseSlice.js"),r=o("./node_modules/lodash/toInteger.js");e.exports=n},"./node_modules/lodash/toFinite.js":function(e,t,o){function n(e){if(!e)return 0===e?e:0;if((e=s(e))===r||e===-r){return(e<0?-1:1)*a}return e===e?e:0}var s=o("./node_modules/lodash/toNumber.js"),r=1/0,a=1.7976931348623157e308;e.exports=n},"./node_modules/lodash/toInteger.js":function(e,t,o){function n(e){var t=s(e),o=t%1;return t===t?o?t-o:t:0}var s=o("./node_modules/lodash/toFinite.js");e.exports=n},"./node_modules/lodash/toNumber.js":function(e,t,o){function n(e){if("number"==typeof e)return e;if(r(e))return a;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var o=u.test(e);return o||d.test(e)?c(e.slice(2),o?2:8):l.test(e)?a:+e}var s=o("./node_modules/lodash/isObject.js"),r=o("./node_modules/lodash/isSymbol.js"),a=NaN,i=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=n},"./node_modules/lodash/toPairs.js":function(e,t,o){var n=o("./node_modules/lodash/_createToPairs.js"),s=o("./node_modules/lodash/keys.js"),r=n(s);e.exports=r},"./node_modules/lodash/toString.js":function(e,t,o){function n(e){return null==e?"":s(e)}var s=o("./node_modules/lodash/_baseToString.js");e.exports=n},"./node_modules/lodash/uniqueId.js":function(e,t,o){function n(e){var t=++r;return s(e)+t}var s=o("./node_modules/lodash/toString.js"),r=0;e.exports=n},"./node_modules/lodash/values.js":function(e,t,o){function n(e){return null==e?[]:s(e,r(e))}var s=o("./node_modules/lodash/_baseValues.js"),r=o("./node_modules/lodash/keys.js");e.exports=n},"./node_modules/lodash/without.js":function(e,t,o){var n=o("./node_modules/lodash/_baseDifference.js"),s=o("./node_modules/lodash/_baseRest.js"),r=o("./node_modules/lodash/isArrayLikeObject.js"),a=s(function(e,t){return r(e)?n(e,t):[]});e.exports=a},"./node_modules/lodash/zipObject.js":function(e,t,o){function n(e,t){return r(e||[],t||[],s)}var s=o("./node_modules/lodash/_assignValue.js"),r=o("./node_modules/lodash/_baseZipObject.js");e.exports=n},"./node_modules/object-assign/index.js":function(e,t,o){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -var s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;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={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o,i,l=n(e),u=1;u=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return function(o){return t.createElement(c,l({component:e},o))}}var l=Object.assign||function(e){for(var t=1;t>>((3&t)<<3)&255;return s}}},"./node_modules/uuid/v1.js":function(e,t,o){function n(e,t,o){var n=t&&o||0,d=t||[];e=e||{};var c=e.node||s,p=void 0!==e.clockseq?e.clockseq:r;if(null==c||null==p){var h=a();null==c&&(c=s=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=r=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:u+1,_=m-l+(f-u)/1e4;if(_<0&&void 0===e.clockseq&&(p=p+1&16383),(_<0||m>l)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=m,u=f,r=p,m+=122192928e5;var g=(1e4*(268435455&m)+f)%4294967296;d[n++]=g>>>24&255,d[n++]=g>>>16&255,d[n++]=g>>>8&255,d[n++]=255&g;var v=m/4294967296*1e4&268435455;d[n++]=v>>>8&255,d[n++]=255&v,d[n++]=v>>>24&15|16,d[n++]=v>>>16&255,d[n++]=p>>>8|128,d[n++]=255&p;for(var y=0;y<6;++y)d[n+y]=c[y];return t||i(d)}var s,r,a=o("./node_modules/uuid/lib/rng-browser.js"),i=o("./node_modules/uuid/lib/bytesToUuid.js"),l=0,u=0;e.exports=n},"./node_modules/webpack/buildin/global.js":function(e,t){var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(o=window)}e.exports=o},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},0:function(e,t){e.exports=React},1:function(e,t){e.exports=PropTypes},10:function(e,t){e.exports=Reactstrap},11:function(e,t){e.exports=ViewModeActions},12:function(e,t){e.exports=jQuery},13:function(e,t){e.exports=Config},14:function(e,t){e.exports=FormBuilderLoader},15:function(e,t){e.exports=ReactDom},16:function(e,t){e.exports=moment},2:function(e,t){e.exports=Injector},3:function(e,t){e.exports=i18n},4:function(e,t){e.exports=ReactRedux},5:function(e,t){e.exports=Redux},6:function(e,t){e.exports=classnames},7:function(e,t){e.exports=ReactApollo},8:function(e,t){e.exports=GraphQLTag},9:function(e,t){e.exports=Loading}}); -//# sourceMappingURL=bundle.js.map \ No newline at end of file +!function(e){function t(n){if(o[n])return o[n].exports;var s=o[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s="./client/src/bundles/bundle.js")}({"./client/src/boot/index.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}var s=o("./client/src/boot/registerComponents.js"),r=n(s),a=o("./client/src/boot/registerReducers.js"),i=n(a);window.document.addEventListener("DOMContentLoaded",function(){(0,r.default)(),(0,i.default)()})},"./client/src/boot/registerComponents.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=o(2),r=n(s),a=o("./client/src/components/HistoryViewer/HistoryViewer.js"),i=n(a),l=o("./client/src/components/HistoryViewer/SnapshotViewerContainer.js"),u=n(l),d=o("./client/src/components/HistoryViewer/HistoryViewerHeading.js"),c=n(d),p=o("./client/src/components/HistoryViewer/HistoryViewerToolbar.js"),h=n(p),m=o("./client/src/components/HistoryViewer/HistoryViewerVersion.js"),f=n(m),_=o("./client/src/components/HistoryViewer/HistoryViewerVersionDetail.js"),v=n(_),g=o("./client/src/components/HistoryViewer/HistoryViewerVersionList.js"),y=n(g),j=o("./client/src/components/HistoryViewer/HistoryViewerVersionState.js"),b=n(j),C=o("./client/src/components/HistoryViewer/HistoryViewerSnapshotState.js"),w=n(C),S=o("./client/src/components/HistoryViewer/HistoryViewerSnapshot.js"),x=n(S),E=o("./client/src/components/HistoryViewer/HistoryViewerCompareWarning.js"),P=n(E),O=o("./client/src/components/HistoryViewer/RollbackMutation.js"),R=n(O);t.default=function(){r.default.component.register("SnapshotViewer",i.default),r.default.component.register("SnapshotViewerContainer",u.default),r.default.component.register("SnapshotHistoryViewer",i.default),r.default.component.register("SnapshotRollbackMutation",R.default),r.default.component.registerMany({SnapshotHistoryViewerHeading:c.default,SnapshotHistoryViewerToolbar:h.default,SnapshotHistoryViewerVersion:f.default,SnapshotHistoryViewerVersionDetail:v.default,SnapshotHistoryViewerVersionList:y.default,SnapshotHistoryViewerVersionState:b.default,SnapshotHistoryViewerSnapshotState:w.default,SnapshotHistoryViewerSnapshot:x.default,SnapshotHistoryViewerCompareWarning:P.default},{force:!0})}},"./client/src/boot/registerReducers.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=o(2),r=n(s),a=o(5),i=o("./client/src/state/historyviewer/HistoryViewerReducer.js"),l=n(i),u=function(){r.default.reducer.register("versionedAdmin",(0,a.combineReducers)({historyViewer:l.default}),{force:!0})};t.default=u},"./client/src/bundles/bundle.js":function(e,t,o){"use strict";o("./node_modules/expose-loader/index.js?SnapshotsViewer!./client/src/components/HistoryViewer/HistoryViewer.js-exposed"),o("./node_modules/expose-loader/index.js?versionType!./client/src/types/versionType.js-exposed"),o("./client/src/legacy/ArchiveAdmin/ArchiveAdmin.js"),o("./client/src/legacy/HistoryViewer/HistoryViewerEntwine.js"),o("./client/src/boot/index.js")},"./client/src/components/HistoryViewer/HistoryViewer.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){var t=e.versionedAdmin.historyViewer,o=t.currentPage,n=t.currentVersion,s=t.previewMode;return{page:o,currentVersion:n,compare:t.compare,previewMode:s,previewState:e.viewMode.activeState}}function l(e){return{onSelect:function(t){e((0,S.showVersion)(t)),e((0,S.clearMessages)())},onSetPage:function(t){e((0,S.setCurrentPage)(t))},onResize:function(t){e(V.enableOrDisableSplitMode(t))}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.VERSION_MODE_DATE=t.VERSION_MODE_VERSION=void 0;var u=Object.assign||function(e){for(var t=1;t1}},{key:"renderVersionDetail",value:function(){var e=this,t=this.props,o=t.currentVersion,n=t.isPreviewable,s=t.recordId,r=t.recordClass,a=t.typeName,i=t.schemaUrl,l=t.VersionDetailComponent,u=t.compare,d=t.compare,c=d.versionFrom,h=void 0!==c&&c,m=d.versionTo,f=void 0!==m&&m,_=t.previewState,v={":id":s,":class":r,":date":"",":version":""};v[":date"]=o.lastEdited;var g={":id":s,":class":r,":from":h.version||0,":to":f.version||0},y=u?/:id|:class|:from|:to/g:/:id|:class|:version|:date/g,j=u?g:v,b=u?h:o,C=this.getLatestVersion(),w={isLatestVersion:!u&&C&&C.version===b.version,isPreviewable:n,recordId:s,typeName:a,schemaUrl:i.replace(y,function(e){return j[e]}),version:b,compare:u,compareModeAvailable:this.compareModeAvailable(),previewState:_};return p.default.createElement(M.default,{className:this.getContainerClasses(),onResize:function(t){var o=t.width;return e.props.onResize(o)}},p.default.createElement(l,w))}},{key:"renderPagination",value:function(){var e=this.props,t=e.limit,o=e.page,n=e.versions;if(!n)return null;var s=n.SnapshotHistory?n.SnapshotHistory.pageInfo.totalCount:0;if(s<=t)return null;var r={setPage:this.handleSetPage,maxPage:Math.ceil(s/t),next:this.handleNextPage,nextText:j.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:j.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:o-1,useGriddleStyles:!1};return p.default.createElement("div",{className:"griddle-footer"},p.default.createElement(_.default.GridPagination,r))}},{key:"renderComparisonSelectionList",value:function(){var e=this.props,t=e.compare.versionFrom,o=e.ListComponent;if(!t)return null;var n=(0,O.default)("history-viewer__table","history-viewer__table--comparison-selected");return p.default.createElement(o,{versions:[t],extraClass:n})}},{key:"renderVersionList",value:function(){var e=this.props,t=e.isInGridField,o=e.ListComponent,n=e.CompareWarningComponent,s=e.compare,r=e.compare.versionFrom;return p.default.createElement("div",{className:this.getContainerClasses()},p.default.createElement(n,null),p.default.createElement("div",{className:t?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),p.default.createElement(o,{versions:this.getVersions(),showHeader:!s||s&&!r,compareModeAvailable:this.compareModeAvailable()}),p.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}},{key:"renderCompareMode",value:function(){var e=this.props.compare;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}},{key:"render",value:function(){var e=this.props,t=e.loading,o=e.compare,n=e.previewMode;return t?p.default.createElement(w.default,null):this.compareModeAvailable()&&o?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}]),t}(c.Component);k.propTypes={contextKey:N.default.string,limit:N.default.number,ListComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,offset:N.default.number,recordId:N.default.number.isRequired,recordClass:N.default.string.isRequired,typeName:N.default.string.isRequired,currentVersion:N.default.oneOfType([N.default.bool,x.versionType]),compare:E.compareType,isInGridField:N.default.bool,isPreviewable:N.default.bool,VersionDetailComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,CompareWarningComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,versions:N.default.shape({versions:N.default.shape({pageInfo:N.default.shape({totalCount:N.default.number}),edges:N.default.arrayOf(N.default.shape({node:x.versionType}))})}),page:N.default.number,schemaUrl:N.default.string,previewState:N.default.oneOf(["edit","preview","split"]),actions:N.default.object,onSelect:N.default.func,onSetPage:N.default.func,onResize:N.default.func},k.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,typeName:"",schemaUrl:"",versions:{versions:{pageInfo:{totalCount:0},edges:[]}}},t.Component=k,t.default=(0,h.compose)((0,m.connect)(i,l),g.default,(0,b.inject)(["SnapshotHistoryViewerVersionList","SnapshotHistoryViewerVersionDetail","SnapshotHistoryViewerCompareWarning"],function(e,t,o){return{ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:o}},function(e){return"VersionedAdmin.HistoryViewer."+e.contextKey}))(k)},"./client/src/components/HistoryViewer/HistoryViewerCompareWarning.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return{isCompare:!!e.versionedAdmin.historyViewer.compare}}function l(e){return{onDismissCompare:function(){e((0,v.setCompareMode)(!1))}}}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var o=0;o1?s.map(function(e,t){return d.default.createElement("div",{key:t},e)}):n+" "+t}},{key:"getBadges",value:function(){return null}}]),t}(i.Component);t.Component=c,t.default=(0,l.inject)(["Badge"],function(e){return{BadgeComponent:e}})(c)},"./client/src/components/HistoryViewer/HistoryViewerToolbar.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return{onAfterRevert:function(t){e((0,g.addMessage)(_.default.sprintf(_.default._t("HistoryViewerToolbar.REVERTED_MESSAGE","Successfully reverted to version %s"),t))),e((0,g.showList)())}}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var o=0;o0&&void 0!==arguments[0])||arguments[0],t=document.querySelector(".CMSPageHistoryViewerController div:not(.cms-content-tools) .cms-content-header"),o="history-viewer__toolbar--condensed";t&&this.isPreviewable()&&(e?t.classList.add(o):t.classList.remove(o))}},{key:"renderPreview",value:function(){var e=this.props,t=e.version,o=e.PreviewComponent,n=e.previewState;return this.isPreviewable()&&"edit"!==n?u.default.createElement("div",{className:"history-viewer-preview flexbox-area-grow"},u.default.createElement("div",{className:"history-viewer-preview__underlay"},u.default.createElement("div",{className:"history-viewer-preview__spinner"}),y.default._t("HistoryViewerVersionDetail.LOADING_PREVIEW","Generating preview...")),u.default.createElement(o,{className:"history-viewer-preview__frame flexbox-area-grow",itemLinks:{preview:{Stage:{href:t.AbsoluteLink+"&archiveDate="+t.lastEdited,type:"text/html"}}},itemId:t.version})):null}},{key:"renderToolbar",value:function(){var e=this.props,t=e.ToolbarComponent,o=e.isLatestVersion,n=e.recordId,s=e.version,r=e.typeName;if(this.isCompareMode())return null;var a=y.default._t("HistoryViewerVersionDetail.CANNOT_ROLLBACK_SNAPSHOTS","You can only revert to base versions");return u.default.createElement(t,{identifier:"HistoryViewer.versionDetail.Toolbar",isLatestVersion:o,recordId:n,typeName:r,versionId:s.version,isPreviewable:this.isPreviewable(),canRollback:s.isFullVersion,rollbackMessage:a})}},{key:"renderDetails",value:function(){var e=this.props,t=e.compareModeAvailable,o=e.ListComponent,n=e.schemaUrl,s=e.CompareWarningComponent,r=e.previewState,a=e.version;if(this.isPreviewable()&&"preview"===r)return null;var i=["flexbox-area-grow","panel","panel--scrollable","panel--padded","panel--padded-side"],l={"history-viewer__table":!0,"history-viewer__table--current":!0,"history-viewer__table--compare":this.isCompareMode()},d={"history-viewer__version-detail":!0,"history-viewer__version-detail--compare":this.isCompareMode()};return u.default.createElement("div",{className:"flexbox-area-grow fill-height"},u.default.createElement("div",{className:(0,c.default)(i)},u.default.createElement(o,{extraClass:(0,c.default)(l),versions:this.getListVersions(),compareModeAvailable:t}),u.default.createElement("div",{className:(0,c.default)(d)},u.default.createElement(h.default,{identifier:"HistoryViewer.versionDetail."+a.ID,schemaUrl:n,refetchSchemaOnMount:!1}))),this.renderToolbar(),u.default.createElement(s,{fixed:!0}))}},{key:"render",value:function(){return u.default.createElement("div",{className:"flexbox-area-grow fill-width"},this.renderDetails(),this.renderPreview())}}]),t}(l.PureComponent);j.propTypes={isLatestVersion:v.default.bool,isPreviewable:v.default.bool,ListComponent:v.default.oneOfType([v.default.node,v.default.func]).isRequired,PreviewComponent:v.default.oneOfType([v.default.node,v.default.func]),recordId:v.default.number.isRequired,typeName:v.default.string.isRequired,schemaUrl:v.default.string.isRequired,ToolbarComponent:v.default.oneOfType([v.default.node,v.default.func]).isRequired,version:f.versionType,compare:v.default.oneOfType([v.default.shape({versionFrom:f.versionType,versionTo:f.versionType}),v.default.bool]),previewState:v.default.oneOf(["edit","preview","split"])},j.defaultProps={isLatestVersion:!1,isPreviewable:!1,compare:!1},t.Component=j,t.default=(0,m.inject)(["SnapshotHistoryViewerVersionList","SnapshotHistoryViewerToolbar","Preview","SnapshotHistoryViewerCompareWarning"],function(e,t,o,n){return{ListComponent:e,ToolbarComponent:t,PreviewComponent:o,CompareWarningComponent:n}},function(e,t){return t+".HistoryViewerVersionDetail."+e.version.version})(j)},"./client/src/components/HistoryViewer/HistoryViewerVersionList.js":function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){var t=e.versionedAdmin.historyViewer;return{messages:t.messages,compare:t.compare,currentVersion:t.currentVersion}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var l=function(){function e(e,t){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:"success";return{type:m.default.ADD_MESSAGE,payload:{id:(0,_.default)(),message:e,type:t}}}function u(){return{type:m.default.CLEAR_MESSAGES}}function d(e){return{type:m.default.SET_COMPARE_MODE,payload:{enabled:e}}}function c(e){return{type:m.default.SET_COMPARE_FROM,payload:{version:e}}}function p(e){return{type:m.default.SET_COMPARE_TO,payload:{version:e}}}Object.defineProperty(t,"__esModule",{value:!0}),t.showVersion=s,t.showDate=r,t.showList=a,t.setCurrentPage=i,t.addMessage=l,t.clearMessages=u,t.setCompareMode=d,t.setCompareFrom=c,t.setCompareTo=p;var h=o("./client/src/state/historyviewer/HistoryViewerActionTypes.js"),m=n(h),f=o("./node_modules/uuid/v1.js"),_=n(f)},"./client/src/state/historyviewer/HistoryViewerReducer.js":function(e,t,o){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=t.type,s=t.payload;switch(o){case i.default.SET_CURRENT_PAGE:return r({},e,{currentPage:s.page});case i.default.SHOW_VERSION:var a=s.version;return r({},e,{previewMode:a&&u.VERSION_MODE_VERSION,currentVersion:a});case i.default.SHOW_DATE:var l=s.version;return r({},e,{previewMode:l&&u.VERSION_MODE_DATE,currentVersion:l});case i.default.SHOW_LIST:return r({},e,{currentVersion:!1,currentDate:!1,previewMode:!1,currentPage:0});case i.default.ADD_MESSAGE:return r({},e,{messages:[s].concat(n(e.messages))});case i.default.CLEAR_MESSAGES:return r({},e,{messages:[]});case i.default.SET_COMPARE_MODE:var c=r({versionFrom:!1,versionTo:!1},e.compare);return r({},e,{compare:!!s.enabled&&c,previewMode:!!s.enabled&&e.previewMode});case i.default.SET_COMPARE_FROM:var p=e.compare,h=p.versionFrom,m=p.versionTo;return h=s.version||!1,h||(h=m,m=!1),r({},e,{currentVersion:h,compare:{versionFrom:h,versionTo:m}});case i.default.SET_COMPARE_TO:var f=e.compare,_=f.versionFrom,v=f.versionTo;return v=s.version||!1,v&&_&&v.version<_.version&&(_=v,v=e.compare.versionFrom),r({},e,{currentVersion:_,compare:{versionFrom:_,versionTo:v}});default:return e}}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1}},{key:"renderVersionDetail",value:function(){var e=this,t=this.props,o=t.currentVersion,n=t.isPreviewable,s=t.recordId,r=t.recordClass,a=t.typeName,i=t.schemaUrl,l=t.VersionDetailComponent,u=t.compare,d=t.compare,c=d.versionFrom,h=void 0!==c&&c,m=d.versionTo,f=void 0!==m&&m,_=t.previewState,v={":id":s,":class":r,":date":"",":version":""};v[":date"]=o.lastEdited;var g={":id":s,":class":r,":from":h.version||0,":to":f.version||0},y=u?/:id|:class|:from|:to/g:/:id|:class|:version|:date/g,j=u?g:v,b=u?h:o,C=this.getLatestVersion(),w={isLatestVersion:!u&&C&&C.version===b.version,isPreviewable:n,recordId:s,typeName:a,schemaUrl:i.replace(y,function(e){return j[e]}),version:b,compare:u,compareModeAvailable:this.compareModeAvailable(),previewState:_};return p.default.createElement(M.default,{className:this.getContainerClasses(),onResize:function(t){var o=t.width;return e.props.onResize(o)}},p.default.createElement(l,w))}},{key:"renderPagination",value:function(){var e=this.props,t=e.limit,o=e.page,n=e.versions;if(!n)return null;var s=n.SnapshotHistory?n.SnapshotHistory.pageInfo.totalCount:0;if(s<=t)return null;var r={setPage:this.handleSetPage,maxPage:Math.ceil(s/t),next:this.handleNextPage,nextText:j.default._t("HistoryViewer.NEXT","Next"),previous:this.handlePrevPage,previousText:j.default._t("HistoryViewer.PREVIOUS","Previous"),currentPage:o-1,useGriddleStyles:!1};return p.default.createElement("div",{className:"griddle-footer"},p.default.createElement(_.default.GridPagination,r))}},{key:"renderComparisonSelectionList",value:function(){var e=this.props,t=e.compare.versionFrom,o=e.ListComponent;if(!t)return null;var n=(0,O.default)("history-viewer__table","history-viewer__table--comparison-selected");return p.default.createElement(o,{versions:[t],extraClass:n})}},{key:"renderVersionList",value:function(){var e=this.props,t=e.isInGridField,o=e.ListComponent,n=e.CompareWarningComponent,s=e.compare,r=e.compare.versionFrom;return p.default.createElement("div",{className:this.getContainerClasses()},p.default.createElement(n,null),p.default.createElement("div",{className:t?"":"panel panel--padded panel--scrollable"},this.renderComparisonSelectionList(),p.default.createElement(o,{versions:this.getVersions(),showHeader:!s||s&&!r,compareModeAvailable:this.compareModeAvailable()}),p.default.createElement("div",{className:"history-viewer__pagination"},this.renderPagination())))}},{key:"renderCompareMode",value:function(){var e=this.props.compare;return e&&e.versionFrom&&e.versionTo?this.renderVersionDetail():this.renderVersionList()}},{key:"render",value:function(){var e=this.props,t=e.loading,o=e.compare,n=e.previewMode;return t?p.default.createElement(w.default,null):this.compareModeAvailable()&&o?this.renderCompareMode():n?this.renderVersionDetail():this.renderVersionList()}}]),t}(c.Component);k.propTypes={contextKey:N.default.string,limit:N.default.number,ListComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,offset:N.default.number,recordId:N.default.number.isRequired,recordClass:N.default.string.isRequired,typeName:N.default.string.isRequired,currentVersion:N.default.oneOfType([N.default.bool,x.versionType]),compare:E.compareType,isInGridField:N.default.bool,isPreviewable:N.default.bool,VersionDetailComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,CompareWarningComponent:N.default.oneOfType([N.default.node,N.default.func]).isRequired,versions:N.default.shape({versions:N.default.shape({pageInfo:N.default.shape({totalCount:N.default.number}),edges:N.default.arrayOf(N.default.shape({node:x.versionType}))})}),page:N.default.number,schemaUrl:N.default.string,previewState:N.default.oneOf(["edit","preview","split"]),actions:N.default.object,onSelect:N.default.func,onSetPage:N.default.func,onResize:N.default.func},k.defaultProps={compare:{},contextKey:"",currentVersion:!1,isInGridField:!1,isPreviewable:!1,typeName:"",schemaUrl:"",versions:{versions:{pageInfo:{totalCount:0},edges:[]}}},t.Component=k,t.default=(0,h.compose)((0,m.connect)(i,l),g.default,(0,b.inject)(["SnapshotHistoryViewerVersionList","SnapshotHistoryViewerVersionDetail","SnapshotHistoryViewerCompareWarning"],function(e,t,o){return{ListComponent:e,VersionDetailComponent:t,CompareWarningComponent:o}},function(e){return"VersionedAdmin.HistoryViewer."+e.contextKey}))(k)},'./node_modules/babel-loader/lib/index.js?{"presets":[["env",{"modules":false}],"react"],"plugins":["transform-object-rest-spread"],"comments":false,"cacheDirectory":false}!./client/src/types/versionType.js':function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultVersion=t.versionType=void 0;var n=o(1),s=function(e){return e&&e.__esModule?e:{default:e}}(n),r=s.default.shape({firstName:s.default.string,surname:s.default.string}),a=s.default.shape({version:s.default.number,absoluteLink:s.default.string,lastEdited:s.default.string,published:s.default.boolean,liveVersion:s.default.boolean,latestDraftVersion:s.default.boolean,message:s.default.string,publisher:r,author:r}),i={version:0,absoluteLink:"",lastEdited:"",published:!1,liveVersion:!1,latestDraftVersion:!1,message:"",publisher:{firstName:"",surname:""},author:{firstName:"",surname:""}};t.versionType=a,t.defaultVersion=i},"./node_modules/create-react-class/factory.js":function(e,t,o){"use strict";function n(e){return e}function s(e,t,o){function s(e,t){var o=g.hasOwnProperty(t)?g[t]:null;w.hasOwnProperty(t)&&i("OVERRIDE_BASE"===o,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&i("DEFINE_MANY"===o||"DEFINE_MANY_MERGED"===o,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function u(e,o){if(o){i("function"!=typeof o,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),i(!t(o),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var n=e.prototype,r=n.__reactAutoBindPairs;o.hasOwnProperty(l)&&j.mixins(e,o.mixins);for(var a in o)if(o.hasOwnProperty(a)&&a!==l){var u=o[a],d=n.hasOwnProperty(a);if(s(d,a),j.hasOwnProperty(a))j[a](e,u);else{var c=g.hasOwnProperty(a),m="function"==typeof u,f=m&&!c&&!d&&!1!==o.autobind;if(f)r.push(a,u),n[a]=u;else if(d){var _=g[a];i(c&&("DEFINE_MANY_MERGED"===_||"DEFINE_MANY"===_),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",_,a),"DEFINE_MANY_MERGED"===_?n[a]=p(n[a],u):"DEFINE_MANY"===_&&(n[a]=h(n[a],u))}else n[a]=u}}}}function d(e,t){if(t)for(var o in t){var n=t[o];if(t.hasOwnProperty(o)){var s=o in j;i(!s,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',o);var r=o in e;if(r){var a=y.hasOwnProperty(o)?y[o]:null;return i("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",o),void(e[o]=p(e[o],n))}e[o]=n}}}function c(e,t){i(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var o in t)t.hasOwnProperty(o)&&(i(void 0===e[o],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",o),e[o]=t[o]);return e}function p(e,t){return function(){var o=e.apply(this,arguments),n=t.apply(this,arguments);if(null==o)return n;if(null==n)return o;var s={};return c(s,o),c(s,n),s}}function h(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function m(e,t){return t.bind(e)}function f(e){for(var t=e.__reactAutoBindPairs,o=0;o0}},{key:"getMetadataColumnProperty",value:function(e,t,o){var n=this.getColumnMetadataByName(e);return void 0===n||null===n?o:n.hasOwnProperty(t)?n[t]:o}},{key:"orderColumns",value:function(e){var t=this;return l(e,function(e){var o=i(t.columnMetadata,{columnName:e});return void 0===o||null===o||isNaN(o.order)?100:o.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=d},"./node_modules/griddle-react/modules/customFilterContainer.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=s({getDefaultProps:function(){return{placeholderText:""}},render:function(){var e=this;return"function"!=typeof e.props.customFilterComponent?(console.log("Couldn't find valid template."),n.createElement("div",null)):n.createElement(e.props.customFilterComponent,{changeFilter:this.props.changeFilter,results:this.props.results,currentResults:this.props.currentResults,placeholderText:this.props.placeholderText})}});e.exports=r},"./node_modules/griddle-react/modules/customPaginationContainer.jsx.js":function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t0&&(e=n.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=n.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 o=null,s=null,a=null;if(!0===this.props.useGriddleStyles){var i={float:"left",minHeight:"1px",marginTop:"5px"};a=r({textAlign:"right",width:"34%"},i),s=r({textAlign:"center",width:"33%"},i),o=r({width:"33%"},i)}for(var l=[],u=1;u<=this.props.maxPage;u++)l.push(n.createElement("option",{value:u,key:u},u));return n.createElement("div",{style:this.props.useGriddleStyles?{minHeight:"35px"}:null},n.createElement("div",{className:this.props.previousClassName,style:o},e),n.createElement("div",{className:"griddle-page",style:s},n.createElement("select",{value:this.props.currentPage+1,onChange:this.pageChange},l)," / ",this.props.maxPage),n.createElement("div",{className:this.props.nextClassName,style:a},t))}});e.exports=a},"./node_modules/griddle-react/modules/gridRow.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=(o("./node_modules/griddle-react/modules/columnProperties.js"),o("./node_modules/griddle-react/modules/deep.js")),a=o("./node_modules/lodash/isFunction.js"),i=o("./node_modules/lodash/zipObject.js"),l=o("./node_modules/lodash/assign.js"),u=o("./node_modules/lodash/defaults.js"),d=o("./node_modules/lodash/toPairs.js"),c=o("./node_modules/lodash/without.js"),p=s({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&&a(this.props.onRowWillMount)&&this.props.onRowWillMount(this)},componentWillUnmount:function(){null!==this.props.onRowWillUnmount&&a(this.props.onRowWillUnmount)&&this.props.onRowWillUnmount(this)},handleClick:function(e){null!==this.props.onRowClick&&a(this.props.onRowClick)?this.props.onRowClick(this,e):this.props.hasChildren&&this.props.toggleChildren()},handleMouseEnter:function(e){null!==this.props.onRowMouseEnter&&a(this.props.onRowMouseEnter)&&this.props.onRowMouseEnter(this,e)},handleMouseLeave:function(e){null!==this.props.onRowMouseLeave&&a(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,o=null;this.props.useGriddleStyles&&(o={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 s=this.props.columnSettings.getColumns(),p=i(s,[]),h=l({},this.props.data);u(h,p);var m,f,_=d(r.pick(h,c(s,"children"))),v=_.map(function(t,s){var r=null,a=e.props.columnSettings.getColumnMetadataByName(t[0]),i=0===s&&e.props.hasChildren&&!1===e.props.showChildren&&e.props.useGriddleIcons?n.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px",marginRight:"5px"}:null},e.props.parentRowCollapsedComponent):0===s&&e.props.hasChildren&&e.props.showChildren&&e.props.useGriddleIcons?n.createElement("span",{style:e.props.useGriddleStyles?{fontSize:"10px"}:null},e.props.parentRowExpandedComponent):"";if(0===s&&e.props.isChildRow&&e.props.useGriddleStyles&&(o=l(o,{paddingLeft:10})),e.props.columnSettings.hasColumnMetadata()&&void 0!==a&&null!==a)if(void 0!==a.customComponent&&null!==a.customComponent){var u=n.createElement(a.customComponent,{data:t[1],rowData:h,metadata:a});r=n.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:a.cssClassName,key:s,style:o},u)}else r=n.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,className:a.cssClassName,key:s,style:o},i,e.formatData(t[1]));return r||n.createElement("td",{onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,onMouseLeave:e.handleMouseLeave,key:s,style:o},i,t[1])});null!==this.props.onRowClick&&a(this.props.onRowClick)?(m=null,f=this.handleSelectClick):this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection?(m=this.handleSelectClick,f=null):(m=null,f=null),v&&this.props.multipleSelectionSettings&&this.props.multipleSelectionSettings.isMultipleSelection&&(this.props.multipleSelectionSettings.getSelectedRowIds(),v.unshift(n.createElement("td",{key:"selection",style:o,className:"griddle-select griddle-select-cell",onClick:f},n.createElement("input",{type:"checkbox",checked:this.props.multipleSelectionSettings.getIsRowChecked(h),onChange:this.handleSelectionChange,ref:"selected"}))));var g=t.props.rowSettings&&t.props.rowSettings.getBodyRowMetadataClass(t.props.data)||"standard-row";return t.props.isChildRow?g="child-row":t.props.hasChildren&&(g=t.props.showChildren?this.props.parentRowExpandedClassName:this.props.parentRowCollapsedClassName),n.createElement("tr",{onClick:m,className:g},v)}});e.exports=p},"./node_modules/griddle-react/modules/gridRowContainer.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=(o("./node_modules/griddle-react/modules/columnProperties.js"),o("./node_modules/lodash/pick.js")),a=s({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 n.createElement("tbody",null);var t=[],o=this.props.columnSettings.getColumns();t.push(n.createElement(this.props.rowSettings.rowComponent,{useGriddleStyles:this.props.useGriddleStyles,isSubGriddle:this.props.isSubGriddle,data:this.props.rowSettings.isCustom?r(this.props.data,o):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 s=null;return e.state.showChildren&&(s=e.props.hasChildren&&this.props.data.children.map(function(t,o){var s=e.props.rowSettings.getRowKey(t,o);if(void 0!==t.children){var r=e.constructor.Griddle;return n.createElement("tr",{key:s,style:{paddingLeft:5}},n.createElement("td",{colSpan:e.props.columnSettings.getVisibleColumnCount(),className:"griddle-parent",style:e.props.useGriddleStyles?{border:"none",padding:"0 0 0 5px"}:null},n.createElement(r,{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 n.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:s})})),!1===e.props.hasChildren?t[0]:n.createElement("tbody",null,e.state.showChildren?t.concat(s):t)}});e.exports=a},"./node_modules/griddle-react/modules/gridSettings.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=o("./node_modules/lodash/includes.js"),a=o("./node_modules/lodash/without.js"),i=o("./node_modules/lodash/find.js"),l=s({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===r(this.props.selectedColumns,t)?(this.props.selectedColumns.push(t),this.props.setColumns(this.props.selectedColumns)):this.props.setColumns(a(this.props.selectedColumns,t))},render:function(){var e=this,t=[];!1===e.props.useCustomComponent&&(t=this.props.columns.map(function(t,o){var s=r(e.props.selectedColumns,t),a=i(e.props.columnMetadata,{columnName:t}),l=t;return void 0!==a&&void 0!==a.displayName&&null!=a.displayName&&(l=a.displayName),void 0!==a&&null!=a&&a.locked?n.createElement("div",{className:"column checkbox"},n.createElement("label",null,n.createElement("input",{type:"checkbox",disabled:!0,name:"check",checked:s,"data-name":t}),l)):void 0!==a&&null!=a&&void 0!==a.visible&&!1===a.visible?null:n.createElement("div",{className:"griddle-column-selection checkbox",key:t,style:e.props.useGriddleStyles?{float:"left",width:"20%"}:null},n.createElement("label",null,n.createElement("input",{type:"checkbox",name:"check",onChange:e.handleChange,checked:s,"data-name":t}),l))}));var o=e.props.enableToggleCustom?n.createElement("div",{className:"form-group"},n.createElement("label",{htmlFor:"maxRows"},n.createElement("input",{type:"checkbox",checked:this.props.useCustomComponent,onChange:this.props.toggleCustomComponent})," ",this.props.enableCustomFormatText)):"",s=this.props.showSetPageSize?n.createElement("div",null,n.createElement("label",{htmlFor:"maxRows"},this.props.maxRowsText,":",n.createElement("select",{onChange:this.setPageSize,value:this.props.resultsPerPage},n.createElement("option",{value:"5"},"5"),n.createElement("option",{value:"10"},"10"),n.createElement("option",{value:"25"},"25"),n.createElement("option",{value:"50"},"50"),n.createElement("option",{value:"100"},"100")))):"";return n.createElement("div",{className:"griddle-settings",style:this.props.useGriddleStyles?{backgroundColor:"#FFF",border:"1px solid #DDD",color:"#222",padding:"10px",marginBottom:"10px"}:null},n.createElement("h6",null,this.props.settingsText),n.createElement("div",{className:"griddle-columns",style:this.props.useGriddleStyles?{clear:"both",display:"table",width:"100%",borderBottom:"1px solid #EDEDED",marginBottom:"10px"}:null},t),s,o)}});e.exports=l},"./node_modules/griddle-react/modules/gridTable.jsx.js":function(e,t,o){"use strict";var n=o(0),s=o("./node_modules/create-react-class/index.js"),r=o("./node_modules/griddle-react/modules/gridTitle.jsx.js"),a=o("./node_modules/griddle-react/modules/gridRowContainer.jsx.js"),i=(o("./node_modules/griddle-react/modules/columnProperties.js"),o("./node_modules/griddle-react/modules/rowProperties.js"),s({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,o=e.scrollHeight,n=e.clientHeight;if(null!==this.props.rowHeight&&this.state.scrollTop!==t&&Math.abs(this.state.scrollTop-t)>=this.getAdjustedRowHeight()){var s={scrollTop:t,scrollHeight:o,clientHeight:n};this.setState(s)}.6*(o-(t+n)-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 o=e.props.data,s=null,r=null;if(this.props.enableInfiniteScroll&&null!==this.props.rowHeight&&void 0!==this.refs.scrollable){var i=e.getAdjustedRowHeight(),l=Math.ceil(e.state.clientHeight/i),u=Math.max(0,Math.floor(e.state.scrollTop/i)-.25*l),d=Math.min(u+1.25*l,this.props.data.length-1);o=o.slice(u,d+1);var c={height:u*i+"px"};s=n.createElement("tr",{key:"above-"+c.height,style:c});var p={height:(this.props.data.length-d)*i+"px"};r=n.createElement("tr",{key:"below-"+p.height,style:p})}var h=o.map(function(o,s){var r=void 0!==o.children&&o.children.length>0,i=e.props.rowSettings.getRowKey(o,s);return r&&(t=r),n.createElement(a,{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:o,key:i+"-container",uniqueId:i,columnSettings:e.props.columnSettings,rowSettings:e.props.rowSettings,paddingHeight:e.props.paddingHeight,multipleSelectionSettings:e.props.multipleSelectionSettings,rowHeight:e.props.rowHeight,hasChildren:r,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 m=this.props.columnSettings.getVisibleColumnCount();h.push(n.createElement("tr",{key:"no-data-section"},n.createElement("td",{colSpan:m},this.props.noDataSection)))}return s&&h.unshift(s),r&&h.push(r),{nodes:h,anyHasChildren:t}}return null},render:function(){var e=[],t=!1,o=this.getNodeContent();o&&(e=o.nodes,t=o.anyHasChildren);var s=null,a=null,i={width:"100%"};if(this.props.useFixedLayout&&(i.tableLayout="fixed"),this.props.enableInfiniteScroll&&(s={position:"relative",overflowY:"scroll",height:this.props.bodyHeight+"px",width:"100%"}),this.props.externalIsLoading){var l=null,u=null;this.props.useGriddleStyles&&(l={textAlign:"center",paddingBottom:"40px"}),u=this.props.columnSettings.getVisibleColumnCount();var d=this.props.externalLoadingComponent?n.createElement(this.props.externalLoadingComponent,null):n.createElement("div",null,"Loading...");a=n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",{style:l,colSpan:u},d)))}var c=this.props.showTableHeading?n.createElement(r,{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=n.createElement("tbody",null,e));var p=n.createElement("tbody",null);if(this.props.showPager){var h=this.props.useGriddleStyles?{padding:"0px",backgroundColor:"#EDEDED",border:"0px",color:"#222",height:this.props.showNoData?"20px":null}:null;p=n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",{colSpan:this.props.multipleSelectionSettings.isMultipleSelection?this.props.columnSettings.getVisibleColumnCount()+1:this.props.columnSettings.getVisibleColumnCount(),style:h,className:"footer-container"},this.props.showNoData?null:this.props.pagingContent)))}return this.props.useFixedHeader?(this.props.useGriddleStyles&&(i.tableLayout="fixed"),n.createElement("div",null,n.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&i||null},c),n.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:s},n.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&i||null},e,a,p)))):n.createElement("div",{ref:"scrollable",onScroll:this.gridScroll,style:s},n.createElement("table",{className:this.props.className,style:this.props.useGriddleStyles&&i||null},c,e,a,p))}}));e.exports=i},"./node_modules/griddle-react/modules/gridTitle.jsx.js":function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t=0)return!0;return!1})},defaultColumnFilter:function(e,t,o){var n=V(P(o)?o:[o],function(e){return(e||"").toLowerCase()});return I(y.getObjectValues(t),function(e){return e=e.toString().toLowerCase(),I(n,function(t){return e.indexOf(t)>=0})})},filterByColumnFilters:function(e){var t=this.props.columnFilterFunc||this.defaultColumnFilter,o=Object.keys(e).reduce(function(o,n){return N(o,function(o){var s=y.getAt(o,n||""),r=e[n];return t(n||"",s,r)})},this.props.results),n={columnFilters:e};e?(n.filteredResults=o,n.maxPage=this.getMaxPage(n.filteredResults)):this.state.filter?n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(this.props.results,filter):this.defaultFilter(this.props.results,filter):n.filteredResults=null,this.setState(n)},filterByColumn:function(e,t){var o=this.state.columnFilters;if(o.hasOwnProperty(t)&&!e)o=T(o,t);else{var n={};n[t]=e,o=A({},o,n)}this.filterByColumnFilters(o)},setFilter:function(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(this.props.useExternal)return void this.props.externalSetFilter(e);var o=this,n={page:0,filter:e};n.filteredResults=this.props.useCustomFilterer?this.props.customFilterer(t||this.props.results,e):this.defaultFilter(t||this.props.results,e),n.maxPage=o.getMaxPage(n.filteredResults),(M(e)||R(e)||O(e))&&(n.filter=e,n.filteredResults=null),o.setState(n),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 void 0===e||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)return void this.props.externalSetPage(e);if(e*this.state.resultsPerPage<=this.state.resultsPerPage*this.state.maxPage){var t=this,o={page:e};t.setState(o)}this.props.enableInfiniteScroll&&this.setState({isSelectAllChecked:!1})},setColumns:function(e){this.columnSettings.filteredColumns=P(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 o=C(this.props.columnMetadata,{columnName:e})||{},n=o.sortDirectionCycle?o.sortDirectionCycle:[null,"asc","desc"],s=null,r=n.indexOf(this.state.sortDirection&&e===this.state.sortColumn?this.state.sortDirection:null);r=(r+1)%n.length,s=n[r]?n[r]:null;var a={page:0,sortColumn:e,sortDirection:s};this.setState(a)}},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=y.keys(e.results[0]);this.columnSettings.allColumns.length==t.length&&this.columnSettings.allColumns.every(function(e,o){return e===t[o]})||(this.columnSettings.allColumns=t)}else this.columnSettings.allColumns.length>0&&(this.columnSettings.allColumns=[]);if(e.selectedRowIds){var o=this.getDataForRender(this.getCurrentResults(e.results),this.columnSettings.getColumns(),!0);this.setState({isSelectAllChecked:this._getAreAllRowsChecked(e.selectedRowIds,V(o,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?y.keys(this.props.results[0]):[],this.props.columns,this.props.childrenColumnName,this.props.columnMetadata,this.props.metadataColumns),this.rowSettings=new g(this.props.rowMetadata,this.props.useCustomTableRowComponent&&this.props.customTableRowComponent?this.props.customTableRowComponent:p,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,o){var n=this,s=this;if(!this.props.useExternal){if(""!==this.state.sortColumn){var r,a=this.state.sortColumn,i=N(this.props.columnMetadata,{columnName:a}),l={columns:[],orders:[]};if(i.length>0&&(r=i[0].hasOwnProperty("customCompareFn")&&i[0].customCompareFn,i[0].multiSort&&(l=i[0].multiSort)),this.state.sortDirection)if("function"==typeof r)2===r.length?(e=e.sort(function(e,t){return r(D(e,a),D(t,a))}),"desc"===this.state.sortDirection&&e.reverse()):1===r.length&&(e=k(e,function(e){return r(D(e,a))},[this.state.sortDirection]));else{var u=[function(e){return(D(e,a)||"").toString().toLowerCase()}],d=[this.state.sortDirection];l.columns.forEach(function(e,t){u.push(function(t){return(D(t,e)||"").toString().toLowerCase()}),"asc"===l.orders[t]||"desc"===l.orders[t]?d.push(l.orders[t]):d.push(n.state.sortDirection)}),e=k(e,u,d)}}var c=this.getCurrentPage();if(!this.props.useExternal&&o&&this.state.resultsPerPage*(c+1)<=this.state.resultsPerPage*this.state.maxPage&&c>=0)if(this.isInfiniteScrollEnabled())e=w(e,(c+1)*this.state.resultsPerPage);else{var p=j(e,c*this.state.resultsPerPage);e=(b||x)(p,p.length-this.state.resultsPerPage)}}for(var h=[],m=0;m0&&(f.children=s.getDataForRender(f[s.props.childrenColumnName],t,!1),"children"!==s.props.childrenColumnName&&delete f[s.props.childrenColumnName]),h.push(f)}return h},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,o=JSON.parse(JSON.stringify(this.state.selectedRowIds)),n=this;S(e,function(e){n._updateSelectedRowIds(e[n.props.uniqueIdentifier],o,t)},this),this.setState({isSelectAllChecked:t,selectedRowIds:o}),this.props.onSelectionChange&&this.props.onSelectionChange(o,t)},_toggleSelectRow:function(e,t){var o=this.getDataForRender(this.getCurrentResults(),this.columnSettings.getColumns(),!0),n=JSON.parse(JSON.stringify(this.state.selectedRowIds));this._updateSelectedRowIds(e[this.props.uniqueIdentifier],n,t);var s=this._getAreAllRowsChecked(n,V(o,this.props.uniqueIdentifier));this.setState({isSelectAllChecked:s,selectedRowIds:n}),this.props.onSelectionChange&&this.props.onSelectionChange(n,s)},_updateSelectedRowIds:function(e,t,o){o?void 0===C(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===E(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:!C(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?s.createElement(_,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText,customFilterComponent:this.props.customFilterComponent,results:this.props.results,currentResults:this.getCurrentResults()}):s.createElement(l,{changeFilter:this.setFilter,placeholderText:this.props.filterPlaceholderText}):""},getSettings:function(){return this.props.showSettings?s.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 o=null,n=null,r=null;return this.props.useGriddleStyles&&(o=this.getFilterStyles(),n=this.getSettingsStyles(),r=this.getClearFixStyles()),s.createElement("div",{className:"top-section",style:r},s.createElement("div",{className:"griddle-filter",style:o},e),s.createElement("div",{className:"griddle-settings-toggle",style:n},t))},getPagingSection:function(e,t){if(!1!==(this.props.showPager&&!this.isInfiniteScrollEnabled()&&!this.shouldUseCustomGridComponent()))return s.createElement("div",{className:"griddle-footer"},this.props.useCustomPagerComponent?s.createElement(f,{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}):s.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?s.createElement(d,{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 s.createElement(this.props.customGridComponent,n({data:this.props.results,className:this.props.customGridComponentClassName},this.props.gridMetadata))},getCustomRowSection:function(e,t,o,n,r){return s.createElement("div",null,s.createElement(m,{data:e,columns:t,metadataColumns:o,globalData:r,className:this.props.customRowComponentClassName,customComponent:this.props.customRowComponent,style:this.props.useGriddleStyles?this.getClearFixStyles():null}),this.props.showPager&&n)},getStandardGridSection:function(e,t,o,n,r){var a=this.getSortObject(),l=this.getMultipleSelectionObject(),u=this.shouldShowNoDataSection(e),d=this.getNoDataSection();return s.createElement("div",{className:"griddle-body"},s.createElement(i,{useGriddleStyles:this.props.useGriddleStyles,noDataSection:d,showNoData:u,columnSettings:this.columnSettings,rowSettings:this.rowSettings,sortSettings:a,multipleSelectionSettings:l,filterByColumn:this.filterByColumn,isSubGriddle:this.props.isSubGriddle,useGriddleIcons:this.props.useGriddleIcons,useFixedLayout:this.props.useFixedLayout,showPager:this.props.showPager,pagingContent:n,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:r,onRowClick:this.props.onRowClick,onRowMouseEnter:this.props.onRowMouseEnter,onRowMouseLeave:this.props.onRowMouseLeave,onRowWillMount:this.props.onRowWillMount,onRowWillUnmount:this.props.onRowWillUnmount}))},getContentSection:function(e,t,o,n,s,r){return this.shouldUseCustomGridComponent()&&null!==this.props.customGridComponent?this.getCustomGridSection():this.shouldUseCustomRowComponent()?this.getCustomRowSection(e,t,o,n,r):this.getStandardGridSection(e,t,o,n,s)},getNoDataSection:function(){return null!=this.props.customNoDataComponent?s.createElement("div",{className:this.props.noDataClassName},s.createElement(this.props.customNoDataComponent,this.props.customNoDataComponentProps)):s.createElement(c,{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()),o=this.getSettings(),n=this.getTopSection(t,o),r=[],a=this.columnSettings.getColumns(),i=this.getDataForRender(e,a,!0),l=this.columnSettings.getMetadataColumns();this.props.columnMetadata?S(this.props.columnMetadata,function(e){"boolean"==typeof e.visible&&!1===e.visible||r.push(e.columnName)}):r=y.keys(T(e[0],l)),r=this.columnSettings.orderColumns(r);var u=this.getCurrentPage(),d=this.getCurrentMaxPage(),c=u+10?"griddle "+this.props.gridClassName:"griddle";return f+=this.shouldUseCustomRowComponent()?" griddle-custom":"",s.createElement("div",{className:f},n,m,s.createElement("div",{className:"griddle-container",style:this.props.useGriddleStyles&&!this.props.isSubGriddle?{border:"1px solid #DDD"}:null},h))}});h.Griddle=e.exports=H},"./node_modules/griddle-react/modules/rowProperties.js":function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var s=function(){function e(e,t){for(var o=0;o-1}var s=o("./node_modules/lodash/_baseIndexOf.js");e.exports=n},"./node_modules/lodash/_arrayIncludesWith.js":function(e,t){function o(e,t,o){for(var n=-1,s=null==e?0:e.length;++n=d&&(p=u,h=!1,t=new s(t));e:for(;++c0&&o(d)?t>1?n(d,t-1,o,a,i):s(i,d):a||(i[i.length]=d)}return i}var s=o("./node_modules/lodash/_arrayPush.js"),r=o("./node_modules/lodash/_isFlattenable.js");e.exports=n},"./node_modules/lodash/_baseFor.js":function(e,t,o){var n=o("./node_modules/lodash/_createBaseFor.js"),s=n();e.exports=s},"./node_modules/lodash/_baseForOwn.js":function(e,t,o){function n(e,t){return e&&s(e,t,r)}var s=o("./node_modules/lodash/_baseFor.js"),r=o("./node_modules/lodash/keys.js");e.exports=n},"./node_modules/lodash/_baseGet.js":function(e,t,o){function n(e,t){t=s(t,e);for(var o=0,n=t.length;null!=e&&o=120&&v.length>=120)?new s(h&&v):void 0}v=e[0];var g=-1,y=m[0];e:for(;++gs?0:s+t),o=o>s?s:o,o<0&&(o+=s),s=t>o?0:o-t>>>0,t>>>=0;for(var r=Array(s);++nt||a&&i&&u&&!l&&!d||n&&i&&u||!o&&u||!r)return 1;if(!n&&!a&&!d&&e=l?u:u*("desc"==o[n]?-1:1)}return e.index-t.index}var s=o("./node_modules/lodash/_compareAscending.js");e.exports=n},"./node_modules/lodash/_copyArray.js":function(e,t){function o(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o1?o[s-1]:void 0,i=s>2?o[2]:void 0;for(a=e.length>3&&"function"==typeof a?(s--,a):void 0,i&&r(o[0],o[1],i)&&(a=s<3?void 0:a,s=1),t=Object(t);++n-1?i[l?t[u]:u]:void 0}}var s=o("./node_modules/lodash/_baseIteratee.js"),r=o("./node_modules/lodash/isArrayLike.js"),a=o("./node_modules/lodash/keys.js");e.exports=n},"./node_modules/lodash/_createToPairs.js":function(e,t,o){function n(e){return function(t){var o=r(t);return o==l?a(t):o==u?i(t):s(t,e(t))}}var s=o("./node_modules/lodash/_baseToPairs.js"),r=o("./node_modules/lodash/_getTag.js"),a=o("./node_modules/lodash/_mapToArray.js"),i=o("./node_modules/lodash/_setToPairs.js"),l="[object Map]",u="[object Set]";e.exports=n},"./node_modules/lodash/_customOmitClone.js":function(e,t,o){function n(e){return s(e)?void 0:e}var s=o("./node_modules/lodash/isPlainObject.js");e.exports=n},"./node_modules/lodash/_defineProperty.js":function(e,t,o){var n=o("./node_modules/lodash/_getNative.js"),s=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=s},"./node_modules/lodash/_equalArrays.js":function(e,t,o){function n(e,t,o,n,u,d){var c=o&i,p=e.length,h=t.length;if(p!=h&&!(c&&h>p))return!1;var m=d.get(e),f=d.get(t);if(m&&f)return m==t&&f==e;var _=-1,v=!0,g=o&l?new s:void 0;for(d.set(e,t),d.set(t,e);++_-1&&e%1==0&&e-1}var s=o("./node_modules/lodash/_assocIndexOf.js");e.exports=n},"./node_modules/lodash/_listCacheSet.js":function(e,t,o){function n(e,t){var o=this.__data__,n=s(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this}var s=o("./node_modules/lodash/_assocIndexOf.js");e.exports=n},"./node_modules/lodash/_mapCacheClear.js":function(e,t,o){function n(){this.size=0,this.__data__={hash:new s,map:new(a||r),string:new s}}var s=o("./node_modules/lodash/_Hash.js"),r=o("./node_modules/lodash/_ListCache.js"),a=o("./node_modules/lodash/_Map.js");e.exports=n},"./node_modules/lodash/_mapCacheDelete.js":function(e,t,o){function n(e){var t=s(this,e).delete(e);return this.size-=t?1:0,t}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapCacheGet.js":function(e,t,o){function n(e){return s(this,e).get(e)}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapCacheHas.js":function(e,t,o){function n(e){return s(this,e).has(e)}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapCacheSet.js":function(e,t,o){function n(e,t){var o=s(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this}var s=o("./node_modules/lodash/_getMapData.js");e.exports=n},"./node_modules/lodash/_mapToArray.js":function(e,t){function o(e){var t=-1,o=Array(e.size);return e.forEach(function(e,n){o[++t]=[n,e]}),o}e.exports=o},"./node_modules/lodash/_matchesStrictComparable.js":function(e,t){function o(e,t){return function(o){return null!=o&&o[e]===t&&(void 0!==t||e in Object(o))}}e.exports=o},"./node_modules/lodash/_memoizeCapped.js":function(e,t,o){function n(e){var t=s(e,function(e){return o.size===r&&o.clear(),e}),o=t.cache;return t}var s=o("./node_modules/lodash/memoize.js"),r=500;e.exports=n},"./node_modules/lodash/_nativeCreate.js":function(e,t,o){var n=o("./node_modules/lodash/_getNative.js"),s=n(Object,"create");e.exports=s},"./node_modules/lodash/_nativeKeys.js":function(e,t,o){var n=o("./node_modules/lodash/_overArg.js"),s=n(Object.keys,Object);e.exports=s},"./node_modules/lodash/_nativeKeysIn.js":function(e,t){function o(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}e.exports=o},"./node_modules/lodash/_nodeUtil.js":function(e,t,o){(function(e){var n=o("./node_modules/lodash/_freeGlobal.js"),s="object"==typeof t&&t&&!t.nodeType&&t,r=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=r&&r.exports===s,i=a&&n.process,l=function(){try{return r&&r.require&&r.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=l}).call(t,o("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/_objectToString.js":function(e,t){function o(e){return s.call(e)}var n=Object.prototype,s=n.toString;e.exports=o},"./node_modules/lodash/_overArg.js":function(e,t){function o(e,t){return function(o){return e(t(o))}}e.exports=o},"./node_modules/lodash/_overRest.js":function(e,t,o){function n(e,t,o){return t=r(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=r(n.length-t,0),l=Array(i);++a0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,s=16,r=Date.now;e.exports=o},"./node_modules/lodash/_stackClear.js":function(e,t,o){function n(){this.__data__=new s,this.size=0}var s=o("./node_modules/lodash/_ListCache.js");e.exports=n},"./node_modules/lodash/_stackDelete.js":function(e,t){function o(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}e.exports=o},"./node_modules/lodash/_stackGet.js":function(e,t){function o(e){return this.__data__.get(e)}e.exports=o},"./node_modules/lodash/_stackHas.js":function(e,t){function o(e){return this.__data__.has(e)}e.exports=o},"./node_modules/lodash/_stackSet.js":function(e,t,o){function n(e,t){var o=this.__data__;if(o instanceof s){var n=o.__data__;if(!r||n.length2?t[2]:void 0;for(u&&r(t[0],t[1],u)&&(n=1);++o-1:!!d&&s(e,t,o)>-1}var s=o("./node_modules/lodash/_baseIndexOf.js"),r=o("./node_modules/lodash/isArrayLike.js"),a=o("./node_modules/lodash/isString.js"),i=o("./node_modules/lodash/toInteger.js"),l=o("./node_modules/lodash/values.js"),u=Math.max;e.exports=n},"./node_modules/lodash/initial.js":function(e,t,o){function n(e){return(null==e?0:e.length)?s(e,0,-1):[]}var s=o("./node_modules/lodash/_baseSlice.js");e.exports=n},"./node_modules/lodash/intersection.js":function(e,t,o){var n=o("./node_modules/lodash/_arrayMap.js"),s=o("./node_modules/lodash/_baseIntersection.js"),r=o("./node_modules/lodash/_baseRest.js"),a=o("./node_modules/lodash/_castArrayLikeObject.js"),i=r(function(e){var t=n(e,a);return t.length&&t[0]===e[0]?s(t):[]});e.exports=i},"./node_modules/lodash/isArguments.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsArguments.js"),s=o("./node_modules/lodash/isObjectLike.js"),r=Object.prototype,a=r.hasOwnProperty,i=r.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return s(e)&&a.call(e,"callee")&&!i.call(e,"callee")};e.exports=l},"./node_modules/lodash/isArray.js":function(e,t){var o=Array.isArray;e.exports=o},"./node_modules/lodash/isArrayLike.js":function(e,t,o){function n(e){return null!=e&&r(e.length)&&!s(e)}var s=o("./node_modules/lodash/isFunction.js"),r=o("./node_modules/lodash/isLength.js");e.exports=n},"./node_modules/lodash/isArrayLikeObject.js":function(e,t,o){function n(e){return r(e)&&s(e)}var s=o("./node_modules/lodash/isArrayLike.js"),r=o("./node_modules/lodash/isObjectLike.js");e.exports=n},"./node_modules/lodash/isBuffer.js":function(e,t,o){(function(e){var n=o("./node_modules/lodash/_root.js"),s=o("./node_modules/lodash/stubFalse.js"),r="object"==typeof t&&t&&!t.nodeType&&t,a=r&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i?n.Buffer:void 0,u=l?l.isBuffer:void 0,d=u||s;e.exports=d}).call(t,o("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/lodash/isEmpty.js":function(e,t,o){function n(e){if(null==e)return!0;if(l(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||c(e)||a(e)))return!e.length;var t=r(e);if(t==p||t==h)return!e.size;if(d(e))return!s(e).length;for(var o in e)if(f.call(e,o))return!1;return!0}var s=o("./node_modules/lodash/_baseKeys.js"),r=o("./node_modules/lodash/_getTag.js"),a=o("./node_modules/lodash/isArguments.js"),i=o("./node_modules/lodash/isArray.js"),l=o("./node_modules/lodash/isArrayLike.js"),u=o("./node_modules/lodash/isBuffer.js"),d=o("./node_modules/lodash/_isPrototype.js"),c=o("./node_modules/lodash/isTypedArray.js"),p="[object Map]",h="[object Set]",m=Object.prototype,f=m.hasOwnProperty;e.exports=n},"./node_modules/lodash/isFunction.js":function(e,t,o){function n(e){if(!r(e))return!1;var t=s(e);return t==i||t==l||t==a||t==u}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/isObject.js"),a="[object AsyncFunction]",i="[object Function]",l="[object GeneratorFunction]",u="[object Proxy]";e.exports=n},"./node_modules/lodash/isLength.js":function(e,t){function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=o},"./node_modules/lodash/isMap.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsMap.js"),s=o("./node_modules/lodash/_baseUnary.js"),r=o("./node_modules/lodash/_nodeUtil.js"),a=r&&r.isMap,i=a?s(a):n;e.exports=i},"./node_modules/lodash/isNull.js":function(e,t){function o(e){return null===e}e.exports=o},"./node_modules/lodash/isObject.js":function(e,t){function o(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=o},"./node_modules/lodash/isObjectLike.js":function(e,t){function o(e){return null!=e&&"object"==typeof e}e.exports=o},"./node_modules/lodash/isPlainObject.js":function(e,t,o){function n(e){if(!a(e)||s(e)!=i)return!1;var t=r(e);if(null===t)return!0;var o=c.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&d.call(o)==p}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/_getPrototype.js"),a=o("./node_modules/lodash/isObjectLike.js"),i="[object Object]",l=Function.prototype,u=Object.prototype,d=l.toString,c=u.hasOwnProperty,p=d.call(Object);e.exports=n},"./node_modules/lodash/isSet.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsSet.js"),s=o("./node_modules/lodash/_baseUnary.js"),r=o("./node_modules/lodash/_nodeUtil.js"),a=r&&r.isSet,i=a?s(a):n;e.exports=i},"./node_modules/lodash/isString.js":function(e,t,o){function n(e){return"string"==typeof e||!r(e)&&a(e)&&s(e)==i}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/isArray.js"),a=o("./node_modules/lodash/isObjectLike.js"),i="[object String]";e.exports=n},"./node_modules/lodash/isSymbol.js":function(e,t,o){function n(e){return"symbol"==typeof e||r(e)&&s(e)==a}var s=o("./node_modules/lodash/_baseGetTag.js"),r=o("./node_modules/lodash/isObjectLike.js"),a="[object Symbol]";e.exports=n},"./node_modules/lodash/isTypedArray.js":function(e,t,o){var n=o("./node_modules/lodash/_baseIsTypedArray.js"),s=o("./node_modules/lodash/_baseUnary.js"),r=o("./node_modules/lodash/_nodeUtil.js"),a=r&&r.isTypedArray,i=a?s(a):n;e.exports=i},"./node_modules/lodash/isUndefined.js":function(e,t){function o(e){return void 0===e}e.exports=o},"./node_modules/lodash/keys.js":function(e,t,o){function n(e){return a(e)?s(e):r(e)}var s=o("./node_modules/lodash/_arrayLikeKeys.js"),r=o("./node_modules/lodash/_baseKeys.js"),a=o("./node_modules/lodash/isArrayLike.js");e.exports=n},"./node_modules/lodash/keysIn.js":function(e,t,o){function n(e){return a(e)?s(e,!0):r(e)}var s=o("./node_modules/lodash/_arrayLikeKeys.js"),r=o("./node_modules/lodash/_baseKeysIn.js"),a=o("./node_modules/lodash/isArrayLike.js");e.exports=n},"./node_modules/lodash/last.js":function(e,t){function o(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=o},"./node_modules/lodash/map.js":function(e,t,o){function n(e,t){return(i(e)?s:a)(e,r(t,3))}var s=o("./node_modules/lodash/_arrayMap.js"),r=o("./node_modules/lodash/_baseIteratee.js"),a=o("./node_modules/lodash/_baseMap.js"),i=o("./node_modules/lodash/isArray.js");e.exports=n},"./node_modules/lodash/memoize.js":function(e,t,o){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(r);var o=function(){var n=arguments,s=t?t.apply(this,n):n[0],r=o.cache;if(r.has(s))return r.get(s);var a=e.apply(this,n);return o.cache=r.set(s,a)||r,a};return o.cache=new(n.Cache||s),o}var s=o("./node_modules/lodash/_MapCache.js"),r="Expected a function";n.Cache=s,e.exports=n},"./node_modules/lodash/omit.js":function(e,t,o){var n=o("./node_modules/lodash/_arrayMap.js"),s=o("./node_modules/lodash/_baseClone.js"),r=o("./node_modules/lodash/_baseUnset.js"),a=o("./node_modules/lodash/_castPath.js"),i=o("./node_modules/lodash/_copyObject.js"),l=o("./node_modules/lodash/_customOmitClone.js"),u=o("./node_modules/lodash/_flatRest.js"),d=o("./node_modules/lodash/_getAllKeysIn.js"),c=u(function(e,t){var o={};if(null==e)return o;var u=!1;t=n(t,function(t){return t=a(t,e),u||(u=t.length>1),t}),i(e,d(e),o),u&&(o=s(o,7,l));for(var c=t.length;c--;)r(o,t[c]);return o});e.exports=c},"./node_modules/lodash/orderBy.js":function(e,t,o){function n(e,t,o,n){return null==e?[]:(r(t)||(t=null==t?[]:[t]),o=n?void 0:o,r(o)||(o=null==o?[]:[o]),s(e,t,o))}var s=o("./node_modules/lodash/_baseOrderBy.js"),r=o("./node_modules/lodash/isArray.js");e.exports=n},"./node_modules/lodash/pick.js":function(e,t,o){var n=o("./node_modules/lodash/_basePick.js"),s=o("./node_modules/lodash/_flatRest.js"),r=s(function(e,t){return null==e?{}:n(e,t)});e.exports=r},"./node_modules/lodash/property.js":function(e,t,o){function n(e){return a(e)?s(i(e)):r(e)}var s=o("./node_modules/lodash/_baseProperty.js"),r=o("./node_modules/lodash/_basePropertyDeep.js"),a=o("./node_modules/lodash/_isKey.js"),i=o("./node_modules/lodash/_toKey.js");e.exports=n},"./node_modules/lodash/some.js":function(e,t,o){function n(e,t,o){var n=i(e)?s:a;return o&&l(e,t,o)&&(t=void 0),n(e,r(t,3))}var s=o("./node_modules/lodash/_arraySome.js"),r=o("./node_modules/lodash/_baseIteratee.js"),a=o("./node_modules/lodash/_baseSome.js"),i=o("./node_modules/lodash/isArray.js"),l=o("./node_modules/lodash/_isIterateeCall.js");e.exports=n},"./node_modules/lodash/sortBy.js":function(e,t,o){var n=o("./node_modules/lodash/_baseFlatten.js"),s=o("./node_modules/lodash/_baseOrderBy.js"),r=o("./node_modules/lodash/_baseRest.js"),a=o("./node_modules/lodash/_isIterateeCall.js"),i=r(function(e,t){if(null==e)return[];var o=t.length;return o>1&&a(e,t[0],t[1])?t=[]:o>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),s(e,n(t,1),[])});e.exports=i},"./node_modules/lodash/stubArray.js":function(e,t){function o(){return[]}e.exports=o},"./node_modules/lodash/stubFalse.js":function(e,t){function o(){return!1}e.exports=o},"./node_modules/lodash/take.js":function(e,t,o){function n(e,t,o){return e&&e.length?(t=o||void 0===t?1:r(t),s(e,0,t<0?0:t)):[]}var s=o("./node_modules/lodash/_baseSlice.js"),r=o("./node_modules/lodash/toInteger.js");e.exports=n},"./node_modules/lodash/toFinite.js":function(e,t,o){function n(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*a:e===e?e:0:0===e?e:0}var s=o("./node_modules/lodash/toNumber.js"),r=1/0,a=1.7976931348623157e308;e.exports=n},"./node_modules/lodash/toInteger.js":function(e,t,o){function n(e){var t=s(e),o=t%1;return t===t?o?t-o:t:0}var s=o("./node_modules/lodash/toFinite.js");e.exports=n},"./node_modules/lodash/toNumber.js":function(e,t,o){function n(e){if("number"==typeof e)return e;if(a(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var o=u.test(e);return o||d.test(e)?c(e.slice(2),o?2:8):l.test(e)?i:+e}var s=o("./node_modules/lodash/_baseTrim.js"),r=o("./node_modules/lodash/isObject.js"),a=o("./node_modules/lodash/isSymbol.js"),i=NaN,l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,c=parseInt;e.exports=n},"./node_modules/lodash/toPairs.js":function(e,t,o){var n=o("./node_modules/lodash/_createToPairs.js"),s=o("./node_modules/lodash/keys.js"),r=n(s);e.exports=r},"./node_modules/lodash/toString.js":function(e,t,o){function n(e){return null==e?"":s(e)}var s=o("./node_modules/lodash/_baseToString.js");e.exports=n},"./node_modules/lodash/uniqueId.js":function(e,t,o){function n(e){var t=++r;return s(e)+t}var s=o("./node_modules/lodash/toString.js"),r=0;e.exports=n},"./node_modules/lodash/values.js":function(e,t,o){function n(e){return null==e?[]:s(e,r(e))}var s=o("./node_modules/lodash/_baseValues.js"),r=o("./node_modules/lodash/keys.js");e.exports=n},"./node_modules/lodash/without.js":function(e,t,o){var n=o("./node_modules/lodash/_baseDifference.js"),s=o("./node_modules/lodash/_baseRest.js"),r=o("./node_modules/lodash/isArrayLikeObject.js"),a=s(function(e,t){return r(e)?n(e,t):[]});e.exports=a},"./node_modules/lodash/zipObject.js":function(e,t,o){function n(e,t){return r(e||[],t||[],s)}var s=o("./node_modules/lodash/_assignValue.js"),r=o("./node_modules/lodash/_baseZipObject.js");e.exports=n},"./node_modules/object-assign/index.js":function(e,t,o){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;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={},o=0;o<10;o++)t["_"+String.fromCharCode(o)]=o;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var o,i,l=n(e),u=1;u=0||Object.prototype.hasOwnProperty.call(e,n)&&(o[n]=e[n]);return o}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return function(o){return t.createElement(c,l({component:e},o))}}var l=Object.assign||function(e){for(var t=1;t>>((3&t)<<3)&255;return s}}},"./node_modules/uuid/v1.js":function(e,t,o){function n(e,t,o){var n=t&&o||0,d=t||[];e=e||{};var c=e.node||s,p=void 0!==e.clockseq?e.clockseq:r;if(null==c||null==p){var h=a();null==c&&(c=s=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=r=16383&(h[6]<<8|h[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:u+1,_=m-l+(f-u)/1e4;if(_<0&&void 0===e.clockseq&&(p=p+1&16383),(_<0||m>l)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=m,u=f,r=p,m+=122192928e5;var v=(1e4*(268435455&m)+f)%4294967296;d[n++]=v>>>24&255,d[n++]=v>>>16&255,d[n++]=v>>>8&255,d[n++]=255&v;var g=m/4294967296*1e4&268435455;d[n++]=g>>>8&255,d[n++]=255&g,d[n++]=g>>>24&15|16,d[n++]=g>>>16&255,d[n++]=p>>>8|128,d[n++]=255&p;for(var y=0;y<6;++y)d[n+y]=c[y];return t||i(d)}var s,r,a=o("./node_modules/uuid/lib/rng-browser.js"),i=o("./node_modules/uuid/lib/bytesToUuid.js"),l=0,u=0;e.exports=n},"./node_modules/webpack/buildin/global.js":function(e,t){var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(o=window)}e.exports=o},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},0:function(e,t){e.exports=React},1:function(e,t){e.exports=PropTypes},10:function(e,t){e.exports=Reactstrap},11:function(e,t){e.exports=ViewModeActions},12:function(e,t){e.exports=jQuery},13:function(e,t){e.exports=Config},14:function(e,t){e.exports=FormBuilderLoader},15:function(e,t){e.exports=ReactDom},16:function(e,t){e.exports=moment},2:function(e,t){e.exports=Injector},3:function(e,t){e.exports=i18n},4:function(e,t){e.exports=ReactRedux},5:function(e,t){e.exports=Redux},6:function(e,t){e.exports=classnames},7:function(e,t){e.exports=GraphQLTag},8:function(e,t){e.exports=Loading},9:function(e,t){e.exports=ReactApollo}}); \ No newline at end of file diff --git a/client/dist/styles/bundle.css b/client/dist/styles/bundle.css index dac9937..eb3dd60 100644 --- a/client/dist/styles/bundle.css +++ b/client/dist/styles/bundle.css @@ -1,2 +1 @@ -#Form_EditForm_OtherDropdown_Holder{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:-1.5385rem -1.5385rem 0;border-bottom:1px solid #ced5e1;padding:3.077rem;background-color:#fff}#Form_EditForm_error.good+fieldset>#Form_EditForm_OtherDropdown_Holder,#Form_EditForm_error.info+fieldset>#Form_EditForm_OtherDropdown_Holder,#Form_EditForm_error.warning+fieldset>#Form_EditForm_OtherDropdown_Holder{margin-top:0}#Form_EditForm_OtherDropdown_Holder:after{border-bottom:none}#Form_EditForm_OtherDropdown_Holder .form__field-label{max-width:none;width:auto;margin-bottom:.9231rem;color:#566b8d;font-size:19px}#Form_EditForm_OtherDropdown_Holder .form__field-holder{width:100%;max-width:23rem}.history-viewer>.panel--padded{padding-top:0}.history-viewer.history-viewer__compare-mode .panel--padded{padding-top:30px}.history-viewer--no-margins{margin-left:-1.5385rem;margin-right:-1.5385rem}.panel--padded-side{padding-bottom:0;padding-top:0}.history-viewer__form{position:relative}.history-viewer__message .text-muted{margin-right:10px}.history-viewer__compare-button{border:1px solid #fff;color:#fff;margin-right:1rem}.history-viewer__close-button{background:transparent;border:1px solid #fff;border-radius:50%;color:#fff;padding:.4rem .55rem}.history-viewer__close-button:before{font-size:1.4rem}.history-viewer__messages .message-box:first-child{margin-top:1.5385rem}.history-viewer__messages .message-box:last-child{margin-bottom:0}.history-viewer-preview{position:relative;display:-webkit-box;display:-webkit-flex;display:flex}.history-viewer-preview__underlay{position:absolute;width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.history-viewer-preview__frame{background-color:transparent}.history-viewer-preview__frame .preview__iframe{background-color:#fff}.history-viewer-preview__spinner{margin-bottom:1em;font-size:.923rem;position:relative;text-indent:-9999em;border:.26em solid transparent;border-left:.26em solid #005a93;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:spinner-loader .9s infinite linear;-o-animation:spinner-loader .9s infinite linear;animation:spinner-loader .9s infinite linear}.history-viewer-preview__spinner,.history-viewer-preview__spinner:after{border-radius:50%;width:3em;height:3em}.history-viewer__toolbar--condensed{min-width:50%;width:50%}.history-viewer__version-detail-diff del{color:#da273b}.history-viewer__version-detail-diff ins{background-color:#f0fff0;text-decoration:none}@media (max-width:991.98px){.history-viewer-preview{display:none}}@-webkit-keyframes spinner-loader{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-o-keyframes spinner-loader{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spinner-loader{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}.history-viewer__compare-notice{border-top:none;border-radius:0 0 .23rem .23rem;padding:0;position:absolute;left:50%;-webkit-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);z-index:2}.history-viewer__compare-notice .notice-message{padding:.4rem 1rem .4rem 1.5rem;vertical-align:middle}.history-viewer__compare-notice button{background-color:inherit;color:inherit;border-width:0 0 0 1px;border-color:#bde0f1;margin-right:0;border-radius:0 0 .23rem 0}.history-viewer__compare-notice button:hover{background-color:#bde0f1}.history-viewer__actions-dropdown .form-check-label{text-transform:none}.history-viewer__actions-dropdown .btn[class*=font-icon-]:before{margin-right:0}.history-viewer__actions-dropdown.show .dropdown-menu{min-width:14rem}.history-viewer__actions-dropdown .form-check{margin-top:.5rem}.history-viewer__heading{font-size:.923rem;text-transform:uppercase}.history-viewer__heading span:first-child{margin-left:28px}.history-viewer.history-viewer__compare-mode .history-viewer__snapshot .history-viewer__version-link:hover,.history-viewer__row--current .history-viewer__version-link{cursor:default}.history-viewer__selected-message,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected .history-viewer__close-button{display:none}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected .history-viewer__selected-message{display:block}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus-within .history-viewer__selected-message,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__selected-message{display:none}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus-within .history-viewer__close-button,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__close-button{display:block}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus .history-viewer__selected-message,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__selected-message{display:none}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus .history-viewer__close-button,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__close-button{display:block}.history-viewer__row.history-viewer__snapshot{background:transparent;position:relative}.history-viewer__row.history-viewer__snapshot:before{content:"";width:2px;position:absolute;top:0;bottom:0;background:#ccc;left:23px}.history-viewer__row.history-viewer__snapshot:after{content:"";width:10px;height:10px;border-radius:99px;background:#bbb;position:absolute;left:19px;top:50%;margin-top:-5px}.history-viewer__row.history-viewer__snapshot--initial:before{top:2rem}.history-viewer__row.history-viewer__snapshot--muted .history-viewer__version-link *{color:#ddd!important}.history-viewer__row.history-viewer__snapshot.history-viewer__row--current:after,.history-viewer__row.history-viewer__snapshot.history-viewer__row--current:before{display:none}.history-viewer__table{padding:0}.history-viewer__table li{display:-webkit-box;display:-webkit-flex;display:flex;list-style-type:none}.history-viewer__table--comparison-selected{margin-bottom:0;border-bottom:5px solid #303b4d}.history-viewer__heading,.history-viewer__row{border-bottom:1px solid #dbe0e9}.history-viewer__row{background-color:#fff}.history-viewer__row:active,.history-viewer__row:hover{background-color:#f0f4f7}.history-viewer__version-link{color:inherit;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;padding-left:32px}.history-viewer__version-link:active,.history-viewer__version-link:hover{color:inherit;text-decoration:none}.history-viewer__table--current .history-viewer__version-link:hover{cursor:default}.history-viewer__actions,.history-viewer__author,.history-viewer__message,.history-viewer__version-no,.history-viewer__version-state{padding:1.2308rem}.history-viewer__author,.history-viewer__message,.history-viewer__version-state{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;width:50%}.history-viewer__message{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.history-viewer__actions,.history-viewer__message{display:-webkit-box;display:-webkit-flex;display:flex}.history-viewer__actions{padding-top:0;padding-bottom:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;min-width:12rem}.table .history-viewer__row--current,.table .history-viewer__row--current:hover{background-color:#0071c4;color:#fff}.table .history-viewer__row--current .text-muted{color:#fff!important}.history-viewer__table--current{margin-bottom:.76925rem}.history-viewer__pagination select{width:auto} -/*# sourceMappingURL=bundle.css.map*/ \ No newline at end of file +#Form_EditForm_OtherDropdown_Holder{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin:-1.5385rem -1.5385rem 0;border-bottom:1px solid #ced5e1;padding:3.077rem;background-color:#fff}#Form_EditForm_error.good+fieldset>#Form_EditForm_OtherDropdown_Holder,#Form_EditForm_error.info+fieldset>#Form_EditForm_OtherDropdown_Holder,#Form_EditForm_error.warning+fieldset>#Form_EditForm_OtherDropdown_Holder{margin-top:0}#Form_EditForm_OtherDropdown_Holder:after{border-bottom:none}#Form_EditForm_OtherDropdown_Holder .form__field-label{max-width:none;width:auto;margin-bottom:.9231rem;color:#566b8d;font-size:19px}#Form_EditForm_OtherDropdown_Holder .form__field-holder{width:100%;max-width:23rem}.history-viewer>.panel--padded{padding-top:0}.history-viewer.history-viewer__compare-mode .panel--padded{padding-top:30px}.history-viewer--no-margins{margin-left:-1.5385rem;margin-right:-1.5385rem}.panel--padded-side{padding-bottom:0;padding-top:0}.history-viewer__form{position:relative}.history-viewer__message .text-muted{margin-right:10px}.history-viewer__compare-button{border:1px solid #fff;color:#fff;margin-right:1rem}.history-viewer__close-button{background:transparent;border:1px solid #fff;border-radius:50%;color:#fff;padding:.4rem .55rem}.history-viewer__close-button:before{font-size:1.4rem}.history-viewer__messages .message-box:first-child{margin-top:1.5385rem}.history-viewer__messages .message-box:last-child{margin-bottom:0}.history-viewer-preview{position:relative;display:-webkit-box;display:-webkit-flex;display:flex}.history-viewer-preview__underlay{position:absolute;width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.history-viewer-preview__frame{background-color:transparent}.history-viewer-preview__frame .preview__iframe{background-color:#fff}.history-viewer-preview__spinner{margin-bottom:1em;font-size:.923rem;position:relative;text-indent:-9999em;border:.26em solid transparent;border-left:.26em solid #005a93;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:spinner-loader .9s infinite linear;-o-animation:spinner-loader .9s infinite linear;animation:spinner-loader .9s infinite linear}.history-viewer-preview__spinner,.history-viewer-preview__spinner:after{border-radius:50%;width:3em;height:3em}.history-viewer__toolbar--condensed{min-width:50%;width:50%}.history-viewer__version-detail-diff del{color:#da273b}.history-viewer__version-detail-diff ins{background-color:#f0fff0;text-decoration:none}@media (max-width:991.98px){.history-viewer-preview{display:none}}@-webkit-keyframes spinner-loader{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-o-keyframes spinner-loader{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spinner-loader{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);-o-transform:rotate(1turn);transform:rotate(1turn)}}.history-viewer__compare-notice{border-top:none;border-radius:0 0 .23rem .23rem;padding:0;position:absolute;left:50%;-webkit-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%);z-index:2}.history-viewer__compare-notice .notice-message{padding:.4rem 1rem .4rem 1.5rem;vertical-align:middle}.history-viewer__compare-notice button{background-color:inherit;color:inherit;border-width:0 0 0 1px;border-color:#bde0f1;margin-right:0;border-radius:0 0 .23rem 0}.history-viewer__compare-notice button:hover{background-color:#bde0f1}.history-viewer__actions-dropdown .form-check-label{text-transform:none}.history-viewer__actions-dropdown .btn[class*=font-icon-]:before{margin-right:0}.history-viewer__actions-dropdown.show .dropdown-menu{min-width:14rem}.history-viewer__actions-dropdown .form-check{margin-top:.5rem}.history-viewer__heading{font-size:.923rem;text-transform:uppercase}.history-viewer__heading span:first-child{margin-left:28px}.history-viewer.history-viewer__compare-mode .history-viewer__snapshot .history-viewer__version-link:hover,.history-viewer__row--current .history-viewer__version-link{cursor:default}.history-viewer__selected-message,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected .history-viewer__close-button{display:none}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected .history-viewer__selected-message{display:block}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus-within .history-viewer__selected-message,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__selected-message{display:none}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus-within .history-viewer__close-button,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__close-button{display:block}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus .history-viewer__selected-message,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__selected-message{display:none}.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:focus .history-viewer__close-button,.history-viewer__table--headerless .history-viewer__row--current.history-viewer__row--comparison-selected:hover .history-viewer__close-button{display:block}.history-viewer__row.history-viewer__snapshot{background:transparent;position:relative}.history-viewer__row.history-viewer__snapshot:before{content:"";width:2px;position:absolute;top:0;bottom:0;background:#ccc;left:23px}.history-viewer__row.history-viewer__snapshot:after{content:"";width:10px;height:10px;border-radius:99px;background:#bbb;position:absolute;left:19px;top:50%;margin-top:-5px}.history-viewer__row.history-viewer__snapshot--initial:before{top:2rem}.history-viewer__row.history-viewer__snapshot--muted .history-viewer__version-link *{color:#ddd!important}.history-viewer__row.history-viewer__snapshot.history-viewer__row--current:after,.history-viewer__row.history-viewer__snapshot.history-viewer__row--current:before{display:none}.history-viewer__table{padding:0}.history-viewer__table li{display:-webkit-box;display:-webkit-flex;display:flex;list-style-type:none}.history-viewer__table--comparison-selected{margin-bottom:0;border-bottom:5px solid #303b4d}.history-viewer__heading,.history-viewer__row{border-bottom:1px solid #dbe0e9}.history-viewer__row{background-color:#fff}.history-viewer__row:active,.history-viewer__row:hover{background-color:#f0f4f7}.history-viewer__version-link{color:inherit;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;padding-left:32px}.history-viewer__version-link:active,.history-viewer__version-link:hover{color:inherit;text-decoration:none}.history-viewer__table--current .history-viewer__version-link:hover{cursor:default}.history-viewer__actions,.history-viewer__author,.history-viewer__message,.history-viewer__version-no,.history-viewer__version-state{padding:1.2308rem}.history-viewer__author,.history-viewer__message,.history-viewer__version-state{-webkit-box-flex:1;-webkit-flex-grow:1;flex-grow:1;width:50%}.history-viewer__message{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.history-viewer__actions,.history-viewer__message{display:-webkit-box;display:-webkit-flex;display:flex}.history-viewer__actions{padding-top:0;padding-bottom:0;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;min-width:12rem}.table .history-viewer__row--current,.table .history-viewer__row--current:hover{background-color:#0071c4;color:#fff}.table .history-viewer__row--current .text-muted{color:#fff!important}.history-viewer__table--current{margin-bottom:.76925rem}.history-viewer__pagination select{width:auto} \ No newline at end of file diff --git a/client/src/components/HistoryViewer/HistoryViewerSnapshot.js b/client/src/components/HistoryViewer/HistoryViewerSnapshot.js index 392afd7..b0fcee7 100644 --- a/client/src/components/HistoryViewer/HistoryViewerSnapshot.js +++ b/client/src/components/HistoryViewer/HistoryViewerSnapshot.js @@ -58,7 +58,7 @@ class HistoryViewerSnapshot extends Component { render() { const { version, StateComponent, FormActionComponent, isComparing, isActive } = this.props; - const { Author: { firstName, surname } } = version; + const { author: { firstName, surname } } = version; const author = `${firstName || ''} ${surname || ''}`; const rowTitle = i18n._t('HistoryViewerSnapshot.GO_TO_SNAPSHOT', 'Go to snapshot at {date}'); @@ -73,7 +73,7 @@ class HistoryViewerSnapshot extends Component { tabIndex={isComparing ? -1 : 0} > - {version.ActivityAgo} + {version.activityAgo} {' '} {getDateFromVersion(version)} diff --git a/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js b/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js index 1495059..9c861c4 100644 --- a/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js +++ b/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js @@ -25,14 +25,14 @@ class HistoryViewerSnapshotState extends VersionedState { } getPublishedState() { - const { ActivityDescription, ActivityType } = this.props.version; + const { activityDescription, activityType } = this.props.version; - const prefix = this.translateType(ActivityType); - const lines = ActivityDescription.split('\n'); + const prefix = this.translateType(activityType); + const lines = activityDescription.split('\n'); if (lines.length > 1) { return lines.map((l, i) =>
{l}
); } - return `${prefix} ${ActivityDescription}`; + return `${prefix} ${activityDescription}`; } getBadges() { diff --git a/client/src/components/HistoryViewer/HistoryViewerVersion.js b/client/src/components/HistoryViewer/HistoryViewerVersion.js index 92b04a8..cd2fb72 100644 --- a/client/src/components/HistoryViewer/HistoryViewerVersion.js +++ b/client/src/components/HistoryViewer/HistoryViewerVersion.js @@ -32,9 +32,9 @@ class HistoryViewerVersion extends Component { * @returns {string} */ getAuthor() { - const { version: { Author } } = this.props; + const { version: { author } } = this.props; - return `${Author.firstName || ''} ${Author.surname || ''}`; + return `${author.firstName || ''} ${author.surname || ''}`; } /** @@ -88,7 +88,7 @@ class HistoryViewerVersion extends Component { */ handleClose() { const { onSelect, version, compare, compare: { versionFrom } } = this.props; - if (versionFrom && versionFrom.Version === version.Version) { + if (versionFrom && versionFrom.version === version.version) { // Ensures we set the correct thing. C.f. logic in mapDispatchToProps -> onSelect delete compare.versionFrom; } @@ -204,7 +204,7 @@ class HistoryViewerVersion extends Component { { let context = 'VersionedAdmin.HistoryViewer.HistoryViewerVersion'; if (version) { - context += `.${version.Version}`; + context += `.${version.version}`; } return context; } diff --git a/client/src/components/HistoryViewer/HistoryViewerVersionState.js b/client/src/components/HistoryViewer/HistoryViewerVersionState.js index e01daf0..893133a 100644 --- a/client/src/components/HistoryViewer/HistoryViewerVersionState.js +++ b/client/src/components/HistoryViewer/HistoryViewerVersionState.js @@ -86,5 +86,5 @@ export { HistoryViewerVersionState as Component }; export default inject( ['Badge'], (BadgeComponent) => ({ BadgeComponent }), - ({ version }) => `HistoryViewer.HistoryViewerVersionState.${version.Version}` + ({ version }) => `HistoryViewer.HistoryViewerVersionState.${version.version}` )(HistoryViewerVersionState); diff --git a/client/src/components/HistoryViewer/tests/HistoryViewer-test.js b/client/src/components/HistoryViewer/tests/HistoryViewer-test.js index 26b9b92..68cb5d4 100644 --- a/client/src/components/HistoryViewer/tests/HistoryViewer-test.js +++ b/client/src/components/HistoryViewer/tests/HistoryViewer-test.js @@ -79,7 +79,7 @@ describe('HistoryViewer', () => { }); describe('getLatestVersion()', () => { - it('returns the version marked as LatestDraftVersion', () => { + it('returns the version marked as latestDraftVersion', () => { const wrapper = shallow( { mockOnSelect = jest.fn(); version = { - Author: { + author: { firstName: 'John', surname: 'Smith', }, - Published: false, + published: false, publisher: { firstName: 'Sarah', surname: 'Smith', }, - Version: 3, + version: 3, }; }); @@ -65,7 +65,7 @@ describe('HistoryViewerVersion', () => { const wrapper = shallow( { it('renders version details when version clicked', () => { const compare = { - versionFrom: { Version: 0 }, - versionTo: { Version: 0 }, + versionFrom: { version: 0 }, + versionTo: { version: 0 }, }; const wrapper = shallow( { onSelect={mockOnSelect} onCompareSelect={mockOnCompareSelect} compare={{ - versionFrom: { Version: 0 }, - versionTo: { Version: 0 }, + versionFrom: { version: 0 }, + versionTo: { version: 0 }, }} />); @@ -193,8 +193,8 @@ describe('HistoryViewerVersion', () => { onCompareSelect={mockOnCompareSelect} isActive compare={{ - versionFrom: { Version: 0 }, - versionTo: { Version: 0 }, + versionFrom: { version: 0 }, + versionTo: { version: 0 }, }} />); diff --git a/client/src/state/historyviewer/HistoryViewerReducer.js b/client/src/state/historyviewer/HistoryViewerReducer.js index 4a6b7cd..7b9a81d 100644 --- a/client/src/state/historyviewer/HistoryViewerReducer.js +++ b/client/src/state/historyviewer/HistoryViewerReducer.js @@ -108,8 +108,8 @@ export default function historyViewerReducer(state = initialState, { type, paylo // A normal `diff` always shows what it takes turn FROM into TO // Here, comparisons are always FROM oldest TO newest version - // Version IDs (versionObject.Version) are always positive & in creation order. - if (versionTo && versionFrom && versionTo.Version < versionFrom.Version) { + // Version IDs (versionObject.version) are always positive & in creation order. + if (versionTo && versionFrom && versionTo.version < versionFrom.version) { versionFrom = versionTo; versionTo = state.compare.versionFrom; } diff --git a/client/src/state/historyviewer/tests/HistoryViewerReducer-test.js b/client/src/state/historyviewer/tests/HistoryViewerReducer-test.js index 33bef9b..f2269c4 100644 --- a/client/src/state/historyviewer/tests/HistoryViewerReducer-test.js +++ b/client/src/state/historyviewer/tests/HistoryViewerReducer-test.js @@ -38,7 +38,7 @@ describe('HistoryViewerReducer', () => { }, }); - expect(result.currentVersion.Version).toBe(23); + expect(result.currentVersion.version).toBe(23); }); }); @@ -145,7 +145,7 @@ describe('HistoryViewerReducer', () => { }, }); - expect(result.compare.versionFrom.Version).toBe(47); + expect(result.compare.versionFrom.version).toBe(47); }); it('uses versionTo for versionFrom when version is zero', () => { @@ -166,7 +166,7 @@ describe('HistoryViewerReducer', () => { payload: {} }); - expect(result.compare.versionFrom.Version).toBe(80); + expect(result.compare.versionFrom.version).toBe(80); expect(result.compare.versionTo).toBe(false); }); @@ -187,7 +187,7 @@ describe('HistoryViewerReducer', () => { }, }); - expect(result.currentVersion.Version).toBe(60); + expect(result.currentVersion.version).toBe(60); }); }); @@ -200,7 +200,7 @@ describe('HistoryViewerReducer', () => { }, }); - expect(result.compare.versionTo.Version).toBe(85); + expect(result.compare.versionTo.version).toBe(85); }); it('flips the versions if a lower version "to" is selected', () => { @@ -225,8 +225,8 @@ describe('HistoryViewerReducer', () => { }, }); - expect(result.compare.versionFrom.Version).toBe(25); - expect(result.compare.versionTo.Version).toBe(50); + expect(result.compare.versionFrom.version).toBe(25); + expect(result.compare.versionTo.version).toBe(50); }); }); @@ -247,6 +247,6 @@ describe('HistoryViewerReducer', () => { }, }); - expect(result.currentVersion.Version).toBe(60); + expect(result.currentVersion.version).toBe(60); }); }); diff --git a/composer.json b/composer.json index 11257d3..b633429 100755 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ ], "require": { "silverstripe/framework": "^4", + "silverstripe/graphql": "^4", "silverstripe/versioned-snapshots": "dev-master", "silverstripe/versioned-admin": "^1", "silverstripe/versioned-admin": "^1", diff --git a/src/ReadSnapshotHistory.php b/src/ReadSnapshotHistory.php index 78d161c..be9f7d4 100644 --- a/src/ReadSnapshotHistory.php +++ b/src/ReadSnapshotHistory.php @@ -65,7 +65,7 @@ public function resolve($object, array $args, $context, ResolveInfo $info) $objectHash = static::hashObjectForSnapshot($object); $listWithAlterations = ArrayList::create(); foreach ($list as $item) { - $item->IsFullVersion = $item->OriginHash === $objectHash && + $item->isFullVersion = $item->OriginHash === $objectHash && $item->getActivityType() !== ActivityEntry::DELETED; $listWithAlterations->push($item); } From be4b309b6ce0949d67573b97f8895f4c3d93da4c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 24 May 2021 18:56:57 +1200 Subject: [PATCH 3/3] ESLint fixes --- .../components/HistoryViewer/HistoryViewer.js | 6 +- .../HistoryViewerSnapshotState.js | 2 + .../HistoryViewer/HistoryViewerToolbar.js | 56 +++++++++---------- .../HistoryViewer/RollbackMutation.js | 10 ++-- .../HistoryViewer/SnapshotViewerContainer.js | 18 +++--- client/src/graphql/createRollbackMutation.js | 5 +- client/src/graphql/createSnapshotsQuery.js | 4 +- 7 files changed, 49 insertions(+), 52 deletions(-) diff --git a/client/src/components/HistoryViewer/HistoryViewer.js b/client/src/components/HistoryViewer/HistoryViewer.js index 742f3b9..fdc0788 100644 --- a/client/src/components/HistoryViewer/HistoryViewer.js +++ b/client/src/components/HistoryViewer/HistoryViewer.js @@ -78,8 +78,7 @@ class HistoryViewer extends Component { const edges = (versions && versions.snapshotHistory && versions.snapshotHistory.edges) ? versions.snapshotHistory.edges : []; - return edges.map(({ node }) => { - return { + return edges.map(({ node }) => ({ ...node, ...node.originVersion, // Snapshots author is authoritative @@ -92,8 +91,7 @@ class HistoryViewer extends Component { version: node.isFullVersion && node.originVersion ? node.originVersion.version : node.baseVersion, - } - }); + })); } /** diff --git a/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js b/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js index 9c861c4..150130b 100644 --- a/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js +++ b/client/src/components/HistoryViewer/HistoryViewerSnapshotState.js @@ -1,5 +1,6 @@ import { Component as VersionedState } from './HistoryViewerVersionState'; import { inject } from 'lib/Injector'; +import React from 'react'; class HistoryViewerSnapshotState extends VersionedState { translateType(type) { @@ -30,6 +31,7 @@ class HistoryViewerSnapshotState extends VersionedState { const prefix = this.translateType(activityType); const lines = activityDescription.split('\n'); if (lines.length > 1) { + // eslint-disable-next-line react/no-array-index-key return lines.map((l, i) =>
{l}
); } return `${prefix} ${activityDescription}`; diff --git a/client/src/components/HistoryViewer/HistoryViewerToolbar.js b/client/src/components/HistoryViewer/HistoryViewerToolbar.js index 8366fe0..d6b0c57 100644 --- a/client/src/components/HistoryViewer/HistoryViewerToolbar.js +++ b/client/src/components/HistoryViewer/HistoryViewerToolbar.js @@ -35,7 +35,7 @@ class HistoryViewerToolbar extends Component { return rollback({ variables: { id: recordId, toVersion: versionId - }}).then(() => handler(versionId)); + } }).then(() => handler(versionId)); } handleToggleRevertTooltip() { @@ -63,41 +63,39 @@ class HistoryViewerToolbar extends Component { return ( - {(rollback) => { - return ( -
-
- this.handleRevert(rollback)} - icon="back-in-time" - name="revert" - attributes={{ + {(rollback) => ( +
+
+ this.handleRevert(rollback)} + icon="back-in-time" + name="revert" + attributes={{ title: revertButtonTitle, }} - data={{ + data={{ buttonStyle: 'warning' }} - disabled={isLatestVersion || isReverting || !canRollback} - loading={isReverting} - title={i18n._t('HistoryViewerToolbar.REVERT_TO_VERSION', 'Revert to this version')} - /> - { !canRollback && ( - - {rollbackMessage} - + disabled={isLatestVersion || isReverting || !canRollback} + loading={isReverting} + title={i18n._t('HistoryViewerToolbar.REVERT_TO_VERSION', 'Revert to this version')} + /> + { !canRollback && ( + + {rollbackMessage} + )} - { isPreviewable && } + { isPreviewable && }
- ) - }} + )} ); } diff --git a/client/src/components/HistoryViewer/RollbackMutation.js b/client/src/components/HistoryViewer/RollbackMutation.js index 6e4ff80..8ce9039 100644 --- a/client/src/components/HistoryViewer/RollbackMutation.js +++ b/client/src/components/HistoryViewer/RollbackMutation.js @@ -5,10 +5,10 @@ import createRollbackMutation from '../../graphql/createRollbackMutation'; const RollbackMutation = ({ typeName, children }) => { const ROLLBACK = useMemo(() => createRollbackMutation(typeName), [typeName]); return ( - - {children} - - ) + + {children} + + ); }; -export default RollbackMutation; \ No newline at end of file +export default RollbackMutation; diff --git a/client/src/components/HistoryViewer/SnapshotViewerContainer.js b/client/src/components/HistoryViewer/SnapshotViewerContainer.js index afeb8ba..eb21d7d 100644 --- a/client/src/components/HistoryViewer/SnapshotViewerContainer.js +++ b/client/src/components/HistoryViewer/SnapshotViewerContainer.js @@ -12,11 +12,14 @@ const SnapshotViewerContainer = ({ page, recordClass, isPreviewable, - actions = {versions: {}}, + actions = { versions: {} }, }, SnapshotViewerComponent, }) => { - const QUERY = useMemo(() => createSnapshotsQuery(typeName, isPreviewable), [typeName, isPreviewable]); + const QUERY = useMemo( + () => createSnapshotsQuery(typeName, isPreviewable), + [typeName, isPreviewable] + ); const variables = { limit, @@ -24,8 +27,8 @@ const SnapshotViewerContainer = ({ page_id: recordId, }; return ( - - {({ loading, error, data, refetch }) => { + + {({ loading, error, data, refetch }) => { let readOne = null; if (data) { readOne = data[`readOne${typeName}`]; @@ -36,13 +39,14 @@ const SnapshotViewerContainer = ({ error.graphQLErrors.map((graphQLError) => graphQLError.message); const props = { - loading: loading, + loading, versions, graphQLErrors: errors, actions: { ...actions, versions: { ...versions, + // eslint-disable-next-line no-shadow goToPage(page) { refetch({ offset: ((page || 1) - 1) * limit, @@ -60,10 +64,10 @@ const SnapshotViewerContainer = ({ }; return ( - + ); }} - + ); }; diff --git a/client/src/graphql/createRollbackMutation.js b/client/src/graphql/createRollbackMutation.js index 76bf6ff..01922e9 100644 --- a/client/src/graphql/createRollbackMutation.js +++ b/client/src/graphql/createRollbackMutation.js @@ -1,8 +1,6 @@ -import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; -const createRollbakMutation = typeName => { - return gql` +const createRollbakMutation = typeName => gql` mutation rollback${typeName}($id:ID!, $toVersion:Int!) { rollback${typeName}( id: $id @@ -13,6 +11,5 @@ const createRollbakMutation = typeName => { } } `; -}; export default createRollbakMutation; diff --git a/client/src/graphql/createSnapshotsQuery.js b/client/src/graphql/createSnapshotsQuery.js index c1dce6d..87cc4f3 100644 --- a/client/src/graphql/createSnapshotsQuery.js +++ b/client/src/graphql/createSnapshotsQuery.js @@ -1,7 +1,6 @@ import gql from 'graphql-tag'; -const createSnapshotsQuery = (typeName, isPreviewable) => { - return gql` +const createSnapshotsQuery = (typeName, isPreviewable) => gql` query ReadSnapshots${typeName} ($page_id: ID!, $limit: Int!, $offset: Int!) { readOne${typeName}( id: $page_id @@ -49,6 +48,5 @@ const createSnapshotsQuery = (typeName, isPreviewable) => { } `; -}; export default createSnapshotsQuery;