Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/grid

Package Overview
Dependencies
Maintainers
14
Versions
412
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/grid - npm Package Compare versions

Comparing version 23.1.0-alpha3 to 23.1.0-alpha4

18

package.json
{
"name": "@vaadin/grid",
"version": "23.1.0-alpha3",
"version": "23.1.0-alpha4",
"publishConfig": {

@@ -44,12 +44,12 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/checkbox": "23.1.0-alpha3",
"@vaadin/component-base": "23.1.0-alpha3",
"@vaadin/text-field": "23.1.0-alpha3",
"@vaadin/vaadin-lumo-styles": "23.1.0-alpha3",
"@vaadin/vaadin-material-styles": "23.1.0-alpha3",
"@vaadin/vaadin-themable-mixin": "23.1.0-alpha3"
"@vaadin/checkbox": "23.1.0-alpha4",
"@vaadin/component-base": "23.1.0-alpha4",
"@vaadin/text-field": "23.1.0-alpha4",
"@vaadin/vaadin-lumo-styles": "23.1.0-alpha4",
"@vaadin/vaadin-material-styles": "23.1.0-alpha4",
"@vaadin/vaadin-themable-mixin": "23.1.0-alpha4"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@vaadin/polymer-legacy-adapter": "23.1.0-alpha3",
"@vaadin/polymer-legacy-adapter": "23.1.0-alpha4",
"@vaadin/testing-helpers": "^0.3.2",

@@ -59,3 +59,3 @@ "lit": "^2.0.0",

},
"gitHead": "8c9e64e8dfa158dd52a9bf6da351ff038c88ca85"
"gitHead": "aacdb7fe09811894751f0378ff7fb66071892c71"
}

@@ -35,3 +35,3 @@ /**

'aria-rowcount',
size + this._a11yGetHeaderRowCount(_columnTree) + this._a11yGetFooterRowCount(_columnTree)
size + this._a11yGetHeaderRowCount(_columnTree) + this._a11yGetFooterRowCount(_columnTree),
);

@@ -47,3 +47,3 @@ this.$.table.setAttribute('aria-colcount', (bodyColumns && bodyColumns.length) || 0);

Array.from(this.$.header.children).forEach((headerRow, index) =>
headerRow.setAttribute('aria-rowindex', index + 1)
headerRow.setAttribute('aria-rowindex', index + 1),
);

@@ -55,3 +55,3 @@ }

Array.from(this.$.footer.children).forEach((footerRow, index) =>
footerRow.setAttribute('aria-rowindex', this._a11yGetHeaderRowCount(this._columnTree) + this.size + index + 1)
footerRow.setAttribute('aria-rowindex', this._a11yGetHeaderRowCount(this._columnTree) + this.size + index + 1),
);

@@ -143,4 +143,4 @@ }

asc: 'ascending',
desc: 'descending'
}[String(sorter.direction)] || 'none'
desc: 'descending',
}[String(sorter.direction)] || 'none',
);

@@ -147,0 +147,0 @@ }

@@ -9,3 +9,3 @@ /**

export declare function ActiveItemMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<ActiveItemMixinClass<TItem>>;

@@ -12,0 +12,0 @@

@@ -22,4 +22,4 @@ /**

notify: true,
value: null
}
value: null,
},
};

@@ -72,5 +72,5 @@ }

detail: {
model: this.__getRowModel(cell.parentElement)
}
})
model: this.__getRowModel(cell.parentElement),
},
}),
);

@@ -113,8 +113,8 @@ }

target.parentNode.querySelectorAll(
'[tabindex], button, input, select, textarea, object, iframe, label, a[href], area[href]'
)
'[tabindex], button, input, select, textarea, object, iframe, label, a[href], area[href]',
),
).filter((element) => element.getAttribute('part') !== 'cell body-cell');
const isFocusableElement = focusables.indexOf(target) !== -1;
const isFocusableElement = focusables.includes(target);
return !target.disabled && isFocusableElement;
};

@@ -9,3 +9,3 @@ /**

export declare function ArrayDataProviderMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<ArrayDataProviderMixinClass<TItem>>;

@@ -12,0 +12,0 @@

@@ -20,3 +20,3 @@ /**

*/
items: Array
items: Array,
};

@@ -36,3 +36,3 @@ }

size: items.length,
dataProvider: arrayDataProvider
dataProvider: arrayDataProvider,
});

@@ -54,3 +54,3 @@ }

_arrayDataProvider: undefined,
items: undefined
items: undefined,
});

@@ -62,3 +62,3 @@ } else if (!items) {

dataProvider: undefined,
size: 0
size: 0,
});

@@ -65,0 +65,0 @@ this.clearCache();

