Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
angular.forEach(columnElements, (columnElement) => {
const column = {};
if (hasAttribute(columnElement, 'name')) {
column.name = getAttribute(columnElement, 'name');
}
if (hasAttribute(columnElement, 'property')) {
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
}
.map((control) => {
// Get all ids available on controls
if (hasAttributeValue(control, 'id')) {
this.ids.push(getAttribute(control, 'id'));
}
return getAttribute(control, 'name');
})
.reduce((_controls_, name) => {
angular.forEach(columnElements, (columnElement) => {
const column = {};
if (hasAttribute(columnElement, 'name')) {
column.name = getAttribute(columnElement, 'name');
}
if (hasAttribute(columnElement, 'property')) {
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
}
}
if (!hasAttribute(columnElement, 'type')) {
column.type = 'string';
}
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});
angular.forEach(columnElements, (columnElement) => {
const column = {};
if (hasAttribute(columnElement, 'name')) {
column.name = getAttribute(columnElement, 'name');
}
if (hasAttribute(columnElement, 'property')) {
const propertyValue = getAttribute(columnElement, 'property');
column.name = column.name || propertyValue;
column.getValue = this.$parse(propertyValue);
// A column can be sorted only if it has a "property" attribute.
if (hasAttribute(columnElement, 'sortable')) {
const sortableValue = getAttribute(columnElement, 'sortable');
column.sortable = !!sortableValue;
const sorting = DatagridColumnBuilder.defineDefaultSorting(column, sortableValue);
Object.assign(currentSorting, sorting);
}
}
if (!hasAttribute(columnElement, 'type')) {
column.type = 'string';
.map((control) => {
// Get all ids available on controls
if (hasAttributeValue(control, 'id')) {
this.ids.push(getAttribute(control, 'id'));
}
return getAttribute(control, 'name');
})
.reduce((_controls_, name) => {
attributes.forEach((attributeName) => {
if (hasAttributeValue(controlElement, attributeName)) {
validationParameters[validationName] = getAttribute(controlElement, attributeName);
}
});
});
&& hasAttribute(columnElement, 'searchable');
if (column['type-options']) {
column.typeOptions = this.$parse(column['type-options'])($scope);
}
if (hasAttribute(columnElement, 'prevent-customization')) {
column.preventCustomization = true;
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
const titleValue = getAttribute(columnElement, 'title');
column.title = this.buildTitle(titleValue, $scope);
column.rawTitle = titleValue;
}
if (hasAttribute(columnElement, 'footer')) {
hasFooter = true;
column.footer = getAttribute(columnElement, 'footer');
}
if (!column.sortProperty) {
column.sortProperty = column.name;
}
const htmlTemplate = columnElement.innerHTML.trim();
if (!column.template && htmlTemplate.length) {
}
if (hasAttribute(columnElement, 'hidden')) {
column.hidden = true;
}
if (hasAttribute(columnElement, 'title')) {
const titleValue = getAttribute(columnElement, 'title');
column.title = this.buildTitle(titleValue, $scope);
column.rawTitle = titleValue;
}
if (hasAttribute(columnElement, 'footer')) {
hasFooter = true;
column.footer = getAttribute(columnElement, 'footer');
}
if (!column.sortProperty) {
column.sortProperty = column.name;
}
const htmlTemplate = columnElement.innerHTML.trim();
if (!column.template && htmlTemplate.length) {
column.template = htmlTemplate;
}
if (column.template) {
column.compiledTemplate = this.getColumnTemplate(column);
}
columns.push(column);
copyValueProperties.forEach((propertyName) => {
if (hasAttribute(columnElement, propertyName)) {
column[propertyName] = getAttribute(columnElement, propertyName);
}
});