dolfo-angular 1.231.0 → 1.233.0
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.
|
@@ -1174,6 +1174,7 @@ class Formable extends Subscriptable {
|
|
|
1174
1174
|
this.formRef.form.get(passwordControlName).markAsTouched();
|
|
1175
1175
|
}));
|
|
1176
1176
|
};
|
|
1177
|
+
isLoading$ = () => this.loading$.asObservable();
|
|
1177
1178
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Formable, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1178
1179
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: Formable, isStandalone: true, viewQueries: [{ propertyName: "formRef", first: true, predicate: FormGroupDirective, descendants: true }, { propertyName: "inputs", predicate: BaseFormInput, descendants: true }], usesInheritance: true, ngImport: i0 });
|
|
1179
1180
|
}
|
|
@@ -2534,7 +2535,11 @@ class GridComponent {
|
|
|
2534
2535
|
col.onLink(colValue);
|
|
2535
2536
|
}
|
|
2536
2537
|
};
|
|
2537
|
-
isToolbarBtnDisabled = (disabled) =>
|
|
2538
|
+
isToolbarBtnDisabled = (disabled) => {
|
|
2539
|
+
if (disabled == null)
|
|
2540
|
+
return false;
|
|
2541
|
+
return typeof disabled === "boolean" ? disabled : disabled();
|
|
2542
|
+
};
|
|
2538
2543
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2539
2544
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: GridComponent, isStandalone: false, selector: "dolfo-grid", inputs: { config: "config" }, ngImport: i0, template: "@let loading = config.isLoading$() | async;\r\n\r\n<div class=\"grid-container\" [class.loading]=\"loading\">\r\n @if(loading){\r\n <div class=\"grid-loading\">\r\n <dolfo-icon name=\"spinner2\"></dolfo-icon>\r\n </div>\r\n }\r\n\r\n <table>\r\n @let columns = config.getColumns();\r\n @let showActions = config.hasActions;\r\n @let selection = config.getSelectionConfig();\r\n @let colSpan = columns.length + (showActions ? 1 : 0) + (selection ? 1 : 0);\r\n \r\n <thead>\r\n @if(config.hasToolbar){\r\n <tr class=\"dolfo-grid-toolbar\">\r\n <th [colSpan]=\"colSpan\">\r\n @for(btn of config.getToolbarButtons(); track btn.label){\r\n <dolfo-button color=\"white\" (onClick)=\"btn.onClick()\" [disabled]=\"isToolbarBtnDisabled(btn.disabled)\">\r\n @if(btn.icon){\r\n <dolfo-icon [name]=\"btn.icon\"></dolfo-icon>\r\n }\r\n\r\n {{ btn.label }}\r\n </dolfo-button>\r\n }\r\n </th>\r\n </tr>\r\n }\r\n\r\n <tr>\r\n @if(selection){\r\n <th [style]=\"{ width: 0 }\">\r\n @if(selection.showSelectAll && selection.type === \"multiple\"){\r\n <input type=\"checkbox\" [checked]=\"config.isAllSelected()\" (change)=\"config.toggleSelectAll()\" />\r\n }\r\n </th>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <th [ngStyle]=\"{ width: col.width + 'px', maxWidth: col.width + 'px' }\">{{ col.label | translate }}</th>\r\n }\r\n \r\n @if(showActions){\r\n <th>{{ \"grid.actions\" | translate }}</th>\r\n }\r\n </tr>\r\n </thead>\r\n \r\n <tbody>\r\n @let list = config.getList$() | async;\r\n \r\n @if(list.length > 0){\r\n @for(item of list; track config.getUniqueId(item)){\r\n @let itemActions = config.getActions$(item) | async;\r\n @let rowClass = config.getRowClass(item);\r\n \r\n <tr (click)=\"config.getEvents()?.onRowClick?.(item)\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\">\r\n @if(selection){\r\n <td [ngClass]=\"rowClass\" class=\"align-center\">\r\n <input type=\"checkbox\" [checked]=\"config.isItemSelected(item)\" (change)=\"config.toggleSelection(item)\" />\r\n </td>\r\n }\r\n\r\n @for(col of columns; track col.label){\r\n <td #cell [ngStyle]=\"{ width: col.width + 'px' }\" [ngClass]=\"rowClass\" [class.align-right]=\"col.align === 'right'\" [class.align-center]=\"col.align === 'center'\" (click)=\"checkLink($event, col, item, cell)\" [innerHTML]=\"resolveField(item, col)\"></td>\r\n }\r\n \r\n @if(showActions){\r\n <td class=\"align-center actions\" [ngClass]=\"rowClass\">\r\n @if(itemActions.length > 0){\r\n <dolfo-button color=\"secondary\" [dolfoTooltip]=\"'grid.showActions' | translate\" [dolfoContextMenu]=\"itemActions\" position=\"bottom-right\" openOnClick>\r\n <dolfo-icon name=\"flickr\"></dolfo-icon>\r\n </dolfo-button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n }@else {\r\n <tr>\r\n <td [colSpan]=\"colSpan\" class=\"align-center\">{{ \"grid.noResults\" | translate }}</td>\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n</div>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: ContextMenuDirective, selector: "[dolfoContextMenu]", inputs: ["dolfoContextMenu", "openOnClick", "useElRef", "position"] }, { kind: "directive", type: TooltipDirective, selector: "[dolfoTooltip]", inputs: ["dolfoTooltip", "direction"] }, { kind: "component", type: ButtonComponent, selector: "dolfo-button", inputs: ["type", "disabled", "color", "loading", "size", "textButton"], outputs: ["onClick", "onBlur", "onFocus"] }, { kind: "component", type: IconWrapperComponent, selector: "dolfo-icon", inputs: ["name"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2540
2545
|
}
|