@pepperi-addons/ngx-composite-lib 0.0.16-beta.32 → 0.0.16-beta.35

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 (131) hide show
  1. package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js +126 -123
  2. package/bundles/pepperi-addons-ngx-composite-lib-color-settings.umd.js.map +1 -1
  3. package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js +338 -335
  4. package/bundles/pepperi-addons-ngx-composite-lib-data-view-builder.umd.js.map +1 -1
  5. package/bundles/pepperi-addons-ngx-composite-lib-file-status-panel.umd.js +89 -89
  6. package/bundles/pepperi-addons-ngx-composite-lib-generic-form.umd.js +647 -647
  7. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js +998 -993
  8. package/bundles/pepperi-addons-ngx-composite-lib-generic-list.umd.js.map +1 -1
  9. package/bundles/pepperi-addons-ngx-composite-lib-group-buttons-settings.umd.js +179 -179
  10. package/bundles/pepperi-addons-ngx-composite-lib-shadow-settings.umd.js +117 -117
  11. package/bundles/pepperi-addons-ngx-composite-lib.umd.js +598 -598
  12. package/color-settings/color-settings.component.d.ts +23 -22
  13. package/color-settings/color-settings.model.d.ts +5 -5
  14. package/color-settings/color-settings.module.d.ts +12 -12
  15. package/color-settings/pepperi-addons-ngx-composite-lib-color-settings.d.ts +5 -5
  16. package/color-settings/public-api.d.ts +3 -3
  17. package/core/common/directives/index.d.ts +1 -1
  18. package/core/common/directives/public-api.d.ts +1 -1
  19. package/core/common/directives/reset-configuration-field.directive.d.ts +39 -39
  20. package/core/common/index.d.ts +1 -1
  21. package/core/common/public-api.d.ts +2 -2
  22. package/core/common/services/dimx.service.d.ts +32 -32
  23. package/core/common/services/index.d.ts +1 -1
  24. package/core/common/services/public-api.d.ts +2 -2
  25. package/core/common/services/utilities.service.d.ts +6 -6
  26. package/core/index.d.ts +1 -1
  27. package/core/public-api.d.ts +1 -1
  28. package/data-view-builder/data-view-builder.component.d.ts +35 -35
  29. package/data-view-builder/data-view-builder.model.d.ts +1 -1
  30. package/data-view-builder/data-view-builder.module.d.ts +23 -23
  31. package/data-view-builder/data-view-builder.service.d.ts +14 -14
  32. package/data-view-builder/menu-data-view/menu-data-view.component.d.ts +36 -36
  33. package/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.d.ts +5 -5
  34. package/data-view-builder/public-api.d.ts +3 -3
  35. package/esm2015/color-settings/color-settings.component.js +85 -82
  36. package/esm2015/color-settings/color-settings.model.js +8 -8
  37. package/esm2015/color-settings/color-settings.module.js +39 -39
  38. package/esm2015/color-settings/pepperi-addons-ngx-composite-lib-color-settings.js +4 -4
  39. package/esm2015/color-settings/public-api.js +6 -6
  40. package/esm2015/core/common/directives/index.js +4 -4
  41. package/esm2015/core/common/directives/public-api.js +4 -4
  42. package/esm2015/core/common/directives/reset-configuration-field.directive.js +139 -139
  43. package/esm2015/core/common/index.js +4 -4
  44. package/esm2015/core/common/public-api.js +5 -5
  45. package/esm2015/core/common/services/dimx.service.js +49 -49
  46. package/esm2015/core/common/services/index.js +4 -4
  47. package/esm2015/core/common/services/public-api.js +5 -5
  48. package/esm2015/core/common/services/utilities.service.js +18 -18
  49. package/esm2015/core/index.js +4 -4
  50. package/esm2015/core/public-api.js +4 -4
  51. package/esm2015/data-view-builder/data-view-builder.component.js +122 -121
  52. package/esm2015/data-view-builder/data-view-builder.model.js +1 -1
  53. package/esm2015/data-view-builder/data-view-builder.module.js +81 -81
  54. package/esm2015/data-view-builder/data-view-builder.service.js +39 -38
  55. package/esm2015/data-view-builder/menu-data-view/menu-data-view.component.js +122 -121
  56. package/esm2015/data-view-builder/pepperi-addons-ngx-composite-lib-data-view-builder.js +4 -4
  57. package/esm2015/data-view-builder/public-api.js +6 -6
  58. package/esm2015/file-status-panel/file-status-panel.component.js +38 -38
  59. package/esm2015/file-status-panel/file-status-panel.model.js +8 -8
  60. package/esm2015/file-status-panel/file-status-panel.module.js +55 -55
  61. package/esm2015/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.js +4 -4
  62. package/esm2015/file-status-panel/public-api.js +6 -6
  63. package/esm2015/generic-form/generic-form.component.js +189 -189
  64. package/esm2015/generic-form/generic-form.model.js +1 -1
  65. package/esm2015/generic-form/generic-form.module.js +73 -73
  66. package/esm2015/generic-form/generic-form.service.js +67 -67
  67. package/esm2015/generic-form/index.js +4 -4
  68. package/esm2015/generic-form/pepperi-addons-ngx-composite-lib-generic-form.js +4 -4
  69. package/esm2015/generic-form/public-api.js +7 -7
  70. package/esm2015/generic-list/generic-list.component.js +438 -433
  71. package/esm2015/generic-list/generic-list.model.js +1 -1
  72. package/esm2015/generic-list/generic-list.module.js +71 -71
  73. package/esm2015/generic-list/generic-list.service.js +126 -126
  74. package/esm2015/generic-list/pepperi-addons-ngx-composite-lib-generic-list.js +4 -4
  75. package/esm2015/generic-list/public-api.js +7 -7
  76. package/esm2015/group-buttons-settings/group-buttons-settings.component.js +134 -134
  77. package/esm2015/group-buttons-settings/group-buttons-settings.model.js +1 -1
  78. package/esm2015/group-buttons-settings/group-buttons-settings.module.js +49 -49
  79. package/esm2015/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +4 -4
  80. package/esm2015/group-buttons-settings/public-api.js +6 -6
  81. package/esm2015/ngx-composite-lib.module.js +55 -55
  82. package/esm2015/pepperi-addons-ngx-composite-lib.js +4 -4
  83. package/esm2015/public-api.js +5 -5
  84. package/esm2015/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.js +4 -4
  85. package/esm2015/shadow-settings/public-api.js +6 -6
  86. package/esm2015/shadow-settings/shadow-settings.component.js +72 -72
  87. package/esm2015/shadow-settings/shadow-settings.model.js +7 -7
  88. package/esm2015/shadow-settings/shadow-settings.module.js +43 -43
  89. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js +116 -113
  90. package/fesm2015/pepperi-addons-ngx-composite-lib-color-settings.js.map +1 -1
  91. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js +319 -316
  92. package/fesm2015/pepperi-addons-ngx-composite-lib-data-view-builder.js.map +1 -1
  93. package/fesm2015/pepperi-addons-ngx-composite-lib-file-status-panel.js +84 -84
  94. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-form.js +301 -301
  95. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js +595 -590
  96. package/fesm2015/pepperi-addons-ngx-composite-lib-generic-list.js.map +1 -1
  97. package/fesm2015/pepperi-addons-ngx-composite-lib-group-buttons-settings.js +170 -170
  98. package/fesm2015/pepperi-addons-ngx-composite-lib-shadow-settings.js +107 -107
  99. package/fesm2015/pepperi-addons-ngx-composite-lib.js +255 -255
  100. package/file-status-panel/file-status-panel.component.d.ts +14 -14
  101. package/file-status-panel/file-status-panel.model.d.ts +7 -7
  102. package/file-status-panel/file-status-panel.module.d.ts +17 -17
  103. package/file-status-panel/pepperi-addons-ngx-composite-lib-file-status-panel.d.ts +5 -5
  104. package/file-status-panel/public-api.d.ts +3 -3
  105. package/generic-form/generic-form.component.d.ts +46 -46
  106. package/generic-form/generic-form.model.d.ts +34 -34
  107. package/generic-form/generic-form.module.d.ts +13 -13
  108. package/generic-form/generic-form.service.d.ts +16 -16
  109. package/generic-form/index.d.ts +1 -1
  110. package/generic-form/pepperi-addons-ngx-composite-lib-generic-form.d.ts +5 -5
  111. package/generic-form/public-api.d.ts +4 -4
  112. package/generic-list/generic-list.component.d.ts +100 -100
  113. package/generic-list/generic-list.model.d.ts +51 -51
  114. package/generic-list/generic-list.module.d.ts +18 -18
  115. package/generic-list/generic-list.service.d.ts +43 -43
  116. package/generic-list/pepperi-addons-ngx-composite-lib-generic-list.d.ts +5 -5
  117. package/generic-list/public-api.d.ts +4 -4
  118. package/group-buttons-settings/group-buttons-settings.component.d.ts +33 -33
  119. package/group-buttons-settings/group-buttons-settings.model.d.ts +1 -1
  120. package/group-buttons-settings/group-buttons-settings.module.d.ts +15 -15
  121. package/group-buttons-settings/pepperi-addons-ngx-composite-lib-group-buttons-settings.d.ts +5 -5
  122. package/group-buttons-settings/public-api.d.ts +3 -3
  123. package/ngx-composite-lib.module.d.ts +13 -13
  124. package/package.json +1 -1
  125. package/pepperi-addons-ngx-composite-lib.d.ts +5 -5
  126. package/public-api.d.ts +2 -2
  127. package/shadow-settings/pepperi-addons-ngx-composite-lib-shadow-settings.d.ts +5 -5
  128. package/shadow-settings/public-api.d.ts +3 -3
  129. package/shadow-settings/shadow-settings.component.d.ts +23 -23
  130. package/shadow-settings/shadow-settings.model.d.ts +7 -7
  131. package/shadow-settings/shadow-settings.module.d.ts +13 -13