@@ -55,3 +55,3 @@ /**

return this._getChildColumns(this);
}
},
},

@@ -65,3 +65,3 @@

type: Number,
readOnly: true
readOnly: true,
},

@@ -74,3 +74,3 @@

type: String,
readOnly: true
readOnly: true,
},

@@ -85,3 +85,3 @@

/** @private */
_rootColumns: Array
_rootColumns: Array,
};

@@ -101,3 +101,3 @@ }

'_groupReorderStatusChanged(_reorderStatus, _rootColumns)',
'_groupResizableChanged(resizable, _rootColumns)'
'_groupResizableChanged(resizable, _rootColumns)',
];

@@ -116,3 +116,5 @@ }

super.disconnectedCallback();
this._observer && this._observer.disconnect();
if (this._observer) {
this._observer.disconnect();
}
}

@@ -228,14 +230,7 @@

if (this._visibleChildColumns.length) {
this._setWidth(
'calc(' +
Array.prototype.reduce
.call(
this._visibleChildColumns,
(prev, curr) => (prev += ' + ' + (curr.width || '0px').replace('calc', '')),
''
)
.substring(3) +
')'
);
if (this._visibleChildColumns.length > 0) {
const width = this._visibleChildColumns
.reduce((prev, curr) => (prev += ` + ${(curr.width || '0px').replace('calc', '')}`), '')
.substring(3);
this._setWidth(`calc(${width})`);
} else {

@@ -300,7 +295,11 @@ this._setWidth('0px');

headerCell.setAttribute('colspan', colSpan);
this._grid && this._grid._a11yUpdateCellColspan(headerCell, colSpan);
if (this._grid) {
this._grid._a11yUpdateCellColspan(headerCell, colSpan);
}
}
if (footerCell) {
footerCell.setAttribute('colspan', colSpan);
this._grid && this._grid._a11yUpdateCellColspan(footerCell, colSpan);
if (this._grid) {
this._grid._a11yUpdateCellColspan(footerCell, colSpan);
}
}

@@ -332,3 +331,5 @@ }

microTask.run(() => {
this._grid && this._grid._updateColumnTree && this._grid._updateColumnTree();
if (this._grid && this._grid._updateColumnTree) {
this._grid._updateColumnTree();
}
});

@@ -335,0 +336,0 @@ }

