@pepperi-addons/ngx-composite-lib 0.0.16-beta.43 → 0.0.16-beta.44

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.
Files changed (129) hide show
  1. package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js +132 -132
  2. package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js +338 -338
  3. package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js +89 -89
  4. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js +635 -647
  5. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js.map +1 -1
  6. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +998 -1006
  7. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
  8. package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +179 -179
  9. package/bundles/pepperi-addons-ngx-composite-lib-shadow-settings.umd.js +117 -117
  10. package/bundles/pepperi-addons-ngx-composite-lib.umd.js +598 -598
  11. package/color-settings/color-settings.component.d.ts +25 -25
  12. package/color-settings/color-settings.model.d.ts +5 -5
  13. package/color-settings/color-settings.module.d.ts +12 -12
  14. package/color-settings/pepperi-addons-ngx-composite-lib-color-settings.d.ts +5 -5
  15. package/color-settings/public-api.d.ts +3 -3
  16. package/core/common/directives/index.d.ts +1 -1
  17. package/core/common/directives/public-api.d.ts +1 -1
  18. package/core/common/directives/reset-configuration-field.directive.d.ts +39 -39
  19. package/core/common/index.d.ts +1 -1
  20. package/core/common/public-api.d.ts +2 -2
  21. package/core/common/services/dimx.service.d.ts +32 -32
  22. package/core/common/services/index.d.ts +1 -1
  23. package/core/common/services/public-api.d.ts +2 -2
  24. package/core/common/services/utilities.service.d.ts +6 -6
  25. package/core/index.d.ts +1 -1
  26. package/core/public-api.d.ts +1 -1
  27. package/data-view-builder/data-view-builder.component.d.ts +35 -35
  28. package/data-view-builder/data-view-builder.model.d.ts +1 -1
  29. package/data-view-builder/data-view-builder.module.d.ts +23 -23
  30. package/data-view-builder/data-view-builder.service.d.ts +14 -14
  31. package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +36 -36
  32. package/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.d.ts +5 -5
  33. package/data-view-builder/public-api.d.ts +3 -3
  34. package/esm2015/color-settings/color-settings.component.js +90 -90
  35. package/esm2015/color-settings/color-settings.model.js +8 -8
  36. package/esm2015/color-settings/color-settings.module.js +39 -39
  37. package/esm2015/color-settings/pepperi-addons-ngx-composite-lib-color-settings.js +4 -4
  38. package/esm2015/color-settings/public-api.js +6 -6
  39. package/esm2015/core/common/directives/index.js +4 -4
  40. package/esm2015/core/common/directives/public-api.js +4 -4
  41. package/esm2015/core/common/directives/reset-configuration-field.directive.js +139 -139
  42. package/esm2015/core/common/index.js +4 -4
  43. package/esm2015/core/common/public-api.js +5 -5
  44. package/esm2015/core/common/services/dimx.service.js +49 -49
  45. package/esm2015/core/common/services/index.js +4 -4
  46. package/esm2015/core/common/services/public-api.js +5 -5
  47. package/esm2015/core/common/services/utilities.service.js +18 -18
  48. package/esm2015/core/index.js +4 -4
  49. package/esm2015/core/public-api.js +4 -4
  50. package/esm2015/data-view-builder/data-view-builder.component.js +121 -121
  51. package/esm2015/data-view-builder/data-view-builder.model.js +1 -1
  52. package/esm2015/data-view-builder/data-view-builder.module.js +81 -81
  53. package/esm2015/data-view-builder/data-view-builder.service.js +38 -38
  54. package/esm2015/data-view-builder/menu-data-view/menu-data-view.component.js +121 -121
  55. package/esm2015/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.js +4 -4
  56. package/esm2015/data-view-builder/public-api.js +6 -6
  57. package/esm2015/file-status-panel/file-status-panel.component.js +38 -38
  58. package/esm2015/file-status-panel/file-status-panel.model.js +8 -8
  59. package/esm2015/file-status-panel/file-status-panel.module.js +55 -55
  60. package/esm2015/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.js +4 -4
  61. package/esm2015/file-status-panel/public-api.js +6 -6
  62. package/esm2015/generic-form/generic-form.component.js +187 -190
  63. package/esm2015/generic-form/generic-form.model.js +2 -2
  64. package/esm2015/generic-form/generic-form.module.js +73 -73
  65. package/esm2015/generic-form/generic-form.service.js +58 -68
  66. package/esm2015/generic-form/pepperi-addons-ngx-composite-lib-generic-form.js +4 -4
  67. package/esm2015/generic-form/public-api.js +7 -7
  68. package/esm2015/generic-list/generic-list.component.js +438 -446
  69. package/esm2015/generic-list/generic-list.model.js +1 -1
  70. package/esm2015/generic-list/generic-list.module.js +71 -71
  71. package/esm2015/generic-list/generic-list.service.js +126 -126
  72. package/esm2015/generic-list/pepperi-addons-ngx-composite-lib-generic-list.js +4 -4
  73. package/esm2015/generic-list/public-api.js +7 -7
  74. package/esm2015/group-buttons-settings/group-buttons-settings.component.js +134 -134
  75. package/esm2015/group-buttons-settings/group-buttons-settings.model.js +1 -1
  76. package/esm2015/group-buttons-settings/group-buttons-settings.module.js +49 -49
  77. package/esm2015/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +4 -4
  78. package/esm2015/group-buttons-settings/public-api.js +6 -6
  79. package/esm2015/ngx-composite-lib.module.js +55 -55
  80. package/esm2015/pepperi-addons-ngx-composite-lib.js +4 -4
  81. package/esm2015/public-api.js +5 -5
  82. package/esm2015/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.js +4 -4
  83. package/esm2015/shadow-settings/public-api.js +6 -6
  84. package/esm2015/shadow-settings/shadow-settings.component.js +72 -72
  85. package/esm2015/shadow-settings/shadow-settings.model.js +7 -7
  86. package/esm2015/shadow-settings/shadow-settings.module.js +43 -43
  87. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js +122 -122
  88. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js +319 -319
  89. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js +84 -84
  90. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js +290 -302
  91. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js.map +1 -1
  92. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +595 -603
  93. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
  94. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +170 -170
  95. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.js +107 -107
  96. package/fesm2015/pepperi-addons-ngx-composite-lib.js +255 -255
  97. package/file-status-panel/file-status-panel.component.d.ts +14 -14
  98. package/file-status-panel/file-status-panel.model.d.ts +7 -7
  99. package/file-status-panel/file-status-panel.module.d.ts +17 -17
  100. package/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.d.ts +5 -5
  101. package/file-status-panel/public-api.d.ts +3 -3
  102. package/generic-form/generic-form.component.d.ts +44 -46
  103. package/generic-form/generic-form.model.d.ts +34 -34
  104. package/generic-form/generic-form.module.d.ts +13 -13
  105. package/generic-form/generic-form.service.d.ts +15 -16
  106. package/generic-form/pepperi-addons-ngx-composite-lib-generic-form.d.ts +5 -5
  107. package/generic-form/public-api.d.ts +4 -4
  108. package/generic-list/generic-list.component.d.ts +101 -101
  109. package/generic-list/generic-list.model.d.ts +54 -54
  110. package/generic-list/generic-list.module.d.ts +18 -18
  111. package/generic-list/generic-list.service.d.ts +43 -43
  112. package/generic-list/pepperi-addons-ngx-composite-lib-generic-list.d.ts +5 -5
  113. package/generic-list/public-api.d.ts +4 -4
  114. package/group-buttons-settings/group-buttons-settings.component.d.ts +33 -33
  115. package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
  116. package/group-buttons-settings/group-buttons-settings.module.d.ts +15 -15
  117. package/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.d.ts +5 -5
  118. package/group-buttons-settings/public-api.d.ts +3 -3
  119. package/ngx-composite-lib.module.d.ts +13 -13
  120. package/package.json +2 -2
  121. package/pepperi-addons-ngx-composite-lib.d.ts +5 -5
  122. package/public-api.d.ts +2 -2
  123. package/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.d.ts +5 -5
  124. package/shadow-settings/public-api.d.ts +3 -3
  125. package/shadow-settings/shadow-settings.component.d.ts +23 -23
  126. package/shadow-settings/shadow-settings.model.d.ts +7 -7
  127. package/shadow-settings/shadow-settings.module.d.ts +13 -13
  128. package/esm2015/generic-form/index.js +0 -5
  129. package/generic-form/index.d.ts +0 -1
@@ -34,354 +34,354 @@
34
34
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
35
35
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
36
36
 
