@progress/kendo-angular-spreadsheet 18.5.0-develop.7 → 18.5.0-develop.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, boldIcon, dropletIcon, foregroundColorIcon, italicIcon, tableColumnDeleteIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowDeleteIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, underlineIcon, arrowRotateCcwIcon, arrowRotateCwIcon, bordersNoneIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, textWrapIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeHorizontallyIcon, cellsMergeIcon, cellsMergeVerticallyIcon, tableUnmergeIcon, linkIcon, fontGrowIcon, fontShrinkIcon, decimalDecreaseIcon, decimalIncreaseIcon, copyIcon, cutIcon, clipboardIcon, eyeSlashIcon, eyeIcon } from '@progress/kendo-svg-icons';
5
+ import { alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, boldIcon, dropletIcon, foregroundColorIcon, italicIcon, tableColumnDeleteIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowDeleteIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, underlineIcon, arrowRotateCcwIcon, arrowRotateCwIcon, bordersNoneIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, textWrapIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeHorizontallyIcon, cellsMergeIcon, cellsMergeVerticallyIcon, tableUnmergeIcon, linkIcon, fontGrowIcon, fontShrinkIcon, decimalDecreaseIcon, decimalIncreaseIcon, copyIcon, cutIcon, clipboardIcon, eyeSlashIcon, eyeIcon, exclamationCircleIcon } from '@progress/kendo-svg-icons';
6
6
  /**
7
7
  * @hidden
8
8
  */
@@ -47,6 +47,7 @@ export const commandIcons = {
47
47
  decreaseFontSize: 'font-shrink',
48
48
  increaseDecimal: 'decimal-increase',
49
49
  decreaseDecimal: 'decimal-decrease',
50
+ dataValidation: 'exclamation-circle',
50
51
  copy: 'copy',
51
52
  cut: 'cut',
52
53
  paste: 'clipboard',
@@ -98,6 +99,7 @@ export const commandSVGIcons = {
98
99
  increaseFontSize: fontGrowIcon,
99
100
  decreaseFontSize: fontShrinkIcon,
100
101
  decreaseDecimal: decimalDecreaseIcon,
102
+ dataValidation: exclamationCircleIcon,
101
103
  increaseDecimal: decimalIncreaseIcon,
102
104
  copy: copyIcon,
103
105
  cut: cutIcon,
@@ -2,6 +2,7 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ import { isPresent } from "@progress/kendo-angular-common";
5
6
  /**
6
7
  * @hidden
7
8
  */
@@ -11,3 +12,24 @@ export function outerWidth(element) {
11
12
  width += parseFloat(style.marginLeft) || 0 + parseFloat(style.marginRight) || 0;
12
13
  return width;
13
14
  }
15
+ /**
16
+ * @hidden
17
+ */
18
+ export const rangeValidator = (directive) => {
19
+ return (control) => {
20
+ const err = {
21
+ rangeError: {
22
+ message: 'Incorrect range format',
23
+ value: control.value
24
+ }
25
+ };
26
+ let range;
27
+ try {
28
+ range = directive.spreadsheetService.spreadsheet.activeSheet().range(control.value);
29
+ }
30
+ catch (e) { /** noop */ }
31
+ if (!isPresent(range)) {
32
+ return err;
33
+ }
34
+ };
35
+ };
package/esm2022/utils.mjs CHANGED
@@ -28,3 +28,9 @@ export const mapToSheetDescriptor = (sheetsArray) => {
28
28
  * @hidden
29
29
  */
30
30
  export const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
31
+ /**
32
+ * @hidden
33
+ */
34
+ export const rowAndColPresent = (value) => {
35
+ return (value && value.row !== null && value.col !== null && value.row > -1 && value.col > -1);
36
+ };