@@ -9,3 +9,3 @@ /**

export declare function ColumnReorderingMixin<T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<ColumnReorderingMixinClass>;

@@ -12,0 +12,0 @@

@@ -23,3 +23,3 @@ /**

type: Boolean,
value: false
value: false,
},

@@ -30,4 +30,4 @@

type: Number,
value: 10000000
}
value: 10000000,
},
};

@@ -65,4 +65,4 @@ }

x: e.touches[0].clientX,
y: e.touches[0].clientY
}
y: e.touches[0].clientY,
},
});

@@ -190,5 +190,5 @@ }, 100);

detail: {
columns: this._getColumnsInOrder()
}
})
columns: this._getColumnsInOrder(),
},
}),
);

@@ -268,3 +268,3 @@ }

'flex-direction',
'overflow'
'overflow',
].forEach((propertyName) => (ghost.style[propertyName] = style[propertyName]));

@@ -341,3 +341,3 @@ return ghost;

const targetCell = Array.from(this.$.header.querySelectorAll('tr:not([hidden]) [part~="cell"]')).filter((cell) =>
targetColumn.contains(cell._column)
targetColumn.contains(cell._column),
)[0];

@@ -344,0 +344,0 @@ const sourceCellRect = this.$.header

@@ -24,3 +24,3 @@ /**

'contextmenu',
(e) => e.target.getAttribute('part') == 'resize-handle' && e.preventDefault()
(e) => e.target.getAttribute('part') === 'resize-handle' && e.preventDefault(),
);

@@ -31,3 +31,3 @@

'mousedown',
(e) => e.target.getAttribute('part') === 'resize-handle' && e.preventDefault()
(e) => e.target.getAttribute('part') === 'resize-handle' && e.preventDefault(),
);

@@ -47,10 +47,6 @@ }

while (column.localName === 'vaadin-grid-column-group') {
column = Array.prototype.slice
.call(column._childColumns, 0)
.sort(function (a, b) {
return a._order - b._order;
})
.filter(function (column) {
return !column.hidden;
})
column = column._childColumns
.slice(0)
.sort((a, b) => a._order - b._order)
.filter((column) => !column.hidden)
.pop();

@@ -86,3 +82,3 @@ }

column.width = Math.max(minWidth, maxWidth) + 'px';
column.width = `${Math.max(minWidth, maxWidth)}px`;
column.flexGrow = 0;

@@ -92,8 +88,6 @@ }

columnRowCells
.sort(function (a, b) {
return a._column._order - b._column._order;
})
.forEach(function (cell, index, array) {
.sort((a, b) => a._column._order - b._column._order)
.forEach((cell, index, array) => {
if (index < array.indexOf(targetCell)) {
cell._column.width = cell.offsetWidth + 'px';
cell._column.width = `${cell.offsetWidth}px`;
cell._column.flexGrow = 0;

@@ -119,4 +113,4 @@ }

new CustomEvent('column-resize', {
detail: { resizedColumn: column }
})
detail: { resizedColumn: column },
}),
);

@@ -123,0 +117,0 @@ }

@@ -12,3 +12,3 @@ /**

column: GridColumn<TItem>,
model: GridItemModel<TItem>
model: GridItemModel<TItem>,
) => void;

@@ -21,3 +21,3 @@

export declare function ColumnBaseMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<ColumnBaseMixinClass<TItem>>;

@@ -24,0 +24,0 @@

@@ -35,3 +35,3 @@ /**

return false;
}
},
},

@@ -46,3 +46,3 @@

type: Boolean,
value: false
value: false,
},

@@ -62,3 +62,3 @@

type: Boolean,
value: false
value: false,
},

@@ -71,3 +71,3 @@

type: Boolean,
value: false
value: false,
},

@@ -79,3 +79,3 @@

header: {
type: String
type: String,
},

@@ -90,3 +90,3 @@

textAlign: {
type: String
type: String,
},

@@ -100,3 +100,3 @@

type: Boolean,
value: false
value: false,
},

@@ -110,3 +110,3 @@

type: Boolean,
value: false
value: false,
},

@@ -145,3 +145,3 @@

type: Boolean,
value: true
value: true,
},

@@ -169,3 +169,3 @@

type: Function,
computed: '_computeHeaderRenderer(headerRenderer, header, __initialized)'
computed: '_computeHeaderRenderer(headerRenderer, header, __initialized)',
},

@@ -193,3 +193,3 @@

type: Function,
computed: '_computeFooterRenderer(footerRenderer, __initialized)'
computed: '_computeFooterRenderer(footerRenderer, __initialized)',
},

@@ -205,4 +205,4 @@

type: Boolean,
value: true
}
value: true,
},
};

@@ -226,3 +226,3 @@ }

'_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells.*)',
'_hiddenChanged(hidden, _headerCell, _footerCell, _cells.*)'
'_hiddenChanged(hidden, _headerCell, _footerCell, _cells.*)',
];

@@ -283,3 +283,3 @@ }

_findHostGrid() {
// eslint-disable-next-line @typescript-eslint/no-this-alias
// eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this
let el = this;

@@ -354,3 +354,5 @@ // Custom elements extending grid must have a specific localName

this._grid && this._grid._frozenCellsChanged && this._grid._frozenCellsChanged();
if (this._grid && this._grid._frozenCellsChanged) {
this._grid._frozenCellsChanged();
}
}

@@ -372,3 +374,5 @@

this._grid && this._grid._frozenCellsChanged && this._grid._frozenCellsChanged();
if (this._grid && this._grid._frozenCellsChanged) {
this._grid._frozenCellsChanged();
}
}

@@ -496,7 +500,12 @@

}
}
},
);
this._grid._updateFrozenColumn && this._grid._updateFrozenColumn();
this._grid._resetKeyboardNavigation && this._grid._resetKeyboardNavigation();
if (this._grid._updateFrozenColumn) {
this._grid._updateFrozenColumn();
}
if (this._grid._resetKeyboardNavigation) {
this._grid._resetKeyboardNavigation();
}
}

@@ -629,3 +638,5 @@ this._previousHidden = hidden;

__setTextContent(node, textContent) {
node.textContent !== textContent && (node.textContent = textContent);
if (node.textContent !== textContent) {
node.textContent = textContent;
}
}

@@ -752,3 +763,3 @@

type: String,
value: '100px'
value: '100px',
},

@@ -763,3 +774,3 @@

type: Number,
value: 1
value: 1,
},

@@ -795,3 +806,3 @@

type: Function,
computed: '_computeRenderer(renderer, __initialized)'
computed: '_computeRenderer(renderer, __initialized)',
},

@@ -804,3 +815,3 @@

path: {
type: String
type: String,
},

@@ -827,3 +838,3 @@

type: Boolean,
value: false
value: false,
},

@@ -835,3 +846,3 @@

*/
_cells: Array
_cells: Array,
};

@@ -838,0 +849,0 @@ }