37
- var DataViewBuilderService = /** @class */ (function () {
38
- function DataViewBuilderService() {
39
- // This subject is for is grabbing mode.
40
- this._isGrabbingSubject = new rxjs.BehaviorSubject(false);
41
- //
42
- }
43
- Object.defineProperty(DataViewBuilderService.prototype, "isGrabbingChange$", {
44
- get: function () {
45
- return this._isGrabbingSubject.asObservable().pipe(operators.distinctUntilChanged());
46
- },
47
- enumerable: false,
48
- configurable: true
49
- });
50
- DataViewBuilderService.prototype.changeCursorOnDragStart = function () {
51
- document.body.classList.add('inheritCursors');
52
- document.body.style.cursor = 'grabbing';
53
- this._isGrabbingSubject.next(true);
54
- };
55
- DataViewBuilderService.prototype.changeCursorOnDragEnd = function () {
56
- document.body.classList.remove('inheritCursors');
57
- document.body.style.cursor = 'unset';
58
- this._isGrabbingSubject.next(false);
59
- };
60
- DataViewBuilderService.prototype.onDragStart = function (event) {
61
- this.changeCursorOnDragStart();
62
- };
63
- DataViewBuilderService.prototype.onDragEnd = function (event) {
64
- this.changeCursorOnDragEnd();
65
- };
66
- return DataViewBuilderService;
67
- }());
68
- DataViewBuilderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
69
- DataViewBuilderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, providedIn: 'root' });
70
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, decorators: [{
71
- type: i0.Injectable,
72
- args: [{
73
- providedIn: 'root'
74
- }]
37
+ var DataViewBuilderService = /** @class */ (function () {
38
+ function DataViewBuilderService() {
39
+ // This subject is for is grabbing mode.
40
+ this._isGrabbingSubject = new rxjs.BehaviorSubject(false);
41
+ //
42
+ }
43
+ Object.defineProperty(DataViewBuilderService.prototype, "isGrabbingChange$", {
44
+ get: function () {
45
+ return this._isGrabbingSubject.asObservable().pipe(operators.distinctUntilChanged());
46
+ },
47
+ enumerable: false,
48
+ configurable: true
49
+ });
50
+ DataViewBuilderService.prototype.changeCursorOnDragStart = function () {
51
+ document.body.classList.add('inheritCursors');
52
+ document.body.style.cursor = 'grabbing';
53
+ this._isGrabbingSubject.next(true);
54
+ };
55
+ DataViewBuilderService.prototype.changeCursorOnDragEnd = function () {
56
+ document.body.classList.remove('inheritCursors');
57
+ document.body.style.cursor = 'unset';
58
+ this._isGrabbingSubject.next(false);
59
+ };
60
+ DataViewBuilderService.prototype.onDragStart = function (event) {
61
+ this.changeCursorOnDragStart();
62
+ };
63
+ DataViewBuilderService.prototype.onDragEnd = function (event) {
64
+ this.changeCursorOnDragEnd();
65
+ };
66
+ return DataViewBuilderService;
67
+ }());
68
+ DataViewBuilderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
69
+ DataViewBuilderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, providedIn: 'root' });
70
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, decorators: [{
71
+ type: i0.Injectable,
72
+ args: [{
73
+ providedIn: 'root'
74
+ }]
75
75
  }], ctorParameters: function () { return []; } });
76
76
 
