scrivito_content_browser 1.1.1 → 1.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -11
- data/app/assets/javascripts/dist/scrivito_content_browser_pkg.js +2257 -428
- metadata +4 -4
@@ -44,7 +44,7 @@
|
|
44
44
|
/* 0 */
|
45
45
|
/***/ function(module, exports, __webpack_require__) {
|
46
46
|
|
47
|
-
/* WEBPACK VAR INJECTION */(function(React) {var AppComponent, DialogApp, Filter, ReactDOM;
|
47
|
+
/* WEBPACK VAR INJECTION */(function(React) {var AppComponent, DialogApp, Filter, Provider, ReactDOM, ReactRedux, Redux, configureStore;
|
48
48
|
|
49
49
|
ReactDOM = __webpack_require__(158);
|
50
50
|
|
@@ -54,6 +54,14 @@
|
|
54
54
|
|
55
55
|
AppComponent = __webpack_require__(173);
|
56
56
|
|
57
|
+
ReactRedux = __webpack_require__(187);
|
58
|
+
|
59
|
+
Redux = __webpack_require__(195);
|
60
|
+
|
61
|
+
Provider = ReactRedux.Provider;
|
62
|
+
|
63
|
+
configureStore = __webpack_require__(254);
|
64
|
+
|
57
65
|
scrivito.content_browser = (function() {
|
58
66
|
return {
|
59
67
|
filters: {},
|
@@ -106,15 +114,18 @@
|
|
106
114
|
return new Filter(filterConfig, filterContext);
|
107
115
|
},
|
108
116
|
_startReact: function(options, promise) {
|
109
|
-
var baseQuery, filter;
|
117
|
+
var baseQuery, filter, store;
|
110
118
|
baseQuery = options.base_query || this.base_query;
|
111
119
|
filter = this._buildFilter(options);
|
112
|
-
|
120
|
+
store = configureStore();
|
121
|
+
return this._reactApp = ReactDOM.render(React.createElement(Provider, {
|
122
|
+
"store": store
|
123
|
+
}, React.createElement(AppComponent, {
|
113
124
|
"initialFilter": filter,
|
114
125
|
"baseQuery": baseQuery,
|
115
126
|
"promise": promise,
|
116
127
|
"options": options
|
117
|
-
}), this._getLastContentBrowserElement());
|
128
|
+
})), this._getLastContentBrowserElement());
|
118
129
|
},
|
119
130
|
keyUpHandler: function(e) {
|
120
131
|
if (e.keyCode === this.ESCAPE) {
|
@@ -137,6 +148,7 @@
|
|
137
148
|
return element.parentNode.removeChild(element);
|
138
149
|
},
|
139
150
|
close: function() {
|
151
|
+
ReactDOM.unmountComponentAtNode(this._getLastContentBrowserElement());
|
140
152
|
this._remove(this._getLastOverlayElement());
|
141
153
|
this._remove(this._getLastContentBrowserElement());
|
142
154
|
if (!this._getLastContentBrowserElement()) {
|
@@ -20484,25 +20496,31 @@
|
|
20484
20496
|
/* 173 */
|
20485
20497
|
/***/ function(module, exports, __webpack_require__) {
|
20486
20498
|
|
20487
|
-
/* WEBPACK VAR INJECTION */(function(React) {var AddedObjsCollection, App, Filter, Footer, InspectorComponent, Items, MoreItemsSpinner, ObjCollection, TopBar,
|
20499
|
+
/* WEBPACK VAR INJECTION */(function(React) {var AddedObjsCollection, App, AppContainer, Filter, Footer, InspectorComponent, Items, MoreItemsSpinner, ObjCollection, ReactRedux, TopBar, disableTags, fetchTags, redux, setLastAddedVisibility, _ref;
|
20488
20500
|
|
20489
|
-
|
20501
|
+
AddedObjsCollection = __webpack_require__(174);
|
20490
20502
|
|
20491
|
-
|
20503
|
+
ObjCollection = __webpack_require__(183);
|
20492
20504
|
|
20493
|
-
|
20505
|
+
TopBar = __webpack_require__(185);
|
20494
20506
|
|
20495
|
-
|
20507
|
+
Filter = __webpack_require__(210);
|
20496
20508
|
|
20497
|
-
|
20509
|
+
Items = __webpack_require__(222);
|
20498
20510
|
|
20499
|
-
|
20511
|
+
MoreItemsSpinner = __webpack_require__(247);
|
20500
20512
|
|
20501
|
-
|
20513
|
+
InspectorComponent = __webpack_require__(248);
|
20502
20514
|
|
20503
|
-
|
20515
|
+
Footer = __webpack_require__(252);
|
20504
20516
|
|
20505
|
-
|
20517
|
+
ReactRedux = __webpack_require__(187);
|
20518
|
+
|
20519
|
+
redux = __webpack_require__(195);
|
20520
|
+
|
20521
|
+
setLastAddedVisibility = __webpack_require__(253).setLastAddedVisibility;
|
20522
|
+
|
20523
|
+
_ref = __webpack_require__(246), fetchTags = _ref.fetchTags, disableTags = _ref.disableTags;
|
20506
20524
|
|
20507
20525
|
App = React.createClass({
|
20508
20526
|
displayName: 'App',
|
@@ -20511,11 +20529,6 @@
|
|
20511
20529
|
filter: filter
|
20512
20530
|
});
|
20513
20531
|
},
|
20514
|
-
updateViewMode: function(viewMode) {
|
20515
|
-
return this.setState({
|
20516
|
-
viewMode: viewMode
|
20517
|
-
});
|
20518
|
-
},
|
20519
20532
|
updateObjCollection: function(objCollection) {
|
20520
20533
|
return this.setState({
|
20521
20534
|
objCollection: objCollection
|
@@ -20526,7 +20539,7 @@
|
|
20526
20539
|
addedObjsCollection: addedObjsCollection
|
20527
20540
|
});
|
20528
20541
|
if (!addedObjsCollection.hasActiveCreations()) {
|
20529
|
-
if (this.
|
20542
|
+
if (this.props.lastAdded.isVisible) {
|
20530
20543
|
return this._setObjsCollection();
|
20531
20544
|
} else {
|
20532
20545
|
this._selectLatestAddedObj(addedObjsCollection);
|
@@ -20535,16 +20548,14 @@
|
|
20535
20548
|
}
|
20536
20549
|
},
|
20537
20550
|
updateLastAdded: function(showLastAdded) {
|
20538
|
-
this.
|
20539
|
-
showLastAdded: showLastAdded
|
20540
|
-
});
|
20551
|
+
this.props.dispatch(setLastAddedVisibility(showLastAdded));
|
20541
20552
|
if (showLastAdded && !this.state.addedObjsCollection.hasActiveCreations()) {
|
20542
20553
|
return this._setObjsCollection();
|
20543
20554
|
}
|
20544
20555
|
},
|
20545
20556
|
destroyAddedObj: function(objId) {
|
20546
20557
|
this.state.addedObjsCollection.destroyCreatedObjById(objId);
|
20547
|
-
if (this.
|
20558
|
+
if (this.props.lastAdded.isVisible) {
|
20548
20559
|
return this._setObjsCollection();
|
20549
20560
|
}
|
20550
20561
|
},
|
@@ -20567,9 +20578,14 @@
|
|
20567
20578
|
}
|
20568
20579
|
}
|
20569
20580
|
},
|
20581
|
+
disableTagBar: function() {
|
20582
|
+
return this.props.dispatch(disableTags());
|
20583
|
+
},
|
20584
|
+
fetchTags: function(query) {
|
20585
|
+
return this.props.dispatch(fetchTags(query));
|
20586
|
+
},
|
20570
20587
|
componentDidMount: function() {
|
20571
20588
|
this.state.filter.onChange(this.updateFilter);
|
20572
|
-
this.state.viewMode.onChange(this.updateViewMode);
|
20573
20589
|
this.state.addedObjsCollection.onChange(this.updateAddedObjsCollection);
|
20574
20590
|
this.state.objCollection.onChange(this.updateObjCollection);
|
20575
20591
|
this.state.objCollection.on('destroy-obj', this.destroyAddedObj);
|
@@ -20582,16 +20598,14 @@
|
|
20582
20598
|
basePreset = this.props.options.base_preset;
|
20583
20599
|
return {
|
20584
20600
|
filter: this.props.initialFilter,
|
20585
|
-
showLastAdded: false,
|
20586
20601
|
objs: [],
|
20587
|
-
viewMode: new ViewMode(void 0, this.props.options.standAlone),
|
20588
20602
|
sortCriteria: this.props.initialFilter.sortCriteria,
|
20589
20603
|
addedObjsCollection: new AddedObjsCollection(basePreset),
|
20590
20604
|
objCollection: new ObjCollection(initialSelection, selectionMode)
|
20591
20605
|
};
|
20592
20606
|
},
|
20593
20607
|
_getBodyClassName: function() {
|
20594
|
-
if (this.
|
20608
|
+
if (this.props.inspector.isMaximized) {
|
20595
20609
|
return "scrivito-content-browser-body scrivito-content-browser-inspector-max";
|
20596
20610
|
} else {
|
20597
20611
|
return "scrivito-content-browser-body";
|
@@ -20607,105 +20621,61 @@
|
|
20607
20621
|
}, React.createElement(TopBar, {
|
20608
20622
|
"filter": this.state.filter,
|
20609
20623
|
"sortCriteria": this.state.sortCriteria,
|
20610
|
-
"viewMode": this.
|
20624
|
+
"viewMode": this.props.objDisplay.viewMode
|
20611
20625
|
}), React.createElement(Filter, {
|
20612
20626
|
"ref": "filterView",
|
20613
20627
|
"filter": this.state.filter,
|
20614
20628
|
"baseQuery": this.props.baseQuery,
|
20629
|
+
"disableTags": this.disableTagBar,
|
20615
20630
|
"objCollection": this.state.objCollection,
|
20631
|
+
"activeTags": this.props.tags.activeTags,
|
20632
|
+
"fetchTags": this.fetchTags,
|
20633
|
+
"standAlone": this.props.options.standAlone,
|
20616
20634
|
"updateLastAdded": this.updateLastAdded,
|
20617
|
-
"viewMode": this.state.viewMode,
|
20618
20635
|
"addedObjsCollection": this.state.addedObjsCollection,
|
20619
|
-
"
|
20636
|
+
"dispatch": this.props.dispatch,
|
20637
|
+
"showLastAdded": this.props.lastAdded.isVisible
|
20620
20638
|
}), React.createElement(Items, {
|
20621
20639
|
"ref": "itemView",
|
20622
20640
|
"objCollection": this.state.objCollection,
|
20623
|
-
"viewMode": this.
|
20641
|
+
"viewMode": this.props.objDisplay.viewMode,
|
20642
|
+
"dispatch": this.props.dispatch,
|
20643
|
+
"tags": this.props.tags,
|
20624
20644
|
"addedObjsCollection": this.state.addedObjsCollection,
|
20625
20645
|
"filter": this.state.filter,
|
20626
|
-
"showLastAdded": this.
|
20646
|
+
"showLastAdded": this.props.lastAdded.isVisible
|
20627
20647
|
}), (this.state.objCollection.isLoadingAdditionalObjs() ? React.createElement(MoreItemsSpinner, {
|
20628
20648
|
"objCollection": this.state.objCollection
|
20629
20649
|
}) : void 0)), React.createElement(InspectorComponent, {
|
20630
|
-
"
|
20650
|
+
"dispatch": this.props.dispatch,
|
20631
20651
|
"objCollection": this.state.objCollection
|
20632
20652
|
})), React.createElement(Footer, {
|
20633
20653
|
"promise": this.props.promise,
|
20634
|
-
"
|
20654
|
+
"standAlone": this.props.options.standAlone,
|
20635
20655
|
"objCollection": this.state.objCollection
|
20636
20656
|
}));
|
20637
20657
|
}
|
20638
20658
|
});
|
20639
20659
|
|
20640
|
-
|
20641
|
-
|
20642
|
-
|
20643
|
-
|
20644
|
-
/***/ },
|
20645
|
-
/* 174 */
|
20646
|
-
/***/ function(module, exports, __webpack_require__) {
|
20647
|
-
|
20648
|
-
var Listenable, ViewMode,
|
20649
|
-
__hasProp = {}.hasOwnProperty,
|
20650
|
-
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
20651
|
-
|
20652
|
-
Listenable = __webpack_require__(163);
|
20653
|
-
|
20654
|
-
ViewMode = (function(_super) {
|
20655
|
-
__extends(ViewMode, _super);
|
20656
|
-
|
20657
|
-
function ViewMode(mode, standAlone) {
|
20658
|
-
ViewMode.__super__.constructor.call(this);
|
20659
|
-
if (mode == null) {
|
20660
|
-
mode = "thumbnails";
|
20661
|
-
}
|
20662
|
-
this._mode = mode;
|
20663
|
-
this._standAlone = standAlone;
|
20664
|
-
this._isInspectorMaximized = false;
|
20665
|
-
}
|
20666
|
-
|
20667
|
-
ViewMode.prototype.setMode = function(newMode) {
|
20668
|
-
this._mode = newMode;
|
20669
|
-
return this.changed();
|
20670
|
-
};
|
20671
|
-
|
20672
|
-
ViewMode.prototype.toggleInspectorMaximized = function() {
|
20673
|
-
this._isInspectorMaximized = !this._isInspectorMaximized;
|
20674
|
-
return this.changed();
|
20675
|
-
};
|
20676
|
-
|
20677
|
-
ViewMode.prototype.getMode = function() {
|
20678
|
-
return this._mode;
|
20679
|
-
};
|
20680
|
-
|
20681
|
-
ViewMode.prototype.isInspectorMaximized = function() {
|
20682
|
-
return this._isInspectorMaximized;
|
20683
|
-
};
|
20684
|
-
|
20685
|
-
ViewMode.prototype.isList = function() {
|
20686
|
-
return this._mode === "list";
|
20687
|
-
};
|
20688
|
-
|
20689
|
-
ViewMode.prototype.isStandAlone = function() {
|
20690
|
-
return this._standAlone === true;
|
20660
|
+
AppContainer = ReactRedux.connect((function(_this) {
|
20661
|
+
return function(state) {
|
20662
|
+
return state;
|
20691
20663
|
};
|
20664
|
+
})(this))(App);
|
20692
20665
|
|
20693
|
-
|
20694
|
-
|
20695
|
-
})(Listenable);
|
20696
|
-
|
20697
|
-
module.exports = ViewMode;
|
20666
|
+
module.exports = AppContainer;
|
20698
20667
|
|
20668
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
20699
20669
|
|
20700
20670
|
/***/ },
|
20701
|
-
/*
|
20671
|
+
/* 174 */
|
20702
20672
|
/***/ function(module, exports, __webpack_require__) {
|
20703
20673
|
|
20704
20674
|
var AddedObj, AddedObjsCollection, Listenable,
|
20705
20675
|
__hasProp = {}.hasOwnProperty,
|
20706
20676
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
20707
20677
|
|
20708
|
-
AddedObj = __webpack_require__(
|
20678
|
+
AddedObj = __webpack_require__(175);
|
20709
20679
|
|
20710
20680
|
Listenable = __webpack_require__(163);
|
20711
20681
|
|
@@ -20805,16 +20775,16 @@
|
|
20805
20775
|
|
20806
20776
|
|
20807
20777
|
/***/ },
|
20808
|
-
/*
|
20778
|
+
/* 175 */
|
20809
20779
|
/***/ function(module, exports, __webpack_require__) {
|
20810
20780
|
|
20811
20781
|
var AddedObj, Fetcher, Obj, QueryBuilder;
|
20812
20782
|
|
20813
|
-
Obj = __webpack_require__(
|
20783
|
+
Obj = __webpack_require__(176);
|
20814
20784
|
|
20815
|
-
QueryBuilder = __webpack_require__(
|
20785
|
+
QueryBuilder = __webpack_require__(177);
|
20816
20786
|
|
20817
|
-
Fetcher = __webpack_require__(
|
20787
|
+
Fetcher = __webpack_require__(181);
|
20818
20788
|
|
20819
20789
|
AddedObj = (function() {
|
20820
20790
|
function AddedObj(addedObjsCollection, file, presetAttributes) {
|
@@ -20920,7 +20890,7 @@
|
|
20920
20890
|
|
20921
20891
|
|
20922
20892
|
/***/ },
|
20923
|
-
/*
|
20893
|
+
/* 176 */
|
20924
20894
|
/***/ function(module, exports) {
|
20925
20895
|
|
20926
20896
|
var Obj;
|
@@ -20988,18 +20958,19 @@
|
|
20988
20958
|
|
20989
20959
|
|
20990
20960
|
/***/ },
|
20991
|
-
/*
|
20961
|
+
/* 177 */
|
20992
20962
|
/***/ function(module, exports, __webpack_require__) {
|
20993
20963
|
|
20994
20964
|
var ActiveNodeConfigCollector, NullQuery, QueryBuilder;
|
20995
20965
|
|
20996
|
-
ActiveNodeConfigCollector = __webpack_require__(
|
20966
|
+
ActiveNodeConfigCollector = __webpack_require__(178);
|
20997
20967
|
|
20998
|
-
NullQuery = __webpack_require__(
|
20968
|
+
NullQuery = __webpack_require__(180);
|
20999
20969
|
|
21000
20970
|
QueryBuilder = (function() {
|
21001
|
-
function QueryBuilder(filter, baseQuery) {
|
20971
|
+
function QueryBuilder(filter, baseQuery, tags) {
|
21002
20972
|
this.filter = filter;
|
20973
|
+
this.tags = tags;
|
21003
20974
|
this._collector = new ActiveNodeConfigCollector(this.filter);
|
21004
20975
|
if (baseQuery) {
|
21005
20976
|
this._baseQuery = QueryBuilder.prepareQuery(baseQuery);
|
@@ -21011,7 +20982,17 @@
|
|
21011
20982
|
query = this._baseQuery;
|
21012
20983
|
query = this._addFilterQueries(query);
|
21013
20984
|
query = this._addSearchTermQuery(query);
|
21014
|
-
|
20985
|
+
query = this._sortQuery(query);
|
20986
|
+
return query = this._tagsQuery(query);
|
20987
|
+
};
|
20988
|
+
|
20989
|
+
QueryBuilder.prototype._tagsQuery = function(query) {
|
20990
|
+
if (this.tags !== void 0 && this.tags.length > 0) {
|
20991
|
+
_.map(this.tags, function(tag) {
|
20992
|
+
return query.and(scrivito.obj_where('tags', 'equals', tag));
|
20993
|
+
});
|
20994
|
+
}
|
20995
|
+
return query;
|
21015
20996
|
};
|
21016
20997
|
|
21017
20998
|
QueryBuilder.prototype._addFilterQueries = function(baseQuery) {
|
@@ -21098,12 +21079,12 @@
|
|
21098
21079
|
|
21099
21080
|
|
21100
21081
|
/***/ },
|
21101
|
-
/*
|
21082
|
+
/* 178 */
|
21102
21083
|
/***/ function(module, exports, __webpack_require__) {
|
21103
21084
|
|
21104
21085
|
var ActiveNodeConfig, ActiveNodeConfigCollector;
|
21105
21086
|
|
21106
|
-
ActiveNodeConfig = __webpack_require__(
|
21087
|
+
ActiveNodeConfig = __webpack_require__(179);
|
21107
21088
|
|
21108
21089
|
ActiveNodeConfigCollector = (function() {
|
21109
21090
|
function ActiveNodeConfigCollector(filter) {
|
@@ -21181,7 +21162,7 @@
|
|
21181
21162
|
|
21182
21163
|
|
21183
21164
|
/***/ },
|
21184
|
-
/*
|
21165
|
+
/* 179 */
|
21185
21166
|
/***/ function(module, exports) {
|
21186
21167
|
|
21187
21168
|
var ActiveNodeConfig;
|
@@ -21265,7 +21246,7 @@
|
|
21265
21246
|
|
21266
21247
|
|
21267
21248
|
/***/ },
|
21268
|
-
/*
|
21249
|
+
/* 180 */
|
21269
21250
|
/***/ function(module, exports) {
|
21270
21251
|
|
21271
21252
|
var NullQuery;
|
@@ -21287,18 +21268,18 @@
|
|
21287
21268
|
|
21288
21269
|
|
21289
21270
|
/***/ },
|
21290
|
-
/*
|
21271
|
+
/* 181 */
|
21291
21272
|
/***/ function(module, exports, __webpack_require__) {
|
21292
21273
|
|
21293
21274
|
var Fetcher, FetcherStatus, Listenable, QueryBuilder,
|
21294
21275
|
__hasProp = {}.hasOwnProperty,
|
21295
21276
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
21296
21277
|
|
21297
|
-
QueryBuilder = __webpack_require__(
|
21278
|
+
QueryBuilder = __webpack_require__(177);
|
21298
21279
|
|
21299
21280
|
Listenable = __webpack_require__(163);
|
21300
21281
|
|
21301
|
-
FetcherStatus = __webpack_require__(
|
21282
|
+
FetcherStatus = __webpack_require__(182);
|
21302
21283
|
|
21303
21284
|
Fetcher = (function(_super) {
|
21304
21285
|
__extends(Fetcher, _super);
|
@@ -21367,7 +21348,7 @@
|
|
21367
21348
|
|
21368
21349
|
|
21369
21350
|
/***/ },
|
21370
|
-
/*
|
21351
|
+
/* 182 */
|
21371
21352
|
/***/ function(module, exports) {
|
21372
21353
|
|
21373
21354
|
var FetcherStatus;
|
@@ -21397,7 +21378,7 @@
|
|
21397
21378
|
|
21398
21379
|
|
21399
21380
|
/***/ },
|
21400
|
-
/*
|
21381
|
+
/* 183 */
|
21401
21382
|
/***/ function(module, exports, __webpack_require__) {
|
21402
21383
|
|
21403
21384
|
var Deleter, Listenable, Obj, ObjCollection, SortCriteria,
|
@@ -21406,11 +21387,11 @@
|
|
21406
21387
|
|
21407
21388
|
Listenable = __webpack_require__(163);
|
21408
21389
|
|
21409
|
-
Obj = __webpack_require__(
|
21390
|
+
Obj = __webpack_require__(176);
|
21410
21391
|
|
21411
21392
|
SortCriteria = __webpack_require__(164);
|
21412
21393
|
|
21413
|
-
Deleter = __webpack_require__(
|
21394
|
+
Deleter = __webpack_require__(184);
|
21414
21395
|
|
21415
21396
|
ObjCollection = (function(_super) {
|
21416
21397
|
__extends(ObjCollection, _super);
|
@@ -21635,12 +21616,12 @@
|
|
21635
21616
|
|
21636
21617
|
|
21637
21618
|
/***/ },
|
21638
|
-
/*
|
21619
|
+
/* 184 */
|
21639
21620
|
/***/ function(module, exports, __webpack_require__) {
|
21640
21621
|
|
21641
21622
|
var Deleter, QueryBuilder;
|
21642
21623
|
|
21643
|
-
QueryBuilder = __webpack_require__(
|
21624
|
+
QueryBuilder = __webpack_require__(177);
|
21644
21625
|
|
21645
21626
|
Deleter = (function() {
|
21646
21627
|
Deleter.prototype.MAX_RETRY = 5;
|
@@ -21698,16 +21679,16 @@
|
|
21698
21679
|
|
21699
21680
|
|
21700
21681
|
/***/ },
|
21701
|
-
/*
|
21682
|
+
/* 185 */
|
21702
21683
|
/***/ function(module, exports, __webpack_require__) {
|
21703
21684
|
|
21704
21685
|
/* WEBPACK VAR INJECTION */(function(React) {var ActiveNodeConfigCollector, SortMenu, TopBar, ViewModeBar;
|
21705
21686
|
|
21706
|
-
ViewModeBar = __webpack_require__(
|
21687
|
+
ViewModeBar = __webpack_require__(186);
|
21707
21688
|
|
21708
|
-
SortMenu = __webpack_require__(
|
21689
|
+
SortMenu = __webpack_require__(208);
|
21709
21690
|
|
21710
|
-
ActiveNodeConfigCollector = __webpack_require__(
|
21691
|
+
ActiveNodeConfigCollector = __webpack_require__(178);
|
21711
21692
|
|
21712
21693
|
TopBar = React.createClass({
|
21713
21694
|
displayName: 'TopBar',
|
@@ -21796,25 +21777,33 @@
|
|
21796
21777
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
21797
21778
|
|
21798
21779
|
/***/ },
|
21799
|
-
/*
|
21780
|
+
/* 186 */
|
21800
21781
|
/***/ function(module, exports, __webpack_require__) {
|
21801
21782
|
|
21802
|
-
/* WEBPACK VAR INJECTION */(function(React) {var ViewModeBar, ViewModeBarItem;
|
21783
|
+
/* WEBPACK VAR INJECTION */(function(React) {var ReactRedux, TABLE_VIEW, THUMBNAIL_VIEW, ViewModeBar, ViewModeBarItem, setViewMode, _ref;
|
21784
|
+
|
21785
|
+
ReactRedux = __webpack_require__(187);
|
21786
|
+
|
21787
|
+
ViewModeBarItem = __webpack_require__(206);
|
21803
21788
|
|
21804
|
-
|
21789
|
+
_ref = __webpack_require__(207), THUMBNAIL_VIEW = _ref.THUMBNAIL_VIEW, TABLE_VIEW = _ref.TABLE_VIEW, setViewMode = _ref.setViewMode;
|
21805
21790
|
|
21806
21791
|
ViewModeBar = React.createClass({
|
21807
21792
|
displayName: 'ViewModeBar',
|
21808
|
-
viewModeButtonsData: [
|
21793
|
+
viewModeButtonsData: [TABLE_VIEW, THUMBNAIL_VIEW],
|
21794
|
+
setViewMode: function(viewMode) {
|
21795
|
+
return this.props.dispatch(setViewMode(viewMode));
|
21796
|
+
},
|
21809
21797
|
render: function() {
|
21810
21798
|
var mode;
|
21811
21799
|
return React.createElement("div", null, (function() {
|
21812
|
-
var _i, _len,
|
21813
|
-
|
21800
|
+
var _i, _len, _ref1, _results;
|
21801
|
+
_ref1 = this.viewModeButtonsData;
|
21814
21802
|
_results = [];
|
21815
|
-
for (_i = 0, _len =
|
21816
|
-
mode =
|
21803
|
+
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
21804
|
+
mode = _ref1[_i];
|
21817
21805
|
_results.push(React.createElement(ViewModeBarItem, {
|
21806
|
+
"setViewMode": this.setViewMode,
|
21818
21807
|
"viewMode": this.props.viewMode,
|
21819
21808
|
"key": mode,
|
21820
21809
|
"mode": mode
|
@@ -21825,219 +21814,1598 @@
|
|
21825
21814
|
}
|
21826
21815
|
});
|
21827
21816
|
|
21828
|
-
module.exports = ViewModeBar;
|
21817
|
+
module.exports = ReactRedux.connect()(ViewModeBar);
|
21829
21818
|
|
21830
21819
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
21831
21820
|
|
21832
21821
|
/***/ },
|
21833
|
-
/*
|
21822
|
+
/* 187 */
|
21834
21823
|
/***/ function(module, exports, __webpack_require__) {
|
21835
21824
|
|
21836
|
-
|
21837
|
-
|
21838
|
-
ViewModeBarItem = React.createClass({
|
21839
|
-
displayName: 'ViewModeBarItem',
|
21840
|
-
viewModeButtonsData: {
|
21841
|
-
"thumbnails": {
|
21842
|
-
iconTitle: "Thumbnails",
|
21843
|
-
iconClassName: "scrivito_icon_th_small"
|
21844
|
-
},
|
21845
|
-
"list": {
|
21846
|
-
iconTitle: "List",
|
21847
|
-
iconClassName: "scrivito_icon_list_medium"
|
21848
|
-
}
|
21849
|
-
},
|
21850
|
-
getIconClassName: function(mode) {
|
21851
|
-
return "scrivito_icon " + this.viewModeButtonsData[mode].iconClassName;
|
21852
|
-
},
|
21853
|
-
getIconTitle: function(mode) {
|
21854
|
-
return this.viewModeButtonsData[mode].iconTitle;
|
21855
|
-
},
|
21856
|
-
getLabelClasses: function() {
|
21857
|
-
var className;
|
21858
|
-
className = "";
|
21859
|
-
if (this.props.viewMode.getMode() === this.props.mode) {
|
21860
|
-
className += "active ";
|
21861
|
-
}
|
21862
|
-
return className += "editing-button-view";
|
21863
|
-
},
|
21864
|
-
changeViewMode: function() {
|
21865
|
-
return this.props.viewMode.setMode(this.props.mode);
|
21866
|
-
},
|
21867
|
-
render: function() {
|
21868
|
-
return React.createElement("span", {
|
21869
|
-
"data-size": this.props.mode,
|
21870
|
-
"className": this.getLabelClasses(),
|
21871
|
-
"onClick": this.changeViewMode
|
21872
|
-
}, React.createElement("i", {
|
21873
|
-
"title": this.getIconTitle(this.props.mode),
|
21874
|
-
"className": this.getIconClassName(this.props.mode)
|
21875
|
-
}));
|
21876
|
-
}
|
21877
|
-
});
|
21825
|
+
'use strict';
|
21878
21826
|
|
21879
|
-
|
21827
|
+
exports.__esModule = true;
|
21880
21828
|
|
21881
|
-
|
21829
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
21882
21830
|
|
21883
|
-
|
21884
|
-
/* 189 */
|
21885
|
-
/***/ function(module, exports, __webpack_require__) {
|
21831
|
+
var _react = __webpack_require__(1);
|
21886
21832
|
|
21887
|
-
|
21833
|
+
var _react2 = _interopRequireDefault(_react);
|
21888
21834
|
|
21889
|
-
|
21835
|
+
var _componentsCreateAll = __webpack_require__(188);
|
21890
21836
|
|
21891
|
-
|
21892
|
-
displayName: 'SortMenu',
|
21893
|
-
sortItemsData: {
|
21894
|
-
"relevance": {
|
21895
|
-
itemTitle: "Sort by relevance",
|
21896
|
-
ascCriteriaTitle: "Relevance",
|
21897
|
-
sortItemType: "relevance"
|
21898
|
-
},
|
21899
|
-
"date": {
|
21900
|
-
itemTitle: "Sort by date",
|
21901
|
-
descCriteriaTitle: "Last change: latest first",
|
21902
|
-
ascCriteriaTitle: "Last change: oldest first",
|
21903
|
-
sortItemType: "_last_changed"
|
21904
|
-
}
|
21905
|
-
},
|
21906
|
-
toggleSortMenu: function() {
|
21907
|
-
return $('.scrivito-content-browser-sort-menu .scrivito_menu_box').fadeToggle();
|
21908
|
-
},
|
21909
|
-
getSortIconClassName: function() {
|
21910
|
-
var sortCriteria, sortIcon;
|
21911
|
-
sortIcon = "scrivito_icon ";
|
21912
|
-
sortCriteria = this.props.filter.sortCriteria;
|
21913
|
-
if (sortCriteria.isSortedDesc()) {
|
21914
|
-
sortIcon += "scrivito_icon_sort_down";
|
21915
|
-
} else {
|
21916
|
-
sortIcon += "scrivito_icon_sort_up";
|
21917
|
-
}
|
21918
|
-
return sortIcon;
|
21919
|
-
},
|
21920
|
-
render: function() {
|
21921
|
-
var sortItem;
|
21922
|
-
return React.createElement("span", {
|
21923
|
-
"className": "scrivito-content-browser-sort-menu scrivito_button scrivito_lightgrey scrivito_right",
|
21924
|
-
"onClick": this.toggleSortMenu
|
21925
|
-
}, React.createElement("i", {
|
21926
|
-
"className": this.getSortIconClassName()
|
21927
|
-
}), this.props.filter.sortCriteria.activeElement(), React.createElement("i", {
|
21928
|
-
"className": "scrivito_icon scrivito-content-browser-menu-icon scrivito_icon_chevron_down"
|
21929
|
-
}), React.createElement("ul", {
|
21930
|
-
"className": "scrivito_menu_box scrivito_left"
|
21931
|
-
}, (function() {
|
21932
|
-
var _i, _len, _ref, _results;
|
21933
|
-
_ref = Object.keys(this.sortItemsData);
|
21934
|
-
_results = [];
|
21935
|
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
21936
|
-
sortItem = _ref[_i];
|
21937
|
-
_results.push(React.createElement(SortMenuItem, {
|
21938
|
-
"filter": this.props.filter,
|
21939
|
-
"key": sortItem,
|
21940
|
-
"sortItem": this.sortItemsData[sortItem]
|
21941
|
-
}));
|
21942
|
-
}
|
21943
|
-
return _results;
|
21944
|
-
}).call(this), React.createElement("li", {
|
21945
|
-
"className": "scrivito_menu_box_overlay"
|
21946
|
-
})));
|
21947
|
-
}
|
21948
|
-
});
|
21837
|
+
var _componentsCreateAll2 = _interopRequireDefault(_componentsCreateAll);
|
21949
21838
|
|
21950
|
-
|
21839
|
+
var _createAll = _componentsCreateAll2['default'](_react2['default']);
|
21951
21840
|
|
21952
|
-
|
21841
|
+
var Provider = _createAll.Provider;
|
21842
|
+
var connect = _createAll.connect;
|
21843
|
+
exports.Provider = Provider;
|
21844
|
+
exports.connect = connect;
|
21953
21845
|
|
21954
21846
|
/***/ },
|
21955
|
-
/*
|
21847
|
+
/* 188 */
|
21956
21848
|
/***/ function(module, exports, __webpack_require__) {
|
21957
21849
|
|
21958
|
-
|
21850
|
+
'use strict';
|
21959
21851
|
|
21960
|
-
|
21852
|
+
exports.__esModule = true;
|
21853
|
+
exports['default'] = createAll;
|
21961
21854
|
|
21962
|
-
|
21963
|
-
displayName: 'SortMenuItem',
|
21964
|
-
basicIcon: "scrivito_icon ",
|
21965
|
-
_ascIconSortClass: function() {
|
21966
|
-
return this.basicIcon + "scrivito_icon_sort_down";
|
21967
|
-
},
|
21968
|
-
_descIconSortClass: function() {
|
21969
|
-
return this.basicIcon + "scrivito_icon_sort_up";
|
21970
|
-
},
|
21971
|
-
getSortLiClassName: function(activeElement) {
|
21972
|
-
var itemIcon;
|
21973
|
-
itemIcon = "scrivito_menu_item";
|
21974
|
-
if (this.props.filter.sortCriteria.activeElement() === activeElement) {
|
21975
|
-
itemIcon += " active";
|
21976
|
-
}
|
21977
|
-
return itemIcon;
|
21978
|
-
},
|
21979
|
-
_getAscSortLiClassName: function() {
|
21980
|
-
return this.getSortLiClassName(this.currentSortItem().ascCriteriaTitle);
|
21981
|
-
},
|
21982
|
-
_getDescSortLiClassName: function() {
|
21983
|
-
return this.getSortLiClassName(this.currentSortItem().descCriteriaTitle);
|
21984
|
-
},
|
21985
|
-
currentSortItem: function() {
|
21986
|
-
return this.props.sortItem;
|
21987
|
-
},
|
21988
|
-
_changeSortCriteria: function(reverse, activeItemElement) {
|
21989
|
-
var sortCriteria;
|
21990
|
-
sortCriteria = new SortCriteria(this.currentSortItem().sortItemType, reverse, activeItemElement, this.currentSortItem().itemTitle);
|
21991
|
-
return this.props.filter.setSortCriteria(sortCriteria);
|
21992
|
-
},
|
21993
|
-
_sortInAscOrder: function() {
|
21994
|
-
return this._changeSortCriteria(false, this.currentSortItem().ascCriteriaTitle);
|
21995
|
-
},
|
21996
|
-
_sortInDescOrder: function() {
|
21997
|
-
return this._changeSortCriteria(true, this.currentSortItem().descCriteriaTitle);
|
21998
|
-
},
|
21999
|
-
render: function() {
|
22000
|
-
return React.createElement("div", null, React.createElement("li", {
|
22001
|
-
"className": "scrivito_menu_separator"
|
22002
|
-
}, React.createElement("span", null, (this.currentSortItem().itemTitle))), ((this.currentSortItem().descCriteriaTitle) ? React.createElement("li", {
|
22003
|
-
"className": this._getDescSortLiClassName(),
|
22004
|
-
"onClick": this._sortInDescOrder
|
22005
|
-
}, React.createElement("span", null, React.createElement("i", {
|
22006
|
-
"className": this._descIconSortClass()
|
22007
|
-
}, " "), (this.currentSortItem().descCriteriaTitle))) : void 0), ((this.currentSortItem().ascCriteriaTitle) ? React.createElement("li", {
|
22008
|
-
"className": this._getAscSortLiClassName(),
|
22009
|
-
"onClick": this._sortInAscOrder
|
22010
|
-
}, React.createElement("span", null, React.createElement("i", {
|
22011
|
-
"className": this._ascIconSortClass()
|
22012
|
-
}, " "), (this.currentSortItem().ascCriteriaTitle))) : void 0));
|
22013
|
-
}
|
22014
|
-
});
|
21855
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
22015
21856
|
|
22016
|
-
|
21857
|
+
var _createProvider = __webpack_require__(189);
|
22017
21858
|
|
22018
|
-
|
21859
|
+
var _createProvider2 = _interopRequireDefault(_createProvider);
|
21860
|
+
|
21861
|
+
var _createConnect = __webpack_require__(191);
|
21862
|
+
|
21863
|
+
var _createConnect2 = _interopRequireDefault(_createConnect);
|
21864
|
+
|
21865
|
+
function createAll(React) {
|
21866
|
+
var Provider = _createProvider2['default'](React);
|
21867
|
+
var connect = _createConnect2['default'](React);
|
21868
|
+
|
21869
|
+
return { Provider: Provider, connect: connect };
|
21870
|
+
}
|
21871
|
+
|
21872
|
+
module.exports = exports['default'];
|
22019
21873
|
|
22020
21874
|
/***/ },
|
22021
|
-
/*
|
21875
|
+
/* 189 */
|
22022
21876
|
/***/ function(module, exports, __webpack_require__) {
|
22023
21877
|
|
22024
|
-
|
21878
|
+
'use strict';
|
22025
21879
|
|
22026
|
-
|
21880
|
+
exports.__esModule = true;
|
22027
21881
|
|
22028
|
-
|
21882
|
+
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
22029
21883
|
|
22030
|
-
|
21884
|
+
exports['default'] = createProvider;
|
22031
21885
|
|
22032
|
-
|
21886
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
22033
21887
|
|
22034
|
-
|
21888
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
22035
21889
|
|
22036
|
-
|
21890
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
22037
21891
|
|
22038
|
-
|
22039
|
-
|
22040
|
-
|
21892
|
+
var _utilsCreateStoreShape = __webpack_require__(190);
|
21893
|
+
|
21894
|
+
var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
|
21895
|
+
|
21896
|
+
function isUsingOwnerContext(React) {
|
21897
|
+
var version = React.version;
|
21898
|
+
|
21899
|
+
if (typeof version !== 'string') {
|
21900
|
+
return true;
|
21901
|
+
}
|
21902
|
+
|
21903
|
+
var sections = version.split('.');
|
21904
|
+
var major = parseInt(sections[0], 10);
|
21905
|
+
var minor = parseInt(sections[1], 10);
|
21906
|
+
|
21907
|
+
return major === 0 && minor === 13;
|
21908
|
+
}
|
21909
|
+
|
21910
|
+
function createProvider(React) {
|
21911
|
+
var Component = React.Component;
|
21912
|
+
var PropTypes = React.PropTypes;
|
21913
|
+
var Children = React.Children;
|
21914
|
+
|
21915
|
+
var storeShape = _utilsCreateStoreShape2['default'](PropTypes);
|
21916
|
+
var requireFunctionChild = isUsingOwnerContext(React);
|
21917
|
+
|
21918
|
+
var didWarnAboutChild = false;
|
21919
|
+
function warnAboutFunctionChild() {
|
21920
|
+
if (didWarnAboutChild || requireFunctionChild) {
|
21921
|
+
return;
|
21922
|
+
}
|
21923
|
+
|
21924
|
+
didWarnAboutChild = true;
|
21925
|
+
console.error( // eslint-disable-line no-console
|
21926
|
+
'With React 0.14 and later versions, you no longer need to ' + 'wrap <Provider> child into a function.');
|
21927
|
+
}
|
21928
|
+
function warnAboutElementChild() {
|
21929
|
+
if (didWarnAboutChild || !requireFunctionChild) {
|
21930
|
+
return;
|
21931
|
+
}
|
21932
|
+
|
21933
|
+
didWarnAboutChild = true;
|
21934
|
+
console.error( // eslint-disable-line no-console
|
21935
|
+
'With React 0.13, you need to ' + 'wrap <Provider> child into a function. ' + 'This restriction will be removed with React 0.14.');
|
21936
|
+
}
|
21937
|
+
|
21938
|
+
var didWarnAboutReceivingStore = false;
|
21939
|
+
function warnAboutReceivingStore() {
|
21940
|
+
if (didWarnAboutReceivingStore) {
|
21941
|
+
return;
|
21942
|
+
}
|
21943
|
+
|
21944
|
+
didWarnAboutReceivingStore = true;
|
21945
|
+
console.error( // eslint-disable-line no-console
|
21946
|
+
'<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/rackt/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
|
21947
|
+
}
|
21948
|
+
|
21949
|
+
return (function (_Component) {
|
21950
|
+
_inherits(Provider, _Component);
|
21951
|
+
|
21952
|
+
Provider.prototype.getChildContext = function getChildContext() {
|
21953
|
+
return { store: this.store };
|
21954
|
+
};
|
21955
|
+
|
21956
|
+
_createClass(Provider, null, [{
|
21957
|
+
key: 'childContextTypes',
|
21958
|
+
value: {
|
21959
|
+
store: storeShape.isRequired
|
21960
|
+
},
|
21961
|
+
enumerable: true
|
21962
|
+
}, {
|
21963
|
+
key: 'propTypes',
|
21964
|
+
value: {
|
21965
|
+
store: storeShape.isRequired,
|
21966
|
+
children: (requireFunctionChild ? PropTypes.func : PropTypes.element).isRequired
|
21967
|
+
},
|
21968
|
+
enumerable: true
|
21969
|
+
}]);
|
21970
|
+
|
21971
|
+
function Provider(props, context) {
|
21972
|
+
_classCallCheck(this, Provider);
|
21973
|
+
|
21974
|
+
_Component.call(this, props, context);
|
21975
|
+
this.store = props.store;
|
21976
|
+
}
|
21977
|
+
|
21978
|
+
Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
21979
|
+
var store = this.store;
|
21980
|
+
var nextStore = nextProps.store;
|
21981
|
+
|
21982
|
+
if (store !== nextStore) {
|
21983
|
+
warnAboutReceivingStore();
|
21984
|
+
}
|
21985
|
+
};
|
21986
|
+
|
21987
|
+
Provider.prototype.render = function render() {
|
21988
|
+
var children = this.props.children;
|
21989
|
+
|
21990
|
+
if (typeof children === 'function') {
|
21991
|
+
warnAboutFunctionChild();
|
21992
|
+
children = children();
|
21993
|
+
} else {
|
21994
|
+
warnAboutElementChild();
|
21995
|
+
}
|
21996
|
+
|
21997
|
+
return Children.only(children);
|
21998
|
+
};
|
21999
|
+
|
22000
|
+
return Provider;
|
22001
|
+
})(Component);
|
22002
|
+
}
|
22003
|
+
|
22004
|
+
module.exports = exports['default'];
|
22005
|
+
|
22006
|
+
/***/ },
|
22007
|
+
/* 190 */
|
22008
|
+
/***/ function(module, exports) {
|
22009
|
+
|
22010
|
+
"use strict";
|
22011
|
+
|
22012
|
+
exports.__esModule = true;
|
22013
|
+
exports["default"] = createStoreShape;
|
22014
|
+
|
22015
|
+
function createStoreShape(PropTypes) {
|
22016
|
+
return PropTypes.shape({
|
22017
|
+
subscribe: PropTypes.func.isRequired,
|
22018
|
+
dispatch: PropTypes.func.isRequired,
|
22019
|
+
getState: PropTypes.func.isRequired
|
22020
|
+
});
|
22021
|
+
}
|
22022
|
+
|
22023
|
+
module.exports = exports["default"];
|
22024
|
+
|
22025
|
+
/***/ },
|
22026
|
+
/* 191 */
|
22027
|
+
/***/ function(module, exports, __webpack_require__) {
|
22028
|
+
|
22029
|
+
/* WEBPACK VAR INJECTION */(function(process) {'use strict';
|
22030
|
+
|
22031
|
+
exports.__esModule = true;
|
22032
|
+
|
22033
|
+
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
22034
|
+
|
22035
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
22036
|
+
|
22037
|
+
exports['default'] = createConnect;
|
22038
|
+
|
22039
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
22040
|
+
|
22041
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
|
22042
|
+
|
22043
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
22044
|
+
|
22045
|
+
var _utilsCreateStoreShape = __webpack_require__(190);
|
22046
|
+
|
22047
|
+
var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
|
22048
|
+
|
22049
|
+
var _utilsShallowEqual = __webpack_require__(192);
|
22050
|
+
|
22051
|
+
var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual);
|
22052
|
+
|
22053
|
+
var _utilsIsPlainObject = __webpack_require__(193);
|
22054
|
+
|
22055
|
+
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
|
22056
|
+
|
22057
|
+
var _utilsWrapActionCreators = __webpack_require__(194);
|
22058
|
+
|
22059
|
+
var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators);
|
22060
|
+
|
22061
|
+
var _invariant = __webpack_require__(205);
|
22062
|
+
|
22063
|
+
var _invariant2 = _interopRequireDefault(_invariant);
|
22064
|
+
|
22065
|
+
var defaultMapStateToProps = function defaultMapStateToProps() {
|
22066
|
+
return {};
|
22067
|
+
};
|
22068
|
+
var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) {
|
22069
|
+
return { dispatch: dispatch };
|
22070
|
+
};
|
22071
|
+
var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) {
|
22072
|
+
return _extends({}, parentProps, stateProps, dispatchProps);
|
22073
|
+
};
|
22074
|
+
|
22075
|
+
function getDisplayName(Component) {
|
22076
|
+
return Component.displayName || Component.name || 'Component';
|
22077
|
+
}
|
22078
|
+
|
22079
|
+
// Helps track hot reloading.
|
22080
|
+
var nextVersion = 0;
|
22081
|
+
|
22082
|
+
function createConnect(React) {
|
22083
|
+
var Component = React.Component;
|
22084
|
+
var PropTypes = React.PropTypes;
|
22085
|
+
|
22086
|
+
var storeShape = _utilsCreateStoreShape2['default'](PropTypes);
|
22087
|
+
|
22088
|
+
return function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
|
22089
|
+
var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
|
22090
|
+
|
22091
|
+
var shouldSubscribe = Boolean(mapStateToProps);
|
22092
|
+
var finalMapStateToProps = mapStateToProps || defaultMapStateToProps;
|
22093
|
+
var finalMapDispatchToProps = _utilsIsPlainObject2['default'](mapDispatchToProps) ? _utilsWrapActionCreators2['default'](mapDispatchToProps) : mapDispatchToProps || defaultMapDispatchToProps;
|
22094
|
+
var finalMergeProps = mergeProps || defaultMergeProps;
|
22095
|
+
var shouldUpdateStateProps = finalMapStateToProps.length > 1;
|
22096
|
+
var shouldUpdateDispatchProps = finalMapDispatchToProps.length > 1;
|
22097
|
+
var _options$pure = options.pure;
|
22098
|
+
var pure = _options$pure === undefined ? true : _options$pure;
|
22099
|
+
|
22100
|
+
// Helps track hot reloading.
|
22101
|
+
var version = nextVersion++;
|
22102
|
+
|
22103
|
+
function computeStateProps(store, props) {
|
22104
|
+
var state = store.getState();
|
22105
|
+
var stateProps = shouldUpdateStateProps ? finalMapStateToProps(state, props) : finalMapStateToProps(state);
|
22106
|
+
|
22107
|
+
_invariant2['default'](_utilsIsPlainObject2['default'](stateProps), '`mapStateToProps` must return an object. Instead received %s.', stateProps);
|
22108
|
+
return stateProps;
|
22109
|
+
}
|
22110
|
+
|
22111
|
+
function computeDispatchProps(store, props) {
|
22112
|
+
var dispatch = store.dispatch;
|
22113
|
+
|
22114
|
+
var dispatchProps = shouldUpdateDispatchProps ? finalMapDispatchToProps(dispatch, props) : finalMapDispatchToProps(dispatch);
|
22115
|
+
|
22116
|
+
_invariant2['default'](_utilsIsPlainObject2['default'](dispatchProps), '`mapDispatchToProps` must return an object. Instead received %s.', dispatchProps);
|
22117
|
+
return dispatchProps;
|
22118
|
+
}
|
22119
|
+
|
22120
|
+
function _computeNextState(stateProps, dispatchProps, parentProps) {
|
22121
|
+
var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps);
|
22122
|
+
_invariant2['default'](_utilsIsPlainObject2['default'](mergedProps), '`mergeProps` must return an object. Instead received %s.', mergedProps);
|
22123
|
+
return mergedProps;
|
22124
|
+
}
|
22125
|
+
|
22126
|
+
return function wrapWithConnect(WrappedComponent) {
|
22127
|
+
var Connect = (function (_Component) {
|
22128
|
+
_inherits(Connect, _Component);
|
22129
|
+
|
22130
|
+
Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) {
|
22131
|
+
return !pure || !_utilsShallowEqual2['default'](this.state.props, nextState.props);
|
22132
|
+
};
|
22133
|
+
|
22134
|
+
_createClass(Connect, null, [{
|
22135
|
+
key: 'displayName',
|
22136
|
+
value: 'Connect(' + getDisplayName(WrappedComponent) + ')',
|
22137
|
+
enumerable: true
|
22138
|
+
}, {
|
22139
|
+
key: 'WrappedComponent',
|
22140
|
+
value: WrappedComponent,
|
22141
|
+
enumerable: true
|
22142
|
+
}, {
|
22143
|
+
key: 'contextTypes',
|
22144
|
+
value: {
|
22145
|
+
store: storeShape
|
22146
|
+
},
|
22147
|
+
enumerable: true
|
22148
|
+
}, {
|
22149
|
+
key: 'propTypes',
|
22150
|
+
value: {
|
22151
|
+
store: storeShape
|
22152
|
+
},
|
22153
|
+
enumerable: true
|
22154
|
+
}]);
|
22155
|
+
|
22156
|
+
function Connect(props, context) {
|
22157
|
+
_classCallCheck(this, Connect);
|
22158
|
+
|
22159
|
+
_Component.call(this, props, context);
|
22160
|
+
this.version = version;
|
22161
|
+
this.store = props.store || context.store;
|
22162
|
+
|
22163
|
+
_invariant2['default'](this.store, 'Could not find "store" in either the context or ' + ('props of "' + this.constructor.displayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + this.constructor.displayName + '".'));
|
22164
|
+
|
22165
|
+
this.stateProps = computeStateProps(this.store, props);
|
22166
|
+
this.dispatchProps = computeDispatchProps(this.store, props);
|
22167
|
+
this.state = {
|
22168
|
+
props: this.computeNextState()
|
22169
|
+
};
|
22170
|
+
}
|
22171
|
+
|
22172
|
+
Connect.prototype.computeNextState = function computeNextState() {
|
22173
|
+
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
|
22174
|
+
|
22175
|
+
return _computeNextState(this.stateProps, this.dispatchProps, props);
|
22176
|
+
};
|
22177
|
+
|
22178
|
+
Connect.prototype.updateStateProps = function updateStateProps() {
|
22179
|
+
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
|
22180
|
+
|
22181
|
+
var nextStateProps = computeStateProps(this.store, props);
|
22182
|
+
if (_utilsShallowEqual2['default'](nextStateProps, this.stateProps)) {
|
22183
|
+
return false;
|
22184
|
+
}
|
22185
|
+
|
22186
|
+
this.stateProps = nextStateProps;
|
22187
|
+
return true;
|
22188
|
+
};
|
22189
|
+
|
22190
|
+
Connect.prototype.updateDispatchProps = function updateDispatchProps() {
|
22191
|
+
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
|
22192
|
+
|
22193
|
+
var nextDispatchProps = computeDispatchProps(this.store, props);
|
22194
|
+
if (_utilsShallowEqual2['default'](nextDispatchProps, this.dispatchProps)) {
|
22195
|
+
return false;
|
22196
|
+
}
|
22197
|
+
|
22198
|
+
this.dispatchProps = nextDispatchProps;
|
22199
|
+
return true;
|
22200
|
+
};
|
22201
|
+
|
22202
|
+
Connect.prototype.updateState = function updateState() {
|
22203
|
+
var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
|
22204
|
+
|
22205
|
+
var nextState = this.computeNextState(props);
|
22206
|
+
if (!_utilsShallowEqual2['default'](nextState, this.state.props)) {
|
22207
|
+
this.setState({
|
22208
|
+
props: nextState
|
22209
|
+
});
|
22210
|
+
}
|
22211
|
+
};
|
22212
|
+
|
22213
|
+
Connect.prototype.isSubscribed = function isSubscribed() {
|
22214
|
+
return typeof this.unsubscribe === 'function';
|
22215
|
+
};
|
22216
|
+
|
22217
|
+
Connect.prototype.trySubscribe = function trySubscribe() {
|
22218
|
+
if (shouldSubscribe && !this.unsubscribe) {
|
22219
|
+
this.unsubscribe = this.store.subscribe(this.handleChange.bind(this));
|
22220
|
+
this.handleChange();
|
22221
|
+
}
|
22222
|
+
};
|
22223
|
+
|
22224
|
+
Connect.prototype.tryUnsubscribe = function tryUnsubscribe() {
|
22225
|
+
if (this.unsubscribe) {
|
22226
|
+
this.unsubscribe();
|
22227
|
+
this.unsubscribe = null;
|
22228
|
+
}
|
22229
|
+
};
|
22230
|
+
|
22231
|
+
Connect.prototype.componentDidMount = function componentDidMount() {
|
22232
|
+
this.trySubscribe();
|
22233
|
+
};
|
22234
|
+
|
22235
|
+
Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
22236
|
+
if (!_utilsShallowEqual2['default'](nextProps, this.props)) {
|
22237
|
+
if (shouldUpdateStateProps) {
|
22238
|
+
this.updateStateProps(nextProps);
|
22239
|
+
}
|
22240
|
+
|
22241
|
+
if (shouldUpdateDispatchProps) {
|
22242
|
+
this.updateDispatchProps(nextProps);
|
22243
|
+
}
|
22244
|
+
|
22245
|
+
this.updateState(nextProps);
|
22246
|
+
}
|
22247
|
+
};
|
22248
|
+
|
22249
|
+
Connect.prototype.componentWillUnmount = function componentWillUnmount() {
|
22250
|
+
this.tryUnsubscribe();
|
22251
|
+
};
|
22252
|
+
|
22253
|
+
Connect.prototype.handleChange = function handleChange() {
|
22254
|
+
if (!this.unsubscribe) {
|
22255
|
+
return;
|
22256
|
+
}
|
22257
|
+
|
22258
|
+
if (this.updateStateProps()) {
|
22259
|
+
this.updateState();
|
22260
|
+
}
|
22261
|
+
};
|
22262
|
+
|
22263
|
+
Connect.prototype.getWrappedInstance = function getWrappedInstance() {
|
22264
|
+
return this.refs.wrappedInstance;
|
22265
|
+
};
|
22266
|
+
|
22267
|
+
Connect.prototype.render = function render() {
|
22268
|
+
return React.createElement(WrappedComponent, _extends({ ref: 'wrappedInstance'
|
22269
|
+
}, this.state.props));
|
22270
|
+
};
|
22271
|
+
|
22272
|
+
return Connect;
|
22273
|
+
})(Component);
|
22274
|
+
|
22275
|
+
if (process.env.NODE_ENV !== 'production') {
|
22276
|
+
Connect.prototype.componentWillUpdate = function componentWillUpdate() {
|
22277
|
+
if (this.version === version) {
|
22278
|
+
return;
|
22279
|
+
}
|
22280
|
+
|
22281
|
+
// We are hot reloading!
|
22282
|
+
this.version = version;
|
22283
|
+
|
22284
|
+
// Update the state and bindings.
|
22285
|
+
this.trySubscribe();
|
22286
|
+
this.updateStateProps();
|
22287
|
+
this.updateDispatchProps();
|
22288
|
+
this.updateState();
|
22289
|
+
};
|
22290
|
+
}
|
22291
|
+
|
22292
|
+
return Connect;
|
22293
|
+
};
|
22294
|
+
};
|
22295
|
+
}
|
22296
|
+
|
22297
|
+
module.exports = exports['default'];
|
22298
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
|
22299
|
+
|
22300
|
+
/***/ },
|
22301
|
+
/* 192 */
|
22302
|
+
/***/ function(module, exports) {
|
22303
|
+
|
22304
|
+
"use strict";
|
22305
|
+
|
22306
|
+
exports.__esModule = true;
|
22307
|
+
exports["default"] = shallowEqual;
|
22308
|
+
|
22309
|
+
function shallowEqual(objA, objB) {
|
22310
|
+
if (objA === objB) {
|
22311
|
+
return true;
|
22312
|
+
}
|
22313
|
+
|
22314
|
+
var keysA = Object.keys(objA);
|
22315
|
+
var keysB = Object.keys(objB);
|
22316
|
+
|
22317
|
+
if (keysA.length !== keysB.length) {
|
22318
|
+
return false;
|
22319
|
+
}
|
22320
|
+
|
22321
|
+
// Test for A's keys different from B.
|
22322
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
22323
|
+
for (var i = 0; i < keysA.length; i++) {
|
22324
|
+
if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
|
22325
|
+
return false;
|
22326
|
+
}
|
22327
|
+
}
|
22328
|
+
|
22329
|
+
return true;
|
22330
|
+
}
|
22331
|
+
|
22332
|
+
module.exports = exports["default"];
|
22333
|
+
|
22334
|
+
/***/ },
|
22335
|
+
/* 193 */
|
22336
|
+
/***/ function(module, exports) {
|
22337
|
+
|
22338
|
+
'use strict';
|
22339
|
+
|
22340
|
+
exports.__esModule = true;
|
22341
|
+
exports['default'] = isPlainObject;
|
22342
|
+
var fnToString = function fnToString(fn) {
|
22343
|
+
return Function.prototype.toString.call(fn);
|
22344
|
+
};
|
22345
|
+
|
22346
|
+
/**
|
22347
|
+
* @param {any} obj The object to inspect.
|
22348
|
+
* @returns {boolean} True if the argument appears to be a plain object.
|
22349
|
+
*/
|
22350
|
+
|
22351
|
+
function isPlainObject(obj) {
|
22352
|
+
if (!obj || typeof obj !== 'object') {
|
22353
|
+
return false;
|
22354
|
+
}
|
22355
|
+
|
22356
|
+
var proto = typeof obj.constructor === 'function' ? Object.getPrototypeOf(obj) : Object.prototype;
|
22357
|
+
|
22358
|
+
if (proto === null) {
|
22359
|
+
return true;
|
22360
|
+
}
|
22361
|
+
|
22362
|
+
var constructor = proto.constructor;
|
22363
|
+
|
22364
|
+
return typeof constructor === 'function' && constructor instanceof constructor && fnToString(constructor) === fnToString(Object);
|
22365
|
+
}
|
22366
|
+
|
22367
|
+
module.exports = exports['default'];
|
22368
|
+
|
22369
|
+
/***/ },
|
22370
|
+
/* 194 */
|
22371
|
+
/***/ function(module, exports, __webpack_require__) {
|
22372
|
+
|
22373
|
+
'use strict';
|
22374
|
+
|
22375
|
+
exports.__esModule = true;
|
22376
|
+
exports['default'] = wrapActionCreators;
|
22377
|
+
|
22378
|
+
var _redux = __webpack_require__(195);
|
22379
|
+
|
22380
|
+
function wrapActionCreators(actionCreators) {
|
22381
|
+
return function (dispatch) {
|
22382
|
+
return _redux.bindActionCreators(actionCreators, dispatch);
|
22383
|
+
};
|
22384
|
+
}
|
22385
|
+
|
22386
|
+
module.exports = exports['default'];
|
22387
|
+
|
22388
|
+
/***/ },
|
22389
|
+
/* 195 */
|
22390
|
+
/***/ function(module, exports, __webpack_require__) {
|
22391
|
+
|
22392
|
+
/* WEBPACK VAR INJECTION */(function(process) {'use strict';
|
22393
|
+
|
22394
|
+
exports.__esModule = true;
|
22395
|
+
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
|
22396
|
+
|
22397
|
+
var _createStore = __webpack_require__(196);
|
22398
|
+
|
22399
|
+
var _createStore2 = _interopRequireDefault(_createStore);
|
22400
|
+
|
22401
|
+
var _combineReducers = __webpack_require__(200);
|
22402
|
+
|
22403
|
+
var _combineReducers2 = _interopRequireDefault(_combineReducers);
|
22404
|
+
|
22405
|
+
var _bindActionCreators = __webpack_require__(202);
|
22406
|
+
|
22407
|
+
var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
|
22408
|
+
|
22409
|
+
var _applyMiddleware = __webpack_require__(203);
|
22410
|
+
|
22411
|
+
var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
|
22412
|
+
|
22413
|
+
var _compose = __webpack_require__(204);
|
22414
|
+
|
22415
|
+
var _compose2 = _interopRequireDefault(_compose);
|
22416
|
+
|
22417
|
+
var _warning = __webpack_require__(201);
|
22418
|
+
|
22419
|
+
var _warning2 = _interopRequireDefault(_warning);
|
22420
|
+
|
22421
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
22422
|
+
|
22423
|
+
/*
|
22424
|
+
* This is a dummy function to check if the function name has been altered by minification.
|
22425
|
+
* If the function has been minified and NODE_ENV !== 'production', warn the user.
|
22426
|
+
*/
|
22427
|
+
function isCrushed() {}
|
22428
|
+
|
22429
|
+
if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
|
22430
|
+
(0, _warning2["default"])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
|
22431
|
+
}
|
22432
|
+
|
22433
|
+
exports.createStore = _createStore2["default"];
|
22434
|
+
exports.combineReducers = _combineReducers2["default"];
|
22435
|
+
exports.bindActionCreators = _bindActionCreators2["default"];
|
22436
|
+
exports.applyMiddleware = _applyMiddleware2["default"];
|
22437
|
+
exports.compose = _compose2["default"];
|
22438
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
|
22439
|
+
|
22440
|
+
/***/ },
|
22441
|
+
/* 196 */
|
22442
|
+
/***/ function(module, exports, __webpack_require__) {
|
22443
|
+
|
22444
|
+
'use strict';
|
22445
|
+
|
22446
|
+
exports.__esModule = true;
|
22447
|
+
exports.ActionTypes = undefined;
|
22448
|
+
exports["default"] = createStore;
|
22449
|
+
|
22450
|
+
var _isPlainObject = __webpack_require__(197);
|
22451
|
+
|
22452
|
+
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
22453
|
+
|
22454
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
22455
|
+
|
22456
|
+
/**
|
22457
|
+
* These are private action types reserved by Redux.
|
22458
|
+
* For any unknown actions, you must return the current state.
|
22459
|
+
* If the current state is undefined, you must return the initial state.
|
22460
|
+
* Do not reference these action types directly in your code.
|
22461
|
+
*/
|
22462
|
+
var ActionTypes = exports.ActionTypes = {
|
22463
|
+
INIT: '@@redux/INIT'
|
22464
|
+
};
|
22465
|
+
|
22466
|
+
/**
|
22467
|
+
* Creates a Redux store that holds the state tree.
|
22468
|
+
* The only way to change the data in the store is to call `dispatch()` on it.
|
22469
|
+
*
|
22470
|
+
* There should only be a single store in your app. To specify how different
|
22471
|
+
* parts of the state tree respond to actions, you may combine several reducers
|
22472
|
+
* into a single reducer function by using `combineReducers`.
|
22473
|
+
*
|
22474
|
+
* @param {Function} reducer A function that returns the next state tree, given
|
22475
|
+
* the current state tree and the action to handle.
|
22476
|
+
*
|
22477
|
+
* @param {any} [initialState] The initial state. You may optionally specify it
|
22478
|
+
* to hydrate the state from the server in universal apps, or to restore a
|
22479
|
+
* previously serialized user session.
|
22480
|
+
* If you use `combineReducers` to produce the root reducer function, this must be
|
22481
|
+
* an object with the same shape as `combineReducers` keys.
|
22482
|
+
*
|
22483
|
+
* @param {Function} enhancer The store enhancer. You may optionally specify it
|
22484
|
+
* to enhance the store with third-party capabilities such as middleware,
|
22485
|
+
* time travel, persistence, etc. The only store enhancer that ships with Redux
|
22486
|
+
* is `applyMiddleware()`.
|
22487
|
+
*
|
22488
|
+
* @returns {Store} A Redux store that lets you read the state, dispatch actions
|
22489
|
+
* and subscribe to changes.
|
22490
|
+
*/
|
22491
|
+
function createStore(reducer, initialState, enhancer) {
|
22492
|
+
if (typeof initialState === 'function' && typeof enhancer === 'undefined') {
|
22493
|
+
enhancer = initialState;
|
22494
|
+
initialState = undefined;
|
22495
|
+
}
|
22496
|
+
|
22497
|
+
if (typeof enhancer !== 'undefined') {
|
22498
|
+
if (typeof enhancer !== 'function') {
|
22499
|
+
throw new Error('Expected the enhancer to be a function.');
|
22500
|
+
}
|
22501
|
+
|
22502
|
+
return enhancer(createStore)(reducer, initialState);
|
22503
|
+
}
|
22504
|
+
|
22505
|
+
if (typeof reducer !== 'function') {
|
22506
|
+
throw new Error('Expected the reducer to be a function.');
|
22507
|
+
}
|
22508
|
+
|
22509
|
+
var currentReducer = reducer;
|
22510
|
+
var currentState = initialState;
|
22511
|
+
var currentListeners = [];
|
22512
|
+
var nextListeners = currentListeners;
|
22513
|
+
var isDispatching = false;
|
22514
|
+
|
22515
|
+
function ensureCanMutateNextListeners() {
|
22516
|
+
if (nextListeners === currentListeners) {
|
22517
|
+
nextListeners = currentListeners.slice();
|
22518
|
+
}
|
22519
|
+
}
|
22520
|
+
|
22521
|
+
/**
|
22522
|
+
* Reads the state tree managed by the store.
|
22523
|
+
*
|
22524
|
+
* @returns {any} The current state tree of your application.
|
22525
|
+
*/
|
22526
|
+
function getState() {
|
22527
|
+
return currentState;
|
22528
|
+
}
|
22529
|
+
|
22530
|
+
/**
|
22531
|
+
* Adds a change listener. It will be called any time an action is dispatched,
|
22532
|
+
* and some part of the state tree may potentially have changed. You may then
|
22533
|
+
* call `getState()` to read the current state tree inside the callback.
|
22534
|
+
*
|
22535
|
+
* You may call `dispatch()` from a change listener, with the following
|
22536
|
+
* caveats:
|
22537
|
+
*
|
22538
|
+
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
|
22539
|
+
* If you subscribe or unsubscribe while the listeners are being invoked, this
|
22540
|
+
* will not have any effect on the `dispatch()` that is currently in progress.
|
22541
|
+
* However, the next `dispatch()` call, whether nested or not, will use a more
|
22542
|
+
* recent snapshot of the subscription list.
|
22543
|
+
*
|
22544
|
+
* 2. The listener should not expect to see all states changes, as the state
|
22545
|
+
* might have been updated multiple times during a nested `dispatch()` before
|
22546
|
+
* the listener is called. It is, however, guaranteed that all subscribers
|
22547
|
+
* registered before the `dispatch()` started will be called with the latest
|
22548
|
+
* state by the time it exits.
|
22549
|
+
*
|
22550
|
+
* @param {Function} listener A callback to be invoked on every dispatch.
|
22551
|
+
* @returns {Function} A function to remove this change listener.
|
22552
|
+
*/
|
22553
|
+
function subscribe(listener) {
|
22554
|
+
if (typeof listener !== 'function') {
|
22555
|
+
throw new Error('Expected listener to be a function.');
|
22556
|
+
}
|
22557
|
+
|
22558
|
+
var isSubscribed = true;
|
22559
|
+
|
22560
|
+
ensureCanMutateNextListeners();
|
22561
|
+
nextListeners.push(listener);
|
22562
|
+
|
22563
|
+
return function unsubscribe() {
|
22564
|
+
if (!isSubscribed) {
|
22565
|
+
return;
|
22566
|
+
}
|
22567
|
+
|
22568
|
+
isSubscribed = false;
|
22569
|
+
|
22570
|
+
ensureCanMutateNextListeners();
|
22571
|
+
var index = nextListeners.indexOf(listener);
|
22572
|
+
nextListeners.splice(index, 1);
|
22573
|
+
};
|
22574
|
+
}
|
22575
|
+
|
22576
|
+
/**
|
22577
|
+
* Dispatches an action. It is the only way to trigger a state change.
|
22578
|
+
*
|
22579
|
+
* The `reducer` function, used to create the store, will be called with the
|
22580
|
+
* current state tree and the given `action`. Its return value will
|
22581
|
+
* be considered the **next** state of the tree, and the change listeners
|
22582
|
+
* will be notified.
|
22583
|
+
*
|
22584
|
+
* The base implementation only supports plain object actions. If you want to
|
22585
|
+
* dispatch a Promise, an Observable, a thunk, or something else, you need to
|
22586
|
+
* wrap your store creating function into the corresponding middleware. For
|
22587
|
+
* example, see the documentation for the `redux-thunk` package. Even the
|
22588
|
+
* middleware will eventually dispatch plain object actions using this method.
|
22589
|
+
*
|
22590
|
+
* @param {Object} action A plain object representing “what changed”. It is
|
22591
|
+
* a good idea to keep actions serializable so you can record and replay user
|
22592
|
+
* sessions, or use the time travelling `redux-devtools`. An action must have
|
22593
|
+
* a `type` property which may not be `undefined`. It is a good idea to use
|
22594
|
+
* string constants for action types.
|
22595
|
+
*
|
22596
|
+
* @returns {Object} For convenience, the same action object you dispatched.
|
22597
|
+
*
|
22598
|
+
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
|
22599
|
+
* return something else (for example, a Promise you can await).
|
22600
|
+
*/
|
22601
|
+
function dispatch(action) {
|
22602
|
+
if (!(0, _isPlainObject2["default"])(action)) {
|
22603
|
+
throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
|
22604
|
+
}
|
22605
|
+
|
22606
|
+
if (typeof action.type === 'undefined') {
|
22607
|
+
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
|
22608
|
+
}
|
22609
|
+
|
22610
|
+
if (isDispatching) {
|
22611
|
+
throw new Error('Reducers may not dispatch actions.');
|
22612
|
+
}
|
22613
|
+
|
22614
|
+
try {
|
22615
|
+
isDispatching = true;
|
22616
|
+
currentState = currentReducer(currentState, action);
|
22617
|
+
} finally {
|
22618
|
+
isDispatching = false;
|
22619
|
+
}
|
22620
|
+
|
22621
|
+
var listeners = currentListeners = nextListeners;
|
22622
|
+
for (var i = 0; i < listeners.length; i++) {
|
22623
|
+
listeners[i]();
|
22624
|
+
}
|
22625
|
+
|
22626
|
+
return action;
|
22627
|
+
}
|
22628
|
+
|
22629
|
+
/**
|
22630
|
+
* Replaces the reducer currently used by the store to calculate the state.
|
22631
|
+
*
|
22632
|
+
* You might need this if your app implements code splitting and you want to
|
22633
|
+
* load some of the reducers dynamically. You might also need this if you
|
22634
|
+
* implement a hot reloading mechanism for Redux.
|
22635
|
+
*
|
22636
|
+
* @param {Function} nextReducer The reducer for the store to use instead.
|
22637
|
+
* @returns {void}
|
22638
|
+
*/
|
22639
|
+
function replaceReducer(nextReducer) {
|
22640
|
+
if (typeof nextReducer !== 'function') {
|
22641
|
+
throw new Error('Expected the nextReducer to be a function.');
|
22642
|
+
}
|
22643
|
+
|
22644
|
+
currentReducer = nextReducer;
|
22645
|
+
dispatch({ type: ActionTypes.INIT });
|
22646
|
+
}
|
22647
|
+
|
22648
|
+
// When a store is created, an "INIT" action is dispatched so that every
|
22649
|
+
// reducer returns their initial state. This effectively populates
|
22650
|
+
// the initial state tree.
|
22651
|
+
dispatch({ type: ActionTypes.INIT });
|
22652
|
+
|
22653
|
+
return {
|
22654
|
+
dispatch: dispatch,
|
22655
|
+
subscribe: subscribe,
|
22656
|
+
getState: getState,
|
22657
|
+
replaceReducer: replaceReducer
|
22658
|
+
};
|
22659
|
+
}
|
22660
|
+
|
22661
|
+
/***/ },
|
22662
|
+
/* 197 */
|
22663
|
+
/***/ function(module, exports, __webpack_require__) {
|
22664
|
+
|
22665
|
+
var isHostObject = __webpack_require__(198),
|
22666
|
+
isObjectLike = __webpack_require__(199);
|
22667
|
+
|
22668
|
+
/** `Object#toString` result references. */
|
22669
|
+
var objectTag = '[object Object]';
|
22670
|
+
|
22671
|
+
/** Used for built-in method references. */
|
22672
|
+
var objectProto = Object.prototype;
|
22673
|
+
|
22674
|
+
/** Used to resolve the decompiled source of functions. */
|
22675
|
+
var funcToString = Function.prototype.toString;
|
22676
|
+
|
22677
|
+
/** Used to infer the `Object` constructor. */
|
22678
|
+
var objectCtorString = funcToString.call(Object);
|
22679
|
+
|
22680
|
+
/**
|
22681
|
+
* Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
|
22682
|
+
* of values.
|
22683
|
+
*/
|
22684
|
+
var objectToString = objectProto.toString;
|
22685
|
+
|
22686
|
+
/** Built-in value references. */
|
22687
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
22688
|
+
|
22689
|
+
/**
|
22690
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
22691
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
22692
|
+
*
|
22693
|
+
* @static
|
22694
|
+
* @memberOf _
|
22695
|
+
* @category Lang
|
22696
|
+
* @param {*} value The value to check.
|
22697
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
22698
|
+
* @example
|
22699
|
+
*
|
22700
|
+
* function Foo() {
|
22701
|
+
* this.a = 1;
|
22702
|
+
* }
|
22703
|
+
*
|
22704
|
+
* _.isPlainObject(new Foo);
|
22705
|
+
* // => false
|
22706
|
+
*
|
22707
|
+
* _.isPlainObject([1, 2, 3]);
|
22708
|
+
* // => false
|
22709
|
+
*
|
22710
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
22711
|
+
* // => true
|
22712
|
+
*
|
22713
|
+
* _.isPlainObject(Object.create(null));
|
22714
|
+
* // => true
|
22715
|
+
*/
|
22716
|
+
function isPlainObject(value) {
|
22717
|
+
if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
|
22718
|
+
return false;
|
22719
|
+
}
|
22720
|
+
var proto = objectProto;
|
22721
|
+
if (typeof value.constructor == 'function') {
|
22722
|
+
proto = getPrototypeOf(value);
|
22723
|
+
}
|
22724
|
+
if (proto === null) {
|
22725
|
+
return true;
|
22726
|
+
}
|
22727
|
+
var Ctor = proto.constructor;
|
22728
|
+
return (typeof Ctor == 'function' &&
|
22729
|
+
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
22730
|
+
}
|
22731
|
+
|
22732
|
+
module.exports = isPlainObject;
|
22733
|
+
|
22734
|
+
|
22735
|
+
/***/ },
|
22736
|
+
/* 198 */
|
22737
|
+
/***/ function(module, exports) {
|
22738
|
+
|
22739
|
+
/**
|
22740
|
+
* Checks if `value` is a host object in IE < 9.
|
22741
|
+
*
|
22742
|
+
* @private
|
22743
|
+
* @param {*} value The value to check.
|
22744
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
22745
|
+
*/
|
22746
|
+
function isHostObject(value) {
|
22747
|
+
// Many host objects are `Object` objects that can coerce to strings
|
22748
|
+
// despite having improperly defined `toString` methods.
|
22749
|
+
var result = false;
|
22750
|
+
if (value != null && typeof value.toString != 'function') {
|
22751
|
+
try {
|
22752
|
+
result = !!(value + '');
|
22753
|
+
} catch (e) {}
|
22754
|
+
}
|
22755
|
+
return result;
|
22756
|
+
}
|
22757
|
+
|
22758
|
+
module.exports = isHostObject;
|
22759
|
+
|
22760
|
+
|
22761
|
+
/***/ },
|
22762
|
+
/* 199 */
|
22763
|
+
/***/ function(module, exports) {
|
22764
|
+
|
22765
|
+
/**
|
22766
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
22767
|
+
* and has a `typeof` result of "object".
|
22768
|
+
*
|
22769
|
+
* @static
|
22770
|
+
* @memberOf _
|
22771
|
+
* @category Lang
|
22772
|
+
* @param {*} value The value to check.
|
22773
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
22774
|
+
* @example
|
22775
|
+
*
|
22776
|
+
* _.isObjectLike({});
|
22777
|
+
* // => true
|
22778
|
+
*
|
22779
|
+
* _.isObjectLike([1, 2, 3]);
|
22780
|
+
* // => true
|
22781
|
+
*
|
22782
|
+
* _.isObjectLike(_.noop);
|
22783
|
+
* // => false
|
22784
|
+
*
|
22785
|
+
* _.isObjectLike(null);
|
22786
|
+
* // => false
|
22787
|
+
*/
|
22788
|
+
function isObjectLike(value) {
|
22789
|
+
return !!value && typeof value == 'object';
|
22790
|
+
}
|
22791
|
+
|
22792
|
+
module.exports = isObjectLike;
|
22793
|
+
|
22794
|
+
|
22795
|
+
/***/ },
|
22796
|
+
/* 200 */
|
22797
|
+
/***/ function(module, exports, __webpack_require__) {
|
22798
|
+
|
22799
|
+
/* WEBPACK VAR INJECTION */(function(process) {'use strict';
|
22800
|
+
|
22801
|
+
exports.__esModule = true;
|
22802
|
+
exports["default"] = combineReducers;
|
22803
|
+
|
22804
|
+
var _createStore = __webpack_require__(196);
|
22805
|
+
|
22806
|
+
var _isPlainObject = __webpack_require__(197);
|
22807
|
+
|
22808
|
+
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
22809
|
+
|
22810
|
+
var _warning = __webpack_require__(201);
|
22811
|
+
|
22812
|
+
var _warning2 = _interopRequireDefault(_warning);
|
22813
|
+
|
22814
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
22815
|
+
|
22816
|
+
function getUndefinedStateErrorMessage(key, action) {
|
22817
|
+
var actionType = action && action.type;
|
22818
|
+
var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
|
22819
|
+
|
22820
|
+
return 'Reducer "' + key + '" returned undefined handling ' + actionName + '. ' + 'To ignore an action, you must explicitly return the previous state.';
|
22821
|
+
}
|
22822
|
+
|
22823
|
+
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action) {
|
22824
|
+
var reducerKeys = Object.keys(reducers);
|
22825
|
+
var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'initialState argument passed to createStore' : 'previous state received by the reducer';
|
22826
|
+
|
22827
|
+
if (reducerKeys.length === 0) {
|
22828
|
+
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
|
22829
|
+
}
|
22830
|
+
|
22831
|
+
if (!(0, _isPlainObject2["default"])(inputState)) {
|
22832
|
+
return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
|
22833
|
+
}
|
22834
|
+
|
22835
|
+
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
|
22836
|
+
return !reducers.hasOwnProperty(key);
|
22837
|
+
});
|
22838
|
+
|
22839
|
+
if (unexpectedKeys.length > 0) {
|
22840
|
+
return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
|
22841
|
+
}
|
22842
|
+
}
|
22843
|
+
|
22844
|
+
function assertReducerSanity(reducers) {
|
22845
|
+
Object.keys(reducers).forEach(function (key) {
|
22846
|
+
var reducer = reducers[key];
|
22847
|
+
var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
|
22848
|
+
|
22849
|
+
if (typeof initialState === 'undefined') {
|
22850
|
+
throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
|
22851
|
+
}
|
22852
|
+
|
22853
|
+
var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
|
22854
|
+
if (typeof reducer(undefined, { type: type }) === 'undefined') {
|
22855
|
+
throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
|
22856
|
+
}
|
22857
|
+
});
|
22858
|
+
}
|
22859
|
+
|
22860
|
+
/**
|
22861
|
+
* Turns an object whose values are different reducer functions, into a single
|
22862
|
+
* reducer function. It will call every child reducer, and gather their results
|
22863
|
+
* into a single state object, whose keys correspond to the keys of the passed
|
22864
|
+
* reducer functions.
|
22865
|
+
*
|
22866
|
+
* @param {Object} reducers An object whose values correspond to different
|
22867
|
+
* reducer functions that need to be combined into one. One handy way to obtain
|
22868
|
+
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
|
22869
|
+
* undefined for any action. Instead, they should return their initial state
|
22870
|
+
* if the state passed to them was undefined, and the current state for any
|
22871
|
+
* unrecognized action.
|
22872
|
+
*
|
22873
|
+
* @returns {Function} A reducer function that invokes every reducer inside the
|
22874
|
+
* passed object, and builds a state object with the same shape.
|
22875
|
+
*/
|
22876
|
+
function combineReducers(reducers) {
|
22877
|
+
var reducerKeys = Object.keys(reducers);
|
22878
|
+
var finalReducers = {};
|
22879
|
+
for (var i = 0; i < reducerKeys.length; i++) {
|
22880
|
+
var key = reducerKeys[i];
|
22881
|
+
if (typeof reducers[key] === 'function') {
|
22882
|
+
finalReducers[key] = reducers[key];
|
22883
|
+
}
|
22884
|
+
}
|
22885
|
+
var finalReducerKeys = Object.keys(finalReducers);
|
22886
|
+
|
22887
|
+
var sanityError;
|
22888
|
+
try {
|
22889
|
+
assertReducerSanity(finalReducers);
|
22890
|
+
} catch (e) {
|
22891
|
+
sanityError = e;
|
22892
|
+
}
|
22893
|
+
|
22894
|
+
return function combination() {
|
22895
|
+
var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
22896
|
+
var action = arguments[1];
|
22897
|
+
|
22898
|
+
if (sanityError) {
|
22899
|
+
throw sanityError;
|
22900
|
+
}
|
22901
|
+
|
22902
|
+
if (process.env.NODE_ENV !== 'production') {
|
22903
|
+
var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action);
|
22904
|
+
if (warningMessage) {
|
22905
|
+
(0, _warning2["default"])(warningMessage);
|
22906
|
+
}
|
22907
|
+
}
|
22908
|
+
|
22909
|
+
var hasChanged = false;
|
22910
|
+
var nextState = {};
|
22911
|
+
for (var i = 0; i < finalReducerKeys.length; i++) {
|
22912
|
+
var key = finalReducerKeys[i];
|
22913
|
+
var reducer = finalReducers[key];
|
22914
|
+
var previousStateForKey = state[key];
|
22915
|
+
var nextStateForKey = reducer(previousStateForKey, action);
|
22916
|
+
if (typeof nextStateForKey === 'undefined') {
|
22917
|
+
var errorMessage = getUndefinedStateErrorMessage(key, action);
|
22918
|
+
throw new Error(errorMessage);
|
22919
|
+
}
|
22920
|
+
nextState[key] = nextStateForKey;
|
22921
|
+
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
|
22922
|
+
}
|
22923
|
+
return hasChanged ? nextState : state;
|
22924
|
+
};
|
22925
|
+
}
|
22926
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
|
22927
|
+
|
22928
|
+
/***/ },
|
22929
|
+
/* 201 */
|
22930
|
+
/***/ function(module, exports) {
|
22931
|
+
|
22932
|
+
'use strict';
|
22933
|
+
|
22934
|
+
exports.__esModule = true;
|
22935
|
+
exports["default"] = warning;
|
22936
|
+
/**
|
22937
|
+
* Prints a warning in the console if it exists.
|
22938
|
+
*
|
22939
|
+
* @param {String} message The warning message.
|
22940
|
+
* @returns {void}
|
22941
|
+
*/
|
22942
|
+
function warning(message) {
|
22943
|
+
/* eslint-disable no-console */
|
22944
|
+
if (typeof console !== 'undefined' && typeof console.error === 'function') {
|
22945
|
+
console.error(message);
|
22946
|
+
}
|
22947
|
+
/* eslint-enable no-console */
|
22948
|
+
try {
|
22949
|
+
// This error was thrown as a convenience so that you can use this stack
|
22950
|
+
// to find the callsite that caused this warning to fire.
|
22951
|
+
throw new Error(message);
|
22952
|
+
/* eslint-disable no-empty */
|
22953
|
+
} catch (e) {}
|
22954
|
+
/* eslint-enable no-empty */
|
22955
|
+
}
|
22956
|
+
|
22957
|
+
/***/ },
|
22958
|
+
/* 202 */
|
22959
|
+
/***/ function(module, exports) {
|
22960
|
+
|
22961
|
+
'use strict';
|
22962
|
+
|
22963
|
+
exports.__esModule = true;
|
22964
|
+
exports["default"] = bindActionCreators;
|
22965
|
+
function bindActionCreator(actionCreator, dispatch) {
|
22966
|
+
return function () {
|
22967
|
+
return dispatch(actionCreator.apply(undefined, arguments));
|
22968
|
+
};
|
22969
|
+
}
|
22970
|
+
|
22971
|
+
/**
|
22972
|
+
* Turns an object whose values are action creators, into an object with the
|
22973
|
+
* same keys, but with every function wrapped into a `dispatch` call so they
|
22974
|
+
* may be invoked directly. This is just a convenience method, as you can call
|
22975
|
+
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
|
22976
|
+
*
|
22977
|
+
* For convenience, you can also pass a single function as the first argument,
|
22978
|
+
* and get a function in return.
|
22979
|
+
*
|
22980
|
+
* @param {Function|Object} actionCreators An object whose values are action
|
22981
|
+
* creator functions. One handy way to obtain it is to use ES6 `import * as`
|
22982
|
+
* syntax. You may also pass a single function.
|
22983
|
+
*
|
22984
|
+
* @param {Function} dispatch The `dispatch` function available on your Redux
|
22985
|
+
* store.
|
22986
|
+
*
|
22987
|
+
* @returns {Function|Object} The object mimicking the original object, but with
|
22988
|
+
* every action creator wrapped into the `dispatch` call. If you passed a
|
22989
|
+
* function as `actionCreators`, the return value will also be a single
|
22990
|
+
* function.
|
22991
|
+
*/
|
22992
|
+
function bindActionCreators(actionCreators, dispatch) {
|
22993
|
+
if (typeof actionCreators === 'function') {
|
22994
|
+
return bindActionCreator(actionCreators, dispatch);
|
22995
|
+
}
|
22996
|
+
|
22997
|
+
if (typeof actionCreators !== 'object' || actionCreators === null) {
|
22998
|
+
throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
|
22999
|
+
}
|
23000
|
+
|
23001
|
+
var keys = Object.keys(actionCreators);
|
23002
|
+
var boundActionCreators = {};
|
23003
|
+
for (var i = 0; i < keys.length; i++) {
|
23004
|
+
var key = keys[i];
|
23005
|
+
var actionCreator = actionCreators[key];
|
23006
|
+
if (typeof actionCreator === 'function') {
|
23007
|
+
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
|
23008
|
+
}
|
23009
|
+
}
|
23010
|
+
return boundActionCreators;
|
23011
|
+
}
|
23012
|
+
|
23013
|
+
/***/ },
|
23014
|
+
/* 203 */
|
23015
|
+
/***/ function(module, exports, __webpack_require__) {
|
23016
|
+
|
23017
|
+
'use strict';
|
23018
|
+
|
23019
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
23020
|
+
|
23021
|
+
exports.__esModule = true;
|
23022
|
+
exports["default"] = applyMiddleware;
|
23023
|
+
|
23024
|
+
var _compose = __webpack_require__(204);
|
23025
|
+
|
23026
|
+
var _compose2 = _interopRequireDefault(_compose);
|
23027
|
+
|
23028
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
23029
|
+
|
23030
|
+
/**
|
23031
|
+
* Creates a store enhancer that applies middleware to the dispatch method
|
23032
|
+
* of the Redux store. This is handy for a variety of tasks, such as expressing
|
23033
|
+
* asynchronous actions in a concise manner, or logging every action payload.
|
23034
|
+
*
|
23035
|
+
* See `redux-thunk` package as an example of the Redux middleware.
|
23036
|
+
*
|
23037
|
+
* Because middleware is potentially asynchronous, this should be the first
|
23038
|
+
* store enhancer in the composition chain.
|
23039
|
+
*
|
23040
|
+
* Note that each middleware will be given the `dispatch` and `getState` functions
|
23041
|
+
* as named arguments.
|
23042
|
+
*
|
23043
|
+
* @param {...Function} middlewares The middleware chain to be applied.
|
23044
|
+
* @returns {Function} A store enhancer applying the middleware.
|
23045
|
+
*/
|
23046
|
+
function applyMiddleware() {
|
23047
|
+
for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
|
23048
|
+
middlewares[_key] = arguments[_key];
|
23049
|
+
}
|
23050
|
+
|
23051
|
+
return function (createStore) {
|
23052
|
+
return function (reducer, initialState, enhancer) {
|
23053
|
+
var store = createStore(reducer, initialState, enhancer);
|
23054
|
+
var _dispatch = store.dispatch;
|
23055
|
+
var chain = [];
|
23056
|
+
|
23057
|
+
var middlewareAPI = {
|
23058
|
+
getState: store.getState,
|
23059
|
+
dispatch: function dispatch(action) {
|
23060
|
+
return _dispatch(action);
|
23061
|
+
}
|
23062
|
+
};
|
23063
|
+
chain = middlewares.map(function (middleware) {
|
23064
|
+
return middleware(middlewareAPI);
|
23065
|
+
});
|
23066
|
+
_dispatch = _compose2["default"].apply(undefined, chain)(store.dispatch);
|
23067
|
+
|
23068
|
+
return _extends({}, store, {
|
23069
|
+
dispatch: _dispatch
|
23070
|
+
});
|
23071
|
+
};
|
23072
|
+
};
|
23073
|
+
}
|
23074
|
+
|
23075
|
+
/***/ },
|
23076
|
+
/* 204 */
|
23077
|
+
/***/ function(module, exports) {
|
23078
|
+
|
23079
|
+
"use strict";
|
23080
|
+
|
23081
|
+
exports.__esModule = true;
|
23082
|
+
exports["default"] = compose;
|
23083
|
+
/**
|
23084
|
+
* Composes single-argument functions from right to left.
|
23085
|
+
*
|
23086
|
+
* @param {...Function} funcs The functions to compose.
|
23087
|
+
* @returns {Function} A function obtained by composing functions from right to
|
23088
|
+
* left. For example, compose(f, g, h) is identical to arg => f(g(h(arg))).
|
23089
|
+
*/
|
23090
|
+
function compose() {
|
23091
|
+
for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
|
23092
|
+
funcs[_key] = arguments[_key];
|
23093
|
+
}
|
23094
|
+
|
23095
|
+
return function () {
|
23096
|
+
if (funcs.length === 0) {
|
23097
|
+
return arguments.length <= 0 ? undefined : arguments[0];
|
23098
|
+
}
|
23099
|
+
|
23100
|
+
var last = funcs[funcs.length - 1];
|
23101
|
+
var rest = funcs.slice(0, -1);
|
23102
|
+
|
23103
|
+
return rest.reduceRight(function (composed, f) {
|
23104
|
+
return f(composed);
|
23105
|
+
}, last.apply(undefined, arguments));
|
23106
|
+
};
|
23107
|
+
}
|
23108
|
+
|
23109
|
+
/***/ },
|
23110
|
+
/* 205 */
|
23111
|
+
/***/ function(module, exports, __webpack_require__) {
|
23112
|
+
|
23113
|
+
/* WEBPACK VAR INJECTION */(function(process) {/**
|
23114
|
+
* Copyright 2013-2015, Facebook, Inc.
|
23115
|
+
* All rights reserved.
|
23116
|
+
*
|
23117
|
+
* This source code is licensed under the BSD-style license found in the
|
23118
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
23119
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
23120
|
+
*/
|
23121
|
+
|
23122
|
+
'use strict';
|
23123
|
+
|
23124
|
+
/**
|
23125
|
+
* Use invariant() to assert state which your program assumes to be true.
|
23126
|
+
*
|
23127
|
+
* Provide sprintf-style format (only %s is supported) and arguments
|
23128
|
+
* to provide information about what broke and what you were
|
23129
|
+
* expecting.
|
23130
|
+
*
|
23131
|
+
* The invariant message will be stripped in production, but the invariant
|
23132
|
+
* will remain to ensure logic does not differ in production.
|
23133
|
+
*/
|
23134
|
+
|
23135
|
+
var invariant = function(condition, format, a, b, c, d, e, f) {
|
23136
|
+
if (process.env.NODE_ENV !== 'production') {
|
23137
|
+
if (format === undefined) {
|
23138
|
+
throw new Error('invariant requires an error message argument');
|
23139
|
+
}
|
23140
|
+
}
|
23141
|
+
|
23142
|
+
if (!condition) {
|
23143
|
+
var error;
|
23144
|
+
if (format === undefined) {
|
23145
|
+
error = new Error(
|
23146
|
+
'Minified exception occurred; use the non-minified dev environment ' +
|
23147
|
+
'for the full error message and additional helpful warnings.'
|
23148
|
+
);
|
23149
|
+
} else {
|
23150
|
+
var args = [a, b, c, d, e, f];
|
23151
|
+
var argIndex = 0;
|
23152
|
+
error = new Error(
|
23153
|
+
format.replace(/%s/g, function() { return args[argIndex++]; })
|
23154
|
+
);
|
23155
|
+
error.name = 'Invariant Violation';
|
23156
|
+
}
|
23157
|
+
|
23158
|
+
error.framesToPop = 1; // we don't care about invariant's own frame
|
23159
|
+
throw error;
|
23160
|
+
}
|
23161
|
+
};
|
23162
|
+
|
23163
|
+
module.exports = invariant;
|
23164
|
+
|
23165
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))
|
23166
|
+
|
23167
|
+
/***/ },
|
23168
|
+
/* 206 */
|
23169
|
+
/***/ function(module, exports, __webpack_require__) {
|
23170
|
+
|
23171
|
+
/* WEBPACK VAR INJECTION */(function(React) {var ObjDisplayActionCreator, ReactRedux, ViewModeBarItem;
|
23172
|
+
|
23173
|
+
ReactRedux = __webpack_require__(187);
|
23174
|
+
|
23175
|
+
ObjDisplayActionCreator = __webpack_require__(207);
|
23176
|
+
|
23177
|
+
ViewModeBarItem = React.createClass({
|
23178
|
+
displayName: 'ViewModeBarItem',
|
23179
|
+
viewModeButtonsData: {
|
23180
|
+
"THUMBNAIL_VIEW": {
|
23181
|
+
iconTitle: "Thumbnails",
|
23182
|
+
iconClassName: "scrivito_icon_th_small"
|
23183
|
+
},
|
23184
|
+
"TABLE_VIEW": {
|
23185
|
+
iconTitle: "List",
|
23186
|
+
iconClassName: "scrivito_icon_list_medium"
|
23187
|
+
}
|
23188
|
+
},
|
23189
|
+
getIconClassName: function() {
|
23190
|
+
return "scrivito_icon " + this.viewModeButtonsData[this.props.mode].iconClassName;
|
23191
|
+
},
|
23192
|
+
getIconTitle: function() {
|
23193
|
+
return this.viewModeButtonsData[this.props.mode].iconTitle;
|
23194
|
+
},
|
23195
|
+
getLabelClasses: function() {
|
23196
|
+
var className;
|
23197
|
+
className = "";
|
23198
|
+
if (this.props.viewMode === this.props.mode) {
|
23199
|
+
className += "active ";
|
23200
|
+
}
|
23201
|
+
return className += "editing-button-view";
|
23202
|
+
},
|
23203
|
+
changeViewMode: function() {
|
23204
|
+
return this.props.setViewMode(this.props.mode);
|
23205
|
+
},
|
23206
|
+
render: function() {
|
23207
|
+
return React.createElement("span", {
|
23208
|
+
"data-size": this.props.mode,
|
23209
|
+
"className": this.getLabelClasses(),
|
23210
|
+
"onClick": this.changeViewMode
|
23211
|
+
}, React.createElement("i", {
|
23212
|
+
"title": this.getIconTitle(),
|
23213
|
+
"className": this.getIconClassName()
|
23214
|
+
}));
|
23215
|
+
}
|
23216
|
+
});
|
23217
|
+
|
23218
|
+
module.exports = ViewModeBarItem;
|
23219
|
+
|
23220
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23221
|
+
|
23222
|
+
/***/ },
|
23223
|
+
/* 207 */
|
23224
|
+
/***/ function(module, exports) {
|
23225
|
+
|
23226
|
+
var ObjDisplayActionCreator;
|
23227
|
+
|
23228
|
+
ObjDisplayActionCreator = (function() {
|
23229
|
+
function ObjDisplayActionCreator() {}
|
23230
|
+
|
23231
|
+
ObjDisplayActionCreator.THUMBNAIL_VIEW = 'THUMBNAIL_VIEW';
|
23232
|
+
|
23233
|
+
ObjDisplayActionCreator.TABLE_VIEW = 'TABLE_VIEW';
|
23234
|
+
|
23235
|
+
ObjDisplayActionCreator.SET_VIEW_MODE = 'SET_VIEW_MODE';
|
23236
|
+
|
23237
|
+
ObjDisplayActionCreator.setViewMode = function(viewMode) {
|
23238
|
+
return {
|
23239
|
+
type: ObjDisplayActionCreator.SET_VIEW_MODE,
|
23240
|
+
viewMode: viewMode
|
23241
|
+
};
|
23242
|
+
};
|
23243
|
+
|
23244
|
+
return ObjDisplayActionCreator;
|
23245
|
+
|
23246
|
+
})();
|
23247
|
+
|
23248
|
+
module.exports = ObjDisplayActionCreator;
|
23249
|
+
|
23250
|
+
|
23251
|
+
/***/ },
|
23252
|
+
/* 208 */
|
23253
|
+
/***/ function(module, exports, __webpack_require__) {
|
23254
|
+
|
23255
|
+
/* WEBPACK VAR INJECTION */(function(React) {var SortMenu, SortMenuItem;
|
23256
|
+
|
23257
|
+
SortMenuItem = __webpack_require__(209);
|
23258
|
+
|
23259
|
+
SortMenu = React.createClass({
|
23260
|
+
displayName: 'SortMenu',
|
23261
|
+
sortItemsData: {
|
23262
|
+
"relevance": {
|
23263
|
+
itemTitle: "Sort by relevance",
|
23264
|
+
ascCriteriaTitle: "Relevance",
|
23265
|
+
sortItemType: "relevance"
|
23266
|
+
},
|
23267
|
+
"date": {
|
23268
|
+
itemTitle: "Sort by date",
|
23269
|
+
descCriteriaTitle: "Last change: latest first",
|
23270
|
+
ascCriteriaTitle: "Last change: oldest first",
|
23271
|
+
sortItemType: "_last_changed"
|
23272
|
+
}
|
23273
|
+
},
|
23274
|
+
toggleSortMenu: function() {
|
23275
|
+
return $('.scrivito-content-browser-sort-menu .scrivito_menu_box').fadeToggle();
|
23276
|
+
},
|
23277
|
+
getSortIconClassName: function() {
|
23278
|
+
var sortCriteria, sortIcon;
|
23279
|
+
sortIcon = "scrivito_icon ";
|
23280
|
+
sortCriteria = this.props.filter.sortCriteria;
|
23281
|
+
if (sortCriteria.isSortedDesc()) {
|
23282
|
+
sortIcon += "scrivito_icon_sort_down";
|
23283
|
+
} else {
|
23284
|
+
sortIcon += "scrivito_icon_sort_up";
|
23285
|
+
}
|
23286
|
+
return sortIcon;
|
23287
|
+
},
|
23288
|
+
render: function() {
|
23289
|
+
var sortItem;
|
23290
|
+
return React.createElement("span", {
|
23291
|
+
"className": "scrivito-content-browser-sort-menu scrivito_button scrivito_lightgrey scrivito_right",
|
23292
|
+
"onClick": this.toggleSortMenu
|
23293
|
+
}, React.createElement("i", {
|
23294
|
+
"className": this.getSortIconClassName()
|
23295
|
+
}), this.props.filter.sortCriteria.activeElement(), React.createElement("i", {
|
23296
|
+
"className": "scrivito_icon scrivito-content-browser-menu-icon scrivito_icon_chevron_down"
|
23297
|
+
}), React.createElement("ul", {
|
23298
|
+
"className": "scrivito_menu_box scrivito_left"
|
23299
|
+
}, (function() {
|
23300
|
+
var _i, _len, _ref, _results;
|
23301
|
+
_ref = Object.keys(this.sortItemsData);
|
23302
|
+
_results = [];
|
23303
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
23304
|
+
sortItem = _ref[_i];
|
23305
|
+
_results.push(React.createElement(SortMenuItem, {
|
23306
|
+
"filter": this.props.filter,
|
23307
|
+
"key": sortItem,
|
23308
|
+
"sortItem": this.sortItemsData[sortItem]
|
23309
|
+
}));
|
23310
|
+
}
|
23311
|
+
return _results;
|
23312
|
+
}).call(this), React.createElement("li", {
|
23313
|
+
"className": "scrivito_menu_box_overlay"
|
23314
|
+
})));
|
23315
|
+
}
|
23316
|
+
});
|
23317
|
+
|
23318
|
+
module.exports = SortMenu;
|
23319
|
+
|
23320
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23321
|
+
|
23322
|
+
/***/ },
|
23323
|
+
/* 209 */
|
23324
|
+
/***/ function(module, exports, __webpack_require__) {
|
23325
|
+
|
23326
|
+
/* WEBPACK VAR INJECTION */(function(React) {var SortCriteria, SortMenuItem;
|
23327
|
+
|
23328
|
+
SortCriteria = __webpack_require__(164);
|
23329
|
+
|
23330
|
+
SortMenuItem = React.createClass({
|
23331
|
+
displayName: 'SortMenuItem',
|
23332
|
+
basicIcon: "scrivito_icon ",
|
23333
|
+
_ascIconSortClass: function() {
|
23334
|
+
return this.basicIcon + "scrivito_icon_sort_down";
|
23335
|
+
},
|
23336
|
+
_descIconSortClass: function() {
|
23337
|
+
return this.basicIcon + "scrivito_icon_sort_up";
|
23338
|
+
},
|
23339
|
+
getSortLiClassName: function(activeElement) {
|
23340
|
+
var itemIcon;
|
23341
|
+
itemIcon = "scrivito_menu_item";
|
23342
|
+
if (this.props.filter.sortCriteria.activeElement() === activeElement) {
|
23343
|
+
itemIcon += " active";
|
23344
|
+
}
|
23345
|
+
return itemIcon;
|
23346
|
+
},
|
23347
|
+
_getAscSortLiClassName: function() {
|
23348
|
+
return this.getSortLiClassName(this.currentSortItem().ascCriteriaTitle);
|
23349
|
+
},
|
23350
|
+
_getDescSortLiClassName: function() {
|
23351
|
+
return this.getSortLiClassName(this.currentSortItem().descCriteriaTitle);
|
23352
|
+
},
|
23353
|
+
currentSortItem: function() {
|
23354
|
+
return this.props.sortItem;
|
23355
|
+
},
|
23356
|
+
_changeSortCriteria: function(reverse, activeItemElement) {
|
23357
|
+
var sortCriteria;
|
23358
|
+
sortCriteria = new SortCriteria(this.currentSortItem().sortItemType, reverse, activeItemElement, this.currentSortItem().itemTitle);
|
23359
|
+
return this.props.filter.setSortCriteria(sortCriteria);
|
23360
|
+
},
|
23361
|
+
_sortInAscOrder: function() {
|
23362
|
+
return this._changeSortCriteria(false, this.currentSortItem().ascCriteriaTitle);
|
23363
|
+
},
|
23364
|
+
_sortInDescOrder: function() {
|
23365
|
+
return this._changeSortCriteria(true, this.currentSortItem().descCriteriaTitle);
|
23366
|
+
},
|
23367
|
+
render: function() {
|
23368
|
+
return React.createElement("div", null, React.createElement("li", {
|
23369
|
+
"className": "scrivito_menu_separator"
|
23370
|
+
}, React.createElement("span", null, (this.currentSortItem().itemTitle))), ((this.currentSortItem().descCriteriaTitle) ? React.createElement("li", {
|
23371
|
+
"className": this._getDescSortLiClassName(),
|
23372
|
+
"onClick": this._sortInDescOrder
|
23373
|
+
}, React.createElement("span", null, React.createElement("i", {
|
23374
|
+
"className": this._descIconSortClass()
|
23375
|
+
}, " "), (this.currentSortItem().descCriteriaTitle))) : void 0), ((this.currentSortItem().ascCriteriaTitle) ? React.createElement("li", {
|
23376
|
+
"className": this._getAscSortLiClassName(),
|
23377
|
+
"onClick": this._sortInAscOrder
|
23378
|
+
}, React.createElement("span", null, React.createElement("i", {
|
23379
|
+
"className": this._ascIconSortClass()
|
23380
|
+
}, " "), (this.currentSortItem().ascCriteriaTitle))) : void 0));
|
23381
|
+
}
|
23382
|
+
});
|
23383
|
+
|
23384
|
+
module.exports = SortMenuItem;
|
23385
|
+
|
23386
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23387
|
+
|
23388
|
+
/***/ },
|
23389
|
+
/* 210 */
|
23390
|
+
/***/ function(module, exports, __webpack_require__) {
|
23391
|
+
|
23392
|
+
/* WEBPACK VAR INJECTION */(function(React) {var AdditionalOptionFilter, Filter, FilterMixin, LastAddedFilter, QueryBuilder, SelectedFilter, TreeFilter;
|
23393
|
+
|
23394
|
+
FilterMixin = __webpack_require__(211);
|
23395
|
+
|
23396
|
+
AdditionalOptionFilter = __webpack_require__(212);
|
23397
|
+
|
23398
|
+
TreeFilter = __webpack_require__(219);
|
23399
|
+
|
23400
|
+
SelectedFilter = __webpack_require__(220);
|
23401
|
+
|
23402
|
+
QueryBuilder = __webpack_require__(177);
|
23403
|
+
|
23404
|
+
LastAddedFilter = __webpack_require__(221);
|
23405
|
+
|
23406
|
+
Filter = React.createClass({
|
23407
|
+
displayName: 'Filter',
|
23408
|
+
mixins: [FilterMixin],
|
22041
23409
|
renderAdditionalFilters: function() {
|
22042
23410
|
var subFilters;
|
22043
23411
|
subFilters = _.map(this.props.filter.additionalFilters, function(additionalFilter) {
|
@@ -22048,42 +23416,73 @@
|
|
22048
23416
|
});
|
22049
23417
|
return this.renderSubFiltersList(subFilters, "compact");
|
22050
23418
|
},
|
22051
|
-
|
22052
|
-
|
23419
|
+
_activeTags: function() {
|
23420
|
+
return this._activeTags;
|
23421
|
+
},
|
23422
|
+
componentWillReceiveProps: function(nextProps) {
|
23423
|
+
if (!this.state.selectedFilter) {
|
23424
|
+
this._activeTags = nextProps.activeTags;
|
23425
|
+
if (!_.isEqual(this._activeTags, this.props.activeTags)) {
|
23426
|
+
return this.props.filter.trigger("tagActiveStateChanged", this.props.filter);
|
23427
|
+
}
|
23428
|
+
}
|
23429
|
+
},
|
23430
|
+
_buildQuery: function(filter) {
|
23431
|
+
var queryBder;
|
23432
|
+
queryBder = new QueryBuilder(filter, this.props.baseQuery, this._activeTags);
|
23433
|
+
return queryBder.searchRequest();
|
23434
|
+
},
|
23435
|
+
loadObjsByFilterQuery: function(query) {
|
22053
23436
|
this.setState({
|
22054
23437
|
selectedFilter: false
|
22055
23438
|
});
|
22056
23439
|
this.props.updateLastAdded(false);
|
22057
|
-
queryBder = new QueryBuilder(filter, this.props.baseQuery);
|
22058
|
-
query = queryBder.searchRequest();
|
22059
23440
|
this.props.objCollection.deselectObjs();
|
22060
23441
|
return this.props.objCollection.loadFromBackend(query);
|
22061
23442
|
},
|
22062
23443
|
addedObjsCollectionCount: function() {
|
22063
23444
|
return this.props.addedObjsCollection.count();
|
22064
23445
|
},
|
23446
|
+
loadObjs: function(filter) {
|
23447
|
+
var query;
|
23448
|
+
query = this._buildQuery(filter);
|
23449
|
+
return this.loadObjsByFilterQuery(query);
|
23450
|
+
},
|
23451
|
+
loadObjsAndTags: function(filter) {
|
23452
|
+
var query;
|
23453
|
+
this._activeTags = [];
|
23454
|
+
query = this._buildQuery(filter);
|
23455
|
+
this.loadObjsByFilterQuery(query);
|
23456
|
+
if (query != null) {
|
23457
|
+
return this.props.fetchTags(query);
|
23458
|
+
} else {
|
23459
|
+
return this.props.disableTags();
|
23460
|
+
}
|
23461
|
+
},
|
22065
23462
|
getFilterClassName: function() {
|
22066
23463
|
var filterBrowserClass;
|
22067
23464
|
filterBrowserClass = "scrivito-content-browser-filter";
|
22068
|
-
if (this.addedObjsCollectionCount() > 0 && this.props.
|
23465
|
+
if (this.addedObjsCollectionCount() > 0 && this.props.standAlone) {
|
22069
23466
|
return filterBrowserClass;
|
22070
23467
|
}
|
22071
23468
|
if (this.addedObjsCollectionCount() > 0) {
|
22072
23469
|
filterBrowserClass += " last_added";
|
22073
23470
|
}
|
22074
|
-
if (this.props.
|
23471
|
+
if (this.props.standAlone) {
|
22075
23472
|
filterBrowserClass += " stand-alone";
|
22076
23473
|
}
|
22077
23474
|
return filterBrowserClass;
|
22078
23475
|
},
|
22079
23476
|
componentDidMount: function() {
|
22080
|
-
|
23477
|
+
this._activeTags = this.props.activeTags;
|
23478
|
+
this.props.filter.onChange(this.loadObjsAndTags);
|
23479
|
+
return this.props.filter.on("tagActiveStateChanged", this.loadObjs);
|
22081
23480
|
},
|
22082
23481
|
activateInitialFilter: function() {
|
22083
23482
|
if (this.props.objCollection.selectedObjsIds().length > 0) {
|
22084
23483
|
return this.activateSelectedFilter();
|
22085
23484
|
} else if (this.props.filter.hasActiveChildren()) {
|
22086
|
-
return this.
|
23485
|
+
return this.loadObjsAndTags(this.props.filter);
|
22087
23486
|
}
|
22088
23487
|
},
|
22089
23488
|
activateLastAddedFilter: function() {
|
@@ -22091,6 +23490,7 @@
|
|
22091
23490
|
selectedFilter: false
|
22092
23491
|
});
|
22093
23492
|
this.props.updateLastAdded(true);
|
23493
|
+
this.props.disableTags();
|
22094
23494
|
return this.props.filter.deselectHierarchicalFilters();
|
22095
23495
|
},
|
22096
23496
|
activateSelectedFilter: function() {
|
@@ -22100,6 +23500,7 @@
|
|
22100
23500
|
selectedFilter: true
|
22101
23501
|
});
|
22102
23502
|
this.props.updateLastAdded(false);
|
23503
|
+
this.props.disableTags();
|
22103
23504
|
query = QueryBuilder.byId(this.props.objCollection.selectedObjsIds());
|
22104
23505
|
return this.props.objCollection.loadFromBackend(query);
|
22105
23506
|
},
|
@@ -22117,18 +23518,20 @@
|
|
22117
23518
|
},
|
22118
23519
|
render: function() {
|
22119
23520
|
var selectedObjsCount, treeSubFilters;
|
22120
|
-
treeSubFilters = _.map(this.props.filter.getHierarchicalFilters(), function(
|
22121
|
-
return
|
22122
|
-
|
22123
|
-
|
22124
|
-
|
22125
|
-
|
23521
|
+
treeSubFilters = _.map(this.props.filter.getHierarchicalFilters(), (function(_this) {
|
23522
|
+
return function(treeFilter) {
|
23523
|
+
return React.createElement(TreeFilter, {
|
23524
|
+
"key": treeFilter.name,
|
23525
|
+
"filter": treeFilter
|
23526
|
+
});
|
23527
|
+
};
|
23528
|
+
})(this));
|
22126
23529
|
selectedObjsCount = this.props.objCollection.getSelectedObjs().length;
|
22127
23530
|
return React.createElement("div", {
|
22128
23531
|
"className": this.getFilterClassName()
|
22129
23532
|
}, React.createElement("div", {
|
22130
23533
|
"className": "scrivito-content-browser-filter-fixed"
|
22131
|
-
}, (!this.props.
|
23534
|
+
}, (!this.props.standAlone ? React.createElement(SelectedFilter, {
|
22132
23535
|
"selectedCount": selectedObjsCount,
|
22133
23536
|
"active": this.state.selectedFilter,
|
22134
23537
|
"activateSelectedFilter": this.activateSelectedFilter
|
@@ -22147,7 +23550,7 @@
|
|
22147
23550
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22148
23551
|
|
22149
23552
|
/***/ },
|
22150
|
-
/*
|
23553
|
+
/* 211 */
|
22151
23554
|
/***/ function(module, exports, __webpack_require__) {
|
22152
23555
|
|
22153
23556
|
/* WEBPACK VAR INJECTION */(function(React) {var FilterMixin;
|
@@ -22170,18 +23573,18 @@
|
|
22170
23573
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22171
23574
|
|
22172
23575
|
/***/ },
|
22173
|
-
/*
|
23576
|
+
/* 212 */
|
22174
23577
|
/***/ function(module, exports, __webpack_require__) {
|
22175
23578
|
|
22176
23579
|
/* WEBPACK VAR INJECTION */(function(React) {var AdditionalOptionFilter, CheckBoxOptionFilter, DeselectAllRadioOptionFilter, ExpandableFilterNodeMixin, RadioOptionFilter;
|
22177
23580
|
|
22178
|
-
ExpandableFilterNodeMixin = __webpack_require__(
|
23581
|
+
ExpandableFilterNodeMixin = __webpack_require__(213);
|
22179
23582
|
|
22180
|
-
DeselectAllRadioOptionFilter = __webpack_require__(
|
23583
|
+
DeselectAllRadioOptionFilter = __webpack_require__(214);
|
22181
23584
|
|
22182
|
-
RadioOptionFilter = __webpack_require__(
|
23585
|
+
RadioOptionFilter = __webpack_require__(216);
|
22183
23586
|
|
22184
|
-
CheckBoxOptionFilter = __webpack_require__(
|
23587
|
+
CheckBoxOptionFilter = __webpack_require__(218);
|
22185
23588
|
|
22186
23589
|
AdditionalOptionFilter = React.createClass({
|
22187
23590
|
displayName: 'AdditionalOptionFilter',
|
@@ -22237,7 +23640,7 @@
|
|
22237
23640
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22238
23641
|
|
22239
23642
|
/***/ },
|
22240
|
-
/*
|
23643
|
+
/* 213 */
|
22241
23644
|
/***/ function(module, exports, __webpack_require__) {
|
22242
23645
|
|
22243
23646
|
/* WEBPACK VAR INJECTION */(function(React) {var ExpandableFilterNodeMixin;
|
@@ -22273,12 +23676,12 @@
|
|
22273
23676
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22274
23677
|
|
22275
23678
|
/***/ },
|
22276
|
-
/*
|
23679
|
+
/* 214 */
|
22277
23680
|
/***/ function(module, exports, __webpack_require__) {
|
22278
23681
|
|
22279
23682
|
/* WEBPACK VAR INJECTION */(function(React) {var DeselectAllRadioOptionFilter, OptionFilterLabelRenderMixin;
|
22280
23683
|
|
22281
|
-
OptionFilterLabelRenderMixin = __webpack_require__(
|
23684
|
+
OptionFilterLabelRenderMixin = __webpack_require__(215);
|
22282
23685
|
|
22283
23686
|
DeselectAllRadioOptionFilter = React.createClass({
|
22284
23687
|
displayName: 'DeselectAllRadioOptionFilter',
|
@@ -22308,7 +23711,7 @@
|
|
22308
23711
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22309
23712
|
|
22310
23713
|
/***/ },
|
22311
|
-
/*
|
23714
|
+
/* 215 */
|
22312
23715
|
/***/ function(module, exports, __webpack_require__) {
|
22313
23716
|
|
22314
23717
|
/* WEBPACK VAR INJECTION */(function(React) {var OptionFilterLabelRenderMixin;
|
@@ -22326,12 +23729,12 @@
|
|
22326
23729
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22327
23730
|
|
22328
23731
|
/***/ },
|
22329
|
-
/*
|
23732
|
+
/* 216 */
|
22330
23733
|
/***/ function(module, exports, __webpack_require__) {
|
22331
23734
|
|
22332
23735
|
/* WEBPACK VAR INJECTION */(function(React) {var OptionFilterMixin, RadioOptionFilter;
|
22333
23736
|
|
22334
|
-
OptionFilterMixin = __webpack_require__(
|
23737
|
+
OptionFilterMixin = __webpack_require__(217);
|
22335
23738
|
|
22336
23739
|
RadioOptionFilter = React.createClass({
|
22337
23740
|
displayName: 'RadioOptionFilter',
|
@@ -22356,12 +23759,12 @@
|
|
22356
23759
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22357
23760
|
|
22358
23761
|
/***/ },
|
22359
|
-
/*
|
23762
|
+
/* 217 */
|
22360
23763
|
/***/ function(module, exports, __webpack_require__) {
|
22361
23764
|
|
22362
23765
|
var OptionFilterLabelRenderMixin, OptionFilterMixin;
|
22363
23766
|
|
22364
|
-
OptionFilterLabelRenderMixin = __webpack_require__(
|
23767
|
+
OptionFilterLabelRenderMixin = __webpack_require__(215);
|
22365
23768
|
|
22366
23769
|
OptionFilterMixin = {
|
22367
23770
|
mixins: [OptionFilterLabelRenderMixin],
|
@@ -22384,12 +23787,12 @@
|
|
22384
23787
|
|
22385
23788
|
|
22386
23789
|
/***/ },
|
22387
|
-
/*
|
23790
|
+
/* 218 */
|
22388
23791
|
/***/ function(module, exports, __webpack_require__) {
|
22389
23792
|
|
22390
23793
|
/* WEBPACK VAR INJECTION */(function(React) {var CheckBoxOptionFilter, OptionFilterMixin;
|
22391
23794
|
|
22392
|
-
OptionFilterMixin = __webpack_require__(
|
23795
|
+
OptionFilterMixin = __webpack_require__(217);
|
22393
23796
|
|
22394
23797
|
CheckBoxOptionFilter = React.createClass({
|
22395
23798
|
displayName: 'CheckBoxOptionFilter',
|
@@ -22409,12 +23812,14 @@
|
|
22409
23812
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22410
23813
|
|
22411
23814
|
/***/ },
|
22412
|
-
/*
|
23815
|
+
/* 219 */
|
22413
23816
|
/***/ function(module, exports, __webpack_require__) {
|
22414
23817
|
|
22415
|
-
/* WEBPACK VAR INJECTION */(function(React) {var ExpandableFilterNodeMixin, TreeFilter;
|
23818
|
+
/* WEBPACK VAR INJECTION */(function(React) {var ExpandableFilterNodeMixin, QueryBuilder, TreeFilter;
|
22416
23819
|
|
22417
|
-
ExpandableFilterNodeMixin = __webpack_require__(
|
23820
|
+
ExpandableFilterNodeMixin = __webpack_require__(213);
|
23821
|
+
|
23822
|
+
QueryBuilder = __webpack_require__(177);
|
22418
23823
|
|
22419
23824
|
TreeFilter = React.createClass({
|
22420
23825
|
displayName: 'TreeFilter',
|
@@ -22422,13 +23827,20 @@
|
|
22422
23827
|
getInitialState: function() {
|
22423
23828
|
return this.defaultExpansionState();
|
22424
23829
|
},
|
23830
|
+
_convertLegacyIconName: function(iconName) {
|
23831
|
+
if (iconName === "generic") {
|
23832
|
+
return "sheet";
|
23833
|
+
} else {
|
23834
|
+
return iconName;
|
23835
|
+
}
|
23836
|
+
},
|
22425
23837
|
renderIconTag: function() {
|
22426
|
-
var
|
23838
|
+
var iconClass, iconName;
|
22427
23839
|
if (this.props.filter.icon != null) {
|
22428
|
-
|
22429
|
-
iconClass =
|
23840
|
+
iconName = this._convertLegacyIconName(this.props.filter.icon);
|
23841
|
+
iconClass = "scrivito_customer_icon sci_" + iconName;
|
22430
23842
|
return React.createElement("i", {
|
22431
|
-
"className":
|
23843
|
+
"className": iconClass
|
22432
23844
|
});
|
22433
23845
|
}
|
22434
23846
|
},
|
@@ -22474,7 +23886,7 @@
|
|
22474
23886
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22475
23887
|
|
22476
23888
|
/***/ },
|
22477
|
-
/*
|
23889
|
+
/* 220 */
|
22478
23890
|
/***/ function(module, exports, __webpack_require__) {
|
22479
23891
|
|
22480
23892
|
/* WEBPACK VAR INJECTION */(function(React) {var SelectedFilter;
|
@@ -22508,7 +23920,7 @@
|
|
22508
23920
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22509
23921
|
|
22510
23922
|
/***/ },
|
22511
|
-
/*
|
23923
|
+
/* 221 */
|
22512
23924
|
/***/ function(module, exports, __webpack_require__) {
|
22513
23925
|
|
22514
23926
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedFilter;
|
@@ -22542,20 +23954,26 @@
|
|
22542
23954
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22543
23955
|
|
22544
23956
|
/***/ },
|
22545
|
-
/*
|
23957
|
+
/* 222 */
|
22546
23958
|
/***/ function(module, exports, __webpack_require__) {
|
22547
23959
|
|
22548
|
-
/* WEBPACK VAR INJECTION */(function(React) {var Items, LastAddedItems, PresetBuilder, TableView, TableViewContent, ThumbnailItems;
|
23960
|
+
/* WEBPACK VAR INJECTION */(function(React) {var Items, LastAddedItems, PresetBuilder, TableView, TableViewContent, TagBar, ThumbnailItems, objDisplayAction, toggleExpandTagBar, toggleTag, _ref;
|
23961
|
+
|
23962
|
+
TableView = __webpack_require__(223);
|
23963
|
+
|
23964
|
+
ThumbnailItems = __webpack_require__(224);
|
22549
23965
|
|
22550
|
-
|
23966
|
+
PresetBuilder = __webpack_require__(232);
|
22551
23967
|
|
22552
|
-
|
23968
|
+
LastAddedItems = __webpack_require__(233);
|
22553
23969
|
|
22554
|
-
|
23970
|
+
TableViewContent = __webpack_require__(243);
|
22555
23971
|
|
22556
|
-
|
23972
|
+
TagBar = __webpack_require__(245);
|
22557
23973
|
|
22558
|
-
|
23974
|
+
objDisplayAction = __webpack_require__(207);
|
23975
|
+
|
23976
|
+
_ref = __webpack_require__(246), toggleExpandTagBar = _ref.toggleExpandTagBar, toggleTag = _ref.toggleTag;
|
22559
23977
|
|
22560
23978
|
Items = React.createClass({
|
22561
23979
|
displayName: 'Items',
|
@@ -22564,9 +23982,26 @@
|
|
22564
23982
|
dragInProgress: false
|
22565
23983
|
};
|
22566
23984
|
},
|
23985
|
+
baseItemsClass: function() {
|
23986
|
+
var baseItemClass;
|
23987
|
+
baseItemClass = "scrivito-content-browser-items";
|
23988
|
+
if (this.props.tags.items.length > 0) {
|
23989
|
+
baseItemClass += " tags-row";
|
23990
|
+
if (this.props.tags.isExpanded) {
|
23991
|
+
baseItemClass += " expanded";
|
23992
|
+
}
|
23993
|
+
}
|
23994
|
+
return baseItemClass;
|
23995
|
+
},
|
23996
|
+
toggleExpandTagBar: function() {
|
23997
|
+
return this.props.dispatch(toggleExpandTagBar());
|
23998
|
+
},
|
23999
|
+
toggleTagAction: function(tag) {
|
24000
|
+
return this.props.dispatch(toggleTag(tag, this.props.filter));
|
24001
|
+
},
|
22567
24002
|
dropZoneClass: function() {
|
22568
24003
|
var className;
|
22569
|
-
className =
|
24004
|
+
className = this.baseItemsClass();
|
22570
24005
|
if (this.state.dragInProgress) {
|
22571
24006
|
if (this.props.showLastAdded) {
|
22572
24007
|
className += " uploader-drag-over-forbiden";
|
@@ -22644,7 +24079,11 @@
|
|
22644
24079
|
"onDragOver": this.changeDragState(true),
|
22645
24080
|
"onDrop": this.uploadFiles,
|
22646
24081
|
"onDragLeave": this.changeDragState(false)
|
22647
|
-
},
|
24082
|
+
}, React.createElement(TagBar, {
|
24083
|
+
"tags": this.props.tags,
|
24084
|
+
"toggleTag": this.toggleTagAction,
|
24085
|
+
"toggleExpandTagBar": this.toggleExpandTagBar
|
24086
|
+
}), (this.props.objCollection.isLoading() ? React.createElement("div", {
|
22648
24087
|
"className": "scrivito-content-browser-loading"
|
22649
24088
|
}, React.createElement("i", {
|
22650
24089
|
"className": "scrivito_icon scrivito_icon_refresh"
|
@@ -22652,14 +24091,14 @@
|
|
22652
24091
|
"viewMode": this.props.viewMode,
|
22653
24092
|
"dragInProgress": this.state.dragInProgress,
|
22654
24093
|
"addedObjsCollection": this.props.addedObjsCollection
|
22655
|
-
})) : this.props.viewMode.
|
24094
|
+
})) : this.props.viewMode === objDisplayAction.TABLE_VIEW ? React.createElement(TableView, {
|
22656
24095
|
"objCollection": this.props.objCollection,
|
22657
24096
|
"toggleSelected": this.props.toggleSelected,
|
22658
24097
|
"filter": this.props.filter,
|
22659
24098
|
"addedObjsCollection": this.props.addedObjsCollection
|
22660
24099
|
}, React.createElement(TableViewContent, React.__spread({}, this.props))) : React.createElement(ThumbnailItems, {
|
22661
24100
|
"objCollection": this.props.objCollection,
|
22662
|
-
"viewMode": this.props.viewMode
|
24101
|
+
"viewMode": this.props.viewMode,
|
22663
24102
|
"filter": this.props.filter,
|
22664
24103
|
"addedObjsCollection": this.props.addedObjsCollection
|
22665
24104
|
})));
|
@@ -22671,7 +24110,7 @@
|
|
22671
24110
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22672
24111
|
|
22673
24112
|
/***/ },
|
22674
|
-
/*
|
24113
|
+
/* 223 */
|
22675
24114
|
/***/ function(module, exports, __webpack_require__) {
|
22676
24115
|
|
22677
24116
|
/* WEBPACK VAR INJECTION */(function(React) {var TableView;
|
@@ -22691,20 +24130,20 @@
|
|
22691
24130
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22692
24131
|
|
22693
24132
|
/***/ },
|
22694
|
-
/*
|
24133
|
+
/* 224 */
|
22695
24134
|
/***/ function(module, exports, __webpack_require__) {
|
22696
24135
|
|
22697
24136
|
/* WEBPACK VAR INJECTION */(function(React) {var ActiveNodeConfigCollector, InfiniteScrollMixin, ObjCreation, ReactDOM, ThumbnailAddItem, ThumbnailItem, ThumbnailItems;
|
22698
24137
|
|
22699
|
-
InfiniteScrollMixin = __webpack_require__(
|
24138
|
+
InfiniteScrollMixin = __webpack_require__(225);
|
22700
24139
|
|
22701
|
-
ThumbnailItem = __webpack_require__(
|
24140
|
+
ThumbnailItem = __webpack_require__(226);
|
22702
24141
|
|
22703
|
-
ThumbnailAddItem = __webpack_require__(
|
24142
|
+
ThumbnailAddItem = __webpack_require__(229);
|
22704
24143
|
|
22705
|
-
ObjCreation = __webpack_require__(
|
24144
|
+
ObjCreation = __webpack_require__(231);
|
22706
24145
|
|
22707
|
-
ActiveNodeConfigCollector = __webpack_require__(
|
24146
|
+
ActiveNodeConfigCollector = __webpack_require__(178);
|
22708
24147
|
|
22709
24148
|
ReactDOM = __webpack_require__(158);
|
22710
24149
|
|
@@ -22712,7 +24151,7 @@
|
|
22712
24151
|
displayName: 'ThumbnailItems',
|
22713
24152
|
mixins: [InfiniteScrollMixin],
|
22714
24153
|
getElementDOMNode: function() {
|
22715
|
-
return ReactDOM.findDOMNode(this)
|
24154
|
+
return ReactDOM.findDOMNode(this);
|
22716
24155
|
},
|
22717
24156
|
getSizeClassName: function() {
|
22718
24157
|
return "items scrivito-content-browser-thumbnails small";
|
@@ -22751,7 +24190,7 @@
|
|
22751
24190
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22752
24191
|
|
22753
24192
|
/***/ },
|
22754
|
-
/*
|
24193
|
+
/* 225 */
|
22755
24194
|
/***/ function(module, exports) {
|
22756
24195
|
|
22757
24196
|
var InfiniteScrollMixin;
|
@@ -22818,14 +24257,14 @@
|
|
22818
24257
|
|
22819
24258
|
|
22820
24259
|
/***/ },
|
22821
|
-
/*
|
24260
|
+
/* 226 */
|
22822
24261
|
/***/ function(module, exports, __webpack_require__) {
|
22823
24262
|
|
22824
24263
|
/* WEBPACK VAR INJECTION */(function(React) {var InspectedItemMixin, MimeTypeIcon, ThumbnailItem;
|
22825
24264
|
|
22826
|
-
InspectedItemMixin = __webpack_require__(
|
24265
|
+
InspectedItemMixin = __webpack_require__(227);
|
22827
24266
|
|
22828
|
-
MimeTypeIcon = __webpack_require__(
|
24267
|
+
MimeTypeIcon = __webpack_require__(228);
|
22829
24268
|
|
22830
24269
|
ThumbnailItem = React.createClass({
|
22831
24270
|
displayName: 'ThumbnailItem',
|
@@ -22884,7 +24323,7 @@
|
|
22884
24323
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22885
24324
|
|
22886
24325
|
/***/ },
|
22887
|
-
/*
|
24326
|
+
/* 227 */
|
22888
24327
|
/***/ function(module, exports) {
|
22889
24328
|
|
22890
24329
|
var InspectedItemMixin;
|
@@ -22915,7 +24354,7 @@
|
|
22915
24354
|
|
22916
24355
|
|
22917
24356
|
/***/ },
|
22918
|
-
/*
|
24357
|
+
/* 228 */
|
22919
24358
|
/***/ function(module, exports) {
|
22920
24359
|
|
22921
24360
|
var MimeTypeIcon;
|
@@ -22962,12 +24401,12 @@
|
|
22962
24401
|
|
22963
24402
|
|
22964
24403
|
/***/ },
|
22965
|
-
/*
|
24404
|
+
/* 229 */
|
22966
24405
|
/***/ function(module, exports, __webpack_require__) {
|
22967
24406
|
|
22968
24407
|
/* WEBPACK VAR INJECTION */(function(React) {var AddItemMixin, ThumbnailAddItem;
|
22969
24408
|
|
22970
|
-
AddItemMixin = __webpack_require__(
|
24409
|
+
AddItemMixin = __webpack_require__(230);
|
22971
24410
|
|
22972
24411
|
ThumbnailAddItem = React.createClass({
|
22973
24412
|
displayName: 'ThumbnailAddItem',
|
@@ -22992,7 +24431,7 @@
|
|
22992
24431
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
22993
24432
|
|
22994
24433
|
/***/ },
|
22995
|
-
/*
|
24434
|
+
/* 230 */
|
22996
24435
|
/***/ function(module, exports, __webpack_require__) {
|
22997
24436
|
|
22998
24437
|
/* WEBPACK VAR INJECTION */(function(React) {var AddItemMixin;
|
@@ -23087,14 +24526,14 @@
|
|
23087
24526
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23088
24527
|
|
23089
24528
|
/***/ },
|
23090
|
-
/*
|
24529
|
+
/* 231 */
|
23091
24530
|
/***/ function(module, exports, __webpack_require__) {
|
23092
24531
|
|
23093
24532
|
var ActiveNodeConfigCollector, ObjCreation, PresetBuilder;
|
23094
24533
|
|
23095
|
-
ActiveNodeConfigCollector = __webpack_require__(
|
24534
|
+
ActiveNodeConfigCollector = __webpack_require__(178);
|
23096
24535
|
|
23097
|
-
PresetBuilder = __webpack_require__(
|
24536
|
+
PresetBuilder = __webpack_require__(232);
|
23098
24537
|
|
23099
24538
|
ObjCreation = (function() {
|
23100
24539
|
function ObjCreation(filter) {
|
@@ -23174,12 +24613,12 @@
|
|
23174
24613
|
|
23175
24614
|
|
23176
24615
|
/***/ },
|
23177
|
-
/*
|
24616
|
+
/* 232 */
|
23178
24617
|
/***/ function(module, exports, __webpack_require__) {
|
23179
24618
|
|
23180
24619
|
var ActiveNodeConfigCollector, PresetBuilder;
|
23181
24620
|
|
23182
|
-
ActiveNodeConfigCollector = __webpack_require__(
|
24621
|
+
ActiveNodeConfigCollector = __webpack_require__(178);
|
23183
24622
|
|
23184
24623
|
PresetBuilder = (function() {
|
23185
24624
|
var Preset;
|
@@ -23270,16 +24709,18 @@
|
|
23270
24709
|
|
23271
24710
|
|
23272
24711
|
/***/ },
|
23273
|
-
/*
|
24712
|
+
/* 233 */
|
23274
24713
|
/***/ function(module, exports, __webpack_require__) {
|
23275
24714
|
|
23276
|
-
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedItems, LastAddedTableViewContent, LastAddedThumbnailItems, TableView;
|
24715
|
+
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedItems, LastAddedTableViewContent, LastAddedThumbnailItems, TableView, objDisplayAction;
|
24716
|
+
|
24717
|
+
LastAddedTableViewContent = __webpack_require__(234);
|
23277
24718
|
|
23278
|
-
|
24719
|
+
LastAddedThumbnailItems = __webpack_require__(240);
|
23279
24720
|
|
23280
|
-
|
24721
|
+
TableView = __webpack_require__(223);
|
23281
24722
|
|
23282
|
-
|
24723
|
+
objDisplayAction = __webpack_require__(207);
|
23283
24724
|
|
23284
24725
|
LastAddedItems = React.createClass({
|
23285
24726
|
displayName: 'LastAddedItems',
|
@@ -23293,7 +24734,7 @@
|
|
23293
24734
|
"className": "scrivito_icon scrivito_icon_error"
|
23294
24735
|
}), React.createElement("span", {
|
23295
24736
|
"className": "scrivito_title"
|
23296
|
-
}, this.getForbiddenUploadText())) : this.props.viewMode.
|
24737
|
+
}, this.getForbiddenUploadText())) : this.props.viewMode === objDisplayAction.TABLE_VIEW ? React.createElement(TableView, React.__spread({}, this.props), React.createElement(LastAddedTableViewContent, React.__spread({}, this.props))) : React.createElement(LastAddedThumbnailItems, React.__spread({}, this.props))));
|
23297
24738
|
}
|
23298
24739
|
});
|
23299
24740
|
|
@@ -23302,16 +24743,16 @@
|
|
23302
24743
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23303
24744
|
|
23304
24745
|
/***/ },
|
23305
|
-
/*
|
24746
|
+
/* 234 */
|
23306
24747
|
/***/ function(module, exports, __webpack_require__) {
|
23307
24748
|
|
23308
24749
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedTableViewContent, LastAddedTableViewErrorItem, LastAddedTableViewItem, TableViewItem;
|
23309
24750
|
|
23310
|
-
LastAddedTableViewErrorItem = __webpack_require__(
|
24751
|
+
LastAddedTableViewErrorItem = __webpack_require__(235);
|
23311
24752
|
|
23312
|
-
LastAddedTableViewItem = __webpack_require__(
|
24753
|
+
LastAddedTableViewItem = __webpack_require__(237);
|
23313
24754
|
|
23314
|
-
TableViewItem = __webpack_require__(
|
24755
|
+
TableViewItem = __webpack_require__(239);
|
23315
24756
|
|
23316
24757
|
LastAddedTableViewContent = React.createClass({
|
23317
24758
|
displayName: 'LastAddedTableViewContent',
|
@@ -23353,12 +24794,12 @@
|
|
23353
24794
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23354
24795
|
|
23355
24796
|
/***/ },
|
23356
|
-
/*
|
24797
|
+
/* 235 */
|
23357
24798
|
/***/ function(module, exports, __webpack_require__) {
|
23358
24799
|
|
23359
24800
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedErrorItemMixin, LastAddedTableViewErrorItem;
|
23360
24801
|
|
23361
|
-
LastAddedErrorItemMixin = __webpack_require__(
|
24802
|
+
LastAddedErrorItemMixin = __webpack_require__(236);
|
23362
24803
|
|
23363
24804
|
LastAddedTableViewErrorItem = React.createClass({
|
23364
24805
|
displayName: 'LastAddedTableViewError',
|
@@ -23381,7 +24822,7 @@
|
|
23381
24822
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23382
24823
|
|
23383
24824
|
/***/ },
|
23384
|
-
/*
|
24825
|
+
/* 236 */
|
23385
24826
|
/***/ function(module, exports, __webpack_require__) {
|
23386
24827
|
|
23387
24828
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedErrorItemMixin;
|
@@ -23419,12 +24860,12 @@
|
|
23419
24860
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23420
24861
|
|
23421
24862
|
/***/ },
|
23422
|
-
/*
|
24863
|
+
/* 237 */
|
23423
24864
|
/***/ function(module, exports, __webpack_require__) {
|
23424
24865
|
|
23425
24866
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedItemMixin, LastAddedTableViewItem;
|
23426
24867
|
|
23427
|
-
LastAddedItemMixin = __webpack_require__(
|
24868
|
+
LastAddedItemMixin = __webpack_require__(238);
|
23428
24869
|
|
23429
24870
|
LastAddedTableViewItem = React.createClass({
|
23430
24871
|
displayName: 'LastAddedTableViewItem',
|
@@ -23449,7 +24890,7 @@
|
|
23449
24890
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23450
24891
|
|
23451
24892
|
/***/ },
|
23452
|
-
/*
|
24893
|
+
/* 238 */
|
23453
24894
|
/***/ function(module, exports, __webpack_require__) {
|
23454
24895
|
|
23455
24896
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedItemMixin;
|
@@ -23475,12 +24916,12 @@
|
|
23475
24916
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23476
24917
|
|
23477
24918
|
/***/ },
|
23478
|
-
/*
|
24919
|
+
/* 239 */
|
23479
24920
|
/***/ function(module, exports, __webpack_require__) {
|
23480
24921
|
|
23481
24922
|
/* WEBPACK VAR INJECTION */(function(React) {var InspectedItemMixin, TableViewItem;
|
23482
24923
|
|
23483
|
-
InspectedItemMixin = __webpack_require__(
|
24924
|
+
InspectedItemMixin = __webpack_require__(227);
|
23484
24925
|
|
23485
24926
|
TableViewItem = React.createClass({
|
23486
24927
|
displayName: 'TableViewItem',
|
@@ -23524,16 +24965,16 @@
|
|
23524
24965
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23525
24966
|
|
23526
24967
|
/***/ },
|
23527
|
-
/*
|
24968
|
+
/* 240 */
|
23528
24969
|
/***/ function(module, exports, __webpack_require__) {
|
23529
24970
|
|
23530
24971
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedThumbnailErrorItem, LastAddedThumbnailItem, LastAddedThumbnailItems, ThumbnailItem;
|
23531
24972
|
|
23532
|
-
LastAddedThumbnailErrorItem = __webpack_require__(
|
24973
|
+
LastAddedThumbnailErrorItem = __webpack_require__(241);
|
23533
24974
|
|
23534
|
-
LastAddedThumbnailItem = __webpack_require__(
|
24975
|
+
LastAddedThumbnailItem = __webpack_require__(242);
|
23535
24976
|
|
23536
|
-
ThumbnailItem = __webpack_require__(
|
24977
|
+
ThumbnailItem = __webpack_require__(226);
|
23537
24978
|
|
23538
24979
|
LastAddedThumbnailItems = React.createClass({
|
23539
24980
|
displayName: "LastAddedThumbnailItems",
|
@@ -23577,12 +25018,12 @@
|
|
23577
25018
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23578
25019
|
|
23579
25020
|
/***/ },
|
23580
|
-
/*
|
25021
|
+
/* 241 */
|
23581
25022
|
/***/ function(module, exports, __webpack_require__) {
|
23582
25023
|
|
23583
25024
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedErrorItemMixin, LastAddedThumbnailErrorItem;
|
23584
25025
|
|
23585
|
-
LastAddedErrorItemMixin = __webpack_require__(
|
25026
|
+
LastAddedErrorItemMixin = __webpack_require__(236);
|
23586
25027
|
|
23587
25028
|
LastAddedThumbnailErrorItem = React.createClass({
|
23588
25029
|
displayName: 'LastAddedThumbnailErrorItem',
|
@@ -23607,12 +25048,12 @@
|
|
23607
25048
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23608
25049
|
|
23609
25050
|
/***/ },
|
23610
|
-
/*
|
25051
|
+
/* 242 */
|
23611
25052
|
/***/ function(module, exports, __webpack_require__) {
|
23612
25053
|
|
23613
25054
|
/* WEBPACK VAR INJECTION */(function(React) {var LastAddedItemMixin, LastAddedThumbnailItem;
|
23614
25055
|
|
23615
|
-
LastAddedItemMixin = __webpack_require__(
|
25056
|
+
LastAddedItemMixin = __webpack_require__(238);
|
23616
25057
|
|
23617
25058
|
LastAddedThumbnailItem = React.createClass({
|
23618
25059
|
displayName: 'LastAddedThumbnailItem',
|
@@ -23643,18 +25084,18 @@
|
|
23643
25084
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23644
25085
|
|
23645
25086
|
/***/ },
|
23646
|
-
/*
|
25087
|
+
/* 243 */
|
23647
25088
|
/***/ function(module, exports, __webpack_require__) {
|
23648
25089
|
|
23649
25090
|
/* WEBPACK VAR INJECTION */(function(React) {var InfiniteScrollMixin, ObjCreation, ReactDOM, TableViewAddItem, TableViewContent, TableViewItem;
|
23650
25091
|
|
23651
|
-
TableViewItem = __webpack_require__(
|
25092
|
+
TableViewItem = __webpack_require__(239);
|
23652
25093
|
|
23653
|
-
TableViewAddItem = __webpack_require__(
|
25094
|
+
TableViewAddItem = __webpack_require__(244);
|
23654
25095
|
|
23655
|
-
ObjCreation = __webpack_require__(
|
25096
|
+
ObjCreation = __webpack_require__(231);
|
23656
25097
|
|
23657
|
-
InfiniteScrollMixin = __webpack_require__(
|
25098
|
+
InfiniteScrollMixin = __webpack_require__(225);
|
23658
25099
|
|
23659
25100
|
ReactDOM = __webpack_require__(158);
|
23660
25101
|
|
@@ -23693,12 +25134,12 @@
|
|
23693
25134
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23694
25135
|
|
23695
25136
|
/***/ },
|
23696
|
-
/*
|
25137
|
+
/* 244 */
|
23697
25138
|
/***/ function(module, exports, __webpack_require__) {
|
23698
25139
|
|
23699
25140
|
/* WEBPACK VAR INJECTION */(function(React) {var AddItemMixin, TableViewAddItem;
|
23700
25141
|
|
23701
|
-
AddItemMixin = __webpack_require__(
|
25142
|
+
AddItemMixin = __webpack_require__(230);
|
23702
25143
|
|
23703
25144
|
TableViewAddItem = React.createClass({
|
23704
25145
|
mixins: [AddItemMixin],
|
@@ -23723,7 +25164,134 @@
|
|
23723
25164
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23724
25165
|
|
23725
25166
|
/***/ },
|
23726
|
-
/*
|
25167
|
+
/* 245 */
|
25168
|
+
/***/ function(module, exports, __webpack_require__) {
|
25169
|
+
|
25170
|
+
/* WEBPACK VAR INJECTION */(function(React) {var TagBar;
|
25171
|
+
|
25172
|
+
TagBar = React.createClass({
|
25173
|
+
displayName: 'TagBar',
|
25174
|
+
expandTagBar: function() {
|
25175
|
+
return this.props.toggleExpandTagBar();
|
25176
|
+
},
|
25177
|
+
tagClasName: function(tag) {
|
25178
|
+
var className;
|
25179
|
+
className = "";
|
25180
|
+
if (_.include(this.props.tags.activeTags, tag)) {
|
25181
|
+
className = "active";
|
25182
|
+
}
|
25183
|
+
return className;
|
25184
|
+
},
|
25185
|
+
toggleTag: function(tag) {
|
25186
|
+
return this.props.toggleTag(tag);
|
25187
|
+
},
|
25188
|
+
renderTags: function() {
|
25189
|
+
return _.map(this.props.tags.items, (function(_this) {
|
25190
|
+
return function(tag) {
|
25191
|
+
return React.createElement("li", {
|
25192
|
+
"key": tag.name,
|
25193
|
+
"onClick": (function() {
|
25194
|
+
return _this.toggleTag(tag.name);
|
25195
|
+
}),
|
25196
|
+
"className": _this.tagClasName(tag.name)
|
25197
|
+
}, tag.name);
|
25198
|
+
};
|
25199
|
+
})(this));
|
25200
|
+
},
|
25201
|
+
render: function() {
|
25202
|
+
return React.createElement("div", {
|
25203
|
+
"className": "scrivito-content-browser-items-tag-wrapper"
|
25204
|
+
}, React.createElement("ul", {
|
25205
|
+
"className": "scrivito-content-browser-items-tag-list"
|
25206
|
+
}, this.renderTags()), React.createElement("i", {
|
25207
|
+
"onClick": this.expandTagBar,
|
25208
|
+
"className": "scrivito_icon scrivito_icon_slidedown"
|
25209
|
+
}));
|
25210
|
+
}
|
25211
|
+
});
|
25212
|
+
|
25213
|
+
module.exports = TagBar;
|
25214
|
+
|
25215
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
25216
|
+
|
25217
|
+
/***/ },
|
25218
|
+
/* 246 */
|
25219
|
+
/***/ function(module, exports) {
|
25220
|
+
|
25221
|
+
var TagsActionCreator;
|
25222
|
+
|
25223
|
+
TagsActionCreator = (function() {
|
25224
|
+
function TagsActionCreator() {}
|
25225
|
+
|
25226
|
+
TagsActionCreator.COMPLETE_FETCHING_TAGS = 'COMPLETE_FETCHING_TAGS';
|
25227
|
+
|
25228
|
+
TagsActionCreator.START_FETCHING_TAGS = 'START_FETCHING_TAGS';
|
25229
|
+
|
25230
|
+
TagsActionCreator.EXPAND_TOGGLE = 'EXPAND_TOGGLE';
|
25231
|
+
|
25232
|
+
TagsActionCreator.TOGGLE_TAG = 'TOGGLE_TAG';
|
25233
|
+
|
25234
|
+
TagsActionCreator.DISABLE_TAGS = 'DISABLE_TAGS';
|
25235
|
+
|
25236
|
+
TagsActionCreator.toggleExpandTagBar = function() {
|
25237
|
+
return {
|
25238
|
+
type: TagsActionCreator.EXPAND_TOGGLE
|
25239
|
+
};
|
25240
|
+
};
|
25241
|
+
|
25242
|
+
TagsActionCreator._startToggleTag = function(tag) {
|
25243
|
+
return {
|
25244
|
+
type: TagsActionCreator.TOGGLE_TAG,
|
25245
|
+
tag: tag
|
25246
|
+
};
|
25247
|
+
};
|
25248
|
+
|
25249
|
+
TagsActionCreator.disableTags = function() {
|
25250
|
+
return {
|
25251
|
+
type: TagsActionCreator.DISABLE_TAGS
|
25252
|
+
};
|
25253
|
+
};
|
25254
|
+
|
25255
|
+
TagsActionCreator.toggleTag = function(tag, filter) {
|
25256
|
+
return function(dispatch, getState) {
|
25257
|
+
dispatch(TagsActionCreator._startToggleTag(tag));
|
25258
|
+
return filter.trigger("tagActiveStateChanged", filter);
|
25259
|
+
};
|
25260
|
+
};
|
25261
|
+
|
25262
|
+
TagsActionCreator._startFetchingTags = function() {
|
25263
|
+
return {
|
25264
|
+
type: TagsActionCreator.START_FETCHING_TAGS
|
25265
|
+
};
|
25266
|
+
};
|
25267
|
+
|
25268
|
+
TagsActionCreator._completeFetchingTags = function(tags) {
|
25269
|
+
return {
|
25270
|
+
type: TagsActionCreator.COMPLETE_FETCHING_TAGS,
|
25271
|
+
tags: tags
|
25272
|
+
};
|
25273
|
+
};
|
25274
|
+
|
25275
|
+
TagsActionCreator.fetchTags = function(query) {
|
25276
|
+
return function(dispatch) {
|
25277
|
+
dispatch(TagsActionCreator._startFetchingTags());
|
25278
|
+
return query.batch_size(0).facet("tags", {
|
25279
|
+
limit: 100
|
25280
|
+
}).then(function(result) {
|
25281
|
+
return dispatch(TagsActionCreator._completeFetchingTags(result));
|
25282
|
+
});
|
25283
|
+
};
|
25284
|
+
};
|
25285
|
+
|
25286
|
+
return TagsActionCreator;
|
25287
|
+
|
25288
|
+
})();
|
25289
|
+
|
25290
|
+
module.exports = TagsActionCreator;
|
25291
|
+
|
25292
|
+
|
25293
|
+
/***/ },
|
25294
|
+
/* 247 */
|
23727
25295
|
/***/ function(module, exports, __webpack_require__) {
|
23728
25296
|
|
23729
25297
|
/* WEBPACK VAR INJECTION */(function(React) {var MoreItemsSpinner;
|
@@ -23744,20 +25312,27 @@
|
|
23744
25312
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23745
25313
|
|
23746
25314
|
/***/ },
|
23747
|
-
/*
|
25315
|
+
/* 248 */
|
23748
25316
|
/***/ function(module, exports, __webpack_require__) {
|
23749
25317
|
|
23750
|
-
/* WEBPACK VAR INJECTION */(function(React) {var Inspector, MaximizeInspectorToggle, ModalDialogsModule;
|
25318
|
+
/* WEBPACK VAR INJECTION */(function(React) {var Inspector, InspectorAction, MaximizeInspectorToggle, ModalDialogsModule, ReactRedux;
|
25319
|
+
|
25320
|
+
ModalDialogsModule = __webpack_require__(249);
|
23751
25321
|
|
23752
|
-
|
25322
|
+
MaximizeInspectorToggle = __webpack_require__(250);
|
23753
25323
|
|
23754
|
-
|
25324
|
+
InspectorAction = __webpack_require__(251);
|
25325
|
+
|
25326
|
+
ReactRedux = __webpack_require__(187);
|
23755
25327
|
|
23756
25328
|
Inspector = React.createClass({
|
23757
25329
|
displayName: 'Inspector',
|
23758
25330
|
getDetailsClassName: function() {
|
23759
25331
|
return "scrivito_icon scrivito_icon_eye";
|
23760
25332
|
},
|
25333
|
+
toggleInspectorMaximized: function() {
|
25334
|
+
return this.props.dispatch(InspectorAction.toggleInspectorMaximized());
|
25335
|
+
},
|
23761
25336
|
getEmptyPlaceholder: function() {
|
23762
25337
|
return React.createElement("div", {
|
23763
25338
|
"className": "details-view"
|
@@ -23781,7 +25356,7 @@
|
|
23781
25356
|
return React.createElement("h3", {
|
23782
25357
|
"title": title
|
23783
25358
|
}, React.createElement(MaximizeInspectorToggle, {
|
23784
|
-
"
|
25359
|
+
"toggleInspectorMaximized": this.toggleInspectorMaximized
|
23785
25360
|
}), React.createElement("span", {
|
23786
25361
|
"title": "Details",
|
23787
25362
|
"className": this.getDetailsClassName()
|
@@ -23816,7 +25391,7 @@
|
|
23816
25391
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23817
25392
|
|
23818
25393
|
/***/ },
|
23819
|
-
/*
|
25394
|
+
/* 249 */
|
23820
25395
|
/***/ function(module, exports, __webpack_require__) {
|
23821
25396
|
|
23822
25397
|
/* WEBPACK VAR INJECTION */(function(React) {var ModalDialogsModule;
|
@@ -23843,7 +25418,7 @@
|
|
23843
25418
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23844
25419
|
|
23845
25420
|
/***/ },
|
23846
|
-
/*
|
25421
|
+
/* 250 */
|
23847
25422
|
/***/ function(module, exports, __webpack_require__) {
|
23848
25423
|
|
23849
25424
|
/* WEBPACK VAR INJECTION */(function(React) {var MaximizeInspectorToggle;
|
@@ -23851,7 +25426,7 @@
|
|
23851
25426
|
MaximizeInspectorToggle = React.createClass({
|
23852
25427
|
displayName: 'MaximizeInspectorToggle',
|
23853
25428
|
_toggleMaximized: function() {
|
23854
|
-
return this.props.
|
25429
|
+
return this.props.toggleInspectorMaximized();
|
23855
25430
|
},
|
23856
25431
|
render: function() {
|
23857
25432
|
return React.createElement("span", {
|
@@ -23869,12 +25444,36 @@
|
|
23869
25444
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23870
25445
|
|
23871
25446
|
/***/ },
|
23872
|
-
/*
|
25447
|
+
/* 251 */
|
25448
|
+
/***/ function(module, exports) {
|
25449
|
+
|
25450
|
+
var InspectorActionCreator;
|
25451
|
+
|
25452
|
+
InspectorActionCreator = (function() {
|
25453
|
+
function InspectorActionCreator() {}
|
25454
|
+
|
25455
|
+
InspectorActionCreator.MAXIMIZE_TOGGLE = 'MAXIMAZED_INSPECTOR_TOGGLE';
|
25456
|
+
|
25457
|
+
InspectorActionCreator.toggleInspectorMaximized = function() {
|
25458
|
+
return {
|
25459
|
+
type: this.MAXIMIZE_TOGGLE
|
25460
|
+
};
|
25461
|
+
};
|
25462
|
+
|
25463
|
+
return InspectorActionCreator;
|
25464
|
+
|
25465
|
+
})();
|
25466
|
+
|
25467
|
+
module.exports = InspectorActionCreator;
|
25468
|
+
|
25469
|
+
|
25470
|
+
/***/ },
|
25471
|
+
/* 252 */
|
23873
25472
|
/***/ function(module, exports, __webpack_require__) {
|
23874
25473
|
|
23875
25474
|
/* WEBPACK VAR INJECTION */(function(React) {var Footer, ModalDialogsModule;
|
23876
25475
|
|
23877
|
-
ModalDialogsModule = __webpack_require__(
|
25476
|
+
ModalDialogsModule = __webpack_require__(249);
|
23878
25477
|
|
23879
25478
|
Footer = React.createClass({
|
23880
25479
|
displayName: 'Footer',
|
@@ -23890,7 +25489,7 @@
|
|
23890
25489
|
return className;
|
23891
25490
|
},
|
23892
25491
|
closeClick: function() {
|
23893
|
-
if (this.props.
|
25492
|
+
if (this.props.standAlone) {
|
23894
25493
|
return this.props.promise.resolve();
|
23895
25494
|
} else {
|
23896
25495
|
return this.props.promise.reject();
|
@@ -23911,7 +25510,7 @@
|
|
23911
25510
|
_getClassNameCloseButton: function() {
|
23912
25511
|
var className;
|
23913
25512
|
className = "scrivito_button content-browser-close";
|
23914
|
-
if (this.props.
|
25513
|
+
if (this.props.standAlone) {
|
23915
25514
|
className += " scrivito_green";
|
23916
25515
|
}
|
23917
25516
|
return className;
|
@@ -23924,7 +25523,7 @@
|
|
23924
25523
|
"onClick": this.deleteClick
|
23925
25524
|
}, "Delete", React.createElement("span", {
|
23926
25525
|
"className": "scrivito-content-browser-counter selected-total"
|
23927
|
-
}, this.currentSelectedCount())), (!this.props.
|
25526
|
+
}, this.currentSelectedCount())), (!this.props.standAlone ? React.createElement("a", {
|
23928
25527
|
"className": "scrivito_button scrivito_green content-browser-save",
|
23929
25528
|
"onClick": this.doneClick
|
23930
25529
|
}, "Select", React.createElement("span", {
|
@@ -23940,5 +25539,235 @@
|
|
23940
25539
|
|
23941
25540
|
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
23942
25541
|
|
25542
|
+
/***/ },
|
25543
|
+
/* 253 */
|
25544
|
+
/***/ function(module, exports) {
|
25545
|
+
|
25546
|
+
var LastAddedActionCreator;
|
25547
|
+
|
25548
|
+
LastAddedActionCreator = (function() {
|
25549
|
+
function LastAddedActionCreator() {}
|
25550
|
+
|
25551
|
+
LastAddedActionCreator.LAST_ADDED_TOOGLE = 'LAST_ADDED_TOOGLE';
|
25552
|
+
|
25553
|
+
LastAddedActionCreator.setLastAddedVisibility = function(isVisible) {
|
25554
|
+
return {
|
25555
|
+
type: LastAddedActionCreator.LAST_ADDED_TOOGLE,
|
25556
|
+
isVisible: isVisible
|
25557
|
+
};
|
25558
|
+
};
|
25559
|
+
|
25560
|
+
return LastAddedActionCreator;
|
25561
|
+
|
25562
|
+
})();
|
25563
|
+
|
25564
|
+
module.exports = LastAddedActionCreator;
|
25565
|
+
|
25566
|
+
|
25567
|
+
/***/ },
|
25568
|
+
/* 254 */
|
25569
|
+
/***/ function(module, exports, __webpack_require__) {
|
25570
|
+
|
25571
|
+
var applyMiddleware, combinedReducer, configureStore, createStore, thunkMiddleware, _ref;
|
25572
|
+
|
25573
|
+
thunkMiddleware = __webpack_require__(255);
|
25574
|
+
|
25575
|
+
_ref = __webpack_require__(195), createStore = _ref.createStore, applyMiddleware = _ref.applyMiddleware;
|
25576
|
+
|
25577
|
+
combinedReducer = __webpack_require__(256);
|
25578
|
+
|
25579
|
+
configureStore = function(initialState) {
|
25580
|
+
var createStoreWithMiddleware;
|
25581
|
+
createStoreWithMiddleware = applyMiddleware(thunkMiddleware)(createStore);
|
25582
|
+
return createStoreWithMiddleware(combinedReducer, initialState);
|
25583
|
+
};
|
25584
|
+
|
25585
|
+
module.exports = configureStore;
|
25586
|
+
|
25587
|
+
|
25588
|
+
/***/ },
|
25589
|
+
/* 255 */
|
25590
|
+
/***/ function(module, exports) {
|
25591
|
+
|
25592
|
+
'use strict';
|
25593
|
+
|
25594
|
+
function thunkMiddleware(_ref) {
|
25595
|
+
var dispatch = _ref.dispatch;
|
25596
|
+
var getState = _ref.getState;
|
25597
|
+
|
25598
|
+
return function (next) {
|
25599
|
+
return function (action) {
|
25600
|
+
return typeof action === 'function' ? action(dispatch, getState) : next(action);
|
25601
|
+
};
|
25602
|
+
};
|
25603
|
+
}
|
25604
|
+
|
25605
|
+
module.exports = thunkMiddleware;
|
25606
|
+
|
25607
|
+
/***/ },
|
25608
|
+
/* 256 */
|
25609
|
+
/***/ function(module, exports, __webpack_require__) {
|
25610
|
+
|
25611
|
+
var Redux, TagsReducer, combinedReducer, inspectorReducer, lastAddedReducer, objDisplayReducer;
|
25612
|
+
|
25613
|
+
Redux = __webpack_require__(195);
|
25614
|
+
|
25615
|
+
inspectorReducer = __webpack_require__(257);
|
25616
|
+
|
25617
|
+
lastAddedReducer = __webpack_require__(258);
|
25618
|
+
|
25619
|
+
objDisplayReducer = __webpack_require__(259);
|
25620
|
+
|
25621
|
+
TagsReducer = __webpack_require__(260);
|
25622
|
+
|
25623
|
+
combinedReducer = Redux.combineReducers({
|
25624
|
+
objDisplay: objDisplayReducer,
|
25625
|
+
inspector: inspectorReducer,
|
25626
|
+
lastAdded: lastAddedReducer,
|
25627
|
+
tags: TagsReducer
|
25628
|
+
});
|
25629
|
+
|
25630
|
+
module.exports = combinedReducer;
|
25631
|
+
|
25632
|
+
|
25633
|
+
/***/ },
|
25634
|
+
/* 257 */
|
25635
|
+
/***/ function(module, exports, __webpack_require__) {
|
25636
|
+
|
25637
|
+
var inspectorActions, inspectorReducer;
|
25638
|
+
|
25639
|
+
inspectorActions = __webpack_require__(251);
|
25640
|
+
|
25641
|
+
inspectorReducer = function(state, action) {
|
25642
|
+
if (state == null) {
|
25643
|
+
state = {
|
25644
|
+
isMaximized: false
|
25645
|
+
};
|
25646
|
+
}
|
25647
|
+
switch (action.type) {
|
25648
|
+
case inspectorActions.MAXIMIZE_TOGGLE:
|
25649
|
+
return _.extend({}, state, {
|
25650
|
+
isMaximized: !state.isMaximized
|
25651
|
+
});
|
25652
|
+
default:
|
25653
|
+
return state;
|
25654
|
+
}
|
25655
|
+
};
|
25656
|
+
|
25657
|
+
module.exports = inspectorReducer;
|
25658
|
+
|
25659
|
+
|
25660
|
+
/***/ },
|
25661
|
+
/* 258 */
|
25662
|
+
/***/ function(module, exports, __webpack_require__) {
|
25663
|
+
|
25664
|
+
var LAST_ADDED_TOOGLE, LastAddedReducer;
|
25665
|
+
|
25666
|
+
LAST_ADDED_TOOGLE = __webpack_require__(253).LAST_ADDED_TOOGLE;
|
25667
|
+
|
25668
|
+
LastAddedReducer = function(state, action) {
|
25669
|
+
if (state == null) {
|
25670
|
+
state = {
|
25671
|
+
isVisible: false
|
25672
|
+
};
|
25673
|
+
}
|
25674
|
+
switch (action.type) {
|
25675
|
+
case LAST_ADDED_TOOGLE:
|
25676
|
+
return _.extend({}, state, {
|
25677
|
+
isVisible: action.isVisible
|
25678
|
+
});
|
25679
|
+
default:
|
25680
|
+
return state;
|
25681
|
+
}
|
25682
|
+
};
|
25683
|
+
|
25684
|
+
module.exports = LastAddedReducer;
|
25685
|
+
|
25686
|
+
|
25687
|
+
/***/ },
|
25688
|
+
/* 259 */
|
25689
|
+
/***/ function(module, exports, __webpack_require__) {
|
25690
|
+
|
25691
|
+
var SET_VIEW_MODE, THUMBNAIL_VIEW, objDisplayReducer, _ref;
|
25692
|
+
|
25693
|
+
_ref = __webpack_require__(207), THUMBNAIL_VIEW = _ref.THUMBNAIL_VIEW, SET_VIEW_MODE = _ref.SET_VIEW_MODE;
|
25694
|
+
|
25695
|
+
objDisplayReducer = function(state, action) {
|
25696
|
+
if (state == null) {
|
25697
|
+
state = {
|
25698
|
+
viewMode: THUMBNAIL_VIEW
|
25699
|
+
};
|
25700
|
+
}
|
25701
|
+
switch (action.type) {
|
25702
|
+
case SET_VIEW_MODE:
|
25703
|
+
return {
|
25704
|
+
viewMode: action.viewMode
|
25705
|
+
};
|
25706
|
+
default:
|
25707
|
+
return state;
|
25708
|
+
}
|
25709
|
+
};
|
25710
|
+
|
25711
|
+
module.exports = objDisplayReducer;
|
25712
|
+
|
25713
|
+
|
25714
|
+
/***/ },
|
25715
|
+
/* 260 */
|
25716
|
+
/***/ function(module, exports, __webpack_require__) {
|
25717
|
+
|
25718
|
+
var COMPLETE_FETCHING_TAGS, DISABLE_TAGS, EXPAND_TOGGLE, START_FETCHING_TAGS, TOGGLE_TAG, TagsReducer, defaultState, getActiveTags, _ref;
|
25719
|
+
|
25720
|
+
_ref = __webpack_require__(246), START_FETCHING_TAGS = _ref.START_FETCHING_TAGS, EXPAND_TOGGLE = _ref.EXPAND_TOGGLE, TOGGLE_TAG = _ref.TOGGLE_TAG, COMPLETE_FETCHING_TAGS = _ref.COMPLETE_FETCHING_TAGS, DISABLE_TAGS = _ref.DISABLE_TAGS;
|
25721
|
+
|
25722
|
+
getActiveTags = function(currentActiveTags, actionTag) {
|
25723
|
+
var activeTags;
|
25724
|
+
if (_.include(currentActiveTags, actionTag)) {
|
25725
|
+
return activeTags = _.without(currentActiveTags, actionTag);
|
25726
|
+
} else {
|
25727
|
+
return currentActiveTags.concat([actionTag]);
|
25728
|
+
}
|
25729
|
+
};
|
25730
|
+
|
25731
|
+
defaultState = function() {
|
25732
|
+
return {
|
25733
|
+
isExpanded: false,
|
25734
|
+
items: [],
|
25735
|
+
activeTags: []
|
25736
|
+
};
|
25737
|
+
};
|
25738
|
+
|
25739
|
+
TagsReducer = function(state, action) {
|
25740
|
+
if (state == null) {
|
25741
|
+
state = defaultState();
|
25742
|
+
}
|
25743
|
+
switch (action.type) {
|
25744
|
+
case TOGGLE_TAG:
|
25745
|
+
return _.extend({}, state, {
|
25746
|
+
activeTags: getActiveTags(state.activeTags, action.tag)
|
25747
|
+
});
|
25748
|
+
case EXPAND_TOGGLE:
|
25749
|
+
return _.extend({}, state, {
|
25750
|
+
isExpanded: !state.isExpanded
|
25751
|
+
});
|
25752
|
+
case START_FETCHING_TAGS:
|
25753
|
+
return _.extend({}, state, {
|
25754
|
+
items: [],
|
25755
|
+
activeTags: []
|
25756
|
+
});
|
25757
|
+
case COMPLETE_FETCHING_TAGS:
|
25758
|
+
return _.extend({}, state, {
|
25759
|
+
items: action.tags,
|
25760
|
+
isExpanded: action.tags.length ? state.isExpanded : false
|
25761
|
+
});
|
25762
|
+
case DISABLE_TAGS:
|
25763
|
+
return _.extend({}, state, defaultState());
|
25764
|
+
default:
|
25765
|
+
return state;
|
25766
|
+
}
|
25767
|
+
};
|
25768
|
+
|
25769
|
+
module.exports = TagsReducer;
|
25770
|
+
|
25771
|
+
|
23943
25772
|
/***/ }
|
23944
25773
|
/******/ ]);
|