@@ -33,3 +33,3 @@ /**

params: GridDataProviderParams<TItem>,
callback: GridDataProviderCallback<TItem>
callback: GridDataProviderCallback<TItem>,
) => void;

@@ -61,3 +61,3 @@

export declare function DataProviderMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<DataProviderMixinClass<TItem>>;

@@ -64,0 +64,0 @@

@@ -45,3 +45,3 @@ /**

return this.itemCaches[index].isLoading();
})[0]
})[0],
);

@@ -117,3 +117,3 @@ }

type: Number,
notify: true
notify: true,
},

@@ -129,3 +129,3 @@

value: 50,
observer: '_pageSizeChanged'
observer: '_pageSizeChanged',
},

@@ -159,3 +159,3 @@

notify: true,
observer: '_dataProviderChanged'
observer: '_dataProviderChanged',
},

@@ -170,3 +170,3 @@

readOnly: true,
reflectToAttribute: true
reflectToAttribute: true,
},

@@ -183,3 +183,3 @@

return cache;
}
},
},

@@ -192,3 +192,3 @@

type: Boolean,
value: false
value: false,
},

@@ -202,3 +202,3 @@

type: String,
value: 'children'
value: 'children',
},

@@ -212,3 +212,3 @@

type: String,
value: null
value: null,
},

@@ -223,3 +223,3 @@

notify: true,
value: () => []
value: () => [],
},

@@ -232,4 +232,4 @@

type: Object,
value: () => new Set()
}
value: () => new Set(),
},
};

@@ -367,3 +367,3 @@ }

filters: this._mapFilters(),
parentItem: cache.parentItem
parentItem: cache.parentItem,
};

@@ -458,3 +458,3 @@

' to the `size` property, or provide the total number of items' +
' in the second argument of the `dataProvider`’s `callback` call.'
' in the second argument of the `dataProvider`’s `callback` call.',
);

@@ -475,3 +475,3 @@ }

timeOut.after(2000),
this._checkSize.bind(this)
this._checkSize.bind(this),
);

@@ -478,0 +478,0 @@ }

@@ -16,3 +16,3 @@ /**

export declare function DragAndDropMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<DragAndDropMixinClass<TItem>>;

@@ -19,0 +19,0 @@

@@ -10,3 +10,3 @@ /**

ON_TOP_OR_BETWEEN: 'on-top-or-between',
ON_GRID: 'on-grid'
ON_GRID: 'on-grid',
};

@@ -18,3 +18,3 @@

BELOW: 'below',
EMPTY: 'empty'
EMPTY: 'empty',
};

@@ -84,4 +84,4 @@

__dndAutoScrollThreshold: {
value: 50
}
value: 50,
},
};

@@ -168,4 +168,4 @@ }

setDragData: (type, data) => e.dataTransfer.setData(type, data),
setDraggedItemsCount: (count) => row.setAttribute('dragstart', count)
}
setDraggedItemsCount: (count) => row.setAttribute('dragstart', count),
},
});

@@ -320,3 +320,3 @@ event.originalEvent = e;

type,
data: e.dataTransfer.getData(type)
data: e.dataTransfer.getData(type),
};

@@ -333,4 +333,4 @@ });

dropLocation: this._dropLocation,
dragData
}
dragData,
},
});

@@ -337,0 +337,0 @@ event.originalEvent = e;

@@ -11,2 +11,21 @@ /**

function arrayEquals(arr1, arr2) {
if (!arr1 || !arr2 || arr1.length !== arr2.length) {
return false;
}
for (let i = 0, l = arr1.length; i < l; i++) {
// Check if we have nested arrays
if (arr1[i] instanceof Array && arr2[i] instanceof Array) {
// recurse into the nested arrays
if (!arrayEquals(arr1[i], arr2[i])) {
return false;
}
} else if (arr1[i] !== arr2[i]) {
return false;
}
}
return true;
}
/**

@@ -22,3 +41,3 @@ * @polymerMixin

*/
_columnTree: Object
_columnTree: Object,
};

@@ -84,3 +103,3 @@ }

const columnTree = this._getColumnTree();
if (!this._arrayEquals(columnTree, this._columnTree)) {
if (!arrayEquals(columnTree, this._columnTree)) {
this._columnTree = columnTree;

@@ -107,3 +126,3 @@ }

timeOut.after(2000),
this._checkImports.bind(this)
this._checkImports.bind(this),
);

@@ -115,22 +134,2 @@

/** @private */
_arrayEquals(arr1, arr2) {
if (!arr1 || !arr2 || arr1.length != arr2.length) {
return false;
}
for (let i = 0, l = arr1.length; i < l; i++) {
// Check if we have nested arrays
if (arr1[i] instanceof Array && arr2[i] instanceof Array) {
// recurse into the nested arrays
if (!this._arrayEquals(arr1[i], arr2[i])) {
return false;
}
} else if (arr1[i] != arr2[i]) {
return false;
}
}
return true;
}
/** @protected */

