@meshmakers/shared-ui 3.3.540 → 3.3.560
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.
|
@@ -1696,7 +1696,7 @@ class ListViewComponent extends CommandBaseService {
|
|
|
1696
1696
|
}
|
|
1697
1697
|
moreVerticalIcon = moreVerticalIcon;
|
|
1698
1698
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ListViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1699
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ListViewComponent, isStandalone: true, selector: "mm-list-view", inputs: { pageSize: "pageSize", skip: "skip", rowIsClickable: "rowIsClickable", showRowCheckBoxes: "showRowCheckBoxes", showRowSelectAllCheckBox: "showRowSelectAllCheckBox", contextMenuType: "contextMenuType", leftToolbarActions: "leftToolbarActions", rightToolbarActions: "rightToolbarActions", actionCommandItems: "actionCommandItems", contextMenuCommandItems: "contextMenuCommandItems", excelExportFileName: "excelExportFileName", pdfExportFileName: "pdfExportFileName", pageable: "pageable", sortable: "sortable", rowFilterEnabled: "rowFilterEnabled", searchTextBoxEnabled: "searchTextBoxEnabled", messages: "messages", selectable: "selectable", columns: "columns" }, outputs: { rowClicked: "rowClicked" }, viewQueries: [{ propertyName: "gridComponent", first: true, predicate: GridComponent, descendants: true }, { propertyName: "dataBindingDirective", first: true, predicate: MmListViewDataBindingDirective, descendants: true }, { propertyName: "gridContextMenu", first: true, predicate: ["gridmenu"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<kendo-grid\n mmListViewDataBinding\n [loading]=\"isLoading()\"\n [pageSize]=\"pageSize\" [selectable]=\"selectable\" (pageChange)=\"onPageChange($event)\"\n [skip]=\"skip\" (selectionChange)=\"onRowSelect($event)\" (cellClick)=\"onCellClick($event)\"\n [pageable]=\"pageable\"\n [sortable]=\"sortable\"\n [filterable]=\"_showRowFilter\"\n>\n <kendo-grid-messages\n [pagerItemsPerPage]=\"_messages.pagerItemsPerPage\"\n [pagerOf]=\"_messages.pagerOf\"\n [pagerItems]=\"_messages.pagerItems\"\n [pagerPage]=\"_messages.pagerPage\"\n [pagerFirstPage]=\"_messages.pagerFirstPage\"\n [pagerLastPage]=\"_messages.pagerLastPage\"\n [pagerPreviousPage]=\"_messages.pagerPreviousPage\"\n [pagerNextPage]=\"_messages.pagerNextPage\"\n [noRecords]=\"_messages.noRecords\"\n ></kendo-grid-messages>\n <ng-template kendoGridToolbarTemplate>\n\n @for (commandItem of leftToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n <kendo-grid-spacer></kendo-grid-spacer>\n @if (searchTextBoxEnabled) {\n <input\n class=\"k-textbox k-input k-input-md k-rounded-md\"\n [style.width.px]=\"165\"\n [placeholder]=\"_messages.searchPlaceholder\"\n [value]=\"searchValue\"\n (input)=\"onFilter($any($event.target).value || null)\"\n />\n }\n\n @for (commandItem of rightToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n @if (rowFilterEnabled) {\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"filterIcon\" (click)=\"onShowRowFilter()\"\n [disabled]=\"isLoading()\" [title]=\"_messages.showRowFilter\"></button>\n }\n <button kendoTooltip kendoGridExcelCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"excelSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToExcel\"></button>\n <button kendoTooltip kendoGridPDFCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"pdfSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToPdf\"></button>\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"refreshIcon\" (click)=\"onRefresh()\" [disabled]=\"isLoading()\" [title]=\"_messages.refreshData\"></button>\n </ng-template>\n\n @if (showRowCheckBoxes && selectable.enabled) {\n <kendo-grid-checkbox-column [showSelectAll]=\"showRowSelectAllCheckBox\"\n [width]=\"40\"></kendo-grid-checkbox-column>\n }\n\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\" format=\"{{column.format}}\"\n [width]=\"$any(column.width)\"\n [sortable]=\"column.sortable !== false\"\n [filterable]=\"column.filterable !== false\"\n [title]=\"getDisplayName(column) | pascalCase\">\n <ng-template kendoGridFilterCellTemplate let-filter let-gridColumn=\"column\">\n @if (hasFilterOptions(column)) {\n <kendo-dropdownlist\n class=\"status-filter-dropdown\"\n [data]=\"column.filterOptions!\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [value]=\"getSelectedFilterValue(column)\"\n [defaultItem]=\"{ text: '', value: null }\"\n [popupSettings]=\"{ width: 'auto' }\"\n (valueChange)=\"onDropdownFilter($event, column)\"\n >\n <ng-template kendoDropDownListValueTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span class=\"filter-status-item\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n </span>\n }\n </ng-template>\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span style=\"display: inline-flex; align-items: center; gap: 8px;\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n <span>{{ dataItem.text }}</span>\n </span>\n } @else {\n <span>{{ dataItem.text }}</span>\n }\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n @switch (getFilterType(column)) {\n @case ('numeric') {\n <kendo-grid-numeric-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-numeric-filter-cell>\n }\n @case ('boolean') {\n <kendo-grid-boolean-filter-cell [column]=\"gridColumn\" [filter]=\"filter\"></kendo-grid-boolean-filter-cell>\n }\n @case ('date') {\n <kendo-grid-date-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-date-filter-cell>\n }\n @default {\n <kendo-grid-string-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-string-filter-cell>\n }\n }\n }\n </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>\n @switch (column.dataType) {\n @case ('boolean') {\n <kendo-checkbox type=\"checkbox\" [checkedState]=\"$any(getValue(dataItem, column))\" [disabled]=\"true\" />\n }\n @case ('iso8601') {\n {{ $any(getValue(dataItem, column)) | date:column.format }}\n }\n @case ('bytes') {\n {{ $any(getValue(dataItem, column)) | bytesToSize }}\n }\n @case ('statusIcons') {\n <span class=\"status-icons-cell\">\n @for (fieldConfig of getStatusFields(column); track fieldConfig.field) {\n @if (getStatusIconMapping(dataItem, fieldConfig); as mapping) {\n <span\n class=\"status-icon\"\n [title]=\"mapping.tooltip\"\n [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\"></kendo-svg-icon>\n </span>\n }\n }\n </span>\n }\n @case ('cronExpression') {\n <span class=\"cron-expression-cell\">\n <code class=\"cron-expression\">{{ getValue(dataItem, column) }}</code>\n <span class=\"cron-description\">{{ getCronHumanReadable(getValue(dataItem, column)) }}</span>\n </span>\n }\n @default {\n {{ getValue(dataItem, column) }}\n }\n }\n </ng-template>\n </kendo-grid-column>\n }\n\n @if (_actionMenuItems.length > 0 || (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu')) {\n <kendo-grid-command-column [title]=\"_messages.actionsColumnTitle\" [width]=\"220\">\n <ng-template kendoGridCellTemplate let-dataItem>\n @if (_actionMenuItems.length > 0) {\n @for (menuItem of _actionMenuItems; track menuItem.text) {\n @if (!menuItem.separator) {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\"\n [svgIcon]=\"menuItem.svgIcon!\"\n [title]=\"menuItem.text ?? ''\"\n [disabled]=\"(menuItem.disabled ?? false) || isLoading()\"\n (click)=\"onSelectOptionActionItem($event, dataItem, menuItem)\">\n </button>\n }\n }\n }\n\n @if (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu') {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"moreVerticalIcon\" [disabled]=\"isLoading()\" (click)=\"onContextMenu(dataItem, $event)\"></button>\n }\n </ng-template>\n </kendo-grid-command-column>\n }\n\n <kendo-grid-excel fileName=\"{{excelExportFileName}}\">\n @for (column of columns; track column.field) {\n <kendo-excelexport-column [field]=\"column.field\"\n [title]=\"getDisplayName(column) | pascalCase\">\n </kendo-excelexport-column>\n }\n </kendo-grid-excel>\n\n <kendo-grid-pdf fileName=\"{{pdfExportFileName}}\" paperSize=\"A4\" [repeatHeaders]=\"true\"\n [landscape]=\"true\">\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\"\n [title]=\"getDisplayName(column) | pascalCase\"></kendo-grid-column>\n }\n <kendo-grid-pdf-margin top=\"1.5cm\" left=\"1cm\" right=\"1cm\" bottom=\"1.5cm\"></kendo-grid-pdf-margin>\n <ng-template kendoGridPDFTemplate let-pageNum=\"pageNum\" let-totalPages=\"totalPages\">\n <div class=\"page-template\">\n <div class=\"footer\" style=\"position: absolute; bottom: 0; width: 100%; text-align: center; font-size: 9px; color: #666;\">\n {{ getPdfPageText(pageNum, totalPages) }}\n </div>\n </div>\n </ng-template>\n </kendo-grid-pdf>\n</kendo-grid>\n\n<kendo-contextmenu\n #gridmenu\n [kendoMenuHierarchyBinding]=\"_contextMenuItems\"\n [textField]=\"['text']\"\n childrenField=\"items\"\n svgIconField=\"svgIcon\"\n separatorField=\"separator\" (popupClose)=\"onContextMenuClosed($event)\"\n (select)=\"onContextMenuSelect($event)\"\n></kendo-contextmenu>\n", styles: [".status-icons-cell{display:inline-flex;align-items:center;gap:8px}.status-icons-cell .status-icon{display:inline-flex;align-items:center;justify-content:center;cursor:default}.status-icons-cell .status-icon kendo-svg-icon{width:18px;height:18px}:host ::ng-deep .filter-status-item{display:inline-flex;align-items:center;gap:10px}:host ::ng-deep .status-filter-dropdown .k-input-value-text{font-size:0}:host ::ng-deep .status-filter-dropdown .k-input-value-text .filter-status-item{font-size:14px}.cron-expression-cell{display:flex;flex-direction:column;gap:2px}.cron-expression-cell .cron-expression{font-family:Roboto Mono,Consolas,monospace;font-size:.85em;background:var(--mm-cron-code-bg, #eeeeee);color:var(--mm-cron-code-text, #333333);padding:2px 6px;border-radius:3px}.cron-expression-cell .cron-description{font-size:.8em;color:var(--mm-cron-text-secondary, #666666)}:host-context(.k-pdf-export) .k-grid,:host-context(.k-pdf-export) .k-grid-header,:host-context(.k-pdf-export) .k-grid-content,:host-context(.k-pdf-export) .k-grid-header-wrap,:host-context(.k-pdf-export) .k-grid-content-locked,:host-context(.k-pdf-export) .k-grid-header-locked{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border-color:#000!important}:host-context(.k-pdf-export) .k-grid{border:1px solid #000!important;font-family:Arial,sans-serif!important;font-size:10px!important}:host-context(.k-pdf-export) .k-grid-header th,:host-context(.k-pdf-export) .k-header,:host-context(.k-pdf-export) .k-grid th{background:#f0f0f0!important;background-color:#f0f0f0!important;background-image:none!important;color:#000!important;border:1px solid #000!important;font-weight:700!important;padding:6px 8px!important;text-transform:none!important;letter-spacing:normal!important}:host-context(.k-pdf-export) .k-grid td,:host-context(.k-pdf-export) .k-grid-content td,:host-context(.k-pdf-export) .k-master-row td{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border:1px solid #000!important;padding:4px 8px!important}:host-context(.k-pdf-export) .k-grid tr,:host-context(.k-pdf-export) .k-master-row,:host-context(.k-pdf-export) .k-alt{background:#fff!important;background-color:#fff!important;background-image:none!important}:host-context(.k-pdf-export) .k-grid tr:hover,:host-context(.k-pdf-export) .k-grid tr.k-selected,:host-context(.k-pdf-export) .k-grid td:hover{background:#fff!important;background-color:#fff!important}:host-context(.k-pdf-export) .k-grid-toolbar,:host-context(.k-pdf-export) .k-pager,:host-context(.k-pdf-export) .k-grid-pager,:host-context(.k-pdf-export) .k-command-cell,:host-context(.k-pdf-export) .k-checkbox-column,:host-context(.k-pdf-export) kendo-grid-checkbox-column,:host-context(.k-pdf-export) .status-icons-cell,:host-context(.k-pdf-export) .status-icon,:host-context(.k-pdf-export) kendo-svg-icon{display:none!important}\n"], dependencies: [{ kind: "component", type: GridComponent, selector: "kendo-grid", inputs: ["data", "pageSize", "height", "rowHeight", "adaptiveMode", "detailRowHeight", "skip", "scrollable", "selectable", "sort", "size", "trackBy", "filter", "group", "virtualColumns", "filterable", "sortable", "pageable", "groupable", "gridResizable", "rowReorderable", "navigable", "autoSize", "rowClass", "rowSticky", "rowSelected", "isRowSelectable", "cellSelected", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "showInactiveTools", "isDetailExpanded", "isGroupExpanded", "dataLayoutMode"], outputs: ["filterChange", "pageChange", "groupChange", "sortChange", "selectionChange", "rowReorder", "dataStateChange", "gridStateChange", "groupExpand", "groupCollapse", "detailExpand", "detailCollapse", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "csvExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "columnStickyChange", "scrollBottom", "contentScroll"], exportAs: ["kendoGrid"] }, { kind: "directive", type: MmListViewDataBindingDirective, selector: "[mmListViewDataBinding]" }, { kind: "component", type: ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterVariant", "filterable", "editable"] }, { kind: "directive", type: ToolbarTemplateDirective, selector: "[kendoGridToolbarTemplate]", inputs: ["position"] }, { kind: "component", type: GridSpacerComponent, selector: "kendo-grid-spacer", inputs: ["width"] }, { kind: "ngmodule", type: ExcelModule }, { kind: "component", type: i1$1.ExcelComponent, selector: "kendo-grid-excel", inputs: ["fileName", "filterable", "creator", "date", "forceProxy", "proxyURL", "fetchData", "paddingCellOptions", "headerPaddingCellOptions", "collapsible"], outputs: ["fileCreated"] }, { kind: "component", type: i1$1.ExcelCommandDirective, selector: "[kendoGridExcelCommand]" }, { kind: "component", type: i2.ColumnComponent, selector: "kendo-excelexport-column", inputs: ["field", "cellOptions", "groupHeaderCellOptions", "groupFooterCellOptions", "footerCellOptions"] }, { kind: "ngmodule", type: PDFModule }, { kind: "component", type: i1$1.PDFComponent, selector: "kendo-grid-pdf", inputs: ["allPages", "delay"] }, { kind: "component", type: i1$1.PDFMarginComponent, selector: "kendo-grid-pdf-margin" }, { kind: "component", type: i1$1.PDFCommandDirective, selector: "[kendoGridPDFCommand]" }, { kind: "directive", type: i1$1.PDFTemplateDirective, selector: "[kendoGridPDFTemplate]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: CommandColumnComponent, selector: "kendo-grid-command-column" }, { kind: "directive", type: CellTemplateDirective, selector: "[kendoGridCellTemplate]" }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "directive", type: HierarchyBindingDirective, selector: "[kendoMenuHierarchyBinding]", inputs: ["kendoMenuHierarchyBinding", "textField", "urlField", "iconField", "svgIconField", "disabledField", "cssClassField", "cssStyleField", "separatorField", "childrenField"], exportAs: ["kendoMenuHierarchyBinding"] }, { kind: "component", type: CheckboxColumnComponent, selector: "kendo-grid-checkbox-column", inputs: ["showSelectAll", "showDisabledCheckbox"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "component", type: SeparatorComponent, selector: "kendo-separator", inputs: ["orientation"] }, { kind: "ngmodule", type: SVGIconModule }, { kind: "component", type: i3.SVGIconComponent, selector: "kendo-svg-icon, kendo-svgicon", inputs: ["icon"], exportAs: ["kendoSVGIcon"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-grid-messages" }, { kind: "directive", type: FilterCellTemplateDirective, selector: "[kendoGridFilterCellTemplate]" }, { kind: "component", type: StringFilterCellComponent, selector: "kendo-grid-string-filter-cell", inputs: ["filterDelay", "showOperators", "placeholder"] }, { kind: "component", type: NumericFilterCellComponent, selector: "kendo-grid-numeric-filter-cell", inputs: ["filterDelay", "showOperators", "placeholder"] }, { kind: "component", type: BooleanFilterCellComponent, selector: "kendo-grid-boolean-filter-cell" }, { kind: "component", type: DateFilterCellComponent, selector: "kendo-grid-date-filter-cell", inputs: ["showOperators"] }, { kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: ValueTemplateDirective, selector: "[kendoDropDownListValueTemplate],[kendoDropDownTreeValueTemplate]" }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "pipe", type: PascalCasePipe, name: "pascalCase" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: BytesToSizePipe, name: "bytesToSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1699
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ListViewComponent, isStandalone: true, selector: "mm-list-view", inputs: { pageSize: "pageSize", skip: "skip", rowIsClickable: "rowIsClickable", showRowCheckBoxes: "showRowCheckBoxes", showRowSelectAllCheckBox: "showRowSelectAllCheckBox", contextMenuType: "contextMenuType", leftToolbarActions: "leftToolbarActions", rightToolbarActions: "rightToolbarActions", actionCommandItems: "actionCommandItems", contextMenuCommandItems: "contextMenuCommandItems", excelExportFileName: "excelExportFileName", pdfExportFileName: "pdfExportFileName", pageable: "pageable", sortable: "sortable", rowFilterEnabled: "rowFilterEnabled", searchTextBoxEnabled: "searchTextBoxEnabled", messages: "messages", selectable: "selectable", columns: "columns" }, outputs: { rowClicked: "rowClicked" }, viewQueries: [{ propertyName: "gridComponent", first: true, predicate: GridComponent, descendants: true }, { propertyName: "dataBindingDirective", first: true, predicate: MmListViewDataBindingDirective, descendants: true }, { propertyName: "gridContextMenu", first: true, predicate: ["gridmenu"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<kendo-grid\n mmListViewDataBinding\n [loading]=\"isLoading()\"\n [pageSize]=\"pageSize\" [selectable]=\"selectable\" (pageChange)=\"onPageChange($event)\"\n [skip]=\"skip\" (selectionChange)=\"onRowSelect($event)\" (cellClick)=\"onCellClick($event)\"\n [pageable]=\"pageable\"\n [sortable]=\"sortable\"\n [filterable]=\"_showRowFilter\"\n>\n <kendo-grid-messages\n [pagerItemsPerPage]=\"_messages.pagerItemsPerPage\"\n [pagerOf]=\"_messages.pagerOf\"\n [pagerItems]=\"_messages.pagerItems\"\n [pagerPage]=\"_messages.pagerPage\"\n [pagerFirstPage]=\"_messages.pagerFirstPage\"\n [pagerLastPage]=\"_messages.pagerLastPage\"\n [pagerPreviousPage]=\"_messages.pagerPreviousPage\"\n [pagerNextPage]=\"_messages.pagerNextPage\"\n [noRecords]=\"_messages.noRecords\"\n ></kendo-grid-messages>\n <ng-template kendoGridToolbarTemplate>\n\n @for (commandItem of leftToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n <kendo-grid-spacer></kendo-grid-spacer>\n @if (searchTextBoxEnabled) {\n <input\n class=\"k-textbox k-input k-input-md k-rounded-md\"\n [style.width.px]=\"165\"\n [placeholder]=\"_messages.searchPlaceholder\"\n [value]=\"searchValue\"\n (input)=\"onFilter($any($event.target).value || null)\"\n />\n }\n\n @for (commandItem of rightToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n @if (rowFilterEnabled) {\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"filterIcon\" (click)=\"onShowRowFilter()\"\n [disabled]=\"isLoading()\" [title]=\"_messages.showRowFilter\"></button>\n }\n <button kendoTooltip kendoGridExcelCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"excelSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToExcel\"></button>\n <button kendoTooltip kendoGridPDFCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"pdfSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToPdf\"></button>\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"refreshIcon\" (click)=\"onRefresh()\" [disabled]=\"isLoading()\" [title]=\"_messages.refreshData\"></button>\n </ng-template>\n\n @if (showRowCheckBoxes && selectable.enabled) {\n <kendo-grid-checkbox-column [showSelectAll]=\"showRowSelectAllCheckBox\"\n [width]=\"40\"></kendo-grid-checkbox-column>\n }\n\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\" format=\"{{column.format}}\"\n [width]=\"$any(column.width)\"\n [sortable]=\"column.sortable !== false\"\n [filterable]=\"column.filterable !== false\"\n [title]=\"getDisplayName(column) | pascalCase\">\n <ng-template kendoGridFilterCellTemplate let-filter let-gridColumn=\"column\">\n @if (hasFilterOptions(column)) {\n <kendo-dropdownlist\n class=\"status-filter-dropdown\"\n [data]=\"column.filterOptions!\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [value]=\"getSelectedFilterValue(column)\"\n [defaultItem]=\"{ text: '', value: null }\"\n [popupSettings]=\"{ width: 'auto' }\"\n (valueChange)=\"onDropdownFilter($event, column)\"\n >\n <ng-template kendoDropDownListValueTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span class=\"filter-status-item\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n </span>\n } @else if (dataItem?.text) {\n <span>{{ dataItem.text }}</span>\n }\n </ng-template>\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span style=\"display: inline-flex; align-items: center; gap: 8px;\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n <span>{{ dataItem.text }}</span>\n </span>\n } @else {\n <span>{{ dataItem.text }}</span>\n }\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n @switch (getFilterType(column)) {\n @case ('numeric') {\n <kendo-grid-numeric-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-numeric-filter-cell>\n }\n @case ('boolean') {\n <kendo-grid-boolean-filter-cell [column]=\"gridColumn\" [filter]=\"filter\"></kendo-grid-boolean-filter-cell>\n }\n @case ('date') {\n <kendo-grid-date-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-date-filter-cell>\n }\n @default {\n <kendo-grid-string-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-string-filter-cell>\n }\n }\n }\n </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>\n @switch (column.dataType) {\n @case ('boolean') {\n <kendo-checkbox type=\"checkbox\" [checkedState]=\"$any(getValue(dataItem, column))\" [disabled]=\"true\" />\n }\n @case ('iso8601') {\n {{ $any(getValue(dataItem, column)) | date:column.format }}\n }\n @case ('bytes') {\n {{ $any(getValue(dataItem, column)) | bytesToSize }}\n }\n @case ('statusIcons') {\n <span class=\"status-icons-cell\">\n @for (fieldConfig of getStatusFields(column); track fieldConfig.field) {\n @if (getStatusIconMapping(dataItem, fieldConfig); as mapping) {\n <span\n class=\"status-icon\"\n [title]=\"mapping.tooltip\"\n [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\"></kendo-svg-icon>\n </span>\n }\n }\n </span>\n }\n @case ('cronExpression') {\n <span class=\"cron-expression-cell\">\n <code class=\"cron-expression\">{{ getValue(dataItem, column) }}</code>\n <span class=\"cron-description\">{{ getCronHumanReadable(getValue(dataItem, column)) }}</span>\n </span>\n }\n @default {\n {{ getValue(dataItem, column) }}\n }\n }\n </ng-template>\n </kendo-grid-column>\n }\n\n @if (_actionMenuItems.length > 0 || (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu')) {\n <kendo-grid-command-column [title]=\"_messages.actionsColumnTitle\" [width]=\"220\">\n <ng-template kendoGridCellTemplate let-dataItem>\n @if (_actionMenuItems.length > 0) {\n @for (menuItem of _actionMenuItems; track menuItem.text) {\n @if (!menuItem.separator) {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\"\n [svgIcon]=\"menuItem.svgIcon!\"\n [title]=\"menuItem.text ?? ''\"\n [disabled]=\"(menuItem.disabled ?? false) || isLoading()\"\n (click)=\"onSelectOptionActionItem($event, dataItem, menuItem)\">\n </button>\n }\n }\n }\n\n @if (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu') {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"moreVerticalIcon\" [disabled]=\"isLoading()\" (click)=\"onContextMenu(dataItem, $event)\"></button>\n }\n </ng-template>\n </kendo-grid-command-column>\n }\n\n <kendo-grid-excel fileName=\"{{excelExportFileName}}\">\n @for (column of columns; track column.field) {\n <kendo-excelexport-column [field]=\"column.field\"\n [title]=\"getDisplayName(column) | pascalCase\">\n </kendo-excelexport-column>\n }\n </kendo-grid-excel>\n\n <kendo-grid-pdf fileName=\"{{pdfExportFileName}}\" paperSize=\"A4\" [repeatHeaders]=\"true\"\n [landscape]=\"true\">\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\"\n [title]=\"getDisplayName(column) | pascalCase\"></kendo-grid-column>\n }\n <kendo-grid-pdf-margin top=\"1.5cm\" left=\"1cm\" right=\"1cm\" bottom=\"1.5cm\"></kendo-grid-pdf-margin>\n <ng-template kendoGridPDFTemplate let-pageNum=\"pageNum\" let-totalPages=\"totalPages\">\n <div class=\"page-template\">\n <div class=\"footer\" style=\"position: absolute; bottom: 0; width: 100%; text-align: center; font-size: 9px; color: #666;\">\n {{ getPdfPageText(pageNum, totalPages) }}\n </div>\n </div>\n </ng-template>\n </kendo-grid-pdf>\n</kendo-grid>\n\n<kendo-contextmenu\n #gridmenu\n [kendoMenuHierarchyBinding]=\"_contextMenuItems\"\n [textField]=\"['text']\"\n childrenField=\"items\"\n svgIconField=\"svgIcon\"\n separatorField=\"separator\" (popupClose)=\"onContextMenuClosed($event)\"\n (select)=\"onContextMenuSelect($event)\"\n></kendo-contextmenu>\n", styles: [".status-icons-cell{display:inline-flex;align-items:center;gap:8px}.status-icons-cell .status-icon{display:inline-flex;align-items:center;justify-content:center;cursor:default}.status-icons-cell .status-icon kendo-svg-icon{width:18px;height:18px}:host ::ng-deep .filter-status-item{display:inline-flex;align-items:center;gap:10px}:host ::ng-deep .status-filter-dropdown .k-input-value-text{font-size:0}:host ::ng-deep .status-filter-dropdown .k-input-value-text .filter-status-item,:host ::ng-deep .status-filter-dropdown .k-input-value-text>span{font-size:14px}.cron-expression-cell{display:flex;flex-direction:column;gap:2px}.cron-expression-cell .cron-expression{font-family:Roboto Mono,Consolas,monospace;font-size:.85em;background:var(--mm-cron-code-bg, #eeeeee);color:var(--mm-cron-code-text, #333333);padding:2px 6px;border-radius:3px}.cron-expression-cell .cron-description{font-size:.8em;color:var(--mm-cron-text-secondary, #666666)}:host-context(.k-pdf-export) .k-grid,:host-context(.k-pdf-export) .k-grid-header,:host-context(.k-pdf-export) .k-grid-content,:host-context(.k-pdf-export) .k-grid-header-wrap,:host-context(.k-pdf-export) .k-grid-content-locked,:host-context(.k-pdf-export) .k-grid-header-locked{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border-color:#000!important}:host-context(.k-pdf-export) .k-grid{border:1px solid #000!important;font-family:Arial,sans-serif!important;font-size:10px!important}:host-context(.k-pdf-export) .k-grid-header th,:host-context(.k-pdf-export) .k-header,:host-context(.k-pdf-export) .k-grid th{background:#f0f0f0!important;background-color:#f0f0f0!important;background-image:none!important;color:#000!important;border:1px solid #000!important;font-weight:700!important;padding:6px 8px!important;text-transform:none!important;letter-spacing:normal!important}:host-context(.k-pdf-export) .k-grid td,:host-context(.k-pdf-export) .k-grid-content td,:host-context(.k-pdf-export) .k-master-row td{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border:1px solid #000!important;padding:4px 8px!important}:host-context(.k-pdf-export) .k-grid tr,:host-context(.k-pdf-export) .k-master-row,:host-context(.k-pdf-export) .k-alt{background:#fff!important;background-color:#fff!important;background-image:none!important}:host-context(.k-pdf-export) .k-grid tr:hover,:host-context(.k-pdf-export) .k-grid tr.k-selected,:host-context(.k-pdf-export) .k-grid td:hover{background:#fff!important;background-color:#fff!important}:host-context(.k-pdf-export) .k-grid-toolbar,:host-context(.k-pdf-export) .k-pager,:host-context(.k-pdf-export) .k-grid-pager,:host-context(.k-pdf-export) .k-command-cell,:host-context(.k-pdf-export) .k-checkbox-column,:host-context(.k-pdf-export) kendo-grid-checkbox-column,:host-context(.k-pdf-export) .status-icons-cell,:host-context(.k-pdf-export) .status-icon,:host-context(.k-pdf-export) kendo-svg-icon{display:none!important}\n"], dependencies: [{ kind: "component", type: GridComponent, selector: "kendo-grid", inputs: ["data", "pageSize", "height", "rowHeight", "adaptiveMode", "detailRowHeight", "skip", "scrollable", "selectable", "sort", "size", "trackBy", "filter", "group", "virtualColumns", "filterable", "sortable", "pageable", "groupable", "gridResizable", "rowReorderable", "navigable", "autoSize", "rowClass", "rowSticky", "rowSelected", "isRowSelectable", "cellSelected", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "showInactiveTools", "isDetailExpanded", "isGroupExpanded", "dataLayoutMode"], outputs: ["filterChange", "pageChange", "groupChange", "sortChange", "selectionChange", "rowReorder", "dataStateChange", "gridStateChange", "groupExpand", "groupCollapse", "detailExpand", "detailCollapse", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "csvExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "columnStickyChange", "scrollBottom", "contentScroll"], exportAs: ["kendoGrid"] }, { kind: "directive", type: MmListViewDataBindingDirective, selector: "[mmListViewDataBinding]" }, { kind: "component", type: ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterVariant", "filterable", "editable"] }, { kind: "directive", type: ToolbarTemplateDirective, selector: "[kendoGridToolbarTemplate]", inputs: ["position"] }, { kind: "component", type: GridSpacerComponent, selector: "kendo-grid-spacer", inputs: ["width"] }, { kind: "ngmodule", type: ExcelModule }, { kind: "component", type: i1$1.ExcelComponent, selector: "kendo-grid-excel", inputs: ["fileName", "filterable", "creator", "date", "forceProxy", "proxyURL", "fetchData", "paddingCellOptions", "headerPaddingCellOptions", "collapsible"], outputs: ["fileCreated"] }, { kind: "component", type: i1$1.ExcelCommandDirective, selector: "[kendoGridExcelCommand]" }, { kind: "component", type: i2.ColumnComponent, selector: "kendo-excelexport-column", inputs: ["field", "cellOptions", "groupHeaderCellOptions", "groupFooterCellOptions", "footerCellOptions"] }, { kind: "ngmodule", type: PDFModule }, { kind: "component", type: i1$1.PDFComponent, selector: "kendo-grid-pdf", inputs: ["allPages", "delay"] }, { kind: "component", type: i1$1.PDFMarginComponent, selector: "kendo-grid-pdf-margin" }, { kind: "component", type: i1$1.PDFCommandDirective, selector: "[kendoGridPDFCommand]" }, { kind: "directive", type: i1$1.PDFTemplateDirective, selector: "[kendoGridPDFTemplate]" }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "component", type: CommandColumnComponent, selector: "kendo-grid-command-column" }, { kind: "directive", type: CellTemplateDirective, selector: "[kendoGridCellTemplate]" }, { kind: "component", type: ContextMenuComponent, selector: "kendo-contextmenu", inputs: ["showOn", "target", "filter", "alignToAnchor", "vertical", "popupAnimate", "popupAlign", "anchorAlign", "collision", "appendTo", "ariaLabel"], outputs: ["popupOpen", "popupClose", "select", "open", "close"], exportAs: ["kendoContextMenu"] }, { kind: "directive", type: HierarchyBindingDirective, selector: "[kendoMenuHierarchyBinding]", inputs: ["kendoMenuHierarchyBinding", "textField", "urlField", "iconField", "svgIconField", "disabledField", "cssClassField", "cssStyleField", "separatorField", "childrenField"], exportAs: ["kendoMenuHierarchyBinding"] }, { kind: "component", type: CheckboxColumnComponent, selector: "kendo-grid-checkbox-column", inputs: ["showSelectAll", "showDisabledCheckbox"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "component", type: SeparatorComponent, selector: "kendo-separator", inputs: ["orientation"] }, { kind: "ngmodule", type: SVGIconModule }, { kind: "component", type: i3.SVGIconComponent, selector: "kendo-svg-icon, kendo-svgicon", inputs: ["icon"], exportAs: ["kendoSVGIcon"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-grid-messages" }, { kind: "directive", type: FilterCellTemplateDirective, selector: "[kendoGridFilterCellTemplate]" }, { kind: "component", type: StringFilterCellComponent, selector: "kendo-grid-string-filter-cell", inputs: ["filterDelay", "showOperators", "placeholder"] }, { kind: "component", type: NumericFilterCellComponent, selector: "kendo-grid-numeric-filter-cell", inputs: ["filterDelay", "showOperators", "placeholder"] }, { kind: "component", type: BooleanFilterCellComponent, selector: "kendo-grid-boolean-filter-cell" }, { kind: "component", type: DateFilterCellComponent, selector: "kendo-grid-date-filter-cell", inputs: ["showOperators"] }, { kind: "component", type: DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "directive", type: ValueTemplateDirective, selector: "[kendoDropDownListValueTemplate],[kendoDropDownTreeValueTemplate]" }, { kind: "directive", type: ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }, { kind: "pipe", type: PascalCasePipe, name: "pascalCase" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: BytesToSizePipe, name: "bytesToSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1700
1700
|
}
|
|
1701
1701
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ListViewComponent, decorators: [{
|
|
1702
1702
|
type: Component,
|
|
@@ -1729,7 +1729,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1729
1729
|
DropDownListComponent,
|
|
1730
1730
|
ValueTemplateDirective,
|
|
1731
1731
|
ItemTemplateDirective
|
|
1732
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kendo-grid\n mmListViewDataBinding\n [loading]=\"isLoading()\"\n [pageSize]=\"pageSize\" [selectable]=\"selectable\" (pageChange)=\"onPageChange($event)\"\n [skip]=\"skip\" (selectionChange)=\"onRowSelect($event)\" (cellClick)=\"onCellClick($event)\"\n [pageable]=\"pageable\"\n [sortable]=\"sortable\"\n [filterable]=\"_showRowFilter\"\n>\n <kendo-grid-messages\n [pagerItemsPerPage]=\"_messages.pagerItemsPerPage\"\n [pagerOf]=\"_messages.pagerOf\"\n [pagerItems]=\"_messages.pagerItems\"\n [pagerPage]=\"_messages.pagerPage\"\n [pagerFirstPage]=\"_messages.pagerFirstPage\"\n [pagerLastPage]=\"_messages.pagerLastPage\"\n [pagerPreviousPage]=\"_messages.pagerPreviousPage\"\n [pagerNextPage]=\"_messages.pagerNextPage\"\n [noRecords]=\"_messages.noRecords\"\n ></kendo-grid-messages>\n <ng-template kendoGridToolbarTemplate>\n\n @for (commandItem of leftToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n <kendo-grid-spacer></kendo-grid-spacer>\n @if (searchTextBoxEnabled) {\n <input\n class=\"k-textbox k-input k-input-md k-rounded-md\"\n [style.width.px]=\"165\"\n [placeholder]=\"_messages.searchPlaceholder\"\n [value]=\"searchValue\"\n (input)=\"onFilter($any($event.target).value || null)\"\n />\n }\n\n @for (commandItem of rightToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n @if (rowFilterEnabled) {\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"filterIcon\" (click)=\"onShowRowFilter()\"\n [disabled]=\"isLoading()\" [title]=\"_messages.showRowFilter\"></button>\n }\n <button kendoTooltip kendoGridExcelCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"excelSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToExcel\"></button>\n <button kendoTooltip kendoGridPDFCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"pdfSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToPdf\"></button>\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"refreshIcon\" (click)=\"onRefresh()\" [disabled]=\"isLoading()\" [title]=\"_messages.refreshData\"></button>\n </ng-template>\n\n @if (showRowCheckBoxes && selectable.enabled) {\n <kendo-grid-checkbox-column [showSelectAll]=\"showRowSelectAllCheckBox\"\n [width]=\"40\"></kendo-grid-checkbox-column>\n }\n\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\" format=\"{{column.format}}\"\n [width]=\"$any(column.width)\"\n [sortable]=\"column.sortable !== false\"\n [filterable]=\"column.filterable !== false\"\n [title]=\"getDisplayName(column) | pascalCase\">\n <ng-template kendoGridFilterCellTemplate let-filter let-gridColumn=\"column\">\n @if (hasFilterOptions(column)) {\n <kendo-dropdownlist\n class=\"status-filter-dropdown\"\n [data]=\"column.filterOptions!\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [value]=\"getSelectedFilterValue(column)\"\n [defaultItem]=\"{ text: '', value: null }\"\n [popupSettings]=\"{ width: 'auto' }\"\n (valueChange)=\"onDropdownFilter($event, column)\"\n >\n <ng-template kendoDropDownListValueTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span class=\"filter-status-item\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n </span>\n }\n </ng-template>\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span style=\"display: inline-flex; align-items: center; gap: 8px;\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n <span>{{ dataItem.text }}</span>\n </span>\n } @else {\n <span>{{ dataItem.text }}</span>\n }\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n @switch (getFilterType(column)) {\n @case ('numeric') {\n <kendo-grid-numeric-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-numeric-filter-cell>\n }\n @case ('boolean') {\n <kendo-grid-boolean-filter-cell [column]=\"gridColumn\" [filter]=\"filter\"></kendo-grid-boolean-filter-cell>\n }\n @case ('date') {\n <kendo-grid-date-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-date-filter-cell>\n }\n @default {\n <kendo-grid-string-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-string-filter-cell>\n }\n }\n }\n </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>\n @switch (column.dataType) {\n @case ('boolean') {\n <kendo-checkbox type=\"checkbox\" [checkedState]=\"$any(getValue(dataItem, column))\" [disabled]=\"true\" />\n }\n @case ('iso8601') {\n {{ $any(getValue(dataItem, column)) | date:column.format }}\n }\n @case ('bytes') {\n {{ $any(getValue(dataItem, column)) | bytesToSize }}\n }\n @case ('statusIcons') {\n <span class=\"status-icons-cell\">\n @for (fieldConfig of getStatusFields(column); track fieldConfig.field) {\n @if (getStatusIconMapping(dataItem, fieldConfig); as mapping) {\n <span\n class=\"status-icon\"\n [title]=\"mapping.tooltip\"\n [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\"></kendo-svg-icon>\n </span>\n }\n }\n </span>\n }\n @case ('cronExpression') {\n <span class=\"cron-expression-cell\">\n <code class=\"cron-expression\">{{ getValue(dataItem, column) }}</code>\n <span class=\"cron-description\">{{ getCronHumanReadable(getValue(dataItem, column)) }}</span>\n </span>\n }\n @default {\n {{ getValue(dataItem, column) }}\n }\n }\n </ng-template>\n </kendo-grid-column>\n }\n\n @if (_actionMenuItems.length > 0 || (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu')) {\n <kendo-grid-command-column [title]=\"_messages.actionsColumnTitle\" [width]=\"220\">\n <ng-template kendoGridCellTemplate let-dataItem>\n @if (_actionMenuItems.length > 0) {\n @for (menuItem of _actionMenuItems; track menuItem.text) {\n @if (!menuItem.separator) {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\"\n [svgIcon]=\"menuItem.svgIcon!\"\n [title]=\"menuItem.text ?? ''\"\n [disabled]=\"(menuItem.disabled ?? false) || isLoading()\"\n (click)=\"onSelectOptionActionItem($event, dataItem, menuItem)\">\n </button>\n }\n }\n }\n\n @if (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu') {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"moreVerticalIcon\" [disabled]=\"isLoading()\" (click)=\"onContextMenu(dataItem, $event)\"></button>\n }\n </ng-template>\n </kendo-grid-command-column>\n }\n\n <kendo-grid-excel fileName=\"{{excelExportFileName}}\">\n @for (column of columns; track column.field) {\n <kendo-excelexport-column [field]=\"column.field\"\n [title]=\"getDisplayName(column) | pascalCase\">\n </kendo-excelexport-column>\n }\n </kendo-grid-excel>\n\n <kendo-grid-pdf fileName=\"{{pdfExportFileName}}\" paperSize=\"A4\" [repeatHeaders]=\"true\"\n [landscape]=\"true\">\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\"\n [title]=\"getDisplayName(column) | pascalCase\"></kendo-grid-column>\n }\n <kendo-grid-pdf-margin top=\"1.5cm\" left=\"1cm\" right=\"1cm\" bottom=\"1.5cm\"></kendo-grid-pdf-margin>\n <ng-template kendoGridPDFTemplate let-pageNum=\"pageNum\" let-totalPages=\"totalPages\">\n <div class=\"page-template\">\n <div class=\"footer\" style=\"position: absolute; bottom: 0; width: 100%; text-align: center; font-size: 9px; color: #666;\">\n {{ getPdfPageText(pageNum, totalPages) }}\n </div>\n </div>\n </ng-template>\n </kendo-grid-pdf>\n</kendo-grid>\n\n<kendo-contextmenu\n #gridmenu\n [kendoMenuHierarchyBinding]=\"_contextMenuItems\"\n [textField]=\"['text']\"\n childrenField=\"items\"\n svgIconField=\"svgIcon\"\n separatorField=\"separator\" (popupClose)=\"onContextMenuClosed($event)\"\n (select)=\"onContextMenuSelect($event)\"\n></kendo-contextmenu>\n", styles: [".status-icons-cell{display:inline-flex;align-items:center;gap:8px}.status-icons-cell .status-icon{display:inline-flex;align-items:center;justify-content:center;cursor:default}.status-icons-cell .status-icon kendo-svg-icon{width:18px;height:18px}:host ::ng-deep .filter-status-item{display:inline-flex;align-items:center;gap:10px}:host ::ng-deep .status-filter-dropdown .k-input-value-text{font-size:0}:host ::ng-deep .status-filter-dropdown .k-input-value-text .filter-status-item{font-size:14px}.cron-expression-cell{display:flex;flex-direction:column;gap:2px}.cron-expression-cell .cron-expression{font-family:Roboto Mono,Consolas,monospace;font-size:.85em;background:var(--mm-cron-code-bg, #eeeeee);color:var(--mm-cron-code-text, #333333);padding:2px 6px;border-radius:3px}.cron-expression-cell .cron-description{font-size:.8em;color:var(--mm-cron-text-secondary, #666666)}:host-context(.k-pdf-export) .k-grid,:host-context(.k-pdf-export) .k-grid-header,:host-context(.k-pdf-export) .k-grid-content,:host-context(.k-pdf-export) .k-grid-header-wrap,:host-context(.k-pdf-export) .k-grid-content-locked,:host-context(.k-pdf-export) .k-grid-header-locked{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border-color:#000!important}:host-context(.k-pdf-export) .k-grid{border:1px solid #000!important;font-family:Arial,sans-serif!important;font-size:10px!important}:host-context(.k-pdf-export) .k-grid-header th,:host-context(.k-pdf-export) .k-header,:host-context(.k-pdf-export) .k-grid th{background:#f0f0f0!important;background-color:#f0f0f0!important;background-image:none!important;color:#000!important;border:1px solid #000!important;font-weight:700!important;padding:6px 8px!important;text-transform:none!important;letter-spacing:normal!important}:host-context(.k-pdf-export) .k-grid td,:host-context(.k-pdf-export) .k-grid-content td,:host-context(.k-pdf-export) .k-master-row td{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border:1px solid #000!important;padding:4px 8px!important}:host-context(.k-pdf-export) .k-grid tr,:host-context(.k-pdf-export) .k-master-row,:host-context(.k-pdf-export) .k-alt{background:#fff!important;background-color:#fff!important;background-image:none!important}:host-context(.k-pdf-export) .k-grid tr:hover,:host-context(.k-pdf-export) .k-grid tr.k-selected,:host-context(.k-pdf-export) .k-grid td:hover{background:#fff!important;background-color:#fff!important}:host-context(.k-pdf-export) .k-grid-toolbar,:host-context(.k-pdf-export) .k-pager,:host-context(.k-pdf-export) .k-grid-pager,:host-context(.k-pdf-export) .k-command-cell,:host-context(.k-pdf-export) .k-checkbox-column,:host-context(.k-pdf-export) kendo-grid-checkbox-column,:host-context(.k-pdf-export) .status-icons-cell,:host-context(.k-pdf-export) .status-icon,:host-context(.k-pdf-export) kendo-svg-icon{display:none!important}\n"] }]
|
|
1732
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<kendo-grid\n mmListViewDataBinding\n [loading]=\"isLoading()\"\n [pageSize]=\"pageSize\" [selectable]=\"selectable\" (pageChange)=\"onPageChange($event)\"\n [skip]=\"skip\" (selectionChange)=\"onRowSelect($event)\" (cellClick)=\"onCellClick($event)\"\n [pageable]=\"pageable\"\n [sortable]=\"sortable\"\n [filterable]=\"_showRowFilter\"\n>\n <kendo-grid-messages\n [pagerItemsPerPage]=\"_messages.pagerItemsPerPage\"\n [pagerOf]=\"_messages.pagerOf\"\n [pagerItems]=\"_messages.pagerItems\"\n [pagerPage]=\"_messages.pagerPage\"\n [pagerFirstPage]=\"_messages.pagerFirstPage\"\n [pagerLastPage]=\"_messages.pagerLastPage\"\n [pagerPreviousPage]=\"_messages.pagerPreviousPage\"\n [pagerNextPage]=\"_messages.pagerNextPage\"\n [noRecords]=\"_messages.noRecords\"\n ></kendo-grid-messages>\n <ng-template kendoGridToolbarTemplate>\n\n @for (commandItem of leftToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n <kendo-grid-spacer></kendo-grid-spacer>\n @if (searchTextBoxEnabled) {\n <input\n class=\"k-textbox k-input k-input-md k-rounded-md\"\n [style.width.px]=\"165\"\n [placeholder]=\"_messages.searchPlaceholder\"\n [value]=\"searchValue\"\n (input)=\"onFilter($any($event.target).value || null)\"\n />\n }\n\n @for (commandItem of rightToolbarActions; track commandItem.id) {\n @if (commandItem) {\n @switch (commandItem.type) {\n @case ('link') {\n @if (commandItem.svgIcon) {\n <button kendoTooltip kendoButton themeColor=\"primary\" [svgIcon]=\"commandItem.svgIcon\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n } @else {\n <button kendoTooltip kendoButton themeColor=\"primary\" [title]=\"commandItem.text\"\n [disabled]=\"getIsDisabled(commandItem) || isLoading()\"\n (click)=\"onToolbarCommand(commandItem)\">{{ commandItem.text }}\n </button>\n }\n }\n @case ('separator'){\n <kendo-separator></kendo-separator>\n }\n }\n }\n }\n\n @if (rowFilterEnabled) {\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"filterIcon\" (click)=\"onShowRowFilter()\"\n [disabled]=\"isLoading()\" [title]=\"_messages.showRowFilter\"></button>\n }\n <button kendoTooltip kendoGridExcelCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"excelSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToExcel\"></button>\n <button kendoTooltip kendoGridPDFCommand themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"pdfSVG\" [disabled]=\"isLoading()\" [title]=\"_messages.exportToPdf\"></button>\n <button kendoTooltip kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"refreshIcon\" (click)=\"onRefresh()\" [disabled]=\"isLoading()\" [title]=\"_messages.refreshData\"></button>\n </ng-template>\n\n @if (showRowCheckBoxes && selectable.enabled) {\n <kendo-grid-checkbox-column [showSelectAll]=\"showRowSelectAllCheckBox\"\n [width]=\"40\"></kendo-grid-checkbox-column>\n }\n\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\" format=\"{{column.format}}\"\n [width]=\"$any(column.width)\"\n [sortable]=\"column.sortable !== false\"\n [filterable]=\"column.filterable !== false\"\n [title]=\"getDisplayName(column) | pascalCase\">\n <ng-template kendoGridFilterCellTemplate let-filter let-gridColumn=\"column\">\n @if (hasFilterOptions(column)) {\n <kendo-dropdownlist\n class=\"status-filter-dropdown\"\n [data]=\"column.filterOptions!\"\n textField=\"text\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [value]=\"getSelectedFilterValue(column)\"\n [defaultItem]=\"{ text: '', value: null }\"\n [popupSettings]=\"{ width: 'auto' }\"\n (valueChange)=\"onDropdownFilter($event, column)\"\n >\n <ng-template kendoDropDownListValueTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span class=\"filter-status-item\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n </span>\n } @else if (dataItem?.text) {\n <span>{{ dataItem.text }}</span>\n }\n </ng-template>\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n @if (dataItem?.value && column.statusMapping?.[dataItem.value]; as mapping) {\n <span style=\"display: inline-flex; align-items: center; gap: 8px;\">\n <span [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\" [size]=\"'small'\"></kendo-svg-icon>\n </span>\n <span>{{ dataItem.text }}</span>\n </span>\n } @else {\n <span>{{ dataItem.text }}</span>\n }\n </ng-template>\n </kendo-dropdownlist>\n } @else {\n @switch (getFilterType(column)) {\n @case ('numeric') {\n <kendo-grid-numeric-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-numeric-filter-cell>\n }\n @case ('boolean') {\n <kendo-grid-boolean-filter-cell [column]=\"gridColumn\" [filter]=\"filter\"></kendo-grid-boolean-filter-cell>\n }\n @case ('date') {\n <kendo-grid-date-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-date-filter-cell>\n }\n @default {\n <kendo-grid-string-filter-cell [column]=\"gridColumn\" [filter]=\"filter\" [showOperators]=\"false\"></kendo-grid-string-filter-cell>\n }\n }\n }\n </ng-template>\n <ng-template kendoGridCellTemplate let-dataItem>\n @switch (column.dataType) {\n @case ('boolean') {\n <kendo-checkbox type=\"checkbox\" [checkedState]=\"$any(getValue(dataItem, column))\" [disabled]=\"true\" />\n }\n @case ('iso8601') {\n {{ $any(getValue(dataItem, column)) | date:column.format }}\n }\n @case ('bytes') {\n {{ $any(getValue(dataItem, column)) | bytesToSize }}\n }\n @case ('statusIcons') {\n <span class=\"status-icons-cell\">\n @for (fieldConfig of getStatusFields(column); track fieldConfig.field) {\n @if (getStatusIconMapping(dataItem, fieldConfig); as mapping) {\n <span\n class=\"status-icon\"\n [title]=\"mapping.tooltip\"\n [style.color]=\"mapping.color\">\n <kendo-svg-icon [icon]=\"mapping.icon\"></kendo-svg-icon>\n </span>\n }\n }\n </span>\n }\n @case ('cronExpression') {\n <span class=\"cron-expression-cell\">\n <code class=\"cron-expression\">{{ getValue(dataItem, column) }}</code>\n <span class=\"cron-description\">{{ getCronHumanReadable(getValue(dataItem, column)) }}</span>\n </span>\n }\n @default {\n {{ getValue(dataItem, column) }}\n }\n }\n </ng-template>\n </kendo-grid-column>\n }\n\n @if (_actionMenuItems.length > 0 || (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu')) {\n <kendo-grid-command-column [title]=\"_messages.actionsColumnTitle\" [width]=\"220\">\n <ng-template kendoGridCellTemplate let-dataItem>\n @if (_actionMenuItems.length > 0) {\n @for (menuItem of _actionMenuItems; track menuItem.text) {\n @if (!menuItem.separator) {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\"\n [svgIcon]=\"menuItem.svgIcon!\"\n [title]=\"menuItem.text ?? ''\"\n [disabled]=\"(menuItem.disabled ?? false) || isLoading()\"\n (click)=\"onSelectOptionActionItem($event, dataItem, menuItem)\">\n </button>\n }\n }\n }\n\n @if (_contextMenuItems.length > 0 && contextMenuType == 'actionMenu') {\n <button kendoButton themeColor=\"primary\" fillMode=\"flat\" [svgIcon]=\"moreVerticalIcon\" [disabled]=\"isLoading()\" (click)=\"onContextMenu(dataItem, $event)\"></button>\n }\n </ng-template>\n </kendo-grid-command-column>\n }\n\n <kendo-grid-excel fileName=\"{{excelExportFileName}}\">\n @for (column of columns; track column.field) {\n <kendo-excelexport-column [field]=\"column.field\"\n [title]=\"getDisplayName(column) | pascalCase\">\n </kendo-excelexport-column>\n }\n </kendo-grid-excel>\n\n <kendo-grid-pdf fileName=\"{{pdfExportFileName}}\" paperSize=\"A4\" [repeatHeaders]=\"true\"\n [landscape]=\"true\">\n @for (column of columns; track column.field) {\n <kendo-grid-column [field]=\"column.field\"\n [filter]=\"getFilterType(column)\"\n [title]=\"getDisplayName(column) | pascalCase\"></kendo-grid-column>\n }\n <kendo-grid-pdf-margin top=\"1.5cm\" left=\"1cm\" right=\"1cm\" bottom=\"1.5cm\"></kendo-grid-pdf-margin>\n <ng-template kendoGridPDFTemplate let-pageNum=\"pageNum\" let-totalPages=\"totalPages\">\n <div class=\"page-template\">\n <div class=\"footer\" style=\"position: absolute; bottom: 0; width: 100%; text-align: center; font-size: 9px; color: #666;\">\n {{ getPdfPageText(pageNum, totalPages) }}\n </div>\n </div>\n </ng-template>\n </kendo-grid-pdf>\n</kendo-grid>\n\n<kendo-contextmenu\n #gridmenu\n [kendoMenuHierarchyBinding]=\"_contextMenuItems\"\n [textField]=\"['text']\"\n childrenField=\"items\"\n svgIconField=\"svgIcon\"\n separatorField=\"separator\" (popupClose)=\"onContextMenuClosed($event)\"\n (select)=\"onContextMenuSelect($event)\"\n></kendo-contextmenu>\n", styles: [".status-icons-cell{display:inline-flex;align-items:center;gap:8px}.status-icons-cell .status-icon{display:inline-flex;align-items:center;justify-content:center;cursor:default}.status-icons-cell .status-icon kendo-svg-icon{width:18px;height:18px}:host ::ng-deep .filter-status-item{display:inline-flex;align-items:center;gap:10px}:host ::ng-deep .status-filter-dropdown .k-input-value-text{font-size:0}:host ::ng-deep .status-filter-dropdown .k-input-value-text .filter-status-item,:host ::ng-deep .status-filter-dropdown .k-input-value-text>span{font-size:14px}.cron-expression-cell{display:flex;flex-direction:column;gap:2px}.cron-expression-cell .cron-expression{font-family:Roboto Mono,Consolas,monospace;font-size:.85em;background:var(--mm-cron-code-bg, #eeeeee);color:var(--mm-cron-code-text, #333333);padding:2px 6px;border-radius:3px}.cron-expression-cell .cron-description{font-size:.8em;color:var(--mm-cron-text-secondary, #666666)}:host-context(.k-pdf-export) .k-grid,:host-context(.k-pdf-export) .k-grid-header,:host-context(.k-pdf-export) .k-grid-content,:host-context(.k-pdf-export) .k-grid-header-wrap,:host-context(.k-pdf-export) .k-grid-content-locked,:host-context(.k-pdf-export) .k-grid-header-locked{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border-color:#000!important}:host-context(.k-pdf-export) .k-grid{border:1px solid #000!important;font-family:Arial,sans-serif!important;font-size:10px!important}:host-context(.k-pdf-export) .k-grid-header th,:host-context(.k-pdf-export) .k-header,:host-context(.k-pdf-export) .k-grid th{background:#f0f0f0!important;background-color:#f0f0f0!important;background-image:none!important;color:#000!important;border:1px solid #000!important;font-weight:700!important;padding:6px 8px!important;text-transform:none!important;letter-spacing:normal!important}:host-context(.k-pdf-export) .k-grid td,:host-context(.k-pdf-export) .k-grid-content td,:host-context(.k-pdf-export) .k-master-row td{background:#fff!important;background-color:#fff!important;background-image:none!important;color:#000!important;border:1px solid #000!important;padding:4px 8px!important}:host-context(.k-pdf-export) .k-grid tr,:host-context(.k-pdf-export) .k-master-row,:host-context(.k-pdf-export) .k-alt{background:#fff!important;background-color:#fff!important;background-image:none!important}:host-context(.k-pdf-export) .k-grid tr:hover,:host-context(.k-pdf-export) .k-grid tr.k-selected,:host-context(.k-pdf-export) .k-grid td:hover{background:#fff!important;background-color:#fff!important}:host-context(.k-pdf-export) .k-grid-toolbar,:host-context(.k-pdf-export) .k-pager,:host-context(.k-pdf-export) .k-grid-pager,:host-context(.k-pdf-export) .k-command-cell,:host-context(.k-pdf-export) .k-checkbox-column,:host-context(.k-pdf-export) kendo-grid-checkbox-column,:host-context(.k-pdf-export) .status-icons-cell,:host-context(.k-pdf-export) .status-icon,:host-context(.k-pdf-export) kendo-svg-icon{display:none!important}\n"] }]
|
|
1733
1733
|
}], ctorParameters: () => [], propDecorators: { gridComponent: [{
|
|
1734
1734
|
type: ViewChild,
|
|
1735
1735
|
args: [GridComponent]
|
|
@@ -2494,6 +2494,29 @@ var ImportStrategyDto;
|
|
|
2494
2494
|
ImportStrategyDto[ImportStrategyDto["Upsert"] = 1] = "Upsert";
|
|
2495
2495
|
})(ImportStrategyDto || (ImportStrategyDto = {}));
|
|
2496
2496
|
|
|
2497
|
+
const DEFAULT_ENTITY_SELECT_DIALOG_MESSAGES = {
|
|
2498
|
+
searchPlaceholder: 'Search...',
|
|
2499
|
+
cancelButton: 'Cancel',
|
|
2500
|
+
confirmButton: 'OK',
|
|
2501
|
+
selectedSuffix: 'selected',
|
|
2502
|
+
pagerItemsPerPage: 'items per page',
|
|
2503
|
+
pagerOf: 'of',
|
|
2504
|
+
pagerItems: 'items',
|
|
2505
|
+
pagerPage: 'Page',
|
|
2506
|
+
pagerFirstPage: 'Go to the first page',
|
|
2507
|
+
pagerLastPage: 'Go to the last page',
|
|
2508
|
+
pagerPreviousPage: 'Go to the previous page',
|
|
2509
|
+
pagerNextPage: 'Go to the next page',
|
|
2510
|
+
};
|
|
2511
|
+
const DEFAULT_ENTITY_SELECT_INPUT_MESSAGES = {
|
|
2512
|
+
placeholder: 'Select an entity...',
|
|
2513
|
+
advancedSearchLabel: 'Advanced Search...',
|
|
2514
|
+
dialogTitle: 'Select Entity',
|
|
2515
|
+
noEntitiesFound: 'No entities found for "{0}"',
|
|
2516
|
+
minCharactersHint: 'Type at least {0} characters to search...',
|
|
2517
|
+
selectedSuffix: 'selected',
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2497
2520
|
class EntitySelectDialogComponent {
|
|
2498
2521
|
windowRef = inject(WindowRef);
|
|
2499
2522
|
searchSubject = new Subject();
|
|
@@ -2501,6 +2524,10 @@ class EntitySelectDialogComponent {
|
|
|
2501
2524
|
dataSource;
|
|
2502
2525
|
multiSelect = false;
|
|
2503
2526
|
preSelectedEntities = [];
|
|
2527
|
+
_messages = { ...DEFAULT_ENTITY_SELECT_DIALOG_MESSAGES };
|
|
2528
|
+
set messages(value) {
|
|
2529
|
+
this._messages = { ...DEFAULT_ENTITY_SELECT_DIALOG_MESSAGES, ...value };
|
|
2530
|
+
}
|
|
2504
2531
|
columns = [];
|
|
2505
2532
|
gridData = { data: [], total: 0 };
|
|
2506
2533
|
selectedEntities = [];
|
|
@@ -2629,14 +2656,14 @@ class EntitySelectDialogComponent {
|
|
|
2629
2656
|
this.windowRef.close();
|
|
2630
2657
|
}
|
|
2631
2658
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EntitySelectDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2632
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: EntitySelectDialogComponent, isStandalone: true, selector: "mm-entity-select-dialog", inputs: { dataSource: "dataSource", multiSelect: "multiSelect", preSelectedEntities: "preSelectedEntities" }, ngImport: i0, template: `
|
|
2659
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: EntitySelectDialogComponent, isStandalone: true, selector: "mm-entity-select-dialog", inputs: { dataSource: "dataSource", multiSelect: "multiSelect", preSelectedEntities: "preSelectedEntities", messages: "messages" }, ngImport: i0, template: `
|
|
2633
2660
|
<div class="entity-select-dialog-content">
|
|
2634
2661
|
<div class="search-toolbar">
|
|
2635
2662
|
<kendo-textbox
|
|
2636
2663
|
[style.width.px]="250"
|
|
2637
|
-
placeholder="
|
|
2664
|
+
[placeholder]="_messages.searchPlaceholder"
|
|
2638
2665
|
[value]="searchValue"
|
|
2639
|
-
(valueChange)="onSearchChange($event)">
|
|
2666
|
+
(valueChange)="onSearchChange($event ?? '')">
|
|
2640
2667
|
</kendo-textbox>
|
|
2641
2668
|
</div>
|
|
2642
2669
|
|
|
@@ -2651,6 +2678,17 @@ class EntitySelectDialogComponent {
|
|
|
2651
2678
|
(selectionChange)="onSelectionChange($event)"
|
|
2652
2679
|
class="entity-grid">
|
|
2653
2680
|
|
|
2681
|
+
<kendo-grid-messages
|
|
2682
|
+
[pagerItemsPerPage]="_messages.pagerItemsPerPage"
|
|
2683
|
+
[pagerOf]="_messages.pagerOf"
|
|
2684
|
+
[pagerItems]="_messages.pagerItems"
|
|
2685
|
+
[pagerPage]="_messages.pagerPage"
|
|
2686
|
+
[pagerFirstPage]="_messages.pagerFirstPage"
|
|
2687
|
+
[pagerLastPage]="_messages.pagerLastPage"
|
|
2688
|
+
[pagerPreviousPage]="_messages.pagerPreviousPage"
|
|
2689
|
+
[pagerNextPage]="_messages.pagerNextPage"
|
|
2690
|
+
></kendo-grid-messages>
|
|
2691
|
+
|
|
2654
2692
|
<kendo-grid-checkbox-column
|
|
2655
2693
|
[width]="40"
|
|
2656
2694
|
[showSelectAll]="multiSelect">
|
|
@@ -2665,20 +2703,20 @@ class EntitySelectDialogComponent {
|
|
|
2665
2703
|
</kendo-grid>
|
|
2666
2704
|
|
|
2667
2705
|
<div class="selection-info" *ngIf="selectedEntities.length > 0">
|
|
2668
|
-
{{ selectedEntities.length }}
|
|
2706
|
+
{{ selectedEntities.length }} {{ _messages.selectedSuffix }}
|
|
2669
2707
|
</div>
|
|
2670
2708
|
|
|
2671
2709
|
<div class="dialog-actions">
|
|
2672
|
-
<button kendoButton (click)="onCancel()">
|
|
2710
|
+
<button kendoButton (click)="onCancel()">{{ _messages.cancelButton }}</button>
|
|
2673
2711
|
<button kendoButton
|
|
2674
2712
|
themeColor="primary"
|
|
2675
2713
|
[disabled]="selectedEntities.length === 0"
|
|
2676
2714
|
(click)="onConfirm()">
|
|
2677
|
-
|
|
2715
|
+
{{ _messages.confirmButton }}
|
|
2678
2716
|
</button>
|
|
2679
2717
|
</div>
|
|
2680
2718
|
</div>
|
|
2681
|
-
`, isInline: true, styles: [":host{display:flex;flex-direction:column;height:100%}.entity-select-dialog-content{display:flex;flex-direction:column;flex:1;min-height:0;padding:16px 20px;box-sizing:border-box;gap:12px}.search-toolbar{flex-shrink:0}.entity-grid{flex:1;min-height:200px;border:1px solid var(--kendo-color-border)}.selection-info{padding:8px 0;font-size:12px;color:var(--kendo-color-subtle);flex-shrink:0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonsModule }, { kind: "component", type: i4.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "ngmodule", type: WindowModule }, { kind: "component", type: GridComponent, selector: "kendo-grid", inputs: ["data", "pageSize", "height", "rowHeight", "adaptiveMode", "detailRowHeight", "skip", "scrollable", "selectable", "sort", "size", "trackBy", "filter", "group", "virtualColumns", "filterable", "sortable", "pageable", "groupable", "gridResizable", "rowReorderable", "navigable", "autoSize", "rowClass", "rowSticky", "rowSelected", "isRowSelectable", "cellSelected", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "showInactiveTools", "isDetailExpanded", "isGroupExpanded", "dataLayoutMode"], outputs: ["filterChange", "pageChange", "groupChange", "sortChange", "selectionChange", "rowReorder", "dataStateChange", "gridStateChange", "groupExpand", "groupCollapse", "detailExpand", "detailCollapse", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "csvExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "columnStickyChange", "scrollBottom", "contentScroll"], exportAs: ["kendoGrid"] }, { kind: "component", type: ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterVariant", "filterable", "editable"] }, { kind: "component", type: CheckboxColumnComponent, selector: "kendo-grid-checkbox-column", inputs: ["showSelectAll", "showDisabledCheckbox"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "pipe", type: PascalCasePipe, name: "pascalCase" }] });
|
|
2719
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;height:100%}.entity-select-dialog-content{display:flex;flex-direction:column;flex:1;min-height:0;padding:16px 20px;box-sizing:border-box;gap:12px}.search-toolbar{flex-shrink:0}.entity-grid{flex:1;min-height:200px;border:1px solid var(--kendo-color-border)}.selection-info{padding:8px 0;font-size:12px;color:var(--kendo-color-subtle);flex-shrink:0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: ButtonsModule }, { kind: "component", type: i4.ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "ngmodule", type: WindowModule }, { kind: "component", type: GridComponent, selector: "kendo-grid", inputs: ["data", "pageSize", "height", "rowHeight", "adaptiveMode", "detailRowHeight", "skip", "scrollable", "selectable", "sort", "size", "trackBy", "filter", "group", "virtualColumns", "filterable", "sortable", "pageable", "groupable", "gridResizable", "rowReorderable", "navigable", "autoSize", "rowClass", "rowSticky", "rowSelected", "isRowSelectable", "cellSelected", "resizable", "reorderable", "loading", "columnMenu", "hideHeader", "showInactiveTools", "isDetailExpanded", "isGroupExpanded", "dataLayoutMode"], outputs: ["filterChange", "pageChange", "groupChange", "sortChange", "selectionChange", "rowReorder", "dataStateChange", "gridStateChange", "groupExpand", "groupCollapse", "detailExpand", "detailCollapse", "edit", "cancel", "save", "remove", "add", "cellClose", "cellClick", "pdfExport", "excelExport", "csvExport", "columnResize", "columnReorder", "columnVisibilityChange", "columnLockedChange", "columnStickyChange", "scrollBottom", "contentScroll"], exportAs: ["kendoGrid"] }, { kind: "component", type: ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterVariant", "filterable", "editable"] }, { kind: "component", type: CheckboxColumnComponent, selector: "kendo-grid-checkbox-column", inputs: ["showSelectAll", "showDisabledCheckbox"] }, { kind: "component", type: CustomMessagesComponent, selector: "kendo-grid-messages" }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "pipe", type: PascalCasePipe, name: "pascalCase" }] });
|
|
2682
2720
|
}
|
|
2683
2721
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EntitySelectDialogComponent, decorators: [{
|
|
2684
2722
|
type: Component,
|
|
@@ -2689,6 +2727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2689
2727
|
GridComponent,
|
|
2690
2728
|
ColumnComponent,
|
|
2691
2729
|
CheckboxColumnComponent,
|
|
2730
|
+
CustomMessagesComponent,
|
|
2692
2731
|
TextBoxComponent,
|
|
2693
2732
|
PascalCasePipe
|
|
2694
2733
|
], template: `
|
|
@@ -2696,9 +2735,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2696
2735
|
<div class="search-toolbar">
|
|
2697
2736
|
<kendo-textbox
|
|
2698
2737
|
[style.width.px]="250"
|
|
2699
|
-
placeholder="
|
|
2738
|
+
[placeholder]="_messages.searchPlaceholder"
|
|
2700
2739
|
[value]="searchValue"
|
|
2701
|
-
(valueChange)="onSearchChange($event)">
|
|
2740
|
+
(valueChange)="onSearchChange($event ?? '')">
|
|
2702
2741
|
</kendo-textbox>
|
|
2703
2742
|
</div>
|
|
2704
2743
|
|
|
@@ -2713,6 +2752,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2713
2752
|
(selectionChange)="onSelectionChange($event)"
|
|
2714
2753
|
class="entity-grid">
|
|
2715
2754
|
|
|
2755
|
+
<kendo-grid-messages
|
|
2756
|
+
[pagerItemsPerPage]="_messages.pagerItemsPerPage"
|
|
2757
|
+
[pagerOf]="_messages.pagerOf"
|
|
2758
|
+
[pagerItems]="_messages.pagerItems"
|
|
2759
|
+
[pagerPage]="_messages.pagerPage"
|
|
2760
|
+
[pagerFirstPage]="_messages.pagerFirstPage"
|
|
2761
|
+
[pagerLastPage]="_messages.pagerLastPage"
|
|
2762
|
+
[pagerPreviousPage]="_messages.pagerPreviousPage"
|
|
2763
|
+
[pagerNextPage]="_messages.pagerNextPage"
|
|
2764
|
+
></kendo-grid-messages>
|
|
2765
|
+
|
|
2716
2766
|
<kendo-grid-checkbox-column
|
|
2717
2767
|
[width]="40"
|
|
2718
2768
|
[showSelectAll]="multiSelect">
|
|
@@ -2727,16 +2777,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2727
2777
|
</kendo-grid>
|
|
2728
2778
|
|
|
2729
2779
|
<div class="selection-info" *ngIf="selectedEntities.length > 0">
|
|
2730
|
-
{{ selectedEntities.length }}
|
|
2780
|
+
{{ selectedEntities.length }} {{ _messages.selectedSuffix }}
|
|
2731
2781
|
</div>
|
|
2732
2782
|
|
|
2733
2783
|
<div class="dialog-actions">
|
|
2734
|
-
<button kendoButton (click)="onCancel()">
|
|
2784
|
+
<button kendoButton (click)="onCancel()">{{ _messages.cancelButton }}</button>
|
|
2735
2785
|
<button kendoButton
|
|
2736
2786
|
themeColor="primary"
|
|
2737
2787
|
[disabled]="selectedEntities.length === 0"
|
|
2738
2788
|
(click)="onConfirm()">
|
|
2739
|
-
|
|
2789
|
+
{{ _messages.confirmButton }}
|
|
2740
2790
|
</button>
|
|
2741
2791
|
</div>
|
|
2742
2792
|
</div>
|
|
@@ -2747,6 +2797,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2747
2797
|
type: Input
|
|
2748
2798
|
}], preSelectedEntities: [{
|
|
2749
2799
|
type: Input
|
|
2800
|
+
}], messages: [{
|
|
2801
|
+
type: Input
|
|
2750
2802
|
}] } });
|
|
2751
2803
|
|
|
2752
2804
|
class EntitySelectDialogService {
|
|
@@ -2772,6 +2824,9 @@ class EntitySelectDialogService {
|
|
|
2772
2824
|
contentRef.instance.dataSource = dataSource;
|
|
2773
2825
|
contentRef.instance.multiSelect = options.multiSelect ?? false;
|
|
2774
2826
|
contentRef.instance.preSelectedEntities = options.selectedEntities ?? [];
|
|
2827
|
+
if (options.messages) {
|
|
2828
|
+
contentRef.instance.messages = options.messages;
|
|
2829
|
+
}
|
|
2775
2830
|
}
|
|
2776
2831
|
const result = await firstValueFrom(windowRef.result);
|
|
2777
2832
|
if (result instanceof WindowCloseResult) {
|
|
@@ -2794,7 +2849,7 @@ class EntitySelectInputComponent {
|
|
|
2794
2849
|
// Inputs
|
|
2795
2850
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic component accepts any entity type
|
|
2796
2851
|
dataSource;
|
|
2797
|
-
placeholder = '
|
|
2852
|
+
placeholder = '';
|
|
2798
2853
|
minSearchLength = 3;
|
|
2799
2854
|
maxResults = 50;
|
|
2800
2855
|
debounceMs = 300;
|
|
@@ -2802,9 +2857,16 @@ class EntitySelectInputComponent {
|
|
|
2802
2857
|
// Dialog inputs
|
|
2803
2858
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- generic component accepts any entity type
|
|
2804
2859
|
dialogDataSource;
|
|
2805
|
-
dialogTitle = '
|
|
2860
|
+
dialogTitle = '';
|
|
2806
2861
|
multiSelect = false;
|
|
2807
|
-
advancedSearchLabel = '
|
|
2862
|
+
advancedSearchLabel = '';
|
|
2863
|
+
// Dialog messages (passed through to the dialog component)
|
|
2864
|
+
dialogMessages;
|
|
2865
|
+
// Messages
|
|
2866
|
+
_messages = { ...DEFAULT_ENTITY_SELECT_INPUT_MESSAGES };
|
|
2867
|
+
set messages(value) {
|
|
2868
|
+
this._messages = { ...DEFAULT_ENTITY_SELECT_INPUT_MESSAGES, ...value };
|
|
2869
|
+
}
|
|
2808
2870
|
_disabled = false;
|
|
2809
2871
|
get disabled() {
|
|
2810
2872
|
return this._disabled;
|
|
@@ -2848,6 +2910,9 @@ class EntitySelectInputComponent {
|
|
|
2848
2910
|
// Injected dependencies
|
|
2849
2911
|
elRef = inject(ElementRef);
|
|
2850
2912
|
dialogService = inject(EntitySelectDialogService, { optional: true });
|
|
2913
|
+
formatMessage(template, ...args) {
|
|
2914
|
+
return template.replace(/\{(\d+)\}/g, (_, index) => String(args[+index] ?? ''));
|
|
2915
|
+
}
|
|
2851
2916
|
ngOnInit() {
|
|
2852
2917
|
this.setupSearch();
|
|
2853
2918
|
}
|
|
@@ -3008,9 +3073,10 @@ class EntitySelectInputComponent {
|
|
|
3008
3073
|
// Close the autocomplete dropdown
|
|
3009
3074
|
this.autocomplete.toggle(false);
|
|
3010
3075
|
const result = await this.dialogService.open(this.dialogDataSource, {
|
|
3011
|
-
title: this.dialogTitle,
|
|
3076
|
+
title: this.dialogTitle || this._messages.dialogTitle,
|
|
3012
3077
|
multiSelect: this.multiSelect,
|
|
3013
|
-
selectedEntities: this.selectedEntity ? [this.selectedEntity] : []
|
|
3078
|
+
selectedEntities: this.selectedEntity ? [this.selectedEntity] : [],
|
|
3079
|
+
messages: this.dialogMessages,
|
|
3014
3080
|
});
|
|
3015
3081
|
if (result && result.selectedEntities.length > 0) {
|
|
3016
3082
|
if (this.multiSelect) {
|
|
@@ -3022,7 +3088,7 @@ class EntitySelectInputComponent {
|
|
|
3022
3088
|
}
|
|
3023
3089
|
else {
|
|
3024
3090
|
// Multiple selected - update display to show count
|
|
3025
|
-
const displayText = `${result.selectedEntities.length}
|
|
3091
|
+
const displayText = `${result.selectedEntities.length} ${this._messages.selectedSuffix}`;
|
|
3026
3092
|
this.searchFormControl.setValue(displayText, { emitEvent: false });
|
|
3027
3093
|
this.selectedEntity = result.selectedEntities;
|
|
3028
3094
|
this.onChange(result.selectedEntities);
|
|
@@ -3035,7 +3101,7 @@ class EntitySelectInputComponent {
|
|
|
3035
3101
|
}
|
|
3036
3102
|
}
|
|
3037
3103
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: EntitySelectInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3038
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: EntitySelectInputComponent, isStandalone: true, selector: "mm-entity-select-input", inputs: { dataSource: "dataSource", placeholder: "placeholder", minSearchLength: "minSearchLength", maxResults: "maxResults", debounceMs: "debounceMs", prefix: "prefix", dialogDataSource: "dialogDataSource", dialogTitle: "dialogTitle", multiSelect: "multiSelect", advancedSearchLabel: "advancedSearchLabel", disabled: "disabled", required: "required" }, outputs: { entitySelected: "entitySelected", entityCleared: "entityCleared", entitiesSelected: "entitiesSelected" }, providers: [
|
|
3104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: EntitySelectInputComponent, isStandalone: true, selector: "mm-entity-select-input", inputs: { dataSource: "dataSource", placeholder: "placeholder", minSearchLength: "minSearchLength", maxResults: "maxResults", debounceMs: "debounceMs", prefix: "prefix", dialogDataSource: "dialogDataSource", dialogTitle: "dialogTitle", multiSelect: "multiSelect", advancedSearchLabel: "advancedSearchLabel", dialogMessages: "dialogMessages", messages: "messages", disabled: "disabled", required: "required" }, outputs: { entitySelected: "entitySelected", entityCleared: "entityCleared", entitiesSelected: "entitiesSelected" }, providers: [
|
|
3039
3105
|
{
|
|
3040
3106
|
provide: NG_VALUE_ACCESSOR,
|
|
3041
3107
|
useExisting: forwardRef(() => EntitySelectInputComponent),
|
|
@@ -3054,7 +3120,7 @@ class EntitySelectInputComponent {
|
|
|
3054
3120
|
[data]="filteredEntities"
|
|
3055
3121
|
[loading]="isLoading"
|
|
3056
3122
|
[disabled]="disabled"
|
|
3057
|
-
[placeholder]="placeholder"
|
|
3123
|
+
[placeholder]="placeholder || _messages.placeholder"
|
|
3058
3124
|
[suggest]="true"
|
|
3059
3125
|
[clearButton]="true"
|
|
3060
3126
|
[filterable]="true"
|
|
@@ -3075,10 +3141,10 @@ class EntitySelectInputComponent {
|
|
|
3075
3141
|
<ng-template kendoAutoCompleteNoDataTemplate>
|
|
3076
3142
|
<div class="no-data-message">
|
|
3077
3143
|
<span *ngIf="!isLoading && searchFormControl.value && searchFormControl.value.length >= minSearchLength">
|
|
3078
|
-
|
|
3144
|
+
{{ formatMessage(_messages.noEntitiesFound, searchFormControl.value) }}
|
|
3079
3145
|
</span>
|
|
3080
3146
|
<span *ngIf="!isLoading && (!searchFormControl.value || searchFormControl.value.length < minSearchLength)">
|
|
3081
|
-
|
|
3147
|
+
{{ formatMessage(_messages.minCharactersHint, minSearchLength) }}
|
|
3082
3148
|
</span>
|
|
3083
3149
|
</div>
|
|
3084
3150
|
</ng-template>
|
|
@@ -3087,7 +3153,7 @@ class EntitySelectInputComponent {
|
|
|
3087
3153
|
<ng-template kendoAutoCompleteFooterTemplate *ngIf="dialogDataSource">
|
|
3088
3154
|
<div class="advanced-search-footer" (click)="openAdvancedSearch($event)">
|
|
3089
3155
|
<kendo-svg-icon [icon]="searchIcon" size="small"></kendo-svg-icon>
|
|
3090
|
-
<span>{{ advancedSearchLabel }}</span>
|
|
3156
|
+
<span>{{ advancedSearchLabel || _messages.advancedSearchLabel }}</span>
|
|
3091
3157
|
</div>
|
|
3092
3158
|
</ng-template>
|
|
3093
3159
|
|
|
@@ -3099,7 +3165,7 @@ class EntitySelectInputComponent {
|
|
|
3099
3165
|
type="button"
|
|
3100
3166
|
[svgIcon]="searchIcon"
|
|
3101
3167
|
[disabled]="disabled"
|
|
3102
|
-
[title]="advancedSearchLabel"
|
|
3168
|
+
[title]="advancedSearchLabel || _messages.advancedSearchLabel"
|
|
3103
3169
|
class="dialog-button"
|
|
3104
3170
|
(click)="openAdvancedSearch()">
|
|
3105
3171
|
</button>
|
|
@@ -3135,7 +3201,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3135
3201
|
[data]="filteredEntities"
|
|
3136
3202
|
[loading]="isLoading"
|
|
3137
3203
|
[disabled]="disabled"
|
|
3138
|
-
[placeholder]="placeholder"
|
|
3204
|
+
[placeholder]="placeholder || _messages.placeholder"
|
|
3139
3205
|
[suggest]="true"
|
|
3140
3206
|
[clearButton]="true"
|
|
3141
3207
|
[filterable]="true"
|
|
@@ -3156,10 +3222,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3156
3222
|
<ng-template kendoAutoCompleteNoDataTemplate>
|
|
3157
3223
|
<div class="no-data-message">
|
|
3158
3224
|
<span *ngIf="!isLoading && searchFormControl.value && searchFormControl.value.length >= minSearchLength">
|
|
3159
|
-
|
|
3225
|
+
{{ formatMessage(_messages.noEntitiesFound, searchFormControl.value) }}
|
|
3160
3226
|
</span>
|
|
3161
3227
|
<span *ngIf="!isLoading && (!searchFormControl.value || searchFormControl.value.length < minSearchLength)">
|
|
3162
|
-
|
|
3228
|
+
{{ formatMessage(_messages.minCharactersHint, minSearchLength) }}
|
|
3163
3229
|
</span>
|
|
3164
3230
|
</div>
|
|
3165
3231
|
</ng-template>
|
|
@@ -3168,7 +3234,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3168
3234
|
<ng-template kendoAutoCompleteFooterTemplate *ngIf="dialogDataSource">
|
|
3169
3235
|
<div class="advanced-search-footer" (click)="openAdvancedSearch($event)">
|
|
3170
3236
|
<kendo-svg-icon [icon]="searchIcon" size="small"></kendo-svg-icon>
|
|
3171
|
-
<span>{{ advancedSearchLabel }}</span>
|
|
3237
|
+
<span>{{ advancedSearchLabel || _messages.advancedSearchLabel }}</span>
|
|
3172
3238
|
</div>
|
|
3173
3239
|
</ng-template>
|
|
3174
3240
|
|
|
@@ -3180,7 +3246,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3180
3246
|
type="button"
|
|
3181
3247
|
[svgIcon]="searchIcon"
|
|
3182
3248
|
[disabled]="disabled"
|
|
3183
|
-
[title]="advancedSearchLabel"
|
|
3249
|
+
[title]="advancedSearchLabel || _messages.advancedSearchLabel"
|
|
3184
3250
|
class="dialog-button"
|
|
3185
3251
|
(click)="openAdvancedSearch()">
|
|
3186
3252
|
</button>
|
|
@@ -3209,6 +3275,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3209
3275
|
type: Input
|
|
3210
3276
|
}], advancedSearchLabel: [{
|
|
3211
3277
|
type: Input
|
|
3278
|
+
}], dialogMessages: [{
|
|
3279
|
+
type: Input
|
|
3280
|
+
}], messages: [{
|
|
3281
|
+
type: Input
|
|
3212
3282
|
}], disabled: [{
|
|
3213
3283
|
type: Input
|
|
3214
3284
|
}], required: [{
|
|
@@ -3594,13 +3664,17 @@ const DEFAULT_TIME_RANGE_LABELS = {
|
|
|
3594
3664
|
year: 'Year',
|
|
3595
3665
|
quarter: 'Quarter',
|
|
3596
3666
|
month: 'Month',
|
|
3667
|
+
day: 'Day',
|
|
3597
3668
|
relativeValue: 'Last',
|
|
3598
3669
|
relativeUnit: 'Unit',
|
|
3670
|
+
hourFrom: 'From Hour',
|
|
3671
|
+
hourTo: 'To Hour',
|
|
3599
3672
|
customFrom: 'From',
|
|
3600
3673
|
customTo: 'To',
|
|
3601
3674
|
typeYear: 'Year',
|
|
3602
3675
|
typeQuarter: 'Quarter',
|
|
3603
3676
|
typeMonth: 'Month',
|
|
3677
|
+
typeDay: 'Day',
|
|
3604
3678
|
typeRelative: 'Relative',
|
|
3605
3679
|
typeCustom: 'Custom',
|
|
3606
3680
|
unitHours: 'Hours',
|
|
@@ -3647,6 +3721,23 @@ class TimeRangeUtils {
|
|
|
3647
3721
|
to: new Date(year, month + 1, 1, 0, 0, 0, 0)
|
|
3648
3722
|
};
|
|
3649
3723
|
}
|
|
3724
|
+
/**
|
|
3725
|
+
* Calculate time range for a specific day.
|
|
3726
|
+
* Uses exclusive end boundary (start of next day) for correct LESS_THAN filtering.
|
|
3727
|
+
* Optionally filters to a specific hour range within the day.
|
|
3728
|
+
* @param hourFrom Start hour (0-23), defaults to 0
|
|
3729
|
+
* @param hourTo End hour (1-24, exclusive), defaults to 24 (= next day 00:00)
|
|
3730
|
+
*/
|
|
3731
|
+
static getDayRange(year, month, day, hourFrom, hourTo) {
|
|
3732
|
+
const fromHour = hourFrom ?? 0;
|
|
3733
|
+
const toHour = hourTo ?? 24;
|
|
3734
|
+
return {
|
|
3735
|
+
from: new Date(Date.UTC(year, month, day, fromHour, 0, 0, 0)),
|
|
3736
|
+
to: toHour === 24
|
|
3737
|
+
? new Date(Date.UTC(year, month, day + 1, 0, 0, 0, 0))
|
|
3738
|
+
: new Date(Date.UTC(year, month, day, toHour, 0, 0, 0))
|
|
3739
|
+
};
|
|
3740
|
+
}
|
|
3650
3741
|
/**
|
|
3651
3742
|
* Calculate time range relative to now
|
|
3652
3743
|
*/
|
|
@@ -3670,9 +3761,12 @@ class TimeRangeUtils {
|
|
|
3670
3761
|
return { from, to: now };
|
|
3671
3762
|
}
|
|
3672
3763
|
/**
|
|
3673
|
-
* Calculate time range from selection
|
|
3764
|
+
* Calculate time range from selection.
|
|
3765
|
+
* @param selection The current selection state
|
|
3766
|
+
* @param showTime If false (default), custom date ranges are normalized to full-day boundaries
|
|
3767
|
+
* with exclusive end (from: 00:00:00 UTC, to: start of next day 00:00:00 UTC)
|
|
3674
3768
|
*/
|
|
3675
|
-
static getTimeRangeFromSelection(selection) {
|
|
3769
|
+
static getTimeRangeFromSelection(selection, showTime = false) {
|
|
3676
3770
|
switch (selection.type) {
|
|
3677
3771
|
case 'year':
|
|
3678
3772
|
if (selection.year) {
|
|
@@ -3689,6 +3783,11 @@ class TimeRangeUtils {
|
|
|
3689
3783
|
return this.getMonthRange(selection.year, selection.month);
|
|
3690
3784
|
}
|
|
3691
3785
|
break;
|
|
3786
|
+
case 'day':
|
|
3787
|
+
if (selection.year && selection.month !== undefined && selection.day !== undefined) {
|
|
3788
|
+
return this.getDayRange(selection.year, selection.month, selection.day, selection.hourFrom, selection.hourTo);
|
|
3789
|
+
}
|
|
3790
|
+
break;
|
|
3692
3791
|
case 'relative':
|
|
3693
3792
|
if (selection.relativeValue && selection.relativeUnit) {
|
|
3694
3793
|
return this.getRelativeRange(selection.relativeValue, selection.relativeUnit);
|
|
@@ -3696,10 +3795,20 @@ class TimeRangeUtils {
|
|
|
3696
3795
|
break;
|
|
3697
3796
|
case 'custom':
|
|
3698
3797
|
if (selection.customFrom && selection.customTo) {
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3798
|
+
if (showTime) {
|
|
3799
|
+
// Keep the user-selected time as-is
|
|
3800
|
+
return {
|
|
3801
|
+
from: selection.customFrom,
|
|
3802
|
+
to: selection.customTo
|
|
3803
|
+
};
|
|
3804
|
+
}
|
|
3805
|
+
// Normalize to full-day boundaries in UTC (exclusive end, like year/quarter/month)
|
|
3806
|
+
const from = new Date(selection.customFrom);
|
|
3807
|
+
from.setUTCHours(0, 0, 0, 0);
|
|
3808
|
+
const to = new Date(selection.customTo);
|
|
3809
|
+
to.setUTCHours(0, 0, 0, 0);
|
|
3810
|
+
to.setUTCDate(to.getUTCDate() + 1);
|
|
3811
|
+
return { from, to };
|
|
3703
3812
|
}
|
|
3704
3813
|
break;
|
|
3705
3814
|
}
|
|
@@ -3799,8 +3908,11 @@ class TimeRangePickerComponent {
|
|
|
3799
3908
|
selectedYear = signal(new Date().getFullYear(), ...(ngDevMode ? [{ debugName: "selectedYear" }] : []));
|
|
3800
3909
|
selectedQuarter = signal(TimeRangeUtils.getCurrentQuarter(), ...(ngDevMode ? [{ debugName: "selectedQuarter" }] : []));
|
|
3801
3910
|
selectedMonth = signal(new Date().getMonth(), ...(ngDevMode ? [{ debugName: "selectedMonth" }] : []));
|
|
3911
|
+
selectedDay = signal(new Date().getDate(), ...(ngDevMode ? [{ debugName: "selectedDay" }] : []));
|
|
3802
3912
|
relativeValue = signal(24, ...(ngDevMode ? [{ debugName: "relativeValue" }] : []));
|
|
3803
3913
|
relativeUnit = signal('hours', ...(ngDevMode ? [{ debugName: "relativeUnit" }] : []));
|
|
3914
|
+
hourFrom = signal(null, ...(ngDevMode ? [{ debugName: "hourFrom" }] : []));
|
|
3915
|
+
hourTo = signal(null, ...(ngDevMode ? [{ debugName: "hourTo" }] : []));
|
|
3804
3916
|
customFrom = signal(new Date(), ...(ngDevMode ? [{ debugName: "customFrom" }] : []));
|
|
3805
3917
|
customTo = signal(new Date(), ...(ngDevMode ? [{ debugName: "customTo" }] : []));
|
|
3806
3918
|
// Merged labels with defaults
|
|
@@ -3814,6 +3926,7 @@ class TimeRangePickerComponent {
|
|
|
3814
3926
|
{ value: 'year', label: this.mergedLabels().typeYear || 'Year' },
|
|
3815
3927
|
{ value: 'quarter', label: this.mergedLabels().typeQuarter || 'Quarter' },
|
|
3816
3928
|
{ value: 'month', label: this.mergedLabels().typeMonth || 'Month' },
|
|
3929
|
+
{ value: 'day', label: this.mergedLabels().typeDay || 'Day' },
|
|
3817
3930
|
{ value: 'relative', label: this.mergedLabels().typeRelative || 'Relative' },
|
|
3818
3931
|
{ value: 'custom', label: this.mergedLabels().typeCustom || 'Custom' }
|
|
3819
3932
|
];
|
|
@@ -3831,6 +3944,34 @@ class TimeRangePickerComponent {
|
|
|
3831
3944
|
}, ...(ngDevMode ? [{ debugName: "yearOptions" }] : []));
|
|
3832
3945
|
quarterOptions = computed(() => TimeRangeUtils.generateQuarterOptions(this.mergedLabels()), ...(ngDevMode ? [{ debugName: "quarterOptions" }] : []));
|
|
3833
3946
|
monthOptions = computed(() => TimeRangeUtils.generateMonthOptions(), ...(ngDevMode ? [{ debugName: "monthOptions" }] : []));
|
|
3947
|
+
dayOptions = computed(() => {
|
|
3948
|
+
const year = this.selectedYear();
|
|
3949
|
+
const month = this.selectedMonth();
|
|
3950
|
+
// Get number of days in the selected month
|
|
3951
|
+
const daysInMonth = new Date(year, month + 1, 0).getDate();
|
|
3952
|
+
const options = [];
|
|
3953
|
+
for (let d = 1; d <= daysInMonth; d++) {
|
|
3954
|
+
options.push({ value: d, label: d.toString() });
|
|
3955
|
+
}
|
|
3956
|
+
return options;
|
|
3957
|
+
}, ...(ngDevMode ? [{ debugName: "dayOptions" }] : []));
|
|
3958
|
+
hourFromOptions = computed(() => {
|
|
3959
|
+
const options = [];
|
|
3960
|
+
for (let h = 0; h <= 23; h++) {
|
|
3961
|
+
options.push({ value: h, label: h.toString().padStart(2, '0') + ':00' });
|
|
3962
|
+
}
|
|
3963
|
+
return options;
|
|
3964
|
+
}, ...(ngDevMode ? [{ debugName: "hourFromOptions" }] : []));
|
|
3965
|
+
hourToOptions = computed(() => {
|
|
3966
|
+
const fromHour = this.hourFrom();
|
|
3967
|
+
const minHour = fromHour !== null ? fromHour + 1 : 1;
|
|
3968
|
+
const options = [];
|
|
3969
|
+
for (let h = minHour; h <= 24; h++) {
|
|
3970
|
+
const label = h === 24 ? '24:00' : h.toString().padStart(2, '0') + ':00';
|
|
3971
|
+
options.push({ value: h, label });
|
|
3972
|
+
}
|
|
3973
|
+
return options;
|
|
3974
|
+
}, ...(ngDevMode ? [{ debugName: "hourToOptions" }] : []));
|
|
3834
3975
|
relativeUnitOptions = computed(() => [
|
|
3835
3976
|
{ value: 'hours', label: this.mergedLabels().unitHours || 'Hours' },
|
|
3836
3977
|
{ value: 'days', label: this.mergedLabels().unitDays || 'Days' },
|
|
@@ -3844,12 +3985,15 @@ class TimeRangePickerComponent {
|
|
|
3844
3985
|
year: this.selectedYear(),
|
|
3845
3986
|
quarter: this.selectedQuarter(),
|
|
3846
3987
|
month: this.selectedMonth(),
|
|
3988
|
+
day: this.selectedDay(),
|
|
3989
|
+
hourFrom: this.hourFrom() ?? undefined,
|
|
3990
|
+
hourTo: this.hourTo() ?? undefined,
|
|
3847
3991
|
relativeValue: this.relativeValue(),
|
|
3848
3992
|
relativeUnit: this.relativeUnit(),
|
|
3849
3993
|
customFrom: this.customFrom(),
|
|
3850
3994
|
customTo: this.customTo()
|
|
3851
3995
|
};
|
|
3852
|
-
return TimeRangeUtils.getTimeRangeFromSelection(selection);
|
|
3996
|
+
return TimeRangeUtils.getTimeRangeFromSelection(selection, this.config.showTime ?? false);
|
|
3853
3997
|
}, ...(ngDevMode ? [{ debugName: "currentRange" }] : []));
|
|
3854
3998
|
// Min/Max dates for custom picker
|
|
3855
3999
|
minDate = computed(() => this.config.minDate ?? new Date(1900, 0, 1), ...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
@@ -3878,6 +4022,7 @@ class TimeRangePickerComponent {
|
|
|
3878
4022
|
const currentMonth = new Date().getMonth();
|
|
3879
4023
|
this.selectedYear.set(currentYear);
|
|
3880
4024
|
this.selectedMonth.set(currentMonth);
|
|
4025
|
+
this.selectedDay.set(new Date().getDate());
|
|
3881
4026
|
this.selectedQuarter.set(TimeRangeUtils.getCurrentQuarter());
|
|
3882
4027
|
this.relativeValue.set(this.config.defaultRelativeValue ?? 24);
|
|
3883
4028
|
this.relativeUnit.set(this.config.defaultRelativeUnit ?? 'hours');
|
|
@@ -3904,6 +4049,11 @@ class TimeRangePickerComponent {
|
|
|
3904
4049
|
if (selection.month !== undefined) {
|
|
3905
4050
|
this.selectedMonth.set(selection.month);
|
|
3906
4051
|
}
|
|
4052
|
+
if (selection.day !== undefined) {
|
|
4053
|
+
this.selectedDay.set(selection.day);
|
|
4054
|
+
}
|
|
4055
|
+
this.hourFrom.set(selection.hourFrom ?? null);
|
|
4056
|
+
this.hourTo.set(selection.hourTo ?? null);
|
|
3907
4057
|
if (selection.relativeValue !== undefined) {
|
|
3908
4058
|
this.relativeValue.set(selection.relativeValue);
|
|
3909
4059
|
}
|
|
@@ -3920,6 +4070,10 @@ class TimeRangePickerComponent {
|
|
|
3920
4070
|
// Event handlers
|
|
3921
4071
|
onTypeChange(type) {
|
|
3922
4072
|
this.selectedType.set(type);
|
|
4073
|
+
if (type !== 'day') {
|
|
4074
|
+
this.hourFrom.set(null);
|
|
4075
|
+
this.hourTo.set(null);
|
|
4076
|
+
}
|
|
3923
4077
|
this.emitChange();
|
|
3924
4078
|
}
|
|
3925
4079
|
onYearChange(year) {
|
|
@@ -3932,6 +4086,40 @@ class TimeRangePickerComponent {
|
|
|
3932
4086
|
}
|
|
3933
4087
|
onMonthChange(month) {
|
|
3934
4088
|
this.selectedMonth.set(month);
|
|
4089
|
+
// Clamp day to valid range for the new month
|
|
4090
|
+
const daysInMonth = new Date(this.selectedYear(), month + 1, 0).getDate();
|
|
4091
|
+
if (this.selectedDay() > daysInMonth) {
|
|
4092
|
+
this.selectedDay.set(daysInMonth);
|
|
4093
|
+
}
|
|
4094
|
+
this.emitChange();
|
|
4095
|
+
}
|
|
4096
|
+
onDayChange(day) {
|
|
4097
|
+
this.selectedDay.set(day);
|
|
4098
|
+
this.emitChange();
|
|
4099
|
+
}
|
|
4100
|
+
onHourFromChange(hour) {
|
|
4101
|
+
this.hourFrom.set(hour);
|
|
4102
|
+
// If hourTo is less than or equal to hourFrom, adjust it
|
|
4103
|
+
if (hour !== null && this.hourTo() !== null && this.hourTo() <= hour) {
|
|
4104
|
+
this.hourTo.set(hour + 1);
|
|
4105
|
+
}
|
|
4106
|
+
// If hourFrom is set but hourTo is not, default hourTo to hourFrom + 1
|
|
4107
|
+
if (hour !== null && this.hourTo() === null) {
|
|
4108
|
+
this.hourTo.set(hour + 1);
|
|
4109
|
+
}
|
|
4110
|
+
// If hourFrom is cleared, also clear hourTo
|
|
4111
|
+
if (hour === null) {
|
|
4112
|
+
this.hourTo.set(null);
|
|
4113
|
+
}
|
|
4114
|
+
this.emitChange();
|
|
4115
|
+
}
|
|
4116
|
+
onHourToChange(hour) {
|
|
4117
|
+
this.hourTo.set(hour);
|
|
4118
|
+
this.emitChange();
|
|
4119
|
+
}
|
|
4120
|
+
clearHourFilter() {
|
|
4121
|
+
this.hourFrom.set(null);
|
|
4122
|
+
this.hourTo.set(null);
|
|
3935
4123
|
this.emitChange();
|
|
3936
4124
|
}
|
|
3937
4125
|
onRelativeValueChange(value) {
|
|
@@ -3961,6 +4149,9 @@ class TimeRangePickerComponent {
|
|
|
3961
4149
|
year: this.selectedYear(),
|
|
3962
4150
|
quarter: this.selectedQuarter(),
|
|
3963
4151
|
month: this.selectedMonth(),
|
|
4152
|
+
day: this.selectedDay(),
|
|
4153
|
+
hourFrom: this.hourFrom() ?? undefined,
|
|
4154
|
+
hourTo: this.hourTo() ?? undefined,
|
|
3964
4155
|
relativeValue: this.relativeValue(),
|
|
3965
4156
|
relativeUnit: this.relativeUnit(),
|
|
3966
4157
|
customFrom: this.customFrom(),
|
|
@@ -3973,7 +4164,7 @@ class TimeRangePickerComponent {
|
|
|
3973
4164
|
return this.selectedType() === type;
|
|
3974
4165
|
}
|
|
3975
4166
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: TimeRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3976
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: TimeRangePickerComponent, isStandalone: true, selector: "mm-time-range-picker", inputs: { config: "config", labels: "labels", initialSelection: "initialSelection" }, outputs: { rangeChange: "rangeChange", rangeChangeISO: "rangeChangeISO", selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"time-range-picker\">\n <!-- Range Type Selection -->\n <div class=\"picker-field type-field\">\n <kendo-label [text]=\"mergedLabels().rangeType || 'Range Type'\">\n <kendo-dropdownlist\n [data]=\"typeOptions()\"\n [value]=\"selectedType()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onTypeChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Year Selection (for year, quarter, month types) -->\n @if (isType('year') || isType('quarter') || isType('month')) {\n <div class=\"picker-field year-field\">\n <kendo-label [text]=\"mergedLabels().year || 'Year'\">\n <kendo-dropdownlist\n [data]=\"yearOptions()\"\n [value]=\"selectedYear()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onYearChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Quarter Selection -->\n @if (isType('quarter')) {\n <div class=\"picker-field quarter-field\">\n <kendo-label [text]=\"mergedLabels().quarter || 'Quarter'\">\n <kendo-dropdownlist\n [data]=\"quarterOptions()\"\n [value]=\"selectedQuarter()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onQuarterChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Month Selection -->\n @if (isType('month')) {\n <div class=\"picker-field month-field\">\n <kendo-label [text]=\"mergedLabels().month || 'Month'\">\n <kendo-dropdownlist\n [data]=\"monthOptions()\"\n [value]=\"selectedMonth()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onMonthChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Relative Time Selection -->\n @if (isType('relative')) {\n <div class=\"picker-field relative-value-field\">\n <kendo-label [text]=\"mergedLabels().relativeValue || 'Last'\">\n <kendo-numerictextbox\n [value]=\"relativeValue()\"\n [min]=\"1\"\n [max]=\"9999\"\n [decimals]=\"0\"\n [format]=\"'n0'\"\n [spinners]=\"true\"\n (valueChange)=\"onRelativeValueChange($event)\">\n </kendo-numerictextbox>\n </kendo-label>\n </div>\n\n <div class=\"picker-field relative-unit-field\">\n <kendo-label [text]=\"mergedLabels().relativeUnit || 'Unit'\">\n <kendo-dropdownlist\n [data]=\"relativeUnitOptions()\"\n [value]=\"relativeUnit()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onRelativeUnitChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Custom Date Range -->\n @if (isType('custom')) {\n <div class=\"picker-field custom-from-field\">\n <kendo-label [text]=\"mergedLabels().customFrom || 'From'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n\n <div class=\"picker-field custom-to-field\">\n <kendo-label [text]=\"mergedLabels().customTo || 'To'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n }\n</div>\n", styles: [".time-range-picker{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-end}.time-range-picker .picker-field{display:flex;flex-direction:column}.time-range-picker .picker-field kendo-label{display:flex;flex-direction:column;gap:.25rem}.time-range-picker .type-field{min-width:120px}.time-range-picker .year-field{min-width:100px}.time-range-picker .quarter-field{min-width:140px}.time-range-picker .month-field{min-width:130px}.time-range-picker .relative-value-field{min-width:80px}.time-range-picker .relative-value-field kendo-numerictextbox{width:100%}.time-range-picker .relative-unit-field{min-width:100px}.time-range-picker .custom-from-field,.time-range-picker .custom-to-field{min-width:150px}.time-range-picker .custom-from-field kendo-datepicker,.time-range-picker .custom-from-field kendo-datetimepicker,.time-range-picker .custom-to-field kendo-datepicker,.time-range-picker .custom-to-field kendo-datetimepicker{width:100%}@media(max-width:768px){.time-range-picker{gap:.75rem}.time-range-picker .picker-field{flex:1 1 calc(50% - .5rem);min-width:0}.time-range-picker .type-field{flex:1 1 100%}}@media(max-width:480px){.time-range-picker{flex-direction:column;gap:.5rem}.time-range-picker .picker-field{flex:1 1 100%;width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: DropDownListModule }, { kind: "component", type: i3$1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$1.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i2$1.DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: ["focusableId", "weekDaysFormat", "showOtherMonthDays", "value", "format", "twoDigitYearMax", "tabindex", "disabledDates", "popupSettings", "adaptiveTitle", "adaptiveSubtitle", "disabled", "readonly", "readOnlyInput", "cancelButton", "formatPlaceholder", "placeholder", "steps", "focusedDate", "calendarType", "animateCalendarNavigation", "weekNumber", "min", "max", "rangeValidation", "disabledDatesValidation", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "clearButton", "autoFill", "adaptiveMode", "inputAttributes", "defaultTab", "size", "rounded", "fillMode", "headerTemplate", "footerTemplate", "footer"], outputs: ["valueChange", "open", "close", "focus", "blur", "escape"], exportAs: ["kendo-datetimepicker"] }, { kind: "ngmodule", type: NumericTextBoxModule }, { kind: "component", type: i5.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "ngmodule", type: LabelModule }, { kind: "component", type: i6.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }] });
|
|
4167
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: TimeRangePickerComponent, isStandalone: true, selector: "mm-time-range-picker", inputs: { config: "config", labels: "labels", initialSelection: "initialSelection" }, outputs: { rangeChange: "rangeChange", rangeChangeISO: "rangeChangeISO", selectionChange: "selectionChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"time-range-picker\">\n <!-- Range Type Selection -->\n <div class=\"picker-field type-field\">\n <kendo-label [text]=\"mergedLabels().rangeType || 'Range Type'\">\n <kendo-dropdownlist\n [data]=\"typeOptions()\"\n [value]=\"selectedType()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onTypeChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Year Selection (for year, quarter, month, day types) -->\n @if (isType('year') || isType('quarter') || isType('month') || isType('day')) {\n <div class=\"picker-field year-field\">\n <kendo-label [text]=\"mergedLabels().year || 'Year'\">\n <kendo-dropdownlist\n [data]=\"yearOptions()\"\n [value]=\"selectedYear()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onYearChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Quarter Selection -->\n @if (isType('quarter')) {\n <div class=\"picker-field quarter-field\">\n <kendo-label [text]=\"mergedLabels().quarter || 'Quarter'\">\n <kendo-dropdownlist\n [data]=\"quarterOptions()\"\n [value]=\"selectedQuarter()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onQuarterChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Month Selection -->\n @if (isType('month') || isType('day')) {\n <div class=\"picker-field month-field\">\n <kendo-label [text]=\"mergedLabels().month || 'Month'\">\n <kendo-dropdownlist\n [data]=\"monthOptions()\"\n [value]=\"selectedMonth()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onMonthChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Day Selection -->\n @if (isType('day')) {\n <div class=\"picker-field day-field\">\n <kendo-label [text]=\"mergedLabels().day || 'Day'\">\n <kendo-dropdownlist\n [data]=\"dayOptions()\"\n [value]=\"selectedDay()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onDayChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Hour From Selection (optional) -->\n <div class=\"picker-field hour-from-field\">\n <kendo-label [text]=\"mergedLabels().hourFrom || 'From Hour'\">\n <kendo-dropdownlist\n [data]=\"hourFromOptions()\"\n [value]=\"hourFrom()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"{ value: null, label: '\u2014' }\"\n (valueChange)=\"onHourFromChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Hour To Selection (visible when hourFrom is set) -->\n @if (hourFrom() !== null) {\n <div class=\"picker-field hour-to-field\">\n <kendo-label [text]=\"mergedLabels().hourTo || 'To Hour'\">\n <kendo-dropdownlist\n [data]=\"hourToOptions()\"\n [value]=\"hourTo()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onHourToChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n }\n\n <!-- Relative Time Selection -->\n @if (isType('relative')) {\n <div class=\"picker-field relative-value-field\">\n <kendo-label [text]=\"mergedLabels().relativeValue || 'Last'\">\n <kendo-numerictextbox\n [value]=\"relativeValue()\"\n [min]=\"1\"\n [max]=\"9999\"\n [decimals]=\"0\"\n [format]=\"'n0'\"\n [spinners]=\"true\"\n (valueChange)=\"onRelativeValueChange($event)\">\n </kendo-numerictextbox>\n </kendo-label>\n </div>\n\n <div class=\"picker-field relative-unit-field\">\n <kendo-label [text]=\"mergedLabels().relativeUnit || 'Unit'\">\n <kendo-dropdownlist\n [data]=\"relativeUnitOptions()\"\n [value]=\"relativeUnit()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onRelativeUnitChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Custom Date Range -->\n @if (isType('custom')) {\n <div class=\"picker-field custom-from-field\">\n <kendo-label [text]=\"mergedLabels().customFrom || 'From'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n\n <div class=\"picker-field custom-to-field\">\n <kendo-label [text]=\"mergedLabels().customTo || 'To'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n }\n</div>\n", styles: [".time-range-picker{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-end}.time-range-picker .picker-field{display:flex;flex-direction:column}.time-range-picker .picker-field kendo-label{display:flex;flex-direction:column;gap:.25rem}.time-range-picker .type-field{min-width:120px}.time-range-picker .year-field{min-width:100px}.time-range-picker .quarter-field{min-width:140px}.time-range-picker .month-field{min-width:130px}.time-range-picker .relative-value-field{min-width:80px}.time-range-picker .relative-value-field kendo-numerictextbox{width:100%}.time-range-picker .relative-unit-field{min-width:100px}.time-range-picker .custom-from-field,.time-range-picker .custom-to-field{min-width:150px}.time-range-picker .custom-from-field kendo-datepicker,.time-range-picker .custom-from-field kendo-datetimepicker,.time-range-picker .custom-to-field kendo-datepicker,.time-range-picker .custom-to-field kendo-datetimepicker{width:100%}@media(max-width:768px){.time-range-picker{gap:.75rem}.time-range-picker .picker-field{flex:1 1 calc(50% - .5rem);min-width:0}.time-range-picker .type-field{flex:1 1 100%}}@media(max-width:480px){.time-range-picker{flex-direction:column;gap:.5rem}.time-range-picker .picker-field{flex:1 1 100%;width:100%}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: DropDownListModule }, { kind: "component", type: i3$1.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["customIconClass", "showStickyHeader", "icon", "svgIcon", "loading", "data", "value", "textField", "valueField", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "leftRightArrowsNavigation", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { kind: "ngmodule", type: DatePickerModule }, { kind: "component", type: i2$1.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "clearButton", "inputAttributes", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "headerTemplate", "footerTemplate", "footer", "navigationItemTemplate", "weekDaysFormat", "showOtherMonthDays", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "autoFill", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "adaptiveTitle", "adaptiveSubtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close", "escape"], exportAs: ["kendo-datepicker"] }, { kind: "ngmodule", type: DateTimePickerModule }, { kind: "component", type: i2$1.DateTimePickerComponent, selector: "kendo-datetimepicker", inputs: ["focusableId", "weekDaysFormat", "showOtherMonthDays", "value", "format", "twoDigitYearMax", "tabindex", "disabledDates", "popupSettings", "adaptiveTitle", "adaptiveSubtitle", "disabled", "readonly", "readOnlyInput", "cancelButton", "formatPlaceholder", "placeholder", "steps", "focusedDate", "calendarType", "animateCalendarNavigation", "weekNumber", "min", "max", "rangeValidation", "disabledDatesValidation", "incompleteDateValidation", "autoCorrectParts", "autoSwitchParts", "autoSwitchKeys", "enableMouseWheel", "allowCaretMode", "clearButton", "autoFill", "adaptiveMode", "inputAttributes", "defaultTab", "size", "rounded", "fillMode", "headerTemplate", "footerTemplate", "footer"], outputs: ["valueChange", "open", "close", "focus", "blur", "escape"], exportAs: ["kendo-datetimepicker"] }, { kind: "ngmodule", type: NumericTextBoxModule }, { kind: "component", type: i5.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode", "inputAttributes"], outputs: ["valueChange", "focus", "blur", "inputFocus", "inputBlur"], exportAs: ["kendoNumericTextBox"] }, { kind: "ngmodule", type: LabelModule }, { kind: "component", type: i6.LabelComponent, selector: "kendo-label", inputs: ["text", "for", "optional", "labelCssStyle", "labelCssClass"], exportAs: ["kendoLabel"] }] });
|
|
3977
4168
|
}
|
|
3978
4169
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: TimeRangePickerComponent, decorators: [{
|
|
3979
4170
|
type: Component,
|
|
@@ -3985,7 +4176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
3985
4176
|
DateTimePickerModule,
|
|
3986
4177
|
NumericTextBoxModule,
|
|
3987
4178
|
LabelModule
|
|
3988
|
-
], template: "<div class=\"time-range-picker\">\n <!-- Range Type Selection -->\n <div class=\"picker-field type-field\">\n <kendo-label [text]=\"mergedLabels().rangeType || 'Range Type'\">\n <kendo-dropdownlist\n [data]=\"typeOptions()\"\n [value]=\"selectedType()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onTypeChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Year Selection (for year, quarter, month types) -->\n @if (isType('year') || isType('quarter') || isType('month')) {\n <div class=\"picker-field year-field\">\n <kendo-label [text]=\"mergedLabels().year || 'Year'\">\n <kendo-dropdownlist\n [data]=\"yearOptions()\"\n [value]=\"selectedYear()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onYearChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Quarter Selection -->\n @if (isType('quarter')) {\n <div class=\"picker-field quarter-field\">\n <kendo-label [text]=\"mergedLabels().quarter || 'Quarter'\">\n <kendo-dropdownlist\n [data]=\"quarterOptions()\"\n [value]=\"selectedQuarter()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onQuarterChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Month Selection -->\n @if (isType('month')) {\n <div class=\"picker-field month-field\">\n <kendo-label [text]=\"mergedLabels().month || 'Month'\">\n <kendo-dropdownlist\n [data]=\"monthOptions()\"\n [value]=\"selectedMonth()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onMonthChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Relative Time Selection -->\n @if (isType('relative')) {\n <div class=\"picker-field relative-value-field\">\n <kendo-label [text]=\"mergedLabels().relativeValue || 'Last'\">\n <kendo-numerictextbox\n [value]=\"relativeValue()\"\n [min]=\"1\"\n [max]=\"9999\"\n [decimals]=\"0\"\n [format]=\"'n0'\"\n [spinners]=\"true\"\n (valueChange)=\"onRelativeValueChange($event)\">\n </kendo-numerictextbox>\n </kendo-label>\n </div>\n\n <div class=\"picker-field relative-unit-field\">\n <kendo-label [text]=\"mergedLabels().relativeUnit || 'Unit'\">\n <kendo-dropdownlist\n [data]=\"relativeUnitOptions()\"\n [value]=\"relativeUnit()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onRelativeUnitChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Custom Date Range -->\n @if (isType('custom')) {\n <div class=\"picker-field custom-from-field\">\n <kendo-label [text]=\"mergedLabels().customFrom || 'From'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n\n <div class=\"picker-field custom-to-field\">\n <kendo-label [text]=\"mergedLabels().customTo || 'To'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n }\n</div>\n", styles: [".time-range-picker{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-end}.time-range-picker .picker-field{display:flex;flex-direction:column}.time-range-picker .picker-field kendo-label{display:flex;flex-direction:column;gap:.25rem}.time-range-picker .type-field{min-width:120px}.time-range-picker .year-field{min-width:100px}.time-range-picker .quarter-field{min-width:140px}.time-range-picker .month-field{min-width:130px}.time-range-picker .relative-value-field{min-width:80px}.time-range-picker .relative-value-field kendo-numerictextbox{width:100%}.time-range-picker .relative-unit-field{min-width:100px}.time-range-picker .custom-from-field,.time-range-picker .custom-to-field{min-width:150px}.time-range-picker .custom-from-field kendo-datepicker,.time-range-picker .custom-from-field kendo-datetimepicker,.time-range-picker .custom-to-field kendo-datepicker,.time-range-picker .custom-to-field kendo-datetimepicker{width:100%}@media(max-width:768px){.time-range-picker{gap:.75rem}.time-range-picker .picker-field{flex:1 1 calc(50% - .5rem);min-width:0}.time-range-picker .type-field{flex:1 1 100%}}@media(max-width:480px){.time-range-picker{flex-direction:column;gap:.5rem}.time-range-picker .picker-field{flex:1 1 100%;width:100%}}\n"] }]
|
|
4179
|
+
], template: "<div class=\"time-range-picker\">\n <!-- Range Type Selection -->\n <div class=\"picker-field type-field\">\n <kendo-label [text]=\"mergedLabels().rangeType || 'Range Type'\">\n <kendo-dropdownlist\n [data]=\"typeOptions()\"\n [value]=\"selectedType()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onTypeChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Year Selection (for year, quarter, month, day types) -->\n @if (isType('year') || isType('quarter') || isType('month') || isType('day')) {\n <div class=\"picker-field year-field\">\n <kendo-label [text]=\"mergedLabels().year || 'Year'\">\n <kendo-dropdownlist\n [data]=\"yearOptions()\"\n [value]=\"selectedYear()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onYearChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Quarter Selection -->\n @if (isType('quarter')) {\n <div class=\"picker-field quarter-field\">\n <kendo-label [text]=\"mergedLabels().quarter || 'Quarter'\">\n <kendo-dropdownlist\n [data]=\"quarterOptions()\"\n [value]=\"selectedQuarter()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onQuarterChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Month Selection -->\n @if (isType('month') || isType('day')) {\n <div class=\"picker-field month-field\">\n <kendo-label [text]=\"mergedLabels().month || 'Month'\">\n <kendo-dropdownlist\n [data]=\"monthOptions()\"\n [value]=\"selectedMonth()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onMonthChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Day Selection -->\n @if (isType('day')) {\n <div class=\"picker-field day-field\">\n <kendo-label [text]=\"mergedLabels().day || 'Day'\">\n <kendo-dropdownlist\n [data]=\"dayOptions()\"\n [value]=\"selectedDay()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onDayChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Hour From Selection (optional) -->\n <div class=\"picker-field hour-from-field\">\n <kendo-label [text]=\"mergedLabels().hourFrom || 'From Hour'\">\n <kendo-dropdownlist\n [data]=\"hourFromOptions()\"\n [value]=\"hourFrom()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"{ value: null, label: '\u2014' }\"\n (valueChange)=\"onHourFromChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n\n <!-- Hour To Selection (visible when hourFrom is set) -->\n @if (hourFrom() !== null) {\n <div class=\"picker-field hour-to-field\">\n <kendo-label [text]=\"mergedLabels().hourTo || 'To Hour'\">\n <kendo-dropdownlist\n [data]=\"hourToOptions()\"\n [value]=\"hourTo()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onHourToChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n }\n\n <!-- Relative Time Selection -->\n @if (isType('relative')) {\n <div class=\"picker-field relative-value-field\">\n <kendo-label [text]=\"mergedLabels().relativeValue || 'Last'\">\n <kendo-numerictextbox\n [value]=\"relativeValue()\"\n [min]=\"1\"\n [max]=\"9999\"\n [decimals]=\"0\"\n [format]=\"'n0'\"\n [spinners]=\"true\"\n (valueChange)=\"onRelativeValueChange($event)\">\n </kendo-numerictextbox>\n </kendo-label>\n </div>\n\n <div class=\"picker-field relative-unit-field\">\n <kendo-label [text]=\"mergedLabels().relativeUnit || 'Unit'\">\n <kendo-dropdownlist\n [data]=\"relativeUnitOptions()\"\n [value]=\"relativeUnit()\"\n textField=\"label\"\n valueField=\"value\"\n [valuePrimitive]=\"true\"\n (valueChange)=\"onRelativeUnitChange($event)\">\n </kendo-dropdownlist>\n </kendo-label>\n </div>\n }\n\n <!-- Custom Date Range -->\n @if (isType('custom')) {\n <div class=\"picker-field custom-from-field\">\n <kendo-label [text]=\"mergedLabels().customFrom || 'From'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customFrom()\"\n [min]=\"minDate()\"\n [max]=\"customTo()\"\n (valueChange)=\"onCustomFromChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n\n <div class=\"picker-field custom-to-field\">\n <kendo-label [text]=\"mergedLabels().customTo || 'To'\">\n @if (showTime()) {\n <kendo-datetimepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datetimepicker>\n } @else {\n <kendo-datepicker\n [value]=\"customTo()\"\n [min]=\"customFrom()\"\n [max]=\"maxDate()\"\n (valueChange)=\"onCustomToChange($event)\">\n </kendo-datepicker>\n }\n </kendo-label>\n </div>\n }\n</div>\n", styles: [".time-range-picker{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-end}.time-range-picker .picker-field{display:flex;flex-direction:column}.time-range-picker .picker-field kendo-label{display:flex;flex-direction:column;gap:.25rem}.time-range-picker .type-field{min-width:120px}.time-range-picker .year-field{min-width:100px}.time-range-picker .quarter-field{min-width:140px}.time-range-picker .month-field{min-width:130px}.time-range-picker .relative-value-field{min-width:80px}.time-range-picker .relative-value-field kendo-numerictextbox{width:100%}.time-range-picker .relative-unit-field{min-width:100px}.time-range-picker .custom-from-field,.time-range-picker .custom-to-field{min-width:150px}.time-range-picker .custom-from-field kendo-datepicker,.time-range-picker .custom-from-field kendo-datetimepicker,.time-range-picker .custom-to-field kendo-datepicker,.time-range-picker .custom-to-field kendo-datetimepicker{width:100%}@media(max-width:768px){.time-range-picker{gap:.75rem}.time-range-picker .picker-field{flex:1 1 calc(50% - .5rem);min-width:0}.time-range-picker .type-field{flex:1 1 100%}}@media(max-width:480px){.time-range-picker{flex-direction:column;gap:.5rem}.time-range-picker .picker-field{flex:1 1 100%;width:100%}}\n"] }]
|
|
3989
4180
|
}], propDecorators: { config: [{
|
|
3990
4181
|
type: Input
|
|
3991
4182
|
}], labels: [{
|
|
@@ -4998,5 +5189,5 @@ function provideMmSharedUi() {
|
|
|
4998
5189
|
* Generated bundle index. Do not edit.
|
|
4999
5190
|
*/
|
|
5000
5191
|
|
|
5001
|
-
export { BaseFormComponent, BaseTreeDetailComponent, ButtonTypes, BytesToSizePipe, CRON_PRESETS, ConfirmationService, ConfirmationWindowResult, CopyableTextComponent, CronBuilderComponent, CronHumanizerService, CronParserService, DEFAULT_CRON_BUILDER_CONFIG, DEFAULT_LIST_VIEW_MESSAGES, DEFAULT_RESPONSIVE_COLSPAN, DEFAULT_TIME_RANGE_LABELS, DataSourceBase, DataSourceTyped, DialogType, EntitySelectDialogComponent, EntitySelectDialogService, EntitySelectInputComponent, FetchResultBase, FetchResultTyped, FileUploadResult, FileUploadService, FormTitleExtraDirective, HAS_UNSAVED_CHANGES, HOUR_INTERVALS, HierarchyDataSource, HierarchyDataSourceBase, ImportStrategyDialogComponent, ImportStrategyDialogResult, ImportStrategyDialogService, ImportStrategyDto, InputDialogComponent, InputService, ListViewComponent, MINUTE_INTERVALS, MessageDetailsDialogComponent, MessageDetailsDialogService, MessageListenerService, MmListViewDataBindingDirective, NotificationDisplayService, PascalCasePipe, ProgressValue, ProgressWindowComponent, ProgressWindowService, RELATIVE_WEEKS, SECOND_INTERVALS, SaveAsDialogComponent, SaveAsDialogService, TimeRangePickerComponent, TimeRangeUtils, TreeComponent, UnsavedChangesDirective, UnsavedChangesGuard, UploadFileDialogComponent, WEEKDAYS, WEEKDAY_ABBREVIATIONS, generateDayOfMonthOptions, generateHourOptions, generateMinuteOptions, provideMmSharedUi };
|
|
5192
|
+
export { BaseFormComponent, BaseTreeDetailComponent, ButtonTypes, BytesToSizePipe, CRON_PRESETS, ConfirmationService, ConfirmationWindowResult, CopyableTextComponent, CronBuilderComponent, CronHumanizerService, CronParserService, DEFAULT_CRON_BUILDER_CONFIG, DEFAULT_ENTITY_SELECT_DIALOG_MESSAGES, DEFAULT_ENTITY_SELECT_INPUT_MESSAGES, DEFAULT_LIST_VIEW_MESSAGES, DEFAULT_RESPONSIVE_COLSPAN, DEFAULT_TIME_RANGE_LABELS, DataSourceBase, DataSourceTyped, DialogType, EntitySelectDialogComponent, EntitySelectDialogService, EntitySelectInputComponent, FetchResultBase, FetchResultTyped, FileUploadResult, FileUploadService, FormTitleExtraDirective, HAS_UNSAVED_CHANGES, HOUR_INTERVALS, HierarchyDataSource, HierarchyDataSourceBase, ImportStrategyDialogComponent, ImportStrategyDialogResult, ImportStrategyDialogService, ImportStrategyDto, InputDialogComponent, InputService, ListViewComponent, MINUTE_INTERVALS, MessageDetailsDialogComponent, MessageDetailsDialogService, MessageListenerService, MmListViewDataBindingDirective, NotificationDisplayService, PascalCasePipe, ProgressValue, ProgressWindowComponent, ProgressWindowService, RELATIVE_WEEKS, SECOND_INTERVALS, SaveAsDialogComponent, SaveAsDialogService, TimeRangePickerComponent, TimeRangeUtils, TreeComponent, UnsavedChangesDirective, UnsavedChangesGuard, UploadFileDialogComponent, WEEKDAYS, WEEKDAY_ABBREVIATIONS, generateDayOfMonthOptions, generateHourOptions, generateMinuteOptions, provideMmSharedUi };
|
|
5002
5193
|
//# sourceMappingURL=meshmakers-shared-ui.mjs.map
|