@@ -34,351 +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
- Object.defineProperty(DataViewBuilderService.prototype, "isGrabbingChange$", {
43
- get: function () {
44
- return this._isGrabbingSubject.asObservable().pipe(operators.distinctUntilChanged());
45
- },
46
- enumerable: false,
47
- configurable: true
48
- });
49
- DataViewBuilderService.prototype.changeCursorOnDragStart = function () {
50
- document.body.classList.add('inheritCursors');
51
- document.body.style.cursor = 'grabbing';
52
- this._isGrabbingSubject.next(true);
53
- };
54
- DataViewBuilderService.prototype.changeCursorOnDragEnd = function () {
55
- document.body.classList.remove('inheritCursors');
56
- document.body.style.cursor = 'unset';
57
- this._isGrabbingSubject.next(false);
58
- };
59
- DataViewBuilderService.prototype.onDragStart = function (event) {
60
- this.changeCursorOnDragStart();
61
- };
62
- DataViewBuilderService.prototype.onDragEnd = function (event) {
63
- this.changeCursorOnDragEnd();
64
- };
65
- return DataViewBuilderService;
66
- }());
67
- DataViewBuilderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
68
- DataViewBuilderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, providedIn: 'root' });
69
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderService, decorators: [{
70
- type: i0.Injectable,
71
- args: [{
72
- providedIn: 'root'
73
- }]
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
+ }]
74
75
  }], ctorParameters: function () { return []; } });