@@ -145,3 +144,3 @@ _checkImports() {

'vaadin-grid-sort-column',
'vaadin-grid-sorter'
'vaadin-grid-sorter',
].forEach((elementName) => {

@@ -148,0 +147,0 @@ const element = this.querySelector(elementName);

@@ -21,3 +21,3 @@ /**

export declare function EventContextMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<EventContextMixinClass<TItem>>;

@@ -24,0 +24,0 @@

@@ -44,3 +44,3 @@ /**

context.section = ['body', 'header', 'footer', 'details'].filter(
(section) => cell.getAttribute('part').indexOf(section) > -1
(section) => cell.getAttribute('part').indexOf(section) > -1,
)[0];

@@ -47,0 +47,0 @@

@@ -37,3 +37,3 @@ /**

*/
header: String
header: String,
};

@@ -40,0 +40,0 @@ }

@@ -19,4 +19,4 @@ /**

return [];
}
}
},
},
};

@@ -41,3 +41,3 @@ }

__removeFilters(filtersToRemove) {
if (filtersToRemove.length == 0) {
if (filtersToRemove.length === 0) {
return;

@@ -74,3 +74,3 @@ }

path: filter.path,
value: filter.value
value: filter.value,
};

@@ -77,0 +77,0 @@ });

@@ -57,3 +57,3 @@ /**

listener: (this: GridFilter, ev: GridFilterEventMap[K]) => void,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): void;

@@ -64,3 +64,3 @@

listener: (this: GridFilter, ev: GridFilterEventMap[K]) => void,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): void;

@@ -67,0 +67,0 @@ }

@@ -74,7 +74,7 @@ /**

type: String,
notify: true
notify: true,
},
/** @private */
_connected: Boolean
_connected: Boolean,
};

@@ -81,0 +81,0 @@ }

@@ -17,3 +17,3 @@ /**

type: Object,
observer: '_focusableChanged'
observer: '_focusableChanged',
},

@@ -27,3 +27,3 @@

type: Object,
observer: '_focusableChanged'
observer: '_focusableChanged',
},

@@ -34,3 +34,3 @@

type: Object,
observer: '_focusableChanged'
observer: '_focusableChanged',
},

@@ -47,3 +47,3 @@

type: Number,
value: 0
value: 0,
},

@@ -71,4 +71,4 @@

readOnly: true,
observer: '_interactingChanged'
}
observer: '_interactingChanged',
},
};

@@ -469,3 +469,3 @@ }

dstRow: [...activeRowGroup.children].find((el) => !el.hidden && el.index === dstRowIndex),
dstIsRowDetails
dstIsRowDetails,
};

@@ -520,3 +520,3 @@ }

.slice(0)
.sort((b, a) => Math.abs(b - this._focusedColumnOrder) - Math.abs(a - this._focusedColumnOrder))[0]
.sort((b, a) => Math.abs(b - this._focusedColumnOrder) - Math.abs(a - this._focusedColumnOrder))[0],
);

@@ -601,3 +601,3 @@

this._footerFocusable,
this.$.focusexit
this.$.focusexit,
];

@@ -647,3 +647,3 @@

const focusedItemRow = Array.from(this.$.items.children).find(
(row) => !row.hidden && row.index === this._focusedItemIndex
(row) => !row.hidden && row.index === this._focusedItemIndex,
);

@@ -674,5 +674,5 @@ if (focusedItemRow) {

detail: {
model: this.__getRowModel(isRow ? element : element.parentElement)
}
})
model: this.__getRowModel(isRow ? element : element.parentElement),
},
}),
);

@@ -748,3 +748,3 @@ }

cell.dispatchEvent(
new CustomEvent('cell-focus', { bubbles: true, composed: true, detail: { context: context } })
new CustomEvent('cell-focus', { bubbles: true, composed: true, detail: { context: context } }),
);

@@ -934,3 +934,3 @@ }

row,
cell
cell,
};

@@ -937,0 +937,0 @@ }

@@ -12,7 +12,7 @@ /**

grid?: Grid<TItem>,
model?: GridItemModel<TItem>
model?: GridItemModel<TItem>,
) => void;
export declare function RowDetailsMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<RowDetailsMixinClass<TItem>>;

@@ -19,0 +19,0 @@

@@ -22,3 +22,3 @@ /**

return [];
}
},
},

@@ -49,4 +49,4 @@

_detailsCells: {
type: Array
}
type: Array,
},
};

@@ -58,3 +58,3 @@ }

'_detailsOpenedItemsChanged(detailsOpenedItems.*, rowDetailsRenderer)',
'_rowDetailsRendererChanged(rowDetailsRenderer)'
'_rowDetailsRendererChanged(rowDetailsRenderer)',
];

@@ -61,0 +61,0 @@ }

@@ -11,3 +11,3 @@ /**

const timeouts = {
SCROLLING: 500
SCROLLING: 500,
};

@@ -28,3 +28,3 @@

type: Array,
value: () => []
value: () => [],
},

@@ -38,7 +38,7 @@

type: Array,
value: () => []
value: () => [],
},
/** @private */
_rowWithFocusedElement: Element
_rowWithFocusedElement: Element,
};