77
- var MenuDataViewComponent = /** @class */ (function () {
78
- function MenuDataViewComponent(dialogService, dataViewBuilderService) {
79
- var _this = this;
80
- this.dialogService = dialogService;
81
- this.dataViewBuilderService = dataViewBuilderService;
82
- this.fields = []; // The data view fields.
83
- this.availableFieldsTitles = new Map(); // <FieldID, Original Title> from the available fields.
84
- this.emptyDropAreaId = '';
85
- this.mappedFieldsId = '';
86
- this.fieldsChange = new i0.EventEmitter();
87
- this.isGrabbing = false;
88
- this.dialogRef = null;
89
- this.dataViewBuilderService.isGrabbingChange$.subscribe(function (value) {
90
- _this.isGrabbing = value;
91
- });
92
- }
93
- MenuDataViewComponent.prototype.addNewField = function (draggableItem, index) {
94
- // Add new menuField to the mappedFields.
95
- var menuField = { FieldID: draggableItem.data.key, Title: draggableItem.title };
96
- this.spliceMappedFields(index, 0, menuField);
97
- };
98
- MenuDataViewComponent.prototype.spliceMappedFields = function (start, deleteCount, item) {
99
- if (item) {
100
- this.fields.splice(start, deleteCount, item);
101
- }
102
- else {
103
- this.fields.splice(start, deleteCount);
104
- }
105
- this.notifyFieldsChange();
106
- };
107
- MenuDataViewComponent.prototype.changeTitle = function (menuField, title) {
108
- menuField.Title = title;
109
- this.notifyFieldsChange();
110
- };
111
- MenuDataViewComponent.prototype.notifyFieldsChange = function () {
112
- this.fieldsChange.emit(this.fields);
113
- };
114
- MenuDataViewComponent.prototype.ngOnInit = function () {
115
- //
116
- };
117
- MenuDataViewComponent.prototype.addSeparator = function (index) {
118
- var menuField = { FieldID: '', Title: '' };
119
- this.spliceMappedFields(index, 0, menuField);
120
- };
121
- MenuDataViewComponent.prototype.onDragStart = function (event) {
122
- this.dataViewBuilderService.onDragStart(event);
123
- };
124
- MenuDataViewComponent.prototype.onDragEnd = function (event) {
125
- this.dataViewBuilderService.onDragEnd(event);
126
- };
127
- MenuDataViewComponent.prototype.onDropField = function (event) {
128
- if (event.previousContainer === event.container) {
129
- i8.moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
130
- this.notifyFieldsChange();
131
- }
132
- else if (event.container.id === 'emptyDropArea') {
133
- this.addNewField(event.previousContainer.data[event.previousIndex], this.fields.length);
134
- }
135
- else {
136
- this.addNewField(event.previousContainer.data[event.previousIndex], event.currentIndex);
137
- }
138
- };
139
- MenuDataViewComponent.prototype.onTitleChanged = function (event, menuField) {
140
- this.changeTitle(menuField, event);
141
- };
142
- MenuDataViewComponent.prototype.onDeleteMappedField = function (event, menuField) {
143
- var index = this.fields.findIndex(function (ms) { return ms === menuField; });
144
- if (index > -1) {
145
- this.spliceMappedFields(index, 1);
146
- }
147
- };
148
- MenuDataViewComponent.prototype.onEditSeparatorField = function (event, menuField) {
149
- var _this = this;
150
- this.dialogRef = this.dialogService.openDialog(this.separatorTitleModalTemplate, { value: menuField.Title });
151
- this.dialogRef.afterClosed().subscribe(function (titleValue) {
152
- if (titleValue !== undefined) {
153
- _this.changeTitle(menuField, titleValue);
154
- }
155
- });
156
- };
157
- MenuDataViewComponent.prototype.setDialogValue = function (value) {
158
- this.closeDialog(value);
159
- };
160
- MenuDataViewComponent.prototype.closeDialog = function (value) {
161
- if (value === void 0) { value = undefined; }
162
- var _a;
163
- (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close(value);
164
- };
165
- return MenuDataViewComponent;
166
- }());
167
- MenuDataViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: MenuDataViewComponent, deps: [{ token: i1__namespace.PepDialogService }, { token: DataViewBuilderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
168
- MenuDataViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: MenuDataViewComponent, selector: "menu-data-view", inputs: { fields: "fields", availableFieldsTitles: "availableFieldsTitles", emptyDropAreaId: "emptyDropAreaId", mappedFieldsId: "mappedFieldsId" }, outputs: { fieldsChange: "fieldsChange" }, viewQueries: [{ propertyName: "separatorTitleModalTemplate", first: true, predicate: ["separatorTitleModalTemplate"], descendants: true, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"fields === null || fields.length === 0; then emptyTemplate; else notEmptyTemplate\"></ng-container>\n<ng-template #emptyTemplate>\n <div [id]=\"emptyDropAreaId\" class=\"drop-field-here-area\" cdkDropList (cdkDropListDropped)=\"onDropField($event)\">\n <mat-icon class=\"pep-spacing-element\">\n <pep-icon name=\"arrow_down_alt\"></pep-icon>\n </mat-icon>\n <span class=\"body-sm ellipsis\">\n {{ 'DATA_VIEW_BUILDER.EMPTY_DROP_AREA_TEXT' | translate }}\n </span> \n </div>\n</ng-template>\n<ng-template #notEmptyTemplate>\n <div [id]=\"mappedFieldsId\" class=\"mapped-fields-area\" [ngClass]=\"{ 'no-row-gap': !isGrabbing }\"\n cdkDropList [cdkDropListData]=\"fields\" (cdkDropListDropped)=\"onDropField($event)\">\n <ng-container *ngFor=\"let menuField of fields; let i = index\" >\n <div class=\"mapped-field-container\" [ngClass]=\"{ 'separator-container': menuField.FieldID === '' }\" \n cdkDrag (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\">\n <ng-container *ngTemplateOutlet=\"mappedFieldTemplate; context: { menuField: menuField }\"></ng-container>\n </div>\n <div *ngIf=\"!isGrabbing\" class=\"add-separator-container\">\n <pep-button class=\"add-separator\" styleType=\"regular\" sizeType=\"sm\" iconName=\"number_plus\" \n [value]=\"'DATA_VIEW_BUILDER.ADD_SEPARATOR' | translate\" (buttonClick)=\"addSeparator(i+1)\"></pep-button>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #mappedFieldTemplate let-menuField=\"menuField\">\n <ng-container *ngIf=\"menuField.FieldID !== ''; then menuItemTemplate; else separatorTemplate\"></ng-container>\n\n <ng-template #menuItemTemplate>\n <div class=\"fields-wrapper\">\n <pep-textbox [label]=\"'DATA_VIEW_BUILDER.MENU_ITEM_KEY_TITLE' | translate\" [value]=\"menuField.FieldID\" [disabled]=\"true\">\n </pep-textbox>\n \n <pep-textbox [label]=\"'DATA_VIEW_BUILDER.MENU_ITEM_VALUE_TITLE' | translate\" [hint]=\"'(' + (availableFieldsTitles.get(menuField.FieldID) || '') + ')'\"\n [value]=\"menuField.Title\" (valueChange)=\"onTitleChanged($event, menuField)\">\n </pep-textbox>\n \n <pep-button class=\"center-button\" iconName=\"system_bin\" [title]=\"'ACTIONS.DELETE' | translate\" (buttonClick)=\"onDeleteMappedField($event, menuField)\"></pep-button>\n </div>\n </ng-template>\n <ng-template #separatorTemplate>\n <div class=\"separator-wrapper \">\n <div class=\"pep-spacing-element title title-md color-dimmed\">\n <span [title]=\"menuField.Title\">{{ menuField.Title }}</span>\n </div>\n <div class=\"list-actions\">\n <pep-button iconName=\"system_edit\" [title]=\"'ACTIONS.EDIT' | translate\" sizeType=\"xs\" styleType=\"regular\" (buttonClick)=\"onEditSeparatorField($event, menuField)\"></pep-button>\n <pep-button iconName=\"system_bin\" [title]=\"'ACTIONS.DELETE' | translate\" sizeType=\"xs\" styleType=\"regular\" (buttonClick)=\"onDeleteMappedField($event, menuField)\"></pep-button>\n </div>\n </div>\n </ng-template>\n</ng-template>\n\n<ng-template #separatorTitleModalTemplate let-data>\n <pep-dialog [title]=\"'DATA_VIEW_BUILDER.SEPARATOR_TITLE' | translate\">\n <ng-container pep-dialog-content>\n <pep-textbox #txt [label]=\"'DATA_VIEW_BUILDER.ADD_A_TITLE' | translate\" [(value)]=\"data.value\">\n </pep-textbox>\n </ng-container>\n <ng-container pep-dialog-actions>\n <div class=\"pep-spacing-element-negative\">\n <button mat-button class=\"pep-spacing-element pep-button md weak\"\n (click)=\"closeDialog()\">\n {{'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\"\n (click)=\"setDialogValue(txt.value)\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>", styles: ["html body.inheritCursors *{cursor:inherit!important}.cdk-drag-preview.mapped-field-container{max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem)}.cdk-drag-preview.mapped-field-container:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.cdk-drag-preview.mapped-field-container:not(.separator-container){grid-gap:calc(var(--pep-spacing-lg, 1rem) * 2);gap:calc(var(--pep-spacing-lg, 1rem) * 2);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.cdk-drag-preview.mapped-field-container .fields-wrapper{display:grid;width:100%;grid-template-columns:1fr 1fr auto;grid-gap:.5rem;gap:.5rem;padding-top:.5rem}.cdk-drag-preview.mapped-field-container .fields-wrapper .center-button{margin-top:var(--pep-form-field-title-height, 1.5rem)}.cdk-drag-preview.mapped-field-container .separator-wrapper{display:grid;width:100%;grid-template-columns:1fr auto;padding-bottom:var(--pep-spacing-xs, .25rem);border-bottom:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.cdk-drag-preview.mapped-field-container .separator-wrapper .list-actions{display:flex;grid-gap:var(--pep-spacing-xs, .25rem);gap:var(--pep-spacing-xs, .25rem)}.drop-field-here-area{min-height:5rem;max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.12);position:relative}.drop-field-here-area:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.drop-field-here-area:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),calc(var(--pep-color-system-primary-l, 10%) + 30%))}.drop-field-here-area.cdk-drop-list-dragging{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.drop-field-here-area.cdk-drop-list-dragging:hover{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 20%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.drop-field-here-area.cdk-drop-list-dragging ::ng-deep .placeholder-item{display:none}.mapped-fields-area{display:flex;flex-direction:column;grid-column-gap:var(--pep-spacing-lg, 1rem);column-gap:var(--pep-spacing-lg, 1rem)}.mapped-fields-area:not(.no-row-gap){grid-row-gap:var(--pep-spacing-lg, 1rem);row-gap:var(--pep-spacing-lg, 1rem)}.mapped-fields-area.cdk-drop-list-dragging ::ng-deep .placeholder-item{max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5);height:2.5rem}.mapped-fields-area.cdk-drop-list-dragging ::ng-deep .placeholder-item:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .mapped-field-container{cursor:grab;max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem)}.mapped-fields-area .mapped-field-container:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .mapped-field-container:not(.separator-container){grid-gap:calc(var(--pep-spacing-lg, 1rem) * 2);gap:calc(var(--pep-spacing-lg, 1rem) * 2);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.mapped-fields-area .mapped-field-container .fields-wrapper{display:grid;width:100%;grid-template-columns:1fr 1fr auto;grid-gap:.5rem;gap:.5rem;padding-top:.5rem}.mapped-fields-area .mapped-field-container .fields-wrapper .center-button{margin-top:var(--pep-form-field-title-height, 1.5rem)}.mapped-fields-area .mapped-field-container .separator-wrapper{display:grid;width:100%;grid-template-columns:1fr auto;padding-bottom:var(--pep-spacing-xs, .25rem);border-bottom:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.mapped-fields-area .mapped-field-container .separator-wrapper .list-actions{display:flex;grid-gap:var(--pep-spacing-xs, .25rem);gap:var(--pep-spacing-xs, .25rem)}.mapped-fields-area .mapped-field-container.cdk-drag-placeholder{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.mapped-fields-area .mapped-field-container.cdk-drag-placeholder .fields-wrapper,.mapped-fields-area .mapped-field-container.cdk-drag-placeholder .separator-wrapper{opacity:0}.mapped-fields-area .add-separator-container{max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);height:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .add-separator-container:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .add-separator-container .add-separator{position:relative;display:none}.mapped-fields-area .add-separator-container:hover .add-separator{display:block}\n"], components: [{ type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1__namespace$1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { type: i5__namespace.PepButtonComponent, selector: "pep-button", inputs: ["styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconPosition", "visible", "key", "value", "iconName"], outputs: ["buttonClick"] }, { type: i6__namespace.PepTextboxComponent, selector: "pep-textbox", inputs: ["accessory", "label", "placeholder", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "key", "value", "formattedValue", "type", "visible", "maxFieldCharacters", "hint"], outputs: ["valueChange", "formValidationChange"] }, { type: i1__namespace.PepDialogComponent, selector: "pep-dialog", inputs: ["showClose", "showHeader", "showFooter", "title"], outputs: ["close"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i7__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i9__namespace.TranslatePipe } });
169
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: MenuDataViewComponent, decorators: [{
170
- type: i0.Component,
171
- args: [{
172
- selector: 'menu-data-view',
173
- templateUrl: './menu-data-view.component.html',
174
- styleUrls: ['./menu-data-view.component.scss']
175
- }]
176
- }], ctorParameters: function () { return [{ type: i1__namespace.PepDialogService }, { type: DataViewBuilderService }]; }, propDecorators: { separatorTitleModalTemplate: [{
177
- type: i0.ViewChild,
178
- args: ['separatorTitleModalTemplate', { read: i0.TemplateRef }]
179
- }], fields: [{
180
- type: i0.Input
181
- }], availableFieldsTitles: [{
182
- type: i0.Input
183
- }], emptyDropAreaId: [{
184
- type: i0.Input
185
- }], mappedFieldsId: [{
186
- type: i0.Input
187
- }], fieldsChange: [{
188
- type: i0.Output
77
+ var MenuDataViewComponent = /** @class */ (function () {
78
+ function MenuDataViewComponent(dialogService, dataViewBuilderService) {
79
+ var _this = this;
80
+ this.dialogService = dialogService;
81
+ this.dataViewBuilderService = dataViewBuilderService;
82
+ this.fields = []; // The data view fields.
83
+ this.availableFieldsTitles = new Map(); // <FieldID, Original Title> from the available fields.
84
+ this.emptyDropAreaId = '';
85
+ this.mappedFieldsId = '';
86
+ this.fieldsChange = new i0.EventEmitter();
87
+ this.isGrabbing = false;
88
+ this.dialogRef = null;
89
+ this.dataViewBuilderService.isGrabbingChange$.subscribe(function (value) {
90
+ _this.isGrabbing = value;
91
+ });
92
+ }
93
+ MenuDataViewComponent.prototype.addNewField = function (draggableItem, index) {
94
+ // Add new menuField to the mappedFields.
95
+ var menuField = { FieldID: draggableItem.data.key, Title: draggableItem.title };
96
+ this.spliceMappedFields(index, 0, menuField);
97
+ };
98
+ MenuDataViewComponent.prototype.spliceMappedFields = function (start, deleteCount, item) {
99
+ if (item) {
100
+ this.fields.splice(start, deleteCount, item);
101
+ }
102
+ else {
103
+ this.fields.splice(start, deleteCount);
104
+ }
105
+ this.notifyFieldsChange();
106
+ };
107
+ MenuDataViewComponent.prototype.changeTitle = function (menuField, title) {
108
+ menuField.Title = title;
109
+ this.notifyFieldsChange();
110
+ };
111
+ MenuDataViewComponent.prototype.notifyFieldsChange = function () {
112
+ this.fieldsChange.emit(this.fields);
113
+ };
114
+ MenuDataViewComponent.prototype.ngOnInit = function () {
115
+ //
116
+ };
117
+ MenuDataViewComponent.prototype.addSeparator = function (index) {
118
+ var menuField = { FieldID: '', Title: '' };
119
+ this.spliceMappedFields(index, 0, menuField);
120
+ };
121
+ MenuDataViewComponent.prototype.onDragStart = function (event) {
122
+ this.dataViewBuilderService.onDragStart(event);
123
+ };
124
+ MenuDataViewComponent.prototype.onDragEnd = function (event) {
125
+ this.dataViewBuilderService.onDragEnd(event);
126
+ };
127
+ MenuDataViewComponent.prototype.onDropField = function (event) {
128
+ if (event.previousContainer === event.container) {
129
+ i8.moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
130
+ this.notifyFieldsChange();
131
+ }
132
+ else if (event.container.id === 'emptyDropArea') {
133
+ this.addNewField(event.previousContainer.data[event.previousIndex], this.fields.length);
134
+ }
135
+ else {
136
+ this.addNewField(event.previousContainer.data[event.previousIndex], event.currentIndex);
137
+ }
138
+ };
139
+ MenuDataViewComponent.prototype.onTitleChanged = function (event, menuField) {
140
+ this.changeTitle(menuField, event);
141
+ };
142
+ MenuDataViewComponent.prototype.onDeleteMappedField = function (event, menuField) {
143
+ var index = this.fields.findIndex(function (ms) { return ms === menuField; });
144
+ if (index > -1) {
145
+ this.spliceMappedFields(index, 1);
146
+ }
147
+ };
148
+ MenuDataViewComponent.prototype.onEditSeparatorField = function (event, menuField) {
149
+ var _this = this;
150
+ this.dialogRef = this.dialogService.openDialog(this.separatorTitleModalTemplate, { value: menuField.Title });
151
+ this.dialogRef.afterClosed().subscribe(function (titleValue) {
152
+ if (titleValue !== undefined) {
153
+ _this.changeTitle(menuField, titleValue);
154
+ }
155
+ });
156
+ };
157
+ MenuDataViewComponent.prototype.setDialogValue = function (value) {
158
+ this.closeDialog(value);
159
+ };
160
+ MenuDataViewComponent.prototype.closeDialog = function (value) {
161
+ if (value === void 0) { value = undefined; }
162
+ var _a;
163
+ (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close(value);
164
+ };
165
+ return MenuDataViewComponent;
166
+ }());
167
+ MenuDataViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: MenuDataViewComponent, deps: [{ token: i1__namespace.PepDialogService }, { token: DataViewBuilderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
168
+ MenuDataViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: MenuDataViewComponent, selector: "menu-data-view", inputs: { fields: "fields", availableFieldsTitles: "availableFieldsTitles", emptyDropAreaId: "emptyDropAreaId", mappedFieldsId: "mappedFieldsId" }, outputs: { fieldsChange: "fieldsChange" }, viewQueries: [{ propertyName: "separatorTitleModalTemplate", first: true, predicate: ["separatorTitleModalTemplate"], descendants: true, read: i0.TemplateRef }], ngImport: i0__namespace, template: "<ng-container *ngIf=\"fields === null || fields.length === 0; then emptyTemplate; else notEmptyTemplate\"></ng-container>\n<ng-template #emptyTemplate>\n <div [id]=\"emptyDropAreaId\" class=\"drop-field-here-area\" cdkDropList (cdkDropListDropped)=\"onDropField($event)\">\n <mat-icon class=\"pep-spacing-element\">\n <pep-icon name=\"arrow_down_alt\"></pep-icon>\n </mat-icon>\n <span class=\"body-sm ellipsis\">\n {{ 'DATA_VIEW_BUILDER.EMPTY_DROP_AREA_TEXT' | translate }}\n </span> \n </div>\n</ng-template>\n<ng-template #notEmptyTemplate>\n <div [id]=\"mappedFieldsId\" class=\"mapped-fields-area\" [ngClass]=\"{ 'no-row-gap': !isGrabbing }\"\n cdkDropList [cdkDropListData]=\"fields\" (cdkDropListDropped)=\"onDropField($event)\">\n <ng-container *ngFor=\"let menuField of fields; let i = index\" >\n <div class=\"mapped-field-container\" [ngClass]=\"{ 'separator-container': menuField.FieldID === '' }\" \n cdkDrag (cdkDragStarted)=\"onDragStart($event)\" (cdkDragEnded)=\"onDragEnd($event)\">\n <ng-container *ngTemplateOutlet=\"mappedFieldTemplate; context: { menuField: menuField }\"></ng-container>\n </div>\n <div *ngIf=\"!isGrabbing\" class=\"add-separator-container\">\n <pep-button class=\"add-separator\" styleType=\"regular\" sizeType=\"sm\" iconName=\"number_plus\" \n [value]=\"'DATA_VIEW_BUILDER.ADD_SEPARATOR' | translate\" (buttonClick)=\"addSeparator(i+1)\"></pep-button>\n </div>\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #mappedFieldTemplate let-menuField=\"menuField\">\n <ng-container *ngIf=\"menuField.FieldID !== ''; then menuItemTemplate; else separatorTemplate\"></ng-container>\n\n <ng-template #menuItemTemplate>\n <div class=\"fields-wrapper\">\n <pep-textbox [label]=\"'DATA_VIEW_BUILDER.MENU_ITEM_KEY_TITLE' | translate\" [value]=\"menuField.FieldID\" [disabled]=\"true\">\n </pep-textbox>\n \n <pep-textbox [label]=\"'DATA_VIEW_BUILDER.MENU_ITEM_VALUE_TITLE' | translate\" [hint]=\"'(' + (availableFieldsTitles.get(menuField.FieldID) || '') + ')'\"\n [value]=\"menuField.Title\" (valueChange)=\"onTitleChanged($event, menuField)\">\n </pep-textbox>\n \n <pep-button class=\"center-button\" iconName=\"system_bin\" [title]=\"'ACTIONS.DELETE' | translate\" (buttonClick)=\"onDeleteMappedField($event, menuField)\"></pep-button>\n </div>\n </ng-template>\n <ng-template #separatorTemplate>\n <div class=\"separator-wrapper \">\n <div class=\"pep-spacing-element title title-md color-dimmed\">\n <span [title]=\"menuField.Title\">{{ menuField.Title }}</span>\n </div>\n <div class=\"list-actions\">\n <pep-button iconName=\"system_edit\" [title]=\"'ACTIONS.EDIT' | translate\" sizeType=\"xs\" styleType=\"regular\" (buttonClick)=\"onEditSeparatorField($event, menuField)\"></pep-button>\n <pep-button iconName=\"system_bin\" [title]=\"'ACTIONS.DELETE' | translate\" sizeType=\"xs\" styleType=\"regular\" (buttonClick)=\"onDeleteMappedField($event, menuField)\"></pep-button>\n </div>\n </div>\n </ng-template>\n</ng-template>\n\n<ng-template #separatorTitleModalTemplate let-data>\n <pep-dialog [title]=\"'DATA_VIEW_BUILDER.SEPARATOR_TITLE' | translate\">\n <ng-container pep-dialog-content>\n <pep-textbox #txt [label]=\"'DATA_VIEW_BUILDER.ADD_A_TITLE' | translate\" [(value)]=\"data.value\">\n </pep-textbox>\n </ng-container>\n <ng-container pep-dialog-actions>\n <div class=\"pep-spacing-element-negative\">\n <button mat-button class=\"pep-spacing-element pep-button md weak\"\n (click)=\"closeDialog()\">\n {{'Cancel' | translate}}\n </button>\n <button mat-button class=\"pep-spacing-element pep-button md strong\"\n (click)=\"setDialogValue(txt.value)\">\n {{ 'Save' | translate}}\n </button>\n </div>\n </ng-container>\n </pep-dialog>\n</ng-template>", styles: ["html body.inheritCursors *{cursor:inherit!important}.cdk-drag-preview.mapped-field-container{max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem)}.cdk-drag-preview.mapped-field-container:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.cdk-drag-preview.mapped-field-container:not(.separator-container){grid-gap:calc(var(--pep-spacing-lg, 1rem) * 2);gap:calc(var(--pep-spacing-lg, 1rem) * 2);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.cdk-drag-preview.mapped-field-container .fields-wrapper{display:grid;width:100%;grid-template-columns:1fr 1fr auto;grid-gap:.5rem;gap:.5rem;padding-top:.5rem}.cdk-drag-preview.mapped-field-container .fields-wrapper .center-button{margin-top:var(--pep-form-field-title-height, 1.5rem)}.cdk-drag-preview.mapped-field-container .separator-wrapper{display:grid;width:100%;grid-template-columns:1fr auto;padding-bottom:var(--pep-spacing-xs, .25rem);border-bottom:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.cdk-drag-preview.mapped-field-container .separator-wrapper .list-actions{display:flex;grid-gap:var(--pep-spacing-xs, .25rem);gap:var(--pep-spacing-xs, .25rem)}.drop-field-here-area{min-height:5rem;max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);background:hsla(var(--pep-color-weak-h, 0),var(--pep-color-weak-s, 0%),var(--pep-color-weak-l, 10%),.12);position:relative}.drop-field-here-area:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.drop-field-here-area:after{z-index:0;content:\"\";transition:all .25s;display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-radius:inherit;border:1px dashed hsl(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),calc(var(--pep-color-system-primary-l, 10%) + 30%))}.drop-field-here-area.cdk-drop-list-dragging{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.drop-field-here-area.cdk-drop-list-dragging:hover{background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.16);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 20%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.drop-field-here-area.cdk-drop-list-dragging ::ng-deep .placeholder-item{display:none}.mapped-fields-area{display:flex;flex-direction:column;grid-column-gap:var(--pep-spacing-lg, 1rem);column-gap:var(--pep-spacing-lg, 1rem)}.mapped-fields-area:not(.no-row-gap){grid-row-gap:var(--pep-spacing-lg, 1rem);row-gap:var(--pep-spacing-lg, 1rem)}.mapped-fields-area.cdk-drop-list-dragging ::ng-deep .placeholder-item{max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%));box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5);height:2.5rem}.mapped-fields-area.cdk-drop-list-dragging ::ng-deep .placeholder-item:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .mapped-field-container{cursor:grab;max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem)}.mapped-fields-area .mapped-field-container:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .mapped-field-container:not(.separator-container){grid-gap:calc(var(--pep-spacing-lg, 1rem) * 2);gap:calc(var(--pep-spacing-lg, 1rem) * 2);background:hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),98%);box-shadow:var(--pep-shadow-xs-offset, 0 .125rem .25rem 0) hsla(var(--pep-color-system-primary-h, 0),var(--pep-color-system-primary-s, 0%),var(--pep-color-system-primary-l, 10%),.08);border:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.mapped-fields-area .mapped-field-container .fields-wrapper{display:grid;width:100%;grid-template-columns:1fr 1fr auto;grid-gap:.5rem;gap:.5rem;padding-top:.5rem}.mapped-fields-area .mapped-field-container .fields-wrapper .center-button{margin-top:var(--pep-form-field-title-height, 1.5rem)}.mapped-fields-area .mapped-field-container .separator-wrapper{display:grid;width:100%;grid-template-columns:1fr auto;padding-bottom:var(--pep-spacing-xs, .25rem);border-bottom:1px solid hsl(var(--pep-color-regular-h, 0),var(--pep-color-regular-s, 0%),calc(var(--pep-color-regular-l, 10%) + 30%))}.mapped-fields-area .mapped-field-container .separator-wrapper .list-actions{display:flex;grid-gap:var(--pep-spacing-xs, .25rem);gap:var(--pep-spacing-xs, .25rem)}.mapped-fields-area .mapped-field-container.cdk-drag-placeholder{box-shadow:0 0 0 var(--pep-spacing-xs, .25rem) hsla(var(--pep-color-text-link-h, 207),var(--pep-color-text-link-s, 76%),var(--pep-color-text-link-l, 37%),.5)}.mapped-fields-area .mapped-field-container.cdk-drag-placeholder .fields-wrapper,.mapped-fields-area .mapped-field-container.cdk-drag-placeholder .separator-wrapper{opacity:0}.mapped-fields-area .add-separator-container{max-width:600px;display:flex;justify-content:center;align-items:center;border-radius:var(--pep-border-radius-md, .25rem);height:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .add-separator-container:not(.separator-container){padding-inline:var(--pep-spacing-lg, 1rem)}.mapped-fields-area .add-separator-container .add-separator{position:relative;display:none}.mapped-fields-area .add-separator-container:hover .add-separator{display:block}\n"], components: [{ type: i3__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1__namespace$1.PepIconComponent, selector: "pep-icon", inputs: ["spin", "name", "fill"] }, { type: i5__namespace.PepButtonComponent, selector: "pep-button", inputs: ["styleType", "styleStateType", "sizeType", "classNames", "disabled", "iconPosition", "visible", "key", "value", "iconName"], outputs: ["buttonClick"] }, { type: i6__namespace.PepTextboxComponent, selector: "pep-textbox", inputs: ["accessory", "label", "placeholder", "mandatory", "disabled", "readonly", "textColor", "xAlignment", "rowSpan", "minValue", "maxValue", "form", "isActive", "showTitle", "renderTitle", "renderError", "renderSymbol", "layoutType", "parentFieldKey", "key", "value", "formattedValue", "type", "visible", "maxFieldCharacters", "hint"], outputs: ["valueChange", "formValidationChange"] }, { type: i1__namespace.PepDialogComponent, selector: "pep-dialog", inputs: ["showClose", "showHeader", "showFooter", "title"], outputs: ["close"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i7__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i7__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "translate": i9__namespace.TranslatePipe } });
169
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: MenuDataViewComponent, decorators: [{
170
+ type: i0.Component,
171
+ args: [{
172
+ selector: 'menu-data-view',
173
+ templateUrl: './menu-data-view.component.html',
174
+ styleUrls: ['./menu-data-view.component.scss']
175
+ }]
176
+ }], ctorParameters: function () { return [{ type: i1__namespace.PepDialogService }, { type: DataViewBuilderService }]; }, propDecorators: { separatorTitleModalTemplate: [{
177
+ type: i0.ViewChild,
178
+ args: ['separatorTitleModalTemplate', { read: i0.TemplateRef }]
179
+ }], fields: [{
180
+ type: i0.Input
181
+ }], availableFieldsTitles: [{
182
+ type: i0.Input
183
+ }], emptyDropAreaId: [{
184
+ type: i0.Input
185
+ }], mappedFieldsId: [{
186
+ type: i0.Input
187
+ }], fieldsChange: [{
188
+ type: i0.Output
189
189
  }] } });
190
190
 
191
- var DataViewBuilderComponent = /** @class */ (function () {
192
- function DataViewBuilderComponent(dataViewBuilderService) {
193
- this.dataViewBuilderService = dataViewBuilderService;
194
- // @Input() title: string = '';
195
- this.builderTitle = '';
196
- this.builderTitleHint = '';
197
- this._availableFields = [];
198
- this.dataViewChange = new i0.EventEmitter();
199
- this.type = 'not-supported';
200
- this.emptyDropAreaId = 'emptyDropArea';
201
- this.mappedFieldsId = 'mappedFields';
202
- this.availableFieldsTitles = new Map();
203
- //
204
- }
205
- Object.defineProperty(DataViewBuilderComponent.prototype, "availableFields", {
206
- get: function () {
207
- return this._availableFields;
208
- },
209
- set: function (value) {
210
- this._availableFields = value;
211
- this.setTitlesMap();
212
- },
213
- enumerable: false,
214
- configurable: true
215
- });
216
- Object.defineProperty(DataViewBuilderComponent.prototype, "dataView", {
217
- get: function () {
218
- return this._dataView;
219
- },
220
- set: function (value) {
221
- this._dataView = value;
222
- this.setType();
223
- this.refreshAvailableFields();
224
- },
225
- enumerable: false,
226
- configurable: true
227
- });
228
- DataViewBuilderComponent.prototype.setType = function () {
229
- if (this._dataView.Type === 'Menu') {
230
- this.type = 'menu';
231
- }
232
- else if (this._dataView.Type === 'Grid') {
233
- this.type = 'list';
234
- }
235
- else if ((this._dataView.Type === 'Card') ||
236
- (this._dataView.Type === 'Form') ||
237
- (this._dataView.Type === 'Large') ||
238
- (this._dataView.Type === 'Line')) {
239
- this.type = 'card';
240
- }
241
- else {
242
- this.type = 'not-supported';
243
- }
244
- };
245
- DataViewBuilderComponent.prototype.setAvailableFieldPermission = function (field, disable) {
246
- // Find the item in the available fields
247
- var item = this.availableFields.find(function (as) { return as.data.key === field; });
248
- // If exist disable or enable it.
249
- if (item) {
250
- item.disabled = disable;
251
- }
252
- };
253
- DataViewBuilderComponent.prototype.refreshAvailableFields = function () {
254
- this.availableFields.forEach(function (af) { return af.disabled = false; });
255
- if (this.dataView && this.dataView.Fields) {
256
- for (var index = 0; index < this.dataView.Fields.length; index++) {
257
- this.setAvailableFieldPermission(this.dataView.Fields[index].FieldID, true);
258
- }
259
- }
260
- };
261
- DataViewBuilderComponent.prototype.setTitlesMap = function () {
262
- var _a, _b;
263
- this.availableFieldsTitles.clear();
264
- if (((_a = this.availableFields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
265
- for (var index = 0; index < this.availableFields.length; index++) {
266
- var availableField = this.availableFields[index];
267
- if (((_b = availableField === null || availableField === void 0 ? void 0 : availableField.data) === null || _b === void 0 ? void 0 : _b.key.length) > 0) {
268
- this.availableFieldsTitles.set(availableField.data.key, availableField.title);
269
- }
270
- }
271
- }
272
- };
273
- DataViewBuilderComponent.prototype.notifyDataViewChange = function () {
274
- this.dataViewChange.emit(this.dataView);
275
- // console.log(this.dataView);
276
- };
277
- DataViewBuilderComponent.prototype.ngOnInit = function () {
278
- //
279
- };
280
- DataViewBuilderComponent.prototype.onDragStart = function (event) {
281
- this.dataViewBuilderService.onDragStart(event);
282
- };
283
- DataViewBuilderComponent.prototype.onDragEnd = function (event) {
284
- this.dataViewBuilderService.onDragEnd(event);
285
- };
286
- DataViewBuilderComponent.prototype.onFieldsChanged = function (fields) {
287
- this.dataView.Fields = fields;
288
- this.refreshAvailableFields();
289
- this.notifyDataViewChange();
290
- };
291
- return DataViewBuilderComponent;
292
- }());
293
- DataViewBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderComponent, deps: [{ token: DataViewBuilderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
294
- DataViewBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: DataViewBuilderComponent, selector: "pep-data-view-builder", inputs: { builderTitle: "builderTitle", builderTitleHint: "builderTitleHint", availableFields: "availableFields", dataView: "dataView" }, outputs: { dataViewChange: "dataViewChange" }, ngImport: i0__namespace, template: "<pep-page-layout >\n <!-- <ng-container pep-top-area>\n <pep-top-bar [title]=\"title\">\n <div header-end-content>\n </div>\n </pep-top-bar>\n </ng-container> -->\n <ng-container pep-main-area>\n <ng-container *ngIf=\"type === 'not-supported' ; then notSupportedTemplate; else supportedTemplate\"></ng-container>\n <ng-template #notSupportedTemplate>\n <span class=\"body-sm ellipsis\">\n {{ 'DATA_VIEW_BUILDER.TYPE_NOT_SUPPORTED' | translate }}\n </span> \n </ng-template>\n <ng-template #supportedTemplate>\n <div *ngIf=\"dataView && availableFields\" class=\"mapped-fields-container\">\n <div class=\"available-fields-side-area\">\n <pep-draggable-items [items]=\"availableFields\" [title]=\"'DATA_VIEW_BUILDER.AVAILABLE_FIELDS' | translate\" titleType=\"with-bottom-border\" titleSizeType=\"md\"\n itemPlaceholderType=\"weak\" [showSearch]=\"true\" [dropAreaIds]=\"['emptyDropArea', 'mappedFields']\" (itemDragStarted)=\"onDragStart($event)\" (itemDragEnded)=\"onDragEnd($event)\">\n </pep-draggable-items>\n </div>\n <div pep-main-area class=\"mapped-fields-main-area\">\n <div class=\"mapped-fields-top-area pep-border-bottom\"\n [title]=\"builderTitle + ' ' + (builderTitleHint ? ('(' + builderTitleHint + ')') : '')\">\n <span class=\"title-md\">{{ builderTitle }}&nbsp;</span>\n <span *ngIf=\"builderTitleHint\" class=\"color-dimmed\">({{ builderTitleHint }})</span>\n </div>\n \n <div class=\"data-view-by-type-area\" [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'menu'\">\n <menu-data-view [fields]=\"dataView?.Fields || []\" [availableFieldsTitles]=\"availableFieldsTitles\" [emptyDropAreaId]=\"emptyDropAreaId\"\n [mappedFieldsId]=\"mappedFieldsId\" (fieldsChange)=\"onFieldsChanged($event)\">\n </menu-data-view>\n </ng-container>\n <!-- <ng-container *ngSwitchDefault>\n </ng-container> -->\n </div>\n </div>\n </div>\n </ng-template>\n </ng-container>\n</pep-page-layout>\n\n", styles: [".mapped-fields-container{display:grid;height:100%;grid-template-columns:auto 1fr;grid-template-areas:\"side-area main-area\"}.mapped-fields-container .available-fields-side-area{grid-area:side-area;width:240px;max-width:240px;overflow:auto;height:inherit;padding-top:var(--pep-spacing-2xl, 2rem);margin-inline-end:calc(var(--pep-spacing-lg, 1rem) * 2)}.mapped-fields-container .mapped-fields-main-area{display:grid;grid-template-rows:auto 1fr;grid-area:main-area;padding-top:var(--pep-spacing-2xl, 2rem);overflow:auto;height:inherit}.mapped-fields-container .mapped-fields-main-area .mapped-fields-top-area{height:var(--pep-top-bar-field-height, 2.5rem);display:flex;align-items:center}.mapped-fields-container .mapped-fields-main-area .data-view-by-type-area{overflow:auto;height:inherit;padding-top:var(--pep-spacing-lg, 1rem);padding-bottom:var(--pep-spacing-lg, 1rem);padding-inline:var(--pep-spacing-xs, .25rem)}\n"], components: [{ type: i2__namespace.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { type: i3__namespace$1.DraggableItemsComponent, selector: "pep-draggable-items", inputs: ["containerId", "showSearch", "title", "titleType", "titleSizeType", "itemPlaceholderType", "dropAreaIds", "items"], outputs: ["itemDragStarted", "itemDragEnded"] }, { type: MenuDataViewComponent, selector: "menu-data-view", inputs: ["fields", "availableFieldsTitles", "emptyDropAreaId", "mappedFieldsId"], outputs: ["fieldsChange"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i7__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "translate": i9__namespace.TranslatePipe } });
295
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderComponent, decorators: [{
296
- type: i0.Component,
297
- args: [{
298
- selector: 'pep-data-view-builder',
299
- templateUrl: './data-view-builder.component.html',
300
- styleUrls: ['./data-view-builder.component.scss']
301
- }]
302
- }], ctorParameters: function () { return [{ type: DataViewBuilderService }]; }, propDecorators: { builderTitle: [{
303
- type: i0.Input
304
- }], builderTitleHint: [{
305
- type: i0.Input
306
- }], availableFields: [{
307
- type: i0.Input
308
- }], dataView: [{
309
- type: i0.Input
310
- }], dataViewChange: [{
311
- type: i0.Output
191
+ var DataViewBuilderComponent = /** @class */ (function () {
192
+ function DataViewBuilderComponent(dataViewBuilderService) {
193
+ this.dataViewBuilderService = dataViewBuilderService;
194
+ // @Input() title: string = '';
195
+ this.builderTitle = '';
196
+ this.builderTitleHint = '';
197
+ this._availableFields = [];
198
+ this.dataViewChange = new i0.EventEmitter();
199
+ this.type = 'not-supported';
200
+ this.emptyDropAreaId = 'emptyDropArea';
201
+ this.mappedFieldsId = 'mappedFields';
202
+ this.availableFieldsTitles = new Map();
203
+ //
204
+ }
205
+ Object.defineProperty(DataViewBuilderComponent.prototype, "availableFields", {
206
+ get: function () {
207
+ return this._availableFields;
208
+ },
209
+ set: function (value) {
210
+ this._availableFields = value;
211
+ this.setTitlesMap();
212
+ },
213
+ enumerable: false,
214
+ configurable: true
215
+ });
216
+ Object.defineProperty(DataViewBuilderComponent.prototype, "dataView", {
217
+ get: function () {
218
+ return this._dataView;
219
+ },
220
+ set: function (value) {
221
+ this._dataView = value;
222
+ this.setType();
223
+ this.refreshAvailableFields();
224
+ },
225
+ enumerable: false,
226
+ configurable: true
227
+ });
228
+ DataViewBuilderComponent.prototype.setType = function () {
229
+ if (this._dataView.Type === 'Menu') {
230
+ this.type = 'menu';
231
+ }
232
+ else if (this._dataView.Type === 'Grid') {
233
+ this.type = 'list';
234
+ }
235
+ else if ((this._dataView.Type === 'Card') ||
236
+ (this._dataView.Type === 'Form') ||
237
+ (this._dataView.Type === 'Large') ||
238
+ (this._dataView.Type === 'Line')) {
239
+ this.type = 'card';
240
+ }
241
+ else {
242
+ this.type = 'not-supported';
243
+ }
244
+ };
245
+ DataViewBuilderComponent.prototype.setAvailableFieldPermission = function (field, disable) {
246
+ // Find the item in the available fields
247
+ var item = this.availableFields.find(function (as) { return as.data.key === field; });
248
+ // If exist disable or enable it.
249
+ if (item) {
250
+ item.disabled = disable;
251
+ }
252
+ };
253
+ DataViewBuilderComponent.prototype.refreshAvailableFields = function () {
254
+ this.availableFields.forEach(function (af) { return af.disabled = false; });
255
+ if (this.dataView && this.dataView.Fields) {
256
+ for (var index = 0; index < this.dataView.Fields.length; index++) {
257
+ this.setAvailableFieldPermission(this.dataView.Fields[index].FieldID, true);
258
+ }
259
+ }
260
+ };
261
+ DataViewBuilderComponent.prototype.setTitlesMap = function () {
262
+ var _a, _b;
263
+ this.availableFieldsTitles.clear();
264
+ if (((_a = this.availableFields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
265
+ for (var index = 0; index < this.availableFields.length; index++) {
266
+ var availableField = this.availableFields[index];
267
+ if (((_b = availableField === null || availableField === void 0 ? void 0 : availableField.data) === null || _b === void 0 ? void 0 : _b.key.length) > 0) {
268
+ this.availableFieldsTitles.set(availableField.data.key, availableField.title);
269
+ }
270
+ }
271
+ }
272
+ };
273
+ DataViewBuilderComponent.prototype.notifyDataViewChange = function () {
274
+ this.dataViewChange.emit(this.dataView);
275
+ // console.log(this.dataView);
276
+ };
277
+ DataViewBuilderComponent.prototype.ngOnInit = function () {
278
+ //
279
+ };
280
+ DataViewBuilderComponent.prototype.onDragStart = function (event) {
281
+ this.dataViewBuilderService.onDragStart(event);
282
+ };
283
+ DataViewBuilderComponent.prototype.onDragEnd = function (event) {
284
+ this.dataViewBuilderService.onDragEnd(event);
285
+ };
286
+ DataViewBuilderComponent.prototype.onFieldsChanged = function (fields) {
287
+ this.dataView.Fields = fields;
288
+ this.refreshAvailableFields();
289
+ this.notifyDataViewChange();
290
+ };
291
+ return DataViewBuilderComponent;
292
+ }());
293
+ DataViewBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderComponent, deps: [{ token: DataViewBuilderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
294
+ DataViewBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.5", type: DataViewBuilderComponent, selector: "pep-data-view-builder", inputs: { builderTitle: "builderTitle", builderTitleHint: "builderTitleHint", availableFields: "availableFields", dataView: "dataView" }, outputs: { dataViewChange: "dataViewChange" }, ngImport: i0__namespace, template: "<pep-page-layout >\n <!-- <ng-container pep-top-area>\n <pep-top-bar [title]=\"title\">\n <div header-end-content>\n </div>\n </pep-top-bar>\n </ng-container> -->\n <ng-container pep-main-area>\n <ng-container *ngIf=\"type === 'not-supported' ; then notSupportedTemplate; else supportedTemplate\"></ng-container>\n <ng-template #notSupportedTemplate>\n <span class=\"body-sm ellipsis\">\n {{ 'DATA_VIEW_BUILDER.TYPE_NOT_SUPPORTED' | translate }}\n </span> \n </ng-template>\n <ng-template #supportedTemplate>\n <div *ngIf=\"dataView && availableFields\" class=\"mapped-fields-container\">\n <div class=\"available-fields-side-area\">\n <pep-draggable-items [items]=\"availableFields\" [title]=\"'DATA_VIEW_BUILDER.AVAILABLE_FIELDS' | translate\" titleType=\"with-bottom-border\" titleSizeType=\"md\"\n itemPlaceholderType=\"weak\" [showSearch]=\"true\" [dropAreaIds]=\"['emptyDropArea', 'mappedFields']\" (itemDragStarted)=\"onDragStart($event)\" (itemDragEnded)=\"onDragEnd($event)\">\n </pep-draggable-items>\n </div>\n <div pep-main-area class=\"mapped-fields-main-area\">\n <div class=\"mapped-fields-top-area pep-border-bottom\"\n [title]=\"builderTitle + ' ' + (builderTitleHint ? ('(' + builderTitleHint + ')') : '')\">\n <span class=\"title-md\">{{ builderTitle }}&nbsp;</span>\n <span *ngIf=\"builderTitleHint\" class=\"color-dimmed\">({{ builderTitleHint }})</span>\n </div>\n \n <div class=\"data-view-by-type-area\" [ngSwitch]=\"type\">\n <ng-container *ngSwitchCase=\"'menu'\">\n <menu-data-view [fields]=\"dataView?.Fields || []\" [availableFieldsTitles]=\"availableFieldsTitles\" [emptyDropAreaId]=\"emptyDropAreaId\"\n [mappedFieldsId]=\"mappedFieldsId\" (fieldsChange)=\"onFieldsChanged($event)\">\n </menu-data-view>\n </ng-container>\n <!-- <ng-container *ngSwitchDefault>\n </ng-container> -->\n </div>\n </div>\n </div>\n </ng-template>\n </ng-container>\n</pep-page-layout>\n\n", styles: [".mapped-fields-container{display:grid;height:100%;grid-template-columns:auto 1fr;grid-template-areas:\"side-area main-area\"}.mapped-fields-container .available-fields-side-area{grid-area:side-area;width:240px;max-width:240px;overflow:auto;height:inherit;padding-top:var(--pep-spacing-2xl, 2rem);margin-inline-end:calc(var(--pep-spacing-lg, 1rem) * 2)}.mapped-fields-container .mapped-fields-main-area{display:grid;grid-template-rows:auto 1fr;grid-area:main-area;padding-top:var(--pep-spacing-2xl, 2rem);overflow:auto;height:inherit}.mapped-fields-container .mapped-fields-main-area .mapped-fields-top-area{height:var(--pep-top-bar-field-height, 2.5rem);display:flex;align-items:center}.mapped-fields-container .mapped-fields-main-area .data-view-by-type-area{overflow:auto;height:inherit;padding-top:var(--pep-spacing-lg, 1rem);padding-bottom:var(--pep-spacing-lg, 1rem);padding-inline:var(--pep-spacing-xs, .25rem)}\n"], components: [{ type: i2__namespace.PepPageLayoutComponent, selector: "pep-page-layout", inputs: ["addPadding", "showShadow"] }, { type: i3__namespace$1.DraggableItemsComponent, selector: "pep-draggable-items", inputs: ["containerId", "showSearch", "title", "titleType", "titleSizeType", "itemPlaceholderType", "dropAreaIds", "items"], outputs: ["itemDragStarted", "itemDragEnded"] }, { type: MenuDataViewComponent, selector: "menu-data-view", inputs: ["fields", "availableFieldsTitles", "emptyDropAreaId", "mappedFieldsId"], outputs: ["fieldsChange"] }], directives: [{ type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i7__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }], pipes: { "translate": i9__namespace.TranslatePipe } });
295
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderComponent, decorators: [{
296
+ type: i0.Component,
297
+ args: [{
298
+ selector: 'pep-data-view-builder',
299
+ templateUrl: './data-view-builder.component.html',
300
+ styleUrls: ['./data-view-builder.component.scss']
301
+ }]
302
+ }], ctorParameters: function () { return [{ type: DataViewBuilderService }]; }, propDecorators: { builderTitle: [{
303
+ type: i0.Input
304
+ }], builderTitleHint: [{
305
+ type: i0.Input
306
+ }], availableFields: [{
307
+ type: i0.Input
308
+ }], dataView: [{
309
+ type: i0.Input
310
+ }], dataViewChange: [{
311
+ type: i0.Output
312
312
  }] } });
313
313
 
314
- var pepIcons = [
315
- i1$1.pepIconSystemClose,
316
- i1$1.pepIconArrowDownAlt,
317
- i1$1.pepIconSystemBin,
318
- i1$1.pepIconNumberPlus
319
- ];
320
- var PepDataViewBuilderModule = /** @class */ (function () {
321
- function PepDataViewBuilderModule(pepIconRegistry) {
322
- this.pepIconRegistry = pepIconRegistry;
323
- this.pepIconRegistry.registerIcons(pepIcons);
324
- }
325
- return PepDataViewBuilderModule;
326
- }());
327
- PepDataViewBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, deps: [{ token: i1__namespace$1.PepIconRegistry }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
328
- PepDataViewBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, declarations: [DataViewBuilderComponent, MenuDataViewComponent], imports: [i7.CommonModule,
329
- i8.DragDropModule,
330
- i3.MatIconModule,
331
- ngxLib.PepNgxLibModule,
332
- i5.PepButtonModule,
333
- i1.PepDialogModule,
334
- i1$1.PepIconModule,
335
- menu.PepMenuModule,
336
- i2.PepPageLayoutModule,
337
- i6.PepTextboxModule,
338
- topBar.PepTopBarModule,
339
- i3$1.PepDraggableItemsModule], exports: [DataViewBuilderComponent] });
340
- PepDataViewBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, providers: [DataViewBuilderService], imports: [[
341
- i7.CommonModule,
342
- i8.DragDropModule,
343
- i3.MatIconModule,
344
- ngxLib.PepNgxLibModule,
345
- i5.PepButtonModule,
346
- i1.PepDialogModule,
347
- i1$1.PepIconModule,
348
- menu.PepMenuModule,
349
- i2.PepPageLayoutModule,
350
- i6.PepTextboxModule,
351
- topBar.PepTopBarModule,
352
- i3$1.PepDraggableItemsModule,
353
- ]] });
354
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, decorators: [{
355
- type: i0.NgModule,
356
- args: [{
357
- declarations: [
358
- DataViewBuilderComponent, MenuDataViewComponent
359
- ],
360
- imports: [
361
- i7.CommonModule,
362
- i8.DragDropModule,
363
- i3.MatIconModule,
364
- ngxLib.PepNgxLibModule,
365
- i5.PepButtonModule,
366
- i1.PepDialogModule,
367
- i1$1.PepIconModule,
368
- menu.PepMenuModule,
369
- i2.PepPageLayoutModule,
370
- i6.PepTextboxModule,
371
- topBar.PepTopBarModule,
372
- i3$1.PepDraggableItemsModule,
373
- ],
374
- exports: [DataViewBuilderComponent],
375
- providers: [DataViewBuilderService]
376
- }]
314
+ var pepIcons = [
315
+ i1$1.pepIconSystemClose,
316
+ i1$1.pepIconArrowDownAlt,
317
+ i1$1.pepIconSystemBin,
318
+ i1$1.pepIconNumberPlus
319
+ ];
320
+ var PepDataViewBuilderModule = /** @class */ (function () {
321
+ function PepDataViewBuilderModule(pepIconRegistry) {
322
+ this.pepIconRegistry = pepIconRegistry;
323
+ this.pepIconRegistry.registerIcons(pepIcons);
324
+ }
325
+ return PepDataViewBuilderModule;
326
+ }());
327
+ PepDataViewBuilderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, deps: [{ token: i1__namespace$1.PepIconRegistry }], target: i0__namespace.ɵɵFactoryTarget.NgModule });
328
+ PepDataViewBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, declarations: [DataViewBuilderComponent, MenuDataViewComponent], imports: [i7.CommonModule,
329
+ i8.DragDropModule,
330
+ i3.MatIconModule,
331
+ ngxLib.PepNgxLibModule,
332
+ i5.PepButtonModule,
333
+ i1.PepDialogModule,
334
+ i1$1.PepIconModule,
335
+ menu.PepMenuModule,
336
+ i2.PepPageLayoutModule,
337
+ i6.PepTextboxModule,
338
+ topBar.PepTopBarModule,
339
+ i3$1.PepDraggableItemsModule], exports: [DataViewBuilderComponent] });
340
+ PepDataViewBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, providers: [DataViewBuilderService], imports: [[
341
+ i7.CommonModule,
342
+ i8.DragDropModule,
343
+ i3.MatIconModule,
344
+ ngxLib.PepNgxLibModule,
345
+ i5.PepButtonModule,
346
+ i1.PepDialogModule,
347
+ i1$1.PepIconModule,
348
+ menu.PepMenuModule,
349
+ i2.PepPageLayoutModule,
350
+ i6.PepTextboxModule,
351
+ topBar.PepTopBarModule,
352
+ i3$1.PepDraggableItemsModule,
353
+ ]] });
354
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, decorators: [{
355
+ type: i0.NgModule,
356
+ args: [{
357
+ declarations: [
358
+ DataViewBuilderComponent, MenuDataViewComponent
359
+ ],
360
+ imports: [
361
+ i7.CommonModule,
362
+ i8.DragDropModule,
363
+ i3.MatIconModule,
364
+ ngxLib.PepNgxLibModule,
365
+ i5.PepButtonModule,
366
+ i1.PepDialogModule,
367
+ i1$1.PepIconModule,
368
+ menu.PepMenuModule,
369
+ i2.PepPageLayoutModule,
370
+ i6.PepTextboxModule,
371
+ topBar.PepTopBarModule,
372
+ i3$1.PepDraggableItemsModule,
373
+ ],
374
+ exports: [DataViewBuilderComponent],
375
+ providers: [DataViewBuilderService]
376
+ }]
377
377
  }], ctorParameters: function () { return [{ type: i1__namespace$1.PepIconRegistry }]; } });
378
378
 
379
- /*
380
- * Public API Surface of ngx-composite-lib/data-view-builder
379
+ /*
380
+ * Public API Surface of ngx-composite-lib/data-view-builder
381
381
  */
382
382
 
383
- /**
384
- * Generated bundle index. Do not edit.
383
+ /**
384
+ * Generated bundle index. Do not edit.
385
385
  */
386
386
 
387
387
  exports.DataViewBuilderComponent = DataViewBuilderComponent;