75
76
 
76
- var MenuDataViewComponent = /** @class */ (function () {
77
- function MenuDataViewComponent(dialogService, dataViewBuilderService) {
78
- var _this = this;
79
- this.dialogService = dialogService;
80
- this.dataViewBuilderService = dataViewBuilderService;
81
- this.fields = []; // The data view fields.
82
- this.availableFieldsTitles = new Map(); // <FieldID, Original Title> from the available fields.
83
- this.emptyDropAreaId = '';
84
- this.mappedFieldsId = '';
85
- this.fieldsChange = new i0.EventEmitter();
86
- this.isGrabbing = false;
87
- this.dialogRef = null;
88
- this.dataViewBuilderService.isGrabbingChange$.subscribe(function (value) {
89
- _this.isGrabbing = value;
90
- });
91
- }
92
- MenuDataViewComponent.prototype.addNewField = function (draggableItem, index) {
93
- // Add new menuField to the mappedFields.
94
- var menuField = { FieldID: draggableItem.data.key, Title: draggableItem.title };
95
- this.spliceMappedFields(index, 0, menuField);
96
- };
97
- MenuDataViewComponent.prototype.spliceMappedFields = function (start, deleteCount, item) {
98
- if (item) {
99
- this.fields.splice(start, deleteCount, item);
100
- }
101
- else {
102
- this.fields.splice(start, deleteCount);
103
- }
104
- this.notifyFieldsChange();
105
- };
106
- MenuDataViewComponent.prototype.changeTitle = function (menuField, title) {
107
- menuField.Title = title;
108
- this.notifyFieldsChange();
109
- };
110
- MenuDataViewComponent.prototype.notifyFieldsChange = function () {
111
- this.fieldsChange.emit(this.fields);
112
- };
113
- MenuDataViewComponent.prototype.ngOnInit = function () {
114
- };
115
- MenuDataViewComponent.prototype.addSeparator = function (index) {
116
- var menuField = { FieldID: '', Title: '' };
117
- this.spliceMappedFields(index, 0, menuField);
118
- };
119
- MenuDataViewComponent.prototype.onDragStart = function (event) {
120
- this.dataViewBuilderService.onDragStart(event);
121
- };
122
- MenuDataViewComponent.prototype.onDragEnd = function (event) {
123
- this.dataViewBuilderService.onDragEnd(event);
124
- };
125
- MenuDataViewComponent.prototype.onDropField = function (event) {
126
- if (event.previousContainer === event.container) {
127
- i8.moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
128
- this.notifyFieldsChange();
129
- }
130
- else if (event.container.id === 'emptyDropArea') {
131
- this.addNewField(event.previousContainer.data[event.previousIndex], this.fields.length);
132
- }
133
- else {
134
- this.addNewField(event.previousContainer.data[event.previousIndex], event.currentIndex);
135
- }
136
- };
137
- MenuDataViewComponent.prototype.onTitleChanged = function (event, menuField) {
138
- this.changeTitle(menuField, event);
139
- };
140
- MenuDataViewComponent.prototype.onDeleteMappedField = function (event, menuField) {
141
- var index = this.fields.findIndex(function (ms) { return ms === menuField; });
142
- if (index > -1) {
143
- this.spliceMappedFields(index, 1);
144
- }
145
- };
146
- MenuDataViewComponent.prototype.onEditSeparatorField = function (event, menuField) {
147
- var _this = this;
148
- this.dialogRef = this.dialogService.openDialog(this.separatorTitleModalTemplate, { value: menuField.Title });
149
- this.dialogRef.afterClosed().subscribe(function (titleValue) {
150
- if (titleValue !== undefined) {
151
- _this.changeTitle(menuField, titleValue);
152
- }
153
- });
154
- };
155
- MenuDataViewComponent.prototype.setDialogValue = function (value) {
156
- this.closeDialog(value);
157
- };
158
- MenuDataViewComponent.prototype.closeDialog = function (value) {
159
- if (value === void 0) { value = undefined; }
160
- var _a;
161
- (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.close(value);
162
- };
163
- return MenuDataViewComponent;
164
- }());
165
- 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 });
166
- 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 } });
167
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: MenuDataViewComponent, decorators: [{
168
- type: i0.Component,
169
- args: [{
170
- selector: 'menu-data-view',
171
- templateUrl: './menu-data-view.component.html',
172
- styleUrls: ['./menu-data-view.component.scss']
173
- }]
174
- }], ctorParameters: function () { return [{ type: i1__namespace.PepDialogService }, { type: DataViewBuilderService }]; }, propDecorators: { separatorTitleModalTemplate: [{
175
- type: i0.ViewChild,
176
- args: ['separatorTitleModalTemplate', { read: i0.TemplateRef }]
177
- }], fields: [{
178
- type: i0.Input
179
- }], availableFieldsTitles: [{
180
- type: i0.Input
181
- }], emptyDropAreaId: [{
182
- type: i0.Input
183
- }], mappedFieldsId: [{
184
- type: i0.Input
185
- }], fieldsChange: [{
186
- 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
187
189
  }] } });