@@ -189,3 +189,3 @@ }

this.setAttribute('overflow', value);
} else if (value.length == 0 && this.hasAttribute('overflow')) {
} else if (value.length === 0 && this.hasAttribute('overflow')) {
this.removeAttribute('overflow');

@@ -199,3 +199,3 @@ }

this._debouncerCacheElements = Debouncer.debounce(this._debouncerCacheElements, microTask, () => {
Array.from(this.shadowRoot.querySelectorAll('[part~="cell"]')).forEach(function (cell) {
Array.from(this.shadowRoot.querySelectorAll('[part~="cell"]')).forEach((cell) => {
cell.style.transform = '';

@@ -279,5 +279,5 @@ });

if (this.hasAttribute('navigating') && this.__rowFocusMode) {
this.$.table.style.setProperty('--_grid-horizontal-scroll-position', -x + 'px');
this.$.table.style.setProperty('--_grid-horizontal-scroll-position', `${-x}px`);
}
}
};

@@ -60,3 +60,3 @@ /**

listener: (this: GridSelectionColumn<TItem>, ev: GridSelectionColumnEventMap[K]) => void,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): void;

@@ -67,3 +67,3 @@

listener: (this: GridSelectionColumn<TItem>, ev: GridSelectionColumnEventMap[K]) => void,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): void;

@@ -70,0 +70,0 @@ }

@@ -45,3 +45,3 @@ /**

type: String,
value: '58px'
value: '58px',
},

@@ -56,3 +56,3 @@

type: Number,
value: 0
value: 0,
},

@@ -68,3 +68,3 @@

value: false,
notify: true
notify: true,
},

@@ -79,3 +79,3 @@

type: Boolean,
value: false
value: false,
},

@@ -94,3 +94,3 @@

/** @private */
__selectAllHidden: Boolean
__selectAllHidden: Boolean,
};

@@ -102,3 +102,3 @@ }

'__onSelectAllChanged(selectAll)',
'_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, selectAll, __indeterminate, __selectAllHidden)'
'_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, selectAll, __indeterminate, __selectAllHidden)',
];

@@ -299,3 +299,3 @@ }

sortOrders: [],
filters: this._grid._mapFilters()
filters: this._grid._mapFilters(),
};

@@ -302,0 +302,0 @@ this._grid.dataProvider(params, (items) => callback(items));

@@ -9,3 +9,3 @@ /**

export declare function SelectionMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<SelectionMixinClass<TItem>>;

@@ -12,0 +12,0 @@

@@ -21,4 +21,4 @@ /**

notify: true,
value: () => []
}
value: () => [],
},
};

@@ -25,0 +25,0 @@ }

@@ -52,3 +52,3 @@ /**

listener: (this: GridSortColumn<TItem>, ev: GridSortColumnEventMap[K]) => void,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): void;

@@ -59,3 +59,3 @@

listener: (this: GridSortColumn<TItem>, ev: GridSortColumnEventMap[K]) => void,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): void;

@@ -62,0 +62,0 @@ }

@@ -44,4 +44,4 @@ /**

type: String,
notify: true
}
notify: true,
},
};

@@ -48,0 +48,0 @@ }

@@ -21,3 +21,3 @@ /**

type: Boolean,
value: false
value: false,
},

@@ -33,3 +33,3 @@

return [];
}
},
},

@@ -42,4 +42,4 @@

return [];
}
}
},
},
};

@@ -64,3 +64,3 @@ }

__removeSorters(sortersToRemove) {
if (sortersToRemove.length == 0) {
if (sortersToRemove.length === 0) {
return;

@@ -96,3 +96,3 @@ }

} else if (sorter.direction) {
const otherSorters = this._sorters.filter((s) => s != sorter);
const otherSorters = this._sorters.filter((s) => s !== sorter);
this._sorters = [sorter];

@@ -130,3 +130,3 @@ otherSorters.forEach((sorter) => {

path: sorter.path,
direction: sorter.direction
direction: sorter.direction,
};

@@ -133,0 +133,0 @@ });

@@ -79,3 +79,3 @@ /**

listener: (this: GridSorter, ev: GridSorterEventMap[K]) => void,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): void;

@@ -86,3 +86,3 @@

listener: (this: GridSorter, ev: GridSorterEventMap[K]) => void,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): void;

@@ -89,0 +89,0 @@ }

@@ -139,3 +139,3 @@ /**

notify: true,
value: null
value: null,
},

@@ -149,3 +149,3 @@

type: Number,
value: null
value: null,
},

@@ -156,4 +156,4 @@

type: Boolean,
observer: '__isConnectedChanged'
}
observer: '__isConnectedChanged',
},
};

@@ -160,0 +160,0 @@ }

@@ -324,3 +324,3 @@ /**

`,
{ moduleId: 'vaadin-grid-styles' }
{ moduleId: 'vaadin-grid-styles' },
);

@@ -13,3 +13,3 @@ /**

export declare function StylingMixin<TItem, T extends Constructor<HTMLElement>>(
base: T
base: T,
): T & Constructor<StylingMixinClass<TItem>>;

@@ -16,0 +16,0 @@

@@ -32,3 +32,3 @@ /**

*/
cellClassNameGenerator: Function
cellClassNameGenerator: Function,
};

