ngx-techlify-core 11.2.6 → 11.2.7
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/bundles/ngx-techlify-core.umd.js +22 -19
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +1 -1
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/note/note-form/note-form.component.js +4 -3
- package/esm2015/lib/note/note-list/note-list.component.js +12 -11
- package/fesm2015/ngx-techlify-core.js +14 -11
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/note/note-list/note-list.component.d.ts +2 -3
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1937,10 +1937,11 @@
|
|
|
1937
1937
|
};
|
|
1938
1938
|
//Method to trigger login
|
|
1939
1939
|
NoteFormComponent.prototype.submit = function () {
|
|
1940
|
+
var _a;
|
|
1940
1941
|
return __awaiter(this, void 0, void 0, function () {
|
|
1941
|
-
var model, result,
|
|
1942
|
-
return __generator(this, function (
|
|
1943
|
-
switch (
|
|
1942
|
+
var model, result, _b;
|
|
1943
|
+
return __generator(this, function (_c) {
|
|
1944
|
+
switch (_c.label) {
|
|
1944
1945
|
case 0:
|
|
1945
1946
|
this.noteFormFirstAttempt = true;
|
|
1946
1947
|
if (!this.noteFormGroup.valid) return [3 /*break*/, 5];
|
|
@@ -1948,17 +1949,17 @@
|
|
|
1948
1949
|
if (!this.updateMode) return [3 /*break*/, 2];
|
|
1949
1950
|
return [4 /*yield*/, this.noteService.editNote(model)];
|
|
1950
1951
|
case 1:
|
|
1951
|
-
|
|
1952
|
+
_b = _c.sent();
|
|
1952
1953
|
return [3 /*break*/, 4];
|
|
1953
1954
|
case 2: return [4 /*yield*/, this.noteService.addNote(model)];
|
|
1954
1955
|
case 3:
|
|
1955
|
-
|
|
1956
|
-
|
|
1956
|
+
_b = _c.sent();
|
|
1957
|
+
_c.label = 4;
|
|
1957
1958
|
case 4:
|
|
1958
|
-
result =
|
|
1959
|
-
this.alertService.addAlert("
|
|
1959
|
+
result = _b;
|
|
1960
|
+
this.alertService.addAlert(((_a = this.data) === null || _a === void 0 ? void 0 : _a.labelText) + " saved successfully", "success");
|
|
1960
1961
|
this.dialogRef.close(result);
|
|
1961
|
-
|
|
1962
|
+
_c.label = 5;
|
|
1962
1963
|
case 5: return [2 /*return*/];
|
|
1963
1964
|
}
|
|
1964
1965
|
});
|
|
@@ -1980,7 +1981,7 @@
|
|
|
1980
1981
|
NoteFormComponent.decorators = [
|
|
1981
1982
|
{ type: i0.Component, args: [{
|
|
1982
1983
|
selector: 'app-note-form',
|
|
1983
|
-
template: "<form [formGroup]=\"noteFormGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>
|
|
1984
|
+
template: "<form [formGroup]=\"noteFormGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>{{data?.labelText}}</div>\n </div>\n\n <div mat-dialog-content fxLayout=\"column\">\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between\">\n <mat-form-field fxFlex=\"100%\">\n <textarea matInput formControlName=\"note\" placeholder=\"{{data?.labelText}}\" autocomplete=\"off\"\n required></textarea>\n <mat-error *ngIf=\"isFieldValid('note')\">{{\n getErrorMessage(\"note\")\n }}</mat-error>\n </mat-form-field>\n\n <div class=\"my-2\" fxLayout=\"row\" fxLayoutGap=\"30px\" fxLayoutAlign=\"end\" fxFlex=\"100%\">\n <button mat-raised-button type=\"button\" (click)=\"cancel()\">\n Cancel\n </button>\n <button mat-raised-button type=\"submit\" color=\"primary\">Save</button>\n </div>\n </div>\n </div>\n </div>\n</form>",
|
|
1984
1985
|
styles: [""]
|
|
1985
1986
|
},] }
|
|
1986
1987
|
];
|
|
@@ -1994,11 +1995,11 @@
|
|
|
1994
1995
|
]; };
|
|
1995
1996
|
|
|
1996
1997
|
var NoteListComponent = /** @class */ (function () {
|
|
1997
|
-
function NoteListComponent(noteService,
|
|
1998
|
+
function NoteListComponent(noteService, dialog) {
|
|
1998
1999
|
this.noteService = noteService;
|
|
1999
|
-
this.alertService = alertService;
|
|
2000
2000
|
this.dialog = dialog;
|
|
2001
2001
|
this.readonly = false;
|
|
2002
|
+
this.labelText = 'Note';
|
|
2002
2003
|
this.notes = [];
|
|
2003
2004
|
this.displayedColumns = [
|
|
2004
2005
|
'index',
|
|
@@ -2039,7 +2040,8 @@
|
|
|
2039
2040
|
var dialogRef = this.dialog.open(NoteFormComponent, {
|
|
2040
2041
|
width: "400px",
|
|
2041
2042
|
data: {
|
|
2042
|
-
note: { related_model_id: this.relatedModelId, model_type: this.modelType }
|
|
2043
|
+
note: { related_model_id: this.relatedModelId, model_type: this.modelType },
|
|
2044
|
+
labelText: this.labelText,
|
|
2043
2045
|
},
|
|
2044
2046
|
autoFocus: false
|
|
2045
2047
|
});
|
|
@@ -2056,7 +2058,8 @@
|
|
|
2056
2058
|
width: "400px",
|
|
2057
2059
|
data: {
|
|
2058
2060
|
note: note,
|
|
2059
|
-
update: true
|
|
2061
|
+
update: true,
|
|
2062
|
+
labelText: this.labelText
|
|
2060
2063
|
},
|
|
2061
2064
|
autoFocus: false
|
|
2062
2065
|
});
|
|
@@ -2075,8 +2078,8 @@
|
|
|
2075
2078
|
dialogRef = this.dialog.open(ActionPopupComponent, {
|
|
2076
2079
|
width: "400px",
|
|
2077
2080
|
data: {
|
|
2078
|
-
title: "Delete
|
|
2079
|
-
message: "Are you sure to delete
|
|
2081
|
+
title: "Delete " + this.labelText,
|
|
2082
|
+
message: "Are you sure to delete?"
|
|
2080
2083
|
},
|
|
2081
2084
|
autoFocus: false
|
|
2082
2085
|
});
|
|
@@ -2115,19 +2118,19 @@
|
|
|
2115
2118
|
NoteListComponent.decorators = [
|
|
2116
2119
|
{ type: i0.Component, args: [{
|
|
2117
2120
|
selector: 'app-note-list',
|
|
2118
|
-
template: "<div fxLayout=\"column\" fxLayoutGap=\"1.5rem\" class=\"m-4\">\n\n <div fxLayout fxLayoutAlign=\"
|
|
2121
|
+
template: "<div fxLayout=\"column\" fxLayoutGap=\"1.5rem\" class=\"m-4\">\n\n <div fxLayout fxLayoutAlign=\"center center\" fxLayoutGap=\"1rem\">\n <h3 class=\"m-0 font-weight-bold mr-3\">{{labelText}}s</h3>\n <button class=\"d-print-none\" *ngIf=\"!readonly\" mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addNote()\">+ Add</button>\n </div>\n\n <div class=\"w-00 scroll-container\" infiniteScroll [infiniteScrollDistance]=\"1\" [infiniteScrollThrottle]=\"50\"\n (scrolled)=\"onScroll()\" [scrollWindow]=\"false\">\n <table mat-table [dataSource]=\"notes\" class=\"w-100\" multiTemplateDataRows>\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let note; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n\n <ng-container matColumnDef=\"note\">\n <th mat-header-cell *matHeaderCellDef> {{labelText}} </th>\n <td mat-cell *matCellDef=\"let note\">\n {{note?.note}}\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef class=\"d-print-none\"> Actions </th>\n <td mat-cell *matCellDef=\"let note\" class=\"d-print-none\">\n <button type=\"button\" mat-icon-button (click)=\"editNote(note)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"deleteNote(note)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </div>\n\n</div>",
|
|
2119
2122
|
styles: [".scroll-container{max-height:400px;overflow-y:auto}"]
|
|
2120
2123
|
},] }
|
|
2121
2124
|
];
|
|
2122
2125
|
NoteListComponent.ctorParameters = function () { return [
|
|
2123
2126
|
{ type: NoteService },
|
|
2124
|
-
{ type: AlertService },
|
|
2125
2127
|
{ type: dialog.MatDialog }
|
|
2126
2128
|
]; };
|
|
2127
2129
|
NoteListComponent.propDecorators = {
|
|
2128
2130
|
relatedModelId: [{ type: i0.Input }],
|
|
2129
2131
|
modelType: [{ type: i0.Input }],
|
|
2130
|
-
readonly: [{ type: i0.Input }]
|
|
2132
|
+
readonly: [{ type: i0.Input }],
|
|
2133
|
+
labelText: [{ type: i0.Input }]
|
|
2131
2134
|
};
|
|
2132
2135
|
|
|
2133
2136
|
var SearchableSelectorComponent_1;
|