188
190
 
189
- var DataViewBuilderComponent = /** @class */ (function () {
190
- function DataViewBuilderComponent(dataViewBuilderService) {
191
- this.dataViewBuilderService = dataViewBuilderService;
192
- // @Input() title: string = '';
193
- this.builderTitle = '';
194
- this.builderTitleHint = '';
195
- this._availableFields = [];
196
- this.dataViewChange = new i0.EventEmitter();
197
- this.type = 'not-supported';
198
- this.emptyDropAreaId = 'emptyDropArea';
199
- this.mappedFieldsId = 'mappedFields';
200
- this.availableFieldsTitles = new Map();
201
- //
202
- }
203
- Object.defineProperty(DataViewBuilderComponent.prototype, "availableFields", {
204
- get: function () {
205
- return this._availableFields;
206
- },
207
- set: function (value) {
208
- this._availableFields = value;
209
- this.setTitlesMap();
210
- },
211
- enumerable: false,
212
- configurable: true
213
- });
214
- Object.defineProperty(DataViewBuilderComponent.prototype, "dataView", {
215
- get: function () {
216
- return this._dataView;
217
- },
218
- set: function (value) {
219
- this._dataView = value;
220
- this.setType();
221
- this.refreshAvailableFields();
222
- },
223
- enumerable: false,
224
- configurable: true
225
- });
226
- DataViewBuilderComponent.prototype.setType = function () {
227
- if (this._dataView.Type === 'Menu') {
228
- this.type = 'menu';
229
- }
230
- else if (this._dataView.Type === 'Grid') {
231
- this.type = 'list';
232
- }
233
- else if ((this._dataView.Type === 'Card') ||
234
- (this._dataView.Type === 'Form') ||
235
- (this._dataView.Type === 'Large') ||
236
- (this._dataView.Type === 'Line')) {
237
- this.type = 'card';
238
- }
239
- else {
240
- this.type = 'not-supported';
241
- }
242
- };
243
- DataViewBuilderComponent.prototype.setAvailableFieldPermission = function (field, disable) {
244
- // Find the item in the available fields
245
- var item = this.availableFields.find(function (as) { return as.data.key === field; });
246
- // If exist disable or enable it.
247
- if (item) {
248
- item.disabled = disable;
249
- }
250
- };
251
- DataViewBuilderComponent.prototype.refreshAvailableFields = function () {
252
- this.availableFields.forEach(function (af) { return af.disabled = false; });
253
- if (this.dataView && this.dataView.Fields) {
254
- for (var index = 0; index < this.dataView.Fields.length; index++) {
255
- this.setAvailableFieldPermission(this.dataView.Fields[index].FieldID, true);
256
- }
257
- }
258
- };
259
- DataViewBuilderComponent.prototype.setTitlesMap = function () {
260
- var _a, _b;
261
- this.availableFieldsTitles.clear();
262
- if (((_a = this.availableFields) === null || _a === void 0 ? void 0 : _a.length) > 0) {
263
- for (var index = 0; index < this.availableFields.length; index++) {
264
- var availableField = this.availableFields[index];
265
- if (((_b = availableField === null || availableField === void 0 ? void 0 : availableField.data) === null || _b === void 0 ? void 0 : _b.key.length) > 0) {
266
- this.availableFieldsTitles.set(availableField.data.key, availableField.title);
267
- }
268
- }
269
- }
270
- };
271
- DataViewBuilderComponent.prototype.notifyDataViewChange = function () {
272
- this.dataViewChange.emit(this.dataView);
273
- // console.log(this.dataView);
274
- };
275
- DataViewBuilderComponent.prototype.ngOnInit = function () {
276
- };
277
- DataViewBuilderComponent.prototype.onDragStart = function (event) {
278
- this.dataViewBuilderService.onDragStart(event);
279
- };
280
- DataViewBuilderComponent.prototype.onDragEnd = function (event) {
281
- this.dataViewBuilderService.onDragEnd(event);
282
- };
283
- DataViewBuilderComponent.prototype.onFieldsChanged = function (fields) {
284
- this.dataView.Fields = fields;
285
- this.refreshAvailableFields();
286
- this.notifyDataViewChange();
287
- };
288
- return DataViewBuilderComponent;
289
- }());
290
- 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 });
291
- 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 } });
292
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: DataViewBuilderComponent, decorators: [{
293
- type: i0.Component,
294
- args: [{
295
- selector: 'pep-data-view-builder',
296
- templateUrl: './data-view-builder.component.html',
297
- styleUrls: ['./data-view-builder.component.scss']
298
- }]
299
- }], ctorParameters: function () { return [{ type: DataViewBuilderService }]; }, propDecorators: { builderTitle: [{
300
- type: i0.Input
301
- }], builderTitleHint: [{
302
- type: i0.Input
303
- }], availableFields: [{
304
- type: i0.Input
305
- }], dataView: [{
306
- type: i0.Input
307
- }], dataViewChange: [{
308
- 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
309
312
  }] } });
