@myrtex-org/form 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/modules/object-form/components/elements/input/table/input-table.component.mjs +37 -3
- package/esm2022/lib/modules/object-form/components/elements/input/table/models/column.model.mjs +2 -0
- package/esm2022/lib/modules/object-form/store/object-form.effects.mjs +1 -1
- package/esm2022/lib/modules/object-form/store/object-form.selector.mjs +3 -3
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/myrtex-org-form.mjs +39 -5
- package/fesm2022/myrtex-org-form.mjs.map +1 -1
- package/lib/modules/object-form/components/elements/input/table/input-table.component.d.ts +6 -1
- package/lib/modules/object-form/components/elements/input/table/models/column.model.d.ts +2 -0
- package/lib/modules/object-form/store/object-form.effects.d.ts +10 -10
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -544,12 +544,12 @@ const selectIsEdited = createSelector(objectFeature, (state) => state.isEdited);
|
|
|
544
544
|
const selectIsCheckRequired = createSelector(objectFeature, (state) => state.isCheckRequired);
|
|
545
545
|
const selectMenuModel = createSelector(objectFeature, (state) => state.menuModel);
|
|
546
546
|
const selectSectionSettings = createSelector(objectFeature, selectRouteNestedParam('sectionSysName'), (state, sectionSysName) => {
|
|
547
|
-
return state
|
|
547
|
+
return state?.settings?.sections.find(s => s.sysName === sectionSysName) || null;
|
|
548
548
|
});
|
|
549
549
|
const selectSectionValues = createSelector(objectFeature, (state) => state.sectionValues);
|
|
550
550
|
const selectObjectId = createSelector(selectRouteNestedParam(OBJECT_ID_NAME), (applicationId) => applicationId);
|
|
551
551
|
const selectSectionFiles = createSelector(objectFeature, (state) => state.sectionFiles);
|
|
552
|
-
const selectTemplateSysName = createSelector(objectFeature, (state) => state
|
|
552
|
+
const selectTemplateSysName = createSelector(objectFeature, (state) => state?.settings?.sysName);
|
|
553
553
|
const selectValueModel = (settings) => createSelector(objectFeature, (state) => getValueModel(settings, state.sectionValues));
|
|
554
554
|
const selectDependencyRulesResults = createSelector(objectFeature, state => state.dependencyRuleCheckResults);
|
|
555
555
|
|
|
@@ -1774,6 +1774,7 @@ class InputTableComponent {
|
|
|
1774
1774
|
this._subscriptions$ = [];
|
|
1775
1775
|
this._isCheckRequired = false;
|
|
1776
1776
|
this.dataSource = [];
|
|
1777
|
+
this.columns = [];
|
|
1777
1778
|
this.values = [];
|
|
1778
1779
|
this.changed = new EventEmitter();
|
|
1779
1780
|
}
|
|
@@ -1781,6 +1782,7 @@ class InputTableComponent {
|
|
|
1781
1782
|
this.settings = settings;
|
|
1782
1783
|
this.model = { sysName: settings.sysName, type: settings.type, data: [], totals: [] };
|
|
1783
1784
|
this._detector.detectChanges();
|
|
1785
|
+
this._initColumns(this.settings.components);
|
|
1784
1786
|
}
|
|
1785
1787
|
ngOnInit() {
|
|
1786
1788
|
this._initModel();
|
|
@@ -1890,12 +1892,41 @@ class InputTableComponent {
|
|
|
1890
1892
|
this._detector.detectChanges();
|
|
1891
1893
|
this.dataGrid.instance.refresh();
|
|
1892
1894
|
}
|
|
1895
|
+
_initColumns(components) {
|
|
1896
|
+
this.columns = components.map(c => this._transformColumn(structuredClone(c)));
|
|
1897
|
+
this.columns.push({
|
|
1898
|
+
caption: '',
|
|
1899
|
+
type: 'buttons',
|
|
1900
|
+
width: 150,
|
|
1901
|
+
cssClass: 'custom-cell-controls',
|
|
1902
|
+
buttons: [
|
|
1903
|
+
{
|
|
1904
|
+
template: 'editButtonTemplate',
|
|
1905
|
+
hint: 'Редактировать',
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
template: 'deleteButtonTemplate',
|
|
1909
|
+
hint: 'Удалить',
|
|
1910
|
+
},
|
|
1911
|
+
],
|
|
1912
|
+
});
|
|
1913
|
+
this.dataGrid.instance.repaint();
|
|
1914
|
+
this._detector.detectChanges();
|
|
1915
|
+
}
|
|
1916
|
+
_transformColumn(component) {
|
|
1917
|
+
return {
|
|
1918
|
+
caption: component.options.label || '',
|
|
1919
|
+
columns: component.components.map(c => this._transformColumn(structuredClone(c))),
|
|
1920
|
+
dataField: component.sysName,
|
|
1921
|
+
format: this.getFormat(component),
|
|
1922
|
+
};
|
|
1923
|
+
}
|
|
1893
1924
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1894
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputTableComponent, selector: "app-input-table", inputs: { values: "values", data: "data" }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: ["dataGrid"], descendants: true }], ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-table-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <dx-data-grid\r\n #dataGrid\r\n [dataSource]=\"dataSource\"\r\n noDataText=\"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445\"\r\n >\r\n <dxo-toolbar>\r\n <dxi-item location=\"after\">\r\n <div *dxTemplate class=\"add-row\">\r\n <mrx-button\r\n [size]=\"'medium'\"\r\n [type]=\"'tertiary'\"\r\n [customClasses]=\"'px-3'\"\r\n (mrxClick)=\"createRow()\"\r\n >\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\r\n </mrx-button>\r\n </div>\r\n </dxi-item>\r\n </dxo-toolbar>\r\n\r\n @for (component of settings.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n >\r\n @for (component of component.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n >\r\n @for (component of component.components; track component.id) {\r\n <dxi-column\r\n [caption]=\"component.options.label\"\r\n [dataField]=\"component.sysName\"\r\n [format]=\"getFormat(component)\"\r\n [dataType]=\"getDataType(component)\"\r\n ></dxi-column>\r\n }\r\n </dxi-column>\r\n }\r\n </dxi-column>\r\n }\r\n\r\n <dxi-column\r\n [width]=\"60\"\r\n [allowFiltering]=\"false\"\r\n [allowSorting]=\"false\"\r\n [visible]=\"true\"\r\n cellTemplate=\"editCellTemplate\"\r\n >\r\n <div *dxTemplate=\"let cellInfo of 'editCellTemplate'\">\r\n <div class=\"d-flex align-items-center justify-content-center\" style=\"gap: 4px\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(cellInfo)\"></span>\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(cellInfo)\"></span>\r\n </div>\r\n </div>\r\n </dxi-column>\r\n\r\n @if (dataSource.length) {\r\n <dxo-summary>\r\n @for (component of settings.components; track component.id; let first = $first) {\r\n @if (!first) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n } @else {\r\n @if (isTotalColumn(component)) {\r\n <dxi-total-item [column]=\"component.sysName\" [displayFormat]=\"'{0}'\"></dxi-total-item>\r\n } @else {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [cssClass]=\"'text-bold'\"\r\n [displayFormat]=\"'\u0418\u0422\u041E\u0413\u041E'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n </dxo-summary>\r\n }\r\n </dx-data-grid>\r\n </div>\r\n}\r\n\r\n\r\n", styles: [":host::ng-deep .input-table-content .dx-datagrid{padding:0}:host::ng-deep .input-table-content .dx-datagrid-header-panel{display:flex;align-items:center;min-height:40px;padding:0}:host::ng-deep .input-table-content .dx-datagrid-rowsview{border-bottom:none}:host::ng-deep .input-table-content .dx-datagrid-rowsview.dx-empty{border-bottom:1px solid #ddd;height:48px}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer{border-top:none;border-left:none;border-right:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content{padding:0}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content th,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content td{border:1px solid #ddd;border-top:none;border-collapse:collapse}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table{border-top:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content .dx-datagrid-summary-item{font-weight:400}\n"], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "component", type: i1$1.ButtonComponent, selector: "mrx-button", inputs: ["size", "type", "color", "iconPosition", "active", "disabled", "isLoading", "iconOnly", "customClasses", "label", "icon", "iconClass", "buttonType", "href", "target", "routerLink", "queryParams"], outputs: ["mrxClick"] }, { kind: "component", type: i2$3.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i3$1.DxiColumnComponent, selector: "dxi-column", inputs: ["alignment", "allowEditing", "allowExporting", "allowFiltering", "allowFixing", "allowGrouping", "allowHeaderFiltering", "allowHiding", "allowReordering", "allowResizing", "allowSearch", "allowSorting", "autoExpandGroup", "buttons", "calculateCellValue", "calculateDisplayValue", "calculateFilterExpression", "calculateGroupValue", "calculateSortValue", "caption", "cellTemplate", "columns", "cssClass", "customizeText", "dataField", "dataType", "editCellTemplate", "editorOptions", "encodeHtml", "falseText", "filterOperations", "filterType", "filterValue", "filterValues", "fixed", "fixedPosition", "format", "formItem", "groupCellTemplate", "groupIndex", "headerCellTemplate", "headerFilter", "hidingPriority", "isBand", "lookup", "minWidth", "name", "ownerBand", "renderAsync", "selectedFilterOperation", "setCellValue", "showEditorAlways", "showInColumnChooser", "showWhenGrouped", "sortIndex", "sortingMethod", "sortOrder", "trueText", "type", "validationRules", "visible", "visibleIndex", "width"], outputs: ["filterValueChange", "filterValuesChange", "groupIndexChange", "selectedFilterOperationChange", "sortIndexChange", "sortOrderChange", "visibleChange", "visibleIndexChange"] }, { kind: "component", type: i3$1.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "linkAttr", "url", "heightRatio", "widthRatio", "expanded", "hasItems", "id", "parentId"] }, { kind: "component", type: i3$1.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i3$1.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }, { kind: "component", type: i3$1.DxoToolbarComponent, selector: "dxo-toolbar", inputs: ["disabled", "items", "visible", "fileSelectionItems", "container", "multiline"] }, { kind: "directive", type: i4.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1925
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: InputTableComponent, selector: "app-input-table", inputs: { values: "values", data: "data" }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "dataGrid", first: true, predicate: ["dataGrid"], descendants: true }, { propertyName: "editTemplate", first: true, predicate: ["editTemplate"], descendants: true }], ngImport: i0, template: "@if (settings) {\r\n <div class=\"input-table-content w-100\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <dx-data-grid\r\n #dataGrid\r\n [dataSource]=\"dataSource\"\r\n [columns]=\"columns\"\r\n noDataText=\"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445\"\r\n style=\"width: 100%\"\r\n >\r\n <dxo-toolbar>\r\n <dxi-item location=\"after\">\r\n <div *dxTemplate class=\"add-row\">\r\n <mrx-button\r\n [size]=\"'medium'\"\r\n [type]=\"'tertiary'\"\r\n [customClasses]=\"'px-3'\"\r\n (mrxClick)=\"createRow()\"\r\n >\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\r\n </mrx-button>\r\n </div>\r\n </dxi-item>\r\n </dxo-toolbar>\r\n\r\n <div *dxTemplate=\"let buttonData of 'editButtonTemplate'\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(buttonData)\"></span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let buttonData of 'deleteButtonTemplate'\">\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(buttonData)\"></span>\r\n </div>\r\n\r\n @if (dataSource.length) {\r\n <dxo-summary>\r\n @for (component of settings.components; track component.id; let first = $first) {\r\n @if (!first) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n } @else {\r\n @if (isTotalColumn(component)) {\r\n <dxi-total-item [column]=\"component.sysName\" [displayFormat]=\"'{0}'\"></dxi-total-item>\r\n } @else {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [cssClass]=\"'text-bold'\"\r\n [displayFormat]=\"'\u0418\u0422\u041E\u0413\u041E'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n </dxo-summary>\r\n }\r\n </dx-data-grid>\r\n\r\n <ng-template #editTemplate let-cellInfo=\"cellInfo\">\r\n <div class=\"d-flex align-items-center justify-content-center\" style=\"gap: 4px\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(cellInfo)\"></span>\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(cellInfo)\"></span>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n\r\n\r\n", styles: [":host::ng-deep .input-table-content .dx-datagrid{padding:0}:host::ng-deep .input-table-content .dx-datagrid-header-panel{display:flex;align-items:center;min-height:40px;padding:0}:host::ng-deep .input-table-content .dx-datagrid-rowsview{border-bottom:none}:host::ng-deep .input-table-content .dx-datagrid-rowsview.dx-empty{border-bottom:1px solid #ddd;height:48px}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer{border-top:none;border-left:none;border-right:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content{padding:0}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content th,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content td{border:1px solid #ddd;border-top:none;border-collapse:collapse}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table{border-top:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content .dx-datagrid-summary-item{font-weight:400}:host::ng-deep .custom-cell-controls .dx-template-wrapper{display:inline-flex}\n"], dependencies: [{ kind: "component", type: i1$1.LabelComponent, selector: "mrx-label", inputs: ["requiredHidden", "required", "boldLabel", "disabled", "placeholder", "label", "customClasses", "triggerTextPosition", "isPublicInfo", "publicInfoTooltip", "isSwitch", "switchLabel", "switchValue", "isCheckbox", "checkboxLabel", "checkboxValue", "counter", "linkText", "linkPrevent", "linkType", "linkMonochrome", "href", "triggerType", "tooltip", "tooltipInitialVisible", "isSaveToStorage"], outputs: ["changeSwitchValue", "changeCheckboxValue", "clickedLink"] }, { kind: "component", type: i1$1.ButtonComponent, selector: "mrx-button", inputs: ["size", "type", "color", "iconPosition", "active", "disabled", "isLoading", "iconOnly", "customClasses", "label", "icon", "iconClass", "buttonType", "href", "target", "routerLink", "queryParams"], outputs: ["mrxClick"] }, { kind: "component", type: i2$3.DxDataGridComponent, selector: "dx-data-grid", inputs: ["accessKey", "activeStateEnabled", "allowColumnReordering", "allowColumnResizing", "autoNavigateToFocusedRow", "cacheEnabled", "cellHintEnabled", "columnAutoWidth", "columnChooser", "columnFixing", "columnHidingEnabled", "columnMinWidth", "columnResizingMode", "columns", "columnWidth", "customizeColumns", "dataRowTemplate", "dataSource", "dateSerializationFormat", "disabled", "editing", "elementAttr", "errorRowEnabled", "export", "filterBuilder", "filterBuilderPopup", "filterPanel", "filterRow", "filterSyncEnabled", "filterValue", "focusedColumnIndex", "focusedRowEnabled", "focusedRowIndex", "focusedRowKey", "grouping", "groupPanel", "headerFilter", "height", "highlightChanges", "hint", "hoverStateEnabled", "keyboardNavigation", "keyExpr", "loadPanel", "masterDetail", "noDataText", "pager", "paging", "remoteOperations", "renderAsync", "repaintChangesOnly", "rowAlternationEnabled", "rowDragging", "rowTemplate", "rtlEnabled", "scrolling", "searchPanel", "selectedRowKeys", "selection", "selectionFilter", "showBorders", "showColumnHeaders", "showColumnLines", "showRowLines", "sortByGroupSummaryInfo", "sorting", "stateStoring", "summary", "syncLookupFilterValues", "tabIndex", "toolbar", "twoWayBindingEnabled", "visible", "width", "wordWrapEnabled"], outputs: ["onAdaptiveDetailRowPreparing", "onCellClick", "onCellDblClick", "onCellHoverChanged", "onCellPrepared", "onContentReady", "onContextMenuPreparing", "onDataErrorOccurred", "onDisposing", "onEditCanceled", "onEditCanceling", "onEditingStart", "onEditorPrepared", "onEditorPreparing", "onExporting", "onFocusedCellChanged", "onFocusedCellChanging", "onFocusedRowChanged", "onFocusedRowChanging", "onInitialized", "onInitNewRow", "onKeyDown", "onOptionChanged", "onRowClick", "onRowCollapsed", "onRowCollapsing", "onRowDblClick", "onRowExpanded", "onRowExpanding", "onRowInserted", "onRowInserting", "onRowPrepared", "onRowRemoved", "onRowRemoving", "onRowUpdated", "onRowUpdating", "onRowValidating", "onSaved", "onSaving", "onSelectionChanged", "onToolbarPreparing", "accessKeyChange", "activeStateEnabledChange", "allowColumnReorderingChange", "allowColumnResizingChange", "autoNavigateToFocusedRowChange", "cacheEnabledChange", "cellHintEnabledChange", "columnAutoWidthChange", "columnChooserChange", "columnFixingChange", "columnHidingEnabledChange", "columnMinWidthChange", "columnResizingModeChange", "columnsChange", "columnWidthChange", "customizeColumnsChange", "dataRowTemplateChange", "dataSourceChange", "dateSerializationFormatChange", "disabledChange", "editingChange", "elementAttrChange", "errorRowEnabledChange", "exportChange", "filterBuilderChange", "filterBuilderPopupChange", "filterPanelChange", "filterRowChange", "filterSyncEnabledChange", "filterValueChange", "focusedColumnIndexChange", "focusedRowEnabledChange", "focusedRowIndexChange", "focusedRowKeyChange", "groupingChange", "groupPanelChange", "headerFilterChange", "heightChange", "highlightChangesChange", "hintChange", "hoverStateEnabledChange", "keyboardNavigationChange", "keyExprChange", "loadPanelChange", "masterDetailChange", "noDataTextChange", "pagerChange", "pagingChange", "remoteOperationsChange", "renderAsyncChange", "repaintChangesOnlyChange", "rowAlternationEnabledChange", "rowDraggingChange", "rowTemplateChange", "rtlEnabledChange", "scrollingChange", "searchPanelChange", "selectedRowKeysChange", "selectionChange", "selectionFilterChange", "showBordersChange", "showColumnHeadersChange", "showColumnLinesChange", "showRowLinesChange", "sortByGroupSummaryInfoChange", "sortingChange", "stateStoringChange", "summaryChange", "syncLookupFilterValuesChange", "tabIndexChange", "toolbarChange", "twoWayBindingEnabledChange", "visibleChange", "widthChange", "wordWrapEnabledChange"] }, { kind: "component", type: i3$1.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "linkAttr", "url", "heightRatio", "widthRatio", "expanded", "hasItems", "id", "parentId"] }, { kind: "component", type: i3$1.DxoSummaryComponent, selector: "dxo-summary", inputs: ["calculateCustomSummary", "groupItems", "recalculateWhileEditing", "skipEmptyValues", "texts", "totalItems"] }, { kind: "component", type: i3$1.DxiTotalItemComponent, selector: "dxi-total-item", inputs: ["alignment", "column", "cssClass", "customizeText", "displayFormat", "name", "showInColumn", "skipEmptyValues", "summaryType", "valueFormat"] }, { kind: "component", type: i3$1.DxoToolbarComponent, selector: "dxo-toolbar", inputs: ["disabled", "items", "visible", "fileSelectionItems", "container", "multiline"] }, { kind: "directive", type: i4.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1895
1926
|
}
|
|
1896
1927
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTableComponent, decorators: [{
|
|
1897
1928
|
type: Component,
|
|
1898
|
-
args: [{ selector: 'app-input-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-table-content\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <dx-data-grid\r\n #dataGrid\r\n [dataSource]=\"dataSource\"\r\n noDataText=\"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445\"\r\n >\r\n <dxo-toolbar>\r\n <dxi-item location=\"after\">\r\n <div *dxTemplate class=\"add-row\">\r\n <mrx-button\r\n [size]=\"'medium'\"\r\n [type]=\"'tertiary'\"\r\n [customClasses]=\"'px-3'\"\r\n (mrxClick)=\"createRow()\"\r\n >\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\r\n </mrx-button>\r\n </div>\r\n </dxi-item>\r\n </dxo-toolbar>\r\n\r\n
|
|
1929
|
+
args: [{ selector: 'app-input-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (settings) {\r\n <div class=\"input-table-content w-100\">\r\n @if (settings.options.label) {\r\n <mrx-label\r\n [required]=\"settings.options.required\"\r\n [tooltip]=\"settings.options.tooltip || ''\"\r\n [customClasses]=\"'mt-2'\"\r\n >\r\n {{ settings.options.label }}\r\n </mrx-label>\r\n }\r\n\r\n <dx-data-grid\r\n #dataGrid\r\n [dataSource]=\"dataSource\"\r\n [columns]=\"columns\"\r\n noDataText=\"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445\"\r\n style=\"width: 100%\"\r\n >\r\n <dxo-toolbar>\r\n <dxi-item location=\"after\">\r\n <div *dxTemplate class=\"add-row\">\r\n <mrx-button\r\n [size]=\"'medium'\"\r\n [type]=\"'tertiary'\"\r\n [customClasses]=\"'px-3'\"\r\n (mrxClick)=\"createRow()\"\r\n >\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C\r\n </mrx-button>\r\n </div>\r\n </dxi-item>\r\n </dxo-toolbar>\r\n\r\n <div *dxTemplate=\"let buttonData of 'editButtonTemplate'\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(buttonData)\"></span>\r\n </div>\r\n\r\n <div *dxTemplate=\"let buttonData of 'deleteButtonTemplate'\">\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(buttonData)\"></span>\r\n </div>\r\n\r\n @if (dataSource.length) {\r\n <dxo-summary>\r\n @for (component of settings.components; track component.id; let first = $first) {\r\n @if (!first) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n\r\n @for (component of component.components; track component.id) {\r\n @if (showTotal(component)) {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [summaryType]=\"'sum'\"\r\n [displayFormat]=\"'{0}'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n } @else {\r\n @if (isTotalColumn(component)) {\r\n <dxi-total-item [column]=\"component.sysName\" [displayFormat]=\"'{0}'\"></dxi-total-item>\r\n } @else {\r\n <dxi-total-item\r\n [column]=\"component.sysName\"\r\n [cssClass]=\"'text-bold'\"\r\n [displayFormat]=\"'\u0418\u0422\u041E\u0413\u041E'\"\r\n ></dxi-total-item>\r\n }\r\n }\r\n }\r\n </dxo-summary>\r\n }\r\n </dx-data-grid>\r\n\r\n <ng-template #editTemplate let-cellInfo=\"cellInfo\">\r\n <div class=\"d-flex align-items-center justify-content-center\" style=\"gap: 4px\">\r\n <span class=\"mrx-icon icon-edit icon-font-16 cursor-pointer\" (click)=\"editRow(cellInfo)\"></span>\r\n <span class=\"mrx-icon icon-delete icon-font-16 cursor-pointer\" (click)=\"deleteRow(cellInfo)\"></span>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n\r\n\r\n", styles: [":host::ng-deep .input-table-content .dx-datagrid{padding:0}:host::ng-deep .input-table-content .dx-datagrid-header-panel{display:flex;align-items:center;min-height:40px;padding:0}:host::ng-deep .input-table-content .dx-datagrid-rowsview{border-bottom:none}:host::ng-deep .input-table-content .dx-datagrid-rowsview.dx-empty{border-bottom:1px solid #ddd;height:48px}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer{border-top:none;border-left:none;border-right:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content{padding:0}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content th,:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content td{border:1px solid #ddd;border-top:none;border-collapse:collapse}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content table{border-top:none}:host::ng-deep .input-table-content .dx-datagrid .dx-datagrid-total-footer .dx-datagrid-content .dx-datagrid-summary-item{font-weight:400}:host::ng-deep .custom-cell-controls .dx-template-wrapper{display:inline-flex}\n"] }]
|
|
1899
1930
|
}], propDecorators: { values: [{
|
|
1900
1931
|
type: Input
|
|
1901
1932
|
}], data: [{
|
|
@@ -1903,6 +1934,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1903
1934
|
}], dataGrid: [{
|
|
1904
1935
|
type: ViewChild,
|
|
1905
1936
|
args: ['dataGrid', { static: false }]
|
|
1937
|
+
}], editTemplate: [{
|
|
1938
|
+
type: ViewChild,
|
|
1939
|
+
args: ['editTemplate', { static: false }]
|
|
1906
1940
|
}], changed: [{
|
|
1907
1941
|
type: Output
|
|
1908
1942
|
}] } });
|
|
@@ -2365,5 +2399,5 @@ const isNullOrUndefined = (model) => {
|
|
|
2365
2399
|
* Generated bundle index. Do not edit.
|
|
2366
2400
|
*/
|
|
2367
2401
|
|
|
2368
|
-
export { ComponentShortType, ComponentSizeEnum, ComponentType, ConcurrencyInterceptor, ConcurrencyStoreService, ConditionOperatorType, CustomInputStateEnum, CustomInputStateEnumLabel, DateFormatEnum, DateFormatLabelEnum, DateTypeEnum, DateTypeLabelEnum, DependenceActionType, EApplicationActions, EFFECTS, InnTypeEnum, InnTypeLabelEnum, InputState, LogicalOperatorType, OBJECT_ID_NAME, ObjectFormEffects, ObjectFormModule, SECTION_SYS_NAME_NAME, STATE_NAME, SharedFormModule, TEMPLATE_SYS_NAME_NAME, TemplateComponentsGroupTypeEnum, TemplateComponentsGroupTypeLabels, TemplateStatus, ValueType, conditionOperatorTypeLabel, getConditionOperatorsList, getDependenceActionsList, getTemplateStatusText, initialObjectFormState, initialSharedFormState, isNullOrUndefined, isNumeric, objectForm_actions as objectFormActions, objectForm_selector as objectFormSelectors, objectReducer, sharedFormReducer, sharedForm_selector as sharedSelectors };
|
|
2402
|
+
export { ComponentShortType, ComponentSizeEnum, ComponentType, ConcurrencyInterceptor, ConcurrencyStoreService, ConditionOperatorType, CustomInputStateEnum, CustomInputStateEnumLabel, DateFormatEnum, DateFormatLabelEnum, DateTypeEnum, DateTypeLabelEnum, DependenceActionType, EApplicationActions, EFFECTS, InnTypeEnum, InnTypeLabelEnum, InputState, InputTableComponent, InputTableModalComponent, LogicalOperatorType, OBJECT_ID_NAME, ObjectFormEffects, ObjectFormModule, SECTION_SYS_NAME_NAME, STATE_NAME, SharedFormModule, TEMPLATE_SYS_NAME_NAME, TemplateComponentsGroupTypeEnum, TemplateComponentsGroupTypeLabels, TemplateStatus, ValueType, conditionOperatorTypeLabel, getConditionOperatorsList, getDependenceActionsList, getTemplateStatusText, initialObjectFormState, initialSharedFormState, isNullOrUndefined, isNumeric, objectForm_actions as objectFormActions, objectForm_selector as objectFormSelectors, objectReducer, sharedFormReducer, sharedForm_selector as sharedSelectors };
|
|
2369
2403
|
//# sourceMappingURL=myrtex-org-form.mjs.map
|