@pepperi-addons/ngx-composite-lib 0.0.16-beta.4 → 0.0.16-beta.42
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/pepperi-addons-ngx-composite-lib-color-settings.umd.js +10 -1
- package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js +393 -0
- package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js.map +1 -0
- package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js +15 -10
- package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js +91 -58
- package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +119 -74
- package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +5 -2
- package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js.map +1 -1
- package/bundles/pepperi-addons-ngx-composite-lib.umd.js +114 -50
- package/bundles/pepperi-addons-ngx-composite-lib.umd.js.map +1 -1
- package/color-settings/color-settings.component.d.ts +4 -1
- package/core/common/directives/reset-configuration-field.directive.d.ts +1 -0
- package/core/common/services/dimx.service.d.ts +32 -0
- package/core/common/services/public-api.d.ts +1 -0
- package/data-view-builder/data-view-builder.component.d.ts +35 -0
- package/data-view-builder/data-view-builder.model.d.ts +1 -0
- package/data-view-builder/data-view-builder.module.d.ts +23 -0
- package/data-view-builder/data-view-builder.service.d.ts +14 -0
- package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +36 -0
- package/data-view-builder/package.json +10 -0
- package/{dimx-export/pepperi-addons-ngx-composite-lib-dimx-export.d.ts → data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.d.ts} +1 -1
- package/data-view-builder/public-api.d.ts +3 -0
- package/esm2015/color-settings/color-settings.component.js +11 -2
- package/esm2015/core/common/directives/reset-configuration-field.directive.js +26 -22
- package/esm2015/core/common/services/dimx.service.js +50 -0
- package/esm2015/core/common/services/public-api.js +2 -1
- package/esm2015/data-view-builder/data-view-builder.component.js +122 -0
- package/esm2015/data-view-builder/data-view-builder.model.js +2 -0
- package/esm2015/data-view-builder/data-view-builder.module.js +82 -0
- package/esm2015/data-view-builder/data-view-builder.service.js +39 -0
- package/esm2015/data-view-builder/menu-data-view/menu-data-view.component.js +122 -0
- package/esm2015/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.js +5 -0
- package/esm2015/data-view-builder/public-api.js +7 -0
- package/esm2015/file-status-panel/file-status-panel.module.js +12 -4
- package/esm2015/generic-form/generic-form.component.js +86 -55
- package/esm2015/generic-form/generic-form.model.js +1 -1
- package/esm2015/generic-form/index.js +5 -0
- package/esm2015/generic-list/generic-list.component.js +65 -36
- package/esm2015/generic-list/generic-list.model.js +1 -1
- package/esm2015/generic-list/generic-list.module.js +7 -4
- package/esm2015/generic-list/generic-list.service.js +23 -10
- package/esm2015/group-buttons-settings/group-buttons-settings.component.js +2 -2
- package/esm2015/group-buttons-settings/group-buttons-settings.module.js +6 -3
- package/esm2015/ngx-composite-lib.module.js +19 -8
- package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js +10 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js +360 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js.map +1 -0
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js +12 -5
- package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js +85 -55
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +88 -44
- package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +6 -3
- package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js.map +1 -1
- package/fesm2015/pepperi-addons-ngx-composite-lib.js +117 -54
- package/fesm2015/pepperi-addons-ngx-composite-lib.js.map +1 -1
- package/file-status-panel/file-status-panel.module.d.ts +3 -0
- package/generic-form/generic-form.component.d.ts +12 -12
- package/generic-form/generic-form.model.d.ts +12 -13
- package/{dimx-export → generic-form}/index.d.ts +0 -0
- package/generic-list/generic-list.component.d.ts +11 -9
- package/generic-list/generic-list.model.d.ts +10 -6
- package/generic-list/generic-list.service.d.ts +2 -1
- package/group-buttons-settings/group-buttons-settings.module.d.ts +2 -1
- package/ngx-composite-lib.module.d.ts +4 -2
- package/package.json +2 -2
- package/src/assets/i18n/en.ngx-composite-lib.json +24 -1
- package/src/core/style/components/data-view-builder.scss +65 -0
- package/styling.scss +5 -1
- package/bundles/pepperi-addons-ngx-composite-lib-dimx-export.umd.js +0 -890
- package/bundles/pepperi-addons-ngx-composite-lib-dimx-export.umd.js.map +0 -1
- package/dimx-export/dimx.component.d.ts +0 -86
- package/dimx-export/dimx.model.d.ts +0 -5
- package/dimx-export/dimx.module.d.ts +0 -16
- package/dimx-export/dimx.service.d.ts +0 -21
- package/dimx-export/package.json +0 -16
- package/dimx-export/public-api.d.ts +0 -3
- package/esm2015/dimx-export/dimx.component.js +0 -335
- package/esm2015/dimx-export/dimx.model.js +0 -8
- package/esm2015/dimx-export/dimx.module.js +0 -53
- package/esm2015/dimx-export/dimx.service.js +0 -50
- package/esm2015/dimx-export/index.js +0 -5
- package/esm2015/dimx-export/pepperi-addons-ngx-composite-lib-dimx-export.js +0 -5
- package/esm2015/dimx-export/public-api.js +0 -7
- package/fesm2015/pepperi-addons-ngx-composite-lib-dimx-export.js +0 -446
- package/fesm2015/pepperi-addons-ngx-composite-lib-dimx-export.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@pepperi-addons/ngx-lib'), require('rxjs'), require('@pepperi-addons/ngx-lib/list'), require('@pepperi-addons/papi-sdk/dist/entities/data-view'), require('@ngx-translate/core'), require('@pepperi-addons/ngx-lib/query-builder'), require('@pepperi-addons/data-views'), require('@pepperi-addons/ngx-lib/page-layout'), require('@pepperi-addons/ngx-lib/top-bar'), require('@pepperi-addons/ngx-lib/search'), require('@pepperi-addons/ngx-lib/side-bar'), require('@pepperi-addons/ngx-lib/smart-filters'), require('@pepperi-addons/ngx-lib/bread-crumbs'), require('@pepperi-addons/ngx-lib/form'), require('@pepperi-addons/ngx-lib/menu')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@pepperi-addons/ngx-composite-lib/generic-list', ['exports', '@angular/core', '@angular/common', '@pepperi-addons/ngx-lib', 'rxjs', '@pepperi-addons/ngx-lib/list', '@pepperi-addons/papi-sdk/dist/entities/data-view', '@ngx-translate/core', '@pepperi-addons/ngx-lib/query-builder', '@pepperi-addons/data-views', '@pepperi-addons/ngx-lib/page-layout', '@pepperi-addons/ngx-lib/top-bar', '@pepperi-addons/ngx-lib/search', '@pepperi-addons/ngx-lib/side-bar', '@pepperi-addons/ngx-lib/smart-filters', '@pepperi-addons/ngx-lib/bread-crumbs', '@pepperi-addons/ngx-lib/form', '@pepperi-addons/ngx-lib/menu'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["pepperi-addons"] = global["pepperi-addons"] || {}, global["pepperi-addons"]["ngx-composite-lib"] = global["pepperi-addons"]["ngx-composite-lib"] || {}, global["pepperi-addons"]["ngx-composite-lib"]["generic-list"] = {}), global.ng.core, global.ng.common, global["ngx-lib"], global.rxjs, global["ngx-lib/list"], global["papi-sdk/data-view"], global.translate, global
|
|
5
|
-
})(this, (function (exports, i0,
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["pepperi-addons"] = global["pepperi-addons"] || {}, global["pepperi-addons"]["ngx-composite-lib"] = global["pepperi-addons"]["ngx-composite-lib"] || {}, global["pepperi-addons"]["ngx-composite-lib"]["generic-list"] = {}), global.ng.core, global.ng.common, global["ngx-lib"], global.rxjs, global["ngx-lib/list"], global["papi-sdk/data-view"], global.translate, global["ngx-lib/query-builder"], global["data-views"], global["ngx-lib/page-layout"], global["ngx-lib/top-bar"], global["ngx-lib/search"], global["ngx-lib/side-bar"], global["ngx-lib/smart-filters"], global["ngx-lib/bread-crumbs"], global["ngx-lib/form"], global["ngx-lib/menu"]));
|
|
5
|
+
})(this, (function (exports, i0, i10, i1, rxjs, i5, dataView, i1$1, i2, dataViews, i3, i4, i6, i7, i8, i9, form, menu) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var
|
|
26
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
27
27
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1);
|
|
28
|
-
var
|
|
28
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
29
29
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
30
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
31
32
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
32
|
-
var
|
|
33
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
33
34
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
34
35
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
35
36
|
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
36
|
-
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
37
37
|
|
|
38
38
|
/*! *****************************************************************************
|
|
39
39
|
Copyright (c) Microsoft Corporation.
|
|
@@ -368,20 +368,33 @@
|
|
|
368
368
|
PepGenericListService.prototype.hasProperty = function (obj, prop) {
|
|
369
369
|
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
370
370
|
};
|
|
371
|
-
PepGenericListService.prototype.
|
|
371
|
+
PepGenericListService.prototype.getListViewType = function (dataViewType) {
|
|
372
|
+
switch (dataViewType) {
|
|
373
|
+
case 'Grid':
|
|
374
|
+
return 'table';
|
|
375
|
+
case 'Card':
|
|
376
|
+
return 'cards';
|
|
377
|
+
case 'Line':
|
|
378
|
+
return 'lines';
|
|
379
|
+
default:
|
|
380
|
+
return 'table';
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
PepGenericListService.prototype.convertToPepRowData = function (item, dataView$1, uuidMapping) {
|
|
384
|
+
var _a;
|
|
372
385
|
var row = new i1.PepRowData();
|
|
373
386
|
var itemFields;
|
|
374
|
-
if (this.hasProperty(
|
|
375
|
-
itemFields =
|
|
376
|
-
if (
|
|
387
|
+
if (this.hasProperty(item, 'fields') && typeof item.fields === 'object') {
|
|
388
|
+
itemFields = item.fields;
|
|
389
|
+
if (item.isEditable === false) {
|
|
377
390
|
row.IsEditable = false;
|
|
378
391
|
}
|
|
379
|
-
if (
|
|
392
|
+
if (item.isSelectableForActions === false) {
|
|
380
393
|
row.IsSelectableForActions = false;
|
|
381
394
|
}
|
|
382
395
|
}
|
|
383
396
|
else {
|
|
384
|
-
itemFields =
|
|
397
|
+
itemFields = item;
|
|
385
398
|
}
|
|
386
399
|
row.UUID = itemFields[uuidMapping] || undefined;
|
|
387
400
|
row.Fields = [];
|
|
@@ -390,13 +403,13 @@
|
|
|
390
403
|
var field = dataView$1.Fields[index];
|
|
391
404
|
row.Fields.push({
|
|
392
405
|
ApiName: field.FieldID,
|
|
393
|
-
Title: this._translate.instant(field.Title),
|
|
406
|
+
Title: field.Title ? this._translate.instant(field.Title) : '',
|
|
394
407
|
XAlignment: 1,
|
|
395
408
|
FormattedValue: (itemFields[field.FieldID] || '').toString(),
|
|
396
409
|
Value: (itemFields[field.FieldID] || '').toString(),
|
|
397
|
-
ColumnWidth: dataView$1.Columns[index].Width,
|
|
410
|
+
ColumnWidth: ((_a = dataView$1.Columns[index]) === null || _a === void 0 ? void 0 : _a.Width) || undefined,
|
|
398
411
|
AdditionalValue: '',
|
|
399
|
-
OptionalValues: [],
|
|
412
|
+
OptionalValues: field.OptionalValues || [],
|
|
400
413
|
FieldType: dataView.DataViewFieldTypes[field.Type],
|
|
401
414
|
ReadOnly: field.ReadOnly,
|
|
402
415
|
Enabled: !field.ReadOnly
|
|
@@ -463,12 +476,14 @@
|
|
|
463
476
|
}], ctorParameters: function () { return [{ type: i1__namespace.TranslateService }, { type: i2__namespace.PepQueryBuilderService }]; } });
|
|
464
477
|
|
|
465
478
|
var GenericListComponent = /** @class */ (function () {
|
|
466
|
-
function GenericListComponent(_resolver, _dataConvertorService, _layoutService,
|
|
479
|
+
function GenericListComponent(_resolver, _dataConvertorService, _layoutService, _loaderService,
|
|
480
|
+
// private _translate: TranslateService,
|
|
481
|
+
_genericListService) {
|
|
467
482
|
var _this = this;
|
|
468
483
|
this._resolver = _resolver;
|
|
469
484
|
this._dataConvertorService = _dataConvertorService;
|
|
470
485
|
this._layoutService = _layoutService;
|
|
471
|
-
this.
|
|
486
|
+
this._loaderService = _loaderService;
|
|
472
487
|
this._genericListService = _genericListService;
|
|
473
488
|
this._dataSource = {
|
|
474
489
|
init: function (params) { return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -494,10 +509,11 @@
|
|
|
494
509
|
this.disabled = false;
|
|
495
510
|
this.addPadding = false;
|
|
496
511
|
this.title = '';
|
|
512
|
+
this.description = '';
|
|
497
513
|
this.inline = false;
|
|
498
514
|
this.showSearch = false;
|
|
499
515
|
this.noDataFoundMsg = '';
|
|
500
|
-
this.selectionType = '
|
|
516
|
+
this.selectionType = 'multi';
|
|
501
517
|
this.supportSorting = false;
|
|
502
518
|
this.pager = {
|
|
503
519
|
type: 'scroll'
|
|
@@ -510,6 +526,7 @@
|
|
|
510
526
|
this.valueChange = new i0.EventEmitter();
|
|
511
527
|
this.breadCrumbItemClick = new i0.EventEmitter();
|
|
512
528
|
this._resize$ = new rxjs.Subscription();
|
|
529
|
+
this._loader$ = new rxjs.Subscription();
|
|
513
530
|
this._dataView = {
|
|
514
531
|
Type: 'Grid'
|
|
515
532
|
};
|
|
@@ -527,6 +544,9 @@
|
|
|
527
544
|
this._resize$ = this._layoutService.onResize$.pipe().subscribe(function (size) {
|
|
528
545
|
//
|
|
529
546
|
});
|
|
547
|
+
this._loader$ = this._loaderService.onChanged$.subscribe(function (status) {
|
|
548
|
+
//
|
|
549
|
+
});
|
|
530
550
|
}
|
|
531
551
|
Object.defineProperty(GenericListComponent.prototype, "pepListContainer", {
|
|
532
552
|
set: function (val) {
|
|
@@ -581,15 +601,16 @@
|
|
|
581
601
|
if (this._pepListContainer.length > 0) {
|
|
582
602
|
this._pepListContainer.remove();
|
|
583
603
|
}
|
|
584
|
-
factory = this._resolver.resolveComponentFactory(
|
|
604
|
+
factory = this._resolver.resolveComponentFactory(i5.PepListComponent);
|
|
585
605
|
componentRef = this._pepListContainer.createComponent(factory);
|
|
586
606
|
this.pepList = componentRef.instance;
|
|
587
607
|
//merge selector inputs with callback inputs
|
|
588
608
|
this.loadTableInputs();
|
|
589
609
|
fromIndex = 0;
|
|
590
610
|
toIndex = 0;
|
|
591
|
-
if (this.
|
|
592
|
-
|
|
611
|
+
if (this._listInputs.pager.type === 'pages') {
|
|
612
|
+
fromIndex = this._listInputs.pager.size * this._listInputs.pager.index;
|
|
613
|
+
toIndex = fromIndex + (this._listInputs.pager.size || i5.DEFAULT_PAGE_SIZE) - 1;
|
|
593
614
|
}
|
|
594
615
|
else {
|
|
595
616
|
toIndex = 100; //TO DO - get value from - this.customList.getTopItems()
|
|
@@ -598,21 +619,22 @@
|
|
|
598
619
|
case 1:
|
|
599
620
|
data = _d.sent();
|
|
600
621
|
this.totalRowCount = (data === null || data === void 0 ? void 0 : data.totalCount) || 0;
|
|
601
|
-
componentRef.instance.viewType =
|
|
602
|
-
componentRef.instance.tableViewType = this.
|
|
603
|
-
componentRef.instance.zebraStripes = this.
|
|
622
|
+
componentRef.instance.viewType = this._genericListService.getListViewType(this._dataView.Type);
|
|
623
|
+
componentRef.instance.tableViewType = this._listInputs.tableViewType;
|
|
624
|
+
componentRef.instance.zebraStripes = this._listInputs.zebraStripes;
|
|
604
625
|
if (this.disabled) {
|
|
605
626
|
componentRef.instance.disabled = true;
|
|
606
627
|
componentRef.instance.lockItemInnerEvents = true;
|
|
607
628
|
}
|
|
608
|
-
componentRef.instance.supportSorting = this.
|
|
609
|
-
componentRef.instance.selectionTypeForActions = this.
|
|
610
|
-
componentRef.instance.
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
componentRef.instance.
|
|
629
|
+
componentRef.instance.supportSorting = this._listInputs.supportSorting;
|
|
630
|
+
componentRef.instance.selectionTypeForActions = this._listInputs.selectionType;
|
|
631
|
+
componentRef.instance.showCardSelection = this._listInputs.selectionType !== 'none';
|
|
632
|
+
componentRef.instance.pagerType = this._listInputs.pager.type;
|
|
633
|
+
if (this._listInputs.pager.type === 'pages') {
|
|
634
|
+
componentRef.instance.pageSize = ((_a = this._listInputs.pager) === null || _a === void 0 ? void 0 : _a.size) || i5.DEFAULT_PAGE_SIZE;
|
|
635
|
+
componentRef.instance.pageIndex = ((_b = this._listInputs.pager) === null || _b === void 0 ? void 0 : _b.index) || 0;
|
|
614
636
|
}
|
|
615
|
-
componentRef.instance.noDataFoundMsg = this.
|
|
637
|
+
componentRef.instance.noDataFoundMsg = this._listInputs.noDataFoundMsg;
|
|
616
638
|
componentRef.instance.fieldClick.subscribe(function ($event) {
|
|
617
639
|
_this.onCustomizeFieldClick($event);
|
|
618
640
|
});
|
|
@@ -654,7 +676,7 @@
|
|
|
654
676
|
*/
|
|
655
677
|
GenericListComponent.prototype.loadTableInputs = function () {
|
|
656
678
|
var _this = this;
|
|
657
|
-
this.
|
|
679
|
+
this._listInputs = {
|
|
658
680
|
supportSorting: this.supportSorting,
|
|
659
681
|
selectionType: this.selectionType,
|
|
660
682
|
pager: this.pager,
|
|
@@ -664,8 +686,8 @@
|
|
|
664
686
|
};
|
|
665
687
|
if (this._dataSource.inputs) {
|
|
666
688
|
Object.entries(this._dataSource.inputs).forEach(function (item) {
|
|
667
|
-
if (_this._genericListService.hasProperty(_this.
|
|
668
|
-
_this.
|
|
689
|
+
if (_this._genericListService.hasProperty(_this._listInputs, item[0])) {
|
|
690
|
+
_this._listInputs[item[0]] = item[1];
|
|
669
691
|
}
|
|
670
692
|
});
|
|
671
693
|
}
|
|
@@ -681,7 +703,7 @@
|
|
|
681
703
|
};
|
|
682
704
|
GenericListComponent.prototype.loadMenuItems = function () {
|
|
683
705
|
var _this = this;
|
|
684
|
-
if (this.
|
|
706
|
+
if (this._listInputs.selectionType !== 'none') {
|
|
685
707
|
this.getMenuActions().then(function (x) { return _this.menuActions = x; });
|
|
686
708
|
}
|
|
687
709
|
};
|
|
@@ -716,7 +738,7 @@
|
|
|
716
738
|
GenericListComponent.prototype.getMenuObjects = function () {
|
|
717
739
|
var menuObjects = {
|
|
718
740
|
success: false,
|
|
719
|
-
data: new
|
|
741
|
+
data: new i5.PepSelectionData()
|
|
720
742
|
};
|
|
721
743
|
if (this.pepList) {
|
|
722
744
|
menuObjects.success = true;
|
|
@@ -736,18 +758,25 @@
|
|
|
736
758
|
var _this = this;
|
|
737
759
|
return __generator(this, function (_d) {
|
|
738
760
|
switch (_d.label) {
|
|
739
|
-
case 0:
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
761
|
+
case 0:
|
|
762
|
+
setTimeout(function () {
|
|
763
|
+
_this._loaderService.show();
|
|
764
|
+
}, 150);
|
|
765
|
+
return [4 /*yield*/, this._dataSource.init({
|
|
766
|
+
searchString: this.searchString || undefined,
|
|
767
|
+
filters: this._appliedFilters.length ? this._appliedFilters : undefined,
|
|
768
|
+
sorting: this._sorting || undefined,
|
|
769
|
+
fromIndex: fromIndex,
|
|
770
|
+
toIndex: toIndex
|
|
771
|
+
})];
|
|
746
772
|
case 1:
|
|
747
773
|
data = _d.sent();
|
|
774
|
+
setTimeout(function () {
|
|
775
|
+
_this._loaderService.hide();
|
|
776
|
+
}, 150);
|
|
748
777
|
if (data) {
|
|
749
778
|
this._dataView = data.dataView;
|
|
750
|
-
if (((_a = data.items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
779
|
+
if (((_a = data.items) === null || _a === void 0 ? void 0 : _a.length) > 0 && !data.isPepRowData) {
|
|
751
780
|
data.items = data.items.map(function (item) { return _this._genericListService.convertToPepRowData(item, data.dataView, _this.uuidMapping); });
|
|
752
781
|
}
|
|
753
782
|
}
|
|
@@ -765,6 +794,9 @@
|
|
|
765
794
|
switch (_d.label) {
|
|
766
795
|
case 0:
|
|
767
796
|
if (!this._dataSource.update) return [3 /*break*/, 2];
|
|
797
|
+
setTimeout(function () {
|
|
798
|
+
_this._loaderService.show();
|
|
799
|
+
}, 150);
|
|
768
800
|
return [4 /*yield*/, this._dataSource.update({
|
|
769
801
|
searchString: this.searchString || undefined,
|
|
770
802
|
filters: this._appliedFilters.length ? this._appliedFilters : undefined,
|
|
@@ -775,6 +807,9 @@
|
|
|
775
807
|
})];
|
|
776
808
|
case 1:
|
|
777
809
|
dataList = _d.sent();
|
|
810
|
+
setTimeout(function () {
|
|
811
|
+
_this._loaderService.hide();
|
|
812
|
+
}, 150);
|
|
778
813
|
if ((dataList === null || dataList === void 0 ? void 0 : dataList.length) > 0) {
|
|
779
814
|
return [2 /*return*/, dataList.map(function (item) { return _this._genericListService.convertToPepRowData(item, _this._dataView, _this.uuidMapping); })];
|
|
780
815
|
}
|
|
@@ -843,6 +878,9 @@
|
|
|
843
878
|
return null;
|
|
844
879
|
}
|
|
845
880
|
};
|
|
881
|
+
GenericListComponent.prototype.getPageIndex = function () {
|
|
882
|
+
return this.pepList.pageIndex;
|
|
883
|
+
};
|
|
846
884
|
GenericListComponent.prototype.onActionItemClicked = function (action) {
|
|
847
885
|
var result = this.getMenuObjects();
|
|
848
886
|
if (result.success) {
|
|
@@ -881,11 +919,14 @@
|
|
|
881
919
|
if (this._resize$) {
|
|
882
920
|
this._resize$.unsubscribe();
|
|
883
921
|
}
|
|
922
|
+
if (this._loader$) {
|
|
923
|
+
this._loader$.unsubscribe();
|
|
924
|
+
}
|
|
884
925
|
};
|
|
885
926
|
return GenericListComponent;
|
|
886
927
|
}());
|
|
887
|
-
GenericListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i1__namespace$1.PepDataConvertorService }, { token: i1__namespace$1.PepLayoutService }, { token: i1__namespace.
|
|
888
|
-
GenericListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: GenericListComponent, selector: "pep-generic-list", inputs: { dataSource: "dataSource", actions: "actions", uuidMapping: "uuidMapping", disabled: "disabled", addPadding: "addPadding", title: "title", inline: "inline", showSearch: "showSearch", noDataFoundMsg: "noDataFoundMsg", selectionType: "selectionType", supportSorting: "supportSorting", pager: "pager", tableViewType: "tableViewType", zebraStripes: "zebraStripes", smartFilter: "smartFilter", showTopBar: "showTopBar", breadCrumbsItems: "breadCrumbsItems" }, outputs: { fieldClick: "fieldClick", valueChange: "valueChange", breadCrumbItemClick: "breadCrumbItemClick" }, providers: [PepGenericListService], viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true }, { propertyName: "pepListContainer", first: true, predicate: ["pepListContainer"], descendants: true, read: i0.ViewContainerRef }], ngImport: i0__namespace, template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"header-area\">\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"breadCrumbsItems.length\">\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showSmartFilter\">\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n</div>\n
|
|
928
|
+
GenericListComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, deps: [{ token: i0__namespace.ComponentFactoryResolver }, { token: i1__namespace$1.PepDataConvertorService }, { token: i1__namespace$1.PepLayoutService }, { token: i1__namespace$1.PepLoaderService }, { token: PepGenericListService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
929
|
+
GenericListComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: GenericListComponent, selector: "pep-generic-list", inputs: { dataSource: "dataSource", actions: "actions", uuidMapping: "uuidMapping", disabled: "disabled", addPadding: "addPadding", title: "title", description: "description", inline: "inline", showSearch: "showSearch", noDataFoundMsg: "noDataFoundMsg", selectionType: "selectionType", supportSorting: "supportSorting", pager: "pager", tableViewType: "tableViewType", zebraStripes: "zebraStripes", smartFilter: "smartFilter", showTopBar: "showTopBar", breadCrumbsItems: "breadCrumbsItems" }, outputs: { fieldClick: "fieldClick", valueChange: "valueChange", breadCrumbItemClick: "breadCrumbItemClick" }, providers: [PepGenericListService], viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true }, { propertyName: "pepListContainer", first: true, predicate: ["pepListContainer"], descendants: true, read: i0.ViewContainerRef }], ngImport: i0__namespace, template: "<div *ngIf=\"inline\" class=\"inline-container\" [ngClass]=\"{ 'add-padding': addPadding }\">\n <div class=\"header-area\" >\n <div *ngIf=\"showTopBar\" class=\"inline-top-bar-container\">\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </div>\n <ng-container *ngIf=\"description\">\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\">\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"showSmartFilter\">\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n</div>\n<pep-page-layout *ngIf=\"!inline\" class=\"none-inline\" [addPadding]=\"addPadding\" [showShadow]=\"showSmartFilter\">\n <ng-container *ngIf=\"showSmartFilter\" pep-side-area>\n <ng-container *ngTemplateOutlet=\"smartFilterTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"showTopBar\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"topBarTemplate\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"description\" pep-top-area>\n <div class=\"list-description\">{{description}}</div>\n </ng-container>\n <ng-container *ngIf=\"breadCrumbsItems.length\" pep-top-area>\n <ng-container *ngTemplateOutlet=\"breadCrumbsTemplate\"></ng-container>\n </ng-container>\n <div pep-main-area class=\"main-area-container\">\n <ng-container *ngTemplateOutlet=\"listTemplate\"></ng-container>\n </div>\n</pep-page-layout>\n\n<ng-template #topBarTemplate>\n <pep-top-bar [title]=\"title\" [inline]=\"inline\">\n <div header-start-content>\n <ng-content select=\"[left-buttons]\"></ng-content>\n </div>\n <div header-end-content>\n <ng-content select=\"[right-buttons]\"></ng-content>\n </div>\n <!-- <div footer-start-content>\n <ng-content select=\"[left-bottom-area]\"></ng-content> \n </div>\n <div footer-end-content>\n <ng-content select=\"[right-bottom-area]\"></ng-content> \n </div> -->\n <pep-list-actions *ngIf=\"menuActions.length > 0\" [sizeType]=\"inline ? 'sm' : 'md'\" [actions]=\"menuActions\"\n (actionClick)=\"onActionItemClicked($event)\"></pep-list-actions>\n <pep-list-total [sizeType]=\"inline ? 'sm' : 'md'\" [totalRows]=\"totalRowCount\">\n </pep-list-total>\n <pep-search #search *ngIf=\"showSearch\" [value]=\"searchString\" [sizeType]=\"inline ? 'sm' : 'md'\"\n (search)=\"onSearchChanged($event)\">\n </pep-search>\n </pep-top-bar>\n</ng-template>\n\n<ng-template #smartFilterTemplate>\n <pep-side-bar #sideNav [ngClass]=\"{'smart-filter-area': inline}\">\n <pep-smart-filters title=\"Test filters\" [fields]=\"internalSmartFilter.fields\"\n [filters]=\"internalSmartFilter.data\" (filtersChange)=\"onFiltersChange($event)\">\n </pep-smart-filters>\n </pep-side-bar>\n</ng-template>\n\n<ng-template #breadCrumbsTemplate>\n <pep-bread-crumbs class=\"bread-crumbs\" [items]=\"breadCrumbsItems\" [addSpacing]=\"true\" [displayType]=\"'items'\"\n (itemClick)=\"onBreadCrumbItemClick($event)\"></pep-bread-crumbs>\n</ng-template>\n\n<ng-template #listTemplate>\n <div class=\"list-container\">\n <ng-container #pepListContainer></ng-container>\n </div>\n</ng-template>", styles: [":host{height:inherit;display:block}.main-area-container{display:grid;height:inherit}.list-container{height:100%}.inline-container{height:inherit;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto 1fr}.inline-container.add-padding{padding-inline:var(--pep-spacing-lg, 1rem)}.inline-container .header-area{grid-column:2/3;grid-row:1/2}.inline-container .smart-filter-area{grid-column:1/2;grid-row:1/3}.inline-container .list-container{grid-column:2/3;grid-row:2/3}.inline-container .list-description{font-size:var(--pep-font-size-xs, .75rem);max-width:640px;padding:var(--pep-spacing-sm, .5rem) 0}.inline-container .bread-crumbs{padding:var(--pep-spacing-md, .75rem) 0 var(--pep-spacing-sm, .5rem) 0}.none-inline .list-description{font-size:var(--pep-font-size-sm, .875rem);max-width:720px;padding:var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}.none-inline .bread-crumbs{padding:var(--pep-spacing-md, .75rem) var(--pep-spacing-xs, .25rem) var(--pep-spacing-sm, .5rem) var(--pep-spacing-xs, .25rem)}::ng-deep .pep-top-bar-container:not(.inline){margin-inline:var(--pep-spacing-xs, .25rem)}::ng-deep .pep-top-bar-container.inline{height:var(--pep-top-bar-field-height, 2.5rem)!important}.noDataFoundMsg{margin:1rem 0;height:calc(100% - 2rem);width:100%;background:hsla(0deg,0%,10%,.12);display:flex;justify-content:center;align-items:center}\n"], components: [{ type: i3__namespace.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { type: i4__namespace.PepTopBarComponent, selector: "pep-top-bar", inputs: ["inline", "title"], outputs: ["footerStateChange"] }, { type: i5__namespace.PepListActionsComponent, selector: "pep-list-actions", inputs: ["actions", "sizeType", "xPosition", "hidden"], outputs: ["actionClick", "stateChange", "menuClick"] }, { type: i5__namespace.PepListTotalComponent, selector: "pep-list-total", inputs: ["totalRows", "totalAmount", "isMapView", "sizeType"] }, { type: i6__namespace.PepSearchComponent, selector: "pep-search", inputs: ["triggerOn", "autoCompleteTop", "sizeType", "autoCompleteValues", "shrink", "value", "searchControl", "useAsWebComponent"], outputs: ["search", "autocompleteChange", "stateChange"] }, { type: i7__namespace.PepSideBarComponent, selector: "pep-side-bar", inputs: ["ignoreResize", "showHeader", "showFooter", "useAsWebComponent"], outputs: ["stateChange"] }, { type: i8__namespace.PepSmartFiltersComponent, selector: "pep-smart-filters", inputs: ["title", "filters", "fields", "useAsWebComponent"], outputs: ["filtersChange", "fieldToggleChange"] }, { type: i9__namespace.PepBreadCrumbsComponent, selector: "pep-bread-crumbs", inputs: ["addSpacing", "items", "displayType"], outputs: ["itemClick"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i10__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
889
930
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: GenericListComponent, decorators: [{
|
|
890
931
|
type: i0.Component,
|
|
891
932
|
args: [{
|
|
@@ -894,7 +935,7 @@
|
|
|
894
935
|
styleUrls: ['./generic-list.component.scss'],
|
|
895
936
|
providers: [PepGenericListService]
|
|
896
937
|
}]
|
|
897
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i1__namespace$1.PepDataConvertorService }, { type: i1__namespace$1.PepLayoutService }, { type: i1__namespace.
|
|
938
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ComponentFactoryResolver }, { type: i1__namespace$1.PepDataConvertorService }, { type: i1__namespace$1.PepLayoutService }, { type: i1__namespace$1.PepLoaderService }, { type: PepGenericListService }]; }, propDecorators: { search: [{
|
|
898
939
|
type: i0.ViewChild,
|
|
899
940
|
args: ['search']
|
|
900
941
|
}], pepListContainer: [{
|
|
@@ -912,6 +953,8 @@
|
|
|
912
953
|
type: i0.Input
|
|
913
954
|
}], title: [{
|
|
914
955
|
type: i0.Input
|
|
956
|
+
}], description: [{
|
|
957
|
+
type: i0.Input
|
|
915
958
|
}], inline: [{
|
|
916
959
|
type: i0.Input
|
|
917
960
|
}], showSearch: [{
|
|
@@ -948,29 +991,31 @@
|
|
|
948
991
|
return PepGenericListModule;
|
|
949
992
|
}());
|
|
950
993
|
PepGenericListModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
951
|
-
PepGenericListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, declarations: [GenericListComponent], imports: [
|
|
994
|
+
PepGenericListModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, declarations: [GenericListComponent], imports: [i10.CommonModule,
|
|
952
995
|
i1.PepNgxLibModule,
|
|
953
|
-
|
|
996
|
+
i5.PepListModule,
|
|
954
997
|
form.PepFormModule,
|
|
955
998
|
menu.PepMenuModule,
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
PepGenericListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule,
|
|
963
|
-
|
|
999
|
+
i3.PepPageLayoutModule,
|
|
1000
|
+
i4.PepTopBarModule,
|
|
1001
|
+
i7.PepSideBarModule,
|
|
1002
|
+
i6.PepSearchModule,
|
|
1003
|
+
i9.PepBreadCrumbsModule,
|
|
1004
|
+
i8.PepSmartFiltersModule], exports: [GenericListComponent] });
|
|
1005
|
+
PepGenericListModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, providers: [
|
|
1006
|
+
PepGenericListService
|
|
1007
|
+
], imports: [[
|
|
1008
|
+
i10.CommonModule,
|
|
964
1009
|
i1.PepNgxLibModule,
|
|
965
|
-
|
|
1010
|
+
i5.PepListModule,
|
|
966
1011
|
form.PepFormModule,
|
|
967
1012
|
menu.PepMenuModule,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
1013
|
+
i3.PepPageLayoutModule,
|
|
1014
|
+
i4.PepTopBarModule,
|
|
1015
|
+
i7.PepSideBarModule,
|
|
1016
|
+
i6.PepSearchModule,
|
|
1017
|
+
i9.PepBreadCrumbsModule,
|
|
1018
|
+
i8.PepSmartFiltersModule
|
|
974
1019
|
]] });
|
|
975
1020
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepGenericListModule, decorators: [{
|
|
976
1021
|
type: i0.NgModule,
|
|
@@ -979,24 +1024,24 @@
|
|
|
979
1024
|
GenericListComponent
|
|
980
1025
|
],
|
|
981
1026
|
imports: [
|
|
982
|
-
|
|
1027
|
+
i10.CommonModule,
|
|
983
1028
|
i1.PepNgxLibModule,
|
|
984
|
-
|
|
1029
|
+
i5.PepListModule,
|
|
985
1030
|
form.PepFormModule,
|
|
986
1031
|
menu.PepMenuModule,
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1032
|
+
i3.PepPageLayoutModule,
|
|
1033
|
+
i4.PepTopBarModule,
|
|
1034
|
+
i7.PepSideBarModule,
|
|
1035
|
+
i6.PepSearchModule,
|
|
1036
|
+
i9.PepBreadCrumbsModule,
|
|
1037
|
+
i8.PepSmartFiltersModule
|
|
993
1038
|
],
|
|
994
1039
|
exports: [
|
|
995
1040
|
GenericListComponent
|
|
996
|
-
]
|
|
1041
|
+
],
|
|
997
1042
|
providers: [
|
|
998
1043
|
PepGenericListService
|
|
999
|
-
]
|
|
1044
|
+
]
|
|
1000
1045
|
}]
|
|
1001
1046
|
}] });
|
|
1002
1047
|
|