310
313
 
311
- var pepIcons = [
312
- i1$1.pepIconSystemClose,
313
- i1$1.pepIconArrowDownAlt,
314
- i1$1.pepIconSystemBin,
315
- i1$1.pepIconNumberPlus
316
- ];
317
- var PepDataViewBuilderModule = /** @class */ (function () {
318
- function PepDataViewBuilderModule(pepIconRegistry) {
319
- this.pepIconRegistry = pepIconRegistry;
320
- this.pepIconRegistry.registerIcons(pepIcons);
321
- }
322
- return PepDataViewBuilderModule;
323
- }());
324
- 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 });
325
- PepDataViewBuilderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, declarations: [DataViewBuilderComponent, MenuDataViewComponent], imports: [i7.CommonModule,
326
- i8.DragDropModule,
327
- i3.MatIconModule,
328
- ngxLib.PepNgxLibModule,
329
- i5.PepButtonModule,
330
- i1.PepDialogModule,
331
- i1$1.PepIconModule,
332
- menu.PepMenuModule,
333
- i2.PepPageLayoutModule,
334
- i6.PepTextboxModule,
335
- topBar.PepTopBarModule,
336
- i3$1.PepDraggableItemsModule], exports: [DataViewBuilderComponent] });
337
- PepDataViewBuilderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, providers: [DataViewBuilderService], imports: [[
338
- i7.CommonModule,
339
- i8.DragDropModule,
340
- i3.MatIconModule,
341
- ngxLib.PepNgxLibModule,
342
- i5.PepButtonModule,
343
- i1.PepDialogModule,
344
- i1$1.PepIconModule,
345
- menu.PepMenuModule,
346
- i2.PepPageLayoutModule,
347
- i6.PepTextboxModule,
348
- topBar.PepTopBarModule,
349
- i3$1.PepDraggableItemsModule,
350
- ]] });
351
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.5", ngImport: i0__namespace, type: PepDataViewBuilderModule, decorators: [{
352
- type: i0.NgModule,
353
- args: [{
354
- declarations: [
355
- DataViewBuilderComponent, MenuDataViewComponent
356
- ],
357
- imports: [
358
- i7.CommonModule,
359
- i8.DragDropModule,
360
- i3.MatIconModule,
361
- ngxLib.PepNgxLibModule,
362
- i5.PepButtonModule,
363
- i1.PepDialogModule,
364
- i1$1.PepIconModule,
365
- menu.PepMenuModule,
366
- i2.PepPageLayoutModule,
367
- i6.PepTextboxModule,
368
- topBar.PepTopBarModule,
369
- i3$1.PepDraggableItemsModule,
370
- ],
371
- exports: [DataViewBuilderComponent],
372
- providers: [DataViewBuilderService]
373
- }]
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
+ }]
374
377
  }], ctorParameters: function () { return [{ type: i1__namespace$1.PepIconRegistry }]; } });
375
378
 
376
- /*
377
- * Public API Surface of ngx-composite-lib/data-view-builder
379
+ /*
380
+ * Public API Surface of ngx-composite-lib/data-view-builder
378
381
  */
379
382
 
380
- /**
381
- * Generated bundle index. Do not edit.
383
+ /**
384
+ * Generated bundle index. Do not edit.
382
385
  */
383
386
 
384
387
  exports.DataViewBuilderComponent = DataViewBuilderComponent;