@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
53 lines • 2.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var AttributeSortItemBuilder = /** @class */ (function () {
function AttributeSortItemBuilder(attributeIdentifier, direction) {
var _this = this;
this.aggregation = function (aggregation) {
_this.attributeSortItem.aggregation = aggregation;
return _this;
};
this.attributeSortItem = {
attributeIdentifier: attributeIdentifier,
direction: direction,
};
}
return AttributeSortItemBuilder;
}());
exports.AttributeSortItemBuilder = AttributeSortItemBuilder;
var MeasureSortItemBuilder = /** @class */ (function () {
function MeasureSortItemBuilder(measureIdentifier, direction) {
var _this = this;
this.attributeLocators = function () {
var attributeLocators = [];
for (var _i = 0; _i < arguments.length; _i++) {
attributeLocators[_i] = arguments[_i];
}
var _a;
(_a = _this.measureSortItem.locators).splice.apply(_a, [-2,
0].concat(attributeLocators.map(function (attributeLocatorItem) { return ({
attributeLocatorItem: attributeLocatorItem,
}); })));
return _this;
};
this.measureSortItem = {
direction: direction,
locators: [
{
measureLocatorItem: {
measureIdentifier: measureIdentifier,
},
},
],
};
}
return MeasureSortItemBuilder;
}());
exports.MeasureSortItemBuilder = MeasureSortItemBuilder;
exports.attributeSortItem = function (attributeIdentifier, direction) {
return new AttributeSortItemBuilder(attributeIdentifier, direction);
};
exports.measureSortItem = function (measureIdentifier, direction) {
return new MeasureSortItemBuilder(measureIdentifier, direction);
};
//# sourceMappingURL=sortBy.js.map