ngx-techlify-core 11.4.8-beta.1 → 11.4.9
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 +36 -31
- 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/entity-files/entity-file-form/entity-file-form.component.js +2 -2
- package/esm2015/lib/entity-files/entity-files-view-all.component.js +6 -2
- package/esm2015/lib/entity-files/entity-files-view-all.module.js +4 -2
- package/esm2015/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.js +2 -2
- package/fesm2015/ngx-techlify-core.js +33 -28
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +2 -2
|
@@ -1760,7 +1760,7 @@
|
|
|
1760
1760
|
EntityFileFormComponent.decorators = [
|
|
1761
1761
|
{ type: i0.Component, args: [{
|
|
1762
1762
|
selector: 'entity-file-form',
|
|
1763
|
-
template: "<form [formGroup]=\"entityFileGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>Entity File</div>\n </div>\n <div mat-dialog-content fxLayout=\"column\" fxLayoutAlign.=\"start\">\n <ng-container *ngIf=\"!hideTitleAndDetails\">\n <mat-form-field>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\">\n </mat-form-field>\n <mat-form-field>\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field modelType=\"entity-file\" formControlName=\"tag_ids\"\n [modelId]=\"entityFileGroup.get('id').value\"></app-techlify-tagger-tag-form-field>\n </mat-form-field>\n </ng-container>\n <ng-template #fileUpload>\n <section fxFlex=\"100%\">\n <div>Entity File*</div>\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n <div class=\"text-danger\" *ngIf=\"isFieldValid('url')\">\n {{getErrorMessage(\"url\")}}\n </div>\n </section>\n </ng-template>\n <div fxFlex=\"100%\" class=\"mt-2\" *ngIf=\"entityFileGroup.get('url').value;else fileUpload;\">\n <app-document-viewer [file]=\"entityFileGroup.get('file').value\" [fileUrl]=\"entityFileGroup.get('url').value\"\n [config]=\"this.viewerConfig\" (remove)=\"removeFile()\" [disableEdit]=\"updateMode\">\n </app-document-viewer>\n </div>\n <div class=\"mt-4 mb-2\" fxLayout=\"row\" fxLayoutGap=\"30px\" fxLayoutAlign=\"end\" fxFlex=\"100%\">\n <button mat-raised-button type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button type=\"submit\" color=\"primary\">Save</button>\n </div>\n </div>\n </div>\n</form>\n",
|
|
1763
|
+
template: "<form [formGroup]=\"entityFileGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>Entity File</div>\n </div>\n <div mat-dialog-content fxLayout=\"column\" fxLayoutAlign.=\"start\">\n <ng-container *ngIf=\"!hideTitleAndDetails\">\n <mat-form-field>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\">\n </mat-form-field>\n <mat-form-field>\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n </mat-form-field>\n </ng-container>\n <ng-container *ngIf=\"useTechlifyTags\">\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <app-techlify-tagger-tag-form-field modelType=\"entity-file\" formControlName=\"tag_ids\"\n [modelId]=\"entityFileGroup.get('id').value\" placeholder=\"Enter new tag\"></app-techlify-tagger-tag-form-field>\n </mat-form-field>\n </ng-container>\n <ng-template #fileUpload>\n <section fxFlex=\"100%\">\n <div>Entity File*</div>\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n <div class=\"text-danger\" *ngIf=\"isFieldValid('url')\">\n {{getErrorMessage(\"url\")}}\n </div>\n </section>\n </ng-template>\n <div fxFlex=\"100%\" class=\"mt-2\" *ngIf=\"entityFileGroup.get('url').value;else fileUpload;\">\n <app-document-viewer [file]=\"entityFileGroup.get('file').value\" [fileUrl]=\"entityFileGroup.get('url').value\"\n [config]=\"this.viewerConfig\" (remove)=\"removeFile()\" [disableEdit]=\"updateMode\">\n </app-document-viewer>\n </div>\n <div class=\"mt-4 mb-2\" fxLayout=\"row\" fxLayoutGap=\"30px\" fxLayoutAlign=\"end\" fxFlex=\"100%\">\n <button mat-raised-button type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button type=\"submit\" color=\"primary\">Save</button>\n </div>\n </div>\n </div>\n</form>\n",
|
|
1764
1764
|
styles: [""]
|
|
1765
1765
|
},] }
|
|
1766
1766
|
];
|
|
@@ -1879,6 +1879,7 @@
|
|
|
1879
1879
|
};
|
|
1880
1880
|
EntityFilesViewAllComponent.prototype.addEntityFile = function () {
|
|
1881
1881
|
var _this = this;
|
|
1882
|
+
this.isWorking = true;
|
|
1882
1883
|
var dialogRef = this.dialog.open(EntityFileFormComponent, {
|
|
1883
1884
|
width: "700px",
|
|
1884
1885
|
data: {
|
|
@@ -1892,6 +1893,7 @@
|
|
|
1892
1893
|
dialogRef.afterClosed().subscribe(function (result) { return __awaiter(_this, void 0, void 0, function () {
|
|
1893
1894
|
var files;
|
|
1894
1895
|
return __generator(this, function (_a) {
|
|
1896
|
+
this.isWorking = false;
|
|
1895
1897
|
if (result) {
|
|
1896
1898
|
files = __spread(this.entityFiles);
|
|
1897
1899
|
files.push(result);
|
|
@@ -1903,6 +1905,7 @@
|
|
|
1903
1905
|
};
|
|
1904
1906
|
EntityFilesViewAllComponent.prototype.editEntityFile = function (file) {
|
|
1905
1907
|
var _this = this;
|
|
1908
|
+
this.isWorking = true;
|
|
1906
1909
|
var dialogRef = this.dialog.open(EntityFileFormComponent, {
|
|
1907
1910
|
width: "700px",
|
|
1908
1911
|
autoFocus: false,
|
|
@@ -1913,6 +1916,7 @@
|
|
|
1913
1916
|
} // Any data passed here will be injected into the model
|
|
1914
1917
|
});
|
|
1915
1918
|
dialogRef.afterClosed().subscribe(function (result) {
|
|
1919
|
+
_this.isWorking = false;
|
|
1916
1920
|
if (result) {
|
|
1917
1921
|
_this.reload();
|
|
1918
1922
|
}
|
|
@@ -2008,7 +2012,7 @@
|
|
|
2008
2012
|
exports.ɵo.decorators = [
|
|
2009
2013
|
{ type: i0.Component, args: [{
|
|
2010
2014
|
selector: 'app-entity-files-view-all',
|
|
2011
|
-
template: "<div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card fxFlex=\"70%\">\n <mat-card-title fxLayout fxLayoutGap=\"1rem\">\n
|
|
2015
|
+
template: "<div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card fxFlex=\"70%\">\n <mat-card-title>\n <div fxLayout fxLayoutGap=\"1rem\">\n <h3 class=\"font-weight-bold primary-color\" fxLayout=\"center center\">\n <mat-icon>\n <span class=\"material-icons\">\n description\n </span>\n </mat-icon>\n {{title}}s\n </h3>\n <div>\n <button type=\"button\" class=\"mx-1\" mat-raised-button color=\"primary\" (click)=\"addEntityFile()\"\n *ngIf=\"!viewOnly\">\n <mat-icon>\n <span class=\"material-icons\">\n add_circle_outline\n </span>\n </mat-icon>\n {{title}}\n </button>\n </div>\n </div>\n </mat-card-title>\n <mat-card-subtitle>\n <form [formGroup]=\"filterFormGroup\" style=\"font-size: 10px;\" fxLayout fxLayoutGap=\"1rem\">\n <mat-form-field *ngIf=\"!removeSearch\" appearance=\"outline\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Search\" name=\"title\" autocomplete=\"off\" />\n <button mat-button *ngIf=\"filters.title\" matSuffix mat-icon-button\n (click)=\"resetFieldValue($event, 'title')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n <mat-form-field appearance=\"outline\" *ngIf=\"useTechlifyTags && !isWorking\">\n <mat-label>Tag</mat-label>\n <app-searchable-selector formControlName=\"tag_ids\" apiUrl=\"api/techlify-tagger-tags\" [multiple]=\"true\"\n placeHolder=\"Tag\">\n </app-searchable-selector>\n <button mat-icon-button matSuffix *ngIf=\"filterFormGroup.get('tag_ids').value.length\"\n (click)=\"resetFieldValue($event, 'tag_ids')\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </form>\n </mat-card-subtitle>\n <mat-card-content class=\"entity-file-card\">\n <table mat-table [dataSource]=\"entityFiles\" class=\"w-100\" matSort multiTemplateDataRows infiniteScroll\n [infiniteScrollDistance]=\"1.5\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n <span>\n {{element.title}}\n </span>\n <span>\n <a href=\"{{element.url}}\" target=\"_blank\" class=\"text-decoration-none text-muted\">\n <button mat-icon-button type=\"button\">\n <mat-icon>download</mat-icon>\n </button>\n </a>\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef> Details </th>\n <td mat-cell *matCellDef=\"let element\">\n <app-read-more [text]=\"element.details\" [maxLength]=\"50\"></app-read-more>\n </td>\n </ng-container>\n\n <!-- File size Column -->\n <ng-container matColumnDef=\"file_size\">\n <th mat-header-cell *matHeaderCellDef> File Size </th>\n <td mat-cell *matCellDef=\"let element\"> {{ sizeOf(element.file_size)}} </td>\n </ng-container>\n\n <!-- Tags Column -->\n <ng-container matColumnDef=\"tag\">\n <th mat-header-cell *matHeaderCellDef> Tag </th>\n <td mat-cell *matCellDef=\"let element\" class=\"p-1\">\n <mat-chip-list aria-label=\"Tags\">\n <mat-chip *ngFor=\"let taggerModel of element.tags\">\n {{taggerModel?.tag?.title}}\n </mat-chip>\n </mat-chip-list>\n </td>\n </ng-container>\n\n <!-- Uploaded On Column -->\n <ng-container matColumnDef=\"uploaded_on\">\n <th mat-header-cell *matHeaderCellDef> Uploaded On </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n {{element.created_at | date: 'mediumDate'}}\n </div>\n <div class=\"text-muted\">\n By {{element.creator?.name}}\n </div>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element\" style=\"min-width:110px\" class=\"text-muted\">\n <button type=\"button\" mat-icon-button (click)=\"editEntityFile(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"deleteEntityFile(element)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </mat-card-content>\n </mat-card>\n <section fxFlex=\"30%\">\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n </section>\n </div>\n</div>\n\n<div fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" class=\"mat-typography p-4\" *ngIf=\"displayMode\">\n <div *ngFor=\"let efile of entityFiles\">\n <app-document-viewer [file]=\"efile.file\" [fileUrl]=\"efile.url\" [config]=\"this.viewerConfig\" [disableEdit]=\"true\">\n </app-document-viewer>\n <a href=\"{{efile.url}}\" target=\"_blank\">\n <button mat-button type=\"button\">View</button>\n </a>\n </div>\n</div>\n",
|
|
2012
2016
|
styles: [""]
|
|
2013
2017
|
},] }
|
|
2014
2018
|
];
|
|
@@ -3912,7 +3916,7 @@
|
|
|
3912
3916
|
this.selectable = true;
|
|
3913
3917
|
this.removable = true;
|
|
3914
3918
|
this.separatorKeysCodes = [keycodes.ENTER, keycodes.COMMA];
|
|
3915
|
-
this.placeholder = '
|
|
3919
|
+
this.placeholder = 'Enter new Tag..';
|
|
3916
3920
|
this.apiUrl = 'api/techlify-tagger-tags';
|
|
3917
3921
|
this.createApiUrl = 'api/techlify-tagger-tags';
|
|
3918
3922
|
this.isCreateable = true;
|
|
@@ -4280,34 +4284,6 @@
|
|
|
4280
4284
|
},] }
|
|
4281
4285
|
];
|
|
4282
4286
|
|
|
4283
|
-
var EntityFilesViewAllModule = /** @class */ (function () {
|
|
4284
|
-
function EntityFilesViewAllModule() {
|
|
4285
|
-
}
|
|
4286
|
-
return EntityFilesViewAllModule;
|
|
4287
|
-
}());
|
|
4288
|
-
EntityFilesViewAllModule.decorators = [
|
|
4289
|
-
{ type: i0.NgModule, args: [{
|
|
4290
|
-
declarations: [EntityFileFormComponent, exports.ɵo],
|
|
4291
|
-
imports: [
|
|
4292
|
-
common.CommonModule,
|
|
4293
|
-
forms.FormsModule,
|
|
4294
|
-
forms.ReactiveFormsModule,
|
|
4295
|
-
flexLayout.FlexLayoutModule,
|
|
4296
|
-
FileDropperModule,
|
|
4297
|
-
DocumentViewerModule,
|
|
4298
|
-
ngxInfiniteScroll.InfiniteScrollModule,
|
|
4299
|
-
ActionPopupModule,
|
|
4300
|
-
MaterialModule,
|
|
4301
|
-
TechlifyTaggerTagFormFieldModule,
|
|
4302
|
-
SearchableSelectorModule
|
|
4303
|
-
],
|
|
4304
|
-
exports: [
|
|
4305
|
-
exports.ɵo
|
|
4306
|
-
],
|
|
4307
|
-
entryComponents: [EntityFileFormComponent]
|
|
4308
|
-
},] }
|
|
4309
|
-
];
|
|
4310
|
-
|
|
4311
4287
|
var ReadMoreComponent = /** @class */ (function () {
|
|
4312
4288
|
function ReadMoreComponent() {
|
|
4313
4289
|
this.maxLength = 100;
|
|
@@ -4370,6 +4346,35 @@
|
|
|
4370
4346
|
},] }
|
|
4371
4347
|
];
|
|
4372
4348
|
|
|
4349
|
+
var EntityFilesViewAllModule = /** @class */ (function () {
|
|
4350
|
+
function EntityFilesViewAllModule() {
|
|
4351
|
+
}
|
|
4352
|
+
return EntityFilesViewAllModule;
|
|
4353
|
+
}());
|
|
4354
|
+
EntityFilesViewAllModule.decorators = [
|
|
4355
|
+
{ type: i0.NgModule, args: [{
|
|
4356
|
+
declarations: [EntityFileFormComponent, exports.ɵo],
|
|
4357
|
+
imports: [
|
|
4358
|
+
common.CommonModule,
|
|
4359
|
+
forms.FormsModule,
|
|
4360
|
+
forms.ReactiveFormsModule,
|
|
4361
|
+
flexLayout.FlexLayoutModule,
|
|
4362
|
+
FileDropperModule,
|
|
4363
|
+
DocumentViewerModule,
|
|
4364
|
+
ngxInfiniteScroll.InfiniteScrollModule,
|
|
4365
|
+
ActionPopupModule,
|
|
4366
|
+
MaterialModule,
|
|
4367
|
+
TechlifyTaggerTagFormFieldModule,
|
|
4368
|
+
SearchableSelectorModule,
|
|
4369
|
+
ReadMoreModule
|
|
4370
|
+
],
|
|
4371
|
+
exports: [
|
|
4372
|
+
exports.ɵo
|
|
4373
|
+
],
|
|
4374
|
+
entryComponents: [EntityFileFormComponent]
|
|
4375
|
+
},] }
|
|
4376
|
+
];
|
|
4377
|
+
|
|
4373
4378
|
var NoteModule = /** @class */ (function () {
|
|
4374
4379
|
function NoteModule() {
|
|
4375
4380
|
}
|