`;
class PositionableFeature extends beanStub_1.BeanStub {
wireBeans(beans) {
this.popupSvc = beans.popupSvc;
this.dragSvc = beans.dragSvc;
}
constructor(element, config) {
super();
this.element = element;
this.dragStartPosition = {
x: 0,
y: 0,
};
this.position = {
x: 0,
y: 0,
};
this.lastSize = {
width: -1,
height: -1,
};
this.positioned = false;
this.resizersAdded = false;
this.resizeListeners = [];
this.boundaryEl = null;
this.isResizing = false;
this.isMoving = false;
this.resizable = {};
this.movable = false;
this.currentResizer = null;
this.config = Object.assign({}, { popup: false }, config);
}
center() {
const { clientHeight, clientWidth } = this.offsetParent;
const x = clientWidth / 2 - this.getWidth() / 2;
const y = clientHeight / 2 - this.getHeight() / 2;
this.offsetElement(x, y);
}
initialisePosition() {
if (this.positioned) {
return;
}
const { centered, forcePopupParentAsOffsetParent, minWidth, width, minHeight, height, x, y } = this.config;
if (!this.offsetParent) {
this.setOffsetParent();
}
let computedMinHeight = 0;
let computedMinWidth = 0;
// here we don't use the main offset parent but the element's offsetParent
// in order to calculated the minWidth and minHeight correctly
const isElementVisible = (0, dom_1._isVisible)(this.element);
if (isElementVisible) {
const boundaryEl = this.findBoundaryElement();
const offsetParentComputedStyles = window.getComputedStyle(boundaryEl);
if (offsetParentComputedStyles.minWidth != null) {
const paddingWidth = boundaryEl.offsetWidth - this.element.offsetWidth;
computedMinWidth = parseInt(offsetParentComputedStyles.minWidth, 10) - paddingWidth;
}
if (offsetParentComputedStyles.minHeight != null) {
const paddingHeight = boundaryEl.offsetHeight - this.element.offsetHeight;
computedMinHeight = parseInt(offsetParentComputedStyles.minHeight, 10) - paddingHeight;
}
}
this.minHeight = minHeight || computedMinHeight;
this.minWidth = minWidth || computedMinWidth;
if (width) {
this.setWidth(width);
}
if (height) {
this.setHeight(height);
}
if (!width || !height) {
this.refreshSize();
}
if (centered) {
this.center();
}
else if (x || y) {
this.offsetElement(x, y);
}
else if (isElementVisible && forcePopupParentAsOffsetParent) {
let boundaryEl = this.boundaryEl;
let initialisedDuringPositioning = true;
if (!boundaryEl) {
boundaryEl = this.findBoundaryElement();
initialisedDuringPositioning = false;
}
if (boundaryEl) {
const top = parseFloat(boundaryEl.style.top);
const left = parseFloat(boundaryEl.style.left);
if (initialisedDuringPositioning) {
this.offsetElement(isNaN(left) ? 0 : left, isNaN(top) ? 0 : top);
}
else {
this.setPosition(left, top);
}
}
}
this.positioned = !!this.offsetParent;
}
isPositioned() {
return this.positioned;
}
getPosition() {
return this.position;
}
setMovable(movable, moveElement) {
if (!this.config.popup || movable === this.movable) {
return;
}
this.movable = movable;
const params = this.moveElementDragListener || {
eElement: moveElement,
onDragStart: this.onMoveStart.bind(this),
onDragging: this.onMove.bind(this),
onDragStop: this.onMoveEnd.bind(this),
};
if (movable) {
this.dragSvc?.addDragSource(params);
this.moveElementDragListener = params;
}
else {
this.dragSvc?.removeDragSource(params);
this.moveElementDragListener = undefined;
}
}
setResizable(resizable) {
this.clearResizeListeners();
if (resizable) {
this.addResizers();
}
else {
this.removeResizers();
}
if (typeof resizable === 'boolean') {
if (resizable === false) {
return;
}
resizable = {
topLeft: resizable,
top: resizable,
topRight: resizable,
right: resizable,
bottomRight: resizable,
bottom: resizable,
bottomLeft: resizable,
left: resizable,
};
}
Object.keys(resizable).forEach((side) => {
const resizableStructure = resizable;
const isSideResizable = !!resizableStructure[side];
const resizerEl = this.getResizerElement(side);
const params = {
dragStartPixels: 0,
eElement: resizerEl,
onDragStart: (e) => this.onResizeStart(e, side),
onDragging: this.onResize.bind(this),
onDragStop: (e) => this.onResizeEnd(e, side),
};
if (isSideResizable || (!this.isAlive() && !isSideResizable)) {
if (isSideResizable) {
this.dragSvc?.addDragSource(params);
this.resizeListeners.push(params);
resizerEl.style.pointerEvents = 'all';
}
else {
resizerEl.style.pointerEvents = 'none';
}
this.resizable[side] = isSideResizable;
}
});
}
removeSizeFromEl() {
this.element.style.removeProperty('height');
this.element.style.removeProperty('width');
this.element.style.removeProperty('flex');
}
restoreLastSize() {
this.element.style.flex = '0 0 auto';
const { height, width } = this.lastSize;
if (width !== -1) {
this.element.style.width = `${width}px`;
}
if (height !== -1) {
this.element.style.height = `${height}px`;
}
}
getHeight() {
return this.element.offsetHeight;
}
setHeight(height) {
const { popup } = this.config;
const eGui = this.element;
let isPercent = false;
if (typeof height === 'string' && height.indexOf('%') !== -1) {
(0, dom_1._setFixedHeight)(eGui, height);
height = (0, dom_1._getAbsoluteHeight)(eGui);
isPercent = true;
}
else {
height = Math.max(this.minHeight, height);
if (this.positioned) {
const availableHeight = this.getAvailableHeight();
if (availableHeight && height > availableHeight) {
height = availableHeight;
}
}
}
if (this.getHeight() === height) {
return;
}
if (!isPercent) {
if (popup) {
(0, dom_1._setFixedHeight)(eGui, height);
}
else {
eGui.style.height = `${height}px`;
eGui.style.flex = '0 0 auto';
this.lastSize.height = typeof height === 'number' ? height : parseFloat(height);
}
}
else {
eGui.style.maxHeight = 'unset';
eGui.style.minHeight = 'unset';
}
}
getAvailableHeight() {
const { popup, forcePopupParentAsOffsetParent } = this.config;
if (!this.positioned) {
this.initialisePosition();
}
const { clientHeight } = this.offsetParent;
if (!clientHeight) {
return null;
}
const elRect = this.element.getBoundingClientRect();
const offsetParentRect = this.offsetParent.getBoundingClientRect();
const yPosition = popup ? this.position.y : elRect.top;
const parentTop = popup ? 0 : offsetParentRect.top;
// When `forcePopupParentAsOffsetParent`, there may be elements that appear after the resizable element, but aren't included in the height.
// Take these into account here
let additionalHeight = 0;
if (forcePopupParentAsOffsetParent) {
const parentEl = this.element.parentElement;
if (parentEl) {
const { bottom } = parentEl.getBoundingClientRect();
additionalHeight = bottom - elRect.bottom;
}
}
const availableHeight = clientHeight + parentTop - yPosition - additionalHeight;
return availableHeight;
}
getWidth() {
return this.element.offsetWidth;
}
setWidth(width) {
const eGui = this.element;
const { popup } = this.config;
let isPercent = false;
if (typeof width === 'string' && width.indexOf('%') !== -1) {
(0, dom_1._setFixedWidth)(eGui, width);
width = (0, dom_1._getAbsoluteWidth)(eGui);
isPercent = true;
}
else if (this.positioned) {
width = Math.max(this.minWidth, width);
const { clientWidth } = this.offsetParent;
const xPosition = popup ? this.position.x : this.element.getBoundingClientRect().left;
if (clientWidth && width + xPosition > clientWidth) {
width = clientWidth - xPosition;
}
}
if (this.getWidth() === width) {
return;
}
if (!isPercent) {
if (this.config.popup) {
(0, dom_1._setFixedWidth)(eGui, width);
}
else {
eGui.style.width = `${width}px`;
eGui.style.flex = ' unset';
this.lastSize.width = typeof width === 'number' ? width : parseFloat(width);
}
}
else {
eGui.style.maxWidth = 'unset';
eGui.style.minWidth = 'unset';
}
}
offsetElement(x = 0, y = 0) {
const { forcePopupParentAsOffsetParent } = this.config;
const ePopup = forcePopupParentAsOffsetParent ? this.boundaryEl : this.element;
if (!ePopup) {
return;
}
this.popupSvc?.positionPopup({
ePopup,
keepWithinBounds: true,
skipObserver: this.movable || this.isResizable(),
updatePosition: () => ({ x, y }),
});
this.setPosition(parseFloat(ePopup.style.left), parseFloat(ePopup.style.top));
}
constrainSizeToAvailableHeight(constrain) {
if (!this.config.forcePopupParentAsOffsetParent) {
return;
}
const applyMaxHeightToElement = () => {
const availableHeight = this.getAvailableHeight();
this.element.style.setProperty('max-height', `${availableHeight}px`);
};
if (constrain && this.popupSvc) {
this.resizeObserverSubscriber = (0, dom_1._observeResize)(this.beans, this.popupSvc?.getPopupParent(), applyMaxHeightToElement);
}
else {
this.element.style.removeProperty('max-height');
if (this.resizeObserverSubscriber) {
this.resizeObserverSubscriber();
this.resizeObserverSubscriber = undefined;
}
}
}
setPosition(x, y) {
this.position.x = x;
this.position.y = y;
}
updateDragStartPosition(x, y) {
this.dragStartPosition = { x, y };
}
calculateMouseMovement(params) {
const { e, isLeft, isTop, anywhereWithin, topBuffer } = params;
const xDiff = e.clientX - this.dragStartPosition.x;
const yDiff = e.clientY - this.dragStartPosition.y;
const movementX = this.shouldSkipX(e, !!isLeft, !!anywhereWithin, xDiff) ? 0 : xDiff;
const movementY = this.shouldSkipY(e, !!isTop, topBuffer, yDiff) ? 0 : yDiff;
return { movementX, movementY };
}
shouldSkipX(e, isLeft, anywhereWithin, diff) {
const elRect = this.element.getBoundingClientRect();
const parentRect = this.offsetParent.getBoundingClientRect();
const boundaryElRect = this.boundaryEl.getBoundingClientRect();
const xPosition = this.config.popup ? this.position.x : elRect.left;
// skip if cursor is outside of popupParent horizontally
let skipX = (xPosition <= 0 && parentRect.left >= e.clientX) ||
(parentRect.right <= e.clientX && parentRect.right <= boundaryElRect.right);
if (skipX) {
return true;
}
if (isLeft) {
skipX =
// skip if we are moving to the left and the cursor
// is positioned to the right of the left side anchor
(diff < 0 && e.clientX > xPosition + parentRect.left) ||
// skip if we are moving to the right and the cursor
// is positioned to the left of the dialog
(diff > 0 && e.clientX < xPosition + parentRect.left);
}
else {
if (anywhereWithin) {
// if anywhereWithin is true, we allow to move
// as long as the cursor is within the dialog
skipX =
(diff < 0 && e.clientX > boundaryElRect.right) ||
(diff > 0 && e.clientX < xPosition + parentRect.left);
}
else {
skipX =
// if the movement is bound to the right side of the dialog
// we skip if we are moving to the left and the cursor
// is to the right of the dialog
(diff < 0 && e.clientX > boundaryElRect.right) ||
// or skip if we are moving to the right and the cursor
// is to the left of the right side anchor
(diff > 0 && e.clientX < boundaryElRect.right);
}
}
return skipX;
}
shouldSkipY(e, isTop, topBuffer = 0, diff) {
const elRect = this.element.getBoundingClientRect();
const parentRect = this.offsetParent.getBoundingClientRect();
const boundaryElRect = this.boundaryEl.getBoundingClientRect();
const yPosition = this.config.popup ? this.position.y : elRect.top;
// skip if cursor is outside of popupParent vertically
let skipY = (yPosition <= 0 && parentRect.top >= e.clientY) ||
(parentRect.bottom <= e.clientY && parentRect.bottom <= boundaryElRect.bottom);
if (skipY) {
return true;
}
if (isTop) {
skipY =
// skip if we are moving to towards top and the cursor is
// below the top anchor + topBuffer
// note: topBuffer is used when moving the dialog using the title bar
(diff < 0 && e.clientY > yPosition + parentRect.top + topBuffer) ||
// skip if we are moving to the bottom and the cursor is
// above the top anchor
(diff > 0 && e.clientY < yPosition + parentRect.top);
}
else {
skipY =
// skip if we are moving towards the top and the cursor
// is below the bottom anchor
(diff < 0 && e.clientY > boundaryElRect.bottom) ||
// skip if we are moving towards the bottom and the cursor
// is above the bottom anchor
(diff > 0 && e.clientY < boundaryElRect.bottom);
}
return skipY;
}
createResizeMap() {
const eGui = this.element;
this.resizerMap = {
topLeft: { element: eGui.querySelector('[data-ref=eTopLeftResizer]') },
top: { element: eGui.querySelector('[data-ref=eTopResizer]') },
topRight: { element: eGui.querySelector('[data-ref=eTopRightResizer]') },
right: { element: eGui.querySelector('[data-ref=eRightResizer]') },
bottomRight: { element: eGui.querySelector('[data-ref=eBottomRightResizer]') },
bottom: { element: eGui.querySelector('[data-ref=eBottomResizer]') },
bottomLeft: { element: eGui.querySelector('[data-ref=eBottomLeftResizer]') },
left: { element: eGui.querySelector('[data-ref=eLeftResizer]') },
};
}
addResizers() {
if (this.resizersAdded) {
return;
}
const eGui = this.element;
if (!eGui) {
return;
}
const parser = new DOMParser();
const resizers = parser.parseFromString(RESIZE_TEMPLATE, 'text/html').body;
eGui.appendChild(resizers.firstChild);
this.createResizeMap();
this.resizersAdded = true;
}
removeResizers() {
this.resizerMap = undefined;
const resizerEl = this.element.querySelector(`.${RESIZE_CONTAINER_STYLE}`);
if (resizerEl) {
this.element.removeChild(resizerEl);
}
this.resizersAdded = false;
}
getResizerElement(side) {
return this.resizerMap[side].element;
}
onResizeStart(e, side) {
this.boundaryEl = this.findBoundaryElement();
if (!this.positioned) {
this.initialisePosition();
}
this.currentResizer = {
isTop: !!side.match(/top/i),
isRight: !!side.match(/right/i),
isBottom: !!side.match(/bottom/i),
isLeft: !!side.match(/left/i),
};
this.element.classList.add('ag-resizing');
this.resizerMap[side].element.classList.add('ag-active');
const { popup, forcePopupParentAsOffsetParent } = this.config;
if (!popup && !forcePopupParentAsOffsetParent) {
this.applySizeToSiblings(this.currentResizer.isBottom || this.currentResizer.isTop);
}
this.isResizing = true;
this.updateDragStartPosition(e.clientX, e.clientY);
}
getSiblings() {
const element = this.element;
const parent = element.parentElement;
if (!parent) {
return null;
}
return Array.prototype.slice
.call(parent.children)
.filter((el) => !el.classList.contains('ag-hidden'));
}
getMinSizeOfSiblings() {
const siblings = this.getSiblings() || [];
let height = 0;
let width = 0;
for (let i = 0; i < siblings.length; i++) {
const currentEl = siblings[i];
const isFlex = !!currentEl.style.flex && currentEl.style.flex !== '0 0 auto';
if (currentEl === this.element) {
continue;
}
let nextHeight = this.minHeight || 0;
let nextWidth = this.minWidth || 0;
if (isFlex) {
const computedStyle = window.getComputedStyle(currentEl);
if (computedStyle.minHeight) {
nextHeight = parseInt(computedStyle.minHeight, 10);
}
if (computedStyle.minWidth) {
nextWidth = parseInt(computedStyle.minWidth, 10);
}
}
else {
nextHeight = currentEl.offsetHeight;
nextWidth = currentEl.offsetWidth;
}
height += nextHeight;
width += nextWidth;
}
return { height, width };
}
applySizeToSiblings(vertical) {
let containerToFlex = null;
const siblings = this.getSiblings();
if (!siblings) {
return;
}
for (let i = 0; i < siblings.length; i++) {
const el = siblings[i];
if (el === containerToFlex) {
continue;
}
if (vertical) {
el.style.height = `${el.offsetHeight}px`;
}
else {
el.style.width = `${el.offsetWidth}px`;
}
el.style.flex = '0 0 auto';
if (el === this.element) {
containerToFlex = siblings[i + 1];
}
}
if (containerToFlex) {
containerToFlex.style.removeProperty('height');
containerToFlex.style.removeProperty('min-height');
containerToFlex.style.removeProperty('max-height');
containerToFlex.style.flex = '1 1 auto';
}
}
isResizable() {
return Object.values(this.resizable).some((value) => value);
}
onResize(e) {
if (!this.isResizing || !this.currentResizer) {
return;
}
const { popup, forcePopupParentAsOffsetParent } = this.config;
const { isTop, isRight, isBottom, isLeft } = this.currentResizer;
const isHorizontal = isRight || isLeft;
const isVertical = isBottom || isTop;
const { movementX, movementY } = this.calculateMouseMovement({ e, isLeft, isTop });
const xPosition = this.position.x;
const yPosition = this.position.y;
let offsetLeft = 0;
let offsetTop = 0;
if (isHorizontal && movementX) {
const direction = isLeft ? -1 : 1;
const oldWidth = this.getWidth();
const newWidth = oldWidth + movementX * direction;
let skipWidth = false;
if (isLeft) {
offsetLeft = oldWidth - newWidth;
if (xPosition + offsetLeft <= 0 || newWidth <= this.minWidth) {
skipWidth = true;
offsetLeft = 0;
}
}
if (!skipWidth) {
this.setWidth(newWidth);
}
}
if (isVertical && movementY) {
const direction = isTop ? -1 : 1;
const oldHeight = this.getHeight();
const newHeight = oldHeight + movementY * direction;
let skipHeight = false;
if (isTop) {
offsetTop = oldHeight - newHeight;
if (yPosition + offsetTop <= 0 || newHeight <= this.minHeight) {
skipHeight = true;
offsetTop = 0;
}
}
else {
// do not let the size of all siblings be higher than the parent container
if (!this.config.popup &&
!this.config.forcePopupParentAsOffsetParent &&
oldHeight < newHeight &&
this.getMinSizeOfSiblings().height + newHeight > this.element.parentElement.offsetHeight) {
skipHeight = true;
}
}
if (!skipHeight) {
this.setHeight(newHeight);
}
}
this.updateDragStartPosition(e.clientX, e.clientY);
if (((popup || forcePopupParentAsOffsetParent) && offsetLeft) || offsetTop) {
this.offsetElement(xPosition + offsetLeft, yPosition + offsetTop);
}
}
onResizeEnd(e, side) {
this.isResizing = false;
this.currentResizer = null;
this.boundaryEl = null;
this.element.classList.remove('ag-resizing');
this.resizerMap[side].element.classList.remove('ag-active');
this.dispatchLocalEvent({ type: 'resize' });
}
refreshSize() {
const eGui = this.element;
if (this.config.popup) {
if (!this.config.width) {
this.setWidth(eGui.offsetWidth);
}
if (!this.config.height) {
this.setHeight(eGui.offsetHeight);
}
}
}
onMoveStart(e) {
this.boundaryEl = this.findBoundaryElement();
if (!this.positioned) {
this.initialisePosition();
}
this.isMoving = true;
this.element.classList.add('ag-moving');
this.updateDragStartPosition(e.clientX, e.clientY);
}
onMove(e) {
if (!this.isMoving) {
return;
}
const { x, y } = this.position;
let topBuffer;
if (this.config.calculateTopBuffer) {
topBuffer = this.config.calculateTopBuffer();
}
const { movementX, movementY } = this.calculateMouseMovement({
e,
isTop: true,
anywhereWithin: true,
topBuffer,
});
this.offsetElement(x + movementX, y + movementY);
this.updateDragStartPosition(e.clientX, e.clientY);
}
onMoveEnd() {
this.isMoving = false;
this.boundaryEl = null;
this.element.classList.remove('ag-moving');
}
setOffsetParent() {
if (this.config.forcePopupParentAsOffsetParent && this.popupSvc) {
this.offsetParent = this.popupSvc.getPopupParent();
}
else {
this.offsetParent = this.element.offsetParent;
}
}
findBoundaryElement() {
let el = this.element;
while (el) {
if (window.getComputedStyle(el).position !== 'static') {
return el;
}
el = el.parentElement;
}
return this.element;
}
clearResizeListeners() {
while (this.resizeListeners.length) {
const params = this.resizeListeners.pop();
this.dragSvc?.removeDragSource(params);
}
}
destroy() {
super.destroy();
if (this.moveElementDragListener) {
this.dragSvc?.removeDragSource(this.moveElementDragListener);
}
this.constrainSizeToAvailableHeight(false);
this.clearResizeListeners();
this.removeResizers();
}
}
exports.PositionableFeature = PositionableFeature;
/***/ }),
/***/ 8703:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SetLeftFeature = void 0;
const beanStub_1 = __webpack_require__(8731);
const agColumnGroup_1 = __webpack_require__(6908);
const gridOptionsUtils_1 = __webpack_require__(7274);
const aria_1 = __webpack_require__(5230);
const array_1 = __webpack_require__(1502);
const generic_1 = __webpack_require__(4422);
class SetLeftFeature extends beanStub_1.BeanStub {
constructor(columnOrGroup, eCell, beans, colsSpanning) {
super();
this.columnOrGroup = columnOrGroup;
this.eCell = eCell;
this.colsSpanning = colsSpanning;
this.columnOrGroup = columnOrGroup;
this.ariaEl = eCell.querySelector('[role=columnheader]') || eCell;
this.beans = beans;
}
setColsSpanning(colsSpanning) {
this.colsSpanning = colsSpanning;
this.onLeftChanged();
}
getColumnOrGroup() {
const { beans, colsSpanning } = this;
if (beans.gos.get('enableRtl') && colsSpanning) {
return (0, array_1._last)(colsSpanning);
}
return this.columnOrGroup;
}
postConstruct() {
const onLeftChanged = this.onLeftChanged.bind(this);
this.addManagedListeners(this.columnOrGroup, { leftChanged: onLeftChanged });
this.setLeftFirstTime();
// when in print layout, the left position is also dependent on the width of the pinned sections.
// so additionally update left if any column width changes.
this.addManagedEventListeners({ displayedColumnsWidthChanged: onLeftChanged });
// setting left has a dependency on print layout
this.addManagedPropertyListener('domLayout', onLeftChanged);
}
setLeftFirstTime() {
const { gos, colAnimation } = this.beans;
const suppressMoveAnimation = gos.get('suppressColumnMoveAnimation');
const oldLeftExists = (0, generic_1._exists)(this.columnOrGroup.getOldLeft());
const animateColumnMove = colAnimation?.isActive() && oldLeftExists && !suppressMoveAnimation;
if (animateColumnMove) {
this.animateInLeft();
}
else {
this.onLeftChanged();
}
}
animateInLeft() {
const colOrGroup = this.getColumnOrGroup();
const oldActualLeft = this.modifyLeftForPrintLayout(colOrGroup, colOrGroup.getOldLeft());
const actualLeft = this.modifyLeftForPrintLayout(colOrGroup, colOrGroup.getLeft());
this.setLeft(oldActualLeft);
// we must keep track of the left we want to set to, as this would otherwise lead to a race
// condition, if the user changed the left value many times in one VM turn, then we want to make
// make sure the actualLeft we set in the timeout below (in the next VM turn) is the correct left
// position. eg if user changes column position twice, then setLeft() below executes twice in next
// VM turn, but only one (the correct one) should get applied.
this.actualLeft = actualLeft;
this.beans.colAnimation.executeNextVMTurn(() => {
// test this left value is the latest one to be applied, and if not, do nothing
if (this.actualLeft === actualLeft) {
this.setLeft(actualLeft);
}
});
}
onLeftChanged() {
const colOrGroup = this.getColumnOrGroup();
const left = colOrGroup.getLeft();
this.actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);
this.setLeft(this.actualLeft);
}
modifyLeftForPrintLayout(colOrGroup, leftPosition) {
const { gos, visibleCols } = this.beans;
const printLayout = (0, gridOptionsUtils_1._isDomLayout)(gos, 'print');
if (!printLayout) {
return leftPosition;
}
if (colOrGroup.getPinned() === 'left') {
return leftPosition;
}
const leftWidth = visibleCols.getColsLeftWidth();
if (colOrGroup.getPinned() === 'right') {
const bodyWidth = visibleCols.bodyWidth;
return leftWidth + bodyWidth + leftPosition;
}
// is in body
return leftWidth + leftPosition;
}
setLeft(value) {
// if the value is null, then that means the column is no longer
// displayed. there is logic in the rendering to fade these columns
// out, so we don't try and change their left positions.
if ((0, generic_1._exists)(value)) {
this.eCell.style.left = `${value}px`;
}
if ((0, agColumnGroup_1.isColumnGroup)(this.columnOrGroup)) {
const children = this.columnOrGroup.getLeafColumns();
if (!children.length) {
return;
}
if (children.length > 1) {
(0, aria_1._setAriaColSpan)(this.ariaEl, children.length);
}
}
}
}
exports.SetLeftFeature = SetLeftFeature;
/***/ }),
/***/ 6105:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LoadingOverlayComponent = void 0;
const generic_1 = __webpack_require__(4422);
const overlayComponent_1 = __webpack_require__(4679);
class LoadingOverlayComponent extends overlayComponent_1.OverlayComponent {
init() {
const customTemplate = (0, generic_1._makeNull)(this.gos.get('overlayLoadingTemplate')?.trim());
this.setTemplate(customTemplate ??
/* html */ ``);
if (!customTemplate) {
const localeTextFunc = this.getLocaleTextFunc();
// setTimeout is used because some screen readers only announce `aria-live` text when
// there is a "text change", so we force a change from empty.
setTimeout(() => {
this.getGui().textContent = localeTextFunc('loadingOoo', 'Loading...');
});
}
}
}
exports.LoadingOverlayComponent = LoadingOverlayComponent;
/***/ }),
/***/ 5233:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.NoRowsOverlayComponent = void 0;
const generic_1 = __webpack_require__(4422);
const overlayComponent_1 = __webpack_require__(4679);
class NoRowsOverlayComponent extends overlayComponent_1.OverlayComponent {
init() {
const customTemplate = (0, generic_1._makeNull)(this.gos.get('overlayNoRowsTemplate')?.trim());
this.setTemplate(customTemplate ?? /* html */ ``);
if (!customTemplate) {
const localeTextFunc = this.getLocaleTextFunc();
// setTimeout is used because some screen readers only announce `aria-live` text when
// there is a "text change", so we force a change from empty.
setTimeout(() => {
this.getGui().textContent = localeTextFunc('noRowsToShow', 'No Rows To Show');
});
}
}
}
exports.NoRowsOverlayComponent = NoRowsOverlayComponent;
/***/ }),
/***/ 7896:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.hideOverlay = exports.showNoRowsOverlay = exports.showLoadingOverlay = void 0;
function showLoadingOverlay(beans) {
beans.overlays?.showLoadingOverlay();
}
exports.showLoadingOverlay = showLoadingOverlay;
function showNoRowsOverlay(beans) {
beans.overlays?.showNoRowsOverlay();
}
exports.showNoRowsOverlay = showNoRowsOverlay;
function hideOverlay(beans) {
beans.overlays?.hideOverlay();
}
exports.hideOverlay = hideOverlay;
/***/ }),
/***/ 4679:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OverlayComponent = void 0;
const component_1 = __webpack_require__(8020);
class OverlayComponent extends component_1.Component {
constructor() {
super();
}
}
exports.OverlayComponent = OverlayComponent;
/***/ }),
/***/ 5366:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OverlayModule = void 0;
const version_1 = __webpack_require__(7205);
const loadingOverlayComponent_1 = __webpack_require__(6105);
const noRowsOverlayComponent_1 = __webpack_require__(5233);
const overlayApi_1 = __webpack_require__(7896);
const overlayService_1 = __webpack_require__(2351);
/**
* @feature Accessories -> Overlays
* @gridOption loading, overlayLoadingTemplate, loadingOverlayComponent, overlayNoRowsTemplate, noRowsOverlayComponent
*/
exports.OverlayModule = {
moduleName: 'Overlay',
version: version_1.VERSION,
userComponents: {
agLoadingOverlay: loadingOverlayComponent_1.LoadingOverlayComponent,
agNoRowsOverlay: noRowsOverlayComponent_1.NoRowsOverlayComponent,
},
apiFunctions: {
showLoadingOverlay: overlayApi_1.showLoadingOverlay,
showNoRowsOverlay: overlayApi_1.showNoRowsOverlay,
hideOverlay: overlayApi_1.hideOverlay,
},
beans: [overlayService_1.OverlayService],
};
/***/ }),
/***/ 2351:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OverlayService = void 0;
const userCompUtils_1 = __webpack_require__(2036);
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const logging_1 = __webpack_require__(7764);
const overlayWrapperComponent_1 = __webpack_require__(8360);
class OverlayService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'overlays';
this.state = 0 /* OverlayServiceState.Hidden */;
this.showInitialOverlay = true;
this.wrapperPadding = 0;
}
postConstruct() {
this.isClientSide = (0, gridOptionsUtils_1._isClientSideRowModel)(this.gos);
this.isServerSide = !this.isClientSide && (0, gridOptionsUtils_1._isServerSideRowModel)(this.gos);
const updateOverlayVisibility = () => this.updateOverlayVisibility();
this.addManagedEventListeners({
newColumnsLoaded: updateOverlayVisibility,
rowDataUpdated: updateOverlayVisibility,
gridSizeChanged: this.refreshWrapperPadding.bind(this),
rowCountReady: () => {
// Support hiding the initial overlay when data is set via transactions.
this.showInitialOverlay = false;
this.updateOverlayVisibility();
},
});
this.addManagedPropertyListener('loading', updateOverlayVisibility);
}
setOverlayWrapperComp(overlayWrapperComp) {
this.eWrapper = overlayWrapperComp;
this.updateOverlayVisibility();
}
/** Returns true if the overlay is visible. */
isVisible() {
return this.state !== 0 /* OverlayServiceState.Hidden */ && !!this.eWrapper;
}
/** Returns true if the overlay is visible and is exclusive (popup over the grid) */
isExclusive() {
return this.state === 1 /* OverlayServiceState.Loading */ && !!this.eWrapper;
}
showLoadingOverlay() {
this.showInitialOverlay = false;
const gos = this.gos;
const loading = gos.get('loading');
if (!loading && (loading !== undefined || gos.get('suppressLoadingOverlay'))) {
return;
}
this.doShowLoadingOverlay();
}
showNoRowsOverlay() {
this.showInitialOverlay = false;
const gos = this.gos;
if (gos.get('loading') || gos.get('suppressNoRowsOverlay')) {
return;
}
this.doShowNoRowsOverlay();
}
hideOverlay() {
this.showInitialOverlay = false;
if (this.gos.get('loading')) {
(0, logging_1._warn)(99);
return;
}
this.doHideOverlay();
}
getOverlayWrapperSelector() {
return overlayWrapperComponent_1.OverlayWrapperSelector;
}
getOverlayWrapperCompClass() {
return overlayWrapperComponent_1.OverlayWrapperComponent;
}
updateOverlayVisibility() {
if (!this.eWrapper) {
this.state = 0 /* OverlayServiceState.Hidden */;
return;
}
const { state, isClientSide, isServerSide, beans: { gos, colModel, rowModel }, } = this;
let loading = this.gos.get('loading');
if (loading !== undefined) {
// If loading is defined, we don't show the initial overlay.
this.showInitialOverlay = false;
}
if (this.showInitialOverlay && loading === undefined && !gos.get('suppressLoadingOverlay')) {
loading = !gos.get('columnDefs') || !colModel.ready || (!gos.get('rowData') && isClientSide);
}
if (loading) {
if (state !== 1 /* OverlayServiceState.Loading */) {
this.doShowLoadingOverlay();
}
}
else {
this.showInitialOverlay = false;
if (isClientSide && rowModel.isEmpty() && !gos.get('suppressNoRowsOverlay')) {
if (state !== 2 /* OverlayServiceState.NoRows */) {
this.doShowNoRowsOverlay();
}
}
else if (state === 1 /* OverlayServiceState.Loading */ ||
(!isServerSide && state !== 0 /* OverlayServiceState.Hidden */)) {
this.doHideOverlay();
}
}
}
doShowLoadingOverlay() {
if (!this.eWrapper) {
return;
}
this.state = 1 /* OverlayServiceState.Loading */;
this.showOverlay((0, userCompUtils_1._getLoadingOverlayCompDetails)(this.beans.userCompFactory, (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {})), 'ag-overlay-loading-wrapper', 'loadingOverlayComponentParams');
this.updateExclusive();
}
doShowNoRowsOverlay() {
if (!this.eWrapper) {
return;
}
this.state = 2 /* OverlayServiceState.NoRows */;
this.showOverlay((0, userCompUtils_1._getNoRowsOverlayCompDetails)(this.beans.userCompFactory, (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {})), 'ag-overlay-no-rows-wrapper', 'noRowsOverlayComponentParams');
this.updateExclusive();
}
doHideOverlay() {
if (!this.eWrapper) {
return;
}
this.state = 0 /* OverlayServiceState.Hidden */;
this.eWrapper.hideOverlay();
this.updateExclusive();
}
showOverlay(compDetails, wrapperCssClass, gridOption) {
const promise = compDetails?.newAgStackInstance() ?? null;
this.eWrapper?.showOverlay(promise, wrapperCssClass, this.isExclusive(), gridOption);
this.refreshWrapperPadding();
}
updateExclusive() {
const wasExclusive = this.exclusive;
this.exclusive = this.isExclusive();
if (this.exclusive !== wasExclusive) {
this.eventSvc.dispatchEvent({
type: 'overlayExclusiveChanged',
});
}
}
refreshWrapperPadding() {
const eWrapper = this.eWrapper;
if (!eWrapper) {
return;
}
let newPadding = 0;
if (this.state === 2 /* OverlayServiceState.NoRows */) {
const headerCtrl = this.beans.ctrlsSvc.get('gridHeaderCtrl');
const headerHeight = headerCtrl?.headerHeight || 0;
newPadding = headerHeight;
}
else if (this.wrapperPadding !== 0) {
newPadding = 0;
}
if (this.wrapperPadding === newPadding) {
return;
}
this.wrapperPadding = newPadding;
eWrapper.updateOverlayWrapperPaddingTop(newPadding);
}
}
exports.OverlayService = OverlayService;
/***/ }),
/***/ 3893:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.overlayWrapperComponentCSS = void 0;
exports.overlayWrapperComponentCSS = `.ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}`;
/***/ }),
/***/ 8360:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OverlayWrapperSelector = exports.OverlayWrapperComponent = void 0;
const keyCode_1 = __webpack_require__(9853);
const gridOptionsUtils_1 = __webpack_require__(7274);
const layoutFeature_1 = __webpack_require__(9360);
const array_1 = __webpack_require__(1502);
const dom_1 = __webpack_require__(3507);
const event_1 = __webpack_require__(2979);
const focus_1 = __webpack_require__(2331);
const component_1 = __webpack_require__(8020);
const overlayWrapperComponent_css_GENERATED_1 = __webpack_require__(3893);
class OverlayWrapperComponent extends component_1.Component {
constructor() {
// wrapping in outer div, and wrapper, is needed to center the loading icon
super(/* html */ `
`);
this.eOverlayWrapper = component_1.RefPlaceholder;
this.activePromise = null;
this.activeOverlay = null;
this.updateListenerDestroyFunc = null;
this.activeCssClass = null;
this.elToFocusAfter = null;
this.registerCSS(overlayWrapperComponent_css_GENERATED_1.overlayWrapperComponentCSS);
}
handleKeyDown(e) {
if (e.key !== keyCode_1.KeyCode.TAB || e.defaultPrevented || (0, event_1._isStopPropagationForAgGrid)(e)) {
return;
}
const beans = this.beans;
const nextEl = (0, focus_1._findNextFocusableElement)(beans, this.eOverlayWrapper, false, e.shiftKey);
if (nextEl) {
return;
}
let isFocused = false;
if (e.shiftKey) {
isFocused = beans.focusSvc.focusGridView({
column: (0, array_1._last)(beans.visibleCols.allCols),
backwards: true,
canFocusOverlay: false,
});
}
else {
isFocused = (0, focus_1._focusNextGridCoreContainer)(beans, false);
}
if (isFocused) {
e.preventDefault();
}
}
updateLayoutClasses(cssClass, params) {
const overlayWrapperClassList = this.eOverlayWrapper.classList;
const { AUTO_HEIGHT, NORMAL, PRINT } = layoutFeature_1.LayoutCssClasses;
overlayWrapperClassList.toggle(AUTO_HEIGHT, params.autoHeight);
overlayWrapperClassList.toggle(NORMAL, params.normal);
overlayWrapperClassList.toggle(PRINT, params.print);
}
postConstruct() {
this.createManagedBean(new layoutFeature_1.LayoutFeature(this));
this.setDisplayed(false, { skipAriaHidden: true });
this.beans.overlays.setOverlayWrapperComp(this);
this.addManagedElementListeners(this.getFocusableElement(), { keydown: this.handleKeyDown.bind(this) });
}
setWrapperTypeClass(overlayWrapperCssClass) {
const overlayWrapperClassList = this.eOverlayWrapper.classList;
if (this.activeCssClass) {
overlayWrapperClassList.toggle(this.activeCssClass, false);
}
this.activeCssClass = overlayWrapperCssClass;
overlayWrapperClassList.toggle(overlayWrapperCssClass, true);
}
showOverlay(overlayComponentPromise, overlayWrapperCssClass, exclusive, gridOption) {
this.setWrapperTypeClass(overlayWrapperCssClass);
this.destroyActiveOverlay();
this.elToFocusAfter = null;
this.activePromise = overlayComponentPromise;
if (!overlayComponentPromise) {
return;
}
this.setDisplayed(true, { skipAriaHidden: true });
if (exclusive && this.isGridFocused()) {
const activeElement = (0, gridOptionsUtils_1._getActiveDomElement)(this.beans);
if (activeElement && !(0, gridOptionsUtils_1._isNothingFocused)(this.beans)) {
this.elToFocusAfter = activeElement;
}
}
overlayComponentPromise.then((comp) => {
if (this.activePromise !== overlayComponentPromise) {
// Another promise was started, we need to cancel this old operation
if (this.activeOverlay !== comp) {
// We can destroy the component as it will not be used
this.destroyBean(comp);
comp = null;
}
return;
}
this.activePromise = null; // Promise completed, so we can reset this
if (!comp) {
return; // Error handling
}
if (this.activeOverlay !== comp) {
this.eOverlayWrapper.appendChild(comp.getGui());
this.activeOverlay = comp;
if (gridOption) {
const component = comp;
this.updateListenerDestroyFunc = this.addManagedPropertyListener(gridOption, ({ currentValue }) => {
component.refresh?.((0, gridOptionsUtils_1._addGridCommonParams)(this.gos, { ...(currentValue ?? {}) }));
});
}
}
if (exclusive && this.isGridFocused()) {
(0, focus_1._focusInto)(this.eOverlayWrapper);
}
});
}
updateOverlayWrapperPaddingTop(padding) {
this.eOverlayWrapper.style.setProperty('padding-top', `${padding}px`);
}
destroyActiveOverlay() {
this.activePromise = null;
const activeOverlay = this.activeOverlay;
if (!activeOverlay) {
return; // Nothing to destroy
}
let elementToFocus = this.elToFocusAfter;
this.activeOverlay = null;
this.elToFocusAfter = null;
if (elementToFocus && !this.isGridFocused()) {
elementToFocus = null;
}
const updateListenerDestroyFunc = this.updateListenerDestroyFunc;
if (updateListenerDestroyFunc) {
updateListenerDestroyFunc();
this.updateListenerDestroyFunc = null;
}
this.destroyBean(activeOverlay);
(0, dom_1._clearElement)(this.eOverlayWrapper);
// Focus the element that was focused before the exclusive overlay was shown
elementToFocus?.focus?.({ preventScroll: true });
}
hideOverlay() {
this.destroyActiveOverlay();
this.setDisplayed(false, { skipAriaHidden: true });
}
isGridFocused() {
const activeEl = (0, gridOptionsUtils_1._getActiveDomElement)(this.beans);
return !!activeEl && this.beans.eGridDiv.contains(activeEl);
}
destroy() {
this.elToFocusAfter = null;
this.destroyActiveOverlay();
this.beans.overlays.setOverlayWrapperComp(undefined);
super.destroy();
}
}
exports.OverlayWrapperComponent = OverlayWrapperComponent;
exports.OverlayWrapperSelector = {
selector: 'AG-OVERLAY-WRAPPER',
component: OverlayWrapperComponent,
};
/***/ }),
/***/ 94:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCellRendererInstances = exports.getSizesForCurrentTheme = exports.flushAllAnimationFrames = exports.isAnimationFrameQueueEmpty = exports.refreshHeader = exports.refreshCells = exports.setGridAriaProperty = void 0;
const unwrapUserComp_1 = __webpack_require__(4126);
const gridOptionsUtils_1 = __webpack_require__(7274);
const headerUtils_1 = __webpack_require__(1323);
const rowRenderer_1 = __webpack_require__(557);
function setGridAriaProperty(beans, property, value) {
if (!property) {
return;
}
const eGrid = beans.ctrlsSvc.getGridBodyCtrl().eGridBody;
const ariaProperty = `aria-${property}`;
if (value === null) {
eGrid.removeAttribute(ariaProperty);
}
else {
eGrid.setAttribute(ariaProperty, value);
}
}
exports.setGridAriaProperty = setGridAriaProperty;
function refreshCells(beans, params = {}) {
beans.frameworkOverrides.wrapIncoming(() => beans.rowRenderer.refreshCells(params));
}
exports.refreshCells = refreshCells;
function refreshHeader(beans) {
beans.frameworkOverrides.wrapIncoming(() => beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach((c) => c.refresh()));
}
exports.refreshHeader = refreshHeader;
function isAnimationFrameQueueEmpty(beans) {
return beans.animationFrameSvc?.isQueueEmpty() ?? true;
}
exports.isAnimationFrameQueueEmpty = isAnimationFrameQueueEmpty;
function flushAllAnimationFrames(beans) {
beans.animationFrameSvc?.flushAllFrames();
}
exports.flushAllAnimationFrames = flushAllAnimationFrames;
function getSizesForCurrentTheme(beans) {
return {
rowHeight: (0, gridOptionsUtils_1._getRowHeightAsNumber)(beans),
headerHeight: (0, headerUtils_1.getHeaderHeight)(beans),
};
}
exports.getSizesForCurrentTheme = getSizesForCurrentTheme;
function getCellRendererInstances(beans, params = {}) {
const cellRenderers = [];
beans.rowRenderer.getCellCtrls(params.rowNodes, params.columns).forEach((cellCtrl) => {
const cellRenderer = cellCtrl.getCellRenderer();
if (cellRenderer != null) {
cellRenderers.push((0, unwrapUserComp_1._unwrapUserComp)(cellRenderer));
}
});
if (params.columns?.length) {
return cellRenderers;
}
const fullWidthRenderers = [];
const rowIdMap = (0, rowRenderer_1.mapRowNodes)(params.rowNodes);
beans.rowRenderer.getAllRowCtrls().forEach((rowCtrl) => {
if (rowIdMap && !(0, rowRenderer_1.isRowInMap)(rowCtrl.rowNode, rowIdMap)) {
return;
}
if (!rowCtrl.isFullWidth()) {
return;
}
const renderers = rowCtrl.getFullWidthCellRenderers();
for (let i = 0; i < renderers.length; i++) {
const renderer = renderers[i];
if (renderer != null) {
fullWidthRenderers.push((0, unwrapUserComp_1._unwrapUserComp)(renderer));
}
}
});
return [...fullWidthRenderers, ...cellRenderers];
}
exports.getCellRendererInstances = getCellRendererInstances;
/***/ }),
/***/ 6964:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RenderApiModule = void 0;
const version_1 = __webpack_require__(7205);
const renderApi_1 = __webpack_require__(94);
/**
* @feature Rendering
*/
exports.RenderApiModule = {
moduleName: 'RenderApi',
version: version_1.VERSION,
apiFunctions: {
setGridAriaProperty: renderApi_1.setGridAriaProperty,
refreshCells: renderApi_1.refreshCells,
refreshHeader: renderApi_1.refreshHeader,
isAnimationFrameQueueEmpty: renderApi_1.isAnimationFrameQueueEmpty,
flushAllAnimationFrames: renderApi_1.flushAllAnimationFrames,
getSizesForCurrentTheme: renderApi_1.getSizesForCurrentTheme,
getCellRendererInstances: renderApi_1.getCellRendererInstances,
},
};
/***/ }),
/***/ 4577:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowAutoHeightModule = void 0;
const version_1 = __webpack_require__(7205);
const rowAutoHeightService_1 = __webpack_require__(6418);
/**
* @feature Rows -> Row Height
* @colDef autoHeight
*/
exports.RowAutoHeightModule = {
moduleName: 'RowAutoHeight',
version: version_1.VERSION,
beans: [rowAutoHeightService_1.RowAutoHeightService],
};
/***/ }),
/***/ 6418:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowAutoHeightService = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const dom_1 = __webpack_require__(3507);
const function_1 = __webpack_require__(2043);
class RowAutoHeightService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'rowAutoHeight';
this.wasEverActive = false;
this._debouncedCalculateRowHeights = (0, function_1._debounce)(this, this.calculateRowHeights.bind(this), 1);
}
/**
* If row height has been active, request a refresh of the row heights.
*/
requestCheckAutoHeight() {
if (!this.wasEverActive) {
return;
}
this._debouncedCalculateRowHeights();
}
calculateRowHeights() {
const { visibleCols, rowModel, rowSpanSvc } = this.beans;
const displayedAutoHeightCols = visibleCols.autoHeightCols;
let anyNodeChanged = false;
rowModel.forEachDisplayedNode?.((row) => {
const autoHeights = row.__autoHeights;
let newRowHeight = (0, gridOptionsUtils_1._getRowHeightForNode)(this.beans, row).height;
for (const col of displayedAutoHeightCols) {
// if using col span, we don't allow auto height.
if (this.colSpanSkipRow(col, row)) {
return;
}
let cellHeight = autoHeights?.[col.getColId()];
const spannedCell = rowSpanSvc?.getCellSpan(col, row);
if (spannedCell) {
// only last row gets additional auto height of spanned cell
if (spannedCell.getLastNode() !== row) {
continue;
}
cellHeight = rowSpanSvc?.getCellSpan(col, row)?.getLastNodeAutoHeight();
// if this is the last row, but no span value, skip this row as auto height not ready
if (!cellHeight) {
return;
}
}
// if no cell height, auto height not ready skip row
if (cellHeight == null) {
return;
}
newRowHeight = Math.max(cellHeight, newRowHeight);
}
if (newRowHeight !== row.rowHeight) {
row.setRowHeight(newRowHeight);
anyNodeChanged = true;
}
});
if (anyNodeChanged) {
rowModel.onRowHeightChanged?.();
}
}
/**
* Set the cell height into the row node, and request a refresh of the row heights if there's been a change.
* @param rowNode the node to set the auto height on
* @param cellHeight the height to set, undefined if the cell has just been destroyed
* @param column the column of the cell
*/
setRowAutoHeight(rowNode, cellHeight, column) {
if (!rowNode.__autoHeights) {
rowNode.__autoHeights = {};
}
// if the cell comp has been unmounted, delete the auto height
if (cellHeight == undefined) {
delete rowNode.__autoHeights[column.getId()];
return;
}
const previousCellHeight = rowNode.__autoHeights[column.getId()];
rowNode.__autoHeights[column.getId()] = cellHeight;
if (previousCellHeight !== cellHeight) {
this.requestCheckAutoHeight();
}
}
/**
* If using col span, we don't allow auto height on rows that span columns.
* @param col the column of the cell
* @param node the node of the cell
* @returns whether the row should skip auto height
*/
colSpanSkipRow(col, node) {
const { colModel, colViewport, visibleCols } = this.beans;
if (!colModel.colSpanActive) {
return false;
}
let activeColsForRow = [];
switch (col.getPinned()) {
case 'left':
activeColsForRow = visibleCols.getLeftColsForRow(node);
break;
case 'right':
activeColsForRow = visibleCols.getRightColsForRow(node);
break;
case null:
activeColsForRow = colViewport.getColsWithinViewport(node);
break;
}
return activeColsForRow.includes(col);
}
/**
* If required, sets up observers to continuously measure changes in the cell height.
* @param cellCtrl the cellCtrl of the cell
* @param eCellWrapper the HTMLElement to track the height of
* @param compBean the component bean to add the destroy/cleanup function to
* @returns whether or not auto height has been set up on this cell
*/
setupCellAutoHeight(cellCtrl, eCellWrapper, compBean) {
if (!cellCtrl.column.isAutoHeight() || !eCellWrapper) {
return false;
}
this.wasEverActive = true;
const eParentCell = eCellWrapper.parentElement;
const { rowNode, column } = cellCtrl;
const beans = this.beans;
const measureHeight = (timesCalled) => {
if (cellCtrl.editing) {
return;
}
// because of the retry's below, it's possible the retry's go beyond
// the rows life.
if (!cellCtrl.isAlive() || !compBean.isAlive()) {
return;
}
const { paddingTop, paddingBottom, borderBottomWidth, borderTopWidth } = (0, dom_1._getElementSize)(eParentCell);
const extraHeight = paddingTop + paddingBottom + borderBottomWidth + borderTopWidth;
const wrapperHeight = eCellWrapper.offsetHeight;
const autoHeight = wrapperHeight + extraHeight;
if (timesCalled < 5) {
// if not in doc yet, means framework not yet inserted, so wait for next VM turn,
// maybe it will be ready next VM turn
const doc = (0, gridOptionsUtils_1._getDocument)(beans);
const notYetInDom = !doc || !doc.contains(eCellWrapper);
// this happens in React, where React hasn't put any content in. we say 'possibly'
// as a) may not be React and b) the cell could be empty anyway
const possiblyNoContentYet = autoHeight == 0;
if (notYetInDom || possiblyNoContentYet) {
window.setTimeout(() => measureHeight(timesCalled + 1), 0);
return;
}
}
this.setRowAutoHeight(rowNode, autoHeight, column);
};
const listener = () => measureHeight(0);
// do once to set size in case size doesn't change, common when cell is blank
listener();
const destroyResizeObserver = (0, dom_1._observeResize)(beans, eCellWrapper, listener);
compBean.addDestroyFunc(() => {
destroyResizeObserver();
this.setRowAutoHeight(rowNode, undefined, column);
});
return true;
}
setAutoHeightActive(cols) {
this.active = cols.list.some((col) => col.isVisible() && col.isAutoHeight());
}
}
exports.RowAutoHeightService = RowAutoHeightService;
/***/ }),
/***/ 8430:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowComp = void 0;
const aria_1 = __webpack_require__(5230);
const dom_1 = __webpack_require__(3507);
const component_1 = __webpack_require__(8020);
const cellComp_1 = __webpack_require__(2308);
class RowComp extends component_1.Component {
constructor(ctrl, beans, containerType) {
super();
this.cellComps = {};
this.beans = beans;
this.rowCtrl = ctrl;
const rowDiv = document.createElement('div');
rowDiv.setAttribute('comp-id', `${this.getCompId()}`);
rowDiv.setAttribute('style', this.getInitialStyle(containerType));
this.setTemplateFromElement(rowDiv);
const eGui = this.getGui();
const style = eGui.style;
this.domOrder = this.rowCtrl.getDomOrder();
(0, aria_1._setAriaRole)(eGui, 'row');
const compProxy = {
setDomOrder: (domOrder) => (this.domOrder = domOrder),
setCellCtrls: (cellCtrls) => this.setCellCtrls(cellCtrls),
showFullWidth: (compDetails) => this.showFullWidth(compDetails),
getFullWidthCellRenderer: () => this.fullWidthCellRenderer,
addOrRemoveCssClass: (name, on) => this.addOrRemoveCssClass(name, on),
setUserStyles: (styles) => (0, dom_1._addStylesToElement)(eGui, styles),
setTop: (top) => (style.top = top),
setTransform: (transform) => (style.transform = transform),
setRowIndex: (rowIndex) => eGui.setAttribute('row-index', rowIndex),
setRowId: (rowId) => eGui.setAttribute('row-id', rowId),
setRowBusinessKey: (businessKey) => eGui.setAttribute('row-business-key', businessKey),
refreshFullWidth: (getUpdatedParams) => this.fullWidthCellRenderer?.refresh?.(getUpdatedParams()) ?? false,
};
ctrl.setComp(compProxy, this.getGui(), containerType, undefined);
this.addDestroyFunc(() => {
ctrl.unsetComp(containerType);
});
}
getInitialStyle(containerType) {
const transform = this.rowCtrl.getInitialTransform(containerType);
return transform ? `transform: ${transform}` : `top: ${this.rowCtrl.getInitialRowTop(containerType)}`;
}
showFullWidth(compDetails) {
const callback = (cellRenderer) => {
if (this.isAlive()) {
const eGui = cellRenderer.getGui();
this.getGui().appendChild(eGui);
this.rowCtrl.setupDetailRowAutoHeight(eGui);
this.setFullWidthRowComp(cellRenderer);
}
else {
this.beans.context.destroyBean(cellRenderer);
}
};
// if not in cache, create new one
const res = compDetails.newAgStackInstance();
res.then(callback);
}
setCellCtrls(cellCtrls) {
const cellsToRemove = Object.assign({}, this.cellComps);
cellCtrls.forEach((cellCtrl) => {
const key = cellCtrl.instanceId;
const existingCellComp = this.cellComps[key];
if (existingCellComp == null) {
this.newCellComp(cellCtrl);
}
else {
cellsToRemove[key] = null;
}
});
this.destroyCells(Object.values(cellsToRemove));
this.ensureDomOrder(cellCtrls);
}
ensureDomOrder(cellCtrls) {
if (!this.domOrder) {
return;
}
const elementsInOrder = [];
cellCtrls.forEach((cellCtrl) => {
const cellComp = this.cellComps[cellCtrl.instanceId];
if (cellComp) {
elementsInOrder.push(cellComp.getGui());
}
});
(0, dom_1._setDomChildOrder)(this.getGui(), elementsInOrder);
}
newCellComp(cellCtrl) {
const cellComp = new cellComp_1.CellComp(this.beans, cellCtrl, this.rowCtrl.printLayout, this.getGui(), this.rowCtrl.editing);
this.cellComps[cellCtrl.instanceId] = cellComp;
this.getGui().appendChild(cellComp.getGui());
}
destroy() {
super.destroy();
// Destroy all cells
this.destroyCells(Object.values(this.cellComps));
}
setFullWidthRowComp(fullWidthRowComponent) {
this.fullWidthCellRenderer = fullWidthRowComponent;
this.addDestroyFunc(() => {
this.fullWidthCellRenderer = this.beans.context.destroyBean(this.fullWidthCellRenderer);
});
}
destroyCells(cellComps) {
cellComps.forEach((cellComp) => {
// could be old reference, ie removed cell
if (!cellComp) {
return;
}
// check cellComp belongs in this container
const instanceId = cellComp.cellCtrl.instanceId;
if (this.cellComps[instanceId] !== cellComp) {
return;
}
cellComp.detach();
cellComp.destroy();
this.cellComps[instanceId] = null;
});
}
}
exports.RowComp = RowComp;
/***/ }),
/***/ 7632:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowCtrl = exports.DOM_DATA_KEY_ROW_CTRL = void 0;
const emptyBean_1 = __webpack_require__(3789);
const userCompUtils_1 = __webpack_require__(2036);
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const rowStyleService_1 = __webpack_require__(7648);
const aria_1 = __webpack_require__(5230);
const browser_1 = __webpack_require__(8667);
const dom_1 = __webpack_require__(3507);
const event_1 = __webpack_require__(2979);
const focus_1 = __webpack_require__(2331);
const function_1 = __webpack_require__(2043);
const generic_1 = __webpack_require__(4422);
const string_1 = __webpack_require__(7766);
const cellCtrl_1 = __webpack_require__(814);
let instanceIdSequence = 0;
exports.DOM_DATA_KEY_ROW_CTRL = 'renderedRow';
class RowCtrl extends beanStub_1.BeanStub {
constructor(rowNode, beans, animateIn, useAnimationFrameForCreate, printLayout) {
super();
this.rowNode = rowNode;
this.useAnimationFrameForCreate = useAnimationFrameForCreate;
this.printLayout = printLayout;
this.allRowGuis = [];
this.active = true;
this.centerCellCtrls = { list: [], map: {} };
this.leftCellCtrls = { list: [], map: {} };
this.rightCellCtrls = { list: [], map: {} };
this.slideInAnimation = {
left: false,
center: false,
right: false,
fullWidth: false,
};
this.fadeInAnimation = {
left: false,
center: false,
right: false,
fullWidth: false,
};
this.rowDragComps = [];
this.lastMouseDownOnDragger = false;
this.emptyStyle = {};
this.updateColumnListsPending = false;
this.rowId = null;
/** sanitised */
this.businessKey = null;
this.beans = beans;
this.gos = beans.gos;
this.paginationPage = beans.pagination?.getCurrentPage() ?? 0;
this.suppressRowTransform = this.gos.get('suppressRowTransform');
this.instanceId = (rowNode.id + '-' + instanceIdSequence++);
this.rowId = (0, string_1._escapeString)(rowNode.id);
this.initRowBusinessKey();
this.rowFocused = beans.focusSvc.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);
this.rowLevel = (0, rowStyleService_1.calculateRowLevel)(this.rowNode);
this.setRowType();
this.setAnimateFlags(animateIn);
this.rowStyles = this.processStylesFromGridOptions();
this.addListeners();
}
initRowBusinessKey() {
this.businessKeyForNodeFunc = this.gos.get('getBusinessKeyForNode');
this.updateRowBusinessKey();
}
updateRowBusinessKey() {
if (typeof this.businessKeyForNodeFunc !== 'function') {
return;
}
const businessKey = this.businessKeyForNodeFunc(this.rowNode);
this.businessKey = (0, string_1._escapeString)(businessKey);
}
updateGui(containerType, gui) {
if (containerType === 'left') {
this.leftGui = gui;
}
else if (containerType === 'right') {
this.rightGui = gui;
}
else if (containerType === 'fullWidth') {
this.fullWidthGui = gui;
}
else {
this.centerGui = gui;
}
}
setComp(rowComp, element, containerType, compBean) {
compBean = (0, emptyBean_1.setupCompBean)(this, this.beans.context, compBean);
const gui = { rowComp, element, containerType, compBean };
this.allRowGuis.push(gui);
this.updateGui(containerType, gui);
this.initialiseRowComp(gui);
const isSsrmLoadingRow = this.rowType === 'FullWidthLoading' || this.rowNode.stub;
// pinned rows render before the main grid body in the SSRM, only fire the event after the main body has rendered.
if (!isSsrmLoadingRow && !this.rowNode.rowPinned) {
// this is fired within setComp as we know that the component renderer is now trying to render.
// linked with the fact the function implementation queues behind requestAnimationFrame should allow
// us to be certain that all rendering is done by the time the event fires.
this.beans.rowRenderer.dispatchFirstDataRenderedEvent();
}
}
unsetComp(containerType) {
this.allRowGuis = this.allRowGuis.filter((rowGui) => rowGui.containerType !== containerType);
this.updateGui(containerType, undefined);
}
isCacheable() {
return this.rowType === 'FullWidthDetail' && this.gos.get('keepDetailRows');
}
setCached(cached) {
const displayValue = cached ? 'none' : '';
this.allRowGuis.forEach((rg) => (rg.element.style.display = displayValue));
}
initialiseRowComp(gui) {
const gos = this.gos;
this.onSuppressCellFocusChanged(this.beans.gos.get('suppressCellFocus'));
this.listenOnDomOrder(gui);
this.onRowHeightChanged(gui);
this.updateRowIndexes(gui);
this.setFocusedClasses(gui);
this.setStylesFromGridOptions(false, gui); // no need to calculate styles already set in constructor
if ((0, gridOptionsUtils_1._isRowSelection)(gos) && this.rowNode.selectable) {
this.onRowSelected(gui);
}
this.updateColumnLists(!this.useAnimationFrameForCreate);
const comp = gui.rowComp;
const initialRowClasses = this.getInitialRowClasses(gui.containerType);
initialRowClasses.forEach((name) => comp.addOrRemoveCssClass(name, true));
this.executeSlideAndFadeAnimations(gui);
if (this.rowNode.group) {
(0, aria_1._setAriaExpanded)(gui.element, this.rowNode.expanded == true);
}
this.setRowCompRowId(comp);
this.setRowCompRowBusinessKey(comp);
// DOM DATA
(0, gridOptionsUtils_1._setDomData)(gos, gui.element, exports.DOM_DATA_KEY_ROW_CTRL, this);
gui.compBean.addDestroyFunc(() => (0, gridOptionsUtils_1._setDomData)(gos, gui.element, exports.DOM_DATA_KEY_ROW_CTRL, null));
// adding hover functionality adds listener to this row, so we
// do it lazily in an animation frame
if (this.useAnimationFrameForCreate) {
this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this, gui), this.rowNode.rowIndex, 'createTasksP2');
}
else {
this.addHoverFunctionality(gui);
}
if (this.isFullWidth()) {
this.setupFullWidth(gui);
}
if (gos.get('rowDragEntireRow')) {
this.addRowDraggerToRow(gui);
}
if (this.useAnimationFrameForCreate) {
// the height animation we only want active after the row is alive for 1 second.
// this stops the row animation working when rows are initially created. otherwise
// auto-height rows get inserted into the dom and resized immediately, which gives
// very bad UX (eg 10 rows get inserted, then all 10 expand, look particularly bad
// when scrolling). so this makes sure when rows are shown for the first time, they
// are resized immediately without animation.
this.beans.animationFrameSvc.addDestroyTask(() => {
if (!this.isAlive()) {
return;
}
gui.rowComp.addOrRemoveCssClass('ag-after-created', true);
});
}
this.executeProcessRowPostCreateFunc();
}
setRowCompRowBusinessKey(comp) {
if (this.businessKey == null) {
return;
}
comp.setRowBusinessKey(this.businessKey);
}
setRowCompRowId(comp) {
const rowId = (0, string_1._escapeString)(this.rowNode.id);
this.rowId = rowId;
if (rowId == null) {
return;
}
comp.setRowId(rowId);
}
executeSlideAndFadeAnimations(gui) {
const { containerType } = gui;
const shouldSlide = this.slideInAnimation[containerType];
if (shouldSlide) {
(0, function_1._executeNextVMTurn)(() => {
this.onTopChanged();
});
this.slideInAnimation[containerType] = false;
}
const shouldFade = this.fadeInAnimation[containerType];
if (shouldFade) {
(0, function_1._executeNextVMTurn)(() => {
gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', false);
});
this.fadeInAnimation[containerType] = false;
}
}
addRowDraggerToRow(gui) {
const rowDragComp = this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode, gui.element);
if (!rowDragComp) {
return;
}
const rowDragBean = this.createBean(rowDragComp, this.beans.context);
this.rowDragComps.push(rowDragBean);
gui.compBean.addDestroyFunc(() => {
this.rowDragComps = this.rowDragComps.filter((r) => r !== rowDragBean);
this.destroyBean(rowDragBean, this.beans.context);
});
}
setupFullWidth(gui) {
const pinned = this.getPinnedForContainer(gui.containerType);
const compDetails = this.createFullWidthCompDetails(gui.element, pinned);
gui.rowComp.showFullWidth(compDetails);
}
getFullWidthCellRenderers() {
if (this.gos.get('embedFullWidthRows')) {
return this.allRowGuis.map((gui) => gui?.rowComp?.getFullWidthCellRenderer());
}
return [this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()];
}
executeProcessRowPostCreateFunc() {
const func = this.gos.getCallback('processRowPostCreate');
if (!func || !this.areAllContainersReady()) {
return;
}
const params = {
// areAllContainersReady asserts that centerGui is not null
eRow: this.centerGui.element,
ePinnedLeftRow: this.leftGui ? this.leftGui.element : undefined,
ePinnedRightRow: this.rightGui ? this.rightGui.element : undefined,
node: this.rowNode,
rowIndex: this.rowNode.rowIndex,
addRenderedRowListener: this.addEventListener.bind(this),
};
func(params);
}
areAllContainersReady() {
const { leftGui, centerGui, rightGui, beans: { visibleCols }, } = this;
const isLeftReady = !!leftGui || !visibleCols.isPinningLeft();
const isCenterReady = !!centerGui;
const isRightReady = !!rightGui || !visibleCols.isPinningRight();
return isLeftReady && isCenterReady && isRightReady;
}
isNodeFullWidthCell() {
if (this.rowNode.detail) {
return true;
}
const isFullWidthCellFunc = this.beans.gos.getCallback('isFullWidthRow');
return isFullWidthCellFunc ? isFullWidthCellFunc({ rowNode: this.rowNode }) : false;
}
setRowType() {
// groupHideOpenParents implicitly disables full width loading
const isStub = this.rowNode.stub &&
!this.gos.get('suppressServerSideFullWidthLoadingRow') &&
!this.gos.get('groupHideOpenParents');
const isFullWidthCell = this.isNodeFullWidthCell();
const isDetailCell = this.gos.get('masterDetail') && this.rowNode.detail;
const pivotMode = this.beans.colModel.isPivotMode();
// we only use full width for groups, not footers. it wouldn't make sense to include footers if not looking
// for totals. if users complain about this, then we should introduce a new property 'footerUseEntireRow'
// so each can be set independently (as a customer complained about footers getting full width, hence
// introducing this logic)
const isGroupRow = !!this.rowNode.group && !this.rowNode.footer;
const isFullWidthGroup = isGroupRow && (0, gridOptionsUtils_1._isGroupUseEntireRow)(this.gos, pivotMode);
if (isStub) {
this.rowType = 'FullWidthLoading';
}
else if (isDetailCell) {
this.rowType = 'FullWidthDetail';
}
else if (isFullWidthCell) {
this.rowType = 'FullWidth';
}
else if (isFullWidthGroup) {
this.rowType = 'FullWidthGroup';
}
else {
this.rowType = 'Normal';
}
}
updateColumnLists(suppressAnimationFrame = false, useFlushSync = false) {
if (this.isFullWidth()) {
return;
}
const { animationFrameSvc } = this.beans;
const noAnimation = !animationFrameSvc || suppressAnimationFrame || this.gos.get('suppressAnimationFrame') || this.printLayout;
if (noAnimation) {
this.updateColumnListsImpl(useFlushSync);
return;
}
if (this.updateColumnListsPending) {
return;
}
animationFrameSvc.createTask(() => {
if (!this.active) {
return;
}
this.updateColumnListsImpl(true);
}, this.rowNode.rowIndex, 'createTasksP1');
this.updateColumnListsPending = true;
}
/**
* Overridden by SpannedRowCtrl
*/
getNewCellCtrl(col) {
const isCellSpan = this.beans.rowSpanSvc?.isCellSpanning(col, this.rowNode);
if (isCellSpan) {
return undefined;
}
return new cellCtrl_1.CellCtrl(col, this.rowNode, this.beans, this);
}
/**
* Overridden by SpannedRowCtrl, if span context changes cell needs rebuilt
*/
shouldRecreateCellCtrl(cell) {
return !!this.beans.rowSpanSvc?.isCellSpanning(cell.column, this.rowNode);
}
createCellCtrls(prev, cols, pinned = null) {
const res = {
list: [],
map: {},
};
const addCell = (colInstanceId, cellCtrl, index) => {
if (index != null) {
res.list.splice(index, 0, cellCtrl);
}
else {
res.list.push(cellCtrl);
}
res.map[colInstanceId] = cellCtrl;
};
const colsFromPrev = [];
for (const col of cols) {
// we use instanceId's rather than colId as it's possible there is a Column with same Id,
// but it's referring to a different column instance. Happens a lot with pivot, as pivot col id's are
// reused eg pivot_0, pivot_1 etc
const colInstanceId = col.getInstanceId();
let cellCtrl = prev.map[colInstanceId];
// for spanned cells, if the span ref has changed, need to hard refresh cell
if (cellCtrl && this.shouldRecreateCellCtrl(cellCtrl)) {
cellCtrl.destroy();
cellCtrl = undefined;
}
if (!cellCtrl) {
cellCtrl = this.getNewCellCtrl(col);
}
if (!cellCtrl) {
continue;
}
addCell(colInstanceId, cellCtrl);
}
for (const prevCellCtrl of prev.list) {
const colInstanceId = prevCellCtrl.column.getInstanceId();
const cellInResult = res.map[colInstanceId] != null;
if (cellInResult) {
continue;
}
const keepCell = !this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);
if (keepCell) {
colsFromPrev.push([colInstanceId, prevCellCtrl]);
}
else {
prevCellCtrl.destroy();
}
}
if (colsFromPrev.length) {
for (const [colInstanceId, cellCtrl] of colsFromPrev) {
const index = res.list.findIndex((ctrl) => ctrl.column.getLeft() > cellCtrl.column.getLeft());
const normalisedIndex = index === -1 ? undefined : Math.max(index - 1, 0);
addCell(colInstanceId, cellCtrl, normalisedIndex);
}
}
return res;
}
updateColumnListsImpl(useFlushSync) {
this.updateColumnListsPending = false;
this.createAllCellCtrls();
this.setCellCtrls(useFlushSync);
}
setCellCtrls(useFlushSync) {
this.allRowGuis.forEach((item) => {
const cellControls = this.getCellCtrlsForContainer(item.containerType);
item.rowComp.setCellCtrls(cellControls, useFlushSync);
});
}
getCellCtrlsForContainer(containerType) {
switch (containerType) {
case 'left':
return this.leftCellCtrls.list;
case 'right':
return this.rightCellCtrls.list;
case 'fullWidth':
return [];
case 'center':
return this.centerCellCtrls.list;
}
}
createAllCellCtrls() {
const colViewport = this.beans.colViewport;
const presentedColsService = this.beans.visibleCols;
if (this.printLayout) {
this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, presentedColsService.allCols);
this.leftCellCtrls = { list: [], map: {} };
this.rightCellCtrls = { list: [], map: {} };
}
else {
const centerCols = colViewport.getColsWithinViewport(this.rowNode);
this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, centerCols);
const leftCols = presentedColsService.getLeftColsForRow(this.rowNode);
this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, leftCols, 'left');
const rightCols = presentedColsService.getRightColsForRow(this.rowNode);
this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, rightCols, 'right');
}
}
isCellEligibleToBeRemoved(cellCtrl, nextContainerPinned) {
const REMOVE_CELL = true;
const KEEP_CELL = false;
// always remove the cell if it's not rendered or if it's in the wrong pinned location
const { column } = cellCtrl;
if (column.getPinned() != nextContainerPinned) {
return REMOVE_CELL;
}
// we want to try and keep editing and focused cells
const { editing, cellPosition } = cellCtrl;
const { focusSvc, visibleCols } = this.beans;
const focused = focusSvc.isCellFocused(cellPosition);
const mightWantToKeepCell = editing || focused;
if (mightWantToKeepCell) {
const displayedColumns = visibleCols.allCols;
const cellStillDisplayed = displayedColumns.indexOf(column) >= 0;
return cellStillDisplayed ? KEEP_CELL : REMOVE_CELL;
}
return REMOVE_CELL;
}
getDomOrder() {
const isEnsureDomOrder = this.gos.get('ensureDomOrder');
return isEnsureDomOrder || (0, gridOptionsUtils_1._isDomLayout)(this.gos, 'print');
}
listenOnDomOrder(gui) {
const listener = () => {
gui.rowComp.setDomOrder(this.getDomOrder());
};
gui.compBean.addManagedPropertyListeners(['domLayout', 'ensureDomOrder'], listener);
}
setAnimateFlags(animateIn) {
if (this.rowNode.sticky || !animateIn) {
return;
}
const oldRowTopExists = (0, generic_1._exists)(this.rowNode.oldRowTop);
const { visibleCols } = this.beans;
const pinningLeft = visibleCols.isPinningLeft();
const pinningRight = visibleCols.isPinningRight();
if (oldRowTopExists) {
const { slideInAnimation } = this;
if (this.isFullWidth() && !this.gos.get('embedFullWidthRows')) {
slideInAnimation.fullWidth = true;
return;
}
// if the row had a previous position, we slide it in
slideInAnimation.center = true;
slideInAnimation.left = pinningLeft;
slideInAnimation.right = pinningRight;
}
else {
const { fadeInAnimation } = this;
if (this.isFullWidth() && !this.gos.get('embedFullWidthRows')) {
fadeInAnimation.fullWidth = true;
return;
}
// if the row had no previous position, we fade it in
fadeInAnimation.center = true;
fadeInAnimation.left = pinningLeft;
fadeInAnimation.right = pinningRight;
}
}
isFullWidth() {
return this.rowType !== 'Normal';
}
refreshFullWidth() {
// returns 'true' if refresh succeeded
const tryRefresh = (gui, pinned) => {
if (!gui) {
return true;
} // no refresh needed
return gui.rowComp.refreshFullWidth(() => {
const compDetails = this.createFullWidthCompDetails(gui.element, pinned);
return compDetails.params;
});
};
const fullWidthSuccess = tryRefresh(this.fullWidthGui, null);
const centerSuccess = tryRefresh(this.centerGui, null);
const leftSuccess = tryRefresh(this.leftGui, 'left');
const rightSuccess = tryRefresh(this.rightGui, 'right');
const allFullWidthRowsRefreshed = fullWidthSuccess && centerSuccess && leftSuccess && rightSuccess;
return allFullWidthRowsRefreshed;
}
addListeners() {
this.addManagedListeners(this.rowNode, {
heightChanged: () => this.onRowHeightChanged(),
rowSelected: () => this.onRowSelected(),
rowIndexChanged: this.onRowIndexChanged.bind(this),
topChanged: this.onTopChanged.bind(this),
...(this.beans.expansionSvc?.getRowExpandedListeners(this) ?? {}),
});
if (this.rowNode.detail) {
// if the master row node has updated data, we also want to try to refresh the detail row
this.addManagedListeners(this.rowNode.parent, { dataChanged: this.onRowNodeDataChanged.bind(this) });
}
this.addManagedListeners(this.rowNode, {
dataChanged: this.onRowNodeDataChanged.bind(this),
cellChanged: this.postProcessCss.bind(this),
rowHighlightChanged: this.onRowNodeHighlightChanged.bind(this),
draggingChanged: this.postProcessRowDragging.bind(this),
uiLevelChanged: this.onUiLevelChanged.bind(this),
});
this.addManagedListeners(this.beans.eventSvc, {
paginationPixelOffsetChanged: this.onPaginationPixelOffsetChanged.bind(this),
heightScaleChanged: this.onTopChanged.bind(this),
displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
virtualColumnsChanged: this.onVirtualColumnsChanged.bind(this),
cellFocused: this.onCellFocusChanged.bind(this),
cellFocusCleared: this.onCellFocusChanged.bind(this),
paginationChanged: this.onPaginationChanged.bind(this),
modelUpdated: this.refreshFirstAndLastRowStyles.bind(this),
columnMoved: () => this.updateColumnLists(),
});
if (this.beans.rowSpanSvc) {
// when spans change, need to verify that cells are correctly skipped/rendered
this.addManagedListeners(this.beans.rowSpanSvc, {
spannedCellsUpdated: ({ pinned }) => {
if (pinned && !this.rowNode.rowPinned) {
return;
}
this.updateColumnLists();
},
});
}
this.addDestroyFunc(() => {
this.rowDragComps = this.destroyBeans(this.rowDragComps, this.beans.context);
this.tooltipFeature = this.destroyBean(this.tooltipFeature, this.beans.context);
});
this.addManagedPropertyListeners(['rowStyle', 'getRowStyle', 'rowClass', 'getRowClass', 'rowClassRules'], this.postProcessCss.bind(this));
this.addManagedPropertyListener('rowDragEntireRow', () => {
const useRowDragEntireRow = this.gos.get('rowDragEntireRow');
if (useRowDragEntireRow) {
this.allRowGuis.forEach((gui) => {
this.addRowDraggerToRow(gui);
});
return;
}
this.rowDragComps = this.destroyBeans(this.rowDragComps, this.beans.context);
});
this.addListenersForCellComps();
}
addListenersForCellComps() {
this.addManagedListeners(this.rowNode, {
rowIndexChanged: () => {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onRowIndexChanged());
},
cellChanged: (event) => {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellChanged(event));
},
});
}
onRowNodeDataChanged(event) {
// if the row is rendered incorrectly, as the requirements for whether this is a FW row have changed, we force re-render this row.
const fullWidthChanged = this.isFullWidth() !== !!this.isNodeFullWidthCell();
if (fullWidthChanged) {
this.beans.rowRenderer.redrawRow(this.rowNode);
return;
}
// this bit of logic handles trying to refresh the FW row ctrl, or delegating to removing/recreating it if unsupported.
if (this.isFullWidth()) {
const refresh = this.refreshFullWidth();
if (!refresh) {
this.beans.rowRenderer.redrawRow(this.rowNode);
}
return;
}
// if this is an update, we want to refresh, as this will allow the user to put in a transition
// into the cellRenderer refresh method. otherwise this might be completely new data, in which case
// we will want to completely replace the cells
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.refreshCell({
suppressFlash: !event.update,
newData: !event.update,
}));
// as data has changed update the dom row id attributes
this.allRowGuis.forEach((gui) => {
this.setRowCompRowId(gui.rowComp);
this.updateRowBusinessKey();
this.setRowCompRowBusinessKey(gui.rowComp);
});
// check for selected also, as this could be after lazy loading of the row data, in which case
// the id might of just gotten set inside the row and the row selected state may of changed
// as a result. this is what happens when selected rows are loaded in virtual pagination.
// - niall note - since moving to the stub component, this may no longer be true, as replacing
// the stub component now replaces the entire row
this.onRowSelected();
// as data has changed, then the style and class needs to be recomputed
this.postProcessCss();
}
postProcessCss() {
this.setStylesFromGridOptions(true);
this.postProcessClassesFromGridOptions();
this.postProcessRowClassRules();
this.postProcessRowDragging();
}
onRowNodeHighlightChanged() {
const highlighted = this.rowNode.highlighted;
this.allRowGuis.forEach((gui) => {
const aboveOn = highlighted === 'Above';
const belowOn = highlighted === 'Below';
gui.rowComp.addOrRemoveCssClass('ag-row-highlight-above', aboveOn);
gui.rowComp.addOrRemoveCssClass('ag-row-highlight-below', belowOn);
});
}
postProcessRowDragging() {
const dragging = this.rowNode.dragging;
this.allRowGuis.forEach((gui) => gui.rowComp.addOrRemoveCssClass('ag-row-dragging', dragging));
}
verifyCells() {
this.onDisplayedColumnsChanged();
}
onDisplayedColumnsChanged() {
// we skip animations for onDisplayedColumnChanged, as otherwise the client could remove columns and
// then set data, and any old valueGetter's (ie from cols that were removed) would still get called.
this.updateColumnLists(true);
this.beans.rowAutoHeight?.requestCheckAutoHeight();
}
onVirtualColumnsChanged() {
this.updateColumnLists(false, true);
}
getRowPosition() {
return {
rowPinned: (0, generic_1._makeNull)(this.rowNode.rowPinned),
rowIndex: this.rowNode.rowIndex,
};
}
onKeyboardNavigate(keyboardEvent) {
const groupInfo = this.findFullWidthInfoForEvent(keyboardEvent);
if (!groupInfo) {
return;
}
const { rowGui, column } = groupInfo;
const currentFullWidthContainer = rowGui.element;
const isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;
if (!isFullWidthContainerFocused) {
return;
}
const node = this.rowNode;
const { focusSvc, navigation } = this.beans;
const lastFocusedCell = focusSvc.getFocusedCell();
const cellPosition = {
rowIndex: node.rowIndex,
rowPinned: node.rowPinned,
column: lastFocusedCell?.column ?? column,
};
navigation?.navigateToNextCell(keyboardEvent, keyboardEvent.key, cellPosition, true);
keyboardEvent.preventDefault();
}
onTabKeyDown(keyboardEvent) {
if (keyboardEvent.defaultPrevented || (0, event_1._isStopPropagationForAgGrid)(keyboardEvent)) {
return;
}
const currentFullWidthComp = this.allRowGuis.find((c) => c.element.contains(keyboardEvent.target));
const currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;
const isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;
const activeEl = (0, gridOptionsUtils_1._getActiveDomElement)(this.beans);
let isDetailGridCellFocused = false;
if (currentFullWidthContainer && activeEl) {
isDetailGridCellFocused =
currentFullWidthContainer.contains(activeEl) && activeEl.classList.contains('ag-cell');
}
let nextEl = null;
if (!isFullWidthContainerFocused && !isDetailGridCellFocused) {
nextEl = (0, focus_1._findNextFocusableElement)(this.beans, currentFullWidthContainer, false, keyboardEvent.shiftKey);
}
if ((this.isFullWidth() && isFullWidthContainerFocused) || !nextEl) {
this.beans.navigation?.onTabKeyDown(this, keyboardEvent);
}
}
getFullWidthElement() {
if (this.fullWidthGui) {
return this.fullWidthGui.element;
}
return null;
}
getRowYPosition() {
const displayedEl = this.allRowGuis.find((el) => (0, dom_1._isVisible)(el.element))?.element;
if (displayedEl) {
return displayedEl.getBoundingClientRect().top;
}
return 0;
}
onSuppressCellFocusChanged(suppressCellFocus) {
const tabIndex = this.isFullWidth() && suppressCellFocus ? undefined : -1;
this.allRowGuis.forEach((gui) => {
(0, dom_1._addOrRemoveAttribute)(gui.element, 'tabindex', tabIndex);
});
}
onFullWidthRowFocused(event) {
const node = this.rowNode;
const isFocused = !event
? false
: this.isFullWidth() && event.rowIndex === node.rowIndex && event.rowPinned == node.rowPinned;
const element = this.fullWidthGui ? this.fullWidthGui.element : this.centerGui?.element;
if (!element) {
return;
} // can happen with react ui, comp not yet ready
element.classList.toggle('ag-full-width-focus', isFocused);
if (isFocused && event?.forceBrowserFocus) {
// we don't scroll normal rows into view when we focus them, so we don't want
// to scroll Full Width rows either.
element.focus({ preventScroll: true });
}
}
recreateCell(cellCtrl) {
this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, cellCtrl);
this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, cellCtrl);
this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, cellCtrl);
cellCtrl.destroy();
this.updateColumnLists();
}
removeCellCtrl(prev, cellCtrlToRemove) {
const res = {
list: [],
map: {},
};
prev.list.forEach((cellCtrl) => {
if (cellCtrl === cellCtrlToRemove) {
return;
}
res.list.push(cellCtrl);
res.map[cellCtrl.column.getInstanceId()] = cellCtrl;
});
return res;
}
onMouseEvent(eventName, mouseEvent) {
switch (eventName) {
case 'dblclick':
this.onRowDblClick(mouseEvent);
break;
case 'click':
this.onRowClick(mouseEvent);
break;
case 'touchstart':
case 'mousedown':
this.onRowMouseDown(mouseEvent);
break;
}
}
createRowEvent(type, domEvent) {
const { rowNode } = this;
return (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
type: type,
node: rowNode,
data: rowNode.data,
rowIndex: rowNode.rowIndex,
rowPinned: rowNode.rowPinned,
event: domEvent,
});
}
createRowEventWithSource(type, domEvent) {
const event = this.createRowEvent(type, domEvent);
// when first developing this, we included the rowComp in the event.
// this seems very weird. so when introducing the event types, i left the 'source'
// out of the type, and just include the source in the two places where this event
// was fired (rowClicked and rowDoubleClicked). it doesn't make sense for any
// users to be using this, as the rowComp isn't an object we expose, so would be
// very surprising if a user was using it.
event.source = this;
return event;
}
onRowDblClick(mouseEvent) {
if ((0, event_1._isStopPropagationForAgGrid)(mouseEvent)) {
return;
}
this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource('rowDoubleClicked', mouseEvent));
}
findFullWidthInfoForEvent(event) {
if (!event) {
return;
}
const rowGui = this.findFullWidthRowGui(event.target);
const column = this.getColumnForFullWidth(rowGui);
if (!rowGui || !column) {
return;
}
return { rowGui, column };
}
findFullWidthRowGui(target) {
return this.allRowGuis.find((c) => c.element.contains(target));
}
getColumnForFullWidth(fullWidthRowGui) {
const { visibleCols } = this.beans;
switch (fullWidthRowGui?.containerType) {
case 'center':
return visibleCols.centerCols[0];
case 'left':
return visibleCols.leftCols[0];
case 'right':
return visibleCols.rightCols[0];
default:
return visibleCols.allCols[0];
}
}
onRowMouseDown(mouseEvent) {
this.lastMouseDownOnDragger = (0, dom_1._isElementChildOfClass)(mouseEvent.target, 'ag-row-drag', 3);
if (!this.isFullWidth()) {
return;
}
const node = this.rowNode;
const { rangeSvc, focusSvc } = this.beans;
rangeSvc?.removeAllCellRanges();
const groupInfo = this.findFullWidthInfoForEvent(mouseEvent);
if (!groupInfo) {
return;
}
const { rowGui, column } = groupInfo;
const element = rowGui.element;
const target = mouseEvent.target;
let forceBrowserFocus = mouseEvent.defaultPrevented || (0, browser_1._isBrowserSafari)();
if (element && element.contains(target) && (0, dom_1._isFocusableFormField)(target)) {
forceBrowserFocus = false;
}
focusSvc.setFocusedCell({
rowIndex: node.rowIndex,
column,
rowPinned: node.rowPinned,
forceBrowserFocus,
});
}
onRowClick(mouseEvent) {
const stop = (0, event_1._isStopPropagationForAgGrid)(mouseEvent) || this.lastMouseDownOnDragger;
if (stop) {
return;
}
const { eventSvc, selectionSvc } = this.beans;
eventSvc.dispatchEvent(this.createRowEventWithSource('rowClicked', mouseEvent));
selectionSvc?.handleSelectionEvent(mouseEvent, this.rowNode, 'rowClicked');
}
setupDetailRowAutoHeight(eDetailGui) {
if (this.rowType !== 'FullWidthDetail') {
return;
}
this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this, eDetailGui);
}
createFullWidthCompDetails(eRow, pinned) {
const { gos, rowNode } = this;
const params = (0, gridOptionsUtils_1._addGridCommonParams)(gos, {
fullWidth: true,
data: rowNode.data,
node: rowNode,
value: rowNode.key,
valueFormatted: rowNode.key,
// these need to be taken out, as part of 'afterAttached' now
eGridCell: eRow,
eParentOfValue: eRow,
pinned: pinned,
addRenderedRowListener: this.addEventListener.bind(this),
registerRowDragger: (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) => this.addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value, suppressVisibilityChange),
setTooltip: (value, shouldDisplayTooltip) => {
gos.assertModuleRegistered('Tooltip', 3);
this.refreshRowTooltip(value, shouldDisplayTooltip);
},
});
const compFactory = this.beans.userCompFactory;
switch (this.rowType) {
case 'FullWidthDetail':
return (0, userCompUtils_1._getFullWidthDetailCellRendererDetails)(compFactory, params);
case 'FullWidthGroup':
return (0, userCompUtils_1._getFullWidthGroupCellRendererDetails)(compFactory, params);
case 'FullWidthLoading':
return (0, userCompUtils_1._getFullWidthLoadingCellRendererDetails)(compFactory, params);
default:
return (0, userCompUtils_1._getFullWidthCellRendererDetails)(compFactory, params);
}
}
refreshRowTooltip(value, shouldDisplayTooltip) {
if (!this.fullWidthGui) {
return;
}
this.tooltipFeature = this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature, this, value, shouldDisplayTooltip);
}
addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value = '', suppressVisibilityChange) {
const { rowDragSvc, context } = this.beans;
if (!rowDragSvc || !this.isFullWidth()) {
return;
}
const rowDragComp = rowDragSvc.createRowDragComp(() => value, this.rowNode, undefined, rowDraggerElement, dragStartPixels, suppressVisibilityChange);
this.createBean(rowDragComp, context);
this.addDestroyFunc(() => {
this.destroyBean(rowDragComp, context);
});
}
onUiLevelChanged() {
const newLevel = (0, rowStyleService_1.calculateRowLevel)(this.rowNode);
if (this.rowLevel != newLevel) {
const classToAdd = 'ag-row-level-' + newLevel;
const classToRemove = 'ag-row-level-' + this.rowLevel;
this.allRowGuis.forEach((gui) => {
gui.rowComp.addOrRemoveCssClass(classToAdd, true);
gui.rowComp.addOrRemoveCssClass(classToRemove, false);
});
}
this.rowLevel = newLevel;
}
isFirstRowOnPage() {
return this.rowNode.rowIndex === this.beans.pageBounds.getFirstRow();
}
isLastRowOnPage() {
return this.rowNode.rowIndex === this.beans.pageBounds.getLastRow();
}
refreshFirstAndLastRowStyles() {
const newFirst = this.isFirstRowOnPage();
const newLast = this.isLastRowOnPage();
if (this.firstRowOnPage !== newFirst) {
this.firstRowOnPage = newFirst;
this.allRowGuis.forEach((gui) => gui.rowComp.addOrRemoveCssClass('ag-row-first', newFirst));
}
if (this.lastRowOnPage !== newLast) {
this.lastRowOnPage = newLast;
this.allRowGuis.forEach((gui) => gui.rowComp.addOrRemoveCssClass('ag-row-last', newLast));
}
}
getAllCellCtrls() {
if (this.leftCellCtrls.list.length === 0 && this.rightCellCtrls.list.length === 0) {
return this.centerCellCtrls.list;
}
const res = [...this.centerCellCtrls.list, ...this.leftCellCtrls.list, ...this.rightCellCtrls.list];
return res;
}
postProcessClassesFromGridOptions() {
const cssClasses = [];
this.beans.rowStyleSvc?.processClassesFromGridOptions(cssClasses, this.rowNode);
if (!cssClasses.length) {
return;
}
cssClasses.forEach((classStr) => {
this.allRowGuis.forEach((c) => c.rowComp.addOrRemoveCssClass(classStr, true));
});
}
postProcessRowClassRules() {
this.beans.rowStyleSvc?.processRowClassRules(this.rowNode, (className) => {
this.allRowGuis.forEach((gui) => gui.rowComp.addOrRemoveCssClass(className, true));
}, (className) => {
this.allRowGuis.forEach((gui) => gui.rowComp.addOrRemoveCssClass(className, false));
});
}
setStylesFromGridOptions(updateStyles, gui) {
if (updateStyles) {
this.rowStyles = this.processStylesFromGridOptions();
}
this.forEachGui(gui, (gui) => gui.rowComp.setUserStyles(this.rowStyles));
}
getPinnedForContainer(rowContainerType) {
if (rowContainerType === 'left' || rowContainerType === 'right') {
return rowContainerType;
}
return null;
}
getInitialRowClasses(rowContainerType) {
const pinned = this.getPinnedForContainer(rowContainerType);
const fullWidthRow = this.isFullWidth();
const { rowNode, beans } = this;
const classes = [];
classes.push('ag-row');
classes.push(this.rowFocused ? 'ag-row-focus' : 'ag-row-no-focus');
if (this.fadeInAnimation[rowContainerType]) {
classes.push('ag-opacity-zero');
}
classes.push(rowNode.rowIndex % 2 === 0 ? 'ag-row-even' : 'ag-row-odd');
if (rowNode.isRowPinned()) {
classes.push('ag-row-pinned');
}
if (rowNode.isSelected()) {
classes.push('ag-row-selected');
}
if (rowNode.footer) {
classes.push('ag-row-footer');
}
classes.push('ag-row-level-' + this.rowLevel);
if (rowNode.stub) {
classes.push('ag-row-loading');
}
if (fullWidthRow) {
classes.push('ag-full-width-row');
}
beans.expansionSvc?.addExpandedCss(classes, rowNode);
if (rowNode.dragging) {
classes.push('ag-row-dragging');
}
const { rowStyleSvc } = beans;
if (rowStyleSvc) {
rowStyleSvc.processClassesFromGridOptions(classes, rowNode);
rowStyleSvc.preProcessRowClassRules(classes, rowNode);
}
// we use absolute position unless we are doing print layout
classes.push(this.printLayout ? 'ag-row-position-relative' : 'ag-row-position-absolute');
if (this.isFirstRowOnPage()) {
classes.push('ag-row-first');
}
if (this.isLastRowOnPage()) {
classes.push('ag-row-last');
}
if (fullWidthRow) {
if (pinned === 'left') {
classes.push('ag-cell-last-left-pinned');
}
if (pinned === 'right') {
classes.push('ag-cell-first-right-pinned');
}
}
return classes;
}
processStylesFromGridOptions() {
// Return constant reference for React
return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode) ?? this.emptyStyle;
}
onRowSelected(gui) {
this.beans.selectionSvc?.onRowCtrlSelected(this, (gui) => {
if (gui === this.centerGui || gui === this.fullWidthGui) {
this.announceDescription();
}
}, gui);
}
announceDescription() {
this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode);
}
addHoverFunctionality(eGui) {
// because we use animation frames to do this, it's possible the row no longer exists
// by the time we get to add it
if (!this.active) {
return;
}
// because mouseenter and mouseleave do not propagate, we cannot listen on the gridPanel
// like we do for all the other mouse events.
// because of the pinning, we cannot simply add / remove the class based on the eRow. we
// have to check all eRow's (body & pinned). so the trick is if any of the rows gets a
// mouse hover, it sets such in the rowNode, and then all three reflect the change as
// all are listening for event on the row node.
const { element, compBean } = eGui;
const { rowNode, beans, gos } = this;
// step 1 - add listener, to set flag on row node
compBean.addManagedListeners(element, {
mouseenter: () => rowNode.dispatchRowEvent('mouseEnter'),
mouseleave: () => rowNode.dispatchRowEvent('mouseLeave'),
});
// step 2 - listen for changes on row node (which any element can trigger)
compBean.addManagedListeners(rowNode, {
mouseEnter: () => {
// if hover turned off, we don't add the class. we do this here so that if the application
// toggles this property mid way, we remove the hover form the last row, but we stop
// adding hovers from that point onwards. Also, do not highlight while dragging elements around.
if (!beans.dragSvc?.dragging && !gos.get('suppressRowHoverHighlight')) {
element.classList.add('ag-row-hover');
rowNode.setHovered(true);
}
},
mouseLeave: () => {
this.resetHoveredStatus(element);
},
});
}
resetHoveredStatus(el) {
const elements = el ? [el] : this.allRowGuis.map((gui) => gui.element);
for (const element of elements) {
element.classList.remove('ag-row-hover');
}
this.rowNode.setHovered(false);
}
// for animation, we don't want to animate entry or exit to a very far away pixel,
// otherwise the row would move so fast, it would appear to disappear. so this method
// moves the row closer to the viewport if it is far away, so the row slide in / out
// at a speed the user can see.
roundRowTopToBounds(rowTop) {
const range = this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition();
const minPixel = this.applyPaginationOffset(range.top, true) - 100;
const maxPixel = this.applyPaginationOffset(range.bottom, true) + 100;
return Math.min(Math.max(minPixel, rowTop), maxPixel);
}
forEachGui(gui, callback) {
if (gui) {
callback(gui);
}
else {
this.allRowGuis.forEach(callback);
}
}
onRowHeightChanged(gui) {
// check for exists first - if the user is resetting the row height, then
// it will be null (or undefined) momentarily until the next time the flatten
// stage is called where the row will then update again with a new height
if (this.rowNode.rowHeight == null) {
return;
}
const rowHeight = this.rowNode.rowHeight;
const defaultRowHeight = this.beans.environment.getDefaultRowHeight();
const isHeightFromFunc = (0, gridOptionsUtils_1._isGetRowHeightFunction)(this.gos);
const heightFromFunc = isHeightFromFunc ? (0, gridOptionsUtils_1._getRowHeightForNode)(this.beans, this.rowNode).height : undefined;
const lineHeight = heightFromFunc ? `${Math.min(defaultRowHeight, heightFromFunc) - 2}px` : undefined;
this.forEachGui(gui, (gui) => {
gui.element.style.height = `${rowHeight}px`;
// If the row height is coming from a function, this means some rows can
// be smaller than the theme had intended. so we set --ag-line-height on
// the row, which is picked up by the theme CSS and is used in a calc
// for the CSS line-height property, which makes sure the line-height is
// not bigger than the row height, otherwise the row text would not fit.
// We do not use rowNode.rowHeight here, as this could be the result of autoHeight,
// and we found using the autoHeight result causes a loop, where changing the
// line-height them impacts the cell height, resulting in a new autoHeight,
// resulting in a new line-height and so on loop.
// const heightFromFunc = getRowHeightForNode(this.gos, this.rowNode).height;
if (lineHeight) {
gui.element.style.setProperty('--ag-line-height', lineHeight);
}
});
}
// note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.
destroyFirstPass(suppressAnimation = false) {
this.active = false;
// why do we have this method? shouldn't everything below be added as a destroy func beside
// the corresponding create logic?
const { rowNode } = this;
if (!suppressAnimation && (0, gridOptionsUtils_1._isAnimateRows)(this.gos) && !rowNode.sticky) {
const rowStillVisibleJustNotInViewport = rowNode.rowTop != null;
if (rowStillVisibleJustNotInViewport) {
// if the row is not rendered, but in viewport, it means it has moved,
// so we animate the row out. if the new location is very far away,
// the animation will be so fast the row will look like it's just disappeared,
// so instead we animate to a position just outside the viewport.
const rowTop = this.roundRowTopToBounds(rowNode.rowTop);
this.setRowTop(rowTop);
}
else {
this.allRowGuis.forEach((gui) => gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', true));
}
}
rowNode.setHovered(false);
const event = this.createRowEvent('virtualRowRemoved');
this.dispatchLocalEvent(event);
this.beans.eventSvc.dispatchEvent(event);
super.destroy();
}
destroySecondPass() {
this.allRowGuis.length = 0;
// if we are editing, destroying the row will stop editing
this.beans.editSvc?.stopRowEditing(this);
const destroyCellCtrls = (ctrls) => {
ctrls.list.forEach((c) => c.destroy());
return { list: [], map: {} };
};
this.centerCellCtrls = destroyCellCtrls(this.centerCellCtrls);
this.leftCellCtrls = destroyCellCtrls(this.leftCellCtrls);
this.rightCellCtrls = destroyCellCtrls(this.rightCellCtrls);
}
setFocusedClasses(gui) {
this.forEachGui(gui, (gui) => {
gui.rowComp.addOrRemoveCssClass('ag-row-focus', this.rowFocused);
gui.rowComp.addOrRemoveCssClass('ag-row-no-focus', !this.rowFocused);
});
}
onCellFocusChanged() {
const { focusSvc, editSvc } = this.beans;
const rowFocused = focusSvc.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);
if (rowFocused !== this.rowFocused) {
this.rowFocused = rowFocused;
this.setFocusedClasses();
}
// if we are editing, then moving the focus out of a row will stop editing
if (!rowFocused && this.editing) {
editSvc?.stopRowEditing(this, false);
}
}
onPaginationChanged() {
const currentPage = this.beans.pagination?.getCurrentPage() ?? 0;
// it is possible this row is in the new page, but the page number has changed, which means
// it needs to reposition itself relative to the new page
if (this.paginationPage !== currentPage) {
this.paginationPage = currentPage;
this.onTopChanged();
}
this.refreshFirstAndLastRowStyles();
}
onTopChanged() {
this.setRowTop(this.rowNode.rowTop);
}
onPaginationPixelOffsetChanged() {
// the pixel offset is used when calculating rowTop to set on the row DIV
this.onTopChanged();
}
// applies pagination offset, eg if on second page, and page height is 500px, then removes
// 500px from the top position, so a row with rowTop 600px is displayed at location 100px.
// reverse will take the offset away rather than add.
applyPaginationOffset(topPx, reverse = false) {
if (this.rowNode.isRowPinned() || this.rowNode.sticky) {
return topPx;
}
const pixelOffset = this.beans.pageBounds.getPixelOffset();
const multiplier = reverse ? 1 : -1;
return topPx + pixelOffset * multiplier;
}
setRowTop(pixels) {
// print layout uses normal flow layout for row positioning
if (this.printLayout) {
return;
}
// need to make sure rowTop is not null, as this can happen if the node was once
// visible (ie parent group was expanded) but is now not visible
if ((0, generic_1._exists)(pixels)) {
const afterPaginationPixels = this.applyPaginationOffset(pixels);
const skipScaling = this.rowNode.isRowPinned() || this.rowNode.sticky;
const afterScalingPixels = skipScaling
? afterPaginationPixels
: this.beans.rowContainerHeight.getRealPixelPosition(afterPaginationPixels);
const topPx = `${afterScalingPixels}px`;
this.setRowTopStyle(topPx);
}
}
// the top needs to be set into the DOM element when the element is created, not updated afterwards.
// otherwise the transition would not work, as it would be transitioning from zero (the unset value).
// for example, suppose a row that is outside the viewport, then user does a filter to remove other rows
// and this row now appears in the viewport, and the row moves up (ie it was under the viewport and not rendered,
// but now is in the viewport) then a new RowComp is created, however it should have it's position initialised
// to below the viewport, so the row will appear to animate up. if we didn't set the initial position at creation
// time, the row would animate down (ie from position zero).
getInitialRowTop(rowContainerType) {
return this.suppressRowTransform ? this.getInitialRowTopShared(rowContainerType) : undefined;
}
getInitialTransform(rowContainerType) {
return this.suppressRowTransform ? undefined : `translateY(${this.getInitialRowTopShared(rowContainerType)})`;
}
getInitialRowTopShared(rowContainerType) {
// print layout uses normal flow layout for row positioning
if (this.printLayout) {
return '';
}
const rowNode = this.rowNode;
let rowTop;
if (rowNode.sticky) {
rowTop = rowNode.stickyRowTop;
}
else {
// if sliding in, we take the old row top. otherwise we just set the current row top.
const pixels = this.slideInAnimation[rowContainerType]
? this.roundRowTopToBounds(rowNode.oldRowTop)
: rowNode.rowTop;
const afterPaginationPixels = this.applyPaginationOffset(pixels);
// we don't apply scaling if row is pinned
rowTop = rowNode.isRowPinned()
? afterPaginationPixels
: this.beans.rowContainerHeight.getRealPixelPosition(afterPaginationPixels);
}
return rowTop + 'px';
}
setRowTopStyle(topPx) {
this.allRowGuis.forEach((gui) => this.suppressRowTransform ? gui.rowComp.setTop(topPx) : gui.rowComp.setTransform(`translateY(${topPx})`));
}
getCellCtrl(column, skipColSpanSearch = false) {
// first up, check for cell directly linked to this column
let res = null;
this.getAllCellCtrls().forEach((cellCtrl) => {
if (cellCtrl.column == column) {
res = cellCtrl;
}
});
if (res != null || skipColSpanSearch) {
return res;
}
// second up, if not found, then check for spanned cols.
// we do this second (and not at the same time) as this is
// more expensive, as spanning cols is a
// infrequently used feature so we don't need to do this most
// of the time
this.getAllCellCtrls().forEach((cellCtrl) => {
if (cellCtrl.getColSpanningList().indexOf(column) >= 0) {
res = cellCtrl;
}
});
return res;
}
onRowIndexChanged() {
// we only bother updating if the rowIndex is present. if it is not present, it means this row
// is child of a group node, and the group node was closed, it's the only way to have no row index.
// when this happens, row is about to be de-rendered, so we don't care, rowComp is about to die!
if (this.rowNode.rowIndex != null) {
this.onCellFocusChanged();
this.updateRowIndexes();
this.postProcessCss();
}
}
updateRowIndexes(gui) {
const rowIndexStr = this.rowNode.getRowIndexString();
if (rowIndexStr === null) {
return;
}
const headerRowCount = (this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount() ?? 0) +
(this.beans.filterManager?.getHeaderRowCount() ?? 0);
const rowIsEven = this.rowNode.rowIndex % 2 === 0;
const ariaRowIndex = headerRowCount + this.rowNode.rowIndex + 1;
this.forEachGui(gui, (c) => {
c.rowComp.setRowIndex(rowIndexStr);
c.rowComp.addOrRemoveCssClass('ag-row-even', rowIsEven);
c.rowComp.addOrRemoveCssClass('ag-row-odd', !rowIsEven);
(0, aria_1._setAriaRowIndex)(c.element, ariaRowIndex);
});
}
}
exports.RowCtrl = RowCtrl;
/***/ }),
/***/ 7109:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowContainerHeightService = void 0;
const beanStub_1 = __webpack_require__(8731);
const browser_1 = __webpack_require__(8667);
const function_1 = __webpack_require__(2043);
/**
* This class solves the 'max height' problem, where the user might want to show more data than
* the max div height actually allows.
*/
class RowContainerHeightService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'rowContainerHeight';
// the scrollY position
this.scrollY = 0;
// how tall the body is
this.uiBodyHeight = 0;
}
postConstruct() {
this.addManagedEventListeners({ bodyHeightChanged: this.updateOffset.bind(this) });
this.maxDivHeight = (0, browser_1._getMaxDivHeight)();
(0, function_1._logIfDebug)(this.gos, 'RowContainerHeightService - maxDivHeight = ' + this.maxDivHeight);
}
updateOffset() {
if (!this.stretching) {
return;
}
const newScrollY = this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top;
const newBodyHeight = this.getUiBodyHeight();
const atLeastOneChanged = newScrollY !== this.scrollY || newBodyHeight !== this.uiBodyHeight;
if (atLeastOneChanged) {
this.scrollY = newScrollY;
this.uiBodyHeight = newBodyHeight;
this.calculateOffset();
}
}
calculateOffset() {
this.setUiContainerHeight(this.maxDivHeight);
this.pixelsToShave = this.modelHeight - this.uiContainerHeight;
this.maxScrollY = this.uiContainerHeight - this.uiBodyHeight;
const scrollPercent = this.scrollY / this.maxScrollY;
const divStretchOffset = scrollPercent * this.pixelsToShave;
(0, function_1._logIfDebug)(this.gos, `RowContainerHeightService - Div Stretch Offset = ${divStretchOffset} (${this.pixelsToShave} * ${scrollPercent})`);
this.setDivStretchOffset(divStretchOffset);
}
setUiContainerHeight(height) {
if (height !== this.uiContainerHeight) {
this.uiContainerHeight = height;
this.eventSvc.dispatchEvent({ type: 'rowContainerHeightChanged' });
}
}
clearOffset() {
this.setUiContainerHeight(this.modelHeight);
this.pixelsToShave = 0;
this.setDivStretchOffset(0);
}
setDivStretchOffset(newOffset) {
// because we are talking pixels, no point in confusing things with half numbers
const newOffsetFloor = typeof newOffset === 'number' ? Math.floor(newOffset) : null;
if (this.divStretchOffset === newOffsetFloor) {
return;
}
this.divStretchOffset = newOffsetFloor;
this.eventSvc.dispatchEvent({ type: 'heightScaleChanged' });
}
setModelHeight(modelHeight) {
this.modelHeight = modelHeight;
this.stretching =
modelHeight != null && // null happens when in print layout
this.maxDivHeight > 0 &&
modelHeight > this.maxDivHeight;
if (this.stretching) {
this.calculateOffset();
}
else {
this.clearOffset();
}
}
getRealPixelPosition(modelPixel) {
return modelPixel - this.divStretchOffset;
}
getUiBodyHeight() {
const pos = this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();
return pos.bottom - pos.top;
}
getScrollPositionForPixel(rowTop) {
if (this.pixelsToShave <= 0) {
return rowTop;
}
const modelMaxScroll = this.modelHeight - this.getUiBodyHeight();
const scrollPercent = rowTop / modelMaxScroll;
const scrollPixel = this.maxScrollY * scrollPercent;
return scrollPixel;
}
}
exports.RowContainerHeightService = RowContainerHeightService;
/***/ }),
/***/ 557:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isRowInMap = exports.mapRowNodes = exports.RowRenderer = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const animationFrameService_1 = __webpack_require__(2612);
const array_1 = __webpack_require__(1502);
const generic_1 = __webpack_require__(4422);
const logging_1 = __webpack_require__(7764);
const cellCtrl_1 = __webpack_require__(814);
const rowCtrl_1 = __webpack_require__(7632);
const ROW_ANIMATION_TIMEOUT = 400;
class RowRenderer extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'rowRenderer';
this.destroyFuncsForColumnListeners = [];
// map of row ids to row objects. keeps track of which elements
// are rendered for which rows in the dom.
this.rowCtrlsByRowIndex = {};
this.zombieRowCtrls = {};
this.allRowCtrls = [];
this.topRowCtrls = [];
this.bottomRowCtrls = [];
// we only allow one refresh at a time, otherwise the internal memory structure here
// will get messed up. this can happen if the user has a cellRenderer, and inside the
// renderer they call an API method that results in another pass of the refresh,
// then it will be trying to draw rows in the middle of a refresh.
this.refreshInProgress = false;
this.dataFirstRenderedFired = false;
this.setupRangeSelectionListeners = () => {
const onCellSelectionChanged = () => {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellSelectionChanged());
};
const onColumnMovedPinnedVisible = () => {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.updateRangeBordersIfRangeCount());
};
const addCellSelectionListeners = () => {
this.eventSvc.addEventListener('cellSelectionChanged', onCellSelectionChanged);
this.eventSvc.addEventListener('columnMoved', onColumnMovedPinnedVisible);
this.eventSvc.addEventListener('columnPinned', onColumnMovedPinnedVisible);
this.eventSvc.addEventListener('columnVisible', onColumnMovedPinnedVisible);
};
const removeCellSelectionListeners = () => {
this.eventSvc.removeEventListener('cellSelectionChanged', onCellSelectionChanged);
this.eventSvc.removeEventListener('columnMoved', onColumnMovedPinnedVisible);
this.eventSvc.removeEventListener('columnPinned', onColumnMovedPinnedVisible);
this.eventSvc.removeEventListener('columnVisible', onColumnMovedPinnedVisible);
};
this.addDestroyFunc(() => removeCellSelectionListeners());
this.addManagedPropertyListeners(['enableRangeSelection', 'cellSelection'], () => {
const isEnabled = (0, gridOptionsUtils_1._isCellSelectionEnabled)(this.gos);
if (isEnabled) {
addCellSelectionListeners();
}
else {
removeCellSelectionListeners();
}
});
const cellSelectionEnabled = (0, gridOptionsUtils_1._isCellSelectionEnabled)(this.gos);
if (cellSelectionEnabled) {
addCellSelectionListeners();
}
};
}
wireBeans(beans) {
this.pageBounds = beans.pageBounds;
this.colModel = beans.colModel;
this.pinnedRowModel = beans.pinnedRowModel;
this.rowModel = beans.rowModel;
this.focusSvc = beans.focusSvc;
this.rowContainerHeight = beans.rowContainerHeight;
this.ctrlsSvc = beans.ctrlsSvc;
}
postConstruct() {
this.ctrlsSvc.whenReady(this, (p) => {
this.gridBodyCtrl = p.gridBodyCtrl;
this.initialise();
});
}
initialise() {
this.addManagedEventListeners({
paginationChanged: this.onPageLoaded.bind(this),
pinnedRowDataChanged: this.onPinnedRowDataChanged.bind(this),
displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
bodyScroll: this.onBodyScroll.bind(this),
bodyHeightChanged: this.redraw.bind(this, {}),
});
this.addManagedPropertyListeners(['domLayout', 'embedFullWidthRows'], () => this.onDomLayoutChanged());
this.addManagedPropertyListeners(['suppressMaxRenderedRowRestriction', 'rowBuffer'], () => this.redraw());
this.addManagedPropertyListener('suppressCellFocus', (e) => this.onSuppressCellFocusChanged(e.currentValue));
this.addManagedPropertyListeners([
'groupSuppressBlankHeader',
'getBusinessKeyForNode',
'fullWidthCellRenderer',
'fullWidthCellRendererParams',
'suppressStickyTotalRow',
'groupRowRenderer',
'groupRowRendererParams',
'loadingCellRenderer',
'loadingCellRendererParams',
'detailCellRenderer',
'detailCellRendererParams',
'enableRangeSelection',
'enableCellTextSelection',
], () => this.redrawRows());
this.addManagedPropertyListener('cellSelection', ({ currentValue, previousValue }) => {
// Only redraw rows if cell selection is enabled or disabled
if ((!previousValue && currentValue) || (previousValue && !currentValue)) {
this.redrawRows();
}
});
const { stickyRowSvc, gos } = this.beans;
if (stickyRowSvc) {
this.stickyRowFeature = stickyRowSvc.createStickyRowFeature(this, this.createRowCon.bind(this), this.destroyRowCtrls.bind(this));
}
else {
const gridBodyCtrl = this.gridBodyCtrl;
gridBodyCtrl.setStickyTopHeight(0);
gridBodyCtrl.setStickyBottomHeight(0);
}
this.registerCellEventListeners();
this.initialiseCache();
this.printLayout = (0, gridOptionsUtils_1._isDomLayout)(gos, 'print');
this.embedFullWidthRows = this.printLayout || gos.get('embedFullWidthRows');
this.redrawAfterModelUpdate();
}
initialiseCache() {
if (this.gos.get('keepDetailRows')) {
const countProp = this.getKeepDetailRowsCount();
const count = countProp != null ? countProp : 3;
this.cachedRowCtrls = new RowCtrlCache(count);
}
}
getKeepDetailRowsCount() {
return this.gos.get('keepDetailRowsCount');
}
getStickyTopRowCtrls() {
return this.stickyRowFeature?.stickyTopRowCtrls ?? [];
}
getStickyBottomRowCtrls() {
return this.stickyRowFeature?.stickyBottomRowCtrls ?? [];
}
updateAllRowCtrls() {
const liveList = Object.values(this.rowCtrlsByRowIndex);
const zombieList = Object.values(this.zombieRowCtrls);
const cachedList = this.cachedRowCtrls?.getEntries() ?? [];
if (zombieList.length > 0 || cachedList.length > 0) {
// Only spread if we need to.
this.allRowCtrls = [...liveList, ...zombieList, ...cachedList];
}
else {
this.allRowCtrls = liveList;
}
}
onCellFocusChanged(event) {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onCellFocused(event));
this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onFullWidthRowFocused(event));
}
onSuppressCellFocusChanged(suppressCellFocus) {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onSuppressCellFocusChanged(suppressCellFocus));
this.getFullWidthRowCtrls().forEach((rowCtrl) => rowCtrl.onSuppressCellFocusChanged(suppressCellFocus));
}
// in a clean design, each cell would register for each of these events. however when scrolling, all the cells
// registering and de-registering for events is a performance bottleneck. so we register here once and inform
// all active cells.
registerCellEventListeners() {
this.addManagedEventListeners({
cellFocused: (event) => {
this.onCellFocusChanged(event);
},
cellFocusCleared: () => this.onCellFocusChanged(),
flashCells: (event) => {
const { cellFlashSvc } = this.beans;
if (cellFlashSvc) {
this.getAllCellCtrls().forEach((cellCtrl) => cellFlashSvc.onFlashCells(cellCtrl, event));
}
},
columnHoverChanged: () => {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onColumnHover());
},
displayedColumnsChanged: () => {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onDisplayedColumnsChanged());
},
displayedColumnsWidthChanged: () => {
// only for printLayout - because we are rendering all the cells in the same row, regardless of pinned state,
// then changing the width of the containers will impact left position. eg the center cols all have their
// left position adjusted by the width of the left pinned column, so if the pinned left column width changes,
// all the center cols need to be shifted to accommodate this. when in normal layout, the pinned cols are
// in different containers so doesn't impact.
if (this.printLayout) {
this.getAllCellCtrls().forEach((cellCtrl) => cellCtrl.onLeftChanged());
}
},
});
this.setupRangeSelectionListeners();
// add listeners to the grid columns
this.refreshListenersToColumnsForCellComps();
// if the grid columns change, then refresh the listeners again
this.addManagedEventListeners({
gridColumnsChanged: this.refreshListenersToColumnsForCellComps.bind(this),
});
this.addDestroyFunc(this.removeGridColumnListeners.bind(this));
}
// executes all functions in destroyFuncsForColumnListeners and then clears the list
removeGridColumnListeners() {
this.destroyFuncsForColumnListeners.forEach((func) => func());
this.destroyFuncsForColumnListeners.length = 0;
}
// this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.
// when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to
// the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here
// once instead.
refreshListenersToColumnsForCellComps() {
this.removeGridColumnListeners();
const cols = this.colModel.getCols();
cols.forEach((col) => {
const forEachCellWithThisCol = (callback) => {
this.getAllCellCtrls().forEach((cellCtrl) => {
if (cellCtrl.column === col) {
callback(cellCtrl);
}
});
};
const leftChangedListener = () => {
forEachCellWithThisCol((cellCtrl) => cellCtrl.onLeftChanged());
};
const widthChangedListener = () => {
forEachCellWithThisCol((cellCtrl) => cellCtrl.onWidthChanged());
};
const firstRightPinnedChangedListener = () => {
forEachCellWithThisCol((cellCtrl) => cellCtrl.onFirstRightPinnedChanged());
};
const lastLeftPinnedChangedListener = () => {
forEachCellWithThisCol((cellCtrl) => cellCtrl.onLastLeftPinnedChanged());
};
const colDefChangedListener = () => {
forEachCellWithThisCol((cellCtrl) => cellCtrl.onColDefChanged());
};
col.__addEventListener('leftChanged', leftChangedListener);
col.__addEventListener('widthChanged', widthChangedListener);
col.__addEventListener('firstRightPinnedChanged', firstRightPinnedChangedListener);
col.__addEventListener('lastLeftPinnedChanged', lastLeftPinnedChangedListener);
col.__addEventListener('colDefChanged', colDefChangedListener);
this.destroyFuncsForColumnListeners.push(() => {
col.__removeEventListener('leftChanged', leftChangedListener);
col.__removeEventListener('widthChanged', widthChangedListener);
col.__removeEventListener('firstRightPinnedChanged', firstRightPinnedChangedListener);
col.__removeEventListener('lastLeftPinnedChanged', lastLeftPinnedChangedListener);
col.__removeEventListener('colDefChanged', colDefChangedListener);
});
});
}
onDomLayoutChanged() {
const printLayout = (0, gridOptionsUtils_1._isDomLayout)(this.gos, 'print');
const embedFullWidthRows = printLayout || this.gos.get('embedFullWidthRows');
// if moving towards or away from print layout, means we need to destroy all rows, as rows are not laid
// out using absolute positioning when doing print layout
const destroyRows = embedFullWidthRows !== this.embedFullWidthRows || this.printLayout !== printLayout;
this.printLayout = printLayout;
this.embedFullWidthRows = embedFullWidthRows;
if (destroyRows) {
this.redrawAfterModelUpdate({ domLayoutChanged: true });
}
}
// for row models that have datasources, when we update the datasource, we need to force the rowRenderer
// to redraw all rows. otherwise the old rows from the old datasource will stay displayed.
datasourceChanged() {
this.firstRenderedRow = 0;
this.lastRenderedRow = -1;
const rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);
this.removeRowCtrls(rowIndexesToRemove);
}
onPageLoaded(event) {
const params = {
recycleRows: event.keepRenderedRows,
animate: event.animate,
newData: event.newData,
newPage: event.newPage,
// because this is a model updated event (not pinned rows), we
// can skip updating the pinned rows. this is needed so that if user
// is doing transaction updates, the pinned rows are not getting constantly
// trashed - or editing cells in pinned rows are not refreshed and put into read mode
onlyBody: true,
};
this.redrawAfterModelUpdate(params);
}
/**
* @param column AgColumn
* @returns An array with HTMLElement for every cell of the column passed as param.
* If the cell is spanning across multiple columns, it only returns the html element
* if the column passed is the first column of the span (used for auto width calculation).
*/
getAllCellsNotSpanningForColumn(column) {
const res = [];
this.getAllRowCtrls().forEach((rowCtrl) => {
const eCell = rowCtrl.getCellCtrl(column, true)?.eGui;
if (eCell) {
res.push(eCell);
}
});
return res;
}
refreshFloatingRowComps() {
this.refreshFloatingRows(this.topRowCtrls, 'top');
this.refreshFloatingRows(this.bottomRowCtrls, 'bottom');
}
/**
* Determines which row controllers need to be destroyed and re-created vs which ones can
* be re-used.
*
* This is operation is to pinned/floating rows as `this.recycleRows` is to normal/body rows.
*
* All `RowCtrl` instances in `rowCtrls` that don't correspond to `RowNode` instances in `rowNodes` are destroyed.
* All `RowNode` instances in `rowNodes` that don't correspond to `RowCtrl` instances in `rowCtrls` are created.
* All instances in `rowCtrls` must be in the same order as their corresponding nodes in `rowNodes`.
*
* @param rowCtrls The list of existing row controllers
* @param rowNodes The canonical list of row nodes that should have associated controllers
*/
refreshFloatingRows(rowCtrls, floating) {
const { pinnedRowModel, beans, printLayout } = this;
const rowCtrlMap = Object.fromEntries(rowCtrls.map((ctrl) => [ctrl.rowNode.id, ctrl]));
pinnedRowModel?.forEachPinnedRow(floating, (node, i) => {
const rowCtrl = rowCtrls[i];
const rowCtrlDoesNotExist = rowCtrl && pinnedRowModel.getPinnedRowById(rowCtrl.rowNode.id, floating) === undefined;
if (rowCtrlDoesNotExist) {
// ctrl not in new nodes list, destroy
rowCtrl.destroyFirstPass();
rowCtrl.destroySecondPass();
}
if (node.id in rowCtrlMap) {
// ctrl exists already, re-use it
rowCtrls[i] = rowCtrlMap[node.id];
delete rowCtrlMap[node.id];
}
else {
// ctrl doesn't exist, create it
rowCtrls[i] = new rowCtrl_1.RowCtrl(node, beans, false, false, printLayout);
}
});
const rowNodeCount = (floating === 'top' ? pinnedRowModel?.getPinnedTopRowCount() : pinnedRowModel?.getPinnedBottomRowCount()) ??
0;
// Truncate array if rowCtrls is longer than rowNodes
rowCtrls.length = rowNodeCount;
}
onPinnedRowDataChanged() {
// recycling rows in order to ensure cell editing is not cancelled
const params = {
recycleRows: true,
};
this.redrawAfterModelUpdate(params);
}
redrawRow(rowNode, suppressEvent = false) {
if (rowNode.sticky) {
this.stickyRowFeature?.refreshStickyNode(rowNode);
}
else if (this.cachedRowCtrls?.has(rowNode)) {
// delete row from cache if it needs redrawn
// if it's in the cache no updates need fired, as nothing
// has been rendered
this.cachedRowCtrls.removeRow(rowNode);
return;
}
else {
const destroyAndRecreateCtrl = (dataStruct) => {
const ctrl = dataStruct[rowNode.rowIndex];
if (!ctrl) {
return;
}
if (ctrl.rowNode !== rowNode) {
// if the node is in the wrong place, then the row model is responsible for triggering a full refresh.
return;
}
ctrl.destroyFirstPass();
ctrl.destroySecondPass();
dataStruct[rowNode.rowIndex] = this.createRowCon(rowNode, false, false);
};
switch (rowNode.rowPinned) {
case 'top':
destroyAndRecreateCtrl(this.topRowCtrls);
break;
case 'bottom':
destroyAndRecreateCtrl(this.bottomRowCtrls);
break;
default:
destroyAndRecreateCtrl(this.rowCtrlsByRowIndex);
this.updateAllRowCtrls();
}
}
if (!suppressEvent) {
this.dispatchDisplayedRowsChanged(false);
}
}
redrawRows(rowNodes) {
// if no row nodes provided, then refresh everything
const partialRefresh = rowNodes != null;
if (partialRefresh) {
rowNodes?.forEach((node) => this.redrawRow(node, true));
this.dispatchDisplayedRowsChanged(false);
return;
}
this.redrawAfterModelUpdate();
}
getCellToRestoreFocusToAfterRefresh(params) {
const focusedCell = params?.suppressKeepFocus ? null : this.focusSvc.getFocusCellToUseAfterRefresh();
if (focusedCell == null) {
return null;
}
// if the dom is not actually focused on a cell, then we don't try to refocus. the problem this
// solves is with editing - if the user is editing, eg focus is on a text field, and not on the
// cell itself, then the cell can be registered as having focus, however it's the text field that
// has the focus and not the cell div. therefore, when the refresh is finished, the grid will focus
// the cell, and not the textfield. that means if the user is in a text field, and the grid refreshes,
// the focus is lost from the text field. we do not want this.
const activeElement = (0, gridOptionsUtils_1._getActiveDomElement)(this.beans);
const cellDomData = (0, gridOptionsUtils_1._getDomData)(this.gos, activeElement, cellCtrl_1.DOM_DATA_KEY_CELL_CTRL);
const rowDomData = (0, gridOptionsUtils_1._getDomData)(this.gos, activeElement, rowCtrl_1.DOM_DATA_KEY_ROW_CTRL);
const gridElementFocused = cellDomData || rowDomData;
return gridElementFocused ? focusedCell : null;
}
// gets called from:
// +) initialisation (in registerGridComp) params = null
// +) onDomLayoutChanged, params = null
// +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true
// +) onPinnedRowDataChanged, recycleRows = true
// +) redrawRows (from Grid API), recycleRows = true/false
redrawAfterModelUpdate(params = {}) {
this.getLockOnRefresh();
const focusedCell = this.getCellToRestoreFocusToAfterRefresh(params);
this.updateContainerHeights();
this.scrollToTopIfNewData(params);
// never recycle rows on layout change as rows could change from normal DOM layout
// back to the grid's row positioning.
const recycleRows = !params.domLayoutChanged && !!params.recycleRows;
const animate = params.animate && (0, gridOptionsUtils_1._isAnimateRows)(this.gos);
// after modelUpdate, row indexes can change, so we clear out the rowsByIndex map,
// however we can reuse the rows, so we keep them but index by rowNode.id
const rowsToRecycle = recycleRows ? this.getRowsToRecycle() : null;
if (!recycleRows) {
this.removeAllRowComps();
}
this.workOutFirstAndLastRowsToRender();
const { stickyRowFeature } = this;
if (stickyRowFeature) {
stickyRowFeature.checkStickyRows();
// this is a hack, if sticky rows brings in rows from other pages
// need to update the model height to include them.
const extraHeight = stickyRowFeature.extraTopHeight + stickyRowFeature.extraBottomHeight;
if (extraHeight) {
this.updateContainerHeights(extraHeight);
}
}
this.recycleRows(rowsToRecycle, animate);
this.gridBodyCtrl.updateRowCount();
if (!params.onlyBody) {
this.refreshFloatingRowComps();
}
this.dispatchDisplayedRowsChanged();
// if a cell was focused before, ensure focus now.
if (focusedCell != null) {
this.restoreFocusedCell(focusedCell);
}
this.releaseLockOnRefresh();
}
scrollToTopIfNewData(params) {
const scrollToTop = params.newData || params.newPage;
const suppressScrollToTop = this.gos.get('suppressScrollOnNewData');
if (scrollToTop && !suppressScrollToTop) {
this.gridBodyCtrl.scrollFeature.scrollToTop();
this.stickyRowFeature?.resetOffsets();
}
}
updateContainerHeights(additionalHeight = 0) {
const { rowContainerHeight } = this;
// when doing print layout, we don't explicitly set height on the containers
if (this.printLayout) {
rowContainerHeight.setModelHeight(null);
return;
}
let containerHeight = this.pageBounds.getCurrentPageHeight();
// we need at least 1 pixel for the horizontal scroll to work. so if there are now rows,
// we still want the scroll to be present, otherwise there would be no way to scroll the header
// which might be needed us user wants to access columns
// on the RHS - and if that was where the filter was that cause no rows to be presented, there
// is no way to remove the filter.
if (containerHeight === 0) {
containerHeight = 1;
}
rowContainerHeight.setModelHeight(containerHeight + additionalHeight);
}
getLockOnRefresh() {
if (this.refreshInProgress) {
throw new Error((0, logging_1._errMsg)(252));
}
this.refreshInProgress = true;
this.beans.frameworkOverrides.getLockOnRefresh?.();
}
releaseLockOnRefresh() {
this.refreshInProgress = false;
this.beans.frameworkOverrides.releaseLockOnRefresh?.();
}
isRefreshInProgress() {
return this.refreshInProgress;
}
// sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without
// worry about the focus been lost. this is important when the user is using keyboard navigation to do edits
// and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the
// edited cell).
restoreFocusedCell(cellPosition) {
if (!cellPosition) {
return;
}
this.focusSvc.restoreFocusedCell(cellPosition, () => {
// we don't wish to dispatch an event as the rowRenderer is not capable of changing the selected cell,
// so we mock a change event for the full width rows and cells to ensure they update to the newly selected state
this.onCellFocusChanged((0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
rowIndex: cellPosition.rowIndex,
column: cellPosition.column,
rowPinned: cellPosition.rowPinned,
forceBrowserFocus: true,
preventScrollOnBrowserFocus: true,
type: 'cellFocused',
}));
});
}
getAllCellCtrls() {
const res = [];
const rowCtrls = this.getAllRowCtrls();
const rowCtrlsLength = rowCtrls.length;
for (let i = 0; i < rowCtrlsLength; i++) {
const cellCtrls = rowCtrls[i].getAllCellCtrls();
const cellCtrlsLength = cellCtrls.length;
for (let j = 0; j < cellCtrlsLength; j++) {
res.push(cellCtrls[j]);
}
}
return res;
}
getAllRowCtrls() {
const { spannedRowRenderer } = this.beans;
const stickyTopRowCtrls = this.getStickyTopRowCtrls();
const stickyBottomRowCtrls = this.getStickyBottomRowCtrls();
const res = [
...this.topRowCtrls,
...this.bottomRowCtrls,
...stickyTopRowCtrls,
...stickyBottomRowCtrls,
...(spannedRowRenderer?.getCtrls('top') ?? []),
...(spannedRowRenderer?.getCtrls('bottom') ?? []),
...(spannedRowRenderer?.getCtrls('center') ?? []),
...Object.values(this.rowCtrlsByRowIndex),
];
return res;
}
addRenderedRowListener(eventName, rowIndex, callback) {
const rowComp = this.rowCtrlsByRowIndex[rowIndex];
if (rowComp) {
rowComp.addEventListener(eventName, callback);
}
}
refreshCells(params = {}) {
const refreshCellParams = {
forceRefresh: params.force,
newData: false,
suppressFlash: params.suppressFlash,
};
for (const cellCtrl of this.getCellCtrls(params.rowNodes, params.columns)) {
cellCtrl.refreshOrDestroyCell(refreshCellParams);
}
// refresh the full width rows too
this.refreshFullWidth(params.rowNodes);
}
refreshFullWidth(rowNodes) {
if (!rowNodes) {
return;
}
let cellFocused = null;
if (this.stickyRowFeature) {
cellFocused = this.getCellToRestoreFocusToAfterRefresh() || null;
}
for (const rowCtrl of this.getRowCtrls(rowNodes)) {
if (!rowCtrl.isFullWidth()) {
continue;
}
const refreshed = rowCtrl.refreshFullWidth();
if (!refreshed) {
this.redrawRow(rowCtrl.rowNode, true);
}
}
this.dispatchDisplayedRowsChanged(false);
if (cellFocused) {
this.restoreFocusedCell(cellFocused);
}
}
/**
* @param rowNodes if provided, returns the RowCtrls for the provided rowNodes. otherwise returns all RowCtrls.
*/
getRowCtrls(rowNodes) {
const rowIdsMap = mapRowNodes(rowNodes);
const allRowCtrls = this.getAllRowCtrls();
if (!rowNodes || !rowIdsMap) {
return allRowCtrls;
}
return allRowCtrls.filter((rowCtrl) => {
const rowNode = rowCtrl.rowNode;
return isRowInMap(rowNode, rowIdsMap);
});
}
// returns CellCtrl's that match the provided rowNodes and columns. eg if one row node
// and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.
getCellCtrls(rowNodes, columns) {
let colIdsMap;
if ((0, generic_1._exists)(columns)) {
colIdsMap = {};
columns.forEach((colKey) => {
const column = this.colModel.getCol(colKey);
if ((0, generic_1._exists)(column)) {
colIdsMap[column.getId()] = true;
}
});
}
const res = [];
this.getRowCtrls(rowNodes).forEach((rowCtrl) => {
rowCtrl.getAllCellCtrls().forEach((cellCtrl) => {
const colId = cellCtrl.column.getId();
const excludeColFromRefresh = colIdsMap && !colIdsMap[colId];
if (excludeColFromRefresh) {
return;
}
res.push(cellCtrl);
});
});
return res;
}
destroy() {
this.removeAllRowComps(true);
super.destroy();
}
removeAllRowComps(suppressAnimation = false) {
const rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);
this.removeRowCtrls(rowIndexesToRemove, suppressAnimation);
this.stickyRowFeature?.destroyStickyCtrls();
}
getRowsToRecycle() {
// remove all stub nodes, they can't be reused, as no rowNode id
const stubNodeIndexes = [];
for (const index of Object.keys(this.rowCtrlsByRowIndex)) {
const rowCtrl = this.rowCtrlsByRowIndex[index];
const stubNode = rowCtrl.rowNode.id == null;
if (stubNode) {
stubNodeIndexes.push(index);
}
}
this.removeRowCtrls(stubNodeIndexes);
// then clear out rowCompsByIndex, but before that take a copy, but index by id, not rowIndex
const ctrlsByIdMap = {};
for (const rowCtrl of Object.values(this.rowCtrlsByRowIndex)) {
const rowNode = rowCtrl.rowNode;
ctrlsByIdMap[rowNode.id] = rowCtrl;
}
this.rowCtrlsByRowIndex = {};
return ctrlsByIdMap;
}
// takes array of row indexes
removeRowCtrls(rowsToRemove, suppressAnimation = false) {
// if no fromIndex then set to -1, which will refresh everything
// let realFromIndex = -1;
rowsToRemove.forEach((indexToRemove) => {
const rowCtrl = this.rowCtrlsByRowIndex[indexToRemove];
if (rowCtrl) {
rowCtrl.destroyFirstPass(suppressAnimation);
rowCtrl.destroySecondPass();
}
delete this.rowCtrlsByRowIndex[indexToRemove];
});
}
onBodyScroll(e) {
if (e.direction !== 'vertical') {
return;
}
this.redraw({ afterScroll: true });
}
// gets called when rows don't change, but viewport does, so after:
// 1) height of grid body changes, ie number of displayed rows has changed
// 2) grid scrolled to new position
// 3) ensure index visible (which is a scroll)
redraw(params = {}) {
const { afterScroll } = params;
let cellFocused;
const stickyRowFeature = this.stickyRowFeature;
// only try to refocus cells shifting in and out of sticky container
// if the browser supports focus ({ preventScroll })
if (stickyRowFeature) {
cellFocused = this.getCellToRestoreFocusToAfterRefresh() || undefined;
}
const oldFirstRow = this.firstRenderedRow;
const oldLastRow = this.lastRenderedRow;
this.workOutFirstAndLastRowsToRender();
let hasStickyRowChanges = false;
if (stickyRowFeature) {
hasStickyRowChanges = stickyRowFeature.checkStickyRows();
// this is a hack, if sticky rows brings in rows from other pages
// need to update the model height to include them.
const extraHeight = stickyRowFeature.extraTopHeight + stickyRowFeature.extraBottomHeight;
if (extraHeight) {
this.updateContainerHeights(extraHeight);
}
}
const rangeChanged = this.firstRenderedRow !== oldFirstRow || this.lastRenderedRow !== oldLastRow;
if (afterScroll && !hasStickyRowChanges && !rangeChanged) {
return;
}
this.getLockOnRefresh();
this.recycleRows(null, false, afterScroll);
this.releaseLockOnRefresh();
// AfterScroll results in flushSync in React but we need to disable flushSync for sticky row group changes to avoid flashing
this.dispatchDisplayedRowsChanged(afterScroll && !hasStickyRowChanges);
if (cellFocused != null) {
const newFocusedCell = this.getCellToRestoreFocusToAfterRefresh();
if (cellFocused != null && newFocusedCell == null) {
this.beans.animationFrameSvc?.flushAllFrames();
this.restoreFocusedCell(cellFocused);
}
}
}
removeRowCompsNotToDraw(indexesToDraw, suppressAnimation) {
// for speedy lookup, dump into map
const indexesToDrawMap = {};
indexesToDraw.forEach((index) => (indexesToDrawMap[index] = true));
const existingIndexes = Object.keys(this.rowCtrlsByRowIndex);
const indexesNotToDraw = existingIndexes.filter((index) => !indexesToDrawMap[index]);
this.removeRowCtrls(indexesNotToDraw, suppressAnimation);
}
calculateIndexesToDraw(rowsToRecycle) {
// all in all indexes in the viewport
const indexesToDraw = [];
for (let i = this.firstRenderedRow; i <= this.lastRenderedRow; i++) {
indexesToDraw.push(i);
}
const checkRowToDraw = (rowComp) => {
const index = rowComp.rowNode.rowIndex;
if (index == null) {
return;
}
if (index < this.firstRenderedRow || index > this.lastRenderedRow) {
if (this.doNotUnVirtualiseRow(rowComp)) {
indexesToDraw.push(index);
}
}
};
// if we are redrawing due to scrolling change, then old rows are in this.rowCompsByIndex
for (const rowCtrl of Object.values(this.rowCtrlsByRowIndex)) {
checkRowToDraw(rowCtrl);
}
// if we are redrawing due to model update, then old rows are in rowsToRecycle
if (rowsToRecycle) {
for (const rowCtrl of Object.values(rowsToRecycle)) {
checkRowToDraw(rowCtrl);
}
}
indexesToDraw.sort((a, b) => a - b);
const ret = [];
for (let i = 0; i < indexesToDraw.length; i++) {
const currRow = indexesToDraw[i];
const rowNode = this.rowModel.getRow(currRow);
if (rowNode && !rowNode.sticky) {
ret.push(currRow);
}
}
return ret;
}
recycleRows(rowsToRecycle, animate = false, afterScroll = false) {
// the row can already exist and be in the following:
// rowsToRecycle -> if model change, then the index may be different, however row may
// exist here from previous time (mapped by id).
// this.rowCompsByIndex -> if just a scroll, then this will contain what is currently in the viewport
// this is all the indexes we want, including those that already exist, so this method
// will end up going through each index and drawing only if the row doesn't already exist
const indexesToDraw = this.calculateIndexesToDraw(rowsToRecycle);
// never animate when doing print layout - as we want to get things ready to print as quickly as possible,
// otherwise we risk the printer printing a row that's half faded (half way through fading in)
// Don't animate rows that have been added or removed as part of scrolling
if (this.printLayout || afterScroll) {
animate = false;
}
this.removeRowCompsNotToDraw(indexesToDraw, !animate);
// add in new rows
const rowCtrls = [];
indexesToDraw.forEach((rowIndex) => {
const rowCtrl = this.createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll);
if ((0, generic_1._exists)(rowCtrl)) {
rowCtrls.push(rowCtrl);
}
});
if (rowsToRecycle) {
const { animationFrameSvc } = this.beans;
const useAnimationFrame = animationFrameSvc && afterScroll && !this.gos.get('suppressAnimationFrame') && !this.printLayout;
if (useAnimationFrame) {
animationFrameSvc.addDestroyTask(() => {
this.destroyRowCtrls(rowsToRecycle, animate);
this.updateAllRowCtrls();
this.dispatchDisplayedRowsChanged();
});
}
else {
this.destroyRowCtrls(rowsToRecycle, animate);
}
}
this.updateAllRowCtrls();
}
dispatchDisplayedRowsChanged(afterScroll = false) {
this.eventSvc.dispatchEvent({
type: 'displayedRowsChanged',
afterScroll,
});
}
onDisplayedColumnsChanged() {
const { visibleCols } = this.beans;
const pinningLeft = visibleCols.isPinningLeft();
const pinningRight = visibleCols.isPinningRight();
const atLeastOneChanged = this.pinningLeft !== pinningLeft || pinningRight !== this.pinningRight;
if (atLeastOneChanged) {
this.pinningLeft = pinningLeft;
this.pinningRight = pinningRight;
if (this.embedFullWidthRows) {
this.redrawFullWidthEmbeddedRows();
}
}
}
// when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,
// then it should go into the pinned left area if pinning left, or the center area if not pinning.
redrawFullWidthEmbeddedRows() {
// if either of the pinned panels has shown / hidden, then need to redraw the fullWidth bits when
// embedded, as what appears in each section depends on whether we are pinned or not
const rowsToRemove = [];
this.getFullWidthRowCtrls().forEach((fullWidthCtrl) => {
const rowIndex = fullWidthCtrl.rowNode.rowIndex;
rowsToRemove.push(rowIndex.toString());
});
this.refreshFloatingRowComps();
this.removeRowCtrls(rowsToRemove);
this.redraw({ afterScroll: true });
}
getFullWidthRowCtrls(rowNodes) {
const rowNodesMap = mapRowNodes(rowNodes);
return this.getAllRowCtrls().filter((rowCtrl) => {
// include just full width
if (!rowCtrl.isFullWidth()) {
return false;
}
// if Row Nodes provided, we exclude where Row Node is missing
const rowNode = rowCtrl.rowNode;
if (rowNodesMap != null && !isRowInMap(rowNode, rowNodesMap)) {
return false;
}
return true;
});
}
createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll) {
let rowNode;
let rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
// if no row comp, see if we can get it from the previous rowComps
if (!rowCtrl) {
rowNode = this.rowModel.getRow(rowIndex);
if ((0, generic_1._exists)(rowNode) && (0, generic_1._exists)(rowsToRecycle) && rowsToRecycle[rowNode.id] && rowNode.alreadyRendered) {
rowCtrl = rowsToRecycle[rowNode.id];
rowsToRecycle[rowNode.id] = null;
}
}
const creatingNewRowCtrl = !rowCtrl;
if (creatingNewRowCtrl) {
// create a new one
if (!rowNode) {
rowNode = this.rowModel.getRow(rowIndex);
}
if ((0, generic_1._exists)(rowNode)) {
rowCtrl = this.createRowCon(rowNode, animate, afterScroll);
}
else {
// this should never happen - if somehow we are trying to create
// a row for a rowNode that does not exist.
return;
}
}
if (rowNode) {
// set node as 'alreadyRendered' to ensure we only recycle rowComps that have been rendered, this ensures
// we don't reuse rowComps that have been removed and then re-added in the same batch transaction.
rowNode.alreadyRendered = true;
}
this.rowCtrlsByRowIndex[rowIndex] = rowCtrl;
return rowCtrl;
}
destroyRowCtrls(rowCtrlsMap, animate) {
const executeInAWhileFuncs = [];
if (rowCtrlsMap) {
for (const rowCtrl of Object.values(rowCtrlsMap)) {
// if row was used, then it's null
if (!rowCtrl) {
continue;
}
if (this.cachedRowCtrls && rowCtrl.isCacheable()) {
this.cachedRowCtrls.addRow(rowCtrl);
continue;
}
rowCtrl.destroyFirstPass(!animate);
if (animate) {
const instanceId = rowCtrl.instanceId;
this.zombieRowCtrls[instanceId] = rowCtrl;
executeInAWhileFuncs.push(() => {
rowCtrl.destroySecondPass();
delete this.zombieRowCtrls[instanceId];
});
}
else {
rowCtrl.destroySecondPass();
}
}
}
if (animate) {
// this ensures we fire displayedRowsChanged AFTER all the 'executeInAWhileFuncs' get
// executed, as we added it to the end of the list.
executeInAWhileFuncs.push(() => {
this.updateAllRowCtrls();
this.dispatchDisplayedRowsChanged();
});
window.setTimeout(() => executeInAWhileFuncs.forEach((func) => func()), ROW_ANIMATION_TIMEOUT);
}
}
getRowBuffer() {
return this.gos.get('rowBuffer');
}
getRowBufferInPixels() {
const rowsToBuffer = this.getRowBuffer();
const defaultRowHeight = (0, gridOptionsUtils_1._getRowHeightAsNumber)(this.beans);
return rowsToBuffer * defaultRowHeight;
}
workOutFirstAndLastRowsToRender() {
const { rowContainerHeight, pageBounds, rowModel } = this;
rowContainerHeight.updateOffset();
let newFirst;
let newLast;
if (!rowModel.isRowsToRender()) {
newFirst = 0;
newLast = -1; // setting to -1 means nothing in range
}
else if (this.printLayout) {
this.beans.environment.refreshRowHeightVariable();
newFirst = pageBounds.getFirstRow();
newLast = pageBounds.getLastRow();
}
else {
const bufferPixels = this.getRowBufferInPixels();
const scrollFeature = this.ctrlsSvc.getScrollFeature();
const suppressRowVirtualisation = this.gos.get('suppressRowVirtualisation');
let rowHeightsChanged = false;
let firstPixel;
let lastPixel;
do {
const paginationOffset = pageBounds.getPixelOffset();
const { pageFirstPixel, pageLastPixel } = pageBounds.getCurrentPagePixelRange();
const divStretchOffset = rowContainerHeight.divStretchOffset;
const bodyVRange = scrollFeature.getVScrollPosition();
const bodyTopPixel = bodyVRange.top;
const bodyBottomPixel = bodyVRange.bottom;
if (suppressRowVirtualisation) {
firstPixel = pageFirstPixel + divStretchOffset;
lastPixel = pageLastPixel + divStretchOffset;
}
else {
firstPixel =
Math.max(bodyTopPixel + paginationOffset - bufferPixels, pageFirstPixel) + divStretchOffset;
lastPixel =
Math.min(bodyBottomPixel + paginationOffset + bufferPixels, pageLastPixel) + divStretchOffset;
}
this.firstVisibleVPixel = Math.max(bodyTopPixel + paginationOffset, pageFirstPixel) + divStretchOffset;
this.lastVisibleVPixel = Math.min(bodyBottomPixel + paginationOffset, pageLastPixel) + divStretchOffset;
// if the rows we are about to display get their heights changed, then that upsets the calcs from above.
rowHeightsChanged = this.ensureAllRowsInRangeHaveHeightsCalculated(firstPixel, lastPixel);
} while (rowHeightsChanged);
let firstRowIndex = rowModel.getRowIndexAtPixel(firstPixel);
let lastRowIndex = rowModel.getRowIndexAtPixel(lastPixel);
const pageFirstRow = pageBounds.getFirstRow();
const pageLastRow = pageBounds.getLastRow();
// adjust, in case buffer extended actual size
if (firstRowIndex < pageFirstRow) {
firstRowIndex = pageFirstRow;
}
if (lastRowIndex > pageLastRow) {
lastRowIndex = pageLastRow;
}
newFirst = firstRowIndex;
newLast = lastRowIndex;
}
// sometimes user doesn't set CSS right and ends up with grid with no height and grid ends up
// trying to render all the rows, eg 10,000+ rows. this will kill the browser. so instead of
// killing the browser, we limit the number of rows. just in case some use case we didn't think
// of, we also have a property to not do this operation.
const rowLayoutNormal = (0, gridOptionsUtils_1._isDomLayout)(this.gos, 'normal');
const suppressRowCountRestriction = this.gos.get('suppressMaxRenderedRowRestriction');
const rowBufferMaxSize = Math.max(this.getRowBuffer(), 500);
if (rowLayoutNormal && !suppressRowCountRestriction) {
if (newLast - newFirst > rowBufferMaxSize) {
newLast = newFirst + rowBufferMaxSize;
}
}
const firstDiffers = newFirst !== this.firstRenderedRow;
const lastDiffers = newLast !== this.lastRenderedRow;
if (firstDiffers || lastDiffers) {
this.firstRenderedRow = newFirst;
this.lastRenderedRow = newLast;
this.eventSvc.dispatchEvent({
type: 'viewportChanged',
firstRow: newFirst,
lastRow: newLast,
});
}
}
/**
* This event will only be fired once, and is queued until after the browser next renders.
* This allows us to fire an event during the start of the render cycle, when we first see data being rendered
* but not execute the event until all of the data has finished being rendered to the dom.
*/
dispatchFirstDataRenderedEvent() {
if (this.dataFirstRenderedFired) {
return;
}
this.dataFirstRenderedFired = true;
// See AG-7018
(0, animationFrameService_1._requestAnimationFrame)(this.beans, () => {
this.beans.eventSvc.dispatchEvent({
type: 'firstDataRendered',
firstRow: this.firstRenderedRow,
lastRow: this.lastRenderedRow,
});
});
}
ensureAllRowsInRangeHaveHeightsCalculated(topPixel, bottomPixel) {
const pinnedRowHeightsChanged = this.pinnedRowModel?.ensureRowHeightsValid();
// ensure sticky rows heights are all updated
const stickyHeightsChanged = this.stickyRowFeature?.ensureRowHeightsValid();
const { pageBounds, rowModel } = this;
// ensureRowHeightsVisible only works with CSRM, as it's the only row model that allows lazy row height calcs.
// all the other row models just hard code so the method just returns back false
const rowModelHeightsChanged = rowModel.ensureRowHeightsValid(topPixel, bottomPixel, pageBounds.getFirstRow(), pageBounds.getLastRow());
if (rowModelHeightsChanged || stickyHeightsChanged) {
this.eventSvc.dispatchEvent({
type: 'recalculateRowBounds',
});
}
if (stickyHeightsChanged || rowModelHeightsChanged || pinnedRowHeightsChanged) {
this.updateContainerHeights();
return true;
}
return false;
}
// check that none of the rows to remove are editing or focused as:
// a) if editing, we want to keep them, otherwise the user will loose the context of the edit,
// eg user starts editing, enters some text, then scrolls down and then up, next time row rendered
// the edit is reset - so we want to keep it rendered.
// b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,
// otherwise the user can range select and drag (with focus cell going out of the viewport)
// and then ctrl+c, nothing will happen if cell is removed from dom.
// c) if detail record of master detail, as users complained that the context of detail rows
// was getting lost when detail row out of view. eg user expands to show detail row,
// then manipulates the detail panel (eg sorts the detail grid), then context is lost
// after detail panel is scrolled out of / into view.
doNotUnVirtualiseRow(rowCtrl) {
const REMOVE_ROW = false;
const KEEP_ROW = true;
const rowNode = rowCtrl.rowNode;
const rowHasFocus = this.focusSvc.isRowNodeFocused(rowNode);
const rowIsEditing = rowCtrl.editing;
const rowIsDetail = rowNode.detail;
const mightWantToKeepRow = rowHasFocus || rowIsEditing || rowIsDetail;
// if we deffo don't want to keep it,
if (!mightWantToKeepRow) {
return REMOVE_ROW;
}
// editing row, only remove if it is no longer rendered, eg filtered out or new data set.
// the reason we want to keep is if user is scrolling up and down, we don't want to loose
// the context of the editing in process.
const rowNodePresent = this.isRowPresent(rowNode);
return rowNodePresent ? KEEP_ROW : REMOVE_ROW;
}
isRowPresent(rowNode) {
if (!this.rowModel.isRowPresent(rowNode)) {
return false;
}
return this.beans.pagination?.isRowPresent(rowNode) ?? true;
}
createRowCon(rowNode, animate, afterScroll) {
const rowCtrlFromCache = this.cachedRowCtrls?.getRow(rowNode) ?? null;
if (rowCtrlFromCache) {
return rowCtrlFromCache;
}
// we don't use animations frames for printing, so the user can put the grid into print mode
// and immediately print - otherwise the user would have to wait for the rows to draw in the background
// (via the animation frames) which is awkward to do from code.
// we only do the animation frames after scrolling, as this is where we want the smooth user experience.
// having animation frames for other times makes the grid look 'jumpy'.
const suppressAnimationFrame = this.gos.get('suppressAnimationFrame');
const useAnimationFrameForCreate = afterScroll && !suppressAnimationFrame && !this.printLayout && !!this.beans.animationFrameSvc;
const res = new rowCtrl_1.RowCtrl(rowNode, this.beans, animate, useAnimationFrameForCreate, this.printLayout);
return res;
}
getRenderedNodes() {
const viewportRows = Object.values(this.rowCtrlsByRowIndex).map((rowCtrl) => rowCtrl.rowNode);
const stickyTopRows = this.getStickyTopRowCtrls().map((rowCtrl) => rowCtrl.rowNode);
const stickyBottomRows = this.getStickyBottomRowCtrls().map((rowCtrl) => rowCtrl.rowNode);
return [...stickyTopRows, ...viewportRows, ...stickyBottomRows];
}
getRowByPosition(rowPosition) {
let rowCtrl;
const { rowIndex } = rowPosition;
switch (rowPosition.rowPinned) {
case 'top':
rowCtrl = this.topRowCtrls[rowIndex];
break;
case 'bottom':
rowCtrl = this.bottomRowCtrls[rowIndex];
break;
default:
rowCtrl = this.rowCtrlsByRowIndex[rowIndex];
if (!rowCtrl) {
rowCtrl = this.getStickyTopRowCtrls().find((ctrl) => ctrl.rowNode.rowIndex === rowIndex) || null;
if (!rowCtrl) {
rowCtrl =
this.getStickyBottomRowCtrls().find((ctrl) => ctrl.rowNode.rowIndex === rowIndex) || null;
}
}
break;
}
return rowCtrl;
}
// returns true if any row between startIndex and endIndex is rendered. used by
// SSRM or IRM, as they don't want to purge visible blocks from cache.
isRangeInRenderedViewport(startIndex, endIndex) {
// parent closed means the parent node is not expanded, thus these blocks are not visible
const parentClosed = startIndex == null || endIndex == null;
if (parentClosed) {
return false;
}
const blockAfterViewport = startIndex > this.lastRenderedRow;
const blockBeforeViewport = endIndex < this.firstRenderedRow;
const blockInsideViewport = !blockBeforeViewport && !blockAfterViewport;
return blockInsideViewport;
}
}
exports.RowRenderer = RowRenderer;
class RowCtrlCache {
constructor(maxCount) {
// map for fast access
this.entriesMap = {};
// list for keeping order
this.entriesList = [];
this.maxCount = maxCount;
}
addRow(rowCtrl) {
this.entriesMap[rowCtrl.rowNode.id] = rowCtrl;
this.entriesList.push(rowCtrl);
rowCtrl.setCached(true);
if (this.entriesList.length > this.maxCount) {
const rowCtrlToDestroy = this.entriesList[0];
rowCtrlToDestroy.destroyFirstPass();
rowCtrlToDestroy.destroySecondPass();
this.removeFromCache(rowCtrlToDestroy);
}
}
getRow(rowNode) {
if (rowNode == null || rowNode.id == null) {
return null;
}
const res = this.entriesMap[rowNode.id];
if (!res) {
return null;
}
this.removeFromCache(res);
res.setCached(false);
// this can happen if user reloads data, and a new RowNode is reusing
// the same ID as the old one
const rowNodeMismatch = res.rowNode != rowNode;
return rowNodeMismatch ? null : res;
}
has(rowNode) {
return this.entriesMap[rowNode.id] != null;
}
removeRow(rowNode) {
const rowNodeId = rowNode.id;
const ctrl = this.entriesMap[rowNodeId];
delete this.entriesMap[rowNodeId];
(0, array_1._removeFromArray)(this.entriesList, ctrl);
}
removeFromCache(rowCtrl) {
const rowNodeId = rowCtrl.rowNode.id;
delete this.entriesMap[rowNodeId];
(0, array_1._removeFromArray)(this.entriesList, rowCtrl);
}
getEntries() {
return this.entriesList;
}
}
function mapRowNodes(rowNodes) {
if (!rowNodes) {
return;
}
const res = {
top: {},
bottom: {},
normal: {},
};
rowNodes.forEach((rowNode) => {
const id = rowNode.id;
switch (rowNode.rowPinned) {
case 'top':
res.top[id] = rowNode;
break;
case 'bottom':
res.bottom[id] = rowNode;
break;
default:
res.normal[id] = rowNode;
break;
}
});
return res;
}
exports.mapRowNodes = mapRowNodes;
function isRowInMap(rowNode, rowIdsMap) {
// skip this row if it is missing from the provided list
const id = rowNode.id;
const floating = rowNode.rowPinned;
switch (floating) {
case 'top':
return rowIdsMap.top[id] != null;
case 'bottom':
return rowIdsMap.bottom[id] != null;
default:
return rowIdsMap.normal[id] != null;
}
}
exports.isRowInMap = isRowInMap;
/***/ }),
/***/ 4265:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CellSpanModule = void 0;
const version_1 = __webpack_require__(7205);
const rowSpanService_1 = __webpack_require__(4658);
const spannedRowRenderer_1 = __webpack_require__(2991);
exports.CellSpanModule = {
moduleName: 'CellSpan',
version: version_1.VERSION,
beans: [rowSpanService_1.RowSpanService, spannedRowRenderer_1.SpannedRowRenderer],
};
/***/ }),
/***/ 3643:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowSpanCache = exports.CellSpan = exports._doesColumnSpan = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const spannedRowRenderer_1 = __webpack_require__(2991);
const _doesColumnSpan = (column) => {
// todo replace with new row spanning
return column.colDef.rowSpan;
};
exports._doesColumnSpan = _doesColumnSpan;
class CellSpan {
constructor(col, firstNode) {
this.col = col;
this.firstNode = firstNode;
// used for distinguishing between types
this.cellSpan = true;
this.spannedNodes = new Set();
this.addSpannedNode(firstNode);
}
addSpannedNode(node) {
this.spannedNodes.add(node);
this.lastNode = node;
}
getLastNode() {
return this.lastNode;
}
getCellHeight() {
return this.lastNode.rowTop + this.lastNode.rowHeight - this.firstNode.rowTop - 1; // -1 should be border height I think
}
doesSpanContain(cellPosition) {
if (cellPosition.column !== this.col) {
return false;
}
if (cellPosition.rowPinned != this.firstNode.rowPinned) {
return false;
}
return this.firstNode.rowIndex <= cellPosition.rowIndex && cellPosition.rowIndex <= this.lastNode.rowIndex;
}
/**
* Gets the auto height value for last node in the spanned cell.
* The first node is used to store the auto height for the cell, but the additional height for this cell
* needs applied to the last row in the span.
*/
getLastNodeAutoHeight() {
const autoHeight = this.firstNode.__autoHeights?.[this.col.getColId()];
if (autoHeight == null) {
return undefined;
}
let allButLastHeights = 0;
this.spannedNodes.forEach((node) => {
if (node === this.lastNode)
return;
allButLastHeights += node.rowHeight;
});
return autoHeight - allButLastHeights;
}
}
exports.CellSpan = CellSpan;
/**
* Belongs to a column, when cells are to be rendered they call back to this service with the values.
* This service determines if the cell should instead be replaced with a spanning cell, in which case the cell is
* stretched over multiple rows.
*
* Only create if spanning is enabled for this column.
*/
class RowSpanCache extends beanStub_1.BeanStub {
constructor(column) {
super();
this.column = column;
}
buildCache(pinned) {
const { column, beans: { gos, pinnedRowModel, rowModel, valueSvc }, } = this;
const { colDef } = column;
const newMap = new Map();
const isFullWidthCellFunc = gos.getCallback('isFullWidthRow');
const equalsFnc = colDef.equals;
const customCompare = colDef.spanRows;
const isCustomCompare = typeof customCompare === 'function';
let lastNode = null;
let spanData = null;
let lastValue;
const setNewHead = (node, value) => {
lastNode = node;
spanData = null;
lastValue = value;
};
// check each node, if the currently open cell span should span, add this node to span, otherwise close the span.
const checkNodeForCache = (node) => {
const doesNodeSupportSpanning = !node.isExpandable() &&
!node.group &&
!node.detail &&
(isFullWidthCellFunc ? !isFullWidthCellFunc({ rowNode: node }) : true);
// fw, hidden, and detail rows cannot be spanned as head, body nor tail. Skip.
if (node.rowIndex == null || !doesNodeSupportSpanning) {
setNewHead(null, null);
return;
}
// if level or key is different, cells do not span.
if (lastNode == null ||
node.level !== lastNode.level || // no span across groups
node.footer ||
(spanData && node.rowIndex - 1 !== spanData?.getLastNode().rowIndex) // no span if rows not contiguous (SSRM)
) {
setNewHead(node, valueSvc.getValue(column, node));
return;
}
// check value is equal, if not, no span
const value = valueSvc.getValue(column, node);
if (isCustomCompare) {
const params = (0, gridOptionsUtils_1._addGridCommonParams)(gos, {
valueA: lastValue,
nodeA: lastNode,
valueB: value,
nodeB: node,
column,
colDef,
});
if (!customCompare(params)) {
setNewHead(node, value);
return;
}
}
else {
if (equalsFnc ? !equalsFnc(lastValue, value) : lastValue !== value) {
setNewHead(node, value);
return;
}
}
if (!spanData) {
spanData = new CellSpan(column, lastNode);
newMap.set(lastNode, spanData);
}
spanData.addSpannedNode(node);
newMap.set(node, spanData);
};
switch (pinned) {
case 'center':
rowModel.forEachDisplayedNode?.(checkNodeForCache);
break;
case 'top':
pinnedRowModel?.forEachPinnedRow('top', checkNodeForCache);
break;
case 'bottom':
pinnedRowModel?.forEachPinnedRow('bottom', checkNodeForCache);
break;
}
this[`${pinned}ValueNodeMap`] = newMap;
}
isCellSpanning(node) {
return !!this.getCellSpan(node);
}
getCellSpan(node) {
const map = this[`${(0, spannedRowRenderer_1._normalisePinnedValue)(node.rowPinned)}ValueNodeMap`];
return map.get(node);
}
}
exports.RowSpanCache = RowSpanCache;
/***/ }),
/***/ 4658:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowSpanService = void 0;
const beanStub_1 = __webpack_require__(8731);
const function_1 = __webpack_require__(2043);
const rowSpanCache_1 = __webpack_require__(3643);
class RowSpanService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'rowSpanSvc';
this.spanningColumns = new Map();
// debounced to allow spannedRowRenderer to run first, removing any old spanned rows
this.debouncePinnedEvent = (0, function_1._debounce)(this, this.dispatchCellsUpdatedEvent.bind(this, true), 0);
this.debounceModelEvent = (0, function_1._debounce)(this, this.dispatchCellsUpdatedEvent.bind(this, false), 0);
this.pinnedTimeout = null;
this.modelTimeout = null;
}
postConstruct() {
this.addManagedEventListeners({
modelUpdated: this.buildModelCaches.bind(this),
pinnedRowDataChanged: this.buildPinnedCaches.bind(this),
});
}
/**
* When a new column is created with spanning (or spanning changes for a column)
* @param column column that is now spanning
*/
register(column) {
const { gos } = this.beans;
if (!gos.get('enableCellSpan')) {
return;
}
if (this.spanningColumns.has(column)) {
return;
}
const cache = this.createManagedBean(new rowSpanCache_1.RowSpanCache(column));
this.spanningColumns.set(column, cache);
// make sure if row model already run we prep this cache
cache.buildCache('top');
cache.buildCache('bottom');
cache.buildCache('center');
this.debouncePinnedEvent();
this.debounceModelEvent();
}
dispatchCellsUpdatedEvent(pinned) {
this.dispatchLocalEvent({ type: 'spannedCellsUpdated', pinned });
}
/**
* When a new column is destroyed with spanning (or spanning changes for a column)
* @param column column that is now spanning
*/
deregister(column) {
this.spanningColumns.delete(column);
}
// called by rowNode when data changes, as this could be a hot path it's debounced
// it uses timeouts instead of debounce so that it can be cancelled by `modelUpdated`
// which is expected to run immediately (to exec before the rowRenderer)
onRowDataUpdated(node) {
const { spannedRowRenderer } = this.beans;
if (node.rowPinned) {
if (this.pinnedTimeout != null) {
return;
}
this.pinnedTimeout = window.setTimeout(() => {
this.pinnedTimeout = null;
this.buildPinnedCaches();
// normally updated by the rowRenderer, but as this change is
// caused by data, need to manually update
spannedRowRenderer?.createCtrls('top');
spannedRowRenderer?.createCtrls('bottom');
}, 0);
return;
}
if (this.modelTimeout != null) {
return;
}
this.modelTimeout = window.setTimeout(() => {
this.modelTimeout = null;
this.buildModelCaches();
// normally updated by the rowRenderer, but as this change is
// caused by data, need to manually update
spannedRowRenderer?.createCtrls('center');
}, 0);
}
buildModelCaches() {
if (this.modelTimeout != null) {
clearTimeout(this.modelTimeout);
}
this.spanningColumns.forEach((cache) => cache.buildCache('center'));
this.debounceModelEvent();
}
buildPinnedCaches() {
if (this.pinnedTimeout != null) {
clearTimeout(this.pinnedTimeout);
}
this.spanningColumns.forEach((cache) => {
cache.buildCache('top');
cache.buildCache('bottom');
});
this.debouncePinnedEvent();
}
isCellSpanning(col, rowNode) {
const cache = this.spanningColumns.get(col);
if (!cache) {
return false;
}
return cache.isCellSpanning(rowNode);
}
getCellSpanByPosition(position) {
const { pinnedRowModel, rowModel } = this.beans;
const col = position.column;
const index = position.rowIndex;
const cache = this.spanningColumns.get(col);
if (!cache) {
return undefined;
}
let node;
switch (position.rowPinned) {
case 'top':
node = pinnedRowModel?.getPinnedTopRow(index);
break;
case 'bottom':
node = pinnedRowModel?.getPinnedBottomRow(index);
break;
default:
node = rowModel.getRow(index);
}
if (!node) {
return undefined;
}
return cache.getCellSpan(node);
}
getCellStart(position) {
const span = this.getCellSpanByPosition(position);
if (!span) {
return position;
}
return { ...position, rowIndex: span.firstNode.rowIndex };
}
getCellEnd(position) {
const span = this.getCellSpanByPosition(position);
if (!span) {
return position;
}
return { ...position, rowIndex: span.getLastNode().rowIndex };
}
/**
* Look-up a spanned cell given a col and node as position indicators
*
* @param col a column to lookup a span at this position
* @param rowNode a node that may be spanned at this position
* @returns the CellSpan object if one exists
*/
getCellSpan(col, rowNode) {
const cache = this.spanningColumns.get(col);
if (!cache) {
return undefined;
}
return cache.getCellSpan(rowNode);
}
forEachSpannedColumn(rowNode, callback) {
for (const [col, cache] of this.spanningColumns) {
if (cache.isCellSpanning(rowNode)) {
const spanningNode = cache.getCellSpan(rowNode);
callback(col, spanningNode);
}
}
}
destroy() {
super.destroy();
this.spanningColumns.clear();
}
}
exports.RowSpanService = RowSpanService;
/***/ }),
/***/ 8411:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SpannedCellCtrl = void 0;
const aria_1 = __webpack_require__(5230);
const focus_1 = __webpack_require__(2331);
const cellCtrl_1 = __webpack_require__(814);
class SpannedCellCtrl extends cellCtrl_1.CellCtrl {
constructor(cellSpan, rowCtrl, beans) {
super(cellSpan.col, cellSpan.firstNode, beans, rowCtrl);
this.cellSpan = cellSpan;
this.SPANNED_CELL_CSS_CLASS = 'ag-spanned-cell';
}
setComp(comp, eCell, eWrapper, eCellWrapper, printLayout, startEditing, compBean) {
this.eWrapper = eWrapper;
super.setComp(comp, eCell, eWrapper, eCellWrapper, printLayout, startEditing, compBean);
this.setAriaRowSpan();
this.refreshAriaRowIndex();
}
isCellSpanning() {
return true;
}
getCellSpan() {
return this.cellSpan;
}
/**
* When cell is spanning, ensure row index is also available on the cell
*/
refreshAriaRowIndex() {
if (this.rowNode.rowIndex == null) {
return;
}
(0, aria_1._setAriaRowIndex)(this.eGui, this.rowNode.rowIndex);
}
/**
* When cell is spanning, ensure row index is also available on the cell
*/
setAriaRowSpan() {
(0, aria_1._setAriaRowSpan)(this.eGui, this.cellSpan.spannedNodes.size);
}
shouldRestoreFocus() {
// Used in React to determine if the cell should restore focus after re-rendering
return this.beans.focusSvc.shouldRestoreFocus(this.cellSpan);
}
onFocusOut() {
this.focusedCellPosition = undefined;
super.onFocusOut();
}
// not ideal, for tabbing need to force the focused position
setFocusedCellPosition(cellPos) {
this.focusedCellPosition = cellPos;
}
getFocusedCellPosition() {
return this.focusedCellPosition ?? this.cellPosition;
}
isCellFocused() {
const focusedCell = this.beans.focusSvc.getFocusedCell();
return !!focusedCell && this.cellSpan.doesSpanContain(focusedCell);
}
applyStaticCssClasses() {
super.applyStaticCssClasses();
this.comp.addOrRemoveCssClass(this.SPANNED_CELL_CSS_CLASS, true);
}
onCellFocused(event) {
const { beans } = this;
if ((0, focus_1._isCellFocusSuppressed)(beans)) {
this.focusedCellPosition = undefined;
return;
}
const cellFocused = this.isCellFocused();
if (!cellFocused) {
this.focusedCellPosition = undefined;
}
if (event && cellFocused) {
// when a spanned cell is focused, remember the focused cell position
this.focusedCellPosition = {
rowIndex: event.rowIndex,
rowPinned: event.rowPinned,
column: event.column, // fix
};
}
super.onCellFocused(event);
}
getRootElement() {
return this.eWrapper;
}
}
exports.SpannedCellCtrl = SpannedCellCtrl;
/***/ }),
/***/ 6541:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SpannedRowCtrl = void 0;
const rowCtrl_1 = __webpack_require__(7632);
const spannedCellCtrl_1 = __webpack_require__(8411);
class SpannedRowCtrl extends rowCtrl_1.RowCtrl {
onRowIndexChanged() {
super.onRowIndexChanged();
this.getAllCellCtrls().forEach((c) => c.refreshAriaRowIndex());
}
getInitialRowClasses(_rowContainerType) {
return ['ag-spanned-row'];
}
getNewCellCtrl(col) {
// spanned cells, if handled as a spanned cell of another row, ignore this.
const cellSpan = this.beans.rowSpanSvc?.getCellSpan(col, this.rowNode);
if (!cellSpan) {
return;
}
// only render cell in first row of span
const firstRowOfSpan = cellSpan.firstNode !== this.rowNode;
if (firstRowOfSpan) {
return;
}
return new spannedCellCtrl_1.SpannedCellCtrl(cellSpan, this, this.beans);
}
shouldRecreateCellCtrl(cell) {
// spanned cells, if handled as a spanned cell of another row, ignore this.
const cellSpan = this.beans.rowSpanSvc?.getCellSpan(cell.column, this.rowNode);
if (!cellSpan) {
return true;
}
// only render cell in first row of span
const firstRowOfSpan = cellSpan.firstNode !== this.rowNode;
if (firstRowOfSpan) {
return true;
}
return cell.getCellSpan() !== cellSpan;
}
/**
* Below overrides are explicitly disabling styling and other unwanted behaviours for spannedRowCtrl
*/
// row height should be 0 in spanned row - they're only included for purpose of aria
onRowHeightChanged() { }
// no styling spanned rows
refreshFirstAndLastRowStyles() { }
// no hover functionality for spanned rows
addHoverFunctionality() { }
resetHoveredStatus() { }
}
exports.SpannedRowCtrl = SpannedRowCtrl;
/***/ }),
/***/ 2991:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._normalisePinnedValue = exports.SpannedRowRenderer = void 0;
const beanStub_1 = __webpack_require__(8731);
const spannedRowCtrl_1 = __webpack_require__(6541);
class SpannedRowRenderer extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'spannedRowRenderer';
this.topCtrls = new Map();
this.bottomCtrls = new Map();
this.centerCtrls = new Map();
}
postConstruct() {
this.addManagedEventListeners({
displayedRowsChanged: this.createAllCtrls.bind(this),
});
}
createAllCtrls() {
this.createCtrls('top');
this.createCtrls('bottom');
this.createCtrls('center');
}
/**
* When displayed rows or cols change, the spanned cell ctrls need to update
*/
createCtrls(ctrlsKey) {
const { rowSpanSvc } = this.beans;
const ctrlsName = `${ctrlsKey}Ctrls`;
const previousCtrls = this[ctrlsName];
const previousCtrlsSize = previousCtrls.size;
// all currently rendered row ctrls which may have spanned cells
const rowCtrls = this.getAllRelevantRowControls(ctrlsKey);
const newRowCtrls = new Map();
let hasNewSpans = false;
for (const ctrl of rowCtrls) {
// skip cells that are animating out.
if (!ctrl.isAlive()) {
continue;
}
rowSpanSvc?.forEachSpannedColumn(ctrl.rowNode, (col, cellSpan) => {
// if spanned row ctrl already exists
if (newRowCtrls.has(cellSpan.firstNode)) {
return;
}
const existingCtrl = previousCtrls.get(cellSpan.firstNode);
if (existingCtrl) {
newRowCtrls.set(cellSpan.firstNode, existingCtrl);
previousCtrls.delete(cellSpan.firstNode);
return;
}
hasNewSpans = true;
const newCtrl = new spannedRowCtrl_1.SpannedRowCtrl(cellSpan.firstNode, this.beans, false, false, false);
newRowCtrls.set(cellSpan.firstNode, newCtrl);
});
}
// set even if no change, as we've deleted out of previousCtrls
this[ctrlsName] = newRowCtrls;
// if no new cells, and size is equal can assume no removals either.
const sameCount = newRowCtrls.size === previousCtrlsSize;
if (!hasNewSpans && sameCount)
return;
for (const oldCtrl of previousCtrls.values()) {
oldCtrl.destroyFirstPass(true);
oldCtrl.destroySecondPass();
}
this.dispatchLocalEvent({
type: `spannedRowsUpdated`,
ctrlsKey,
});
}
// cannot use getAllRowCtrls as it returns this services row ctrls.
getAllRelevantRowControls(ctrlsKey) {
const { rowRenderer } = this.beans;
switch (ctrlsKey) {
case 'top':
return rowRenderer.topRowCtrls;
case 'bottom':
return rowRenderer.bottomRowCtrls;
case 'center':
return rowRenderer.allRowCtrls;
}
}
getCellByPosition(cellPosition) {
const { rowSpanSvc } = this.beans;
const cellSpan = rowSpanSvc?.getCellSpanByPosition(cellPosition);
if (!cellSpan) {
return undefined;
}
const ctrlsName = `${(0, exports._normalisePinnedValue)(cellPosition.rowPinned)}Ctrls`;
const ctrl = this[ctrlsName].get(cellSpan.firstNode);
if (!ctrl) {
return undefined;
}
return ctrl.getAllCellCtrls().find((cellCtrl) => cellCtrl.column === cellPosition.column);
}
getCtrls(container) {
const ctrlsName = `${container}Ctrls`;
return [...this[ctrlsName].values()];
}
destroyRowCtrls(container) {
const ctrlsName = `${container}Ctrls`;
for (const ctrl of this[ctrlsName].values()) {
ctrl.destroyFirstPass(true);
ctrl.destroySecondPass();
}
this[ctrlsName] = new Map();
}
destroy() {
super.destroy();
this.destroyRowCtrls('top');
this.destroyRowCtrls('bottom');
this.destroyRowCtrls('center');
}
}
exports.SpannedRowRenderer = SpannedRowRenderer;
const _normalisePinnedValue = (pinned) => {
return pinned ?? 'center';
};
exports._normalisePinnedValue = _normalisePinnedValue;
/***/ }),
/***/ 3306:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.BaseSelectionService = void 0;
const columnUtils_1 = __webpack_require__(3146);
const beanStub_1 = __webpack_require__(8731);
const rowNodeUtils_1 = __webpack_require__(9888);
const gridOptionsUtils_1 = __webpack_require__(7274);
const aria_1 = __webpack_require__(5230);
const checkboxSelectionComponent_1 = __webpack_require__(5954);
const rowRangeSelectionContext_1 = __webpack_require__(9666);
const selectAllFeature_1 = __webpack_require__(8273);
class BaseSelectionService extends beanStub_1.BeanStub {
postConstruct() {
const { gos, beans } = this;
this.selectionCtx = new rowRangeSelectionContext_1.RowRangeSelectionContext(beans.rowModel);
this.addManagedPropertyListeners(['isRowSelectable', 'rowSelection'], () => {
const callback = (0, gridOptionsUtils_1._getIsRowSelectable)(gos);
if (callback !== this.isRowSelectable) {
this.isRowSelectable = callback;
this.updateSelectable();
}
});
this.isRowSelectable = (0, gridOptionsUtils_1._getIsRowSelectable)(gos);
}
destroy() {
super.destroy();
this.selectionCtx.reset();
}
createCheckboxSelectionComponent() {
return new checkboxSelectionComponent_1.CheckboxSelectionComponent();
}
createSelectAllFeature(column) {
return new selectAllFeature_1.SelectAllFeature(column);
}
isMultiSelect() {
return (0, gridOptionsUtils_1._isMultiRowSelection)(this.gos);
}
onRowCtrlSelected(rowCtrl, hasFocusFunc, gui) {
// Treat undefined as false, if we pass undefined down it gets treated as toggle class, rather than explicitly
// setting the required value
const selected = !!rowCtrl.rowNode.isSelected();
rowCtrl.forEachGui(gui, (gui) => {
gui.rowComp.addOrRemoveCssClass('ag-row-selected', selected);
const element = gui.element;
(0, aria_1._setAriaSelected)(element, selected);
const hasFocus = element.contains((0, gridOptionsUtils_1._getActiveDomElement)(this.beans));
if (hasFocus) {
hasFocusFunc(gui);
}
});
}
announceAriaRowSelection(rowNode) {
if (this.isRowSelectionBlocked(rowNode)) {
return;
}
const selected = rowNode.isSelected();
if (!rowNode.selectable) {
return;
}
const translate = this.getLocaleTextFunc();
const label = translate(selected ? 'ariaRowDeselect' : 'ariaRowSelect', `Press SPACE to ${selected ? 'deselect' : 'select'} this row`);
this.beans.ariaAnnounce?.announceValue(label, 'rowSelection');
}
dispatchSelectionChanged(source) {
this.eventSvc.dispatchEvent({
type: 'selectionChanged',
source,
});
}
isRowSelectionBlocked(rowNode) {
return !rowNode.selectable || !!rowNode.rowPinned || !(0, gridOptionsUtils_1._isRowSelection)(this.gos);
}
updateRowSelectable(rowNode, suppressSelectionUpdate) {
const selectable = this.isRowSelectable?.(rowNode) ?? true;
this.setRowSelectable(rowNode, selectable, suppressSelectionUpdate);
return selectable;
}
setRowSelectable(rowNode, newVal, suppressSelectionUpdate) {
if (rowNode.selectable !== newVal) {
rowNode.selectable = newVal;
rowNode.dispatchRowEvent('selectableChanged');
if (suppressSelectionUpdate) {
return;
}
const isGroupSelectsChildren = (0, gridOptionsUtils_1._getGroupSelectsDescendants)(this.gos);
if (isGroupSelectsChildren) {
const selected = this.calculateSelectedFromChildren(rowNode);
this.setNodesSelected({ nodes: [rowNode], newValue: selected ?? false, source: 'selectableChanged' });
return;
}
// if row is selected but shouldn't be selectable, then deselect.
if (rowNode.isSelected() && !rowNode.selectable) {
this.setNodesSelected({ nodes: [rowNode], newValue: false, source: 'selectableChanged' });
}
}
}
calculateSelectedFromChildren(rowNode) {
let atLeastOneSelected = false;
let atLeastOneDeSelected = false;
if (!rowNode.childrenAfterGroup?.length) {
return rowNode.selectable ? rowNode.__selected : null;
}
for (let i = 0; i < rowNode.childrenAfterGroup.length; i++) {
const child = rowNode.childrenAfterGroup[i];
let childState = child.isSelected();
// non-selectable nodes must be calculated from their children, or ignored if no value results.
if (!child.selectable) {
const selectable = this.calculateSelectedFromChildren(child);
if (selectable === null) {
continue;
}
childState = selectable;
}
switch (childState) {
case true:
atLeastOneSelected = true;
break;
case false:
atLeastOneDeSelected = true;
break;
default:
return undefined;
}
}
if (atLeastOneSelected && atLeastOneDeSelected) {
return undefined;
}
if (atLeastOneSelected) {
return true;
}
if (atLeastOneDeSelected) {
return false;
}
if (!rowNode.selectable) {
return null;
}
return rowNode.__selected;
}
selectRowNode(rowNode, newValue, e, source = 'api') {
// we only check selectable when newValue=true (ie selecting) to allow unselecting values,
// as selectable is dynamic, need a way to unselect rows when selectable becomes false.
const selectionNotAllowed = !rowNode.selectable && newValue;
const selectionNotChanged = rowNode.__selected === newValue;
if (selectionNotAllowed || selectionNotChanged) {
return false;
}
rowNode.__selected = newValue;
rowNode.dispatchRowEvent('rowSelected');
// in case of root node, sibling may have service while this row may not
const sibling = rowNode.sibling;
if (sibling && sibling.footer && sibling.__localEventService) {
sibling.dispatchRowEvent('rowSelected');
}
this.eventSvc.dispatchEvent({
...(0, rowNodeUtils_1._createGlobalRowEvent)(rowNode, this.gos, 'rowSelected'),
event: e || null,
source,
});
return true;
}
isCellCheckboxSelection(column, rowNode) {
const so = this.gos.get('rowSelection');
if (so && typeof so !== 'string') {
const checkbox = (0, columnUtils_1.isColumnSelectionCol)(column) && (0, gridOptionsUtils_1._getCheckboxes)(so);
return column.isColumnFunc(rowNode, checkbox);
}
else {
return column.isColumnFunc(rowNode, column.colDef.checkboxSelection);
}
}
inferNodeSelections(node, shiftKey, metaKey, source) {
const { gos, selectionCtx } = this;
const currentSelection = node.isSelected();
const groupSelectsDescendants = (0, gridOptionsUtils_1._getGroupSelectsDescendants)(gos);
const enableClickSelection = (0, gridOptionsUtils_1._getEnableSelection)(gos);
const enableDeselection = (0, gridOptionsUtils_1._getEnableDeselection)(gos);
const isMultiSelect = this.isMultiSelect();
const isRowClicked = source === 'rowClicked';
// we do not allow selecting the group by clicking, when groupSelectChildren, as the logic to
// handle this is broken. to observe, change the logic below and allow groups to be selected.
// you will see the group gets selected, then all children get selected, then the grid unselects
// the children (as the default behaviour when clicking is to unselect other rows) which results
// in the group getting unselected (as all children are unselected). the correct thing would be
// to change this, so that children of the selected group are not then subsequently un-selected.
if (isRowClicked && groupSelectsDescendants && node.group)
return null;
if (isRowClicked && !(enableClickSelection || enableDeselection))
return null;
if (shiftKey && metaKey && isMultiSelect) {
// SHIFT+CTRL or SHIFT+CMD is used for bulk deselection, except where the selection root
// is still selected, in which case we default to normal bulk selection behaviour
const root = selectionCtx.getRoot();
if (!root) {
// do nothing if there's no selection root
return null;
}
else if (!root.isSelected()) {
// range deselection mode
const partition = selectionCtx.extend(node, groupSelectsDescendants);
return {
select: [],
deselect: partition.keep,
reset: false,
};
}
else {
// default to range selection
const partition = selectionCtx.isInRange(node)
? selectionCtx.truncate(node)
: selectionCtx.extend(node, groupSelectsDescendants);
return {
deselect: partition.discard,
select: partition.keep,
reset: false,
};
}
}
else if (shiftKey && isMultiSelect) {
// SHIFT is used for bulk selection
// When select-all is active either via UI or API, if there's
// no actual selection root, we fallback to the first row node (if available)
const fallback = selectionCtx.selectAll ? this.beans.rowModel.getRow(0) : undefined;
const root = selectionCtx.getRoot(fallback);
const partition = selectionCtx.isInRange(node)
? selectionCtx.truncate(node)
: selectionCtx.extend(node, groupSelectsDescendants);
return {
select: partition.keep,
deselect: partition.discard,
reset: selectionCtx.selectAll || !!(root && !root.isSelected()),
};
}
else if (metaKey) {
// CTRL is used for deselection of a single node
selectionCtx.setRoot(node);
if (isRowClicked && currentSelection && !enableDeselection) {
return null;
}
return {
node,
newValue: !currentSelection,
clearSelection: !isMultiSelect,
};
}
else {
// Otherwise we just do normal selection of a single node
selectionCtx.setRoot(node);
const enableSelectionWithoutKeys = (0, gridOptionsUtils_1._getEnableSelectionWithoutKeys)(gos);
const groupSelectsFiltered = (0, gridOptionsUtils_1._getGroupSelection)(gos) === 'filteredDescendants';
const shouldClear = isRowClicked && (!enableSelectionWithoutKeys || !enableClickSelection);
// Indeterminate states need to be handled differently if `groupSelects: 'filteredDescendants'` in CSRM.
// Specifically, clicking should toggle them _off_ instead of _on_
if (groupSelectsFiltered && currentSelection === undefined && (0, gridOptionsUtils_1._isClientSideRowModel)(gos)) {
return {
node,
newValue: false,
clearSelection: !isMultiSelect || shouldClear,
};
}
if (isRowClicked) {
const newValue = currentSelection ? !enableSelectionWithoutKeys : enableClickSelection;
// if selecting, only proceed if not disabled by grid options
const selectingWhenDisabled = newValue && !enableClickSelection;
// if deselecting, only proceed if not disabled by grid options
const deselectingWhenDisabled = !newValue && !enableDeselection;
// only transistion to same state if we also want to clear other selected nodes
const wouldStateBeUnchanged = newValue === currentSelection && !shouldClear;
if (wouldStateBeUnchanged || selectingWhenDisabled || deselectingWhenDisabled)
return null;
return {
node,
newValue,
clearSelection: !isMultiSelect || shouldClear,
};
}
return {
node,
newValue: !currentSelection,
clearSelection: !isMultiSelect || shouldClear,
};
}
}
}
exports.BaseSelectionService = BaseSelectionService;
/***/ }),
/***/ 5954:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CheckboxSelectionComponent = void 0;
const gridOptionsUtils_1 = __webpack_require__(7274);
const aria_1 = __webpack_require__(5230);
const event_1 = __webpack_require__(2979);
const agCheckbox_1 = __webpack_require__(66);
const component_1 = __webpack_require__(8020);
class CheckboxSelectionComponent extends component_1.Component {
constructor() {
super(
/* html*/ `
`, [agCheckbox_1.AgCheckboxSelector]);
this.eCheckbox = component_1.RefPlaceholder;
}
postConstruct() {
this.eCheckbox.setPassive(true);
}
getCheckboxId() {
return this.eCheckbox.getInputElement().id;
}
onDataChanged() {
// when rows are loaded for the second time, this can impact the selection, as a row
// could be loaded as already selected (if user scrolls down, and then up again).
this.onSelectionChanged();
}
onSelectableChanged() {
this.showOrHideSelect();
}
onSelectionChanged() {
const translate = this.getLocaleTextFunc();
const { rowNode, eCheckbox } = this;
const state = rowNode.isSelected();
const stateName = (0, aria_1._getAriaCheckboxStateName)(translate, state);
const [ariaKey, ariaLabel] = rowNode.selectable
? ['ariaRowToggleSelection', 'Press Space to toggle row selection']
: ['ariaRowSelectionDisabled', 'Row Selection is disabled for this row'];
const translatedLabel = translate(ariaKey, ariaLabel);
eCheckbox.setValue(state, true);
eCheckbox.setInputAriaLabel(`${translatedLabel} (${stateName})`);
}
init(params) {
this.rowNode = params.rowNode;
this.column = params.column;
this.overrides = params.overrides;
this.onSelectionChanged();
this.addManagedListeners(this.eCheckbox.getInputElement(), {
// we don't want double click on this icon to open a group
dblclick: event_1._stopPropagationForAgGrid,
click: (event) => {
// we don't want the row clicked event to fire when selecting the checkbox, otherwise the row
// would possibly get selected twice
(0, event_1._stopPropagationForAgGrid)(event);
this.beans.selectionSvc?.handleSelectionEvent(event, this.rowNode, 'checkboxSelected');
},
});
this.addManagedListeners(this.rowNode, {
rowSelected: this.onSelectionChanged.bind(this),
dataChanged: this.onDataChanged.bind(this),
selectableChanged: this.onSelectableChanged.bind(this),
});
this.addManagedPropertyListener('rowSelection', ({ currentValue, previousValue }) => {
const curr = typeof currentValue === 'object' ? (0, gridOptionsUtils_1._getHideDisabledCheckboxes)(currentValue) : undefined;
const prev = typeof previousValue === 'object' ? (0, gridOptionsUtils_1._getHideDisabledCheckboxes)(previousValue) : undefined;
if (curr !== prev) {
this.onSelectableChanged();
}
});
const isRowSelectableFunc = (0, gridOptionsUtils_1._getIsRowSelectable)(this.gos);
const checkboxVisibleIsDynamic = isRowSelectableFunc || typeof this.getIsVisible() === 'function';
if (checkboxVisibleIsDynamic) {
const showOrHideSelectListener = this.showOrHideSelect.bind(this);
this.addManagedEventListeners({ displayedColumnsChanged: showOrHideSelectListener });
this.addManagedListeners(this.rowNode, {
dataChanged: showOrHideSelectListener,
cellChanged: showOrHideSelectListener,
});
this.showOrHideSelect();
}
this.eCheckbox.getInputElement().setAttribute('tabindex', '-1');
}
showOrHideSelect() {
const { column, rowNode, overrides, gos } = this;
// if the isRowSelectable() is not provided the row node is selectable by default
let selectable = rowNode.selectable;
// checkboxSelection callback is deemed a legacy solution however we will still consider it's result.
// If selectable, then also check the colDef callback. if not selectable, this it short circuits - no need
// to call the colDef callback.
const isVisible = this.getIsVisible();
if (selectable) {
if (typeof isVisible === 'function') {
const extraParams = overrides?.callbackParams;
if (!column) {
// full width row
selectable = isVisible({ ...extraParams, node: rowNode, data: rowNode.data });
}
else {
const params = column.createColumnFunctionCallbackParams(rowNode);
selectable = isVisible({ ...extraParams, ...params });
}
}
else {
selectable = isVisible ?? false;
}
}
const so = gos.get('rowSelection');
const disableInsteadOfHide = so && typeof so !== 'string' ? !(0, gridOptionsUtils_1._getHideDisabledCheckboxes)(so) : column?.getColDef().showDisabledCheckboxes;
if (disableInsteadOfHide) {
this.eCheckbox.setDisabled(!selectable);
this.setVisible(true);
this.setDisplayed(true);
return;
}
if (overrides?.removeHidden) {
this.setDisplayed(selectable);
return;
}
this.setVisible(selectable);
}
getIsVisible() {
const overrides = this.overrides;
if (overrides) {
return overrides.isVisible;
}
const so = this.gos.get('rowSelection');
if (so && typeof so !== 'string') {
return (0, gridOptionsUtils_1._getCheckboxes)(so);
}
// column will be missing if groupDisplayType = 'groupRows'
return this.column?.getColDef()?.checkboxSelection;
}
}
exports.CheckboxSelectionComponent = CheckboxSelectionComponent;
/***/ }),
/***/ 9666:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowRangeSelectionContext = void 0;
/**
* The context of a row range selection operation.
*
* Used to model the stateful range selection behaviour found in Excel, where
* a given cell/row represents the "root" of a selection range, and subsequent
* selections are based off that root.
*
* See AG-9620 for more
*/
class RowRangeSelectionContext {
constructor(rowModel) {
this.rowModel = rowModel;
/** Whether the user is currently selecting all nodes either via the header checkbox or API */
this.selectAll = false;
this.rootId = null;
/**
* Note that the "end" `RowNode` may come before or after the "root" `RowNode` in the
* actual grid.
*/
this.endId = null;
this.cachedRange = [];
}
reset() {
this.rootId = null;
this.endId = null;
this.cachedRange.length = 0;
}
setRoot(node) {
this.rootId = node.id;
this.endId = null;
this.cachedRange.length = 0;
}
setEndRange(end) {
this.endId = end.id;
this.cachedRange.length = 0;
}
getRange() {
if (this.cachedRange.length === 0) {
const root = this.getRoot();
const end = this.getEnd();
if (root == null || end == null) {
return this.cachedRange;
}
this.cachedRange = this.rowModel.getNodesInRangeForSelection(root, end) ?? [];
}
return this.cachedRange;
}
isInRange(node) {
if (this.rootId === null) {
return false;
}
return this.getRange().some((nodeInRange) => nodeInRange.id === node.id);
}
getRoot(fallback) {
if (this.rootId) {
return this.rowModel.getRowNode(this.rootId) ?? null;
}
if (fallback) {
this.setRoot(fallback);
return fallback;
}
return null;
}
getEnd() {
if (this.endId) {
return this.rowModel.getRowNode(this.endId) ?? null;
}
return null;
}
/**
* Truncates the range to the given node (assumed to be within the current range).
* Returns nodes that remain in the current range and those that should be removed
*
* @param node - Node at which to truncate the range
* @returns Object of nodes to either keep or discard (i.e. deselect) from the range
*/
truncate(node) {
const range = this.getRange();
if (range.length === 0) {
return { keep: [], discard: [] };
}
// if root is first, then selection range goes "down" the table
// so we should be unselecting the range _after_ the given `node`
const discardAfter = range[0].id === this.rootId;
const idx = range.findIndex((rowNode) => rowNode.id === node.id);
if (idx > -1) {
const above = range.slice(0, idx);
const below = range.slice(idx + 1);
this.setEndRange(node);
return discardAfter ? { keep: above, discard: below } : { keep: below, discard: above };
}
else {
return { keep: range, discard: [] };
}
}
/**
* Extends the range to the given node. Returns nodes that remain in the current range
* and those that should be removed.
*
* @param node - Node marking the new end of the range
* @returns Object of nodes to either keep or discard (i.e. deselect) from the range
*/
extend(node, groupSelectsChildren = false) {
const root = this.getRoot();
// If the root node is null, we cannot iterate from the root to the given `node`.
// So we keep the existing selection, plus the given `node`, plus any leaf children.
if (root == null) {
const keep = this.getRange().slice();
if (groupSelectsChildren) {
node.depthFirstSearch((node) => !node.group && keep.push(node));
}
keep.push(node);
// We now have a node we can use as the root of the selection
this.setRoot(node);
return { keep, discard: [] };
}
const newRange = this.rowModel.getNodesInRangeForSelection(root, node);
if (!newRange) {
this.setRoot(node);
return { keep: [node], discard: [] };
}
if (newRange.find((newRangeNode) => newRangeNode.id === this.endId)) {
// Range between root and given node contains the current "end"
// so this is an extension of the current range direction
this.setEndRange(node);
return { keep: this.getRange(), discard: [] };
}
else {
// otherwise, this is an inversion
const discard = this.getRange().slice();
this.setEndRange(node);
return { keep: this.getRange(), discard };
}
}
}
exports.RowRangeSelectionContext = RowRangeSelectionContext;
/***/ }),
/***/ 9770:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getSelectedRows = exports.getSelectedNodes = exports.deselectAllOnCurrentPage = exports.selectAllOnCurrentPage = exports.deselectAllFiltered = exports.selectAllFiltered = exports.deselectAll = exports.selectAll = exports.setNodesSelected = void 0;
const logging_1 = __webpack_require__(7764);
function setNodesSelected(beans, params) {
const allNodesValid = params.nodes.every((node) => {
if (node.rowPinned) {
(0, logging_1._warn)(59);
return false;
}
if (node.id === undefined) {
(0, logging_1._warn)(60);
return false;
}
return true;
});
if (!allNodesValid) {
return;
}
const { nodes, source, newValue } = params;
beans.selectionSvc?.setNodesSelected({ nodes: nodes, source: source ?? 'api', newValue });
}
exports.setNodesSelected = setNodesSelected;
function selectAll(beans, selectAll, source = 'apiSelectAll') {
beans.selectionSvc?.selectAllRowNodes({ source, selectAll });
}
exports.selectAll = selectAll;
function deselectAll(beans, selectAll, source = 'apiSelectAll') {
beans.selectionSvc?.deselectAllRowNodes({ source, selectAll });
}
exports.deselectAll = deselectAll;
/** @deprecated v33 */
function selectAllFiltered(beans, source = 'apiSelectAllFiltered') {
beans.selectionSvc?.selectAllRowNodes({ source, selectAll: 'filtered' });
}
exports.selectAllFiltered = selectAllFiltered;
/** @deprecated v33 */
function deselectAllFiltered(beans, source = 'apiSelectAllFiltered') {
beans.selectionSvc?.deselectAllRowNodes({ source, selectAll: 'filtered' });
}
exports.deselectAllFiltered = deselectAllFiltered;
/** @deprecated v33 */
function selectAllOnCurrentPage(beans, source = 'apiSelectAllCurrentPage') {
beans.selectionSvc?.selectAllRowNodes({ source, selectAll: 'currentPage' });
}
exports.selectAllOnCurrentPage = selectAllOnCurrentPage;
/** @deprecated v33 */
function deselectAllOnCurrentPage(beans, source = 'apiSelectAllCurrentPage') {
beans.selectionSvc?.deselectAllRowNodes({ source, selectAll: 'currentPage' });
}
exports.deselectAllOnCurrentPage = deselectAllOnCurrentPage;
function getSelectedNodes(beans) {
return beans.selectionSvc?.getSelectedNodes() ?? [];
}
exports.getSelectedNodes = getSelectedNodes;
function getSelectedRows(beans) {
return beans.selectionSvc?.getSelectedRows() ?? [];
}
exports.getSelectedRows = getSelectedRows;
/***/ }),
/***/ 3352:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowSelectionModule = exports.SharedRowSelectionModule = void 0;
const selectionColService_1 = __webpack_require__(3245);
const version_1 = __webpack_require__(7205);
const rowSelectionApi_1 = __webpack_require__(9770);
const selectionService_1 = __webpack_require__(6603);
/**
* @internal
*/
exports.SharedRowSelectionModule = {
moduleName: 'SharedRowSelection',
version: version_1.VERSION,
beans: [selectionColService_1.SelectionColService],
apiFunctions: {
setNodesSelected: rowSelectionApi_1.setNodesSelected,
selectAll: rowSelectionApi_1.selectAll,
deselectAll: rowSelectionApi_1.deselectAll,
selectAllFiltered: rowSelectionApi_1.selectAllFiltered,
deselectAllFiltered: rowSelectionApi_1.deselectAllFiltered,
selectAllOnCurrentPage: rowSelectionApi_1.selectAllOnCurrentPage,
deselectAllOnCurrentPage: rowSelectionApi_1.deselectAllOnCurrentPage,
getSelectedNodes: rowSelectionApi_1.getSelectedNodes,
getSelectedRows: rowSelectionApi_1.getSelectedRows,
},
};
/**
* @feature Selection -> Row Selection
*/
exports.RowSelectionModule = {
moduleName: 'RowSelection',
version: version_1.VERSION,
rowModels: ['clientSide', 'infinite', 'viewport'],
beans: [selectionService_1.SelectionService],
dependsOn: [exports.SharedRowSelectionModule],
};
/***/ }),
/***/ 8273:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SelectAllFeature = void 0;
const columnUtils_1 = __webpack_require__(3146);
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const aria_1 = __webpack_require__(5230);
const logging_1 = __webpack_require__(7764);
const agCheckbox_1 = __webpack_require__(66);
class SelectAllFeature extends beanStub_1.BeanStub {
constructor(column) {
super();
this.column = column;
this.cbSelectAllVisible = false;
this.processingEventFromCheckbox = false;
}
onSpaceKeyDown(e) {
const checkbox = this.cbSelectAll;
if (checkbox.isDisplayed() && !checkbox.getGui().contains((0, gridOptionsUtils_1._getActiveDomElement)(this.beans))) {
e.preventDefault();
checkbox.setValue(!checkbox.getValue());
}
}
getCheckboxGui() {
return this.cbSelectAll.getGui();
}
setComp(ctrl) {
this.headerCellCtrl = ctrl;
const cbSelectAll = this.createManagedBean(new agCheckbox_1.AgCheckbox());
this.cbSelectAll = cbSelectAll;
cbSelectAll.addCssClass('ag-header-select-all');
(0, aria_1._setAriaRole)(cbSelectAll.getGui(), 'presentation');
this.showOrHideSelectAll();
this.addManagedEventListeners({
newColumnsLoaded: () => this.showOrHideSelectAll(),
displayedColumnsChanged: this.onDisplayedColumnsChanged.bind(this),
selectionChanged: this.onSelectionChanged.bind(this),
paginationChanged: this.onSelectionChanged.bind(this),
modelUpdated: this.onModelChanged.bind(this),
});
this.addManagedPropertyListener('rowSelection', ({ currentValue, previousValue }) => {
const getSelectAll = (rowSelection) => typeof rowSelection === 'string' || !rowSelection || rowSelection.mode === 'singleRow'
? undefined
: rowSelection.selectAll;
if (getSelectAll(currentValue) !== getSelectAll(previousValue)) {
this.showOrHideSelectAll();
}
});
this.addManagedListeners(cbSelectAll, { fieldValueChanged: this.onCbSelectAll.bind(this) });
cbSelectAll.getInputElement().setAttribute('tabindex', '-1');
this.refreshSelectAllLabel();
}
onDisplayedColumnsChanged(e) {
if (!this.isAlive()) {
return;
}
this.showOrHideSelectAll(e.source === 'uiColumnMoved');
}
showOrHideSelectAll(fromColumnMoved = false) {
const cbSelectAllVisible = this.isCheckboxSelection();
this.cbSelectAllVisible = cbSelectAllVisible;
this.cbSelectAll.setDisplayed(cbSelectAllVisible);
if (cbSelectAllVisible) {
// in case user is trying this feature with the wrong model type
this.checkRightRowModelType('selectAllCheckbox');
// in case user is trying this feature with the wrong model type
this.checkSelectionType('selectAllCheckbox');
// make sure checkbox is showing the right state
this.updateStateOfCheckbox();
}
this.refreshSelectAllLabel(fromColumnMoved);
}
onModelChanged() {
if (!this.cbSelectAllVisible) {
return;
}
this.updateStateOfCheckbox();
}
onSelectionChanged() {
if (!this.cbSelectAllVisible) {
return;
}
this.updateStateOfCheckbox();
}
updateStateOfCheckbox() {
if (this.processingEventFromCheckbox) {
return;
}
this.processingEventFromCheckbox = true;
const selectAllMode = this.getSelectAllMode();
const selectionSvc = this.beans.selectionSvc;
const cbSelectAll = this.cbSelectAll;
const allSelected = selectionSvc.getSelectAllState(selectAllMode);
cbSelectAll.setValue(allSelected);
const hasNodesToSelect = selectionSvc.hasNodesToSelect(selectAllMode);
cbSelectAll.setDisabled(!hasNodesToSelect);
this.refreshSelectAllLabel();
this.processingEventFromCheckbox = false;
}
refreshSelectAllLabel(fromColumnMoved = false) {
const translate = this.getLocaleTextFunc();
const { headerCellCtrl, cbSelectAll, cbSelectAllVisible } = this;
const checked = cbSelectAll.getValue();
const ariaStatus = checked ? translate('ariaChecked', 'checked') : translate('ariaUnchecked', 'unchecked');
const ariaLabel = translate('ariaRowSelectAll', 'Press Space to toggle all rows selection');
headerCellCtrl.setAriaDescriptionProperty('selectAll', cbSelectAllVisible ? `${ariaLabel} (${ariaStatus})` : null);
cbSelectAll.setInputAriaLabel(translate('ariaHeaderSelection', 'Column with Header Selection'));
// skip repetitive announcements during column move
if (!fromColumnMoved) {
headerCellCtrl.announceAriaDescription();
}
}
checkSelectionType(feature) {
const isMultiSelect = (0, gridOptionsUtils_1._isMultiRowSelection)(this.gos);
if (!isMultiSelect) {
(0, logging_1._warn)(128, { feature });
return false;
}
return true;
}
checkRightRowModelType(feature) {
const { gos, rowModel } = this.beans;
const rowModelMatches = (0, gridOptionsUtils_1._isClientSideRowModel)(gos) || (0, gridOptionsUtils_1._isServerSideRowModel)(gos);
if (!rowModelMatches) {
(0, logging_1._warn)(129, { feature, rowModel: rowModel.getType() });
return false;
}
return true;
}
onCbSelectAll() {
if (this.processingEventFromCheckbox) {
return;
}
if (!this.cbSelectAllVisible) {
return;
}
const value = this.cbSelectAll.getValue();
const selectAll = this.getSelectAllMode();
let source = 'uiSelectAll';
if (selectAll === 'currentPage') {
source = 'uiSelectAllCurrentPage';
}
else if (selectAll === 'filtered') {
source = 'uiSelectAllFiltered';
}
const params = { source, selectAll };
const selectionSvc = this.beans.selectionSvc;
if (value) {
selectionSvc.selectAllRowNodes(params);
}
else {
selectionSvc.deselectAllRowNodes(params);
}
}
/**
* Checkbox is enabled when either the `headerCheckbox` option is enabled in the new selection API
* or `headerCheckboxSelection` is enabled in the legacy API.
*/
isCheckboxSelection() {
const { column, gos, beans } = this;
const rowSelection = gos.get('rowSelection');
const colDef = column.getColDef();
const { headerCheckboxSelection } = colDef;
let result = false;
const newHeaderCheckbox = typeof rowSelection === 'object';
if (newHeaderCheckbox) {
// new selection config
const isSelectionCol = (0, columnUtils_1.isColumnSelectionCol)(column);
const isAutoCol = (0, columnUtils_1.isColumnGroupAutoCol)(column);
// default to displaying header checkbox in the selection column
const location = (0, gridOptionsUtils_1._getCheckboxLocation)(rowSelection);
if ((location === 'autoGroupColumn' && isAutoCol) ||
(isSelectionCol && beans.selectionColSvc?.isSelectionColumnEnabled())) {
result = (0, gridOptionsUtils_1._getHeaderCheckbox)(rowSelection);
}
}
else {
// legacy selection config
if (typeof headerCheckboxSelection === 'function') {
result = headerCheckboxSelection((0, gridOptionsUtils_1._addGridCommonParams)(gos, { column, colDef }));
}
else {
result = !!headerCheckboxSelection;
}
}
const featureName = newHeaderCheckbox ? 'headerCheckbox' : 'headerCheckboxSelection';
return result && this.checkRightRowModelType(featureName) && this.checkSelectionType(featureName);
}
getSelectAllMode() {
const selectAll = (0, gridOptionsUtils_1._getSelectAll)(this.gos, false);
if (selectAll) {
return selectAll;
}
const { headerCheckboxSelectionCurrentPageOnly, headerCheckboxSelectionFilteredOnly } = this.column.getColDef();
if (headerCheckboxSelectionCurrentPageOnly) {
return 'currentPage';
}
if (headerCheckboxSelectionFilteredOnly) {
return 'filtered';
}
return 'all';
}
}
exports.SelectAllFeature = SelectAllFeature;
/***/ }),
/***/ 6603:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SelectionService = void 0;
const rowNode_1 = __webpack_require__(3373);
const gridOptionsUtils_1 = __webpack_require__(7274);
const changedPath_1 = __webpack_require__(6800);
const logging_1 = __webpack_require__(7764);
const baseSelectionService_1 = __webpack_require__(3306);
class SelectionService extends baseSelectionService_1.BaseSelectionService {
constructor() {
super(...arguments);
this.beanName = 'selectionSvc';
this.selectedNodes = new Map();
/** Only used to track detail grid selection state when master/detail is enabled */
this.detailSelection = new Map();
this.masterSelectsDetail = false;
}
postConstruct() {
super.postConstruct();
const { gos } = this;
this.mode = (0, gridOptionsUtils_1._getRowSelectionMode)(gos);
this.groupSelectsDescendants = (0, gridOptionsUtils_1._getGroupSelectsDescendants)(gos);
this.groupSelectsFiltered = (0, gridOptionsUtils_1._getGroupSelection)(gos) === 'filteredDescendants';
this.masterSelectsDetail = (0, gridOptionsUtils_1._getMasterSelects)(gos) === 'detail';
this.addManagedPropertyListeners(['groupSelectsChildren', 'groupSelectsFiltered', 'rowSelection'], () => {
const groupSelectsDescendants = (0, gridOptionsUtils_1._getGroupSelectsDescendants)(gos);
const selectionMode = (0, gridOptionsUtils_1._getRowSelectionMode)(gos);
const groupSelectsFiltered = (0, gridOptionsUtils_1._getGroupSelection)(gos) === 'filteredDescendants';
this.masterSelectsDetail = (0, gridOptionsUtils_1._getMasterSelects)(gos) === 'detail';
if (groupSelectsDescendants !== this.groupSelectsDescendants ||
groupSelectsFiltered !== this.groupSelectsFiltered ||
selectionMode !== this.mode) {
this.deselectAllRowNodes({ source: 'api' });
this.groupSelectsDescendants = groupSelectsDescendants;
this.groupSelectsFiltered = groupSelectsFiltered;
this.mode = selectionMode;
}
});
this.addManagedEventListeners({ rowSelected: this.onRowSelected.bind(this) });
}
destroy() {
super.destroy();
this.resetNodes();
}
handleSelectionEvent(event, rowNode, source) {
if (this.isRowSelectionBlocked(rowNode))
return 0;
const selection = this.inferNodeSelections(rowNode, event.shiftKey, event.metaKey || event.ctrlKey, source);
if (selection == null) {
return 0;
}
this.selectionCtx.selectAll = false;
if ('select' in selection) {
if (selection.reset) {
this.resetNodes();
}
else {
this.selectRange(selection.deselect, false, source);
}
return this.selectRange(selection.select, true, source);
}
else {
return this.setNodesSelected({
nodes: [selection.node],
newValue: selection.newValue,
clearSelection: selection.clearSelection,
event,
source,
});
}
}
setNodesSelected({ newValue, clearSelection, suppressFinishActions, nodes, event, source, }) {
if (!(0, gridOptionsUtils_1._isRowSelection)(this.gos) && newValue) {
(0, logging_1._warn)(132);
return 0;
}
if (nodes.length === 0)
return 0;
if (nodes.length > 1 && !this.isMultiSelect()) {
(0, logging_1._warn)(130);
return 0;
}
let updatedCount = 0;
for (let i = 0; i < nodes.length; i++) {
const rowNode = nodes[i];
// if node is a footer, we don't do selection, just pass the info
// to the sibling (the parent of the group)
const node = _normaliseFooterRef(rowNode);
// when groupSelectsFiltered, then this node may end up indeterminate despite
// trying to set it to true / false. this group will be calculated further on
// down when we call updateGroupsFromChildrenSelections(). we need to skip it
// here, otherwise the updatedCount would include it.
const skipThisNode = this.groupSelectsFiltered && node.group;
if (node.rowPinned) {
(0, logging_1._warn)(59);
continue;
}
if (node.id === undefined) {
(0, logging_1._warn)(60);
continue;
}
if (!skipThisNode) {
const thisNodeWasSelected = this.selectRowNode(node, newValue, event, source);
if (thisNodeWasSelected) {
this.detailSelection.delete(node.id);
updatedCount++;
}
}
if (this.groupSelectsDescendants && node.childrenAfterGroup?.length) {
updatedCount += this.selectChildren(node, newValue, source);
}
}
// clear other nodes if not doing multi select
if (!suppressFinishActions) {
const clearOtherNodes = newValue && (clearSelection || !this.isMultiSelect());
if (clearOtherNodes) {
updatedCount += this.clearOtherNodes(_normaliseFooterRef(nodes[0]), source);
}
// only if we selected something, then update groups and fire events
if (updatedCount > 0) {
this.updateGroupsFromChildrenSelections(source);
// this is the very end of the 'action node', so we finished all the updates,
// including any parent / child changes that this method caused
this.dispatchSelectionChanged(source);
}
}
return updatedCount;
}
// not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by
// holding down 'shift'.
selectRange(nodesToSelect, value, source) {
let updatedCount = 0;
nodesToSelect.forEach((rowNode) => {
if (rowNode.group && this.groupSelectsDescendants) {
return;
}
const nodeWasSelected = this.selectRowNode(rowNode, value, undefined, source);
if (nodeWasSelected) {
updatedCount++;
}
});
if (updatedCount > 0) {
this.updateGroupsFromChildrenSelections(source);
this.dispatchSelectionChanged(source);
}
return updatedCount;
}
selectChildren(node, newValue, source) {
const children = this.groupSelectsFiltered ? node.childrenAfterAggFilter : node.childrenAfterGroup;
if (!children) {
return 0;
}
return this.setNodesSelected({
newValue,
clearSelection: false,
suppressFinishActions: true,
source,
nodes: children,
});
}
getSelectedNodes() {
return Array.from(this.selectedNodes.values());
}
getSelectedRows() {
const selectedRows = [];
this.selectedNodes.forEach((rowNode) => selectedRows.push(rowNode.data));
return selectedRows;
}
getSelectionCount() {
return this.selectedNodes.size;
}
/**
* This method is used by the CSRM to remove groups which are being disposed of,
* events do not need fired in this case
*/
filterFromSelection(predicate) {
const newSelectedNodes = new Map();
this.selectedNodes.forEach((rowNode, key) => {
if (predicate(rowNode)) {
newSelectedNodes.set(key, rowNode);
}
});
this.selectedNodes = newSelectedNodes;
}
updateGroupsFromChildrenSelections(source, changedPath) {
// we only do this when group selection state depends on selected children
if (!this.groupSelectsDescendants) {
return false;
}
const { gos, rowModel } = this.beans;
// also only do it if CSRM (code should never allow this anyway)
if (!(0, gridOptionsUtils_1._isClientSideRowModel)(gos, rowModel)) {
return false;
}
const rootNode = rowModel.rootNode;
if (!rootNode) {
return false;
}
if (!changedPath) {
changedPath = new changedPath_1.ChangedPath(true, rootNode);
changedPath.active = false;
}
let selectionChanged = false;
changedPath.forEachChangedNodeDepthFirst((rowNode) => {
if (rowNode !== rootNode) {
const selected = this.calculateSelectedFromChildren(rowNode);
selectionChanged =
this.selectRowNode(rowNode, selected === null ? false : selected, undefined, source) ||
selectionChanged;
}
});
return selectionChanged;
}
clearOtherNodes(rowNodeToKeepSelected, source) {
const groupsToRefresh = new Map();
let updatedCount = 0;
this.selectedNodes.forEach((otherRowNode) => {
if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {
const rowNode = this.selectedNodes.get(otherRowNode.id);
updatedCount += this.setNodesSelected({
nodes: [rowNode],
newValue: false,
clearSelection: false,
suppressFinishActions: true,
source,
});
if (this.groupSelectsDescendants && otherRowNode.parent) {
groupsToRefresh.set(otherRowNode.parent.id, otherRowNode.parent);
}
}
});
groupsToRefresh.forEach((group) => {
const selected = this.calculateSelectedFromChildren(group);
this.selectRowNode(group, selected === null ? false : selected, undefined, source);
});
return updatedCount;
}
onRowSelected(event) {
const rowNode = event.node;
// we do not store the group rows when the groups select children
if (this.groupSelectsDescendants && rowNode.group) {
return;
}
if (rowNode.isSelected()) {
this.selectedNodes.set(rowNode.id, rowNode);
}
else {
this.selectedNodes.delete(rowNode.id);
}
}
syncInRowNode(rowNode, oldNode) {
this.syncInOldRowNode(rowNode, oldNode);
this.syncInNewRowNode(rowNode);
}
createDaemonNode(rowNode) {
if (!rowNode.id) {
return undefined;
}
const oldNode = new rowNode_1.RowNode(this.beans);
// just copy the id and data, this is enough for the node to be used
// in the selection service
oldNode.id = rowNode.id;
oldNode.data = rowNode.data;
oldNode.__daemon = true;
oldNode.__selected = rowNode.__selected;
oldNode.level = rowNode.level;
return oldNode;
}
// if the id has changed for the node, then this means the rowNode
// is getting used for a different data item, which breaks
// our selectedNodes, as the node now is mapped by the old id
// which is inconsistent. so to keep the old node as selected,
// we swap in the clone (with the old id and old data). this means
// the oldNode is effectively a daemon we keep a reference to,
// so if client calls api.getSelectedNodes(), it gets the daemon
// in the result. when the client un-selects, the reference to the
// daemon is removed. the daemon, because it's an oldNode, is not
// used by the grid for rendering, it's a copy of what the node used
// to be like before the id was changed.
syncInOldRowNode(rowNode, oldNode) {
if (oldNode && rowNode.id !== oldNode.id) {
const oldNodeSelected = this.selectedNodes.get(oldNode.id) == rowNode;
if (oldNodeSelected) {
this.selectedNodes.set(oldNode.id, oldNode);
}
}
}
syncInNewRowNode(rowNode) {
if (this.selectedNodes.has(rowNode.id)) {
rowNode.__selected = true;
this.selectedNodes.set(rowNode.id, rowNode);
}
else {
rowNode.__selected = false;
}
}
reset(source) {
const selectionCount = this.getSelectionCount();
this.resetNodes();
if (selectionCount) {
this.dispatchSelectionChanged(source);
}
}
resetNodes() {
this.selectedNodes.forEach((node) => {
this.selectRowNode(node, false);
});
this.selectedNodes.clear();
}
// returns a list of all nodes at 'best cost' - a feature to be used
// with groups / trees. if a group has all it's children selected,
// then the group appears in the result, but not the children.
// Designed for use with 'children' as the group selection type,
// where groups don't actually appear in the selection normally.
getBestCostNodeSelection() {
const { gos, rowModel } = this.beans;
if (!(0, gridOptionsUtils_1._isClientSideRowModel)(gos, rowModel)) {
// Error logged as part of gridApi as that is only call point for this method.
return;
}
const topLevelNodes = rowModel.getTopLevelNodes();
if (topLevelNodes === null) {
return;
}
const result = [];
// recursive function, to find the selected nodes
function traverse(nodes) {
for (let i = 0, l = nodes.length; i < l; i++) {
const node = nodes[i];
if (node.isSelected()) {
result.push(node);
}
else {
// if not selected, then if it's a group, and the group
// has children, continue to search for selections
if (node.group && node.childrenAfterGroup) {
traverse(node.childrenAfterGroup);
}
}
}
}
traverse(topLevelNodes);
return result;
}
isEmpty() {
return this.getSelectionCount() === 0;
}
deselectAllRowNodes({ source, selectAll }) {
const rowModelClientSide = (0, gridOptionsUtils_1._isClientSideRowModel)(this.gos);
let updatedNodes = false;
const callback = (rowNode) => {
const updated = this.selectRowNode(_normaliseFooterRef(rowNode), false, undefined, source);
updatedNodes || (updatedNodes = updated);
};
if (selectAll === 'currentPage' || selectAll === 'filtered') {
if (!rowModelClientSide) {
(0, logging_1._error)(102);
return;
}
this.getNodesToSelect(selectAll).forEach(callback);
}
else {
this.selectedNodes.forEach(callback);
// this clears down the map (whereas above only sets the items in map to 'undefined')
this.reset(source);
}
this.selectionCtx.selectAll = false;
// the above does not clean up the parent rows if they are selected
if (rowModelClientSide && this.groupSelectsDescendants) {
const updated = this.updateGroupsFromChildrenSelections(source);
updatedNodes || (updatedNodes = updated);
}
if (updatedNodes) {
this.dispatchSelectionChanged(source);
}
}
getSelectedCounts(selectAll) {
let selectedCount = 0;
let notSelectedCount = 0;
this.getNodesToSelect(selectAll).forEach((node) => {
if (this.groupSelectsDescendants && node.group) {
return;
}
if (node.isSelected()) {
selectedCount++;
}
else if (node.selectable) {
// don't count non-selectable nodes!
notSelectedCount++;
}
});
return { selectedCount, notSelectedCount };
}
getSelectAllState(selectAll) {
const { selectedCount, notSelectedCount } = this.getSelectedCounts(selectAll);
return _calculateSelectAllState(selectedCount, notSelectedCount) ?? null;
}
hasNodesToSelect(selectAll) {
return this.getNodesToSelect(selectAll).filter((node) => node.selectable).length > 0;
}
/**
* @param selectAll See `MultiRowSelectionOptions.selectAll`
* @returns all nodes including unselectable nodes which are the target of this selection attempt
*/
getNodesToSelect(selectAll) {
if (!this.canSelectAll()) {
return [];
}
const nodes = [];
if (selectAll === 'currentPage') {
this.forEachNodeOnPage((node) => {
if (!node.group) {
nodes.push(node);
return;
}
if (!node.expanded && !node.footer) {
// even with groupSelectsChildren, do this recursively as only the filtered children
// are considered as the current page
const recursivelyAddChildren = (child) => {
nodes.push(child);
if (child.childrenAfterFilter?.length) {
child.childrenAfterFilter.forEach(recursivelyAddChildren);
}
};
recursivelyAddChildren(node);
return;
}
// if the group node is expanded, the pagination proxy will include the visible nodes to select
if (!this.groupSelectsDescendants) {
nodes.push(node);
}
});
return nodes;
}
const clientSideRowModel = this.beans.rowModel;
if (selectAll === 'filtered') {
clientSideRowModel.forEachNodeAfterFilter((node) => {
nodes.push(node);
});
return nodes;
}
clientSideRowModel.forEachNode((node) => {
nodes.push(node);
});
return nodes;
}
forEachNodeOnPage(callback) {
const { pageBounds, rowModel } = this.beans;
const firstRow = pageBounds.getFirstRow();
const lastRow = pageBounds.getLastRow();
for (let i = firstRow; i <= lastRow; i++) {
const node = rowModel.getRow(i);
if (node) {
callback(node);
}
}
}
selectAllRowNodes(params) {
const { gos, selectionCtx } = this;
if (!(0, gridOptionsUtils_1._isRowSelection)(gos)) {
(0, logging_1._warn)(132);
return;
}
if ((0, gridOptionsUtils_1._isUsingNewRowSelectionAPI)(gos) && !(0, gridOptionsUtils_1._isMultiRowSelection)(gos)) {
(0, logging_1._warn)(130);
return;
}
if (!this.canSelectAll()) {
return;
}
const { source, selectAll } = params;
let updatedNodes = false;
this.getNodesToSelect(selectAll).forEach((rowNode) => {
const updated = this.selectRowNode(_normaliseFooterRef(rowNode), true, undefined, source);
updatedNodes || (updatedNodes = updated);
});
selectionCtx.selectAll = true;
// the above does not clean up the parent rows if they are selected
if ((0, gridOptionsUtils_1._isClientSideRowModel)(gos) && this.groupSelectsDescendants) {
const updated = this.updateGroupsFromChildrenSelections(source);
updatedNodes || (updatedNodes = updated);
}
if (updatedNodes) {
this.dispatchSelectionChanged(source);
}
}
getSelectionState() {
const selectedIds = [];
this.selectedNodes.forEach((node) => {
if (node?.id) {
selectedIds.push(node.id);
}
});
return selectedIds.length ? selectedIds : null;
}
setSelectionState(state, source) {
if (!Array.isArray(state)) {
(0, logging_1._error)(103);
return;
}
const rowIds = new Set(state);
const nodes = [];
this.beans.rowModel.forEachNode((node) => {
if (rowIds.has(node.id)) {
nodes.push(node);
}
});
this.setNodesSelected({
newValue: true,
nodes,
source,
});
}
canSelectAll() {
const { gos, rowModel } = this.beans;
if (!(0, gridOptionsUtils_1._isClientSideRowModel)(gos)) {
(0, logging_1._error)(100, { rowModelType: rowModel.getType() });
return false;
}
return true;
}
/**
* Updates the selectable state for a node by invoking isRowSelectable callback.
* If the node is not selectable, it will be deselected.
*
* Callers:
* - property isRowSelectable changed
* - after grouping / treeData via `updateSelectableAfterGrouping`
*/
updateSelectable(changedPath) {
const { gos, rowModel } = this.beans;
if (!(0, gridOptionsUtils_1._isRowSelection)(gos)) {
return;
}
const source = 'selectableChanged';
const skipLeafNodes = changedPath !== undefined;
const isCSRMGroupSelectsDescendants = (0, gridOptionsUtils_1._isClientSideRowModel)(gos) && this.groupSelectsDescendants;
const nodesToDeselect = [];
const nodeCallback = (node) => {
if (skipLeafNodes && !node.group) {
return;
}
// Only in the CSRM, we allow group node selection if a child has a selectable=true when using groupSelectsChildren
if (isCSRMGroupSelectsDescendants && node.group) {
const hasSelectableChild = node.childrenAfterGroup?.some((rowNode) => rowNode.selectable) ?? false;
this.setRowSelectable(node, hasSelectableChild, true);
return;
}
const rowSelectable = this.updateRowSelectable(node, true);
if (!rowSelectable && node.isSelected()) {
nodesToDeselect.push(node);
}
};
// Needs to be depth first in this case, so that parents can be updated based on child.
if (isCSRMGroupSelectsDescendants) {
if (changedPath === undefined) {
const rootNode = rowModel.rootNode;
changedPath = rootNode ? new changedPath_1.ChangedPath(false, rootNode) : undefined;
}
changedPath?.forEachChangedNodeDepthFirst(nodeCallback, !skipLeafNodes, !skipLeafNodes);
}
else {
// Normal case, update all rows
rowModel.forEachNode(nodeCallback);
}
if (nodesToDeselect.length) {
this.setNodesSelected({
nodes: nodesToDeselect,
newValue: false,
source,
});
}
// if csrm and group selects children, update the groups after deselecting leaf nodes.
if (!skipLeafNodes && isCSRMGroupSelectsDescendants) {
this.updateGroupsFromChildrenSelections?.(source);
}
}
// only called by CSRM
updateSelectableAfterGrouping(changedPath) {
this.updateSelectable(changedPath);
if (this.groupSelectsDescendants) {
const selectionChanged = this.updateGroupsFromChildrenSelections?.('rowGroupChanged', changedPath);
if (selectionChanged) {
this.dispatchSelectionChanged('rowGroupChanged');
}
}
}
refreshMasterNodeState(node, e) {
if (!this.masterSelectsDetail)
return;
const detailApi = node.detailNode?.detailGridInfo?.api;
if (!detailApi)
return;
const isSelectAll = _isAllSelected(detailApi);
const current = node.isSelected();
if (current !== isSelectAll) {
const selectionChanged = this.selectRowNode(node, isSelectAll, e, 'masterDetail');
if (selectionChanged) {
this.dispatchSelectionChanged('masterDetail');
}
}
if (!isSelectAll) {
const detailSelected = this.detailSelection.get(node.id) ?? new Set();
for (const n of detailApi.getSelectedNodes()) {
detailSelected.add(n.id);
}
this.detailSelection.set(node.id, detailSelected);
}
}
setDetailSelectionState(masterNode, detailGridOptions, detailApi) {
if (!this.masterSelectsDetail)
return;
if (!(0, gridOptionsUtils_1._isMultiRowSelection)(detailGridOptions)) {
(0, logging_1._warn)(269);
return;
}
switch (masterNode.isSelected()) {
case true: {
detailApi.selectAll();
break;
}
case false: {
detailApi.deselectAll();
break;
}
case undefined: {
const selectedIds = this.detailSelection.get(masterNode.id);
if (selectedIds) {
const nodes = [];
for (const id of selectedIds) {
const n = detailApi.getRowNode(id);
if (n) {
nodes.push(n);
}
}
detailApi.setNodesSelected({ nodes, newValue: true, source: 'masterDetail' });
}
break;
}
default:
break;
}
}
}
exports.SelectionService = SelectionService;
/** Selection state of footer nodes is a clone of their siblings, so always act on sibling rather than footer */
function _normaliseFooterRef(node) {
return node.footer ? node.sibling : node;
}
function _isAllSelected(api) {
let selectedCount = 0;
let notSelectedCount = 0;
api.forEachNode((node) => {
if (node.isSelected()) {
selectedCount++;
}
else if (node.selectable) {
// don't count non-selectable nodes!
notSelectedCount++;
}
});
return _calculateSelectAllState(selectedCount, notSelectedCount);
}
function _calculateSelectAllState(selected, notSelected) {
// if no rows, always have it unselected
if (selected === 0 && notSelected === 0) {
return false;
}
// if mix of selected and unselected, this is indeterminate
if (selected > 0 && notSelected > 0) {
return;
}
// only selected
return selected > 0;
}
/***/ }),
/***/ 3341:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowNodeSorter = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const generic_1 = __webpack_require__(4422);
// this logic is used by both SSRM and CSRM
class RowNodeSorter extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'rowNodeSorter';
}
postConstruct() {
const { gos } = this;
this.isAccentedSort = gos.get('accentedSort');
this.primaryColumnsSortGroups = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos);
this.addManagedPropertyListener('accentedSort', (propChange) => (this.isAccentedSort = propChange.currentValue));
this.addManagedPropertyListener('autoGroupColumnDef', () => (this.primaryColumnsSortGroups = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos)));
}
doFullSort(rowNodes, sortOptions) {
const sortedRowNodes = rowNodes.map((rowNode, currentPos) => ({
currentPos,
rowNode,
}));
sortedRowNodes.sort(this.compareRowNodes.bind(this, sortOptions));
return sortedRowNodes.map((item) => item.rowNode);
}
compareRowNodes(sortOptions, sortedNodeA, sortedNodeB) {
const nodeA = sortedNodeA.rowNode;
const nodeB = sortedNodeB.rowNode;
// Iterate columns, return the first that doesn't match
for (let i = 0, len = sortOptions.length; i < len; i++) {
const sortOption = sortOptions[i];
const isDescending = sortOption.sort === 'desc';
const valueA = this.getValue(nodeA, sortOption.column);
const valueB = this.getValue(nodeB, sortOption.column);
let comparatorResult;
const providedComparator = this.getComparator(sortOption, nodeA);
if (providedComparator) {
//if comparator provided, use it
comparatorResult = providedComparator(valueA, valueB, nodeA, nodeB, isDescending);
}
else {
//otherwise do our own comparison
comparatorResult = (0, generic_1._defaultComparator)(valueA, valueB, this.isAccentedSort);
}
// user provided comparators can return 'NaN' if they don't correctly handle 'undefined' values, this
// typically occurs when the comparator is used on a group row
const validResult = !isNaN(comparatorResult);
if (validResult && comparatorResult !== 0) {
return sortOption.sort === 'asc' ? comparatorResult : comparatorResult * -1;
}
}
// All matched, we make is so that the original sort order is kept:
return sortedNodeA.currentPos - sortedNodeB.currentPos;
}
getComparator(sortOption, rowNode) {
const column = sortOption.column;
// comparator on col get preference over everything else
const comparatorOnCol = column.getColDef().comparator;
if (comparatorOnCol != null) {
return comparatorOnCol;
}
if (!column.getColDef().showRowGroup) {
return;
}
// if a 'field' is supplied on the autoGroupColumnDef we need to use the associated column comparator
const groupLeafField = !rowNode.group && column.getColDef().field;
if (!groupLeafField) {
return;
}
const primaryColumn = this.beans.colModel.getColDefCol(groupLeafField);
if (!primaryColumn) {
return;
}
return primaryColumn.getColDef().comparator;
}
getValue(node, column) {
const { valueSvc, colModel, showRowGroupCols, gos } = this.beans;
if (!this.primaryColumnsSortGroups) {
return valueSvc.getValue(column, node, false);
}
const isNodeGroupedAtLevel = node.rowGroupColumn === column;
if (isNodeGroupedAtLevel) {
const isGroupRows = (0, gridOptionsUtils_1._isGroupUseEntireRow)(gos, colModel.isPivotActive());
// because they're group rows, no display cols exist, so groupData never populated.
// instead delegate to getting value from leaf child.
if (isGroupRows) {
const leafChild = node.allLeafChildren?.[0];
if (leafChild) {
return valueSvc.getValue(column, leafChild, false);
}
return undefined;
}
const displayCol = showRowGroupCols?.getShowRowGroupCol(column.getId());
if (!displayCol) {
return undefined;
}
return node.groupData?.[displayCol.getId()];
}
if (node.group && column.getColDef().showRowGroup) {
return undefined;
}
return valueSvc.getValue(column, node, false);
}
}
exports.RowNodeSorter = RowNodeSorter;
/***/ }),
/***/ 7430:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.onSortChanged = void 0;
function onSortChanged(beans) {
beans.sortSvc?.onSortChanged('api');
}
exports.onSortChanged = onSortChanged;
/***/ }),
/***/ 7388:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SortIndicatorSelector = exports.SortIndicatorComp = void 0;
const gridOptionsUtils_1 = __webpack_require__(7274);
const dom_1 = __webpack_require__(3507);
const icon_1 = __webpack_require__(9970);
const component_1 = __webpack_require__(8020);
function makeSpan(dataRefSuffix, classSuffix) {
return /* html */ ``;
}
const SortIndicatorTemplate = /* html */ `
${makeSpan('Order', 'order')}
${makeSpan('Asc', 'ascending-icon')}
${makeSpan('Desc', 'descending-icon')}
${makeSpan('Mixed', 'mixed-icon')}
${makeSpan('None', 'none-icon')}
`;
class SortIndicatorComp extends component_1.Component {
constructor(skipTemplate) {
super();
this.eSortOrder = component_1.RefPlaceholder;
this.eSortAsc = component_1.RefPlaceholder;
this.eSortDesc = component_1.RefPlaceholder;
this.eSortMixed = component_1.RefPlaceholder;
this.eSortNone = component_1.RefPlaceholder;
if (!skipTemplate) {
this.setTemplate(SortIndicatorTemplate);
}
}
attachCustomElements(eSortOrder, eSortAsc, eSortDesc, eSortMixed, eSortNone) {
this.eSortOrder = eSortOrder;
this.eSortAsc = eSortAsc;
this.eSortDesc = eSortDesc;
this.eSortMixed = eSortMixed;
this.eSortNone = eSortNone;
}
setupSort(column, suppressOrder = false) {
this.column = column;
this.suppressOrder = suppressOrder;
this.setupMultiSortIndicator();
if (!column.isSortable() && !column.getColDef().showRowGroup) {
return;
}
this.addInIcon('sortAscending', this.eSortAsc, column);
this.addInIcon('sortDescending', this.eSortDesc, column);
this.addInIcon('sortUnSort', this.eSortNone, column);
const updateIcons = this.updateIcons.bind(this);
const sortUpdated = this.onSortChanged.bind(this);
this.addManagedPropertyListener('unSortIcon', updateIcons);
this.addManagedEventListeners({
newColumnsLoaded: updateIcons,
// Watch global events, as row group columns can effect their display column.
sortChanged: sortUpdated,
// when grouping changes so can sort indexes and icons
columnRowGroupChanged: sortUpdated,
});
this.onSortChanged();
}
addInIcon(iconName, eParent, column) {
if (eParent == null) {
return;
}
const eIcon = (0, icon_1._createIconNoSpan)(iconName, this.beans, column);
if (eIcon) {
eParent.appendChild(eIcon);
}
}
onSortChanged() {
this.updateIcons();
if (!this.suppressOrder) {
this.updateSortOrder();
}
}
updateIcons() {
const { eSortAsc, eSortDesc, eSortNone, column, gos, beans } = this;
const sortDirection = beans.sortSvc.getDisplaySortForColumn(column);
if (eSortAsc) {
const isAscending = sortDirection === 'asc';
(0, dom_1._setDisplayed)(eSortAsc, isAscending, { skipAriaHidden: true });
}
if (eSortDesc) {
const isDescending = sortDirection === 'desc';
(0, dom_1._setDisplayed)(eSortDesc, isDescending, { skipAriaHidden: true });
}
if (eSortNone) {
const alwaysHideNoSort = !column.getColDef().unSortIcon && !gos.get('unSortIcon');
const isNone = sortDirection === null || sortDirection === undefined;
(0, dom_1._setDisplayed)(eSortNone, !alwaysHideNoSort && isNone, { skipAriaHidden: true });
}
}
setupMultiSortIndicator() {
const { eSortMixed, column, gos } = this;
this.addInIcon('sortUnSort', eSortMixed, column);
const isColumnShowingRowGroup = column.getColDef().showRowGroup;
const areGroupsCoupled = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos);
if (areGroupsCoupled && isColumnShowingRowGroup) {
this.addManagedEventListeners({
// Watch global events, as row group columns can effect their display column.
sortChanged: this.updateMultiSortIndicator.bind(this),
// when grouping changes so can sort indexes and icons
columnRowGroupChanged: this.updateMultiSortIndicator.bind(this),
});
this.updateMultiSortIndicator();
}
}
updateMultiSortIndicator() {
const { eSortMixed, beans, column } = this;
if (eSortMixed) {
const isMixedSort = beans.sortSvc.getDisplaySortForColumn(column) === 'mixed';
(0, dom_1._setDisplayed)(eSortMixed, isMixedSort, { skipAriaHidden: true });
}
}
// we listen here for global sort events, NOT column sort events, as we want to do this
// when sorting has been set on all column (if we listened just for our col (where we
// set the asc / desc icons) then it's possible other cols are yet to get their sorting state.
updateSortOrder() {
const { eSortOrder, column, beans: { sortSvc }, } = this;
if (!eSortOrder) {
return;
}
const allColumnsWithSorting = sortSvc.getColumnsWithSortingOrdered();
const indexThisCol = sortSvc.getDisplaySortIndexForColumn(column) ?? -1;
const moreThanOneColSorting = allColumnsWithSorting.some((col) => sortSvc.getDisplaySortIndexForColumn(col) ?? -1 >= 1);
const showIndex = indexThisCol >= 0 && moreThanOneColSorting;
(0, dom_1._setDisplayed)(eSortOrder, showIndex, { skipAriaHidden: true });
if (indexThisCol >= 0) {
eSortOrder.textContent = (indexThisCol + 1).toString();
}
else {
(0, dom_1._clearElement)(eSortOrder);
}
}
}
exports.SortIndicatorComp = SortIndicatorComp;
exports.SortIndicatorSelector = {
selector: 'AG-SORT-INDICATOR',
component: SortIndicatorComp,
};
/***/ }),
/***/ 6620:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SortModule = void 0;
const version_1 = __webpack_require__(7205);
const rowNodeSorter_1 = __webpack_require__(3341);
const sortApi_1 = __webpack_require__(7430);
const sortIndicatorComp_1 = __webpack_require__(7388);
const sortService_1 = __webpack_require__(8125);
/**
* @feature Rows -> Row Sorting
* @colDef sortable, sort, sortIndex
*/
exports.SortModule = {
moduleName: 'Sort',
version: version_1.VERSION,
beans: [sortService_1.SortService, rowNodeSorter_1.RowNodeSorter],
apiFunctions: {
onSortChanged: sortApi_1.onSortChanged,
},
userComponents: {
agSortIndicator: sortIndicatorComp_1.SortIndicatorComp,
},
icons: {
// show on column header when column is sorted ascending
sortAscending: 'asc',
// show on column header when column is sorted descending
sortDescending: 'desc',
// show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true
sortUnSort: 'none',
},
};
/***/ }),
/***/ 8125:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SortService = exports.DEFAULT_SORTING_ORDER = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const sortIndicatorComp_1 = __webpack_require__(7388);
exports.DEFAULT_SORTING_ORDER = ['asc', 'desc', null];
class SortService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'sortSvc';
}
progressSort(column, multiSort, source) {
const nextDirection = this.getNextSortDirection(column);
this.setSortForColumn(column, nextDirection, multiSort, source);
}
progressSortFromEvent(column, event) {
const sortUsingCtrl = this.gos.get('multiSortKey') === 'ctrl';
const multiSort = sortUsingCtrl ? event.ctrlKey || event.metaKey : event.shiftKey;
this.progressSort(column, multiSort, 'uiColumnSorted');
}
setSortForColumn(column, sort, multiSort, source) {
// auto correct - if sort not legal value, then set it to 'no sort' (which is null)
if (sort !== 'asc' && sort !== 'desc') {
sort = null;
}
const { gos, showRowGroupCols } = this.beans;
const isColumnsSortingCoupledToGroup = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos);
let columnsToUpdate = [column];
if (isColumnsSortingCoupledToGroup) {
if (column.getColDef().showRowGroup) {
const rowGroupColumns = showRowGroupCols?.getSourceColumnsForGroupColumn?.(column);
const sortableRowGroupColumns = rowGroupColumns?.filter((col) => col.isSortable());
if (sortableRowGroupColumns) {
columnsToUpdate = [column, ...sortableRowGroupColumns];
}
}
}
columnsToUpdate.forEach((col) => this.setColSort(col, sort, source));
const doingMultiSort = (multiSort || gos.get('alwaysMultiSort')) && !gos.get('suppressMultiSort');
// clear sort on all columns except those changed, and update the icons
const updatedColumns = [];
if (!doingMultiSort) {
const clearedColumns = this.clearSortBarTheseColumns(columnsToUpdate, source);
updatedColumns.push(...clearedColumns);
}
// sortIndex used for knowing order of cols when multi-col sort
this.updateSortIndex(column);
updatedColumns.push(...columnsToUpdate);
this.dispatchSortChangedEvents(source, updatedColumns);
}
updateSortIndex(lastColToChange) {
const { gos, colModel, showRowGroupCols } = this.beans;
const isCoupled = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos);
const groupParent = showRowGroupCols?.getShowRowGroupCol(lastColToChange.getId());
const lastSortIndexCol = isCoupled ? groupParent || lastColToChange : lastColToChange;
const allSortedCols = this.getColumnsWithSortingOrdered();
// reset sort index on everything
colModel.getAllCols().forEach((col) => this.setColSortIndex(col, null));
const allSortedColsWithoutChangesOrGroups = allSortedCols.filter((col) => {
if (isCoupled && col.getColDef().showRowGroup) {
return false;
}
return col !== lastSortIndexCol;
});
const sortedColsWithIndices = lastSortIndexCol.getSort()
? [...allSortedColsWithoutChangesOrGroups, lastSortIndexCol]
: allSortedColsWithoutChangesOrGroups;
sortedColsWithIndices.forEach((col, idx) => this.setColSortIndex(col, idx));
}
// gets called by API, so if data changes, use can call this, which will end up
// working out the sort order again of the rows.
onSortChanged(source, columns) {
this.dispatchSortChangedEvents(source, columns);
}
isSortActive() {
// pull out all the columns that have sorting set
const allCols = this.beans.colModel.getAllCols();
const sortedCols = allCols.filter((column) => !!column.getSort());
return sortedCols && sortedCols.length > 0;
}
dispatchSortChangedEvents(source, columns) {
const event = {
type: 'sortChanged',
source,
};
if (columns) {
event.columns = columns;
}
this.eventSvc.dispatchEvent(event);
}
clearSortBarTheseColumns(columnsToSkip, source) {
const clearedColumns = [];
this.beans.colModel.getAllCols().forEach((columnToClear) => {
// Do not clear if either holding shift, or if column in question was clicked
if (!columnsToSkip.includes(columnToClear)) {
// add to list of cleared cols when sort direction is set
if (columnToClear.getSort()) {
clearedColumns.push(columnToClear);
}
// setting to 'undefined' as null means 'none' rather than cleared, otherwise issue will arise
// if sort order is: ['desc', null , 'asc'], as it will start at null rather than 'desc'.
this.setColSort(columnToClear, undefined, source);
}
});
return clearedColumns;
}
getNextSortDirection(column) {
const sortingOrder = column.getColDef().sortingOrder ?? this.gos.get('sortingOrder') ?? exports.DEFAULT_SORTING_ORDER;
const currentIndex = sortingOrder.indexOf(column.getSort());
const notInArray = currentIndex < 0;
const lastItemInArray = currentIndex == sortingOrder.length - 1;
return notInArray || lastItemInArray ? sortingOrder[0] : sortingOrder[currentIndex + 1];
}
/**
* @returns a map of sort indexes for every sorted column, if groups sort primaries then they will have equivalent indices
*/
getIndexedSortMap() {
const { gos, colModel, showRowGroupCols, rowGroupColsSvc } = this.beans;
// pull out all the columns that have sorting set
let allSortedCols = colModel.getAllCols().filter((col) => !!col.getSort());
if (colModel.isPivotMode()) {
const isSortingLinked = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos);
allSortedCols = allSortedCols.filter((col) => {
const isAggregated = !!col.getAggFunc();
const isSecondary = !col.isPrimary();
const isGroup = isSortingLinked
? showRowGroupCols?.getShowRowGroupCol(col.getId())
: col.getColDef().showRowGroup;
return isAggregated || isSecondary || isGroup;
});
}
const sortedRowGroupCols = rowGroupColsSvc?.columns.filter((col) => !!col.getSort()) ?? [];
// when both cols are missing sortIndex, we use the position of the col in all cols list.
// this means if colDefs only have sort, but no sortIndex, we deterministically pick which
// cols is sorted by first.
const allColsIndexes = {};
allSortedCols.forEach((col, index) => (allColsIndexes[col.getId()] = index));
// put the columns in order of which one got sorted first
allSortedCols.sort((a, b) => {
const iA = a.getSortIndex();
const iB = b.getSortIndex();
if (iA != null && iB != null) {
return iA - iB; // both present, normal comparison
}
else if (iA == null && iB == null) {
// both missing, compare using column positions
const posA = allColsIndexes[a.getId()];
const posB = allColsIndexes[b.getId()];
return posA > posB ? 1 : -1;
}
else if (iB == null) {
return -1; // iB missing
}
else {
return 1; // iA missing
}
});
const isSortLinked = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(gos) && !!sortedRowGroupCols.length;
if (isSortLinked) {
allSortedCols = [
...new Set(
// if linked sorting, replace all columns with the display group column for index purposes, and ensure uniqueness
allSortedCols.map((col) => showRowGroupCols?.getShowRowGroupCol(col.getId()) ?? col)),
];
}
const indexMap = new Map();
allSortedCols.forEach((col, idx) => indexMap.set(col, idx));
// add the row group cols back
if (isSortLinked) {
sortedRowGroupCols.forEach((col) => {
const groupDisplayCol = showRowGroupCols.getShowRowGroupCol(col.getId());
indexMap.set(col, indexMap.get(groupDisplayCol));
});
}
return indexMap;
}
getColumnsWithSortingOrdered() {
// pull out all the columns that have sorting set
return ([...this.getIndexedSortMap().entries()]
// eslint-disable-next-line @typescript-eslint/no-unused-vars
.sort(([col1, idx1], [col2, idx2]) => idx1 - idx2)
.map(([col]) => col));
}
// used by server side row models, to sent sort to server
getSortModel() {
return this.getColumnsWithSortingOrdered()
.filter((column) => column.getSort())
.map((column) => ({
sort: column.getSort(),
colId: column.getId(),
}));
}
getSortOptions() {
return this.getColumnsWithSortingOrdered()
.filter((column) => column.getSort())
.map((column) => ({
sort: column.getSort(),
column,
}));
}
canColumnDisplayMixedSort(column) {
const isColumnSortCouplingActive = (0, gridOptionsUtils_1._isColumnsSortingCoupledToGroup)(this.gos);
const isGroupDisplayColumn = !!column.getColDef().showRowGroup;
return isColumnSortCouplingActive && isGroupDisplayColumn;
}
getDisplaySortForColumn(column) {
const linkedColumns = this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(column);
if (!this.canColumnDisplayMixedSort(column) || !linkedColumns?.length) {
return column.getSort();
}
// if column has unique data, its sorting is independent - but can still be mixed
const columnHasUniqueData = column.getColDef().field != null || !!column.getColDef().valueGetter;
const sortableColumns = columnHasUniqueData ? [column, ...linkedColumns] : linkedColumns;
const firstSort = sortableColumns[0].getSort();
// the == is intentional, as null and undefined both represent no sort, which means they are equivalent
const allMatch = sortableColumns.every((col) => col.getSort() == firstSort);
if (!allMatch) {
return 'mixed';
}
return firstSort;
}
getDisplaySortIndexForColumn(column) {
return this.getIndexedSortMap().get(column);
}
setupHeader(comp, column, clickElement) {
let lastMovingChanged = 0;
// keep track of last time the moving changed flag was set
comp.addManagedListeners(column, {
movingChanged: () => {
lastMovingChanged = new Date().getTime();
},
});
// add the event on the header, so when clicked, we do sorting
if (clickElement) {
comp.addManagedElementListeners(clickElement, {
click: (event) => {
// sometimes when moving a column via dragging, this was also firing a clicked event.
// here is issue raised by user: https://ag-grid.zendesk.com/agent/tickets/1076
// this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)
const moving = column.isMoving();
const nowTime = new Date().getTime();
// typically there is <2ms if moving flag was set recently, as it would be done in same VM turn
const movedRecently = nowTime - lastMovingChanged < 50;
const columnMoving = moving || movedRecently;
if (!columnMoving) {
this.progressSortFromEvent(column, event);
}
},
});
}
const onSortingChanged = () => {
const sort = column.getSort();
comp.addOrRemoveCssClass('ag-header-cell-sorted-asc', sort === 'asc');
comp.addOrRemoveCssClass('ag-header-cell-sorted-desc', sort === 'desc');
comp.addOrRemoveCssClass('ag-header-cell-sorted-none', !sort);
if (column.getColDef().showRowGroup) {
const sourceColumns = this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(column);
// this == is intentional, as it allows null and undefined to match, which are both unsorted states
const sortDirectionsMatch = sourceColumns?.every((sourceCol) => column.getSort() == sourceCol.getSort());
const isMultiSorting = !sortDirectionsMatch;
comp.addOrRemoveCssClass('ag-header-cell-sorted-mixed', isMultiSorting);
}
};
comp.addManagedEventListeners({
sortChanged: onSortingChanged,
columnRowGroupChanged: onSortingChanged,
});
}
initCol(column) {
const { sort, initialSort, sortIndex, initialSortIndex } = column.colDef;
if (sort !== undefined) {
if (sort === 'asc' || sort === 'desc') {
column.sort = sort;
}
}
else {
if (initialSort === 'asc' || initialSort === 'desc') {
column.sort = initialSort;
}
}
if (sortIndex !== undefined) {
if (sortIndex !== null) {
column.sortIndex = sortIndex;
}
}
else {
if (initialSortIndex !== null) {
column.sortIndex = initialSortIndex;
}
}
}
updateColSort(column, sort, source) {
if (sort !== undefined) {
if (sort === 'desc' || sort === 'asc') {
this.setColSort(column, sort, source);
}
else {
this.setColSort(column, undefined, source);
}
}
}
setColSort(column, sort, source) {
if (column.sort !== sort) {
column.sort = sort;
column.dispatchColEvent('sortChanged', source);
}
column.dispatchStateUpdatedEvent('sort');
}
setColSortIndex(column, sortOrder) {
column.sortIndex = sortOrder;
column.dispatchStateUpdatedEvent('sortIndex');
}
createSortIndicator(skipTemplate) {
return new sortIndicatorComp_1.SortIndicatorComp(skipTemplate);
}
getSortIndicatorSelector() {
return sortIndicatorComp_1.SortIndicatorSelector;
}
}
exports.SortService = SortService;
/***/ }),
/***/ 2760:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CellCustomStyleFeature = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const stylingUtils_1 = __webpack_require__(8729);
class CellCustomStyleFeature extends beanStub_1.BeanStub {
constructor(cellCtrl, beans) {
super();
this.cellCtrl = cellCtrl;
this.staticClasses = [];
this.beans = beans;
this.column = cellCtrl.column;
}
setComp(comp) {
this.cellComp = comp;
this.applyUserStyles();
this.applyCellClassRules();
this.applyClassesFromColDef();
}
applyCellClassRules() {
const { column, cellComp } = this;
const colDef = column.colDef;
const cellClassRules = colDef.cellClassRules;
const cellClassParams = this.getCellClassParams(column, colDef);
(0, stylingUtils_1.processClassRules)(this.beans.expressionSvc,
// if current was previous, skip
cellClassRules === this.cellClassRules ? undefined : this.cellClassRules, cellClassRules, cellClassParams, (className) => cellComp.addOrRemoveCssClass(className, true), (className) => cellComp.addOrRemoveCssClass(className, false));
this.cellClassRules = cellClassRules;
}
applyUserStyles() {
const column = this.column;
const colDef = column.colDef;
const cellStyle = colDef.cellStyle;
if (!cellStyle) {
return;
}
let styles;
if (typeof cellStyle === 'function') {
const cellStyleParams = this.getCellClassParams(column, colDef);
styles = cellStyle(cellStyleParams);
}
else {
styles = cellStyle;
}
if (styles) {
this.cellComp.setUserStyles(styles);
}
}
applyClassesFromColDef() {
const { column, cellComp } = this;
const colDef = column.colDef;
const cellClassParams = this.getCellClassParams(column, colDef);
this.staticClasses.forEach((className) => cellComp.addOrRemoveCssClass(className, false));
const newStaticClasses = this.beans.cellStyles.getStaticCellClasses(colDef, cellClassParams);
this.staticClasses = newStaticClasses;
newStaticClasses.forEach((className) => cellComp.addOrRemoveCssClass(className, true));
}
getCellClassParams(column, colDef) {
const { value, rowNode } = this.cellCtrl;
return (0, gridOptionsUtils_1._addGridCommonParams)(this.beans.gos, {
value,
data: rowNode.data,
node: rowNode,
colDef,
column,
rowIndex: rowNode.rowIndex,
});
}
}
exports.CellCustomStyleFeature = CellCustomStyleFeature;
/***/ }),
/***/ 9330:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CellStyleService = void 0;
const beanStub_1 = __webpack_require__(8731);
const cellCustomStyleFeature_1 = __webpack_require__(2760);
const stylingUtils_1 = __webpack_require__(8729);
class CellStyleService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'cellStyles';
}
processAllCellClasses(colDef, params, onApplicableClass, onNotApplicableClass) {
(0, stylingUtils_1.processClassRules)(this.beans.expressionSvc, undefined, colDef.cellClassRules, params, onApplicableClass, onNotApplicableClass);
this.processStaticCellClasses(colDef, params, onApplicableClass);
}
getStaticCellClasses(colDef, params) {
const { cellClass } = colDef;
if (!cellClass) {
return [];
}
let classOrClasses;
if (typeof cellClass === 'function') {
const cellClassFunc = cellClass;
classOrClasses = cellClassFunc(params);
}
else {
classOrClasses = cellClass;
}
if (typeof classOrClasses === 'string') {
classOrClasses = [classOrClasses];
}
return classOrClasses || [];
}
createCellCustomStyleFeature(ctrl, beans) {
return new cellCustomStyleFeature_1.CellCustomStyleFeature(ctrl, beans);
}
processStaticCellClasses(colDef, params, onApplicableClass) {
const classOrClasses = this.getStaticCellClasses(colDef, params);
classOrClasses.forEach((cssClassItem) => {
onApplicableClass(cssClassItem);
});
}
}
exports.CellStyleService = CellStyleService;
/***/ }),
/***/ 9360:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.LayoutFeature = exports.LayoutCssClasses = void 0;
const beanStub_1 = __webpack_require__(8731);
exports.LayoutCssClasses = {
AUTO_HEIGHT: 'ag-layout-auto-height',
NORMAL: 'ag-layout-normal',
PRINT: 'ag-layout-print',
};
class LayoutFeature extends beanStub_1.BeanStub {
constructor(view) {
super();
this.view = view;
}
postConstruct() {
this.addManagedPropertyListener('domLayout', this.updateLayoutClasses.bind(this));
this.updateLayoutClasses();
}
updateLayoutClasses() {
const domLayout = this.gos.get('domLayout');
const params = {
autoHeight: domLayout === 'autoHeight',
normal: domLayout === 'normal',
print: domLayout === 'print',
};
const cssClass = params.autoHeight
? exports.LayoutCssClasses.AUTO_HEIGHT
: params.print
? exports.LayoutCssClasses.PRINT
: exports.LayoutCssClasses.NORMAL;
this.view.updateLayoutClasses(cssClass, params);
}
}
exports.LayoutFeature = LayoutFeature;
/***/ }),
/***/ 7648:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowStyleService = exports.calculateRowLevel = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const stylingUtils_1 = __webpack_require__(8729);
function calculateRowLevel(rowNode) {
if (rowNode.group) {
return rowNode.level;
}
const parent = rowNode.parent;
// if a leaf, and a parent exists, put a level of the parent, else put level of 0 for top level item
return parent ? parent.level + 1 : 0;
}
exports.calculateRowLevel = calculateRowLevel;
class RowStyleService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'rowStyleSvc';
}
processClassesFromGridOptions(classes, rowNode) {
const gos = this.gos;
const process = (rowCls) => {
if (typeof rowCls === 'string') {
classes.push(rowCls);
}
else if (Array.isArray(rowCls)) {
rowCls.forEach((e) => classes.push(e));
}
};
// part 1 - rowClass
const rowClass = gos.get('rowClass');
if (rowClass) {
process(rowClass);
}
// part 2 - rowClassFunc
const rowClassFunc = gos.getCallback('getRowClass');
if (rowClassFunc) {
const params = {
data: rowNode.data,
node: rowNode,
rowIndex: rowNode.rowIndex,
};
const rowClassFuncResult = rowClassFunc(params);
process(rowClassFuncResult);
}
}
preProcessRowClassRules(classes, rowNode) {
this.processRowClassRules(rowNode, (className) => {
classes.push(className);
}, () => {
// not catered for, if creating, no need
// to remove class as it was never there
});
}
processRowClassRules(rowNode, onApplicableClass, onNotApplicableClass) {
const { gos, expressionSvc } = this.beans;
const rowClassParams = (0, gridOptionsUtils_1._addGridCommonParams)(gos, {
data: rowNode.data,
node: rowNode,
rowIndex: rowNode.rowIndex,
});
(0, stylingUtils_1.processClassRules)(expressionSvc, undefined, gos.get('rowClassRules'), rowClassParams, onApplicableClass, onNotApplicableClass);
}
processStylesFromGridOptions(rowNode) {
const gos = this.gos;
// part 1 - rowStyle
const rowStyle = gos.get('rowStyle');
// part 1 - rowStyleFunc
const rowStyleFunc = gos.getCallback('getRowStyle');
let rowStyleFuncResult;
if (rowStyleFunc) {
const params = {
data: rowNode.data,
node: rowNode,
rowIndex: rowNode.rowIndex,
};
rowStyleFuncResult = rowStyleFunc(params);
}
if (rowStyleFuncResult || rowStyle) {
return Object.assign({}, rowStyle, rowStyleFuncResult);
}
return undefined;
}
}
exports.RowStyleService = RowStyleService;
/***/ }),
/***/ 8594:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.RowStyleModule = exports.CellStyleModule = void 0;
const version_1 = __webpack_require__(7205);
const cellStyleService_1 = __webpack_require__(9330);
const rowStyleService_1 = __webpack_require__(7648);
/**
* @feature Cells -> Styling Cells
* @colDef cellStyle, cellClass, cellClassRules
*/
exports.CellStyleModule = {
moduleName: 'CellStyle',
version: version_1.VERSION,
beans: [cellStyleService_1.CellStyleService],
};
/**
* @feature Rows -> Styling Rows
* @gridOption rowStyle, getRowStyle, rowClass, getRowClass, rowClassRules
*/
exports.RowStyleModule = {
moduleName: 'RowStyle',
version: version_1.VERSION,
beans: [rowStyleService_1.RowStyleService],
};
/***/ }),
/***/ 8729:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.processClassRules = void 0;
function processClassRules(expressionSvc, previousClassRules, classRules, params, onApplicableClass, onNotApplicableClass) {
if (classRules == null && previousClassRules == null) {
return;
}
const classesToApply = {};
const classesToRemove = {};
const forEachSingleClass = (className, callback) => {
// in case className = 'my-class1 my-class2', we need to split into individual class names
className.split(' ').forEach((singleClass) => {
if (singleClass.trim() == '')
return;
callback(singleClass);
});
};
if (classRules) {
const classNames = Object.keys(classRules);
for (let i = 0; i < classNames.length; i++) {
const className = classNames[i];
const rule = classRules[className];
let resultOfRule;
if (typeof rule === 'string') {
resultOfRule = expressionSvc ? expressionSvc.evaluate(rule, params) : true;
}
else if (typeof rule === 'function') {
resultOfRule = rule(params);
}
forEachSingleClass(className, (singleClass) => {
resultOfRule ? (classesToApply[singleClass] = true) : (classesToRemove[singleClass] = true);
});
}
}
if (previousClassRules && onNotApplicableClass) {
Object.keys(previousClassRules).forEach((className) => forEachSingleClass(className, (singleClass) => {
if (!classesToApply[singleClass]) {
// if we're not applying a previous class now, make sure we remove it
classesToRemove[singleClass] = true;
}
}));
}
// we remove all classes first, then add all classes second,
// in case a class appears in more than one rule, this means it will be added
// if appears in at least one truthy rule
if (onNotApplicableClass) {
Object.keys(classesToRemove).forEach(onNotApplicableClass);
}
Object.keys(classesToApply).forEach(onApplicableClass);
}
exports.processClassRules = processClassRules;
/***/ }),
/***/ 7711:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.SyncService = void 0;
const columnUtils_1 = __webpack_require__(3146);
const beanStub_1 = __webpack_require__(8731);
const function_1 = __webpack_require__(2043);
class SyncService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'syncSvc';
this.waitingForColumns = false;
}
postConstruct() {
this.addManagedPropertyListener('columnDefs', (event) => this.setColumnDefs(event));
}
start() {
// we wait until the UI has finished initialising before setting in columns and rows
this.beans.ctrlsSvc.whenReady(this, () => {
const columnDefs = this.gos.get('columnDefs');
if (columnDefs) {
this.setColumnsAndData(columnDefs);
}
else {
this.waitingForColumns = true;
}
this.gridReady();
});
}
setColumnsAndData(columnDefs) {
const { colModel, rowModel } = this.beans;
colModel.setColumnDefs(columnDefs ?? [], 'gridInitializing');
rowModel.start();
}
gridReady() {
const { eventSvc, gos } = this;
eventSvc.dispatchEvent({
type: 'gridReady',
});
(0, function_1._logIfDebug)(gos, `initialised successfully, enterprise = ${gos.isModuleRegistered('EnterpriseCore')}`);
}
setColumnDefs(event) {
const columnDefs = this.gos.get('columnDefs');
if (!columnDefs) {
return;
}
if (this.waitingForColumns) {
this.waitingForColumns = false;
this.setColumnsAndData(columnDefs);
return;
}
this.beans.colModel.setColumnDefs(columnDefs, (0, columnUtils_1._convertColumnEventSourceType)(event.source));
}
}
exports.SyncService = SyncService;
/***/ }),
/***/ 6607:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PartImpl = exports.defaultModeName = exports.createPart = void 0;
const inject_1 = __webpack_require__(8951);
/**
* Create a new empty part.
*
* @param feature an The part feature, e.g. 'iconSet'. Adding a part to a theme will remove any existing part with the same feature.
* @param variant an optional identifier for debugging, if omitted one will be generated
*/
const createPart = (args) => {
/*#__PURE__*/
return new PartImpl(args);
};
exports.createPart = createPart;
exports.defaultModeName = '$default';
let partCounter = 0;
class PartImpl {
constructor({ feature, params, modeParams = {}, css, cssImports }) {
this.feature = feature;
this.css = css;
this.cssImports = cssImports;
this.modeParams = {
// NOTE: it's important that default is defined first, putting it
// first in iteration order, because when merging params the default
// params override any prior modal params, so modal params in this
// part need to come after default params to prevent them from being
// immediately overridden.
[exports.defaultModeName]: {
...(modeParams[exports.defaultModeName] ?? {}),
...(params ?? {}),
},
...modeParams,
};
}
use(styleContainer, layer) {
let inject = this._inject;
if (inject == null) {
let { css } = this;
if (css) {
const className = `ag-theme-${this.feature ?? 'part'}-${++partCounter}`;
if (typeof css === 'function')
css = css();
css = `:where(.${className}) {\n${css}\n}\n`;
for (const cssImport of this.cssImports ?? []) {
css = `@import url(${JSON.stringify(cssImport)});\n${css}`;
}
inject = { css, class: className };
}
else {
inject = false;
}
this._inject = inject;
}
if (inject && styleContainer) {
(0, inject_1._injectGlobalCSS)(inject.css, styleContainer, inject.class, layer, 1);
}
return inject ? inject.class : false;
}
}
exports.PartImpl = PartImpl;
/***/ }),
/***/ 9621:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ThemeImpl = exports.createTheme = exports._asThemeImpl = exports.FORCE_LEGACY_THEMES = void 0;
const logging_1 = __webpack_require__(7764);
const Part_1 = __webpack_require__(6607);
const core_css_1 = __webpack_require__(405);
const inject_1 = __webpack_require__(8951);
const button_styles_1 = __webpack_require__(2475);
const column_drop_styles_1 = __webpack_require__(1697);
const theme_types_1 = __webpack_require__(113);
const theme_utils_1 = __webpack_require__(7845);
// For testing, if true, only Vanilla examples will work and they will use legacy themes.
exports.FORCE_LEGACY_THEMES = false;
const _asThemeImpl = (theme) => {
if (!(theme instanceof ThemeImpl)) {
throw new Error('theme is not an object created by createTheme');
}
return theme;
};
exports._asThemeImpl = _asThemeImpl;
/**
* Create a custom theme containing core grid styles but no parts.
*/
// TODO button and column drop styles were split out into a part in 33.1 and
// must be bundled by default to avoid a breaking change for people using
// createTheme(). In v34 the withPart calls can be removed.
const createTheme = () => new ThemeImpl().withPart(button_styles_1.buttonStyleQuartz).withPart(column_drop_styles_1.columnDropStyleBordered);
exports.createTheme = createTheme;
class ThemeImpl {
constructor(parts = []) {
this.parts = parts;
}
withPart(part) {
if (typeof part === 'function')
part = part();
if (!(part instanceof Part_1.PartImpl)) {
// Can't use validation service as this is API is designed to be used before modules are registered
(0, logging_1._logPreInitErr)(259, { part }, 'Invalid part');
return this;
}
return new ThemeImpl([...this.parts, part]);
}
withoutPart(feature) {
return this.withPart((0, Part_1.createPart)({ feature }));
}
withParams(params, mode = Part_1.defaultModeName) {
return this.withPart((0, Part_1.createPart)({
modeParams: { [mode]: params },
}));
}
/**
* Called by a grid instance when it starts using the theme. This installs
* the theme's parts into document head, or the shadow DOM if the provided
* container is within a shadow root.
*/
_startUse({ styleContainer, cssLayer, loadThemeGoogleFonts }) {
if (inject_1.IS_SSR)
return;
if (exports.FORCE_LEGACY_THEMES)
return;
uninstallLegacyCSS();
(0, inject_1._injectCoreAndModuleCSS)(styleContainer, cssLayer);
const googleFontsUsed = getGoogleFontsUsed(this);
if (googleFontsUsed.length > 0) {
for (const googleFont of googleFontsUsed) {
if (loadThemeGoogleFonts) {
loadGoogleFont(googleFont);
}
}
}
for (const part of this.parts) {
part.use(styleContainer, cssLayer);
}
}
/**
* Return CSS that that applies the params of this theme to elements with
* the provided class name
*/
_getCssClass() {
if (exports.FORCE_LEGACY_THEMES)
return 'ag-theme-quartz';
return (this._cssClassCache ?? (this._cssClassCache = deduplicatePartsByFeature(this.parts)
.map((part) => part.use(undefined, undefined))
.filter(Boolean)
.join(' ')));
}
_getModeParams() {
let paramsCache = this._paramsCache;
if (!paramsCache) {
const mergedModeParams = {
// NOTE: defining the default mode here is important, it ensures
// that the default mode is first in iteration order, which puts
// it first in outputted CSS, allowing other modes to override it
[Part_1.defaultModeName]: { ...core_css_1.coreDefaults },
};
for (const part of deduplicatePartsByFeature(this.parts)) {
for (const partMode of Object.keys(part.modeParams)) {
const partParams = part.modeParams[partMode];
if (partParams) {
const mergedParams = (mergedModeParams[partMode] ?? (mergedModeParams[partMode] = {}));
const partParamNames = new Set();
for (const partParamName of Object.keys(partParams)) {
const partParamValue = partParams[partParamName];
if (partParamValue !== undefined) {
mergedParams[partParamName] = partParamValue;
partParamNames.add(partParamName);
}
}
// If a later part has added default mode params, remove any non-default mode
// values for the same param. We need to do this because the last value set
// for a param should always take precedence. Consider this:
// const redInDarkMode = themeQuartz.withParams({accentColor: 'red'}, 'dark');
// const alwaysBlue = redInDarkMode.withParams({accentColor: 'blue'});
// Setting theme.withParams({accentColor: 'blue'}) is expected to produce a theme
// whose accent color is always blue, end of story. So we remove the accentColor
// value from the `dark` mode params otherwise it would override the default
// accent color.
if (partMode === Part_1.defaultModeName) {
for (const mergedMode of Object.keys(mergedModeParams)) {
const mergedParams = mergedModeParams[mergedMode];
if (mergedMode !== Part_1.defaultModeName) {
for (const partParamName of partParamNames) {
delete mergedParams[partParamName];
}
}
}
}
}
}
}
this._paramsCache = paramsCache = mergedModeParams;
}
return paramsCache;
}
/**
* Return the CSS chunk that is inserted into the grid DOM, and will
* therefore be removed automatically when the grid is destroyed or it
* starts to use a new theme.
*
* @param className a unique class name on the grid wrapper used to scope the returned CSS to the grid instance
*/
_getPerGridCss(className) {
const selectorPlaceholder = '##SELECTOR##';
let innerParamsCss = this._paramsCssCache;
if (!innerParamsCss) {
// Ensure that every variable has a value set on root elements ("root"
// elements are those containing grid UI, e.g. ag-root-wrapper and
// ag-popup)
//
// Simply setting .ag-root-wrapper { --ag-foo: default-value } is not
// appropriate because it will override any values set on parent
// elements. An application should be able to set `--ag-spacing: 4px`
// on the document body and have it picked up by all grids on the page.
//
// To allow this we capture the application-provided value of --ag-foo
// into --ag-inherited-foo on the *parent* element of the root, and then
// use --ag-inherited-foo as the value for --ag-foo on the root element,
// applying our own default if it is unset.
let variablesCss = '';
let inheritanceCss = '';
const modeParams = this._getModeParams();
for (const mode of Object.keys(modeParams)) {
const params = modeParams[mode];
if (mode !== Part_1.defaultModeName) {
const escapedMode = typeof CSS === 'object' ? CSS.escape(mode) : mode; // check for CSS global in case we're running in tests
const wrapPrefix = `:where([data-ag-theme-mode="${escapedMode}"]) & {\n`;
variablesCss += wrapPrefix;
inheritanceCss += wrapPrefix;
}
for (const key of Object.keys(params).sort()) {
const value = params[key];
const cssValue = (0, theme_types_1.paramValueToCss)(key, value);
if (cssValue === false) {
(0, logging_1._error)(107, { key, value });
}
else {
const cssName = (0, theme_utils_1.paramToVariableName)(key);
const inheritedName = cssName.replace('--ag-', '--ag-inherited-');
variablesCss += `\t${cssName}: var(${inheritedName}, ${cssValue});\n`;
inheritanceCss += `\t${inheritedName}: var(${cssName});\n`;
}
}
if (mode !== Part_1.defaultModeName) {
variablesCss += '}\n';
inheritanceCss += '}\n';
}
}
let css = `${selectorPlaceholder} {\n${variablesCss}}\n`;
// Create --ag-inherited-foo variable values on the parent element, unless
// the parent is itself a root (which can happen if popupParent is
// ag-root-wrapper)
css += `:has(> ${selectorPlaceholder}):not(${selectorPlaceholder}) {\n${inheritanceCss}}\n`;
this._paramsCssCache = innerParamsCss = css;
}
return innerParamsCss.replaceAll(selectorPlaceholder, `:where(.${className})`);
}
}
exports.ThemeImpl = ThemeImpl;
// Remove parts with the same feature, keeping only the last one
const deduplicatePartsByFeature = (parts) => {
const lastPartByFeature = new Map();
for (const part of parts) {
lastPartByFeature.set(part.feature, part);
}
const result = [];
for (const part of parts) {
if (!part.feature || lastPartByFeature.get(part.feature) === part) {
result.push(part);
}
}
return result;
};
const getGoogleFontsUsed = (theme) => {
const googleFontsUsed = new Set();
const visitParamValue = (paramValue) => {
// font value can be a font object or array of font objects
if (Array.isArray(paramValue)) {
paramValue.forEach(visitParamValue);
}
else {
const googleFont = paramValue?.googleFont;
if (typeof googleFont === 'string') {
googleFontsUsed.add(googleFont);
}
}
};
const allModeValues = Object.values(theme._getModeParams());
const allValues = allModeValues.flatMap((mv) => Object.values(mv));
allValues.forEach(visitParamValue);
return Array.from(googleFontsUsed).sort();
};
let uninstalledLegacyCSS = false;
// Remove the CSS from @ag-grid-community/styles that is automatically injected
// by the UMD bundle
const uninstallLegacyCSS = () => {
if (uninstalledLegacyCSS)
return;
uninstalledLegacyCSS = true;
for (const style of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]'))) {
style.remove();
}
};
const googleFontsLoaded = new Set();
const loadGoogleFont = async (font) => {
googleFontsLoaded.add(font);
const css = `@import url('https://${googleFontsDomain}/css2?family=${encodeURIComponent(font)}:wght@100;200;300;400;500;600;700;800;900&display=swap');\n`;
// fonts are always installed in the document head, they are inherited in
// shadow DOM without the need for separate installation
(0, inject_1._injectGlobalCSS)(css, document.head, `googleFont:${font}`, undefined, 0);
};
const googleFontsDomain = 'fonts.googleapis.com';
/***/ }),
/***/ 405:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.coreDefaults = exports.defaultLightColorSchemeParams = exports.coreCSS = void 0;
const theme_utils_1 = __webpack_require__(7845);
var core_css_GENERATED_1 = __webpack_require__(9550);
Object.defineProperty(exports, "coreCSS", ({ enumerable: true, get: function () { return core_css_GENERATED_1.coreCSS; } }));
exports.defaultLightColorSchemeParams = {
backgroundColor: '#fff',
foregroundColor: '#181d1f',
borderColor: (0, theme_utils_1.foregroundMix)(0.15),
chromeBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.02),
browserColorScheme: 'light',
};
exports.coreDefaults = {
...exports.defaultLightColorSchemeParams,
textColor: theme_utils_1.foregroundColor,
accentColor: '#2196f3',
invalidColor: '#e02525',
wrapperBorder: true,
rowBorder: true,
headerRowBorder: true,
footerRowBorder: {
ref: 'rowBorder',
},
columnBorder: {
style: 'solid',
width: 1,
color: 'transparent',
},
headerColumnBorder: false,
headerColumnBorderHeight: '100%',
pinnedColumnBorder: true,
pinnedRowBorder: true,
sidePanelBorder: true,
sideBarPanelWidth: 250,
sideBarBackgroundColor: {
ref: 'chromeBackgroundColor',
},
sideButtonBarBackgroundColor: {
ref: 'sideBarBackgroundColor',
},
sideButtonBarTopPadding: 0,
sideButtonSelectedUnderlineWidth: 2,
sideButtonSelectedUnderlineColor: 'transparent',
sideButtonSelectedUnderlineTransitionDuration: 0,
sideButtonBackgroundColor: 'transparent',
sideButtonTextColor: { ref: 'textColor' },
sideButtonHoverBackgroundColor: { ref: 'sideButtonBackgroundColor' },
sideButtonHoverTextColor: { ref: 'sideButtonTextColor' },
sideButtonSelectedBackgroundColor: theme_utils_1.backgroundColor,
sideButtonSelectedTextColor: { ref: 'sideButtonTextColor' },
sideButtonBorder: 'solid 1px transparent',
sideButtonSelectedBorder: true,
sideButtonLeftPadding: { ref: 'spacing' },
sideButtonRightPadding: { ref: 'spacing' },
sideButtonVerticalPadding: { calc: 'spacing * 3' },
fontFamily: [
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
'Roboto',
'Oxygen-Sans',
'Ubuntu',
'Cantarell',
'Helvetica Neue',
'sans-serif',
],
headerBackgroundColor: {
ref: 'chromeBackgroundColor',
},
headerFontFamily: {
ref: 'fontFamily',
},
cellFontFamily: {
ref: 'fontFamily',
},
headerFontWeight: 500,
headerFontSize: {
ref: 'fontSize',
},
dataFontSize: {
ref: 'fontSize',
},
headerTextColor: {
ref: 'textColor',
},
headerCellHoverBackgroundColor: 'transparent',
headerCellMovingBackgroundColor: { ref: 'headerCellHoverBackgroundColor' },
headerCellBackgroundTransitionDuration: '0.2s',
cellTextColor: {
ref: 'textColor',
},
subtleTextColor: {
ref: 'textColor',
mix: 0.5,
},
rangeSelectionBorderStyle: 'solid',
rangeSelectionBorderColor: theme_utils_1.accentColor,
rangeSelectionBackgroundColor: (0, theme_utils_1.accentMix)(0.2),
rangeSelectionChartBackgroundColor: '#0058FF1A',
rangeSelectionChartCategoryBackgroundColor: '#00FF841A',
rangeSelectionHighlightColor: (0, theme_utils_1.accentMix)(0.5),
rangeHeaderHighlightColor: (0, theme_utils_1.foregroundHeaderBackgroundMix)(0.08),
rowNumbersSelectedColor: (0, theme_utils_1.accentMix)(0.5),
rowHoverColor: (0, theme_utils_1.accentMix)(0.08),
columnHoverColor: (0, theme_utils_1.accentMix)(0.05),
selectedRowBackgroundColor: (0, theme_utils_1.accentMix)(0.12),
modalOverlayBackgroundColor: {
ref: 'backgroundColor',
mix: 0.66,
},
oddRowBackgroundColor: theme_utils_1.backgroundColor,
borderRadius: 4,
wrapperBorderRadius: 8,
cellHorizontalPadding: {
calc: 'spacing * 2 * cellHorizontalPaddingScale',
},
cellWidgetSpacing: {
calc: 'spacing * 1.5',
},
cellHorizontalPaddingScale: 1,
rowGroupIndentSize: {
calc: 'cellWidgetSpacing + iconSize',
},
valueChangeDeltaUpColor: '#43a047',
valueChangeDeltaDownColor: '#e53935',
valueChangeValueHighlightBackgroundColor: '#16a08580',
spacing: 8,
fontSize: 14,
rowHeight: {
calc: 'max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale',
},
rowVerticalPaddingScale: 1,
headerHeight: {
calc: 'max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale',
},
headerVerticalPaddingScale: 1,
popupShadow: '0 0 16px #00000026',
cardShadow: '0 1px 4px 1px #00000018',
dropdownShadow: { ref: 'cardShadow' },
dragAndDropImageBackgroundColor: theme_utils_1.backgroundColor,
dragAndDropImageBorder: true,
dragAndDropImageShadow: {
ref: 'popupShadow',
},
dragHandleColor: (0, theme_utils_1.foregroundMix)(0.7),
focusShadow: {
spread: 3,
color: (0, theme_utils_1.accentMix)(0.5),
},
headerColumnResizeHandleHeight: '30%',
headerColumnResizeHandleWidth: 2,
headerColumnResizeHandleColor: {
ref: 'borderColor',
},
widgetContainerHorizontalPadding: {
calc: 'spacing * 1.5',
},
widgetContainerVerticalPadding: {
calc: 'spacing * 1.5',
},
widgetHorizontalSpacing: {
calc: 'spacing * 1.5',
},
widgetVerticalSpacing: {
ref: 'spacing',
},
listItemHeight: {
calc: 'max(iconSize, dataFontSize) + widgetVerticalSpacing',
},
iconSize: 16,
iconColor: 'inherit',
iconButtonColor: { ref: 'iconColor' },
iconButtonBackgroundColor: 'transparent',
iconButtonBackgroundSpread: 4,
iconButtonBorderRadius: 1,
iconButtonHoverColor: { ref: 'iconButtonColor' },
iconButtonHoverBackgroundColor: (0, theme_utils_1.foregroundMix)(0.1),
iconButtonActiveColor: theme_utils_1.accentColor,
iconButtonActiveBackgroundColor: (0, theme_utils_1.accentMix)(0.28),
iconButtonActiveIndicatorColor: theme_utils_1.accentColor,
toggleButtonWidth: 28,
toggleButtonHeight: 18,
toggleButtonOnBackgroundColor: theme_utils_1.accentColor,
toggleButtonOffBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.3),
toggleButtonSwitchBackgroundColor: theme_utils_1.backgroundColor,
toggleButtonSwitchInset: 2,
menuBorder: {
color: (0, theme_utils_1.foregroundMix)(0.2),
},
menuBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.03),
menuTextColor: (0, theme_utils_1.foregroundBackgroundMix)(0.95),
menuShadow: {
ref: 'popupShadow',
},
menuSeparatorColor: {
ref: 'borderColor',
},
setFilterIndentSize: {
ref: 'iconSize',
},
chartMenuPanelWidth: 260,
chartMenuLabelColor: (0, theme_utils_1.foregroundMix)(0.8),
dialogShadow: {
ref: 'popupShadow',
},
cellEditingBorder: {
color: theme_utils_1.accentColor,
},
cellEditingShadow: { ref: 'cardShadow' },
dialogBorder: {
color: (0, theme_utils_1.foregroundMix)(0.2),
},
panelBackgroundColor: theme_utils_1.backgroundColor,
panelTitleBarBackgroundColor: {
ref: 'headerBackgroundColor',
},
panelTitleBarIconColor: {
ref: 'headerTextColor',
},
panelTitleBarTextColor: {
ref: 'headerTextColor',
},
panelTitleBarFontWeight: {
ref: 'headerFontWeight',
},
panelTitleBarBorder: true,
columnSelectIndentSize: {
ref: 'iconSize',
},
toolPanelSeparatorBorder: true,
tooltipBackgroundColor: {
ref: 'chromeBackgroundColor',
},
tooltipTextColor: {
ref: 'textColor',
},
tooltipBorder: true,
columnDropCellBackgroundColor: (0, theme_utils_1.foregroundMix)(0.07),
columnDropCellTextColor: {
ref: 'textColor',
},
columnDropCellDragHandleColor: {
ref: 'textColor',
},
columnDropCellBorder: {
color: (0, theme_utils_1.foregroundMix)(0.13),
},
selectCellBackgroundColor: (0, theme_utils_1.foregroundMix)(0.07),
selectCellBorder: {
color: (0, theme_utils_1.foregroundMix)(0.13),
},
advancedFilterBuilderButtonBarBorder: true,
advancedFilterBuilderIndentSize: {
calc: 'spacing * 2 + iconSize',
},
advancedFilterBuilderJoinPillColor: '#f08e8d',
advancedFilterBuilderColumnPillColor: '#a6e194',
advancedFilterBuilderOptionPillColor: '#f3c08b',
advancedFilterBuilderValuePillColor: '#85c0e4',
filterToolPanelGroupIndent: {
ref: 'spacing',
},
rowLoadingSkeletonEffectColor: (0, theme_utils_1.foregroundMix)(0.15),
statusBarLabelColor: theme_utils_1.foregroundColor,
statusBarLabelFontWeight: 500,
statusBarValueColor: theme_utils_1.foregroundColor,
statusBarValueFontWeight: 500,
};
/***/ }),
/***/ 9550:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.coreCSS = void 0;
exports.coreCSS = `:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row-hover.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}`;
/***/ }),
/***/ 8951:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._unregisterGridUsingThemingAPI = exports._registerGridUsingThemingAPI = exports._injectCoreAndModuleCSS = exports._injectGlobalCSS = exports.IS_SSR = void 0;
const moduleRegistry_1 = __webpack_require__(2132);
const Theme_1 = __webpack_require__(9621);
const core_css_GENERATED_1 = __webpack_require__(9550);
exports.IS_SSR = typeof window !== 'object' || !window?.document?.fonts?.forEach;
let injectionsByContainer = new WeakMap();
const _injectGlobalCSS = (css, styleContainer, debugId, layer, priority) => {
if (exports.IS_SSR)
return;
if (Theme_1.FORCE_LEGACY_THEMES)
return;
if (layer) {
css = `@layer ${CSS.escape(layer)} { ${css} }`;
}
let injections = injectionsByContainer.get(styleContainer);
if (!injections) {
injections = [];
injectionsByContainer.set(styleContainer, injections);
}
if (injections.find((i) => i.css === css))
return;
const el = document.createElement('style');
el.dataset.agGlobalCss = debugId;
el.textContent = css;
const newInjection = { css, el, priority };
let insertAfter;
for (const injection of injections) {
if (injection.priority > priority)
break;
insertAfter = injection;
}
if (insertAfter) {
insertAfter.el.insertAdjacentElement('afterend', el);
const index = injections.indexOf(insertAfter);
injections.splice(index + 1, 0, newInjection);
}
else {
styleContainer.insertBefore(el, styleContainer.querySelector(':not(title, meta)'));
injections.push(newInjection);
}
};
exports._injectGlobalCSS = _injectGlobalCSS;
const _injectCoreAndModuleCSS = (styleContainer, layer) => {
(0, exports._injectGlobalCSS)(core_css_GENERATED_1.coreCSS, styleContainer, 'core', layer, 0);
Array.from((0, moduleRegistry_1._getAllRegisteredModules)())
.sort((a, b) => a.moduleName.localeCompare(b.moduleName))
.forEach((module) => module.css?.forEach((css) => (0, exports._injectGlobalCSS)(css, styleContainer, `module-${module.moduleName}`, layer, 0)));
};
exports._injectCoreAndModuleCSS = _injectCoreAndModuleCSS;
const gridsUsingThemingAPI = new Set();
const _registerGridUsingThemingAPI = (environment) => {
gridsUsingThemingAPI.add(environment);
};
exports._registerGridUsingThemingAPI = _registerGridUsingThemingAPI;
const _unregisterGridUsingThemingAPI = (environment) => {
gridsUsingThemingAPI.delete(environment);
if (gridsUsingThemingAPI.size === 0) {
injectionsByContainer = new WeakMap();
for (const style of document.head.querySelectorAll('style[data-ag-global-css]')) {
style.remove();
}
}
};
exports._unregisterGridUsingThemingAPI = _unregisterGridUsingThemingAPI;
/***/ }),
/***/ 7753:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.buttonStyleBaseCSS = void 0;
exports.buttonStyleBaseCSS = `:where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}`;
/***/ }),
/***/ 2475:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.buttonStyleBalham = exports.buttonStyleAlpine = exports.buttonStyleQuartz = exports.buttonStyleBase = void 0;
const Part_1 = __webpack_require__(6607);
const theme_utils_1 = __webpack_require__(7845);
const button_style_base_css_GENERATED_1 = __webpack_require__(7753);
const baseParams = {
buttonTextColor: 'inherit',
buttonFontWeight: 'normal',
buttonBackgroundColor: 'transparent',
buttonBorder: false,
buttonBorderRadius: { ref: 'borderRadius' },
buttonHorizontalPadding: { calc: 'spacing * 2' },
buttonVerticalPadding: { ref: 'spacing' },
buttonHoverTextColor: { ref: 'buttonTextColor' },
buttonHoverBackgroundColor: { ref: 'buttonBackgroundColor' },
buttonHoverBorder: { ref: 'buttonBorder' },
buttonActiveTextColor: { ref: 'buttonHoverTextColor' },
buttonActiveBackgroundColor: { ref: 'buttonHoverBackgroundColor' },
buttonActiveBorder: { ref: 'buttonHoverBorder' },
buttonDisabledTextColor: { ref: 'inputDisabledTextColor' },
buttonDisabledBackgroundColor: { ref: 'inputDisabledBackgroundColor' },
buttonDisabledBorder: { ref: 'inputDisabledBorder' },
};
const makeButtonStyleBaseTreeShakeable = () => (0, Part_1.createPart)({
feature: 'buttonStyle',
params: baseParams,
css: button_style_base_css_GENERATED_1.buttonStyleBaseCSS,
});
exports.buttonStyleBase = makeButtonStyleBaseTreeShakeable();
const makeButtonStyleQuartzTreeShakeable = () => (0, Part_1.createPart)({
feature: 'buttonStyle',
params: {
...baseParams,
buttonBackgroundColor: theme_utils_1.backgroundColor,
buttonBorder: true,
buttonHoverBackgroundColor: { ref: 'rowHoverColor' },
buttonActiveBorder: { color: theme_utils_1.accentColor },
},
css: button_style_base_css_GENERATED_1.buttonStyleBaseCSS,
});
exports.buttonStyleQuartz = makeButtonStyleQuartzTreeShakeable();
const makeButtonStyleAlpineTreeShakeable = () => (0, Part_1.createPart)({
feature: 'buttonStyle',
params: {
...baseParams,
buttonBackgroundColor: theme_utils_1.backgroundColor,
buttonBorder: { color: theme_utils_1.accentColor },
buttonFontWeight: 600,
buttonTextColor: theme_utils_1.accentColor,
buttonHoverBackgroundColor: { ref: 'rowHoverColor' },
buttonActiveBackgroundColor: theme_utils_1.accentColor,
buttonActiveTextColor: theme_utils_1.backgroundColor,
},
css: button_style_base_css_GENERATED_1.buttonStyleBaseCSS,
});
exports.buttonStyleAlpine = makeButtonStyleAlpineTreeShakeable();
const makeButtonStyleBalhamTreeShakeable = () => (0, Part_1.createPart)({
feature: 'buttonStyle',
params: {
...baseParams,
buttonBorder: { color: theme_utils_1.foregroundColor, width: 2, style: 'outset' },
buttonActiveBorder: { color: theme_utils_1.foregroundColor, width: 2, style: 'inset' },
buttonBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.07),
buttonHoverBackgroundColor: theme_utils_1.backgroundColor,
buttonVerticalPadding: { calc: 'spacing * 0.5' },
},
css: button_style_base_css_GENERATED_1.buttonStyleBaseCSS,
});
exports.buttonStyleBalham = makeButtonStyleBalhamTreeShakeable();
/***/ }),
/***/ 3071:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkboxStyleDefaultCSS = void 0;
exports.checkboxStyleDefaultCSS = `.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}`;
/***/ }),
/***/ 8265:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkboxStyleDefault = void 0;
const Part_1 = __webpack_require__(6607);
const theme_utils_1 = __webpack_require__(7845);
const checkbox_style_default_css_GENERATED_1 = __webpack_require__(3071);
const makeCheckboxStyleDefaultTreeShakeable = () => (0, Part_1.createPart)({
feature: 'checkboxStyle',
params: {
checkboxBorderWidth: 1,
checkboxBorderRadius: {
ref: 'borderRadius',
},
checkboxUncheckedBackgroundColor: theme_utils_1.backgroundColor,
checkboxUncheckedBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.3),
checkboxCheckedBackgroundColor: theme_utils_1.accentColor,
checkboxCheckedBorderColor: { ref: 'checkboxCheckedBackgroundColor' },
checkboxCheckedShapeImage: {
svg: '',
},
checkboxCheckedShapeColor: theme_utils_1.backgroundColor,
checkboxIndeterminateBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.3),
checkboxIndeterminateBorderColor: { ref: 'checkboxIndeterminateBackgroundColor' },
checkboxIndeterminateShapeImage: {
svg: '',
},
checkboxIndeterminateShapeColor: theme_utils_1.backgroundColor,
radioCheckedShapeImage: {
svg: '',
},
},
css: checkbox_style_default_css_GENERATED_1.checkboxStyleDefaultCSS,
});
exports.checkboxStyleDefault = makeCheckboxStyleDefaultTreeShakeable();
/***/ }),
/***/ 8689:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.colorSchemeVariable = exports.colorSchemeDarkBlue = exports.colorSchemeDarkWarm = exports.colorSchemeDark = exports.colorSchemeLightCold = exports.colorSchemeLightWarm = exports.colorSchemeLight = void 0;
const Part_1 = __webpack_require__(6607);
const core_css_1 = __webpack_require__(405);
const theme_utils_1 = __webpack_require__(7845);
const makeColorSchemeLightTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: core_css_1.defaultLightColorSchemeParams,
});
exports.colorSchemeLight = makeColorSchemeLightTreeShakeable();
const makeColorSchemeLightWarmTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: {
...core_css_1.defaultLightColorSchemeParams,
foregroundColor: '#000000de',
borderColor: '#60300026',
chromeBackgroundColor: '#60300005',
},
});
exports.colorSchemeLightWarm = makeColorSchemeLightWarmTreeShakeable();
const makeColorSchemeLightColdTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: {
...core_css_1.defaultLightColorSchemeParams,
foregroundColor: '#000',
chromeBackgroundColor: '#f3f8f8',
},
});
exports.colorSchemeLightCold = makeColorSchemeLightColdTreeShakeable();
const darkParams = () => ({
...core_css_1.defaultLightColorSchemeParams,
backgroundColor: 'hsl(217, 0%, 17%)',
foregroundColor: '#FFF',
chromeBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.05),
rowHoverColor: (0, theme_utils_1.accentMix)(0.15),
selectedRowBackgroundColor: (0, theme_utils_1.accentMix)(0.2),
menuBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.1),
browserColorScheme: 'dark',
popupShadow: '0 0px 20px #000A',
cardShadow: '0 1px 4px 1px #000A',
advancedFilterBuilderJoinPillColor: '#7a3a37',
advancedFilterBuilderColumnPillColor: '#355f2d',
advancedFilterBuilderOptionPillColor: '#5a3168',
advancedFilterBuilderValuePillColor: '#374c86',
checkboxUncheckedBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.4),
toggleButtonOffBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.4),
});
const makeColorSchemeDarkTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: darkParams(),
});
exports.colorSchemeDark = makeColorSchemeDarkTreeShakeable();
const makeColorSchemeDarkWarmTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: {
backgroundColor: 'hsl(29, 10%, 17%)',
foregroundColor: '#FFF',
browserColorScheme: 'dark',
},
});
const darkBlueParams = () => ({
...darkParams(),
backgroundColor: '#1f2836',
});
exports.colorSchemeDarkWarm = makeColorSchemeDarkWarmTreeShakeable();
const makeColorSchemeDarkBlueTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: darkBlueParams(),
});
exports.colorSchemeDarkBlue = makeColorSchemeDarkBlueTreeShakeable();
const makeColorSchemeVariableTreeShakeable = () => (0, Part_1.createPart)({
feature: 'colorScheme',
params: core_css_1.defaultLightColorSchemeParams,
modeParams: {
light: core_css_1.defaultLightColorSchemeParams,
dark: darkParams(),
'dark-blue': darkBlueParams(),
},
});
exports.colorSchemeVariable = makeColorSchemeVariableTreeShakeable();
/***/ }),
/***/ 7941:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.columnDropStyleBorderedCSS = void 0;
exports.columnDropStyleBorderedCSS = `.ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}`;
/***/ }),
/***/ 5350:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.columnDropStylePlainCSS = void 0;
exports.columnDropStylePlainCSS = `.ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}`;
/***/ }),
/***/ 1697:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.columnDropStylePlain = exports.columnDropStyleBordered = void 0;
const Part_1 = __webpack_require__(6607);
const column_drop_style_bordered_css_GENERATED_1 = __webpack_require__(7941);
const column_drop_style_plain_css_GENERATED_1 = __webpack_require__(5350);
const makeColumnDropStyleBorderedTreeShakeable = () => {
return (0, Part_1.createPart)({
feature: 'columnDropStyle',
css: column_drop_style_bordered_css_GENERATED_1.columnDropStyleBorderedCSS,
});
};
exports.columnDropStyleBordered = makeColumnDropStyleBorderedTreeShakeable();
const makeColumnDropStylePlainTreeShakeable = () => {
return (0, Part_1.createPart)({
feature: 'columnDropStyle',
css: column_drop_style_plain_css_GENERATED_1.columnDropStylePlainCSS,
});
};
exports.columnDropStylePlain = makeColumnDropStylePlainTreeShakeable();
/***/ }),
/***/ 8897:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetAlpineCSS = void 0;
exports.iconSetAlpineCSS = `.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24 6H8v2l8 8-8 8v2h16v-2H11l8-8-8-8h13z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 11.171 2.687 16l4.828 4.829-1.414 1.414L-.142 16l6.243-6.243zm16.97 0 1.414-1.414L32.142 16l-6.243 6.243-1.414-1.414L29.313 16zM16.028 13.2l2.829 2.828-2.829 2.829-2.828-2.829zm-4.857 11.285L16 29.313l4.829-4.828 1.414 1.414L16 32.142l-6.243-6.243zm0-16.97L9.757 6.101 16-.142l6.243 6.243-1.414 1.414L16 2.687z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667A13.32 13.32 0 0 0 2.667 16c0 7.373 5.96 13.333 13.333 13.333S29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M14 7h4v18h-4zM8 17h4v8H8zM20 13h4v12h-4z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26 25H6V7h20zM12 11H8v12h4zm6 0h-4v12h4zm6 12V11h-4v12z' style='fill-rule:nonzero' transform='translate(0 -1)'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m12 6 10 10-10 10-2-2 8-8-8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.984 13.894 27.05 2.828l2.122 2.122-11.066 11.066 11.066 11.066-2.122 2.12-11.066-11.066L4.918 29.202l-2.12-2.12 11.066-11.066L2.798 4.95l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M13.775 15.198 3.835 2.945a1.501 1.501 0 0 1 2.33-1.89l14.997 18.488A6.003 6.003 0 0 1 29.657 25c0 3.311-2.688 6-6 6s-6-2.689-6-6c0-1.335.437-2.569 1.176-3.566l-3.127-3.855-3.001 3.7A5.97 5.97 0 0 1 14 25c0 3.311-2.689 6-6 6s-6-2.689-6-6a6.003 6.003 0 0 1 8.315-5.536zm9.882 6.702a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M8 21.95a3.05 3.05 0 1 0 .001 6.101A3.05 3.05 0 0 0 8 21.95m9.63-11.505 1.932 2.381 8.015-9.881a1.5 1.5 0 0 0-2.329-1.89z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 26 10 16 20 6l2 2-8 8 8 8z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M8.95 10.364 7 8.414 8.414 7l2.32 2.32A13.2 13.2 0 0 1 16.5 8c5.608 0 10.542 3.515 12.381 8.667L29 17l-.119.333a13 13 0 0 1-4.255 5.879l1.466 1.466-1.414 1.414-1.754-1.753A13.2 13.2 0 0 1 16.5 26c-5.608 0-10.542-3.515-12.381-8.667L4 17l.119-.333a13 13 0 0 1 4.83-6.303m1.445 1.445A11.02 11.02 0 0 0 6.148 17c1.646 4.177 5.728 7 10.352 7 1.76 0 3.441-.409 4.94-1.146l-1.878-1.878A5.06 5.06 0 0 1 16.5 22c-2.789 0-5.05-2.239-5.05-5 0-1.158.398-2.223 1.065-3.07zm1.855-.974 1.794 1.795A5.07 5.07 0 0 1 16.5 12c2.789 0 5.05 2.239 5.05 5 0 .9-.24 1.745-.661 2.474l2.305 2.306A11 11 0 0 0 26.852 17c-1.646-4.177-5.728-7-10.352-7-1.495 0-2.933.295-4.25.835'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16.5 23c4.624 0 8.706-2.823 10.352-7-1.646-4.177-5.728-7-10.352-7s-8.706 2.823-10.352 7c1.646 4.177 5.728 7 10.352 7M4.119 15.667C5.958 10.515 10.892 7 16.5 7s10.542 3.515 12.381 8.667L29 16l-.119.333C27.042 21.485 22.108 25 16.5 25S5.958 21.485 4.119 16.333L4 16zM16.5 21c2.789 0 5.049-2.239 5.049-5s-2.26-5-5.049-5-5.049 2.239-5.049 5 2.26 5 5.049 5' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m28 8-8 8v5l-6 6V16L6 8V6h22zM9 8l7 7v7l2-2v-5l7-7z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 7v1H9V7zm0-3v1H5.001V4zm-7 7H5v-1h2zm0-3H5V7h2zM3 5H1V4h2zm11 5v1H9v-1zm-7 4H5v-1h2zm7-1v1H9v-1z' style='fill-rule:nonzero' transform='matrix(2 0 0 2 0 -2)'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333a6.67 6.67 0 0 0-6.667 6.667 6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133 4.136 4.136 0 0 1-4.133 4.133h-5.333v2.533h5.333a6.67 6.67 0 0 0 6.667-6.667 6.67 6.67 0 0 0-6.667-6.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z' style='fill-rule:nonzero' transform='translate(-3.692 -3.692)scale(1.23077)'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14 30H2V18h2.828v7.05l8.254-8.252 2.12 2.12-8.252 8.254H14zm4-28h12v12h-2.828V6.95l-8.254 8.252-2.12-2.12 8.252-8.254H18z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M20 13H0v-2h20zm0-6H0V5h20zm0-6H0v-2h20z' style='fill-rule:nonzero' transform='translate(6 9)'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 19a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 11a3 3 0 1 0 0-6 3 3 0 0 0 0 6M16 27a3 3 0 1 0 0-6 3 3 0 0 0 0 6'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M2 18h12v12h-2.828v-7.05l-8.254 8.252-2.12-2.12 8.252-8.254H2zm28-4H18V2h2.828v7.05L29.082.798l2.12 2.12-8.252 8.254H30z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.94 6 9.06 7.88 17.167 16 9.06 24.12 10.94 26l10-10z' style='fill-rule:nonzero' transform='translate(1)'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cg fill='%23000' fill-rule='nonzero'%3E%3Cpath d='M23.708 14.645 16 6.939l-7.708 7.706 1.416 1.416L16 9.767l6.292 6.294zM23.708 20.355 16 28.061l-7.708-7.706 1.416-1.416L16 25.233l6.292-6.294z'/%3E%3C/g%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.334 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4M16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008a213 213 0 0 0-4.07-.022v4.034h4.07z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.94 7.88 20.06 6l-10 10 10 10 1.88-1.88L13.833 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M15.708 2.355 8 10.061.292 2.355 1.708.939 8 7.233 14.292.939z' style='fill-rule:nonzero' transform='translate(8 14)'/%3E%3Cpath d='M5 26h22v2H5zM15 4h2v18h-2z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 10.667 16 21.334l8.667-10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M21.333 7.334 10.666 16l10.667 8.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M10.667 24.666 21.334 16 10.667 7.333z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.334 21.333 16 10.666l8.667 10.667z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M11.586 22.96 27.718 6.828 29.84 8.95 11.586 27.202 2.4 18.016l2.12-2.122z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m11.94 6-1.88 1.88L18.167 16l-8.107 8.12L11.94 26l10-10z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6 13.5h20v3H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M24.12 9.06 16 17.167 7.88 9.06 6 10.94l10 10 10-10z' style='fill-rule:nonzero' transform='translate(0 1)'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333 5.332 16z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`;
/***/ }),
/***/ 9580:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetAlpine = void 0;
const Part_1 = __webpack_require__(6607);
const icon_set_alpine_css_GENERATED_1 = __webpack_require__(8897);
exports.iconSetAlpine = (0, Part_1.createPart)({
feature: 'iconSet',
css: icon_set_alpine_css_GENERATED_1.iconSetAlpineCSS,
});
/***/ }),
/***/ 3817:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetBalhamCSS = void 0;
exports.iconSetBalhamCSS = `.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M22 12h-2v-2h-8v.092c.056 1.352 3.426 2.598 4.472 4.404.682 1.174.438 2.754-.572 3.72C14.29 19.618 12 20.924 12 22h8v-2h2v4H10c0-1.586-.098-3.304 1.016-4.314 1.904-1.632 4.89-3.108 3.54-4.42-1.918-1.68-4.464-2.936-4.554-5.12L10 8h12z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='m6.414 17 2.294 2.292-1.416 1.416L2.586 16l4.706-4.708 1.416 1.416L6.414 15H15V6.414l-2.292 2.294-1.416-1.416L16 2.586l4.708 4.706-1.416 1.416L17 6.414V15h8.586l-2.294-2.292 1.416-1.416L29.414 16l-4.706 4.708-1.416-1.416L25.586 17H17v8.586l2.292-2.294 1.416 1.416L16 29.414l-4.708-4.706 1.416-1.416L15 25.586V17z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 4C9.378 4 4 9.378 4 16s5.378 12 12 12 12-5.378 12-12S22.622 4 16 4m0 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S6 21.52 6 16 10.48 6 16 6m0 8.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M14 25h-2V7h2zm6 0h-2V7h2zm6 0h-2V7h2zM8 25H6V7h2z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M21.929 27.999h-7.828a5.09 5.09 0 0 1-5.086-5.086v-9.812a5.087 5.087 0 0 1 5.086-5.086h7.828a5.09 5.09 0 0 1 5.086 5.086v9.812a5.087 5.087 0 0 1-5.086 5.086m.16-17.984h-8.088a2.94 2.94 0 0 0-2.938 2.938v10.132a2.94 2.94 0 0 0 2.938 2.938h8.088a2.94 2.94 0 0 0 2.936-2.938V12.953a2.94 2.94 0 0 0-2.936-2.938M7.041 26.013h-2.05a4 4 0 0 1-.006-.228V9.065a5.07 5.07 0 0 1 5.064-5.064h12.812q.069 0 .134.002v2.012H9.915a2.876 2.876 0 0 0-2.874 2.874z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 4 24 24'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m16 14.586 5.292-5.294 1.416 1.416L17.414 16l5.294 5.292-1.416 1.416L16 17.414l-5.292 5.294-1.416-1.416L14.586 16l-5.294-5.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M14.703 15.096 6.215 4.719a1 1 0 1 1 1.548-1.267l13.058 15.965A5.001 5.001 0 0 1 28 23.916a5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 4.98 4.98 0 0 1 1.23-3.283l-3.238-3.958-3.272 4.001a4.98 4.98 0 0 1 1.265 3.323 5 5 0 0 1-4.999 4.999 5 5 0 0 1-4.999-4.999 5 5 0 0 1 7.13-4.522zM8.991 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1M23 20.8a3.1 3.1 0 0 0-3.1 3.1c0 1.711 1.389 3.1 3.1 3.1s3.1-1.389 3.1-3.1-1.389-3.1-3.1-3.1m-5.723-8.852 1.292 1.579 7.205-8.808a1 1 0 0 0-1.548-1.267z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m17 21.379 4.292-4.294 1.416 1.416L16 25.207l-6.708-6.706 1.416-1.416L15 21.379V6.793h2z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M9.304 7.89a15.2 15.2 0 0 1 6.404-1.638c.294-.002.292-.002.584 0 5.956.174 11.328 4.088 13.62 9.748 0 0-1.318 3.178-3.224 5.174a13.6 13.6 0 0 1-2.226 1.874L26.414 25 25 26.414l-2.336-2.336C17.866 26.396 11.776 26.15 7.36 22.96a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.218 2.002-3.718a14.6 14.6 0 0 1 3.442-3.334L5.586 7 7 5.586zm-.3 2.528c-2.038 1.344-3.708 3.246-4.724 5.508L4.248 16c2.46 5.762 9.622 9.064 15.63 7.15q.688-.219 1.342-.516l-.912-.912a6.96 6.96 0 0 1-4.19 1.394c-3.862 0-7-3.136-7-7 0-1.57.52-3.022 1.394-4.19zm14.032 11.204a13.25 13.25 0 0 0 4.684-5.548l.032-.074c-1.984-4.646-6.834-7.798-12.006-7.748-1.712.05-3.386.458-4.922 1.158l1.102 1.102a6.97 6.97 0 0 1 4.192-1.396 7.003 7.003 0 0 1 5.606 11.192zm-11.09-8.262a5.003 5.003 0 0 0 6.928 6.928zm8.342 5.514a5.002 5.002 0 0 0-6.928-6.928z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16.292 6.32c5.956.174 11.328 4.086 13.62 9.746 0 0-1.318 3.18-3.224 5.176-4.862 5.088-13.534 5.97-19.328 1.784a14.9 14.9 0 0 1-4.168-4.612c-.41-.71-.694-1.336-1.104-2.348 0 0 .898-2.216 2.002-3.716 2.678-3.64 7.03-5.896 11.618-6.03.294-.004.292-.004.584 0m-.546 2c-4.896.142-9.458 3.202-11.466 7.672l-.032.074c2.46 5.762 9.622 9.066 15.63 7.152 3.458-1.102 6.342-3.738 7.842-7.076l.032-.076C25.768 11.42 20.918 8.27 15.746 8.32m.254.946c3.754 0 6.8 3.048 6.8 6.8 0 3.754-3.046 6.8-6.8 6.8s-6.8-3.046-6.8-6.8c0-3.752 3.046-6.8 6.8-6.8m5 6.768V16c0-2.76-2.24-5-5-5s-5 2.24-5 5v.066c0 2.76 2.24 5 5 5s5-2.24 5-5z'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M26 8.184c-.066 2.658-4.058 5.154-6.742 7.974a1.05 1.05 0 0 0-.258.682v3.66L13 25c0-2.74.066-5.482-.002-8.222a1.05 1.05 0 0 0-.256-.62C10.026 13.304 6.06 10.61 6 8.184V6h20zM8 8c0 .304.06.612.258.842 2.716 2.854 6.682 5.548 6.742 7.974V21l2-1.5v-2.684c.066-2.658 4.058-5.154 6.742-7.974.198-.23.258-.538.258-.842z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.354 8.708 17.06 16l7.294 7.292-1.416 1.416L14.232 16l8.706-8.708zM9.646 8v16h-2V8z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0M7.006 4c-1.57.02-2.946 1.348-3.004 2.922-.078 6.078-.23 12.16.002 18.234.094 1.484 1.354 2.746 2.84 2.84 6.1.232 12.212.232 18.312 0 1.48-.094 2.746-1.35 2.84-2.84.232-6.1.232-12.212 0-18.312-.094-1.48-1.35-2.746-2.84-2.84C19.11 3.774 13.056 4 7.006 4M14 21h-4v-2h4zm12 0H16v-2h10zm-12-4h-4v-2h4zm12 0H16v-2h10zm-16-4H6v-2h4zm16 0H12v-2h14z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m17.768 16-8.706 8.708-1.416-1.416L14.94 16 7.646 8.708l1.416-1.416zm6.586 8h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='m17.621 11-2 2h12.586v6H15.621l2 2-4.414 4.414L3.793 16l9.414-9.414zm-11 5 6.586 6.586L14.793 21l-4-4h15.414v-2H10.793l4-4-1.586-1.586z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M17.138 13.418a1.03 1.03 0 0 0-.298.658s.125.096.226.178c1.372 1.114 2.033 3.039 1.582 4.796a4.7 4.7 0 0 1-1.205 2.123c-1.145 1.151-2.296 2.294-3.445 3.441-1.241 1.232-3.185 1.691-4.864 1.105-1.546-.54-2.756-1.938-3.048-3.572-.267-1.496.246-3.108 1.319-4.186l.578-.578-.03-.092a10.5 10.5 0 0 1-.452-2.3v-.005c-.776.775-1.621 1.489-2.275 2.396-1.817 2.522-1.643 6.323.706 8.669 1.813 1.811 4.708 2.462 7.171 1.517a6.75 6.75 0 0 0 2.336-1.518l3.427-3.424c1.939-1.954 2.533-5.126 1.294-7.674a6.8 6.8 0 0 0-2.071-2.481l-.003-.002zM21.265 4a6.8 6.8 0 0 0-4.734 1.964l-3.427 3.424c-1.961 1.977-2.52 5.092-1.32 7.619a6.8 6.8 0 0 0 2.098 2.537l.003.002c.32-.32.643-.637.96-.96.167-.172.27-.401.286-.64l-.204-.167c-1.603-1.287-2.215-3.68-1.316-5.616a4.7 4.7 0 0 1 .918-1.32c1.145-1.151 2.296-2.294 3.445-3.441 1.239-1.23 3.178-1.694 4.864-1.105 1.83.639 3.16 2.498 3.12 4.493a4.8 4.8 0 0 1-1.391 3.265l-.578.578.03.092c.235.743.387 1.519.452 2.3v.005c.732-.731 1.521-1.406 2.162-2.244 1.192-1.559 1.643-3.651 1.204-5.575a6.8 6.8 0 0 0-3.98-4.703 6.8 6.8 0 0 0-2.529-.506h-.061z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='M17 29h-2v-8h2zm-3.586-9L7 26.414 5.586 25 12 18.586zm13 5L25 26.414 18.586 20 20 18.586zM29 17h-8v-2h8zm-18 0H3v-2h8zm2.414-5L12 13.414 5.586 7 7 5.586zm13-5L20 13.414 18.586 12 25 5.586zM17 11h-2V3h2z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='m7.54 17.4.1 6.98 6.96.1-2.24-2.24L16 18.6 13.4 16l-3.64 3.64zm16.92-2.8-.1-6.98-6.96-.1 2.24 2.24L16 13.4l2.6 2.6 3.64-3.64z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M26 23H6v-2h20zm0-6H6v-2h20zm0-6H6V9h20z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath fill='%23000' d='M16 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0-7a2 2 0 1 0 0-4 2 2 0 0 0 0 4m0 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='3 3 26 26'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='m14.8 24.26-.1-6.96-6.96-.1 2.24 2.24-3.64 3.64 2.6 2.6 3.64-3.64zm2.4-16.52.1 6.96 6.96.1-2.24-2.24 3.64-3.64-2.6-2.6-3.64 3.64z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142m-1.414 6.07h16.97v2.002H7.515z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='m10.044 21.258 4.478-4.198L16 18.444 9 25l-7-6.556 1.478-1.384 4.478 4.198V7h2.088zm14 3.742h-2.088V10.742l-4.478 4.198L16 13.556 23 7q3.5 3.28 7 6.556l-1.478 1.384-4.478-4.198z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16.186 3.646c8.188.154 14.898 9.796 11.17 17.78-3.298 7.066-13.932 9.374-19.848 3.87-3.9-3.632-5.076-9.896-2.684-14.708 2.082-4.19 6.588-6.974 11.362-6.942m-.298 1.998c-6.922.132-12.578 8.308-9.33 15.052 3.342 6.934 15.246 7.646 18.932 0 3.076-6.386-1.988-15.1-9.602-15.052m7.596 6.422c2.864 5.33-1.744 13.186-8.306 12.536a8.6 8.6 0 0 1-3.232-.998l-1.266-.706L22.778 10.8q.351.633.706 1.266m-9.422 10.276c3.296 1.028 7.246-1.006 8.216-4.418a6.6 6.6 0 0 0-.056-3.742zm2.104-14.696a8.8 8.8 0 0 1 3.936 1.038l1.266.706L9.27 21.488c-3.018-5.41-.99-13.37 6.318-13.834q.289-.01.578-.008m-.31 2c-4.06.154-7.23 4.614-6.03 8.46l8.16-8.16a6.8 6.8 0 0 0-2.13-.3'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M20 6.5c0-1-1-3-4-3s-4 2-4 3H8c-2.21 0-4 1.79-4 4v14c0 2.21 1.79 4 4 4h16c2.21 0 4-1.79 4-4v-14c0-2.21-1.79-4-4-4zm-4 .546c.734 0 1.334.572 1.334 1.272S16.734 9.59 16 9.59s-1.334-.572-1.334-1.272.6-1.272 1.334-1.272M24 26.5H8a2 2 0 0 1-2-2v-14a2 2 0 0 1 2-2h2v4h12v-4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m10.78 19.777-4.668-4.666s.032-1 .67-1.87c1.366-1.86 4.052-1.96 6.056-1.572l3.158-3.108c-.7-2.342 3.352-5.046 3.352-5.046l9.166 9.168q-.334.447-.67.894c-1.074 1.426-2.538 2.63-4.272 2.338l-3.32 3.218c.046.344.042.03.118 1.152.144 2.13-.64 4.324-2.632 5.34l-.746.364-4.798-4.798-7.292 7.294-1.416-1.416zm8.24-13.672c-.688.568-1.416 1.45-1.024 2.072l.49.722-4.986 4.988c-1.988-.506-4.346-.636-5.156.614l9.02 9.032q.14-.099.272-.21c1.226-1.08.764-3.04.498-4.9l4.79-4.79s1.47.938 2.936-.776l-6.79-6.79q-.026.019-.05.038'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M25.128 2.002c2.56.096 4.772 2.292 4.87 4.87a712 712 0 0 1 0 18.256c-.096 2.56-2.292 4.772-4.87 4.87a712 712 0 0 1-18.256 0c-2.558-.096-4.772-2.29-4.87-4.87a712 712 0 0 1 0-18.256c.096-2.56 2.292-4.772 4.87-4.87a712 712 0 0 1 18.256 0m2.966 7.954H9.892v18.136c5.086.13 10.18.098 15.264-.096 1.48-.094 2.746-1.35 2.84-2.84.192-5.064.226-10.134.098-15.2M3.968 24.1q.015.528.036 1.056c.094 1.484 1.354 2.746 2.84 2.84l1.012.036V24.1zM22 15.414l-.292.294-1.416-1.416L23 11.586l2.708 2.706-1.416 1.416-.292-.294v3.592c-.032 2.604-2.246 4.892-4.872 4.992L15.414 24l.294.292-1.416 1.416L11.586 23l2.706-2.708 1.416 1.416-.322.32c3.372.03 6.578-.164 6.614-3.034zM3.88 18.038c.002 1.346.012 2.694.038 4.04h3.938v-4.04zm.05-6.062a681 681 0 0 0-.044 4.042h3.97v-4.042zm5.962-7.99Q8.449 3.999 7.006 4c-1.57.02-2.946 1.348-3.004 2.922q-.02 1.517-.042 3.034h3.896v-2.02h2.036zm14.244-.016v3.966h3.898q-.017-.546-.038-1.092c-.094-1.48-1.35-2.746-2.84-2.84q-.51-.019-1.02-.034m-8.14-.054q-2.035.022-4.07.048v3.972h4.07zm6.106.008c-1.358-.022-2.714-.026-4.07-.022v4.034h4.07z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M7.515 7.515c-4.683 4.682-4.683 12.288 0 16.97 4.682 4.683 12.288 4.683 16.97 0 4.683-4.682 4.683-12.288 0-16.97-4.682-4.683-12.288-4.683-16.97 0m1.414 1.414c3.903-3.903 10.239-3.903 14.142 0s3.903 10.239 0 14.142-10.239 3.903-14.142 0-3.903-10.239 0-14.142M15 15l-.001-7.485h2.002L17 15l7.485-.001v2.002L17 17l.001 7.485h-2.002L15 17l-7.485.001v-2.002z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m28.207 16-9.414 9.414L14.379 21l2-2H3.793v-6h12.586l-2-2 4.414-4.414zm-11-5 4 4H5.793v2h15.414l-4 4 1.586 1.586L25.379 16l-6.586-6.586z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M21.061 8.708 13.767 16l7.294 7.292-1.416 1.416L10.939 16l8.706-8.708z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='m24.708 19.645-1.416 1.416L16 13.767l-7.292 7.294-1.416-1.416L16 10.939z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='M24.708 10.855 13 22.561l-5.708-5.706 1.416-1.416L13 19.733 23.292 9.439z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m21.061 16-8.706 8.708-1.416-1.416L18.233 16l-7.294-7.292 1.416-1.416z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6 15h20v2H6z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M24.708 12.355 16 21.061l-8.708-8.706 1.416-1.416L16 18.233l7.292-7.294z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M5.35 3.999a.2.2 0 0 0-.14.058c-.388.38-.768.768-1.152 1.152a.21.21 0 0 0-.002.288c7.459 7.506 14.965 14.965 22.447 22.447a.21.21 0 0 0 .288.002q.576-.574 1.151-1.151a.21.21 0 0 0 .002-.288C20.484 19.002 12.979 11.542 5.497 4.06a.2.2 0 0 0-.146-.061zm.611 12.548c-1.933 1.939-2.538 5.119-1.289 7.688a6.79 6.79 0 0 0 4.891 3.672 6.82 6.82 0 0 0 5.893-1.866l1.984-1.984-1.438-1.438-1.986 1.986c-1.486 1.476-3.993 1.81-5.834.629a4.73 4.73 0 0 1-2.024-2.853 4.76 4.76 0 0 1 1.241-4.393l1.986-1.986-1.438-1.438-1.984 1.984zM21.273 3.999a6.78 6.78 0 0 0-4.727 1.963l-1.984 1.984L16 9.384l1.985-1.985a4.74 4.74 0 0 1 2.776-1.338c1.974-.224 4.045.926 4.845 2.834.712 1.699.329 3.778-1.004 5.12L22.616 16l1.439 1.438q1-1 2-2c2.012-2.031 2.557-5.368 1.112-7.982-1.144-2.07-3.432-3.441-5.834-3.459h-.061z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m15 10.621-4.292 4.294-1.416-1.416L16 6.793l6.708 6.706-1.416 1.416L17 10.621v14.586h-2z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M8 24H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 18H6v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zm6 0h-2v-4h2zM8 12H6V8h2zm6 0h-2V8h2zm6 0h-2V8h2zm6 0h-2V8h2z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`;
/***/ }),
/***/ 5572:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetBalham = void 0;
const Part_1 = __webpack_require__(6607);
const icon_set_balham_css_GENERATED_1 = __webpack_require__(3817);
exports.iconSetBalham = (0, Part_1.createPart)({
feature: 'iconSet',
css: icon_set_balham_css_GENERATED_1.iconSetBalhamCSS,
});
/***/ }),
/***/ 6407:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetQuartzRegular = exports.iconSetQuartzLight = exports.iconSetQuartzBold = exports.iconSetQuartz = exports.iconOverrides = exports.iconSetMaterial = exports.iconSetAlpine = void 0;
var icon_set_alpine_1 = __webpack_require__(9580);
Object.defineProperty(exports, "iconSetAlpine", ({ enumerable: true, get: function () { return icon_set_alpine_1.iconSetAlpine; } }));
var icon_set_material_1 = __webpack_require__(8900);
Object.defineProperty(exports, "iconSetMaterial", ({ enumerable: true, get: function () { return icon_set_material_1.iconSetMaterial; } }));
var icon_overrides_1 = __webpack_require__(5867);
Object.defineProperty(exports, "iconOverrides", ({ enumerable: true, get: function () { return icon_overrides_1.iconOverrides; } }));
var icon_set_quartz_1 = __webpack_require__(3692);
Object.defineProperty(exports, "iconSetQuartz", ({ enumerable: true, get: function () { return icon_set_quartz_1.iconSetQuartz; } }));
Object.defineProperty(exports, "iconSetQuartzBold", ({ enumerable: true, get: function () { return icon_set_quartz_1.iconSetQuartzBold; } }));
Object.defineProperty(exports, "iconSetQuartzLight", ({ enumerable: true, get: function () { return icon_set_quartz_1.iconSetQuartzLight; } }));
Object.defineProperty(exports, "iconSetQuartzRegular", ({ enumerable: true, get: function () { return icon_set_quartz_1.iconSetQuartzRegular; } }));
/***/ }),
/***/ 7545:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetMaterialCSS = void 0;
exports.iconSetMaterialCSS = `.ag-icon-aggregation:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eaggregation%3C/title%3E%3Cpath d='M24 5.333H8V8l8.667 8L8 24v2.667h16v-4h-9.333L21.334 16l-6.667-6.667H24z'/%3E%3C/svg%3E")}.ag-icon-arrows:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Earrows%3C/title%3E%3Cpath d='M13.333 11.556h5.333V8h3.556L16 1.778 9.778 8h3.556zm-1.777 1.777H8V9.777l-6.222 6.222L8 22.221v-3.556h3.556zM30.222 16 24 9.778v3.556h-3.556v5.333H24v3.556l6.222-6.222zm-11.555 4.444h-5.333V24H9.778L16 30.222 22.222 24h-3.556z'/%3E%3C/svg%3E")}.ag-icon-asc:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-cancel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecancel%3C/title%3E%3Cpath d='M16 2.667C8.627 2.667 2.667 8.627 2.667 16S8.627 29.333 16 29.333 29.333 23.373 29.333 16 23.373 2.667 16 2.667m6.667 18.12-1.88 1.88L16 17.88l-4.787 4.787-1.88-1.88L14.12 16l-4.787-4.787 1.88-1.88L16 14.12l4.787-4.787 1.88 1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-chart:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Echart%3C/title%3E%3Cpath d='M6.667 12.267h4v13.067h-4zm7.466-5.6h3.733v18.667h-3.733zM21.6 17.333h3.733v8H21.6z'/%3E%3C/svg%3E")}.ag-icon-color-picker:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolor-picker%3C/title%3E%3Cpath d='M23.907 17.587 10.574 4.254l-1.88 1.88 3.173 3.173-8.28 8.28 10.16 10.16zm-16.547 0 6.387-6.387 6.387 6.387H7.361zm18.387 2s-2.667 2.893-2.667 4.667c0 1.467 1.2 2.667 2.667 2.667s2.667-1.2 2.667-2.667c0-1.773-2.667-4.667-2.667-4.667'/%3E%3C/svg%3E")}.ag-icon-columns:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecolumns%3C/title%3E%3Cpath d='M5.333 10.667h5.333V5.334H5.333zm8 16h5.333v-5.333h-5.333zm-8 0h5.333v-5.333H5.333zm0-8h5.333v-5.333H5.333zm8 0h5.333v-5.333h-5.333zm8-13.334v5.333h5.333V5.333zm-8 5.334h5.333V5.334h-5.333zm8 8h5.333v-5.333h-5.333zm0 8h5.333v-5.333h-5.333z'/%3E%3C/svg%3E")}.ag-icon-contracted:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Econtracted%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-copy:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecopy%3C/title%3E%3Cpath d='M22 1.333H6A2.675 2.675 0 0 0 3.333 4v18.667H6V4h16zm4 5.334H11.333a2.675 2.675 0 0 0-2.667 2.667v18.667c0 1.467 1.2 2.667 2.667 2.667H26c1.467 0 2.667-1.2 2.667-2.667V9.334c0-1.467-1.2-2.667-2.667-2.667M26 28H11.333V9.333H26z'/%3E%3C/svg%3E")}.ag-icon-cross:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Ecross%3C/title%3E%3Cpath d='m25.333 8.547-1.88-1.88L16 14.12 8.547 6.667l-1.88 1.88L14.12 16l-7.453 7.453 1.88 1.88L16 17.88l7.453 7.453 1.88-1.88L17.88 16z'/%3E%3C/svg%3E")}.ag-icon-csv:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='M.688-.226a.2.2 0 0 1-.017.074.28.28 0 0 1-.145.14.412.412 0 0 1-.234.013.28.28 0 0 1-.202-.168.468.468 0 0 1-.04-.19q0-.086.025-.155a.319.319 0 0 1 .182-.191.4.4 0 0 1 .134-.025q.087 0 .155.035a.3.3 0 0 1 .104.085.17.17 0 0 1 .036.097.06.06 0 0 1-.018.044.06.06 0 0 1-.042.019.06.06 0 0 1-.042-.013.2.2 0 0 1-.031-.046.2.2 0 0 0-.066-.079.16.16 0 0 0-.095-.027.17.17 0 0 0-.142.068.3.3 0 0 0-.053.193.4.4 0 0 0 .023.139.2.2 0 0 0 .067.083.2.2 0 0 0 .1.027q.063 0 .106-.031a.2.2 0 0 0 .065-.091.2.2 0 0 1 .023-.046q.014-.018.044-.018a.06.06 0 0 1 .044.018.06.06 0 0 1 .019.045' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 7.122 25.977)'/%3E%3Cpath d='M.622-.215a.2.2 0 0 1-.033.117.23.23 0 0 1-.098.081.4.4 0 0 1-.153.029.34.34 0 0 1-.175-.04.23.23 0 0 1-.079-.077.17.17 0 0 1-.031-.093q0-.027.019-.045a.06.06 0 0 1 .046-.019.06.06 0 0 1 .039.014.1.1 0 0 1 .027.044.3.3 0 0 0 .03.057q.015.023.044.038.03.015.076.015.065 0 .105-.03a.09.09 0 0 0 .04-.075.08.08 0 0 0-.022-.058.14.14 0 0 0-.056-.034 1 1 0 0 0-.092-.025.7.7 0 0 1-.129-.042.2.2 0 0 1-.083-.066.17.17 0 0 1-.03-.104q0-.058.032-.105a.2.2 0 0 1 .093-.07.4.4 0 0 1 .144-.025q.066 0 .114.016a.3.3 0 0 1 .08.044.2.2 0 0 1 .046.057q.015.03.015.058a.07.07 0 0 1-.018.046.06.06 0 0 1-.046.021q-.025 0-.038-.012a.2.2 0 0 1-.028-.041.2.2 0 0 0-.047-.063Q.387-.625.326-.625a.15.15 0 0 0-.09.025q-.035.024-.035.059 0 .021.012.037a.1.1 0 0 0 .032.027.4.4 0 0 0 .111.036q.06.015.11.031.048.018.083.042a.2.2 0 0 1 .054.062.2.2 0 0 1 .019.091' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 13.339 25.977)'/%3E%3Cpath d='m.184-.633.162.48.163-.483q.013-.038.019-.053a.062.062 0 0 1 .061-.039q.018 0 .034.009a.1.1 0 0 1 .025.025q.009.015.009.031L.654-.64l-.007.025-.009.024-.173.468-.019.051a.2.2 0 0 1-.021.042.1.1 0 0 1-.033.03.1.1 0 0 1-.049.012.1.1 0 0 1-.05-.011A.1.1 0 0 1 .26-.03a.2.2 0 0 1-.021-.042L.22-.123.05-.587.041-.612.033-.638.03-.662q0-.025.02-.046a.07.07 0 0 1 .05-.02q.037 0 .053.023.015.023.031.072' style='fill-rule:nonzero' transform='matrix(8.39799 0 0 12.455 18.94 25.977)'/%3E%3C/svg%3E")}.ag-icon-cut:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='m19 3-6 6 2 2 7-7V3m-10 9.5a.503.503 0 0 1-.5-.5c0-.274.226-.5.5-.5s.5.226.5.5-.226.5-.5.5M6 20c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2M6 8c-1.097 0-2-.903-2-2a2 2 0 0 1 2-2c1.097 0 2 .903 2 2a2 2 0 0 1-2 2m3.64-.36c.23-.5.36-1.05.36-1.64 0-2.194-1.806-4-4-4S2 3.806 2 6s1.806 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.194 0-4 1.806-4 4s1.806 4 4 4 4-1.806 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1z' style='fill-rule:nonzero' transform='translate(4 4)'/%3E%3C/svg%3E")}.ag-icon-desc:before,.ag-icon-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Edesc%3C/title%3E%3Cpath d='m26.667 16-1.88-1.88-7.453 7.44V5.333h-2.667V21.56l-7.44-7.453L5.334 16l10.667 10.667L26.668 16z'/%3E%3C/svg%3E")}.ag-icon-excel:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M384 131.9c-7.753-8.433-110.425-128.473-114.9-133L48-.1C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48zm-35.9 2.1H257V27.9zM30 479V27h200l1 105c0 13.3-1.3 29 12 29h111l1 318z' style='fill-rule:nonzero' transform='matrix(.06285 0 0 .06285 3.934 -.054)'/%3E%3Cpath d='m.052-.139.16-.234-.135-.208a.4.4 0 0 1-.028-.052.1.1 0 0 1-.01-.042.05.05 0 0 1 .018-.037.07.07 0 0 1 .045-.016q.03 0 .047.018a1 1 0 0 1 .047.066l.107.174.115-.174.024-.038.019-.026.021-.015a.1.1 0 0 1 .027-.005.06.06 0 0 1 .044.016.05.05 0 0 1 .018.039q0 .033-.038.089l-.141.211.152.234a.3.3 0 0 1 .03.051.1.1 0 0 1 .009.038.1.1 0 0 1-.008.031.1.1 0 0 1-.024.023.1.1 0 0 1-.034.008.1.1 0 0 1-.035-.008.1.1 0 0 1-.023-.022L.427-.067.301-.265l-.134.204-.022.034-.016.019a.1.1 0 0 1-.022.015.1.1 0 0 1-.03.005.06.06 0 0 1-.044-.016.06.06 0 0 1-.017-.047q0-.036.036-.088' style='fill-rule:nonzero' transform='matrix(17.82892 0 0 16.50777 10.371 25.928)'/%3E%3C/svg%3E")}.ag-icon-expanded:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eexpanded%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-eye-slash:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye-slash%3C/title%3E%3Cpath d='M21.106 15.088A5.19 5.19 0 0 0 16 10.814a5.17 5.17 0 0 0-3.668 1.522L9.866 9.868a12.2 12.2 0 0 1 6.133-1.646c5.186 0 9.614 3.225 11.408 7.778a12.34 12.34 0 0 1-5.276 6.133l-2.468-2.466a5.17 5.17 0 0 0 1.449-2.802h-2.123c-.148.508-.42.964-.782 1.33l-1.33-1.33h-2.514l2.196 2.196q-.272.049-.56.05a3.11 3.11 0 0 1-2.99-2.245h-2.123a5.19 5.19 0 0 0 7.3 3.836l2.247 2.247a12.2 12.2 0 0 1-4.434.828c-5.186 0-9.614-3.225-11.408-7.778a12.3 12.3 0 0 1 3.781-5.111l2.924 2.924a5.1 5.1 0 0 0-.404 1.275h4.206l-1.296-1.296a3.1 3.1 0 0 1 2.196-.903c1.404 0 2.587.924 2.976 2.199h2.13z'/%3E%3C/svg%3E")}.ag-icon-eye:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath d='M16 8.222c-5.186 0-9.614 3.225-11.408 7.778 1.794 4.553 6.222 7.778 11.408 7.778S25.614 20.553 27.408 16C25.614 11.447 21.186 8.222 16 8.222m0 12.964c-2.862 0-5.186-2.324-5.186-5.186s2.324-5.186 5.186-5.186 5.186 2.324 5.186 5.186-2.324 5.186-5.186 5.186m0-8.297c-1.721 0-3.111 1.39-3.111 3.111s1.39 3.111 3.111 3.111 3.111-1.39 3.111-3.111-1.39-3.111-3.111-3.111'/%3E%3C/svg%3E")}.ag-icon-filter:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efilter%3C/title%3E%3Cpath d='M13.333 24h5.333v-2.667h-5.333zM4 8v2.667h24V8zm4 9.333h16v-2.667H8z'/%3E%3C/svg%3E")}.ag-icon-first:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Efirst%3C/title%3E%3Cpath d='M24.273 22.12 18.153 16l6.12-6.12L22.393 8l-8 8 8 8zM7.727 8h2.667v16H7.727z'/%3E%3C/svg%3E")}.ag-icon-group:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egroup%3C/title%3E%3Cpath d='M18.667 21.333h8.889A3.555 3.555 0 0 1 24 24.889h-5.333zm8.888-7.111v3.556h-8.889v-3.556zM24 7.111a3.555 3.555 0 0 1 3.556 3.556h-16V7.111zm-8.889 17.778h-3.556v-3.556h3.556zm0-7.111h-3.556v-3.556h3.556zM8 10.667H4.444A3.555 3.555 0 0 1 8 7.111z'/%3E%3C/svg%3E")}.ag-icon-last:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elast%3C/title%3E%3Cpath d='m7.727 9.88 6.12 6.12-6.12 6.12L9.607 24l8-8-8-8zM21.607 8h2.667v16h-2.667z'/%3E%3C/svg%3E")}.ag-icon-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eleft%3C/title%3E%3Cpath d='M26.667 14.667H10.44l7.453-7.453L16 5.334 5.333 16.001 16 26.668l1.88-1.88-7.44-7.453h16.227v-2.667z'/%3E%3C/svg%3E")}.ag-icon-linked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Elinked%3C/title%3E%3Cpath d='M5.2 16a4.136 4.136 0 0 1 4.133-4.133h5.333V9.334H9.333c-3.68 0-6.667 2.987-6.667 6.667s2.987 6.667 6.667 6.667h5.333v-2.533H9.333A4.136 4.136 0 0 1 5.2 16.002zm5.467 1.333h10.667v-2.667H10.667zm12-8h-5.333v2.533h5.333c2.28 0 4.133 1.853 4.133 4.133s-1.853 4.133-4.133 4.133h-5.333v2.533h5.333c3.68 0 6.667-2.987 6.667-6.667s-2.987-6.667-6.667-6.667z'/%3E%3C/svg%3E")}.ag-icon-loading:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eloading%3C/title%3E%3Cpath d='m17.778 11.708 3.25-3.251 2.516 2.516-3.251 3.25h4.597v3.556h-4.597l3.251 3.25-2.516 2.516-3.25-3.251v4.597h-3.556v-4.597l-3.25 3.251-2.516-2.516 3.251-3.25H7.11v-3.556h4.597l-3.251-3.25 2.516-2.516 3.25 3.251V7.111h3.556zm-3.251 7.847h2.944l2.084-2.084v-2.944l-2.084-2.084h-2.944l-2.084 2.084v2.944z'/%3E%3C/svg%3E")}.ag-icon-maximize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emaximize%3C/title%3E%3Cpath d='M4 4h24v2.667H4z'/%3E%3C/svg%3E")}.ag-icon-menu:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Emenu%3C/title%3E%3Cpath d='M4 24h24v-2.667H4zm0-6.667h24v-2.667H4zM4 8v2.667h24V8z'/%3E%3C/svg%3E")}.ag-icon-menu-alt:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M16 26.667a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 24q0-1.1.784-1.883A2.57 2.57 0 0 1 16 21.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 16q0-1.1.784-1.883A2.57 2.57 0 0 1 16 13.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784m0-8a2.57 2.57 0 0 1-1.883-.784A2.57 2.57 0 0 1 13.333 8q0-1.1.784-1.883A2.57 2.57 0 0 1 16 5.333q1.1 0 1.883.784.784.783.784 1.883t-.784 1.883a2.57 2.57 0 0 1-1.883.784'/%3E%3C/svg%3E")}.ag-icon-minimize:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eminimize%3C/title%3E%3Cpath d='M8 25.333h16V28H8z'/%3E%3C/svg%3E")}.ag-icon-minus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658H7.901v-2.658z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-next:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enext%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-none:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enone%3C/title%3E%3Cpath d='M4 24h16v-2.667H4zM4 8v2.667h24V8zm0 9.333h24v-2.667H4z'/%3E%3C/svg%3E")}.ag-icon-not-allowed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Enot-allowed%3C/title%3E%3Cpath d='M16 2.667C8.64 2.667 2.667 8.64 2.667 16S8.64 29.333 16 29.333 29.333 23.36 29.333 16 23.36 2.667 16 2.667M5.333 16c0-5.893 4.773-10.667 10.667-10.667 2.467 0 4.733.84 6.533 2.253L7.586 22.533A10.54 10.54 0 0 1 5.333 16M16 26.667c-2.467 0-4.733-.84-6.533-2.253L24.414 9.467A10.54 10.54 0 0 1 26.667 16c0 5.893-4.773 10.667-10.667 10.667'/%3E%3C/svg%3E")}.ag-icon-paste:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epaste%3C/title%3E%3Cpath d='M25.333 4H19.76C19.2 2.453 17.733 1.333 16 1.333S12.8 2.453 12.24 4H6.667A2.675 2.675 0 0 0 4 6.667V28c0 1.467 1.2 2.667 2.667 2.667h18.667c1.467 0 2.667-1.2 2.667-2.667V6.667C28.001 5.2 26.801 4 25.334 4zM16 4c.733 0 1.333.6 1.333 1.333s-.6 1.333-1.333 1.333-1.333-.6-1.333-1.333S15.267 4 16 4m9.333 24H6.666V6.667h2.667v4h13.333v-4h2.667z'/%3E%3C/svg%3E")}.ag-icon-pin:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epin%3C/title%3E%3Cpath d='m11.106 22.093-4.444 4.444-1.259-1.259 4.444-4.444zm5.872-16.63 9.618 9.62-.962.962-.962-.962-7.694 3.847 1.924 1.924-2.74 2.74-7.696-7.696 2.741-2.74 1.924 1.925 3.847-7.696-.962-.962z'/%3E%3C/svg%3E")}.ag-icon-pivot:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Epivot%3C/title%3E%3Cpath d='M26.667 30.223H5.334a3.556 3.556 0 0 1-3.556-3.556V5.334a3.556 3.556 0 0 1 3.556-3.556h21.333a3.556 3.556 0 0 1 3.556 3.556v21.333a3.556 3.556 0 0 1-3.556 3.556m-16-8.89H5.334v5.333h5.333zm16-7.11H12.444v12.444h14.223zm-9.15 6.85-2.039 2.037 2.039 2.039-1.257 1.257-3.295-3.296 3.295-3.295q.63.628 1.257 1.257zm-6.85-6.85H5.334v5.333h5.333zm15.74 3.816-1.257 1.256-2.039-2.037-2.037 2.037-1.257-1.256 3.295-3.296zM10.667 5.333H5.334v5.333h5.333zm8.889 0h-7.112v5.333h7.112zm7.111 0h-5.333v5.333h5.333z'/%3E%3C/svg%3E")}.ag-icon-plus:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 32 32'%3E%3Cpath d='M6.572 6.572a13.32 13.32 0 0 0 0 18.856 13.32 13.32 0 0 0 18.856 0 13.32 13.32 0 0 0 0-18.856 13.32 13.32 0 0 0-18.856 0m17.527 8.099v2.658h-6.77v6.77h-2.658v-6.77h-6.77v-2.658h6.77v-6.77h2.658v6.77z' style='fill-rule:nonzero'/%3E%3C/svg%3E")}.ag-icon-previous:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eprevious%3C/title%3E%3Cpath d='M20.94 9.88 19.06 8l-8 8 8 8 1.88-1.88L14.833 16z'/%3E%3C/svg%3E")}.ag-icon-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eright%3C/title%3E%3Cpath d='m16 5.333-1.88 1.88 7.44 7.453H5.333v2.667H21.56l-7.44 7.453 1.88 1.88 10.667-10.667L16 5.332z'/%3E%3C/svg%3E")}.ag-icon-save:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esave%3C/title%3E%3Cpath d='M25.333 16v9.333H6.666V16H3.999v9.333C3.999 26.8 5.199 28 6.666 28h18.667C26.8 28 28 26.8 28 25.333V16zm-8 .893 3.453-3.44 1.88 1.88L15.999 22l-6.667-6.667 1.88-1.88 3.453 3.44V4h2.667v12.893z'/%3E%3C/svg%3E")}.ag-icon-small-down:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-down%3C/title%3E%3Cpath d='M9.333 12.667 16 19.334l6.667-6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-small-left:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-left%3C/title%3E%3Cpath d='M19.333 9.333 12.666 16l6.667 6.667V9.334z'/%3E%3C/svg%3E")}.ag-icon-small-right:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-right%3C/title%3E%3Cpath d='M12.667 22.667 19.334 16l-6.667-6.667v13.333z'/%3E%3C/svg%3E")}.ag-icon-small-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Esmall-up%3C/title%3E%3Cpath d='M9.333 19.333 16 12.666l6.667 6.667H9.334z'/%3E%3C/svg%3E")}.ag-icon-tick:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etick%3C/title%3E%3Cpath d='m11.727 21.167-5.56-5.56-1.893 1.88 7.453 7.453 16-16-1.88-1.88z'/%3E%3C/svg%3E")}.ag-icon-tree-closed:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-closed%3C/title%3E%3Cpath d='m12.94 8-1.88 1.88L17.167 16l-6.107 6.12L12.94 24l8-8z'/%3E%3C/svg%3E")}.ag-icon-tree-indeterminate:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-indeterminate%3C/title%3E%3Cpath d='M6.667 14.667h18.667v2.667H6.667z'/%3E%3C/svg%3E")}.ag-icon-tree-open:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Etree-open%3C/title%3E%3Cpath d='M22.12 11.06 16 17.167 9.88 11.06 8 12.94l8 8 8-8z'/%3E%3C/svg%3E")}.ag-icon-unlinked:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Eunlinked%3C/title%3E%3Cpath d='M22.667 9.333h-5.333v2.533h5.333a4.136 4.136 0 0 1 4.133 4.133c0 1.907-1.307 3.507-3.08 3.973l1.947 1.947c2.173-1.107 3.667-3.32 3.667-5.92a6.67 6.67 0 0 0-6.667-6.667zm-1.334 5.334h-2.92l2.667 2.667h.253zM2.667 5.693 6.814 9.84A6.65 6.65 0 0 0 2.667 16a6.67 6.67 0 0 0 6.667 6.667h5.333v-2.533H9.334a4.136 4.136 0 0 1-4.133-4.133c0-2.12 1.613-3.867 3.68-4.093l2.76 2.76h-.973v2.667h3.64l3.027 3.027v2.307h2.307l5.347 5.333 1.68-1.68L4.362 4.002 2.669 5.695z'/%3E%3C/svg%3E")}.ag-icon-up:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Easc%3C/title%3E%3Cpath d='m5.333 16 1.88 1.88 7.453-7.44v16.227h2.667V10.44l7.44 7.453L26.666 16 15.999 5.333z'/%3E%3C/svg%3E")}.ag-icon-grip:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ctitle%3Egrip%3C/title%3E%3Cpath d='M26.667 12H5.334v2.667h21.333zM5.333 20h21.333v-2.667H5.333z'/%3E%3C/svg%3E")}.ag-icon-settings:before{mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3-3-1.3-3-3 1.3-3 3-3'/%3E%3C/svg%3E")}`;
/***/ }),
/***/ 8900:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetMaterial = void 0;
const Part_1 = __webpack_require__(6607);
const icon_set_material_css_GENERATED_1 = __webpack_require__(7545);
exports.iconSetMaterial = (0, Part_1.createPart)({
feature: 'iconSet',
css: icon_set_material_css_GENERATED_1.iconSetMaterialCSS,
});
/***/ }),
/***/ 5867:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconOverrides = void 0;
const Part_1 = __webpack_require__(6607);
const theme_types_1 = __webpack_require__(113);
const iconOverrides = (args) => {
const cssParts = [];
if (args.type === 'image') {
const { icons, mask } = args;
for (const key of Object.keys(icons)) {
const imageCssValue = (0, theme_types_1.imageValueToCss)(icons[key]);
if (mask) {
cssParts.push(`.ag-icon-${key}::before { mask-image: ${imageCssValue}; }`);
}
else {
cssParts.push(`.ag-icon-${key}::before { background-image: ${imageCssValue}; ${unsetMaskIcon} }`);
}
}
}
if (args.type === 'font') {
const { family, weight, color, icons } = args;
let properties = unsetMaskIcon;
if (family) {
properties += ` font-family: ${(0, theme_types_1.fontFamilyValueToCss)(family)};`;
}
if (weight) {
properties += ` font-weight: ${(0, theme_types_1.fontWeightValueToCss)(weight)};`;
}
if (color) {
properties += ` color: ${(0, theme_types_1.colorValueToCss)(color)};`;
}
for (const key of Object.keys(icons)) {
cssParts.push(`.ag-icon-${key}::before { content: ${JSON.stringify(icons[key])}; ${properties} }`);
}
}
return (0, Part_1.createPart)({
css: cssParts.join(';\n'),
cssImports: args.cssImports,
});
};
exports.iconOverrides = iconOverrides;
const unsetMaskIcon = `background-color: unset; mask-image: unset; -webkit-mask-image: unset;`;
/***/ }),
/***/ 3692:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.iconSetQuartzBold = exports.iconSetQuartzRegular = exports.iconSetQuartzLight = exports.iconSetQuartz = void 0;
const Part_1 = __webpack_require__(6607);
const quartz_icon_data_1 = __webpack_require__(1368);
const iconSetQuartz = (args = {}) => {
return (0, Part_1.createPart)({
feature: 'iconSet',
css: () => (0, quartz_icon_data_1.getQuartzIconsCss)(args),
});
};
exports.iconSetQuartz = iconSetQuartz;
exports.iconSetQuartzLight = (0, exports.iconSetQuartz)({ strokeWidth: 1 });
exports.iconSetQuartzRegular = (0, exports.iconSetQuartz)();
exports.iconSetQuartzBold = (0, exports.iconSetQuartz)({ strokeWidth: 2 });
/***/ }),
/***/ 1368:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getQuartzIconsCss = void 0;
const iconNameToSvgFragment = {
aggregation: '',
arrows: '',
asc: '',
cancel: '',
chart: '',
'color-picker': '',
columns: '',
contracted: '',
copy: '',
cross: '',
csv: '',
cut: '',
desc: '',
down: '',
excel: '',
expanded: '',
'eye-slash': '',
eye: '',
filter: '',
first: '',
group: '',
last: '',
left: '',
linked: '',
loading: '',
maximize: '',
menu: '',
'menu-alt': '',
minimize: '',
minus: '',
next: '',
none: '',
'not-allowed': '',
paste: '',
pin: '',
pivot: '',
plus: '',
previous: '',
right: '',
save: '',
'small-left': '',
'small-right': '',
tick: '',
'tree-closed': '',
'tree-indeterminate': '',
'tree-open': '',
unlinked: '',
up: '',
grip: '' +
'',
settings: '',
};
const iconNameToFullSvg = {
'small-down': '',
'small-up': '',
};
const getQuartzIconsCss = (args = {}) => {
let result = '';
for (const iconName of [...Object.keys(iconNameToSvgFragment), ...Object.keys(iconNameToFullSvg)]) {
const iconSvg = quartzIconSvg(iconName, args.strokeWidth);
result += `.ag-icon-${iconName}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(iconSvg)}'); }\n`;
}
return result;
};
exports.getQuartzIconsCss = getQuartzIconsCss;
const quartzIconSvg = (name, strokeWidth = 1.5) => {
const fullSVG = iconNameToFullSvg[name];
if (fullSVG)
return fullSVG;
const svgFragment = iconNameToSvgFragment[name];
if (!svgFragment)
throw new Error(`Missing icon data for ${name}`);
return (`');
};
/***/ }),
/***/ 2543:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.inputStyleBaseCSS = void 0;
exports.inputStyleBaseCSS = `:where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}`;
/***/ }),
/***/ 7389:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.inputStyleBorderedCSS = void 0;
exports.inputStyleBorderedCSS = `:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}`;
/***/ }),
/***/ 3054:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.inputStyleUnderlinedCSS = void 0;
exports.inputStyleUnderlinedCSS = `:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){border-left:none;border-right:none;border-top:none}`;
/***/ }),
/***/ 7161:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.inputStyleUnderlined = exports.inputStyleBordered = exports.inputStyleBase = void 0;
const Part_1 = __webpack_require__(6607);
const theme_utils_1 = __webpack_require__(7845);
const input_style_base_css_GENERATED_1 = __webpack_require__(2543);
const input_style_bordered_css_GENERATED_1 = __webpack_require__(7389);
const input_style_underlined_css_GENERATED_1 = __webpack_require__(3054);
const baseParams = {
inputBackgroundColor: 'transparent',
inputBorder: false,
inputBorderRadius: 0,
inputTextColor: {
ref: 'textColor',
},
inputPlaceholderTextColor: {
ref: 'inputTextColor',
mix: 0.5,
},
inputPaddingStart: 0,
inputHeight: {
calc: 'max(iconSize, fontSize) + spacing * 2',
},
inputFocusBackgroundColor: {
ref: 'inputBackgroundColor',
},
inputFocusBorder: {
ref: 'inputBorder',
},
inputFocusShadow: 'none',
inputFocusTextColor: {
ref: 'inputTextColor',
},
inputDisabledBackgroundColor: {
ref: 'inputBackgroundColor',
},
inputDisabledBorder: {
ref: 'inputBorder',
},
inputDisabledTextColor: {
ref: 'inputTextColor',
},
inputInvalidBackgroundColor: {
ref: 'inputBackgroundColor',
},
inputInvalidBorder: {
ref: 'inputBorder',
},
inputInvalidTextColor: {
ref: 'inputTextColor',
},
inputIconColor: {
ref: 'inputTextColor',
},
pickerButtonBorder: false,
pickerButtonFocusBorder: { ref: 'inputFocusBorder' },
pickerButtonBackgroundColor: { ref: 'backgroundColor' },
pickerButtonFocusBackgroundColor: { ref: 'backgroundColor' },
pickerListBorder: false,
pickerListBackgroundColor: { ref: 'backgroundColor' },
};
const makeInputStyleBaseTreeShakeable = () => (0, Part_1.createPart)({
feature: 'inputStyle',
params: baseParams,
css: input_style_base_css_GENERATED_1.inputStyleBaseCSS,
});
exports.inputStyleBase = makeInputStyleBaseTreeShakeable();
const makeInputStyleBorderedTreeShakeable = () => (0, Part_1.createPart)({
feature: 'inputStyle',
params: {
...baseParams,
inputBackgroundColor: theme_utils_1.backgroundColor,
inputBorder: true,
inputBorderRadius: {
ref: 'borderRadius',
},
inputPaddingStart: {
ref: 'spacing',
},
inputFocusBorder: {
color: theme_utils_1.accentColor,
},
inputFocusShadow: {
ref: 'focusShadow',
},
inputDisabledBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.06),
inputDisabledTextColor: {
ref: 'textColor',
mix: 0.5,
},
inputInvalidBorder: {
color: { ref: 'invalidColor' },
},
pickerButtonBorder: true,
pickerListBorder: true,
},
css: () => input_style_base_css_GENERATED_1.inputStyleBaseCSS + input_style_bordered_css_GENERATED_1.inputStyleBorderedCSS,
});
exports.inputStyleBordered = makeInputStyleBorderedTreeShakeable();
const makeInputStyleUnderlinedTreeShakeable = () => (0, Part_1.createPart)({
feature: 'inputStyle',
params: {
...baseParams,
inputBackgroundColor: 'transparent',
inputBorder: {
width: 2,
color: (0, theme_utils_1.foregroundMix)(0.3),
},
inputPaddingStart: {
ref: 'spacing',
},
inputFocusBorder: 'solid 2px var(--ag-accent-color)',
inputDisabledTextColor: {
ref: 'textColor',
mix: 0.5,
},
inputDisabledBorder: 'solid 1px var(--ag-border-color)',
inputInvalidBorder: {
width: 2,
color: {
ref: 'invalidColor',
mix: 0.3,
},
},
},
css: () => input_style_base_css_GENERATED_1.inputStyleBaseCSS + input_style_underlined_css_GENERATED_1.inputStyleUnderlinedCSS,
});
exports.inputStyleUnderlined = makeInputStyleUnderlinedTreeShakeable();
/***/ }),
/***/ 4907:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.tabStyleBaseCSS = void 0;
exports.tabStyleBaseCSS = `.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}`;
/***/ }),
/***/ 5797:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.tabStyleRolodexCSS = void 0;
exports.tabStyleRolodexCSS = `.ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}`;
/***/ }),
/***/ 5117:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.tabStyleRolodex = exports.tabStyleAlpine = exports.tabStyleMaterial = exports.tabStyleQuartz = exports.tabStyleBase = void 0;
const Part_1 = __webpack_require__(6607);
const theme_utils_1 = __webpack_require__(7845);
const tab_style_base_css_GENERATED_1 = __webpack_require__(4907);
const tab_style_rolodex_css_GENERATED_1 = __webpack_require__(5797);
const baseParams = {
tabBarBackgroundColor: 'transparent',
tabBarHorizontalPadding: 0,
tabBarTopPadding: 0,
tabBackgroundColor: 'transparent',
tabTextColor: {
ref: 'textColor',
},
tabHorizontalPadding: {
ref: 'spacing',
},
tabTopPadding: {
ref: 'spacing',
},
tabBottomPadding: {
ref: 'spacing',
},
tabSpacing: '0',
tabHoverBackgroundColor: {
ref: 'tabBackgroundColor',
},
tabHoverTextColor: {
ref: 'tabTextColor',
},
tabSelectedBackgroundColor: {
ref: 'tabBackgroundColor',
},
tabSelectedTextColor: {
ref: 'tabTextColor',
},
tabSelectedBorderWidth: 1,
tabSelectedBorderColor: 'transparent',
tabSelectedUnderlineColor: 'transparent',
tabSelectedUnderlineWidth: 0,
tabSelectedUnderlineTransitionDuration: 0,
tabBarBorder: false,
};
const makeTabStyleBaseTreeShakeable = () => (0, Part_1.createPart)({
feature: 'tabStyle',
params: baseParams,
css: tab_style_base_css_GENERATED_1.tabStyleBaseCSS,
});
/**
* This base tab style adds no visual styling, it provides a base upon which a
* tab style can be built by setting the tab-related params
*/
exports.tabStyleBase = makeTabStyleBaseTreeShakeable();
const makeTabStyleQuartzTreeShakeable = () => (0, Part_1.createPart)({
feature: 'tabStyle',
params: {
...baseParams,
tabBarBorder: true,
tabBarBackgroundColor: (0, theme_utils_1.foregroundMix)(0.05),
tabTextColor: {
ref: 'textColor',
mix: 0.7,
},
tabSelectedTextColor: {
ref: 'textColor',
},
tabHoverTextColor: {
ref: 'textColor',
},
tabSelectedBorderColor: {
ref: 'borderColor',
},
tabSelectedBackgroundColor: theme_utils_1.backgroundColor,
},
css: tab_style_base_css_GENERATED_1.tabStyleBaseCSS,
});
/**
* Tabs styled for the Quartz theme
*/
exports.tabStyleQuartz = makeTabStyleQuartzTreeShakeable();
const makeTabStyleMaterialTreeShakeable = () => (0, Part_1.createPart)({
feature: 'tabStyle',
params: {
...baseParams,
tabBarBackgroundColor: {
ref: 'chromeBackgroundColor',
},
tabSelectedUnderlineColor: {
ref: 'primaryColor',
},
tabSelectedUnderlineWidth: 2,
tabSelectedUnderlineTransitionDuration: 0,
},
css: tab_style_base_css_GENERATED_1.tabStyleBaseCSS,
});
/**
* Tabs styled for the Material theme
*/
exports.tabStyleMaterial = makeTabStyleMaterialTreeShakeable();
const makeTabStyleAlpineTreeShakeable = () => (0, Part_1.createPart)({
feature: 'tabStyle',
params: {
...baseParams,
tabBarBorder: true,
tabBarBackgroundColor: {
ref: 'chromeBackgroundColor',
},
tabHoverTextColor: theme_utils_1.accentColor,
tabSelectedTextColor: theme_utils_1.accentColor,
tabSelectedUnderlineColor: theme_utils_1.accentColor,
tabSelectedUnderlineWidth: 2,
tabSelectedUnderlineTransitionDuration: '0.3s',
},
css: tab_style_base_css_GENERATED_1.tabStyleBaseCSS,
});
/**
* Tabs styled for the Alpine theme
*/
exports.tabStyleAlpine = makeTabStyleAlpineTreeShakeable();
const makeTabStyleRolodexTreeShakeable = () => (0, Part_1.createPart)({
feature: 'tabStyle',
params: {
...baseParams,
tabBarBackgroundColor: {
ref: 'chromeBackgroundColor',
},
tabBarHorizontalPadding: {
ref: 'spacing',
},
tabBarTopPadding: {
ref: 'spacing',
},
tabBarBorder: true,
tabHorizontalPadding: { calc: 'spacing * 2' },
tabTopPadding: {
ref: 'spacing',
},
tabBottomPadding: {
ref: 'spacing',
},
tabSpacing: {
ref: 'spacing',
},
tabSelectedBorderColor: {
ref: 'borderColor',
},
tabSelectedBackgroundColor: theme_utils_1.backgroundColor,
},
css: () => tab_style_base_css_GENERATED_1.tabStyleBaseCSS + tab_style_rolodex_css_GENERATED_1.tabStyleRolodexCSS,
});
/**
* Tabs where the selected tab appears raised and attached the the active
* content, like a rolodex or operating system tabs.
*/
exports.tabStyleRolodex = makeTabStyleRolodexTreeShakeable();
/***/ }),
/***/ 142:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.materialAdjustmentsCSS = void 0;
exports.materialAdjustmentsCSS = `.ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-header-row,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:1px solid var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-primary-color)}`;
/***/ }),
/***/ 2525:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.themeMaterial = exports.styleMaterial = exports.themeBalham = exports.themeAlpine = exports.themeQuartz = void 0;
const Part_1 = __webpack_require__(6607);
const Theme_1 = __webpack_require__(9621);
const theme_utils_1 = __webpack_require__(7845);
const button_styles_1 = __webpack_require__(2475);
const checkbox_styles_1 = __webpack_require__(8265);
const color_schemes_1 = __webpack_require__(8689);
const column_drop_styles_1 = __webpack_require__(1697);
const icon_set_balham_1 = __webpack_require__(5572);
const icon_sets_1 = __webpack_require__(6407);
const input_styles_1 = __webpack_require__(7161);
const tab_styles_1 = __webpack_require__(5117);
const material_adjustments_css_GENERATED_1 = __webpack_require__(142);
const makeThemeQuartzTreeShakeable = () => (0, Theme_1.createTheme)()
.withPart(checkbox_styles_1.checkboxStyleDefault)
.withPart(color_schemes_1.colorSchemeVariable)
.withPart(icon_sets_1.iconSetQuartzRegular)
.withPart(tab_styles_1.tabStyleQuartz)
.withPart(input_styles_1.inputStyleBordered)
.withPart(column_drop_styles_1.columnDropStyleBordered)
.withParams({
fontFamily: [
{ googleFont: 'IBM Plex Sans' },
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
'Roboto',
'Oxygen-Sans',
'Ubuntu',
],
});
exports.themeQuartz =
/*#__PURE__*/
makeThemeQuartzTreeShakeable();
const makeThemeAlpineTreeShakeable = () => (0, Theme_1.createTheme)()
.withPart(button_styles_1.buttonStyleAlpine)
.withPart(checkbox_styles_1.checkboxStyleDefault)
.withPart(color_schemes_1.colorSchemeVariable)
.withPart(icon_sets_1.iconSetAlpine)
.withPart(tab_styles_1.tabStyleAlpine)
.withPart(input_styles_1.inputStyleBordered)
.withPart(column_drop_styles_1.columnDropStyleBordered)
.withParams({
accentColor: '#2196f3',
selectedRowBackgroundColor: (0, theme_utils_1.accentMix)(0.3),
inputFocusBorder: {
color: (0, theme_utils_1.accentMix)(0.4),
},
focusShadow: { radius: 2, spread: 1.6, color: (0, theme_utils_1.accentMix)(0.4) },
iconButtonHoverBackgroundColor: 'transparent',
iconButtonActiveBackgroundColor: 'transparent',
checkboxUncheckedBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.45),
checkboxIndeterminateBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.45),
checkboxIndeterminateBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.45),
checkboxBorderWidth: 2,
checkboxBorderRadius: 2,
fontSize: 13,
dataFontSize: 14,
headerFontWeight: 700,
borderRadius: 3,
wrapperBorderRadius: 3,
tabSelectedUnderlineColor: theme_utils_1.accentColor,
tabSelectedBorderWidth: 0,
tabSelectedUnderlineTransitionDuration: 0.3,
sideButtonSelectedUnderlineColor: theme_utils_1.accentColor,
sideButtonSelectedUnderlineWidth: 2,
sideButtonSelectedUnderlineTransitionDuration: 0.3,
sideButtonBorder: false,
sideButtonSelectedBorder: false,
sideButtonBarTopPadding: { calc: 'spacing * 3' },
sideButtonSelectedBackgroundColor: 'transparent',
sideButtonHoverTextColor: theme_utils_1.accentColor,
iconButtonHoverColor: theme_utils_1.accentColor,
toggleButtonWidth: 28,
toggleButtonHeight: 18,
toggleButtonSwitchInset: 1,
toggleButtonOffBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.45),
});
exports.themeAlpine =
/*#__PURE__*/
makeThemeAlpineTreeShakeable();
const makeThemeBalhamTreeShakeable = () => (0, Theme_1.createTheme)()
.withPart(button_styles_1.buttonStyleBalham)
.withPart(checkbox_styles_1.checkboxStyleDefault)
.withPart(color_schemes_1.colorSchemeVariable)
.withPart(icon_set_balham_1.iconSetBalham)
.withPart(tab_styles_1.tabStyleRolodex)
.withPart(input_styles_1.inputStyleBordered)
.withPart(column_drop_styles_1.columnDropStylePlain)
.withParams({
accentColor: '#0091ea',
borderColor: (0, theme_utils_1.foregroundMix)(0.2),
spacing: 4,
widgetVerticalSpacing: { calc: 'max(8px, spacing)' },
borderRadius: 2,
wrapperBorderRadius: 2,
headerColumnResizeHandleColor: 'transparent',
headerColumnBorder: true,
headerColumnBorderHeight: '50%',
oddRowBackgroundColor: {
ref: 'chromeBackgroundColor',
mix: 0.5,
},
checkboxBorderRadius: 2,
checkboxBorderWidth: 1,
checkboxUncheckedBackgroundColor: theme_utils_1.backgroundColor,
checkboxUncheckedBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
checkboxCheckedBackgroundColor: theme_utils_1.backgroundColor,
checkboxCheckedBorderColor: theme_utils_1.accentColor,
checkboxCheckedShapeColor: theme_utils_1.accentColor,
checkboxIndeterminateBackgroundColor: theme_utils_1.backgroundColor,
checkboxIndeterminateBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
checkboxIndeterminateShapeColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
focusShadow: { radius: 2, spread: 1, color: theme_utils_1.accentColor },
headerTextColor: (0, theme_utils_1.foregroundMix)(0.6),
iconButtonHoverBackgroundColor: 'transparent',
iconButtonActiveBackgroundColor: 'transparent',
fontSize: 12,
tabSelectedBackgroundColor: theme_utils_1.backgroundColor,
headerFontWeight: 'bold',
toggleButtonWidth: 32,
toggleButtonHeight: 16,
toggleButtonSwitchInset: 1,
toggleButtonOffBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
sideButtonBorder: true,
sideButtonBarTopPadding: { calc: 'spacing * 4' },
popupShadow: '5px 5px 10px rgba(0, 0, 0, 0.3)',
statusBarLabelColor: (0, theme_utils_1.foregroundMix)(0.54),
statusBarLabelFontWeight: 600,
statusBarValueFontWeight: 600,
panelTitleBarIconColor: theme_utils_1.foregroundColor,
});
exports.themeBalham =
/*#__PURE__*/
makeThemeBalhamTreeShakeable();
const makeStyleMaterialTreeShakeable = () => {
// define these overrides separately so that they don't affect the type of
// this part - adding styleMaterial to a theme should override the value of
// e.g. tabSelectedUnderlineColor, but not add that param to the type if
// it's not there already
const sharedParams = {
tabSelectedUnderlineColor: { ref: 'primaryColor' },
sideButtonSelectedUnderlineColor: { ref: 'primaryColor' },
buttonTextColor: { ref: 'primaryColor' },
rangeSelectionBackgroundColor: {
ref: 'primaryColor',
mix: 0.2,
},
rangeSelectionBorderColor: {
ref: 'primaryColor',
},
rangeSelectionHighlightColor: {
ref: 'primaryColor',
mix: 0.5,
},
rangeHeaderHighlightColor: {
ref: 'foregroundColor',
mix: 0.08,
},
rowNumbersSelectedColor: {
ref: 'primaryColor',
mix: 0.5,
},
inputFocusBorder: {
width: 2,
color: { ref: 'primaryColor' },
},
pickerButtonFocusBorder: {
width: 1,
color: { ref: 'primaryColor' },
},
cellEditingBorder: {
color: { ref: 'primaryColor' },
},
menuBackgroundColor: { ref: 'backgroundColor' },
sideButtonBarBackgroundColor: theme_utils_1.backgroundColor,
sideButtonSelectedBackgroundColor: 'transparent',
sideButtonBarTopPadding: { calc: 'spacing * 4' },
headerColumnResizeHandleColor: 'none',
headerBackgroundColor: {
ref: 'backgroundColor',
},
rowHoverColor: (0, theme_utils_1.foregroundMix)(0.08),
columnHoverColor: (0, theme_utils_1.foregroundMix)(0.08),
headerCellHoverBackgroundColor: (0, theme_utils_1.foregroundMix)(0.05),
statusBarLabelColor: (0, theme_utils_1.foregroundMix)(0.63),
statusBarLabelFontWeight: 600,
statusBarValueFontWeight: 600,
valueChangeValueHighlightBackgroundColor: '#00acc1',
panelTitleBarIconColor: theme_utils_1.foregroundColor,
advancedFilterBuilderButtonBarBorder: false,
};
const lightParams = {
...sharedParams,
primaryColor: '#3f51b5',
foregroundColor: '#000D',
headerTextColor: '#0008',
accentColor: '#ff4081',
checkboxUncheckedBorderColor: theme_utils_1.foregroundColor,
checkboxIndeterminateBackgroundColor: theme_utils_1.foregroundColor,
toggleButtonOffBackgroundColor: theme_utils_1.foregroundColor,
selectedRowBackgroundColor: 'rgba(33, 150, 243, 0.3)',
};
const darkParams = {
...sharedParams,
primaryColor: '#3f51b5',
foregroundColor: '#fffD',
headerTextColor: '#fff8',
accentColor: '#bb86fc',
checkboxUncheckedBorderColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
checkboxIndeterminateBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
toggleButtonOffBackgroundColor: (0, theme_utils_1.foregroundBackgroundMix)(0.5),
selectedRowBackgroundColor: '#bb86fc33',
};
return (0, Part_1.createPart)({
feature: 'styleMaterial',
css: material_adjustments_css_GENERATED_1.materialAdjustmentsCSS,
params: lightParams,
modeParams: {
light: lightParams,
dark: darkParams,
'dark-blue': darkParams,
},
});
};
exports.styleMaterial = makeStyleMaterialTreeShakeable();
const makeThemeMaterialTreeShakeable = () =>
/*#__PURE__*/
(0, Theme_1.createTheme)()
.withPart(button_styles_1.buttonStyleBase)
.withPart(checkbox_styles_1.checkboxStyleDefault)
.withPart(color_schemes_1.colorSchemeVariable)
.withPart(icon_sets_1.iconSetMaterial)
.withPart(tab_styles_1.tabStyleMaterial)
.withPart(input_styles_1.inputStyleUnderlined)
.withPart(column_drop_styles_1.columnDropStylePlain)
.withPart(exports.styleMaterial)
.withParams({
rowHeight: {
calc: 'max(iconSize, dataFontSize) + spacing * 3.75 * rowVerticalPaddingScale',
},
headerHeight: {
calc: 'max(iconSize, dataFontSize) + spacing * 4.75 * headerVerticalPaddingScale',
},
widgetVerticalSpacing: {
calc: 'spacing * 1.75',
},
cellHorizontalPadding: { calc: 'spacing * 3' },
buttonHorizontalPadding: { ref: 'spacing' },
widgetContainerHorizontalPadding: { calc: 'spacing * 1.5' },
widgetContainerVerticalPadding: { calc: 'spacing * 2' },
fontSize: 13,
iconSize: 18,
borderRadius: 0,
wrapperBorderRadius: 0,
wrapperBorder: false,
menuBorder: false,
dialogBorder: false,
panelTitleBarBorder: false,
tabSelectedBorderWidth: 0,
tabSelectedUnderlineTransitionDuration: 0.3,
sidePanelBorder: false,
sideButtonSelectedBorder: false,
sideButtonSelectedUnderlineWidth: 2,
sideButtonSelectedUnderlineTransitionDuration: 0.3,
sideButtonBorder: false,
buttonBorder: false,
buttonDisabledBorder: false,
focusShadow: {
spread: 4,
color: (0, theme_utils_1.foregroundMix)(0.16),
},
fontFamily: [
{ googleFont: 'Roboto' },
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
'Oxygen-Sans',
'Ubuntu',
'Cantarell',
'Helvetica Neue',
'sans-serif',
],
inputHeight: {
calc: 'max(iconSize, fontSize) + spacing * 3',
},
pickerButtonBorder: {
width: 1,
color: 'transparent',
},
headerFontWeight: 600,
checkboxBorderWidth: 2,
checkboxBorderRadius: 2,
toggleButtonWidth: 34,
toggleButtonSwitchInset: 1,
cardShadow: '0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)',
popupShadow: '5px 5px 10px rgba(0, 0, 0, 0.3)',
});
exports.themeMaterial =
/*#__PURE__*/ makeThemeMaterialTreeShakeable();
/***/ }),
/***/ 113:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.paramValueToCss = exports.durationValueToCss = exports.imageValueToCss = exports.fontWeightValueToCss = exports.fontFamilyValueToCss = exports.borderStyleValueToCss = exports.shadowValueToCss = exports.borderValueToCss = exports.scaleValueToCss = exports.lengthValueToCss = exports.colorSchemeValueToCss = exports.colorValueToCss = exports.getParamType = void 0;
const logging_1 = __webpack_require__(7764);
const theme_utils_1 = __webpack_require__(7845);
const paramTypes = [
'colorScheme',
'color',
'length',
'scale',
'borderStyle',
'border',
'shadow',
'image',
'fontFamily',
'fontWeight',
'duration',
];
/**
* Return the ParamType for a given param name,
*/
exports.getParamType = (0, theme_utils_1.memoize)((param) => {
param = param.toLowerCase();
return paramTypes.find((type) => param.endsWith(type.toLowerCase())) ?? 'length';
});
const literalToCSS = (value) => {
if (typeof value === 'object' && value?.ref)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
if (typeof value === 'string')
return value;
if (typeof value === 'number')
return String(value);
return false;
};
const colorValueToCss = (value) => {
if (typeof value === 'string')
return value;
if (value && 'ref' in value) {
const colorExpr = (0, theme_utils_1.paramToVariableExpression)(value.ref);
if (value.mix == null) {
return colorExpr;
}
const backgroundExpr = value.onto ? (0, theme_utils_1.paramToVariableExpression)(value.onto) : 'transparent';
return `color-mix(in srgb, ${backgroundExpr}, ${colorExpr} ${(0, theme_utils_1.clamp)(value.mix * 100, 0, 100)}%)`;
}
return false;
};
exports.colorValueToCss = colorValueToCss;
exports.colorSchemeValueToCss = literalToCSS;
const lengthValueToCss = (value) => {
if (typeof value === 'string')
return value;
if (typeof value === 'number')
return `${value}px`;
if (value && 'calc' in value) {
// ensure a space around operators other than `-` (which can be part of an identifier)
const valueWithSpaces = value.calc.replace(/ ?[*/+] ?/g, ' $& ');
// convert param names to variable expressions, e.g. "fooBar" -> "var(--ag-foo-bar)",
// ignoring words that are part of function names "fooBar()" or variables "--fooBar"
return `calc(${valueWithSpaces.replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi, (p) => (p[0] === '-' ? p : ` ${(0, theme_utils_1.paramToVariableExpression)(p)} `))})`;
}
if (value && 'ref' in value)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
return false;
};
exports.lengthValueToCss = lengthValueToCss;
exports.scaleValueToCss = literalToCSS;
const borderValueToCss = (value, param) => {
if (typeof value === 'string')
return value;
if (value === true)
return 'solid 1px var(--ag-border-color)';
if (value === false)
return param === 'columnBorder' ? 'solid 1px transparent' : 'none';
if (value && 'ref' in value)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
return ((0, exports.borderStyleValueToCss)(value.style ?? 'solid') +
' ' +
(0, exports.lengthValueToCss)(value.width ?? 1) +
' ' +
(0, exports.colorValueToCss)(value.color ?? { ref: 'borderColor' }));
};
exports.borderValueToCss = borderValueToCss;
const shadowValueToCss = (value) => {
if (typeof value === 'string')
return value;
if (value === false)
return 'none';
if (value && 'ref' in value)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
return [
(0, exports.lengthValueToCss)(value.offsetX ?? 0),
(0, exports.lengthValueToCss)(value.offsetY ?? 0),
(0, exports.lengthValueToCss)(value.radius ?? 0),
(0, exports.lengthValueToCss)(value.spread ?? 0),
(0, exports.colorValueToCss)(value.color ?? { ref: 'foregroundColor' }),
].join(' ');
};
exports.shadowValueToCss = shadowValueToCss;
exports.borderStyleValueToCss = literalToCSS;
const fontFamilyValueToCss = (value) => {
if (typeof value === 'string')
return value;
if (value && 'googleFont' in value)
return (0, exports.fontFamilyValueToCss)(value.googleFont);
if (value && 'ref' in value)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
if (Array.isArray(value)) {
return value
.map((font) => {
if (typeof font === 'object' && 'googleFont' in font) {
font = font.googleFont;
}
return quoteUnsafeChars(font);
})
.join(', ');
}
return false;
};
exports.fontFamilyValueToCss = fontFamilyValueToCss;
const quoteUnsafeChars = (font) =>
// don't quote var() expressions or quote safe identifier names, so that
// people can specify fonts like sans-serif which are keywords not strings,
// or var(--my-var)
/^[\w-]+$|\w\(/.test(font) ? font : JSON.stringify(font);
exports.fontWeightValueToCss = literalToCSS;
const imageValueToCss = (value) => {
if (typeof value === 'string')
return value;
if (value && 'url' in value)
return `url(${JSON.stringify(value.url)})`;
if (value && 'svg' in value)
return (0, exports.imageValueToCss)({ url: `data:image/svg+xml,${encodeURIComponent(value.svg)}` });
if (value && 'ref' in value)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
return false;
};
exports.imageValueToCss = imageValueToCss;
const durationValueToCss = (value, param) => {
if (typeof value === 'string')
return value;
if (typeof value === 'number') {
if (value >= 10) {
(0, logging_1._error)(104, { value, param });
}
return `${value}s`;
}
if (value && 'ref' in value)
return (0, theme_utils_1.paramToVariableExpression)(value.ref);
return false;
};
exports.durationValueToCss = durationValueToCss;
const paramValidators = {
color: exports.colorValueToCss,
colorScheme: exports.colorSchemeValueToCss,
length: exports.lengthValueToCss,
scale: exports.scaleValueToCss,
border: exports.borderValueToCss,
borderStyle: exports.borderStyleValueToCss,
shadow: exports.shadowValueToCss,
image: exports.imageValueToCss,
fontFamily: exports.fontFamilyValueToCss,
fontWeight: exports.fontWeightValueToCss,
duration: exports.durationValueToCss,
};
const paramValueToCss = (param, value) => {
const type = (0, exports.getParamType)(param);
return paramValidators[type](value, param);
};
exports.paramValueToCss = paramValueToCss;
/***/ }),
/***/ 7845:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.accentColor = exports.foregroundColor = exports.backgroundColor = exports.foregroundHeaderBackgroundMix = exports.foregroundBackgroundMix = exports.foregroundMix = exports.accentMix = exports.memoize = exports.logErrorMessage = exports.clamp = exports.paramToVariableExpression = exports.paramToVariableName = exports.kebabCase = void 0;
const kebabCase = (str) => str.replace(/[A-Z]/g, (m) => `-${m}`).toLowerCase();
exports.kebabCase = kebabCase;
const paramToVariableName = (paramName) => `--ag-${(0, exports.kebabCase)(paramName)}`;
exports.paramToVariableName = paramToVariableName;
const paramToVariableExpression = (paramName) => `var(${(0, exports.paramToVariableName)(paramName)})`;
exports.paramToVariableExpression = paramToVariableExpression;
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
exports.clamp = clamp;
const logErrorMessage = (message, error) => {
if (error) {
// eslint-disable-next-line no-console
console.error(message, error);
}
else {
// eslint-disable-next-line no-console
console.error(message);
}
};
exports.logErrorMessage = logErrorMessage;
const memoize = (fn) => {
const values = new Map();
return (a) => {
const key = a;
if (!values.has(key)) {
values.set(key, fn(a));
}
return values.get(key);
};
};
exports.memoize = memoize;
const accentMix = (mix) => ({ ref: 'accentColor', mix });
exports.accentMix = accentMix;
const foregroundMix = (mix) => ({ ref: 'foregroundColor', mix });
exports.foregroundMix = foregroundMix;
const foregroundBackgroundMix = (mix) => ({
ref: 'foregroundColor',
mix,
onto: 'backgroundColor',
});
exports.foregroundBackgroundMix = foregroundBackgroundMix;
const foregroundHeaderBackgroundMix = (mix) => ({
ref: 'foregroundColor',
mix,
onto: 'headerBackgroundColor',
});
exports.foregroundHeaderBackgroundMix = foregroundHeaderBackgroundMix;
exports.backgroundColor = { ref: 'backgroundColor' };
exports.foregroundColor = { ref: 'foregroundColor' };
exports.accentColor = { ref: 'accentColor' };
/***/ }),
/***/ 8927:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.tooltipCSS = void 0;
exports.tooltipCSS = `.ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}`;
/***/ }),
/***/ 243:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TooltipComponent = void 0;
const string_1 = __webpack_require__(7766);
const popupComponent_1 = __webpack_require__(3598);
class TooltipComponent extends popupComponent_1.PopupComponent {
constructor() {
super(/* html */ ``);
}
// will need to type params
init(params) {
const { value } = params;
this.getGui().textContent = (0, string_1._escapeString)(value, true);
}
}
exports.TooltipComponent = TooltipComponent;
/***/ }),
/***/ 3386:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TooltipFeature = exports._shouldDisplayTooltip = exports._getShouldDisplayTooltip = exports._isShowTooltipWhenTruncated = void 0;
const beanStub_1 = __webpack_require__(8731);
const tooltipStateManager_1 = __webpack_require__(3430);
function _isShowTooltipWhenTruncated(gos) {
return gos.get('tooltipShowMode') === 'whenTruncated';
}
exports._isShowTooltipWhenTruncated = _isShowTooltipWhenTruncated;
function _getShouldDisplayTooltip(gos, getElement) {
return _isShowTooltipWhenTruncated(gos) ? _shouldDisplayTooltip(getElement) : undefined;
}
exports._getShouldDisplayTooltip = _getShouldDisplayTooltip;
function _shouldDisplayTooltip(getElement) {
return () => {
const element = getElement();
if (!element) {
// show tooltip by default
return true;
}
return element.scrollWidth > element.clientWidth;
};
}
exports._shouldDisplayTooltip = _shouldDisplayTooltip;
class TooltipFeature extends beanStub_1.BeanStub {
constructor(ctrl, beans) {
super();
this.ctrl = ctrl;
if (beans) {
this.beans = beans;
}
}
postConstruct() {
this.refreshTooltip();
}
setBrowserTooltip(tooltip) {
const name = 'title';
const eGui = this.ctrl.getGui();
if (!eGui) {
return;
}
if (tooltip != null && tooltip != '') {
eGui.setAttribute(name, tooltip);
}
else {
eGui.removeAttribute(name);
}
}
updateTooltipText() {
const { getTooltipValue } = this.ctrl;
if (getTooltipValue) {
this.tooltip = getTooltipValue();
}
}
createTooltipFeatureIfNeeded() {
if (this.tooltipManager == null) {
this.tooltipManager = this.createBean(new tooltipStateManager_1.TooltipStateManager(this.ctrl, () => this.tooltip), this.beans.context);
}
}
setTooltipAndRefresh(tooltip) {
this.tooltip = tooltip;
this.refreshTooltip();
}
refreshTooltip() {
this.browserTooltips = this.beans.gos.get('enableBrowserTooltips');
this.updateTooltipText();
if (this.browserTooltips) {
this.setBrowserTooltip(this.tooltip);
this.tooltipManager = this.destroyBean(this.tooltipManager, this.beans.context);
}
else {
this.setBrowserTooltip(null);
this.createTooltipFeatureIfNeeded();
}
}
destroy() {
this.tooltipManager = this.destroyBean(this.tooltipManager, this.beans.context);
super.destroy();
}
}
exports.TooltipFeature = TooltipFeature;
/***/ }),
/***/ 2277:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TooltipModule = void 0;
const version_1 = __webpack_require__(7205);
const popupModule_1 = __webpack_require__(3137);
const tooltip_css_GENERATED_1 = __webpack_require__(8927);
const tooltipComponent_1 = __webpack_require__(243);
const tooltipFeature_1 = __webpack_require__(3386);
const tooltipService_1 = __webpack_require__(7931);
/**
* @feature Tooltips
* @colDef tooltipField, tooltipValueGetter, headerTooltip
*/
exports.TooltipModule = {
moduleName: 'Tooltip',
version: version_1.VERSION,
beans: [tooltipService_1.TooltipService],
dynamicBeans: {
tooltipFeature: tooltipFeature_1.TooltipFeature,
},
userComponents: {
agTooltipComponent: tooltipComponent_1.TooltipComponent,
},
dependsOn: [popupModule_1.PopupModule],
css: [tooltip_css_GENERATED_1.tooltipCSS],
};
/***/ }),
/***/ 7931:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TooltipService = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const generic_1 = __webpack_require__(4422);
const object_1 = __webpack_require__(6996);
const tooltipFeature_1 = __webpack_require__(3386);
class TooltipService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'tooltipSvc';
}
setupHeaderTooltip(existingTooltipFeature, ctrl, value, shouldDisplayTooltip) {
if (existingTooltipFeature) {
ctrl.destroyBean(existingTooltipFeature);
}
const isTooltipWhenTruncated = (0, tooltipFeature_1._isShowTooltipWhenTruncated)(this.gos);
const { column, eGui } = ctrl;
const colDef = column.getColDef();
if (!shouldDisplayTooltip && isTooltipWhenTruncated && !colDef.headerComponent) {
shouldDisplayTooltip = (0, tooltipFeature_1._shouldDisplayTooltip)(() => eGui.querySelector('.ag-header-cell-text'));
}
const tooltipCtrl = {
getColumn: () => column,
getColDef: () => column.getColDef(),
getGui: () => eGui,
getLocation: () => 'header',
getTooltipValue: () => {
if (value != null) {
return value;
}
const res = column.getColDef().headerTooltip;
return res;
},
shouldDisplayTooltip,
};
let tooltipFeature = this.createTooltipFeature(tooltipCtrl);
if (tooltipFeature) {
tooltipFeature = ctrl.createBean(tooltipFeature);
ctrl.setRefreshFunction('tooltip', () => tooltipFeature.refreshTooltip());
}
return tooltipFeature;
}
setupHeaderGroupTooltip(existingTooltipFeature, ctrl, value, shouldDisplayTooltip) {
if (existingTooltipFeature) {
ctrl.destroyBean(existingTooltipFeature);
}
const isTooltipWhenTruncated = (0, tooltipFeature_1._isShowTooltipWhenTruncated)(this.gos);
const { column, eGui } = ctrl;
const colGroupDef = column.getColGroupDef();
if (!shouldDisplayTooltip && isTooltipWhenTruncated && !colGroupDef?.headerGroupComponent) {
shouldDisplayTooltip = (0, tooltipFeature_1._shouldDisplayTooltip)(() => eGui.querySelector('.ag-header-group-text'));
}
const tooltipCtrl = {
getColumn: () => column,
getGui: () => eGui,
getLocation: () => 'headerGroup',
getTooltipValue: () => value ?? (colGroupDef && colGroupDef.headerTooltip),
shouldDisplayTooltip,
};
if (colGroupDef) {
tooltipCtrl.getColDef = () => colGroupDef;
}
const tooltipFeature = this.createTooltipFeature(tooltipCtrl);
return tooltipFeature ? ctrl.createBean(tooltipFeature) : tooltipFeature;
}
enableCellTooltipFeature(ctrl, value, shouldDisplayTooltip) {
const { column, rowNode } = ctrl;
const getTooltipValue = () => {
const colDef = column.getColDef();
const data = rowNode.data;
if (colDef.tooltipField && (0, generic_1._exists)(data)) {
return (0, object_1._getValueUsingField)(data, colDef.tooltipField, column.isTooltipFieldContainsDots());
}
const valueGetter = colDef.tooltipValueGetter;
if (valueGetter) {
return valueGetter((0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
location: 'cell',
colDef: column.getColDef(),
column: column,
rowIndex: ctrl.cellPosition.rowIndex,
node: rowNode,
data: rowNode.data,
value: ctrl.value,
valueFormatted: ctrl.valueFormatted,
}));
}
return null;
};
const isTooltipWhenTruncated = (0, tooltipFeature_1._isShowTooltipWhenTruncated)(this.gos);
if (!shouldDisplayTooltip && isTooltipWhenTruncated && !ctrl.isCellRenderer()) {
shouldDisplayTooltip = (0, tooltipFeature_1._shouldDisplayTooltip)(() => {
const eCell = ctrl.eGui;
return eCell.children.length === 0
? eCell
: eCell.querySelector('.ag-cell-value');
});
}
const tooltipCtrl = {
getColumn: () => column,
getColDef: () => column.getColDef(),
getRowIndex: () => ctrl.cellPosition.rowIndex,
getRowNode: () => rowNode,
getGui: () => ctrl.eGui,
getLocation: () => 'cell',
getTooltipValue: value != null ? () => value : getTooltipValue,
// this makes no sense, why is the cell formatted value passed to the tooltip???
getValueFormatted: () => ctrl.valueFormatted,
shouldDisplayTooltip,
};
return this.createTooltipFeature(tooltipCtrl, this.beans);
}
refreshRowTooltip(existingTooltipFeature, ctrl, value, shouldDisplayTooltip) {
const tooltipParams = {
getGui: () => ctrl.getFullWidthElement(),
getTooltipValue: () => value,
getLocation: () => 'fullWidthRow',
shouldDisplayTooltip,
};
const beans = this.beans;
const context = beans.context;
if (existingTooltipFeature) {
ctrl.destroyBean(existingTooltipFeature, context);
}
const tooltipFeature = this.createTooltipFeature(tooltipParams, beans);
return ctrl.createBean(tooltipFeature, context);
}
initCol(column) {
const { colDef } = column;
column.tooltipEnabled =
(0, generic_1._exists)(colDef.tooltipField) || (0, generic_1._exists)(colDef.tooltipValueGetter) || (0, generic_1._exists)(colDef.tooltipComponent);
}
createTooltipFeature(tooltipCtrl, beans) {
return this.beans.registry.createDynamicBean('tooltipFeature', false, tooltipCtrl, beans);
}
}
exports.TooltipService = TooltipService;
/***/ }),
/***/ 3430:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TooltipStateManager = void 0;
const userCompUtils_1 = __webpack_require__(2036);
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const browser_1 = __webpack_require__(8667);
const generic_1 = __webpack_require__(4422);
var TooltipStates;
(function (TooltipStates) {
TooltipStates[TooltipStates["NOTHING"] = 0] = "NOTHING";
TooltipStates[TooltipStates["WAITING_TO_SHOW"] = 1] = "WAITING_TO_SHOW";
TooltipStates[TooltipStates["SHOWING"] = 2] = "SHOWING";
})(TooltipStates || (TooltipStates = {}));
var TooltipTrigger;
(function (TooltipTrigger) {
TooltipTrigger[TooltipTrigger["HOVER"] = 0] = "HOVER";
TooltipTrigger[TooltipTrigger["FOCUS"] = 1] = "FOCUS";
})(TooltipTrigger || (TooltipTrigger = {}));
const SHOW_QUICK_TOOLTIP_DIFF = 1000;
const FADE_OUT_TOOLTIP_TIMEOUT = 1000;
const INTERACTIVE_HIDE_DELAY = 100;
// different instances of tooltipFeature use this to see when the
// last tooltip was hidden.
let lastTooltipHideTime;
let isLocked = false;
class TooltipStateManager extends beanStub_1.BeanStub {
wireBeans(beans) {
this.popupSvc = beans.popupSvc;
this.userCompFactory = beans.userCompFactory;
}
constructor(tooltipCtrl, getTooltipValue) {
super();
this.tooltipCtrl = tooltipCtrl;
this.getTooltipValue = getTooltipValue;
this.interactionEnabled = false;
this.isInteractingWithTooltip = false;
this.state = TooltipStates.NOTHING;
// when showing the tooltip, we need to make sure it's the most recent instance we request, as due to
// async we could request two tooltips before the first instance returns, in which case we should
// disregard the second instance.
this.tooltipInstanceCount = 0;
this.tooltipMouseTrack = false;
}
postConstruct() {
if (this.gos.get('tooltipInteraction')) {
this.interactionEnabled = true;
}
this.tooltipTrigger = this.getTooltipTrigger();
this.tooltipMouseTrack = this.gos.get('tooltipMouseTrack');
const el = this.tooltipCtrl.getGui();
if (this.tooltipTrigger === TooltipTrigger.HOVER) {
this.addManagedListeners(el, {
mouseenter: this.onMouseEnter.bind(this),
mouseleave: this.onMouseLeave.bind(this),
});
}
if (this.tooltipTrigger === TooltipTrigger.FOCUS) {
this.addManagedListeners(el, {
focusin: this.onFocusIn.bind(this),
focusout: this.onFocusOut.bind(this),
});
}
this.addManagedListeners(el, { mousemove: this.onMouseMove.bind(this) });
if (!this.interactionEnabled) {
this.addManagedListeners(el, {
mousedown: this.onMouseDown.bind(this),
keydown: this.onKeyDown.bind(this),
});
}
}
getGridOptionsTooltipDelay(delayOption) {
const delay = this.gos.get(delayOption);
return Math.max(200, delay);
}
getTooltipDelay(type) {
if (type === 'show') {
return (this.tooltipCtrl.getTooltipShowDelayOverride?.() ?? this.getGridOptionsTooltipDelay('tooltipShowDelay'));
}
return this.tooltipCtrl.getTooltipHideDelayOverride?.() ?? this.getGridOptionsTooltipDelay('tooltipHideDelay');
}
destroy() {
// if this component gets destroyed while tooltip is showing, need to make sure
// we don't end with no mouseLeave event resulting in zombie tooltip
this.setToDoNothing();
super.destroy();
}
getTooltipTrigger() {
const trigger = this.gos.get('tooltipTrigger');
if (!trigger || trigger === 'hover') {
return TooltipTrigger.HOVER;
}
return TooltipTrigger.FOCUS;
}
onMouseEnter(e) {
// if `interactiveTooltipTimeoutId` is set, it means that this cell has a tooltip
// and we are in the process of moving the cursor from the tooltip back to the cell
// so we need to unlock this service here.
if (this.interactionEnabled && this.interactiveTooltipTimeoutId) {
this.unlockService();
this.startHideTimeout();
}
if ((0, browser_1._isIOSUserAgent)()) {
return;
}
if (isLocked) {
this.showTooltipTimeoutId = window.setTimeout(() => {
this.prepareToShowTooltip(e);
}, INTERACTIVE_HIDE_DELAY);
}
else {
this.prepareToShowTooltip(e);
}
}
onMouseMove(e) {
// there is a delay from the time we mouseOver a component and the time the
// tooltip is displayed, so we need to track mousemove to be able to correctly
// position the tooltip when showTooltip is called.
if (this.lastMouseEvent) {
this.lastMouseEvent = e;
}
if (this.tooltipMouseTrack && this.state === TooltipStates.SHOWING && this.tooltipComp) {
this.positionTooltip();
}
}
onMouseDown() {
this.setToDoNothing();
}
onMouseLeave() {
// if interaction is enabled, we need to verify if the user is moving
// the cursor from the cell onto the tooltip, so we lock the service
// for 100ms to prevent other tooltips from being created while this is happening.
if (this.interactionEnabled) {
this.lockService();
}
else {
this.setToDoNothing();
}
}
onFocusIn() {
this.prepareToShowTooltip();
}
onFocusOut(e) {
const relatedTarget = e.relatedTarget;
const parentCompGui = this.tooltipCtrl.getGui();
const tooltipGui = this.tooltipComp?.getGui();
if (this.isInteractingWithTooltip ||
parentCompGui.contains(relatedTarget) ||
(this.interactionEnabled && tooltipGui?.contains(relatedTarget))) {
return;
}
this.setToDoNothing();
}
onKeyDown() {
// if the keydown happens outside of the tooltip, we cancel
// the tooltip interaction and hide the tooltip.
if (this.isInteractingWithTooltip) {
this.isInteractingWithTooltip = false;
}
this.setToDoNothing();
}
prepareToShowTooltip(mouseEvent) {
// every mouseenter should be following by a mouseleave, however for some unknown, it's possible for
// mouseenter to be called twice in a row, which can happen if editing the cell. this was reported
// in https://ag-grid.atlassian.net/browse/AG-4422. to get around this, we check the state, and if
// state is != nothing, then we know mouseenter was already received.
if (this.state != TooltipStates.NOTHING || isLocked) {
return;
}
// if we are showing the tooltip because of focus, no delay at all
// if another tooltip was hidden very recently, we only wait 200ms to show, not the normal waiting time
let delay = 0;
if (mouseEvent) {
delay = this.isLastTooltipHiddenRecently() ? 200 : this.getTooltipDelay('show');
}
this.lastMouseEvent = mouseEvent || null;
this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), delay);
this.state = TooltipStates.WAITING_TO_SHOW;
}
isLastTooltipHiddenRecently() {
// return true if <1000ms since last time we hid a tooltip
const now = new Date().getTime();
const then = lastTooltipHideTime;
return now - then < SHOW_QUICK_TOOLTIP_DIFF;
}
setToDoNothing(fromHideTooltip) {
if (!fromHideTooltip && this.state === TooltipStates.SHOWING) {
this.hideTooltip();
}
if (this.onBodyScrollEventCallback) {
this.onBodyScrollEventCallback();
this.onBodyScrollEventCallback = undefined;
}
if (this.onColumnMovedEventCallback) {
this.onColumnMovedEventCallback();
this.onColumnMovedEventCallback = undefined;
}
if (this.onDocumentKeyDownCallback) {
this.onDocumentKeyDownCallback();
this.onDocumentKeyDownCallback = undefined;
}
this.clearTimeouts();
this.state = TooltipStates.NOTHING;
this.lastMouseEvent = null;
}
showTooltip() {
const value = this.getTooltipValue();
const ctrl = this.tooltipCtrl;
if (!(0, generic_1._exists)(value) || (ctrl.shouldDisplayTooltip && !ctrl.shouldDisplayTooltip())) {
this.setToDoNothing();
return;
}
const rowNode = ctrl.getRowNode?.();
const params = (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
location: ctrl.getLocation?.() ?? 'UNKNOWN',
colDef: ctrl.getColDef?.(),
column: ctrl.getColumn?.(),
rowIndex: ctrl.getRowIndex?.(),
node: rowNode,
data: rowNode?.data,
value,
valueFormatted: ctrl.getValueFormatted?.(),
hideTooltipCallback: () => this.hideTooltip(true),
...(ctrl.getAdditionalParams?.() ?? {}),
});
this.state = TooltipStates.SHOWING;
this.tooltipInstanceCount++;
// we pass in tooltipInstanceCount so the callback knows what the count was when
// we requested the tooltip, so if another tooltip was requested in the mean time
// we disregard it
const callback = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);
const userDetails = (0, userCompUtils_1._getTooltipCompDetails)(this.userCompFactory, params);
userDetails?.newAgStackInstance().then(callback);
}
hideTooltip(forceHide) {
if (!forceHide && this.isInteractingWithTooltip) {
return;
}
// check if comp exists - due to async, although we asked for
// one, the instance may not be back yet
if (this.tooltipComp) {
this.destroyTooltipComp();
lastTooltipHideTime = new Date().getTime();
}
this.eventSvc.dispatchEvent({
type: 'tooltipHide',
parentGui: this.tooltipCtrl.getGui(),
});
if (forceHide) {
this.isInteractingWithTooltip = false;
}
this.setToDoNothing(true);
}
newTooltipComponentCallback(tooltipInstanceCopy, tooltipComp) {
const compNoLongerNeeded = this.state !== TooltipStates.SHOWING || this.tooltipInstanceCount !== tooltipInstanceCopy;
if (compNoLongerNeeded) {
this.destroyBean(tooltipComp);
return;
}
const eGui = tooltipComp.getGui();
this.tooltipComp = tooltipComp;
if (!eGui.classList.contains('ag-tooltip')) {
eGui.classList.add('ag-tooltip-custom');
}
if (this.tooltipTrigger === TooltipTrigger.HOVER) {
eGui.classList.add('ag-tooltip-animate');
}
if (this.interactionEnabled) {
eGui.classList.add('ag-tooltip-interactive');
}
const translate = this.getLocaleTextFunc();
const addPopupRes = this.popupSvc?.addPopup({
eChild: eGui,
ariaLabel: translate('ariaLabelTooltip', 'Tooltip'),
});
if (addPopupRes) {
this.tooltipPopupDestroyFunc = addPopupRes.hideFunc;
}
this.positionTooltip();
if (this.tooltipTrigger === TooltipTrigger.FOCUS) {
const listener = () => this.setToDoNothing();
[this.onBodyScrollEventCallback, this.onColumnMovedEventCallback] = this.addManagedEventListeners({
bodyScroll: listener,
columnMoved: listener,
});
}
if (this.interactionEnabled) {
[this.tooltipMouseEnterListener, this.tooltipMouseLeaveListener] = this.addManagedElementListeners(eGui, {
mouseenter: this.onTooltipMouseEnter.bind(this),
mouseleave: this.onTooltipMouseLeave.bind(this),
});
[this.onDocumentKeyDownCallback] = this.addManagedElementListeners((0, gridOptionsUtils_1._getDocument)(this.beans), {
keydown: (e) => {
if (!eGui.contains(e?.target)) {
this.onKeyDown();
}
},
});
if (this.tooltipTrigger === TooltipTrigger.FOCUS) {
[this.tooltipFocusInListener, this.tooltipFocusOutListener] = this.addManagedElementListeners(eGui, {
focusin: this.onTooltipFocusIn.bind(this),
focusout: this.onTooltipFocusOut.bind(this),
});
}
}
this.eventSvc.dispatchEvent({
type: 'tooltipShow',
tooltipGui: eGui,
parentGui: this.tooltipCtrl.getGui(),
});
this.startHideTimeout();
}
onTooltipMouseEnter() {
this.isInteractingWithTooltip = true;
this.unlockService();
}
onTooltipMouseLeave() {
if (this.isTooltipFocused()) {
return;
}
this.isInteractingWithTooltip = false;
this.lockService();
}
onTooltipFocusIn() {
this.isInteractingWithTooltip = true;
}
isTooltipFocused() {
const tooltipGui = this.tooltipComp?.getGui();
const activeEl = (0, gridOptionsUtils_1._getActiveDomElement)(this.beans);
return !!tooltipGui && tooltipGui.contains(activeEl);
}
onTooltipFocusOut(e) {
const parentGui = this.tooltipCtrl.getGui();
// focusout is dispatched when inner elements lose focus
// so we need to verify if focus is contained within the tooltip
if (this.isTooltipFocused()) {
return;
}
this.isInteractingWithTooltip = false;
// if we move the focus from the tooltip back to the original cell
// the tooltip should remain open, but we need to restart the hide timeout counter
if (parentGui.contains(e.relatedTarget)) {
this.startHideTimeout();
}
// if the parent cell doesn't contain the focus, simply hide the tooltip
else {
this.hideTooltip();
}
}
positionTooltip() {
const params = {
type: 'tooltip',
ePopup: this.tooltipComp.getGui(),
nudgeY: 18,
skipObserver: this.tooltipMouseTrack,
};
if (this.lastMouseEvent) {
this.popupSvc?.positionPopupUnderMouseEvent({
...params,
mouseEvent: this.lastMouseEvent,
});
}
else {
this.popupSvc?.positionPopupByComponent({
...params,
eventSource: this.tooltipCtrl.getGui(),
position: 'under',
keepWithinBounds: true,
nudgeY: 5,
});
}
}
destroyTooltipComp() {
// add class to fade out the tooltip
this.tooltipComp.getGui().classList.add('ag-tooltip-hiding');
// make local copies of these variables, as we use them in the async function below,
// and we clear then to 'undefined' later, so need to take a copy before they are undefined.
const tooltipPopupDestroyFunc = this.tooltipPopupDestroyFunc;
const tooltipComp = this.tooltipComp;
const delay = this.tooltipTrigger === TooltipTrigger.HOVER ? FADE_OUT_TOOLTIP_TIMEOUT : 0;
window.setTimeout(() => {
tooltipPopupDestroyFunc();
this.destroyBean(tooltipComp);
}, delay);
this.clearTooltipListeners();
this.tooltipPopupDestroyFunc = undefined;
this.tooltipComp = undefined;
}
clearTooltipListeners() {
[
this.tooltipMouseEnterListener,
this.tooltipMouseLeaveListener,
this.tooltipFocusInListener,
this.tooltipFocusOutListener,
].forEach((listener) => {
if (listener) {
listener();
}
});
this.tooltipMouseEnterListener =
this.tooltipMouseLeaveListener =
this.tooltipFocusInListener =
this.tooltipFocusOutListener =
null;
}
lockService() {
isLocked = true;
this.interactiveTooltipTimeoutId = window.setTimeout(() => {
this.unlockService();
this.setToDoNothing();
}, INTERACTIVE_HIDE_DELAY);
}
unlockService() {
isLocked = false;
this.clearInteractiveTimeout();
}
startHideTimeout() {
this.clearHideTimeout();
this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.getTooltipDelay('hide'));
}
clearShowTimeout() {
if (!this.showTooltipTimeoutId) {
return;
}
window.clearTimeout(this.showTooltipTimeoutId);
this.showTooltipTimeoutId = undefined;
}
clearHideTimeout() {
if (!this.hideTooltipTimeoutId) {
return;
}
window.clearTimeout(this.hideTooltipTimeoutId);
this.hideTooltipTimeoutId = undefined;
}
clearInteractiveTimeout() {
if (!this.interactiveTooltipTimeoutId) {
return;
}
window.clearTimeout(this.interactiveTooltipTimeoutId);
this.interactiveTooltipTimeoutId = undefined;
}
clearTimeouts() {
this.clearShowTimeout();
this.clearHideTimeout();
this.clearInteractiveTimeout();
}
}
exports.TooltipStateManager = TooltipStateManager;
/***/ }),
/***/ 7113:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UndoRedoService = void 0;
const beanStub_1 = __webpack_require__(8731);
const positionUtils_1 = __webpack_require__(6257);
const gridOptionsUtils_1 = __webpack_require__(7274);
const undoRedoStack_1 = __webpack_require__(2410);
class UndoRedoService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'undoRedo';
this.cellValueChanges = [];
this.activeCellEdit = null;
this.activeRowEdit = null;
this.isPasting = false;
this.isRangeInAction = false;
this.onCellValueChanged = (event) => {
const eventCell = { column: event.column, rowIndex: event.rowIndex, rowPinned: event.rowPinned };
const isCellEditing = this.activeCellEdit !== null && (0, positionUtils_1._areCellsEqual)(this.activeCellEdit, eventCell);
const isRowEditing = this.activeRowEdit !== null && (0, positionUtils_1._isSameRow)(this.activeRowEdit, eventCell);
const shouldCaptureAction = isCellEditing || isRowEditing || this.isPasting || this.isRangeInAction;
if (!shouldCaptureAction) {
return;
}
const { rowPinned, rowIndex, column, oldValue, value } = event;
const cellValueChange = {
rowPinned,
rowIndex: rowIndex,
columnId: column.getColId(),
newValue: value,
oldValue,
};
this.cellValueChanges.push(cellValueChange);
};
this.clearStacks = () => {
this.undoStack.clear();
this.redoStack.clear();
};
}
postConstruct() {
const { gos, ctrlsSvc } = this.beans;
if (!gos.get('undoRedoCellEditing')) {
return;
}
const undoRedoLimit = gos.get('undoRedoCellEditingLimit');
if (undoRedoLimit <= 0) {
return;
}
this.undoStack = new undoRedoStack_1.UndoRedoStack(undoRedoLimit);
this.redoStack = new undoRedoStack_1.UndoRedoStack(undoRedoLimit);
this.addListeners();
const listener = this.clearStacks.bind(this);
this.addManagedEventListeners({
cellValueChanged: this.onCellValueChanged.bind(this),
// undo / redo is restricted to actual editing so we clear the stacks when other operations are
// performed that change the order of the row / cols.
modelUpdated: (e) => {
if (!e.keepUndoRedoStack) {
this.clearStacks();
}
},
columnPivotModeChanged: listener,
newColumnsLoaded: listener,
columnGroupOpened: listener,
columnRowGroupChanged: listener,
columnMoved: listener,
columnPinned: listener,
columnVisible: listener,
rowDragEnd: listener,
});
ctrlsSvc.whenReady(this, (p) => {
this.gridBodyCtrl = p.gridBodyCtrl;
});
}
getCurrentUndoStackSize() {
return this.undoStack?.getCurrentStackSize() ?? 0;
}
getCurrentRedoStackSize() {
return this.redoStack?.getCurrentStackSize() ?? 0;
}
undo(source) {
const { eventSvc, undoStack, redoStack } = this;
eventSvc.dispatchEvent({
type: 'undoStarted',
source,
});
const operationPerformed = this.undoRedo(undoStack, redoStack, 'initialRange', 'oldValue', 'undo');
eventSvc.dispatchEvent({
type: 'undoEnded',
source,
operationPerformed,
});
}
redo(source) {
const { eventSvc, undoStack, redoStack } = this;
eventSvc.dispatchEvent({
type: 'redoStarted',
source,
});
const operationPerformed = this.undoRedo(redoStack, undoStack, 'finalRange', 'newValue', 'redo');
eventSvc.dispatchEvent({
type: 'redoEnded',
source,
operationPerformed,
});
}
undoRedo(undoRedoStack, opposingUndoRedoStack, rangeProperty, cellValueChangeProperty, source) {
if (!undoRedoStack) {
return false;
}
const undoRedoAction = undoRedoStack.pop();
if (!undoRedoAction || !undoRedoAction.cellValueChanges) {
return false;
}
this.processAction(undoRedoAction, (cellValueChange) => cellValueChange[cellValueChangeProperty], source);
if (undoRedoAction instanceof undoRedoStack_1.RangeUndoRedoAction) {
this.processRange(undoRedoAction.ranges || [undoRedoAction[rangeProperty]]);
}
else {
this.processCell(undoRedoAction.cellValueChanges);
}
opposingUndoRedoStack.push(undoRedoAction);
return true;
}
processAction(action, valueExtractor, source) {
action.cellValueChanges.forEach((cellValueChange) => {
const { rowIndex, rowPinned, columnId } = cellValueChange;
const rowPosition = { rowIndex, rowPinned };
const currentRow = (0, positionUtils_1._getRowNode)(this.beans, rowPosition);
// checks if the row has been filtered out
if (!currentRow.displayed) {
return;
}
currentRow.setDataValue(columnId, valueExtractor(cellValueChange), source);
});
}
processRange(ranges) {
let lastFocusedCell;
const rangeSvc = this.beans.rangeSvc;
rangeSvc.removeAllCellRanges(true);
ranges.forEach((range, idx) => {
if (!range) {
return;
}
const startRow = range.startRow;
const endRow = range.endRow;
if (idx === ranges.length - 1) {
lastFocusedCell = {
rowPinned: startRow.rowPinned,
rowIndex: startRow.rowIndex,
columnId: range.startColumn.getColId(),
};
this.setLastFocusedCell(lastFocusedCell);
}
const cellRangeParams = {
rowStartIndex: startRow.rowIndex,
rowStartPinned: startRow.rowPinned,
rowEndIndex: endRow.rowIndex,
rowEndPinned: endRow.rowPinned,
columnStart: range.startColumn,
columns: range.columns,
};
rangeSvc.addCellRange(cellRangeParams);
});
}
processCell(cellValueChanges) {
const cellValueChange = cellValueChanges[0];
const { rowIndex, rowPinned } = cellValueChange;
const rowPosition = { rowIndex, rowPinned };
const row = (0, positionUtils_1._getRowNode)(this.beans, rowPosition);
const lastFocusedCell = {
rowPinned: cellValueChange.rowPinned,
rowIndex: row.rowIndex,
columnId: cellValueChange.columnId,
};
// when single cells are being processed, they should be considered
// as ranges when the rangeSvc is present (singleCellRanges).
// otherwise focus will be restore but the range will not.
this.setLastFocusedCell(lastFocusedCell);
}
setLastFocusedCell(lastFocusedCell) {
const { rowIndex, columnId, rowPinned } = lastFocusedCell;
const { colModel, focusSvc, rangeSvc } = this.beans;
const column = colModel.getCol(columnId);
if (!column) {
return;
}
const { scrollFeature } = this.gridBodyCtrl;
scrollFeature.ensureIndexVisible(rowIndex);
scrollFeature.ensureColumnVisible(column);
const cellPosition = { rowIndex, column, rowPinned };
focusSvc.setFocusedCell({ ...cellPosition, forceBrowserFocus: true });
rangeSvc?.setRangeToCell(cellPosition);
}
addListeners() {
this.addManagedEventListeners({
rowEditingStarted: (e) => {
this.activeRowEdit = { rowIndex: e.rowIndex, rowPinned: e.rowPinned };
},
rowEditingStopped: () => {
const action = new undoRedoStack_1.UndoRedoAction(this.cellValueChanges);
this.pushActionsToUndoStack(action);
this.activeRowEdit = null;
},
cellEditingStarted: (e) => {
this.activeCellEdit = { column: e.column, rowIndex: e.rowIndex, rowPinned: e.rowPinned };
},
cellEditingStopped: (e) => {
this.activeCellEdit = null;
const shouldPushAction = e.valueChanged && !this.activeRowEdit && !this.isPasting && !this.isRangeInAction;
if (shouldPushAction) {
const action = new undoRedoStack_1.UndoRedoAction(this.cellValueChanges);
this.pushActionsToUndoStack(action);
}
},
pasteStart: () => {
this.isPasting = true;
},
pasteEnd: () => {
const action = new undoRedoStack_1.UndoRedoAction(this.cellValueChanges);
this.pushActionsToUndoStack(action);
this.isPasting = false;
},
fillStart: () => {
this.isRangeInAction = true;
},
fillEnd: (event) => {
const action = new undoRedoStack_1.RangeUndoRedoAction(this.cellValueChanges, event.initialRange, event.finalRange);
this.pushActionsToUndoStack(action);
this.isRangeInAction = false;
},
keyShortcutChangedCellStart: () => {
this.isRangeInAction = true;
},
keyShortcutChangedCellEnd: () => {
let action;
const { rangeSvc, gos } = this.beans;
if (rangeSvc && (0, gridOptionsUtils_1._isCellSelectionEnabled)(gos)) {
action = new undoRedoStack_1.RangeUndoRedoAction(this.cellValueChanges, undefined, undefined, [
...rangeSvc.getCellRanges(),
]);
}
else {
action = new undoRedoStack_1.UndoRedoAction(this.cellValueChanges);
}
this.pushActionsToUndoStack(action);
this.isRangeInAction = false;
},
});
}
pushActionsToUndoStack(action) {
this.undoStack.push(action);
this.cellValueChanges = [];
this.redoStack.clear();
}
}
exports.UndoRedoService = UndoRedoService;
/***/ }),
/***/ 2410:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.UndoRedoStack = exports.RangeUndoRedoAction = exports.UndoRedoAction = void 0;
class UndoRedoAction {
constructor(cellValueChanges) {
this.cellValueChanges = cellValueChanges;
}
}
exports.UndoRedoAction = UndoRedoAction;
class RangeUndoRedoAction extends UndoRedoAction {
constructor(cellValueChanges, initialRange, finalRange, ranges) {
super(cellValueChanges);
this.initialRange = initialRange;
this.finalRange = finalRange;
this.ranges = ranges;
}
}
exports.RangeUndoRedoAction = RangeUndoRedoAction;
const DEFAULT_STACK_SIZE = 10;
class UndoRedoStack {
constructor(maxStackSize) {
this.actionStack = [];
this.maxStackSize = maxStackSize ? maxStackSize : DEFAULT_STACK_SIZE;
this.actionStack = new Array(this.maxStackSize);
}
pop() {
return this.actionStack.pop();
}
push(item) {
const shouldAddActions = item.cellValueChanges && item.cellValueChanges.length > 0;
if (!shouldAddActions) {
return;
}
if (this.actionStack.length === this.maxStackSize) {
this.actionStack.shift();
}
this.actionStack.push(item);
}
clear() {
this.actionStack = [];
}
getCurrentStackSize() {
return this.actionStack.length;
}
}
exports.UndoRedoStack = UndoRedoStack;
/***/ }),
/***/ 5230:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._getAriaCheckboxStateName = exports._setAriaHasPopup = exports._setAriaControls = exports._setAriaChecked = exports._setAriaSelected = exports._removeAriaSort = exports._setAriaSort = exports._setAriaColSpan = exports._setAriaColIndex = exports._setAriaColCount = exports._setAriaRowSpan = exports._setAriaRowIndex = exports._setAriaRowCount = exports._setAriaMultiSelectable = exports._setAriaPosInSet = exports._setAriaSetSize = exports._removeAriaExpanded = exports._setAriaExpanded = exports._setAriaActiveDescendant = exports._setAriaHidden = exports._setAriaDisabled = exports._setAriaLevel = exports._setAriaRelevant = exports._setAriaAtomic = exports._setAriaLive = exports._setAriaDescribedBy = exports._setAriaLabelledBy = exports._setAriaLabel = exports._getAriaLabel = exports._getAriaPosInSet = exports._getAriaLevel = exports._getAriaSortState = exports._setAriaRole = void 0;
// ARIA HELPER FUNCTIONS
function _toggleAriaAttribute(element, attribute, value) {
if (value == null || (typeof value === 'string' && value == '')) {
_removeAriaAttribute(element, attribute);
}
else {
_setAriaAttribute(element, attribute, value);
}
}
function _setAriaAttribute(element, attribute, value) {
element.setAttribute(_ariaAttributeName(attribute), value.toString());
}
function _removeAriaAttribute(element, attribute) {
element.removeAttribute(_ariaAttributeName(attribute));
}
function _ariaAttributeName(attribute) {
return `aria-${attribute}`;
}
function _setAriaRole(element, role) {
if (role) {
element.setAttribute('role', role);
}
else {
element.removeAttribute('role');
}
}
exports._setAriaRole = _setAriaRole;
function _getAriaSortState(sortDirection) {
let sort;
if (sortDirection === 'asc') {
sort = 'ascending';
}
else if (sortDirection === 'desc') {
sort = 'descending';
}
else if (sortDirection === 'mixed') {
sort = 'other';
}
else {
sort = 'none';
}
return sort;
}
exports._getAriaSortState = _getAriaSortState;
// ARIA ATTRIBUTE GETTERS
function _getAriaLevel(element) {
return parseInt(element.getAttribute('aria-level'), 10);
}
exports._getAriaLevel = _getAriaLevel;
function _getAriaPosInSet(element) {
return parseInt(element.getAttribute('aria-posinset'), 10);
}
exports._getAriaPosInSet = _getAriaPosInSet;
function _getAriaLabel(element) {
return element.getAttribute('aria-label');
}
exports._getAriaLabel = _getAriaLabel;
// ARIA ATTRIBUTE SETTERS
function _setAriaLabel(element, label) {
_toggleAriaAttribute(element, 'label', label);
}
exports._setAriaLabel = _setAriaLabel;
function _setAriaLabelledBy(element, labelledBy) {
_toggleAriaAttribute(element, 'labelledby', labelledBy);
}
exports._setAriaLabelledBy = _setAriaLabelledBy;
function _setAriaDescribedBy(element, describedby) {
_toggleAriaAttribute(element, 'describedby', describedby);
}
exports._setAriaDescribedBy = _setAriaDescribedBy;
function _setAriaLive(element, live) {
_toggleAriaAttribute(element, 'live', live);
}
exports._setAriaLive = _setAriaLive;
function _setAriaAtomic(element, atomic) {
_toggleAriaAttribute(element, 'atomic', atomic);
}
exports._setAriaAtomic = _setAriaAtomic;
function _setAriaRelevant(element, relevant) {
_toggleAriaAttribute(element, 'relevant', relevant);
}
exports._setAriaRelevant = _setAriaRelevant;
function _setAriaLevel(element, level) {
_toggleAriaAttribute(element, 'level', level);
}
exports._setAriaLevel = _setAriaLevel;
function _setAriaDisabled(element, disabled) {
_toggleAriaAttribute(element, 'disabled', disabled);
}
exports._setAriaDisabled = _setAriaDisabled;
function _setAriaHidden(element, hidden) {
_toggleAriaAttribute(element, 'hidden', hidden);
}
exports._setAriaHidden = _setAriaHidden;
function _setAriaActiveDescendant(element, descendantId) {
_toggleAriaAttribute(element, 'activedescendant', descendantId);
}
exports._setAriaActiveDescendant = _setAriaActiveDescendant;
function _setAriaExpanded(element, expanded) {
_setAriaAttribute(element, 'expanded', expanded);
}
exports._setAriaExpanded = _setAriaExpanded;
function _removeAriaExpanded(element) {
_removeAriaAttribute(element, 'expanded');
}
exports._removeAriaExpanded = _removeAriaExpanded;
function _setAriaSetSize(element, setsize) {
_setAriaAttribute(element, 'setsize', setsize);
}
exports._setAriaSetSize = _setAriaSetSize;
function _setAriaPosInSet(element, position) {
_setAriaAttribute(element, 'posinset', position);
}
exports._setAriaPosInSet = _setAriaPosInSet;
function _setAriaMultiSelectable(element, multiSelectable) {
_setAriaAttribute(element, 'multiselectable', multiSelectable);
}
exports._setAriaMultiSelectable = _setAriaMultiSelectable;
function _setAriaRowCount(element, rowCount) {
_setAriaAttribute(element, 'rowcount', rowCount);
}
exports._setAriaRowCount = _setAriaRowCount;
function _setAriaRowIndex(element, rowIndex) {
_setAriaAttribute(element, 'rowindex', rowIndex);
}
exports._setAriaRowIndex = _setAriaRowIndex;
function _setAriaRowSpan(element, spanCount) {
_setAriaAttribute(element, 'rowspan', spanCount);
}
exports._setAriaRowSpan = _setAriaRowSpan;
function _setAriaColCount(element, colCount) {
_setAriaAttribute(element, 'colcount', colCount);
}
exports._setAriaColCount = _setAriaColCount;
function _setAriaColIndex(element, colIndex) {
_setAriaAttribute(element, 'colindex', colIndex);
}
exports._setAriaColIndex = _setAriaColIndex;
function _setAriaColSpan(element, colSpan) {
_setAriaAttribute(element, 'colspan', colSpan);
}
exports._setAriaColSpan = _setAriaColSpan;
function _setAriaSort(element, sort) {
_setAriaAttribute(element, 'sort', sort);
}
exports._setAriaSort = _setAriaSort;
function _removeAriaSort(element) {
_removeAriaAttribute(element, 'sort');
}
exports._removeAriaSort = _removeAriaSort;
function _setAriaSelected(element, selected) {
_toggleAriaAttribute(element, 'selected', selected);
}
exports._setAriaSelected = _setAriaSelected;
function _setAriaChecked(element, checked) {
_setAriaAttribute(element, 'checked', checked === undefined ? 'mixed' : checked);
}
exports._setAriaChecked = _setAriaChecked;
function _setAriaControls(controllerElement, controlledElement) {
_toggleAriaAttribute(controllerElement, 'controls', controlledElement.id);
_setAriaLabelledBy(controlledElement, controllerElement.id);
}
exports._setAriaControls = _setAriaControls;
function _setAriaHasPopup(element, hasPopup) {
_toggleAriaAttribute(element, 'haspopup', hasPopup === false ? null : hasPopup);
}
exports._setAriaHasPopup = _setAriaHasPopup;
function _getAriaCheckboxStateName(translate, state) {
return state === undefined
? translate('ariaIndeterminate', 'indeterminate')
: state === true
? translate('ariaChecked', 'checked')
: translate('ariaUnchecked', 'unchecked');
}
exports._getAriaCheckboxStateName = _getAriaCheckboxStateName;
/***/ }),
/***/ 1502:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._moveInArray = exports._removeFromArray = exports._sortNumerically = exports._areEqual = exports._last = exports._EmptyArray = void 0;
/** An array that is always empty and that cannot be modified */
exports._EmptyArray = Object.freeze([]);
function _last(arr) {
if (!arr?.length) {
return;
}
return arr[arr.length - 1];
}
exports._last = _last;
function _areEqual(a, b, comparator) {
if (a == null && b == null) {
return true;
}
return (a != null &&
b != null &&
a.length === b.length &&
a.every((value, index) => (comparator ? comparator(value, b[index]) : b[index] === value)));
}
exports._areEqual = _areEqual;
function _sortNumerically(array) {
return array.sort((a, b) => a - b);
}
exports._sortNumerically = _sortNumerically;
function _removeFromArray(array, object) {
const index = array.indexOf(object);
if (index >= 0) {
array.splice(index, 1);
}
}
exports._removeFromArray = _removeFromArray;
// should consider refactoring the callers to create a new array rather than mutating the original, which is expensive
function _moveInArray(array, objectsToMove, toIndex) {
// first take out items from the array
for (let i = 0; i < objectsToMove.length; i++) {
_removeFromArray(array, objectsToMove[i]);
}
// now add the objects, in same order as provided to us, that means we start at the end
// as the objects will be pushed to the right as they are inserted
for (let i = objectsToMove.length - 1; i >= 0; i--) {
array.splice(toIndex, 0, objectsToMove[i]);
}
}
exports._moveInArray = _moveInArray;
/***/ }),
/***/ 8667:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._isInvisibleScrollbar = exports._getScrollbarWidth = exports._getMaxDivHeight = exports._getTabIndex = exports._isIOSUserAgent = exports._isMacOsUserAgent = exports._isBrowserFirefox = exports._isBrowserChrome = exports._isBrowserSafari = void 0;
/**
* These variables are lazy loaded, as otherwise they try and get initialised when we are loading
* unit tests and we don't have references to window or document in the unit tests
*/
let isSafari;
let isChrome;
let isFirefox;
let isMacOs;
let isIOS;
let invisibleScrollbar;
let browserScrollbarWidth;
let maxDivHeight;
function _isBrowserSafari() {
if (isSafari === undefined) {
isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
}
return isSafari;
}
exports._isBrowserSafari = _isBrowserSafari;
/**
* Returns true for Chrome and also for Edge (Chromium)
*/
function _isBrowserChrome() {
if (isChrome === undefined) {
const win = window;
isChrome =
(!!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime)) ||
(/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor));
}
return isChrome;
}
exports._isBrowserChrome = _isBrowserChrome;
function _isBrowserFirefox() {
if (isFirefox === undefined) {
isFirefox = /(firefox)/i.test(navigator.userAgent);
}
return isFirefox;
}
exports._isBrowserFirefox = _isBrowserFirefox;
function _isMacOsUserAgent() {
if (isMacOs === undefined) {
isMacOs = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
}
return isMacOs;
}
exports._isMacOsUserAgent = _isMacOsUserAgent;
function _isIOSUserAgent() {
if (isIOS === undefined) {
isIOS =
/iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
}
return isIOS;
}
exports._isIOSUserAgent = _isIOSUserAgent;
function _getTabIndex(el) {
if (!el) {
return null;
}
const numberTabIndex = el.tabIndex;
const tabIndex = el.getAttribute('tabIndex');
if (numberTabIndex === -1 && (tabIndex === null || (tabIndex === '' && !_isBrowserFirefox()))) {
return null;
}
return numberTabIndex.toString();
}
exports._getTabIndex = _getTabIndex;
function _getMaxDivHeight() {
if (maxDivHeight !== undefined) {
return maxDivHeight;
}
if (!document.body) {
return -1;
}
let res = 1000000;
// FF reports the height back but still renders blank after ~6M px
const testUpTo = _isBrowserFirefox() ? 6000000 : 1000000000;
const div = document.createElement('div');
document.body.appendChild(div);
while (true) {
const test = res * 2;
div.style.height = test + 'px';
if (test > testUpTo || div.clientHeight !== test) {
break;
}
else {
res = test;
}
}
document.body.removeChild(div);
maxDivHeight = res;
return res;
}
exports._getMaxDivHeight = _getMaxDivHeight;
function _getScrollbarWidth() {
if (browserScrollbarWidth == null) {
initScrollbarWidthAndVisibility();
}
return browserScrollbarWidth;
}
exports._getScrollbarWidth = _getScrollbarWidth;
function initScrollbarWidthAndVisibility() {
const body = document.body;
const div = document.createElement('div');
div.style.width = div.style.height = '100px';
div.style.opacity = '0';
div.style.overflow = 'scroll';
div.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps
div.style.position = 'absolute';
body.appendChild(div);
let width = div.offsetWidth - div.clientWidth;
// if width is 0 and client width is 0, means the DOM isn't ready
if (width === 0 && div.clientWidth === 0) {
width = null;
}
// remove div
if (div.parentNode) {
div.parentNode.removeChild(div);
}
if (width != null) {
browserScrollbarWidth = width;
invisibleScrollbar = width === 0;
}
}
function _isInvisibleScrollbar() {
if (invisibleScrollbar == null) {
initScrollbarWidthAndVisibility();
}
return invisibleScrollbar;
}
exports._isInvisibleScrollbar = _isInvisibleScrollbar;
/***/ }),
/***/ 6800:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ChangedPath = void 0;
// when doing transactions, or change detection, and grouping is present
// in the data, there is no need for the ClientSideRowModel to update each
// group after an update, ony parts that were impacted by the change.
// this class keeps track of all groups that were impacted by a transaction.
// the the different CSRM operations (filter, sort etc) use the forEach method
// to visit each group that was changed.
class ChangedPath {
constructor(keepingColumns, rootNode) {
// whether changed path is active of not. it is active when a) doing
// a transaction update or b) doing change detection. if we are doing
// a CSRM refresh for other reasons (after sort or filter, or user calling
// setRowData() without delta mode) then we are not active. we are also
// marked as not active if secondary columns change in pivot (as this impacts
// aggregations).
// can be set inactive by:
// a) ClientSideRowModel, if no transactions or
// b) PivotService, if secondary columns changed
this.active = true;
// for each node in the change path, we also store which columns need
// to be re-aggregated.
this.nodeIdsToColumns = {};
// for quick lookup, all items in the change path are mapped by nodeId
this.mapToItems = {};
this.keepingColumns = keepingColumns;
this.pathRoot = {
rowNode: rootNode,
children: null,
};
this.mapToItems[rootNode.id] = this.pathRoot;
}
depthFirstSearchChangedPath(pathItem, callback) {
const { rowNode, children } = pathItem;
if (children) {
for (let i = 0; i < children.length; ++i) {
this.depthFirstSearchChangedPath(children[i], callback);
}
}
callback(rowNode);
}
depthFirstSearchEverything(rowNode, callback, traverseEverything) {
const childrenAfterGroup = rowNode.childrenAfterGroup;
if (childrenAfterGroup) {
for (let i = 0, len = childrenAfterGroup.length; i < len; ++i) {
const childNode = childrenAfterGroup[i];
if (childNode.childrenAfterGroup) {
this.depthFirstSearchEverything(childNode, callback, traverseEverything);
}
else if (traverseEverything) {
callback(childNode);
}
}
}
callback(rowNode);
}
// traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback
// will be called for child nodes in addition to parent nodes.
forEachChangedNodeDepthFirst(callback, traverseLeafNodes = false, includeUnchangedNodes = false) {
if (this.active && !includeUnchangedNodes) {
// if we are active, then use the change path to callback
// only for updated groups
this.depthFirstSearchChangedPath(this.pathRoot, callback);
}
else {
// we are not active, so callback for everything, walk the entire path
this.depthFirstSearchEverything(this.pathRoot.rowNode, callback, traverseLeafNodes);
}
}
executeFromRootNode(callback) {
callback(this.pathRoot.rowNode);
}
createPathItems(rowNode) {
let pointer = rowNode;
let newEntryCount = 0;
while (!this.mapToItems[pointer.id]) {
const newEntry = {
rowNode: pointer,
children: null,
};
this.mapToItems[pointer.id] = newEntry;
newEntryCount++;
pointer = pointer.parent;
}
return newEntryCount;
}
populateColumnsMap(rowNode, columns) {
if (!this.keepingColumns || !columns) {
return;
}
let pointer = rowNode;
while (pointer) {
// if columns, add the columns in all the way to parent, merging
// in any other columns that might be there already
if (!this.nodeIdsToColumns[pointer.id]) {
this.nodeIdsToColumns[pointer.id] = {};
}
columns.forEach((col) => (this.nodeIdsToColumns[pointer.id][col.getId()] = true));
pointer = pointer.parent;
}
}
linkPathItems(rowNode, newEntryCount) {
let pointer = rowNode;
for (let i = 0; i < newEntryCount; i++) {
const thisItem = this.mapToItems[pointer.id];
const parentItem = this.mapToItems[pointer.parent.id];
if (!parentItem.children) {
parentItem.children = [];
}
parentItem.children.push(thisItem);
pointer = pointer.parent;
}
}
// called by
// 1) change detection (provides cols) and
// 2) groupStage if doing transaction update (doesn't provide cols)
addParentNode(rowNode, columns) {
if (!rowNode || rowNode.isRowPinned()) {
return;
}
// we cannot do both steps below in the same loop as
// the second loop has a dependency on the first loop.
// ie the hierarchy cannot be stitched up yet because
// we don't have it built yet
// create the new PathItem objects.
const newEntryCount = this.createPathItems(rowNode);
// link in the node items
this.linkPathItems(rowNode, newEntryCount);
// update columns
this.populateColumnsMap(rowNode, columns);
}
canSkip(rowNode) {
return this.active && !this.mapToItems[rowNode.id];
}
getValueColumnsForNode(rowNode, valueColumns) {
if (!this.keepingColumns) {
return valueColumns;
}
const colsForThisNode = this.nodeIdsToColumns[rowNode.id];
const result = valueColumns.filter((col) => colsForThisNode[col.getId()]);
return result;
}
getNotValueColumnsForNode(rowNode, valueColumns) {
if (!this.keepingColumns) {
return null;
}
const colsForThisNode = this.nodeIdsToColumns[rowNode.id];
const result = valueColumns.filter((col) => !colsForThisNode[col.getId()]);
return result;
}
}
exports.ChangedPath = ChangedPath;
/***/ }),
/***/ 9827:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._parseDateTimeFromString = exports._dateToFormattedString = exports._serialiseDate = void 0;
function _padStartWidthZeros(value, totalStringSize) {
return value.toString().padStart(totalStringSize, '0');
}
/**
* Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.
* An alternative separator can be provided to be used instead of hyphens.
* @param date The date to serialise
* @param includeTime Whether to include the time in the serialised string
* @param separator The separator to use between date parts
*/
function _serialiseDate(date, includeTime = true, separator = '-') {
if (!date) {
return null;
}
let serialised = [date.getFullYear(), date.getMonth() + 1, date.getDate()]
.map((part) => _padStartWidthZeros(part, 2))
.join(separator);
if (includeTime) {
serialised +=
' ' +
[date.getHours(), date.getMinutes(), date.getSeconds()]
.map((part) => _padStartWidthZeros(part, 2))
.join(':');
}
return serialised;
}
exports._serialiseDate = _serialiseDate;
const calculateOrdinal = (value) => {
if (value > 3 && value < 21) {
return 'th';
}
const remainder = value % 10;
switch (remainder) {
case 1:
return 'st';
case 2:
return 'nd';
case 3:
return 'rd';
}
return 'th';
};
/**
* Serialises a Date to a string of format the defined format, does not include time.
* @param date The date to serialise
* @param format The string to format the date to, defaults to YYYY-MM-DD
*/
function _dateToFormattedString(date, format = 'YYYY-MM-DD') {
const fullYear = _padStartWidthZeros(date.getFullYear(), 4);
const months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December',
];
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const replace = {
YYYY: () => fullYear.slice(fullYear.length - 4, fullYear.length),
YY: () => fullYear.slice(fullYear.length - 2, fullYear.length),
Y: () => `${date.getFullYear()}`,
MMMM: () => months[date.getMonth()],
MMM: () => months[date.getMonth()].slice(0, 3),
MM: () => _padStartWidthZeros(date.getMonth() + 1, 2),
Mo: () => `${date.getMonth() + 1}${calculateOrdinal(date.getMonth() + 1)}`,
M: () => `${date.getMonth() + 1}`,
Do: () => `${date.getDate()}${calculateOrdinal(date.getDate())}`,
DD: () => _padStartWidthZeros(date.getDate(), 2),
D: () => `${date.getDate()}`,
dddd: () => days[date.getDay()],
ddd: () => days[date.getDay()].slice(0, 3),
dd: () => days[date.getDay()].slice(0, 2),
do: () => `${date.getDay()}${calculateOrdinal(date.getDay())}`,
d: () => `${date.getDay()}`,
};
const regexp = new RegExp(Object.keys(replace).join('|'), 'g');
return format.replace(regexp, (match) => {
if (match in replace) {
return replace[match]();
}
return match;
});
}
exports._dateToFormattedString = _dateToFormattedString;
/**
* Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`
*/
function _parseDateTimeFromString(value) {
if (!value) {
return null;
}
const [dateStr, timeStr] = value.split(' ');
if (!dateStr) {
return null;
}
const fields = dateStr.split('-').map((f) => parseInt(f, 10));
if (fields.filter((f) => !isNaN(f)).length !== 3) {
return null;
}
const [year, month, day] = fields;
const date = new Date(year, month - 1, day);
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {
// date was not parsed as expected so must have been invalid
return null;
}
if (!timeStr || timeStr === '00:00:00') {
return date;
}
const [hours, minutes, seconds] = timeStr.split(':').map((part) => parseInt(part, 10));
if (hours >= 0 && hours < 24) {
date.setHours(hours);
}
if (minutes >= 0 && minutes < 60) {
date.setMinutes(minutes);
}
if (seconds >= 0 && seconds < 60) {
date.setSeconds(seconds);
}
return date;
}
exports._parseDateTimeFromString = _parseDateTimeFromString;
/***/ }),
/***/ 3507:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._preserveRangesWhile = exports._getTextSelectionRanges = exports._observeResize = exports._bindCellRendererToHtmlElement = exports._nodeListForEach = exports._addOrRemoveAttribute = exports._iterateNamedNodeMap = exports._copyNodeList = exports._isNodeOrElement = exports._formatSize = exports._setFixedHeight = exports._setElementHeight = exports._setFixedWidth = exports._setElementWidth = exports._isVerticalScrollShowing = exports._isHorizontalScrollShowing = exports._addStylesToElement = exports._insertWithDomOrder = exports._setDomChildOrder = exports._ensureDomOrder = exports._loadTemplate = exports._isVisible = exports._isInDOM = exports._removeFromParent = exports._clearElement = exports._setScrollLeft = exports._getScrollLeft = exports._isRtlNegativeScroll = exports._getElementRectWithOffset = exports._getAbsoluteWidth = exports._getAbsoluteHeight = exports._getInnerWidth = exports._getInnerHeight = exports._getElementSize = exports._isElementChildOfClass = exports._setDisabled = exports._setVisible = exports._setDisplayed = exports._isFocusableFormField = exports.FOCUSABLE_EXCLUDE = exports.FOCUSABLE_SELECTOR = exports._radioCssClass = void 0;
const gridOptionsUtils_1 = __webpack_require__(7274);
const aria_1 = __webpack_require__(5230);
const browser_1 = __webpack_require__(8667);
let rtlNegativeScroll;
/**
* This method adds a class to an element and remove that class from all siblings.
* Useful for toggling state.
* @param {HTMLElement} element The element to receive the class
* @param {string} elementClass The class to be assigned to the element
* @param {boolean} otherElementClass The class to be assigned to siblings of the element, but not the element itself
*/
function _radioCssClass(element, elementClass, otherElementClass) {
const parent = element.parentElement;
let sibling = parent && parent.firstChild;
while (sibling) {
if (elementClass) {
sibling.classList.toggle(elementClass, sibling === element);
}
if (otherElementClass) {
sibling.classList.toggle(otherElementClass, sibling !== element);
}
sibling = sibling.nextSibling;
}
}
exports._radioCssClass = _radioCssClass;
exports.FOCUSABLE_SELECTOR = '[tabindex], input, select, button, textarea, [href]';
exports.FOCUSABLE_EXCLUDE = '[disabled], .ag-disabled:not(.ag-button), .ag-disabled *';
function _isFocusableFormField(element) {
const matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
const inputSelector = 'input, select, button, textarea';
const isFocusable = matches.call(element, inputSelector);
const isNotFocusable = matches.call(element, exports.FOCUSABLE_EXCLUDE);
const isElementVisible = _isVisible(element);
const focusable = isFocusable && !isNotFocusable && isElementVisible;
return focusable;
}
exports._isFocusableFormField = _isFocusableFormField;
function _setDisplayed(element, displayed, options = {}) {
const { skipAriaHidden } = options;
element.classList.toggle('ag-hidden', !displayed);
if (!skipAriaHidden) {
(0, aria_1._setAriaHidden)(element, !displayed);
}
}
exports._setDisplayed = _setDisplayed;
function _setVisible(element, visible, options = {}) {
const { skipAriaHidden } = options;
element.classList.toggle('ag-invisible', !visible);
if (!skipAriaHidden) {
(0, aria_1._setAriaHidden)(element, !visible);
}
}
exports._setVisible = _setVisible;
function _setDisabled(element, disabled) {
const attributeName = 'disabled';
const addOrRemoveDisabledAttribute = disabled
? (e) => e.setAttribute(attributeName, '')
: (e) => e.removeAttribute(attributeName);
addOrRemoveDisabledAttribute(element);
_nodeListForEach(element.querySelectorAll('input'), (input) => addOrRemoveDisabledAttribute(input));
}
exports._setDisabled = _setDisabled;
function _isElementChildOfClass(element, cls, maxNest) {
let counter = 0;
while (element) {
if (element.classList.contains(cls)) {
return true;
}
element = element.parentElement;
if (typeof maxNest == 'number') {
if (++counter > maxNest) {
break;
}
}
else if (element === maxNest) {
break;
}
}
return false;
}
exports._isElementChildOfClass = _isElementChildOfClass;
// returns back sizes as doubles instead of strings. similar to
// getBoundingClientRect, however getBoundingClientRect does not:
// a) work with fractions (eg browser is zooming)
// b) has CSS transitions applied (eg CSS scale, browser zoom), which we don't want, we want the un-transitioned values
function _getElementSize(el) {
const { height, width, borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth, paddingTop, paddingRight, paddingBottom, paddingLeft, marginTop, marginRight, marginBottom, marginLeft, boxSizing, } = window.getComputedStyle(el);
return {
height: parseFloat(height || '0'),
width: parseFloat(width || '0'),
borderTopWidth: parseFloat(borderTopWidth || '0'),
borderRightWidth: parseFloat(borderRightWidth || '0'),
borderBottomWidth: parseFloat(borderBottomWidth || '0'),
borderLeftWidth: parseFloat(borderLeftWidth || '0'),
paddingTop: parseFloat(paddingTop || '0'),
paddingRight: parseFloat(paddingRight || '0'),
paddingBottom: parseFloat(paddingBottom || '0'),
paddingLeft: parseFloat(paddingLeft || '0'),
marginTop: parseFloat(marginTop || '0'),
marginRight: parseFloat(marginRight || '0'),
marginBottom: parseFloat(marginBottom || '0'),
marginLeft: parseFloat(marginLeft || '0'),
boxSizing,
};
}
exports._getElementSize = _getElementSize;
function _getInnerHeight(el) {
const size = _getElementSize(el);
if (size.boxSizing === 'border-box') {
return size.height - size.paddingTop - size.paddingBottom;
}
return size.height;
}
exports._getInnerHeight = _getInnerHeight;
function _getInnerWidth(el) {
const size = _getElementSize(el);
if (size.boxSizing === 'border-box') {
return size.width - size.paddingLeft - size.paddingRight;
}
return size.width;
}
exports._getInnerWidth = _getInnerWidth;
function _getAbsoluteHeight(el) {
const { height, marginBottom, marginTop } = _getElementSize(el);
return Math.floor(height + marginBottom + marginTop);
}
exports._getAbsoluteHeight = _getAbsoluteHeight;
function _getAbsoluteWidth(el) {
const { width, marginLeft, marginRight } = _getElementSize(el);
return Math.floor(width + marginLeft + marginRight);
}
exports._getAbsoluteWidth = _getAbsoluteWidth;
function _getElementRectWithOffset(el) {
const offsetElementRect = el.getBoundingClientRect();
const { borderTopWidth, borderLeftWidth, borderRightWidth, borderBottomWidth } = _getElementSize(el);
return {
top: offsetElementRect.top + (borderTopWidth || 0),
left: offsetElementRect.left + (borderLeftWidth || 0),
right: offsetElementRect.right + (borderRightWidth || 0),
bottom: offsetElementRect.bottom + (borderBottomWidth || 0),
};
}
exports._getElementRectWithOffset = _getElementRectWithOffset;
function _isRtlNegativeScroll() {
if (typeof rtlNegativeScroll === 'boolean') {
return rtlNegativeScroll;
}
const template = document.createElement('div');
template.style.direction = 'rtl';
template.style.width = '1px';
template.style.height = '1px';
template.style.position = 'fixed';
template.style.top = '0px';
template.style.overflow = 'hidden';
template.dir = 'rtl';
template.innerHTML =
/* html */
`
`;
document.body.appendChild(template);
template.scrollLeft = 1;
rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;
document.body.removeChild(template);
return rtlNegativeScroll;
}
exports._isRtlNegativeScroll = _isRtlNegativeScroll;
function _getScrollLeft(element, rtl) {
let scrollLeft = element.scrollLeft;
if (rtl) {
// Absolute value - for FF that reports RTL scrolls in negative numbers
scrollLeft = Math.abs(scrollLeft);
if ((0, browser_1._isBrowserChrome)() && !_isRtlNegativeScroll()) {
scrollLeft = element.scrollWidth - element.getBoundingClientRect().width - scrollLeft;
}
}
return scrollLeft;
}
exports._getScrollLeft = _getScrollLeft;
function _setScrollLeft(element, value, rtl) {
if (rtl) {
// Chrome and Safari when doing RTL have the END position of the scroll as zero, not the start
if (_isRtlNegativeScroll()) {
value *= -1;
}
else if ((0, browser_1._isBrowserSafari)() || (0, browser_1._isBrowserChrome)()) {
value = element.scrollWidth - element.getBoundingClientRect().width - value;
}
}
element.scrollLeft = value;
}
exports._setScrollLeft = _setScrollLeft;
function _clearElement(el) {
while (el && el.firstChild) {
el.removeChild(el.firstChild);
}
}
exports._clearElement = _clearElement;
function _removeFromParent(node) {
if (node && node.parentNode) {
node.parentNode.removeChild(node);
}
}
exports._removeFromParent = _removeFromParent;
function _isInDOM(element) {
return !!element.offsetParent;
}
exports._isInDOM = _isInDOM;
function _isVisible(element) {
const el = element;
if (el.checkVisibility) {
return el.checkVisibility({ checkVisibilityCSS: true });
}
const isHidden = !_isInDOM(element) || window.getComputedStyle(element).visibility !== 'visible';
return !isHidden;
}
exports._isVisible = _isVisible;
/**
* Loads the template and returns it as an element. makes up for no simple way in
* the dom api to load html directly, eg we cannot do this: document.createElement(template)
* @param {string} template
* @returns {HTMLElement}
*/
function _loadTemplate(template) {
const tempDiv = document.createElement('div');
tempDiv.innerHTML = (template || '').trim();
return tempDiv.firstChild;
}
exports._loadTemplate = _loadTemplate;
function _ensureDomOrder(eContainer, eChild, eChildBefore) {
// if already in right order, do nothing
if (eChildBefore && eChildBefore.nextSibling === eChild) {
return;
}
if (!eContainer.firstChild) {
eContainer.appendChild(eChild);
}
else if (eChildBefore) {
if (eChildBefore.nextSibling) {
// insert between the eRowBefore and the row after it
eContainer.insertBefore(eChild, eChildBefore.nextSibling);
}
else {
// if nextSibling is missing, means other row is at end, so just append new row at the end
eContainer.appendChild(eChild);
}
}
else if (eContainer.firstChild && eContainer.firstChild !== eChild) {
// otherwise put at start
// insert it at the first location
eContainer.insertAdjacentElement('afterbegin', eChild);
}
}
exports._ensureDomOrder = _ensureDomOrder;
function _setDomChildOrder(eContainer, orderedChildren) {
for (let i = 0; i < orderedChildren.length; i++) {
const correctCellAtIndex = orderedChildren[i];
const actualCellAtIndex = eContainer.children[i];
if (actualCellAtIndex !== correctCellAtIndex) {
eContainer.insertBefore(correctCellAtIndex, actualCellAtIndex);
}
}
}
exports._setDomChildOrder = _setDomChildOrder;
function _insertWithDomOrder(eContainer, eToInsert, eChildBefore) {
if (eChildBefore) {
// if previous element exists, just slot in after the previous element
eChildBefore.insertAdjacentElement('afterend', eToInsert);
}
else {
if (eContainer.firstChild) {
// insert it at the first location
eContainer.insertAdjacentElement('afterbegin', eToInsert);
}
else {
// otherwise eContainer is empty, so just append it
eContainer.appendChild(eToInsert);
}
}
}
exports._insertWithDomOrder = _insertWithDomOrder;
/**
* Converts a camelCase string into hyphenated string
* @param {string} camelCase
* @return {string}
*/
function _camelCaseToHyphenated(camelCase) {
return camelCase.replace(/[A-Z]/g, (s) => `-${s.toLocaleLowerCase()}`);
}
function _addStylesToElement(eElement, styles) {
if (!styles) {
return;
}
for (const key of Object.keys(styles)) {
const value = styles[key];
if (!key || !key.length || value == null) {
continue;
}
// changes the key from camelCase into a hyphenated-string
const parsedKey = _camelCaseToHyphenated(key);
const valueAsString = value.toString();
const parsedValue = valueAsString.replace(/\s*!important/g, '');
const priority = parsedValue.length != valueAsString.length ? 'important' : undefined;
eElement.style.setProperty(parsedKey, parsedValue, priority);
}
}
exports._addStylesToElement = _addStylesToElement;
function _isHorizontalScrollShowing(element) {
return element.clientWidth < element.scrollWidth;
}
exports._isHorizontalScrollShowing = _isHorizontalScrollShowing;
function _isVerticalScrollShowing(element) {
return element.clientHeight < element.scrollHeight;
}
exports._isVerticalScrollShowing = _isVerticalScrollShowing;
function _setElementWidth(element, width) {
if (width === 'flex') {
element.style.removeProperty('width');
element.style.removeProperty('minWidth');
element.style.removeProperty('maxWidth');
element.style.flex = '1 1 auto';
}
else {
_setFixedWidth(element, width);
}
}
exports._setElementWidth = _setElementWidth;
function _setFixedWidth(element, width) {
width = _formatSize(width);
element.style.width = width.toString();
element.style.maxWidth = width.toString();
element.style.minWidth = width.toString();
}
exports._setFixedWidth = _setFixedWidth;
function _setElementHeight(element, height) {
if (height === 'flex') {
element.style.removeProperty('height');
element.style.removeProperty('minHeight');
element.style.removeProperty('maxHeight');
element.style.flex = '1 1 auto';
}
else {
_setFixedHeight(element, height);
}
}
exports._setElementHeight = _setElementHeight;
function _setFixedHeight(element, height) {
height = _formatSize(height);
element.style.height = height.toString();
element.style.maxHeight = height.toString();
element.style.minHeight = height.toString();
}
exports._setFixedHeight = _setFixedHeight;
function _formatSize(size) {
if (typeof size === 'number') {
return `${size}px`;
}
return size;
}
exports._formatSize = _formatSize;
function _isNodeOrElement(o) {
return o instanceof Node || o instanceof HTMLElement;
}
exports._isNodeOrElement = _isNodeOrElement;
/**
* Makes a copy of a node list into a list
* @param {NodeList} nodeList
* @returns {Node[]}
*/
function _copyNodeList(nodeList) {
if (nodeList == null) {
return [];
}
const result = [];
_nodeListForEach(nodeList, (node) => result.push(node));
return result;
}
exports._copyNodeList = _copyNodeList;
function _iterateNamedNodeMap(map, callback) {
if (!map) {
return;
}
for (let i = 0; i < map.length; i++) {
const attr = map[i];
callback(attr.name, attr.value);
}
}
exports._iterateNamedNodeMap = _iterateNamedNodeMap;
function _addOrRemoveAttribute(element, name, value) {
if (value == null || value === '') {
element.removeAttribute(name);
}
else {
element.setAttribute(name, value.toString());
}
}
exports._addOrRemoveAttribute = _addOrRemoveAttribute;
function _nodeListForEach(nodeList, action) {
if (nodeList == null) {
return;
}
for (let i = 0; i < nodeList.length; i++) {
action(nodeList[i]);
}
}
exports._nodeListForEach = _nodeListForEach;
/**
* cell renderers are used in a few places. they bind to dom slightly differently to other cell renders as they
* can return back strings (instead of html element) in the getGui() method. common code placed here to handle that.
* @param {AgPromise} cellRendererPromise
* @param {HTMLElement} eTarget
*/
function _bindCellRendererToHtmlElement(cellRendererPromise, eTarget) {
cellRendererPromise.then((cellRenderer) => {
const gui = cellRenderer.getGui();
if (gui != null) {
if (typeof gui === 'object') {
eTarget.appendChild(gui);
}
else {
eTarget.innerHTML = gui;
}
}
});
}
exports._bindCellRendererToHtmlElement = _bindCellRendererToHtmlElement;
function _observeResize(beans, element, callback) {
const win = (0, gridOptionsUtils_1._getWindow)(beans);
const ResizeObserverImpl = win.ResizeObserver;
const resizeObserver = ResizeObserverImpl ? new ResizeObserverImpl(callback) : null;
resizeObserver?.observe(element);
return () => resizeObserver?.disconnect();
}
exports._observeResize = _observeResize;
function _getTextSelectionRanges(beans) {
const rootNode = (0, gridOptionsUtils_1._getRootNode)(beans);
const selection = 'getSelection' in rootNode ? rootNode.getSelection() : null;
const ranges = [];
for (let i = 0; i < (selection?.rangeCount ?? 0); i++) {
const range = selection?.getRangeAt(i);
if (range) {
ranges.push(range);
}
}
return { selection, ranges };
}
exports._getTextSelectionRanges = _getTextSelectionRanges;
/**
* FF and Safari remove text selections when the focus changes. This is inconsistent with Chrome, whose behaviour
* we prefer in this case. This utility preserves whatever text selection exists before the given action is taken.
*/
function _preserveRangesWhile(beans, fn) {
const enableCellTextSelection = beans.gos.get('enableCellTextSelection');
if (!enableCellTextSelection) {
return fn();
}
if (!(0, browser_1._isBrowserFirefox)() && !(0, browser_1._isBrowserSafari)()) {
return fn();
}
const { selection, ranges } = _getTextSelectionRanges(beans);
fn();
selection?.removeAllRanges();
for (const range of ranges) {
selection?.addRange(range);
}
}
exports._preserveRangesWhile = _preserveRangesWhile;
/***/ }),
/***/ 2979:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getPassiveStateForEvent = exports._addSafePassiveEventListener = exports._getEventPath = exports._createEventPath = exports._isElementInEventPath = exports._getCtrlForEventTarget = exports._isEventSupported = exports._isStopPropagationForAgGrid = exports._stopPropagationForAgGrid = void 0;
const gridOptionsUtils_1 = __webpack_require__(7274);
const AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';
const PASSIVE_EVENTS = ['touchstart', 'touchend', 'touchmove', 'touchcancel', 'scroll'];
const NON_PASSIVE_EVENTS = ['wheel'];
const supports = {};
/**
* a user once raised an issue - they said that when you opened a popup (eg context menu)
* and then clicked on a selection checkbox, the popup wasn't closed. this is because the
* popup listens for clicks on the body, however ag-grid WAS stopping propagation on the
* checkbox clicks (so the rows didn't pick them up as row selection selection clicks).
* to get around this, we have a pattern to stop propagation for the purposes of AG Grid,
* but we still let the event pass back to the body.
* @param {Event} event
*/
function _stopPropagationForAgGrid(event) {
event[AG_GRID_STOP_PROPAGATION] = true;
}
exports._stopPropagationForAgGrid = _stopPropagationForAgGrid;
function _isStopPropagationForAgGrid(event) {
return event[AG_GRID_STOP_PROPAGATION] === true;
}
exports._isStopPropagationForAgGrid = _isStopPropagationForAgGrid;
exports._isEventSupported = (() => {
const tags = {
select: 'input',
change: 'input',
submit: 'form',
reset: 'form',
error: 'img',
load: 'img',
abort: 'img',
};
const eventChecker = (eventName) => {
if (typeof supports[eventName] === 'boolean') {
return supports[eventName];
}
const el = document.createElement(tags[eventName] || 'div');
eventName = 'on' + eventName;
return (supports[eventName] = eventName in el);
};
return eventChecker;
})();
function _getCtrlForEventTarget(gos, eventTarget, type) {
let sourceElement = eventTarget;
while (sourceElement) {
const renderedComp = (0, gridOptionsUtils_1._getDomData)(gos, sourceElement, type);
if (renderedComp) {
return renderedComp;
}
sourceElement = sourceElement.parentElement;
}
return null;
}
exports._getCtrlForEventTarget = _getCtrlForEventTarget;
function _isElementInEventPath(element, event) {
if (!event || !element) {
return false;
}
return _getEventPath(event).indexOf(element) >= 0;
}
exports._isElementInEventPath = _isElementInEventPath;
function _createEventPath(event) {
const res = [];
let pointer = event.target;
while (pointer) {
res.push(pointer);
pointer = pointer.parentElement;
}
return res;
}
exports._createEventPath = _createEventPath;
/**
* Gets the path for a browser Event or from the target on an AG Grid Event
* https://developer.mozilla.org/en-US/docs/Web/API/Event
* @param {Event| { target: EventTarget }} event
* @returns {EventTarget[]}
*/
function _getEventPath(event) {
// This can be called with either a browser event or an AG Grid Event that has a target property.
const eventNoType = event;
if (eventNoType.path) {
return eventNoType.path;
}
if (eventNoType.composedPath) {
return eventNoType.composedPath();
}
// If this is an AG Grid event build the path ourselves
return _createEventPath(eventNoType);
}
exports._getEventPath = _getEventPath;
function _addSafePassiveEventListener(frameworkOverrides, eElement, event, listener) {
const passive = (0, exports.getPassiveStateForEvent)(event);
let options;
if (passive != null) {
options = { passive };
}
// this check is here for certain scenarios where I believe the user must be destroying
// the grid somehow but continuing for it to be used
if (frameworkOverrides && frameworkOverrides.addEventListener) {
frameworkOverrides.addEventListener(eElement, event, listener, options);
}
}
exports._addSafePassiveEventListener = _addSafePassiveEventListener;
const getPassiveStateForEvent = (event) => {
const isPassive = PASSIVE_EVENTS.includes(event);
const isNonPassive = NON_PASSIVE_EVENTS.includes(event);
if (isPassive) {
return true;
}
if (isNonPassive) {
return false;
}
};
exports.getPassiveStateForEvent = getPassiveStateForEvent;
/***/ }),
/***/ 2331:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._focusNextGridCoreContainer = exports._isCellFocusSuppressed = exports._isHeaderFocusSuppressed = exports._focusGridInnerElement = exports._findTabbableParent = exports._findNextFocusableElement = exports._focusInto = exports._findFocusableElements = exports._addFocusableContainerListener = exports._isKeyboardMode = exports._registerKeyboardFocusEvents = void 0;
const keyCode_1 = __webpack_require__(9853);
const gridOptionsUtils_1 = __webpack_require__(7274);
const array_1 = __webpack_require__(1502);
const browser_1 = __webpack_require__(8667);
const dom_1 = __webpack_require__(3507);
let keyboardModeActive = false;
let instanceCount = 0;
function addKeyboardModeEvents(doc) {
if (instanceCount > 0) {
return;
}
doc.addEventListener('keydown', toggleKeyboardMode);
doc.addEventListener('mousedown', toggleKeyboardMode);
}
function removeKeyboardModeEvents(doc) {
if (instanceCount > 0)
return;
doc.removeEventListener('keydown', toggleKeyboardMode);
doc.removeEventListener('mousedown', toggleKeyboardMode);
}
function toggleKeyboardMode(event) {
const isKeyboardActive = keyboardModeActive;
const isKeyboardEvent = event.type === 'keydown';
if (isKeyboardEvent) {
// the following keys should not toggle keyboard mode.
if (event.ctrlKey || event.metaKey || event.altKey) {
return;
}
}
if (isKeyboardActive === isKeyboardEvent) {
return;
}
keyboardModeActive = isKeyboardEvent;
}
function _registerKeyboardFocusEvents(beans) {
const eDocument = (0, gridOptionsUtils_1._getDocument)(beans);
addKeyboardModeEvents(eDocument);
instanceCount++;
return () => {
instanceCount--;
removeKeyboardModeEvents(eDocument);
};
}
exports._registerKeyboardFocusEvents = _registerKeyboardFocusEvents;
function _isKeyboardMode() {
return keyboardModeActive;
}
exports._isKeyboardMode = _isKeyboardMode;
function _addFocusableContainerListener(beans, comp, eGui) {
comp.addManagedElementListeners(eGui, {
keydown: (e) => {
if (!e.defaultPrevented && e.key === keyCode_1.KeyCode.TAB) {
const backwards = e.shiftKey;
if (!_findNextFocusableElement(beans, eGui, false, backwards)) {
if (_focusNextGridCoreContainer(beans, backwards)) {
e.preventDefault();
}
}
}
},
});
}
exports._addFocusableContainerListener = _addFocusableContainerListener;
function _findFocusableElements(rootNode, exclude, onlyUnmanaged = false) {
const focusableString = dom_1.FOCUSABLE_SELECTOR;
let excludeString = dom_1.FOCUSABLE_EXCLUDE;
if (exclude) {
excludeString += ', ' + exclude;
}
if (onlyUnmanaged) {
excludeString += ', [tabindex="-1"]';
}
const nodes = Array.prototype.slice
.apply(rootNode.querySelectorAll(focusableString))
.filter((node) => {
return (0, dom_1._isVisible)(node);
});
const excludeNodes = Array.prototype.slice.apply(rootNode.querySelectorAll(excludeString));
if (!excludeNodes.length) {
return nodes;
}
const diff = (a, b) => a.filter((element) => b.indexOf(element) === -1);
return diff(nodes, excludeNodes);
}
exports._findFocusableElements = _findFocusableElements;
function _focusInto(rootNode, up = false, onlyUnmanaged = false, excludeTabGuards = false) {
const focusableElements = _findFocusableElements(rootNode, excludeTabGuards ? '.ag-tab-guard' : null, onlyUnmanaged);
const toFocus = up ? (0, array_1._last)(focusableElements) : focusableElements[0];
if (toFocus) {
toFocus.focus({ preventScroll: true });
return true;
}
return false;
}
exports._focusInto = _focusInto;
function _findNextFocusableElement(beans, rootNode, onlyManaged, backwards) {
const focusable = _findFocusableElements(rootNode, onlyManaged ? ':not([tabindex="-1"])' : null);
const activeEl = (0, gridOptionsUtils_1._getActiveDomElement)(beans);
let currentIndex;
if (onlyManaged) {
currentIndex = focusable.findIndex((el) => el.contains(activeEl));
}
else {
currentIndex = focusable.indexOf(activeEl);
}
const nextIndex = currentIndex + (backwards ? -1 : 1);
if (nextIndex < 0 || nextIndex >= focusable.length) {
return null;
}
return focusable[nextIndex];
}
exports._findNextFocusableElement = _findNextFocusableElement;
function _findTabbableParent(node, limit = 5) {
let counter = 0;
while (node && (0, browser_1._getTabIndex)(node) === null && ++counter <= limit) {
node = node.parentElement;
}
if ((0, browser_1._getTabIndex)(node) === null) {
return null;
}
return node;
}
exports._findTabbableParent = _findTabbableParent;
function _focusGridInnerElement(beans, fromBottom) {
return beans.ctrlsSvc.get('gridCtrl').focusInnerElement(fromBottom);
}
exports._focusGridInnerElement = _focusGridInnerElement;
function _isHeaderFocusSuppressed(beans) {
return beans.gos.get('suppressHeaderFocus') || !!beans.overlays?.isExclusive();
}
exports._isHeaderFocusSuppressed = _isHeaderFocusSuppressed;
function _isCellFocusSuppressed(beans) {
return beans.gos.get('suppressCellFocus') || !!beans.overlays?.isExclusive();
}
exports._isCellFocusSuppressed = _isCellFocusSuppressed;
function _focusNextGridCoreContainer(beans, backwards, forceOut = false) {
const gridCtrl = beans.ctrlsSvc.get('gridCtrl');
if (!forceOut && gridCtrl.focusNextInnerContainer(backwards)) {
return true;
}
if (forceOut || (!backwards && !gridCtrl.isDetailGrid())) {
gridCtrl.forceFocusOutOfContainer(backwards);
}
return false;
}
exports._focusNextGridCoreContainer = _focusNextGridCoreContainer;
/***/ }),
/***/ 2043:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._waitUntil = exports._throttle = exports._debounce = exports._executeNextVMTurn = exports._errorOnce = exports._warnOnce = exports._logIfDebug = exports._doOnce = void 0;
const doOnceFlags = {};
/**
* If the key was passed before, then doesn't execute the func
* @param {Function} func
* @param {string} key
*/
function _doOnce(func, key) {
if (doOnceFlags[key]) {
return;
}
func();
doOnceFlags[key] = true;
}
exports._doOnce = _doOnce;
function _logIfDebug(gos, message, ...args) {
if (gos.get('debug')) {
// eslint-disable-next-line no-console
console.log('AG Grid: ' + message, ...args);
}
}
exports._logIfDebug = _logIfDebug;
function _warnOnce(msg, ...args) {
// eslint-disable-next-line no-console
_doOnce(() => console.warn('AG Grid: ' + msg, ...args), msg + args?.join(''));
}
exports._warnOnce = _warnOnce;
function _errorOnce(msg, ...args) {
// eslint-disable-next-line no-console
_doOnce(() => console.error('AG Grid: ' + msg, ...args), msg + args?.join(''));
}
exports._errorOnce = _errorOnce;
const executeNextVMTurnFuncs = [];
let executeNextVMTurnPending = false;
function _executeNextVMTurn(func) {
executeNextVMTurnFuncs.push(func);
if (executeNextVMTurnPending) {
return;
}
executeNextVMTurnPending = true;
window.setTimeout(() => {
const funcsCopy = executeNextVMTurnFuncs.slice();
executeNextVMTurnFuncs.length = 0;
executeNextVMTurnPending = false;
funcsCopy.forEach((func) => func());
}, 0);
}
exports._executeNextVMTurn = _executeNextVMTurn;
/**
* Creates a debounced function a function, and attach it to a bean for lifecycle
* @param {Function} func The function to be debounced
* @param {number} delay The time in ms to debounce
* @return {Function} The debounced function
*/
function _debounce(bean, func, delay) {
let timeout;
// Calling debounce returns a new anonymous function
return function (...args) {
//@ts-expect-error no implicit this
const context = this;
window.clearTimeout(timeout);
// Set the new timeout
timeout = window.setTimeout(function () {
// at the moment we just check if the bean is still alive, in the future the bean stub should
// another option is to manage a list of active timers and clear them when the bean is destroyed.
if (bean.isAlive()) {
func.apply(context, args);
}
}, delay);
};
}
exports._debounce = _debounce;
/**
* @param {Function} func The function to be throttled
* @param {number} wait The time in ms to throttle
* @return {Function} The throttled function
*/
function _throttle(func, wait) {
let previousCall = 0;
return function (...args) {
//@ts-expect-error no implicit this
const context = this;
const currentCall = new Date().getTime();
if (currentCall - previousCall < wait) {
return;
}
previousCall = currentCall;
func.apply(context, args);
};
}
exports._throttle = _throttle;
function _waitUntil(condition, callback, timeout = 100, timeoutMessage) {
const timeStamp = new Date().getTime();
let interval = null;
let executed = false;
const internalCallback = () => {
const reachedTimeout = new Date().getTime() - timeStamp > timeout;
if (condition() || reachedTimeout) {
callback();
executed = true;
if (interval != null) {
window.clearInterval(interval);
interval = null;
}
if (reachedTimeout && timeoutMessage) {
_warnOnce(timeoutMessage);
}
}
};
internalCallback();
if (!executed) {
interval = window.setInterval(internalCallback, 10);
}
}
exports._waitUntil = _waitUntil;
/***/ }),
/***/ 1298:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._fuzzySuggestions = void 0;
/**
*
* @param {String} inputValue The value to be compared against a list of strings
* @param allSuggestions The list of strings to be compared against
*/
function _fuzzySuggestions(params) {
const { inputValue, allSuggestions, hideIrrelevant, filterByPercentageOfBestMatch, addSequentialWeight } = params;
let thisSuggestions = allSuggestions.map((text, idx) => ({
value: text,
relevance: levenshteinDistance(inputValue.toLowerCase(), text.toLocaleLowerCase(), addSequentialWeight),
idx,
}));
thisSuggestions.sort((a, b) => b.relevance - a.relevance);
if (hideIrrelevant) {
thisSuggestions = thisSuggestions.filter((suggestion) => suggestion.relevance !== 0);
}
if (thisSuggestions.length > 0 && filterByPercentageOfBestMatch && filterByPercentageOfBestMatch > 0) {
const bestMatch = thisSuggestions[0].relevance;
const limit = bestMatch * filterByPercentageOfBestMatch;
thisSuggestions = thisSuggestions.filter((suggestion) => limit - suggestion.relevance < 0);
}
const values = [];
const indices = [];
for (const suggestion of thisSuggestions) {
values.push(suggestion.value);
indices.push(suggestion.idx);
}
return { values, indices };
}
exports._fuzzySuggestions = _fuzzySuggestions;
function getAllSubstrings(str) {
const result = [];
const size = str.length;
for (let len = 1; len <= size; len++) {
for (let i = 0; i <= size - len; i++) {
const j = i + len - 1;
result.push(str.slice(i, j + 1));
}
}
return result;
}
function levenshteinDistance(str1, str2, addSequentialWeight = false) {
const a = str1.replace(/\s/g, '');
const b = str2.replace(/\s/g, '');
const len1 = a.length;
const len2 = b.length;
// Levenshtein Distance (Wagner–Fischer algorithm)
const m = new Array(len1 + 1).fill(null).map(() => new Array(len2 + 1).fill(0));
for (let i = 0; i <= len1; i += 1) {
m[i][0] = i;
}
for (let j = 0; j <= len2; j += 1) {
m[0][j] = j;
}
for (let i = 1; i <= len1; i++) {
for (let j = 1; j <= len2; j++) {
if (a[i - 1] === b[j - 1]) {
m[i][j] = m[i - 1][j - 1];
}
else {
m[i][j] = 1 + Math.min(m[i][j - 1], Math.min(m[i - 1][j], m[i - 1][j - 1]));
}
}
}
const distance = m[len1][len2];
const maxDistance = Math.max(len1, len2);
let weight = maxDistance - distance;
if (addSequentialWeight) {
const substrings = getAllSubstrings(a);
for (let i = 0; i < substrings.length; i++) {
const currentSubstring = substrings[i];
if (b.indexOf(currentSubstring) !== -1) {
weight += 1;
weight *= currentSubstring.length;
}
}
}
return weight;
}
/***/ }),
/***/ 4422:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._defaultComparator = exports._jsonEquals = exports._toStringOrNull = exports._missing = exports._exists = exports._makeNull = void 0;
/**
* If value is undefined, null or blank, returns null, otherwise returns the value
* @param {T} value
* @returns {T | null}
*/
function _makeNull(value) {
if (value == null || value === '') {
return null;
}
return value;
}
exports._makeNull = _makeNull;
function _exists(value) {
return value != null && value !== '';
}
exports._exists = _exists;
function _missing(value) {
return !_exists(value);
}
exports._missing = _missing;
function _toStringOrNull(value) {
return value != null && typeof value.toString === 'function' ? value.toString() : null;
}
exports._toStringOrNull = _toStringOrNull;
function _jsonEquals(val1, val2) {
const val1Json = val1 ? JSON.stringify(val1) : null;
const val2Json = val2 ? JSON.stringify(val2) : null;
return val1Json === val2Json;
}
exports._jsonEquals = _jsonEquals;
function _defaultComparator(valueA, valueB, accentedCompare = false) {
const valueAMissing = valueA == null;
const valueBMissing = valueB == null;
// this is for aggregations sum and avg, where the result can be a number that is wrapped.
// if we didn't do this, then the toString() value would be used, which would result in
// the strings getting used instead of the numbers.
if (valueA && valueA.toNumber) {
valueA = valueA.toNumber();
}
if (valueB && valueB.toNumber) {
valueB = valueB.toNumber();
}
if (valueAMissing && valueBMissing) {
return 0;
}
if (valueAMissing) {
return -1;
}
if (valueBMissing) {
return 1;
}
function doQuickCompare(a, b) {
return a > b ? 1 : a < b ? -1 : 0;
}
if (typeof valueA !== 'string') {
return doQuickCompare(valueA, valueB);
}
if (!accentedCompare) {
return doQuickCompare(valueA, valueB);
}
try {
// using local compare also allows chinese comparisons
return valueA.localeCompare(valueB);
}
catch (e) {
// if something wrong with localeCompare, eg not supported
// by browser, then just continue with the quick one
return doQuickCompare(valueA, valueB);
}
}
exports._defaultComparator = _defaultComparator;
/***/ }),
/***/ 9970:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._createIconNoSpan = exports._createIcon = void 0;
const logging_1 = __webpack_require__(7764);
const aria_1 = __webpack_require__(5230);
const dom_1 = __webpack_require__(3507);
/**
* If icon provided, use this (either a string, or a function callback).
* if not, then use the default icon from the theme.
* Technically `iconName` could be any string, if using user-provided icons map.
* However, in most cases we're providing a specific icon name, so better to have type-checking.
*/
function _createIcon(iconName, beans, column) {
const iconContents = _createIconNoSpan(iconName, beans, column);
if (iconContents) {
const { className } = iconContents;
if ((typeof className === 'string' && className.indexOf('ag-icon') > -1) ||
(typeof className === 'object' && className['ag-icon'])) {
return iconContents;
}
}
const eResult = document.createElement('span');
eResult.appendChild(iconContents);
return eResult;
}
exports._createIcon = _createIcon;
/**
* Technically `iconName` could be any string, if using user-provided icons map.
* However, in most cases we're providing a specific icon name, so better to have type-checking.
*/
function _createIconNoSpan(iconName, beans, column) {
let userProvidedIcon = null;
if (iconName === 'smallDown') {
(0, logging_1._warn)(262);
}
else if (iconName === 'smallLeft') {
(0, logging_1._warn)(263);
}
else if (iconName === 'smallRight') {
(0, logging_1._warn)(264);
}
// check col for icon first
const icons = column && column.getColDef().icons;
if (icons) {
userProvidedIcon = icons[iconName];
}
// if not in col, try grid options
if (beans.gos && !userProvidedIcon) {
const optionsIcons = beans.gos.get('icons');
if (optionsIcons) {
userProvidedIcon = optionsIcons[iconName];
}
}
// now if user provided, use it
if (userProvidedIcon) {
let rendererResult;
if (typeof userProvidedIcon === 'function') {
rendererResult = userProvidedIcon();
}
else if (typeof userProvidedIcon === 'string') {
rendererResult = userProvidedIcon;
}
else {
(0, logging_1._warn)(38, { iconName });
return undefined;
}
if (typeof rendererResult === 'string') {
return (0, dom_1._loadTemplate)(rendererResult);
}
if ((0, dom_1._isNodeOrElement)(rendererResult)) {
return rendererResult;
}
(0, logging_1._warn)(133, { iconName });
return undefined;
}
else {
const span = document.createElement('span');
const iconValue = beans.registry.getIcon(iconName);
if (!iconValue) {
beans.validation?.validateIcon(iconName);
}
const cssClass = iconValue ?? iconName;
span.setAttribute('class', `ag-icon ag-icon-${cssClass}`);
span.setAttribute('unselectable', 'on');
(0, aria_1._setAriaRole)(span, 'presentation');
return span;
}
}
exports._createIconNoSpan = _createIconNoSpan;
/***/ }),
/***/ 6466:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._isUserSuppressingKeyboardEvent = exports._isEventFromPrintableCharacter = void 0;
const gridOptionsUtils_1 = __webpack_require__(7274);
function _isEventFromPrintableCharacter(event) {
// no allowed printable chars have alt or ctrl key combinations
if (event.altKey || event.ctrlKey || event.metaKey) {
return false;
}
// if key is length 1, eg if it is 'a' for the a key, or '2' for the '2' key.
// non-printable characters have names, eg 'Enter' or 'Backspace'.
const printableCharacter = event.key?.length === 1;
return printableCharacter;
}
exports._isEventFromPrintableCharacter = _isEventFromPrintableCharacter;
/**
* Allows user to tell the grid to skip specific keyboard events
* @param {GridOptionsService} gos
* @param {KeyboardEvent} keyboardEvent
* @param {IRowNode} rowNode
* @param {Column} column
* @param {boolean} editing
* @returns {boolean}
*/
function _isUserSuppressingKeyboardEvent(gos, keyboardEvent, rowNode, column, editing) {
const colDefFunc = column ? column.getColDef().suppressKeyboardEvent : undefined;
// if no callbacks provided by user, then do nothing
if (!colDefFunc) {
return false;
}
const params = (0, gridOptionsUtils_1._addGridCommonParams)(gos, {
event: keyboardEvent,
editing,
column,
node: rowNode,
data: rowNode.data,
colDef: column.getColDef(),
});
// colDef get first preference on suppressing events
if (colDefFunc) {
const colDefFuncResult = colDefFunc(params);
// if colDef func suppressed, then return now, no need to call gridOption func
if (colDefFuncResult) {
return true;
}
}
// otherwise return false, don't suppress, as colDef didn't suppress and no func on gridOptions
return false;
}
exports._isUserSuppressingKeyboardEvent = _isUserSuppressingKeyboardEvent;
/***/ }),
/***/ 3276:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._areEventsNear = void 0;
/**
* `True` if the event is close to the original event by X pixels either vertically or horizontally.
* we only start dragging after X pixels so this allows us to know if we should start dragging yet.
* @param {MouseEvent | TouchEvent} e1
* @param {MouseEvent | TouchEvent} e2
* @param {number} pixelCount
* @returns {boolean}
*/
function _areEventsNear(e1, e2, pixelCount) {
// by default, we wait 4 pixels before starting the drag
if (pixelCount === 0) {
return false;
}
const diffX = Math.abs(e1.clientX - e2.clientX);
const diffY = Math.abs(e1.clientY - e2.clientY);
return Math.max(diffX, diffY) <= pixelCount;
}
exports._areEventsNear = _areEventsNear;
/***/ }),
/***/ 7698:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._formatNumberCommas = void 0;
/**
* the native method number.toLocaleString(undefined, {minimumFractionDigits: 0})
* puts in decimal places in IE, so we use this method instead
* from: http://blog.tompawlak.org/number-currency-formatting-javascript
* @param {number} value
* @returns {string}
*/
function _formatNumberCommas(value, getLocaleTextFunc) {
if (typeof value !== 'number') {
return '';
}
const localeTextFunc = getLocaleTextFunc();
const thousandSeparator = localeTextFunc('thousandSeparator', ',');
const decimalSeparator = localeTextFunc('decimalSeparator', '.');
return value
.toString()
.replace('.', decimalSeparator)
.replace(/(\d)(?=(\d{3})+(?!\d))/g, `$1${thousandSeparator}`);
}
exports._formatNumberCommas = _formatNumberCommas;
/***/ }),
/***/ 6996:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._getValueUsingField = exports._mergeDeep = exports.SKIP_JS_BUILTINS = void 0;
const generic_1 = __webpack_require__(4422);
// Prevents the risk of prototype pollution
exports.SKIP_JS_BUILTINS = new Set(['__proto__', 'constructor', 'prototype']);
function _iterateObject(object, callback) {
if (object == null) {
return;
}
if (Array.isArray(object)) {
for (let i = 0; i < object.length; i++) {
callback(i.toString(), object[i]);
}
return;
}
for (const key of Object.keys(object)) {
callback(key, object[key]);
}
}
function _mergeDeep(dest, source, copyUndefined = true, makeCopyOfSimpleObjects = false) {
if (!(0, generic_1._exists)(source)) {
return;
}
_iterateObject(source, (key, sourceValue) => {
if (exports.SKIP_JS_BUILTINS.has(key)) {
return;
}
let destValue = dest[key];
if (destValue === sourceValue) {
return;
}
// when creating params, we don't want to just copy objects over. otherwise merging ColDefs (eg DefaultColDef
// and Column Types) would result in params getting shared between objects.
// by putting an empty value into destValue first, it means we end up copying over values from
// the source object, rather than just copying in the source object in it's entirety.
if (makeCopyOfSimpleObjects) {
const objectIsDueToBeCopied = destValue == null && sourceValue != null;
if (objectIsDueToBeCopied) {
// 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}, as opposed
// to a Class instance (such as api instance).
const doNotCopyAsSourceIsSimpleObject = typeof sourceValue === 'object' && sourceValue.constructor === Object;
if (doNotCopyAsSourceIsSimpleObject) {
destValue = {};
dest[key] = destValue;
}
}
}
if (_isNonNullObject(sourceValue) && _isNonNullObject(destValue) && !Array.isArray(destValue)) {
_mergeDeep(destValue, sourceValue, copyUndefined, makeCopyOfSimpleObjects);
}
else if (copyUndefined || sourceValue !== undefined) {
dest[key] = sourceValue;
}
});
}
exports._mergeDeep = _mergeDeep;
function _getValueUsingField(data, field, fieldContainsDots) {
if (!field || !data) {
return;
}
// if no '.', then it's not a deep value
if (!fieldContainsDots) {
return data[field];
}
// otherwise it is a deep value, so need to dig for it
const fields = field.split('.');
let currentObject = data;
for (let i = 0; i < fields.length; i++) {
if (currentObject == null) {
return undefined;
}
currentObject = currentObject[fields[i]];
}
return currentObject;
}
exports._getValueUsingField = _getValueUsingField;
function _isNonNullObject(value) {
return typeof value === 'object' && value !== null;
}
/***/ }),
/***/ 7990:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AgPromise = exports._isPromise = void 0;
function _isPromise(fn) {
if (typeof fn.then === 'function') {
return true;
}
return false;
}
exports._isPromise = _isPromise;
var AgPromiseStatus;
(function (AgPromiseStatus) {
AgPromiseStatus[AgPromiseStatus["IN_PROGRESS"] = 0] = "IN_PROGRESS";
AgPromiseStatus[AgPromiseStatus["RESOLVED"] = 1] = "RESOLVED";
})(AgPromiseStatus || (AgPromiseStatus = {}));
class AgPromise {
static all(promises) {
return promises.length
? new AgPromise((resolve) => {
let remainingToResolve = promises.length;
const combinedValues = new Array(remainingToResolve);
promises.forEach((promise, index) => {
promise.then((value) => {
combinedValues[index] = value;
remainingToResolve--;
if (remainingToResolve === 0) {
resolve(combinedValues);
}
});
});
})
: AgPromise.resolve();
}
static resolve(value = null) {
return new AgPromise((resolve) => resolve(value));
}
constructor(callback) {
this.status = AgPromiseStatus.IN_PROGRESS;
this.resolution = null;
this.waiters = [];
callback((value) => this.onDone(value), (params) => this.onReject(params));
}
then(func) {
return new AgPromise((resolve) => {
if (this.status === AgPromiseStatus.RESOLVED) {
resolve(func(this.resolution));
}
else {
this.waiters.push((value) => resolve(func(value)));
}
});
}
onDone(value) {
this.status = AgPromiseStatus.RESOLVED;
this.resolution = value;
this.waiters.forEach((waiter) => waiter(value));
}
onReject(_) { }
}
exports.AgPromise = AgPromise;
/***/ }),
/***/ 4009:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._selectAllCells = void 0;
function _selectAllCells(beans) {
const { pinnedRowModel, rowModel } = beans;
const [isEmptyPinnedTop, isEmptyPinnedBottom] = [
pinnedRowModel?.isEmpty('top') ?? true,
pinnedRowModel?.isEmpty('bottom') ?? true,
];
const floatingStart = isEmptyPinnedTop ? null : 'top';
let floatingEnd;
let rowEnd;
if (isEmptyPinnedBottom) {
floatingEnd = null;
rowEnd = rowModel.getRowCount() - 1;
}
else {
floatingEnd = 'bottom';
rowEnd = pinnedRowModel?.getPinnedBottomRowCount() ?? 0 - 1;
}
const { visibleCols, rangeSvc } = beans;
const allDisplayedColumns = visibleCols.allCols;
if (!rangeSvc || !allDisplayedColumns?.length) {
return;
}
rangeSvc.setCellRange({
rowStartIndex: 0,
rowStartPinned: floatingStart,
rowEndIndex: rowEnd,
rowEndPinned: floatingEnd,
});
}
exports._selectAllCells = _selectAllCells;
/***/ }),
/***/ 7766:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._escapeString = void 0;
const reUnescapedHtml = /[&<>"']/g;
/**
* HTML Escapes.
*/
const HTML_ESCAPES = {
'&': '&',
'<': '<',
'>': '>',
'"': '"',
"'": ''',
};
function _escapeString(toEscape, skipEscapingHtmlChars) {
if (toEscape == null) {
return null;
}
// we call toString() twice, in case value is an object, where user provides
// a toString() method, and first call to toString() returns back something other
// than a string (eg a number to render)
const stringResult = toEscape.toString().toString();
if (skipEscapingHtmlChars) {
return stringResult;
}
// in react we don't need to escape html characters, as it's done by the framework
return stringResult.replace(reUnescapedHtml, (chr) => HTML_ESCAPES[chr]);
}
exports._escapeString = _escapeString;
/***/ }),
/***/ 8179:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.validateApiFunction = void 0;
const function_1 = __webpack_require__(2043);
const clientSide = 'clientSide';
const serverSide = 'serverSide';
const infinite = 'infinite';
const functionRowModels = {
onGroupExpandedOrCollapsed: [clientSide],
refreshClientSideRowModel: [clientSide],
isRowDataEmpty: [clientSide],
forEachLeafNode: [clientSide],
forEachNodeAfterFilter: [clientSide],
forEachNodeAfterFilterAndSort: [clientSide],
resetRowHeights: [clientSide],
applyTransaction: [clientSide],
applyTransactionAsync: [clientSide],
flushAsyncTransactions: [clientSide],
getBestCostNodeSelection: [clientSide],
getServerSideSelectionState: [serverSide],
setServerSideSelectionState: [serverSide],
applyServerSideTransaction: [serverSide],
applyServerSideTransactionAsync: [serverSide],
applyServerSideRowData: [serverSide],
retryServerSideLoads: [serverSide],
flushServerSideAsyncTransactions: [serverSide],
refreshServerSide: [serverSide],
getServerSideGroupLevelState: [serverSide],
refreshInfiniteCache: [infinite],
purgeInfiniteCache: [infinite],
getInfiniteRowCount: [infinite],
isLastRowIndexKnown: [infinite, serverSide],
expandAll: [clientSide, serverSide],
collapseAll: [clientSide, serverSide],
onRowHeightChanged: [clientSide, serverSide],
setRowCount: [infinite, serverSide],
getCacheBlockState: [infinite, serverSide],
};
const deprecatedFunctions = {
showLoadingOverlay: {
version: 'v32',
message: '`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).',
},
clearRangeSelection: {
version: 'v32.2',
message: 'Use `clearCellSelection` instead.',
},
getInfiniteRowCount: {
version: 'v32.2',
old: 'getInfiniteRowCount()',
new: 'getDisplayedRowCount()',
},
selectAllFiltered: {
version: 'v33',
old: 'selectAllFiltered()',
new: 'selectAll("filtered")',
},
deselectAllFiltered: {
version: 'v33',
old: 'deselectAllFiltered()',
new: 'deselectAll("filtered")',
},
selectAllOnCurrentPage: {
version: 'v33',
old: 'selectAllOnCurrentPage()',
new: 'selectAll("currentPage")',
},
deselectAllOnCurrentPage: {
version: 'v33',
old: 'deselectAllOnCurrentPage()',
new: 'deselectAll("currentPage")',
},
};
function validateApiFunction(functionName, apiFunction, beans) {
const deprecation = deprecatedFunctions[functionName];
if (deprecation) {
const { version, new: replacement, old, message } = deprecation;
const apiMethod = old ?? functionName;
return (...args) => {
const replacementMessage = replacement ? `Please use ${replacement} instead. ` : '';
(0, function_1._warnOnce)(`Since ${version} api.${apiMethod} is deprecated. ${replacementMessage}${message ?? ''}`);
return apiFunction.apply(apiFunction, args);
};
}
const rowModels = functionRowModels[functionName];
if (rowModels) {
return (...args) => {
const rowModel = beans.rowModel.getType();
if (!rowModels.includes(rowModel)) {
(0, function_1._errorOnce)(`api.${functionName} can only be called when gridOptions.rowModelType is ${rowModels.join(' or ')}`);
return undefined;
}
return apiFunction.apply(apiFunction, args);
};
}
return apiFunction;
}
exports.validateApiFunction = validateApiFunction;
/***/ }),
/***/ 8732:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ENTERPRISE_MODULE_NAMES = void 0;
exports.ENTERPRISE_MODULE_NAMES = {
AdvancedFilter: 1,
AllEnterprise: 1,
CellSelection: 1,
Clipboard: 1,
ColumnMenu: 1,
ColumnsToolPanel: 1,
ContextMenu: 1,
ExcelExport: 1,
FiltersToolPanel: 1,
GridCharts: 1,
IntegratedCharts: 1,
GroupFilter: 1,
MasterDetail: 1,
Menu: 1,
MultiFilter: 1,
Pivot: 1,
RangeSelection: 1,
RichSelect: 1,
RowNumbers: 1,
RowGrouping: 1,
RowGroupingPanel: 1,
ServerSideRowModelApi: 1,
ServerSideRowModel: 1,
SetFilter: 1,
SideBar: 1,
Sparklines: 1,
StatusBar: 1,
TreeData: 1,
ViewportRowModel: 1,
};
/***/ }),
/***/ 5205:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.MISSING_MODULE_REASONS = exports.getError = exports.AG_GRID_ERRORS = exports.moduleImportMsg = void 0;
const fuzzyMatch_1 = __webpack_require__(1298);
const enterpriseModuleNames_1 = __webpack_require__(8732);
const logging_1 = __webpack_require__(7764);
const resolvableModuleNames_1 = __webpack_require__(342);
const userCompValidations_1 = __webpack_require__(1389);
const moduleImportMsg = (moduleNames) => {
const imports = moduleNames.map((moduleName) => `import { ${convertToUserModuleName(moduleName)} } from '${enterpriseModuleNames_1.ENTERPRISE_MODULE_NAMES[moduleName] ? 'ag-grid-enterprise' : 'ag-grid-community'}';`);
const includeCharts = moduleNames.some((m) => m === 'IntegratedCharts' || m === 'Sparklines');
if (includeCharts) {
const chartImport = `import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';`;
imports.push(chartImport);
}
return `import { ModuleRegistry } from 'ag-grid-community'; \n${imports.join(' \n')} \n\nModuleRegistry.registerModules([ ${moduleNames.map((m) => convertToUserModuleName(m, true)).join(', ')} ]); \n\nFor more info see: ${logging_1.baseDocLink}/modules/`;
};
exports.moduleImportMsg = moduleImportMsg;
function convertToUserModuleName(moduleName, inModuleRegistration = false) {
if (inModuleRegistration && (moduleName === 'IntegratedCharts' || moduleName === 'Sparklines')) {
return `${moduleName}Module.with(AgChartsEnterpriseModule)`;
}
return `${moduleName}Module`;
}
function umdMissingModule(reasonOrId, moduleNames) {
const chartModules = moduleNames.filter((m) => m === 'IntegratedCharts' || m === 'Sparklines');
let message = '';
const agChartsDynamic = globalThis?.agCharts;
if (!agChartsDynamic && chartModules.length > 0) {
message = `Unable to use ${reasonOrId} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.\n`;
}
else if (moduleNames.some((m) => enterpriseModuleNames_1.ENTERPRISE_MODULE_NAMES[m])) {
message =
message + `Unable to use ${reasonOrId} as that requires the ag-grid-enterprise script to be included.\n`;
}
return message;
}
const missingModule = ({ reasonOrId, moduleName, gridScoped, gridId, rowModelType, additionalText, isUmd, }) => {
const resolvedModuleNames = (0, resolvableModuleNames_1.resolveModuleNames)(moduleName, rowModelType);
const reason = typeof reasonOrId === 'string' ? reasonOrId : exports.MISSING_MODULE_REASONS[reasonOrId];
if (isUmd) {
return umdMissingModule(reason, resolvedModuleNames);
}
const chartModules = resolvedModuleNames.filter((m) => m === 'IntegratedCharts' || m === 'Sparklines');
const chartImportRequired = chartModules.length > 0
? `${chartModules.map((m) => convertToUserModuleName(m)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`
: '';
const explanation = `Unable to use ${reason} as ${resolvedModuleNames.length > 1 ? 'one of ' + resolvedModuleNames.map((m) => convertToUserModuleName(m)).join(', ') : convertToUserModuleName(resolvedModuleNames[0])} is not registered${gridScoped ? ' for gridId: ' + gridId : ''}. ${chartImportRequired} Check if you have registered the module:\n`;
return (`${explanation}
${(0, exports.moduleImportMsg)(resolvedModuleNames)}` + (additionalText ? ` \n\n${additionalText}` : ''));
};
const missingChartsWithModule = (gridModule) => {
return `${gridModule} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
import { ModuleRegistry } from 'ag-grid-community';
import { ${gridModule} } from 'ag-grid-enterprise';
ModuleRegistry.registerModules([${gridModule}.with(AgChartsEnterpriseModule)]);
`;
};
const clipboardApiError = (method) => `AG Grid: Unable to use the Clipboard API (navigator.clipboard.${method}()). ` +
'The reason why it could not be used has been logged in the previous line. ' +
"For this reason the grid has defaulted to using a workaround which doesn't perform as well. " +
'Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid ' +
'property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.';
/**
* NOTES on setting console messages:
* 1. The message is a function that returns either a string or an array of any type.
* 2. Returning an array enables the console to log actual objects / numbers / booleans nicely as this will be spread to the underlying console call instead of being cast to a string.
* 3. Each entry should be followed by as const so that the IDE hover shows the actual message to aid devs
*/
exports.AG_GRID_ERRORS = {
1: () => '`rowData` must be an array',
2: ({ nodeId }) => `Duplicate node id '${nodeId}' detected from getRowId callback, this could cause issues in your grid.`,
3: () => 'Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.',
4: ({ id }) => `Could not find row id=${id}, data item was not found for this id`,
5: ({ data }) => [
`Could not find data item as object was not found.`,
data,
' Consider using getRowId to help the Grid find matching row data',
],
6: () => `'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'`,
7: () => 'Pivoting is not supported with aligned grids as it may produce different columns in each grid.',
8: ({ key }) => `Unknown key for navigation ${key}`,
9: ({ variable }) => `No value for ${variable?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${variable?.defaultValue} will be used and updated when styles load.`,
10: ({ eventType }) => `As of v33, the '${eventType}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,
11: () => 'No gridOptions provided to createGrid',
12: ({ colKey }) => ['column ', colKey, ' not found'],
13: () => 'Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.',
14: ({ groupPrefix }) => `Row IDs cannot start with ${groupPrefix}, this is a reserved prefix for AG Grid's row grouping feature.`,
15: ({ expression }) => ['value should be either a string or a function', expression],
16: ({ expression, params, e }) => [
'Processing of the expression failed',
'Expression = ',
expression,
'Params = ',
params,
'Exception = ',
e,
],
17: () => 'you need either field or valueSetter set on colDef for editing to work',
18: () => `alignedGrids contains an undefined option.`,
19: () => `alignedGrids - No api found on the linked grid.`,
20: () => `You may want to configure via a callback to avoid setup race conditions:
"alignedGrids: () => [linkedGrid]"`,
21: () => 'pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.',
22: ({ key }) => `${key} is an initial property and cannot be updated.`,
23: () => 'The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.',
24: () => 'row height must be a number if not using standard row model',
25: ({ id }) => [`The getRowId callback must return a string. The ID `, id, ` is being cast to a string.`],
26: ({ fnName, preDestroyLink }) => {
return `Grid API function ${fnName}() cannot be called as the grid has been destroyed.\n Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${preDestroyLink}`;
},
27: ({ fnName, module }) => `API function '${fnName}' not registered to module '${module}'`,
28: () => 'setRowCount cannot be used while using row grouping.',
29: () => 'tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?',
30: ({ toIndex }) => [
'tried to insert columns in invalid location, toIndex = ',
toIndex,
'remember that you should not count the moving columns when calculating the new index',
],
31: () => 'infinite loop in resizeColumnSets',
32: () => 'applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.',
33: () => 'stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.',
34: ({ key }) => `the column type '${key}' is a default column type and cannot be overridden.`,
35: () => `Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.`,
36: ({ t }) => "colDef.type '" + t + "' does not correspond to defined gridOptions.columnTypes",
37: () => `Changing the column pinning status is not allowed with domLayout='print'`,
38: ({ iconName }) => `provided icon '${iconName}' needs to be a string or a function`,
39: () => 'Applying column order broke a group where columns should be married together. Applying new order has been discarded.',
40: ({ e, method }) => `${e}\n${clipboardApiError(method)}`,
41: () => "Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",
42: () => "Browser does not support document.execCommand('copy') for clipboard operations",
43: ({ iconName }) => `As of v33, icon '${iconName}' is deprecated. Use the icon CSS name instead.`,
44: () => 'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',
45: ({ parentCellDataType }) => `The data type definition ${parentCellDataType} does not exist.`,
46: () => 'The "baseDataType" property of a data type definition must match that of its parent.',
47: ({ cellDataType }) => `Missing data type definition - "${cellDataType}"`,
48: ({ property }) => `Cell data type is "object" but no Value ${property} has been provided. Please either provide an object data type definition with a Value ${property}, or set "colDef.value${property}"`,
49: ({ methodName }) => `Framework component is missing the method ${methodName}()`,
50: ({ compName }) => `Could not find component ${compName}, did you forget to configure this component?`,
51: () => `Export cancelled. Export is not allowed as per your configuration.`,
52: () => 'There is no `window` associated with the current `document`',
53: () => `unknown value type during csv conversion`,
54: () => 'Could not find document body, it is needed for drag and drop and context menu.',
55: () => 'addRowDropZone - A container target needs to be provided',
56: () => 'addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.',
57: () => 'unable to show popup filter, filter instantiation failed',
58: () => 'no values found for select cellEditor',
59: () => 'cannot select pinned rows',
60: () => 'cannot select node until it has finished loading',
61: () => 'since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.',
62: ({ colId }) => `setFilterModel() - no column found for colId: ${colId}`,
63: ({ colId }) => `setFilterModel() - unable to fully apply model, filtering disabled for colId: ${colId}`,
64: ({ colId }) => `setFilterModel() - unable to fully apply model, unable to create filter for colId: ${colId}`,
65: () => 'filter missing setModel method, which is needed for setFilterModel',
66: () => 'filter API missing getModel method, which is needed for getFilterModel',
67: () => 'Filter is missing isFilterActive() method',
68: () => 'Column Filter API methods have been disabled as Advanced Filters are enabled.',
69: ({ guiFromFilter }) => `getGui method from filter returned ${guiFromFilter}; it should be a DOM element.`,
70: ({ newFilter }) => `Grid option quickFilterText only supports string inputs, received: ${typeof newFilter}`,
71: () => 'debounceMs is ignored when apply button is present',
72: ({ keys }) => [`ignoring FilterOptionDef as it doesn't contain one of `, keys],
73: () => `invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'`,
74: () => 'no filter options for filter',
75: () => 'Unknown button type specified',
76: ({ filterModelType }) => [
'Unexpected type of filter "',
filterModelType,
'", it looks like the filter was configured with incorrect Filter Options',
],
77: () => `Filter model is missing 'conditions'`,
78: () => 'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',
79: () => '"filterParams.maxNumConditions" must be greater than or equal to zero.',
80: () => '"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',
81: () => '"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',
82: ({ param }) => `DateFilter ${param} is not a number`,
83: () => `DateFilter minValidYear should be <= maxValidYear`,
84: () => `DateFilter minValidDate should be <= maxValidDate`,
85: () => 'DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.',
86: () => 'DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.',
87: () => 'DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.',
88: ({ index }) => `Invalid row index for ensureIndexVisible: ${index}`,
89: () => `A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)`,
90: () => `datasource is missing getRows method`,
91: () => 'Filter is missing method doesFilterPass',
92: ({ methodName }) => `AnimationFrameService.${methodName} called but animation frames are off`,
93: () => 'cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`',
94: ({ paginationPageSizeOption, pageSizeSet, pageSizesSet, pageSizeOptions, }) => `'paginationPageSize=${paginationPageSizeOption}'${pageSizeSet ? '' : ' (default value)'}, but ${paginationPageSizeOption} is not included in${pageSizesSet ? '' : ' the default'} paginationPageSizeSelector=[${pageSizeOptions?.join(', ')}].`,
95: ({ paginationPageSizeOption, paginationPageSizeSelector, }) => `Either set '${paginationPageSizeSelector}' to an array that includes ${paginationPageSizeOption} or to 'false' to disable the page size selector.`,
96: ({ id, data }) => [
'Duplicate ID',
id,
'found for pinned row with data',
data,
'When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter.',
],
97: ({ colId }) => `cellEditor for column ${colId} is missing getGui() method`,
98: () => 'popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.',
99: () => 'Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.',
100: ({ rowModelType }) => `selectAll only available when rowModelType='clientSide', ie not ${rowModelType}`,
101: ({ propertyName, componentName, agGridDefaults, jsComps, }) => {
const textOutput = [];
const validComponents = [
// Don't include the old names / internals in potential suggestions
...Object.keys(agGridDefaults ?? []).filter((k) => !['agCellEditor', 'agGroupRowRenderer', 'agSortIndicator'].includes(k)),
...Object.keys(jsComps ?? []),
];
const suggestions = (0, fuzzyMatch_1._fuzzySuggestions)({
inputValue: componentName,
allSuggestions: validComponents,
hideIrrelevant: true,
filterByPercentageOfBestMatch: 0.8,
}).values;
textOutput.push(`Could not find '${componentName}' component. It was configured as "${propertyName}: '${componentName}'" but it wasn't found in the list of registered components.\n`);
if (suggestions.length > 0) {
textOutput.push(` Did you mean: [${suggestions.slice(0, 3)}]?\n`);
}
textOutput.push(`If using a custom component check it has been registered correctly.`);
return textOutput;
},
102: () => "selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'",
103: () => 'Invalid selection state. When using client-side row model, the state must conform to `string[]`.',
104: ({ value, param }) => `Numeric value ${value} passed to ${param} param will be interpreted as ${value} seconds. If this is intentional use "${value}s" to silence this warning.`,
105: ({ e }) => [`chart rendering failed`, e],
106: () => `Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${logging_1.baseDocLink}/theming-migration/`,
107: ({ key, value }) => `Invalid value for theme param ${key} - ${value}`,
108: ({ e }) => ['chart update failed', e],
109: ({ aggFuncOrString }) => `unrecognised aggregation function ${aggFuncOrString}`,
110: () => 'groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup',
111: () => 'Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.',
113: () => 'Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values',
114: ({ component }) => `Could not find component with name of ${component}. Is it in Vue.components?`,
// 115: () => 'The provided selection state should be an object.' as const,
116: () => 'Invalid selection state. The state must conform to `IServerSideSelectionState`.',
117: () => 'selectAll must be of boolean type.',
118: () => 'Infinite scrolling must be enabled in order to set the row count.',
119: () => 'Unable to instantiate filter',
120: () => 'MultiFloatingFilterComp expects MultiFilter as its parent',
121: () => 'a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key',
122: () => 'could not find the document, document is empty',
123: () => 'Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.',
124: () => 'No active charts to update.',
125: ({ chartId }) => `Unable to update chart. No active chart found with ID: ${chartId}.`,
126: () => 'unable to restore chart as no chart model is provided',
127: ({ allRange }) => `unable to create chart as ${allRange ? 'there are no columns in the grid' : 'no range is selected'}.`,
128: ({ feature }) => `${feature} is only available if using 'multiRow' selection mode.`,
129: ({ feature, rowModel }) => `${feature} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${rowModel}.`,
130: () => 'cannot multi select unless selection mode is "multiRow"',
// 131: () => 'cannot range select while selecting multiple rows' as const,
132: () => 'Row selection features are not available unless `rowSelection` is enabled.',
133: ({ iconName }) => `icon '${iconName}' function should return back a string or a dom object`,
134: ({ iconName }) => `Did not find icon '${iconName}'`,
135: () => `Data type of the new value does not match the cell data type of the column`,
136: () => `Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`,
137: ({ type, currentChartType }) => `Unable to update chart as a '${type}' update type is not permitted on a ${currentChartType}.`,
138: ({ chartType }) => `invalid chart type supplied: ${chartType}`,
139: ({ customThemeName }) => `a custom chart theme with the name ${customThemeName} has been supplied but not added to the 'chartThemes' list`,
140: ({ name }) => `no stock theme exists with the name '${name}' and no custom chart theme with that name was supplied to 'customChartThemes'`,
141: () => 'cross filtering with row grouping is not supported.',
142: () => 'cross filtering is only supported in the client side row model.',
143: ({ panel }) => `'${panel}' is not a valid Chart Tool Panel name`,
144: ({ type }) => `Invalid charts data panel group name supplied: '${type}'`,
145: ({ group }) => `As of v32, only one charts customize panel group can be expanded at a time. '${group}' will not be expanded.`,
146: ({ comp }) => `Unable to instantiate component '${comp}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,
147: ({ group }) => `Invalid charts customize panel group name supplied: '${group}'`,
148: ({ group }) => `invalid chartGroupsDef config '${group}'`,
149: ({ group, chartType }) => `invalid chartGroupsDef config '${group}.${chartType}'`,
150: () => `'seriesChartTypes' are required when the 'customCombo' chart type is specified.`,
151: ({ chartType }) => `invalid chartType '${chartType}' supplied in 'seriesChartTypes', converting to 'line' instead.`,
152: ({ colId }) => `no 'seriesChartType' found for colId = '${colId}', defaulting to 'line'.`,
153: ({ chartDataType }) => `unexpected chartDataType value '${chartDataType}' supplied, instead use 'category', 'series' or 'excluded'`,
154: ({ colId }) => `cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${colId}`,
155: ({ option }) => `'${option}' is not a valid Chart Toolbar Option`,
156: ({ panel }) => `Invalid panel in chartToolPanelsDef.panels: '${panel}'`,
157: ({ unrecognisedGroupIds }) => ['unable to find group(s) for supplied groupIds:', unrecognisedGroupIds],
158: () => 'can not expand a column item that does not represent a column group header',
159: () => 'Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.',
160: () => `Export cancelled. Export is not allowed as per your configuration.`,
161: () => "The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",
162: ({ id, dataType }) => `Unrecognized data type for excel export [${id}.dataType=${dataType}]`,
163: ({ featureName }) => `Excel table export does not work with ${featureName}. The exported Excel file will not contain any Excel tables.\n Please turn off ${featureName} to enable Excel table exports.`,
164: () => 'Unable to add data table to Excel sheet: A table already exists.',
165: () => 'Unable to add data table to Excel sheet: Missing required parameters.',
166: ({ unrecognisedGroupIds }) => ['unable to find groups for these supplied groupIds:', unrecognisedGroupIds],
167: ({ unrecognisedColIds }) => ['unable to find columns for these supplied colIds:', unrecognisedColIds],
168: () => 'detailCellRendererParams.template should be function or string',
169: () => 'Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.',
170: ({ providedStrategy }) => `invalid cellRendererParams.refreshStrategy = ${providedStrategy} supplied, defaulting to refreshStrategy = 'rows'.`,
171: () => 'could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions',
172: () => 'could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData',
173: ({ group }) => `invalid chartGroupsDef config '${group}'`,
174: ({ group, chartType }) => `invalid chartGroupsDef config '${group}.${chartType}'`,
175: ({ menuTabName, itemsToConsider }) => [
`Trying to render an invalid menu item '${menuTabName}'. Check that your 'menuTabs' contains one of `,
itemsToConsider,
],
176: ({ key }) => `unknown menu item type ${key}`,
177: () => `valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.`,
178: ({ colId }) => `column ${colId} is not visible`,
179: () => 'totalValueGetter should be either a function or a string (expression)',
180: () => 'agRichSelectCellEditor requires cellEditorParams.values to be set',
181: () => 'agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.',
182: () => 'you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data',
183: () => 'Group Column Filter only works on group columns. Please use a different filter.',
184: ({ parentGroupData, childNodeData }) => [`duplicate group keys for row data, keys should be unique`, [parentGroupData, childNodeData]],
185: ({ data }) => [`getDataPath() should not return an empty path`, [data]],
186: ({ rowId, rowData, duplicateRowsData, }) => [
`duplicate group keys for row data, keys should be unique`,
rowId,
rowData,
...(duplicateRowsData ?? []),
],
187: ({ rowId, firstData, secondData }) => [
`Duplicate node id ${rowId}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,
'first instance',
firstData,
'second instance',
secondData,
],
188: () => `getRowId callback must be provided for Server Side Row Model selection to work correctly.`,
189: ({ startRow }) => `invalid value ${startRow} for startRow, the value should be >= 0`,
190: ({ rowGroupId, data }) => [
`null and undefined values are not allowed for server side row model keys`,
rowGroupId ? `column = ${rowGroupId}` : ``,
`data is `,
data,
],
// 191: () => `cannot multi select unless selection mode is 'multiRow'` as const,
// 192: () => `cannot use range selection when multi selecting rows` as const,
// 193: () => "cannot multi select unless selection mode is 'multiRow'" as const,
194: ({ method }) => `calling gridApi.${method}() is only possible when using rowModelType=\`clientSide\`.`,
195: ({ justCurrentPage }) => `selecting just ${justCurrentPage ? 'current page' : 'filtered'} only works when gridOptions.rowModelType='clientSide'`,
196: ({ key }) => `Provided ids must be of string type. Invalid id provided: ${key}`,
197: () => '`toggledNodes` must be an array of string ids.',
// 198: () => `cannot multi select unless selection mode is 'multiRow'` as const,
199: () => `getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use \`api.getServerSideSelectionState()\` instead.`,
200: missingModule,
201: ({ rowModelType }) => `Could not find row model for rowModelType = ${rowModelType}`,
202: () => `\`getSelectedNodes\` and \`getSelectedRows\` functions cannot be used with \`groupSelectsChildren\` and the server-side row model. Use \`api.getServerSideSelectionState()\` instead.`,
203: () => 'Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.',
204: () => 'Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.',
205: ({ duplicateIdText }) => `Unable to display rows as duplicate row ids (${duplicateIdText}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,
206: () => 'getRowId callback must be implemented for transactions to work. Transaction was ignored.',
207: () => 'The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.',
208: () => `Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.`,
209: () => `Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${logging_1.baseDocLink}/filter-set-filter-list/#filter-value-types`,
210: () => 'Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?',
211: () => 'property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.',
212: () => `please review all your toolPanel components, it seems like at least one of them doesn't have an id`,
213: () => 'Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.',
214: ({ key }) => `unable to lookup Tool Panel as invalid key supplied: ${key}`,
215: ({ key, defaultByKey }) => `the key ${key} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(defaultByKey ?? {}).join(',')}`,
216: ({ name }) => `Missing component for '${name}'`,
217: ({ invalidColIds }) => ['unable to find grid columns for the supplied colDef(s):', invalidColIds],
218: ({ property, defaultOffset }) => `${property} must be a number, the value you provided is not a valid number. Using the default of ${defaultOffset}px.`,
219: ({ property }) => `Property ${property} does not exist on the target object.`,
220: ({ lineDash }) => `'${lineDash}' is not a valid 'lineDash' option.`,
221: () => `agAggregationComponent should only be used with the client and server side row model.`,
222: () => `agFilteredRowCountComponent should only be used with the client side row model.`,
223: () => `agSelectedRowCountComponent should only be used with the client and server side row model.`,
224: () => `agTotalAndFilteredRowCountComponent should only be used with the client side row model.`,
225: () => 'agTotalRowCountComponent should only be used with the client side row model.',
226: () => 'viewport is missing init method.',
227: () => 'menu item icon must be DOM node or string',
228: ({ menuItemOrString }) => `unrecognised menu item ${menuItemOrString}`,
229: ({ index }) => ['invalid row index for ensureIndexVisible: ', index],
230: () => 'detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/',
// @deprecated v32 mark for removal as part of v32 deprecated features
231: () => 'As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.',
232: () => 'Using both rowData and v-model. rowData will be ignored.',
233: ({ methodName }) => `Framework component is missing the method ${methodName}()`,
234: () => 'Group Column Filter does not work with the colDef property "field". This property will be ignored.',
235: () => 'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',
236: () => 'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',
237: () => 'Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.',
238: () => 'setRowCount can only accept a positive row count.',
239: () => 'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',
240: ({ theme }) => `theme grid option must be a Theming API theme object or the string "legacy", received: ${theme}`,
// 241: () => `cannot select multiple rows when rowSelection.mode is set to 'singleRow'` as const,
// 242: () => 'cannot select multiple rows when using rangeSelect' as const,
243: () => 'Failed to deserialize state - each provided state object must be an object.',
244: () => 'Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.',
245: () => 'Failed to deserialize state - `toggledNodes` must be an array.',
246: () => 'Failed to deserialize state - Every `toggledNode` requires an associated string id.',
247: () => `Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. \nPlease rebuild the selection state and reapply it.`,
248: () => 'SetFloatingFilter expects SetFilter as its parent',
249: () => 'Must supply a Value Formatter in Set Filter params when using a Key Creator',
250: () => 'Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.',
251: ({ chartType }) => `AG Grid: Unable to create chart as an invalid chartType = '${chartType}' was supplied.`,
252: () => 'cannot get grid to draw rows when it is in the middle of drawing rows. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). \nTo see what part of your code that caused the refresh check this stacktrace.',
253: ({ version }) => ['Illegal version string: ', version],
254: () => 'Cannot create chart: no chart themes available.',
255: ({ point }) => `Lone surrogate U+${point?.toString(16).toUpperCase()} is not a scalar value`,
256: () => 'Unable to initialise. See validation error, or load ValidationModule if missing.',
257: () => missingChartsWithModule('IntegratedChartsModule'),
258: () => missingChartsWithModule('SparklinesModule'),
259: ({ part }) => `the argument to theme.withPart must be a Theming API part object, received: ${part}`,
260: ({ propName, compName, gridScoped, gridId, rowModelType, }) => missingModule({
reasonOrId: `AG Grid '${propName}' component: ${compName}`,
moduleName: userCompValidations_1.USER_COMP_MODULES[compName],
gridId,
gridScoped,
rowModelType,
}),
261: () => 'As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.',
262: () => 'As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.',
263: () => 'As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.',
264: () => 'As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.',
265: ({ colId }) => `Unable to infer chart data type for column '${colId}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${logging_1.baseDocLink}/integrated-charts-range-chart#coldefchartdatatype .`,
266: () => 'As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.',
267: () => 'Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.',
268: () => "Transactions aren't supported with tree data when using treeDataChildrenField",
269: () => "When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",
};
function getError(errorId, args) {
const msgOrFunc = exports.AG_GRID_ERRORS[errorId];
if (!msgOrFunc) {
return [`Missing error text for error id ${errorId}!`];
}
const errorBody = msgOrFunc(args);
const errorLink = (0, logging_1.getErrorLink)(errorId, args);
const errorSuffix = `\nSee ${errorLink}`;
return Array.isArray(errorBody) ? errorBody.concat(errorSuffix) : [errorBody, errorSuffix];
}
exports.getError = getError;
exports.MISSING_MODULE_REASONS = {
1: 'Charting Aggregation',
2: 'pivotResultFields',
3: 'setTooltip',
};
/***/ }),
/***/ 7764:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._preInitErrMsg = exports._errMsg = exports._logPreInitErr = exports._error = exports._warn = exports.getErrorLink = exports.toStringWithNullUndefined = exports.setValidationDocLink = exports.suppressAllLogs = exports.provideValidationServiceLogger = exports.baseDocLink = void 0;
const baseUrl_1 = __webpack_require__(3263);
const function_1 = __webpack_require__(2043);
const version_1 = __webpack_require__(7205);
const MAX_URL_LENGTH = 2000;
const MIN_PARAM_LENGTH = 100;
const VERSION_PARAM_NAME = '_version_';
let validation = null;
let suppressAllLogging = false;
exports.baseDocLink = `${baseUrl_1.BASE_URL}/javascript-data-grid`;
/**
* The ValidationService passes itself in if it has been included.
* @param logger
*/
function provideValidationServiceLogger(logger) {
validation = logger;
}
exports.provideValidationServiceLogger = provideValidationServiceLogger;
function suppressAllLogs() {
suppressAllLogging = true;
}
exports.suppressAllLogs = suppressAllLogs;
/** Set by the Framework override to give us accurate links for the framework */
function setValidationDocLink(docLink) {
exports.baseDocLink = docLink;
}
exports.setValidationDocLink = setValidationDocLink;
function getErrorParts(id, args, defaultMessage) {
return validation?.getConsoleMessage(id, args) ?? [minifiedLog(id, args, defaultMessage)];
}
function getMsgOrDefault(logger, id, args, defaultMessage) {
if (suppressAllLogging)
return;
logger(`error #${id}`, ...getErrorParts(id, args, defaultMessage));
}
/**
* Stringify object, removing any circular dependencies
*/
function stringifyObject(inputObj) {
if (!inputObj)
return String(inputObj);
const object = {};
for (const prop of Object.keys(inputObj)) {
if (typeof inputObj[prop] !== 'object' && typeof inputObj[prop] !== 'function') {
object[prop] = inputObj[prop];
}
}
return JSON.stringify(object);
}
function stringifyValue(value) {
let output = value;
if (value instanceof Error) {
output = value.toString();
}
else if (typeof value === 'object') {
output = stringifyObject(value);
}
return output;
}
/**
* Correctly formats a string or undefined or null value into a human readable string
* @param input
*/
function toStringWithNullUndefined(str) {
return str === undefined ? 'undefined' : str === null ? 'null' : str;
}
exports.toStringWithNullUndefined = toStringWithNullUndefined;
function getParamsUrl(baseUrl, params) {
return `${baseUrl}?${params.toString()}`;
}
function truncateUrl(baseUrl, params, maxLength) {
const sortedParams = Array.from(params.entries()).sort((a, b) => b[1].length - a[1].length);
let url = getParamsUrl(baseUrl, params);
for (const [key, value] of sortedParams) {
if (key === VERSION_PARAM_NAME) {
continue;
}
const excessLength = url.length - maxLength;
if (excessLength <= 0) {
break;
}
const ellipse = '...';
const truncateAmount = excessLength + ellipse.length;
// Truncate by `truncateAmount`, unless the result is shorter than the min param
// length. In which case, shorten to min param length, then continue shortening
// other params.
// Assume there isn't a lot of params that are all long.
const truncatedValue = value.length - truncateAmount > MIN_PARAM_LENGTH
? value.slice(0, value.length - truncateAmount) + ellipse
: value.slice(0, MIN_PARAM_LENGTH) + ellipse;
params.set(key, truncatedValue);
url = getParamsUrl(baseUrl, params);
}
return url;
}
function getErrorLink(errorNum, args) {
const params = new URLSearchParams();
params.append(VERSION_PARAM_NAME, version_1.VERSION);
if (args) {
for (const key of Object.keys(args)) {
params.append(key, stringifyValue(args[key]));
}
}
const baseUrl = `${exports.baseDocLink}/errors/${errorNum}`;
const url = getParamsUrl(baseUrl, params);
return url.length <= MAX_URL_LENGTH ? url : truncateUrl(baseUrl, params, MAX_URL_LENGTH);
}
exports.getErrorLink = getErrorLink;
const minifiedLog = (errorNum, args, defaultMessage) => {
const errorLink = getErrorLink(errorNum, args);
return `${defaultMessage ? defaultMessage + ' \n' : ''}Visit ${errorLink}${defaultMessage ? '' : ' \n Alternatively register the ValidationModule to see the full message in the console.'}`;
};
function _warn(...args) {
getMsgOrDefault(function_1._warnOnce, args[0], args[1]);
}
exports._warn = _warn;
function _error(...args) {
getMsgOrDefault(function_1._errorOnce, args[0], args[1]);
}
exports._error = _error;
/** Used for messages before the ValidationService has been created */
function _logPreInitErr(id, args, defaultMessage) {
getMsgOrDefault(function_1._errorOnce, id, args, defaultMessage);
}
exports._logPreInitErr = _logPreInitErr;
function getErrMsg(defaultMessage, args) {
const id = args[0];
return `error #${id} ` + getErrorParts(id, args[1], defaultMessage).join(' ');
}
function _errMsg(...args) {
return getErrMsg(undefined, args);
}
exports._errMsg = _errMsg;
/** Used for messages before the ValidationService has been created */
function _preInitErrMsg(...args) {
// as well as displaying an extra line break, this will remove the part of the message about adding the validation module
return getErrMsg('\n', args);
}
exports._preInitErrMsg = _preInitErrMsg;
/***/ }),
/***/ 342:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolveModuleNames = exports.MODULES_FOR_ROW_MODELS = exports.RESOLVABLE_MODULE_NAMES = void 0;
const ALL_COLUMN_FILTERS = [
'TextFilter',
'NumberFilter',
'DateFilter',
'SetFilter',
'MultiFilter',
'GroupFilter',
'CustomFilter',
];
/**
* Some of these modules are (for now) included by default in core. For these, we just return AllCommunityModule.
*/
exports.RESOLVABLE_MODULE_NAMES = {
EditCore: [
'TextEditor',
'NumberEditor',
'DateEditor',
'CheckboxEditor',
'LargeTextEditor',
'SelectEditor',
'RichSelect',
'CustomEditor',
],
CheckboxCellRenderer: ['AllCommunity'],
ClientSideRowModelHierarchy: ['RowGrouping', 'Pivot', 'TreeData'],
ColumnFilter: ALL_COLUMN_FILTERS,
ColumnGroupHeaderComp: ['AllCommunity'],
ColumnGroup: ['AllCommunity'],
ColumnHeaderComp: ['AllCommunity'],
ColumnMove: ['AllCommunity'],
ColumnResize: ['AllCommunity'],
CommunityCore: ['AllCommunity'],
CsrmSsrmSharedApi: ['ClientSideRowModelApi', 'ServerSideRowModelApi'],
EnterpriseCore: ['AllEnterprise'],
FilterCore: [...ALL_COLUMN_FILTERS, 'QuickFilter', 'ExternalFilter', 'AdvancedFilter'],
GroupCellRenderer: ['RowGrouping', 'Pivot', 'TreeData', 'MasterDetail', 'ServerSideRowModel'],
KeyboardNavigation: ['AllCommunity'],
LoadingCellRenderer: ['ServerSideRowModel'],
MenuCore: ['ColumnMenu', 'ContextMenu'],
MenuItem: ['ColumnMenu', 'ContextMenu', 'MultiFilter', 'IntegratedCharts', 'ColumnsToolPanel'],
Overlay: ['AllCommunity'],
PinnedColumn: ['AllCommunity'],
SharedAggregation: ['RowGrouping', 'Pivot', 'TreeData', 'ServerSideRowModel'],
SharedDragAndDrop: ['AllCommunity'],
SharedMasterDetail: ['MasterDetail', 'ServerSideRowModel'],
SharedMenu: [...ALL_COLUMN_FILTERS, 'ColumnMenu', 'ContextMenu'],
SharedPivot: ['Pivot', 'ServerSideRowModel'],
SharedRowGrouping: ['RowGrouping', 'ServerSideRowModel'],
SharedRowSelection: ['RowSelection', 'ServerSideRowModel'],
SkeletonCellRenderer: ['ServerSideRowModel'],
Sort: ['AllCommunity'],
SsrmInfiniteSharedApi: ['InfiniteRowModel', 'ServerSideRowModelApi'],
SharedTreeData: ['TreeData', 'ServerSideRowModel'],
};
exports.MODULES_FOR_ROW_MODELS = {
InfiniteRowModel: 'infinite',
ClientSideRowModelApi: 'clientSide',
ClientSideRowModel: 'clientSide',
ServerSideRowModelApi: 'serverSide',
ServerSideRowModel: 'serverSide',
ViewportRowModel: 'viewport',
};
function resolveModuleNames(moduleName, rowModelType) {
const resolvedModuleNames = [];
(Array.isArray(moduleName) ? moduleName : [moduleName]).forEach((modName) => {
const resolved = exports.RESOLVABLE_MODULE_NAMES[modName];
if (resolved) {
resolved.forEach((resolvedModName) => {
const rowModelForModule = exports.MODULES_FOR_ROW_MODELS[resolvedModName];
// don't show module for different row models
if (!rowModelForModule || rowModelForModule === rowModelType) {
resolvedModuleNames.push(resolvedModName);
}
});
}
else {
resolvedModuleNames.push(modName);
}
});
return resolvedModuleNames;
}
exports.resolveModuleNames = resolveModuleNames;
/***/ }),
/***/ 4842:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.COL_DEF_VALIDATORS = void 0;
const sortService_1 = __webpack_require__(8125);
const logging_1 = __webpack_require__(7764);
const userCompValidations_1 = __webpack_require__(1389);
const COLUMN_DEFINITION_DEPRECATIONS = () => ({
checkboxSelection: { version: '32.2', message: 'Use `rowSelection.checkboxes` in `GridOptions` instead.' },
headerCheckboxSelection: {
version: '32.2',
message: 'Use `rowSelection.headerCheckbox = true` in `GridOptions` instead.',
},
headerCheckboxSelectionFilteredOnly: {
version: '32.2',
message: 'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.',
},
headerCheckboxSelectionCurrentPageOnly: {
version: '32.2',
message: 'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.',
},
showDisabledCheckboxes: {
version: '32.2',
message: 'Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead.',
},
});
const COLUMN_DEFINITION_VALIDATIONS = () => ({
aggFunc: { module: 'SharedAggregation' },
autoHeight: {
supportedRowModels: ['clientSide', 'serverSide'],
module: 'RowAutoHeight',
},
cellClass: { module: 'CellStyle' },
cellClassRules: { module: 'CellStyle' },
cellEditor: ({ cellEditor, editable }) => {
if (!editable) {
return null;
}
if (typeof cellEditor === 'string') {
const module = userCompValidations_1.USER_COMP_MODULES[cellEditor];
if (module) {
return { module };
}
}
return { module: 'CustomEditor' };
},
cellRenderer: ({ cellRenderer }) => {
if (typeof cellRenderer !== 'string') {
return null;
}
const module = userCompValidations_1.USER_COMP_MODULES[cellRenderer];
if (module) {
return { module };
}
return null;
},
cellRendererParams: {
validate: (colDef) => {
const groupColumn = colDef.rowGroup != null ||
colDef.rowGroupIndex != null ||
colDef.cellRenderer === 'agGroupCellRenderer';
if (groupColumn && 'checkbox' in colDef.cellRendererParams) {
return 'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.';
}
return null;
},
},
cellStyle: { module: 'CellStyle' },
children: () => (0, exports.COL_DEF_VALIDATORS)(),
columnChooserParams: {
module: 'ColumnMenu',
},
contextMenuItems: { module: 'ContextMenu' },
dndSource: { module: 'DragAndDrop' },
dndSourceOnRowDrag: { module: 'DragAndDrop' },
editable: ({ editable, cellEditor }) => {
if (editable && !cellEditor) {
return {
module: 'TextEditor',
};
}
return null;
},
enableCellChangeFlash: { module: 'HighlightChanges' },
enablePivot: { module: 'SharedPivot' },
enableRowGroup: { module: 'SharedRowGrouping' },
enableValue: { module: 'SharedAggregation' },
filter: ({ filter }) => {
if (filter && typeof filter !== 'string' && typeof filter !== 'boolean') {
return { module: 'CustomFilter' };
}
if (typeof filter === 'string') {
const module = userCompValidations_1.USER_COMP_MODULES[filter];
if (module) {
return { module };
}
}
return { module: 'ColumnFilter' };
},
floatingFilter: { module: 'ColumnFilter' },
headerCheckboxSelection: {
supportedRowModels: ['clientSide', 'serverSide'],
validate: (_options, { rowSelection }) => rowSelection === 'multiple' ? null : 'headerCheckboxSelection is only supported with rowSelection=multiple',
},
headerCheckboxSelectionCurrentPageOnly: {
supportedRowModels: ['clientSide'],
validate: (_options, { rowSelection }) => rowSelection === 'multiple'
? null
: 'headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple',
},
headerCheckboxSelectionFilteredOnly: {
supportedRowModels: ['clientSide'],
validate: (_options, { rowSelection }) => rowSelection === 'multiple'
? null
: 'headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple',
},
headerTooltip: { module: 'Tooltip' },
headerValueGetter: {
validate: (_options) => {
const headerValueGetter = _options.headerValueGetter;
if (typeof headerValueGetter === 'function' || typeof headerValueGetter === 'string') {
return null;
}
return 'headerValueGetter must be a function or a valid string expression';
},
},
icons: {
validate: ({ icons }) => {
if (icons) {
if (icons['smallDown']) {
return (0, logging_1._errMsg)(262);
}
if (icons['smallLeft']) {
return (0, logging_1._errMsg)(263);
}
if (icons['smallRight']) {
return (0, logging_1._errMsg)(264);
}
}
return null;
},
},
mainMenuItems: { module: 'ColumnMenu' },
menuTabs: (options) => {
const enterpriseMenuTabs = ['columnsMenuTab', 'generalMenuTab'];
if (options.menuTabs?.some((tab) => enterpriseMenuTabs.includes(tab))) {
return {
module: 'ColumnMenu',
};
}
return null;
},
pivot: { module: 'SharedPivot' },
pivotIndex: { module: 'SharedPivot' },
rowDrag: { module: 'RowDrag' },
rowGroup: { module: 'SharedRowGrouping' },
rowGroupIndex: { module: 'SharedRowGrouping' },
sortingOrder: {
validate: (_options) => {
const sortingOrder = _options.sortingOrder;
if (Array.isArray(sortingOrder) && sortingOrder.length > 0) {
const invalidItems = sortingOrder.filter((a) => !sortService_1.DEFAULT_SORTING_ORDER.includes(a));
if (invalidItems.length > 0) {
return `sortingOrder must be an array with elements from [${sortService_1.DEFAULT_SORTING_ORDER.map(logging_1.toStringWithNullUndefined).join()}], currently it includes [${invalidItems.map(logging_1.toStringWithNullUndefined).join()}]`;
}
}
else if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {
return `sortingOrder must be an array with at least one element, currently it's ${sortingOrder}`;
}
return null;
},
},
tooltipField: { module: 'Tooltip' },
tooltipValueGetter: { module: 'Tooltip' },
type: {
validate: (_options) => {
const type = _options.type;
if (type instanceof Array) {
const invalidArray = type.some((a) => typeof a !== 'string');
if (invalidArray) {
return "if colDef.type is supplied an array it should be of type 'string[]'";
}
return null;
}
if (typeof type === 'string') {
return null;
}
return "colDef.type should be of type 'string' | 'string[]'";
},
},
rowSpan: {
validate: (_options, { suppressRowTransform }) => {
if (!suppressRowTransform) {
return 'colDef.rowSpan requires suppressRowTransform to be enabled.';
}
return null;
},
},
spanRows: {
module: 'CellSpan',
dependencies: {
editable: { required: [false, undefined] },
rowDrag: { required: [false, undefined] },
colSpan: { required: [false, undefined] },
rowSpan: { required: [false, undefined] },
},
validate: (_options, { rowSelection, cellSelection, suppressRowTransform, enableCellSpan, pagination, rowDragEntireRow, enableCellTextSelection, }) => {
if (typeof rowSelection === 'object') {
if (rowSelection?.mode === 'singleRow' && rowSelection?.enableClickSelection) {
return 'colDef.spanRows is not supported with rowSelection.clickSelection';
}
}
if (cellSelection) {
return 'colDef.spanRows is not supported with cellSelection.';
}
if (suppressRowTransform) {
return 'colDef.spanRows is not supported with suppressRowTransform.';
}
if (!enableCellSpan) {
return 'colDef.spanRows requires enableCellSpan to be enabled.';
}
if (pagination) {
return 'colDef.spanRows is not supported with pagination.';
}
if (rowDragEntireRow) {
return 'colDef.spanRows is not supported with rowDragEntireRow.';
}
if (enableCellTextSelection) {
return 'colDef.spanRows is not supported with enableCellTextSelection.';
}
return null;
},
},
});
const colDefPropertyMap = {
headerName: undefined,
columnGroupShow: undefined,
headerStyle: undefined,
headerClass: undefined,
toolPanelClass: undefined,
headerValueGetter: undefined,
pivotKeys: undefined,
groupId: undefined,
colId: undefined,
sort: undefined,
initialSort: undefined,
field: undefined,
type: undefined,
cellDataType: undefined,
tooltipComponent: undefined,
tooltipField: undefined,
headerTooltip: undefined,
cellClass: undefined,
showRowGroup: undefined,
filter: undefined,
initialAggFunc: undefined,
defaultAggFunc: undefined,
aggFunc: undefined,
pinned: undefined,
initialPinned: undefined,
chartDataType: undefined,
cellAriaRole: undefined,
cellEditorPopupPosition: undefined,
headerGroupComponent: undefined,
headerGroupComponentParams: undefined,
cellStyle: undefined,
cellRenderer: undefined,
cellRendererParams: undefined,
cellEditor: undefined,
cellEditorParams: undefined,
filterParams: undefined,
pivotValueColumn: undefined,
headerComponent: undefined,
headerComponentParams: undefined,
floatingFilterComponent: undefined,
floatingFilterComponentParams: undefined,
tooltipComponentParams: undefined,
refData: undefined,
columnChooserParams: undefined,
children: undefined,
sortingOrder: undefined,
allowedAggFuncs: undefined,
menuTabs: undefined,
pivotTotalColumnIds: undefined,
cellClassRules: undefined,
icons: undefined,
sortIndex: undefined,
initialSortIndex: undefined,
flex: undefined,
initialFlex: undefined,
width: undefined,
initialWidth: undefined,
minWidth: undefined,
maxWidth: undefined,
rowGroupIndex: undefined,
initialRowGroupIndex: undefined,
pivotIndex: undefined,
initialPivotIndex: undefined,
suppressColumnsToolPanel: undefined,
suppressFiltersToolPanel: undefined,
openByDefault: undefined,
marryChildren: undefined,
suppressStickyLabel: undefined,
hide: undefined,
initialHide: undefined,
rowGroup: undefined,
initialRowGroup: undefined,
pivot: undefined,
initialPivot: undefined,
checkboxSelection: undefined,
showDisabledCheckboxes: undefined,
headerCheckboxSelection: undefined,
headerCheckboxSelectionFilteredOnly: undefined,
headerCheckboxSelectionCurrentPageOnly: undefined,
suppressHeaderMenuButton: undefined,
suppressMovable: undefined,
lockPosition: undefined,
lockVisible: undefined,
lockPinned: undefined,
unSortIcon: undefined,
suppressSizeToFit: undefined,
suppressAutoSize: undefined,
enableRowGroup: undefined,
enablePivot: undefined,
enableValue: undefined,
editable: undefined,
suppressPaste: undefined,
suppressNavigable: undefined,
enableCellChangeFlash: undefined,
rowDrag: undefined,
dndSource: undefined,
autoHeight: undefined,
wrapText: undefined,
sortable: undefined,
resizable: undefined,
singleClickEdit: undefined,
floatingFilter: undefined,
cellEditorPopup: undefined,
suppressFillHandle: undefined,
wrapHeaderText: undefined,
autoHeaderHeight: undefined,
dndSourceOnRowDrag: undefined,
valueGetter: undefined,
valueSetter: undefined,
filterValueGetter: undefined,
keyCreator: undefined,
valueFormatter: undefined,
valueParser: undefined,
comparator: undefined,
equals: undefined,
pivotComparator: undefined,
suppressKeyboardEvent: undefined,
suppressHeaderKeyboardEvent: undefined,
colSpan: undefined,
rowSpan: undefined,
spanRows: undefined,
getQuickFilterText: undefined,
onCellValueChanged: undefined,
onCellClicked: undefined,
onCellDoubleClicked: undefined,
onCellContextMenu: undefined,
rowDragText: undefined,
tooltipValueGetter: undefined,
cellRendererSelector: undefined,
cellEditorSelector: undefined,
suppressSpanHeaderHeight: undefined,
useValueFormatterForExport: undefined,
useValueParserForImport: undefined,
mainMenuItems: undefined,
contextMenuItems: undefined,
suppressFloatingFilterButton: undefined,
suppressHeaderFilterButton: undefined,
suppressHeaderContextMenu: undefined,
loadingCellRenderer: undefined,
loadingCellRendererParams: undefined,
loadingCellRendererSelector: undefined,
context: undefined,
};
const ALL_PROPERTIES = () => Object.keys(colDefPropertyMap);
const COL_DEF_VALIDATORS = () => ({
objectName: 'colDef',
allProperties: ALL_PROPERTIES(),
docsUrl: 'column-properties/',
deprecations: COLUMN_DEFINITION_DEPRECATIONS(),
validations: COLUMN_DEFINITION_VALIDATIONS(),
});
exports.COL_DEF_VALIDATORS = COL_DEF_VALIDATORS;
/***/ }),
/***/ 711:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GRID_OPTIONS_VALIDATORS = void 0;
const eventTypes_1 = __webpack_require__(3080);
const gridOptionsUtils_1 = __webpack_require__(7274);
const propertyKeys_1 = __webpack_require__(920);
const sortService_1 = __webpack_require__(8125);
const object_1 = __webpack_require__(6996);
const logging_1 = __webpack_require__(7764);
/**
* Deprecations have been kept separately for ease of removing them in the future.
*
* If the property was simply renamed, use the `renamed` property. The value will be implicitly copied to the new property.
*/
const GRID_OPTION_DEPRECATIONS = () => ({
suppressLoadingOverlay: { version: '32', message: 'Use `loading`=false instead.' },
enableFillHandle: { version: '32.2', message: 'Use `cellSelection.handle` instead.' },
enableRangeHandle: { version: '32.2', message: 'Use `cellSelection.handle` instead.' },
enableRangeSelection: { version: '32.2', message: 'Use `cellSelection = true` instead.' },
suppressMultiRangeSelection: {
version: '32.2',
message: 'Use `cellSelection.suppressMultiRanges` instead.',
},
suppressClearOnFillReduction: {
version: '32.2',
message: 'Use `cellSelection.handle.suppressClearOnFillReduction` instead.',
},
fillHandleDirection: { version: '32.2', message: 'Use `cellSelection.handle.direction` instead.' },
fillOperation: { version: '32.2', message: 'Use `cellSelection.handle.setFillValue` instead.' },
suppressRowClickSelection: {
version: '32.2',
message: 'Use `rowSelection.enableClickSelection` instead.',
},
suppressRowDeselection: { version: '32.2', message: 'Use `rowSelection.enableClickSelection` instead.' },
rowMultiSelectWithClick: {
version: '32.2',
message: 'Use `rowSelection.enableSelectionWithoutKeys` instead.',
},
groupSelectsChildren: {
version: '32.2',
message: 'Use `rowSelection.groupSelects = "descendants"` instead.',
},
groupSelectsFiltered: {
version: '32.2',
message: 'Use `rowSelection.groupSelects = "filteredDescendants"` instead.',
},
isRowSelectable: { version: '32.2', message: 'Use `selectionOptions.isRowSelectable` instead.' },
suppressCopySingleCellRanges: { version: '32.2', message: 'Use `rowSelection.copySelectedRows` instead.' },
suppressCopyRowsToClipboard: { version: '32.2', message: 'Use `rowSelection.copySelectedRows` instead.' },
onRangeSelectionChanged: { version: '32.2', message: 'Use `onCellSelectionChanged` instead.' },
onRangeDeleteStart: { version: '32.2', message: 'Use `onCellSelectionDeleteStart` instead.' },
onRangeDeleteEnd: { version: '32.2', message: 'Use `onCellSelectionDeleteEnd` instead.' },
suppressBrowserResizeObserver: {
version: '32.2',
message: "The grid always uses the browser's ResizeObserver, this grid option has no effect.",
},
onColumnEverythingChanged: {
version: '32.2',
message: 'Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events.',
},
groupRemoveSingleChildren: {
version: '33',
message: 'Use `groupHideParentOfSingleChild` instead.',
},
groupRemoveLowestSingleChildren: {
version: '33',
message: 'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.',
},
suppressRowGroupHidesColumns: {
version: '33',
message: 'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.',
},
suppressMakeColumnVisibleAfterUnGroup: {
version: '33',
message: 'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.',
},
unSortIcon: { version: '33', message: 'Use `defaultColDef.unSortIcon` instead.' },
sortingOrder: { version: '33', message: 'Use `defaultColDef.sortingOrder` instead.' },
suppressPropertyNamesCheck: {
version: '33',
message: '`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant.',
},
});
function toConstrainedNum(key, value, min, max = Number.MAX_VALUE) {
if (typeof value === 'number' || value == null) {
if (value == null) {
return null;
}
if (value >= min && value <= max) {
return null;
}
if (max === Number.MAX_VALUE) {
return `${key}: value should be greater than or equal to ${min}`;
}
return `${key}: value should be between ${min} and ${max}`;
}
return `${key}: value should be a number`;
}
/**
* Validation rules for gridOptions
*/
const GRID_OPTION_VALIDATIONS = () => {
const definedValidations = {
alignedGrids: { module: 'AlignedGrids' },
allowContextMenuWithControlKey: { module: 'ContextMenu' },
autoSizePadding: {
validate({ autoSizePadding }) {
return toConstrainedNum('autoSizePadding', autoSizePadding, 0);
},
},
autoSizeStrategy: { module: 'ColumnAutoSize' },
cacheBlockSize: {
supportedRowModels: ['serverSide', 'infinite'],
validate({ cacheBlockSize }) {
return toConstrainedNum('cacheBlockSize', cacheBlockSize, 1);
},
},
cacheOverflowSize: {
validate({ cacheOverflowSize }) {
return toConstrainedNum('cacheOverflowSize', cacheOverflowSize, 1);
},
},
cellSelection: {
module: 'CellSelection',
},
columnHoverHighlight: { module: 'ColumnHover' },
datasource: {
supportedRowModels: ['infinite'],
module: 'InfiniteRowModel',
},
doesExternalFilterPass: { module: 'ExternalFilter' },
domLayout: {
validate: (options) => {
const domLayout = options.domLayout;
const validLayouts = ['autoHeight', 'normal', 'print'];
if (domLayout && !validLayouts.includes(domLayout)) {
return `domLayout must be one of [${validLayouts.join()}], currently it's ${domLayout}`;
}
return null;
},
},
editType: {
module: 'EditCore',
},
enableAdvancedFilter: { module: 'AdvancedFilter' },
enableCharts: { module: 'IntegratedCharts' },
enableFillHandle: {
dependencies: {
enableRangeSelection: { required: [true] },
},
},
enableRangeHandle: {
dependencies: {
enableRangeSelection: { required: [true] },
},
},
enableRangeSelection: {
module: 'CellSelection',
dependencies: {
rowDragEntireRow: { required: [false, undefined] },
},
},
rowNumbers: {
module: 'RowNumbers',
},
getContextMenuItems: { module: 'ContextMenu' },
getLocaleText: { module: 'Locale' },
getMainMenuItems: { module: 'ColumnMenu' },
getRowClass: { module: 'RowStyle' },
getRowStyle: { module: 'RowStyle' },
grandTotalRow: { module: 'SharedRowGrouping' },
groupDefaultExpanded: {
supportedRowModels: ['clientSide'],
},
groupHideOpenParents: {
supportedRowModels: ['clientSide', 'serverSide'],
dependencies: {
groupTotalRow: { required: [undefined, 'bottom'] },
treeData: {
required: [undefined, false],
reason: "Tree Data has values at the group level so it doesn't make sense to hide them.",
},
},
},
groupHideParentOfSingleChild: {
dependencies: {
groupHideOpenParents: { required: [undefined, false] },
},
},
groupRemoveLowestSingleChildren: {
dependencies: {
groupHideOpenParents: { required: [undefined, false] },
groupRemoveSingleChildren: { required: [undefined, false] },
},
},
groupRemoveSingleChildren: {
dependencies: {
groupHideOpenParents: { required: [undefined, false] },
groupRemoveLowestSingleChildren: { required: [undefined, false] },
},
},
groupSelectsChildren: {
dependencies: {
rowSelection: { required: ['multiple'] },
},
},
icons: {
validate: ({ icons }) => {
if (icons) {
if (icons['smallDown']) {
return (0, logging_1._errMsg)(262);
}
if (icons['smallLeft']) {
return (0, logging_1._errMsg)(263);
}
if (icons['smallRight']) {
return (0, logging_1._errMsg)(264);
}
}
return null;
},
},
infiniteInitialRowCount: {
validate({ infiniteInitialRowCount }) {
return toConstrainedNum('infiniteInitialRowCount', infiniteInitialRowCount, 1);
},
},
initialGroupOrderComparator: {
supportedRowModels: ['clientSide'],
},
initialState: { module: 'GridState' },
isExternalFilterPresent: { module: 'ExternalFilter' },
keepDetailRowsCount: {
validate({ keepDetailRowsCount }) {
return toConstrainedNum('keepDetailRowsCount', keepDetailRowsCount, 1);
},
},
localeText: {
module: 'Locale',
},
masterDetail: { module: 'SharedMasterDetail' },
pagination: { module: 'Pagination' },
paginationPageSize: {
validate({ paginationPageSize }) {
return toConstrainedNum('paginationPageSize', paginationPageSize, 1);
},
},
paginationPageSizeSelector: {
validate: (options) => {
const values = options.paginationPageSizeSelector;
if (typeof values === 'boolean' || values == null) {
return null;
}
if (!values.length) {
return `'paginationPageSizeSelector' cannot be an empty array.
If you want to hide the page size selector, set paginationPageSizeSelector to false.`;
}
return null;
},
},
pinnedTopRowData: {
module: 'PinnedRow',
},
pinnedBottomRowData: {
module: 'PinnedRow',
},
pivotMode: {
dependencies: {
treeData: {
required: [false, undefined],
reason: 'Pivot Mode is not supported with Tree Data.',
},
},
module: 'SharedPivot',
},
pivotPanelShow: { module: 'RowGroupingPanel' },
quickFilterText: {
supportedRowModels: ['clientSide'],
module: 'QuickFilter',
},
rowBuffer: {
validate({ rowBuffer }) {
return toConstrainedNum('rowBuffer', rowBuffer, 0);
},
},
rowClass: {
validate: (options) => {
const rowClass = options.rowClass;
if (typeof rowClass === 'function') {
return 'rowClass should not be a function, please use getRowClass instead';
}
return null;
},
module: 'RowStyle',
},
rowClassRules: { module: 'RowStyle' },
rowData: {
supportedRowModels: ['clientSide'],
module: 'ClientSideRowModel',
},
rowDragManaged: {
supportedRowModels: ['clientSide'],
dependencies: {
treeData: {
required: [false, undefined],
},
pagination: {
required: [false, undefined],
},
},
module: 'RowDrag',
},
rowGroupPanelShow: { module: 'RowGroupingPanel' },
rowSelection: {
validate({ rowSelection }) {
if (rowSelection && typeof rowSelection === 'string') {
return 'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.';
}
if (rowSelection && typeof rowSelection !== 'object') {
return 'Expected `RowSelectionOptions` object for the `rowSelection` property.';
}
if (rowSelection && rowSelection.mode !== 'multiRow' && rowSelection.mode !== 'singleRow') {
return `Selection mode "${rowSelection.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`;
}
return null;
},
module: 'SharedRowSelection',
},
rowStyle: {
validate: (options) => {
const rowStyle = options.rowStyle;
if (rowStyle && typeof rowStyle === 'function') {
return 'rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead';
}
return null;
},
module: 'RowStyle',
},
serverSideDatasource: {
supportedRowModels: ['serverSide'],
module: 'ServerSideRowModel',
},
serverSideInitialRowCount: {
supportedRowModels: ['serverSide'],
validate({ serverSideInitialRowCount }) {
return toConstrainedNum('serverSideInitialRowCount', serverSideInitialRowCount, 1);
},
},
serverSideOnlyRefreshFilteredGroups: {
supportedRowModels: ['serverSide'],
},
serverSideSortAllLevels: {
supportedRowModels: ['serverSide'],
},
sideBar: { module: 'SideBar' },
sortingOrder: {
validate: (_options) => {
const sortingOrder = _options.sortingOrder;
if (Array.isArray(sortingOrder) && sortingOrder.length > 0) {
const invalidItems = sortingOrder.filter((a) => !sortService_1.DEFAULT_SORTING_ORDER.includes(a));
if (invalidItems.length > 0) {
return `sortingOrder must be an array with elements from [${sortService_1.DEFAULT_SORTING_ORDER.map(logging_1.toStringWithNullUndefined).join()}], currently it includes [${invalidItems.map(logging_1.toStringWithNullUndefined).join()}]`;
}
}
else if (!Array.isArray(sortingOrder) || sortingOrder.length <= 0) {
return `sortingOrder must be an array with at least one element, currently it's ${sortingOrder}`;
}
return null;
},
},
statusBar: { module: 'StatusBar' },
tooltipHideDelay: {
validate: (options) => {
if (options.tooltipHideDelay && options.tooltipHideDelay < 0) {
return 'tooltipHideDelay should not be lower than 0';
}
return null;
},
},
tooltipShowDelay: {
validate: (options) => {
if (options.tooltipShowDelay && options.tooltipShowDelay < 0) {
return 'tooltipShowDelay should not be lower than 0';
}
return null;
},
},
treeData: {
supportedRowModels: ['clientSide', 'serverSide'],
module: 'SharedTreeData',
validate: (options) => {
const rowModel = options.rowModelType ?? 'clientSide';
switch (rowModel) {
case 'clientSide': {
const { treeDataChildrenField, getDataPath } = options;
if (!treeDataChildrenField && !getDataPath) {
return "treeData requires either 'treeDataChildrenField' or 'getDataPath' in the clientSide row model.";
}
if (treeDataChildrenField && getDataPath) {
return "Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";
}
return null;
}
case 'serverSide': {
const ssrmWarning = `treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${rowModel} row model.`;
return options.isServerSideGroup && options.getServerSideGroupKey ? null : ssrmWarning;
}
}
return null;
},
},
treeDataChildrenField: {
module: 'SharedTreeData',
},
undoRedoCellEditing: { module: 'UndoRedoEdit' },
valueCache: { module: 'ValueCache' },
viewportDatasource: {
supportedRowModels: ['viewport'],
module: 'ViewportRowModel',
},
viewportRowModelBufferSize: {
validate({ viewportRowModelBufferSize }) {
return toConstrainedNum('viewportRowModelBufferSize', viewportRowModelBufferSize, 0);
},
},
viewportRowModelPageSize: {
validate({ viewportRowModelPageSize }) {
return toConstrainedNum('viewportRowModelPageSize', viewportRowModelPageSize, 1);
},
},
rowDragEntireRow: {
dependencies: {
cellSelection: { required: [undefined] },
},
},
enableCellSpan: {
module: 'CellSpan',
},
};
const validations = {};
propertyKeys_1._BOOLEAN_GRID_OPTIONS.forEach((key) => {
validations[key] = { expectedType: 'boolean' };
});
propertyKeys_1._NUMBER_GRID_OPTIONS.forEach((key) => {
validations[key] = { expectedType: 'number' };
});
(0, object_1._mergeDeep)(validations, definedValidations);
return validations;
};
const GRID_OPTIONS_VALIDATORS = () => ({
objectName: 'gridOptions',
allProperties: [...propertyKeys_1._ALL_GRID_OPTIONS, ...eventTypes_1._ALL_EVENTS.map((event) => (0, gridOptionsUtils_1._getCallbackForEvent)(event))],
propertyExceptions: ['api'],
docsUrl: 'grid-options/',
deprecations: GRID_OPTION_DEPRECATIONS(),
validations: GRID_OPTION_VALIDATIONS(),
});
exports.GRID_OPTIONS_VALIDATORS = GRID_OPTIONS_VALIDATORS;
/***/ }),
/***/ 9938:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.DEPRECATED_ICONS_V33 = exports.ICON_MODULES = exports.ICON_VALUES = void 0;
exports.ICON_VALUES = {
expanded: 1,
contracted: 1,
'tree-closed': 1,
'tree-open': 1,
'tree-indeterminate': 1,
pin: 1,
'eye-slash': 1,
arrows: 1,
left: 1,
right: 1,
group: 1,
aggregation: 1,
pivot: 1,
'not-allowed': 1,
chart: 1,
cross: 1,
cancel: 1,
tick: 1,
first: 1,
previous: 1,
next: 1,
last: 1,
linked: 1,
unlinked: 1,
'color-picker': 1,
loading: 1,
menu: 1,
'menu-alt': 1,
filter: 1,
columns: 1,
maximize: 1,
minimize: 1,
copy: 1,
cut: 1,
paste: 1,
grip: 1,
save: 1,
csv: 1,
excel: 1,
'small-down': 1,
'small-left': 1,
'small-right': 1,
'small-up': 1,
asc: 1,
desc: 1,
none: 1,
up: 1,
down: 1,
plus: 1,
minus: 1,
settings: 1,
'checkbox-checked': 1,
'checkbox-indeterminate': 1,
'checkbox-unchecked': 1,
'radio-button-on': 1,
'radio-button-off': 1,
eye: 1,
};
exports.ICON_MODULES = {
chart: 'MenuCore',
cancel: 'EnterpriseCore',
first: 'Pagination',
previous: 'Pagination',
next: 'Pagination',
last: 'Pagination',
linked: 'IntegratedCharts',
loadingMenuItems: 'MenuCore',
unlinked: 'IntegratedCharts',
menu: 'ColumnHeaderComp',
legacyMenu: 'ColumnMenu',
filter: 'ColumnFilter',
filterActive: 'ColumnFilter',
filterTab: 'ColumnMenu',
filtersToolPanel: 'FiltersToolPanel',
columns: ['MenuCore'],
columnsToolPanel: ['ColumnsToolPanel'],
maximize: 'EnterpriseCore',
minimize: 'EnterpriseCore',
save: 'MenuCore',
columnGroupOpened: 'ColumnGroupHeaderComp',
columnGroupClosed: 'ColumnGroupHeaderComp',
accordionOpen: 'EnterpriseCore',
accordionClosed: 'EnterpriseCore',
accordionIndeterminate: 'EnterpriseCore',
columnSelectClosed: ['ColumnsToolPanel', 'ColumnMenu'],
columnSelectOpen: ['ColumnsToolPanel', 'ColumnMenu'],
columnSelectIndeterminate: ['ColumnsToolPanel', 'ColumnMenu'],
columnMovePin: 'SharedDragAndDrop',
columnMoveHide: 'SharedDragAndDrop',
columnMoveMove: 'SharedDragAndDrop',
columnMoveLeft: 'SharedDragAndDrop',
columnMoveRight: 'SharedDragAndDrop',
columnMoveGroup: 'SharedDragAndDrop',
columnMoveValue: 'SharedDragAndDrop',
columnMovePivot: 'SharedDragAndDrop',
dropNotAllowed: 'SharedDragAndDrop',
groupContracted: 'GroupCellRenderer',
groupExpanded: 'GroupCellRenderer',
setFilterGroupClosed: 'SetFilter',
setFilterGroupOpen: 'SetFilter',
setFilterGroupIndeterminate: 'SetFilter',
setFilterLoading: 'SetFilter',
close: 'EnterpriseCore',
check: 'MenuItem',
colorPicker: 'CommunityCore',
groupLoading: 'LoadingCellRenderer',
menuAlt: 'ColumnHeaderComp',
menuPin: 'MenuCore',
menuValue: 'MenuCore',
menuAddRowGroup: ['MenuCore', 'ColumnsToolPanel'],
menuRemoveRowGroup: ['MenuCore', 'ColumnsToolPanel'],
clipboardCopy: 'MenuCore',
clipboardCut: 'MenuCore',
clipboardPaste: 'MenuCore',
pivotPanel: ['ColumnsToolPanel', 'RowGroupingPanel'],
rowGroupPanel: ['ColumnsToolPanel', 'RowGroupingPanel'],
valuePanel: 'ColumnsToolPanel',
columnDrag: 'EnterpriseCore',
rowDrag: ['RowDrag', 'DragAndDrop'],
csvExport: 'MenuCore',
excelExport: 'MenuCore',
smallDown: 'CommunityCore',
selectOpen: 'CommunityCore',
richSelectOpen: 'RichSelect',
richSelectRemove: 'RichSelect',
smallLeft: 'CommunityCore',
smallRight: 'CommunityCore',
subMenuOpen: 'MenuItem',
subMenuOpenRtl: 'MenuItem',
panelDelimiter: 'RowGroupingPanel',
panelDelimiterRtl: 'RowGroupingPanel',
smallUp: 'CommunityCore',
sortAscending: ['MenuCore', 'Sort'],
sortDescending: ['MenuCore', 'Sort'],
sortUnSort: ['MenuCore', 'Sort'],
advancedFilterBuilder: 'AdvancedFilter',
advancedFilterBuilderDrag: 'AdvancedFilter',
advancedFilterBuilderInvalid: 'AdvancedFilter',
advancedFilterBuilderMoveUp: 'AdvancedFilter',
advancedFilterBuilderMoveDown: 'AdvancedFilter',
advancedFilterBuilderAdd: 'AdvancedFilter',
advancedFilterBuilderRemove: 'AdvancedFilter',
advancedFilterBuilderSelectOpen: 'AdvancedFilter',
chartsMenu: 'IntegratedCharts',
chartsMenuEdit: 'IntegratedCharts',
chartsMenuAdvancedSettings: 'IntegratedCharts',
chartsMenuAdd: 'IntegratedCharts',
chartsColorPicker: 'IntegratedCharts',
chartsThemePrevious: 'IntegratedCharts',
chartsThemeNext: 'IntegratedCharts',
chartsDownload: 'IntegratedCharts',
checkboxChecked: 'CommunityCore',
checkboxIndeterminate: 'CommunityCore',
checkboxUnchecked: 'CommunityCore',
radioButtonOn: 'CommunityCore',
radioButtonOff: 'CommunityCore',
};
exports.DEPRECATED_ICONS_V33 = new Set([
'colorPicker',
'smallUp',
'checkboxChecked',
'checkboxIndeterminate',
'checkboxUnchecked',
'radioButtonOn',
'radioButtonOff',
'smallDown',
'smallLeft',
'smallRight',
]);
/***/ }),
/***/ 3781:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.MENU_ITEM_MODULES = void 0;
exports.MENU_ITEM_MODULES = {
pinSubMenu: 'PinnedColumn',
pinLeft: 'PinnedColumn',
pinRight: 'PinnedColumn',
clearPinned: 'PinnedColumn',
valueAggSubMenu: 'SharedAggregation',
autoSizeThis: 'ColumnAutoSize',
autoSizeAll: 'ColumnAutoSize',
rowGroup: 'SharedRowGrouping',
rowUnGroup: 'SharedRowGrouping',
resetColumns: 'CommunityCore',
expandAll: ['ClientSideRowModelHierarchy', 'ServerSideRowModel'],
contractAll: ['ClientSideRowModelHierarchy', 'ServerSideRowModel'],
copy: 'Clipboard',
copyWithHeaders: 'Clipboard',
copyWithGroupHeaders: 'Clipboard',
cut: 'Clipboard',
paste: 'Clipboard',
export: ['CsvExport', 'ExcelExport'],
csvExport: 'CsvExport',
excelExport: 'ExcelExport',
separator: 'CommunityCore',
pivotChart: 'IntegratedCharts',
chartRange: 'IntegratedCharts',
columnFilter: 'ColumnFilter',
columnChooser: 'ColumnMenu',
sortAscending: 'Sort',
sortDescending: 'Sort',
sortUnSort: 'Sort',
};
/***/ }),
/***/ 1389:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.USER_COMP_MODULES = void 0;
exports.USER_COMP_MODULES = {
agSetColumnFilter: 'SetFilter',
agSetColumnFloatingFilter: 'SetFilter',
agMultiColumnFilter: 'MultiFilter',
agMultiColumnFloatingFilter: 'MultiFilter',
agGroupColumnFilter: 'GroupFilter',
agGroupColumnFloatingFilter: 'GroupFilter',
agGroupCellRenderer: 'GroupCellRenderer',
agGroupRowRenderer: 'GroupCellRenderer',
agRichSelect: 'RichSelect',
agRichSelectCellEditor: 'RichSelect',
agDetailCellRenderer: 'SharedMasterDetail',
agSparklineCellRenderer: 'Sparklines',
agDragAndDropImage: 'SharedDragAndDrop',
agColumnHeader: 'ColumnHeaderComp',
agColumnGroupHeader: 'ColumnGroupHeaderComp',
agSortIndicator: 'Sort',
agAnimateShowChangeCellRenderer: 'HighlightChanges',
agAnimateSlideCellRenderer: 'HighlightChanges',
agLoadingCellRenderer: 'LoadingCellRenderer',
agSkeletonCellRenderer: 'SkeletonCellRenderer',
agCheckboxCellRenderer: 'CheckboxCellRenderer',
agLoadingOverlay: 'Overlay',
agNoRowsOverlay: 'Overlay',
agTooltipComponent: 'Tooltip',
agReadOnlyFloatingFilter: 'CustomFilter',
agTextColumnFilter: 'TextFilter',
agNumberColumnFilter: 'NumberFilter',
agDateColumnFilter: 'DateFilter',
agDateInput: 'DateFilter',
agTextColumnFloatingFilter: 'TextFilter',
agNumberColumnFloatingFilter: 'NumberFilter',
agDateColumnFloatingFilter: 'DateFilter',
agCellEditor: 'TextEditor',
agSelectCellEditor: 'SelectEditor',
agTextCellEditor: 'TextEditor',
agNumberCellEditor: 'NumberEditor',
agDateCellEditor: 'DateEditor',
agDateStringCellEditor: 'DateEditor',
agCheckboxCellEditor: 'CheckboxEditor',
agLargeTextCellEditor: 'LargeTextEditor',
agMenuItem: 'MenuItem',
agColumnsToolPanel: 'ColumnsToolPanel',
agFiltersToolPanel: 'FiltersToolPanel',
agAggregationComponent: 'StatusBar',
agSelectedRowCountComponent: 'StatusBar',
agTotalRowCountComponent: 'StatusBar',
agFilteredRowCountComponent: 'StatusBar',
agTotalAndFilteredRowCountComponent: 'StatusBar',
};
/***/ }),
/***/ 5010:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ValidationModule = void 0;
const version_1 = __webpack_require__(7205);
const validationService_1 = __webpack_require__(5147);
/**
* @feature Validation
*/
exports.ValidationModule = {
moduleName: 'Validation',
version: version_1.VERSION,
beans: [validationService_1.ValidationService],
};
/***/ }),
/***/ 5147:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports._fuzzyCheckStrings = exports.ValidationService = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsInitial_1 = __webpack_require__(2891);
const moduleRegistry_1 = __webpack_require__(2132);
const function_1 = __webpack_require__(2043);
const fuzzyMatch_1 = __webpack_require__(1298);
const apiFunctionValidator_1 = __webpack_require__(8179);
const errorText_1 = __webpack_require__(5205);
const logging_1 = __webpack_require__(7764);
const colDefValidations_1 = __webpack_require__(4842);
const gridOptionsValidations_1 = __webpack_require__(711);
const iconValidations_1 = __webpack_require__(9938);
const menuItemValidations_1 = __webpack_require__(3781);
const userCompValidations_1 = __webpack_require__(1389);
class ValidationService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'validation';
}
wireBeans(beans) {
this.gridOptions = beans.gridOptions;
(0, logging_1.provideValidationServiceLogger)(this);
}
postConstruct() {
this.processGridOptions(this.gridOptions);
}
warnOnInitialPropertyUpdate(source, key) {
if (source === 'api' && gridOptionsInitial_1.INITIAL_GRID_OPTION_KEYS[key]) {
(0, logging_1._warn)(22, { key });
}
}
processGridOptions(options) {
this.processOptions(options, (0, gridOptionsValidations_1.GRID_OPTIONS_VALIDATORS)());
}
validateApiFunction(functionName, apiFunction) {
return (0, apiFunctionValidator_1.validateApiFunction)(functionName, apiFunction, this.beans);
}
missingUserComponent(propertyName, componentName, agGridDefaults, jsComps) {
const moduleForComponent = userCompValidations_1.USER_COMP_MODULES[componentName];
if (moduleForComponent) {
this.gos.assertModuleRegistered(moduleForComponent, `AG Grid '${propertyName}' component: ${componentName}`);
}
else {
(0, logging_1._warn)(101, {
propertyName,
componentName,
agGridDefaults,
jsComps,
});
}
}
checkRowEvents(eventType) {
if (DEPRECATED_ROW_NODE_EVENTS.has(eventType)) {
(0, logging_1._warn)(10, { eventType });
}
}
validateIcon(iconName) {
if (iconValidations_1.DEPRECATED_ICONS_V33.has(iconName)) {
(0, logging_1._warn)(43, { iconName });
}
if (iconValidations_1.ICON_VALUES[iconName]) {
// directly referencing icon
return;
}
const moduleName = iconValidations_1.ICON_MODULES[iconName];
if (moduleName) {
(0, logging_1._error)(200, {
reasonOrId: `icon '${iconName}'`,
moduleName,
gridScoped: (0, moduleRegistry_1._areModulesGridScoped)(),
gridId: this.beans.context.getGridId(),
rowModelType: this.gos.get('rowModelType'),
additionalText: 'Alternatively, use the CSS icon name directly.',
});
return;
}
(0, logging_1._warn)(134, { iconName });
}
validateMenuItem(key) {
const moduleName = menuItemValidations_1.MENU_ITEM_MODULES[key];
if (moduleName) {
this.gos.assertModuleRegistered(moduleName, `menu item '${key}'`);
}
}
isProvidedUserComp(compName) {
return !!userCompValidations_1.USER_COMP_MODULES[compName];
}
validateColDef(colDef, colId, skipInferenceCheck) {
if (skipInferenceCheck || !this.beans.dataTypeSvc?.isColPendingInference(colId)) {
this.processOptions(colDef, (0, colDefValidations_1.COL_DEF_VALIDATORS)());
}
}
processOptions(options, validator) {
const { validations, deprecations, allProperties, propertyExceptions, objectName, docsUrl } = validator;
if (allProperties && this.gridOptions.suppressPropertyNamesCheck !== true) {
this.checkProperties(options, [...(propertyExceptions ?? []), ...Object.keys(deprecations)], allProperties, objectName, docsUrl);
}
const warnings = new Set();
const getRules = (key) => {
const rulesOrGetter = validations[key];
if (!rulesOrGetter) {
return;
}
else if (typeof rulesOrGetter === 'function') {
const fromGetter = rulesOrGetter(options, this.gridOptions, this.beans);
if (!fromGetter) {
return;
}
// this is a sub validator.
if ('objectName' in fromGetter) {
const value = options[key];
if (Array.isArray(value)) {
value.forEach((item) => {
this.processOptions(item, fromGetter);
});
return;
}
this.processOptions(options[key], fromGetter);
return;
}
return fromGetter;
}
else {
return rulesOrGetter;
}
};
const optionKeys = Object.keys(options);
optionKeys.forEach((key) => {
const deprecation = deprecations[key];
if (deprecation) {
const { message, version } = deprecation;
warnings.add(`As of v${version}, ${String(key)} is deprecated. ${message ?? ''}`);
}
const value = options[key];
if (value == null || value === false) {
// false implies feature is disabled, don't validate.
return;
}
const rules = getRules(key);
if (!rules) {
return;
}
const { module, dependencies, validate, supportedRowModels, expectedType } = rules;
if (expectedType) {
const actualType = typeof value;
if (actualType !== expectedType) {
warnings.add(`${String(key)} should be of type '${expectedType}' but received '${actualType}' (${value}).`);
return;
}
}
if (supportedRowModels) {
const rowModel = this.gridOptions.rowModelType ?? 'clientSide';
if (!supportedRowModels.includes(rowModel)) {
warnings.add(`${String(key)} is not supported with the '${rowModel}' row model. It is only valid with: ${supportedRowModels.join(', ')}.`);
return;
}
}
if (module) {
const modules = Array.isArray(module) ? module : [module];
let allRegistered = true;
modules.forEach((m) => {
if (!this.gos.assertModuleRegistered(m, String(key))) {
allRegistered = false;
}
});
if (!allRegistered) {
return;
}
}
if (dependencies) {
const warning = this.checkForRequiredDependencies(key, dependencies, options);
if (warning) {
warnings.add(warning);
return;
}
}
if (validate) {
const warning = validate(options, this.gridOptions, this.beans);
if (warning) {
warnings.add(warning);
return;
}
}
});
if (warnings.size > 0) {
warnings.forEach((warning) => {
(0, function_1._warnOnce)(warning);
});
}
}
checkForRequiredDependencies(key, validator, options) {
// eslint-disable-next-line no-restricted-properties
const optionEntries = Object.entries(validator);
const failedOptions = optionEntries.filter(([key, value]) => {
const gridOptionValue = options[key];
return !value.required.includes(gridOptionValue);
});
if (failedOptions.length === 0) {
return null;
}
return failedOptions
.map(([failedKey, possibleOptions]) => `'${String(key)}' requires '${failedKey}' to be one of [${possibleOptions.required
.map((o) => {
if (o === null) {
return 'null';
}
else if (o === undefined) {
return 'undefined';
}
return o;
})
.join(', ')}]. ${possibleOptions.reason ?? ''}`)
.join('\n '); // make multiple messages easier to read
}
checkProperties(object, exceptions, // deprecated properties generally
validProperties, // properties to recommend
containerName, docsUrl) {
// Vue adds these properties to all objects, so we ignore them when checking for invalid properties
const VUE_FRAMEWORK_PROPS = ['__ob__', '__v_skip', '__metadata__'];
const invalidProperties = _fuzzyCheckStrings(Object.getOwnPropertyNames(object), [...VUE_FRAMEWORK_PROPS, ...exceptions, ...validProperties], validProperties);
const invalidPropertiesKeys = Object.keys(invalidProperties);
for (const key of invalidPropertiesKeys) {
const value = invalidProperties[key];
let message = `invalid ${containerName} property '${key}' did you mean any of these: ${value.slice(0, 8).join(', ')}.`;
if (validProperties.includes('context')) {
message += `\nIf you are trying to annotate ${containerName} with application data, use the '${containerName}.context' property instead.`;
}
(0, function_1._warnOnce)(message);
}
if (invalidPropertiesKeys.length > 0 && docsUrl) {
const url = this.beans.frameworkOverrides.getDocLink(docsUrl);
(0, function_1._warnOnce)(`to see all the valid ${containerName} properties please check: ${url}`);
}
}
getConsoleMessage(id, args) {
return (0, errorText_1.getError)(id, args);
}
}
exports.ValidationService = ValidationService;
function _fuzzyCheckStrings(inputValues, validValues, allSuggestions) {
const fuzzyMatches = {};
const invalidInputs = inputValues.filter((inputValue) => !validValues.some((validValue) => validValue === inputValue));
if (invalidInputs.length > 0) {
invalidInputs.forEach((invalidInput) => (fuzzyMatches[invalidInput] = (0, fuzzyMatch_1._fuzzySuggestions)({ inputValue: invalidInput, allSuggestions }).values));
}
return fuzzyMatches;
}
exports._fuzzyCheckStrings = _fuzzyCheckStrings;
const DEPRECATED_ROW_NODE_EVENTS = new Set([
'firstChildChanged',
'lastChildChanged',
'childIndexChanged',
]);
/***/ }),
/***/ 7486:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getCellValue = exports.expireValueCache = void 0;
const generic_1 = __webpack_require__(4422);
const string_1 = __webpack_require__(7766);
function expireValueCache(beans) {
beans.valueCache?.expire();
}
exports.expireValueCache = expireValueCache;
function getCellValue(beans, params) {
const { colKey, rowNode, useFormatter } = params;
const column = beans.colModel.getColDefCol(colKey) ?? beans.colModel.getCol(colKey);
if ((0, generic_1._missing)(column)) {
return null;
}
const value = beans.valueSvc.getValueForDisplay(column, rowNode);
if (useFormatter) {
const formattedValue = beans.valueSvc.formatValue(column, rowNode, value);
// Match the logic in the default cell renderer insertValueWithoutCellRenderer if no formatter is used
return formattedValue ?? (0, string_1._escapeString)(value, true);
}
return value;
}
exports.getCellValue = getCellValue;
/***/ }),
/***/ 2878:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ChangeDetectionService = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const changedPath_1 = __webpack_require__(6800);
// Matches value in clipboard module
const SOURCE_PASTE = 'paste';
class ChangeDetectionService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'changeDetectionSvc';
this.clientSideRowModel = null;
}
postConstruct() {
const { gos, rowModel } = this.beans;
if ((0, gridOptionsUtils_1._isClientSideRowModel)(gos, rowModel)) {
this.clientSideRowModel = rowModel;
}
this.addManagedEventListeners({ cellValueChanged: this.onCellValueChanged.bind(this) });
}
onCellValueChanged(event) {
const { gos, rowRenderer } = this.beans;
// Clipboard service manages its own change detection, so no need to do it here.
// The clipboard manages its own as otherwise this would happen once for every cell
// that got updated as part of a paste operation, so e.g. if 100 cells in a paste operation,
// this doChangeDetection would get called 100 times (once for each cell), instead clipboard
// service executes the logic we have here once (in essence batching up all cell changes
// into one change detection).
if (event.source === SOURCE_PASTE || gos.get('suppressChangeDetection')) {
return;
}
const rowNode = event.node;
const nodesToRefresh = [rowNode];
const clientSideRowModel = this.clientSideRowModel;
const rootNode = clientSideRowModel?.rootNode;
// step 1 of change detection is to update the aggregated values
if (rootNode && !rowNode.isRowPinned()) {
const onlyChangedColumns = gos.get('aggregateOnlyChangedColumns');
const changedPath = new changedPath_1.ChangedPath(onlyChangedColumns, rootNode);
changedPath.addParentNode(rowNode.parent, [event.column]);
clientSideRowModel.doAggregate(changedPath);
// add all nodes impacted by aggregation, as they need refreshed also.
changedPath.forEachChangedNodeDepthFirst((rowNode) => {
nodesToRefresh.push(rowNode);
});
}
// step 2 of change detection is to refresh the cells
rowRenderer.refreshCells({ rowNodes: nodesToRefresh });
}
}
exports.ChangeDetectionService = ChangeDetectionService;
/***/ }),
/***/ 5751:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ExpressionService = void 0;
const beanStub_1 = __webpack_require__(8731);
const logging_1 = __webpack_require__(7764);
class ExpressionService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'expressionSvc';
this.cache = {};
}
evaluate(expression, params) {
if (typeof expression === 'string') {
// valueGetter is an expression, so execute the expression
return this.evaluateExpression(expression, params);
}
else {
(0, logging_1._error)(15, { expression });
}
}
evaluateExpression(expression, params) {
try {
const javaScriptFunction = this.createExpressionFunction(expression);
// the params don't have all these values, rather we add every possible
// value a params can have, which makes whatever is in the params available.
const result = javaScriptFunction(params.value, params.context, params.oldValue, params.newValue, params.value, params.node, params.data, params.colDef, params.rowIndex, params.api, params.getValue, params.column, params.columnGroup);
return result;
}
catch (e) {
// the expression failed, which can happen, as it's the client that
// provides the expression. so print a nice message
(0, logging_1._error)(16, { expression, params, e });
return null;
}
}
createExpressionFunction(expression) {
const expressionToFunctionCache = this.cache;
// check cache first
if (expressionToFunctionCache[expression]) {
return expressionToFunctionCache[expression];
}
// if not found in cache, return the function
const functionBody = this.createFunctionBody(expression);
const theFunction = new Function('x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup', functionBody);
// store in cache
expressionToFunctionCache[expression] = theFunction;
return theFunction;
}
createFunctionBody(expression) {
// if the expression has the 'return' word in it, then use as is,
// if not, then wrap it with return and ';' to make a function
if (expression.indexOf('return') >= 0) {
return expression;
}
else {
return 'return ' + expression + ';';
}
}
}
exports.ExpressionService = ExpressionService;
/***/ }),
/***/ 3913:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ValueCache = void 0;
const beanStub_1 = __webpack_require__(8731);
class ValueCache extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'valueCache';
this.cacheVersion = 0;
}
postConstruct() {
const gos = this.gos;
this.active = gos.get('valueCache');
this.neverExpires = gos.get('valueCacheNeverExpires');
}
onDataChanged() {
if (this.neverExpires) {
return;
}
this.expire();
}
expire() {
this.cacheVersion++;
}
setValue(rowNode, colId, value) {
if (this.active) {
const cacheVersion = this.cacheVersion;
if (rowNode.__cacheVersion !== cacheVersion) {
rowNode.__cacheVersion = cacheVersion;
rowNode.__cacheData = {};
}
rowNode.__cacheData[colId] = value;
}
}
getValue(rowNode, colId) {
if (!this.active || rowNode.__cacheVersion !== this.cacheVersion) {
return undefined;
}
return rowNode.__cacheData[colId];
}
}
exports.ValueCache = ValueCache;
/***/ }),
/***/ 6431:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CellApiModule = exports.ChangeDetectionModule = exports.ExpressionModule = exports.ValueCacheModule = void 0;
const version_1 = __webpack_require__(7205);
const cellApi_1 = __webpack_require__(7486);
const changeDetectionService_1 = __webpack_require__(2878);
const expressionService_1 = __webpack_require__(5751);
const valueCache_1 = __webpack_require__(3913);
/**
* @feature Performance -> Value Cache
* @gridOption valueCache
*/
exports.ValueCacheModule = {
moduleName: 'ValueCache',
version: version_1.VERSION,
beans: [valueCache_1.ValueCache],
apiFunctions: {
expireValueCache: cellApi_1.expireValueCache,
},
};
/**
* @feature Cells -> Expression
*/
exports.ExpressionModule = {
moduleName: 'Expression',
version: version_1.VERSION,
beans: [expressionService_1.ExpressionService],
};
/**
* @feature Change Detection
* @gridOption suppressChangeDetection
*/
exports.ChangeDetectionModule = {
moduleName: 'ChangeDetection',
version: version_1.VERSION,
beans: [changeDetectionService_1.ChangeDetectionService],
};
/**
* @feature Cells -> API
*/
exports.CellApiModule = {
moduleName: 'CellApi',
version: version_1.VERSION,
apiFunctions: {
getCellValue: cellApi_1.getCellValue,
},
};
/***/ }),
/***/ 5736:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.ValueService = void 0;
const beanStub_1 = __webpack_require__(8731);
const gridOptionsUtils_1 = __webpack_require__(7274);
const generic_1 = __webpack_require__(4422);
const object_1 = __webpack_require__(6996);
const logging_1 = __webpack_require__(7764);
class ValueService extends beanStub_1.BeanStub {
constructor() {
super(...arguments);
this.beanName = 'valueSvc';
this.initialised = false;
this.isSsrm = false;
}
wireBeans(beans) {
this.expressionSvc = beans.expressionSvc;
this.colModel = beans.colModel;
this.valueCache = beans.valueCache;
this.dataTypeSvc = beans.dataTypeSvc;
}
postConstruct() {
if (!this.initialised) {
this.init();
}
}
init() {
this.executeValueGetter = this.valueCache
? this.executeValueGetterWithValueCache.bind(this)
: this.executeValueGetterWithoutValueCache.bind(this);
this.isSsrm = (0, gridOptionsUtils_1._isServerSideRowModel)(this.gos);
this.cellExpressions = this.gos.get('enableCellExpressions');
this.isTreeData = this.gos.get('treeData');
this.initialised = true;
// We listen to our own event and use it to call the columnSpecific callback,
// this way the handler calls are correctly interleaved with other global events
const listener = (event) => this.callColumnCellValueChangedHandler(event);
this.eventSvc.addEventListener('cellValueChanged', listener, true);
this.addDestroyFunc(() => this.eventSvc.removeEventListener('cellValueChanged', listener, true));
this.addManagedPropertyListener('treeData', (propChange) => (this.isTreeData = propChange.currentValue));
}
/**
* Use this function to get a displayable cell value.
* This hides values in expanded group rows which are instead displayed by the footer row.
*/
getValueForDisplay(column, node) {
// when in pivot mode, leafGroups cannot be expanded
const lockedClosedGroup = node.leafGroup && this.colModel.isPivotMode();
const isOpenGroup = node.group && node.expanded && !node.footer && !lockedClosedGroup;
// checks if we show header data regardless of footer
const groupAlwaysShowAggData = this.gos.get('groupSuppressBlankHeader');
if (!isOpenGroup || groupAlwaysShowAggData) {
return this.getValue(column, node);
}
let includeFooter = false;
const groupIncludeFooterOpt = this.gos.get('groupTotalRow');
if (typeof groupIncludeFooterOpt !== 'function') {
includeFooter = !!groupIncludeFooterOpt;
}
else {
const groupIncludeFooterCb = this.gos.getCallback('groupTotalRow');
includeFooter = !!groupIncludeFooterCb({ node: this });
}
// if doing grouping and footers, we don't want to include the agg value
// in the header when the group is open
const ignoreAggData = isOpenGroup && includeFooter;
return this.getValue(column, node, ignoreAggData);
}
getValue(column, rowNode, ignoreAggData = false) {
// hack - the grid is getting refreshed before this bean gets initialised, race condition.
// really should have a way so they get initialised in the right order???
if (!this.initialised) {
this.init();
}
if (!rowNode) {
return;
}
// pull these out to make code below easier to read
const colDef = column.getColDef();
const field = colDef.field;
const colId = column.getColId();
const data = rowNode.data;
let result;
// if there is a value getter, this gets precedence over a field
const groupDataExists = rowNode.groupData && rowNode.groupData[colId] !== undefined;
const aggDataExists = !ignoreAggData && rowNode.aggData && rowNode.aggData[colId] !== undefined;
// SSRM agg data comes from the data attribute, so ignore that instead
const ignoreSsrmAggData = this.isSsrm && ignoreAggData && !!column.getColDef().aggFunc;
const ssrmFooterGroupCol = this.isSsrm &&
rowNode.footer &&
rowNode.field &&
(column.getColDef().showRowGroup === true || column.getColDef().showRowGroup === rowNode.field);
if (this.isTreeData && aggDataExists) {
result = rowNode.aggData[colId];
}
else if (this.isTreeData && colDef.valueGetter) {
result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);
}
else if (this.isTreeData && field && data) {
result = (0, object_1._getValueUsingField)(data, field, column.isFieldContainsDots());
}
else if (groupDataExists) {
result = rowNode.groupData[colId];
}
else if (aggDataExists) {
result = rowNode.aggData[colId];
}
else if (colDef.valueGetter) {
result = this.executeValueGetter(colDef.valueGetter, data, column, rowNode);
}
else if (ssrmFooterGroupCol) {
// this is for group footers in SSRM, as the SSRM row won't have groupData, need to extract
// the group value from the data using the row field
result = (0, object_1._getValueUsingField)(data, rowNode.field, column.isFieldContainsDots());
}
else if (field && data && !ignoreSsrmAggData) {
result = (0, object_1._getValueUsingField)(data, field, column.isFieldContainsDots());
}
// the result could be an expression itself, if we are allowing cell values to be expressions
if (this.cellExpressions && typeof result === 'string' && result.indexOf('=') === 0) {
const cellValueGetter = result.substring(1);
result = this.executeValueGetter(cellValueGetter, data, column, rowNode);
}
if (result == null) {
const openedGroup = this.getOpenedGroup(rowNode, column);
if (openedGroup != null) {
return openedGroup;
}
}
return result;
}
parseValue(column, rowNode, newValue, oldValue) {
const colDef = column.getColDef();
const valueParser = colDef.valueParser;
if ((0, generic_1._exists)(valueParser)) {
const params = (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
node: rowNode,
data: rowNode?.data,
oldValue,
newValue,
colDef,
column,
});
if (typeof valueParser === 'function') {
return valueParser(params);
}
return this.expressionSvc?.evaluate(valueParser, params);
}
return newValue;
}
getDeleteValue(column, rowNode) {
if ((0, generic_1._exists)(column.getColDef().valueParser)) {
return this.parseValue(column, rowNode, '', this.getValueForDisplay(column, rowNode)) ?? null;
}
return null;
}
formatValue(column, node, value, suppliedFormatter, useFormatterFromColumn = true) {
let result = null;
let formatter;
const colDef = column.getColDef();
if (suppliedFormatter) {
// use supplied formatter if provided, e.g. set filter items can have their own value formatters
formatter = suppliedFormatter;
}
else if (useFormatterFromColumn) {
formatter = colDef.valueFormatter;
}
if (formatter) {
const params = (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
value,
node,
data: node ? node.data : null,
colDef,
column,
});
if (typeof formatter === 'function') {
result = formatter(params);
}
else {
result = this.expressionSvc ? this.expressionSvc.evaluate(formatter, params) : null;
}
}
else if (colDef.refData) {
return colDef.refData[value] || '';
}
// if we don't do this, then arrays get displayed as 1,2,3, but we want 1, 2, 3 (i.e. with spaces)
if (result == null && Array.isArray(value)) {
result = value.join(', ');
}
return result;
}
getOpenedGroup(rowNode, column) {
if (!this.gos.get('showOpenedGroup')) {
return;
}
const colDef = column.getColDef();
if (!colDef.showRowGroup) {
return;
}
const showRowGroup = column.getColDef().showRowGroup;
let pointer = rowNode.parent;
while (pointer != null) {
if (pointer.rowGroupColumn &&
(showRowGroup === true || showRowGroup === pointer.rowGroupColumn.getColId())) {
return pointer.key;
}
pointer = pointer.parent;
}
return undefined;
}
/**
* Sets the value of a GridCell
* @param rowNode The `RowNode` to be updated
* @param colKey The `Column` to be updated
* @param newValue The new value to be set
* @param eventSource The event source
* @returns `True` if the value has been updated, otherwise`False`.
*/
setValue(rowNode, colKey, newValue, eventSource) {
const column = this.colModel.getColDefCol(colKey);
if (!rowNode || !column) {
return false;
}
// this happens when enableGroupEdit is turned on and editing is performed on group rows
if ((0, generic_1._missing)(rowNode.data)) {
rowNode.data = {};
}
const { field, valueSetter } = column.getColDef();
if ((0, generic_1._missing)(field) && (0, generic_1._missing)(valueSetter)) {
(0, logging_1._warn)(17);
return false;
}
if (this.dataTypeSvc && !this.dataTypeSvc.checkType(column, newValue)) {
(0, logging_1._warn)(135);
return false;
}
const params = (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
node: rowNode,
data: rowNode.data,
oldValue: this.getValue(column, rowNode),
newValue: newValue,
colDef: column.getColDef(),
column: column,
});
params.newValue = newValue;
let valueWasDifferent;
if ((0, generic_1._exists)(valueSetter)) {
if (typeof valueSetter === 'function') {
valueWasDifferent = valueSetter(params);
}
else {
valueWasDifferent = this.expressionSvc?.evaluate(valueSetter, params);
}
}
else {
valueWasDifferent = this.setValueUsingField(rowNode.data, field, newValue, column.isFieldContainsDots());
}
// in case user forgot to return something (possible if they are not using TypeScript
// and just forgot we default the return value to true, so we always refresh.
if (valueWasDifferent === undefined) {
valueWasDifferent = true;
}
// if no change to the value, then no need to do the updating, or notifying via events.
// otherwise the user could be tabbing around the grid, and cellValueChange would get called
// all the time.
if (!valueWasDifferent) {
return false;
}
// reset quick filter on this row
rowNode.resetQuickFilterAggregateText();
this.valueCache?.onDataChanged();
const savedValue = this.getValue(column, rowNode);
this.eventSvc.dispatchEvent({
type: 'cellValueChanged',
event: null,
rowIndex: rowNode.rowIndex,
rowPinned: rowNode.rowPinned,
column: params.column,
colDef: params.colDef,
data: rowNode.data,
node: rowNode,
oldValue: params.oldValue,
newValue: savedValue,
value: savedValue,
source: eventSource,
});
return true;
}
callColumnCellValueChangedHandler(event) {
const onCellValueChanged = event.colDef.onCellValueChanged;
if (typeof onCellValueChanged === 'function') {
this.beans.frameworkOverrides.wrapOutgoing(() => {
onCellValueChanged({
node: event.node,
data: event.data,
oldValue: event.oldValue,
newValue: event.newValue,
colDef: event.colDef,
column: event.column,
api: event.api,
context: event.context,
});
});
}
}
setValueUsingField(data, field, newValue, isFieldContainsDots) {
if (!field) {
return false;
}
// if no '.', then it's not a deep value
let valuesAreSame = false;
if (!isFieldContainsDots) {
valuesAreSame = data[field] === newValue;
if (!valuesAreSame) {
data[field] = newValue;
}
}
else {
// otherwise it is a deep value, so need to dig for it
const fieldPieces = field.split('.');
let currentObject = data;
while (fieldPieces.length > 0 && currentObject) {
const fieldPiece = fieldPieces.shift();
if (fieldPieces.length === 0) {
valuesAreSame = currentObject[fieldPiece] === newValue;
if (!valuesAreSame) {
currentObject[fieldPiece] = newValue;
}
}
else {
currentObject = currentObject[fieldPiece];
}
}
}
return !valuesAreSame;
}
executeValueGetterWithValueCache(
// eslint-disable-next-line @typescript-eslint/ban-types
valueGetter, data, column, rowNode) {
const colId = column.getColId();
// if inside the same turn, just return back the value we got last time
const valueFromCache = this.valueCache.getValue(rowNode, colId);
if (valueFromCache !== undefined) {
return valueFromCache;
}
const result = this.executeValueGetterWithoutValueCache(valueGetter, data, column, rowNode);
// if a turn is active, store the value in case the grid asks for it again
this.valueCache.setValue(rowNode, colId, result);
return result;
}
executeValueGetterWithoutValueCache(
// eslint-disable-next-line @typescript-eslint/ban-types
valueGetter, data, column, rowNode) {
const params = (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
data: data,
node: rowNode,
column: column,
colDef: column.getColDef(),
getValue: this.getValueCallback.bind(this, rowNode),
});
let result;
if (typeof valueGetter === 'function') {
result = valueGetter(params);
}
else {
result = this.expressionSvc?.evaluate(valueGetter, params);
}
return result;
}
getValueCallback(node, field) {
const otherColumn = this.colModel.getColDefCol(field);
if (otherColumn) {
return this.getValue(otherColumn, node);
}
return null;
}
// used by row grouping and pivot, to get key for a row. col can be a pivot col or a row grouping col
getKeyForNode(col, rowNode) {
const value = this.getValue(col, rowNode);
const keyCreator = col.getColDef().keyCreator;
let result = value;
if (keyCreator) {
const keyParams = (0, gridOptionsUtils_1._addGridCommonParams)(this.gos, {
value: value,
colDef: col.getColDef(),
column: col,
node: rowNode,
data: rowNode.data,
});
result = keyCreator(keyParams);
}
// if already a string, or missing, just return it
if (typeof result === 'string' || result == null) {
return result;
}
result = String(result);
if (result === '[object Object]') {
(0, logging_1._warn)(121);
}
return result;
}
}
exports.ValueService = ValueService;
/***/ }),
/***/ 6511:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.VanillaFrameworkOverrides = void 0;
const baseUrl_1 = __webpack_require__(3263);
const event_1 = __webpack_require__(2979);
const promise_1 = __webpack_require__(7990);
const logging_1 = __webpack_require__(7764);
/** The base frameworks, eg React & Angular, override this bean with implementations specific to their requirement. */
class VanillaFrameworkOverrides {
constructor(frameworkName = 'javascript') {
this.frameworkName = frameworkName;
this.renderingEngine = 'vanilla';
this.wrapIncoming = (callback) => callback();
this.wrapOutgoing = (callback) => callback();
this.baseDocLink = `${baseUrl_1.BASE_URL}/${this.frameworkName}-data-grid`;
(0, logging_1.setValidationDocLink)(this.baseDocLink);
}
setInterval(action, timeout) {
return new promise_1.AgPromise((resolve) => {
resolve(window.setInterval(action, timeout));
});
}
// for Vanilla JS, we just add the event to the element
addEventListener(element, type, listener, options) {
let eventListenerOptions = {};
if (typeof options === 'object') {
eventListenerOptions = options;
}
else if (typeof options === 'boolean') {
eventListenerOptions = { capture: options };
}
if (eventListenerOptions.passive == null) {
const passive = (0, event_1.getPassiveStateForEvent)(type);
if (passive != null) {
eventListenerOptions.passive = passive;
}
}
element.addEventListener(type, listener, eventListenerOptions);
}
frameworkComponent(_) {
return null;
}
isFrameworkComponent(_) {
return false;
}
getDocLink(path) {
return `${this.baseDocLink}${path ? `/${path}` : ''}`;
}
}
exports.VanillaFrameworkOverrides = VanillaFrameworkOverrides;
/***/ }),
/***/ 7205:
/***/ (function(__unused_webpack_module, exports) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.VERSION = void 0;
// DO NOT UPDATE MANUALLY: Generated from script during build time
exports.VERSION = '33.1.1';
/***/ }),
/***/ 7321:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AgAbstractField = void 0;
const aria_1 = __webpack_require__(5230);
const dom_1 = __webpack_require__(3507);
const agAbstractLabel_1 = __webpack_require__(2747);
class AgAbstractField extends agAbstractLabel_1.AgAbstractLabel {
constructor(config, template, components, className) {
super(config, template, components);
this.className = className;
}
postConstruct() {
super.postConstruct();
const { width, value, onValueChange } = this.config;
if (width != null) {
this.setWidth(width);
}
if (value != null) {
this.setValue(value);
}
if (onValueChange != null) {
this.onValueChange(onValueChange);
}
if (this.className) {
this.addCssClass(this.className);
}
this.refreshAriaLabelledBy();
}
setLabel(label) {
super.setLabel(label);
this.refreshAriaLabelledBy();
return this;
}
refreshAriaLabelledBy() {
const ariaEl = this.getAriaElement();
const labelId = this.getLabelId();
const label = this.getLabel();
if (label == null || label == '' || (0, aria_1._getAriaLabel)(ariaEl) !== null) {
(0, aria_1._setAriaLabelledBy)(ariaEl, '');
}
else {
(0, aria_1._setAriaLabelledBy)(ariaEl, labelId ?? '');
}
}
setAriaLabel(label) {
(0, aria_1._setAriaLabel)(this.getAriaElement(), label);
this.refreshAriaLabelledBy();
return this;
}
onValueChange(callbackFn) {
this.addManagedListeners(this, { fieldValueChanged: () => callbackFn(this.getValue()) });
return this;
}
getWidth() {
return this.getGui().clientWidth;
}
setWidth(width) {
(0, dom_1._setFixedWidth)(this.getGui(), width);
return this;
}
getPreviousValue() {
return this.previousValue;
}
getValue() {
return this.value;
}
setValue(value, silent) {
if (this.value === value) {
return this;
}
this.previousValue = this.value;
this.value = value;
if (!silent) {
this.dispatchLocalEvent({ type: 'fieldValueChanged' });
}
return this;
}
}
exports.AgAbstractField = AgAbstractField;
/***/ }),
/***/ 8085:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.AgAbstractInputField = void 0;
const aria_1 = __webpack_require__(5230);
const dom_1 = __webpack_require__(3507);
const agAbstractField_1 = __webpack_require__(7321);
const component_1 = __webpack_require__(8020);
class AgAbstractInputField extends agAbstractField_1.AgAbstractField {
constructor(config, className, inputType = 'text', displayFieldTag = 'input') {
super(config, config?.template ??
/* html */ `