@meshmakers/octo-ui 3.3.480 → 3.3.500
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.
|
@@ -18,8 +18,7 @@ import { DropDownListModule, DropDownsModule, AutoCompleteModule } from '@progre
|
|
|
18
18
|
import * as i5$1 from '@progress/kendo-angular-icons';
|
|
19
19
|
import { IconsModule, SVGIconModule } from '@progress/kendo-angular-icons';
|
|
20
20
|
import { searchIcon, sortAscSmallIcon, sortDescSmallIcon, chevronRightIcon, chevronDownIcon, downloadIcon, fileIcon, folderIcon, calendarIcon, checkboxCheckedIcon, listUnorderedIcon, filterClearIcon, arrowRightIcon, arrowLeftIcon, chevronDoubleRightIcon, chevronDoubleLeftIcon, arrowUpIcon, arrowDownIcon, plusIcon, minusIcon, trashIcon, dollarIcon, copyIcon } from '@progress/kendo-svg-icons';
|
|
21
|
-
import
|
|
22
|
-
import { WindowRef, WindowModule, WindowService, WindowCloseResult, DialogContentBase, DialogRef, DialogModule, DialogService } from '@progress/kendo-angular-dialog';
|
|
21
|
+
import { WindowRef, WindowModule, WindowService, WindowCloseResult } from '@progress/kendo-angular-dialog';
|
|
23
22
|
import { Subject, firstValueFrom, of, forkJoin, Subscription } from 'rxjs';
|
|
24
23
|
import { debounceTime, distinctUntilChanged, switchMap, map, tap, catchError } from 'rxjs/operators';
|
|
25
24
|
import { LoaderModule } from '@progress/kendo-angular-indicators';
|
|
@@ -1891,7 +1890,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
1891
1890
|
|
|
1892
1891
|
// Models
|
|
1893
1892
|
|
|
1894
|
-
class CkTypeSelectorDialogComponent
|
|
1893
|
+
class CkTypeSelectorDialogComponent {
|
|
1894
|
+
windowRef = inject(WindowRef);
|
|
1895
1895
|
ckTypeSelectorService = inject(CkTypeSelectorService);
|
|
1896
1896
|
searchSubject = new Subject();
|
|
1897
1897
|
subscriptions = new Subscription();
|
|
@@ -1912,18 +1912,18 @@ class CkTypeSelectorDialogComponent extends DialogContentBase {
|
|
|
1912
1912
|
selectItemBy = (context) => context.dataItem.fullName;
|
|
1913
1913
|
initialCkModelIds;
|
|
1914
1914
|
derivedFromRtCkTypeId;
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1915
|
+
lastClickTime = 0;
|
|
1916
|
+
lastClickRtCkTypeId = null;
|
|
1917
|
+
/** Data passed from the service */
|
|
1918
|
+
data;
|
|
1918
1919
|
ngOnInit() {
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
this.
|
|
1922
|
-
this.
|
|
1923
|
-
this.
|
|
1924
|
-
this.
|
|
1925
|
-
|
|
1926
|
-
this.selectedKeys = [data.selectedCkTypeId];
|
|
1920
|
+
if (this.data) {
|
|
1921
|
+
this.dialogTitle = this.data.dialogTitle || 'Select Construction Kit Type';
|
|
1922
|
+
this.allowAbstract = this.data.allowAbstract ?? false;
|
|
1923
|
+
this.initialCkModelIds = this.data.ckModelIds;
|
|
1924
|
+
this.derivedFromRtCkTypeId = this.data.derivedFromRtCkTypeId;
|
|
1925
|
+
if (this.data.selectedCkTypeId) {
|
|
1926
|
+
this.selectedKeys = [this.data.selectedCkTypeId];
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
1929
|
// Set up search debouncing
|
|
@@ -2016,19 +2016,32 @@ class CkTypeSelectorDialogComponent extends DialogContentBase {
|
|
|
2016
2016
|
this.selectedType = null;
|
|
2017
2017
|
}
|
|
2018
2018
|
}
|
|
2019
|
+
onCellClick(event) {
|
|
2020
|
+
const item = event.dataItem;
|
|
2021
|
+
const now = Date.now();
|
|
2022
|
+
if (item && item.rtCkTypeId === this.lastClickRtCkTypeId && (now - this.lastClickTime) < 400) {
|
|
2023
|
+
// Double-click detected
|
|
2024
|
+
if (!item.isAbstract || this.allowAbstract) {
|
|
2025
|
+
this.selectedType = item;
|
|
2026
|
+
this.onConfirm();
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
this.lastClickTime = now;
|
|
2030
|
+
this.lastClickRtCkTypeId = item?.rtCkTypeId ?? null;
|
|
2031
|
+
}
|
|
2019
2032
|
onCancel() {
|
|
2020
|
-
this.
|
|
2033
|
+
this.windowRef.close();
|
|
2021
2034
|
}
|
|
2022
2035
|
onConfirm() {
|
|
2023
2036
|
if (this.selectedType) {
|
|
2024
2037
|
const result = {
|
|
2025
2038
|
selectedCkType: this.selectedType
|
|
2026
2039
|
};
|
|
2027
|
-
this.
|
|
2040
|
+
this.windowRef.close(result);
|
|
2028
2041
|
}
|
|
2029
2042
|
}
|
|
2030
2043
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CkTypeSelectorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2031
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: CkTypeSelectorDialogComponent, isStandalone: true, selector: "mm-ck-type-selector-dialog",
|
|
2044
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: CkTypeSelectorDialogComponent, isStandalone: true, selector: "mm-ck-type-selector-dialog", ngImport: i0, template: `
|
|
2032
2045
|
<div class="ck-type-selector-container">
|
|
2033
2046
|
<div class="filter-container">
|
|
2034
2047
|
<div class="filter-row">
|
|
@@ -2067,13 +2080,13 @@ class CkTypeSelectorDialogComponent extends DialogContentBase {
|
|
|
2067
2080
|
<kendo-grid
|
|
2068
2081
|
[data]="gridData"
|
|
2069
2082
|
[loading]="isLoading"
|
|
2070
|
-
[height]="400"
|
|
2071
2083
|
[selectable]="{ mode: 'single' }"
|
|
2072
2084
|
[pageable]="{ pageSizes: [25, 50, 100] }"
|
|
2073
2085
|
[pageSize]="pageSize"
|
|
2074
2086
|
[skip]="skip"
|
|
2075
2087
|
(pageChange)="onPageChange($event)"
|
|
2076
2088
|
(selectionChange)="onSelectionChange($event)"
|
|
2089
|
+
(cellClick)="onCellClick($event)"
|
|
2077
2090
|
[kendoGridSelectBy]="selectItemBy"
|
|
2078
2091
|
[(selectedKeys)]="selectedKeys"
|
|
2079
2092
|
class="type-grid">
|
|
@@ -2102,13 +2115,13 @@ class CkTypeSelectorDialogComponent extends DialogContentBase {
|
|
|
2102
2115
|
<div class="selection-info" *ngIf="selectedType">
|
|
2103
2116
|
<strong>Selected:</strong> {{ selectedType.rtCkTypeId }}
|
|
2104
2117
|
</div>
|
|
2105
|
-
</div>
|
|
2106
2118
|
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2119
|
+
<div class="dialog-actions">
|
|
2120
|
+
<button kendoButton (click)="onCancel()">Cancel</button>
|
|
2121
|
+
<button kendoButton themeColor="primary" [disabled]="!selectedType || (selectedType.isAbstract && !allowAbstract)" (click)="onConfirm()">OK</button>
|
|
2122
|
+
</div>
|
|
2123
|
+
</div>
|
|
2124
|
+
`, isInline: true, styles: [":host{display:flex;flex-direction:column;height:100%}.ck-type-selector-container{display:flex;flex-direction:column;flex:1;min-height:0;padding:20px;box-sizing:border-box;gap:12px}.filter-container{margin-bottom:16px;flex-shrink:0}.filter-row{display:flex;gap:16px;align-items:flex-end}.filter-item{display:flex;flex-direction:column;gap:4px}.filter-item label{font-size:12px;font-weight:500}.filter-item.flex-grow{flex:1}.filter-item.filter-actions{flex-shrink:0}.filter-input{min-width:180px}.grid-container{flex:1;min-height:0;display:flex;flex-direction:column}.grid-container kendo-grid,.grid-container .type-grid{flex:1;min-height:200px}.type-grid{border-radius:4px}.type-grid ::ng-deep .k-grid-table tbody tr{cursor:pointer}.abstract-type{font-style:italic;opacity:.7}.final-type{font-weight:600}.type-badge{display:inline-block;font-size:10px;padding:1px 6px;border-radius:10px;margin-left:8px;text-transform:uppercase}.type-badge.abstract{background-color:var(--kendo-color-warning, #ffc107);color:var(--kendo-color-on-warning, #000);opacity:.8}.type-badge.final{background-color:var(--kendo-color-success, #28a745);color:var(--kendo-color-on-success, #fff);opacity:.8}.selection-info{margin-top:12px;padding:8px 12px;background:var(--kendo-color-success-subtle, #d4edda);border:1px solid var(--kendo-color-success, #28a745);border-radius:4px;font-size:14px;flex-shrink:0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:8px 20px 0;flex-shrink:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: GridModule }, { kind: "component", type: i3.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: i3.SelectionDirective, selector: "[kendoGridSelectBy]" }, { kind: "component", type: i3.ColumnComponent, selector: "kendo-grid-column", inputs: ["field", "format", "sortable", "groupable", "editor", "filter", "filterVariant", "filterable", "editable"] }, { kind: "directive", type: i3.CellTemplateDirective, selector: "[kendoGridCellTemplate]" }, { 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: InputsModule }, { kind: "component", type: i5.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: "directive", type: i5.TextBoxSuffixTemplateDirective, selector: "[kendoTextBoxSuffixTemplate]", inputs: ["showSeparator"] }, { kind: "ngmodule", type: DropDownsModule }, { kind: "component", type: i3$1.ComboBoxComponent, selector: "kendo-combobox", inputs: ["icon", "svgIcon", "inputAttributes", "showStickyHeader", "focusableId", "allowCustom", "data", "value", "textField", "valueField", "valuePrimitive", "valueNormalizer", "placeholder", "adaptiveMode", "adaptiveTitle", "adaptiveSubtitle", "popupSettings", "listHeight", "loading", "suggest", "clearButton", "disabled", "itemDisabled", "readonly", "tabindex", "tabIndex", "filterable", "virtual", "size", "rounded", "fillMode"], outputs: ["valueChange", "selectionChange", "filterChange", "open", "opened", "close", "closed", "focus", "blur", "inputFocus", "inputBlur", "escape"], exportAs: ["kendoComboBox"] }, { kind: "ngmodule", type: IconsModule }, { kind: "ngmodule", type: LoaderModule }, { kind: "ngmodule", type: WindowModule }] });
|
|
2112
2125
|
}
|
|
2113
2126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: CkTypeSelectorDialogComponent, decorators: [{
|
|
2114
2127
|
type: Component,
|
|
@@ -2121,7 +2134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2121
2134
|
DropDownsModule,
|
|
2122
2135
|
IconsModule,
|
|
2123
2136
|
LoaderModule,
|
|
2124
|
-
|
|
2137
|
+
WindowModule
|
|
2125
2138
|
], template: `
|
|
2126
2139
|
<div class="ck-type-selector-container">
|
|
2127
2140
|
<div class="filter-container">
|
|
@@ -2161,13 +2174,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2161
2174
|
<kendo-grid
|
|
2162
2175
|
[data]="gridData"
|
|
2163
2176
|
[loading]="isLoading"
|
|
2164
|
-
[height]="400"
|
|
2165
2177
|
[selectable]="{ mode: 'single' }"
|
|
2166
2178
|
[pageable]="{ pageSizes: [25, 50, 100] }"
|
|
2167
2179
|
[pageSize]="pageSize"
|
|
2168
2180
|
[skip]="skip"
|
|
2169
2181
|
(pageChange)="onPageChange($event)"
|
|
2170
2182
|
(selectionChange)="onSelectionChange($event)"
|
|
2183
|
+
(cellClick)="onCellClick($event)"
|
|
2171
2184
|
[kendoGridSelectBy]="selectItemBy"
|
|
2172
2185
|
[(selectedKeys)]="selectedKeys"
|
|
2173
2186
|
class="type-grid">
|
|
@@ -2196,17 +2209,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
2196
2209
|
<div class="selection-info" *ngIf="selectedType">
|
|
2197
2210
|
<strong>Selected:</strong> {{ selectedType.rtCkTypeId }}
|
|
2198
2211
|
</div>
|
|
2199
|
-
</div>
|
|
2200
2212
|
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2213
|
+
<div class="dialog-actions">
|
|
2214
|
+
<button kendoButton (click)="onCancel()">Cancel</button>
|
|
2215
|
+
<button kendoButton themeColor="primary" [disabled]="!selectedType || (selectedType.isAbstract && !allowAbstract)" (click)="onConfirm()">OK</button>
|
|
2216
|
+
</div>
|
|
2217
|
+
</div>
|
|
2218
|
+
`, styles: [":host{display:flex;flex-direction:column;height:100%}.ck-type-selector-container{display:flex;flex-direction:column;flex:1;min-height:0;padding:20px;box-sizing:border-box;gap:12px}.filter-container{margin-bottom:16px;flex-shrink:0}.filter-row{display:flex;gap:16px;align-items:flex-end}.filter-item{display:flex;flex-direction:column;gap:4px}.filter-item label{font-size:12px;font-weight:500}.filter-item.flex-grow{flex:1}.filter-item.filter-actions{flex-shrink:0}.filter-input{min-width:180px}.grid-container{flex:1;min-height:0;display:flex;flex-direction:column}.grid-container kendo-grid,.grid-container .type-grid{flex:1;min-height:200px}.type-grid{border-radius:4px}.type-grid ::ng-deep .k-grid-table tbody tr{cursor:pointer}.abstract-type{font-style:italic;opacity:.7}.final-type{font-weight:600}.type-badge{display:inline-block;font-size:10px;padding:1px 6px;border-radius:10px;margin-left:8px;text-transform:uppercase}.type-badge.abstract{background-color:var(--kendo-color-warning, #ffc107);color:var(--kendo-color-on-warning, #000);opacity:.8}.type-badge.final{background-color:var(--kendo-color-success, #28a745);color:var(--kendo-color-on-success, #fff);opacity:.8}.selection-info{margin-top:12px;padding:8px 12px;background:var(--kendo-color-success-subtle, #d4edda);border:1px solid var(--kendo-color-success, #28a745);border-radius:4px;font-size:14px;flex-shrink:0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;padding:8px 20px 0;flex-shrink:0}\n"] }]
|
|
2219
|
+
}] });
|
|
2207
2220
|
|
|
2208
2221
|
class CkTypeSelectorDialogService {
|
|
2209
|
-
|
|
2222
|
+
windowService = inject(WindowService);
|
|
2210
2223
|
/**
|
|
2211
2224
|
* Opens the CkType selector dialog
|
|
2212
2225
|
* @param options Dialog options
|
|
@@ -2220,20 +2233,28 @@ class CkTypeSelectorDialogService {
|
|
|
2220
2233
|
allowAbstract: options.allowAbstract,
|
|
2221
2234
|
derivedFromRtCkTypeId: options.derivedFromRtCkTypeId
|
|
2222
2235
|
};
|
|
2223
|
-
const
|
|
2236
|
+
const windowRef = this.windowService.open({
|
|
2224
2237
|
content: CkTypeSelectorDialogComponent,
|
|
2225
2238
|
width: 900,
|
|
2226
2239
|
height: 650,
|
|
2227
2240
|
minWidth: 750,
|
|
2228
2241
|
minHeight: 550,
|
|
2242
|
+
resizable: true,
|
|
2229
2243
|
title: options.dialogTitle || 'Select Construction Kit Type'
|
|
2230
2244
|
});
|
|
2231
2245
|
// Pass data to the component
|
|
2232
|
-
|
|
2233
|
-
|
|
2246
|
+
const contentRef = windowRef.content;
|
|
2247
|
+
if (contentRef?.instance) {
|
|
2248
|
+
contentRef.instance.data = data;
|
|
2234
2249
|
}
|
|
2235
2250
|
try {
|
|
2236
|
-
const result = await firstValueFrom(
|
|
2251
|
+
const result = await firstValueFrom(windowRef.result);
|
|
2252
|
+
if (result instanceof WindowCloseResult) {
|
|
2253
|
+
return {
|
|
2254
|
+
confirmed: false,
|
|
2255
|
+
selectedCkType: null
|
|
2256
|
+
};
|
|
2257
|
+
}
|
|
2237
2258
|
if (result && typeof result === 'object' && 'selectedCkType' in result) {
|
|
2238
2259
|
// User clicked OK and we have a result
|
|
2239
2260
|
const dialogResult = result;
|