@@ -35,0 +35,0 @@ }

@@ -41,4 +41,4 @@ /**

type: String,
observer: '_itemHasChildrenPathChanged'
}
observer: '_itemHasChildrenPathChanged',
},
};

@@ -93,3 +93,3 @@ }

console.warn(
`WARNING: Since Vaadin 23, itemHasChildrenPath on <vaadin-grid-tree-column> is deprecated. Please set this property on the <vaadin-grid> instead.`
`WARNING: Since Vaadin 23, itemHasChildrenPath on <vaadin-grid-tree-column> is deprecated. Please set this property on the <vaadin-grid> instead.`,
);

@@ -96,0 +96,0 @@

@@ -88,3 +88,3 @@ /**

listener: (this: GridTreeToggle, ev: GridTreeToggleEventMap[K]) => void,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): void;

@@ -95,3 +95,3 @@

listener: (this: GridTreeToggle, ev: GridTreeToggleEventMap[K]) => void,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): void;

@@ -98,0 +98,0 @@ }

@@ -157,3 +157,3 @@ /**

value: 0,
observer: '_levelChanged'
observer: '_levelChanged',
},

@@ -168,3 +168,3 @@

value: false,
reflectToAttribute: true
reflectToAttribute: true,
},

@@ -180,4 +180,4 @@

reflectToAttribute: true,
notify: true
}
notify: true,
},
};

@@ -184,0 +184,0 @@ }

@@ -20,3 +20,3 @@ /**

GridSorterDefinition,
GridSorterDirection
GridSorterDirection,
} from './vaadin-grid-data-provider-mixin.js';

@@ -27,3 +27,3 @@ import {

GridDropLocation,
GridDropMode
GridDropMode,
} from './vaadin-grid-drag-and-drop-mixin.js';

@@ -51,3 +51,3 @@ import { EventContextMixinClass, GridEventContext } from './vaadin-grid-event-context-mixin.js';

GridSorterDefinition,
GridSorterDirection
GridSorterDirection,
};

@@ -385,3 +385,3 @@

listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
options?: boolean | AddEventListenerOptions
options?: boolean | AddEventListenerOptions,
): void;

@@ -392,3 +392,3 @@

listener: (this: Grid<TItem>, ev: GridEventMap<TItem>[K]) => void,
options?: boolean | EventListenerOptions
options?: boolean | EventListenerOptions,
): void;

@@ -395,0 +395,0 @@ }

@@ -261,17 +261,17 @@ /**

ColumnResizingMixin(
EventContextMixin(DragAndDropMixin(StylingMixin(TabindexMixin(PolymerElement))))
)
)
)
)
)
)
)
)
)
)
)
)
)
)
EventContextMixin(DragAndDropMixin(StylingMixin(TabindexMixin(PolymerElement)))),
),
),
),
),
),
),
),
),
),
),
),
),
),
),
) {

@@ -308,3 +308,3 @@ static get template() {

'_columnTreeChanged(_columnTree, _columnTree.*)',
'_effectiveSizeChanged(_effectiveSize, __virtualizer, _hasData, _columnTree)'
'_effectiveSizeChanged(_effectiveSize, __virtualizer, _hasData, _columnTree)',
];

@@ -318,3 +318,3 @@ }

type: Boolean,
value: isSafari
value: isSafari,
},

@@ -325,3 +325,3 @@

type: Boolean,
value: isIOS
value: isIOS,
},

@@ -332,3 +332,3 @@

type: Boolean,
value: isFirefox
value: isFirefox,
},

@@ -339,3 +339,3 @@

type: Boolean,
value: isAndroid
value: isAndroid,
},

@@ -346,3 +346,3 @@

type: Boolean,
value: isTouch
value: isTouch,
},

@@ -361,3 +361,3 @@

value: false,
reflectToAttribute: true
reflectToAttribute: true,
},

@@ -368,3 +368,3 @@

type: Boolean,
value: true
value: true,
},

@@ -374,3 +374,3 @@

isAttached: {
value: false
value: false,
},

@@ -386,4 +386,4 @@

type: Boolean,
value: true
}
value: true,
},
};

@@ -461,3 +461,3 @@ }

scrollTarget: this.$.table,
reorderElements: true
reorderElements: true,
});

@@ -488,3 +488,3 @@

item: cell.parentElement._item,
column: cell._column
column: cell._column,
};

@@ -498,3 +498,5 @@ }

const cell = row && [...row.children].find((cell) => cell._column === column);
cell && cell.focus();
if (cell) {
cell.focus();
}
}

@@ -514,3 +516,5 @@

// If the focused cell's parent row got hidden by the size change, focus the corresponding new cell
cellCoordinates && cell.parentElement.hidden && this.__focusBodyCell(cellCoordinates);
if (cellCoordinates && cell.parentElement.hidden) {
this.__focusBodyCell(cellCoordinates);
}

@@ -644,3 +648,3 @@ // Make sure the body has a tabbable element

this._columnTree[this._columnTree.length - 1].forEach(
(c) => c.isConnected && c.notifyPath && c.notifyPath('_cells.*', c._cells)
(c) => c.isConnected && c.notifyPath && c.notifyPath('_cells.*', c._cells),
);

@@ -661,3 +665,3 @@ }

const contentId = (this._contentIndex = this._contentIndex + 1 || 0);
const slotName = 'vaadin-grid-cell-content-' + contentId;
const slotName = `vaadin-grid-cell-content-${contentId}`;

@@ -689,3 +693,3 @@ const cellContent = document.createElement('vaadin-grid-cell-content');

// Only focus if mouse is released on cell content itself
const mouseUpWithinCell = cellContent.contains(event.target);
const mouseUpWithinCell = event.composedPath().includes(cellContent);
if (!contentContainsFocusedElement && mouseUpWithinCell) {

@@ -871,3 +875,3 @@ cell.focus();

Array.from(this.$.items.children).forEach((row) =>
this._updateRow(row, columnTree[columnTree.length - 1], null, false, true)
this._updateRow(row, columnTree[columnTree.length - 1], null, false, true),
);

@@ -894,7 +898,7 @@

Array.from(this.$.header.children).forEach((headerRow, index) =>
this._updateRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1)
this._updateRow(headerRow, columnTree[index], 'header', index === columnTree.length - 1),
);
Array.from(this.$.footer.children).forEach((footerRow, index) =>
this._updateRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0)
this._updateRow(footerRow, columnTree[columnTree.length - 1 - index], 'footer', index === 0),
);

@@ -975,4 +979,2 @@

this.__scrollToPendingIndex();
// This needs to be set programmatically in order to avoid an iOS 10 bug (disappearing grid)
this.$.table.style.webkitOverflowScrolling = 'touch';
});

@@ -994,3 +996,3 @@ }

selected: this._isSelected(row._item),
detailsOpened: !!this.rowDetailsRenderer && this._isDetailsOpened(row._item)
detailsOpened: !!this.rowDetailsRenderer && this._isDetailsOpened(row._item),
};

@@ -1026,3 +1028,5 @@ }

__updateVisibleRows(start, end) {
this.__virtualizer && this.__virtualizer.update(start, end);
if (this.__virtualizer) {
this.__virtualizer.update(start, end);
}
}

@@ -1041,3 +1045,3 @@

console.warn(
`WARNING: Since Vaadin 22, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.`
`WARNING: Since Vaadin 22, notifyResize() is deprecated. The component uses a ResizeObserver internally and doesn't need to be explicitly notified of resizes.`,
);

@@ -1044,0 +1048,0 @@ }

@@ -52,3 +52,3 @@ import '@vaadin/vaadin-lumo-styles/color.js';

`,
{ moduleId: 'lumo-grid-sorter' }
{ moduleId: 'lumo-grid-sorter' },
);

@@ -396,3 +396,3 @@ import '@vaadin/vaadin-lumo-styles/color.js';

`,
{ moduleId: 'lumo-grid' }
{ moduleId: 'lumo-grid' },
);

@@ -407,3 +407,3 @@

`,
{ moduleId: 'vaadin-grid-select-all-checkbox-lumo' }
{ moduleId: 'vaadin-grid-select-all-checkbox-lumo' },
);

@@ -111,3 +111,3 @@ import '@vaadin/vaadin-lumo-styles/color.js';

`,
{ moduleId: 'lumo-grid-tree-toggle' }
{ moduleId: 'lumo-grid-tree-toggle' },
);

@@ -71,3 +71,3 @@ import '@vaadin/vaadin-material-styles/color.js';

`,
{ moduleId: 'material-grid-sorter' }
{ moduleId: 'material-grid-sorter' },
);

@@ -270,3 +270,3 @@ import '@vaadin/vaadin-material-styles/color.js';

`,
{ moduleId: 'material-grid' }
{ moduleId: 'material-grid' },
);

@@ -41,3 +41,3 @@ import '@vaadin/vaadin-material-styles/color.js';

`,
{ moduleId: 'material-grid-tree-toggle' }
{ moduleId: 'material-grid-tree-toggle' },
);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc