@progress/kendo-angular-spreadsheet 19.0.0-develop.14 → 19.0.0-develop.16
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.
- package/common/calendar-editor.component.d.ts +20 -0
- package/esm2022/common/calendar-editor.component.mjs +48 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/spreadsheet.component.mjs +93 -3
- package/fesm2022/progress-kendo-angular-spreadsheet.mjs +136 -4
- package/package.json +17 -16
- package/schematics/ngAdd/index.js +2 -2
- package/spreadsheet.component.d.ts +2 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
5
|
+
import { EventEmitter } from '@angular/core';
|
6
|
+
import { CalendarType } from '@progress/kendo-angular-dateinputs';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
/**
|
9
|
+
* @hidden
|
10
|
+
*/
|
11
|
+
export declare class CalendarComponent {
|
12
|
+
value: Date;
|
13
|
+
type: CalendarType;
|
14
|
+
min: Date;
|
15
|
+
max: Date;
|
16
|
+
disabledDates: any;
|
17
|
+
valueChange: EventEmitter<any>;
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ng-component", never, {}, { "valueChange": "valueChange"; }, never, never, true, never>;
|
20
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
5
|
+
import { Component, EventEmitter, Output } from '@angular/core';
|
6
|
+
import { CalendarComponent as KendoCalendarComponent } from '@progress/kendo-angular-dateinputs';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
/**
|
9
|
+
* @hidden
|
10
|
+
*/
|
11
|
+
export class CalendarComponent {
|
12
|
+
value;
|
13
|
+
type = 'classic';
|
14
|
+
min;
|
15
|
+
max;
|
16
|
+
disabledDates;
|
17
|
+
valueChange = new EventEmitter();
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarComponent, isStandalone: true, selector: "ng-component", outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
20
|
+
<kendo-calendar
|
21
|
+
[type]="type"
|
22
|
+
[min]="min"
|
23
|
+
[max]="max"
|
24
|
+
[value]="value"
|
25
|
+
[disabledDates]="disabledDates"
|
26
|
+
(valueChange)="valueChange.emit($event)">
|
27
|
+
</kendo-calendar>
|
28
|
+
`, isInline: true, dependencies: [{ kind: "component", type: KendoCalendarComponent, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size", "activeRangeEnd"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }] });
|
29
|
+
}
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarComponent, decorators: [{
|
31
|
+
type: Component,
|
32
|
+
args: [{
|
33
|
+
template: `
|
34
|
+
<kendo-calendar
|
35
|
+
[type]="type"
|
36
|
+
[min]="min"
|
37
|
+
[max]="max"
|
38
|
+
[value]="value"
|
39
|
+
[disabledDates]="disabledDates"
|
40
|
+
(valueChange)="valueChange.emit($event)">
|
41
|
+
</kendo-calendar>
|
42
|
+
`,
|
43
|
+
standalone: true,
|
44
|
+
imports: [KendoCalendarComponent]
|
45
|
+
}]
|
46
|
+
}], propDecorators: { valueChange: [{
|
47
|
+
type: Output
|
48
|
+
}] } });
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
13
|
-
publishDate:
|
14
|
-
version: '19.0.0-develop.
|
13
|
+
publishDate: 1747229095,
|
14
|
+
version: '19.0.0-develop.16',
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
16
16
|
};
|
@@ -8,9 +8,9 @@ import { Subscription } from 'rxjs';
|
|
8
8
|
import { take } from 'rxjs/operators';
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
10
10
|
import { packageMetadata } from './package-metadata';
|
11
|
-
import { SpreadsheetWidget, registerEditor, Matrix } from '@progress/kendo-spreadsheet-common';
|
11
|
+
import { SpreadsheetWidget, registerEditor, Matrix, dateToSerial, serialToDate, validation, calc } from '@progress/kendo-spreadsheet-common';
|
12
12
|
import { localeData, IntlService } from '@progress/kendo-angular-intl';
|
13
|
-
import { caretAltDownIcon, downloadIcon, folderOpenIcon, formulaFxIcon } from '@progress/kendo-svg-icons';
|
13
|
+
import { calendarIcon, caretAltDownIcon, downloadIcon, folderOpenIcon, formulaFxIcon } from '@progress/kendo-svg-icons';
|
14
14
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
15
15
|
import { PopupService } from '@progress/kendo-angular-popup';
|
16
16
|
import { ContextMenuComponent, MenuItemComponent, MenuComponent } from '@progress/kendo-angular-menu';
|
@@ -21,7 +21,7 @@ import { ToolBarDropDownButtonComponent, ToolBarSeparatorComponent, ToolBarButto
|
|
21
21
|
import { SpreadsheetService } from './common/spreadsheet.service';
|
22
22
|
import { SpreadsheetToolsService } from './tools/tools.service';
|
23
23
|
import { SpreadsheetLocalizationService } from './localization/spreadsheet-localization.service';
|
24
|
-
import { mapToSheetDescriptor } from './utils';
|
24
|
+
import { mapToSheetDescriptor, rowAndColPresent } from './utils';
|
25
25
|
import { FormulaInputDirective } from './action-bar/formula-input.directive';
|
26
26
|
import { getSheetActions } from './sheets-bar/utils';
|
27
27
|
import { ErrorHandlingService } from './common/error-handling.service';
|
@@ -61,6 +61,7 @@ import { MainMenuDirective } from './common/main-menu.directive';
|
|
61
61
|
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
62
62
|
import { SpreadsheetDataValidationDirective } from './tools/data-validation-tool.directive';
|
63
63
|
import { ListEditorComponent } from './common/list-editor.component';
|
64
|
+
import { CalendarComponent } from './common/calendar-editor.component';
|
64
65
|
import * as i0 from "@angular/core";
|
65
66
|
import * as i1 from "@progress/kendo-angular-intl";
|
66
67
|
import * as i2 from "@progress/kendo-angular-l10n";
|
@@ -742,6 +743,95 @@ export class SpreadsheetComponent {
|
|
742
743
|
icon: { iconName: 'caret-alt-down', svgIcon: caretAltDownIcon }
|
743
744
|
};
|
744
745
|
});
|
746
|
+
registerEditor('_validation_date', () => {
|
747
|
+
return {
|
748
|
+
edit: (options) => {
|
749
|
+
this.popupRef?.close();
|
750
|
+
this.popupRef = null;
|
751
|
+
this.popupRef = this.popupService.open({
|
752
|
+
anchor: options.view.element.querySelector('.k-spreadsheet-editor-button'),
|
753
|
+
content: CalendarComponent,
|
754
|
+
popupAlign: options.alignLeft ? { horizontal: 'right', vertical: 'top' } : { horizontal: 'left', vertical: 'top' },
|
755
|
+
anchorAlign: options.alignLeft ? { horizontal: 'right', vertical: 'bottom' } : { horizontal: 'left', vertical: 'bottom' }
|
756
|
+
});
|
757
|
+
const calendar = this.popupRef.content.instance;
|
758
|
+
calendar.valueChange.subscribe((value) => {
|
759
|
+
this.popupRef.close();
|
760
|
+
this.popupRef = null;
|
761
|
+
if (!options.range.format()) {
|
762
|
+
options.range.format('yyyy-mm-dd');
|
763
|
+
}
|
764
|
+
options.callback(dateToSerial(value));
|
765
|
+
});
|
766
|
+
const date = options.range.value();
|
767
|
+
calendar.value = this.createDate(date);
|
768
|
+
const sheet = options.range.sheet();
|
769
|
+
const currenValidation = options.validation;
|
770
|
+
if (currenValidation) {
|
771
|
+
let min = calendar.min;
|
772
|
+
let max = calendar.max;
|
773
|
+
const fromValidation = currenValidation.from;
|
774
|
+
const toValidation = currenValidation.to;
|
775
|
+
if (/^(?:greaterThan|between)/.test(currenValidation.comparerType)) {
|
776
|
+
if (this.isValidFormula(fromValidation)) {
|
777
|
+
min = this.createDate(fromValidation, sheet);
|
778
|
+
}
|
779
|
+
else {
|
780
|
+
min = this.createDate(fromValidation.value);
|
781
|
+
}
|
782
|
+
}
|
783
|
+
if (currenValidation.comparerType === 'between') {
|
784
|
+
if (this.isValidFormula(toValidation)) {
|
785
|
+
max = this.createDate(toValidation, sheet);
|
786
|
+
}
|
787
|
+
else {
|
788
|
+
max = this.createDate(currenValidation.to.value);
|
789
|
+
}
|
790
|
+
}
|
791
|
+
if (currenValidation.comparerType === 'lessThan' || currenValidation.comparerType === 'lessThanOrEqualTo') {
|
792
|
+
if (this.isValidFormula(fromValidation)) {
|
793
|
+
max = this.createDate(fromValidation, sheet);
|
794
|
+
}
|
795
|
+
else {
|
796
|
+
max = this.createDate(currenValidation.from.value);
|
797
|
+
}
|
798
|
+
}
|
799
|
+
calendar.disabledDates = (date) => {
|
800
|
+
let from;
|
801
|
+
let to;
|
802
|
+
if (fromValidation && this.isValidFormula(fromValidation)) {
|
803
|
+
from = sheet.range(fromValidation.value.row, fromValidation.value.col).value();
|
804
|
+
}
|
805
|
+
else {
|
806
|
+
from = fromValidation ? fromValidation.value | 0 : 0;
|
807
|
+
}
|
808
|
+
if (toValidation && this.isValidFormula(toValidation)) {
|
809
|
+
to = sheet.range(toValidation.value.row, toValidation.value.col).value();
|
810
|
+
}
|
811
|
+
else {
|
812
|
+
to = toValidation ? toValidation.value | 0 : 0;
|
813
|
+
}
|
814
|
+
date = dateToSerial(date) || 0;
|
815
|
+
return !validation.validationComparers[currenValidation.comparerType](date, from, to);
|
816
|
+
};
|
817
|
+
calendar.min = min;
|
818
|
+
calendar.max = max;
|
819
|
+
}
|
820
|
+
else {
|
821
|
+
calendar.disabledDates = null;
|
822
|
+
calendar.min = calendar.max = null;
|
823
|
+
}
|
824
|
+
},
|
825
|
+
icon: { iconName: 'calendar', svgIcon: calendarIcon }
|
826
|
+
};
|
827
|
+
});
|
828
|
+
}
|
829
|
+
isValidFormula(validation) {
|
830
|
+
const formula = calc.runtime.Formula;
|
831
|
+
return validation instanceof formula && rowAndColPresent(validation.value);
|
832
|
+
}
|
833
|
+
createDate(validation, sheet) {
|
834
|
+
return new Date(serialToDate(isPresent(sheet) ? sheet.range(validation.value.row, validation.value.col).value() : validation));
|
745
835
|
}
|
746
836
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1.IntlService }, { token: i0.ElementRef }, { token: i2.LocalizationService }, { token: i3.SpreadsheetService }, { token: i4.SpreadsheetToolsService }, { token: i5.ErrorHandlingService }, { token: i6.DialogService }, { token: i7.PopupService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
747
837
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SpreadsheetComponent, isStandalone: true, selector: "kendo-spreadsheet", inputs: { menuItems: "menuItems", overflow: "overflow", formulaListMaxHeight: "formulaListMaxHeight", activeSheet: "activeSheet", sheets: "sheets", columns: "columns", columnWidth: "columnWidth", defaultCellStyle: "defaultCellStyle", headerHeight: "headerHeight", headerWidth: "headerWidth", rowHeight: "rowHeight", rows: "rows", images: "images", excel: "excel" }, outputs: { change: "change", formatChange: "formatChange", selectionChange: "selectionChange", excelExport: "excelExport", excelImport: "excelImport", activeSheetChange: "activeSheetChange" }, host: { properties: { "class.k-spreadsheet": "this.hostClass", "attr.role": "this.role" } }, providers: [
|
@@ -8,10 +8,10 @@ import { NgFor, NgIf, NgStyle, NgSwitch, NgSwitchCase, NgForOf } from '@angular/
|
|
8
8
|
import { Subject, Subscription } from 'rxjs';
|
9
9
|
import { take, map } from 'rxjs/operators';
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
11
|
-
import { SpreadsheetWidget, registerEditor, Matrix } from '@progress/kendo-spreadsheet-common';
|
11
|
+
import { SpreadsheetWidget, registerEditor, Matrix, dateToSerial, validation, calc, serialToDate } from '@progress/kendo-spreadsheet-common';
|
12
12
|
import * as i1$4 from '@progress/kendo-angular-intl';
|
13
13
|
import { localeData } from '@progress/kendo-angular-intl';
|
14
|
-
import { formulaFxIcon, trashIcon, copyIcon, pencilIcon, eyeSlashIcon, arrowRightIcon, arrowLeftIcon, alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, dropletIcon, boldIcon, foregroundColorIcon, italicIcon, arrowRotateCwIcon, underlineIcon, arrowRotateCcwIcon, textWrapIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, tableRowDeleteIcon, tableColumnDeleteIcon, bordersNoneIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeIcon, cellsMergeHorizontallyIcon, cellsMergeVerticallyIcon, tableUnmergeIcon, linkIcon, fontGrowIcon, fontShrinkIcon, decimalDecreaseIcon, exclamationCircleIcon, decimalIncreaseIcon, cutIcon, clipboardIcon, eyeIcon, plusIcon, menuIcon, caretAltDownIcon } from '@progress/kendo-svg-icons';
|
14
|
+
import { formulaFxIcon, trashIcon, copyIcon, pencilIcon, eyeSlashIcon, arrowRightIcon, arrowLeftIcon, alignCenterIcon, alignJustifyIcon, alignLeftIcon, alignRightIcon, alignTopIcon, alignMiddleIcon, alignBottomIcon, dropletIcon, boldIcon, foregroundColorIcon, italicIcon, arrowRotateCwIcon, underlineIcon, arrowRotateCcwIcon, textWrapIcon, tableColumnInsertLeftIcon, tableColumnInsertRightIcon, tableRowInsertAboveIcon, tableRowInsertBelowIcon, tableRowDeleteIcon, tableColumnDeleteIcon, bordersNoneIcon, folderOpenIcon, downloadIcon, customFormatIcon, fontSizeIcon, fontFamilyIcon, cellsMergeIcon, cellsMergeHorizontallyIcon, cellsMergeVerticallyIcon, tableUnmergeIcon, linkIcon, fontGrowIcon, fontShrinkIcon, decimalDecreaseIcon, exclamationCircleIcon, decimalIncreaseIcon, cutIcon, clipboardIcon, eyeIcon, plusIcon, menuIcon, caretAltDownIcon, calendarIcon } from '@progress/kendo-svg-icons';
|
15
15
|
import * as i1 from '@progress/kendo-angular-l10n';
|
16
16
|
import { LocalizationService, L10N_PREFIX, RTL, ComponentMessages } from '@progress/kendo-angular-l10n';
|
17
17
|
import * as i1$1 from '@progress/kendo-angular-popup';
|
@@ -32,6 +32,7 @@ import { saveAs } from '@progress/kendo-file-saver';
|
|
32
32
|
import { Workbook } from '@progress/kendo-ooxml';
|
33
33
|
import * as i4 from '@angular/forms';
|
34
34
|
import { FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
35
|
+
import { CalendarComponent as CalendarComponent$1 } from '@progress/kendo-angular-dateinputs';
|
35
36
|
|
36
37
|
/**
|
37
38
|
* @hidden
|
@@ -41,8 +42,8 @@ const packageMetadata = {
|
|
41
42
|
productName: 'Kendo UI for Angular',
|
42
43
|
productCode: 'KENDOUIANGULAR',
|
43
44
|
productCodes: ['KENDOUIANGULAR'],
|
44
|
-
publishDate:
|
45
|
-
version: '19.0.0-develop.
|
45
|
+
publishDate: 1747229095,
|
46
|
+
version: '19.0.0-develop.16',
|
46
47
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
|
47
48
|
};
|
48
49
|
|
@@ -4781,6 +4782,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
4781
4782
|
args: ['listItem', { read: ElementRef }]
|
4782
4783
|
}] } });
|
4783
4784
|
|
4785
|
+
/**
|
4786
|
+
* @hidden
|
4787
|
+
*/
|
4788
|
+
class CalendarComponent {
|
4789
|
+
value;
|
4790
|
+
type = 'classic';
|
4791
|
+
min;
|
4792
|
+
max;
|
4793
|
+
disabledDates;
|
4794
|
+
valueChange = new EventEmitter();
|
4795
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
4796
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarComponent, isStandalone: true, selector: "ng-component", outputs: { valueChange: "valueChange" }, ngImport: i0, template: `
|
4797
|
+
<kendo-calendar
|
4798
|
+
[type]="type"
|
4799
|
+
[min]="min"
|
4800
|
+
[max]="max"
|
4801
|
+
[value]="value"
|
4802
|
+
[disabledDates]="disabledDates"
|
4803
|
+
(valueChange)="valueChange.emit($event)">
|
4804
|
+
</kendo-calendar>
|
4805
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CalendarComponent$1, selector: "kendo-calendar", inputs: ["showOtherMonthDays", "id", "focusedDate", "min", "max", "rangeValidation", "weekDaysFormat", "footer", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "navigationItemTemplate", "size", "activeRangeEnd"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }] });
|
4806
|
+
}
|
4807
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarComponent, decorators: [{
|
4808
|
+
type: Component,
|
4809
|
+
args: [{
|
4810
|
+
template: `
|
4811
|
+
<kendo-calendar
|
4812
|
+
[type]="type"
|
4813
|
+
[min]="min"
|
4814
|
+
[max]="max"
|
4815
|
+
[value]="value"
|
4816
|
+
[disabledDates]="disabledDates"
|
4817
|
+
(valueChange)="valueChange.emit($event)">
|
4818
|
+
</kendo-calendar>
|
4819
|
+
`,
|
4820
|
+
standalone: true,
|
4821
|
+
imports: [CalendarComponent$1]
|
4822
|
+
}]
|
4823
|
+
}], propDecorators: { valueChange: [{
|
4824
|
+
type: Output
|
4825
|
+
}] } });
|
4826
|
+
|
4784
4827
|
/**
|
4785
4828
|
* Represents the [Kendo UI Spreadsheet component for Angular]({% slug overview_spreadsheet %}).
|
4786
4829
|
*/
|
@@ -5454,6 +5497,95 @@ class SpreadsheetComponent {
|
|
5454
5497
|
icon: { iconName: 'caret-alt-down', svgIcon: caretAltDownIcon }
|
5455
5498
|
};
|
5456
5499
|
});
|
5500
|
+
registerEditor('_validation_date', () => {
|
5501
|
+
return {
|
5502
|
+
edit: (options) => {
|
5503
|
+
this.popupRef?.close();
|
5504
|
+
this.popupRef = null;
|
5505
|
+
this.popupRef = this.popupService.open({
|
5506
|
+
anchor: options.view.element.querySelector('.k-spreadsheet-editor-button'),
|
5507
|
+
content: CalendarComponent,
|
5508
|
+
popupAlign: options.alignLeft ? { horizontal: 'right', vertical: 'top' } : { horizontal: 'left', vertical: 'top' },
|
5509
|
+
anchorAlign: options.alignLeft ? { horizontal: 'right', vertical: 'bottom' } : { horizontal: 'left', vertical: 'bottom' }
|
5510
|
+
});
|
5511
|
+
const calendar = this.popupRef.content.instance;
|
5512
|
+
calendar.valueChange.subscribe((value) => {
|
5513
|
+
this.popupRef.close();
|
5514
|
+
this.popupRef = null;
|
5515
|
+
if (!options.range.format()) {
|
5516
|
+
options.range.format('yyyy-mm-dd');
|
5517
|
+
}
|
5518
|
+
options.callback(dateToSerial(value));
|
5519
|
+
});
|
5520
|
+
const date = options.range.value();
|
5521
|
+
calendar.value = this.createDate(date);
|
5522
|
+
const sheet = options.range.sheet();
|
5523
|
+
const currenValidation = options.validation;
|
5524
|
+
if (currenValidation) {
|
5525
|
+
let min = calendar.min;
|
5526
|
+
let max = calendar.max;
|
5527
|
+
const fromValidation = currenValidation.from;
|
5528
|
+
const toValidation = currenValidation.to;
|
5529
|
+
if (/^(?:greaterThan|between)/.test(currenValidation.comparerType)) {
|
5530
|
+
if (this.isValidFormula(fromValidation)) {
|
5531
|
+
min = this.createDate(fromValidation, sheet);
|
5532
|
+
}
|
5533
|
+
else {
|
5534
|
+
min = this.createDate(fromValidation.value);
|
5535
|
+
}
|
5536
|
+
}
|
5537
|
+
if (currenValidation.comparerType === 'between') {
|
5538
|
+
if (this.isValidFormula(toValidation)) {
|
5539
|
+
max = this.createDate(toValidation, sheet);
|
5540
|
+
}
|
5541
|
+
else {
|
5542
|
+
max = this.createDate(currenValidation.to.value);
|
5543
|
+
}
|
5544
|
+
}
|
5545
|
+
if (currenValidation.comparerType === 'lessThan' || currenValidation.comparerType === 'lessThanOrEqualTo') {
|
5546
|
+
if (this.isValidFormula(fromValidation)) {
|
5547
|
+
max = this.createDate(fromValidation, sheet);
|
5548
|
+
}
|
5549
|
+
else {
|
5550
|
+
max = this.createDate(currenValidation.from.value);
|
5551
|
+
}
|
5552
|
+
}
|
5553
|
+
calendar.disabledDates = (date) => {
|
5554
|
+
let from;
|
5555
|
+
let to;
|
5556
|
+
if (fromValidation && this.isValidFormula(fromValidation)) {
|
5557
|
+
from = sheet.range(fromValidation.value.row, fromValidation.value.col).value();
|
5558
|
+
}
|
5559
|
+
else {
|
5560
|
+
from = fromValidation ? fromValidation.value | 0 : 0;
|
5561
|
+
}
|
5562
|
+
if (toValidation && this.isValidFormula(toValidation)) {
|
5563
|
+
to = sheet.range(toValidation.value.row, toValidation.value.col).value();
|
5564
|
+
}
|
5565
|
+
else {
|
5566
|
+
to = toValidation ? toValidation.value | 0 : 0;
|
5567
|
+
}
|
5568
|
+
date = dateToSerial(date) || 0;
|
5569
|
+
return !validation.validationComparers[currenValidation.comparerType](date, from, to);
|
5570
|
+
};
|
5571
|
+
calendar.min = min;
|
5572
|
+
calendar.max = max;
|
5573
|
+
}
|
5574
|
+
else {
|
5575
|
+
calendar.disabledDates = null;
|
5576
|
+
calendar.min = calendar.max = null;
|
5577
|
+
}
|
5578
|
+
},
|
5579
|
+
icon: { iconName: 'calendar', svgIcon: calendarIcon }
|
5580
|
+
};
|
5581
|
+
});
|
5582
|
+
}
|
5583
|
+
isValidFormula(validation) {
|
5584
|
+
const formula = calc.runtime.Formula;
|
5585
|
+
return validation instanceof formula && rowAndColPresent(validation.value);
|
5586
|
+
}
|
5587
|
+
createDate(validation, sheet) {
|
5588
|
+
return new Date(serialToDate(isPresent(sheet) ? sheet.range(validation.value.row, validation.value.col).value() : validation));
|
5457
5589
|
}
|
5458
5590
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SpreadsheetComponent, deps: [{ token: i0.NgZone }, { token: i1$4.IntlService }, { token: i0.ElementRef }, { token: i1.LocalizationService }, { token: SpreadsheetService }, { token: SpreadsheetToolsService }, { token: ErrorHandlingService }, { token: i1$2.DialogService }, { token: i1$1.PopupService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
|
5459
5591
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SpreadsheetComponent, isStandalone: true, selector: "kendo-spreadsheet", inputs: { menuItems: "menuItems", overflow: "overflow", formulaListMaxHeight: "formulaListMaxHeight", activeSheet: "activeSheet", sheets: "sheets", columns: "columns", columnWidth: "columnWidth", defaultCellStyle: "defaultCellStyle", headerHeight: "headerHeight", headerWidth: "headerWidth", rowHeight: "rowHeight", rows: "rows", images: "images", excel: "excel" }, outputs: { change: "change", formatChange: "formatChange", selectionChange: "selectionChange", excelExport: "excelExport", excelImport: "excelImport", activeSheetChange: "activeSheetChange" }, host: { properties: { "class.k-spreadsheet": "this.hostClass", "attr.role": "this.role" } }, providers: [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@progress/kendo-angular-spreadsheet",
|
3
|
-
"version": "19.0.0-develop.
|
3
|
+
"version": "19.0.0-develop.16",
|
4
4
|
"description": "A Spreadsheet Component for Angular",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "Progress",
|
@@ -19,7 +19,7 @@
|
|
19
19
|
"package": {
|
20
20
|
"productName": "Kendo UI for Angular",
|
21
21
|
"productCode": "KENDOUIANGULAR",
|
22
|
-
"publishDate":
|
22
|
+
"publishDate": 1747229095,
|
23
23
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"
|
24
24
|
}
|
25
25
|
},
|
@@ -29,24 +29,25 @@
|
|
29
29
|
"@angular/core": "16 - 19",
|
30
30
|
"@angular/platform-browser": "16 - 19",
|
31
31
|
"@progress/kendo-licensing": "^1.5.0",
|
32
|
-
"@progress/kendo-angular-buttons": "19.0.0-develop.
|
33
|
-
"@progress/kendo-angular-common": "19.0.0-develop.
|
34
|
-
"@progress/kendo-angular-dialog": "19.0.0-develop.
|
35
|
-
"@progress/kendo-angular-dropdowns": "19.0.0-develop.
|
36
|
-
"@progress/kendo-angular-icons": "19.0.0-develop.
|
37
|
-
"@progress/kendo-angular-inputs": "19.0.0-develop.
|
38
|
-
"@progress/kendo-angular-
|
39
|
-
"@progress/kendo-angular-
|
40
|
-
"@progress/kendo-angular-
|
41
|
-
"@progress/kendo-angular-
|
42
|
-
"@progress/kendo-angular-
|
43
|
-
"@progress/kendo-angular-
|
44
|
-
"@progress/kendo-angular-
|
32
|
+
"@progress/kendo-angular-buttons": "19.0.0-develop.16",
|
33
|
+
"@progress/kendo-angular-common": "19.0.0-develop.16",
|
34
|
+
"@progress/kendo-angular-dialog": "19.0.0-develop.16",
|
35
|
+
"@progress/kendo-angular-dropdowns": "19.0.0-develop.16",
|
36
|
+
"@progress/kendo-angular-icons": "19.0.0-develop.16",
|
37
|
+
"@progress/kendo-angular-inputs": "19.0.0-develop.16",
|
38
|
+
"@progress/kendo-angular-dateinputs": "19.0.0-develop.16",
|
39
|
+
"@progress/kendo-angular-intl": "19.0.0-develop.16",
|
40
|
+
"@progress/kendo-angular-l10n": "19.0.0-develop.16",
|
41
|
+
"@progress/kendo-angular-label": "19.0.0-develop.16",
|
42
|
+
"@progress/kendo-angular-layout": "19.0.0-develop.16",
|
43
|
+
"@progress/kendo-angular-menu": "19.0.0-develop.16",
|
44
|
+
"@progress/kendo-angular-popup": "19.0.0-develop.16",
|
45
|
+
"@progress/kendo-angular-toolbar": "19.0.0-develop.16",
|
45
46
|
"rxjs": "^6.5.3 || ^7.0.0"
|
46
47
|
},
|
47
48
|
"dependencies": {
|
48
49
|
"tslib": "^2.3.1",
|
49
|
-
"@progress/kendo-angular-schematics": "19.0.0-develop.
|
50
|
+
"@progress/kendo-angular-schematics": "19.0.0-develop.16",
|
50
51
|
"@progress/jszip-esm": "^1.0.3",
|
51
52
|
"@progress/kendo-common": "^1.0.1",
|
52
53
|
"@progress/kendo-date-math": "^1.5.10",
|
@@ -6,8 +6,8 @@ function default_1(options) {
|
|
6
6
|
// Peer dependency of icons
|
7
7
|
'@progress/kendo-svg-icons': '^4.0.0',
|
8
8
|
// peer deps of the dropdowns
|
9
|
-
'@progress/kendo-angular-navigation': '19.0.0-develop.
|
10
|
-
'@progress/kendo-angular-treeview': '19.0.0-develop.
|
9
|
+
'@progress/kendo-angular-navigation': '19.0.0-develop.16',
|
10
|
+
'@progress/kendo-angular-treeview': '19.0.0-develop.16'
|
11
11
|
} });
|
12
12
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
13
13
|
}
|
@@ -196,6 +196,8 @@ export declare class SpreadsheetComponent implements AfterViewInit, OnChanges {
|
|
196
196
|
private openLinkDialog;
|
197
197
|
private configureSheets;
|
198
198
|
private registerEditors;
|
199
|
+
private isValidFormula;
|
200
|
+
private createDate;
|
199
201
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpreadsheetComponent, never>;
|
200
202
|
static ɵcmp: i0.ɵɵComponentDeclaration<SpreadsheetComponent, "kendo-spreadsheet", ["kendo-spreadsheet"], { "menuItems": { "alias": "menuItems"; "required": false; }; "overflow": { "alias": "overflow"; "required": false; }; "formulaListMaxHeight": { "alias": "formulaListMaxHeight"; "required": false; }; "activeSheet": { "alias": "activeSheet"; "required": false; }; "sheets": { "alias": "sheets"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "columnWidth": { "alias": "columnWidth"; "required": false; }; "defaultCellStyle": { "alias": "defaultCellStyle"; "required": false; }; "headerHeight": { "alias": "headerHeight"; "required": false; }; "headerWidth": { "alias": "headerWidth"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "images": { "alias": "images"; "required": false; }; "excel": { "alias": "excel"; "required": false; }; }, { "change": "change"; "formatChange": "formatChange"; "selectionChange": "selectionChange"; "excelExport": "excelExport"; "excelImport": "excelImport"; "activeSheetChange": "activeSheetChange"; }, never, never, true, never>;
|
201
203
|
}
|