scrivito_content_browser 1.8.1 → 1.9.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 +1 -1
- data/app/assets/javascripts/dist/scrivito_content_browser_pkg.js +1684 -1378
- metadata +5 -5
@@ -44,17 +44,17 @@
|
|
44
44
|
/* 0 */
|
45
45
|
/***/ function(module, exports, __webpack_require__) {
|
46
46
|
|
47
|
-
var
|
47
|
+
var AppContainer, DialogApp, Filter, Provider, ReactRedux, configureStore;
|
48
48
|
|
49
49
|
__webpack_require__(1);
|
50
50
|
|
51
51
|
DialogApp = __webpack_require__(4);
|
52
52
|
|
53
|
-
Filter = __webpack_require__(7);
|
53
|
+
Filter = __webpack_require__(7)["default"];
|
54
54
|
|
55
|
-
|
55
|
+
AppContainer = __webpack_require__(17).AppContainer;
|
56
56
|
|
57
|
-
ReactRedux = __webpack_require__(
|
57
|
+
ReactRedux = __webpack_require__(24);
|
58
58
|
|
59
59
|
Provider = ReactRedux.Provider;
|
60
60
|
|
@@ -125,7 +125,7 @@
|
|
125
125
|
store = configureStore();
|
126
126
|
return this._reactApp = ReactDOM.render(React.createElement(Provider, {
|
127
127
|
"store": store
|
128
|
-
}, React.createElement(
|
128
|
+
}, React.createElement(AppContainer, {
|
129
129
|
"initialFilter": filter,
|
130
130
|
"baseQuery": baseQuery,
|
131
131
|
"promise": promise,
|
@@ -418,534 +418,709 @@
|
|
418
418
|
/* 7 */
|
419
419
|
/***/ function(module, exports, __webpack_require__) {
|
420
420
|
|
421
|
-
|
422
|
-
__hasProp = {}.hasOwnProperty,
|
423
|
-
__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; };
|
421
|
+
'use strict';
|
424
422
|
|
425
|
-
|
423
|
+
Object.defineProperty(exports, "__esModule", {
|
424
|
+
value: true
|
425
|
+
});
|
426
426
|
|
427
|
-
|
427
|
+
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; }; }();
|
428
428
|
|
429
|
-
|
429
|
+
var _listenable = __webpack_require__(8);
|
430
430
|
|
431
|
-
|
431
|
+
var _listenable2 = _interopRequireDefault(_listenable);
|
432
432
|
|
433
|
-
|
433
|
+
var _radio_filter = __webpack_require__(9);
|
434
434
|
|
435
|
-
|
436
|
-
__extends(Filter, _super);
|
435
|
+
var _radio_filter2 = _interopRequireDefault(_radio_filter);
|
437
436
|
|
438
|
-
|
439
|
-
var filterDefinition;
|
440
|
-
Filter.__super__.constructor.call(this);
|
441
|
-
filterDefinition = this._resolveFunction(filterDefinitionOrFunction, filterContext);
|
442
|
-
this._lastAdded = false;
|
443
|
-
if (_.isEmpty(filterDefinition)) {
|
444
|
-
filterDefinition = this._resolveFunction(__webpack_require__(17), filterContext);
|
445
|
-
}
|
446
|
-
this._initFilters(filterDefinition);
|
447
|
-
}
|
437
|
+
var _tree_filter = __webpack_require__(13);
|
448
438
|
|
449
|
-
|
450
|
-
return _.each(this.getHierarchicalFilters(), function(filter) {
|
451
|
-
return filter.deselect();
|
452
|
-
});
|
453
|
-
};
|
439
|
+
var _tree_filter2 = _interopRequireDefault(_tree_filter);
|
454
440
|
|
455
|
-
|
456
|
-
this.searchTerm = newTerm;
|
457
|
-
return this.changed();
|
458
|
-
};
|
441
|
+
var _checkbox_filter = __webpack_require__(14);
|
459
442
|
|
460
|
-
|
461
|
-
return _.union(this.getHierarchicalFilters(), this.additionalFilters);
|
462
|
-
};
|
443
|
+
var _checkbox_filter2 = _interopRequireDefault(_checkbox_filter);
|
463
444
|
|
464
|
-
|
465
|
-
return _.some(this.getAllFilters(), function(subFilter) {
|
466
|
-
return subFilter.hasActiveChildren();
|
467
|
-
});
|
468
|
-
};
|
445
|
+
var _default_filter_definition = __webpack_require__(16);
|
469
446
|
|
470
|
-
|
471
|
-
return _.flatten(_.map(this.getTreeFilters(), function(filter) {
|
472
|
-
return filter.subFilters;
|
473
|
-
}));
|
474
|
-
};
|
447
|
+
var _default_filter_definition2 = _interopRequireDefault(_default_filter_definition);
|
475
448
|
|
476
|
-
|
477
|
-
return this.treeFilters;
|
478
|
-
};
|
449
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
479
450
|
|
480
|
-
|
481
|
-
return this.treeFilters.length > 0;
|
482
|
-
};
|
451
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
483
452
|
|
484
|
-
|
485
|
-
return this.additionalFilters.length > 0;
|
486
|
-
};
|
453
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
487
454
|
|
488
|
-
|
489
|
-
var definition, name, subFilters, _results;
|
490
|
-
this.treeFilters = [];
|
491
|
-
this.additionalFilters = [];
|
492
|
-
_results = [];
|
493
|
-
for (name in filterDefinition) {
|
494
|
-
if (!__hasProp.call(filterDefinition, name)) continue;
|
495
|
-
definition = filterDefinition[name];
|
496
|
-
if (!(definition)) {
|
497
|
-
continue;
|
498
|
-
}
|
499
|
-
if ((definition.type == null) || definition.type === 'tree') {
|
500
|
-
subFilters = [];
|
501
|
-
_.each(definition.options, (function(_this) {
|
502
|
-
return function(definition, name) {
|
503
|
-
return subFilters.push(new TreeFilter(_this, name, definition));
|
504
|
-
};
|
505
|
-
})(this));
|
506
|
-
this.treeFilters.push({
|
507
|
-
config: definition,
|
508
|
-
subFilters: subFilters
|
509
|
-
});
|
510
|
-
}
|
511
|
-
if (definition.type === 'radio_button') {
|
512
|
-
this.additionalFilters.push(new RadioFilter(this, name, definition));
|
513
|
-
}
|
514
|
-
if (definition.type === 'check_box') {
|
515
|
-
_results.push(this.additionalFilters.push(new CheckboxFilter(this, name, definition)));
|
516
|
-
} else {
|
517
|
-
_results.push(void 0);
|
518
|
-
}
|
519
|
-
}
|
520
|
-
return _results;
|
521
|
-
};
|
455
|
+
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; }
|
522
456
|
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
457
|
+
var resolveFunction = function resolveFunction(objectOrFunction, context) {
|
458
|
+
if (typeof objectOrFunction === 'function') {
|
459
|
+
return objectOrFunction(context || {});
|
460
|
+
}
|
461
|
+
|
462
|
+
return objectOrFunction;
|
463
|
+
};
|
464
|
+
|
465
|
+
var Filter = function (_Listenable) {
|
466
|
+
_inherits(Filter, _Listenable);
|
467
|
+
|
468
|
+
function Filter(filterDefinitionOrFunction, filterContext) {
|
469
|
+
_classCallCheck(this, Filter);
|
470
|
+
|
471
|
+
var _this = _possibleConstructorReturn(this, (Filter.__proto__ || Object.getPrototypeOf(Filter)).call(this));
|
472
|
+
|
473
|
+
var filterDefinition = resolveFunction(filterDefinitionOrFunction, filterContext);
|
474
|
+
|
475
|
+
if (_.isEmpty(filterDefinition)) {
|
476
|
+
filterDefinition = resolveFunction(_default_filter_definition2.default, filterContext);
|
528
477
|
}
|
529
|
-
|
478
|
+
_this.initFilters(filterDefinition);
|
479
|
+
return _this;
|
480
|
+
}
|
530
481
|
|
531
|
-
|
482
|
+
_createClass(Filter, [{
|
483
|
+
key: 'deselectHierarchicalFilters',
|
484
|
+
value: function deselectHierarchicalFilters() {
|
485
|
+
return _.each(this.getHierarchicalFilters(), function (filter) {
|
486
|
+
return filter.deselect();
|
487
|
+
});
|
488
|
+
}
|
489
|
+
}, {
|
490
|
+
key: 'setSearchTerm',
|
491
|
+
value: function setSearchTerm(newTerm) {
|
492
|
+
this.searchTerm = newTerm;
|
493
|
+
this.changed();
|
494
|
+
}
|
495
|
+
}, {
|
496
|
+
key: 'getAllFilters',
|
497
|
+
value: function getAllFilters() {
|
498
|
+
return _.union(this.getHierarchicalFilters(), this.additionalFilters);
|
499
|
+
}
|
500
|
+
}, {
|
501
|
+
key: 'hasActiveChildren',
|
502
|
+
value: function hasActiveChildren() {
|
503
|
+
return _.some(this.getAllFilters(), function (subFilter) {
|
504
|
+
return subFilter.hasActiveChildren();
|
505
|
+
});
|
506
|
+
}
|
507
|
+
}, {
|
508
|
+
key: 'getHierarchicalFilters',
|
509
|
+
value: function getHierarchicalFilters() {
|
510
|
+
return _.flatten(_.map(this.getTreeFilters(), function (filter) {
|
511
|
+
return filter.subFilters;
|
512
|
+
}));
|
513
|
+
}
|
514
|
+
}, {
|
515
|
+
key: 'getTreeFilters',
|
516
|
+
value: function getTreeFilters() {
|
517
|
+
return this.treeFilters;
|
518
|
+
}
|
519
|
+
}, {
|
520
|
+
key: 'hasHierarchicalFilters',
|
521
|
+
value: function hasHierarchicalFilters() {
|
522
|
+
return this.treeFilters.length > 0;
|
523
|
+
}
|
524
|
+
}, {
|
525
|
+
key: 'hasAdditionalFilters',
|
526
|
+
value: function hasAdditionalFilters() {
|
527
|
+
return this.additionalFilters.length > 0;
|
528
|
+
}
|
529
|
+
}, {
|
530
|
+
key: 'initFilters',
|
531
|
+
value: function initFilters(filterDefinition) {
|
532
|
+
var _this2 = this;
|
533
|
+
|
534
|
+
this.treeFilters = [];
|
535
|
+
this.additionalFilters = [];
|
536
|
+
|
537
|
+
return function () {
|
538
|
+
var result = [];
|
539
|
+
_.each(Object.keys(filterDefinition || {}), function (name) {
|
540
|
+
var definition = filterDefinition[name];
|
541
|
+
|
542
|
+
if (definition) {
|
543
|
+
var item = void 0;
|
544
|
+
if (definition.type == null || definition.type === 'tree') {
|
545
|
+
var subFilters = [];
|
546
|
+
|
547
|
+
_.each(definition.options, function (optionDefinition, title) {
|
548
|
+
return subFilters.push(new _tree_filter2.default(_this2, title, optionDefinition));
|
549
|
+
});
|
550
|
+
|
551
|
+
_this2.treeFilters.push({
|
552
|
+
config: definition,
|
553
|
+
subFilters: subFilters
|
554
|
+
});
|
555
|
+
}
|
556
|
+
if (definition.type === 'radio_button') {
|
557
|
+
_this2.additionalFilters.push(new _radio_filter2.default(_this2, name, definition));
|
558
|
+
}
|
559
|
+
if (definition.type === 'check_box') {
|
560
|
+
item = _this2.additionalFilters.push(new _checkbox_filter2.default(_this2, name, definition));
|
561
|
+
}
|
562
|
+
result.push(item);
|
563
|
+
}
|
564
|
+
});
|
532
565
|
|
533
|
-
|
566
|
+
return result;
|
567
|
+
}();
|
568
|
+
}
|
569
|
+
}]);
|
534
570
|
|
535
|
-
|
571
|
+
return Filter;
|
572
|
+
}(_listenable2.default);
|
536
573
|
|
574
|
+
exports.default = Filter;
|
537
575
|
|
538
576
|
/***/ },
|
539
577
|
/* 8 */
|
540
578
|
/***/ function(module, exports) {
|
541
579
|
|
542
|
-
|
543
|
-
|
544
|
-
Listenable = (function() {
|
545
|
-
function Listenable() {
|
546
|
-
this._callbacks = {};
|
547
|
-
}
|
580
|
+
'use strict';
|
548
581
|
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
return this._callbacks[eventName].push(callback);
|
553
|
-
};
|
582
|
+
Object.defineProperty(exports, "__esModule", {
|
583
|
+
value: true
|
584
|
+
});
|
554
585
|
|
555
|
-
|
556
|
-
var callbacks, eventName, params;
|
557
|
-
eventName = arguments[0];
|
558
|
-
params = _.toArray(arguments).slice(1);
|
559
|
-
callbacks = this._callbacks[eventName];
|
560
|
-
if (callbacks) {
|
561
|
-
return _.each(callbacks, function(callback) {
|
562
|
-
return callback.apply(this, params);
|
563
|
-
});
|
564
|
-
}
|
565
|
-
};
|
586
|
+
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; }; }();
|
566
587
|
|
567
|
-
|
568
|
-
return this.on('change', callback);
|
569
|
-
};
|
588
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
570
589
|
|
571
|
-
|
572
|
-
|
573
|
-
|
590
|
+
var Listenable = function () {
|
591
|
+
function Listenable() {
|
592
|
+
_classCallCheck(this, Listenable);
|
574
593
|
|
575
|
-
|
594
|
+
this.callbacks = {};
|
595
|
+
}
|
576
596
|
|
577
|
-
|
597
|
+
_createClass(Listenable, [{
|
598
|
+
key: 'on',
|
599
|
+
value: function on(eventName, callback) {
|
600
|
+
if (!this.callbacks[eventName]) {
|
601
|
+
this.callbacks[eventName] = [];
|
602
|
+
}
|
603
|
+
this.callbacks[eventName].push(callback);
|
604
|
+
}
|
605
|
+
}, {
|
606
|
+
key: 'trigger',
|
607
|
+
value: function trigger(eventName, listOfParams) {
|
608
|
+
var _this = this;
|
609
|
+
|
610
|
+
var callbacks = this.callbacks[eventName];
|
611
|
+
var params = [listOfParams];
|
612
|
+
if (callbacks) {
|
613
|
+
_.each(callbacks, function (callback) {
|
614
|
+
callback.apply(_this, params);
|
615
|
+
});
|
616
|
+
}
|
617
|
+
}
|
618
|
+
}, {
|
619
|
+
key: 'onChange',
|
620
|
+
value: function onChange(callback) {
|
621
|
+
this.on('change', callback);
|
622
|
+
}
|
623
|
+
}, {
|
624
|
+
key: 'changed',
|
625
|
+
value: function changed() {
|
626
|
+
this.trigger('change', this);
|
627
|
+
}
|
628
|
+
}]);
|
578
629
|
|
579
|
-
|
630
|
+
return Listenable;
|
631
|
+
}();
|
580
632
|
|
633
|
+
exports.default = Listenable;
|
581
634
|
|
582
635
|
/***/ },
|
583
636
|
/* 9 */
|
584
637
|
/***/ function(module, exports, __webpack_require__) {
|
585
638
|
|
586
|
-
|
587
|
-
|
588
|
-
|
639
|
+
'use strict';
|
640
|
+
|
641
|
+
Object.defineProperty(exports, "__esModule", {
|
642
|
+
value: true
|
643
|
+
});
|
644
|
+
|
645
|
+
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; }; }();
|
646
|
+
|
647
|
+
var _filter_collection_node = __webpack_require__(10);
|
648
|
+
|
649
|
+
var _filter_collection_node2 = _interopRequireDefault(_filter_collection_node);
|
650
|
+
|
651
|
+
var _radio_option = __webpack_require__(12);
|
652
|
+
|
653
|
+
var _radio_option2 = _interopRequireDefault(_radio_option);
|
654
|
+
|
655
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
656
|
+
|
657
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
589
658
|
|
590
|
-
|
659
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
591
660
|
|
592
|
-
|
661
|
+
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; }
|
593
662
|
|
594
|
-
RadioFilter =
|
595
|
-
|
663
|
+
var RadioFilter = function (_FilterCollectionNode) {
|
664
|
+
_inherits(RadioFilter, _FilterCollectionNode);
|
596
665
|
|
597
666
|
function RadioFilter(filter, name, filterDefinition) {
|
598
|
-
|
599
|
-
this.type = 'radio';
|
600
|
-
this.children = _.map(filterDefinition.options, (function(_this) {
|
601
|
-
return function(definition, name) {
|
602
|
-
return new RadioOption(_this, name, definition);
|
603
|
-
};
|
604
|
-
})(this));
|
605
|
-
}
|
667
|
+
_classCallCheck(this, RadioFilter);
|
606
668
|
|
607
|
-
|
608
|
-
_.each(this.children, function(child) {
|
609
|
-
return child.active = child === radioOption;
|
610
|
-
});
|
611
|
-
return this.filter.changed();
|
612
|
-
};
|
669
|
+
var _this = _possibleConstructorReturn(this, (RadioFilter.__proto__ || Object.getPrototypeOf(RadioFilter)).call(this, filter, name, filterDefinition));
|
613
670
|
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
671
|
+
_this.type = 'radio';
|
672
|
+
_this.children = _.map(filterDefinition.options, function (definition, title) {
|
673
|
+
return new _radio_option2.default(_this, title, definition);
|
674
|
+
});
|
675
|
+
return _this;
|
676
|
+
}
|
618
677
|
|
619
|
-
|
678
|
+
_createClass(RadioFilter, [{
|
679
|
+
key: 'activate',
|
680
|
+
value: function activate(radioOption) {
|
681
|
+
_.each(this.children, function (child) {
|
682
|
+
child.active = child === radioOption;
|
683
|
+
});
|
620
684
|
|
621
|
-
|
685
|
+
this.filter.changed();
|
686
|
+
}
|
687
|
+
}, {
|
688
|
+
key: 'deactivateAll',
|
689
|
+
value: function deactivateAll() {
|
690
|
+
this.deselect();
|
691
|
+
this.filter.changed();
|
692
|
+
}
|
693
|
+
}]);
|
622
694
|
|
623
|
-
|
695
|
+
return RadioFilter;
|
696
|
+
}(_filter_collection_node2.default);
|
624
697
|
|
698
|
+
exports.default = RadioFilter;
|
625
699
|
|
626
700
|
/***/ },
|
627
701
|
/* 10 */
|
628
702
|
/***/ function(module, exports, __webpack_require__) {
|
629
703
|
|
630
|
-
|
631
|
-
__hasProp = {}.hasOwnProperty,
|
632
|
-
__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; };
|
704
|
+
'use strict';
|
633
705
|
|
634
|
-
|
706
|
+
Object.defineProperty(exports, "__esModule", {
|
707
|
+
value: true
|
708
|
+
});
|
635
709
|
|
636
|
-
|
637
|
-
__extends(FilterCollectionNode, _super);
|
710
|
+
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; }; }();
|
638
711
|
|
639
|
-
|
640
|
-
FilterCollectionNode.__super__.constructor.call(this, filter, name, filterDefinition);
|
641
|
-
this.field = filterDefinition.field, this.operator = filterDefinition.operator;
|
642
|
-
this.expanded = filterDefinition.expanded !== false;
|
643
|
-
this.children = [];
|
644
|
-
}
|
712
|
+
var _filter_node = __webpack_require__(11);
|
645
713
|
|
646
|
-
|
647
|
-
return _.each(this.children, function(child) {
|
648
|
-
return child.active = false;
|
649
|
-
});
|
650
|
-
};
|
714
|
+
var _filter_node2 = _interopRequireDefault(_filter_node);
|
651
715
|
|
652
|
-
|
653
|
-
return !!this.expanded;
|
654
|
-
};
|
716
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
655
717
|
|
656
|
-
|
657
|
-
return _.some(this.children, function(child) {
|
658
|
-
return child.isActive();
|
659
|
-
});
|
660
|
-
};
|
718
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
661
719
|
|
662
|
-
|
720
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
721
|
+
|
722
|
+
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; }
|
723
|
+
|
724
|
+
var FilterCollectionNode = function (_FilterNode) {
|
725
|
+
_inherits(FilterCollectionNode, _FilterNode);
|
726
|
+
|
727
|
+
function FilterCollectionNode(filter, name, filterDefinition) {
|
728
|
+
_classCallCheck(this, FilterCollectionNode);
|
729
|
+
|
730
|
+
var _this = _possibleConstructorReturn(this, (FilterCollectionNode.__proto__ || Object.getPrototypeOf(FilterCollectionNode)).call(this, filter, name, filterDefinition));
|
731
|
+
|
732
|
+
_this.field = filterDefinition.field;
|
733
|
+
_this.operator = filterDefinition.operator;
|
663
734
|
|
664
|
-
|
735
|
+
_this.expanded = filterDefinition.expanded !== false;
|
736
|
+
_this.children = [];
|
737
|
+
return _this;
|
738
|
+
}
|
739
|
+
|
740
|
+
_createClass(FilterCollectionNode, [{
|
741
|
+
key: 'deselect',
|
742
|
+
value: function deselect() {
|
743
|
+
return _.each(this.children, function (child) {
|
744
|
+
child.active = false;
|
745
|
+
});
|
746
|
+
}
|
747
|
+
}, {
|
748
|
+
key: 'isExpanded',
|
749
|
+
value: function isExpanded() {
|
750
|
+
return !!this.expanded;
|
751
|
+
}
|
752
|
+
}, {
|
753
|
+
key: 'hasActiveChildren',
|
754
|
+
value: function hasActiveChildren() {
|
755
|
+
return _.some(this.children, function (child) {
|
756
|
+
return child.isActive();
|
757
|
+
});
|
758
|
+
}
|
759
|
+
}]);
|
665
760
|
|
666
|
-
|
761
|
+
return FilterCollectionNode;
|
762
|
+
}(_filter_node2.default);
|
667
763
|
|
764
|
+
exports.default = FilterCollectionNode;
|
668
765
|
|
669
766
|
/***/ },
|
670
767
|
/* 11 */
|
671
768
|
/***/ function(module, exports) {
|
672
769
|
|
673
|
-
|
770
|
+
'use strict';
|
771
|
+
|
772
|
+
Object.defineProperty(exports, "__esModule", {
|
773
|
+
value: true
|
774
|
+
});
|
775
|
+
|
776
|
+
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; }; }();
|
777
|
+
|
778
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
674
779
|
|
675
|
-
|
780
|
+
var capitalize = function capitalize(string) {
|
781
|
+
return string.charAt(0).toUpperCase() + string.slice(1);
|
782
|
+
};
|
783
|
+
|
784
|
+
var FilterNode = function () {
|
676
785
|
function FilterNode(filter, name, filterDefinition) {
|
786
|
+
_classCallCheck(this, FilterNode);
|
787
|
+
|
677
788
|
this.filter = filter;
|
678
789
|
this.name = name;
|
679
790
|
this.title = filterDefinition.title;
|
680
|
-
|
791
|
+
if (!this.title) {
|
792
|
+
this.title = this.fallbackTitle();
|
793
|
+
}
|
681
794
|
}
|
682
795
|
|
683
|
-
FilterNode
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
};
|
796
|
+
_createClass(FilterNode, [{
|
797
|
+
key: 'fallbackTitle',
|
798
|
+
value: function fallbackTitle() {
|
799
|
+
return capitalize(this.name.replace(/_/g, ' ').trim());
|
800
|
+
}
|
801
|
+
}]);
|
690
802
|
|
691
803
|
return FilterNode;
|
804
|
+
}();
|
692
805
|
|
693
|
-
|
694
|
-
|
695
|
-
module.exports = FilterNode;
|
696
|
-
|
806
|
+
exports.default = FilterNode;
|
697
807
|
|
698
808
|
/***/ },
|
699
809
|
/* 12 */
|
700
810
|
/***/ function(module, exports, __webpack_require__) {
|
701
811
|
|
702
|
-
|
703
|
-
|
704
|
-
|
812
|
+
'use strict';
|
813
|
+
|
814
|
+
Object.defineProperty(exports, "__esModule", {
|
815
|
+
value: true
|
816
|
+
});
|
817
|
+
|
818
|
+
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; }; }();
|
819
|
+
|
820
|
+
var _filter_node = __webpack_require__(11);
|
821
|
+
|
822
|
+
var _filter_node2 = _interopRequireDefault(_filter_node);
|
823
|
+
|
824
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
705
825
|
|
706
|
-
|
826
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
707
827
|
|
708
|
-
|
709
|
-
|
828
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
829
|
+
|
830
|
+
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; }
|
831
|
+
|
832
|
+
var RadioOption = function (_FilterNode) {
|
833
|
+
_inherits(RadioOption, _FilterNode);
|
710
834
|
|
711
835
|
function RadioOption(group, name, filterDefinition) {
|
712
|
-
this
|
713
|
-
RadioOption.__super__.constructor.call(this, this.group.filter, name, filterDefinition);
|
714
|
-
this.value = filterDefinition.value, this.query = filterDefinition.query, this.preset = filterDefinition.preset, this.enable_create = filterDefinition.enable_create;
|
715
|
-
this.active = filterDefinition.selected;
|
716
|
-
}
|
836
|
+
_classCallCheck(this, RadioOption);
|
717
837
|
|
718
|
-
|
719
|
-
return this.group.activate(this);
|
720
|
-
};
|
838
|
+
var _this = _possibleConstructorReturn(this, (RadioOption.__proto__ || Object.getPrototypeOf(RadioOption)).call(this, group.filter, name, filterDefinition));
|
721
839
|
|
722
|
-
|
723
|
-
|
724
|
-
|
840
|
+
_this.value = filterDefinition.value;
|
841
|
+
_this.query = filterDefinition.query;
|
842
|
+
_this.preset = filterDefinition.preset;
|
843
|
+
_this.enable_create = filterDefinition.enable_create;
|
725
844
|
|
726
|
-
return RadioOption;
|
727
845
|
|
728
|
-
|
846
|
+
_this.group = group;
|
847
|
+
_this.active = filterDefinition.selected;
|
848
|
+
return _this;
|
849
|
+
}
|
850
|
+
|
851
|
+
_createClass(RadioOption, [{
|
852
|
+
key: 'setActive',
|
853
|
+
value: function setActive() {
|
854
|
+
return this.group.activate(this);
|
855
|
+
}
|
856
|
+
}, {
|
857
|
+
key: 'isActive',
|
858
|
+
value: function isActive() {
|
859
|
+
return !!this.active;
|
860
|
+
}
|
861
|
+
}]);
|
729
862
|
|
730
|
-
|
863
|
+
return RadioOption;
|
864
|
+
}(_filter_node2.default);
|
731
865
|
|
866
|
+
exports.default = RadioOption;
|
732
867
|
|
733
868
|
/***/ },
|
734
869
|
/* 13 */
|
735
870
|
/***/ function(module, exports, __webpack_require__) {
|
736
871
|
|
737
|
-
|
738
|
-
|
739
|
-
|
872
|
+
'use strict';
|
873
|
+
|
874
|
+
Object.defineProperty(exports, "__esModule", {
|
875
|
+
value: true
|
876
|
+
});
|
877
|
+
|
878
|
+
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; }; }();
|
879
|
+
|
880
|
+
var _filter_node = __webpack_require__(11);
|
881
|
+
|
882
|
+
var _filter_node2 = _interopRequireDefault(_filter_node);
|
740
883
|
|
741
|
-
|
884
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
742
885
|
|
743
|
-
|
744
|
-
|
886
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
887
|
+
|
888
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
889
|
+
|
890
|
+
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; }
|
891
|
+
|
892
|
+
var TreeFilter = function (_FilterNode) {
|
893
|
+
_inherits(TreeFilter, _FilterNode);
|
745
894
|
|
746
895
|
function TreeFilter(filter, name, filterDefinition) {
|
747
|
-
|
748
|
-
TreeFilter.__super__.constructor.call(this, filter, name, filterDefinition);
|
749
|
-
this.type = 'tree';
|
750
|
-
this.icon = filterDefinition.icon, this.query = filterDefinition.query, this.expanded = filterDefinition.expanded, this.value = filterDefinition.value, this.field = filterDefinition.field, this.operator = filterDefinition.operator, this.preset = filterDefinition.preset, this.enable_create = filterDefinition.enable_create;
|
751
|
-
this.active = filterDefinition.selected;
|
752
|
-
childrenDefinition = filterDefinition.options || [];
|
753
|
-
this.children = _.map(childrenDefinition, function(definition, name) {
|
754
|
-
return new TreeFilter(filter, name, definition);
|
755
|
-
});
|
756
|
-
}
|
896
|
+
_classCallCheck(this, TreeFilter);
|
757
897
|
|
758
|
-
|
759
|
-
return this.children.length === 0;
|
760
|
-
};
|
898
|
+
var _this = _possibleConstructorReturn(this, (TreeFilter.__proto__ || Object.getPrototypeOf(TreeFilter)).call(this, filter, name, filterDefinition));
|
761
899
|
|
762
|
-
|
763
|
-
|
764
|
-
|
900
|
+
_this.type = 'tree';
|
901
|
+
_this.icon = filterDefinition.icon;
|
902
|
+
_this.query = filterDefinition.query;
|
903
|
+
_this.expanded = filterDefinition.expanded;
|
904
|
+
_this.value = filterDefinition.value;
|
905
|
+
_this.field = filterDefinition.field;
|
906
|
+
_this.operator = filterDefinition.operator;
|
907
|
+
_this.preset = filterDefinition.preset;
|
908
|
+
_this.enable_create = filterDefinition.enable_create;
|
765
909
|
|
766
|
-
TreeFilter.prototype.isActive = function() {
|
767
|
-
return !!this.active;
|
768
|
-
};
|
769
910
|
|
770
|
-
|
771
|
-
if (this.isActive()) {
|
772
|
-
this.active = false;
|
773
|
-
} else {
|
774
|
-
this.filter.deselectHierarchicalFilters();
|
775
|
-
this.active = true;
|
776
|
-
}
|
777
|
-
return this.filter.changed();
|
778
|
-
};
|
911
|
+
_this.active = filterDefinition.selected;
|
779
912
|
|
780
|
-
|
781
|
-
|
782
|
-
return
|
913
|
+
var childrenDefinition = filterDefinition.options || [];
|
914
|
+
_this.children = _.map(childrenDefinition, function (definition, title) {
|
915
|
+
return new TreeFilter(filter, title, definition);
|
783
916
|
});
|
784
|
-
|
917
|
+
return _this;
|
918
|
+
}
|
785
919
|
|
786
|
-
TreeFilter
|
787
|
-
|
788
|
-
|
789
|
-
return
|
790
|
-
}
|
791
|
-
}
|
920
|
+
_createClass(TreeFilter, [{
|
921
|
+
key: 'isLeaf',
|
922
|
+
value: function isLeaf() {
|
923
|
+
return this.children.length === 0;
|
924
|
+
}
|
925
|
+
}, {
|
926
|
+
key: 'isExpanded',
|
927
|
+
value: function isExpanded() {
|
928
|
+
return !!this.expanded;
|
929
|
+
}
|
930
|
+
}, {
|
931
|
+
key: 'isActive',
|
932
|
+
value: function isActive() {
|
933
|
+
return !!this.active;
|
934
|
+
}
|
935
|
+
}, {
|
936
|
+
key: 'toggleActive',
|
937
|
+
value: function toggleActive() {
|
938
|
+
if (this.isActive()) {
|
939
|
+
this.active = false;
|
940
|
+
} else {
|
941
|
+
this.filter.deselectHierarchicalFilters();
|
942
|
+
this.active = true;
|
943
|
+
}
|
792
944
|
|
793
|
-
|
945
|
+
this.filter.changed();
|
946
|
+
}
|
947
|
+
}, {
|
948
|
+
key: 'hasActiveChildren',
|
949
|
+
value: function hasActiveChildren() {
|
950
|
+
return this.isActive() || _.some(this.children, function (child) {
|
951
|
+
return child.isActive();
|
952
|
+
});
|
953
|
+
}
|
954
|
+
}, {
|
955
|
+
key: 'deselect',
|
956
|
+
value: function deselect() {
|
957
|
+
this.active = false;
|
794
958
|
|
795
|
-
|
959
|
+
_.each(this.children, function (filter) {
|
960
|
+
return filter.deselect();
|
961
|
+
});
|
962
|
+
}
|
963
|
+
}]);
|
796
964
|
|
797
|
-
|
965
|
+
return TreeFilter;
|
966
|
+
}(_filter_node2.default);
|
798
967
|
|
968
|
+
exports.default = TreeFilter;
|
799
969
|
|
800
970
|
/***/ },
|
801
971
|
/* 14 */
|
802
972
|
/***/ function(module, exports, __webpack_require__) {
|
803
973
|
|
804
|
-
|
805
|
-
|
806
|
-
|
974
|
+
'use strict';
|
975
|
+
|
976
|
+
Object.defineProperty(exports, "__esModule", {
|
977
|
+
value: true
|
978
|
+
});
|
979
|
+
|
980
|
+
var _checkbox_option = __webpack_require__(15);
|
981
|
+
|
982
|
+
var _checkbox_option2 = _interopRequireDefault(_checkbox_option);
|
983
|
+
|
984
|
+
var _filter_collection_node = __webpack_require__(10);
|
807
985
|
|
808
|
-
|
986
|
+
var _filter_collection_node2 = _interopRequireDefault(_filter_collection_node);
|
809
987
|
|
810
|
-
|
988
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
811
989
|
|
812
|
-
|
813
|
-
|
990
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
991
|
+
|
992
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
993
|
+
|
994
|
+
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; }
|
995
|
+
|
996
|
+
var CheckboxFilter = function (_FilterCollectionNode) {
|
997
|
+
_inherits(CheckboxFilter, _FilterCollectionNode);
|
814
998
|
|
815
999
|
function CheckboxFilter(filter, name, filterDefinition) {
|
816
|
-
|
817
|
-
this.type = 'checkbox';
|
818
|
-
this.children = _.map(filterDefinition.options, (function(_this) {
|
819
|
-
return function(definition, name) {
|
820
|
-
return new CheckboxOption(_this.filter, name, definition);
|
821
|
-
};
|
822
|
-
})(this));
|
823
|
-
}
|
1000
|
+
_classCallCheck(this, CheckboxFilter);
|
824
1001
|
|
825
|
-
|
1002
|
+
var _this = _possibleConstructorReturn(this, (CheckboxFilter.__proto__ || Object.getPrototypeOf(CheckboxFilter)).call(this, filter, name, filterDefinition));
|
826
1003
|
|
827
|
-
|
1004
|
+
_this.type = 'checkbox';
|
1005
|
+
_this.children = _.map(filterDefinition.options, function (definition, title) {
|
1006
|
+
return new _checkbox_option2.default(filter, title, definition);
|
1007
|
+
});
|
1008
|
+
return _this;
|
1009
|
+
}
|
828
1010
|
|
829
|
-
|
1011
|
+
return CheckboxFilter;
|
1012
|
+
}(_filter_collection_node2.default);
|
830
1013
|
|
1014
|
+
exports.default = CheckboxFilter;
|
831
1015
|
|
832
1016
|
/***/ },
|
833
1017
|
/* 15 */
|
834
1018
|
/***/ function(module, exports, __webpack_require__) {
|
835
1019
|
|
836
|
-
|
837
|
-
__hasProp = {}.hasOwnProperty,
|
838
|
-
__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; };
|
839
|
-
|
840
|
-
FilterNode = __webpack_require__(11);
|
841
|
-
|
842
|
-
CheckboxOption = (function(_super) {
|
843
|
-
__extends(CheckboxOption, _super);
|
1020
|
+
'use strict';
|
844
1021
|
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
this.active = filterDefinition.selected;
|
849
|
-
}
|
1022
|
+
Object.defineProperty(exports, "__esModule", {
|
1023
|
+
value: true
|
1024
|
+
});
|
850
1025
|
|
851
|
-
|
852
|
-
this.active = !this.active;
|
853
|
-
return this.filter.changed();
|
854
|
-
};
|
1026
|
+
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; }; }();
|
855
1027
|
|
856
|
-
|
857
|
-
return !!this.active;
|
858
|
-
};
|
1028
|
+
var _filter_node = __webpack_require__(11);
|
859
1029
|
|
860
|
-
|
1030
|
+
var _filter_node2 = _interopRequireDefault(_filter_node);
|
861
1031
|
|
862
|
-
|
1032
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
863
1033
|
|
864
|
-
|
1034
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
865
1035
|
|
1036
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
866
1037
|
|
867
|
-
|
868
|
-
/* 16 */
|
869
|
-
/***/ function(module, exports) {
|
1038
|
+
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; }
|
870
1039
|
|
871
|
-
var
|
1040
|
+
var CheckboxOption = function (_FilterNode) {
|
1041
|
+
_inherits(CheckboxOption, _FilterNode);
|
872
1042
|
|
873
|
-
|
1043
|
+
function CheckboxOption(filter, name, filterDefinition) {
|
1044
|
+
_classCallCheck(this, CheckboxOption);
|
874
1045
|
|
875
|
-
|
1046
|
+
var _this = _possibleConstructorReturn(this, (CheckboxOption.__proto__ || Object.getPrototypeOf(CheckboxOption)).call(this, filter, name, filterDefinition));
|
876
1047
|
|
877
|
-
|
1048
|
+
_this.value = filterDefinition.value;
|
1049
|
+
_this.preset = filterDefinition.preset;
|
1050
|
+
_this.enable_create = filterDefinition.enable_create;
|
878
1051
|
|
879
|
-
_changeSortOrder = (function(_this) {
|
880
|
-
return function(criteriaType, sortDirection) {
|
881
|
-
return {
|
882
|
-
type: CHANGE_SORT_ORDER,
|
883
|
-
criteriaType: criteriaType,
|
884
|
-
sortDirection: sortDirection
|
885
|
-
};
|
886
|
-
};
|
887
|
-
})(this);
|
888
1052
|
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
};
|
893
|
-
})(this);
|
1053
|
+
_this.active = filterDefinition.selected;
|
1054
|
+
return _this;
|
1055
|
+
}
|
894
1056
|
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
1057
|
+
_createClass(CheckboxOption, [{
|
1058
|
+
key: 'toggleActive',
|
1059
|
+
value: function toggleActive() {
|
1060
|
+
this.active = !this.active;
|
1061
|
+
return this.filter.changed();
|
1062
|
+
}
|
1063
|
+
}, {
|
1064
|
+
key: 'isActive',
|
1065
|
+
value: function isActive() {
|
1066
|
+
return !!this.active;
|
1067
|
+
}
|
1068
|
+
}]);
|
900
1069
|
|
901
|
-
|
902
|
-
|
903
|
-
ASC_SORT_ORDER: ASC_SORT_ORDER,
|
904
|
-
DESC_SORT_ORDER: DESC_SORT_ORDER,
|
905
|
-
sortInDescOrder: sortInDescOrder,
|
906
|
-
sortInAscOrder: sortInAscOrder
|
907
|
-
};
|
1070
|
+
return CheckboxOption;
|
1071
|
+
}(_filter_node2.default);
|
908
1072
|
|
1073
|
+
exports.default = CheckboxOption;
|
909
1074
|
|
910
1075
|
/***/ },
|
911
|
-
/*
|
1076
|
+
/* 16 */
|
912
1077
|
/***/ function(module, exports) {
|
913
1078
|
|
914
|
-
|
1079
|
+
'use strict';
|
915
1080
|
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
1081
|
+
Object.defineProperty(exports, "__esModule", {
|
1082
|
+
value: true
|
1083
|
+
});
|
1084
|
+
exports.default = defaultFilterDefinition;
|
1085
|
+
function defaultFilterDefinition(context) {
|
1086
|
+
var options = void 0;
|
1087
|
+
if (context._image) {
|
1088
|
+
options = {
|
1089
|
+
Images: {
|
1090
|
+
icon: 'image',
|
1091
|
+
selected: true,
|
1092
|
+
query: scrivito.obj_where('_obj_class', 'equals', 'Image'),
|
1093
|
+
preset: {
|
1094
|
+
_obj_class: 'Image'
|
927
1095
|
}
|
928
|
-
}
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
1096
|
+
}
|
1097
|
+
};
|
1098
|
+
} else {
|
1099
|
+
options = {
|
1100
|
+
All: {
|
1101
|
+
icon: 'generic',
|
1102
|
+
selected: true,
|
1103
|
+
query: scrivito.obj_where('_last_changed', 'is_greater_than', new Date(0))
|
1104
|
+
},
|
1105
|
+
Images: {
|
1106
|
+
icon: 'image',
|
1107
|
+
query: scrivito.obj_where('_obj_class', 'equals', 'Image'),
|
1108
|
+
preset: {
|
1109
|
+
_obj_class: 'Image'
|
1110
|
+
}
|
1111
|
+
},
|
1112
|
+
Downloads: {
|
1113
|
+
query: scrivito.obj_where('_obj_class', 'equals', 'Download'),
|
1114
|
+
icon: 'zip',
|
1115
|
+
preset: {
|
1116
|
+
_obj_class: 'Download'
|
947
1117
|
}
|
948
1118
|
}
|
1119
|
+
};
|
1120
|
+
}
|
1121
|
+
return {
|
1122
|
+
_obj_class: {
|
1123
|
+
options: options
|
949
1124
|
},
|
950
1125
|
_last_changed: {
|
951
1126
|
title: 'Changed',
|
@@ -954,45 +1129,42 @@
|
|
954
1129
|
field: '_modification',
|
955
1130
|
operator: 'equals',
|
956
1131
|
options: {
|
957
|
-
|
958
|
-
value: [
|
1132
|
+
New: {
|
1133
|
+
value: ['new']
|
959
1134
|
},
|
960
|
-
|
961
|
-
value: [
|
1135
|
+
Edited: {
|
1136
|
+
value: ['edited']
|
962
1137
|
}
|
963
1138
|
}
|
964
1139
|
}
|
965
1140
|
};
|
966
|
-
}
|
967
|
-
|
968
|
-
module.exports = defaultFilterDefinition;
|
969
|
-
|
1141
|
+
}
|
970
1142
|
|
971
1143
|
/***/ },
|
972
|
-
/*
|
1144
|
+
/* 17 */
|
973
1145
|
/***/ function(module, exports, __webpack_require__) {
|
974
1146
|
|
975
1147
|
var App, AppContainer, Filter, Footer, InspectorComponent, Items, LAST_ADDED, ReactRedux, TopBar, changeSelectionMode, createObj, deselectObjs, disableTags, fetchTags, objDeleted, redux, setObjSource, toggleSelect, _ref, _ref1, _ref2, _ref3;
|
976
1148
|
|
977
|
-
TopBar = __webpack_require__(
|
1149
|
+
TopBar = __webpack_require__(18);
|
978
1150
|
|
979
1151
|
Filter = __webpack_require__(61);
|
980
1152
|
|
981
1153
|
Items = __webpack_require__(74);
|
982
1154
|
|
983
|
-
InspectorComponent = __webpack_require__(108);
|
1155
|
+
InspectorComponent = __webpack_require__(108)["default"];
|
984
1156
|
|
985
1157
|
Footer = __webpack_require__(113);
|
986
1158
|
|
987
|
-
ReactRedux = __webpack_require__(
|
1159
|
+
ReactRedux = __webpack_require__(24);
|
988
1160
|
|
989
|
-
redux = __webpack_require__(
|
1161
|
+
redux = __webpack_require__(33);
|
990
1162
|
|
991
1163
|
_ref = __webpack_require__(72), setObjSource = _ref.setObjSource, LAST_ADDED = _ref.LAST_ADDED;
|
992
1164
|
|
993
1165
|
_ref1 = __webpack_require__(112), createObj = _ref1.createObj, objDeleted = _ref1.objDeleted;
|
994
1166
|
|
995
|
-
_ref2 = __webpack_require__(
|
1167
|
+
_ref2 = __webpack_require__(105), fetchTags = _ref2.fetchTags, disableTags = _ref2.disableTags;
|
996
1168
|
|
997
1169
|
_ref3 = __webpack_require__(60), toggleSelect = _ref3.toggleSelect, changeSelectionMode = _ref3.changeSelectionMode, deselectObjs = _ref3.deselectObjs;
|
998
1170
|
|
@@ -1108,24 +1280,27 @@
|
|
1108
1280
|
};
|
1109
1281
|
})(this))(App);
|
1110
1282
|
|
1111
|
-
module.exports =
|
1283
|
+
module.exports = {
|
1284
|
+
App: App,
|
1285
|
+
AppContainer: AppContainer
|
1286
|
+
};
|
1112
1287
|
|
1113
1288
|
|
1114
1289
|
/***/ },
|
1115
|
-
/*
|
1290
|
+
/* 18 */
|
1116
1291
|
/***/ function(module, exports, __webpack_require__) {
|
1117
1292
|
|
1118
1293
|
var SearchBar, SelectionModeToggle, SortMenu, TopBar, ViewModeBar, connect, mapStateToProps;
|
1119
1294
|
|
1120
|
-
ViewModeBar = __webpack_require__(
|
1295
|
+
ViewModeBar = __webpack_require__(19);
|
1121
1296
|
|
1122
|
-
SortMenu = __webpack_require__(
|
1297
|
+
SortMenu = __webpack_require__(22);
|
1123
1298
|
|
1124
1299
|
SearchBar = __webpack_require__(56);
|
1125
1300
|
|
1126
1301
|
SelectionModeToggle = __webpack_require__(59);
|
1127
1302
|
|
1128
|
-
connect = __webpack_require__(
|
1303
|
+
connect = __webpack_require__(24).connect;
|
1129
1304
|
|
1130
1305
|
TopBar = React.createClass({
|
1131
1306
|
displayName: 'TopBar',
|
@@ -1159,14 +1334,14 @@
|
|
1159
1334
|
|
1160
1335
|
|
1161
1336
|
/***/ },
|
1162
|
-
/*
|
1337
|
+
/* 19 */
|
1163
1338
|
/***/ function(module, exports, __webpack_require__) {
|
1164
1339
|
|
1165
1340
|
var TABLE_VIEW, THUMBNAIL_VIEW, ViewModeBar, ViewModeBarItem, setViewMode, _ref;
|
1166
1341
|
|
1167
|
-
ViewModeBarItem = __webpack_require__(
|
1342
|
+
ViewModeBarItem = __webpack_require__(20);
|
1168
1343
|
|
1169
|
-
_ref = __webpack_require__(
|
1344
|
+
_ref = __webpack_require__(21), THUMBNAIL_VIEW = _ref.THUMBNAIL_VIEW, TABLE_VIEW = _ref.TABLE_VIEW, setViewMode = _ref.setViewMode;
|
1170
1345
|
|
1171
1346
|
ViewModeBar = React.createClass({
|
1172
1347
|
displayName: 'ViewModeBar',
|
@@ -1198,7 +1373,7 @@
|
|
1198
1373
|
|
1199
1374
|
|
1200
1375
|
/***/ },
|
1201
|
-
/*
|
1376
|
+
/* 20 */
|
1202
1377
|
/***/ function(module, exports) {
|
1203
1378
|
|
1204
1379
|
var ViewModeBarItem;
|
@@ -1248,7 +1423,7 @@
|
|
1248
1423
|
|
1249
1424
|
|
1250
1425
|
/***/ },
|
1251
|
-
/*
|
1426
|
+
/* 21 */
|
1252
1427
|
/***/ function(module, exports) {
|
1253
1428
|
|
1254
1429
|
'use strict';
|
@@ -1266,16 +1441,16 @@
|
|
1266
1441
|
}
|
1267
1442
|
|
1268
1443
|
/***/ },
|
1269
|
-
/*
|
1444
|
+
/* 22 */
|
1270
1445
|
/***/ function(module, exports, __webpack_require__) {
|
1271
1446
|
|
1272
1447
|
var ASC_SORT_ORDER, DESC_SORT_ORDER, ReactRedux, SortMenu, SortMenuItem, sortInAscOrder, sortInDescOrder, _ref;
|
1273
1448
|
|
1274
|
-
SortMenuItem = __webpack_require__(
|
1449
|
+
SortMenuItem = __webpack_require__(23);
|
1275
1450
|
|
1276
|
-
ReactRedux = __webpack_require__(
|
1451
|
+
ReactRedux = __webpack_require__(24);
|
1277
1452
|
|
1278
|
-
_ref = __webpack_require__(
|
1453
|
+
_ref = __webpack_require__(55), sortInAscOrder = _ref.sortInAscOrder, sortInDescOrder = _ref.sortInDescOrder, DESC_SORT_ORDER = _ref.DESC_SORT_ORDER, ASC_SORT_ORDER = _ref.ASC_SORT_ORDER;
|
1279
1454
|
|
1280
1455
|
SortMenu = React.createClass({
|
1281
1456
|
displayName: 'SortMenu',
|
@@ -1373,7 +1548,7 @@
|
|
1373
1548
|
|
1374
1549
|
|
1375
1550
|
/***/ },
|
1376
|
-
/*
|
1551
|
+
/* 23 */
|
1377
1552
|
/***/ function(module, exports) {
|
1378
1553
|
|
1379
1554
|
var SortMenuItem;
|
@@ -1431,7 +1606,7 @@
|
|
1431
1606
|
|
1432
1607
|
|
1433
1608
|
/***/ },
|
1434
|
-
/*
|
1609
|
+
/* 24 */
|
1435
1610
|
/***/ function(module, exports, __webpack_require__) {
|
1436
1611
|
|
1437
1612
|
'use strict';
|
@@ -1440,11 +1615,11 @@
|
|
1440
1615
|
|
1441
1616
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
1442
1617
|
|
1443
|
-
var _react = __webpack_require__(
|
1618
|
+
var _react = __webpack_require__(25);
|
1444
1619
|
|
1445
1620
|
var _react2 = _interopRequireDefault(_react);
|
1446
1621
|
|
1447
|
-
var _componentsCreateAll = __webpack_require__(
|
1622
|
+
var _componentsCreateAll = __webpack_require__(26);
|
1448
1623
|
|
1449
1624
|
var _componentsCreateAll2 = _interopRequireDefault(_componentsCreateAll);
|
1450
1625
|
|
@@ -1456,13 +1631,13 @@
|
|
1456
1631
|
exports.connect = connect;
|
1457
1632
|
|
1458
1633
|
/***/ },
|
1459
|
-
/*
|
1634
|
+
/* 25 */
|
1460
1635
|
/***/ function(module, exports) {
|
1461
1636
|
|
1462
1637
|
module.exports = React;
|
1463
1638
|
|
1464
1639
|
/***/ },
|
1465
|
-
/*
|
1640
|
+
/* 26 */
|
1466
1641
|
/***/ function(module, exports, __webpack_require__) {
|
1467
1642
|
|
1468
1643
|
'use strict';
|
@@ -1472,11 +1647,11 @@
|
|
1472
1647
|
|
1473
1648
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
1474
1649
|
|
1475
|
-
var _createProvider = __webpack_require__(
|
1650
|
+
var _createProvider = __webpack_require__(27);
|
1476
1651
|
|
1477
1652
|
var _createProvider2 = _interopRequireDefault(_createProvider);
|
1478
1653
|
|
1479
|
-
var _createConnect = __webpack_require__(
|
1654
|
+
var _createConnect = __webpack_require__(29);
|
1480
1655
|
|
1481
1656
|
var _createConnect2 = _interopRequireDefault(_createConnect);
|
1482
1657
|
|
@@ -1490,7 +1665,7 @@
|
|
1490
1665
|
module.exports = exports['default'];
|
1491
1666
|
|
1492
1667
|
/***/ },
|
1493
|
-
/*
|
1668
|
+
/* 27 */
|
1494
1669
|
/***/ function(module, exports, __webpack_require__) {
|
1495
1670
|
|
1496
1671
|
'use strict';
|
@@ -1507,7 +1682,7 @@
|
|
1507
1682
|
|
1508
1683
|
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; }
|
1509
1684
|
|
1510
|
-
var _utilsCreateStoreShape = __webpack_require__(
|
1685
|
+
var _utilsCreateStoreShape = __webpack_require__(28);
|
1511
1686
|
|
1512
1687
|
var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
|
1513
1688
|
|
@@ -1622,7 +1797,7 @@
|
|
1622
1797
|
module.exports = exports['default'];
|
1623
1798
|
|
1624
1799
|
/***/ },
|
1625
|
-
/*
|
1800
|
+
/* 28 */
|
1626
1801
|
/***/ function(module, exports) {
|
1627
1802
|
|
1628
1803
|
"use strict";
|
@@ -1641,7 +1816,7 @@
|
|
1641
1816
|
module.exports = exports["default"];
|
1642
1817
|
|
1643
1818
|
/***/ },
|
1644
|
-
/*
|
1819
|
+
/* 29 */
|
1645
1820
|
/***/ function(module, exports, __webpack_require__) {
|
1646
1821
|
|
1647
1822
|
'use strict';
|
@@ -1660,23 +1835,23 @@
|
|
1660
1835
|
|
1661
1836
|
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; }
|
1662
1837
|
|
1663
|
-
var _utilsCreateStoreShape = __webpack_require__(
|
1838
|
+
var _utilsCreateStoreShape = __webpack_require__(28);
|
1664
1839
|
|
1665
1840
|
var _utilsCreateStoreShape2 = _interopRequireDefault(_utilsCreateStoreShape);
|
1666
1841
|
|
1667
|
-
var _utilsShallowEqual = __webpack_require__(
|
1842
|
+
var _utilsShallowEqual = __webpack_require__(30);
|
1668
1843
|
|
1669
1844
|
var _utilsShallowEqual2 = _interopRequireDefault(_utilsShallowEqual);
|
1670
1845
|
|
1671
|
-
var _utilsIsPlainObject = __webpack_require__(
|
1846
|
+
var _utilsIsPlainObject = __webpack_require__(31);
|
1672
1847
|
|
1673
1848
|
var _utilsIsPlainObject2 = _interopRequireDefault(_utilsIsPlainObject);
|
1674
1849
|
|
1675
|
-
var _utilsWrapActionCreators = __webpack_require__(
|
1850
|
+
var _utilsWrapActionCreators = __webpack_require__(32);
|
1676
1851
|
|
1677
1852
|
var _utilsWrapActionCreators2 = _interopRequireDefault(_utilsWrapActionCreators);
|
1678
1853
|
|
1679
|
-
var _invariant = __webpack_require__(
|
1854
|
+
var _invariant = __webpack_require__(54);
|
1680
1855
|
|
1681
1856
|
var _invariant2 = _interopRequireDefault(_invariant);
|
1682
1857
|
|
@@ -1915,7 +2090,7 @@
|
|
1915
2090
|
module.exports = exports['default'];
|
1916
2091
|
|
1917
2092
|
/***/ },
|
1918
|
-
/*
|
2093
|
+
/* 30 */
|
1919
2094
|
/***/ function(module, exports) {
|
1920
2095
|
|
1921
2096
|
"use strict";
|
@@ -1949,7 +2124,7 @@
|
|
1949
2124
|
module.exports = exports["default"];
|
1950
2125
|
|
1951
2126
|
/***/ },
|
1952
|
-
/*
|
2127
|
+
/* 31 */
|
1953
2128
|
/***/ function(module, exports) {
|
1954
2129
|
|
1955
2130
|
'use strict';
|
@@ -1984,7 +2159,7 @@
|
|
1984
2159
|
module.exports = exports['default'];
|
1985
2160
|
|
1986
2161
|
/***/ },
|
1987
|
-
/*
|
2162
|
+
/* 32 */
|
1988
2163
|
/***/ function(module, exports, __webpack_require__) {
|
1989
2164
|
|
1990
2165
|
'use strict';
|
@@ -1992,7 +2167,7 @@
|
|
1992
2167
|
exports.__esModule = true;
|
1993
2168
|
exports['default'] = wrapActionCreators;
|
1994
2169
|
|
1995
|
-
var _redux = __webpack_require__(
|
2170
|
+
var _redux = __webpack_require__(33);
|
1996
2171
|
|
1997
2172
|
function wrapActionCreators(actionCreators) {
|
1998
2173
|
return function (dispatch) {
|
@@ -2003,7 +2178,7 @@
|
|
2003
2178
|
module.exports = exports['default'];
|
2004
2179
|
|
2005
2180
|
/***/ },
|
2006
|
-
/*
|
2181
|
+
/* 33 */
|
2007
2182
|
/***/ function(module, exports, __webpack_require__) {
|
2008
2183
|
|
2009
2184
|
'use strict';
|
@@ -2011,27 +2186,27 @@
|
|
2011
2186
|
exports.__esModule = true;
|
2012
2187
|
exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
|
2013
2188
|
|
2014
|
-
var _createStore = __webpack_require__(
|
2189
|
+
var _createStore = __webpack_require__(34);
|
2015
2190
|
|
2016
2191
|
var _createStore2 = _interopRequireDefault(_createStore);
|
2017
2192
|
|
2018
|
-
var _combineReducers = __webpack_require__(
|
2193
|
+
var _combineReducers = __webpack_require__(49);
|
2019
2194
|
|
2020
2195
|
var _combineReducers2 = _interopRequireDefault(_combineReducers);
|
2021
2196
|
|
2022
|
-
var _bindActionCreators = __webpack_require__(
|
2197
|
+
var _bindActionCreators = __webpack_require__(51);
|
2023
2198
|
|
2024
2199
|
var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
|
2025
2200
|
|
2026
|
-
var _applyMiddleware = __webpack_require__(
|
2201
|
+
var _applyMiddleware = __webpack_require__(52);
|
2027
2202
|
|
2028
2203
|
var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
|
2029
2204
|
|
2030
|
-
var _compose = __webpack_require__(
|
2205
|
+
var _compose = __webpack_require__(53);
|
2031
2206
|
|
2032
2207
|
var _compose2 = _interopRequireDefault(_compose);
|
2033
2208
|
|
2034
|
-
var _warning = __webpack_require__(
|
2209
|
+
var _warning = __webpack_require__(50);
|
2035
2210
|
|
2036
2211
|
var _warning2 = _interopRequireDefault(_warning);
|
2037
2212
|
|
@@ -2054,7 +2229,7 @@
|
|
2054
2229
|
exports.compose = _compose2['default'];
|
2055
2230
|
|
2056
2231
|
/***/ },
|
2057
|
-
/*
|
2232
|
+
/* 34 */
|
2058
2233
|
/***/ function(module, exports, __webpack_require__) {
|
2059
2234
|
|
2060
2235
|
'use strict';
|
@@ -2063,11 +2238,11 @@
|
|
2063
2238
|
exports.ActionTypes = undefined;
|
2064
2239
|
exports['default'] = createStore;
|
2065
2240
|
|
2066
|
-
var _isPlainObject = __webpack_require__(
|
2241
|
+
var _isPlainObject = __webpack_require__(35);
|
2067
2242
|
|
2068
2243
|
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
2069
2244
|
|
2070
|
-
var _symbolObservable = __webpack_require__(
|
2245
|
+
var _symbolObservable = __webpack_require__(45);
|
2071
2246
|
|
2072
2247
|
var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
|
2073
2248
|
|
@@ -2320,12 +2495,12 @@
|
|
2320
2495
|
}
|
2321
2496
|
|
2322
2497
|
/***/ },
|
2323
|
-
/*
|
2498
|
+
/* 35 */
|
2324
2499
|
/***/ function(module, exports, __webpack_require__) {
|
2325
2500
|
|
2326
|
-
var baseGetTag = __webpack_require__(
|
2327
|
-
getPrototype = __webpack_require__(
|
2328
|
-
isObjectLike = __webpack_require__(
|
2501
|
+
var baseGetTag = __webpack_require__(36),
|
2502
|
+
getPrototype = __webpack_require__(42),
|
2503
|
+
isObjectLike = __webpack_require__(44);
|
2329
2504
|
|
2330
2505
|
/** `Object#toString` result references. */
|
2331
2506
|
var objectTag = '[object Object]';
|
@@ -2388,12 +2563,12 @@
|
|
2388
2563
|
|
2389
2564
|
|
2390
2565
|
/***/ },
|
2391
|
-
/*
|
2566
|
+
/* 36 */
|
2392
2567
|
/***/ function(module, exports, __webpack_require__) {
|
2393
2568
|
|
2394
|
-
var Symbol = __webpack_require__(
|
2395
|
-
getRawTag = __webpack_require__(
|
2396
|
-
objectToString = __webpack_require__(
|
2569
|
+
var Symbol = __webpack_require__(37),
|
2570
|
+
getRawTag = __webpack_require__(40),
|
2571
|
+
objectToString = __webpack_require__(41);
|
2397
2572
|
|
2398
2573
|
/** `Object#toString` result references. */
|
2399
2574
|
var nullTag = '[object Null]',
|
@@ -2422,10 +2597,10 @@
|
|
2422
2597
|
|
2423
2598
|
|
2424
2599
|
/***/ },
|
2425
|
-
/*
|
2600
|
+
/* 37 */
|
2426
2601
|
/***/ function(module, exports, __webpack_require__) {
|
2427
2602
|
|
2428
|
-
var root = __webpack_require__(
|
2603
|
+
var root = __webpack_require__(38);
|
2429
2604
|
|
2430
2605
|
/** Built-in value references. */
|
2431
2606
|
var Symbol = root.Symbol;
|
@@ -2434,10 +2609,10 @@
|
|
2434
2609
|
|
2435
2610
|
|
2436
2611
|
/***/ },
|
2437
|
-
/*
|
2612
|
+
/* 38 */
|
2438
2613
|
/***/ function(module, exports, __webpack_require__) {
|
2439
2614
|
|
2440
|
-
var freeGlobal = __webpack_require__(
|
2615
|
+
var freeGlobal = __webpack_require__(39);
|
2441
2616
|
|
2442
2617
|
/** Detect free variable `self`. */
|
2443
2618
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
@@ -2449,7 +2624,7 @@
|
|
2449
2624
|
|
2450
2625
|
|
2451
2626
|
/***/ },
|
2452
|
-
/*
|
2627
|
+
/* 39 */
|
2453
2628
|
/***/ function(module, exports) {
|
2454
2629
|
|
2455
2630
|
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
|
@@ -2460,10 +2635,10 @@
|
|
2460
2635
|
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
2461
2636
|
|
2462
2637
|
/***/ },
|
2463
|
-
/*
|
2638
|
+
/* 40 */
|
2464
2639
|
/***/ function(module, exports, __webpack_require__) {
|
2465
2640
|
|
2466
|
-
var Symbol = __webpack_require__(
|
2641
|
+
var Symbol = __webpack_require__(37);
|
2467
2642
|
|
2468
2643
|
/** Used for built-in method references. */
|
2469
2644
|
var objectProto = Object.prototype;
|
@@ -2512,7 +2687,7 @@
|
|
2512
2687
|
|
2513
2688
|
|
2514
2689
|
/***/ },
|
2515
|
-
/*
|
2690
|
+
/* 41 */
|
2516
2691
|
/***/ function(module, exports) {
|
2517
2692
|
|
2518
2693
|
/** Used for built-in method references. */
|
@@ -2540,10 +2715,10 @@
|
|
2540
2715
|
|
2541
2716
|
|
2542
2717
|
/***/ },
|
2543
|
-
/*
|
2718
|
+
/* 42 */
|
2544
2719
|
/***/ function(module, exports, __webpack_require__) {
|
2545
2720
|
|
2546
|
-
var overArg = __webpack_require__(
|
2721
|
+
var overArg = __webpack_require__(43);
|
2547
2722
|
|
2548
2723
|
/** Built-in value references. */
|
2549
2724
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
@@ -2552,7 +2727,7 @@
|
|
2552
2727
|
|
2553
2728
|
|
2554
2729
|
/***/ },
|
2555
|
-
/*
|
2730
|
+
/* 43 */
|
2556
2731
|
/***/ function(module, exports) {
|
2557
2732
|
|
2558
2733
|
/**
|
@@ -2573,7 +2748,7 @@
|
|
2573
2748
|
|
2574
2749
|
|
2575
2750
|
/***/ },
|
2576
|
-
/*
|
2751
|
+
/* 44 */
|
2577
2752
|
/***/ function(module, exports) {
|
2578
2753
|
|
2579
2754
|
/**
|
@@ -2608,14 +2783,14 @@
|
|
2608
2783
|
|
2609
2784
|
|
2610
2785
|
/***/ },
|
2611
|
-
/*
|
2786
|
+
/* 45 */
|
2612
2787
|
/***/ function(module, exports, __webpack_require__) {
|
2613
2788
|
|
2614
|
-
module.exports = __webpack_require__(
|
2789
|
+
module.exports = __webpack_require__(46);
|
2615
2790
|
|
2616
2791
|
|
2617
2792
|
/***/ },
|
2618
|
-
/*
|
2793
|
+
/* 46 */
|
2619
2794
|
/***/ function(module, exports, __webpack_require__) {
|
2620
2795
|
|
2621
2796
|
/* WEBPACK VAR INJECTION */(function(global, module) {'use strict';
|
@@ -2624,7 +2799,7 @@
|
|
2624
2799
|
value: true
|
2625
2800
|
});
|
2626
2801
|
|
2627
|
-
var _ponyfill = __webpack_require__(
|
2802
|
+
var _ponyfill = __webpack_require__(48);
|
2628
2803
|
|
2629
2804
|
var _ponyfill2 = _interopRequireDefault(_ponyfill);
|
2630
2805
|
|
@@ -2647,10 +2822,10 @@
|
|
2647
2822
|
|
2648
2823
|
var result = (0, _ponyfill2['default'])(root);
|
2649
2824
|
exports['default'] = result;
|
2650
|
-
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(
|
2825
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(47)(module)))
|
2651
2826
|
|
2652
2827
|
/***/ },
|
2653
|
-
/*
|
2828
|
+
/* 47 */
|
2654
2829
|
/***/ function(module, exports) {
|
2655
2830
|
|
2656
2831
|
module.exports = function(module) {
|
@@ -2666,7 +2841,7 @@
|
|
2666
2841
|
|
2667
2842
|
|
2668
2843
|
/***/ },
|
2669
|
-
/*
|
2844
|
+
/* 48 */
|
2670
2845
|
/***/ function(module, exports) {
|
2671
2846
|
|
2672
2847
|
'use strict';
|
@@ -2694,7 +2869,7 @@
|
|
2694
2869
|
};
|
2695
2870
|
|
2696
2871
|
/***/ },
|
2697
|
-
/*
|
2872
|
+
/* 49 */
|
2698
2873
|
/***/ function(module, exports, __webpack_require__) {
|
2699
2874
|
|
2700
2875
|
'use strict';
|
@@ -2702,13 +2877,13 @@
|
|
2702
2877
|
exports.__esModule = true;
|
2703
2878
|
exports['default'] = combineReducers;
|
2704
2879
|
|
2705
|
-
var _createStore = __webpack_require__(
|
2880
|
+
var _createStore = __webpack_require__(34);
|
2706
2881
|
|
2707
|
-
var _isPlainObject = __webpack_require__(
|
2882
|
+
var _isPlainObject = __webpack_require__(35);
|
2708
2883
|
|
2709
2884
|
var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
|
2710
2885
|
|
2711
|
-
var _warning = __webpack_require__(
|
2886
|
+
var _warning = __webpack_require__(50);
|
2712
2887
|
|
2713
2888
|
var _warning2 = _interopRequireDefault(_warning);
|
2714
2889
|
|
@@ -2841,7 +3016,7 @@
|
|
2841
3016
|
}
|
2842
3017
|
|
2843
3018
|
/***/ },
|
2844
|
-
/*
|
3019
|
+
/* 50 */
|
2845
3020
|
/***/ function(module, exports) {
|
2846
3021
|
|
2847
3022
|
'use strict';
|
@@ -2871,7 +3046,7 @@
|
|
2871
3046
|
}
|
2872
3047
|
|
2873
3048
|
/***/ },
|
2874
|
-
/*
|
3049
|
+
/* 51 */
|
2875
3050
|
/***/ function(module, exports) {
|
2876
3051
|
|
2877
3052
|
'use strict';
|
@@ -2927,7 +3102,7 @@
|
|
2927
3102
|
}
|
2928
3103
|
|
2929
3104
|
/***/ },
|
2930
|
-
/*
|
3105
|
+
/* 52 */
|
2931
3106
|
/***/ function(module, exports, __webpack_require__) {
|
2932
3107
|
|
2933
3108
|
'use strict';
|
@@ -2938,7 +3113,7 @@
|
|
2938
3113
|
|
2939
3114
|
exports['default'] = applyMiddleware;
|
2940
3115
|
|
2941
|
-
var _compose = __webpack_require__(
|
3116
|
+
var _compose = __webpack_require__(53);
|
2942
3117
|
|
2943
3118
|
var _compose2 = _interopRequireDefault(_compose);
|
2944
3119
|
|
@@ -2990,7 +3165,7 @@
|
|
2990
3165
|
}
|
2991
3166
|
|
2992
3167
|
/***/ },
|
2993
|
-
/*
|
3168
|
+
/* 53 */
|
2994
3169
|
/***/ function(module, exports) {
|
2995
3170
|
|
2996
3171
|
"use strict";
|
@@ -3033,7 +3208,7 @@
|
|
3033
3208
|
}
|
3034
3209
|
|
3035
3210
|
/***/ },
|
3036
|
-
/*
|
3211
|
+
/* 54 */
|
3037
3212
|
/***/ function(module, exports, __webpack_require__) {
|
3038
3213
|
|
3039
3214
|
/**
|
@@ -3089,13 +3264,40 @@
|
|
3089
3264
|
module.exports = invariant;
|
3090
3265
|
|
3091
3266
|
|
3267
|
+
/***/ },
|
3268
|
+
/* 55 */
|
3269
|
+
/***/ function(module, exports) {
|
3270
|
+
|
3271
|
+
'use strict';
|
3272
|
+
|
3273
|
+
Object.defineProperty(exports, "__esModule", {
|
3274
|
+
value: true
|
3275
|
+
});
|
3276
|
+
exports.sortInAscOrder = sortInAscOrder;
|
3277
|
+
exports.sortInDescOrder = sortInDescOrder;
|
3278
|
+
var CHANGE_SORT_ORDER = exports.CHANGE_SORT_ORDER = 'CHANGE_SORT_ORDER';
|
3279
|
+
var ASC_SORT_ORDER = exports.ASC_SORT_ORDER = 'asc';
|
3280
|
+
var DESC_SORT_ORDER = exports.DESC_SORT_ORDER = 'desc';
|
3281
|
+
|
3282
|
+
function changeSortOrder(criteriaType, sortDirection) {
|
3283
|
+
return { type: CHANGE_SORT_ORDER, criteriaType: criteriaType, sortDirection: sortDirection };
|
3284
|
+
}
|
3285
|
+
|
3286
|
+
function sortInAscOrder(criteriaType) {
|
3287
|
+
return changeSortOrder(criteriaType, ASC_SORT_ORDER);
|
3288
|
+
}
|
3289
|
+
|
3290
|
+
function sortInDescOrder(criteriaType) {
|
3291
|
+
return changeSortOrder(criteriaType, DESC_SORT_ORDER);
|
3292
|
+
}
|
3293
|
+
|
3092
3294
|
/***/ },
|
3093
3295
|
/* 56 */
|
3094
3296
|
/***/ function(module, exports, __webpack_require__) {
|
3095
3297
|
|
3096
3298
|
var ActiveNodeConfigCollector, SearchBar;
|
3097
3299
|
|
3098
|
-
ActiveNodeConfigCollector = __webpack_require__(57);
|
3300
|
+
ActiveNodeConfigCollector = __webpack_require__(57)["default"];
|
3099
3301
|
|
3100
3302
|
SearchBar = React.createClass({
|
3101
3303
|
displayName: 'SearchBar',
|
@@ -3185,172 +3387,205 @@
|
|
3185
3387
|
/* 57 */
|
3186
3388
|
/***/ function(module, exports, __webpack_require__) {
|
3187
3389
|
|
3188
|
-
|
3390
|
+
'use strict';
|
3391
|
+
|
3392
|
+
Object.defineProperty(exports, "__esModule", {
|
3393
|
+
value: true
|
3394
|
+
});
|
3395
|
+
|
3396
|
+
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; }; }();
|
3397
|
+
|
3398
|
+
var _active_node_config = __webpack_require__(58);
|
3399
|
+
|
3400
|
+
var _active_node_config2 = _interopRequireDefault(_active_node_config);
|
3189
3401
|
|
3190
|
-
|
3402
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3191
3403
|
|
3192
|
-
|
3404
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
3405
|
+
|
3406
|
+
var ActiveNodeConfigCollector = function () {
|
3193
3407
|
function ActiveNodeConfigCollector(filter) {
|
3194
|
-
this
|
3408
|
+
_classCallCheck(this, ActiveNodeConfigCollector);
|
3409
|
+
|
3410
|
+
this.filter = filter;
|
3195
3411
|
}
|
3196
3412
|
|
3197
|
-
ActiveNodeConfigCollector
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
filterItems.unshift(treeFilterItem);
|
3203
|
-
}
|
3204
|
-
return filterItems;
|
3205
|
-
};
|
3413
|
+
_createClass(ActiveNodeConfigCollector, [{
|
3414
|
+
key: 'findActiveFilterItems',
|
3415
|
+
value: function findActiveFilterItems() {
|
3416
|
+
var filterItems = this.findActiveAdditionalFilters();
|
3417
|
+
var treeFilterItem = this.findActiveTreeFilterItem();
|
3206
3418
|
|
3207
|
-
|
3208
|
-
|
3209
|
-
_ref = this._filter.getTreeFilters();
|
3210
|
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
3211
|
-
treeFilter = _ref[_i];
|
3212
|
-
_ref1 = treeFilter.subFilters;
|
3213
|
-
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
|
3214
|
-
subFilter = _ref1[_j];
|
3215
|
-
activeConfig = this._findActiveSubFilterItem(subFilter);
|
3216
|
-
if (activeConfig) {
|
3217
|
-
activeConfig.parents.push(treeFilter.config);
|
3218
|
-
return new ActiveNodeConfig(activeConfig.parents, [activeConfig.node]);
|
3219
|
-
}
|
3419
|
+
if (treeFilterItem) {
|
3420
|
+
filterItems.unshift(treeFilterItem);
|
3220
3421
|
}
|
3422
|
+
return filterItems;
|
3221
3423
|
}
|
3222
|
-
}
|
3424
|
+
}, {
|
3425
|
+
key: 'findActiveTreeFilterItem',
|
3426
|
+
value: function findActiveTreeFilterItem() {
|
3427
|
+
var _this = this;
|
3428
|
+
|
3429
|
+
var activeTreeFilterItem = null;
|
3430
|
+
_.each(this.filter.getTreeFilters(), function (treeFilter) {
|
3431
|
+
_.each(treeFilter.subFilters, function (subFilter) {
|
3432
|
+
var activeConfig = _this.findActiveSubFilterItem(subFilter);
|
3433
|
+
|
3434
|
+
if (activeConfig) {
|
3435
|
+
activeConfig.parents.push(treeFilter.config);
|
3436
|
+
activeTreeFilterItem = new _active_node_config2.default(activeConfig.parents, [activeConfig.node]);
|
3437
|
+
}
|
3438
|
+
});
|
3439
|
+
});
|
3223
3440
|
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3441
|
+
return activeTreeFilterItem;
|
3442
|
+
}
|
3443
|
+
}, {
|
3444
|
+
key: 'findActiveAdditionalFilters',
|
3445
|
+
value: function findActiveAdditionalFilters() {
|
3446
|
+
var activeFilters = [];
|
3447
|
+
_.each(this.filter.additionalFilters, function (additionalFilter) {
|
3448
|
+
var activeChildren = _.filter(additionalFilter.children, function (child) {
|
3449
|
+
return child.isActive();
|
3450
|
+
});
|
3451
|
+
|
3452
|
+
if (activeChildren.length > 0) {
|
3453
|
+
activeFilters.push(new _active_node_config2.default([additionalFilter], activeChildren));
|
3454
|
+
}
|
3232
3455
|
});
|
3233
|
-
|
3234
|
-
|
3235
|
-
}
|
3456
|
+
|
3457
|
+
return activeFilters;
|
3236
3458
|
}
|
3237
|
-
|
3238
|
-
|
3459
|
+
}, {
|
3460
|
+
key: 'findActiveSubFilterItem',
|
3461
|
+
value: function findActiveSubFilterItem(filterNode) {
|
3462
|
+
var _this2 = this;
|
3239
3463
|
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
_ref = filterNode.children;
|
3249
|
-
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
3250
|
-
childNode = _ref[_i];
|
3251
|
-
activeConfig = this._findActiveSubFilterItem(childNode);
|
3464
|
+
if (filterNode.isActive()) {
|
3465
|
+
return { node: filterNode, parents: [] };
|
3466
|
+
}
|
3467
|
+
|
3468
|
+
var activeConfig = void 0;
|
3469
|
+
|
3470
|
+
_.some(filterNode.children, function (childNode) {
|
3471
|
+
activeConfig = _this2.findActiveSubFilterItem(childNode);
|
3252
3472
|
if (activeConfig) {
|
3253
3473
|
activeConfig.parents.push(filterNode);
|
3254
3474
|
return activeConfig;
|
3255
3475
|
}
|
3256
|
-
}
|
3476
|
+
});
|
3477
|
+
return activeConfig;
|
3257
3478
|
}
|
3258
|
-
};
|
3479
|
+
}]);
|
3259
3480
|
|
3260
3481
|
return ActiveNodeConfigCollector;
|
3482
|
+
}();
|
3261
3483
|
|
3262
|
-
|
3263
|
-
|
3264
|
-
module.exports = ActiveNodeConfigCollector;
|
3265
|
-
|
3484
|
+
exports.default = ActiveNodeConfigCollector;
|
3266
3485
|
|
3267
3486
|
/***/ },
|
3268
3487
|
/* 58 */
|
3269
3488
|
/***/ function(module, exports) {
|
3270
3489
|
|
3271
|
-
|
3272
|
-
|
3273
|
-
ActiveNodeConfig = (function() {
|
3274
|
-
function ActiveNodeConfig(parents, nodes) {
|
3275
|
-
this._parents = parents;
|
3276
|
-
this._activeNodes = nodes;
|
3277
|
-
}
|
3490
|
+
'use strict';
|
3278
3491
|
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3492
|
+
Object.defineProperty(exports, "__esModule", {
|
3493
|
+
value: true
|
3494
|
+
});
|
3282
3495
|
|
3283
|
-
|
3284
|
-
return _.flatten(_.map(this._activeNodes, this._valueForNode));
|
3285
|
-
};
|
3496
|
+
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; }; }();
|
3286
3497
|
|
3287
|
-
|
3288
|
-
return this._filter().type !== 'checkbox' && this._activeNodes[0].query;
|
3289
|
-
};
|
3498
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
3290
3499
|
|
3291
|
-
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3295
|
-
|
3296
|
-
|
3297
|
-
};
|
3500
|
+
var valueForNode = function valueForNode(node) {
|
3501
|
+
if (node.value === undefined) {
|
3502
|
+
return node.name;
|
3503
|
+
}
|
3504
|
+
return node.value;
|
3505
|
+
};
|
3298
3506
|
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3507
|
+
var findConfig = function findConfig(attrName, activeNodes, parents) {
|
3508
|
+
var activeNode = activeNodes[0];
|
3509
|
+
if (_.last(parents).type !== 'checkbox' && activeNode[attrName]) {
|
3510
|
+
return activeNode[attrName];
|
3511
|
+
}
|
3302
3512
|
|
3303
|
-
|
3304
|
-
return
|
3305
|
-
};
|
3513
|
+
var parentWithAttribute = _.find(parents, function (node) {
|
3514
|
+
return node[attrName];
|
3515
|
+
});
|
3516
|
+
return parentWithAttribute && parentWithAttribute[attrName];
|
3517
|
+
};
|
3306
3518
|
|
3307
|
-
|
3308
|
-
return _.select(this.activeNodes(), function(node) {
|
3309
|
-
return node.enable_create === false;
|
3310
|
-
});
|
3311
|
-
};
|
3519
|
+
// This class is tested in the QueryBuilder specs for now
|
3312
3520
|
|
3313
|
-
|
3314
|
-
|
3315
|
-
|
3316
|
-
});
|
3317
|
-
};
|
3521
|
+
var ActiveNodeConfig = function () {
|
3522
|
+
function ActiveNodeConfig(parentNodes, nodes) {
|
3523
|
+
_classCallCheck(this, ActiveNodeConfig);
|
3318
3524
|
|
3319
|
-
|
3320
|
-
|
3321
|
-
}
|
3525
|
+
this.parents = parentNodes;
|
3526
|
+
this.nodes = nodes;
|
3527
|
+
}
|
3322
3528
|
|
3323
|
-
ActiveNodeConfig
|
3324
|
-
|
3325
|
-
|
3326
|
-
|
3327
|
-
return node.value;
|
3529
|
+
_createClass(ActiveNodeConfig, [{
|
3530
|
+
key: 'activeNodes',
|
3531
|
+
value: function activeNodes() {
|
3532
|
+
return this.nodes;
|
3328
3533
|
}
|
3329
|
-
}
|
3330
|
-
|
3331
|
-
|
3332
|
-
|
3333
|
-
|
3334
|
-
|
3335
|
-
|
3336
|
-
|
3337
|
-
|
3338
|
-
|
3534
|
+
}, {
|
3535
|
+
key: 'values',
|
3536
|
+
value: function values() {
|
3537
|
+
return _.flatten(_.map(this.activeNodes(), valueForNode));
|
3538
|
+
}
|
3539
|
+
}, {
|
3540
|
+
key: 'query',
|
3541
|
+
value: function query() {
|
3542
|
+
return _.last(this.parents).type !== 'checkbox' && this.activeNodes()[0].query;
|
3543
|
+
}
|
3544
|
+
}, {
|
3545
|
+
key: 'hasQuery',
|
3546
|
+
value: function hasQuery() {
|
3547
|
+
return !!this.query();
|
3548
|
+
}
|
3549
|
+
}, {
|
3550
|
+
key: 'field',
|
3551
|
+
value: function field() {
|
3552
|
+
return findConfig('field', this.activeNodes(), this.parents);
|
3553
|
+
}
|
3554
|
+
}, {
|
3555
|
+
key: 'hasField',
|
3556
|
+
value: function hasField() {
|
3557
|
+
return !!this.field();
|
3558
|
+
}
|
3559
|
+
}, {
|
3560
|
+
key: 'preventsCreation',
|
3561
|
+
value: function preventsCreation() {
|
3562
|
+
return this.nodesPreventingCreation().length > 0;
|
3563
|
+
}
|
3564
|
+
}, {
|
3565
|
+
key: 'nodesPreventingCreation',
|
3566
|
+
value: function nodesPreventingCreation() {
|
3567
|
+
return _.select(this.activeNodes(), function (node) {
|
3568
|
+
return node.enable_create === false;
|
3339
3569
|
});
|
3340
|
-
return parentWithAttribute && parentWithAttribute[attrName];
|
3341
3570
|
}
|
3342
|
-
}
|
3343
|
-
|
3344
|
-
|
3345
|
-
|
3346
|
-
|
3571
|
+
}, {
|
3572
|
+
key: 'enablesCreation',
|
3573
|
+
value: function enablesCreation() {
|
3574
|
+
return _.some(this.activeNodes(), function (node) {
|
3575
|
+
return node.enable_create === true;
|
3576
|
+
});
|
3577
|
+
}
|
3578
|
+
}, {
|
3579
|
+
key: 'operator',
|
3580
|
+
value: function operator() {
|
3581
|
+
return findConfig('operator', this.activeNodes(), this.parents) || 'equals';
|
3582
|
+
}
|
3583
|
+
}]);
|
3347
3584
|
|
3348
3585
|
return ActiveNodeConfig;
|
3586
|
+
}();
|
3349
3587
|
|
3350
|
-
|
3351
|
-
|
3352
|
-
module.exports = ActiveNodeConfig;
|
3353
|
-
|
3588
|
+
exports.default = ActiveNodeConfig;
|
3354
3589
|
|
3355
3590
|
/***/ },
|
3356
3591
|
/* 59 */
|
@@ -3394,53 +3629,31 @@
|
|
3394
3629
|
/* 60 */
|
3395
3630
|
/***/ function(module, exports) {
|
3396
3631
|
|
3397
|
-
|
3398
|
-
|
3399
|
-
TOGGLE_SELECT = 'TOGGLE_SELECT';
|
3400
|
-
|
3401
|
-
DESELECT_OBJS = 'DESELECT_OBJS';
|
3402
|
-
|
3403
|
-
CHANGE_SELECTION_MODE = 'CHANGE_SELECTION_MODE';
|
3404
|
-
|
3405
|
-
SINGLE_SELECTION_MODE = 'single';
|
3406
|
-
|
3407
|
-
MULTI_SELECTION_MODE = 'multi';
|
3408
|
-
|
3409
|
-
toggleSelect = (function(_this) {
|
3410
|
-
return function(objId) {
|
3411
|
-
return {
|
3412
|
-
type: TOGGLE_SELECT,
|
3413
|
-
objId: objId
|
3414
|
-
};
|
3415
|
-
};
|
3416
|
-
})(this);
|
3417
|
-
|
3418
|
-
changeSelectionMode = (function(_this) {
|
3419
|
-
return function(mode) {
|
3420
|
-
return {
|
3421
|
-
type: CHANGE_SELECTION_MODE,
|
3422
|
-
mode: mode
|
3423
|
-
};
|
3424
|
-
};
|
3425
|
-
})(this);
|
3632
|
+
'use strict';
|
3426
3633
|
|
3427
|
-
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
3431
|
-
|
3634
|
+
Object.defineProperty(exports, "__esModule", {
|
3635
|
+
value: true
|
3636
|
+
});
|
3637
|
+
exports.toggleSelect = toggleSelect;
|
3638
|
+
exports.changeSelectionMode = changeSelectionMode;
|
3639
|
+
exports.deselectObjs = deselectObjs;
|
3640
|
+
var TOGGLE_SELECT = exports.TOGGLE_SELECT = 'TOGGLE_SELECT';
|
3641
|
+
var DESELECT_OBJS = exports.DESELECT_OBJS = 'DESELECT_OBJS';
|
3642
|
+
var CHANGE_SELECTION_MODE = exports.CHANGE_SELECTION_MODE = 'CHANGE_SELECTION_MODE';
|
3643
|
+
var SINGLE_SELECTION_MODE = exports.SINGLE_SELECTION_MODE = 'single';
|
3644
|
+
var MULTI_SELECTION_MODE = exports.MULTI_SELECTION_MODE = 'multi';
|
3645
|
+
|
3646
|
+
function toggleSelect(objId) {
|
3647
|
+
return { type: TOGGLE_SELECT, objId: objId };
|
3648
|
+
}
|
3432
3649
|
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3436
|
-
CHANGE_SELECTION_MODE: CHANGE_SELECTION_MODE,
|
3437
|
-
SINGLE_SELECTION_MODE: SINGLE_SELECTION_MODE,
|
3438
|
-
MULTI_SELECTION_MODE: MULTI_SELECTION_MODE,
|
3439
|
-
toggleSelect: toggleSelect,
|
3440
|
-
changeSelectionMode: changeSelectionMode,
|
3441
|
-
deselectObjs: deselectObjs
|
3442
|
-
};
|
3650
|
+
function changeSelectionMode(mode) {
|
3651
|
+
return { type: CHANGE_SELECTION_MODE, mode: mode };
|
3652
|
+
}
|
3443
3653
|
|
3654
|
+
function deselectObjs() {
|
3655
|
+
return { type: DESELECT_OBJS };
|
3656
|
+
}
|
3444
3657
|
|
3445
3658
|
/***/ },
|
3446
3659
|
/* 61 */
|
@@ -3914,33 +4127,20 @@
|
|
3914
4127
|
/* 72 */
|
3915
4128
|
/***/ function(module, exports) {
|
3916
4129
|
|
3917
|
-
|
3918
|
-
|
3919
|
-
SET_OBJ_SOURCE = 'SET_OBJ_SOURCE';
|
3920
|
-
|
3921
|
-
FILTER = 'FILTER';
|
3922
|
-
|
3923
|
-
LAST_ADDED = 'LAST_ADDED';
|
3924
|
-
|
3925
|
-
SELECTED = 'SELECTED';
|
3926
|
-
|
3927
|
-
setObjSource = (function(_this) {
|
3928
|
-
return function(activeSource) {
|
3929
|
-
return {
|
3930
|
-
type: SET_OBJ_SOURCE,
|
3931
|
-
activeSource: activeSource
|
3932
|
-
};
|
3933
|
-
};
|
3934
|
-
})(this);
|
3935
|
-
|
3936
|
-
module.exports = {
|
3937
|
-
SET_OBJ_SOURCE: SET_OBJ_SOURCE,
|
3938
|
-
LAST_ADDED: LAST_ADDED,
|
3939
|
-
FILTER: FILTER,
|
3940
|
-
SELECTED: SELECTED,
|
3941
|
-
setObjSource: setObjSource
|
3942
|
-
};
|
4130
|
+
'use strict';
|
3943
4131
|
|
4132
|
+
Object.defineProperty(exports, "__esModule", {
|
4133
|
+
value: true
|
4134
|
+
});
|
4135
|
+
exports.setObjSource = setObjSource;
|
4136
|
+
var SET_OBJ_SOURCE = exports.SET_OBJ_SOURCE = 'SET_OBJ_SOURCE';
|
4137
|
+
var FILTER = exports.FILTER = 'FILTER';
|
4138
|
+
var LAST_ADDED = exports.LAST_ADDED = 'LAST_ADDED';
|
4139
|
+
var SELECTED = exports.SELECTED = 'SELECTED';
|
4140
|
+
|
4141
|
+
function setObjSource(activeSource) {
|
4142
|
+
return { type: SET_OBJ_SOURCE, activeSource: activeSource };
|
4143
|
+
}
|
3944
4144
|
|
3945
4145
|
/***/ },
|
3946
4146
|
/* 73 */
|
@@ -3979,15 +4179,15 @@
|
|
3979
4179
|
/* 74 */
|
3980
4180
|
/***/ function(module, exports, __webpack_require__) {
|
3981
4181
|
|
3982
|
-
var DEFAULT_NUMBER_TO_LOAD, FILTER, Items, LAST_ADDED, LastAddedItems, PresetBuilder, QueryBuilder, SELECTED, SelectedItems, TableView, TableViewContent, TagBar, ThumbnailItems,
|
4182
|
+
var DEFAULT_NUMBER_TO_LOAD, FILTER, Items, LAST_ADDED, LastAddedItems, PresetBuilder, QueryBuilder, SELECTED, SelectedItems, Spinner, TableView, TableViewContent, TagBar, ThumbnailItems, loadMoreObjs, objDisplayAction, toggleExpandTagBar, toggleTag, _ref, _ref1, _ref2;
|
3983
4183
|
|
3984
4184
|
TableView = __webpack_require__(75);
|
3985
4185
|
|
3986
|
-
ThumbnailItems = __webpack_require__(76);
|
4186
|
+
ThumbnailItems = __webpack_require__(76)["default"];
|
3987
4187
|
|
3988
4188
|
SelectedItems = __webpack_require__(87);
|
3989
4189
|
|
3990
|
-
PresetBuilder = __webpack_require__(86);
|
4190
|
+
PresetBuilder = __webpack_require__(86)["default"];
|
3991
4191
|
|
3992
4192
|
LastAddedItems = __webpack_require__(91);
|
3993
4193
|
|
@@ -3995,17 +4195,17 @@
|
|
3995
4195
|
|
3996
4196
|
TagBar = __webpack_require__(103);
|
3997
4197
|
|
3998
|
-
|
4198
|
+
Spinner = __webpack_require__(104)["default"];
|
3999
4199
|
|
4000
|
-
|
4200
|
+
objDisplayAction = __webpack_require__(21);
|
4001
4201
|
|
4002
|
-
|
4202
|
+
_ref = __webpack_require__(72), SELECTED = _ref.SELECTED, LAST_ADDED = _ref.LAST_ADDED, FILTER = _ref.FILTER;
|
4003
4203
|
|
4004
|
-
|
4204
|
+
_ref1 = __webpack_require__(105), toggleExpandTagBar = _ref1.toggleExpandTagBar, toggleTag = _ref1.toggleTag;
|
4005
4205
|
|
4006
|
-
|
4206
|
+
_ref2 = __webpack_require__(106), loadMoreObjs = _ref2.loadMoreObjs, DEFAULT_NUMBER_TO_LOAD = _ref2.DEFAULT_NUMBER_TO_LOAD;
|
4007
4207
|
|
4008
|
-
QueryBuilder = __webpack_require__(107);
|
4208
|
+
QueryBuilder = __webpack_require__(107)["default"];
|
4009
4209
|
|
4010
4210
|
Items = scrivito.createReactClass({
|
4011
4211
|
displayName: 'Items',
|
@@ -4078,9 +4278,9 @@
|
|
4078
4278
|
};
|
4079
4279
|
},
|
4080
4280
|
_handleFileDrop: function(event) {
|
4081
|
-
var files,
|
4281
|
+
var files, _ref3;
|
4082
4282
|
this._changeDragState(false)(event);
|
4083
|
-
files = (
|
4283
|
+
files = (_ref3 = event.dataTransfer) != null ? _ref3.files : void 0;
|
4084
4284
|
if (this.props.editingView && (files != null ? files.length : void 0)) {
|
4085
4285
|
return this._uploadFiles(files);
|
4086
4286
|
}
|
@@ -4130,7 +4330,7 @@
|
|
4130
4330
|
tags = [];
|
4131
4331
|
queryRequest = this._getQueryRequest();
|
4132
4332
|
if (queryRequest && this.props.activeSource === FILTER) {
|
4133
|
-
tags = loadWithDefault(tags, function() {
|
4333
|
+
tags = scrivito.loadWithDefault(tags, function() {
|
4134
4334
|
return queryRequest.facet('tags', {
|
4135
4335
|
limit: 100
|
4136
4336
|
});
|
@@ -4145,7 +4345,7 @@
|
|
4145
4345
|
var queryRequest;
|
4146
4346
|
queryRequest = this._getQueryRequest();
|
4147
4347
|
if (queryRequest !== void 0) {
|
4148
|
-
return loadAllUntil(queryRequest.iterator(), this.props.numToLoad);
|
4348
|
+
return scrivito.loadAllUntil(queryRequest.iterator(), this.props.numToLoad);
|
4149
4349
|
} else {
|
4150
4350
|
return {
|
4151
4351
|
objs: [],
|
@@ -4154,7 +4354,7 @@
|
|
4154
4354
|
}
|
4155
4355
|
},
|
4156
4356
|
render: function() {
|
4157
|
-
var done, isLoading, objs,
|
4357
|
+
var done, isLoading, objs, _ref3;
|
4158
4358
|
return React.createElement("div", {
|
4159
4359
|
"className": this.dropZoneClass(this._getTags()),
|
4160
4360
|
"onDragOver": this._changeDragState(true),
|
@@ -4165,11 +4365,7 @@
|
|
4165
4365
|
"toggleTag": this.toggleTagAction,
|
4166
4366
|
"activeTags": this.props.tags.activeTags,
|
4167
4367
|
"toggleExpandTagBar": this.toggleExpandTagBar
|
4168
|
-
}), ((
|
4169
|
-
"className": "scrivito-content-browser-loading"
|
4170
|
-
}, React.createElement("i", {
|
4171
|
-
"className": "scrivito_icon scrivito_icon_refresh"
|
4172
|
-
})) : this.props.activeSource === SELECTED ? React.createElement(SelectedItems, {
|
4368
|
+
}), ((_ref3 = this._loadObjs(), objs = _ref3.objs, done = _ref3.done, _ref3), isLoading = !done && objs.length < this.props.numToLoad, isLoading && this.props.numToLoad === DEFAULT_NUMBER_TO_LOAD ? React.createElement(Spinner, null) : this.props.activeSource === SELECTED ? React.createElement(SelectedItems, {
|
4173
4369
|
"selectionMode": this.props.selectionMode,
|
4174
4370
|
"currentlyAndPreviouslySelectedObjIds": this.props.currentlyAndPreviouslySelectedObjIds,
|
4175
4371
|
"toggleObjSelection": this.props.toggleObjSelection,
|
@@ -4252,71 +4448,102 @@
|
|
4252
4448
|
/* 76 */
|
4253
4449
|
/***/ function(module, exports, __webpack_require__) {
|
4254
4450
|
|
4255
|
-
|
4451
|
+
'use strict';
|
4256
4452
|
|
4257
|
-
|
4453
|
+
Object.defineProperty(exports, "__esModule", {
|
4454
|
+
value: true
|
4455
|
+
});
|
4258
4456
|
|
4259
|
-
|
4457
|
+
var _thumbnail_item = __webpack_require__(77);
|
4260
4458
|
|
4261
|
-
|
4459
|
+
var _thumbnail_item2 = _interopRequireDefault(_thumbnail_item);
|
4262
4460
|
|
4263
|
-
|
4461
|
+
var _thumbnail_add_item = __webpack_require__(81);
|
4264
4462
|
|
4265
|
-
|
4266
|
-
|
4267
|
-
|
4463
|
+
var _thumbnail_add_item2 = _interopRequireDefault(_thumbnail_add_item);
|
4464
|
+
|
4465
|
+
var _infinite_scroll_loader = __webpack_require__(83);
|
4466
|
+
|
4467
|
+
var _infinite_scroll_loader2 = _interopRequireDefault(_infinite_scroll_loader);
|
4468
|
+
|
4469
|
+
var _obj_creation = __webpack_require__(85);
|
4470
|
+
|
4471
|
+
var _obj_creation2 = _interopRequireDefault(_obj_creation);
|
4472
|
+
|
4473
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4474
|
+
|
4475
|
+
var ThumbnailItems = scrivito.createReactClass({
|
4476
|
+
render: function render() {
|
4477
|
+
var _props = this.props,
|
4478
|
+
isLoading = _props.isLoading,
|
4479
|
+
fetch = _props.fetch,
|
4480
|
+
hasMore = _props.hasMore;
|
4481
|
+
|
4482
|
+
|
4483
|
+
return React.createElement(
|
4484
|
+
_infinite_scroll_loader2.default,
|
4485
|
+
{
|
4486
|
+
tag: 'ul',
|
4487
|
+
className: 'items scrivito-content-browser-thumbnails small',
|
4488
|
+
isLoading: isLoading,
|
4489
|
+
hasMore: hasMore,
|
4490
|
+
fetch: fetch
|
4491
|
+
},
|
4492
|
+
this._renderCreationItem(),
|
4493
|
+
this._renderItems()
|
4494
|
+
);
|
4268
4495
|
},
|
4269
|
-
|
4270
|
-
|
4496
|
+
_renderCreationItem: function _renderCreationItem() {
|
4497
|
+
var _props2 = this.props,
|
4498
|
+
activeTags = _props2.activeTags,
|
4499
|
+
basePreset = _props2.basePreset,
|
4500
|
+
createObj = _props2.createObj,
|
4501
|
+
editingView = _props2.editingView,
|
4502
|
+
filter = _props2.filter;
|
4503
|
+
|
4504
|
+
var objCreation = new _obj_creation2.default(filter);
|
4505
|
+
|
4506
|
+
if (objCreation.showCreationItem() && editingView) {
|
4507
|
+
return React.createElement(_thumbnail_add_item2.default, {
|
4508
|
+
activeTags: activeTags,
|
4509
|
+
objCreation: objCreation,
|
4510
|
+
basePreset: basePreset,
|
4511
|
+
createObj: createObj
|
4512
|
+
});
|
4513
|
+
}
|
4271
4514
|
},
|
4272
|
-
|
4273
|
-
var
|
4274
|
-
|
4515
|
+
_renderItems: function _renderItems() {
|
4516
|
+
var _props3 = this.props,
|
4517
|
+
objs = _props3.objs,
|
4518
|
+
selectedObjs = _props3.selectedObjs,
|
4519
|
+
selectionMode = _props3.selectionMode,
|
4520
|
+
toggleObjSelection = _props3.toggleObjSelection;
|
4521
|
+
|
4522
|
+
|
4523
|
+
var withoutDeleted = _.reject(objs, function (obj) {
|
4275
4524
|
return obj.isDeleted();
|
4276
4525
|
});
|
4277
|
-
return _.map(withoutDeleted,
|
4278
|
-
return
|
4279
|
-
|
4280
|
-
|
4281
|
-
|
4282
|
-
|
4283
|
-
|
4284
|
-
|
4285
|
-
|
4286
|
-
});
|
4287
|
-
};
|
4288
|
-
})(this));
|
4289
|
-
},
|
4290
|
-
render: function() {
|
4291
|
-
return React.createElement(InfiniteScrollLoader, {
|
4292
|
-
"isLoading": this.props.isLoading,
|
4293
|
-
"hasMore": this.props.hasMore,
|
4294
|
-
"fetch": this.props.fetch,
|
4295
|
-
"tag": 'ul',
|
4296
|
-
"className": 'items scrivito-content-browser-thumbnails small'
|
4297
|
-
}, (this.objCreation().showCreationItem() && this.props.editingView ? React.createElement(ThumbnailAddItem, {
|
4298
|
-
"activeTags": this.props.activeTags,
|
4299
|
-
"objCreation": this.objCreation(),
|
4300
|
-
"basePreset": true,
|
4301
|
-
"props": true,
|
4302
|
-
"ps": true,
|
4303
|
-
"basePreset": true,
|
4304
|
-
"t": true,
|
4305
|
-
"createObj": this.props.createObj
|
4306
|
-
}) : void 0), this.buildItems(this.props.objs));
|
4526
|
+
return _.map(withoutDeleted, function (obj) {
|
4527
|
+
return React.createElement(_thumbnail_item2.default, { key: obj.id,
|
4528
|
+
selectedObjs: selectedObjs,
|
4529
|
+
objId: obj.id,
|
4530
|
+
baseSelectClass: 'scrivito-content-browser-meta',
|
4531
|
+
toggleObjSelection: toggleObjSelection,
|
4532
|
+
selectionMode: selectionMode
|
4533
|
+
});
|
4534
|
+
});
|
4307
4535
|
}
|
4308
4536
|
});
|
4309
4537
|
|
4310
|
-
|
4311
|
-
|
4538
|
+
exports.default = ThumbnailItems;
|
4312
4539
|
|
4313
4540
|
/***/ },
|
4314
4541
|
/* 77 */
|
4315
4542
|
/***/ function(module, exports, __webpack_require__) {
|
4316
4543
|
|
4317
|
-
var LoadableSpan,
|
4544
|
+
var LoadableSpan, SINGLE_SELECTION_MODE, ThumbnailItem, getMimeTypeIconClassName, inspectComponentWrapper;
|
4318
4545
|
|
4319
|
-
|
4546
|
+
getMimeTypeIconClassName = __webpack_require__(78)["default"];
|
4320
4547
|
|
4321
4548
|
LoadableSpan = __webpack_require__(79);
|
4322
4549
|
|
@@ -4354,7 +4581,7 @@
|
|
4354
4581
|
_mimeTypeIconClassName: function(contentType) {
|
4355
4582
|
var className;
|
4356
4583
|
className = 'scrivito_icon ';
|
4357
|
-
className +=
|
4584
|
+
className += getMimeTypeIconClassName(contentType);
|
4358
4585
|
return className;
|
4359
4586
|
},
|
4360
4587
|
_isTransformable: function(contentType) {
|
@@ -4378,6 +4605,10 @@
|
|
4378
4605
|
return React.createElement("div", {
|
4379
4606
|
"className": "scrivito-content-browser-preview image-too-large"
|
4380
4607
|
});
|
4608
|
+
} else if (error instanceof scrivito.TransformationSourceInvalidError) {
|
4609
|
+
return React.createElement("div", {
|
4610
|
+
"className": "scrivito-content-browser-preview image-invalid"
|
4611
|
+
});
|
4381
4612
|
} else {
|
4382
4613
|
throw error;
|
4383
4614
|
}
|
@@ -4386,7 +4617,7 @@
|
|
4386
4617
|
_previewImage: function() {
|
4387
4618
|
var blob, contentType;
|
4388
4619
|
blob = this._obj().get('blob', 'binary');
|
4389
|
-
contentType = blob != null ? blob.contentType : void 0;
|
4620
|
+
contentType = blob != null ? blob.raw.contentType : void 0;
|
4390
4621
|
if (this._isTransformable(contentType)) {
|
4391
4622
|
return this._handleImageTransformation(blob);
|
4392
4623
|
} else if (contentType && contentType.indexOf('image/') === 0) {
|
@@ -4447,48 +4678,44 @@
|
|
4447
4678
|
/* 78 */
|
4448
4679
|
/***/ function(module, exports) {
|
4449
4680
|
|
4450
|
-
|
4451
|
-
|
4452
|
-
MimeTypeIcon = (function() {
|
4453
|
-
function MimeTypeIcon() {}
|
4454
|
-
|
4455
|
-
MimeTypeIcon.getMimeTypeIconClassName = function(mimeType) {
|
4456
|
-
var icon, matchedType;
|
4457
|
-
if (mimeType != null) {
|
4458
|
-
matchedType = this._getMatchedIconType(mimeType);
|
4459
|
-
icon = this._mimeTypesHash[matchedType];
|
4460
|
-
}
|
4461
|
-
if (icon == null) {
|
4462
|
-
icon = "scrivito_icon_generic";
|
4463
|
-
}
|
4464
|
-
return icon;
|
4465
|
-
};
|
4466
|
-
|
4467
|
-
MimeTypeIcon._mimeTypesHash = {
|
4468
|
-
"video": "scrivito_icon_movie",
|
4469
|
-
"audio": "scrivito_icon_music",
|
4470
|
-
"msword": "scrivito_icon_doc",
|
4471
|
-
"zip": "scrivito_icon_zip",
|
4472
|
-
"pdf": "scrivito_icon_pdf",
|
4473
|
-
"ms-excel": "scrivito_icon_xls",
|
4474
|
-
"ms-powerpoint": "scrivito_icon_ppt",
|
4475
|
-
"openxmlformats-officedocument.spreadsheetml": "scrivito_icon_xls",
|
4476
|
-
"wordprocessingml": "scrivito_icon_doc",
|
4477
|
-
"presentationml": "scrivito_icon_ppt"
|
4478
|
-
};
|
4681
|
+
'use strict';
|
4479
4682
|
|
4480
|
-
|
4481
|
-
|
4482
|
-
|
4483
|
-
|
4484
|
-
|
4683
|
+
Object.defineProperty(exports, "__esModule", {
|
4684
|
+
value: true
|
4685
|
+
});
|
4686
|
+
exports.default = getMimeTypeIconClassName;
|
4687
|
+
var MIME_TYPES_HASH = {
|
4688
|
+
video: 'scrivito_icon_movie',
|
4689
|
+
audio: 'scrivito_icon_music',
|
4690
|
+
msword: 'scrivito_icon_doc',
|
4691
|
+
zip: 'scrivito_icon_zip',
|
4692
|
+
pdf: 'scrivito_icon_pdf',
|
4693
|
+
'ms-excel': 'scrivito_icon_xls',
|
4694
|
+
'ms-powerpoint': 'scrivito_icon_ppt',
|
4695
|
+
'openxmlformats-officedocument.spreadsheetml': 'scrivito_icon_xls',
|
4696
|
+
wordprocessingml: 'scrivito_icon_doc',
|
4697
|
+
presentationml: 'scrivito_icon_ppt'
|
4698
|
+
};
|
4485
4699
|
|
4486
|
-
|
4700
|
+
var getMatchedIconType = function getMatchedIconType(mimeType) {
|
4701
|
+
return _.find(Object.keys(MIME_TYPES_HASH), function (keyName) {
|
4702
|
+
return mimeType.match(new RegExp('\\b' + keyName + '\\b'));
|
4703
|
+
});
|
4704
|
+
};
|
4487
4705
|
|
4488
|
-
|
4706
|
+
function getMimeTypeIconClassName(mimeType) {
|
4707
|
+
var icon = void 0;
|
4708
|
+
if (mimeType) {
|
4709
|
+
var matchedType = getMatchedIconType(mimeType);
|
4710
|
+
icon = MIME_TYPES_HASH[matchedType];
|
4711
|
+
}
|
4489
4712
|
|
4490
|
-
|
4713
|
+
if (!icon) {
|
4714
|
+
icon = 'scrivito_icon_generic';
|
4715
|
+
}
|
4491
4716
|
|
4717
|
+
return icon;
|
4718
|
+
}
|
4492
4719
|
|
4493
4720
|
/***/ },
|
4494
4721
|
/* 79 */
|
@@ -4577,7 +4804,7 @@
|
|
4577
4804
|
|
4578
4805
|
var AddItemMixin, ThumbnailAddItem;
|
4579
4806
|
|
4580
|
-
AddItemMixin = __webpack_require__(82);
|
4807
|
+
AddItemMixin = __webpack_require__(82)["default"];
|
4581
4808
|
|
4582
4809
|
ThumbnailAddItem = React.createClass({
|
4583
4810
|
displayName: 'ThumbnailAddItem',
|
@@ -4604,95 +4831,139 @@
|
|
4604
4831
|
/* 82 */
|
4605
4832
|
/***/ function(module, exports) {
|
4606
4833
|
|
4607
|
-
|
4834
|
+
'use strict';
|
4608
4835
|
|
4609
|
-
|
4610
|
-
|
4611
|
-
|
4612
|
-
|
4836
|
+
Object.defineProperty(exports, "__esModule", {
|
4837
|
+
value: true
|
4838
|
+
});
|
4839
|
+
var AddItemMixin = {
|
4840
|
+
itemClassName: function itemClassName() {
|
4841
|
+
var className = 'scrivito-content-browser-add';
|
4613
4842
|
if (!this.props.objCreation.isActive()) {
|
4614
|
-
className +=
|
4843
|
+
className += ' disabled';
|
4615
4844
|
}
|
4616
4845
|
return className;
|
4617
4846
|
},
|
4618
|
-
iconClassName: function() {
|
4619
|
-
|
4620
|
-
|
4621
|
-
|
4622
|
-
|
4623
|
-
|
4624
|
-
|
4625
|
-
|
4626
|
-
|
4847
|
+
iconClassName: function iconClassName() {
|
4848
|
+
if (this.props.objCreation.isActive()) {
|
4849
|
+
return 'scrivito_icon scrivito_icon_plus';
|
4850
|
+
}
|
4851
|
+
|
4852
|
+
return 'scrivito_icon scrivito_icon_disabled';
|
4853
|
+
},
|
4854
|
+
creationNotPossibleBody: function creationNotPossibleBody(error) {
|
4855
|
+
return React.createElement(
|
4856
|
+
'ul',
|
4857
|
+
null,
|
4858
|
+
error.nodeTitles.map(function (title) {
|
4859
|
+
return React.createElement(
|
4860
|
+
'li',
|
4861
|
+
{ key: title },
|
4862
|
+
title
|
4863
|
+
);
|
4864
|
+
})
|
4865
|
+
);
|
4627
4866
|
},
|
4628
|
-
presetConflictBody: function(error) {
|
4629
|
-
return React.createElement(
|
4630
|
-
|
4631
|
-
|
4632
|
-
|
4633
|
-
|
4867
|
+
presetConflictBody: function presetConflictBody(error) {
|
4868
|
+
return React.createElement(
|
4869
|
+
'div',
|
4870
|
+
null,
|
4871
|
+
scrivito.translate('content_browser.add_item.preset_conflict'),
|
4872
|
+
_.map(error.fields, function (values, field) {
|
4873
|
+
return React.createElement(
|
4874
|
+
'div',
|
4875
|
+
{ key: field },
|
4876
|
+
React.createElement(
|
4877
|
+
'h4',
|
4878
|
+
null,
|
4879
|
+
field
|
4880
|
+
),
|
4881
|
+
React.createElement(
|
4882
|
+
'ul',
|
4883
|
+
null,
|
4884
|
+
values.map(function (value) {
|
4885
|
+
return React.createElement(
|
4886
|
+
'li',
|
4887
|
+
{ key: value },
|
4888
|
+
value
|
4889
|
+
);
|
4890
|
+
})
|
4891
|
+
)
|
4892
|
+
);
|
4893
|
+
})
|
4894
|
+
);
|
4634
4895
|
},
|
4635
|
-
showErrorAlert: function(error) {
|
4636
|
-
var alertProps;
|
4637
|
-
|
4638
|
-
|
4639
|
-
|
4640
|
-
|
4641
|
-
|
4642
|
-
|
4643
|
-
|
4644
|
-
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4648
|
-
|
4649
|
-
|
4650
|
-
|
4651
|
-
|
4652
|
-
|
4653
|
-
|
4896
|
+
showErrorAlert: function showErrorAlert(error) {
|
4897
|
+
var alertProps = void 0;
|
4898
|
+
if (error.type === 'creation_not_possible') {
|
4899
|
+
alertProps = {
|
4900
|
+
subtitle: scrivito.translate('content_browser.add_item.disabled_filters'),
|
4901
|
+
body: this.creationNotPossibleBody(error)
|
4902
|
+
};
|
4903
|
+
}
|
4904
|
+
|
4905
|
+
if (error.type === 'obj_class_not_provided') {
|
4906
|
+
alertProps = {
|
4907
|
+
subtitle: scrivito.translate('content_browser.add_item.error_no_obj_class')
|
4908
|
+
};
|
4909
|
+
}
|
4910
|
+
|
4911
|
+
if (error.type === 'preset_conflict') {
|
4912
|
+
alertProps = { body: this.presetConflictBody(error) };
|
4913
|
+
}
|
4914
|
+
|
4654
4915
|
alertProps.title = scrivito.translate('content_browser.add_item.create_imposible');
|
4655
|
-
|
4656
|
-
},
|
4657
|
-
buildErrorMessage: function(error) {
|
4658
|
-
|
4659
|
-
|
4660
|
-
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
|
4666
|
-
|
4667
|
-
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
4916
|
+
scrivito.content_browser._showAlert(alertProps);
|
4917
|
+
},
|
4918
|
+
buildErrorMessage: function buildErrorMessage(error) {
|
4919
|
+
if (error.type === 'creation_not_possible') {
|
4920
|
+
var nodesString = error.nodeTitles.join(', ');
|
4921
|
+
return scrivito.translate('content_browser.add_item.prevent_creation', nodesString);
|
4922
|
+
}
|
4923
|
+
|
4924
|
+
if (error.type === 'obj_class_not_provided') {
|
4925
|
+
return scrivito.translate('content_browser.add_item.error_no_obj_class');
|
4926
|
+
}
|
4927
|
+
|
4928
|
+
if (error.type === 'preset_conflict') {
|
4929
|
+
var message = scrivito.translate('content_browser.add_item.failed');
|
4930
|
+
|
4931
|
+
_.each(error.fields, function (value, field) {
|
4932
|
+
message += field + ': ' + value.join(', ') + '\n';
|
4933
|
+
});
|
4934
|
+
|
4935
|
+
return message;
|
4671
4936
|
}
|
4672
4937
|
},
|
4673
|
-
iconTitle: function() {
|
4938
|
+
iconTitle: function iconTitle() {
|
4674
4939
|
if (!this.props.objCreation.isActive()) {
|
4675
4940
|
return this.buildErrorMessage(this.props.objCreation.error());
|
4676
4941
|
}
|
4677
4942
|
},
|
4678
|
-
textMessage: function() {
|
4943
|
+
textMessage: function textMessage() {
|
4679
4944
|
if (this.props.objCreation.isActive()) {
|
4680
4945
|
return scrivito.translate('content_browser.add_item.create_item');
|
4681
|
-
} else {
|
4682
|
-
return scrivito.translate('content_browser.add_item.create_imposible');
|
4683
4946
|
}
|
4947
|
+
|
4948
|
+
return scrivito.translate('content_browser.add_item.create_imposible');
|
4684
4949
|
},
|
4685
|
-
createClick: function() {
|
4686
|
-
|
4687
|
-
|
4950
|
+
createClick: function createClick() {
|
4951
|
+
var _props = this.props,
|
4952
|
+
objCreation = _props.objCreation,
|
4953
|
+
createObj = _props.createObj,
|
4954
|
+
basePreset = _props.basePreset,
|
4955
|
+
activeTags = _props.activeTags;
|
4956
|
+
|
4957
|
+
if (objCreation.isActive()) {
|
4958
|
+
createObj({}, basePreset, objCreation.preset(), activeTags);
|
4959
|
+
objCreation.filter.deselectHierarchicalFilters();
|
4688
4960
|
} else {
|
4689
|
-
|
4961
|
+
this.showErrorAlert(objCreation.error());
|
4690
4962
|
}
|
4691
4963
|
}
|
4692
4964
|
};
|
4693
4965
|
|
4694
|
-
|
4695
|
-
|
4966
|
+
exports.default = AddItemMixin;
|
4696
4967
|
|
4697
4968
|
/***/ },
|
4698
4969
|
/* 83 */
|
@@ -4794,184 +5065,220 @@
|
|
4794
5065
|
/* 85 */
|
4795
5066
|
/***/ function(module, exports, __webpack_require__) {
|
4796
5067
|
|
4797
|
-
|
5068
|
+
'use strict';
|
5069
|
+
|
5070
|
+
Object.defineProperty(exports, "__esModule", {
|
5071
|
+
value: true
|
5072
|
+
});
|
5073
|
+
|
5074
|
+
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; }; }();
|
4798
5075
|
|
4799
|
-
|
5076
|
+
var _active_node_config_collector = __webpack_require__(57);
|
4800
5077
|
|
4801
|
-
|
5078
|
+
var _active_node_config_collector2 = _interopRequireDefault(_active_node_config_collector);
|
4802
5079
|
|
4803
|
-
|
4804
|
-
function ObjCreation(filter) {
|
4805
|
-
var collector, presetBuilder;
|
4806
|
-
collector = new ActiveNodeConfigCollector(filter);
|
4807
|
-
this.activeConfigs = collector.findActiveFilterItems();
|
4808
|
-
presetBuilder = new PresetBuilder(filter);
|
4809
|
-
this._preset = presetBuilder.generatePreset();
|
4810
|
-
}
|
5080
|
+
var _preset_builder = __webpack_require__(86);
|
4811
5081
|
|
4812
|
-
|
4813
|
-
return this._preset.values();
|
4814
|
-
};
|
5082
|
+
var _preset_builder2 = _interopRequireDefault(_preset_builder);
|
4815
5083
|
|
4816
|
-
|
4817
|
-
return _.some(this.activeConfigs, function(nodeConfig) {
|
4818
|
-
return nodeConfig.enablesCreation();
|
4819
|
-
});
|
4820
|
-
};
|
5084
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4821
5085
|
|
4822
|
-
|
4823
|
-
return !!(!this._preventCreation() && this._presetIsValid());
|
4824
|
-
};
|
5086
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4825
5087
|
|
4826
|
-
|
4827
|
-
|
4828
|
-
|
4829
|
-
type: 'creation_not_possible',
|
4830
|
-
nodeTitles: this._nodeTitlesPreventingCreation()
|
4831
|
-
};
|
4832
|
-
} else if (this._preset.isValid()) {
|
4833
|
-
return {
|
4834
|
-
type: 'obj_class_not_provided'
|
4835
|
-
};
|
4836
|
-
} else {
|
4837
|
-
return {
|
4838
|
-
type: 'preset_conflict',
|
4839
|
-
fields: this._buildPresetConflictError()
|
4840
|
-
};
|
4841
|
-
}
|
4842
|
-
};
|
5088
|
+
var ObjCreation = function () {
|
5089
|
+
function ObjCreation(filter) {
|
5090
|
+
_classCallCheck(this, ObjCreation);
|
4843
5091
|
|
4844
|
-
|
4845
|
-
return _.some(this.activeConfigs, function(nodeConfig) {
|
4846
|
-
return nodeConfig.preventsCreation();
|
4847
|
-
});
|
4848
|
-
};
|
5092
|
+
this.filter = filter;
|
4849
5093
|
|
4850
|
-
|
4851
|
-
|
4852
|
-
};
|
5094
|
+
var collector = new _active_node_config_collector2.default(filter);
|
5095
|
+
this.activeConfigs = collector.findActiveFilterItems();
|
4853
5096
|
|
4854
|
-
|
4855
|
-
|
4856
|
-
|
4857
|
-
return node.nodesPreventingCreation();
|
4858
|
-
}));
|
4859
|
-
return _.map(nodes, function(node) {
|
4860
|
-
return node.title;
|
4861
|
-
});
|
4862
|
-
};
|
5097
|
+
var presetBuilder = new _preset_builder2.default(filter);
|
5098
|
+
this.presetValues = presetBuilder.generatePreset();
|
5099
|
+
}
|
4863
5100
|
|
4864
|
-
ObjCreation
|
4865
|
-
|
4866
|
-
|
4867
|
-
|
4868
|
-
|
4869
|
-
|
4870
|
-
|
4871
|
-
|
5101
|
+
_createClass(ObjCreation, [{
|
5102
|
+
key: 'preset',
|
5103
|
+
value: function preset() {
|
5104
|
+
return this.presetValues.values();
|
5105
|
+
}
|
5106
|
+
}, {
|
5107
|
+
key: 'showCreationItem',
|
5108
|
+
value: function showCreationItem() {
|
5109
|
+
return _.some(this.activeConfigs, function (nodeConfig) {
|
5110
|
+
return nodeConfig.enablesCreation();
|
5111
|
+
});
|
5112
|
+
}
|
5113
|
+
}, {
|
5114
|
+
key: 'isActive',
|
5115
|
+
value: function isActive() {
|
5116
|
+
return !!(!this.preventCreation() && this.presetIsValid());
|
5117
|
+
}
|
5118
|
+
}, {
|
5119
|
+
key: 'error',
|
5120
|
+
value: function error() {
|
5121
|
+
if (this.preventCreation()) {
|
5122
|
+
return { type: 'creation_not_possible', nodeTitles: this.nodeTitlesPreventingCreation() };
|
5123
|
+
} else if (this.presetValues.isValid()) {
|
5124
|
+
return { type: 'obj_class_not_provided' };
|
5125
|
+
}
|
4872
5126
|
|
4873
|
-
|
5127
|
+
return { type: 'preset_conflict', fields: this.buildPresetConflictError() };
|
5128
|
+
}
|
5129
|
+
}, {
|
5130
|
+
key: 'preventCreation',
|
5131
|
+
value: function preventCreation() {
|
5132
|
+
return _.some(this.activeConfigs, function (nodeConfig) {
|
5133
|
+
return nodeConfig.preventsCreation();
|
5134
|
+
});
|
5135
|
+
}
|
5136
|
+
}, {
|
5137
|
+
key: 'presetIsValid',
|
5138
|
+
value: function presetIsValid() {
|
5139
|
+
return this.presetValues.isValid() && this.preset()._obj_class;
|
5140
|
+
}
|
5141
|
+
}, {
|
5142
|
+
key: 'nodeTitlesPreventingCreation',
|
5143
|
+
value: function nodeTitlesPreventingCreation() {
|
5144
|
+
var nodes = _.flatten(_.map(this.activeConfigs, function (node) {
|
5145
|
+
return node.nodesPreventingCreation();
|
5146
|
+
}));
|
5147
|
+
return _.map(nodes, function (node) {
|
5148
|
+
return node.title;
|
5149
|
+
});
|
5150
|
+
}
|
5151
|
+
}, {
|
5152
|
+
key: 'buildPresetConflictError',
|
5153
|
+
value: function buildPresetConflictError() {
|
5154
|
+
var presetConflicts = {};
|
5155
|
+
_.each(this.presetValues.errors(), function (values, field) {
|
5156
|
+
presetConflicts[field] = values;
|
5157
|
+
return presetConflicts[field];
|
5158
|
+
});
|
4874
5159
|
|
4875
|
-
|
5160
|
+
return presetConflicts;
|
5161
|
+
}
|
5162
|
+
}]);
|
4876
5163
|
|
4877
|
-
|
5164
|
+
return ObjCreation;
|
5165
|
+
}();
|
4878
5166
|
|
5167
|
+
exports.default = ObjCreation;
|
4879
5168
|
|
4880
5169
|
/***/ },
|
4881
5170
|
/* 86 */
|
4882
5171
|
/***/ function(module, exports, __webpack_require__) {
|
4883
5172
|
|
4884
|
-
|
5173
|
+
'use strict';
|
4885
5174
|
|
4886
|
-
|
5175
|
+
Object.defineProperty(exports, "__esModule", {
|
5176
|
+
value: true
|
5177
|
+
});
|
4887
5178
|
|
4888
|
-
|
4889
|
-
var Preset;
|
5179
|
+
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; }; }();
|
4890
5180
|
|
4891
|
-
|
4892
|
-
function Preset() {
|
4893
|
-
this._errors = {};
|
4894
|
-
this._values = {};
|
4895
|
-
this._titles = {};
|
4896
|
-
}
|
5181
|
+
var _active_node_config_collector = __webpack_require__(57);
|
4897
5182
|
|
4898
|
-
|
4899
|
-
return _.keys(this.errors()).length === 0;
|
4900
|
-
};
|
5183
|
+
var _active_node_config_collector2 = _interopRequireDefault(_active_node_config_collector);
|
4901
5184
|
|
4902
|
-
|
4903
|
-
if (this.isValid()) {
|
4904
|
-
return this._values;
|
4905
|
-
} else {
|
4906
|
-
throw new Error(scrivito.translate('content_browser.last_added.preset_error'));
|
4907
|
-
}
|
4908
|
-
};
|
5185
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4909
5186
|
|
4910
|
-
|
4911
|
-
return this._errors;
|
4912
|
-
};
|
5187
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4913
5188
|
|
4914
|
-
|
4915
|
-
|
4916
|
-
|
4917
|
-
} else {
|
4918
|
-
this._values[key] = value;
|
4919
|
-
return this._titles[key] = title;
|
4920
|
-
}
|
4921
|
-
};
|
5189
|
+
var Preset = function () {
|
5190
|
+
function Preset() {
|
5191
|
+
_classCallCheck(this, Preset);
|
4922
5192
|
|
4923
|
-
|
4924
|
-
|
4925
|
-
|
4926
|
-
|
4927
|
-
return this._errors[key] = [previouslySetValue, newValue];
|
4928
|
-
}
|
4929
|
-
};
|
5193
|
+
this.presetErrors = {};
|
5194
|
+
this.presetValues = {};
|
5195
|
+
this.titles = {};
|
5196
|
+
}
|
4930
5197
|
|
4931
|
-
|
5198
|
+
_createClass(Preset, [{
|
5199
|
+
key: 'isValid',
|
5200
|
+
value: function isValid() {
|
5201
|
+
return _.keys(this.errors()).length === 0;
|
5202
|
+
}
|
5203
|
+
}, {
|
5204
|
+
key: 'values',
|
5205
|
+
value: function values() {
|
5206
|
+
if (this.isValid()) {
|
5207
|
+
return this.presetValues;
|
5208
|
+
}
|
5209
|
+
throw new Error(scrivito.translate('content_browser.last_added.preset_error'));
|
5210
|
+
}
|
5211
|
+
}, {
|
5212
|
+
key: 'errors',
|
5213
|
+
value: function errors() {
|
5214
|
+
return this.presetErrors;
|
5215
|
+
}
|
5216
|
+
}, {
|
5217
|
+
key: 'addValue',
|
5218
|
+
value: function addValue(key, value, title) {
|
5219
|
+
if (Object.prototype.hasOwnProperty.call(this.presetValues, key)) {
|
5220
|
+
return this.addError(key, this.titles[key], title);
|
5221
|
+
}
|
5222
|
+
this.presetValues[key] = value;
|
5223
|
+
this.titles[key] = title;
|
5224
|
+
}
|
5225
|
+
}, {
|
5226
|
+
key: 'addError',
|
5227
|
+
value: function addError(key, previouslySetValue, newValue) {
|
5228
|
+
if (this.presetErrors[key]) {
|
5229
|
+
return this.presetErrors[key].push(newValue);
|
5230
|
+
}
|
5231
|
+
this.presetErrors[key] = [previouslySetValue, newValue];
|
5232
|
+
}
|
5233
|
+
}]);
|
4932
5234
|
|
4933
|
-
|
5235
|
+
return Preset;
|
5236
|
+
}();
|
4934
5237
|
|
5238
|
+
var PresetBuilder = function () {
|
4935
5239
|
function PresetBuilder(filter) {
|
4936
|
-
this
|
4937
|
-
}
|
4938
|
-
|
4939
|
-
PresetBuilder.prototype.generatePreset = function() {
|
4940
|
-
var activeNodeConfigs, presetCollection;
|
4941
|
-
presetCollection = new Preset();
|
4942
|
-
activeNodeConfigs = this._collector.findActiveFilterItems();
|
4943
|
-
_.each(activeNodeConfigs, (function(_this) {
|
4944
|
-
return function(activeNodeConfig) {
|
4945
|
-
var nodesWithPreset;
|
4946
|
-
nodesWithPreset = _this._nodesWithPreset(activeNodeConfig);
|
4947
|
-
return _.each(nodesWithPreset, function(filterNode) {
|
4948
|
-
return _this._addPresetsForFilterNode(filterNode, presetCollection);
|
4949
|
-
});
|
4950
|
-
};
|
4951
|
-
})(this));
|
4952
|
-
return presetCollection;
|
4953
|
-
};
|
5240
|
+
_classCallCheck(this, PresetBuilder);
|
4954
5241
|
|
4955
|
-
|
4956
|
-
|
4957
|
-
return node.preset;
|
4958
|
-
});
|
4959
|
-
};
|
5242
|
+
this.collector = new _active_node_config_collector2.default(filter);
|
5243
|
+
}
|
4960
5244
|
|
4961
|
-
PresetBuilder
|
4962
|
-
|
4963
|
-
|
4964
|
-
|
4965
|
-
|
4966
|
-
});
|
4967
|
-
};
|
5245
|
+
_createClass(PresetBuilder, [{
|
5246
|
+
key: 'generatePreset',
|
5247
|
+
value: function generatePreset() {
|
5248
|
+
var presetCollection = new Preset();
|
5249
|
+
var activeNodeConfigs = this.collector.findActiveFilterItems();
|
4968
5250
|
|
4969
|
-
|
5251
|
+
_.each(activeNodeConfigs, function (activeNodeConfig) {
|
5252
|
+
var nodesWithPreset = PresetBuilder.nodesWithPreset(activeNodeConfig);
|
5253
|
+
_.each(nodesWithPreset, function (filterNode) {
|
5254
|
+
PresetBuilder.addPresetsForFilterNode(filterNode, presetCollection);
|
5255
|
+
});
|
5256
|
+
});
|
4970
5257
|
|
4971
|
-
|
5258
|
+
return presetCollection;
|
5259
|
+
}
|
5260
|
+
}], [{
|
5261
|
+
key: 'nodesWithPreset',
|
5262
|
+
value: function nodesWithPreset(config) {
|
5263
|
+
return _.select(config.activeNodes(), function (node) {
|
5264
|
+
return node.preset;
|
5265
|
+
});
|
5266
|
+
}
|
5267
|
+
}, {
|
5268
|
+
key: 'addPresetsForFilterNode',
|
5269
|
+
value: function addPresetsForFilterNode(node, presetCollection) {
|
5270
|
+
_.each(node.preset, function (value, key) {
|
5271
|
+
if (value !== undefined) {
|
5272
|
+
presetCollection.addValue(key, value, node.title);
|
5273
|
+
}
|
5274
|
+
});
|
5275
|
+
}
|
5276
|
+
}]);
|
4972
5277
|
|
4973
|
-
|
5278
|
+
return PresetBuilder;
|
5279
|
+
}();
|
4974
5280
|
|
5281
|
+
exports.default = PresetBuilder;
|
4975
5282
|
|
4976
5283
|
/***/ },
|
4977
5284
|
/* 87 */
|
@@ -4985,7 +5292,7 @@
|
|
4985
5292
|
|
4986
5293
|
TableView = __webpack_require__(75);
|
4987
5294
|
|
4988
|
-
TABLE_VIEW = __webpack_require__(
|
5295
|
+
TABLE_VIEW = __webpack_require__(21).TABLE_VIEW;
|
4989
5296
|
|
4990
5297
|
SelectedItems = React.createClass({
|
4991
5298
|
displayName: 'SelectedItems',
|
@@ -5068,14 +5375,14 @@
|
|
5068
5375
|
var blob;
|
5069
5376
|
blob = this._obj().get('blob', 'binary');
|
5070
5377
|
if (blob) {
|
5071
|
-
return blob.contentType;
|
5378
|
+
return blob.raw.contentType;
|
5072
5379
|
}
|
5073
5380
|
},
|
5074
5381
|
_contentLength: function() {
|
5075
5382
|
var blob;
|
5076
5383
|
blob = this._obj().get('blob', 'binary');
|
5077
5384
|
if (blob) {
|
5078
|
-
return filesize(blob.contentLength);
|
5385
|
+
return filesize(blob.raw.contentLength);
|
5079
5386
|
}
|
5080
5387
|
},
|
5081
5388
|
_getLastChangedFormatedDate: function() {
|
@@ -5196,13 +5503,13 @@
|
|
5196
5503
|
/**
|
5197
5504
|
* filesize
|
5198
5505
|
*
|
5199
|
-
* @copyright
|
5506
|
+
* @copyright 2017 Jason Mulligan <jason.mulligan@avoidwork.com>
|
5200
5507
|
* @license BSD-3-Clause
|
5201
|
-
* @version 3.
|
5508
|
+
* @version 3.5.4
|
5202
5509
|
*/
|
5203
5510
|
(function (global) {
|
5204
|
-
var b = /^(b|B)
|
5205
|
-
|
5511
|
+
var b = /^(b|B)$/,
|
5512
|
+
symbol = {
|
5206
5513
|
iec: {
|
5207
5514
|
bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"],
|
5208
5515
|
bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
|
@@ -5211,6 +5518,10 @@
|
|
5211
5518
|
bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
|
5212
5519
|
bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
|
5213
5520
|
}
|
5521
|
+
},
|
5522
|
+
fullform = {
|
5523
|
+
iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
|
5524
|
+
jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
|
5214
5525
|
};
|
5215
5526
|
|
5216
5527
|
/**
|
@@ -5222,7 +5533,7 @@
|
|
5222
5533
|
* @return {String} Readable file size String
|
5223
5534
|
*/
|
5224
5535
|
function filesize(arg) {
|
5225
|
-
var descriptor = arguments.length
|
5536
|
+
var descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
5226
5537
|
|
5227
5538
|
var result = [],
|
5228
5539
|
val = 0,
|
@@ -5230,6 +5541,8 @@
|
|
5230
5541
|
base = void 0,
|
5231
5542
|
bits = void 0,
|
5232
5543
|
ceil = void 0,
|
5544
|
+
full = void 0,
|
5545
|
+
fullforms = void 0,
|
5233
5546
|
neg = void 0,
|
5234
5547
|
num = void 0,
|
5235
5548
|
output = void 0,
|
@@ -5251,6 +5564,8 @@
|
|
5251
5564
|
symbols = descriptor.symbols || descriptor.suffixes || {};
|
5252
5565
|
standard = base === 2 ? descriptor.standard || "jedec" : "jedec";
|
5253
5566
|
output = descriptor.output || "string";
|
5567
|
+
full = descriptor.fullform === true;
|
5568
|
+
fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
|
5254
5569
|
e = descriptor.exponent !== undefined ? descriptor.exponent : -1;
|
5255
5570
|
num = Number(arg);
|
5256
5571
|
neg = num < 0;
|
@@ -5263,6 +5578,7 @@
|
|
5263
5578
|
|
5264
5579
|
// Zero is now a special case because bytes divide by 1
|
5265
5580
|
if (num === 0) {
|
5581
|
+
e = 0;
|
5266
5582
|
result[0] = 0;
|
5267
5583
|
result[1] = unix ? "" : !bits ? "B" : "b";
|
5268
5584
|
} else {
|
@@ -5280,12 +5596,12 @@
|
|
5280
5596
|
e = 8;
|
5281
5597
|
}
|
5282
5598
|
|
5283
|
-
val = base === 2 ?
|
5599
|
+
val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));
|
5284
5600
|
|
5285
5601
|
if (bits) {
|
5286
5602
|
val = val * 8;
|
5287
5603
|
|
5288
|
-
if (val
|
5604
|
+
if (val >= ceil && e < 8) {
|
5289
5605
|
val = val / ceil;
|
5290
5606
|
e++;
|
5291
5607
|
}
|
@@ -5325,9 +5641,20 @@
|
|
5325
5641
|
return { value: result[0], suffix: result[1], symbol: result[1] };
|
5326
5642
|
}
|
5327
5643
|
|
5644
|
+
if (full) {
|
5645
|
+
result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s");
|
5646
|
+
}
|
5647
|
+
|
5328
5648
|
return result.join(spacer);
|
5329
5649
|
}
|
5330
5650
|
|
5651
|
+
// Partial application for functional programming
|
5652
|
+
filesize.partial = function (opt) {
|
5653
|
+
return function (arg) {
|
5654
|
+
return filesize(arg, opt);
|
5655
|
+
};
|
5656
|
+
};
|
5657
|
+
|
5331
5658
|
// CommonJS, AMD, script tag
|
5332
5659
|
if (true) {
|
5333
5660
|
module.exports = filesize;
|
@@ -5354,7 +5681,7 @@
|
|
5354
5681
|
|
5355
5682
|
TableView = __webpack_require__(75);
|
5356
5683
|
|
5357
|
-
objDisplayAction = __webpack_require__(
|
5684
|
+
objDisplayAction = __webpack_require__(21);
|
5358
5685
|
|
5359
5686
|
LastAddedItems = React.createClass({
|
5360
5687
|
displayName: 'LastAddedItems',
|
@@ -5567,42 +5894,35 @@
|
|
5567
5894
|
/* 97 */
|
5568
5895
|
/***/ function(module, exports) {
|
5569
5896
|
|
5570
|
-
|
5897
|
+
'use strict';
|
5571
5898
|
|
5572
|
-
|
5899
|
+
Object.defineProperty(exports, "__esModule", {
|
5900
|
+
value: true
|
5901
|
+
});
|
5902
|
+
var status = exports.status = function status(addition) {
|
5573
5903
|
if (addition.progress === 0) {
|
5574
|
-
return
|
5575
|
-
} else if (addition.progress === 100) {
|
5576
|
-
return "completed";
|
5577
|
-
} else {
|
5578
|
-
return "active";
|
5904
|
+
return 'failed';
|
5579
5905
|
}
|
5580
|
-
};
|
5581
5906
|
|
5582
|
-
|
5583
|
-
|
5584
|
-
|
5907
|
+
if (addition.progress === 100) {
|
5908
|
+
return 'completed';
|
5909
|
+
}
|
5585
5910
|
|
5586
|
-
|
5587
|
-
return status(addition) === "completed";
|
5911
|
+
return 'active';
|
5588
5912
|
};
|
5589
5913
|
|
5590
|
-
|
5591
|
-
return status(addition) ===
|
5914
|
+
var isActive = exports.isActive = function isActive(addition) {
|
5915
|
+
return status(addition) === 'active';
|
5592
5916
|
};
|
5593
|
-
|
5594
|
-
|
5595
|
-
return _.filter(additions, isFailed);
|
5917
|
+
var isCompleted = exports.isCompleted = function isCompleted(addition) {
|
5918
|
+
return status(addition) === 'completed';
|
5596
5919
|
};
|
5597
|
-
|
5598
|
-
|
5599
|
-
|
5600
|
-
|
5601
|
-
|
5602
|
-
isCompleted: isCompleted,
|
5603
|
-
isFailed: isFailed
|
5920
|
+
var isFailed = exports.isFailed = function isFailed(addition) {
|
5921
|
+
return status(addition) === 'failed';
|
5922
|
+
};
|
5923
|
+
var failed = exports.failed = function failed(additions) {
|
5924
|
+
return _.filter(additions, isFailed);
|
5604
5925
|
};
|
5605
|
-
|
5606
5926
|
|
5607
5927
|
/***/ },
|
5608
5928
|
/* 98 */
|
@@ -5740,7 +6060,7 @@
|
|
5740
6060
|
|
5741
6061
|
TableViewAddItem = __webpack_require__(102);
|
5742
6062
|
|
5743
|
-
ObjCreation = __webpack_require__(85);
|
6063
|
+
ObjCreation = __webpack_require__(85)["default"];
|
5744
6064
|
|
5745
6065
|
InfiniteScrollLoader = __webpack_require__(83);
|
5746
6066
|
|
@@ -5798,7 +6118,7 @@
|
|
5798
6118
|
|
5799
6119
|
var AddItemMixin, TableViewAddItem;
|
5800
6120
|
|
5801
|
-
AddItemMixin = __webpack_require__(82);
|
6121
|
+
AddItemMixin = __webpack_require__(82)["default"];
|
5802
6122
|
|
5803
6123
|
TableViewAddItem = React.createClass({
|
5804
6124
|
mixins: [AddItemMixin],
|
@@ -5871,254 +6191,228 @@
|
|
5871
6191
|
/* 104 */
|
5872
6192
|
/***/ function(module, exports) {
|
5873
6193
|
|
5874
|
-
|
5875
|
-
|
5876
|
-
|
5877
|
-
|
5878
|
-
|
5879
|
-
|
5880
|
-
|
5881
|
-
|
5882
|
-
|
5883
|
-
|
5884
|
-
|
5885
|
-
|
5886
|
-
toggleTag = (function(_this) {
|
5887
|
-
return function(tag) {
|
5888
|
-
return {
|
5889
|
-
type: TOGGLE_TAG,
|
5890
|
-
tag: tag
|
5891
|
-
};
|
5892
|
-
};
|
5893
|
-
})(this);
|
5894
|
-
|
5895
|
-
module.exports = {
|
5896
|
-
toggleTag: toggleTag,
|
5897
|
-
toggleExpandTagBar: toggleExpandTagBar,
|
5898
|
-
EXPAND_TOGGLE: EXPAND_TOGGLE,
|
5899
|
-
TOGGLE_TAG: TOGGLE_TAG
|
5900
|
-
};
|
6194
|
+
"use strict";
|
6195
|
+
|
6196
|
+
Object.defineProperty(exports, "__esModule", {
|
6197
|
+
value: true
|
6198
|
+
});
|
6199
|
+
function Spinner() {
|
6200
|
+
return React.createElement(
|
6201
|
+
"div",
|
6202
|
+
{ className: "scrivito-content-browser-loading" },
|
6203
|
+
React.createElement("i", { className: "scrivito_icon scrivito_icon_refresh" })
|
6204
|
+
);
|
6205
|
+
}
|
5901
6206
|
|
6207
|
+
exports.default = Spinner;
|
5902
6208
|
|
5903
6209
|
/***/ },
|
5904
6210
|
/* 105 */
|
5905
6211
|
/***/ function(module, exports) {
|
5906
6212
|
|
5907
|
-
|
5908
|
-
|
5909
|
-
LOAD_MORE_OBJS = "LOAD_MORE_OBJS";
|
5910
|
-
|
5911
|
-
DEFAULT_NUMBER_TO_LOAD = 24;
|
6213
|
+
'use strict';
|
5912
6214
|
|
5913
|
-
|
5914
|
-
|
5915
|
-
|
5916
|
-
|
5917
|
-
|
5918
|
-
|
5919
|
-
|
5920
|
-
})(this);
|
6215
|
+
Object.defineProperty(exports, "__esModule", {
|
6216
|
+
value: true
|
6217
|
+
});
|
6218
|
+
exports.toggleExpandTagBar = toggleExpandTagBar;
|
6219
|
+
exports.toggleTag = toggleTag;
|
6220
|
+
var EXPAND_TOGGLE = exports.EXPAND_TOGGLE = 'EXPAND_TOGGLE';
|
6221
|
+
var TOGGLE_TAG = exports.TOGGLE_TAG = 'TOGGLE_TAG';
|
5921
6222
|
|
5922
|
-
|
5923
|
-
|
5924
|
-
|
5925
|
-
DEFAULT_NUMBER_TO_LOAD: DEFAULT_NUMBER_TO_LOAD
|
5926
|
-
};
|
6223
|
+
function toggleExpandTagBar() {
|
6224
|
+
return { type: EXPAND_TOGGLE };
|
6225
|
+
}
|
5927
6226
|
|
6227
|
+
function toggleTag(tag) {
|
6228
|
+
return { type: TOGGLE_TAG, tag: tag };
|
6229
|
+
}
|
5928
6230
|
|
5929
6231
|
/***/ },
|
5930
6232
|
/* 106 */
|
5931
6233
|
/***/ function(module, exports) {
|
5932
6234
|
|
5933
|
-
|
5934
|
-
|
5935
|
-
loadAllUntil = function(iterable, maxItems, objs) {
|
5936
|
-
var done, e, value, _ref;
|
5937
|
-
if (objs == null) {
|
5938
|
-
objs = [];
|
5939
|
-
}
|
5940
|
-
try {
|
5941
|
-
_ref = iterable.next(), value = _ref.value, done = _ref.done;
|
5942
|
-
if (done || maxItems === 0) {
|
5943
|
-
return {
|
5944
|
-
done: done,
|
5945
|
-
objs: objs
|
5946
|
-
};
|
5947
|
-
} else {
|
5948
|
-
return loadAllUntil(iterable, maxItems - 1, objs.concat([value]));
|
5949
|
-
}
|
5950
|
-
} catch (_error) {
|
5951
|
-
e = _error;
|
5952
|
-
if (e instanceof scrivito.NotLoadedError) {
|
5953
|
-
e.load();
|
5954
|
-
return {
|
5955
|
-
done: false,
|
5956
|
-
objs: objs
|
5957
|
-
};
|
5958
|
-
} else {
|
5959
|
-
throw e;
|
5960
|
-
}
|
5961
|
-
}
|
5962
|
-
};
|
5963
|
-
|
5964
|
-
loadWithDefault = function(theDefault, loadFn) {
|
5965
|
-
var e;
|
5966
|
-
try {
|
5967
|
-
return loadFn();
|
5968
|
-
} catch (_error) {
|
5969
|
-
e = _error;
|
5970
|
-
if (scrivito.isNotLoadedError(e)) {
|
5971
|
-
e.load();
|
5972
|
-
return theDefault;
|
5973
|
-
} else {
|
5974
|
-
throw e;
|
5975
|
-
}
|
5976
|
-
}
|
5977
|
-
};
|
6235
|
+
'use strict';
|
5978
6236
|
|
5979
|
-
|
5980
|
-
|
5981
|
-
|
5982
|
-
|
6237
|
+
Object.defineProperty(exports, "__esModule", {
|
6238
|
+
value: true
|
6239
|
+
});
|
6240
|
+
exports.loadMoreObjs = loadMoreObjs;
|
6241
|
+
var LOAD_MORE_OBJS = exports.LOAD_MORE_OBJS = 'LOAD_MORE_OBJS';
|
6242
|
+
var DEFAULT_NUMBER_TO_LOAD = exports.DEFAULT_NUMBER_TO_LOAD = 24;
|
5983
6243
|
|
6244
|
+
function loadMoreObjs(numToLoad) {
|
6245
|
+
return { type: LOAD_MORE_OBJS, numToLoad: numToLoad };
|
6246
|
+
}
|
5984
6247
|
|
5985
6248
|
/***/ },
|
5986
6249
|
/* 107 */
|
5987
6250
|
/***/ function(module, exports, __webpack_require__) {
|
5988
6251
|
|
5989
|
-
|
6252
|
+
'use strict';
|
6253
|
+
|
6254
|
+
Object.defineProperty(exports, "__esModule", {
|
6255
|
+
value: true
|
6256
|
+
});
|
6257
|
+
|
6258
|
+
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; }; }();
|
6259
|
+
|
6260
|
+
var _active_node_config_collector = __webpack_require__(57);
|
6261
|
+
|
6262
|
+
var _active_node_config_collector2 = _interopRequireDefault(_active_node_config_collector);
|
5990
6263
|
|
5991
|
-
|
6264
|
+
var _sort_criteria = __webpack_require__(55);
|
5992
6265
|
|
5993
|
-
|
6266
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
5994
6267
|
|
5995
|
-
|
6268
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6269
|
+
|
6270
|
+
var QueryBuilder = function () {
|
5996
6271
|
function QueryBuilder(filter, baseQuery, tags, sortCriteria) {
|
6272
|
+
_classCallCheck(this, QueryBuilder);
|
6273
|
+
|
5997
6274
|
this.filter = filter;
|
5998
6275
|
this.tags = tags;
|
5999
6276
|
this.sortCriteria = sortCriteria;
|
6000
|
-
this.
|
6277
|
+
this.collector = new _active_node_config_collector2.default(this.filter);
|
6278
|
+
|
6001
6279
|
if (!this.sortCriteria) {
|
6002
6280
|
throw new Error('sortCriteria is not initialized. Please explicit initialize the sort criteria param');
|
6003
6281
|
}
|
6282
|
+
|
6004
6283
|
if (baseQuery) {
|
6005
|
-
this.
|
6284
|
+
this.baseQuery = baseQuery.to_basic_obj_search_iterable();
|
6006
6285
|
}
|
6007
6286
|
}
|
6008
6287
|
|
6009
|
-
QueryBuilder
|
6010
|
-
|
6011
|
-
|
6012
|
-
|
6013
|
-
|
6014
|
-
|
6015
|
-
|
6016
|
-
|
6017
|
-
|
6018
|
-
|
6019
|
-
QueryBuilder.prototype._tagsQuery = function(query) {
|
6020
|
-
if (this.tags && this.tags.length > 0) {
|
6021
|
-
_.each(this.tags, function(tag) {
|
6022
|
-
if (query) {
|
6023
|
-
return query.and('tags', 'equals', tag);
|
6024
|
-
} else {
|
6025
|
-
return query;
|
6026
|
-
}
|
6027
|
-
});
|
6288
|
+
_createClass(QueryBuilder, [{
|
6289
|
+
key: 'searchRequest',
|
6290
|
+
value: function searchRequest() {
|
6291
|
+
var query = this.baseQuery;
|
6292
|
+
query = this.addFilterQueries(query);
|
6293
|
+
query = this.addSearchTermQuery(query);
|
6294
|
+
query = this.sortQuery(query);
|
6295
|
+
query = this.tagsQuery(query);
|
6296
|
+
query = QueryBuilder.ignoreMigrationStore(query);
|
6297
|
+
return query;
|
6028
6298
|
}
|
6029
|
-
|
6030
|
-
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
|
6035
|
-
|
6036
|
-
|
6037
|
-
|
6038
|
-
searchQuery = this._buildActiveChildrenSearchQuery(activeConfig);
|
6039
|
-
if (searchQuery) {
|
6040
|
-
combinedQuery = this._addOrCreateQuery(combinedQuery, searchQuery);
|
6299
|
+
}, {
|
6300
|
+
key: 'tagsQuery',
|
6301
|
+
value: function tagsQuery(query) {
|
6302
|
+
if (this.tags && this.tags.length > 0) {
|
6303
|
+
_.each(this.tags, function (tag) {
|
6304
|
+
if (query) {
|
6305
|
+
query.and('tags', 'equals', tag);
|
6306
|
+
}
|
6307
|
+
});
|
6041
6308
|
}
|
6309
|
+
return query;
|
6042
6310
|
}
|
6043
|
-
|
6044
|
-
|
6311
|
+
}, {
|
6312
|
+
key: 'addFilterQueries',
|
6313
|
+
value: function addFilterQueries(baseQuery) {
|
6314
|
+
var combinedQuery = baseQuery;
|
6315
|
+
var activeItems = this.collector.findActiveFilterItems();
|
6316
|
+
_.each(activeItems, function (activeConfig) {
|
6317
|
+
var searchQuery = QueryBuilder.buildActiveChildrenSearchQuery(activeConfig);
|
6318
|
+
if (searchQuery) {
|
6319
|
+
combinedQuery = QueryBuilder.addOrCreateQuery(combinedQuery, searchQuery);
|
6320
|
+
}
|
6321
|
+
});
|
6045
6322
|
|
6046
|
-
|
6047
|
-
|
6048
|
-
|
6049
|
-
|
6050
|
-
|
6323
|
+
return combinedQuery;
|
6324
|
+
}
|
6325
|
+
}, {
|
6326
|
+
key: 'sortQuery',
|
6327
|
+
value: function sortQuery(query) {
|
6328
|
+
if (query) {
|
6329
|
+
if (this.sortCriteria.sortField === 'relevance') {
|
6330
|
+
if (!this.hasSearchTerm()) {
|
6331
|
+
query.order('_lastChanged', _sort_criteria.DESC_SORT_ORDER);
|
6332
|
+
}
|
6333
|
+
} else {
|
6334
|
+
query.order(this.sortCriteria.sortField, this.sortCriteria.sortDirection);
|
6051
6335
|
}
|
6052
|
-
} else {
|
6053
|
-
query.order(this.sortCriteria.sortField, this.sortCriteria.sortDirection);
|
6054
6336
|
}
|
6337
|
+
return query;
|
6055
6338
|
}
|
6056
|
-
|
6057
|
-
|
6058
|
-
|
6059
|
-
|
6060
|
-
|
6061
|
-
|
6062
|
-
|
6063
|
-
return this._addOrCreateQuery(query, searchQuery);
|
6064
|
-
} else {
|
6339
|
+
}, {
|
6340
|
+
key: 'addSearchTermQuery',
|
6341
|
+
value: function addSearchTermQuery(query) {
|
6342
|
+
if (this.hasSearchTerm()) {
|
6343
|
+
var searchQuery = scrivito.BasicObj.where('*', 'containsPrefix', this.filter.searchTerm);
|
6344
|
+
return QueryBuilder.addOrCreateQuery(query, searchQuery);
|
6345
|
+
}
|
6065
6346
|
return query;
|
6066
6347
|
}
|
6067
|
-
}
|
6068
|
-
|
6069
|
-
|
6070
|
-
|
6071
|
-
query.andNot('_obj_class', 'equals', 'MigrationStore');
|
6348
|
+
}, {
|
6349
|
+
key: 'hasSearchTerm',
|
6350
|
+
value: function hasSearchTerm() {
|
6351
|
+
return this.filter.searchTerm && this.filter.searchTerm.length > 0;
|
6072
6352
|
}
|
6073
|
-
|
6074
|
-
|
6075
|
-
|
6076
|
-
|
6077
|
-
|
6078
|
-
|
6079
|
-
|
6080
|
-
return this._buildFOVQuery(activeConfig);
|
6353
|
+
}], [{
|
6354
|
+
key: 'ignoreMigrationStore',
|
6355
|
+
value: function ignoreMigrationStore(query) {
|
6356
|
+
if (query) {
|
6357
|
+
query.andNot('_objClass', 'equals', 'MigrationStore');
|
6358
|
+
}
|
6359
|
+
return query;
|
6081
6360
|
}
|
6082
|
-
}
|
6083
|
-
|
6084
|
-
|
6085
|
-
|
6086
|
-
|
6361
|
+
}, {
|
6362
|
+
key: 'buildActiveChildrenSearchQuery',
|
6363
|
+
value: function buildActiveChildrenSearchQuery(activeConfig) {
|
6364
|
+
if (activeConfig.hasQuery()) {
|
6365
|
+
return activeConfig.query().to_basic_obj_search_iterable();
|
6366
|
+
}
|
6367
|
+
return QueryBuilder.buildFOVQuery(activeConfig);
|
6087
6368
|
}
|
6088
|
-
}
|
6089
|
-
|
6090
|
-
|
6091
|
-
|
6092
|
-
|
6093
|
-
|
6369
|
+
}, {
|
6370
|
+
key: 'buildFOVQuery',
|
6371
|
+
value: function buildFOVQuery(activeConfig) {
|
6372
|
+
if (activeConfig.hasField()) {
|
6373
|
+
return scrivito.BasicObj.where(scrivito.attributeInflection.camelCase(activeConfig.field()), activeConfig.operator(), activeConfig.values());
|
6374
|
+
}
|
6375
|
+
}
|
6376
|
+
}, {
|
6377
|
+
key: 'addOrCreateQuery',
|
6378
|
+
value: function addOrCreateQuery(oldQuery, newQuery) {
|
6379
|
+
if (oldQuery) {
|
6380
|
+
return oldQuery.and(newQuery);
|
6381
|
+
}
|
6094
6382
|
return newQuery;
|
6095
6383
|
}
|
6096
|
-
};
|
6097
|
-
|
6098
|
-
QueryBuilder.prototype._hasSearchTerm = function() {
|
6099
|
-
return this.filter.searchTerm && this.filter.searchTerm.length > 0;
|
6100
|
-
};
|
6384
|
+
}]);
|
6101
6385
|
|
6102
6386
|
return QueryBuilder;
|
6387
|
+
}();
|
6103
6388
|
|
6104
|
-
|
6105
|
-
|
6106
|
-
module.exports = QueryBuilder;
|
6107
|
-
|
6389
|
+
exports.default = QueryBuilder;
|
6108
6390
|
|
6109
6391
|
/***/ },
|
6110
6392
|
/* 108 */
|
6111
6393
|
/***/ function(module, exports, __webpack_require__) {
|
6112
6394
|
|
6113
|
-
|
6395
|
+
'use strict';
|
6396
|
+
|
6397
|
+
Object.defineProperty(exports, "__esModule", {
|
6398
|
+
value: true
|
6399
|
+
});
|
6400
|
+
|
6401
|
+
var _inspector_header = __webpack_require__(109);
|
6114
6402
|
|
6115
|
-
|
6403
|
+
var _inspector_header2 = _interopRequireDefault(_inspector_header);
|
6116
6404
|
|
6117
|
-
|
6405
|
+
var _spinner = __webpack_require__(104);
|
6118
6406
|
|
6119
|
-
|
6407
|
+
var _spinner2 = _interopRequireDefault(_spinner);
|
6120
6408
|
|
6121
|
-
|
6409
|
+
var _obj = __webpack_require__(112);
|
6410
|
+
|
6411
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6412
|
+
|
6413
|
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
6414
|
+
|
6415
|
+
var Inspector = React.createClass({
|
6122
6416
|
displayName: 'Inspector',
|
6123
6417
|
propTypes: {
|
6124
6418
|
editingView: React.PropTypes.bool.isRequired,
|
@@ -6126,82 +6420,106 @@
|
|
6126
6420
|
selectedObjs: React.PropTypes.arrayOf(React.PropTypes.string).isRequired,
|
6127
6421
|
dispatch: React.PropTypes.func.isRequired
|
6128
6422
|
},
|
6129
|
-
|
6130
|
-
|
6423
|
+
|
6424
|
+
getInitialState: function getInitialState() {
|
6425
|
+
return { isLoaded: false };
|
6131
6426
|
},
|
6132
|
-
|
6133
|
-
|
6134
|
-
|
6135
|
-
return (_ref = scrivito.ConfirmDeleteDialog).open.apply(_ref, this.props.selectedObjs).then((function(_this) {
|
6136
|
-
return function(isConfirmed) {
|
6137
|
-
if (isConfirmed) {
|
6138
|
-
return _.each(scrivito.BasicObj.get(_this.props.selectedObjs), function(obj) {
|
6139
|
-
return _this.props.dispatch(objDeleted(obj.id));
|
6140
|
-
});
|
6141
|
-
}
|
6142
|
-
};
|
6143
|
-
})(this));
|
6427
|
+
componentWillUpdate: function componentWillUpdate(nextProps) {
|
6428
|
+
if (this.state.isLoaded && !_.isEqual(this.props.selectedObjs, nextProps.selectedObjs)) {
|
6429
|
+
this.setState({ isLoaded: false });
|
6144
6430
|
}
|
6145
6431
|
},
|
6146
|
-
render: function() {
|
6147
|
-
return React.createElement(
|
6148
|
-
|
6149
|
-
|
6150
|
-
|
6151
|
-
|
6152
|
-
|
6153
|
-
|
6154
|
-
|
6155
|
-
|
6156
|
-
|
6157
|
-
|
6158
|
-
|
6159
|
-
"name": "scrivito_inspector"
|
6160
|
-
}))) : React.createElement(InspectorHeader, {
|
6161
|
-
"editingView": this.props.editingView,
|
6162
|
-
"disableDelete": this.props.disableDelete,
|
6163
|
-
"dispatch": this.props.dispatch,
|
6164
|
-
"selectedObjs": this.props.selectedObjs,
|
6165
|
-
"deleteInspectedObjs": this._deleteInspectedObjs
|
6166
|
-
}) : void 0));
|
6167
|
-
}
|
6168
|
-
});
|
6169
|
-
|
6170
|
-
module.exports = Inspector;
|
6432
|
+
render: function render() {
|
6433
|
+
return React.createElement(
|
6434
|
+
'div',
|
6435
|
+
{ className: 'scrivito-content-browser-inspector' },
|
6436
|
+
this._renderContent()
|
6437
|
+
);
|
6438
|
+
},
|
6439
|
+
_renderContent: function _renderContent() {
|
6440
|
+
var _props = this.props,
|
6441
|
+
selectedObjs = _props.selectedObjs,
|
6442
|
+
editingView = _props.editingView,
|
6443
|
+
disableDelete = _props.disableDelete,
|
6444
|
+
dispatch = _props.dispatch;
|
6171
6445
|
|
6172
6446
|
|
6173
|
-
|
6174
|
-
|
6175
|
-
|
6447
|
+
if (!selectedObjs.length) {
|
6448
|
+
return null;
|
6449
|
+
}
|
6176
6450
|
|
6177
|
-
|
6451
|
+
if (selectedObjs.length === 1) {
|
6452
|
+
return React.createElement(
|
6453
|
+
'div',
|
6454
|
+
null,
|
6455
|
+
React.createElement(_inspector_header2.default, {
|
6456
|
+
editingView: editingView,
|
6457
|
+
disableDelete: disableDelete,
|
6458
|
+
dispatch: dispatch,
|
6459
|
+
selectedObjs: selectedObjs,
|
6460
|
+
deleteInspectedObjs: this._deleteInspectedObjs
|
6461
|
+
}),
|
6462
|
+
React.createElement(
|
6463
|
+
'div',
|
6464
|
+
{ className: 'inspector-content' },
|
6465
|
+
this._renderLoader(),
|
6466
|
+
React.createElement('iframe', {
|
6467
|
+
name: 'scrivito_inspector',
|
6468
|
+
className: this.state.isLoaded ? undefined : 'scrivito_hidden',
|
6469
|
+
src: this._detailsViewUrl(),
|
6470
|
+
onLoad: this._onLoad
|
6471
|
+
})
|
6472
|
+
)
|
6473
|
+
);
|
6474
|
+
}
|
6178
6475
|
|
6179
|
-
|
6180
|
-
|
6181
|
-
|
6182
|
-
|
6476
|
+
return React.createElement(_inspector_header2.default, {
|
6477
|
+
editingView: editingView,
|
6478
|
+
disableDelete: disableDelete,
|
6479
|
+
dispatch: dispatch,
|
6480
|
+
selectedObjs: selectedObjs,
|
6481
|
+
deleteInspectedObjs: this._deleteInspectedObjs
|
6482
|
+
});
|
6183
6483
|
},
|
6184
|
-
|
6185
|
-
|
6186
|
-
|
6187
|
-
|
6188
|
-
|
6189
|
-
|
6190
|
-
|
6191
|
-
|
6484
|
+
_renderLoader: function _renderLoader() {
|
6485
|
+
if (!this.state.isLoaded) {
|
6486
|
+
return React.createElement(_spinner2.default, null);
|
6487
|
+
}
|
6488
|
+
},
|
6489
|
+
_detailsViewUrl: function _detailsViewUrl() {
|
6490
|
+
return scrivito.details_url_for_obj_id(this.props.selectedObjs[0]);
|
6491
|
+
},
|
6492
|
+
_onLoad: function _onLoad() {
|
6493
|
+
this.setState({ isLoaded: true });
|
6494
|
+
},
|
6495
|
+
_deleteInspectedObjs: function _deleteInspectedObjs() {
|
6496
|
+
var _props2 = this.props,
|
6497
|
+
selectedObjs = _props2.selectedObjs,
|
6498
|
+
dispatch = _props2.dispatch;
|
6499
|
+
|
6500
|
+
if (selectedObjs.length) {
|
6501
|
+
var _scrivito$ConfirmDele;
|
6502
|
+
|
6503
|
+
(_scrivito$ConfirmDele = scrivito.ConfirmDeleteDialog).open.apply(_scrivito$ConfirmDele, _toConsumableArray(selectedObjs)).then(function (isConfirmed) {
|
6504
|
+
if (isConfirmed) {
|
6505
|
+
_.each(selectedObjs, function (objId) {
|
6506
|
+
return dispatch((0, _obj.objDeleted)(objId));
|
6507
|
+
});
|
6508
|
+
}
|
6509
|
+
});
|
6510
|
+
}
|
6192
6511
|
}
|
6193
6512
|
});
|
6194
6513
|
|
6195
|
-
|
6196
|
-
|
6514
|
+
exports.default = Inspector;
|
6197
6515
|
|
6198
6516
|
/***/ },
|
6199
|
-
/*
|
6517
|
+
/* 109 */
|
6200
6518
|
/***/ function(module, exports, __webpack_require__) {
|
6201
6519
|
|
6202
6520
|
var InspectorHeader, MaximizeInspectorToggle, toggleInspectorMaximized;
|
6203
6521
|
|
6204
|
-
MaximizeInspectorToggle = __webpack_require__(
|
6522
|
+
MaximizeInspectorToggle = __webpack_require__(110);
|
6205
6523
|
|
6206
6524
|
toggleInspectorMaximized = __webpack_require__(111).toggleInspectorMaximized;
|
6207
6525
|
|
@@ -6257,133 +6575,124 @@
|
|
6257
6575
|
|
6258
6576
|
|
6259
6577
|
/***/ },
|
6260
|
-
/*
|
6578
|
+
/* 110 */
|
6261
6579
|
/***/ function(module, exports) {
|
6262
6580
|
|
6263
|
-
var
|
6581
|
+
var MaximizeInspectorToggle;
|
6582
|
+
|
6583
|
+
MaximizeInspectorToggle = React.createClass({
|
6584
|
+
displayName: 'MaximizeInspectorToggle',
|
6585
|
+
_toggleMaximized: function() {
|
6586
|
+
return this.props.toggleInspectorMaximized();
|
6587
|
+
},
|
6588
|
+
render: function() {
|
6589
|
+
return React.createElement("span", {
|
6590
|
+
"className": "scrivito_move_left",
|
6591
|
+
"title": "Maximize details view",
|
6592
|
+
"onClick": this._toggleMaximized
|
6593
|
+
}, React.createElement("span", {
|
6594
|
+
"className": "scrivito_icon scrivito_icon_chevron_left"
|
6595
|
+
}));
|
6596
|
+
}
|
6597
|
+
});
|
6598
|
+
|
6599
|
+
module.exports = MaximizeInspectorToggle;
|
6264
6600
|
|
6265
|
-
MAXIMIZE_TOGGLE = 'MAXIMAZED_INSPECTOR_TOGGLE';
|
6266
6601
|
|
6267
|
-
|
6268
|
-
|
6269
|
-
|
6270
|
-
};
|
6271
|
-
};
|
6602
|
+
/***/ },
|
6603
|
+
/* 111 */
|
6604
|
+
/***/ function(module, exports) {
|
6272
6605
|
|
6273
|
-
|
6274
|
-
MAXIMIZE_TOGGLE: MAXIMIZE_TOGGLE,
|
6275
|
-
toggleInspectorMaximized: toggleInspectorMaximized
|
6276
|
-
};
|
6606
|
+
'use strict';
|
6277
6607
|
|
6608
|
+
Object.defineProperty(exports, "__esModule", {
|
6609
|
+
value: true
|
6610
|
+
});
|
6611
|
+
exports.toggleInspectorMaximized = toggleInspectorMaximized;
|
6612
|
+
var MAXIMIZE_TOGGLE = exports.MAXIMIZE_TOGGLE = 'MAXIMAZED_INSPECTOR_TOGGLE';
|
6613
|
+
|
6614
|
+
function toggleInspectorMaximized() {
|
6615
|
+
return { type: MAXIMIZE_TOGGLE };
|
6616
|
+
}
|
6278
6617
|
|
6279
6618
|
/***/ },
|
6280
6619
|
/* 112 */
|
6281
6620
|
/***/ function(module, exports, __webpack_require__) {
|
6282
6621
|
|
6283
|
-
|
6284
|
-
|
6285
|
-
LAST_ADDED = __webpack_require__(72).LAST_ADDED;
|
6286
|
-
|
6287
|
-
CREATE_OBJ_START = 'CREATE_OBJ_START';
|
6622
|
+
'use strict';
|
6288
6623
|
|
6289
|
-
|
6624
|
+
Object.defineProperty(exports, "__esModule", {
|
6625
|
+
value: true
|
6626
|
+
});
|
6627
|
+
exports.DELETE_OBJ_FINISH = exports.CREATE_OBJ_FAILED = exports.CREATE_OBJ_FINISH = exports.CREATE_OBJ_START = undefined;
|
6628
|
+
exports.createObjStart = createObjStart;
|
6629
|
+
exports.createObjFinish = createObjFinish;
|
6630
|
+
exports.createObjFailed = createObjFailed;
|
6631
|
+
exports.objDeleted = objDeleted;
|
6632
|
+
exports.createObj = createObj;
|
6633
|
+
|
6634
|
+
var _obj_source = __webpack_require__(72);
|
6635
|
+
|
6636
|
+
var CREATE_OBJ_START = exports.CREATE_OBJ_START = 'CREATE_OBJ_START';
|
6637
|
+
var CREATE_OBJ_FINISH = exports.CREATE_OBJ_FINISH = 'CREATE_OBJ_FINISH';
|
6638
|
+
var CREATE_OBJ_FAILED = exports.CREATE_OBJ_FAILED = 'CREATE_OBJ_FAILED';
|
6639
|
+
var DELETE_OBJ_FINISH = exports.DELETE_OBJ_FINISH = 'DELETE_OBJ_FINISH';
|
6640
|
+
|
6641
|
+
function createObjStart(additionId, filename) {
|
6642
|
+
return { type: CREATE_OBJ_START, additionId: additionId, filename: filename, progress: 10 };
|
6643
|
+
}
|
6290
6644
|
|
6291
|
-
|
6645
|
+
function createObjFinish(additionId, objId, isLastAddedVisible) {
|
6646
|
+
return { type: CREATE_OBJ_FINISH, additionId: additionId, objId: objId, isLastAddedVisible: isLastAddedVisible };
|
6647
|
+
}
|
6292
6648
|
|
6293
|
-
|
6649
|
+
function createObjFailed(additionId, message) {
|
6650
|
+
return { type: CREATE_OBJ_FAILED, additionId: additionId, message: message };
|
6651
|
+
}
|
6294
6652
|
|
6295
|
-
|
6296
|
-
|
6297
|
-
|
6298
|
-
|
6299
|
-
|
6300
|
-
progress: 10
|
6301
|
-
};
|
6302
|
-
};
|
6653
|
+
function getTagsAttributes(objClassName, activeTags) {
|
6654
|
+
if (activeTags.length > 0 && scrivito.hasTagsAttribute(objClassName)) {
|
6655
|
+
return { tags: activeTags };
|
6656
|
+
}
|
6657
|
+
}
|
6303
6658
|
|
6304
|
-
|
6305
|
-
|
6306
|
-
|
6307
|
-
|
6308
|
-
objId: objId,
|
6309
|
-
isLastAddedVisible: isLastAddedVisible
|
6310
|
-
};
|
6311
|
-
};
|
6659
|
+
function objDeleted(objId) {
|
6660
|
+
scrivito.delete_obj(objId);
|
6661
|
+
return { type: DELETE_OBJ_FINISH, objId: objId };
|
6662
|
+
}
|
6312
6663
|
|
6313
|
-
|
6314
|
-
|
6315
|
-
|
6316
|
-
|
6317
|
-
|
6318
|
-
};
|
6319
|
-
};
|
6664
|
+
function createObj() {
|
6665
|
+
var attributes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
6666
|
+
var basePreset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
6667
|
+
var preset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
6668
|
+
var activeTags = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
6320
6669
|
|
6321
|
-
|
6322
|
-
|
6323
|
-
return (objClass != null ? (_ref = objClass.attribute('tags')) != null ? _ref.type : void 0 : void 0) === 'stringlist';
|
6324
|
-
};
|
6670
|
+
return function (dispatch, getState) {
|
6671
|
+
var additionId = _.uniqueId('addition');
|
6325
6672
|
|
6326
|
-
|
6327
|
-
|
6328
|
-
objClass = scrivito.ObjClass.find(objClassName);
|
6329
|
-
if (activeTags.length > 0 && _hasCorrectTagAttribute(objClass)) {
|
6330
|
-
return {
|
6331
|
-
tags: activeTags
|
6332
|
-
};
|
6333
|
-
}
|
6334
|
-
};
|
6673
|
+
var objClassName = attributes._obj_class || preset._obj_class || basePreset._obj_class;
|
6674
|
+
var tags = getTagsAttributes(objClassName, activeTags) || {};
|
6335
6675
|
|
6336
|
-
|
6337
|
-
scrivito.delete_obj(objId);
|
6338
|
-
return {
|
6339
|
-
type: DELETE_OBJ_FINISH,
|
6340
|
-
objId: objId
|
6341
|
-
};
|
6342
|
-
};
|
6676
|
+
var extendedAtrributes = _.extend({}, basePreset, tags, preset, attributes);
|
6343
6677
|
|
6344
|
-
|
6345
|
-
|
6346
|
-
|
6347
|
-
|
6348
|
-
|
6349
|
-
|
6350
|
-
|
6351
|
-
|
6352
|
-
|
6353
|
-
|
6354
|
-
|
6355
|
-
|
6356
|
-
|
6357
|
-
|
6358
|
-
|
6359
|
-
additionId = _.uniqueId('addition');
|
6360
|
-
objClassName = attributes._obj_class || preset._obj_class || basePreset._obj_class;
|
6361
|
-
tags = _getTagsAttributes(objClassName, activeTags) || {};
|
6362
|
-
attributes = _.extend({}, basePreset, tags, preset, attributes);
|
6363
|
-
filename = (_ref = attributes.blob) != null ? _ref.name : void 0;
|
6364
|
-
dispatch(_createObjStart(additionId, filename));
|
6365
|
-
return scrivito.create_obj(attributes).then(function(obj) {
|
6366
|
-
var isLastAddedVisible;
|
6367
|
-
isLastAddedVisible = getState().objSource.activeSource === LAST_ADDED;
|
6368
|
-
return dispatch(_createObjFinish(additionId, obj.id, isLastAddedVisible));
|
6369
|
-
}).fail(function(error) {
|
6370
|
-
return dispatch(_createObjFailed(additionId, error != null ? error.message : void 0));
|
6678
|
+
var filename = void 0;
|
6679
|
+
if (extendedAtrributes.blob) {
|
6680
|
+
filename = extendedAtrributes.blob.name;
|
6681
|
+
}
|
6682
|
+
dispatch(createObjStart(additionId, filename));
|
6683
|
+
|
6684
|
+
return scrivito.create_obj(extendedAtrributes).then(function (obj) {
|
6685
|
+
var isLastAddedVisible = getState().objSource.activeSource === _obj_source.LAST_ADDED;
|
6686
|
+
dispatch(createObjFinish(additionId, obj.id, isLastAddedVisible));
|
6687
|
+
}).fail(function (error) {
|
6688
|
+
var message = void 0;
|
6689
|
+
if (error) {
|
6690
|
+
message = error.message;
|
6691
|
+
}
|
6692
|
+
dispatch(createObjFailed(additionId, message));
|
6371
6693
|
});
|
6372
6694
|
};
|
6373
|
-
}
|
6374
|
-
|
6375
|
-
module.exports = {
|
6376
|
-
CREATE_OBJ_START: CREATE_OBJ_START,
|
6377
|
-
CREATE_OBJ_FINISH: CREATE_OBJ_FINISH,
|
6378
|
-
CREATE_OBJ_FAILED: CREATE_OBJ_FAILED,
|
6379
|
-
DELETE_OBJ_FINISH: DELETE_OBJ_FINISH,
|
6380
|
-
_createObjStart: _createObjStart,
|
6381
|
-
_createObjFinish: _createObjFinish,
|
6382
|
-
_createObjFailed: _createObjFailed,
|
6383
|
-
createObj: createObj,
|
6384
|
-
objDeleted: objDeleted
|
6385
|
-
};
|
6386
|
-
|
6695
|
+
}
|
6387
6696
|
|
6388
6697
|
/***/ },
|
6389
6698
|
/* 113 */
|
@@ -6469,7 +6778,7 @@
|
|
6469
6778
|
|
6470
6779
|
thunkMiddleware = __webpack_require__(115);
|
6471
6780
|
|
6472
|
-
_ref = __webpack_require__(
|
6781
|
+
_ref = __webpack_require__(33), createStore = _ref.createStore, applyMiddleware = _ref.applyMiddleware;
|
6473
6782
|
|
6474
6783
|
combinedReducer = __webpack_require__(116);
|
6475
6784
|
|
@@ -6507,7 +6816,7 @@
|
|
6507
6816
|
|
6508
6817
|
var Redux, TagsReducer, combinedReducer, inspectorReducer, lastAddedReducer, objDisplayReducer, objLoadReducer, objSource, selectionReducer, sortCriteria;
|
6509
6818
|
|
6510
|
-
Redux = __webpack_require__(
|
6819
|
+
Redux = __webpack_require__(33);
|
6511
6820
|
|
6512
6821
|
inspectorReducer = __webpack_require__(117);
|
6513
6822
|
|
@@ -6653,7 +6962,7 @@
|
|
6653
6962
|
/* 119 */
|
6654
6963
|
/***/ function(module, exports, __webpack_require__) {
|
6655
6964
|
|
6656
|
-
var invariant = __webpack_require__(
|
6965
|
+
var invariant = __webpack_require__(54);
|
6657
6966
|
|
6658
6967
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
6659
6968
|
var splice = Array.prototype.splice;
|
@@ -6850,19 +7159,16 @@
|
|
6850
7159
|
});
|
6851
7160
|
exports.default = objDisplayReducer;
|
6852
7161
|
|
6853
|
-
var _obj_display = __webpack_require__(
|
7162
|
+
var _obj_display = __webpack_require__(21);
|
6854
7163
|
|
6855
7164
|
function objDisplayReducer(state, action) {
|
6856
|
-
if (!state) {
|
6857
|
-
state = { viewMode: _obj_display.THUMBNAIL_VIEW };
|
6858
|
-
}
|
6859
7165
|
switch (action.type) {
|
6860
7166
|
case _obj_display.SET_VIEW_MODE:
|
6861
7167
|
return { viewMode: action.viewMode };
|
6862
7168
|
default:
|
6863
|
-
return state;
|
7169
|
+
return state || { viewMode: _obj_display.THUMBNAIL_VIEW };
|
6864
7170
|
}
|
6865
|
-
}
|
7171
|
+
}
|
6866
7172
|
|
6867
7173
|
/***/ },
|
6868
7174
|
/* 121 */
|
@@ -6870,7 +7176,7 @@
|
|
6870
7176
|
|
6871
7177
|
var DEFAULT_NUMBER_TO_LOAD, FILTER, LOAD_MORE_OBJS, SET_OBJ_SOURCE, objLoadReducer, _ref, _ref1;
|
6872
7178
|
|
6873
|
-
_ref = __webpack_require__(
|
7179
|
+
_ref = __webpack_require__(106), LOAD_MORE_OBJS = _ref.LOAD_MORE_OBJS, DEFAULT_NUMBER_TO_LOAD = _ref.DEFAULT_NUMBER_TO_LOAD;
|
6874
7180
|
|
6875
7181
|
_ref1 = __webpack_require__(72), FILTER = _ref1.FILTER, SET_OBJ_SOURCE = _ref1.SET_OBJ_SOURCE;
|
6876
7182
|
|
@@ -6908,7 +7214,7 @@
|
|
6908
7214
|
|
6909
7215
|
var CHANGE_SORT_ORDER, DESC_SORT_ORDER, sortCriteriaReducer, _ref;
|
6910
7216
|
|
6911
|
-
_ref = __webpack_require__(
|
7217
|
+
_ref = __webpack_require__(55), CHANGE_SORT_ORDER = _ref.CHANGE_SORT_ORDER, DESC_SORT_ORDER = _ref.DESC_SORT_ORDER;
|
6912
7218
|
|
6913
7219
|
sortCriteriaReducer = function(state, action) {
|
6914
7220
|
if (state == null) {
|
@@ -6937,7 +7243,7 @@
|
|
6937
7243
|
|
6938
7244
|
var EXPAND_TOGGLE, TOGGLE_TAG, TagsReducer, defaultState, getActiveTags, _ref;
|
6939
7245
|
|
6940
|
-
_ref = __webpack_require__(
|
7246
|
+
_ref = __webpack_require__(105), EXPAND_TOGGLE = _ref.EXPAND_TOGGLE, TOGGLE_TAG = _ref.TOGGLE_TAG;
|
6941
7247
|
|
6942
7248
|
getActiveTags = function(currentActiveTags, actionTag) {
|
6943
7249
|
var activeTags;
|